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
class Forms | |
{ | |
private static $initialized = false; | |
private static function initialize() | |
{ | |
if (self::$initialized) | |
return; | |
self::$initialized = 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
<?php | |
class Forms | |
{ | |
private static $initialized = false; | |
private static function initialize() | |
{ | |
if (self::$initialized) | |
return; |
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
<?php | |
echo Forms::buildForm("new-user", "index.php?act=manager", array("First Name", "Last Name"), array("text", "text"), array("first", "last")); | |
?> |
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
for (int i = 0; i < r.attemptCount.Length; i++) { | |
if (r.access [i] == 1) { | |
// Handle missed | |
if (r.attemptCount [i] <= 0) { | |
missed = true; | |
} | |
// Check for a score lower then given thresholds | |
if (r.topAssignmentScore [i] <= 79) { | |
completedThresh = 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
public class Downloader { | |
public bool Finished = false; | |
public double TotalBytes = 0; | |
public double BytesRecieved = 0; | |
// Percent stuff | |
public float Progress { get { return ((float)Progress_Percent) / 100.0f; } } | |
public int Progress_Percent = 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
private Thread downloadFileThread; | |
void DownloadDatFile() | |
{ | |
// The class is inherinty async so you don't need to put it in a thread, but if you want to monitor the progress | |
// in a "Snappy" manor in something like unity without worrying about the possible frame cap to disrupt thing from the Update callback | |
// then just use this setup to monitor it with a standard .NET thread | |
downloadFileThread = new Thread(new ThreadStart(threadDownloadDatFile)); | |
downloadFileThread.Start(); |
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
https://gist.github.com/ |
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
#!/bin/bash | |
sudo rm -r SL_Sparky | |
sudo rm -r /var/api/* | |
sudo git clone https://github.com/hawksprite/SL_Sparky.git | |
sudo cp -r SL_Sparky/Sparky/Sparky/* /var/api/ |
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
<?php | |
// Connect to DB | |
$hostName = "localhost"; | |
$userName = "root"; | |
$password = "#"; | |
$dbName = "class"; | |
$link = mysqli_connect($hostName, $userName, $password, $dbName) or die ("Error" . mysqli_error($link)); |
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
int maxSpawn = 30; // Every 30 milliseconds | |
int minSpawn = 1000; // Every 1000 milliseconds | |
int maxTime = 300000; // How long till we reach the maximum spawn rate, 5 minutes in milliseconds | |
DateTime born; | |
DateTime spawn; |
OlderNewer