@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> so you cannot inherit in Coldfusion
<0> what are the downfalls/workarounds for that?
<0> in your opinion
<1> profXavier: no clue about coldfusion, except that it used to be "programming with tags, mixing layout and code".
<0> k
<0> thanks
<1> the latter being so impractical that i would never use coldfusion.
<2> Hi, anyone used a JSP outside of the container? Need to generate some HTML from a JSP but i don't always run it in a servlet container.
<3> I have a String variable containing chars having ASCii codes in the range 32 -> 255. I write that string to a file. When I read it, one char is not read correctly, why might that happen ?
<2> What char is mighly unbehaving?
<3> when writing it is char with ASCii code 128, when reading it is 63
<3> reading the whole line as a string, the char is 63, reading char by char, it is still 63 (as an information)
<3> mony chars behave like this, and when I read them, I still get 63, which is '?'
<4> est ce que quelqu'un peut m'aidez svp ?
<5> an absolute beginners question here, I'm thinking if I change a line from System.out.println("he... to System.out.println("He............ I need to recompile ?
<6> yes



<5> Zara: thanks
<6> np
<7> To be honest I think JVM checks if the file creation date of the .java file before it runs and if its outdated it recompiles the file automaticly.
<7> Maybe not the creation date but the last time the file was saved.
<7> I mean the .java file
<8> if (array == Arrays.sort(array))
<8> would that be valid?
<6> valid for what?
<6> If you are trying to check that the array is already sorted, no
<8> would it ever return false?
<8> oh
<8> ok
<6> no
<8> ah its cool
<8> i got a backup already..
<8> that i can check vs..
<8> unless theres a smarter method?
<6> Arrays.equals
<6> but it is usually a waste of time
<6> That is, why botther to see if the array is already sorted
<8> if the array is sorted
<8> it should be sorted in reverse order
<6> oh
<8> and same method is used for many arrays
<8> so i cant just keep track of changed with a simple boolean
<6> makes sense
<8> i could ofc send in a cl*** containing which array and if its changed..
<8> but it seems like overkill
<6> It would probably be faster to just run through the array and check that each value is greater than the preceding.
<6> If the arrays aren't very big, then it doesn't matter
<8> true..
<8> only problem is that i have a sorting exception
<8> where --- > all
<8> but go through until array[i] != ---
<8> then check next two values
<8> if a < b sort reverse
<8> yes?
<9> hi i got a JUnit question, i got to diffrent cl***es Car and Driver and have two files with tests CarTest and DriverTest. how can i execute both test cl***es at once?
<9> java junit.textui.TestRunner CarTest DriverTest dont work for me
<8> shouldnt file name be same as cl*** name?
<9> not for tests ibelvie since i can run the tests but only one at a time
<8> no idea then..
<6> sorry I was away
<6> raki: sounds right
<6> neg: Create a TestSuite that runs all the test
<8> ^Zara ok.. ill try it out..
<6> good luck
<9> but a TestSuite cant be auto generated from file listing right? i want to make a collection of them as a batch job
<6> using ant you can
<6> the junit task allows you to define a batchset which is a bunch of files to run
<9> how?
<9> im not using ant im using makefiles so all i need is a simpel command example and im on my way
<6> I quit using make for java projects a long time ago. Grab the source for the ant junit task and see how they do it
<9> ok thanks i look in to it
<9> so there is no simpel way to tell junit to do multipel tests at once , since its the last thing i need working and rewriting all my makefiles is a timekiller
<6> I would bet there is. That is why I ecommended the junit ant task because it does that very thing
<9> ok tahnks
<8> gah
<8> how do i do fireTableCellUpdated but for the whole Table
<8> nvm
<8> hmm



