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
Set objFSO = CreateObject("Scripting.FileSystemObject") | |
y = "" | |
MyDate = DateSerial(2012, 1, 1) | |
y = year(MyDate)*10000+month(MyDate)*100+day(MyDate) | |
WScript.echo y | |
objFSO.CreateFolder y | |
For counterVariable = 1 to 366 |
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
from datetime import datetime , timedelta | |
import os | |
dt_obj = datetime(2012, 1, 1, 17, 53, 59) | |
for i in range(0,366): | |
dt_obj2 = dt_obj + timedelta(days=i) | |
os.makedirs( dt_obj2.strftime("%Y%m%d") ) | |
print "done" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Movie Info</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script> | |
<script src="https://code.angularjs.org/1.2.16/angular-route.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js"></script> | |
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=trshant" async="async"></script> | |
<link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/min/1.5/min.min.css"> |
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
<select name=""> | |
<option value="Han Chinese">Han Chinese</option> | |
<option value="Hindustani">Hindustani</option> | |
<option value="Arabs">Arabs</option> | |
<option value="Bengalis">Bengalis</option> | |
<option value="Germans">Germans</option> | |
<option value="Spaniards">Spaniards</option> | |
<option value="Italians">Italians</option> | |
<option value="Japanese">Japanese</option> | |
<option value="Russians">Russians</option> |
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
<select name=""> | |
<option value="Han Chinese">Han Chinese</option> | |
<option value="Hindustani">Hindustani</option> | |
<option value="Arabs">Arabs</option> | |
<option value="Bengalis">Bengalis</option> | |
<option value="Germans">Germans</option> | |
<option value="Spaniards">Spaniards</option> | |
<option value="Italians">Italians</option> | |
<option value="Japanese">Japanese</option> | |
<option value="Russians">Russians</option> |
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 position = {}; | |
document.addEventListener('mousemove', function(e){ | |
position = { x: e.clientX, y: e.clientY } // for browser window WRT | |
position = { x: e.pageX, y: e.pageY } // for page WRT | |
}); |
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
navigator.geolocation.getCurrentPosition(function(position) { | |
var latitude = position.coords.latitude; | |
var longitude = position.coords.longitude; | |
console.log( latitude , longitude ); | |
}) |
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() { | |
var beforePrint = function() { | |
console.log('Functionality to run before printing.'); | |
}; | |
var afterPrint = function() { | |
console.log('Functionality to run after printing'); | |
}; | |
if (window.matchMedia) { | |
var mediaQueryList = window.matchMedia('print'); |
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
string <- "Hello World" | |
string |
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
# ipak function: install and load multiple R packages. | |
# check to see if packages are installed. Install them if they are not, then load them into the R session. | |
ipak <- function(pkg){ | |
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] | |
if (length(new.pkg)) | |
install.packages(new.pkg, dependencies = TRUE) | |
sapply(pkg, require, character.only = TRUE) | |
} |
OlderNewer