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
#!/usr/bin/python | |
import os | |
import string | |
import struct | |
img = ['partition.mbn','oemsblhd.mbn','appsboothd.mbn','qcsblhd_cfgdata.mbn','qcsbl.mbn','oemsbl.mbn','amss.mbn','appsboot.mbn','boot.img','system.img','userdata.img']; | |
class Combine(object) : | |
#constructor |
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 http-equiv="Content-type" content="text/html;charset=UTF-8"> | |
<title>Show File Data</title> | |
<style type='text/css'> | |
body { | |
font-family: sans-serif; | |
} | |
</style> |
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
require 'formula' | |
class DbusCxx <Formula | |
#head 'git://gitorious.org/dbus-cplusplus/mainline.git' | |
head 'git://gitorious.org/~matlinuxer2/dbus-cplusplus/matlinuxer2s-mainline.git', :branch => 'forosx' | |
homepage 'http://sourceforge.net/projects/dbus-cplusplus/' | |
depends_on 'expat' | |
depends_on 'd-bus' | |
depends_on 'libxml2' |
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 adjustSize(&$crops, $frames, $ratio) | |
{ | |
// adjust multi-frame height | |
foreach($frames as $frameNum) { | |
$crops[$frameNum - 1]->newSx *= $ratio; | |
$crops[$frameNum - 1]->newSy *= $ratio; | |
$crops[$frameNum - 1]->newW *= $ratio; | |
$crops[$frameNum - 1]->newH *= $ratio; | |
} | |
} |
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 resizeStuff() { | |
//Time consuming resize stuff here | |
} | |
var TO = false; | |
$(window).resize(function(){ | |
if(TO !== false) | |
clearTimeout(TO); | |
TO = setTimeout(resizeStuff, 200); //200 is time in miliseconds | |
}); |
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
1. Introduction : | |
This project implements a comic viewer which adjusts the layout of the original page in order to fit the screen size. | |
The information of screen size will be sent by the front-end through AJAX to backend. The backend php calculates the best | |
layout for the current screen information by applying a dynamic programming algorithm. In addition, while adjsuting the size | |
of the browser, a layout re-calculation will be performed. This comic viewer supports keyboard browsing by pressing left/right | |
key and also has a images list in the bottom for fast switching between pages. | |
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
/* | |
support FullScreenMode | |
*/ | |
var FullScn = { | |
enterFullScn: function() | |
{ | |
var e = document.getElementById("fullscreen-wrapper"); | |
if (FullScn.RunPrefixMethod(document, "FullScreen") || FullScn.RunPrefixMethod(document, "IsFullScreen")) { | |
FullScn.RunPrefixMethod(document, "CancelFullScreen"); |
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
db.open(function(err, db) { | |
db.collection('foo', function(err, collection) { | |
collection.find({"foo":foo}).toArray(function(err, data) { | |
return data; | |
});//end of collection.find | |
});//end of db.collection | |
});// end of db.open |
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
err, db <- mongodb.Db.open | |
err, collection <- db.collection 'foo' | |
err, data <- collection.find({"foo":foo}).toArray | |
data |
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
$entry[0] = array( | |
0 => 'foo', | |
1 => false, | |
2 => -1, | |
3 => null, | |
4 => '' | |
); | |
$entry[1] = ''; | |
$entry[2] = array( | |
0 => '', |
OlderNewer