Anyone who has developed file upload progress bar with following:
Ajax
Javascript
HTML
C based CGI
I am stuck at one point.
I am not able to read each updated progress bar value from CGI script.
In order to test how a program reacts when system resources become scarce (mainly the CPU but I'm interested in disk I/O too), I'd like to put an arbitrary load on the system.
Currently I'm doing something like this:
#!/bin/bash
while true
do
echo "a" >> a.txt
md5 a.txt
done
I could also start mp3-encoding audio files, or whatever.
What would be an easy and small Bash script that could be used to simulate an arbitrary load, ideally configurable using parameter(s)?
I included the full page that has Coda slider (including header and scripts) inside a tabbed ajax script, but it failed to load ! link below. Is it not possible to have two java scripts load in one page? Thanx
Web site here
P.S. I asked the question in another post, but I got an answer that fixed things partially so I thought by accepting the answer the post is closed.
Hi guys,
I hope you can help me with this problem :). I'm looking for a script which allows me to display a dynamic bubble on a link hover by jQuery.
I would to to define a hidden div with the content and display it on a hover of certain link (always in the middle of that link and it should disappear when you leave the link OR the box with your cursor).
Something like this (sorry for such poor illustration :D):
Thanks a lot for your help!
I have started a service daemon , by running the binary(written in C++) through script file stored rc5.d .
But I am not sure how to capture the pid of the daemon process and store it in pid file in /var/run/.pid . So that I can use the pid for termination.
How can I do this?
Hi,
I would like to create a powershell script generating a report showing all compressed files/folders on remote servers. By compressed files I mean files compressed using the buildin Windows Compression utility, not zip. But I have a hard time figuring out how to localize the compressed files. Should I go with WMI or?
Thanks
Frank
I often have to modify files such as sysctl.conf, and I'm familiar with using sed to replace existing values.
Is there a way to append the new key/value pair to the file if sed wasn't able to replace it?
For instance, using this example: modify config file using bash script
sed -c -i "s/\($TARGET_KEY *= *\).*/\1$REPLACEMENT_VALUE/" $CONFIG_FILE
How could I add the $TARGET_KEY = $REPLACEMENT_VALUE new line to $CONFIG_FILE using the same sed expression with slight changes?
And on a related topic, how can I force creation of $CONFIG_FILE if it didn't exist?
Hi all,
I am looking to automate the changing of passwords across multiple services and servers. For example: I want to change the root paassword to all of my web servers at once. I am thinking of writing a ruby script, but have you guys run across anything already written?
If so, would that also give me the ability to change other system passwords like Database passwords and SVN passwords.
Image tag inside email message:
<img src="http://www.mydomain.com/image.php?lastest=1">
Part of image.php script:
case 'image/gif': header('Content-type: image/gif');$img=@imagecreatefromgif($image['src']);if($img) {imagegif($img);imagedestroy($img);}
break;
But how i can do the same with this image?
http://www.anotherdomain.com/image.gif
Thanks.
I want to search for a line in a file, using regex, inside a Perl script.
Assuming it is in a system with grep installed, is it better to:
call the external grep through an open() command
open() the file directly and use a while loop and an if ($line =~ m/regex/)?
hi,
can I easily move my drupal installation from Apache to Microsoft server, or I do need to run the install.php script and reinstall all modules ?
I'm having troubles to connect it to the database, that's why I'm asking. (I get technical problems without specific error messages)
thanks
I have an iframe in b.com which attempts to grab the jQuery library from a.com [my website]. Whenever it does this I get the "Access is Denied" error in both IE7 and IE8.
I have checked out Fiddler and it doesnt show that the script is getting blocked - but IE does errors with "Access is Denied"
What is causing this prob and how to get around it ?
Thx
Hi,
I have a applescript with the following:
on open dir
tell application "Finder"
tell application "Terminal"
activate
tell application "Terminal"
do script "cd " & dir
end tell
end tell
end tell
end open
It works, and gets the directory thats dropped on it, but it cd's into cd Macintosh HD:Users:USER:Desktop:C Files:
Is there any way to replace : with / ? in applescript?
i come across http://flyspy.com/miles/ and been impress by their chart/graph(the 2 and 3 one, i dont know is this 2 consider chart/graph)
anyone know how to build it? or did they use any javacsript script to build it?
Is there any way to use OpenOffice's PyUNO without using the version of Python that comes with OpenOffice?
I mean, can I install a package (on Windows and CentOS) that uses the version of Python that's already on the server?
I'm trying to use OpenOffice in headless mode so that I can do document conversion with a script (ultimately on a hosted server running CentOS) but my development work is being done on Windows and occassionally the Mac). I'm having nothing but trouble getting this to work.
Would it be possible to run ssh-keygen without human interaction?
I have a shell script that takes care of server deployment from start to finish, but ssh-keygen is the only remaining piece that still requires my input.
Would it be possible to feed the parameters to it?
Or is there something similar to debconf-set-selections that could be used for this?
*running Debian
I have found the following script causes a segmentation fault and core in kshell on AIX. Can anyone explain why I get the following results?
Seg Fault
doOutput(){
Echo "Something"
}
doOutput() >&1
OR
doOutput(){
Echo "Something"
}
echo `doOutput()`
No Output
doOutput(){
Echo "Something"
}
doOutput()
Correct
doOutput(){
Echo "Something"
}
doOutput
OR
doOutput(){
Echo "Something"
}
doOutput >&1
I've got a DOS program kicked off by a cmd script that dumps a lot of data I'd like to track in a log file. I can easily pipe it to a file - but I need a rolling logfile.
Is there an easy way to pipe the output to a program that will generate a daily rolling logfile? (ie a new file is created for each day)
This is a question I have wondered about for quite some time, yet I have never found a suitable solution. If I run a script and I come across, let's say an IndexError, python prints the line, location and quick description of the error and exits. Is it possible to automatically start pdb when an error is encountered? I am not against having an extra import statement at the top of the file, nor a few extra lines of code.
Hi there,
I have a script to handle http requests. I'm trying to think of some of the security issues I might have with it. My biggest concern at the moment is how I can manage multiple requests from the same source over and over. For instance someone trying to shut down my system.
Do I need to be concerned or will Apache handling this issue. If not what is the best approach to take using php?
Thanks,
How would I go about creating a cross-browser script, that would intercept all events firing on
a page/browser window/DOM-tree (regardless of browser)?
What I'm hoping to accomplish is basically to get a better understanding of the different handling
of events in different browsers; I know the basic theory, but need to see to believe...
I'd like to search for tracks on iTunes using a Python script on Mac OS/X. I found a way to access the iTunes application through:
iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")
but I haven't figured out (yet) the way to perform searches. A little help appreciated.
Disclaimer: OS/X newbie here.
I have a script which displays images like this:
header("Content-Type: image/{$ext}");
readfile($image-path);
This has worked fine for weeks and now suddenly it has stopped working. The response header looks fine (Content-Type: image/jpg), I have no ending php-tag and I have made no changes to my code, server- or php-setup which could have caused this to malfunction. Does anyone have a clue as to what may be going wrong?
Thanks!
I want to parse a html-page that unfortunately requires JavaScript to show any content. In order to do so I use a small python-script that pulls the html-code of the page, but after that I have to execute the JavaScript in a DOM-context which seems pretty hard.
To make it even harder I want to use it in a server environment that has no X11-server.
Note: I already read about http://code.google.com/p/pywebkitgtk/ but it seems to need a X-server.
After moving my mod_perl site from Linux hosting to FreeBSD, I have this error in the logfile:
Your vendor has not defined POSIX macro SIGRTMIN, used at ../../lib/POSIX.pm (autosplit into ../../lib/auto/POSIX/SigRt/_init.al) line 993\n
The script just imports POSIX and utilizes some functions (ceil, etc)
How can I solve this issue ?