3,892 Posted Topics
Re: I was able to upvote it; you just have to do it real quick. ;) But jokes aside, I wasn't able to upvote once the rep comment box comes up after on-hover. | |
Re: > Can someone please state, definitively, what is the preferred method for posting code? Fenced blocks were removed because as quoted by Dani, "they were incredibly buggy". The preferred way to post code is to indent the code by 4 spaces (or 1 tab) **or** if you are a clickety-click … | |
![]() | Re: > Both are free as long you run it with public repos, as soon you want private repo you have to pay Bitbucket allows you to have unlimited private and public repositories for upto 5 colloborating users. I always recommend Bitbucket to folks since you can pretty much host all … |
Re: > Its just a simple question , but i m totally confused that why php and asp hosting are cheaper then jsp One reason might be the widespread use and acceptance of PHP and ASP by hobby programmers/beginner web developers. Java based applications have always been associated with an "enterprisy" … | |
Re: > this is the second thread abt the same problem, will you please tell what was causing it.... Just out of curiosity.... Possibly old Javascript files/site resources given that the problem goes away after clearing the brower cache. | |
Re: > Should he learn C++? This question is incomplete without the follow up answer for "for what purpose?". If for fun, C++ isn't fun to write, at least when compared to the newer breed of managed/scripting languages which make it a lot simpler to do stuff. If for curiosity and … | |
Re: Though I'm no Ruby expert, here are a few suggestions: [code]if (result.nil?) return Time.now end[/code] can also be written as:[code] return Time.now if result.nil?[/code] = Instead of using [icode]@@tcMillisecondMode = "false"[/icode], why not just use [icode]@@tcMillisecondMode = false[/icode]? = Your ASC state can be better represented using [URL="http://www.randomhacks.net/articles/2007/01/20/13-ways-of-looking-at-a-ruby-symbol"]Ruby Symbols[/URL]. = … | |
Re: Something like [URL="http://www.cprogramming.com/tutorial/computersciencetheory/merge.html"]this[/URL] ? | |
![]() | Re: The regular expression: [icode]([.,!?:;'\"-]|\\s)+[/icode] should do the trick. It is read as "for one or more occurrences of either a whitespace or punctuation". The important part here is to make sure that the '+' is kept outside the alternation, since we can have a mix of white-spaces and punctuations. The … |
Re: > Firstly, I made the font size for the live preview larger at I forget who's recommendation (sorry!) Hey, that was me! :) Ardav: Try force refreshing the page; I faced the same issues when trying out things in chrome but the refresh fixed it. BTW Dani, there is another … | |
Re: I think the way it works is that if you have other "unread" PM in your mail box, those are pushed to the top. So if you move between pages in your inbox, maybe moving to the last page or moving to the first "read" PM, you might be able … | |
Re: The simplest way would be to configure a path[a directory] in your web.xml and use the same path to upload/download images based on the image name specified. In your web.xml:[code=xml] <web-app ...> <context-param> <param-name>RESOURCE-PATH</param-name> <param-value>d:/My-Uploads</param-value> </context-param> </web-app>[/code] In your Servlet when saving:[code=java] // TODO: Move the image writing code to … | |
Re: Looks a lot more prominent now. Any way you can make the preview of the same size? BTW, not sure if you know this but fenced code blocks don't produce preview and work differently than native code tags. For e.g. fenced code blocks with Python/Py language looks different than the … | |
Re: > All admins, moderators, team colleages are employees or some of them just contribute their time to site All moderators are voluntary contributors (not employees) to this forum who help out Daniweb with answering questions and forum maintenance in their free time. Except for me, all other co-admins are Daniweb … | |
Re: I think that's a known bug. I deleted posts made by "bedexchange" on this sub-forum since they were breaking the rules but the forum view still hows his name even though the post no longer exists. I thought this was just a problem for admins/moderators but seems that isn't the … | |
Re: ~~~ py def func(): doIt() ~~~ | |
Re: > if your program has no I/O, and there's nothing else running on the machine at the same time, then for most purposes you can assume CPU time == real time If the program in multi-threaded, the CPU time gives the "total" time spent by each CPU/core. So even if … | |
Hi folks, Please join me welcoming our two new moderators: [ardav](http://www.daniweb.com/members/ardav/120589) and [pyTony](http://www.daniweb.com/members/pyTony/734700). @pyTony & @ardav Congratulations on your new role at Daniweb. Celebrations ahoy! :) | |
In case you are not not aware, Stanford has started offering free online courses (as in real courses and not just video lectures) for topics like Database design, analysis of algorithms, CS 101 etc. Classes like database class, AI class and machine learning class are already live and a host … | |
Re: > since you here are explicitly saying you want a new Object, a new String will be created in the pool, and your second variable will point to that one This isn't correct AFAIK; instantiating new strings on demand doesn't send them to the "string pool" unless the newly created … | |
Re: [quote]Therefore, you can post in the PHP forum with the tag MySQL and your thread will get double exposure[/quote] This is possible even now, except for the double exposure part. :) What exact measures do you have in mind to ensure wide adoption of tags to the point that they … ![]() | |
Re: Any specific reason you want to load resource relative to a class and not relative to a classloader using `MyClass.class.getClassLoader().getResourceAsStream("my/pkg/file.txt")` ? | |
Re: Peter, zeroliken was actually replying to "frivolous". It seems that the order of the first two posts was reversed. | |
Re: So you need free game scripts..hmm...maybe something like [URL="http://www.scriptdungeon.com/free_php_scripts/games_and_entertainment/free_php_scripts.php"]this[/URL] ? | |
Re: If those string belong to a fixed set of values, consider using an enum instead of strings which have the added benefit of type safety. There might be other ways of achieving what you desire but difficult to suggest without more context. | |
Re: The simplest solution would be to introduce a new "command" like [icode]consoleWriteLn[/icode] (similar to [icode]print[/icode] v/s [icode]println[/icode] when using System.out). So if the user uses "consoleWrite" it would correspond to [icode]System.out.print[/icode] whereas if the user uses [icode]consoleWriteLn[/icode]. BTW, why not use shorter commands like [icode]print[/icode] and [icode]println[/icode] ? | |
Re: > i do not know these algorithms You would have to learn them to solve the problem at hand. Try the wikipedia. It should help you in getting started at least. | |
Re: Such a feature already exists; look for a "message like image" next to the feed icon at the top of your post. | |
Re: Here are my findings; `mmap` is wicked fast for large file sizes if they can completely fit in memory. Unfortunately, having a 32 bit machine limited by testing capabilities. My config:[code] Windows XP 32 bit 3GiB RAM Intel i3 3.07 GHz SATA-II 3 GiB/s; 7200 RPM Python 2.7.2[/code] My output: … | |
Re: Ensure that the required JARs are on the runtime classpath. You can download the required JNDI JARs from [URL="http://java.sun.com/products/jndi/downloads/index.html"]here[/URL]. Also, paste the entire stacktrace along with the tutorial you are referring to for others reference. | |
Re: This is not an issue but a concious site-wide decision. IIRC, this was put in place to ensure we don't end up getting members who post for the sole purpose of "exposing" their sig links to "teh internet". As a user, you have no control over this behaviour, so no, … | |
Re: Fixed title; you can always try to get the title edited by "flagging" it as bad post. ![]() | |
Re: What kind of file is it? What kind of "text" does it contain? If it contains ASCII encoded text, you'll always get the char count of a string same as the number of code-points. [URL="http://weblogs.java.net/blog/joconner/archive/2005/08/how_long_is_you.html"]Read this[/URL], try to understand it and get back in case of more queries. | |
Re: Try wrapping the `value` elements in a parent element called `values` and have a look at [URL="http://apache-commons.680414.n4.nabble.com/Commons-Digester-Mapping-an-ArrayList-td741993.html"]this thread[/URL]. | |
Re: In what way is the BigInteger constructor which accepts a string not working out for you? | |
Re: `clone` here is working as expected. It's cloning the "TreeMap" which is why "put" in the cloned one doesn't affect the "old" one. It's not cloning the key or value; so basically keys and values are "shared" across the two Map instances. This is only an issue if you are … | |
Re: I'd personally recommend a file/directory copy utility. This way, he'll get more acquainted with how the CLI clients work and get a taste of implementing a fun utility from scratch. The good thing is that this project can be beefed up if required by adding more options like the way … | |
Re: The format `dd/MM/yyyy - HH:mm:ss.S E` should do the trick. For future references, [URL="http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html"]look into the Javadoc of the SimpleDateFormat class[/URL]. | |
Re: [code]int count (char vector[],int nr) { int gasit=0,i; for(i=0;i<nr;i++) { [COLOR=DarkOrange] if(vector[i]>='a' && vector[i]<='z') gasit++; if(vector[i]>='A' && vector[i]<='Z') gasit++;[/COLOR] } return gasit; } [/code] I think there is a better way of doing this, just use the [search]isalpha( )[/search] function which checks whether the given character is an alphabet or … | |
Re: Two ways of doing this: 1) NULL checks every time you add an element. If the "key" is not associated with any underlying set, create a new HashSet, and place it against the key.[code] Set<State> states = mapping.get(transitionStringToAdd); if (states == null) { states = new HashSet<State>(); mapping.put(transitionStringToAdd, states); } … | |
Re: Mentioning Emacs without mentioning Vim? Surely the world must be coming to an end. ;-) | |
Re: "make" is a standard "build automation" utility which is pretty much available on *nix like platforms. For more info, [URL="http://en.wikipedia.org/wiki/Make_(software)"]read this[/URL]. The core concept is that instead of firing the commands required to "build" a project again and again, you stuff them in a "makefile" and distribute them to the … | |
Re: [quote]Would i be allowed to make a comment in those threads or would that be "reviving the dead"?[/quote] Thread bumping rule isn't an absolute. It's just that 99.99% of the times the bump is irrelevant/off-topic/spam/homework kid, making us a bit strict/wary when it comes to bumping threads. If you feel … ![]() | |
Re: I'll try to explain this with an example. Let's talk about a simple templating system which is based on a single Template interface. Every different template implementation has a different way of interpolating variables, convention used for representing data etc. But all templates also share a common piece of logic: … | |
Re: [quote]It still displays the old one!? Whyy??[/quote] Apart from answering the questions posed above, make sure that you do a clean build and then run the application. It's quite possible that the old image still resides in the build directory of Netbeans. Also, check where exactly is this application run … | |
Re: [quote]hey I just realized I was not supposed to post this code online could someone either delete the thread or my username/personal info[/quote] There is no personal information in that thread. The only possible incriminating piece of info would have been the package name which I have removed from the … ![]() | |
Re: Al Sweigart has an entire site and a book dedicated for game programming for kids. You might find [URL="http://inventwithpython.com/blog/"]this [/URL]and [URL="http://inventwithpython.com/chapters/"]this [/URL]worthwhile. As someone who has mentored both colleagues, junior developers and "want to be programmers", I'd recommend against "industrial strength" languages like C#, Java, C++, C etc. unless the … | |
Re: > I have an interface with a function, and 3 classes implementing interface...each class doing its own work. now I have to call up interface by making an object of it. then I utilize the function in my frame to call up different class via interface. thats what im assuming.. … | |
Re: @sha11e: Strive for correctness, readability and performance; in that order. :-) [quote]BufferedReader ins = null; static PrintStream ios = null; Do neither use up memory at this point?[/quote] They are simply fields of the given object i.e. names. They don't consume memory in the sense that they don't point to … |
The End.