This file contains hidden or 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
// To use the isset() function to determine the status of x, call isset("x"). | |
function isset(x) { | |
return typeof(window[x])=="undefined" ? false : true; | |
} |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct node* link; | |
struct node { | |
char* item; | |
link next; | |
link prev; | |
}; |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define MAX_ROW_LENGTH 200 | |
void printerr(char* msg) { | |
printf("\n%s\n", msg); | |
fflush(stdout); | |
#if defined (__WIN32__) | |
system("PAUSE"); |
This file contains hidden or 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
char* base_converter(char* nbasefrom, int basefrom, int baseto) { | |
const char* SYMBOLS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
if (basefrom<=0 || basefrom>strlen(SYMBOLS) || baseto<=0 || baseto>strlen(SYMBOLS)) { | |
fprintf(stderr, "Base unallowed"); | |
return NULL; | |
} | |
int i, nbaseten=0; | |
if (basefrom!=10) { | |
int sizenbasefrom = strlen(nbasefrom); | |
for (i=0; i<sizenbasefrom; i++) { |
This file contains hidden or 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 base_converter(nbasefrom, basefrom, baseto) { | |
var SYMBOLS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
if (basefrom<=0 || basefrom>SYMBOLS.length || baseto<=0 || baseto>SYMBOLS.length) { | |
console.log("Base unallowed"); | |
return null; | |
} | |
var i, nbaseten=0; | |
if (basefrom!=10) { | |
var sizenbasefrom = nbasefrom.length; | |
for (i=0; i<sizenbasefrom; i++) { |
This file contains hidden or 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
#!/bin/bash | |
me=$(basename $0) | |
os=$(uname) | |
function usage | |
{ | |
echo | |
echo "Usage" | |
echo |
This file contains hidden or 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
javascript: | |
var TIMER = 3000; | |
var foo_id = null; | |
function ssscript() { | |
if (foo_id) stopscript(); | |
else startscript(); | |
} |
This file contains hidden or 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
HTMLAnchorElement.prototype.click = function (){ | |
var e = document.createEvent("HTMLEvents"); | |
e.initEvent("click",true,true); | |
return !this.dispatchEvent(e); | |
} |
This file contains hidden or 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
jQuery.ajax({ | |
url: "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q=" + encodeURIComponent(feedurl), | |
dataType: "json", | |
success: function (data) { | |
content = data.responseData.feed; | |
} | |
}); |
This file contains hidden or 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
afor = function(a, b, c, t, f) { | |
eval(a); | |
if (eval(b)) { | |
f.apply(); | |
eval(c); | |
setTimeout(function(){ afor(null,b,c,t,f) }, t); | |
} | |
} |