comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Using hobby source code in your job ? - 6 messages, 6 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a60dfe865a7807c4 * Invalid cursor state - Am I completely stupid? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/780f6a3d7ad2d49a * NetBeans 4.0 totally blows. What other IDE's are available? - 6 messages, 5 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cd46bbd76ba757ee * javax.comm - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4b1823ed49da2e4b * Why does Tomcat need a network connection for localhost? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/db8e87bcb33ef105 * can't connect to remote host - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9034767efdc4ba0e * Unable to establish a socket connection - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3db1070c05ec0b49 * deep copy quesiton - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/757fd06eb0970170 * comp.lang.java.{help,programmer} - what they're for (mini-FAQ 2004-10-08) - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2235cf41e4c4f22d * Struts and mapped property - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/737ddf3578199404 * OT: Valid filenames on operating systems - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/938eed95c48901c5 * jsp servlet code seperation confusion - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e71d75f30f442d21 * Beginning EJB - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d49babfdb472b21c ============================================================================== TOPIC: Using hobby source code in your job ? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a60dfe865a7807c4 ============================================================================== == 1 of 6 == Date: Fri, Dec 3 2004 8:40 pm From: "Nobody" Some responses make good points, but I have PERSONAL experience with this. I am a Windows developer and over the years have compiled a GUI library with a lot of custom controls. Now keep in mind we are talking HOBBY code and not code that I intend to sell because if there is money involved, chances are it will get ugly. Now my GUI library... I have worked on it during college (when I was not working for anyone), and at several jobs... either job related or to kill time or both. Further comments are inlined: "Skybuck Flying" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ok, > > Suppose you have programmed a lot of "re-useable" source code. > > Suppose you're considering taking a programming job in the same language > as > your hobby programming language. > > The question rises: > > 1. Do you use your hobby source code in your job ? Yes. If I need a specific control that I already have in my library, I have no intention of re-writing it. That would be f!#$ken stupid and a waste of my time. I could copy and past just the parts that I need, but my library is too interwoven for that. > This could create problems ?!? It can only cause you problems if you start to rock the boat... > 2. For example without thinking about it you might loose the rights to > your > hobby source code. I have worked on it at 3 jobs now... sometimes enhancing it for the company, sometimes goofing off. Technically 3 companies now own the code because I worked on it at work. Do any of the companies know that I have used code from previous jobs or am using "their" code commercially in other products? Nope... Don't rock the boat as I said... no one is going to go around comparing which DLLs a product installs. The fact that two of the companies are now pretty much dead helps me, but if I switch jobs, I would probably continue to take the source code around with me. > So what would you do ? > I myself see a number of possiblities: > > 1. Don't even take a job in the same programming language as your hobby. Thats dumb.. my hobby language is C++ as is my job. I'm not gonna learn another language. > 2. Don't even use your hobby source code. As I said above... waste of my time/life if I don't. I'm not gonna re-invent the wheel. > 3. In case you do use it, give the company a license to use your compiled > source, they probably won't like that. Now they won't. The first company I used this code for, I tried talking to my manager about licensing/ownership and he got all huffy about it saying he "knew I worked on it while goofing off" so technically they owned it... whatever... now they own a COPY of it. Most companies have a clause in the contract saying if you work on it at work, they own it and trying to talk to them about it will typically put you under the spot light. > 4. Give the company a license to use your source code. Again, no company will "license" or "buy" your code.. suggesting this will have the managers asking you why you aren't a team player or doing something good for the company. > 5. "Open Source" your code... like gnu license. > > 6. Make your source code freeware. I wasn't really concerned about money, etc. I was just concerned about maintaining ownership of the code. The first company didn't even like that idea. > Again I ask... which alternative would you use... is there another > alternative ? > > In short what would you do ? > BOTTOM LINE.... If you don't intend to sell it, just shut up and use it. Asking the company/manager about it will just put you under the spot light. Is this good LEGAL advice? Probably not. Is this good REAL WORLD advice.. Probably YES. A company will tell you: 1) either give it to us fully, or 2) don't use it here and there wont be a problem. Either response is not good in my book and they know it... So just shut up and quietly use it. Now my situation may also be different since my GUI library is "general". Ie.. I am not working for a GUI library company. Just writing an application using my GUI library. Now can any of the 3 companies sue/fire me? Well, yeah, they probably could. I have a house and a BMW and cash in the bank, so I have assets. Am I worried that one of the companies would sue me/fire me? Hell no. Like I said, I shut up. I don't go around telling people that this is code I wrote outside of work, and GUIs suffeciently change over time where even though the underlying code is the same, it looks different enough. But if they did a file/source compare, well, then its obviously the same code. Don't rock the boat.... just keep a don't ask/don't tell policy. == 2 of 6 == Date: Fri, Dec 3 2004 8:48 pm From: Keith Thompson This entire discussion is off-topic in comp.lang.c, where I'm reading it, and probably in all the other newsgroups to which it's posted. "E. Robert Tisdale" <[EMAIL PROTECTED]> writes: [...] > You *must* copyright your code. > Usually, it is sufficient to write something like > > Copyright 2004 Skybuck Flying > > somewhere near the top of each source file. My understanding is that any written work is automatically copyrighted as soon as it's set down in tangible form. I'm not sure what, if any, additional legal protection is added by using a copyright header. > Your employer cannot compel you to transfer the copyright > for code that you wrote on your own time > or code that you wrote for another employer. I'm not convinced that that's accurate. It's at least partly a matter of whatever contractual arrangement you have with your employer. There are some things your employer can tell you to do, with the threat of firing you (or refusing to hire you in the first place) if you fail to do it. I don't know whether that includes telling you to transfer the copyright for code that you wrote on your own time. Bottom line, ERT is not a lawyer, and neither am I. I strongly recommend not depending on either of us for legal advice. If you insist on seeking legal advice from Usenet, at least post in a newsgroup where your question is topical. The misc.legal.computing newsgroup looks promising based on its name, but I know nothing more about it. -- Keith Thompson (The_Other_Keith) [EMAIL PROTECTED] <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> We must do something. This is something. Therefore, we must do this. == 3 of 6 == Date: Fri, Dec 3 2004 9:12 pm From: "E. Robert Tisdale" Keith Thompson wrote: > This entire discussion is off-topic in comp.lang.c, where I'm reading > it, and probably in all the other newsgroups to which it's posted. > > E. Robert Tisdale writes: > [...] > >>You *must* copyright your code. >>Usually, it is sufficient to write something like >> >> Copyright 2004 Skybuck Flying >> >>somewhere near the top of each source file. > > My understanding is that any written work > is automatically copyrighted as soon as it's set down in tangible form. It probably is but how does a judge and jury determine that the copyright belongs to you and not someone else? > I'm not sure what, if any, additional legal protection is added > by using a copyright header. It's evidence that you claimed the copyright at some point in time. >>Your employer cannot compel you to transfer the copyright >>for code that you wrote on your own time >>or code that you wrote for another employer. > > I'm not convinced that that's accurate. It's at least partly a matter > of whatever contractual arrangement you have with your employer. No legal contractual agreement can compel you to help your new employer steal code that you wrote for a former employer. > There are some things your employer can tell you to do, > with the threat of firing you > (or refusing to hire you in the first place) > if you fail to do it. > I don't know whether that includes telling you > to transfer the copyright for code that you wrote on your own time. If you agree to such a transfer before you are hired, the court will probably assume that your decision was voluntary. If they try to do so after you are employed, you can claim duress and the transfer is nullified. > Bottom line, ERT is not a lawyer, and neither am I. > I strongly recommend not depending on either of us for legal advice. I agree. See a lawyer who is expert in computer law. > > If you insist on seeking legal advice from Usenet, > at least post in a newsgroup where your question is topical. > The misc.legal.computing newsgroup looks promising based on its name, > but I know nothing more about it. == 4 of 6 == Date: Sat, Dec 4 2004 4:03 am From: [EMAIL PROTECTED] (Jerry Coffin) Keith Thompson <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... [ ... ] > My understanding is that any written work is automatically copyrighted > as soon as it's set down in tangible form. I'm not sure what, if any, > additional legal protection is added by using a copyright header. At least in those portions of the world that follow the "usual" international copyright laws (i.e. the Berne Convention) I don't believe it should make any difference at all. Under these laws, you're correct: the work is protected under copyright until or unless you specify otherwise. At least in the countries of which I'm aware, the next step beyond that would be to register the copyright. This often affects what happens when/if your copyright is violated. With an unregistered copyright, you can typically only stop the violation. With a registered copyright you can also recover monetary damages. If the OP is in the US, he might want to look at: http://www.copyright.gov/circs/circ1.html for more authoritative information on copyrights. I'd presume most other countries have similar sites, but since I didn't see the OP's post, I'm not sure which would apply. > I'm not convinced that that's accurate. It's at least partly a matter > of whatever contractual arrangement you have with your employer. This would fall under contract law. The Berne Convention provides relative uniformity of copyright laws, but no such thing has happened with contract law. It varies widely from one country to another, and often even within a country (e.g. in the US, contracts are governed (at least primarily) by state law). Of course, the usual disclaimers apply: I'm not an attorney and nothing I say should be construed as legal advice. -- Later, Jerry. The universe is a figment of its own imagination. == 5 of 6 == Date: Sat, Dec 4 2004 4:09 am From: "Maarten Wiltink" "Nobody" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [...] >> 1. Do you use your hobby source code in your job ? > > Yes. If I need a specific control that I already have in my library, > I have no intention of re-writing it. That would be f!#$ken stupid > and a waste of my time. I could copy and past just the parts that I > need, but my library is too interwoven for that. The biggest waste is that of company money. They are, after all, paying for my time. If done work redone is what they want, they can have it for all I care. >> This could create problems ?!? > > It can only cause you problems if you start to rock the boat... > <and more along this line> This is a pragmatist's viewpoint. An extreme pragmatist. Not everything you will probably get away with is ethical. A company hiring a programmer is inherently buying access to _knowledge_. As a programmer myself, I see little enough difference between what's in my head and what's on my (home) harddisk. They can have the use, but not the ownership, of both. I have been careful in my last four jobs to have in my contract that anything done on my own time that is not directly related to however the company makes its money, is none of their business. If I write a game on my own time, it's mine. If I have a good idea how to solve a work problem, of course it's theirs. If it makes them _really_ big money, they would of course do well to acknowlege it and motivate me to have more ideas like that. Groetjes, Maarten Wiltink == 6 of 6 == Date: Sat, Dec 4 2004 4:55 am From: "Stephen Sprunk" "E. Robert Tisdale" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Keith Thompson wrote: >> My understanding is that any written work >> is automatically copyrighted as soon as it's set down in tangible form. > > It probably is but how does a judge and jury determine > that the copyright belongs to you and not someone else? Article 3 of the Berne Convention states that, at least for citizens of member countries, all works by an author are protected whether published or not. Article 15 states that, "in the absence of proof to the contrary, ... it shall be sufficient for [the author's] name to appear on the work in the usual manner." >> I'm not sure what, if any, additional legal protection is added >> by using a copyright header. > > It's evidence that you claimed the copyright at some point in time. It's prima facie evidence; once someone provides evidence that you are not the author, what name is on the work is irrelevant. >>>Your employer cannot compel you to transfer the copyright >>>for code that you wrote on your own time >>>or code that you wrote for another employer. >> >> I'm not convinced that that's accurate. It's at least partly a matter >> of whatever contractual arrangement you have with your employer. > > No legal contractual agreement > can compel you to help your new employer steal code > that you wrote for a former employer. Obviously a contract cannot compel you to violate the copyright of a former employer. However, if the code is yours (not a work for hire), you can certainly by compelled by contract to hand all of your copyrights over to someone. In fact, that seems to be a standard part of most employment contracts these days. Specifically, you must typically name all works that you are _not_ handing over. That makes it difficult to exclude future works, but there is at least one creative solution to that. S -- Stephen Sprunk "God does not play dice." --Albert Einstein CCIE #3723 "God is an inveterate gambler, and He throws the K5SSS dice at every possible opportunity." --Stephen Hawking ============================================================================== TOPIC: Invalid cursor state - Am I completely stupid? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/780f6a3d7ad2d49a ============================================================================== == 1 of 1 == Date: Fri, Dec 3 2004 8:45 pm From: [EMAIL PROTECTED] (Kyle) Yes, a connection is successfully made, and the query executes successfully as I can read the ResultSetMetaData object and indeed, the column names and number of columns are correct in the ResultSetMetaData object. The rs.next() method returns true and then I get the "Invalid Cursor State" error when calling the .getString or .getInt methods. Same error when trying this against both Access and SQLServer databases. Driving me cuh-razy. "Ann" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Did you remember to do the setup stuff using "ODBC Data Source > Administrator" > to map the file to a DSN? ============================================================================== TOPIC: NetBeans 4.0 totally blows. What other IDE's are available? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cd46bbd76ba757ee ============================================================================== == 1 of 6 == Date: Fri, Dec 3 2004 8:20 pm From: Steve xarax wrote: > Subject line says it all. NetBeans 4.0 is a > total disaster. I need something else that is > free. > > You get what you pay for. Visual Slickedit is it for Java and dozens of other things, but it cost $$$. It is worth every penny though. Steve -- Be A Healthy Vegan Or Vegetarian http://www.geocities.com/beforewisdom/Veg/healthyVeg.html Steve's Home Page http://www.geocities.com/beforewisdom/ "The great American thought trap: It is not real unless it can be seen on television or bought in a shopping mall" == 2 of 6 == Date: Sat, Dec 4 2004 1:24 am From: Thomas Kellerer Andrew Thompson wrote on 04.12.2004 09:09: > Unfortunately, I don't know of any IDE's that suck, > but for a lighterweight editor you might try TextPad. > (OK.. it is shareware, but close to free) > if we are talking about pure editors I would recommend PSPad (www.pspad.com) completely free and as programmer's editor better then TextPad Thomas == 3 of 6 == Date: Sat, Dec 4 2004 12:09 am From: Andrew Thompson On Fri, 03 Dec 2004 23:08:27 GMT, xarax wrote: Please repeat the gist of the subject in the body.. > Re: NetBeans 4.0 totally blows. What other IDE's are available? c.l.j.s-t is -> thataway <http://www.physci.org/codes/javafaq.jsp#cljso> > Subject line says it all. Sure. You want an IDE that sucks, rather than blows? >..NetBeans 4.0 is a > total disaster. I need something else that is > free. Unfortunately, I don't know of any IDE's that suck, but for a lighterweight editor you might try TextPad. (OK.. it is shareware, but close to free) -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane == 4 of 6 == Date: Sat, Dec 4 2004 2:05 am From: Andrew Thompson On Sat, 04 Dec 2004 10:24:10 +0100, Thomas Kellerer wrote: > Andrew Thompson wrote on 04.12.2004 09:09: >> Unfortunately, I don't know of any IDE's that suck, >> but for a lighterweight editor you might try TextPad. >> (OK.. it is shareware, but close to free) >> > if we are talking about pure editors (shrugs vaguely) Define 'pure', define 'integrated'/'development'.. TextPad will also compile and launch from within the editor. (Woohoo) >..I would recommend PSPad > (www.pspad.com) completely free and as programmer's editor better then TextPad Thanks. I might check it out. BTW - Does it provide 'suck' as standard or as a free plug-in? [ Better remain on-topic here. ;-) ] -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane == 5 of 6 == Date: Sat, Dec 4 2004 4:58 am From: IchBin xarax wrote: > Subject line says it all. NetBeans 4.0 is a > total disaster. I need something else that is > free. > > Depends on what you want to do... Clean and very efficient: jGRASP, http://www.jgrasp.org/index.html else Eclipse, http://www.eclipse.org/ or JDeveloper, http://www.oracle.com/technology/products/jdev/index.html -- Thanks in Advance... IchBin __________________________________________________________________________ 'The meeting of two personalities is like the contact of two chemical substances: if there is any reaction, both are transformed.' - Carl Gustav Jung, (1875-1961), psychiatrist and psychologist == 6 of 6 == Date: Sat, Dec 4 2004 5:14 am From: "xarax" "Thomas Kellerer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > xarax wrote on 04.12.2004 00:08: > > > Subject line says it all. NetBeans 4.0 is a > > total disaster. I need something else that is > > free. > > > > > Use NetBeans 3.6 :) I had to go back to 3.6 temporarily, but it doesn't understand J2SE 5.0. If you have anything in NB 3.6 projects that is more complicated than "Hello World!", then migrating to 4.0 is a nightmare and impossible. They changed the whole project paradigm into a braindead disaster. ============================================================================== TOPIC: javax.comm http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4b1823ed49da2e4b ============================================================================== == 1 of 1 == Date: Fri, Dec 3 2004 10:08 pm From: Knute Johnson lin shen wrote: > The reader I'm trying to control is connected to the host through rs232. > Could you give me a pointer to where I can get some example code that > controls a reasonablly complex serial device using javax.comm package? > > BTW, is there any plan to add USB/ethernet capability to javax.comm? > > thanks > > "Knute Johnson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>lin shen wrote: >> >>>Has anyone out there tried to use javax.comm to communicate with a rfid >>>reader? >>> >>>lin >>> >>> >> >>No, but I've gotten lots of other serial devices to work. I've never >>heard of any successful parallel interface projects though. >> >>-- >> >>Knute Johnson >>email s/nospam/knute/ > > > I don't have any examples that I can give you but why don't you post the RFID reader docs and the code you've got so far and maybe we can help you out. -- Knute Johnson email s/nospam/knute/ ============================================================================== TOPIC: Why does Tomcat need a network connection for localhost? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/db8e87bcb33ef105 ============================================================================== == 1 of 1 == Date: Sat, Dec 4 2004 12:36 am From: marcus Wow -- did you really post local URL's in an attempt to get an answer? On the one hand, I did not know tomcat was running on my system (without the monitor), so that's cool. There are issues with your use of words like "work" and "connected" and "need". Obviously tomcat does not "need" a "connection" to "work", because the first URL (reportedly) "works". So Y'all's barking up the wrong skirt. It is possible your "browser" is caching your "servlet" which you moved or erased, and won't look for the cache'd version if you are offline. I have not seen this specific behavior but it would not surprise me. Old laptop? IE 5? Win 98? External USB modem? (Without the modem drivers loaded, older versions of window's won't build a TCP/IP stack so some browser features are disabled -- funky stuff like that) Try including details like, hmm, OS, browser, and error message for more helpful advise. javaguy_in_wheaton wrote: > Or maybe I don't have it cooked right. > > When developing on my laptop (Tomcat 5.5.4, Fedora Core 3) I don't > always have a network connection. > > http://localhost:8080/servlets-examples/index.html -- always works, > whether connected to internet or not. > http://localhost:8080/MyFirst/index.html -- only works when I'm > connected to the internet. > > My $CATALINA_HOST/conf/servlet.xml and web.xml are stock > (as-delivered). XML validation is turned *off* in there. > > Any ideas? > > TIA, > Jerome. ============================================================================== TOPIC: can't connect to remote host http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9034767efdc4ba0e ============================================================================== == 1 of 1 == Date: Sat, Dec 4 2004 12:25 am From: Andrew Thompson On 3 Dec 2004 15:01:42 -0800, Sid wrote: > I have a client/server program in which client lets user input two > numbers and the server adds the numbers and returns the sum to client. > > the problems I am having are: You are having some problems even before your code, let's get those sorted first. > 1. client is not able to connect to remote server. Fails how? What happens, are exceptions thrown, what exceptions? <http://www.physci.org/codes/javafaq.jsp#exact> >....it is only connecting to local host. Also, ask a specific question. <http://www.physci.org/codes/javafaq.jsp#specific> (One of the aspects of asking a smart question is not to forget to *ask* an actual question) ... > I am attaching my code. Tips for example.. Indent code lines with spaces, it is easier to read (but still keep them short). Further tips on the example. <http://www.physci.org/codes/sscce.jsp> > I am new to java and probably don't know much. > 'shall greatly appreciate your help. You are posting to the wrong group. The best group for those starting Java can be found here.. <http://www.physci.org/codes/javafaq.jsp#cljh> See to those matters in a new post to c.l.j.help (and I suggest you deal with them in separate threads) and you will probably get more and better help. HTH -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane ============================================================================== TOPIC: Unable to establish a socket connection http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3db1070c05ec0b49 ============================================================================== == 1 of 1 == Date: Sat, Dec 4 2004 12:46 am From: Andrew Thompson On 3 Dec 2004 14:07:43 -0800, S J Rulison wrote: I see that you are posting through Google ..S J. (what do we call you?) Can I ask you to please quote a *little* of what you are replying to, to give a context to your replies. Look carefully at the way that the others in this thread are replying to you. A little of what you said, then a comment in reply. > Okay. Here is the revised source code w/o the tabs and the results. Okay, now I am a little confused. Your results tell us a little more than we knew, but they are *not* what I was expecting. ... > System.out.println("Check point 1a"); > System.out.println( "Code Base: '" > + getCodeBase() + "'" ); Your Stacktrace is indicating an error in this line *as well*. That was not the behaviour I was observing here. (I got a file path for codebase and '' for host.) .. > Check point 1a > java.lang.NullPointerException > at java.applet.Applet.getCodeBase(Unknown Source) ...hmmmm. What is your exact (simple) HTML in the web page? Either post it vebatim or link to (either it or a copy of) it on the web. -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane ============================================================================== TOPIC: deep copy quesiton http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/757fd06eb0970170 ============================================================================== == 1 of 1 == Date: Sat, Dec 4 2004 12:09 am From: "charely" > [EMAIL PROTECTED] (Yamin) wrote in message > news:<[EMAIL PROTECTED]>... > <snip> > > Thanks for the help all. > I never thought of the serialization method. It seems like an > interesting way to do it. > > Yamin this should work for serializable objects. public static Object deepCopy(Object obj) { try { ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream(); ObjectOutputStream objOutStream = new ObjectOutputStream(byteOutStream); objOutStream.writeObject(obj); ByteArrayInputStream byteInStream = new ByteArrayInputStream(byteOutStream.toByteArray()); ObjectInputStream objInStream = new ObjectInputStream(byteInStream); return objInStream.readObject(); } catch (IOException e) { ... } catch (ClassNotFoundException e) { ... } } ============================================================================== TOPIC: comp.lang.java.{help,programmer} - what they're for (mini-FAQ 2004-10-08) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2235cf41e4c4f22d ============================================================================== == 1 of 1 == Date: Sat, Dec 4 2004 2:25 am From: [EMAIL PROTECTED] (David Alex Lamb) Last-Modified: Fri Oct 8 11:38:42 2004 by David Alex Lamb Archive-name: computer-lang/java/help/minifaq Posting-Frequency: every 4 days Before posting read Jon Skeet's "How to get answers on the comp.lang.java.* newsgroups" at http://www.pobox.com/~skeet/java/newsgroups.html Java FAQs and advice: - Java FAQ (Andrew Thompson) http://www.physci.org/codes/javafaq.jsp including his list of other FAQs http://www.physci.org/codes/javafaq.jsp#faq - Java/Javascript/Powerbuilder HOWTO (Real Gagnon) http://www.rgagnon.com/howto.html - Java Glossary (Roedy Green) http://www.mindprod.com/jgloss.html - jGuru jFAQs (John Zukowski) http://www.jguru.com/jguru/faq/ - Focus on Java (John Zukowski) http://java.about.com/ - Java Q&A (David Reilly) http://www.davidreilly.com/jcb/faq/ - Java GUI FAQ (Thomas Weidenfeller) http://www.physci.org/guifaq.jsp comp.lang.java.help Set-up problems, catch-all first aid. According to its charter, this unmoderated group is for immediate help on any Java problem, especially when the source of the difficulty is hard to pin down in terms of topics treated on other groups. This is the appropriate group for end-users, programmers and administrators who are having difficulty installing a system capable of running Java applets or programs. It is also the right group for people trying to check their understanding of something in the language, or to troubleshoot something simple. comp.lang.java.programmer Programming in the Java language. An unmoderated group for discussion of Java as a programming language. Specific example topics may include: o types, classes, interfaces, and other language concepts o the syntax and grammar of Java o threaded programming in Java - sychronisation, monitors, etc. o possible language extensions (as opposed to API extensions). The original charter said that discussion explicitly should not include API features that are not built into the Java language and gave examples like networking and the AWT. These days AWT belongs in clj.gui, and networking (and many other APIs) are often discussed in clj.programmer. Do not post binary classfiles or long source listings on any of these groups. Instead, the post should reference a WWW or FTP site (short source snippets to demonstrate a particular point or problem are fine). For some problems you might consider posting a SSCCE (Short, Self Contained, Correct (Compilable), Example); see http://www.physci.org/codes/sscce.jsp Don't post on topics that have their own groups, such as: comp.lang.java.3d The Java 3D API comp.lang.java.advocacy Arguments about X versus Y, for various Java X and Y comp.lang.java.beans JavaBeans and similar component frameworks comp.lang.java.corba Common Object Request Broker Architecture and Java comp.lang.java.databases Using databases from Java comp.lang.java.gui Java graphical user interface design and construction comp.lang.java.machine Java virtual machines, like JVM and KVM comp.lang.java.security Using Java securely comp.lang.java.softwaretools Tools for developing/maintaining Java programs Don't cross-post between these groups and c.l.j.programmer or .help -- it just wastes the time of people reading the general groups. Don't post about JavaScript; it's a different language. See comp.lang.javascript instead. -- "Yo' ideas need to be thinked befo' they are say'd" - Ian Lamb, age 3.5 http://www.cs.queensu.ca/~dalamb/ qucis->cs to reply (it's a long story...) ============================================================================== TOPIC: Struts and mapped property http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/737ddf3578199404 ============================================================================== == 1 of 1 == Date: Sat, Dec 4 2004 3:16 am From: "ShadowMan" Hi I'm using Struts with DynaActionForm wich as 3 to 8 Map as property, so I'm using mapped property. When I put them into HTML form it result in INPUT fields having names like 'map1(property1)' this leads to problems in writing Javascript. Can I use another format in mapped property names?! thanx -- ShadowMan ============================================================================== TOPIC: OT: Valid filenames on operating systems http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/938eed95c48901c5 ============================================================================== == 1 of 2 == Date: Sat, Dec 4 2004 4:53 am From: "Bruce Lee" Windows doesn't allow filename's containing the following characters: \/:*?"<>| Is this the same on all operating systems? I'm asking because I'm writing a html parser which needs to find valid urls. Thanks == 2 of 2 == Date: Sat, Dec 4 2004 4:57 am From: Joona I Palaste Bruce Lee <[EMAIL PROTECTED]> scribbled the following: > Windows doesn't allow filename's containing the following characters: > \/:*?"<>| > Is this the same on all operating systems? > I'm asking because I'm writing a html parser which needs to find valid urls. No. AmigaOS only disallows : and /. Unix only disallows /, although with clever trickery - in practice accessing the file system's name table directly - it's possible to use even / in filenames. You won't be able to access that file from the command line, though. -- /-- Joona Palaste ([EMAIL PROTECTED]) ------------- Finland --------\ \-------------------------------------------------------- rules! --------/ "Normal is what everyone else is, and you're not." - Dr. Tolian Soran ============================================================================== TOPIC: jsp servlet code seperation confusion http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e71d75f30f442d21 ============================================================================== == 1 of 2 == Date: Sat, Dec 4 2004 5:01 am From: Martman Anzime wrote: > Martman wrote: > >> I posted this on the .help NG but I believe you folks could probably >> provide more of an accurate answer considering the help group is >> targeted towards true beginners. >> >> Okay, where I am employeed I have the options of programming with >> Microsoft Technologies and Java specifically J2EE. I have been >> investigating the task of learning Java for about the last 3 to 4 >> months. I am a ASP.Net developer fulltime at work with C#. I was new >> to OOP when I started into .Net about a year ago and am getting >> better. However, our corporation uses Java as a National standard and >> I am looking to advance some day and need to learn Java. Furthermore, >> where I live, KY there are very few jobs for technologies other than >> .Net and Java. No PHP or ColdFusion. >> >> In the last couple of years this code seperation theory has overloaded >> the programming world. .Net does it with what's called code behind. In >> my research of Java the only things I see that reference code >> seperation is servlets (I am sure J2EE and EJB contribute also). >> However, everything I have read on servlets reference outputing HTML >> back to the browser via the HttpServletResponse and Request objects. >> >> My question, why in the world do they consider outputting HTML back to >> a browser via a servlet considered code seperation. Furthermore, it >> seems very time consuming and difficult to hand code complex layouts >> in HTML and incorporate/format it for a servlet. >> >> Can someone please explain or direct me to a resource where I can >> understand why using servlets at any point in an application would be >> better than jsp or even applets? Sometimes it's hard enough to design >> complex layouts with the assistance Dreamweaver for example. >> >> Thanks for any insight you can provide, I have read hundreds of pages >> of information concerning this and trying to compare it with the my >> current knowledge in the .Net world. >> >> Marty U. > > > I haven't looked at .Net at all, so I everything I say is from > a Java perspective. > > You wouldn't want to hard code HTML in a servlet; it's ugly, and > difficult to maintain. Servlets are great for non-visual applications > where you need HTTP support (request, response, etc). > > When you mention code separation I think you are talking about > separting the "display code", "business logic", and "control logic". > There are many tutorials on the web that mention "Model2" > development; a derivation of "MVC". Also, their are many frameworks > to choose from to assist your development. Regardless, it all boils > down to discipline and proper thinking. Think in layers and OO, > e.g. how can you separate the "model" (data), from the > "view" (display), from the "control" (logic); all comprise the > term MVC. > > Alone, Java Server Pages (JSP) can be misused by incorporating > Java code as scriplets; doing everything from database connections > to business logic and application flow. A better approach would be > to only put HTML in JSPs and use Java tags to display dynamic data. > Your data would go in Java classes that follow the bean convention > with private fields and public getters and setters. Your > business and application logic would go in other classes; packaged > appropriately. While you're at it, you might as well look at > decoupling further by putting logic in a set of classes, creating > handlers that call DAO classes that handle database accesses, etc. > > There are many ways to slice an application. I recommend looking > into the Apache Struts framework; It's well documented and would > be a good learning experience. > > On top of all that, you still have many other areas to apply the > same principles: EJBs, RMI, etc. > Hey thanks Anzime that really helps. You actually answered more than my intentions with my poorly structured question. My main concern was to seperate code from presentation and I just forgot to add the word presentation to my question. The good thing is you gave me a key bit of information that I needed to help understand the code/presentation seperation concept. Would you happen to have a link to a page that has a good info doc that would help me understand using Java tags in jsp pages. I have searched google but with the lack of knowledge I don't know if they are explaining what you are referencing nor how well they are actually explaining it. Thanks again, big help Marty U == 2 of 2 == Date: Sat, Dec 4 2004 5:06 am From: "Ryan Stewart" "Martman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [...] > Would you happen to have a link to a page that has a good info doc that > would help me understand using Java tags in jsp pages. I have searched > google but with the lack of knowledge I don't know if they are explaining > what you are referencing nor how well they are actually explaining it. > They're called custom tag libraries. Try here for starters: http://java.sun.com/products/jsp/tutorial/TagLibrariesTOC.html ============================================================================== TOPIC: Beginning EJB http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d49babfdb472b21c ============================================================================== == 1 of 1 == Date: Sat, Dec 4 2004 5:28 am From: "Darryl L. Pierce" Don Conrad wrote: >>> I have interests to pursue career in components development (EJB ). >>> Where do I start. I have good knowledge about JAVA language but not on >>> any other J2EE or J2Se technologies? What are the prerequisites to >>> learn EJB? >> >> Start off by using a good text reference. I recommend _Enterprise Java >> Beans_ from O'Reilly, along with a copy of Eclipse, JBoss and >> JBoss-IDE. Those together make for an excellent learning environment. > > What about using MyEclipse to get the J2EE support? I've never used it. What does it offer the JBoss-IDE doesn't? -- Darryl L. Pierce <[EMAIL PROTECTED]> Visit my webpage: <http://mcpierce.multiply.com> "By doubting we come to inquiry, through inquiry truth." - Peter Abelard ============================================================================== You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer" group. To post to this group, send email to [EMAIL PROTECTED] or visit http://groups-beta.google.com/group/comp.lang.java.programmer To unsubscribe from this group, send email to [EMAIL PROTECTED] To change the way you get mail from this group, visit: http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe To report abuse, send email explaining the problem to [EMAIL PROTECTED] ============================================================================== Google Groups: http://groups-beta.google.com
