This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//method 1 | |
var A = function(name){ | |
var _name = name; | |
Object.defineProperty(this, 'name', {get: function(){console.log('get name'); return _name;}, | |
set:function(e){console.log('set name='+e); _name=e;}, | |
enumerable: true | |
}); | |
return this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$.fn.slider = function (method, options) { | |
var methods = { | |
init: function (options) { | |
if ($(this).children().length > 0) { | |
var slide = $($(this).children().get(options.startIndex)); | |
slide.addClass('selected'); | |
options.onInit(options.startIndex); | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using OAuth; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Web; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var debug={ | |
enabled: true, | |
init: function () { | |
if (this.enabled) | |
$('body').append('<div id="debug" style="position:absolute;bottom:0;right:0;background:#FFF;border:solid 1px #000;font-size:10px;padding:5px;"></div>'); | |
}, | |
write: function () { | |
if (this.enabled) { | |
for(var i in arguments) | |
$('#debug').append('<div>' + ((typeof arguments[i]==='object')?JSON.stringify(arguments[i]):arguments[i]) + '</div>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Web; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var JSONP = { | |
_jsonpcallbacks: {}, | |
request: function (url, data, callback) { | |
var callbackName = Math.random(); | |
Ripple._jsonpcallbacks[callbackName] = callback; | |
var script = document.createElement('script'); | |
script.src = url + '?callback=' + callbackName + '&data=' + encodeURIComponent(JSON.stringify(data)); | |
script.type = 'text/javascript'; | |
document.getElementsByTagName('head')[0].appendChild(script); | |
} |
NewerOlder