181 Posted Topics
Re: [QUOTE=softDeveloper;1722861][CODE] <%String var=request.getParameter("varname"); %> [/CODE] However, all the breaklines and whitespaces are gone when the page is displayed! I tried using the <pre> </pre> tag but no improvements.[/QUOTE] You could try [code] <%String var="<pre>"+ request.getParameter("varname") +"</pre>"; %> [/code] If that works, then you may be overwriting the PRE tags when … | |
Re: They are probably equivalent to the « ( &#171; ) and » ( &#187; ) characters. If I correctly recall my high school Spanish classes from 30-odd years back, Spanish also uses them. (Unexpectedly, DaniWeb or *something* processes the HTML character codes, so you get to see them. Also unexpectedly, … | |
Re: Look up JS' Date object and its Date.toLocaleString() method. You probably need id="..." or name="..." to identify the tags you want to change. Then you need something like: [code] function dateToLocale(inDate) { var outDate = new Date($inDate); return outDate.toLocaleString(outDate); } ... // Get a tag that may contain a date/time … | |
Re: One thing popped out at me, but it's been a while since I've written PHP code, and my memory is a little hazy. Is this line correct? [code]$login->try_log_in($_POST[userName], $_POST[password]);[/code] That is, does it actually pass the username and password into your class functions? | |
Re: That code, as present above, runs when the browser reads/renders the HTML. It won't do what you expect. First, you need to mentally separate your web server generating (maybe dynamic) HTML, your browser initially rendering the received HTML, and javascript modifying the rendered HTML later. They are three distinct things … | |
Re: Computers are dumb; you need to 'verb' the script what to do. You are executing those values; instead, you need to echo them so that the outer assignment can catch the printed value. | |
Re: With '/', php assumes American; with '-', php assumes European. But that's prolly irrelevant, since mysql wants 'formatted' date/time, not seconds since 1/1/70. Try [code]: $date = "2011/12/13 00:00"; $date2 = "2011/12/13 23:59:59"; $order = mysql_query("SELECT * FROM orders WHERE WORK='COMPLETED' AND fixed_date BETWEEN $date AND $date2 ") or die(mysql_error()); … | |
Re: Don't you have to tell mysql_query *which* database connection it is to use for the query? As in [u]mysql_query("select ...", $dbLink)[/u]? That's probably why [u]mysql_fetch_array($result) is complaining that $result is not a valid resource.... | |
Re: One possible way to do it would be to define a table of groups where each group has specific access rights, a table of users, and a userGroup table where a user can belong to more than one group. Then before allowing access to a 'channel', the program queries userGroup … | |
Re: Sure looks like you want to use python scripting, not shell scripting. You might get more relevant and useful answers if you ask in the python forum. | |
Re: Putting an upper bound on a program's run time is a PITA in most shells. But it can be done. Here's a bash script that demonstrates the method with only (I think) 6 extra lines of code. I imagine a clever programmer will figure out a way to make it … | |
Re: Review the tutorial shibbelz posted. I *still* use a 1988 edition of "The AWK Programming Language" as my primary (only) AWK reference manual. Without finishing the project for you (meaning the following will be somewhat cryptic): [list=1] [*]The whole program must be in {} braces. [*]Compound statements are enclosed in … | |
Re: [code] <?php print<<<END <script type="application/javascript"> function hello(clicked) { alert(clicked); return false; } </script> <input type='button' name='Release' onclick='hello("You clicked!");' value='Click to Release'> END; ?> [/code] This is probably closer to what you wanted. 'Onclick' functions must be javascript functions. 'Echo' doesn't exactly work well in HTML; you build HTML/Javascript with PHP. … | |
Re: Edit ~/HW_files. Put the path to each filename and dirname you want to save in it, one file/dir per line, relative to the HW dir. For example, suppose HW contains files a, b, c and d and directories x, y and z, and z contains files za, zb, zc and … | |
Re: Also, something that isn't always obvious, awk operates on its input. Even if you fixed the quoting, it'll 'hang' waiting for input from the kbd. If you: [icode]echo | awk -v awkvar="${SHELLVAR}" '{print awkvar}'[/icode], then you might get the operation you expect. I still trip on this on occasion even … | |
![]() | Re: [list] [*]The '|| :' in line 36 is a bit odd, but is probably valid syntax. [*]Does the script behave any differently when you run it with bash (or change the first line to '#! /bin/bash'? You might be using bash-specific syntax and /bin/sh might not be a symlink to … |
Re: [QUOTE=viperman224;22066]I'm not sure if this is the right spot to put this. I was wondering how would you create and operating system like linux or windows or novell. What programs would you use. I've always wondered how it was done. I would love to learn to create my own.[/QUOTE] Hmmm. … | |
Re: Your operator error condition should be the final else: if the operator hasn't been handled by that point, the user needs a wheelchair because she entered an invalid operator. It isn't this, or that, or the other thing; ergo it's an invalid op. You might find the 'case' statement with … | |
Re: This might be along the lines of what you were looking for. [code] #! /bin/bash while : do read a <&4 || break read b <&5 || break set a col3=$3 set b col2=$2 echo $(($col3+$col2)) done 4<datafile1 5<datafile2 [/code] However, bash can be awkward handling multiple files. Perl or … | |
Re: [QUOTE=egmik3;772975]... Here is the line I would need commented. (no this is not all that is in my crontab) [CODE] */5 * * * * /opt/watchdog/startwatchdog.sh [/CODE] Any help would much be appreciated!![/QUOTE] The following should do the trick quite easily. To comment out the line: [code]crontab -l >/tmp/crontab.a sed … | |
Re: [QUOTE=VernonDozier;1529042]... I'll put Abe at the top like just about everyone else.[/QUOTE] I would tend to put Lincoln well down in such a list. He had a strong tendency to shred the Constitution. Communists, socialists, fascists, anarchists and other anti-republicans have been poking and chipping away at the Constitution for … | |
Re: [QUOTE=frogboy77;1451378]It appears to be the case of those who can, do, those who can't, teach.[/QUOTE] And those who can do neither, enter politics. | |
Re: You don't do it in the echo. You break the one echo statement into two echos with a foreach in between, something like: [code] echo '{status:1,id:'.$row['itid'].',price:'.$row['item_price'].',txt:'\ \ <table width="100%" id="table_'.$row['itid'].'">\ <tr>\ <td width="20%">'.$row['item_title'].'</td>\ <td width="10%"><select name="'.$row['itid'].'_cnt" id="'.$row['itid'].'_cnt" onchange="change('.$row['itid'].');">\ <option value="1">1</option>\ </select>\ \</td>\ <td width="15%"><select name="'.$row['itid'].'_cnt" id="'.$row['itid'].'_cnt" onchange="change('.$row['itid'].');">'; $options = array("1" … | |
Re: [QUOTE=JessieJ;1176357]...MY ANSWER: REM stuff here......... xcopy C:\myFiles C:\myFilesBackup /E /Y Am I on the right track? Thank you[/QUOTE] That is a fine tentative start. Without doing the work for you, a google search for "ms command batch howto" yielded [url=http://www.computerhope.com/batch.htm]ComputerHope.com[/url] which is an adequate reference to that which is possible … | |
![]() | Re: [QUOTE=prakash_d13;1314370]i have two isp line it possible to configure two isp's if one line goes down net will working throught 2 line 1->-ISP(pri) =====> LAN (192.168.1.2/254) 2->-ISP(sec) how to configure give me solution[/QUOTE] Smoothwall Express 3 is designed to work with only one ISP. Modifying it to work with more … |
Re: [QUOTE=stharmon;70139][code]echo -e "\033[1m \n\t Installing courier-imap... \033[0m" sleep 2 cd /var/src tar -xjf tar/courier-imap-2.2.2.20040207.tar.bz2 cd courier-imap-2.2.2.20040207 # build as vpopmail chown -R vpopmail:vchkpw ../courier-imap-2.2.2.20040207 [B]su - vpopmail[/B] ./configure --with-redhat [/code] ... Does anyone have any thought as to how I can successfully SU and keep the script running?[/QUOTE] To actually … | |
Re: Should you want a longer description.... The following assumes that the target company actively works to prevents software bugs from getting out the door. A software/system tester will be miserable in any company that throws software/systems over the wall at customers as soon as it compiles. A tester has two … | |
Re: [QUOTE=beanryu;942593][CODE] <div id="mydiv"> <p>first</p> </div> [/CODE][/QUOTE] Since you have the web page (web site), can't you:[code] <div id="mydiv"> <p id="mydiv_p1">first</p> </div> [/CODE] In other words, have your code that creates the <p> assign an ID to it. Fetching the .innerHTML of that <p> will be trivial once it has an … | |
Re: Other than the unclosed double-quotes in the <a> tags, I don't see anything too terribly wrong, though it may be bad form to have spaces around the "=" in the anchor tags. | |
Re: write your select, order it in reverse order (o what you want is first) and add 'limit 1' at the end of the statement. That will give you exactly what would have been the last record before the change. Sorry, I couldn't think of a way to demonstrate this in … |
The End.