cleaned the repo
This commit is contained in:
2
.idea/modules.xml
generated
2
.idea/modules.xml
generated
@@ -9,7 +9,7 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/DemoProjects/DemoProjects.iml" filepath="$PROJECT_DIR$/DemoProjects/DemoProjects.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Doodles/Doodles.iml" filepath="$PROJECT_DIR$/Doodles/Doodles.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ImageToText/ImageToText.iml" filepath="$PROJECT_DIR$/ImageToText/ImageToText.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/LanguageAnalysis/LanguageAnalysis.iml" filepath="$PROJECT_DIR$/LanguageAnalysis/LanguageAnalysis.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/LanguageDecryption/LanguageDecryption.iml" filepath="$PROJECT_DIR$/LanguageDecryption/LanguageDecryption.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/TOOLS/TOOLS.iml" filepath="$PROJECT_DIR$/TOOLS/TOOLS.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/TicTacToe - MinMax/TicTacToe - MinMax.iml" filepath="$PROJECT_DIR$/TicTacToe - MinMax/TicTacToe - MinMax.iml" />
|
||||
</modules>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
package src;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
@@ -1,69 +0,0 @@
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class Keyboard {
|
||||
|
||||
public static void main(String args[]) throws InterruptedException {
|
||||
KeyListener listener = new KeyListener() {
|
||||
|
||||
@Override
|
||||
|
||||
public void keyPressed(KeyEvent event) {
|
||||
System.out.println(event.getKeyChar());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public void keyReleased(KeyEvent event) {
|
||||
System.out.println(event.getKeyChar());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public void keyTyped(KeyEvent event) {
|
||||
System.out.println(event.getKeyChar());
|
||||
}
|
||||
|
||||
private void printEventInfo(String str, KeyEvent e) {
|
||||
System.out.println(str);
|
||||
int code = e.getKeyCode();
|
||||
System.out.println(" Code: " + KeyEvent.getKeyText(code));
|
||||
System.out.println(" Char: " + e.getKeyChar());
|
||||
int mods = e.getModifiersEx();
|
||||
System.out.println(" Mods: "
|
||||
+ KeyEvent.getModifiersExText(mods));
|
||||
System.out.println(" Location: "
|
||||
+ keyboardLocation(e.getKeyLocation()));
|
||||
System.out.println(" Action? " + e.isActionKey());
|
||||
}
|
||||
|
||||
private String keyboardLocation(int keybrd) {
|
||||
switch (keybrd) {
|
||||
case KeyEvent.KEY_LOCATION_RIGHT:
|
||||
return "Right";
|
||||
case KeyEvent.KEY_LOCATION_LEFT:
|
||||
return "Left";
|
||||
case KeyEvent.KEY_LOCATION_NUMPAD:
|
||||
return "NumPad";
|
||||
case KeyEvent.KEY_LOCATION_STANDARD:
|
||||
return "Standard";
|
||||
case KeyEvent.KEY_LOCATION_UNKNOWN:
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
JFrame jFrame = new JFrame();
|
||||
jFrame.setSize(1000,1000);
|
||||
jFrame.setVisible(true);
|
||||
|
||||
jFrame.addKeyListener(listener);
|
||||
|
||||
while(true){
|
||||
Thread.sleep(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
package src;
|
||||
|
||||
import org.w3c.dom.css.RGBColor;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
public class Test extends Frame implements ActionListener {
|
||||
private Label lblCount; // Declare a Label component
|
||||
private TextField tfCount; // Declare a TextField component
|
||||
private Button btnCount; // Declare a Button component
|
||||
private int count = 0; // Counter's value
|
||||
private Color c;
|
||||
|
||||
// Constructor to setup GUI components and event handlers
|
||||
public Test () {
|
||||
setLayout(new FlowLayout());
|
||||
// "super" Frame, which is a Container, sets its layout to FlowLayout to arrange
|
||||
// the components from left-to-right, and flow to next row from top-to-bottom.
|
||||
|
||||
lblCount = new Label("Counter"); // construct the Label component
|
||||
add(lblCount); // "super" Frame container adds Label component
|
||||
|
||||
tfCount = new TextField(count + "", 5); // construct the TextField component with initial text
|
||||
tfCount.setEditable(false); // set to read-only
|
||||
add(tfCount); // "super" Frame container adds TextField component
|
||||
|
||||
btnCount = new Button("Count"); // construct the Button component
|
||||
add(btnCount); // "super" Frame container adds Button component
|
||||
|
||||
btnCount.addActionListener(this);
|
||||
// "btnCount" is the source object that fires an ActionEvent when clicked.
|
||||
// The source add "this" instance as an ActionEvent listener, which provides
|
||||
// an ActionEvent handler called actionPerformed().
|
||||
// Clicking "btnCount" invokes actionPerformed().
|
||||
|
||||
setTitle("AWT Counter"); // "super" Frame sets its title
|
||||
setSize(250, 100); // "super" Frame sets its initial window size
|
||||
|
||||
// For inspecting the Container/Components objects
|
||||
// System.out.println(this);
|
||||
// System.out.println(lblCount);
|
||||
// System.out.println(tfCount);
|
||||
// System.out.println(btnCount);
|
||||
|
||||
setVisible(true); // "super" Frame shows
|
||||
|
||||
c = new Color(150,100,25);
|
||||
// System.out.println(this);
|
||||
// System.out.println(lblCount);
|
||||
// System.out.println(tfCount);
|
||||
// System.out.println(btnCount);
|
||||
}
|
||||
|
||||
// The entry main() method
|
||||
public static void main(String[] args) {
|
||||
// Invoke the constructor to setup the GUI, by allocating an instance
|
||||
Test app = new Test();
|
||||
// or simply "new AWTCounter();" for an anonymous instance
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
++count; // Increase the counter value
|
||||
// Display the counter value on the TextField tfCount
|
||||
tfCount.setText(count + ""); // Convert int to String
|
||||
System.out.println(c.getRGB());
|
||||
c = c.brighter();
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
public class Text{
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: Marshal
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package src;
|
||||
|
||||
import static java.lang.System.getProperty;
|
||||
|
||||
public class test {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(getProperty("user.home"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import java.io.*;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class Marshal {
|
||||
public class TerminalTool {
|
||||
|
||||
File file;
|
||||
RandomAccessFile ramAccessFile;
|
||||
@@ -19,7 +19,7 @@ public class Marshal {
|
||||
{ '#', 'm' }, { '#', 'o' }, { '#', 'b' }, { '#', 'w' }, { '#', 'f' }, { '#', 'k' }, { '#', 'z' },
|
||||
{ '#', 'p' }, { '#', 'v' }, { '#', 'ß' }, { '#', 'j' }, { '#', 'y' }, { '#', 'x' }, { '#', 'q' } };
|
||||
|
||||
public Marshal(String path) throws IOException {
|
||||
public TerminalTool(String path) throws IOException {
|
||||
file = new File(path);
|
||||
ramAccessFile = new RandomAccessFile(file, "rw");
|
||||
df = new DecimalFormat("#.00");
|
||||
@@ -141,8 +141,8 @@ public class Marshal {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
if (args.length == 1) {
|
||||
Marshal marshal = new Marshal(args[0]);
|
||||
marshal.analyse();
|
||||
TerminalTool terminalTool = new TerminalTool(args[0]);
|
||||
terminalTool.analyse();
|
||||
} else if(args.length == 0){
|
||||
System.err.println("File location is missing");
|
||||
} else {
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user