scripting

Dynamically resize web browser control in Lotus Notes subform

I want to create a subform, which contains a web browser control in it. As this subform is going to be placed in different other forms, I'd like to be able to resize the width of the web browser control on postopen, and maybe some other events, so it fits nicely to the size of the parent form. I tried to check "Size object to fit window...

grep-ing multiple files

I want to grep multiple files in a directory and collect the output of each grep in a separate file ..So if I grep 20 files, I should get 20 output-files which contain the searched item. Can anybody help me with this? Thanks. ...

What among Bash/Python/Perl/Ruby/Sed/Awk for System administration , coding accessories.

I know the question is very subjective. But I cannot form the question in a much more better manner. I would appreciate some guidance. I often as a developer feel how easier it would have been for me if I could have some tools for doing some reasonably complex task on a log file , or a set of source files, or some data set etc. Clearly...

PHP/MySQL mailing list, mailer and subscription classes

I am working on a project that needs a emailable mailing list built into it with a very complex list structure. Originally I thought I could just use PHPList to do the job with some minor alterations because of its list management. But now I'm finding that I'm going to need to build this from scratch. PHPList is way to complex to make tw...

Calculate driving directions using PHP?

For my application I need a server to calculate driving directions. The Google Maps API was designed for clientside use only, with a Javascript and Flash API. Is there any way I can run their API's server-side? ...

Loading script tags via AJAX

I have a div tag which is filled with script via an ajax call, but the script does not execute. Is there a way to cause the script to execute? ...

problem with redirecting output

I'm writing a script that selects rows from files in a directory which contain patterns $f1, $f2 and $f3 and storing the lines that contain the pattern in a file I want to call as $file_$pattern.xls, for example file1_2.54 Ghz.xls. #!/bin/bash #my_script.sh to summarize p-state values f1="2.54 Ghz" f2="1.60 Ghz" f3="800 Mhz" for f in...

Why does SWIG crash Python when linked to gtkglext?

Anything I link to gtkglext using SWIG crashes Python on exit. Why does this crash? test.i: %module test %{ void test() { printf("Test.\n"); } %} void test(); Session: $ swig -python test.i $ g++ -I/usr/include/python2.6 -shared -fPIC -o _test.so test_wrap.c -lpython2.6 $ python -c 'import test; test.test()' Test. $ g++ -I/usr/i...

How to run a PowerShell script without displaying a window?

How is it possible to run a PowerShell script without displaying a window or any other sign to the user? In other words, the script should run quietly in the background without any sign to the user. Extra credit for an answer that does not use third party components :) ...

ORM for SQL Scripting

What is the best way to run simple sql scripts in a database (preferably db implementation agnostically)? So, for illustration purposes, using your best/suggested way, i'd like to see a script that creates a few tables with names from an array ['cars_table', 'ice_cream_t'], deletes all elements with id=5 in a table, and does a join betw...

Shell scripting book

Please recommend a good book to start with the shell scripting and then going ahead to have in depth and precise knowledge of shell scripting. ...

SQL Server: How to generate object scripts without DMO/SMO?

i want to generate scripts for database objects, e.g. tables views stored procedures functions Since: SQL Server Management Objects (SMO) SQL Distributed Management Objects (SQL-DMO) (depricated) are not installed on a fresh install of: Windows XP Windows Vista Windows 7 nor are they redistributable, they are not an option (...

running mysql_fix_privilege_tables kills my root password

I am learning mysql and ran into a problem with 'mysql.proc' missing when trying to create a stored procedure. mysql version 5.1.41. I read that running the script 'mysql_fix_privilege_tables' is supposed to fix the previous error. I am getting a strange side effect... my root password is no longer good anymore when I run this script ...

SVN Automatic merge to branch on check in

We use one branch for the our upcoming release, and trunk for the next release (later). For example: v1.1 -> v1.2 -> trunk (Where v1.1 is in production, v1.2 is the upcoming release and trunk will turn into v1.3 closer to release). While working on the upcoming release, we check in using SVN (TortoiseSVN). The problem with this is that...

How to get vmware to run a program within MAC OS X via script or alias

On my Mac OS X computer, I am trying to setup a script that will open a particular program ( Visual Studio ) that resides within VMWare. More specifically, when I run the script, I want Visual Studio application to open a specific file that would passed in as a parameter to the script. This file would be shared and accessible to VS. A...

Active Scripting on the server side

I am considering writing a NT service. The service will need scripting capabilities. Users can write some VBScript/JScript code and feed the server. I also want the script be able to debug in Microsoft Script Debugger. The service will behave in a similar way as IIS with classic ASP. It gets input from somewhere else. When it get inpu...

Get result from shell script objective-c

I would like to run a shell script, from a file or from an objective-c string (within the code). I would also like the shell script's result to be stored to a variable. I would not like the shell script to be split into arguments (such as setLaunchPath when I run it). For example: running this shell script "mount_webdav idisk.mac.com/...

How to Merge multiple patch files?

We use subversion and during every check-in, a script creates a patch file with all the diff. Now for the same issue/defect there could be multiple check-ins and we end up with multiple patch files. Now to see consolidated changes for an issue all the patch files have to be merged. Is there a way to do that? Or another way to solve the ...

batch script to find a particular folder in a drive

hi ,am a newbie to the batch script, i have many folders called LIB in my drive say it can be as LIB_data,lib,lib_ac anything that starts with lib or LIB... i want to list all these directories and sort them in which they have created in the pc and copy the latest directory contents to BATCH_LATEST_LIB_FILES folder,that will be a new fol...

Call javascript interpreter from a script

I've written some scripts in Javascript under Rhino 1.7, one of them starts a minimal http server and accepts JS commands in input. Now, if I call (from within Rhino): engine = ScriptEngineManager().getEngineByName("JavaScript"); I get the builtin JS engine (from Java 1.6), that is an older version of Rhino, and lacks some functions ...