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 import operations for analysis | |
# Step 1: Import the dataset as 'ops' | |
# The '$PREOP.DIAGNOSIS.1' columnn (and postop col) looks like this -> "752.51 - UNDESCENDED TESTIS" | |
# So we want to make two columns from either side of the '-' | |
ops$dxDescr <- lapply(strsplit(as.character(ops$PREOP.DIAGNOSIS.1), "\\-"), "[", 2) | |
ops$dxCode <- lapply(strsplit(as.character(ops$PREOP.DIAGNOSIS.1), "\\-"), "[", 1) | |
ops$opDescr <- lapply(strsplit(as.character(ops$PROCEDURE.1), "\\-"), "[", 2) | |
ops$opCode <- lapply(strsplit(as.character(ops$PROCEDURE.1), "\\-"), "[", 1) |
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
-- PURPOSE: Export all notes in Evernote to an ENEX file so that | |
-- the notes can be backed up to an external drive or to the cloud | |
-- Change the path below to the location you want the notes to be exported | |
set f to "/Volumes/hd1T/Backup/Dropbox/evernoteBU/Export.enex" | |
with timeout of (30 * 60) seconds | |
tell application "Evernote" | |
-- Set date to 1990 so it finds all notes | |
set matches to find notes "created:19900101" |
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
<body> | |
<p>Click the button to Fill in </p> | |
<textarea rows="10" cols="60" id="demo"></textarea> | |
<br/> | |
<script> | |
function myFunction2() | |
{ |
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 App = angular.module('App', []); | |
App.controller('TodoCtrl', function($scope, $http) { | |
$http.get('todos.json') | |
.then(function(res){ | |
$scope.todos = res.data; | |
}); | |
}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Search Box Example 1</title> | |
<!-- CSS styles for standard search box --> | |
<style type="text/css"> | |
#tfheader{ | |
background-color:#c3dfef; | |
} |
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
<?php | |
// set up the connection variables | |
$db_name = 'test'; | |
$hostname = 'localhost'; | |
$username = 'root'; | |
$password = 'root'; | |
// connect to the database | |
$dbh = new PDO("mysql:host=$hostname;dbname=$db_name", $username, $password); |
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
// Source - http://stackoverflow.com/questions/14062368/new-recommended-jquery-templates/14062431#14062431 | |
//HTML | |
<script type="text/template" id="cardTemplate"> | |
<div> | |
<a href="{0}">{1}</a> | |
</div> | |
</script> | |
<div id="container"> | |
</div> |
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
shuffle(yourQuestionArray); | |
shuffle(yourTopicArray); | |
// ... | |
function shuffle(sourceArray) { | |
for (var n = 0; n < sourceArray.length - 1; n++) { | |
var k = n + Math.floor(Math.random() * (sourceArray.length - n)); | |
var temp = sourceArray[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
CREATE TABLE IF NOT EXISTS `employee` ( | |
`id_employee` int(3) unsigned NOT NULL AUTO_INCREMENT, | |
`emp_name` varchar(10) DEFAULT NULL, | |
`designation` varchar(9) DEFAULT NULL, | |
`date_joined` date DEFAULT NULL, | |
`salary` decimal(7,2) DEFAULT NULL, | |
`id_dept` int(2) DEFAULT NULL, | |
PRIMARY KEY (`id_employee`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ; | |
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
<?php | |
$host = "localhost"; | |
$user = "root"; | |
$pass = "root"; | |
$db = "test"; | |
$link = mysql_pconnect($host, $user, $pass) or die("Could not connect"); | |
mysql_select_db($db) or die("Could not select database"); |