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.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
namespace ConsoleApplication1 { | |
class Program { | |
static void Main(string[] args) { | |
int? minValue = 5; | |
int? maxValue = 17; |
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
// ==UserScript== | |
// @name No Comment | |
// @namespace http://daveandbritney.com/greasemonkey | |
// @description hides ALL comments on AL.com | |
// @include http://*.al.com/* | |
// ==/UserScript== | |
var allComments, thisComment, allReplies; | |
allComments = document.evaluate("//div[@class='comment']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < allComments.snapshotLength; i++) { |
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
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CHSweb.Models.ViewModels.PropertyDetailsViewModel>" %> | |
<%@ Import Namespace="CHSweb.Helpers" %> | |
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> | |
Details | |
</asp:Content> | |
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server"> | |
<script src="/Scripts/jquery.form.js" type="text/javascript"></script> | |
<script src="/Scripts/PropertyEditor.js" type="text/javascript"></script> | |
</asp:Content> | |
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
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
Github | |
Here’s the blog post about organizations on github: https://github.com/blog/674-introducing-organizations | |
Short version: unlimited users, pricing based off number of private repos (unlimited public) starting at $25/mo for 10 repos | |
Good explanation of the difference between git and svn: http://thinkvitamin.com/code/why-you-should-switch-from-subversion-to-git/ | |
AppHarbor | |
Screenshot of builds list: http://screencast.com/t/f9T6ZeTi | |
(forgot to mention you can rollback to any previous build with one click) | |
Foolproof validation |
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 (va.AlternateAssociatedLibraryAsset != null) | |
{ | |
if (!String.IsNullOrEmpty(va.AlternateAssociatedLibraryAsset.FileName)) | |
{ | |
if (va.AlternateAssociatedLibraryAsset.FileName.StartsWith("/images/", StringComparison.CurrentCultureIgnoreCase)) | |
this.altfilename = va.AlternateAssociatedLibraryAsset.FileName; | |
else | |
this.altfilename = ApplicationSettings.AssetLibraryImageFolder + va.AlternateAssociatedLibraryAsset.FileName; | |
this.altlink = va.HrefLink; |
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
namespace App.Models { | |
public class IPLocation { | |
public string ZipPostalCode { get; set; } | |
public double Latitude { get; set; } | |
public double Longitude { get; set; } | |
public string City { get; set; } | |
public string RegionName { get; set; } | |
} | |
} |
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
namespace System.Web.Mvc.Html { | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Globalization; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Text; | |
using System.Web; | |
using System.Web.Mvc.Resources; |
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
/// <summary> | |
/// Create String for Google Map based on Dealer | |
/// </summary> | |
/// <param name="latitude"></param> | |
/// <param name="longitude"></param> | |
private void DisplayDealerMap(double latitude, double longitude) { | |
StringBuilder sbMap = new StringBuilder(); | |
sbMap.AppendFormat(@" <script language=""javascript"" type=""text/javascript"">{0}", Environment.NewLine); | |
sbMap.AppendFormat(@" //<![CDATA[{0}", Environment.NewLine); | |
sbMap.AppendFormat(@" function loadGoogleMap(){0}", Environment.NewLine); |
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 directionsService = new google.maps.DirectionsService(); | |
var directionsDisplay; | |
var map2; | |
function loadGoogleMap() { | |
directionsDisplay = new google.maps.DirectionsRenderer(); | |
var myOptions = { | |
zoom: 18, | |
mapTypeId: google.maps.MapTypeId.ROADMAP, | |
zoomControl: true, |
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 RazorScriptManager | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>@ViewBag.Title</title> | |
@Script.AddScript("~/Content/Site.css", ScriptType.Stylesheet) | |
@Script.AddScript("~/Content/themes/base/jquery.ui.all.css", ScriptType.Stylesheet) | |
@Script.OutputScript(ScriptType.Stylesheet) |
OlderNewer