<8> when i use dialog.getSelectedFile().getAbsolutePath(); i get a string like "C:\Program\Lista\cl***es\LsApp2.list"
<8> but theres a problem using strings like that in windows or something right?
<8> Talden i bet u can answer this..
<8> :22:56 (raki) when i use dialog.getSelectedFile().getAbsolutePath(); i get a string like "C:\Program\Lista\cl***es\LsApp2.list"
<8> :23:12 (raki) but theres a problem using strings like that in windows or something right?
<8> is there a fast way of resolving this?
<1> hi talden
<10> raki - Why would there be a problem with that filename
<10> Hi there Clackwell
<8> it doesnt compile
<8> unless i change all \ to \\
<10> You said you received that String from a method call, not that it was a String literal
<8> aah, my bad..
<10> The compiler recognises the \ as an escape character. if you want to insert a \ into a String or char literal then you specify \\
<8> that string is later used with readFile(dialog.getSelectedFile().getAbsolutePath());
<8> ok,
<8> so i should write a method for that i guess?
<10> Wait until you use regular expressions (the regex parser also uses \ as an escape character so a literal \ in a regular expression p***ed as a String literal requires \\\\ ...
<10> raki - a method for what exactly?
<11> heh good example.
<12> Got to love Java.
<8> hmm
<10> raki - either you're p***ing a literal or you're not. If you are and want the literal to contain \ you will need to 'escape it' with an additional \
<12> All they had to do was be sensible and break backwards (read: retard) compatibility and allow something like /regex/
<10> That's not a programatic change, it's merely altering the literal in the source. eg public static final String DEFAULT_FILE = "C:\\this\\is\\a\\filename.txt"; (this results in the compiled string "C:\this\is\a\filename.txt")
<8> aah ill use replace
<8> right?
<10> raki - replace what... I no longer understand what you're trying to achieve.
<10> Make a test case and pastebin it.
<1> !testcase
<13> The SSCCE - Short, Self Contained, Correct (Compilable), Example: http://www.physci.org/codes/sscce.jsp (mirror: http://javafaq.mine.nu/lookup?364)
<8> i dont know how to express myself =)
<1> Talden: no worries, whatever cuts the bread ;)
<8> Talden, i want to do following readFile(dialog.getSelectedFile().getAbsolutePath()); .. public void readFile(String s) { .. BufferedReader in = new BufferedReader(new FileReader(filnamn)); .. }
<8> Talden, using final does that work when if i want to be able to change the filename?
<1> raki: the user might cancel the dialog...
<8> yes i have that covered
<1> the above does not indicate that, but ok
<1> http://www.youtube.com/watch?v=FncILxajmlw
<8> if (dialog.showOpenDialog(null) == JFileChoser.APPROVE_OPTION { readFile(dialog.getSelectedFile().getAbsolutePath()); }
<8> thats the line
<1> ah, ok
<10> raki - if you declare a field, variable or parameter as final it cannot be re***igned. Since String is immutable, no you would not be able to change the filename.
<8> thats what i thought..
<8> so, can explain to me how i would resolve it then Talden, if i want to be able to change filename?
<1> raki: put the filename into a variable? why are you doing gui programming while not knowing java basics?
<8> thats what im doing
<8> but since String filnamn contains "\" it gives me errors..
<1> more secret error messages?
<1> top secret ones?
<1> you are stating your interpretation of what happens. it is better to state what happens, what error you get exactly. in short: facts
<8> illegal escape character
<8> thought i said that earlier..
<8> hmm wait..
<8> im probably lying
<10> raki - String filename = "c:\\this\\..."; // no error there.
<10> Note that this is ONLY an issue with the String literal.
<10> If you want to change filename, don't use final. It's that simple. Seriously, you should not be doing any GUI programming when you have yet to learn the fundamentals of java. You do not learn to read by beginning with War and Peace.
<1> !testcase raki
<13> raki: The SSCCE - Short, Self Contained, Correct (Compilable), Example: http://www.physci.org/codes/sscce.jsp (mirror: http://javafaq.mine.nu/lookup?364)
<14> not to mention the time you'll save in the longer run if you first invest a little to grasp the basics.
<14> Hi guys; Talden, Clackwell, $others.
<1> hi lion :)
<1> see you later
<14> hmm, what a day... Being employed vs being self-employed truly needs getting used to :) But today my job for the first time got its share of Java needance (to run a few Dell remote-support applets) :)
<14> Clackwell: Well, Hi & Bye then :)
<15> How do I set my trails application to use a "real" database like MySQL?
<14> trails? On Java the best approach IMO would be a jdbc connector.
<14> So simply look into that framework you're using and check up on what they provide for jdbc, or specific database, connectivity.
<15> What would explain my trails app's ability to create new entries in the database, but when I stop the server and start it again, all the data is lost?
<15> which was why I was wondering about how to use MySQL
<14> sounds like an issue with commits. The framework documentation should explain as much though.
<8> Lion-O youve stated that already, and i thank u for ur opinion, either way im not deserting this current project.. once its done i will do what u have recommended..


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #java
or
Go to some related logs:

chocolatz
AdmV0rl0n
#linux
#linux
undernet linux story polarwolf
Ubuntu RPC clnt_create
haq alla
#php
/proc/filesystems suse 10.1 ntfs
the term for the hybrid offspring of a lion and tiger



Home  |  disclaimer  |  contact  |  submit quotes