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
#.. | |
.## | |
##. |
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
import time | |
import praw | |
import pyttsx | |
__author__ = "Lyndon Armitage" | |
username = "alarmbot" | |
password = "password" | |
engine = pyttsx.init() |
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
package com.lyndonarmitage.reddit; | |
import com.omrlnr.jreddit.submissions.Submission; | |
import com.omrlnr.jreddit.submissions.Submissions; | |
import com.omrlnr.jreddit.user.User; | |
import com.sun.speech.freetts.VoiceManager; | |
import org.joda.time.DateTime; | |
import org.joda.time.LocalDateTime; | |
import org.joda.time.LocalTime; | |
import org.joda.time.Period; |
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
import requests | |
import time | |
__author__ = "Lyndon Armitage" | |
check_interval = 60 * 1 # Every 1 min | |
interval = 60 * 1 # Interval to sleep at (can be faster than check interval) | |
last_check_time = time.clock() - check_interval | |
username = "theanchorman" | |
start_certs = 0 |
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>Clock</title> | |
<style type="text/css"> | |
#container { | |
margin: 0 auto; | |
width: 800px; | |
text-align: center; | |
border: black dashed 1px; |
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>Check if File is PDF on the Client Side</title> | |
</head> | |
<body> | |
<form id="uploadForm"> | |
<label>Upload a PDF: <input type="file" id="fileUpload" name="file" /></label> | |
</form> | |
<script type="text/javascript" src="js/checkPDF.js"></script> |
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
/** | |
* Used to attach events to an element or object in a browser independent way | |
* @param element | |
* @param event | |
* @param callbackFunction | |
*/ | |
function attachEvent(element, event, callbackFunction) { | |
if(element.addEventListener) { | |
element.addEventListener(event, callbackFunction, false); | |
} |
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>jQuery Viewer Example</title> | |
<style type="text/css"> | |
body { | |
background: #0000FF; | |
} | |
#container { | |
margin-left: auto; |
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
import java.io.File | |
import scala.collection.mutable | |
def sortWord(word: String) = new String(word.toCharArray.sorted) | |
val wordList = scala.io.Source.fromFile( | |
new File("wordsEn.txt")) | |
.getLines() | |
.filter(_.length > 2) |
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
import scala.collection.mutable | |
// The word wheel data | |
val required = List[Char]('a') | |
val otherChars = List[Char]('t', 'n', 'd', 'o', 'e', 'c', 'i', 'u') | |
// Load a word list and remove anything smaller than 2 letters | |
val wordList = scala.io.Source.fromInputStream(getClass.getResourceAsStream("/wordsEn.txt")) | |
.getLines() | |
.filter(_.length > 2) |
OlderNewer