506 Posted Topics

Member Avatar for akhtar_mnnit

[CODE] # What you need is to look into the "Built-in Variables" section of "man awk" sort --stable -t"," -k2 in.csv | awk -F, '{print 0 "," NR-1 "," $1}' # NR - 1 as you want row num to start from 0 whereas awk does it from 1. # …

Member Avatar for thekashyap
0
168
Member Avatar for kanthmca3

griswolf>> Awk is probably the best tool for this Perhaps you didn't get a chance to see the text to be parsed. There is a table but that's just a part of what he wants + things like "starting from the first column i have to go n(say n=13) lines …

Member Avatar for thekashyap
0
91
Member Avatar for moraks007
Member Avatar for klegrand
Member Avatar for whizkidash

READ YOUR CODE ! [CODE]CheckRetStat() { RetStat=$?; SuccessMsg=$1; ErrorMsg=$2; ExitIfErr=$3; if [ $RetStat -ne 0 ]; then LogThis "***** ERROR - $ErrorMsg"; # Exit Script if the ExitIfErr value is 1"; if [ $ExitIfErr -eq 1 ]; then WriteAlert 14112; exit $RetStat; fi else LogThis "SUCCESS - $SuccessMsg"; fi }[/CODE]

Member Avatar for thekashyap
0
128
Member Avatar for ebbtide
Member Avatar for whizkidash

Didn't really understand what the problem is? - Is it so that you copy and paste this script in 3 different directories (say x and y) and then when you run x/script.sh it must be run as user "x" and when you run y/script.sh it must be run as user …

Member Avatar for thekashyap
0
180
Member Avatar for sasucker

First the code won't compile due to This line: => char name[rows][columns]; Have a look at [URL="http://www.daniweb.com/code/snippet61.html"]this[/URL] and [URL="http://www.daniweb.com/code/snippet197.html"]this[/URL].

Member Avatar for llk
0
2K
Member Avatar for therock4u

That's because when you provide Chinese instructions to an OS that understands only French it won't understand. :)

Member Avatar for -Powerslave-
0
482
Member Avatar for weird86

[quote=weird86;390158] 1. from there i dont know how to save the balance into the source code... 2. i cant keep the info in a file cozzz my assignment doesnt let me do it.... 3. without saving the info in a file how to save the new balance so tat when …

Member Avatar for newbie_learner
0
145
Member Avatar for shingo99

[quote=mrdsys;331805]Hello there, im begineer too, but i found coding is not the matter, please read JCreator Help Contents, u will find [B]JC doesnt have applet viewer[/B], u must insert manually class filename into html applet template provided, then run that html file as usual, why not switch to TextPad, simple …

Member Avatar for Cort3z
0
515
Member Avatar for vikramchopda

[quote=vikramchopda;379879]Hello, I am Currently pursuing Bachelor of Science in information Technology(B.Sc I.T) from Mumbai university and in final year.As per as our Syllabus we have to do one Company Project in the final year. Can any one help me to get company project.This Project is for 200 marks Thanking You.[/quote] …

Member Avatar for neha mhatre
-1
263
Member Avatar for augie0216

If you're looking at only flowcharts here: [URL]http://images.google.co.in/images?q=flowchart[/URL] Of course a sequence diagram is another option: [URL]http://images.google.co.in/images?q=sequence%20diagrams[/URL] Then you also have state-chart diagrams (although for your case I don't think they'll be applicable). [URL]http://images.google.co.in/images?&q=statechart%20diagrams[/URL]

Member Avatar for riz17
0
183
Member Avatar for maxish

To quote masijade "You can't diagnose anything without gathering any information." - If you suspect it's something external, check the OS logs. - In case of unhanlded signals (IOW process crash) you might have heapdumps. Look for them. - At the very least add logs before and after accept(). - …

Member Avatar for masijade
0
423
Member Avatar for Savage221

Think your problem is solved. Just wanted to comment on 2 things, 1. Be careful abt the length when you use scanf(), or follow what AD says. :) 2. the design part. If you have a function that is meant to take the name as input it would be unecessarry …

Member Avatar for karthikeyans
0
270
Member Avatar for beforetheyknew

