3,892 Posted Topics

Member Avatar for stanwaka

Vishesh, like Walter said, don't use EOF or you just end up writing an additonal condition to prevent the fetching of the last record, one too many times. Instead use, [inlinecode]while ( getline (file_stream, my_string ).good () )[/inlinecode] And as for [inlinecode]system ( "PAUSE" )[/inlinecode] read the article posted.

Member Avatar for ilileve
0
47K
Member Avatar for cambalinho

> why i can't change the thread title? As already mentioned by Jim, you can only change/edit the thread title/contents within 30 mins of posting it. After that, it's a mod/admin only thing. One thing to note here is that if you for some reason need the thread title to …

Member Avatar for cambalinho
0
291
Member Avatar for cakka

A word of caution though, even though the `System.exit` method accepts the entire gamut of integer values, there are certain restrictions imposed by the host systems (operating systems) on what kind of status codes are acceptable. Take a look here: http://en.wikipedia.org/wiki/Exit_status

Member Avatar for ~s.o.s~
0
168
Member Avatar for seanbp

You might want to look at [NanoHTTPD](https://github.com/NanoHttpd/nanohttpd). Single file web server which supports static serving as per the home page.

Member Avatar for JamesCherrill
0
1K
Member Avatar for adrive

> it seems that there are shorthand key/value array constructors Actually it's called an 'object literal'. Encode the data you want to send by using a [URL="http://in.php.net/json"]PHP binding for JSON[/URL] at the server and decode the same using Douglas Crockfords' [URL="http://json.org/js.html"]Javascript library for JSON.[/URL]

Member Avatar for ivan.danshin.9
0
5K
Member Avatar for Vanquish39

The code would be thread safe if the `dataSource.getConnection` method is thread-safe. Since the `DataSource` is just an interface, you'll need to check the specific implementation of the data source you are using (just print out the name of the class) or read the documentation. I'm assuming your datasource supports …

Member Avatar for ~s.o.s~
0
271
Member Avatar for maxbummber

Not sure I completely understand your question. Velocity is just a templating language which is concerned with rendering data based on your existing view/template. If you need HTML output, you'll have a create a template file which follow the HTML specification. Something like: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> …

Member Avatar for ~s.o.s~
0
399
Member Avatar for somjit{}

If you end up using `sleep` for inter-thread communication/co-ordination, you are doing it wrong. The entire point of `wait/notify/notifyAll` is to ensure that you coordinate activites based on some conditions and signal the threads accordingly. In your case it's pretty simple: `wait` till the shared resource (list in your case) …

Member Avatar for ~s.o.s~
0
210
Member Avatar for mikewyatt

The error means that the version used to create the db file isn't the same as the derby JAR version you are using to access it. Take a look at [this thread](http://stackoverflow.com/questions/122468/how-do-i-configure-a-project-to-use-latest-derby-db-version-10-4) and see if updating the JAR file helps. Also, [this topic in the Netbeans forum](http://forums.netbeans.org/topic41848.html) if the previous …

Member Avatar for mikewyatt
0
4K
Member Avatar for ravi_forum

Post your attempt and we will definately help you out on topics on where you got stuck. Just giving out the source code would do you more harm than good.

Member Avatar for naamurad
2
2K
Member Avatar for newbie14

> I have given up with setting visualvm.IT just failed to read and communicate with my remote application. It doesn't happen automagically. You need to configure the server JVM or the target application such that it can accept incoming VisualVM JMX requests. Take a look at [this thread](http://stackoverflow.com/questions/856881/how-to-activate-jmx-on-my-jvm-for-access-with-jconsole) .

Member Avatar for newbie14
0
291
Member Avatar for sasikrishnasamy

> Can any one please let me know why Data loss happing while reading big files? Because your `readLine` call actually reads in a line and increments the file pointer. In your current code, you are basically discarding every other line. You need to assign the result of `readLine` to …

Member Avatar for sasikrishnasamy
0
261
Member Avatar for bossier330

YOur function is like [code] char* subArr(char array[65535], int length) { int i, j = 0; **** char temp[65535 - length + 1]; **** for (i = length - 1; i < 65535 - length - 1; i++) { temp[j] = array[i]; j++; } return temp; } [/code] To be …

Member Avatar for iam1sts
0
6K
Member Avatar for flebber

Look into a library called JAXB. It basically eases the task of XML <-> Java objects conversion. The steps would look something like this: 1. Analyze the XML file format and create a XSD out of it (this is the difficult part) 2. Autogenerate classes from XSD using xjc 3. …

Member Avatar for flebber
0
182
Member Avatar for happygeek

Welcome Jorge! Oh and don't believe deceptikun; he likes to scare the new mods away. ;)

Member Avatar for Samuel Baker
1
817
Member Avatar for somjit{}

Minor comments: head = 0; tail = head + (size - 1); `head` is unnecessary in the second statement. > throw new java.lang.IllegalArgumentException `java.lang` is always imported; remove the full qualification. if (size == 0) throw new java.lang.NullPointerException("size = 0"); NPE is not the correct exception to throw here; maybe …

Member Avatar for somjit{}
0
1K
Member Avatar for pritaeas

Definitely a fresh feel as others have mentioned, good job. Few comments from my side: 1. The starting post of the thread or the OP's post should stand out a bit more. The first time I opened up a new thread, I was searching for the question since the original …

Member Avatar for diafol
0
1K
Member Avatar for ktsangop

Minor comments aside: > i get a lot of timeout exceptions (in alive pcs) even though my timeout limit is set to 10 seconds. You mean you get a TimeOutException before 10 secs on some live PCs? > If i force the list to contain a single working pc, i …

Member Avatar for ktsangop
0
524
Member Avatar for Birol

Problem is that too many folks jump *directly* to patterns without understanding *how* the code looks without them or facing the problems first hand. The line of thinking goes something like this: "I'm now creating a class which might get used from a lot of other classes, flexibility is a …

Member Avatar for prakash.kadam.5851127
0
301
Member Avatar for cool_zephyr

> .my tomcat server has around 128MB runtime memory Is that 128 MiB just for permagen space or total JVM memory? Unless you explicitly specify permagen size, a small number like I guess 64 MiB is picked up (depending on your exact JDK version, OS version/flavour etc.) which is certainly …

Member Avatar for ~s.o.s~
0
233
Member Avatar for techyworld

That error means that your XML file doesn't conform to the XML schema specified for that particular file. So basically it's trying to say that `http:basicAuthSupplier` is not a valid child for the element `http:conduit`. I haven't worked on CXF but you should have a look at this [CXF wiki …

Member Avatar for techyworld
0
351
Member Avatar for DarkLightning7

You don't need to call any special function, this sort of functionality is taken care by the JDBC standard. The idea is to specify a special flag called `Statement.RETURN_GENERATED_KEYS` when creating statements. Look at [this](http://stackoverflow.com/a/202533/193906) answer for more details.

Member Avatar for ~s.o.s~
0
691
Member Avatar for cool_zephyr

> i don't know how to unescape that sequence into java string..could anyone please help me with this?? That's not how a normal HTML response looks like. If that service is in your control, the first action should be to investigate why you are getting hex encoded HTML entities as …

Member Avatar for cool_zephyr
0
695
Member Avatar for somjit{}

You almost never push autogenerated class-files to your repository unless it's in the form of a JAR. Even JARs can be avoided by providing relevant ant files or maven files for that particular project in which case the user can just build the entire thing on his own. For your …

Member Avatar for somjit{}
0
4K
Member Avatar for Dani

> As such, I believe DW needs to keep it "in check" so to speak :) I have been there a couple of times now and the dicussion was pretty much in check. Do you have any specific instances where you think the discussion might have moved away from the …

