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
# Boxstarter options | |
$Boxstarter.RebootOk=$true # Allow reboots? | |
$Boxstarter.NoPassword=$false # Is this a machine with no login password? | |
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot | |
# Basic setup | |
Update-ExecutionPolicy Unrestricted | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-RemoteDesktop |
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
// KendoUI Bundles | |
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin"); | |
var kendoVersion = Assembly.LoadFrom(Path.Combine(path, "Kendo.Mvc.dll")).GetName().Version; | |
var kendoFormatedVersion = $"{kendoVersion.Major}.{kendoVersion.Minor}.{kendoVersion.Build}"; | |
bundles.Add(new ScriptBundle("~/bundles/kendoui").Include( | |
$"~/Scripts/kendo/{kendoFormatedVersion}/kendo.all.min.js")); | |
bundles.Add(new StyleBundle("~/Content/kendoui").Include( | |
$"~/Content/kendo/{kendoFormatedVersion}/kendo.common.min.css", | |
$"~/Content/kendo/{kendoFormatedVersion}/kendo.blueopal.min.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
if I do this: | |
var result = db.People.Where(p => p.first = "pilot" && p.last = "bob").Select(p => p.Id).SingleOrDefault(); | |
Can I later do this and expect to find a result? | |
var result = db.People.Local.Where(p => p.first = "pilot" && p.last = "bob").Select(p => p.Id).SingleOrDefault(); | |
Or since I did a projection is the entity not actually loaded into the context? |
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
while($data =~ /\<b\>.*?\[\W*?$type\W*?(.*?)\].*?\<\/b\>/i) | |
{ | |
$votee = lc($1); | |
$type = lc($type); | |
$votee =~ s/\<img src=.*\/(.*?)\.gif.*?\>/$1/i; | |
$name = lc($votee); | |
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
vote_check:begin | |
declare tally_id int(11); | |
declare new_count int(11); | |
declare new_tally int(1); | |
declare nightfall int(1); | |
if new.valid != 1 then | |
leave vote_check; | |
end if; | |
set new_tally := 0; |
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
$.ajax(baseUrl + "/eFinancials/Lookup/JobForProperty", | |
{ | |
data: { | |
property: propertyIdField.val(), | |
allJobs: true, | |
term: jobIdField.val() | |
}, | |
success: function (data) { | |
if (data[0]) { | |
jobKeyField.val(data[0].id); |
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
<Variables><Variable Name="SSRSPath"><Value>AP/Vendors</Value></Variable></Variables> | |
Given the above XML fragment (it's actually just part of the XDocument) have do I get the value of the Variable element where Name="SSRSPath" ??? | |
var path = from x in doc.DescenDescendants(ns + "Variables") | |
ok, that gets me the variables XElement (there is only one). Now what? | |
Using C#. |
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
public ActionResult SetCookies() | |
{ | |
Response.Cookies.Add(new HttpCookie("Cookie1", "Test 1")); | |
Response.Cookies.Add(new HttpCookie("Cookie2", "Test 2")); | |
Response.Cookies.Add(new HttpCookie("Cookie3", "Test 3")); | |
return View("Index"); | |
} | |
public ActionResult DeleteCookies() |
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
HttpCookie myCookie = new HttpCookie("UserSettings"); | |
myCookie.Expires = DateTime.Now.AddDays(-1d); | |
Response.Cookies.Add(myCookie); |
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 code is in the DbContext so this is DbContext. | |
var objectContext = (this as IObjectContextAdapter).ObjectContext; | |
objectContext.CommandTimeout = csb.ConnectTimeout; |