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
#include <stdio.h> | |
#include <gtk/gtk.h> | |
static gboolean focus_callback(GtkWidget *gtk_window, | |
GdkEvent *event, | |
GtkIMContext *im_context) { | |
gtk_widget_grab_focus(gtk_window); | |
gtk_im_context_focus_in(im_context); | |
gtk_im_context_reset(im_context); | |
return TRUE; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>圆</title> | |
<style> | |
canvas { | |
display: block; | |
margin: 100px auto 0 auto; | |
box-shadow: 0 0 10px #000; |
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
// Generated by gfwlist2pac in precise mode | |
// https://github.com/clowwindy/gfwlist2pac | |
var proxy = "SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080; DIRECT;"; | |
var rules = [ | |
"||altrec.com", | |
"||darpa.mil", | |
"||fastpic.ru", | |
"||fxnetworks.com", |
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
<iframe src="http://camzed.com/new/index.php/pages/online-users-widget?remote=1" width="240" height="680" frameborder="0" scrolling="no"></iframe> |
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
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification | |
{ | |
// Insert code here to initialize your application | |
SHFoo *foo = [SHFoo alloc]; | |
[foo say: @"Yes" whosay: @"Here is Shawn huang."]; | |
Boolean b = true; | |
BOOL b2 = YES; | |
b = !b2; | |
NSLog(@"Bool: %d %d", b, b2); | |
} |
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
yy440/zh440 | |
yy000/zh000 | |
yy432/zh432 | |
yy228/zh228 | |
y4y40 | |
y40y0 | |
yy800/zh800 |
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
// Duff's Device | |
var iterations = Math.floor(items.length / 8), | |
startAt = items.length % 8, | |
i = 0; | |
do{ | |
switch(startAt){ | |
case 0: process(items[i++]); | |
case 7: process(items[i++]); | |
case 6: process(items[i++]); |
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
elem.onclick = function(e){ | |
e = e || window.event; // IE's event is window.event | |
var target = e.target || e.srcElement; // IE's target is srcElement | |
if(target.nodeName !== 'A'){ | |
return; | |
} | |
if(typeof e.preventDefault === 'function'){ | |
e.preventDefault(); |
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 memfactorial(n){ | |
if(!memfactorial.cache){ | |
memfactorial.cache = { | |
'0': 1, | |
'1': 1 | |
}; | |
} | |
if(!memfactorial.cache.hasOwnProperty(n)){ |
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 timedProcessArray(items, process, callback){ | |
var todo = items.concat(); // Array clone | |
setTimeout(function(){ | |
var start = +new Date(); | |
do{ | |
process(todo.shift()); | |
}while(todo.length > 0 && (+new Date() - start < 50)); |
NewerOlder