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
$('#result').load('ajax/test.html #container'); |
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 enum StopWatchState | |
{ | |
Started, | |
Stopped | |
} | |
public class StopWatch : IDisposable | |
{ | |
public TimeSpan Started { get; private set; } | |
public TimeSpan Stopped { get; private 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
// Sometimes the UTF-8 suffix is required (sigh) | |
setlocale(LC_ALL, 'nl_NL.UTF-8'); | |
/* Expected Output: vrijdag 22 december 1978 */ | |
echo strftime("%A %e %B %Y", mktime(0, 0, 0, 12, 22, 1978)); | |
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
// Simple example for | |
// 1.) Read a sql server query to datatable; | |
// 2.) Export it to .csv | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var connectionString = @"data source=bla bla bla"; | |
var selectQuery = "select * from my-table;"; |
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
-- Nopcommerce - Top used Manufacturers | |
-- Must remember to implement a storedproc or something ;) | |
select COUNT(*) as Aantal, ManufacturerId | |
from Product_Manufacturer_Mapping | |
group by ManufacturerId | |
order by Aantal desc; |
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
<!-- develop tag (single line) --> | |
<div id="develop-tag" style="position: absolute; top: 0; left: 0; z-index: 99;"><img src="http://tinyurl.com/86tauqv" /></div> | |
<!-- develop tag (multi-line) --> | |
<div id="develop-tag" style="position: absolute; top: 0; left: 0; z-index: 99;"> | |
<img src="http://tinyurl.com/86tauqv" /> | |
</div> |
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> | |
/// Default MVC 3 Controller Actions | |
/// </summary> | |
public class ObjectController : Controller | |
{ | |
// GET: /Object/ | |
public ActionResult Index() | |
// GET: /Object/Details/5 | |
public ActionResult Details(int 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
namespace Hanssens.Tools | |
{ | |
public enum LogTypes | |
{ | |
/// <summary> | |
/// The default message type. | |
/// </summary> | |
Info, | |
Debug, | |
Error, |
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> | |
/// Generates a (SHA1) hashed string, by using the passphrase as a poor man's salt. | |
/// </summary> | |
/// <param name="orderReference">(Optional) This reference is used for storing a (temporary) shipping order. You can decide for yourself which reference to use, but it needs to be unique. The reference is used for identifying the shipping order in the Paazl database.</param> | |
public static string RenderHash(this string value, string passPhrase) | |
{ | |
// Append the passphrase to the value | |
value += passPhrase; | |
// Convert the string value to a byte array |