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($) { | |
//// | |
// | |
// Depends on the amazing Ajax form plugin. | |
// | |
// Callback receives responseText and 'success' / 'error' | |
// based on response. | |
// | |
// i.e.: | |
// $('#someform').spamjax(function(text, status) { |
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 findSynonyms(word, callback) { | |
var url = "http://services.aonaware.com/DictService/DictService.asmx/DefineInDict"; | |
var params = Utils.paramsToString({ | |
dictId: "moby-thes", //moby-thes: Moby Thesaurus II | |
word: word | |
}); | |
Utils.ajaxGet(url + params, function(xml) { | |
CmdUtils.loadJQuery( function(jQuery) { | |
var text = jQuery(xml).find("WordDefinition").text(); |
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
$('a[href=#][alt^=""]').livequery('hover', function() { | |
window.status = $(this).attr('alt') | |
}, function() { | |
window.status = '' | |
}) |
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
Don't worry about what anybody else is going to do. The best way to | |
predict the future is to invent it. | |
-- Alan Kay | |
Premature optimization is the root of all evil (or at least most of it) | |
in programming. | |
-- Donald Knuth | |
Lisp has jokingly been called "the most intelligent way to misuse a | |
computer". I think that description is a great compliment because it |
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
// | |
// MethodBaseRocks.cs | |
// | |
// Author: | |
// Jb Evain ([email protected]) | |
// | |
// WARNING: code now lives in http://github.com/jbevain/mono.reflection | |
// | |
// (C) 2009 Novell, Inc. (http://www.novell.com) | |
// |
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
// | |
// BackingFieldResolver.cs | |
// | |
// Author: | |
// Jb Evain ([email protected]) | |
// | |
// WARNING: code now lives in http://github.com/jbevain/mono.reflection | |
// | |
// (C) 2009 Novell, Inc. (http://www.novell.com) | |
// |
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
// | |
// adosql.js | |
// | |
if (typeof AdoDbUtil == 'undefined') | |
var AdoDbUtil = { }; | |
AdoDbUtil.PROVIDER_MICROSOFT_JET_OLEDB_4_0 = 'Microsoft.Jet.OLEDB.4.0'; | |
AdoDbUtil.PROVIDER_MSDASQL_1 = 'MSDASQL.1'; | |
// http://msdn.microsoft.com/en-us/library/ms711711(VS.85).aspx |
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
/* | |
* a smart poller for jquery. | |
* (by github) | |
* | |
* simple example: | |
* | |
* $.smartPoller(function(retry) { | |
* $.getJSON(url, function(data) { | |
* if (data) { | |
* doSomething(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
(function(jQuery){ | |
// This shortTermMemory will contain the last parsed simple selector. | |
// To be usefull it needs to be accessed faster than it would take to re-parse the selector. | |
// Selectors are to complex to serve as keys of a hash, and a bi-dimensional array would be too slow. | |
// I'm wondering if .data() would be fast enough for that purpose. | |
var shortTermMemory = []; | |
jQuery.fn.extend({ | |
closest: function( selector, context ) { |
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(jQuery){ | |
var parsedCache = [], | |
_filter = jQuery.filter; | |
jQuery.filter = jQuery.multiFilter = function( expr, elems, not ) { | |
var parsed = [], split, re, matches = [], match, l, i; | |
// We are looking for simple selectors of the form "div", ".class" or "div.class" | |
// We'll try to minimize the extra-processing for complex selectors | |
OlderNewer