506 Posted Topics
Re: [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. # … | |
Re: 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 … | |
Re: Post the error you are getting. | |
Re: I didn't know VB scripts work on unix?! | |
Re: 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] | |
Re: Post the script and output.. | |
Re: 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 … | |
Re: 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]. | |
Re: That's because when you provide Chinese instructions to an OS that understands only French it won't understand. :) | |
Re: [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 … | |
Re: [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 … | |
Re: [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] … | |
Re: 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] | |
Re: 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(). - … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. :) | |
Re: 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. | |
Re: That's coz you're using %f for scanning a double. Use %lf. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 | |
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 … | |
Re: [URL="http://www.google.co.in/search?q=shell+script+send+email"]STFW[/URL] | |
Re: 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] | |
Re: Try [iCODE]uname -o[/iCODE] | |
Re: use grep ! with regular expressions it should be simple enough. | |
Re: 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, … | |
Re: 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 … | |
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 … | |
Re: 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 … | |
Re: 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.. | |
Re: 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. | |
Re: [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] | |
Re: [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] | |
Re: 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). | |
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.. | |
Re: >> 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 … | |
Re: 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. | |
Re: 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, … | |
Re: 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.. | |
Re: 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 … | |
Re: 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]. | |
Re: 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 … | |
Re: [CODE] public void getArithmeticExceptionGettingSquareRoot() { // Your code goes here.. } [/CODE] | |
Re: [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 … | |
Re: Does this help: [url]http://www.daniweb.com/forums/post358965.html#post358965[/url] | |
Re: 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. |
The End.