This file contains hidden or 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 xhrArgs = { | |
url: 'yoururl', | |
// text (=html) or json | |
handleAs: 'text', | |
load: function(data) { | |
'use strict'; | |
// data is the response, string when text, object when json | |
// logic goes here | |
}, | |
error: function(error) { |
This file contains hidden or 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
dojo.addOnLoad(function() { | |
'use strict'; | |
dojo.connect(dojo.byId('node'), 'onclick', function() { | |
// logic goes here | |
}); | |
}); |
This file contains hidden or 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
Select Case MyVar | |
Case "red" | |
'red logic | |
Case "yellow" | |
'yellow logic |
This file contains hidden or 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
i = 0 | |
Do While i <= 10 | |
'your logic here | |
i = i + 1 | |
Loop |
This file contains hidden or 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
IF OBJECT_ID('tempdb.dbo.#TempWeek') IS NOT NULL | |
DROP TABLE [#TempWeek] | |
GO | |
DECLARE @week INT | |
SET @week = 26 | |
DECLARE @monday DATETIME |
This file contains hidden or 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 toShortTimeString(dateObject) | |
toShortTimeString = "" | |
if not (IsNull(dateObject)) then | |
toShortTimeString = FormatDateTime(dateObject, 4) | |
end if | |
end function |
This file contains hidden or 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 IsAjaxRequest() | |
IsAjaxRequest = Request.ServerVariables("HTTP_X-Requested-With") = "XMLHttpRequest" | |
end function |
This file contains hidden or 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
import traceback | |
import time | |
import sys | |
from datetime import datetime | |
#settings | |
log = "log.txt" | |
# set the iteration loop | |
loop = 1 |
NewerOlder