script

Get Text box value using Java script

Hi, I have two text boxes. Country and City. I am using type ahead in city text box. I want to show the city name according to the country which i typed. How can i pass country value using java script to my PHP function to get correct city name. ...

create an array from df command

hi all I have this script ... !/bin/sh ADMIN="[email protected]" set alert level 20% is default ALERT=20 df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do #echo $output usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 ) partition=$(echo $output | awk '{ print $2 }' ) if [ $usep...

Writing XML data from URL to Object in SSIS Script Task

I have this URL where there is XML data. I have to extract that data from URL and dump it into DW table. I am using SSIS Script Task for that. This is how the data looks like: -<currency> <csymbol>AED</csymbol> <cname>United Arab Emirates Dirhams</cname> <crate>3.6732001305</crate> <cinverse>0.2722421770</cinverse> </currency> −...

SQL script for incrementing dates

Hi, I am not sure how to make an automaticed script that incrments all dates in a database. I was asked if the date is Friday, the script needs to increment the next business date to Monday, so I will need some logic in the script. This can be easily done in C# or any other programming language. But, I was required that the script must ...

Bash: not absolute script #! interpreter?

Is it possible to say to a script to search an interpreter not in an absolute location, but in his path? example: Having to write #!/usr/bin/php is totally retarded: what if the user have php installed somewhere else? Just writing #!php does not automagically works, of course, and I couldn't find anything about it, they just all treat...

Nmap in a bash script / only check the "80" open ports...

Hi, I'm completely new to bash scripting and I'm trying to get this working: Scanning an ip range for finding devices with the port 80 open... I think it has to look like this: #!/bin/bash echo ----------------------------------- for ip in 192.168.0.{1,.255}; do nmap -p80 192.168.0.1 if #open; then echo "{ip} has the ...

No result on standard output when running expect

Whenever I try to run the script it doesn't show me any result on standard output. #!/usr/bin/expect -- send [exec tail -f /var/opt/jboss/log/jbossall.log | grep -i "pattern"] Please advise the reason. ...

Integrate Auto Scroll Into Scrollable Script

I have a customized version of scrollable script from jQuery Tools here: http://www.ghostpool.com/dev/1/wp-content/themes/intelligible/js/unpack/tools.scrollable.js I'm trying to integrate their auto scroll plugin into this but cannot get it to work. It must be missing something from the original scrollable script here: ghostpool.com/de...

bash alias with argument and autocompletion

I have a bunch of scripts in directory that exists on the path, so I can access each wherever I am. Sometime those are very simple util scripts that "vims" the file. From time to time I would like to quickly see the content of script file and see path to file the script opens (then make cat, grep ...). I would like to make an alias whi...

Need to run a long php script from a browser

I created a script that gets data from some web services and our database, formats a report, then zips it and makes it available for download. When I first started I made it a command line script to see the output as it came out and to get around the script timeout limit you get when viewing in a browser. But because I don't want my user...

problem in wikipedia api

I have problem In wikipedia api I use this php script <?php $xmlDoc = new DOMDocument(); $xmlDoc->load("http://en.wikipedia.org/w/api.php?action=query&amp;prop=revisions&amp;titles=New_York_Yankees&amp;rvprop=content&amp;format=xml"); print $xmlDoc->saveXML(); ?> & I have this result in browser .... why? Warning: DOMDocum...

how to automatically click a href?

i got videos list using AJAX, and me want to play a top video an a light box? so after viewing list how it is possible to play video automaticaly? ...

Bash script process name regex

I'm trying to regex process id's based on parts of a process name. It seems to work if I only do a single word, but it fails when I try to do something like: find me any process with path /beginning ** /endswiththis/ Here's what I have so far: QUEUE_PID="$(ps -ef | grep endswiththis | grep -v $0 | grep -v grep | awk '{ print $2 }')"; ...

Fade In Fade Out Problem with a Image Gallery

I am using a image gallery in WordPress, images are fetching from database and displaying it into front end. In my case a big image container, and three image thumbnail, I want, when when i click on the thumbnail of the image the previous image which in container goes fade out and clicked image set in to image container. My Html Mark...

How to define apache's logrotation's file name using an external shell script

Guys, I have apache running on different servers, I would like to rsync log files back to a centralised server on a daily basis. I can use log rotate to create log file for a day and put it in a directory that gets rsync'd to the central server. However is there any way to set the log filename with a designation that could be read from ...

how to run CGI script with parameters from console

Hi, I've wrote CGI script for www. This script expects two parameters through GET method, multiply these numbers and write result into the file. mult.cgi?m=1&n=2 But now I want to use this script from console too. I'tried something like ./mult.cgi?m=1&n=2 But it didnt work, how can I send parameters to script? thanks. ...

Avoid unresponsive script warning in xulrunner

In link text someone is advicing to change dom.max_script_run_time to avoid the unresponsive script warning. When we do that firefox add user_pref("dom.max_script_run_time", 100); extra line. In order to do that in xulrunner I edited to the xulruenner.js file to add pref("dom.max_script_run_time", 100); Can someone please confirm if ...

Regex query with Google spreadsheet scripts

Hi, I'm trying to finish off a Google script to reformat a field that I would ideally like to turn into a hyperlink. This is the common format of the text in the spreadsheet: tistaff: other sections: person: randomname This is how I would like it to appear: <li><a href="http://www.thisisstaffordshire.co.uk/topics/person/randomname"&...

TextWrangler: lowercase in quotted text ("NeeD LoWerCase THis")

I need to convert the text inside quotes to lowercase (and leave unchanged all other text). How to automate it? Would be thankful for script or step-by-step solution. ...

How to tell if PHP is running under a browser or was invoked as a standalone script

Hi, What would be the cleanest method to tell if PHP has been invoked via a POST for example and not from html (under a web broser) Thanks, ...