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 Slider=new Class({ | |
Implements:Chain, | |
initialize: function (element){ | |
this.element = $(element); | |
}, | |
slide: function(prop, pos0, pos1){ | |
this.element.set('tween', { | |
duration : 2000, | |
transition : Fx.Transitions.Cubic.easeInOut | |
}); |
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 MySliderClass = new Class({ | |
Implements: Chain, | |
initialize: function (element) | |
{ | |
this.element = $(element); | |
}, | |
prepareSlide: function(prop, pos0, pos1) |
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
<? | |
$hello = "this is better"; | |
function foo() | |
{ | |
echo "bar"; | |
} | |
?> |
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 space instance or shift instance | |
this.xmlhttpRequest({ | |
'method': 'GET', | |
'url':'http://someurl.com', | |
'onload': function(response) | |
{ | |
// callback code, response arg is the response text | |
}, | |
'onerror': function(response) | |
{ |
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
$(cssId).set('tween', { | |
duration: 300, | |
transition: Fx.Transitions.Cubic.easeInOut | |
onStart: function() | |
{ | |
// before animation starts | |
// you can set up your element here | |
}, | |
onComplete: 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
initResizer: function() | |
{ | |
// place the resizer above the thing | |
var resizer = new ShiftSpace.Element('div', { | |
'id': 'SSConsoleResizer' | |
}); | |
document.body.grab(resizer); | |
// added a comment | |
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
{ | |
action: 'create/read/update/delete', | |
table: 'user/shift/trail/comment', | |
constraints: { | |
user_id: 67 | |
}, | |
properties: '*' || ['username', 'summary', 'modified'], | |
orderby: ['<' || '>', 'modified'], | |
startIndex: 2, | |
count: 20 |
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
{ | |
table: 'shifts', | |
create: 'all', | |
update: ['shift.user_id == $loggedin_user'], | |
delete: ['shift.user_id == $loggedin_user'], | |
read: ['shift.private && shift.user_id == $loggedin_user', | |
'shift.group == $loggedin_user.group'], | |
presentation: [ | |
'someproperty', | |
'someproperty2', |
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 FxChain = new Class({ | |
name: "FxChain", | |
Extends: Chain, | |
initialize: function() | |
{ | |
this.chain(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
(defn diffuse [grid diff-ratio dt] | |
(let [a (float (* dt diff-ratio grid-size grid-size)) | |
a4-1 (float (+ 1 (* 4 a))) | |
grid #^floats (deref grid) | |
diffused-grid #^floats (make-grid) | |
grid-size (int grid-size) | |
line-length (int (+ grid-size 2))] | |
(dotimes [n 20] | |
(dotimes [y grid-size] | |
(let [line-offset (* (inc y) line-length)] |
OlderNewer