Commit be402baa authored by Gaurav Arora (gaa721)'s avatar Gaurav Arora (gaa721)
Browse files

Questions editing mdae easy and added logging

parent f580bc80
import static javax.swing.JOptionPane.*;
import com.sun.jna.platform.win32.*;
import gab.opencv.*;
import java.io.*;
import processing.video.*;
import java.awt.*;
import com.sun.jna.*;
......@@ -11,6 +14,11 @@ import org.jnativehook.mouse.NativeMouseEvent;
import org.jnativehook.keyboard.NativeKeyEvent;
import com.sun.jna.platform.win32.WinUser.WINDOWINFO;
import g4p_controls.*;
import java.util.Date;
Date date = new Date();
String user ="gaa721";
final String[] adjectives = {
"sad", "smelly", "happy", "greasy", "beautiful", "great", "horrible", "gelatinous", "swift", "real", "fake", "fun", "evil", "catastrophic", "fantastic", "amazing", "entertaining", "ruthless", "devastating", "tasty", "lumpy", "charming", "quaint", "pleasant", "wasteful", "harmless", "stupid", "ridiculous", "impossible"
};
......@@ -64,32 +72,65 @@ int rowHeight = 13;
int span, aspan;
float timer, Stime;
boolean question, questionMouse;
int [] chatRandom= {
12, 51, 54, 45, 45, 90, 79, 51, 16, 100, 160, 333, 156, 158, 121, 20, 0, 15, 10, 151, 0, 0, 15, 45, 45, 300, 15, 168, 484, 492, 412, 122, 22
int tempFiler = 0;
PrintWriter writer;
FileWriter fw ;
BufferedWriter bw;
String folderName ;
int [][] chatRandom= {
{136,161,184,32,246,252,246,180,4,6,14,193,179,176,108,10,234,95,243,43,234,255,27,28,56,202,53,26,203,27,32,26,61,132,107,117,229,17,60,145,47,54,157,111,99,253,154,25,174,270,213,231,147,280,158,253,138,254,255,37,285,130,17,27,251,193,118,17,116,60,126,250,88,239,120,267,293,65,121,86,191,151,221,290,214,10,207,39,82,84,108,99,84,75,240,147,89,278,227,50},
{105,203,266,12,51,127,238,200,260,151,24,219,40,13,232,268,74,21,57,148,275,118,216,243,243,41,110,224,233,90,53,66,299,2,127,39,202,18,155,128,123,226,26,52,120,96,73,292,222,36,137,232,75,218,267,55,153,260,139,159,121,38,130,32,211,47,299,73,203,152,163,166,253,97,131,176,58,174,191,78,250,184,2,136,175,20,193,7,12,152,50,53,171,238,221,79,201,210,22,281},
{166,142,268,208,221,290,82,82,151,187,70,164,71,165,79,157,287,50,277,124,244,225,19,191,247,208,135,231,41,139,197,226,73,14,260,12,205,34,286,268,291,139,263,47,93,266,298,191,113,93,268,6,3,266,66,285,73,121,1,204,14,197,117,296,262,98,87,248,210,20,145,91,23,61,140,90,202,85,104,234,43,135,241,280,239,165,257,1,109,205,50,10,203,234,242,281,31,122,206,115},
{25,51,170,201,151,267,242,175,211,253,287,105,239,191,27,124,236,122,174,248,243,259,194,243,140,260,37,85,259,8,154,279,0,215,40,235,138,27,195,86,213,7,176,137,114,278,140,86,143,261,157,111,188,139,122,25,128,202,249,155,90,198,114,241,297,290,64,108,230,207,164,188,17,109,173,193,258,289,296,229,223,185,291,38,220,120,261,288,66,218,59,53,48,171,74,165,20,56,86,31},
{28,9,60,44,235,81,33,133,152,98,80,270,111,128,86,86,76,145,248,275,174,277,116,140,112,224,60,170,135,241,182,263,216,239,281,124,264,221,131,243,62,8,24,155,56,280,166,164,142,271,108,60,135,206,253,132,134,150,106,17,119,296,201,215,256,110,291,216,63,172,237,202,161,43,251,1,55,277,68,76,201,7,238,200,169,281,285,152,11,54,272,292,15,136,46,28,187,15,67,236},
{56,216,218,256,258,176,144,279,166,259,166,166,24,0,166,45,207,198,278,25,194,271,15,58,223,46,1,149,281,270,37,275,77,54,286,235,217,47,72,176,152,265,76,120,55,290,65,117,41,72,48,108,279,22,106,12,287,19,60,281,54,67,268,275,190,250,19,103,149,223,283,8,68,298,158,250,256,242,94,293,226,19,236,21,247,31,283,191,7,96,50,287,252,71,262,204,67,72,167,18},
{101,51,59,226,150,291,289,8,136,119,115,195,291,297,173,234,192,114,241,124,290,231,294,117,85,121,151,278,282,236,54,56,44,262,287,69,37,190,4,15,54,232,54,298,290,244,77,129,214,124,42,128,157,214,29,9,21,187,107,232,137,86,54,214,288,117,233,30,237,26,296,132,186,5,184,284,34,122,7,186,249,95,274,48,50,13,184,287,88,180,60,208,236,136,104,135,52,98,4,275},
{183,211,224,205,128,6,152,178,196,75,171,198,61,71,5,192,18,116,281,63,275,51,87,223,8,107,166,188,102,231,90,109,53,296,6,104,111,261,232,217,42,76,173,112,129,226,284,239,297,138,119,210,243,42,253,127,143,75,208,185,63,193,223,113,113,52,225,3,132,213,289,103,134,144,113,213,148,267,21,16,95,12,148,59,142,185,198,44,61,205,215,103,153,258,105,139,151,74,265,260},
{0,99,263,32,175,6,85,174,205,14,212,203,206,204,65,184,21,43,296,269,25,264,114,8,8,8,284,70,287,20,26,7,273,30,227,273,95,35,176,146,17,129,16,231,182,158,232,121,5,296,124,173,287,100,199,256,178,253,159,162,29,86,113,53,141,237,8,194,269,103,208,299,177,77,7,296,162,97,80,184,258,37,208,13,250,113,174,68,286,249,198,70,104,166,171,98,173,50,259,244},
{138,74,219,146,69,48,187,194,95,237,103,79,41,190,108,290,59,79,140,158,94,86,128,35,250,250,25,141,120,241,91,207,138,206,1,99,72,191,80,39,263,220,43,286,1,22,76,109,180,247,249,188,51,165,275,237,159,290,48,296,276,272,172,34,4,26,269,280,185,216,135,270,118,67,54,2,272,121,261,207,27,208,45,28,9,161,32,87,116,89,20,238,100,268,190,113,83,134,239,117}
};
int chatRandomCounter;
int [][] nameRandom1= {
{7,2,8,1,2,9,0,6,5,5,6,5,5,7,2,1,5,4,1,1,9,0,0,9,3,3,6,7,0,8,9,8,7,6,1,8,9,2,0,2,9,8,6,5,8,4,2,2,7,1,7,2,7,6,7,9,0,1,2,0,4,3,8,7,1,3,0,5,5,7,3,4,5,9,7,7,1,5,3,1,9,0,6,6,0,1,8,6,3,6,0,4,5,4,7,2,8,8,4,5} ,
{1,2,2,3,9,6,1,7,1,2,1,1,5,3,1,7,9,8,7,5,9,7,5,8,9,6,3,4,6,6,1,0,9,3,2,7,0,0,3,7,8,6,6,8,0,9,6,9,0,3,1,3,6,4,2,0,1,7,9,5,7,2,1,5,6,7,0,2,6,5,2,3,5,3,0,3,5,6,4,4,7,9,5,7,5,3,0,8,4,2,1,7,0,6,0,2,7,7,1,2},
{8,8,5,8,8,0,7,1,4,5,3,3,6,2,6,5,7,8,8,8,7,1,7,5,1,0,8,4,1,6,8,3,9,5,5,7,7,3,8,3,1,1,5,3,8,9,3,3,4,9,2,4,4,0,4,5,5,8,8,3,7,4,1,2,7,4,6,0,6,3,8,6,7,1,4,0,1,7,6,0,6,2,2,7,8,4,3,9,7,6,9,9,4,7,6,6,4,8,9,0},
{6,4,3,7,7,6,6,8,9,7,3,4,6,7,2,6,8,0,2,8,5,5,9,0,9,4,0,5,3,9,4,0,4,5,7,3,9,0,9,8,5,3,8,5,7,1,3,4,1,5,2,1,1,5,7,5,2,8,5,8,5,5,1,0,7,2,9,6,6,2,4,2,0,1,5,2,9,8,5,4,0,0,7,9,5,5,5,0,6,6,6,4,0,5,3,7,4,8,1,1},
{8,2,7,8,6,9,5,6,0,5,7,9,3,5,9,3,0,3,7,0,0,2,5,3,1,9,3,2,0,8,9,2,2,8,9,0,2,2,8,6,8,2,1,4,4,5,6,3,8,1,7,2,4,8,2,9,1,2,3,4,7,3,4,7,7,1,2,9,6,5,9,6,0,8,5,2,1,7,7,0,0,3,1,3,4,1,6,5,6,5,3,1,2,3,2,2,7,8,0,9},
{1,9,4,2,4,3,1,8,0,0,1,6,6,6,1,6,2,8,0,8,5,0,7,0,9,4,4,8,2,8,9,8,3,8,5,3,6,2,4,1,2,0,1,4,6,3,6,6,4,4,2,4,1,9,8,4,2,7,8,6,1,5,7,2,9,4,0,6,7,4,3,7,2,8,6,6,4,8,5,0,8,9,0,4,7,1,3,5,2,1,8,5,4,4,0,0,6,9,3,2},
{4,9,9,1,6,9,4,5,4,0,8,8,2,6,4,5,5,9,9,1,6,3,3,4,2,1,1,2,2,2,6,8,6,7,6,7,1,7,8,7,6,5,3,4,4,3,1,0,0,9,4,8,3,3,4,2,1,9,7,9,8,3,6,2,2,9,6,0,9,3,1,1,9,6,9,6,2,3,3,0,2,0,9,7,1,8,8,4,5,2,2,4,3,0,2,3,6,1,8,3},
{5,7,9,7,9,4,0,3,4,6,1,0,1,4,0,6,2,1,6,6,8,8,0,6,8,6,8,9,1,0,7,9,2,4,3,7,5,0,1,3,7,0,4,9,3,3,6,3,0,7,1,8,8,5,1,5,0,4,0,8,6,9,3,3,1,5,4,0,5,3,3,2,3,2,6,8,1,7,9,3,4,8,4,1,3,2,1,9,3,4,7,0,4,7,3,9,6,4,1,9},
{4,0,0,2,5,7,3,0,2,6,9,1,2,2,1,1,6,8,6,2,6,8,2,7,1,2,5,7,3,1,4,1,9,6,5,2,7,1,4,0,2,2,0,6,9,3,0,9,8,2,1,1,0,2,5,5,7,2,0,0,4,5,1,1,4,1,8,8,7,9,1,1,7,3,8,4,4,1,6,0,0,8,6,3,9,2,7,0,2,3,7,2,0,9,4,7,1,0,0,5},
{1,4,4,3,7,1,4,4,7,8,3,3,7,0,8,8,4,1,5,5,9,3,8,4,2,8,1,6,7,1,2,2,0,8,3,1,5,1,0,3,3,0,2,3,5,2,4,4,8,4,1,5,6,5,1,9,4,7,0,2,2,0,8,0,4,9,4,9,3,4,8,5,3,0,2,9,8,3,8,3,6,0,9,3,2,4,8,6,5,4,2,3,6,0,5,5,3,1,3,2}
};
int questionCounter=0;
int chatRandomCounter = 0;
int frameCounter;
boolean startMenu ;
boolean changingFile = false;
void setup() {
temp = "";
setupInside();
size(chatX+chatWidth+10, chatY+chatHeight+20+10);
enterCount = 0;
strBuffSize = 512;
windowText = new char[strBuffSize];
createGUI();
button1.setVisible(false);
textfield3.setVisible(false);
startMenu = true;
frameCounter = 0;
windowTitle = "AttentionChat";
aboveWindows = new ArrayList<RECT>();
k=0;
rectOfInterest = new RECT();
timer = 0;
Stime = millis();
windowOfInterest = User32.INSTANCE.GetForegroundWindow();
question = false;
responseCollection="";
questionMouse= false;
chatRandomCounter=0;
/*
video = new Capture(this, 640/2, 480/2);
......@@ -102,16 +143,38 @@ void setup() {
lastMouseInput = System.nanoTime();
new InputReceiver(this);
}
void setupInside()
{
questionCounter=0;
changingFile = false;
temp = "";
frameCounter = 0;
k=0;
timer = 0;
Stime = millis();
question = false;
responseCollection="";
questionMouse= false;
chatRandomCounter=0;
lastKeyInput = System.nanoTime();
lastMouseInput = System.nanoTime();
chatBox = createGraphics(chatWidth, chatHeight);
messages = new ArrayList<ChatMessage>();
userColor = color(255, 0, 0);
}
void draw() {
if(!changingFile)
{
if (!startMenu)
{
timer = millis() -Stime;
......@@ -123,6 +186,7 @@ void draw() {
{
attention = true;
drawing();
}
else
{
......@@ -136,28 +200,19 @@ void draw() {
Stime = millis();
question = true;
drawing();
text("Select the portion which was drawn first after the black screen", 15, height-15);
}
}
}
if (question)
{
if (!questionMouse)
{
if (mousePressed)
{
pushMatrix();
//background(255);
text("Select the portion which was drawn first after the black screen", 600, 600);
popMatrix();
textfield3.setVisible(true);
fill(255);
text(Questions[questionCounter],5, 410, 340, 50);
}
}
}
}
} }
}
void update(int x, int y) {
......@@ -217,21 +272,12 @@ void mousePressed() {
scroll+=rowHeight;
}
if (question )
{
text("Select the portion which was drawn first after the black screen", 600, 600);
questionMouse = false;
question = false;
ellipse(mouseX, mouseY, 15, 15);
save("/"+participationID+ "/" + ++frameCounter + ".png");
// responseCollection = responseCollection + "Select the portion which was drawn first after the black screen :" +"x: " + mouseX+ "y: " + mouseY +"\n";
timer = 0;
Stime = millis();
}
}
void keyReleased() {
if(!question)
{
if (key != CODED) {
switch(key) {
case BACKSPACE:
......@@ -244,7 +290,8 @@ void keyReleased() {
case RETURN:
enterCount++;
// comment out the following two lines to disable line-breaks
if (enterCount>1)
if (enterCount>1&&typedText!="")
messages.add(new ChatMessage(userName, typedText, userColor, true));
typedText = "";
if (messages.size()*rowHeight-scroll==int(chatHeight/rowHeight)*rowHeight + rowHeight)
......@@ -252,6 +299,7 @@ void keyReleased() {
scroll+=rowHeight;
}
break;
case ESC:
case DELETE:
break;
......@@ -260,11 +308,12 @@ void keyReleased() {
}
}
}
}
ChatMessage generateMessage()
{
int user = int(random(names.length));
temp +=(user +",");
int user = int(nameRandom1[tempFiler][chatRandomCounter]);
temp +=(chatRandomCounter%names.length +",");
String genName = names[user];
color genColor;
switch (user)
......@@ -648,12 +697,6 @@ public class InputReceiver implements NativeKeyListener, NativeMouseInputListene
}
}
void keyPressed()
{
if (key=='a')
attention =!attention;
}
......@@ -702,7 +745,7 @@ void drawing()
messageDelay--;
if (messageDelay==0)
{
messageDelay = 5+chatRandom[chatRandomCounter++];
messageDelay = 5+chatRandom[tempFiler][chatRandomCounter++];
if (chatRandomCounter>chatRandom.length-1)
chatRandomCounter = 0;
ChatMessage c = generateMessage();
......@@ -807,4 +850,42 @@ void exit() {
print( temp );
super.exit();
}
public static double similarity(String s1, String s2) {
String longer = s1, shorter = s2;
if (s1.length() < s2.length()) { // longer should always have greater length
longer = s2; shorter = s1;
}
int longerLength = longer.length();
if (longerLength == 0) { return 1.0; /* both strings are zero length */ }
/* // If you have StringUtils, you can use it to calculate the edit distance:
return (longerLength - StringUtils.getLevenshteinDistance(longer, shorter)) /
(double) longerLength; */
return (longerLength - editDistance(longer, shorter)) / (double) longerLength;
}
public static int editDistance(String s1, String s2) {
s1 = s1.toLowerCase();
s2 = s2.toLowerCase();
int[] costs = new int[s2.length() + 1];
for (int i = 0; i <= s1.length(); i++) {
int lastValue = i;
for (int j = 0; j <= s2.length(); j++) {
if (i == 0)
costs[j] = j;
else {
if (j > 0) {
int newValue = costs[j - 1];
if (s1.charAt(i - 1) != s2.charAt(j - 1))
newValue = Math.min(Math.min(newValue, lastValue),
costs[j]) + 1;
costs[j - 1] = lastValue;
lastValue = newValue;
}
}
}
if (i > 0)
costs[s2.length()] = lastValue;
}
return costs[s2.length()];
}
String[] Questions= {
"Who texted immediately after you got non attentive (if no one type NONE)?",
"How many people texted after you were non attentive?",
"How many text were there after you were not attentive?",
"Did someone text when you were not attentive?"
};
String[][] Answers= {
{"Bob","4","1","yes"},
{"Mackenzie","1","4","yes"},
{"Bob","2","2","yes"},
{"turtlefan25","1","1","yes"},
{"Bob","3","3","yes"},
{"cool_dude","1","1","yes"},
{"Mackenzie","2","1","yes"},
{"Mackenzie","2","1","yes"},
{"cool_dude","2","1","yes"},
{"Mike","1","2","yes"}
};
......@@ -20,6 +20,22 @@ public void textfield1_change1(GTextField source, GEvent event) { //_CODE_:textf
{
print(source.getText());
participationID = source.getText();
folderName = "c:/Users/" + user + "/Desktop/chatStudyData/"+day()+"-"+month()+"-"+year()+"-"+ hour()+"-"+minute() +"-"+second()+ "-" +millis() +"-"+ participationID;
File file = new File(folderName);
file.mkdirs();
try
{
//writer = new PrintWriter("c:/Users/gaa721/Desktop/" + day()+"-"+month()+"-"+year()+"-"+ hour()+"-"+minute() +"-"+second()+ "-" + participationID + ".txt");
writer = new PrintWriter(new FileWriter(folderName+ "/"+day()+"-"+month()+"-"+year()+"-"+ hour()+"-"+minute() +"-"+second()+ "-" + participationID + ".txt"), true);
}
catch(FileNotFoundException e)
{
print(e.toString());
}
catch(IOException e)
{
print(e.toString());
}
startMenu =false;
label1.setVisible(false);
textfield1.setVisible(false);
......@@ -27,6 +43,74 @@ public void textfield1_change1(GTextField source, GEvent event) { //_CODE_:textf
}
} //_CODE_:textfield1:215102:
public void textfield2_change1(GTextField source, GEvent event) { //_CODE_:textfield3:984243:
println("textfield2 - GTextField >> GEvent." + event + " @ " + millis());
if (event == GEvent.ENTERED)
{
String rightorwrong;
double tempPercent = similarity(source.getText(), Answers[tempFiler][questionCounter])*100;
if (tempPercent>80)
rightorwrong = "Correct";
else if (tempPercent>50)
rightorwrong="maybe Correct";
else
rightorwrong="Incorrect";
writer.println("Date " + date.toString() + " Timestamp: " + millis() + " Partipation ID: " + participationID +" Type: "+ questionCounter +" Trial number: " + tempFiler+ ":"+(questionCounter+1) + " Correct Answer: " + Answers[tempFiler][questionCounter] + " Answer Given: " + source.getText() +" Equal Percentage: " + tempPercent + " Comment: " + rightorwrong );
pushMatrix();
// textSize(20);
fill(0, 0, 0);
text( "participationID: " + participationID, 200, 200);
popMatrix();
save(folderName + "/" + day()+"-"+month()+"-"+year()+"-"+ hour()+"-"+minute() +"-"+second()+ "-" +millis() +"-"+ participationID +"-" + tempFiler + (questionCounter+1)+ ".png");
// responseCollection = responseCollection + "Select the portion which was drawn first after the black screen :" +"x: " + mouseX+ "y: " + mouseY +"\n";
timer = 0;
Stime = millis();
question = false;
questionCounter++;
if (questionCounter == 4)
{
pushMatrix();
background(255);
// textSize(20);
text("Thanks", displayWidth/2 -30, displayHeight/2);
popMatrix();
changingFile = true;
button1.setVisible(true);
}
source.setText("");
source.setVisible(false);
}
} //_CODE_:textfield3:984243:
public void button1_click1(GButton source, GEvent event) { //_CODE_:button1:653596:
println("button1 - GButton >> GEvent." + event + " @ " + millis());
tempFiler++;
if(tempFiler>=5)
{
background(255);
text("Thanks");
source.setVisible(false);
noLoop();
}
else
setupInside();
source.setVisible(false);
} //_CODE_:button1:653596:
// Create all the GUI controls.
......@@ -43,10 +127,19 @@ public void createGUI() {
textfield1 = new GTextField(this, 189, 197, 107, 23, G4P.SCROLLBARS_NONE);
textfield1.setOpaque(true);
textfield1.addEventHandler(this, "textfield1_change1");
textfield3 = new GTextField(this, 340, 410, 180, 30, G4P.SCROLLBARS_NONE);
textfield3.setOpaque(true);
textfield3.addEventHandler(this, "textfield2_change1");
button1 = new GButton(this, 52, 338, 149, 34);
button1.setText("Click Here for Next Chat");
button1.setTextBold();
button1.addEventHandler(this, "button1_click1");
}
// Variable declarations
// autogenerated do not edit
GLabel label1;
GTextField textfield1;
GTextField textfield3;
GButton button1;
import static javax.swing.JOptionPane.*;
import com.sun.jna.platform.win32.*;
import gab.opencv.*;
import java.io.*;
import processing.video.*;
import java.awt.*;
import com.sun.jna.*;
......@@ -11,6 +14,11 @@ import org.jnativehook.mouse.NativeMouseEvent;
import org.jnativehook.keyboard.NativeKeyEvent;
import com.sun.jna.platform.win32.WinUser.WINDOWINFO;
import g4p_controls.*;
import java.util.Date;
Date date = new Date();
String user ="gaa721";
final String[] adjectives = {
"sad", "smelly", "happy", "greasy", "beautiful", "great", "horrible", "gelatinous", "swift", "real", "fake", "fun", "evil", "catastrophic", "fantastic", "amazing", "entertaining", "ruthless", "devastating", "tasty", "lumpy", "charming", "quaint", "pleasant", "wasteful", "harmless", "stupid", "ridiculous", "impossible"
};
......@@ -64,33 +72,65 @@ int rowHeight = 13;
int span, aspan;
float timer, Stime;
boolean question, questionMouse;
int [] chatRandom= {
12, 51, 54, 45, 45, 90, 79, 51, 16, 100, 160, 333, 156, 158, 121, 20, 0, 15, 10, 151, 0, 0, 15, 45, 45, 300, 15, 168, 484, 492, 412, 122, 22
int tempFiler = 5;
PrintWriter writer;
FileWriter fw ;
BufferedWriter bw;
String folderName ;
int [][] chatRandom= {
{136,161,184,32,246,252,246,180,4,6,14,193,179,176,108,10,234,95,243,43,234,255,27,28,56,202,53,26,203,27,32,26,61,132,107,117,229,17,60,145,47,54,157,111,99,253,154,25,174,270,213,231,147,280,158,253,138,254,255,37,285,130,17,27,251,193,118,17,116,60,126,250,88,239,120,267,293,65,121,86,191,151,221,290,214,10,207,39,82,84,108,99,84,75,240,147,89,278,227,50},
{105,203,266,12,51,127,238,200,260,151,24,219,40,13,232,268,74,21,57,148,275,118,216,243,243,41,110,224,233,90,53,66,299,2,127,39,202,18,155,128,123,226,26,52,120,96,73,292,222,36,137,232,75,218,267,55,153,260,139,159,121,38,130,32,211,47,299,73,203,152,163,166,253,97,131,176,58,174,191,78,250,184,2,136,175,20,193,7,12,152,50,53,171,238,221,79,201,210,22,281},
{166,142,268,208,221,290,82,82,151,187,70,164,71,165,79,157,287,50,277,124,244,225,19,191,247,208,135,231,41,139,197,226,73,14,260,12,205,34,286,268,291,139,263,47,93,266,298,191,113,93,268,6,3,266,66,285,73,121,1,204,14,197,117,296,262,98,87,248,210,20,145,91,23,61,140,90,202,85,104,234,43,135,241,280,239,165,257,1,109,205,50,10,203,234,242,281,31,122,206,115},
{25,51,170,201,151,267,242,175,211,253,287,105,239,191,27,124,236,122,174,248,243,259,194,243,140,260,37,85,259,8,154,279,0,215,40,235,138,27,195,86,213,7,176,137,114,278,140,86,143,261,157,111,188,139,122,25,128,202,249,155,90,198,114,241,297,290,64,108,230,207,164,188,17,109,173,193,258,289,296,229,223,185,291,38,220,120,261,288,66,218,59,53,48,171,74,165,20,56,86,31},
{28,9,60,44,235,81,33,133,152,98,80,270,111,128,86,86,76,145,248,275,174,277,116,140,112,224,60,170,135,241,182,263,216,239,281,124,264,221,131,243,62,8,24,155,56,280,166,164,142,271,108,60,135,206,253,132,134,150,106,17,119,296,201,215,256,110,291,216,63,172,237,202,161,43,251,1,55,277,68,76,201,7,238,200,169,281,285,152,11,54,272,292,15,136,46,28,187,15,67,236},
{56,216,218,256,258,176,144,279,166,259,166,166,24,0,166,45,207,198,278,25,194,271,15,58,223,46,1,149,281,270,37,275,77,54,286,235,217,47,72,176,152,265,76,120,55,290,65,117,41,72,48,108,279,22,106,12,287,19,60,281,54,67,268,275,190,250,19,103,149,223,283,8,68,298,158,250,256,242,94,293,226,19,236,21,247,31,283,191,7,96,50,287,252,71,262,204,67,72,167,18},
{101,51,59,226,150,291,289,8,136,119,115,195,291,297,173,234,192,114,241,124,290,231,294,117,85,121,151,278,282,236,54,56,44,262,287,69,37,190,4,15,54,232,54,298,290,244,77,129,214,124,42,128,157,214,29,9,21,187,107,232,137,86,54,214,288,117,233,30,237,26,296,132,186,5,184,284,34,122,7,186,249,95,274,48,50,13,184,287,88,180,60,208,236,136,104,135,52,98,4,275},
{183,211,224,205,128,6,152,178,196,75,171,198,61,71,5,192,18,116,281,63,275,51,87,223,8,107,166,188,102,231,90,109,53,296,6,104,111,261,232,217,42,76,173,112,129,226,284,239,297,138,119,210,243,42,253,127,143,75,208,185,63,193,223,113,113,52,225,3,132,213,289,103,134,144,113,213,148,267,21,16,95,12,148,59,142,185,198,44,61,205,215,103,153,258,105,139,151,74,265,260},
{0,99,263,32,175,6,85,174,205,14,212,203,206,204,65,184,21,43,296,269,25,264,114,8,8,8,284,70,287,20,26,7,273,30,227,273,95,35,176,146,17,129,16,231,182,158,232,121,5,296,124,173,287,100,199,256,178,253,159,162,29,86,113,53,141,237,8,194,269,103,208,299,177,77,7,296,162,97,80,184,258,37,208,13,250,113,174,68,286,249,198,70,104,166,171,98,173,50,259,244},
{138,74,219,146,69,48,187,194,95,237,103,79,41,190,108,290,59,79,140,158,94,86,128,35,250,250,25,141,120,241,91,207,138,206,1,99,72,191,80,39,263,220,43,286,1,22,76,109,180,247,249,188,51,165,275,237,159,290,48,296,276,272,172,34,4,26,269,280,185,216,135,270,118,67,54,2,272,121,261,207,27,208,45,28,9,161,32,87,116,89,20,238,100,268,190,113,83,134,239,117}
};
int chatRandomCounter;
int [][] nameRandom1= {
{7,2,8,1,2,9,0,6,5,5,6,5,5,7,2,1,5,4,1,1,9,0,0,9,3,3,6,7,0,8,9,8,7,6,1,8,9,2,0,2,9,8,6,5,8,4,2,2,7,1,7,2,7,6,7,9,0,1,2,0,4,3,8,7,1,3,0,5,5,7,3,4,5,9,7,7,1,5,3,1,9,0,6,6,0,1,8,6,3,6,0,4,5,4,7,2,8,8,4,5} ,
{1,2,2,3,9,6,1,7,1,2,1,1,5,3,1,7,9,8,7,5,9,7,5,8,9,6,3,4,6,6,1,0,9,3,2,7,0,0,3,7,8,6,6,8,0,9,6,9,0,3,1,3,6,4,2,0,1,7,9,5,7,2,1,5,6,7,0,2,6,5,2,3,5,3,0,3,5,6,4,4,7,9,5,7,5,3,0,8,4,2,1,7,0,6,0,2,7,7,1,2},
{8,8,5,8,8,0,7,1,4,5,3,3,6,2,6,5,7,8,8,8,7,1,7,5,1,0,8,4,1,6,8,3,9,5,5,7,7,3,8,3,1,1,5,3,8,9,3,3,4,9,2,4,4,0,4,5,5,8,8,3,7,4,1,