This file contains hidden or 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 d = 0.0; | |
for (var i = 0; i < 100; i++) | |
{ | |
d += 0.1; | |
d += 0.01; | |
d += 0.001; | |
d += 0.0001; | |
d += 0.00001; | |
d += 0.000001; |
This file contains hidden or 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
-- Updating a table using a source and destination table. | |
BEGIN TRAN | |
UPDATE [ToTable] | |
SET [ToTable].[Value] = [FromTable].[Value], | |
... | |
FROM [FromTable] | |
INNER JOIN [ToTable] ON ( /* Join Conditions */ ) | |
WHERE ( /* Where Clause */ ) | |
ROLLBACK TRAN |
This file contains hidden or 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
// | |
// FindDupesByHash.cs | |
// | |
// Author: | |
// pjensen <[email protected]> | |
// | |
// Description: | |
// Really quick hack to find duplicate files in a directory structure. | |
// |
This file contains hidden or 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
// | |
// Main.cs | |
// | |
// Author: | |
// pjensen <[email protected]> | |
using System; | |
using System.Security.Cryptography; | |
using System.IO; | |
using System.Collections.Generic; |
This file contains hidden or 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
static bool IsSubset(int[] a, int[] b) | |
{ | |
var a1 = new List<int>(a); | |
var b1 = new List<int>(b); | |
foreach (var k in a1) | |
{ | |
b1.Remove(k); | |
} |
This file contains hidden or 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
import time,random | |
ROLLOVER_WKS = 99 | |
YEARS = 5 | |
employmentData = [] | |
for i in range(0,YEARS*52): | |
employmentData.append(random.randint(-100,100)) | |
if (i > ROLLOVER_WKS): |
This file contains hidden or 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
<% | |
'-- ******************************************************************************** | |
'-- Class: ServiceReference | |
'-- Description: This class is used to make a web service requests. | |
'-- | |
'-- Remarks: | |
'-- | |
'-- http://www.soapui.org/ has an *excellent* tool for crafting various web methods | |
'-- (1) Download and install SOAPui | |
'--- (2) Create a new project, when prompted for a WSDL enter |
This file contains hidden or 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
typedef unsigned long ID; |
This file contains hidden or 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
mov ax, 0x07C0 ; set up segments | |
mov ds, ax | |
mov es, ax | |
mov si, welcome | |
call print_string | |
loop: | |
mov al, 0x13 |
This file contains hidden or 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
import os, sys, string, random | |
COMPILER_ERRORS = """ | |
Cannot have multiple default property/method in a Class | |
Cannot use parentheses when calling a Sub | |
Class initialize or terminate do not have arguments | |
'Default' specification can only be on Property Get | |
'Default' specification must also specify 'Public' | |
Expected '(' | |
Expected ')' |