Welcome To Snipplr
Everyone's Recent Snippets Tagged object
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
I include this in anything I'm developing, so I can easily inspect the contents of arrays and objects.
0
952
posted 15 years ago by joshuamilford
C#
Generic list wrapper returns a smaller strongly typed sub-list which modifies the parent-list when changed (without events)
A class which wraps a parent list containing mixed object types, to provide smaller strongly typed sub-lists of objects. These sub-lists can be modified, which then modifies the parent list concurrently (without events being triggered). Supports the...
0
934
posted 15 years ago by bryanlyman
For .net 2.0+ The one limitation to enumerations is revealed when you try to reverse lookup an enumeration value using Enum.Parse(). The parse function will return an inconsistent enum object if ever there are two or more enumerations with the same...
0
1282
posted 15 years ago by bryanlyman
Create log.txt in scripts directory and set permissions to 0666 before use.
0
850
posted 15 years ago by Nek
Use this function to test whether or not a Javascript object is empty.
2
1129
posted 15 years ago by jlizarraga
The code below will loop through the properties in an object and alert a string. myObject is in JSON notation. The "for ( x in y)" construct does not work if the Prototype.js library is included on the page
0
1391
posted 15 years ago by elugardo
Detect if an object exists in an array or detect existance of a key in an object
1
813
posted 15 years ago by quickredfox
Runtime Object Evaluator; search for string object properties that start with !! and eval the content.
Very useful if you want to load JSON from file and evaluate its fields on effective usage or access global variables at runtime.
[Follow me on T...
1
683
posted 15 years ago by straps
For cross-browser code--which is not necessarily valid--the [Embedded Media HTML Generator](http://cit.ucsf.edu/embedmedia/step1.php) provides a great starting point.
1
991
posted 15 years ago by wizard04
Used to share between a single instance of jQuery through iFrames. Do note, the iFrame content must originate from the same domain, or this plugin will NOT work as expected.
4
1410
posted 15 years ago by garside
If you have a component being bound from an ObjectDataSource (like a drop-down menu, or a grid view) and you wish to change the value's SelectParameters. Where # is which SelectParameter you'd like to change. If there's just one SelectParamter, defau...
0
879
posted 16 years ago by blackf0rk
Serializes any <serializable/> object and writes it to the specified location on the disk.
Example:
Dim obj As DataTable
'save obj to disk
SerializeToFile(filepath, obj)
'to read it back, use DirectCast
Dim obj2 As DataTable = DirectCast(...
0
1132
posted 16 years ago by chavcho
object.forEach
=========
*Requires JavaScript 1.8*
`void object.forEach(function callback(item, value)[, thisObject])`
0
779
posted 16 years ago by Sephr
this funciton returns an XMLHttpRequest object for use in ajax pages
1
986
posted 16 years ago by jlvallelonga
Everything works as expected for the setTimeout() function until you try to call a method inside your ‘class’ (there are no real classes in JavaScript). Something like this won’t work:
setTimeout(this.methodToCall, time);
Passing a string r...
0
1372
posted 16 years ago by eden159