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
<?php | |
define('EMAIL', 'test@example.com'); // edit this | |
define('FLICKR_API_KEY', ''); // edit this | |
define('RAPLEAF_API_KEY', ''); // edit this | |
define('USER_AGENT', 'example user agent (http://www.example.com)'); // edit this | |
define('COOKIE_FILE', '/tmp/cookies.txt'); // edit this if needed | |
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
function loopnews(){ | |
var $active = jQuery('div.newsTicker>ul>li.active'), | |
$next = $active.next('li'); | |
//console.log($next); | |
if($next.length != 1){ | |
$next = jQuery('div.newsTicker>ul>li:eq(0)') | |
} | |
$active.fadeOut(500,function(){ | |
$active.removeClass('active'); | |
$next.addClass('active').fadeIn(1000,function(){ |
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 wbr(str, num) { if(num == undefined) num = 3; | |
return str.replace(RegExp("(\\w{" + num + "})(\\w)", "g"), function(all,text,char){ | |
return text + "<wbr>" + char; | |
}); | |
} |
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
_.mixin({throttleApi:function(m,g,h,d){var j=function(a){var i=new Date;_.isUndefined(a)||i.setSeconds(i.getSeconds()+a);return i},b=[],e=0,f=0,c=null,l=j(1),k=function(a){console.log("rundo");if(b.length==0)console.log("queue empty".yellow),clearTimeout(c),c=null;else{a=[];if(g){l<j()&&(console.log("reset timer...".yellow),f=0,l=j(1));if(f==g)return;a.push(g-f)}if(h){if(e==h)return;a.push(h-e)}a.push(b.length);a=_.min(a);console.log("i run:"+a);_.times(a,function(){f++;e++;var a=b.shift();_.isUndefined(d)&& | |
(d=_.compact(_.map(a,function(a,b){return _.isFunction(a)?b:!1}))[0]);var c=a[d];a[d]=function(){e--;b.length>0&&_.defer(k);c.apply(this,_.toArray(arguments))};m.apply(null,a)});_.isNull(c)&&b.length>0&&(console.log("setting timer".yellow),c=setInterval(k,500))}};return function(){console.log("pushing args".yellow);b.length==0&&_.defer(k);b.push(_.toArray(arguments))}}}); |
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
process.on('uncaughtException', function (err) { | |
console.log('Caught exception: ' + err); | |
}); |
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
sub sendemail(subject,body,sto) | |
Set objMessage = CreateObject("CDO.Message") | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.gmail.com" | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "no-reply@brandextract.com" | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "passwd" ' change thus | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1 | |
objMessage.Configuration.Fields.Update |
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.fn.reverse=[].reverse;jQuery(".nc>input:checkbox").click(function(){$this=jQuery(this);$this.parent().find("ol").find("input:checkbox").attr("checked",$this.is(":checked"))}); | |
jQuery("input:checkbox").click(function(){jQuery(this);jQuery("li.nc>input:checkbox").reverse().each(function(b,d){var a=jQuery(d),c=a.parent().find("input.cu");a.attr("rel",b);a.prop("indeterminate",!1);c.length==c.filter(":checked").length?(console.log("all checked:"+b),a.attr("checked",!0)):c.length==c.filter(":not(:checked)").length?(console.log("all unchecked:"+b),a.attr("checked",!1)):(console.log("indeterminate:"+b),a.prop("indeterminate",!0))})}); |
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)})(); |
OlderNewer