I am making a program that searches for music files, stores their locations in a .txt file, then goes and gets the MetaData from those files and stores that in a separate .txt file. The reason for storing in .txt files is that I ran out of memory. However, I need to be able to go and read a specific line of each of those files. The code does a great job at finding and storing those file locations, but then I need to read those file locations one at a time and go get the metadata. But How do you read lines in a file one at a time? Here is the code: **** Problem starts at the last while statement ***** and I inserted a line that just says "END" at the end of the file that stores the file locations.
Hello, I am working on a program to interface with my Russound Smart Media Server. It has interfaces with RS-232 serial as well as TCP over LAN. LAN would be best but I also have global gache IP/RS-232 converter.
In order to send commands to the Server, I have to send an XML file over the network to the Server. How would I do this? the the server port is TCP 9001. Thanks so much for your help.
I am trying to network my android with my PC. This is my Setup:
Android <----------> router <--------------> internet <-------------> router <------------> server
OR
Android <----------------------------------------> router <-----------------------------------------> Server
My issue is that when I set up port forwarding and such on my router, my computer thinks that my android is the router. I need to know what IP address to reply too. This is my recieving code (UDP library):public void receive(byte[] data, String ip, int port) {
public void receive(byte[] data, String ip, int port) {
datastr = join(str(char(data)), "");
println("Recieved Data From: " + ip + ":" + port + " Data: " + datastr);
When I receive a message, I get my printout that says "Recieved Data From: 192.168.1.1:2001 Data: <data>". But that isn't the IP address of the android phone. That is the IP of the router. How to I know where to send the message back to?
I was trying to run a sketch and got this error... Invalid maximum heap size: -Xmx5000m
It would not let me run the sketch. How do I fix this issue? I was trying to use the stt library example "STTBasic" that comes with the library. Then because that failed I tried even the most simple sketch:
I need my program to look into a folder and tell me what files (.txt) are located in it and their names. My research led me to
java.io.File and I found the list() function. So I tried to use it. the code that I tried was
public String[] test = File.list();
println(test);
I keep getting the error Cannot make a static reference to the non-static method list() from the type file. How can I fix this? Or is there a better way to list files?
I have a question regarding a piece of code like void keypress() {. When a key is pressed, does the program stop what it is doing, and do what is under the keypress function and then go back to where it was? so for example, the program is working on a bunch of math problems cuz that is what is supposed to do, and then a key is pressed. Will the program stop computing, go to the void keypress() function, do that, and then go back to where the program left off in the draw() function?
In Daniel Shiffmans Email program, it uses the print(); function to display the activity between the client and the server in processing. How could I make it so that instead of it displaying in processing, that it can display on the screen?
I have looked around and i honestly can't figure out how to use javamail. How do i install it? I am new to programming and have spent a few weeks researching so far yielding no results. Any help?