scripting

XML Dialect for scripting robot tasks

In my next project I will have to implement an automation solution to test a hardware device. basically, the test involves an industrial robotic arm picking a device to be tested, holding it at some specified position and then using a series of other devices like motors and sensors to exercise several areas of the product to be tested. ...

Difference between script and program?

Hi, I like to know difference between script and a program. Most of the time I hear script is running , is that not a program.I am bit puzzled.Can anybody elaborate on this? Thanks ...

What (scripting) language to learn if I've already started with PowerShell ?

Some time ago I've started with PowerShell that is really great. I can code almost everyting I know, I can use .NET framework, WMI, even WIN API. Features like piping help me a lot to write manageable and readable code. V2 added advanced functions, modules, background jobs, remoting (woow) etc. As I said, I can do almost everything with...

PHP Register Script - Not working...

I just made a register script from scratch, but I'm still going to improve it. Basically I'm testing it first before I improve it - somehow, it doesn't work... if(isset($_POST['submit'])) { $username = mysql_escape_string(trim($_POST['login'])); $password = $_POST['password']; $vpassword = $_POST['vpassword']; $email = mysql...

What tools do I need to set up a script that will email around 1,000 people a day?

The email addresses are stored in a database and the number of people to be emailed each day is variable. I'm not sure yet whether the emails would need to be sent individually or as a mass email. I want recommendations as to what language to use to do this and any other components necessary in a solution. thanks ...

Sandboxed scripting

Im interested in how I could use a scripting language to execute simple blocks of code in a sandboxed manor. The host language/environment could be c#/ruby/python/java (anything but c). But the scripting language could equally be something obscure such as javascript/python/ruby/perl etc. What I want is a way of executing script with tr...

Ideas about exposing services and their properties belonging to an app as a virtual file system accessible from a simulated unix shell

I have a complex app with many components. I would like to place services in a heirarchical filesystem so that services have known names. Read only properties under a service file might for instance hold monitored stats. I hope to have a unix like shell so it can be programmable, so the user can write scripts etc. My app is all java so I...

mac unix script problem

I'm trying to write a script that breaks up a VERY large file into smaller pieces that are then sent to a script that runs in the background. The motivation is that if the script is running in the background, I can run in parallel. Here is my code, ./seq works just like the normal seq command (which mac doesn't have). and $1 is the huge...

How to read the user email address in HP QC Script Editor?

Inside the HP Quality Center Scripting Editor, I can access current user info (like user name or full name) with the "user" object. How do I access the current user E-Mail address property? ...

Redirecting to a diferent exe for download based on user agent

I own a Linux-Apache site where I host exe files for download. Now, when a user clicks this link to my site (published on another site): http://mysite.com/downloads/file.exe I need to dynamically check their user agent and redirect them to either http://mysite.com/downloads/file-1.exe or http://mysite.com/downloads/file-2.exe It seem...

is there a hack for fully functional cross-platform shebang line?

Problem: apparently the scripts in the .git/hooks directory depend on the filename matching one of: post-commit pre-commit pre-rebase etc ... No concept of "file extension" is required because the "shebang line" indicates how the file should run, as long as it is executable and running on your Linux box. The problem is when you have...

What is the proper indentation for bash scripts?

What is the proper indentation for a bash script? As a java/c++ monkey I religiously indent my code. But it seems you are not allowed to indent this code: #! /bin/bash if [ $# = 0 ] then # there was no arguments => just do to standard output. echo "there are no parameters" else cat << EOF =============================...

Scripting language for trading strategy development

I'm currently working on a component of a trading product that will allow a quant or strategy developer to write their own custom strategies. I obviously can't have them write these strategies in natively compiled languages (or even a language that compiles to a bytecode to run on a vm) since their dev/test cycles have to be on the orde...

[php] Youtube download'er in highest possible format (server side)

Welcome, I'm looking for youtube api what allow me to download youtube video in highest possible format. Few years ago this job was more simple because url had information about quality like "fmt=22" or "fmt=6" right now we are live in future and that information is embed in player. Now it's more complex... google use cache servers an...

How to run a script on server?

Hi, The defualt charset for all the datebase tables is swedish3_latin_ci I want to change it to utf8_unicode_ci I have found a script called phoca which can automatically change all the collations to utf8 How can I run the script? Thanking you in advance. ...

Passing data between running PHP scripts

For multiple running PHP scripts to communicate, what is the least memory intensive solution? Monitor flat files for changes Keep running queries on a DB to check for new data Other techniques I have heard of, but never tried: Shared memory (APC, or core functions) Message queues (Active MQ and company) ...

Have you replaced makefiles with ruby scripts?

I appreciate makefiles and make in all their glory, but I wonder if there isn't a more intuitive way to maintain my c/c++ builds. Has anyone tried replacing their makefiles with ruby scripts to allow for complex and adaptive builds without sacrificing readability? Are there gems that make this easier? ...

Remove ajax scripts from html output ASP.net

I am talking about the WebResource and ScriptResouce js files that are added to the page html. They are quite big. On some pages I don't need them, so it is safe to remove them. It would seem logical just to remove the scriptmanager, however this is not an option. Some pages use ajax based on a query string. and i use an update panel to...

Finder applescript: Odd behaviour

I'm on OSX Snow Leopard (I had the same issue on Leopard, though..) This is the applescript: tell application "Finder" to set my_from to selection tell application "Finder" to set my_to to target of window 2 tell application "System Events" to keystroke (ASCII character 31) tell application "Finder" to move my_from to my_to It moves t...

Creating feed files by writing unix shell scripts.

Hi, I don't know how to create a text feed files using UNIX shell scripts? Can you please give me the sample for the same. ...