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 foo = { | |
__noSuchMethod__ : function(id, args) { | |
console.log("id: "+id); | |
console.log("Arg: "+args); | |
}, | |
bar:function(a,b){ | |
console.log("OK!"); | |
} | |
}; |
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
/* | |
* Usage | |
* | |
* $('#textarea_id').tweet_text_design("First part | Second Part"); | |
* | |
* | |
*/ | |
$.fn.tweet_text_design = (function(text){ | |
text = text.split("|"); |
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
$ memcached -u memcached -d -m 30 -l 127.0.0.1 -p 11211 |
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 _$ = document.getElementById; | |
/// Usage | |
_$('element_id').value = ""; |
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
def fak (x): | |
if x == 0: | |
return 1 | |
else: | |
return x * fak(x-1) | |
i = 0 | |
t = 8.3 | |
result1 = 0 | |
result2 = 0 |
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
#cos(x) approximation | |
def fak (x): | |
if x == 0: | |
return 1 | |
else: | |
return x * fak(x-1) | |
import math |
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 dateConvert = { "Mon,":"Pazartesi", "Tue,":"Salı", "Wed,":"Çarşamba", "Thu,":"Perşembe", | |
"Fri,":"Cuma", "Sat,":"Cumartesi", "Sun,":"Pazar", | |
"Jan":"Ocak", "Feb":"Şubat", "Mar":"Mart", "Apr":"Nisan", "May":"Mayıs", | |
"Jun":"", "Jul":"", "Aug":"Ağustos", "Sep":"Eylül", "Oct":"Ekim", | |
"Nov":"Kasım", "Dec":"Aralık"}; | |
// usage : |
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
/* | |
* This program draws points placed with mouse clicks. | |
* Maximum number of points allowed is currently set at 16. | |
* | |
* Usage: | |
* Left click to place a control point. | |
* Press escape to exit. | |
*/ | |
#include <stdlib.h> | |
#include <GL/glut.h> |
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
/* Program 3-1 | |
Use keyboard input to change background colour of screen. | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include <GL/glut.h> | |
#define KEY_ESC 27 /* GLUT doesn't supply this */ | |
int myrandom(int m) { |