I personally found use of pre/post ++/-- operators combined with self addition / substraction quite frustrating. E.g. [CODE] int i = 0; for(; i < 10; i++) { i -= i++ - --i; //OR try this: i += ++i + i--; System.out.println("Hello World!") ; } [/CODE] Q = how many …

Member Avatar for dongbv
0
111
Member Avatar for coolguy_003

Here is a link that gives you links for function pointer tutorials. [URL]http://www.google.com/search?q=function+pointer+tutorial[/URL] Given you've already implemented stack, you already know that part. If you are looking for something more specific, you'll have to make the question specific. :)

Member Avatar for anonymous alias
0
269
Member Avatar for bertyhell

Don't know the answer to your question. But won't it be fun to write it? :) I think a tree would be quite suitable.

Member Avatar for bertyhell
0
4K
Member Avatar for sandyjain
Member Avatar for Banfa
0
161
Member Avatar for Whalesola

Well, you're not waiting for 5 minutes before doing each check so naturally you'll have so many mails.. just sleep for 300 seconds between each check ONCE you detect that DB is down. If DB is up sleep for lesser time if you like frequent checks. Other way of course …

Member Avatar for thekashyap
0
202
Member Avatar for pravatkumar

Check top and ps commands.. To export in a format, simple redirection should work (>>). To monitor continously you would either need to make it a cron job or have a loop inside the script. I guess cron is what would suite if you're monitoring some server for a long …

Member Avatar for thekashyap
0
122
Member Avatar for johndoe444

Googled: If you want more user friendly "time" instead of system & user times.. [CODE] #!/bin/bash START=$(date +%s) # do something # start your script work here ls -R /etc > /tmp/x rm -f /tmp/x # your logic ends here END=$(date +%s) DIFF=$(( $END - $START )) echo "It took …

Member Avatar for thekashyap
0
312
Member Avatar for endsamsara

someObject isn't defined. So can't really figure what're you to trying to compare to. Also you're trimming one and not the other

Member Avatar for thekashyap
0
133
Member Avatar for thekashyap

While trying to address a new requirement we wanted to provide a generic soln and pass on our pain to the customer. :) [B]Application: [/B]Say I have some application listening to a port or JMS or something where it receives some encrypted messages/requests. To process the requests it need to …

Member Avatar for ~s.o.s~
0
110
Member Avatar for lomaree
Member Avatar for thekashyap
0
31
Member Avatar for Democles

From [iCODE]man test[/iCODE] " -d FILE FILE exists and is a directory " so [CODE] if [ -d $var_containing_dir_path ]; then echo $var_containing_dir_path exists and is a directory else echo $var_containing_dir_path does not exist or it exists but is not a directory fi [/CODE]

Member Avatar for thekashyap
0
103
Member Avatar for miraj0072004
Member Avatar for miraj0072004
Member Avatar for shanie7

I remember on Solaris there was something called logadm. It used to manage file sizes (not folder). See if there is something similar in linux, if so it'll give you much more facilities without any coding. Else write a script that will check the size. If you're looking for GB, …

Member Avatar for thekashyap
0
173
Member Avatar for Bankai Hikari

Perl is supposed to be one for this purpose.. But as someone already pointed out you should use the language selected for rest of your application, unless you really have a huge amount of data to process, in which case you might wanna do it separately using a more efficient …

Member Avatar for WaltP
0
1K
Member Avatar for thekashyap

Hi, While trying to debug some performance issues, we narrowed down the problem to calls to Entity Beans taking long time. Original design is nice and generic but does not scale up in this case. Here are the details: - J2EE application. - Oracle DB - Entity Beans used for …

Member Avatar for jwenting
0
185
Member Avatar for Chetan_

Frankly I have no clue looking at the amount of code you've posted. Two things I can say: 1. On my laptop [iCODE]std::numeric_limits<double>::max()[/iCODE]is "1.79769e+308". Don't know but would this cause any issues with your sprintf() call on line 9? 2. In general when I reuse instance of some class, I …

Member Avatar for mitrmkar
0
200
Member Avatar for Obi-Won-Knewbie

To find the size of the file use ls with appropriate options. To compare the sizes use test (or if) To calculate 60% of orig size use expr. Post code if there is something..

Member Avatar for thekashyap
0
134
Member Avatar for Aprentchacker

