Welcome To Snipplr


Everyone's Recent Snippets Tagged array



« Prev 1 2 3 4 5 ... 13
This code is used to get the unique values of an array.
0 3597 posted 1 year ago by jlustre
A quick snippet to rotate a series of words on page load using PHP.
1 3400 posted 1 year ago by danparks
list files from directory and subdirectory into a table 'On déclare une arraylist qui contiendra tous les fichiers
0 1050 posted 2 years ago by martinbrait
rechercher une valeur dans une variable tableau (Array) en VBA Find some value into an array
0 426 posted 2 years ago by martinbrait
php list all files of a given directory
0 389 posted 2 years ago by martinbrait
How to populate an array with recordset data
0 389 posted 2 years ago by martinbrait
arr[::-1] does a list slice to reverse the array str(x) for x in arr[::-1] casts the ints in the array as strings map(str, arr[::-1]) does the same thing by using map to cast the ints " ".join() joins the resulting strings with a space
1 433 posted 5 years ago by denisemauldin
Convert easily XML File or String to Associative Array in PHP
0 535 posted 5 years ago by kavikms
Array.prototype.forEach You can't break forEach. So use "some" or "every". Array.prototype.some some is pretty much the same as forEach but it break when the callback returns true. Array.prototype.every every is almost identical to some except i...
0 405 posted 5 years ago by Waltem
Using underscore.js, you could combine .findWhere with .without Although, since you are creating a new array in this case anyway, you could simply use _.filter or the native Array.prototype.filter function (just like shown in the other question)....
0 1532 posted 6 years ago by Balamir
delete Operator don’t impact the length of Array in JavaScript
1 409 posted 6 years ago by ursdeep
I am tired of having to go through text and adding quotation marks and commas to strings or just commas after numbers... f-that. Fixed.
0 364 posted 6 years ago by joshuaherman
An example of the Arrays.sort() function. Taken from: http://www.tutorialspoint.com/java/util/arrays_sort_int.htm
0 506 posted 6 years ago by nulldev
Reverses a Java string array, taken from: http://www.java-examples.com/java-reverse-string-array-example
0 486 posted 6 years ago by nulldev
Sort & query arrays in PHP. Sort multi dimensional arrays by object properties and filter the array by specific criteria. Documentation: https://github.com/mattnicholson/DataList
1 442 posted 6 years ago by mattnicholson
An C++ header using templates. Array implementation of binary tree.
0 341 posted 6 years ago by elvis_popovic
Glavni program koji služi za izvedbu binarnoga stabla te rad sa funkcijama binarnoga stabla.
0 309 posted 6 years ago by ivan_uzarevic
Zaglavlje sa funkcijama, izvedenih pomoću polja, za rad sa binarnim stablom
0 339 posted 6 years ago by ivan_uzarevic
Program za izvođenje općenitog stabla (prvo dijete - sljedeći brat) za 4. zadatak iz kolegija Strukture podataka
0 330 posted 6 years ago by ivan_uzarevic
Implementacija binarnog stabla pomoću polja.
0 319 posted 6 years ago by igotepava
Implementacija općenitog stabla pomoću polja.
0 299 posted 6 years ago by igotepava
Works with any array
0 465 posted 6 years ago by a1ias
A simple function in Matlat to add the first k elements in an array
0 488 posted 6 years ago by eiger_824
shows how to use array_map to mine data from nested arrays.
0 314 posted 7 years ago by ryantxr
I created this code for practice, and I looking for better and clear solution for the last instance where I can write or delete the data, but after I want to get back the content as array or the key as string. I want to use this write-read back with...
0 374 posted 7 years ago by gitarfogas
This snippet stores all files in the current directory to an array.
0 332 posted 7 years ago by jlmarks
To be improved to work with fasterCSV
0 475 posted 7 years ago by legrandkay
Creating a nested array from items with parent IDs. This is useful for when you have a website working with multiple categories with parent categories. But it can be applied anywhere, really!
0 577 posted 7 years ago by CreativePunch
Usage: var a = ['a','a','a']; var b = a.AllValuesSame(): //true var a ['1','1','2']; var b = a.AllValuesSame(); //false
0 684 posted 8 years ago by uberdragon
Traverses a multidimensional array and returns an array with the results. It also echoes the result as a string just for demonstration.
0 303 posted 8 years ago by gummiost
« Prev 1 2 3 4 5 ... 13