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
| <?php | |
| // error_reporting(E_ALL); | |
| /** | |
| * Update the log file | |
| * @param string $message The message to write | |
| * @internal param string $request_date The date of the request | |
| */ | |
| function updateLogFile($message) { | |
| file_put_contents("ekulms_log_file.txt", date("d-m-Y") . " [" . mktime() . "]: $message \n", FILE_APPEND); |
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
| <? | |
| /* | |
| * Apparently x07 is the hex code for beep | |
| */ | |
| function beep($number_of_beeps, $pause_interval = 5){ | |
| for($i = 0; $i < $number_of_beeps){ | |
| echo "\x07"; | |
| sleep($pause_interval); | |
| } | |
| } |
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
| __author__ = 'deathnerd' | |
| count = 0.0 | |
| for i in range(1, 7): | |
| for j in range(1, 7): | |
| for k in range(1, 7): | |
| if (i+j+k)*10 <= 60: | |
| count += 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
| __author__ = 'deathnerd' | |
| combinations = list() | |
| for i in range(1, 7): | |
| for j in range(1, 7): | |
| for k in range(1, 7): | |
| #this appends a list (a type of array) to the combinations list | |
| combinations.append([k, j, i]) | |
| number_less_than_or_equal_to_sixty = 0.0 |
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
| package Homework10; | |
| import java.util.Scanner; | |
| /** | |
| * Created by Deathnerd on 4/20/2014. | |
| */ | |
| class Checks { | |
| public static boolean isNumber(char c) { |
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
| void traverse() { | |
| Helper hlp = new Helper(null, head); | |
| final Term curr = hlp.current; | |
| while (curr != null) { | |
| System.out.print(curr.getKey() + " "); | |
| hlp.moveNext(); | |
| } | |
| System.out.println(); | |
| } |
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
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: Deathnerd | |
| * Date: 4/12/14 | |
| * Time: 9:16 PM | |
| */ | |
| function get_key_values_from_database($key){ | |
| $db = mysqli_connect('localhost', 'root', 'root', 'db'); |
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
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: Deathnerd | |
| * Date: 4/12/14 | |
| * Time: 5:58 PM | |
| */ | |
| if(empty($_GET)){ | |
| echo "Get not set"; |
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
| private void selectionSort(int len) { | |
| if(len==1) | |
| return; | |
| int idx=maxSub(len-1); | |
| int t = A[idx/A.length][idx%A.length]; | |
| A[idx/A.length][idx%A.length] = A[(len-1)/A.length][(len-1)%A.length]; | |
| A[(len-1)/A.length][(len-1)%A.length] = t; | |
| selectionSort(len-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
| public int maxSub(int m) { | |
| int x = A[0][0]; | |
| int index = 0; | |
| for (int i = 1; i <= m; i++) { | |
| if (A[i/A.length][i%A.length] > x) { | |
| x = A[i/A.length][i%A.length]; | |
| index = i; | |
| } | |
| } | |
| return index; |