Posts
 
Reputation
Joined
Last Seen
Ranked #178
Strength to Increase Rep
+10
Strength to Decrease Rep
-2
87% Quality Score
Upvotes Received
52
Posts with Upvotes
44
Upvoting Members
35
Downvotes Received
8
Posts with Downvotes
7
Downvoting Members
6
29 Commented Posts
~281.69K People Reached
About Me

I'm an addict of gaming..
Love software development.. Love C++, hate Java [mods please let me say that here at least :)]..
A fast driver (as much as Bangalore traffic will permit)..
Mmmm what else.. yeah photography.. See my blogs..

Interests
Photography Gaming: - AOE (TC usually) - Q3 Chess Last but not the least by far: Programming :)
PC Specs
Fujitsu Siemens Lifebook 7110 S -------------------------------------- Home made: Gigabyte GA-P35-DS3L…
Favorite Tags

506 Posted Topics

Member Avatar for samaru
Member Avatar for The Dude

Politics is the art of preventing people from taking part in affairs which [I]properly[/I] concern them.

Member Avatar for Dani
3
11K
Member Avatar for rugae

Just to add the fact that this is type independent (i.e. not specific to char*): operator == is overloaded/implemented for all basic types in C++. A pointer is also a basic type. The implementation of operator == that compares pointers is NOT to compare what they to point to but …

Member Avatar for Nikolay_2
0
4K
Member Avatar for pranitha_dolls

How exactly did you manage your first 6 sems.. ?! Try [URL="http://java.sun.com/docs/books/tutorial/"]Sun's Java Tutorial[/URL]..

Member Avatar for Sharon_5
0
158
Member Avatar for ~s.o.s~

Some for graphics ppl: [LIST] [*]Write a program to draw a rectangle, ellipse, square, circle, point and line based on user input. (Beginner) [*]Write a program to emulate Microsoft Paint. It should be possible to switch between different tools (circle, rectangle, eraser...) using pre-defined key strocks. - Intermediate [*]Write a …

Member Avatar for gyno
22
7K
Member Avatar for toldav

hey.. guess this is going to be an unhelpful and late answer, but given the format of input you have, there is no fixed formula to parse it using `awk` or `sed` that I can see. You have gotta write code specific to each section in your input, to get …

Member Avatar for thekashyap
0
233
Member Avatar for pavani2006

[quote=Aia;369444]>how to complile and execute a c pro in editplus Editplus is a full featured text editor. Only to produce the source code. [/quote] Although it's just an editor, it would be supporting configuring user tools (I use Textpad which does). Also it's easy to suggest a new IDE but …

Member Avatar for sujitha77
0
2K
Member Avatar for jessicaphillips

Honey you chose THE wrong site/forum for posting this... :)) Completely agree with joeprogrammer.

Member Avatar for Schol-R-LEA
1
655
Member Avatar for linux
Member Avatar for <M/>
0
3K
Member Avatar for The Dude

Here is something they claim is shown in classrooms (of IIM-A - Indian Institute of Mgmt - Ahmedabad).. I think it's a joke.. It's good none-the-less..

Member Avatar for Ene Uran
9
4K
Member Avatar for abd2

Couldn't help but notice that unless there is some bug in daniweb.com this is most read thread I've seen so far.. ! 17,751 times.. :)

Member Avatar for kimchong
2
2K
Member Avatar for aasi007onfire

[quote=Ancient Dragon;393474]>>i saw this code in a particular book..... what an awful algorithm to put in a book! I thought books were supposed to teach the language not how to obfuscate it. I think you should trash-can that book and get a different one.[/quote] Unless the book is this :) …

Member Avatar for Ancient Dragon
0
193
Member Avatar for GrimJack

[LIST=1] [*]You throw your back out on the toilet. [*]You shave your ears. [*]Your second wife calls your first wife “ma’am” [*]You're genuinely excited when your prescriptions arrive in the mail. [*]You read the obits in the newspaper to check the ages of the dead people. [*]You read a newspaper. …

