Skip to content

Commit

Permalink
refactor: removed old code
Browse files Browse the repository at this point in the history
  • Loading branch information
PtrMan committed Apr 14, 2020
1 parent dec2640 commit 8598f6d
Showing 1 changed file with 0 additions and 79 deletions.
79 changes: 0 additions & 79 deletions src/main/java/ptrman/exp/NarConSimpleWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,36 +126,6 @@ public void narInferenceSteps(int steps) {

if (!useRngAgent) {
try {
/*
while(true) {
int len = is.available();
if (len > 0) {
int here = 5;
}
break;
*
byte[] buf = new byte[10];
is.read(buf);
if (buf[0] == 0) { // is empty line?
break;
}
String bufAsString = new String(buf);
System.out.println(bufAsString);
int here = 5;
*
}
*/


while(true) {
//byte[] arr = new byte[1];
//is.read(arr);
Expand Down Expand Up @@ -236,15 +206,6 @@ public NarConSimpleWorld() {
classifier.minSimilarity = 0.87f;
}


/*
try {
socket = new DatagramSocket(50001);
socket.setSoTimeout(1);
} catch (SocketException e) {
e.printStackTrace();
}*/

// TODO < decide path based on OS >
String commandline = pathToOna+"\\NAR.exe";

Expand All @@ -253,46 +214,6 @@ public NarConSimpleWorld() {
os = pro.getOutputStream();
is = pro.getInputStream();

/*
BufferedReader stdInput = new BufferedReader(new
InputStreamReader(is));
//os.write("< a --> b >.\n".getBytes());
//sendText(""+5, false);
byte[] buf = (5+"\r\n").getBytes();
try {
os.write(buf);
os.flush();
} catch (IOException e) {
e.printStackTrace();
}
try {
Thread.sleep(100); // give other processes time
} catch (InterruptedException e) {
//e.printStackTrace();
}
String inputLine;
while ((inputLine = stdInput.readLine()) != null)
System.out.println(inputLine);
*/

/*
for(;;) {
String x = stdInput.readLine();
//if (a > 0) {
int here = 5;
//}
}
*/

int here = 5;

//int here = 5;
Expand Down

0 comments on commit 8598f6d

Please sign in to comment.