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 | |
/** | |
* Script to check link validity | |
* | |
* @author Satya Prakash | |
* | |
*/ | |
$links = array(); | |
$links[] = 'http://www.satya-weblog.com/2007/04/dynamically-populate-select-list-by.html'; |
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
$('#stream-items-id').delegate('.js-tweet-text a[data-expanded-url]', 'click', function(e){ | |
this.href = $(this).attr('data-expanded-url'); | |
}); |
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/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import re | |
def filter(filePath): | |
f = open(filePath) | |
content = f.read() | |
#print content |
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
$.ui.intersect = function(draggable, droppable, toleranceMode) { | |
if (!droppable.offset) return false; | |
var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width, | |
y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height; | |
var l = droppable.offset.left, r = l + droppable.proportions.width, | |
t = droppable.offset.top, b = t + droppable.proportions.height; | |
switch (toleranceMode) { |
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 isIE6() { | |
return strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0'); | |
} | |
# ie6's UA example | |
# Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 6.1; QQDownload 731; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)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
/* from http://www.alloyteam.com/wp-content/themes/alloyteam/style.css */ | |
::-webkit-scrollbar-track-piece { | |
background-color:#f5f5f5; | |
border-left:1px solid #d2d2d2; | |
} | |
::-webkit-scrollbar { | |
width:13px; | |
height:13px; | |
} | |
::-webkit-scrollbar-thumb { |
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
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
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 _ = function(obj) { | |
if (obj instanceof _) return obj; | |
if (!(this instanceof _)) return new _(obj); | |
this._wrapped = obj; | |
}; |
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://msdn.microsoft.com/zh-cn/library/ie/bg124132(v=vs.85).aspx | |
epx = window.epx || {}, epx.library = window.epx.library || {}, epx.library.tocFixedModule = function(w, d) { | |
function init() { | |
epx.topic && epx.topic.isPrintExperience() === !0 || ($leftNav = $("#leftNav"), $toc = $("#tocnav"), $footer = $("#ux-footer"), w && d && $leftNav.length !== 0 && $toc.length !== 0 && $footer.length !== 0) && ($(w).scroll(function() { | |
setPosition() | |
}), $(w).resize(function() { | |
setPosition() | |
})) | |
} |
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
/* | |
list: the array | |
fn: sort fn | |
start: the start index of the sorted range, included | |
end: the end index of the sorted range, excluded | |
means range: [start, end) | |
modify the array itself and return nothing | |
*/ |
OlderNewer