Member Avatar for vinnitro
1
3K
Member Avatar for shouvik.d

Look at the call stack and see which d'tor (destructor) is being called, that should tell you where the problem is..

Member Avatar for atoutsweb
1
1K
Member Avatar for C0ding

>> but for some reasons is not working for me Unable to guess the reasons. Is there ANY output produced when you run this script? I'm not a batch file expert, but do you REALLY need to use batch file only? If not I highly recommend using something like Cygwin …

Member Avatar for C0ding
0
254
Member Avatar for vuquanghoang

Problem is exactly what you pointed out. A recursive function without a "break condition". In this case if [iCODE]getLeft()[/iCODE] or/and [iCODE]getRight()[/iCODE] is NULL then you shouldn't call [iCODE].iPathLength()[/iCODE] on it, thus breaking the recursion. Theoretically it might still be possible to make this code itself work (using specialized derived classes …

Member Avatar for Momerath
0
140
Member Avatar for java_programmer

Try [ICODE]dos2unix [/ICODE]on your script.. looks like there are [ICODE]^M[/ICODE] chars.. you must've edited the script using some Windows' app instead of `vi` or some unix app.. Not that you can't use Windows app.. just be careful in setting up the preferences in the editor to ensure it saves in …

Member Avatar for java_programmer
0
694
Member Avatar for sudhanshu12788

Refer to the famous [URL="http://www.google.com/search?q=sed+one+liners"]sed one liners[/URL], I understand they're [URL="http://sed.sourceforge.net/sed1line.txt"]even maintained[/URL] now.

Member Avatar for deepkw
0
211
Member Avatar for rushikesh jadha

To find out what's happening in the program, you can apply a simple technique called "[URL="http://en.wikipedia.org/wiki/Debugging"]debugging[/URL]". In this case: * Add some traces, to print out all variables at all steps, to your code so you know what's happening with each input. * use a debugger.

Member Avatar for thekashyap
0
157
Member Avatar for Aamit

You can of course "return" a string like this.. which is not really returning and it forces you to ensure that there are no unwanted `echo`s in the function.. but it works.. :) [CODE]#!/bin/bash function gimme_string() { echo "returned string" } my_string=`gimme_string` echo "String I got is: $my_string"[/CODE]

Member Avatar for thekashyap
0
852
Member Avatar for ayanbizz

Can you post your code and point to where the problem is? Or is it that you don't understand Huffman coding?

Member Avatar for Ezzaral
0
422
Member Avatar for jaango123
Member Avatar for natnit

Are these arraya your keys to the map/list? Can there be any repetition? If there is repetition, is it needed to hold all instances (e.g. like in a std::multimap) or only one key should be there (like in std::map)? What's the max number of entries per array? How abt picking …

Member Avatar for Adak
-1
3K
Member Avatar for Prakash_8111

Which shell? What's the loop break condition? How to loop: [url]http://www.freeos.com/guides/lsst/ch03sec06.html[/url] How to call a script: It's just a command give full path. E.g. a.sh wants to call b.sh then [CODE]#!/bin/bash #a.sh PATH_TO_B=/tmp/b.sh echo Calling b.sh $PATH_TO_B echo $PATH_TO_B exited with $? #if b.sh is not executable then: /bin/bash $PATH_TO_B …

Member Avatar for nikita.
0
3K
Member Avatar for coding101

Try [URL="http://en.wikipedia.org/wiki/DTrace"]Dtrace[/URL]. You shoudl be able to add some hook into kernel to monitor directory access and log if the directory in question == xyz. Only port for linux I saw was from [URL="http://www.crisp.demon.co.uk/tools.html"]CRiSP[/URL] available [URL="ftp://crisp.dyndns-server.com/pub/release/website/dtrace"]here[/URL]. Check status.txt for compatibility with your OS/version. If you can make it run, then …

Member Avatar for thekashyap
0
156
Member Avatar for mcconnell_34