Member Avatar for Ketsuekiame
0
294
Member Avatar for Dani

I get the feeling that these small irreproducible things are what are causing problem to the majority of the folks out there. I wish there was a simple flag to flip and bring back the old vBulletin board so that we could be sure that the new design is or …

Member Avatar for Dani
0
2K
Member Avatar for rotten69

I have replied to James in the mod section and I'll reply here again. I'm favour of a new sticky thread as long as it stays on-topic and doesn't become a dumping ground for "plz halp me" posts. Someone will also need to ensure that "reponses" to the challenges/projects are …

Member Avatar for renato.francia
4
870
Member Avatar for mgold

> incredibly usefull to have a language that was both dynamic AND statically typed Such languages are called optionally typed languages. I'm not a big fan of such languages since it seems like a half assed attempt though I'm sure many swear by it. The advantages being: * Writing dynamic …

Member Avatar for ~s.o.s~
0
213
Member Avatar for james.lu.75491856

> Should've used a Dudette. Agreed. > @pritaeas, why not both a dude and dudette? That would drive away the dudes looking for a dudette... ;)

Member Avatar for mike_2000_17
0
267
Member Avatar for somjit{}

`r` is an instance of `ResizingArrayQueue` whereas the `display` method is part of `ResizingCircularArray`?