Either post the problem you're facing or post full code so someone can reproduce it. Just looking at this much of code, finding and fixing a prob is difficult at best.

Member Avatar for Aprentchacker
0
930
Member Avatar for low1988

[url]http://www.google.co.in/search?q=java+read+file&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a[/url]

Member Avatar for thekashyap
0
115
Member Avatar for anevins

[CODE] //may be you didn't notice that valueOf is a static method. String suffix = String.valueOf(firstin.endsWith(actual)); //OR give you have only 2 values.. String suffix = (firstin.endsWith(actual))? "true" : "false" ; [/CODE]

Member Avatar for thekashyap
0
160
Member Avatar for ppotter3

Are you supposed to use your own data structure or can you use std::map? The way I see it using map would be the easiest approach. Of course if you have "huge" number of names, map may not be optimal (from memory pov).

Member Avatar for mitrmkar
0
713
Member Avatar for thekashyap

Can we have a dedicated forum for J2EE? Though it seems a bit strange that it's not there as someone must've thought of it before.. :) I searched but couldn't find any threads on the topic..

Member Avatar for jbennet
0
135
Member Avatar for valatharv

>> Question is quite confusing. Do you want to know what's the best data structure to use? Or you want to know if the function design is okay or not? What's the connection of code you posted and your question? a) Get itemName, itemLocation, status from single table on the …

Member Avatar for JamesCherrill
0
118
Member Avatar for flipjoebanana

Guess your prob is solved already.. just check if you want to use "-w" with grep as you seem to be interested in matching the word. Check out egrep if you grep doesn't support advanced stuff. Some greps support -e as well.

Member Avatar for thekashyap
0
128
Member Avatar for mona-lolly

There is nothing like "my command". In other words any executable is as good as a command to Linux. Anything whose x flag is set can be executed as a command on command line by giving full path. It's ur responsibility to ensure the file actually an executable (e.g. shell, …

Member Avatar for thekashyap
0
129
Member Avatar for ashrut

Post your code here and point to the area where you have probs.. Others would help you do it, not do it all for you..

Member Avatar for thekashyap
-1
93
Member Avatar for TheWhite

1. Matcher.group() throws IllegalStateException - If no match has yet been attempted, or if the previous match operation failed. In your case you haven't attempted to match before calling group(). So the exception. 2. If attempted match fails group() still throws IllegalStateExc... Hope the following clarifies: [CODE] package com.kash.test; import …

Member Avatar for TheWhite
0
437
Member Avatar for komyg

A batch script is a script. And a script is like any other command. So syntax is same as what you said [iCODE]./myApp `/tmp/myBatchScript.sh`[/iCODE].

Member Avatar for Salem
0
150
Member Avatar for samsons17

This won't solve your problem I guess. But this was my job interview question.. Here is what I proposed: [CODE] cout << "---------------- *" << endl; cout << "--------------*----*" << endl; cout << "------------*--------*" << endl; cout << "----------*------------*" << endl; cout << "---------***********" << endl; [/CODE] Of course I …

Member Avatar for xavier666
0
173
Member Avatar for rythman

[CODE] public void getArithmeticExceptionGettingSquareRoot() { // Your code goes here.. } [/CODE]

Member Avatar for javaAddict
0
44
Member Avatar for SCoder1
Member Avatar for Enhancelogic

[CODE]const std::string spaces(greeting.size(),'*');[/CODE] [CODE] From basic_string(3C++) basic_string (size_type n, charT c, const Allocator& a = Allocator()); Constructs a string containing n repetitions of c. A length_error exception is thrown if n == npos. The effects of this constructor are: data() points to the first element of an allocated array of …

Member Avatar for mrnutty
1
300
Member Avatar for addikted

Does this help: [url]http://www.daniweb.com/forums/post358965.html#post358965[/url]

Member Avatar for rahul8590
0
664
Member Avatar for veerasek

Sounds like a pure transformations' job. Are you supposed to use Java only? If not this is a job for [URL="http://www.google.co.in/search?q=xslt"]XSLT[/URL]. If you're forced integrate into java, you can make the transformation an ANT task and use the Java ANT runner.

Member Avatar for ~s.o.s~
0
6K

The End.