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
import java.util.Scanner; | |
public class StringPermutator { | |
public static void permutate(String string) { | |
int [] factorials = new int[string.length()+1]; | |
factorials[0] = 1; | |
for (int i = 1; i<=string.length();i++) { | |
factorials[i] = factorials[i-1] * i; | |
} |
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 SensorDataProcessor{ | |
// Senson data and limits. | |
public double[][][] data; | |
public double[][] limit; | |
// constructor | |
public DataProcessor(double[][][] data, double[][] limit) { | |
this.data = data; | |
this.limit = limit; |
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
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <stdio.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <time.h> | |
#include <sys/time.h> |
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
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <stdio.h> | |
struct auth { | |
char name[32]; | |
int auth; | |
}; |
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
import java.io.IOException; | |
import java.net.URLClassLoader; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.nio.file.Path; | |
/** | |
* Example demonstrating a ClassLoader leak. | |
* | |
* <p>To see it in action, copy this file to a temp directory somewhere, |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
int con; | |
con = 0; | |
int account_balance = 1100; | |
while(con == 0){ | |
printf("=========================================\n"); | |
printf("Welcome to the Store - (World's Most Secure Purchasing App) \n"); |
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
import java.nio.charset.StandardCharsets; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.Random; | |
public class CrackMe { | |
public static void main(String[] args) throws Exception { | |
long sleepy = 1; | |
while (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
#include <stdio.h> | |
#include <assert.h> | |
#include <string.h> | |
#include <stdlib.h> | |
// maximum number of integers stored in buffer | |
const int MAX_BUF_SZ = 1024; | |
int srcBuffer[MAX_BUF_SZ]; // source buffer | |
int dstBuffer[MAX_BUF_SZ]; // destination buffer |
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 COMP4384 { | |
public static void main(String[] args) { | |
print("Hello"); | |
/* | |
* TODO: print World in unicode | |
* \u002A\u002F\u0070\u0072\u0069\u006E\u0074\u0028\u0022\u0043\u0072\u0075\u0065\u006C\u0022\u0029\u003B\u002F\u002A | |
*/ | |
print("World"); |
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 Puzzle2 { | |
public static void main(String[] args) { | |
System.out.print("iexplore:"); | |
http://www.google.com; | |
System.out.println(":maximize"); | |
} | |
} |
NewerOlder