$(document).ready(function () {
// Code here
});
Tag Archive for document
jquery document ready
xHTML 1.1 New Document Template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="content-style-type" content="text/css" /> <meta name="author" content="Kerrick Design" /> <meta name="generator" content="Generator? Kerrick Design hand-codes each website from scratch." /> <link rel="stylesheet" media="screen" href="css/style.css" /> <link rel="stylesheet" media="print" href="css/print.css" /> <link rel="shortcut icon" href="favicon.ico" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="lib/script.js"></script> <meta name="date" content="April 11, 2009" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <title></title> </head> <body> </body> </html>
DocumentClass Template
package {
import flash.display.MovieClip;
public class MainClass extends MovieClip {
public function MainClass() {
// Constructor Function
}
}
}
RDoc format example
# :title:A Shell Script
# = Name
#
# = Synopsis
#
# = Description
#
# = Todo
# == Upcoming Features
# 0. Nothing yet.
# == Known Issues
# 0. Nothing yet.
# = References
# 0. <i>I made it up as I went along.</i>
# = License
# This code is provided under the terms of the {MIT License.}[http://www.opensource.org/licenses/mit-license.php]
#
#--
# This code is the proprietary intellectual property of its authors. It is not intended for publication.
#++
# = Authors
# Noah Sussman
#
Convert a PDF to text with Perl
#!/perl/bin/perl -w use CAM::PDF; use CAM::PDF::PageText; $filename = "example.pdf"; my $pdf = CAM::PDF->new($filename); my $pageone_tree = $pdf->getPageContentTree(4); print CAM::PDF::PageText->render($pageone_tree); #Note: I had to install CAM::PDF::PageText by hand, it was not installed by CPAN when I installed CAM::PDF.
Strict XHTML Example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>simple document</title> </head> <body> <p>a simple paragraph</p> </body> </html>
Apache PHP MAMP デスクトップã§CGIã‚’å‹•ã‹ã™httpd
# # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the realname directory are treated as applications and # run by the server when requested rather than as documents sent to the client. # The same rules about trailing "/" apply to ScriptAlias directives as to # Alias. # ScriptAlias /cgi-bin/ "/Applications/MAMP/cgi-bin/" <IfModule mod_cgid.c> # # Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path> # for setting UNIX socket for communicating with cgid. # #Scriptsock logs/cgisock </IfModule> # # "/Applications/MAMP/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "/Applications/MAMP/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> # sub dir <Directory "/Users/*/Desktop"> Options ExecCGI AddHandler cgi-script .cgi .pl </Directory>
Screen, Browser, and Window Dimensions
//get current dimensions and positions of basic objects (screen, browser, viewport, window/frame)
//optionally, specify a particular window/frame
//usage: var dims = new WindowDimensions();
function WindowDimensions(windowFrame)
{
windowFrame = windowFrame || window;
//****************************************************//
//***** screen, browser, and viewport dimensions *****//
//****************************************************//
this.screen = {
width: screen.width,
height: screen.height,
//available screen dimensions; excludes taskbar, etc.
availWidth: screen.availWidth,
availHeight: screen.availHeight,
colorDepth: screen.colorDepth
};
this.browser = {
width: window.outerWidth, //undefined in IE, incorrect in Opera
height: window.outerHeight, //undefined in IE, incorrect in Opera
left: window.screenX, //undefined in IE, incorrect in Opera
top: window.screenY //undefined in IE, incorrect in Opera
};
this.viewport = {
outer: { //includes scroll bars
width: window.top.innerWidth, //undefined in IE
height: window.top.innerHeight //undefined in IE
},
inner: { //excludes scroll bars
width: window.top.document.documentElement.clientWidth,
height: window.top.document.documentElement.clientHeight
}
};
//***********************************//
//***** window/frame dimensions *****//
//***********************************//
var left, top;
//scroll position of document
if(!isNaN(windowFrame.pageYOffset)) //all except IE
{
left = windowFrame.pageXOffset;
top = windowFrame.pageYOffset;
}
else //IE
{
//IE quirks mode
left = windowFrame.document.body.scrollLeft;
top = windowFrame.document.body.scrollTop;
//IE standards compliance mode
if(windowFrame.document.documentElement && windowFrame.document.documentElement.scrollTop)
{
left = windowFrame.document.documentElement.scrollLeft;
top = windowFrame.document.documentElement.scrollTop;
}
}
left = left || 0;
top = top || 0;
this.window = this.frame = {
outer: { //includes scroll bars
width: windowFrame.innerWidth, //undefined in IE
height: windowFrame.innerHeight //undefined in IE
},
inner: { //excludes scroll bars
width: windowFrame.document.documentElement.clientWidth,
height: windowFrame.document.documentElement.clientHeight //incorrect in quirks mode (equals offsetHeight)
},
scroll: {
width: windowFrame.document.documentElement.scrollWidth,
height: windowFrame.document.documentElement.scrollHeight,
left: left,
top: top
}
};
}
Dump a file to the terminal, starting at some line number
tail -n+99 foo.txt | more