- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
89 Posted Topics
Re: it seems that you're trying to connect on the http port of your jboss, instead of rmi connection ? by default, rmi binds on port 1099. maybe you should try def serverUrl = 'service:jmx:rmi:///jndi/rmi://localhost/jmxrmi' | |
Re: you may use the Timer class, from the threading module : import sys, threading threading.Timer(5.0, lambda : sys.exit(0)).start() will exit your program after 5 seconds | |
Re: Well it depends : 1) How much time you have for your project ? 2) Do you want to practice your knowledge (an app that uses jdbc, swing, networking, etc..) or use a topic you don't know about ? | |
![]() | Re: something like ls | grep ? | sed -e s/\?/\\\\?/ | xargs rm might do the trick : it list the badly named files, escapes the question mark, before passing the files to the rm command. ![]() |
Re: I'd rather use the id(1) command : if id -u $1 then echo "user $1 exists" else echo "user $1 does not exist" exit 1 fi | |
Re: Well, it seems that the last equation is useless, because the first one already means that n - (a/b)*(c/d) == 0 .. The other thing is that there is no condition on n, so we just have to find a,b,c and d that match equations 2,3 and 4 - we … | |
Re: Well, Netbeans seems to be the standard, but as I'm an Eclipse user, I had to occasion to give a try to the [WindowBuilder] (http://www.eclipse.org/windowbuilder/ ) Eclipse plugin, and I think it does the job pretty well. | |
Re: with html you can setup a link to be opened in a new tab this way : <a href="track.jsp?.." target="_new"> <img src="url_of_image"></img> </a> | |
Re: In java, objects, arrays and strings are always passed by reference. Only primitive types (byte, char, int, long) are passed by value. | |
Re: [CODE] import javax.imageio.ImageIO; ... File file = new File("myImage.png"); BufferedImage img = ImageIO.read(file); int w = img.getWidth(); int h = img.getHeight(); [/CODE] | |
Re: You may run any external program from java using Runtime.getRuntime().exec(). The notepad executable is located in "%windir%\notepad.exe" | |
I am trying to use Qt 4.0 with devCpp. I have a weird error when i try to compile this simple code : [code] #include <QtGui/QApplication> int main(int argc, char *argv[]) { QApplication qApp(argc, argv); return qApp.exec(); } [/code] The error is : [code] 10 : no matching function for … | |
Re: [code] x=0 def static_num() : global x x=x+1 return x for i in range(0,10) : print static_num [/code] | |
Re: You just cannot control the port so precisely that you can switch a pin on or off as you like. If you want to use your computer as a switch, you should had some additional electronics behind the port. The problem is that any information sent to the port appears … | |
Re: when you write '-1', you do not write the VALUE -1, but the character string { '-', '1' } your program will not stop, except if you type ctrl+D under linux, or ctrl+Z+enter under windows. | |
Re: please post java-related question in the java forum | |
Re: the hours and hourlyRate variables are declared as character strings, you cannot multiply them. You have to [B]convert them first[/B] by parsing them using the Double.parseDouble() method. [CODE] double grossPay = Double.parseDouble(hours) * Double.parseDouble(hourlyRate); [/CODE] but be careful if the strings are empty, because your code will crash in this … | |
Re: 1 ) in your main method create a new Factorial object 2) put the code that reads the input from the user in the main method 3) in the Factorial constructor, store the value as a property of your object [CODE]this.number = number[/CODE] 4) put the code that computes the … | |
Re: Unfortunately for you, JMF is a totally obsolete and unmaintened library, you probably won't be able to make it work properly on recent hardware. If I were you, I'd try to use another library, and the [URL="http://code.google.com/p/vlcj/"]java bindings for libVLC[/URL] would be my choice, as libVLC is widely used and … | |
Re: regular expressions could help you to check and then parse your string : [CODE]//a name followed by 4 sequences of 4 numbers, and an adress. Pattern p = Pattern.compile("^(.+) ([0-9]{4})-([0-9]{4})-([0-9]{4})-([0-9]{4}) (.+)$"); Matcher m = p.matcher(inputString); if(m.matches){ String name = m.group(1); int a0 = Integer.parseInt(m.group(2)); int a1 = Integer.parseInt(m.group(3)); int a2 … | |
Re: I you managed to use an object to store your data for each diver, You might use an ArrayList to store them, and then iterate over the list when you will do the computations you marked in red : public int countByCity(String city, List<Data> list){ int i = 0; for(Data … | |
Re: well it depends on what you want to do, learning how to use a compression library, like libzip (in this case a book may not be necessary), or learn how data compression algorithms work.. (in this case you'll also need alka-selzer tablets) | |
Re: Hie, wxmsw28 is the name of the wxWidget 2.8 library for window... which is not included by default. you may download it from [URL="http://sourceforge.net/projects/wxwindows/files/wxMSW/2.8.10/wxMSW-2.8.10.zip/download"]here[/URL]. | |
Re: Hi Vishal : Check this link : [URL="http://cmusphinx.sourceforge.net/sphinx4/"]http://cmusphinx.sourceforge.net/sphinx4/[/URL] | |
Re: [code] FileInputStream fis = new FileInputStream("d:/fonts/lucida.ttf"); Font lucida = Font.createFont(Font.TRUETYPE_FONT, fis); fis.close(); [/code] | |
Re: Hi, You can fetch the html page by using the URL class, and then parse the resulting html as you would do with a normal file: [code] URL url = new URL("http://www.google.co.uk/q=daniweb"); InputStream is = url.openStream(); [/code] One you got the stream, you can read it into a string : … | |
Re: what kind of professor teaches his students how to write a fork bomb !? | |
Re: [quote]Please dont suggest gethostbyname function. Cant use that function as its not supported in my JVM.[/quote] gethostbbyname is available on every decent platforms, I don't see why you wouldn't use it ! Actually, I don't understand the purpose of your code : you do not provide any information about the … | |
Re: I suggest you have a look at [URL="http://www.efg2.com/Lab/Library/ImageProcessing/Algorithms.htm"]this page[/URL] | |
Re: as your applet is run inside a web browser, what about using the browser's cookie ? The advantage is that you won't need any server-side code. Here is a [URL="http://www.rgagnon.com/javadetails/java-0180.html"]snippet[/URL] that explains how it can be done. | |
Re: Maps do not sum the values as you add entries, the old value is just replaced by the new one when you call put() for the same key. you'll have to compute the sums by yourself : [CODE] Integer oldWage = propIdValues.get(name); oldWage = oldWage == null ? 0 : … | |
Re: 1. Don't fall in the [URL="http://en.wikipedia.org/wiki/Magic_pushbutton"]magic pushButton[/URL] mistake, try to separate gui and behavior. 2. How is RESULT_NEAREST variable declared ? 3. have you tried to debug, or just print out the value of RESULT_NEAREST after you compute it, let's say line 19 in your first file ? | |
Re: Please give additional informations about your problem so someone will be able to help you : target OS, compiler, libraries used, functionnal domain, program's goal, code sample, etc. | |
| |
Re: ..And what ? the 'crystal' class has to be public if you want to use it as an applet [code] public class crystal { ... [/code] (and please, respect naming conventions, such as uppercase letters for class names, etc..) | |
Re: Did you try to remove the 'as' keywords, some sql engines support this. [code=sql] SELECT uid User,fName First,lName Last FROM table [/code] | |
Re: are you kidding ? Maybe you could start by explaining what they actually do, and maybe the kind of error you have. Then, if it is not java-related (eventhough it seems that the first script is generated by gwt), you should post your question on the "Javascript/DHTML/Ajax" forum. | |
Re: if you want to use X objects as keys in hashmaps, you don't have to implement Compareable (that's what you do for treemaps). In hashmaps, the keys are considered equal according to the values of their hahcodes : [CODE=java] class X { private int a, b; ... @Override public int … | |
Re: You may also have a look to the implementation of the Boost C++ library : [URL="http://www.boost.org/doc/libs/1_35_0/doc/html/hash.html"] http://www.boost.org/doc/libs/1_35_0/doc/html/hash.html[/URL] | |
Re: [code]c= firstNameAsEntered.charAt(0)[/code] This will surely fail if the character string is empty ... first check the length of the string, before translating the first letter into uppercase, and maybe ask yourself if the string may be null ... | |
Is there a simple way for writing ActiveX components with minGW ? (ie without using activeX or ATL) ? I have to write an activeX but a don't want a buy a visual studio licence just for this <:) | |
Re: When you use win32-specific code, you have to know about the different windows API's specific symbol. Maybe you forgot to include the right header file, at the beginning: [code] #include <windows.h> [/code] | |
Re: Hie, 1) please try to ask more a more precize question next time 2) MAC address and MAC Frames are two different things. The Media Access Control protocol (IEEE 802.x) defines a way for defining, delimiting and adressing logical frames for other protocols (Ethernet, wifi, token ring, etc...) . It … | |
Re: [QUOTE=joshilay]can anyone tell me what are pointers to function ??? and how are they implemented ??[/QUOTE] in C, functions are defined just like variable. The adress of a function can be assimiled to its adress in memory, so the following code is valid : [code] #include <stdio.h> void something() { … | |
Hie, I'm trying to get a code in a DLL runned each time a program is launched. 1) I have put this value in the registery key : [code] HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows="D:\myDLL.dll" [/code] 2) [code] BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ , DWORD reason /* Reason this … | |
Re: [QUOTE=joshilay]can anyone please tell me why following output is generated ... int i=10; printf(" %d ",i++/i); // output=0 i=10; printf("%d",i/++i); //output=1 i=10; printf("%d ",i++/++i); //output =0 i=10; printf("%d",++i/i); //output=1[/QUOTE] euhh.. you might be using a broken computer In all the cases, your code always prints 1. 1) i++/i = 10/10, … |
The End.