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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Show.aspx.cs" Inherits="MvcApplication1.Views.Home.Show" %> | |
<%= ViewData["Css"] %> |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
public class MyClass | |
{ | |
public static void Swap<T> (T a , T b){ | |
T x = a; | |
a = b; | |
b = x; |
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.implement('Invoke', | |
function(args){ | |
var tmp = Class.instantiate(this); | |
var init = this.prototype.initialize; | |
if(init){ | |
init.apply(tmp,$splat(args)); | |
} | |
return tmp; | |
}); |
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 IOC = new Class({ | |
initialize:function(){ | |
this.container = {}; | |
}, | |
register:function(id, component, options){ | |
if($type(id) != 'string')throw new Error("No id to register"); | |
if(!$chk(component))throw new Error("No component to register"); | |
var o = options || {type:'singleton'}; | |
this.container[id] = {type:o.type, component:component}; | |
}, |
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
<html> | |
<head> | |
<title>Sarissa glitch with mootools</title> | |
<script type="text/javascript" src="sarissa.js"></script> | |
<script type="text/javascript" src="sarissa_ieemu_xpath.js"></script> | |
<script type="text/javascript" src="mootools-1.2.4-core-nc.js"></script> | |
<script type="text/javascript"> | |
addEvent('domready',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
<html> | |
<head> | |
<title>Mootools $type and ActiveXObject</title> | |
<script type="text/javascript" src="mootools-1.2.4-core-nc.js"></script> | |
<script type="text/javascript"> | |
addEvent('domready',function(){ | |
var doc = new ActiveXObject("Msxml2.DOMDocument.4.0"); | |
var source = '<root><burp decibel="too much" direction="front of you" save="none"></burp></root>'; | |
doc.async = false; | |
doc.loadXML(source); |
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
/* | |
This is a fix for $type function to make it work with ActiveXObject too :) - optimized for size | |
*/ | |
function $type(obj) { | |
if (obj == undefined) return false; | |
if (obj.$family) return (obj.$family.name == 'number' && !isFinite(obj)) ? false : obj.$family.name; | |
if (obj.nodeName) { | |
switch (obj.nodeType) { | |
case 1: return 'element'; | |
case 3: return (/\S/).test(obj.nodeValue) ? 'textnode' : 'whitespace'; |
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
Events.implement('oneShot', function(evt, fx) { | |
function once() { | |
fx.run(arguments); | |
this.removeEvent(evt, once); | |
} | |
this.addEvent(evt, once); | |
}); |
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 require =(function(){ | |
var imports = new Hash(); | |
var path = "libs" | |
return function(lib){ | |
if(!imports.has(lib)){ | |
var req = new Request({ | |
url:[path,lib].join('/') + ".js", | |
async:false | |
}); |
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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<html> | |
<head> | |
<style> | |
*{ | |
margin:0;padding:0;border:0; | |
} | |
body { | |
font-size:1em; | |
} |