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>Test Game</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$('#gameCanvas').width(window.innerWidth); | |
$('#gameCanvas').height(window.innerHeight); | |
}); |
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
#!/bin/bash | |
inp="No"; | |
echo "Are you SURE you want to delete file(s) in $(pwd)? (No/yes)" | |
read inp | |
if [ "$inp" == "yes" ];then | |
echo "Removing..." | |
rm $@ | |
else | |
exit 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
# -*- coding: utf-8 -*- | |
""" | |
pygments.console | |
~~~~~~~~~~~~~~~~ | |
Format colored console output. | |
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. | |
:license: BSD, see LICENSE for details. | |
""" |
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
print "Enter string" | |
inp = list(raw_input()) + [' '] | |
R, L = lambda f:f+1, lambda f:f-1 | |
state, i = 0, 0 | |
machine = [{'0':[1,'X',R], 'Y':[3,'Y',R]}, {'0':[1,'0',R], 'Y':[1,'Y',R], '1':[2,'Y',L]}, {'Y':[2,'Y',L], '0':[2,'0',L], 'X':[0,'X',R]},{'Y':[3,'Y',R], ' ':[4,' ',R]},{}] | |
while state != 4: | |
print inp[i],': State = ',state, |
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
#!/usr/bin/python2 | |
print 'Enter number of processes' | |
n, proc_queue, time = int(raw_input()), [], 0 | |
for i in xrange(n): | |
proc = [] | |
print 'Enter PID' | |
proc.append(raw_input()) | |
print 'Enter arrival time' | |
proc.append(int(raw_input())) |
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
#!/usr/bin/python2 | |
print 'Enter number of processes' | |
n, proc_in, time, proc_queue = int(raw_input()), [], 0, [] | |
for i in xrange(n): | |
proc = [] | |
print 'Enter PID' | |
proc.append(raw_input()) | |
print 'Enter arrival time' | |
proc.append(int(raw_input())) |
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> | |
<!-- | |
Enter your script name in the text box and hit submit. Have a callback in the url and the form data. The callback function should execute. | |
--> | |
</head> | |
<body> | |
<form> |
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
include io.h | |
data SEGMENT | |
lf db 0dh,0 | |
cr db 0ah,0 | |
n_prompt db 'Enter size of array',0 | |
el_prompt db 'Enter elements',0 | |
odd_prompt db 'Odd = ',0 | |
even_prompt db 'Even = ',0 | |
n dw 40 dup(?) |
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
#!/usr/bin/python2 | |
print "Enter a string" | |
str = raw_input() | |
state = 0 | |
dfa = [{'a':1,'b':0,'c':0},{'b':2,'a':0,'c':0},{'a':3,'b':1,'c':0},{'c':4,'a':2,'b':1},{'a':4,'b':4,'c':4}] | |
for i in str: | |
print i,': ',state,' -> ', | |
state = dfa[state][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
include io.h | |
data segment | |
lf db 0dh,0 | |
cr db 0ah,0 | |
n_prompt db "Enter n:",0 | |
num_prompt db "Enter number",0 | |
res_sum db "Sum = ",0 | |
res_avg db "Average = ",0 | |
n dw 40 DUP(?) |