Skip to content

Instantly share code, notes, and snippets.

//dynamically generated by ASP.NET for the language passed in.
var labels = {
objectOverlay: {
closeX: 'Close X',
fallback: 'Video for {vid}'
},
global: {
label1: 'label1',
label2: 'label2'
}
@ebello
ebello / gist:330358
Created March 12, 2010 14:32 — forked from remy/gist:330318
Placeholder fixer
/**
* Add this script to the end of your document that use <input autofocus type="text" />
* or <input type="text" placeholder="username" /> and it'll plug support for browser
* without these attributes
* Minified version at the bottom
*/
(function () {
function each(list, fn) {
var l = list.length;
// bookmarklet to introspect the source of current page
javascript:(function(d,h){h=d.documentElement.innerHTML;d.open();d.write('<pre>'+('<!DOCTYPE html><html>'+h+'</html>').replace(/[<>]/g,function(m){return{'<':'&lt;','>':'&gt;'}[m]})+'</pre>')})(document);
' VB.Net 2.0
' a class for videos is what I was using my original code for
Public Class Video
Private _id As Integer
Public Property Id() As Integer
Get
Return _id
End Get
Set(ByVal value As Integer)
public T RandomItem()
{
int randomRI = 0;
Random random = new Random();
lock (random)
{
randomRI = random.Next(0, this.Count - 1);
}
return this[randomRI];
}