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
style | |
* { | |
box-sizing: border-box; | |
} | |
body { | |
margin: 0 0; | |
padding: 0; | |
background-color: #eee; | |
text-align: center; | |
} |
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
player = false | |
inGame = false | |
me = undefined | |
dead = undefined | |
gameID = window.location.hash.slice 1 | |
socket = io.connect 'http://localhost' | |
# PLAYER EVENTS | |
kill = (target) -> | |
if inGame and player and not dead then socket.emit 'kill', target |
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
app = require('http').createServer(handler) | |
io = require('socket.io').listen(app) | |
fs = require('fs') | |
app.listen 80 | |
handler = () -> | |
fs.readFile __dirname + '/index.html', (err, data) -> | |
if err | |
res.writeHead 500 |
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 Module1 | |
Sub Main() | |
For i = 0 To 255 | |
Select Case i | |
Case 9 | |
Console.Write("9 : \T") | |
Case 10 | |
Console.Write("10 : \N") | |
Case 13 |
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 Form1 | |
' Form Controls: Button BtnRed, Button BtnAmber, Button BtnGreen, TextBox TbxActor | |
Private Sub BtnRed_Click(sender As System.Object, e As System.EventArgs) Handles BtnRed.Click | |
TbxActor.BackColor = Color.Red | |
TbxActor.Text = "RED" | |
End Sub | |
Private Sub BtnAmber_Click(sender As System.Object, e As System.EventArgs) Handles BtnAmber.Click | |
TbxActor.BackColor = Color.Gold |
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 Form1 | |
' Form controls: Label Label1, TextBox TxtLimit, Button BtnExe, ListBox LstItems, Label LblInfo | |
Dim r As Random | |
Dim l, s, t As Integer | |
Dim z As Date | |
Private Sub BtnExe_Click(sender As System.Object, e As System.EventArgs) Handles BtnExe.Click | |
z = Date.UtcNow() | |
LblInfo.Text = "Running..." |
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 Form1 | |
' Form Controls: Label Label1, TextBox TextBox1, Button Button1, Button Button2, Label Label2 | |
Private output As Integer | |
Private Sub CalculateProc(n As Integer) | |
output = n * 2 | |
End Sub | |
Private Function CalculateFn(n As Integer) As Integer |
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 Form1 | |
' Form Controls: Button BtnPush, ListBox LstOutput | |
Dim r As Random | |
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load | |
r = New Random() | |
End Sub | |
Private Sub BtnPush_Click(sender As System.Object, e As System.EventArgs) Handles BtnPush.Click |
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 Form1 | |
' Form controls: TextBox TextBox1, Label Label1 | |
Private opt As Integer | |
Private names(9) As String | |
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load | |
names = {"Andrew", "Brian", "Charles", "David", "Edward", "Finn", "George", "Harry", "Ian", "John"} | |
TextBox1.Focus() | |
End Sub |
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 Form1 | |
' Form Controls: Label LblContext, TextBox TbxInput, Button BtnSubmit | |
Dim _name As String = vbNull | |
Private Sub BtnSubmit_Click(sender As System.Object, e As System.EventArgs) Handles BtnSubmit.Click | |
If TbxInput.Text <> _name Then | |
If TbxInput.Text = "" Then | |
TbxInput.BackColor = Color.Yellow | |
MessageBox.Show("Please enter your name in the provided box", Application.ProductName) |
OlderNewer