Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jehonathan Thomas justcoding121

🏠
Working from home
View GitHub Profile
View gist:3943651
/*
This file contains codes mostly developed by Dr.Ken Christensen. Email: christen@csee.usf.edu
http://www.csee.usf.edu/~christen/tools/toolpage.html
class : Computer Networks
*/
/* Code is readable and therefore comments are added when absolutely needed */
/* Header Files for time, sockets, IO and String */
View gist:3943665
/* include needed headers here*/
using namespace std;
typedef map<char, int> pmap;
typedef map<int, char> vmap;
void main()
{
int T; //test cases
//freopen("C:\\input.txt","r",stdin);
//freopen("C:\\ouput.out","w",stdout);
cin >> T;
View gist:3943694
/*include needed headers here */
using namespace std;
typedef map<char, bool> pmap;
void main()
{
int T;
//freopen("C:\\input1.txt","r",stdin);
//freopen("C:\\outp.txt","w",stdout);
cin >> T;
for (int kk = 0; kk < T; kk++) {
View gist:3943715
import java.util.*;
import java.io.*;
public class Main {
final static String FNAME = "A-large"; //input file name
public Scanner in;
public PrintWriter out;
void open() throws IOException {
in = new Scanner( new File( FNAME + ".in" ) ) ;
out = new PrintWriter( new File( FNAME + ".out" ) );
View gist:3943740
import java.util.*;
import java.io.*;
public class Main {
final static String FNAME = "C-small-attempt0";
public Scanner in;
public PrintWriter out;
void open() throws IOException {
in = new Scanner( new File( FNAME + ".in" ) ) ;
out = new PrintWriter( new File( FNAME + ".out" ) );
View gist:3943762
/**
*
*
* Tested in NetBeans IDE 6.5.1 with JDK 1.6.0_17
* Generates the configuration space image and saves in png format.
* Generates the configuration space matrix and saves in txt format
* Please replace FNAME_input and FNAME_output variables as per preffered location of input and output files.
*/
import java.io.*;
import java.util.*;
View gist:3943773
/**
*
*
* Tested in NetBeans IDE 6.5.1 with JDK 1.6.0_17
* Generates the configuration space along with the path and saves in png format.
* Modify the variables sample_size, distance if needed
* Please replace FNAME_input and FNAME_output variables as per preffered location of input and output files.
*/
View gist:3943897
*/
package aiproject;
import java.io.IOException;
public class AIproject {
/**
* @param args the command line arguments
View gist:3943902
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package aiproject;
import java.awt.Point;
//Node Object blueprint
public class Node {
View gist:3943904
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package aiproject;
import java.awt.Point;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;