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
/* RUN FROM BAT FILE */ | |
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S bin') DO RMDIR /S /Q "%%G" | |
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G" | |
/* | |
FROM: http://stackoverflow.com/questions/755382/i-want-to-delete-all-bin-and-obj-folders-to-force-all-projects-to-rebuild-everyt | |
*/ |
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
/** | |
* Usage var you = 'hello you guys'.between('hello ',' guys'); | |
* you = 'you'; | |
*/ | |
String.prototype.between = function (prefix, suffix) { | |
s = this; | |
var i = s.indexOf(prefix); | |
if (i >= 0) { | |
s = s.substring(i + prefix.length); | |
} |
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
body,html{ | |
height:100%; | |
overflow:hidden; | |
margin:0; | |
padding:0; | |
} | |
#left,#right{ | |
width:50%; | |
float:left; | |
padding:1em; |
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
void Main() | |
{ | |
var carrotRead = new Authorization<Carrot>(12, Permissions.Read); | |
var user = new User(); | |
user.Authorizations.Add(carrotRead); | |
if(user.IsAuthorized<Carrot>(12, Permissions.Read)) | |
"Yeah!".Dump(); | |
else | |
"Boooh!".Dump(); |
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
public static void Main() | |
{ | |
Database.SetInitializer(new DropCreateDatabaseAlways<AuthDbContext>()); | |
var carrotRead = new CarrotAuth(12, Permissions.Read); | |
var user = new User(); | |
user.Authorizations.Add(carrotRead); | |
using (var context = new AuthDbContext()) | |
{ |
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 Ticker = function () { | |
var decay = 5.0; | |
var growth = 7.0; | |
var stocks = [ | |
{ name: "Apple", price: 4.50 }, | |
{ name: "Microsoft", price: 4.00 }, | |
{ name: "Facebook", price: 3.75 } | |
]; |
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 Ticker = function () { | |
var decay = 5.0; | |
var growth = 7.0; | |
var stocks = [ | |
{ name: "Apple", price: 4.50 }, | |
{ name: "Microsoft", price: 4.00 }, | |
{ name: "Facebook", price: 3.75 } | |
]; |
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
[HKEY_CLASSES_ROOT\steam] | |
@="URL:steam protocol" | |
"URL Protocol"="" | |
[HKEY_CLASSES_ROOT\steam\DefaultIcon] | |
@="steam.exe" | |
[HKEY_CLASSES_ROOT\steam\Shell] | |
[HKEY_CLASSES_ROOT\steam\Shell\Open] |
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
public SpeedData MeasureSpeed(Dryer dryer) | |
{ | |
lock (thisLock) | |
{ | |
if (this.State == DAQState.Ready) | |
{ | |
this.State = DAQState.Acquiring; | |
try | |
{ |
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
// Begin linqpad script | |
void Main() | |
{ | |
var sourceIndex = 3; | |
var source = new double[5,1000]; | |
for(int i = 0; i < source.GetLength(1); i++){ | |
source[sourceIndex, i] = i + 1; | |
} |
OlderNewer