203 Posted Topics
Re: Hello, ddanbe. I was playing with your code ... I'm not sure, that this is what are you looking for: [code=c#] this.AutoScroll = true; if (ColumnCount > cMaxCol) { CC = cMaxCol; RC = this.RowCount; ColScr = 0; } else if (RowCount > cMaxRow) { CC = this.ColumnCount; RC = … | |
Re: Just to add: you can use the alternative way (a bit longer, but still can be useful some day :) ). For the case, if you don't want to interrupt your prog when the user inputs the incorrect value. You can design a method, using [url=http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html]Class Character[/url]. This class contains … | |
Re: Hello, gallian99. I haven't heard about such standard functions :) I can offer two alternative ways for you: 1. Using reference types (like ArrayList). You'll able to add elements dynamically and get the actual size of your array. 2. Create your own structure/class, that will contain your array, the full … | |
Re: Hello, Allen. You close your [B]BufferedWriter bw[/B] in the cycle (when you are writing data into the file). So in the best case you'll have an empty file ... in worst - an exception. Just take it out of the cycle. | |
Re: This should help you: [url=http://www.codeproject.com/KB/dialog/mdiclientcontroller.aspx#Hiding the Scrollbars]Getting a "Handle" on the MDI Client[/url] | |
Re: [QUOTE] x = 1 N1 = x to x + 15 x = x + 15 N2 = x to x +15 ... [/QUOTE] The 16th file will be displayed on N1 and on N2. I suppose you need this correction: [inlinecode] x = [COLOR="Red"]0[/COLOR] N1 = x [COLOR="Red"]+ 1[/COLOR] … | |
Re: how about looking in MSDN for [url=http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.aspx]ComboBox Class[/url]? | |
Re: in your case it doesn't matter, which way you use to add 1. I suppose that you was talking about "+=" operator? Let's see: 1. [code=c#]Empleados.numeroemp++;[/code] increasing numeroemp by 1. 2. [code=c#]Empleados.numeroemp += 1;[/code] which is the short version of this: [code=c#]Empleados.numeroemp = Empleados.numeroemp + 1;[/code] 3. [code=c#]Empleados.numeroemp = + … | |
Re: You have mistake in word Entries in the 'RemoveEmptyEntires'. | |
Re: It also works proper with me, but have some thing, that you should look at: 1. You check Parent_Name 2 times. And second one is inside the first one. It looks like question: "Are you really sure that (Parent_Name != null)" ;P [code=c#] treeView1.Nodes.Clear(); if (Parent_Name != null) { [/code] … | |
Re: Hello, cVz. StreamReader.ReadToEnd method has this signature (taken from MSDN): [QUOTE]public override string ReadToEnd()[/QUOTE] The returning type is [B]string[/B]. Am I misunderstood something? | |
Re: What are you trying to do here: [code=c#] SqlConnection conn = new SqlConnection(); [/code] Here is an example for you: [url=http://www.jonasjohn.de/snippets/csharp/sql-connection-example.htm]SQL connection example[/url] | |
Re: I hope, this may help you: [url=http://books.google.com.ua/books?id=UPhrjggcTwwC&pg=PA355&lpg=PA355&dq=java+linkedstack+isfull&source=bl&ots=mKcXZrHuAB&sig=9UfF5qRYyjliq25ONNmqm-SZQxo&hl=ru&sa=X&oi=book_result&resnum=1&ct=result#PPA355,M1]Object-Oriented Data Structures Using Java[/url] | |
Re: Hello, hypocrisy. For keeping distinct numbers, you can use, for example [url=http://java.sun.com/j2se/1.5.0/docs/api/java/util/ArrayList.html]Class ArrayList<E>[/url]. This class contains method to check, if the list already contains given element. | |
Re: 1. Are you sure, that your example is correct [icode]2,15,4 which = 2,3,4[/icode] ... and not [B]16 = 3[/B]? 2. You don't check the case, when you get, for example 4,2,3. In that case your (x == 2) and (ex == 1), but it is still Straight. P.S. If the … | |
Re: This error caused by whitespace between '_' and 'minTemperature' here: [code=java]_ minTemperature= minTemperature;[/code] | |
Re: You can use [B]foreach[/B] cycle. E.g. like this: [code=c#] foreach(string fileName f in Directory.GetFiles("SomeDirectory")) { ... } [/code] | |
Re: Hello, gallian99. This may help you: [url=http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx]OpenFileDialog Class[/url] - that for case if you're not dropped it on your form. and this: [url=http://msdn.microsoft.com/en-us/library/aa984392(VS.71).aspx]Opening Files Using the OpenFileDialog Component[/url] - if it is on your form. | |
Re: Hello, javaman2. You have mistake in logic here: [code=java] if(((x==1)&&(cardSuit==0))&&((x==2)&&(cardSuit==0) )&&((x==3)&&(cardSuit==0))) [/code] All that expression contains only '&&' condition. So if a bit transform it, you are telling: do something, if that condition turns true [B](x==1) and (x==2) and (x==3) .... [/B] Also there are same mistakes in similar expressions. … | |
Re: Hello, llemes4011. Hm ... interesting task. Your problem here: [code=java] // If the number already appears in the row and the column, change the booleans to false to check again if(number.equals(theBoard[i][currentColumn])) legal[0]=false; if(number.equals(theBoard[currentRow][i])) legal[1]=false; [/code] Here you should check, whether your element is already appears in row and column (from … | |
Re: Just to add Ezzaral: you have interesting situation: 1. You declare a variable: [code=java]private static newTEST newTest;[/code] 2. Then you call this: [code=java]TUImain tui = new TUImain(newTest);[/code] what means, that you call the constructor and pass this variable into it as parameter. 3. In constructor you do this: [code=java]this.newTest = … | |
Re: or one more example placed here: [url]http://www.exampledepot.com/egs/java.io/GetFiles.html[/url] | |
Re: Hello, amgupt01 You can use this: [code=java] PrintWriter writer =new PrintWriter("yourfile"); writer.println("Line to print"); [/code] | |
Re: Hello, mrjoli021 I hope the Sun description of Runtime class help you: [url]http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html[/url] | |
Re: Hello, shubhang. You've asked: [QUOTE]pls help me with the logic of displaying it on the same line.[/QUOTE] Here is a few articles about positioning cursor in console application: [url]http://mindprod.com/jgloss/console.html[/url] [url]http://en.allexperts.com/q/Java-1046/java-positioning-cursor-console.htm[/url] [url]http://www.rgagnon.com/javadetails/java-0469.html[/url] Hope it can help :) | |
Re: Hello, Sandawg. Here is your mistake: you trying to take element of array, that not exists. you should use this [code=java] public static void printArray(int count) { for (int i = 0; i<count; i++ ) { System.out.print(pName[i]); ... } [/code] Also there is a couple recommendations to you (including about … | |
Re: beforehand, sorry for my english... :) I have some advices for you: 1. You have a lot of repeating code in your program. You should take out it to a method(s) and then call it... (also in doneBtn_Click method you have switch operator, that no matter what do this: amountTxtBx.Text … | |
Re: Here is link to understand Comparable Interface: [url]http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Comparable.html[/url] And here is a little help on binary search: [url]http://leepoint.net/notes-java/algorithms/searching/binarysearch.html[/url] | |
Re: I've tried to run your code ... it's working. Try to rebuild your project. | |
Re: beforehand, sorry for my english... for example, you can create a class Student where place info about student (such as ID, Name, Result1, Result2). To create an array of students, you can use (for example) ArrayList. It accept to add object in collection. I will appear you to list array. … | |
Re: Here some links, that can solve your problem: [url]http://www.hostitwise.com/java/japplet.html[/url] [url]http://www.roseindia.net/java/example/java/applet/[/url] and here is alternative decision (if you interested): [url]http://www.jython.org/applets/coordinates.html[/url] :) | |
Re: Hello, KPS You can try to look in class Operation... | |
Re: Hello, beforehand, sorry for my english... You can read your data into String, the split it by " ". And you'll have an array of symbols. To print it, you can use 2 cycles: (1st - from 0 to arrayLength; 2nd- from 0 to (columCount and arrayLength if you can … | |
Re: Looke here: [url]http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=624210&SiteID=1[/url] | |
Re: Hello, deven1974 Lets start: 1. Illegal use of data and datatypes: [code=java] public void remove(E data) { E.data = null; if (head != null) temp = head.data; head = head.next; return temp; } [/code] It is equal, if you write this [code=java] String s; String.s = null; [/code] 2. You … | |
Re: First: startSky != "snowy" and startSky != "sunny". Use method equals to campare stings. Maybe it will be better for you to use enum instead strings "sunny", "snowy" etc. In setSky method, when you get an error, you don't set the skyCondition. | |
Re: It doesn't work because you compare strings using "==". Try this: [code=java] if(sval.equals(arr[pos])) [/code] | |
Re: Hello, lone_emu: At first, to use your static methods, you don't have to create an object of class Palindrome. So this: [code=java] Palindrome pal = new Palindrome(); [/code] is not wanted here. To replace chars in the string (not using replace function) you can convert your string to char array, … | |
Re: Here is a lot of information about binary trees with code eaxamples: [url]http://cslibrary.stanford.edu/110/BinaryTrees.html[/url] [url]http://www.java-tips.org/java-se-tips/java.lang/binary-search-tree-implementation-in-java.html[/url] [url]http://www.cs.mcgill.ca/~cs251/OldCourses/1997/topic9/[/url] and here about spell checking using binary trees: [url]http://www.cs.uga.edu/~gtb/1302/Project6/[/url] [url]http://oopweb.com/Algorithms/Documents/PLDS210/Volume/opt_bin.html[/url] | |
Re: Here is part of description of this function, given by java help: public boolean renameTo([B]File[/B] dest) It asks a File as parameter, but you give String to it. | |
Re: Correct me, if I'm wrong: 1. You creating new "clock" and setting it to 0. [code=java] Time application = new Time(); application.TimeTest(0, 0, 0); [/code] 2. Then while setting the hours creating 2 more clocks. [code=java] Time application2 = new Time(); application2.setHours(input.nextInt()); [/code] and [code=java] Time app = new Time(); … | |
Re: Here is something, that can help you: [url]http://www.java2s.com/Code/JavaAPI/java.util/ScanneruseDelimiterStringpattern.htm[/url] | |
Re: Here is something: Introduction to the JavaMail API: [url]http://archive.devx.com/upload/free/bkchapters/prowap/40441303.asp[/url] and here you can find code, provided by Sun: [url]http://java.sun.com/products/javamail/downloads/[/url] | |
Hello everyone, beforehand, sorry for my english... I have to do client - server application. They must interact, using classes URL, URLConnection. I understand, how to send data to server. But I can not realize server work. The common algorithm of server is: 1. Start. 2. Wait for connection. 3. … | |
Re: You are compering 2 different types String accountNum and int accountNumber[0]. This is interesting, that you run it without troubles :) As I understand, it must be like that: f(accountNum2==bank.accountNumber[0]) | |
Re: Beforehand, sorry for my english... The || - is short version of |. I.e. if you have simple condition like this: (a||b) then, there is no difference, what operator to use. In case with complex condition: ((a==b)||(c==d)||(e==f)) will be difference. The || operator will be checking the conditions, untill it … | |
Re: How about splitting like this: string[] s1 = s.Split(new string[]{".mp3"} ,StringSplitOptions.RemoveEmptyEntries); and then Split('-') ? | |
Re: Beforehand I'm sorry for my English... I don't know any way to dynamically create variable, but I can offer some alternatives: 1. Use Dictionary 2. Create class variable dynamicly | |
Re: Don't know, how fix it, but I found something to turn off function, that calls the exception (and a little info about that) ... [url]http://msdn.microsoft.com/en-us/library/d21c150d.aspx[/url] | |
Re: What you think about "CellEndEdit" event? |
The End.