Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
Go at Heroku | |
http://blog.golang.org/2011/04/go-at-heroku.html | |
Why you PHP guys should learn Golang | |
http://www.mikespook.com/2012/08/why-you-php-guys-should-learn-golang/ | |
Go at CloudFlare | |
http://blog.cloudflare.com/go-at-cloudflare | |
Go at Moovweb |
/* id is the id tag of <input/> element | |
type is the type you want to change it to. | |
jQuery is required and assumed to be the jQuery variable */ | |
function changeType(id, type) { | |
var x = jQuery("#"+id); | |
if(x.attr('type') == type) | |
return x; //That was easy. | |
try { | |
return x.attr('type', type); //Stupid IE security will not allow this | |
} catch(e) { |
timeout 150 | |
default freebsd | |
prompt 1 | |
label freebsd | |
com32 /boot/addons/chain.c32 | |
append file=/freebsd/gptzfsboot | |
label mfsbsd | |
kernel /boot/addons/memdisk |
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$]{$documentclass$} | |
\usepackage[T1]{fontenc} | |
\usepackage{lmodern} | |
\usepackage{amssymb,amsmath} | |
\usepackage{euler} | |
\usepackage{ifxetex,ifluatex} | |
\usepackage{fixltx2e} % provides \textsubscript | |
% use microtype if available | |
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex | |
\IfFileExists{microtype.sty}{\usepackage{microtype}}{} |
require 'nokogiri' | |
require 'open-uri' | |
MARK_FILE = "mark.dat" | |
def wait_for_threads(threads) | |
print "Waiting for downloads to finish..." | |
threads.each { |t| t.join } | |
puts " ok" | |
end |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
Another example of using Scheme to generate HTML and JavaScript. This example is based on the Three.js "Creating a scene" tutorial.
You will need:
chicken-install html-tags
chicken-install spock
// Convert a struct sockaddr address to a string, IPv4 and IPv6: | |
char *get_ip_str(const struct sockaddr *sa, char *s, size_t maxlen) | |
{ | |
switch(sa->sa_family) { | |
case AF_INET: | |
inet_ntop(AF_INET, &(((struct sockaddr_in *)sa)->sin_addr), | |
s, maxlen); | |
break; |