|
Hi all,
I got a server-client application, the server creates new thread when it accepts the incoming connection. I got some data on the server which I need to access. I thought about putting the data into the the thread itself, but if the thread1 updates those data and say thread2 access those data it would only have old copy of the data. So, I'm not too sure how to go about implementing it. If someone could shed some light this way I would be very much appreciated.
Thank you for your time reading this question
|
|
|
|
|
hi,
can someone please help me with writing a pseudocode algorithm for finding the SHORTEST PATH by using Dijkstra's algorithm?
cheers
|
|
|
|
|
that's a mighty tough question, 3rd year?
|
|
|
|
|
JNIEXPORT jstring JNICALL Java_playaudio_BeatTrack_myBeatTrack
(JNIEnv *env, jobject obj, jstring wavfile)
{
const char* filename = env->GetStringUTFChars(wavfile,0);
BeatTrack(filename);
env->ReleaseStringUTFChars(wavfile,filename);
return NULL;
}
for my BeatTrack method, I just need the filename, then it can run,
if I comment the BeatTrack(filename);, then no problem, for the java calling,
of course, my BeatTrack(const *char filename) has no problem, cause I have test it,,
but I call this method in java, the error is as follows,
Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing windows-x86)
# Problematic frame:
# C [beattrack.dll+0x130b]
#
# An error report file with more information is saved as:
# D:\programs\playAudio\hs_err_pid11684.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
any idea??
|
|
|
|
|
Please clarify and help to solve the following problem:
x1 and y1 are planned to run in same server.
X1 is set to run using default port as X1.central
y1 is set to run using port 90 as Y1.central:90/
Problem is if the user specify Y1.central/ without the port # obviously it go to X1 page.
Is there any possibility to redirect the page to Y1 if the user specify Y1.central (without port number) ?
Can we do some config settings in /etc/inet.d file to route
Y1.central to Y1.central:90
Basically client also prefers the URL to be without the port #.
Is there any config need to done in inetd.d. Application will run on solaris platform.
|
|
|
|
|
actually I'm researcher for build multi-agent system. This is my detail
project title : "MULTI-AGENT SYSTEM FOR PRODUCTION REAL TIME TRACKER"
Platform : Open Agent Architecture
Language : Interagent Communication Language (ICL) in Java programming
Methodology : Gaia Methodologies
so far...i'm still do not know, how to start the coding to develop my agent..so far i already done to run the oaa runtime following the tutorial but i'm still not understand and do not know how to implement for my programming using the netbeans...and how can i interact for my agent to current database
plz help me.....
~(^_^)~
|
|
|
|
|
this is not the right place to ask this.
if you're hiring, go to the job forum.
if you want others to write code for you, go to www.rentacoder.com[^]
otherwise, ask a specific and technical question...
|
|
|
|
|
hi
I am new to java sound, and want to play the sound while draw the waveform in realtime , any idea or open souce?
|
|
|
|
|
how can i refresh the jsp page to display the value of the variable set by the java in same process
|
|
|
|
|
|
hello dear,
I have one jsp with one button on click the button servlet will invoke & then java file in java i m calculating percentage and store it in variable that value i want to display on jsp
user can see the percent of processing
help me
|
|
|
|
|
Write a Rectangle class.
This class represents Rectangles. Each Rectange has the X and Y coordinates of its center point (as doubles) and its width and height (as double values, too). No other values should be stored! This means no area, no perimeter!
The class should have the following constructors and methods:
1. a constructor that takes X, Y, width, and height as arguments;
2. a constructor that takes only width and height as arguments;
3. a default constructor;
4. a method setCenter that takes X and Y as arguments;
5. a method setWidth that takes a width value;
6. a method setHeight that takes a height value;
7. a method getX that returns the X coordinate;
8. a method getY that returns the Y coordinate;
9. a method getWidth that returns the width value;
10. a method getHeight that returns the height value;
11. a method getArea calculates the area of the rectangle and returns it;
12. a method getPerimeter it calculates the perimeter of the rectangle and returns it;
13. a method toString that creates a String that includes the X, Y center coordinates, width, and height, and returns the string. This method does not use System.out.println() itself. It returns a String value to the caller.
Write an application (RectangleTest.java) to test your Rectangle class.
Your Application should test all the constructors and methods.
I need a submission of Both files: Rectangle.java and RectangleTest.java
please email me at T45russ@aol.com if you can write this program. I have been trying so hard and can't make it work. Thanks to all.
|
|
|
|
|
|
Hi guys, I think I'm going to lose my mind with this, I cant make my chunked transfer manager to work right.
The problem I'm having is that reading the amount of data specified in the chunk-size, I end up having the next chunk size inside the body, so, when I call the next getchunksize, it fails.
The first call to getChunkSize() works great and I get the size value as expected.
The BufferedReader is connected to the sock
<br />
s = new Socket(connectTo, portNum);<br />
sIn = new BufferedReader(new InputStreamReader(s.getInputStream()) );<br />
Thanks a lot guys, I hope any of you understands what's going on...
<br />
private String processChunked(BufferedReader sIn, String newData) throws IOException {<br />
<br />
newData += LINEBREAK;
<br />
int size = 0;<br />
String body = new String();<br />
<br />
size = getChunkSize(sIn);<br />
<br />
while(size > 0) {<br />
<br />
body = getChunkData(sIn, size); <br />
size = getChunkSize(sIn);<br />
<br />
newData += body;<br />
body = "";<br />
<br />
}<br />
<br />
return newData;<br />
<br />
}<br />
<br />
private String getChunkData(BufferedReader sIn, int lenght) throws IOException {<br />
<br />
int val = 0;<br />
String res = new String();<br />
char chr = ' ';<br />
<br />
for(int i= 0; i<lenght; i++)="" {<br="" mode="hold" /> <br />
val = sIn.read();<br />
<br />
if(val == -1)<br />
break;<br />
<br />
chr = (char)val;<br />
<br />
res += Character.valueOf(chr).toString();<br />
<br />
}<br />
<br />
<br />
return res;<br />
}<br />
<br />
private int getChunkSize(BufferedReader sIn) throws IOException {<br />
<br />
char chr = ' ', prvChr = ' ';<br />
int val = 0;<br />
String tmpSize = new String();<br />
int size = 0;<br />
int readed = 0;<br />
<br />
do {
<br />
prvChr = chr;<br />
val = sIn.read();<br />
<br />
if (val == -1) {<br />
break;<br />
}<br />
<br />
readed++;<br />
<br />
chr = (char) val;<br />
<br />
tmpSize += Character.valueOf(chr).toString();<br />
<br />
} while (prvChr != '\r' && chr != '\n');<br />
<br />
<br />
if(tmpSize.indexOf(";") != -1) {
tmpSize = tmpSize.substring(0, tmpSize.indexOf(";"));<br />
}<br />
<br />
tmpSize = tmpSize.trim();<br />
<br />
try {<br />
size = Integer.valueOf(tmpSize, 16); <br />
} catch (NumberFormatException e) {<br />
size = 0;<br />
}<br />
<br />
return size;<br />
}<br />
<br />
|
|
|
|
|
hey. i need help LOTS herE!
can anyone explain to me what delta compiler is?
how does it work?
How do i modify a programme codes?
trawler is a programme that runs on pc.
so what is the programme that runs in trawler?
if i'm not mistaken, it's Delta.
can somebody explain to me what is it??
seha
|
|
|
|
|
For more details and orderliness,here gives items to show what I want a program A could do these:
1.Supervise how much memory the program B consumed.If the program B was running and allocated memory exceeded the speciafied number,then report back to screen.
2.Restrict the priority of accessing the files out of its directory/folder to program B.Avoid running the dangerous code like system("reboot") from programs.
3.Kill the Process B if there includes any code lead to never finish running.e.g while(1){}.Of course,if a legal program run out time will be also killed.
4.How can I capture these above return messages,e.g Runtime error,stack overflow,Memory Limit Exceed.So much information just for users.
Note:This is very similar to a online judge system.
Thanks In Advance.
no cross no crown.
|
|
|
|
|
as long as your "judge" doesn't go inspect the binary code directly in the .class file, i don't really think most of your points can be done.
btw: No need to REPOST !!! this is a forum, not a chat, so please be patient
|
|
|
|
|
How wud i make an RSS Reader in Java. Provided tht i have to make an interface in Java too by using AWT or swing.... ?
|
|
|
|
|
|
Why would you use java to compile C/C++ ?¡
And for what you want to do (full control over the compilation) you should resort to something like make and predefine each and every step in the process, and calling the makefile in your exec(...)
Don't you also love the code?
|
|
|
|
|
Please help me!!
I need to loop through all my textboxes in a contentpage.
I saw an article on internet, but in the code was a form tag which I do not have in my masterpage.
Can you please provide me some code, how to loop through my textboxes in a contentpage to look for the backgroundcolor of the textbox?
Thanks in advance for helping a beginner in Javascript!!
Dennis
|
|
|
|
|
]]>
this is my database connection
public ResultSet getUnique() throws SQLException{
try{
getDBConnection();
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
query="SELECT url,SUM(data_received) xyz FROM logs GROUP BY url ORDER BY SUM(data_received) desc";
System.out.println("\nExecuting query: " + query);
rset = stmt.executeQuery(query);
}
catch (SQLException ex) {
logException(ex);
conn.rollback();
}
return rset;
}
the problem here is on web page message displayed is invalid column what is wrong?
|
|
|
|
|
i have written a program which should be run after certain time
i have wriiten .properties file where in i am specifying the path of the java program
this is my .properties file
# Timer for thread to sleep
thread.sleep = 9000
# To run the thread as daemon process
thread.run = true
# Copy command
thread.cmd = java abc
is this a correct way.
|
|
|
|
|
Hi everybody!
has anybody tried to change the ntfs-security on a win-xp system using java and wmi?
the problem: i can retrieve the win32_securitydescriptor, but a can't change(or writeback) the dacl.
thanx for a example or tip!
modified on Monday, April 28, 2008 8:17 AM
|
|
|
|
|
i want to include the functionality of right click option in my java code..
meaning...
if i right click on a .txt then it shows Open,print,edit..soon options from that i want to call one option with my java code.
any help???
-Jazz
|
|
|
|