[QUOTE=mcconnell_34;1646837]didn't work[/QUOTE] Ppl need more than "didn't work" to understand a problem. [QUOTE=mcconnell_34;1646837]my man[/QUOTE] See [U]her[/U] avatar? Read: "Code Goddess"?

Member Avatar for Narue
0
181
Member Avatar for Narayanan87

What you're looking for is called [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html#cg"]capturing group[/URL] in java regex. e.g. for this input: "world cup, football, asia, 2011" - when you apply this regEx: "^world cup, football, ([^,]*), 2011$" - then matcher.group(1) is set to "asia" - when you apply "^world cup, ([^,]*), ([^,]*), 2011$" - then matcher.group(1) …

Member Avatar for thekashyap
0
160
Member Avatar for neptali

Although your confidence in abilities of us at daniweb is overwhelming, we have not yet mastered the art of telepathy or remote desktop viewing. So we are unable to see what the errors are. Read [URL="http://electrosofts.com/cgraphics/"]this [/URL]. It tells you which lib, bgi you need and so on. Also note …

Member Avatar for thekashyap
0
167
Member Avatar for valestrom

Line 47: if (mainmenu == "New" || "new" || "New Game" || "new game" || "New game" || "new Game" || "newgame" || "Newgame") - mainmenu == "New" <-- is a condition - "new" <-- is NOT a condition - "New Game" || "new game" || "New game" || "new …

Member Avatar for valestrom
0
2K
Member Avatar for _neo_

How abt rsh? Is that enabled? ssh is just a secure-rsh, so whatever you can do with ssh can also be done with rsh.

Member Avatar for _neo_
0
2K
Member Avatar for Shruti4444

[QUOTE=smrati.katiyar;1540474]cat filename | grep word | echo "$?" if the result of above oneliner is 0 it means the word is there in the file . if it's non zero it means word is not there.(echo "$?" tells us whether the previous command was successful or not) let say your …

Member Avatar for IIM
1
134
Member Avatar for anjoz

May be there is an easier way, but here is what I can think of.. [CODE]total_params=`echo $* | sed 's/ */\n/g' | sort | sed '/^$/d' | wc -l` unique_params=`echo $* | sed 's/ */\n/g' | sort -u | sed '/^$/d' | wc -l` [ $total_params -ne $unique_params ] && …

Member Avatar for thekashyap
0
137
Member Avatar for kristo5747

Why don't you simplify your code? It's looking too complex to understand really. [CODE]for myfile in `find . -name "R*VER" -mtime +1` do echo "Processing $myfile" # did you mean to use -l instead of -H by any chance? # Two conditions on RHS and LHS do not produce similar …

Member Avatar for kristo5747
0
222
Member Avatar for vaibhav1983

That's how it works! :) What do you want to do? To process the file line by line you should directly pipe the output of cat to next command like: [CODE]cat orders.0613 | awk ... cat orders.0613 | sed ... cat orders.0613 | cut ... # Of course all of …

Member Avatar for thekashyap
0
96
Member Avatar for airbourne

There are 2 simple options: 1. If the number of params are not too many just pass them on command line: [CODE]#/bin/bash APPLICATION=$1 LOCALHOST=`hostname -s` REMOTEHOST=$2 WEBDATA=$3 SQLUSER=$4 SQLPASS=$5 SQLDB=$6 # --------------------------------------------- #run like this: backup.sh appName remotehost webdataLocation usr pswd db[/CODE] You name make them named params [URL="http://stackoverflow.com/questions/402377/using-getopts-in-bash-shell-script-to-get-long-and-short-command-line-options"]using the …

Member Avatar for L7Sqr
0
721
Member Avatar for chhabraamit

I would guess he means "formatted I/O" instead of buffered I/O. Which would be fprintf/fscanf. Basically the functions that try to interpret the data that's read to some specific type. I never tried in C/C++ but in Java it was quite clear that ObjectInputStream.readInt() is much slower than FileInputStream.read(). If …

Member Avatar for Narue
0
313
Member Avatar for ssesham1

