3 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for Isaac_4

Here is a simple way to insert into a database that isn't much harder than using string concatenation - which we all know is very dangerous due to SQL injection attacks. Put the code snippet into `database.php`. Now, in a script handling a form post, such as `post_reply.php`: <?php require_once("database.php"); …

Member Avatar for diafol
4
498
Member Avatar for vegaseat
3
342
Member Avatar for apegram

[CODE] int[][] jaggedArray = (from line in File.ReadAllLines(fileName).Skip(1) select (from item in line.Split('\t').Skip(1) select int.Parse(item)).ToArray()).ToArray(); [/CODE] This is a crazy example. It was sparked by what is probably a homework thread on another forum here, but it is basically reading in a tab-delimitted text file, stripping out the first row …

Member Avatar for ddanbe
3
679

The End.