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
public class HelloWorld extends Application { | |
private Calculator calculatorService; | |
public static void main(String[] args) { | |
launch(args); | |
} | |
@Override | |
public void start(Stage primaryStage) throws MalformedURLException { |
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> | |
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script> | |
<style> | |
.treeview ul { | |
padding-left: 24px; | |
list-style-type: none; | |
} | |
.treeview li > div { |
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 ($) { | |
// Create a model to hold friend atribute | |
Friend = Backbone.Model.extend({ | |
name: null | |
}); | |
// This is our Friends collection and holds our Friend models | |
Friends = Backbone.Collection.extend({ | |
initialize: function (models, options) { | |
// Listen for new additions to the collection and call a view function if so |
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 os | |
import shutil | |
import filecmp | |
from itertools import combinations | |
DIR = 'C:/Alotofwildphotos' | |
DEST_DIR = 'C:/Alotofwildphotos/Repeated' | |
files = filter(os.path.isfile, map(lambda f: os.path.join(DIR, f), os.listdir(DIR))) |
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 sys | |
def rgb_to_xy(r, g, b): | |
X = 0.412453 * r + 0.357580 * g + 0.180423 * b | |
Y = 0.212671 * r + 0.715160 * g + 0.072169 * b | |
Z = 0.019334 * r + 0.119193 * g + 0.950227 * b | |
x = X / (X+Y+Z) | |
y = Y / (X+Y+Z) | |
return x, y |
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 os | |
import re | |
import sys | |
import eyed3 | |
def rename_songs(path, pattern): | |
if not check_arguments(path, pattern): | |
exit(1) | |
listdir = [os.path.join(path, f) for f in os.listdir(path)] | |
files = filter(os.path.isfile, listdir) |
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 sys | |
import hashlib | |
from functools import partial | |
def md5sum(filename): | |
with open(filename, mode="rb") as f: | |
md5 = hashlib.md5() | |
buf_size = md5.block_size * 64 | |
for buf in iter(partial(f.read, buf_size), b''): |
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 pygame | |
import time | |
import sys | |
def main(ogg_file, output_file): | |
pygame.display.init() | |
pygame.display.set_mode((100, 100)) | |
pygame.mixer.init() | |
pygame.mixer.music.load(ogg_file) | |
f = open(output_file, 'w') |
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> | |
<meta charset="utf-8"/> | |
<title>Flex navigation menu</title> | |
<style> | |
body { | |
font-family: sans-serif; | |
margin: 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>Hello, ES6</title> | |
<script src="counter.js"></script> | |
</head> | |
<body> | |
<my-counter></my-counter> | |
</body> | |
</html> |
OlderNewer