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
-module(mini_chat). | |
-compile(export_all). | |
-define(ACTIVE_OPTIONS, [{reuseaddr, true}]). | |
% Commands start with "/", char 47 | |
is_command(Str) -> hd(Str) =:= 47. | |
chatroom(Users) -> | |
process_flag(trap_exit, true), |
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
#!/usr/bin/python | |
import os | |
import subprocess | |
import time | |
import re | |
import socket | |
import sys | |
import mimetypes | |
from email.mime.base import MIMEBase | |
from email.mime.multipart import MIMEMultipart |
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 player = jam.Sprite(400, 500); | |
player.setImage("ship.png"); | |
player.update = jam.extend(player.update, function(elapsed){ | |
player.velocity.x = 0; | |
player.velocity.y = 0; | |
if( jam.Input.keyDown("UP") ){ | |
player.velocity.y = -250; | |
} | |
if( jam.Input.keyDown("DOWN") ){ | |
player.velocity.y = 250; |
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 initialize(){ | |
var game = jam.Game(800, 600, document.body); | |
game._canvas.style.border="1px solid black"; | |
var player = jam.Sprite(400, 500); | |
player.setImage("ship.png"); | |
game.add(player); | |
game.run(); | |
} |
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
window.onload = function(){ | |
initialize(); | |
} | |
function initialize(){ | |
var game = jam.Game(800, 600, document.body); | |
game._canvas.style.border="1px solid black"; | |
game.run(); | |
} |