Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Lv 31,013 points

Gehan G

Favorite Answers34%
Answers136
  • Use PHP to control server settings?

    I understand security risks and input validation etc. I'm looking for a short and quick proof of concept script. This would be on a linux system, I assume PHP would be easiest but if you can do it in html or JS easier by all means....

    I want a web page with two buttons, one starts the telnet service, and another shuts it off. Maybe even a label that shows the current status of said service at page load time if you want to go the extra mile.

    This script isn't going to be used live, i'm using it to wrap my head around php security layers.

    I'm not sure if: php can/should directly execute the service start/stop command. Or should there be two scripts, one to start, and one to stop the service, and the php buttons just kick off the scripts. If so I assume that the scripts should remain in a non-web readable directory with read-only permissions.

    Thanks for your time!

    Happy coding!

    3 AnswersProgramming & Design1 decade ago
  • linux sendmail intermittent fail 533 code?

    I use sendmail to send emails from a terminal.

    I notice that about half of them fail. They are all to the same address. Sometimes it goes through. Other times it bombs. I could understand if it was always rejected, or always let through. Why does it get rejected only part of the time. And what can I do to fix it?

    Diagnostic-Code: SMTP; 553 5.1.8 <name@domain>... Domain of sender address me@localhost.localdomain does not exist.

    Google searches say to add a fake (but existing) domain name to the from address, but I can't figure out how to do that.

    1 AnswerProgramming & Design1 decade ago
  • trouble with cron job (linux)?

    I'm having problems with a cron job. (it will run every night, for testing I have it every minute)

    I started with: * * * * * /usr/bin/java /root/runProg

    but it kept bombing "class not found error" (can't find class path)

    So I created a script and changed crontab to: * * * * * /root/test

    /root/test is:

    #!/bin/bash

    cd /root

    java runProg

    If I 'SU' and type ./root/runProg it runs fine (the java program runs some linux commands via Runtime.getRuntime().exec() method, gathers the output and emails it to an outside email address).

    I check my mail and everything looks great.

    The problem is a minute later when cron executes the job, I get a blank email.

    All the time cron runs I get blank emails, whenever I execute it myself it works.

    I thought cron runs as root, second. I don't see any error messages. As far as the system is concerned the program ran the email was sent. It's just blank, no error messages in mail or logs.

    1 AnswerProgramming & Design1 decade ago
  • How to transverse table cells (javascript)?

    I took my code and boiled it down to the simplest case:

    //get all rows in yard table

    var all_td = document.getElementById("yard").rows;

    //loop through each row

    for(var i=0;i<all_td.length;i++)

    {

    //loop through each cell in the row

    for(var ii=0;ii<all_td[i].cells.length;ii++)

    {

    //reset the cell background to white

    all_td[i].cells[ii].style.backgroundColor="White";

    }

    }

    //*/

    That code works, however when I try to simplify it to this code it does not work.

    /*

    //get all rows in yard table

    var all_td = document.getElementById("yard").rows;

    for(var x in all_td)

    {

    for(var y in x.cells)

    {

    y.style.backgroundColor="White";

    //tried these too

    //x.y.style.backgroundColor="White";

    //all_td[x].all_td[y].style.backgroundColor="White";

    }

    }

    //*/

    I know the for-next works, but why doesn't the for-in?

    Also, should I even be using a for-loop?

    Is there a newer standard way to change all of a tables cells background in one shot?

    (Just changing the table.background won't work because some cells have background styles applied to them)

    1 AnswerProgramming & Design1 decade ago
  • javascript file input (how to)?

    I'm having a brain freeze. I can't seem to figure out how to do this, it should be easy.. famous last words. (I don't have PHP, perl, etc)

    Using HTML and Javascript print the contents of a file to screen.

    I have a .txt file in the same folder as my html file (both on the server). It contains one sentence.

    I want to dump the contents of the file using javascript to a div in my html body.

    For instance I want to be able to leave the HTML alone and edit the txt file periodicly to change the web sites message of the day.

    For somereason I can't find a good google answer to "javascript file input". I do a lot of programming so I should be able to do this off the top of my head but for some reason i'm stuck... stuck good....

    1 AnswerProgramming & Design1 decade ago
  • How do I create a factory restore disk(vista) from my recovery partition (HP)?

    I have acquired a Compaq V6000 laptop. The first thing I tried to do was make a set of recovery DVD's. However it said they had already been created, only 1 copy was allowed. So I figured I could reset that. I booted up holding down F11 to boot the recovery partition and wiped C: to factory specs. Then I tried again to make the DVDs. Still said the same message. Tricky Tricky.

    I then installed DriveImage XML and took an image of the recovery partition. I swapped in a spare hard drive and formatted it with C and D (roughly same size). I pushed the image on to D: and tried to boot from it. It only boots to a flashing cursor, It won't start the recovery program. I made sure D was active, primary, etc... No go. I can see when I look at D: all the files are there, so I don't think it's a problem with the image, or image restore. I have a feeling it is some protective check that recognizes it's not the original hard drive and thinks i'm trying to pirate windows.

    So my question is, since the original drive is intact, with a working recovery partition, can't I make my own recovery DVD? Why do I need the program to make it for me, can't I just pull out the files and burn them to a DVD myself (a bootable dvd)?

    How would I go about doing this? What files would I need, etc...

    2 AnswersOther - Hardware1 decade ago
  • 95' civic ex, idle swings rapidly at stop signs.?

    Every once in a while (three times in 2 months) my honda civic will act funny. I'll start it and head to work, at the end of my street (1/8 mile) when I hit the stop sign my idle will suddenly start swinging from real low to about ~2.5 k like i'm gunning the engine yet my foot is off the accel.

    If I pull away it drives fine until the next stop sign. The first time it happened I shut my car off right away, and let it sit a minute and re started. It seemed to fix it. The second time I kept driving and it went away after about 2 miles. This time I sat at the first stop sign and tried different things, I tried staping on the accel and revving up to 5k but that didn't fix it. I tried putting it in reverse then 1st gear, didn't change. (Manual trans). It only happens when the clutch is pushed in. And not right away. I started it in my driveway and it idles fine, pulled down the drive and 30 yards to stop sign, fine, drive down to end of next street, maybe 1/4 mile, and that's when it starts, I have about 4 lights over the next 5 miles and last time by the last one it had cleared itself up but I'm sure this is something that should get fixed before it gets worse..

    Any ideas on what it could be?

    4 AnswersMaintenance & Repairs1 decade ago
  • Does the sunroof open (2007 Hyundai Tiburon SE)?

    I've seen a bunch of pictures of 2007 Hyundai Tiburon SE, but I've never seen one with the sunroof open. I've seen them open on the GS model, but never the SE.

    Does it open?

    1 AnswerHyundai1 decade ago
  • Honda Civic Engine Squeal?

    My 1995 honda civic ex won't start, It just makes this grinding squealing sound. This has been almost a week now. I've tried to start it a couple times, not the battery is almost dead.

    http://www.youtube.com/watch?v=C4VUzfuMP8E

    3 AnswersOther - Cars & Transportation1 decade ago
  • How many ohms do I need for my circut?

    I have a device which takes 12V 2A to run.

    I have a power supply which outputs 12V 150A.

    I can't remember if the 150A is potential or actual. For instance my power supply is capable of putting out 150A but since my device only draws 2A I can safely connect them and the power supply will only send what is needed (2A) and everything is ok?

    OR

    If I wire them up my device will fry because of amp overload (IE: the device is expecting 2A and get's blown away because the power supply always sends out 150A)?

    If my device is going to blow, can I add a series of resistors to step the 150 down to 2 amps and still keep it at 12 volts?

    3 AnswersOther - Electronics1 decade ago
  • Which java statement is more efficient.?

    Does the creation of a new variable and it's subsequent repeated retrieval, cost more CPU time then repeated calls to the length property of an array, without declaring a new variable.

    int[] a = new int[400];

    test1()

    {

    int x = a.length()-1;

    System.out.println(x);

    System.out.println(x);

    System.out.println(x);

    System.out.println(x);

    }

    test2()

    {

    System.out.println(a.length()-1);

    System.out.println(a.length()-1);

    System.out.println(a.length()-1);

    System.out.println(a.length()-1);

    }

    2 AnswersProgramming & Design1 decade ago
  • Why is my manual transmission so stiff lately?

    I have a 1995 honda civic, man trans, 90k+ miles. Usually the stick is very easy moving. Hardly any effort to shift while driving, very easy play when out of gear. Doesn't grind or pop out of gear when driving, clutch doesn't slip or grind when changing gears at any speed. I have owned since 95.

    Today I got in my car and as soon as I started down the driveway I knew something was wrong. The stick felt like it had a weight hung on it, or it was stuck in a bucket of wet cement, just a general stiff, hard to move. I still doesn't grind, not hard to get in or out of gear, but slow moving. I stopped at aamco on the way to work, I thought bad trans problems.They said the fluids looked fine and that happens to high millage cars?

    I can understand gradual wear but all of the sudden one day, boom, it's stiff?? Is there something else wrong?

    (chicago weather 50s not freezing)

    7 AnswersMaintenance & Repairs1 decade ago
  • How do blood sugar tests work, scientifically?

    I'm not sure if this should be in science - chemistry or health - medicine.

    All my searches keep taking me to insurance companies and doctors offices. I was hoping someone can help me locate information, I'm looking for specifics here.

    I know blood sugar monitoring usually involves a test strip coated with a reagent. This reagent changes colors in reaction to contact with glucose and the machine just evaluates the color of the paper and converts that color in to a number. I think....

    My questions are: what is the most common reagent, what will it react to (glucose, sucrose, any other polysacharides?). How sensitive is it? How do the new machines that don't use test strips work?

    Could I in theory test pop with a home blood sugar monitor? What would happen if I tested coke vs. pepsi. Would I be able to tell which is more sugary? Obviously the number wouldn't be anything but if one has a higher number would at least be an indication right?

    3 AnswersMedicine1 decade ago
  • I saw a viral video on tv and can't find it online.?

    I was watching one of those viral video shows on TV where they show youtube like online vids. One of them was Karl Rove on an island singing a duet with George Bush. I believe the song was total eclipse of the heart. I've searched google, yahoo, and youtube. No luck.. Can anyone find me this video online?

    1 AnswerComedy1 decade ago
  • Help me select a voice recorder?

    I know mini tape dicaphones have been out of style for quite some time, moving on to small digital models. I need help selecting a model with these requirements:

    It will be used to record college lectures. I have 3 classes on one day so It should be able to record at least 9.5 hours before having to be unloaded. Preferably via usb to computer, but a line out to a soundcard mic in will do in a pinch.

    I use rechargeable batteries so life span isnt so much an issue is long as one charge will support at least 3 hours continuous recording. I can change batteries before every class if need be. But 3 hours battery, and 9+ hours recording is a must.

    Any suggestions?

    1 AnswerOther - Electronics1 decade ago
  • Can you enable content advisor on IE 6 for select users only?

    I have a computer (win xp pro) with 3 user accounts. Two admins and one user.

    When I log in to the user account, and run internet explorer it tells me I must be an admin to adjust content settings (good!). Then I click 'run as' (as administrator) and go set up the content settings. Then I log out of windows and back in under my wifes name (whos in the admin group)

    It now blockes her from sites. I know that all she has to do is enter the password but I was hoping there was a way to turn on content advisor for certin users, or even the whole users group, yet have it disabled for one or all members of the adminstrators group?

    Also if my wife disasbles it under her account (being an admin) it's also disabled for all users, including the one user account which we're trying to block...

    Any ideas on handling this?

    2 AnswersSecurity1 decade ago
  • Proper english usage for yours in plural?

    If I have one person with me and I take two pens from him I can say to him:

    I have both of your pens in the other room.

    However if I have two pens, from two people I can still say:

    I have both of your pens in the other room.

    How can I convey the fact that i'm talking to both of them about mutilple pens? From what I remember of german language there is a different word for yours in the single or plural, I have diese pens or I have eure pens...

    Is there an equvilant for the english language?

    5 AnswersWords & Wordplay1 decade ago
  • How can I stop the microsoft warning bar in IExplorer?

    I have a local html file on my desktop that I wrote in notepad. It does some daily task I need at work and uses a bit of javascript.

    When I open the file the IE information bar pops up warning me that I'm about to use scripting and I have to click it and approve of it before the file will run.

    I know I can shut off the information bar but I don't want to do that. I'd like to know how to add this one particlar file to an approved list so that I don't have to approve it every time I open it (10 or more times a day).

    Any ideas on how I can go about doing that without turning off the security all together?

    3 AnswersSoftware1 decade ago
  • Where can I find linux user groups?

    I'm looking to meet like minded people who are into linux or computers as a hobby. Preferably any clubs or user groups that live or meet near hobart or valpariaso indiana.

    Where I can find a list of computer groups that meet in person in my area?

    3 AnswersOther - Computers1 decade ago
  • Why can't you use CSS to redefine tags?

    Well the obvious answer is because CSS was ment to be a "visual" descriptor only effecting style of data.

    Is there another format I can use to accomplish this type of code:

    Two things I need first off I want to be able to set any property of any tag, globally. One unsupported that comes to mind is the frame tag. (I'm not using frames, don't give me crap about "frames are bad 'mkay", I'm using it as in example)!

    Why can't I have an external stylesheet linked from all my html pages having

    frame{

    border:0;

    }

    this doesn't work becuse frame is not a recognized tag via CSS. as are a few other tags. This forces me to put border=0 anytime I have a frame element. This is a waste of space/code. Any tag that has a property should be able to be set somewhere so if I want to change ALL instances of a tag property I only have to do it in one place!

    Second thing I would like to to rename a tag: for instance

    4 AnswersProgramming & Design1 decade ago