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 implementation ////////// | |
//////////////////////////////////////////// | |
/// <summary> | |
/// This strips HTML from a string using regular expressions | |
/// </summary> | |
/// <param name="inputHtml">The string to be parsed</param> | |
/// <returns>text string void of HTML markup</returns> | |
private string StripHtml(string inputHtml) | |
{ |
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
// Run this in the browser console window to prep Google Maps for screenshotting. | |
javascript: (function(e, s) { | |
e.src = s; | |
e.onload = function() { | |
jQuery.noConflict(); | |
jQuery('.noprint,#minimap,.section-popular-times').hide(); | |
}; | |
document.head.appendChild(e); | |
})(document.createElement('script'), '//code.jquery.com/jquery-latest.min.js') |
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 (System.Diagnostics.Debugger.IsAttached == false) | |
{ | |
System.Diagnostics.Debugger.Launch(); | |
} |
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 createEl (elType, elId, elClass, onClik, elText) { | |
return $('<' + elType + '>', { | |
id: elId, | |
'class': elClass, | |
text: elText, | |
on: { | |
click: onClik | |
} | |
}); | |
} |
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
// Fade In | |
$(myElem).css({opacity: 0.0, visibility: "visible"}).animate({opacity: 1.0}); | |
// Fade Out | |
$(myElem).css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0.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
List<char> a = "abcdefghijklmnopqrstuvwxyz".ToList(); // lowercase alphabet | |
List<char> b = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToList(); // uppercase alphabet | |
List<char> c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".ToList(); // both cases alphabet | |
List<char> d = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".ToList(); // both cases alphabet and integers | |
List<char> e = "abcdefghijklmnopqrstuvwxyz0123456789".ToList(); // lowercase alphabet and integers | |
List<char> f = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".ToList(); // uppercase alphabet and integers |
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 static List<String> SentenceExtractor(this string text, string word) | |
{ | |
var sentences = text.Split(new[] { ". " }, StringSplitOptions.RemoveEmptyEntries); | |
var matches = from sentence in sentences | |
where sentence.ToLower().Contains(word.ToLower()) | |
select sentence; | |
return matches.ToList(); | |
} |
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
<!-- Path = "." denotes all paths --> | |
<!-- inheritInChildApplications = "false" prevents the inheritance --> | |
<location path="." inheritInChildApplications="false"> | |
<!-- other elements here --> | |
</location> |
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(SqlConnection conn = new SqlConnection(connString)) | |
using(SqlCommand command = new SqlCommand(query, conn)) | |
using (SqlDataAdapter dataAdapter = new SqlDataAdapter(command)) | |
dataAdapter.Fill(results); | |
using (SqlConnection conn = new SqlConnection(connString)) | |
{ | |
conn.open(); | |
using (SqlCommand command = new SqlCommand(query, conn)) |
OlderNewer