- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 21
- Posts with Upvotes
- 21
- Upvoting Members
- 19
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
181 Posted Topics
Re: Actually, it's really not vague; it's merely time-consuming and difficult. Here is my idea of how it [i]should[/i] be done. It rarely is, because shipping a product is far more important than shipping a quality product. [list] [*]Identify the system under test (SUT). [*]Identify the interfaces on the SUT. [*]Identify … | |
Re: (Keeping this eternal thread going...) One of the earliest 'hardest' programs I wrote was a VAX11 assembler in VAX11 assembler. I aced that class becase it did everything exactly as DEC's assembler did except for generating code (I ran out of time). The hardest programs I've written are, in essence, … | |
Re: [QUOTE=zoollu;822443]... I have to create a shell script which copies all the id,name values from TableA and inserts them in TableB. Is this possible? Any help is appreciated. thanks[/QUOTE] To misquote an old TV show, "Of course it's possible; don't be ridiculous." :) And it's really trivial. You could try … | |
Re: It's telling you exactly where to look for the error. Hint: look at the first non-whitespace character before 'FROM'. Give up? OK. You have a trailing comma in your AS clause. (You've no idea how many times I've hit this in the past 7 years just from editting a script … | |
Re: A little late but I used to trip on this myself years ago. Like 'sh' and 'bash', 'su' starts a new shell. You have to pass your commands to that new shell. `su -c "mkdir -p /mnt/Usb; mount /dev/sdb1 /mnt/Usb" root` | |
Re: Heh. Put the right keywords in the 'keywords' and make sure they are relevant to the page's content. Then link to the site from a web site that the search engines regularly crawl. That about all SEO's do and is the best you can hope for. | |
Re: Put <pre></pre> tags around the snippet. | |
Re: This thread's a month old, but I'll opine anyway. If you're gaming and play the latest and newest games, go for the fastest, hottest processor and motherboard you can buy. At present, that means Intel if money's no object. Otherwise, if you just need good, all-round performer at a fair … | |
Re: I'll bet it is displaying exactly what's in the file; [u]/programst[/u] is exactly what you should see if there's a <CR> after [u]...user/test[/u]. Use vi to edit the file. Then enter [u]:set list[/u]; you'll probably see a <CR> (^M) in there somewhere. Or use [u]od -c script_name[/u]; you should see … | |
Re: Intelligence arises from the random mutation of thoughts (literally, random neurons misfiring randomly). It is this randomness that enables thinking outside the box and creative thought: intelligence. At present, there is only very rudimentary artificial intelligence because there is, as yet, very little random mutation of artificial neural activity. | |
Re: First, to be clear, you *can* use elements of arrays as the 'name=' in forms, as in [code] <input type="checkbox" name="slotsel[$i]" $slotchk[$i]> <input type='hidden' name="titles[$topic]" value="$titles[$topic]"> [/code]as you seem to be trying. I've been doing it for years; associative arrays also work. The result is that all the inputs of … | |
Re: Start with the errors: [code] [02/07/2012 06:54:57 PM] CSS - http://axundzade.info/templateproblem/ Inlined stylesheet Invalid value for property: background-color Line 20: .gn_header_1 { background-color:0; border:0; border-bottom:none; padding:0px; } ----------------------------------^ [02/07/2012 06:54:57 PM] CSS - http://axundzade.info/templateproblem/ Inlined stylesheet Invalid value for property: background-color Line 21: .gn_static_1 { border:0; padding:0px; height:auto; background-color:0; overflow: … | |
Re: Shouldn't your function recurse infinitely (at least until memory is exhausted)? | |
Re: Does it help to put the WHERE value in quotes: [u]... WHERE id='value'[/u] versus [u]... WHERE id = value[/u]? | |
Re: It's very similar to C's printf(). In perl, the following are equivalent: [code] print "strin%g"; printf("strin%%g"); printf "strin%%g"; printf("%s","strin%g"); printf "%s","strin%g"; [/code] For printf, the first string is the format string. Google "perl printf format"; the third result (for me) was [url]http://www.tutorialspoint.com/perl/perl_printf.htm[/url]. | |
Re: You can always read a file from a web server; serving files is its nature. But you'll need an URL to tell it which file. Look into XMLHttpRequest(). Accessing the local filesystem from JS generally doesn't work; most browsers flat-out prohibit it even if you load the JS program from … | |
Re: The easiest way to 'feed forward' data is to put it in <input type='hidden'> elements. Then each succeeding page will have all the previous answers. Put the current andswer in a normal <input> and all the others in a hidden input. If you are persistent, you can figure out how … ![]() | |
Re: It's one of those basic things where you have to learn enough of bash to be able to assemble commands to do what you want. Write your own command. :) Add this to your ~/.bashrc. I couldn't think of a better way to reference the last arg. It even handles … | |
Re: Loop through the array and create a tmp file (/tmp/tmp.sed) containing one sed expression per line, like[code] s/<a name="something1">/\\index{something_else1}/g s/<a name="something2">/\\index{something_else2}/g . . . [/code]The 'g' at the end says to replace all occurrences. Then [u]sed -f /tmp/tmp.sed < file.html > file.latex[/u]. You could do it in the script too, … | |
Re: [QUOTE=TheNNS;383569]>this pop up requires NO PASSWORD to be entered!!! only if you are an administrator. you gotta use vista before you start ripping on it. i've been running vista on a laptop and have had no problems what so ever. and mac os x has the same security feature, if … | |
Re: You know about <input type="hidden">, since you are using it. You need to use it on the second page to pass the (now hidden) value from the first page along to the third page. You also have an extra 'T' on line 21. | |
Re: This is an easy one to screw up. You forgot your HTML 101 class: you cannot write to the document after it's been written. It's not an infinite loop; it's waiting for the rest of the new HTML document you started to write. Move the "<div id='pageNavPosition'></div>" tags to above … | |
![]() | Re: In function multiply(), I changed your 'form' ID to capitalized 'Form'. That made your code work in Iceweasel (Firefox), Konqueror, Epiphany and Opera on Debian. Epiphany very usefully printed the error on stderr. For tracing and debugging JS, download [url]http://getfirebug.com/[/url]. It works well for me (I have a 10k line … ![]() |
Re: Works on Linux with a known file, running it from a shell. Change the open statement to [code] open(INFO, $file) || die "No such file '$file':"; # Open the file [/code] Also run it from a command line; you should see the errors: [code] perl -w myscript.pl [/code] Finally, double-clicking … | |
Re: Shibblez' solution explicitly converts the fields to numbers; an alternative is 'printf("%2d", $1)' which implicitly converts the var to a number. More than one way to skin a cat. :) | |
Re: Without trying to find the JS code, I'll guess. :) Add two or more questions, then select True/False for one, and all of them are changed. All three <input> tags are identical. I'll guess that the code is finding all <input>s with name = "numberAnswer", deactivating them and activating the … | |
Re: This might make it work once only: [CODE]<script type="text/javascript"> if (yahooLoaded === undefined) { var yahooLoaded = 0; } if (yahooLoaded != 1) { YAHOO.MediaPlayer.addTracks(document.getElementById("ajazload"),1,false); yahooLoaded = 1; } </scr​ipt> <script type="text/javascript"> [/CODE] But it may may it work once EVER (until the JS environment is reinitialized). More context would … | |
Re: If, as it seems, InfoArray has been defined in the global scope, just use it directly in the function. There's scant difference between passing a reference-to-an-array to a function and accessing the array directly within the function (the CPU cycles needed to push the reference to the array onto the … | |
Re: [QUOTE=fobos;1725713]Try using this website. He has a O'Reilly CD Library. [URL="http://docstore.mik.ua/orelly/"]Here[/URL] In my opinion, O'Reilly and Lynda.com are really good to learn from.[/QUOTE] Alas, that appears to be a link to the second edition (1997). A lot has changed since then. I used an old edition that I got really … | |
Re: What fobos said. Your programs are doing exactly what you programmed them to do. You are intermixing unrelated and otherwise unconnected execution environments; I still screw it up now and again after years of programming PHP, HTML and JS. Examine the HTML/JS on your browser; [i]That's[/i] what runs on your … ![]() | |
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 … |
The End.