Member Avatar for somjit{}
0
291
Member Avatar for JamesCherrill

Strange indeed; have you tried deleting the Netbeans cache directory at `$userdir\.netbeans\[version]\var\cache\` or something along those lines?

Member Avatar for JamesCherrill
0
305
Member Avatar for james.lu.75491856

*EDIT*: The below explanation assumes `someboundmethod` is actually called instead of just storing the method reference in `d`. If `d` stores the method reference instead of the result of the method call, `foo` instance will surely hang around as long as `d` is reachable. > If there's a class called …

Member Avatar for ~s.o.s~
0
185
Member Avatar for Dani

> I'm going to leave it as is for now, but track its usage, and please let me know how often you guys find yourself using it. Dani, I would really suggest at least providing a tooltip for the green arrow, something like (Spellcheck + Preview) or provide a "Help" …

Member Avatar for Dani
8
326
Member Avatar for pmark019

I would personally start with [this](http://docs.oracle.com/javaee/6/tutorial/doc/gjbji.html) for a very high level view or maybe [this](http://www2008.org/papers/pdf/p805-pautassoA.pdf) if you are into whitepaper and stuff. [A more detailed tutorial of JAX-WS](http://docs.oracle.com/javaee/6/tutorial/doc/bnayl.html) [A more detailed tutorial of JAX-RS](http://docs.oracle.com/javaee/6/tutorial/doc/giepu.html) In short: **JAX-WS\***: Enterprisy web service. Request and responses are in terms of XML payloads/envelopes. Not …

Member Avatar for Ne0nx3r0
0
755
Member Avatar for bumsfeld

> but lack of multiple inheritence is troublesome Lack of multiple inheritance is a problem if you don't have traits (Scala) or mixins (Ruby). If Nimrod has any of those, it should be fine IMO.

Member Avatar for rubberman
1
332
Member Avatar for newbie14

The total memory occupied by those JDBC connection objects looks to be around 12 MiB. You have 40 connections as the max connection count per partition. Which observation leads you to the conclusion that those are not pooled connections but "jdbc leaks"?

Member Avatar for newbie14
0
948
Member Avatar for JamesCherrill

Just ensure that if you need to replace the literal `-`, it is always either at the start or at the end of the replacement set. For e.g. `txt.replaceAll("[- _?]", "*")` works, `txt.replaceAll("[ _?-]", "*")` also works but `txt.replaceAll("[ _-?]", "*")` doesn't.

Member Avatar for masijade
1
237
Member Avatar for johnray31

[quote]What is the problem with this code if i do like this: [/quote] Keep in mind one rule of thumb while using pointers in C and C++: [quote]"To modify the value of a variable using pointers in a function, you need to pass the address of that variable".[/quote] This rule …

Member Avatar for Bharat_1
0
16K
Member Avatar for Violet_82

Firstly, read this: [checked v/s unchecked exceptions](http://www.javamex.com/tutorials/exceptions/exceptions_hierarchy.shtml) > in line 10 the method quotient throws an exception that will be caught by the catch statement Wrong phrasing; there is a *possibility* that the method `quotient` might throw an exception. When a method has a `throws` clause, it means that the …

Member Avatar for Violet_82
0
398
Member Avatar for anisha.silva

[Restlet](http://restlet.org/), [Jersey](http://jersey.java.net/) and [Resteasy](http://www.jboss.org/resteasy) are all good REST frameworks (useful for creating RESTful web services). Read the example code/docs on their website and pick up one which works out for you.

Member Avatar for radhakrishna.p
0
332
Member Avatar for lena1990

Is it possible for your to copy the Access DB file from that computer and open in up on your computer? Does it still show `???` or does it display the data correctly? Since you say it works on your box, this seems like a case of missing font pack/regional …

Member Avatar for lena1990
-1
747
Member Avatar for krystosan

Your question isn't very clear; can you provide a sample input/output for the use case in consideration?

Member Avatar for krystosan
1
211
Member Avatar for iamthwee

The problem I believe is that special characters like `<` and `>` don't require conversion to their HTML entity counterpart when placed inside a `pre` since the rendering engine just "literally" evaluates them as opposed to recognizing the sequence and rendering it as the corresponding special char. Daniweb code snippet …

Member Avatar for ~s.o.s~
0
262
Member Avatar for DavidB

David, it seems that your `<` and `>` have been turned into `&lt;` and `&gt;` respectively. Did you post it that way? If not, I'll have to ask Dani to look into it.

Member Avatar for DavidB
1
736
Member Avatar for Sheetal Krishna

> I am trying to write a program which will help me find the number of objects eligible for garbage collection at any given point of time AFAICT, there is no mechanism exposed by the JVM to "count" the number of objects eligible for garbage collection since this would in …

Member Avatar for jwenting
0
275
Member Avatar for phorce

> It functions more like an IDE than a textbox. You can tab to indent, shift+tab to go back a tab, etc. It's all color-coded so you can easily see where a link is, what is considered code, etc. None of that is possible with a regular textbox. I believe …

Member Avatar for diafol
1
472
Member Avatar for Stuugie

IIRC, this happens when Daniweb includes some content (javascript/images/widgets etc.) from an external domain which is not allowed or is blocked by your ISP. Corporate ISP's are notorious for blocking a lot of sites. So basically it starts loading some resource and perpetually hangs up because the host/domain is blocked …

Member Avatar for Reverend Jim
0
137
Member Avatar for ze0001ng

> I searched, but can not find the one I want. A simple [URL="http://www.google.co.in/search?hl=en&client=firefox-a&channel=s&rls=org.mozilla%3Aen-US%3Aofficial&hs=TU1&q=free+jsp+servlet++hosting&btnG=Search&meta="]google query [/URL]turns up a lot of interesting results. You can't be choosy when it comes to something which is given for *free*, so your argument of 'not finding the one you want' is kind of moot.

Member Avatar for radhakrishna.p
0
305
Member Avatar for Violet_82
Member Avatar for Evenbit

Sticky created as per the request which was approved by Mr. Dragon.... Some links from my side: [LIST] [*][url]http://www.techtutorials.info/assembly.html[/url] [*][URL="http://savannah.nongnu.org/projects/pgubook/"]Programming from ground up in assembly[/URL]. [*][URL="http://goforit.unk.edu/asm/astart.htm"]Assembly language tutorial by Brian[/URL] [*][URL="http://webster.cs.ucr.edu/"]Win32 Assembly language programming[/URL]. [*][URL="http://web.cecs.pdx.edu/%7Ebjorn/CS200/linux_tutorial/"]Linux Assembly Tutorial[/URL] [*][URL="http://www.intelligentedu.com/newly_researched_free_training/Assembly.html"]Lots of Assembly tutorials[/URL] [*][URL="http://www.eg3.com/WebID/software/assembly/blank/tutorial/a-z.htm"]Embedded software tutorials[/URL] [*][URL="http://www.freeprogrammingresources.com/assembly.html"]Assembly resources (good one)[/URL][/LIST]Hope it helped, …

Member Avatar for pbj.codez
3
1K

The End.