|
Hey thanks..but i already tried that.
A file is created on the other computer but only garbage is displayed. The audio comes as only bytes.
Can u please suggest something else.??
|
|
|
|
|
vidzdas wrote: Hey thanks..but i already tried that.
Uh, tried what?
vidzdas wrote: A file is created on the other computer but only garbage is displayed. The audio is comes as only bytes.
I don't understand, there is nothing to display from an audio file.
MVP 2010 - are they mad?
|
|
|
|
|
|
4277480 wrote: Try this
That's what I was suggesting. I wish I had a £ for every time I have tried to get people to understand that a file is merely a stream of bytes, and transferring from one place to another without the need to understand the content is what keeps the entire world running these days.
MVP 2010 - are they mad?
|
|
|
|
|
haha I know but the thought of sending stream of garbage which is supposed to be an audio file really is an interesting theory
|
|
|
|
|
4277480 wrote: the thought of sending stream of garbage which is supposed to be an audio file really is an interesting theory
It fits the model of so many issues posted here these days!
btw welcome back, haven't seen input from you for some time.
MVP 2010 - are they mad?
|
|
|
|
|
Thank you, now I am back to idle mode until the next project, so from time to time I will be referencing here.
|
|
|
|
|
hey
try to use ObjectInputStream and ObjectOutputStream
am always use it to transfer any type of files.
/*********************************************
* simple FTP(Client Side/upload) *
* Written By : Salah I. Qasem *
* E-mail: tormentor701@hotmail.com *
*********************************************/
import java.io.*;
import java.net.*;
public class Client
{
public static void main(String args[])
{
try{
InputStream file = new FileInputStream("fileName.xxx");
Socket socket = new Socket("127.0.0.1" , 2008);
byte[] bfrArray = new byte[file.available()];
file.read(bfrArray);
ObjectOutputStream obj = new ObjectOutputStream(socket.getOutputStream());
obj.writeObject(bfrArray);
}
catch(Exception ex){System.err.println(ex);}
}
}
/*********************************************
* simple FTP(Server Side/receive) *
* Written By : Salah I. Qasem *
* E-mail: tormentor701@hotmail.com *
*********************************************/
import java.io.*;
import java.net.*;
public class Server
{
public static void main(String args[])
{
try{
ServerSocket serverSocket = new ServerSocket(2008);
Socket socket= serverSocket.accept();
ObjectInputStream input = new ObjectInputStream(socket.getInputStream());
byte[] bfrArray = (byte[])input.readObject();
OutputStream file = new FileOutputStream("newFileName.xxx");
DataOutputStream writer = new DataOutputStream(file);
writer.write(bfrArray);
}
catch(Exception ex)
{
System.err.println(ex);
}
}
}
|
|
|
|
|
Hi,
I have to create ssh window.And i've mindterm.jar and following code
<APPLET CODE="com.mindbright.application.MindTerm.class" ARCHIVE="mindterm312.jar?r1" WIDTH=800 HEIGHT=600>
<PARAM NAME="line-space-delta" value="0">
<PARAM NAME="local-echo" value="false">
<PARAM NAME="rev-video" value="false">
<PARAM NAME="ignore-null" value="true">
<PARAM NAME="crlf" value="false">
<PARAM NAME="font-size" value="12">
<PARAM NAME="autowrap" value="true">
<PARAM NAME="delete-send" value="bs">
<PARAM NAME="ascii-line" value="false">
<PARAM NAME="local-pgkeys" value="false">
<PARAM NAME="font-name" value="Monospaced">
<PARAM NAME="visual-bell" value="false">
<PARAM NAME="geometry" value="80x24">
<PARAM NAME="backspace-send" value="del">
<PARAM NAME="paste-button" value="middle">
<PARAM NAME="rev-autowrap" value="false">
<PARAM NAME="passthru-prn-enable" value="true">
<PARAM NAME="copy-select" value="true">
<PARAM NAME="save-lines" value="512">
<PARAM NAME="term-type" value="xterm">
<PARAM NAME="key-mappings" value="">
<PARAM NAME="insert-mode" value="false">
<PARAM NAME="username" value="">
<PARAM NAME="copy-crnl" value="false">
<PARAM NAME="bg-color" value="white">
<PARAM NAME="server" value="apps0.toronto.edu">
<PARAM NAME="print-font-size" value="8">
<PARAM NAME="input-charset" value="none">
<PARAM NAME="repos-output" value="true">
<PARAM NAME="resizable" value="true">
<PARAM NAME="repos-input" value="true">
<PARAM NAME="map-ctrl-space" value="true">
<PARAM NAME="print-font-name" value="Courier">
<PARAM NAME="encoding" value="iso-8859-1">
<PARAM NAME="virtual-kbd" value="">
<PARAM NAME="cursor-color" value="i_blue">
<PARAM NAME="scrollbar" value="right">
<PARAM NAME="auto-linefeed" value="false">
<PARAM NAME="select-delim" value="\"\"">
<PARAM NAME="visible-cursor" value="true">
<PARAM NAME="fg-color" value="black">
</APPLET>
When i run this html, i got ssh window but this following error will occur.
Error connecting to apps0.toronto.edu, reason:
-> access denied (java.net.SocketPermission apps0.toronto.edu resolve)
Is there any bug in applet code? please help me.........
|
|
|
|
|
sangeethanarayan wrote: Error connecting to apps0.toronto.edu, reason:
-> access denied
Take a look at the message; it would appear that the server at apps0.toronto.edu does not trust you.
MVP 2010 - are they mad?
|
|
|
|
|
Hello Friends
I am applying texture to a object with clamp option means no repetition of that texture to object.
My code is below:
TextureLoader textureLoader = new TextureLoader(textureImage, TextureLoader.GENERATE_MIPMAP);
Texture texture = textureLoader.getTexture();
texture.setBoundaryModeS(Texture.CLAMP); texture.setBoundaryModeT(Texture.CLAMP);
texture.setBoundaryColor(1.0f,0.0f,0.0f,1.0f);
First of all I mapplying a color to opject suppose red then I am applying texture Image without repetition of yellow color.Then I am setting boundary color(red) too as I read in some Docs.
After that the color of that object doesnt remain red.It becomes light yeloow.
Any Ideas??
Thanks In Advance.
Yogesh
|
|
|
|
|
I need to implement the TF-IDF and calculate the cosine value of a document from a file.Please help urgently.
|
|
|
|
|
See here[^].
MVP 2010 - are they mad?
|
|
|
|
|
You can also read this[^]
|
|
|
|
|
A contact of mine is trying to learn java programming and has started with the Herbert Schildt book Java A Beginners Guide.
His OS is Windows Vista onto which he has installed NetBeans and Eclipse.
He has asked me for help but even though I am a programmer I only use Linux so am not sure that my Vista skills are adequate other than fixing his PATH environment.
His Java version is:-
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)
His 1st program is:-
[code]
/* This demonstrates a variable.
call this file Example2.java.
*/
Class Example2 {
public static void main(String args[ ]) {
int var1; // this declares a variable
int var2; // this declares another variable
var1 = 1024 // this assigns 1024 to variable 1
System.out.println("var1 contains" + var1);
var2 = var1 / 2;
System.out.println("var2 contains var1 / 2: ");
System.out.println(var2);
}
}
[/code]
but
javac Example2
error: Class names, 'Example2', are only accepted if annotation processing
is explicitly requested
How does he fix this?
BTW The above compiles and runs fine on my Ubuntu system....
Regards,
Alf Stockton
|
|
|
|
|
The javac command takes the name of the source file, not the name of the class:
javac Example2.java
|
|
|
|
|
Thank you and the problem was Class rather than class.
Regards,
Alf Stockton
|
|
|
|
|
It is spelled class not Class.....
and all command lines should end with a ;
Regards,
Alf Stockton
|
|
|
|
|
there are not even commands needed - eclipse / netbeans should do the work.
greets
Torsten
I never finish anyth...
|
|
|
|
|
plz help me to get codes for capturing agroup of system desktop using a single server
|
|
|
|
|
Hello Friends
I am loading a image Using TextureLoader then I am setting its BoundaryModes too.
But i want to do tiling of that Image,I am having UScale value and Vscale value.
IS this possible with TextureCoordinate?
Any Idea?
Thanks In Advance
Regards
Yogesh
|
|
|
|
|
Hello Friends
I am using TextureLoader to load the Image then I am setting TextureMode.
Now,I want to change the size of texture.I want to make that texture bigger on my current object.Is there any different function for TextureAttribute to do that?
Please Advice Me.
Any Ideas??
Thanks In Advance.
Regards
Yogesh
TextureLoader textureLoader = new TextureLoader(textureImage, TextureLoader.GENERATE_MIPMAP);
currentAppearance.setTexture(textureLoader.getTexture());
TextureAttributes texAtt = new TextureAttributes();
texAtt.setTextureMode(TextureAttributes.ALLOW_BLEND_COLOR_READ);
currentAppearance.setTextureAttributes(texAtt);
|
|
|
|
|
I got one function of textureAttribute that is SetTextureTransform.
but what should b the value for tt.
As I am having U-scale and V-scale values but dont know how to apply that on this texture.
Any Ideas?
transform3D tt = new Transform3D();
texAtt.setTextureTransform(transform);
|
|
|
|
|
I Found one more function related to scale of textures but still I am not able to change the size.Plze Give some IDeas AnyOne.
I did like this now:
Transform3D transform = new Transform3D();
transform.setScale(2.0);
texAtt.setTextureTransform(transform);
Regards
Yogesh
|
|
|
|
|
I am just learning about the app montoring features available through JConsole. I am using jdk150_06 to monitor an app in development locally on a Windows PC. I set the property (-Dcom.sun.management.jmxremote) on the statup of my app jvm. I run JConsole, the JConsole comes up, sees the JVM, I connect to it and everything seems ok. I want to pull a heap dump of the app to look at in the Memory Analyzer plugin tool available in Eclipse 3.5. According to all the doco I see in JConsole I should see a "com.sun.management" MBean registered in which I can specify a location for the heap dump and generate one. However, I don't see a "com.sun.management" MBean in my JConsole.
Wondering if anyone has done this before? Am I looking for the wrong thing? Is it maybe my JDK version or something?
Any help is appreciated.
Thanks,
Troy
|
|
|
|