[QUOTE=Narue;1577057]...answer is no...[/QUOTE] Technically correct is to say that: Yes, but it doesn't make sense. As the templates are "compiler feature", definition of a template must be in the same compilation unit as the user. So if you do this all users would have to [ICODE]#include[/ICODE] the "implementation source file".

Member Avatar for thekashyap
0
435
Member Avatar for warlord902

Static members are init'd when teh class is loaded. Classloader's [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Class.html#forName%28java.lang.String%29"]forName()[/URL] method is the one that is supposed to do it. Exception is when you explicitly ask classloader NOT to init the class but just load it by passing false as second argument to the [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Class.html#forName%28java.lang.String,%20boolean,%20java.lang.ClassLoader%29"]overloaded forName()[/URL].

Member Avatar for thekashyap
0
579
Member Avatar for winecoding

Yeah, it looks like some class path issue and not exactly a compilation error. Answer NormR's question.. [QUOTE]java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory [/QUOTE] Where is the class that is referred to in this error message?

Member Avatar for thekashyap
0
204
Member Avatar for htmler

You write code for [URL="http://en.wikipedia.org/wiki/Selection_sort#Algorithm"]selection sort[/URL]! Might help to see [URL="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Comparable.html"]Comparable[/URL] as well, you can make your implementation a bit generic.

Member Avatar for stultuske
-1
94
Member Avatar for prathu1

"shell is uninitialized" means that the files (scripts) listed there (/etc/profile, ...) are NOT executed. So whatever env variables you're setting/updating in those files are not set/updated.

Member Avatar for thekashyap
0
255
Member Avatar for ChosenOreo

In short try implementing some OS kernel services. - I would recommend you take a look at anything that describes the kernel functions/algorithms. ---- [URL="http://en.wikipedia.org/wiki/Kernel_%28computing%29"]A starting point[/URL]. ---- Another one: Just implement a part of [URL="http://en.wikipedia.org/wiki/POSIX"]POSIX[/URL]'s [URL="http://pubs.opengroup.org/onlinepubs/9699919799/"]specification[/URL]. :) - You can always get more info on how say RHEL implements …

Member Avatar for abhimanipal
0
178
Member Avatar for lochnessmonster

Mike already gave an excellent example. Just to point out in different words. In a good design you want abstraction. And that's provided by inheritance (among other options) primarily. As long as users use abstractions (Shape in this case) they're shielded from implementation details. A good example from "Java" is: …

Member Avatar for thekashyap
0
189
Member Avatar for vasuv
Member Avatar for thekashyap
0
150
Member Avatar for surferxo3
Member Avatar for bibiki

If your question is purely on GUI (how to take an expression as input): - Make a list of functions supported by your code and build a GUI such that user can only use one of those. - Fix the number of variables supported in an expression (1, 2, ...) …

Member Avatar for bibiki
0
117
Member Avatar for ekailan

Yes. There are 2 ways to look at it: 1. You do all your operations by reading / writing to file from your code. Instead of memory. I.e. you take care in your code to access file. 2. You overload all required operators (new, delete, *, [], ., ->, ...) …

Member Avatar for predator78
0
114
Member Avatar for Sonia11

well, what you've written is a pure C++ class, without using templates. Unless you use the template type inside declaration/definition of the class it's not a template class. In your case you're not using the tyep elemType anywhere. So it has no effect. It's like an idiot wearing the wise-guys' …

Member Avatar for mrnutty
0
310
Member Avatar for adarshcu

What do you wnat to validate? I.e what's the validation? Perhaps match() takes a long time due to the generic nature of the regEx you're using. Pattern.compile() however shouldn't take any longer/shorter as it's not connected to the input at all. Can you enhance the code you've posted so that …

Member Avatar for thekashyap
0
185
Member Avatar for stereomatching

[QUOTE=firstPerson;1562010]It might be possible but it would be a lot of work, and might not be worth it. Is this just for curiosity or a project or something else?[/QUOTE] Can you give at least an outline how can you do this? My understanding is that templates are a compiler feature, …

Member Avatar for thekashyap
0
161

The End.