Jump to content

backyard

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

backyard's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I can add the ' without a problem just by $vhook = "\'/usr/lib/watermark.so -f /home/images/image.png\'"; The problem is it doesn't get parsed properly thus I get an error saying '/usr/lib/watermark.so not found. Emphasis with the '
  2. Actually the server is Centos 5.2. I've tried everything I could think of. I thought maybe I could use escapeshellarg to add the ' ' around the statements but this didn't work.
  3. I'm have a video script and I'd like to add a watermark to the video using vhook. The problem I have is the exec command isn't properly handling the ' in the ffmpeg command. ffmpeg -i test.mp4 -vhook '/usr/lib/watermark.so -f /home/images/image.png' output.flv I found someone that had the exact same problem and they said they figured a workaround but the didn't post it. https://lists.mplayerhq.hu/pipermail/ffmpeg-user/2008-June/015818.html
  4. Did you get a choice on boot? Windows and Fedora. I suspect you need to reinstall grub and try again.
  5. Hello all, I'm trying to pull all the matches of ! characters then space. I've wrote a regexp that I thought would work but does not. I ran it through eclipse and looked at the variables and didn't get what I wanted. The language is php. $r="!goog jkdfkjdsf !hon kasjd !ggg dksjlajd !goh jhsdjhsadhd !hon kjkljjlk !bbb" preg_match_all('/!.+[ ]/',$r,$matches); // search for ! one time then any number of characters then space //output matches[0] = !goog jkdfkjdsf !hon kasjd !ggg dksjlajd !goh jhsdjhsadhd !hon kjkljjlk //desired output matches[0] = !goog !hon !ggg !goh !hon !bbb I can't figure out what I'm doing wrong. What am I missing?
  6. Thanks that solved my problem. I knew it was missing I just didn't know where to add the underscore to me expression.
  7. I've been using a redirect on my site for years without issue. Someone registers a username with an underscore and now for the username with the underscore doesn't work. Options +FollowSymlinks Options -Indexes RewriteEngine on RewriteRule ^([a-z0-9]+)$ /?L=users.profile&id=$1 [r=301,nc] so if I enter www.mysite.com/username it works with a redirect to users.profile&id=username now the person with an underscore in the username gets a not found error. www.mysite.com/user_name Naturally, the underscore may or may not be there and there could be multiple ones in any position. Does anyone know if this can be fixed?
  8. I just want to make sure I understand the NULL column in my database. Is it fair to say if it says No then that means that the entry for that field cannot be null so the cell will be filled with some value even if it's left blank. Also, is there any serious consequences if I change this to NULL? I have a pulldown entry input form and the default choice is blank on the html side even if someone leaves the pulldown in the default position the cell value automatically gets entered with the next value down since it's not null. Also, is there any restrictions on type when you select NULL as the field is currently set to varchar. Thanks
  9. I saw some other people posted questions about bash on this forum in "other languages" so I figured I'd give it a shot but I'll look for another forum though.
  10. Okay, forgive me I'm bit of a hack. I have a mythtv box running on Fedora and I wrote a script to kill the frontend and to turn off my monitor. I found two separate scripts that each worked independently and I've tried merging the two together but it's not working as planned. The monitor will shut off but the script exits without killing the frontend. The frontend is the GUI that allows you to select what you want to do on myth. The reason I want to kill the frontend on shutoff is so the TV won't still be recording while gone (WAF). I'm posting the original scripts and the merged script. Original: #!/bin/bash PROG=mythfrontend STATUS=`ps -e | grep $PROG | grep -v grep | wc -l | awk '{print $1}'` if [ `echo $DISPLAY | grep -c ":0"` -ge 1 ] then if [ $STATUS -eq 0 ] then ( $PROG -d & ) touch /video/mytharchive/mythtemp/mythpowerbutton-on; else if [ -a /video/mytharchive/mythtemp/mythpowerbutton-off ] then touch /video/mytharchive/mythtemp/mythpowerbutton-on; exit; else touch /video/mytharchive/mythtemp/mythpowerbutton-off; sleep 3; if [ -a /video/mytharchive/mythtemp/mythpowerbutton-on ] then rm -rf /video/mytharchive/mythtemp/mythpowerbutton-o* && killall $PROG fi rm -rf /video/mytharchive/mythtemp/mythpowerbutton-o* fi rm -rf /video/mytharchive/mythtemp/mythpowerbutton-o* fi fi exit 0 Merged: #!/bin/bash PROG=mythfrontend STATUS=`ps -e | grep $PROG | grep -v grep | wc -l | awk '{print $1}'` #frontend running variable STATUS2=`xset -q | grep "Monitor is" | awk '{print $3}'` #screen on variable if [ "${STATUS2}" = "On" ] then xset dpms force off if [ `echo $DISPLAY | grep -c ":0"` -ge 1 ] then if [ $STATUS -eq 0 ] then ( $PROG -d & ) touch /video/mytharchive/mythtemp/mythpowerbutton-on; else if [ -a /video/mytharchive/mythtemp/mythpowerbutton-off ] then touch /video/mytharchive/mythtemp/mythpowerbutton-on; exit; else touch /video/mytharchive/mythtemp/mythpowerbutton-off; sleep 3; if [ -a /video/mytharchive/mythtemp/mythpowerbutton-on ] then rm -rf /video/mytharchive/mythtemp/mythpowerbutton-o* && killall $PROG fi rm -rf /video/mytharchive/mythtemp/mythpowerbutton-o* fi rm -rf /video/mytharchive/mythtemp/mythpowerbutton-o* fi fi else xset dpms force on if [ `echo $DISPLAY | grep -c ":0"` -ge 1 ] then if [ $STATUS -eq 0 ] then ( $PROG -d & ) touch /video/mytharchive/mythtemp/mythpowerbutton-on; else if [ -a /video/mytharchive/mythtemp/mythpowerbutton-off ] then touch /video/mytharchive/mythtemp/mythpowerbutton-on; exit; else touch /video/mytharchive/mythtemp/mythpowerbutton-off; sleep 3; if [ -a /video/mytharchive/mythtemp/mythpowerbutton-on ] then rm -rf /video/mytharchive/mythtemp/mythpowerbutton-o* && killall $PROG fi rm -rf /video/mytharchive/mythtemp/mythpowerbutton-o* fi rm -rf /video/mytharchive/mythtemp/mythpowerbutton-o* fi fi fi exit 0; Can someone tell me what I'm doing wrong?
  11. I have a registration page and on the registration page I have some pull downs with one of them being the year along with username and password setup. So for example, I have a line that says Year of Car: [pull down menu] with the values in the original posting so when someone views the page it'll say Year of Car [2010] where 2010 is the first value. Most people select the year of their car and this entry gets added to the database when they complete the registration process; however, some people don't select the year of car and the default entry of 2010 gets added to the database. I don't want this since the person doesn't really have a car made in 2010 as I'd rather have it left blank. What I want to happen is if someone doesn't select an entry I'd rather have a blank entry entered instead of 2010. How can I do this? The only thing I can think of is add a prefer not say as the top entry or something.
  12. Hello All, I did some customizing of a script for my web site which works well. I just need to change one thing but I'm not sure how to do this. I have people fill out a questionnaire when registering and then these values are inserted into my database. The only problem is if someone doesn't fill out the questionnaire the script inserts the top value of the pull down menu (2010) into the database. I know I could check to see if they filled it in but it doesn't really matter if it's blank as they could fill it in later. Here's the code. <tr> <td width="150" align="right" valign="top"><strong>The year of your auto: </strong></td> <td align="left" valign="top"><select name="year" id="year"> <option value="2010">2010</option> <option value="2009">2009</option> <option value="2008">2008</option> <option value="2007">2007</option> <option value="2006">2006</option> <option value="2005">2005</option> <option value="2004">2004</option> <option value="2003">2003</option> <option value="2002">2002</option> <option value="2001">2001</option> <option value="2000">2000</option> <option value="1999">1999</option> </select> </td> Does anyone know how to solve this?
  13. Hi, thanks for the help. I'm a bit confused on what goes where. I have <a href='#' onclick='select("MyAjaxRequest('main', '?L=tour.tour&type=start')","something")'>Something</a> Also, how do you add the special characters is it like php where you change ' to \'. Also, do I need to change anything in here. if (sel) sel.className=sel.className.replace(" sel","");
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.