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
var path = '/tmp/read-simple.txt'; | |
var options = { flags: 'r', | |
encoding: 'utf-8', | |
mode: 0666, | |
bufferSize: 1024, | |
start: 0, | |
end: 100 | |
}; | |
var dataReceived = function(data) { | |
console.log(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
repo for a more modern version of qt (4.7) | |
http://atrpms.net/documentation/install/ | |
http://packages.atrpms.net/dist/el5/qt4/ | |
cat /etc/yum.repos.d/atrpms.repo | |
[atrpms] | |
name=ATrpms manual | |
baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/testing/ | |
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms |
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
< script type = "text/javascript" > | |
(function($) { | |
$(function() { | |
$('a[href^="http"]:not([href*="' + document.domain + '"])').click(function(e) { | |
// When a user clicks an external link | |
if ($(this).attr('target') !== '_blank') { | |
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
// http://www.ietf.org/rfc/rfc1928.txt | |
// Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar | |
var States = { | |
CONNECTED:0, | |
VERIFYING:1, | |
READY:2, | |
PROXY: 3 | |
}; |
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
<xsl:key name="myYear" match="/IRXML/NewsReleases/NewsCategory/NewsRelease" use="substring(Date/@Date,1,4)"/> | |
<xsl:template name="yearDropDown"> | |
<xsl:for-each select="/IRXML/NewsReleases/NewsCategory/NewsRelease[generate-id() = generate-id(key('myYear',substring(Date/@Date,1,4))[1])]"> | |
<xsl:sort select="Date/@Date" data-type="text" order="descending" /> | |
<xsl:value-of select="generate-id()"/> | | |
<xsl:value-of select="Date/@Date"/><br /> | |
</xsl:for-each> | |
</xsl:template> |
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
jQuery(function(){ | |
jQuery('a[href$=".pdf"]').click(function(){ | |
_gat._getTrackerByName()._trackEvent('Download', 'Pdf', this.href); | |
setTimeout('document.location = "' + this.href + '"', 100); | |
return false | |
}); | |
jQuery('a[href$=".exe"]').click(function(){ | |
_gat._getTrackerByName()._trackEvent('Download', 'Exe', this.href); |
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(){var a=document.createElement("script");a.type="text/javascript";a.src="http://j.mp/latestjquery";(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(a)})(); |
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
/* | |
* Title Caps | |
* | |
* Ported to JavaScript By John Resig - http://ejohn.org/ - 21 May 2008 | |
* Original by John Gruber - http://daringfireball.net/ - 10 May 2008 | |
* License: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
(function(){ | |
var small = "(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v[.]?|via|vs[.]?)"; |
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 ytsec(a){var b=Math.floor(a/3600),c=Math.floor((a-b*3600)/60),a=a-b*3600-c*60;return(b>0?b+":":"")+(c<10?"0"+c:c)+":"+(a<10?"0"+a:a)}; |
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 bSze(a){if(a==0)return"n/a";var b=parseInt(Math.floor(Math.log(a)/Math.log(1024)));return Math.round(a/Math.pow(1024,b),2)+" "+["Bytes","KB","MB","GB","TB"][[b]]}; |
OlderNewer