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
#add a file | |
git add Transform.cs | |
#show list of branches | |
git branch | |
#create a branch | |
git branch mynewbranch | |
#switch to that branch |
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 () { | |
$("#accordion").accordion({ | |
heightStyle: "fill", | |
collapsible: true, | |
active: false, | |
event: "mouseover" | |
}).on('mouseleave', function () { | |
$(this).accordion("option", "active", 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
var query = from o1 in list1 | |
join o2 in list2 | |
on o1.common equals o2.common | |
select new | |
{ | |
o1.name, | |
o2.address, | |
o2.phone | |
}; |
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
//in the controller | |
IDictionary<string, int> performance = new Dictionary<string, int>(); | |
performance.Add("cpu", 30); | |
return View(performance); | |
... | |
... | |
//in the view give the model its type | |
@model IDictionary<string, int> |
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.Management; | |
namespace WMIQuery | |
{ | |
public class UsedPhysicalMemoryQuery | |
{ | |
public static void Main() | |
{ | |
try |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bootstrap, from Twitter</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- Le styles --> |
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.Management; | |
namespace WMISample | |
{ | |
public class MyWMIQuery | |
{ | |
public static void Main() | |
{ | |
try |
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 doc = new XmlDocument(); | |
using (var stream = this.GetType().Assembly.GetManifestResourceStream("MyNameSpace.Configurations.xml")) | |
{ | |
if (stream != null) doc.Load(stream); | |
} | |
_xmlcontents = doc.InnerXml; |
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
$(document).ready( function() { | |
$.mockjax({ | |
// This should trigger a success and use my data | |
// as oppose to the data received from server | |
url: "http://localhost:8000/", | |
responseTime: 10, | |
dataType: 'text/json', | |
responseText: { "name" : "MOCKJAX!!!!" } | |
}); |
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
module("module", { | |
setup: function () { | |
$.mockjax( { | |
url: "*", | |
responseTime: 1, | |
dataType: 'text/json', | |
responseText: [{'name' : 'wally'},{ "name":"molly" }] | |
}); | |
}, | |
teardown: function () { |
OlderNewer