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
net stop w32time | |
w32tm /config /syncfromflags:manual /manualpeerlist:"time-a.nist.gov, time-b.nist.gov, time-c.nist.gov, time-d.nist.gov" | |
w32tm /config /reliable:yes | |
net start w32time |
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
<html> | |
<head> | |
<title>Convert Table to print dialog using JavaScript</title> | |
<style> | |
table { | |
width: 300px; | |
} | |
table, th, td { | |
border: solid 1px #DDD; | |
border-collapse: collapse; |
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
'Storing and loading in Session: | |
Dim strPreviousAnswersDict(5,2) | |
strPreviousAnswersDict(1,1) = "s0" | |
strPreviousAnswersDict(1,2) = "banaan" | |
strPreviousAnswersDict(2,1) = "s1" | |
strPreviousAnswersDict(2,2) = "banaan" | |
Session("mark") = strPreviousAnswersDict | |
Dim objDict |
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
<% | |
' How to store a Dictionary object in the Session | |
' Create the dictionary and add a value to it | |
Dim strPreviousAnswersDict | |
Set strPreviousAnswersDict=Server.CreateObject("Scripting.Dictionary") | |
strPreviousAnswersDict.Add "s1","banaan" | |
response.write strPreviousAnswersDict.Item("s1") | |
' Store the dictionary in the session |
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
$Path = "c:\temp\" | |
$InputFile= "c:\temp\mail.txt" | |
$Reader = New-Object System.IO.StreamReader($InputFile) | |
$i = 1 | |
$OutputFile = "$i.txt" | |
While (($Line = $Reader.ReadLine()) -ne $null) { | |
If ($Line -match "From:\t") { | |
$OutputFile = "$i.txt" | |
$i++ | |
} |
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
/// <summary> | |
/// Pads an IP v4 address with extra 0's so we can use a simple calculation to figure out if the IP is in the range | |
/// 10.0.0.1 becomes 010.000.000.001 | |
/// </summary> | |
/// <param name="text">IP address either IP v4 or IP v6</param> | |
/// <returns>The IP address padded with 0's if it's an IP v4 address. If it's an IP v6 address the initial value</returns> | |
public static string PadIpAddress(this string text) | |
{ | |
// if there is no string or it's empty return an empty string | |
if (string.IsNullOrWhiteSpace(text)) |
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
e.g. for the following url | |
https://github.com/ariya/phantomjs/tags | |
to get this as an rss feed add .atom to the url | |
https://github.com/ariya/phantomjs/tags.atom |
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
<html> | |
<body onKeyDown="doKey(event)" onKeyUp="doKey(event)"> | |
whop whop | |
<div id="keydown"></div> | |
<script id="jsbin-javascript"> | |
function doKey(e) { | |
evt = e || window.event; // compliant with ie6 | |
document.getElementById('keydown').innerHTML = evt.keyCode+' Pressed'; | |
} | |
</script> |
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
<html><head><title></title></head> | |
<body> | |
<div id="id1"></div> | |
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> | |
Inlined: https://raw.githubusercontent.com/digitalBush/jquery.maskedinput/1.4.0/dist/jquery.maskedinput.min.js | |
<script type="text/javascript"> | |
/* | |
jQuery Masked Input Plugin | |
Copyright (c) 2007 - 2014 Josh Bush (digitalbush.com) | |
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) |