script

Why does this TCL proc with no args not work?

This should be an easy one for someone... I had a function in a TCL script called unwrap. Modifying it, I realized I no longer needed to pass it args. So I changed it to unwrap {} { ... } Now when I call it with no args, i.e.: unwrap I get an error invalid command unwrap Ideas? How do I properly format a TCL function with no a...

Generate sql server scripts using .net framework

Hi all, it is possible to generate script from sql server using .net framework. Example if I have database "Northwind". Then I wish to create/generate script insert" in form file extension .sql (ex: northwind_insert.sql). Is something like when you using sql-server "right-click on table" > "script table as" > "Insert to" > "file". I w...

Determine function and file dependency of a shell script?

I'm looking for a way of processing a shell script to determine: which commands, scripts or functions are called in the script. which files are accessed by the script (r or w) . It doesn't need to recurse down through the dependencies, just list what it runs directly. I could probably write something that does this myself but it must...

How to get ZIP code of any location by providing the City name or State name in googlemap using Java Script?

Hi, I am willing to get the ZIP code of a location by providing only the City name or State name in google map using Java script. Is it possible to get the ZIP Code only? Please let me know. Thanks.... ...

convert Excel to csv either using shell script or jython . if so how

I am looking for a procedure where i can convert the excel to csv either if there some shell script , if so please guide me or if possbile how can i do in jython. The main reason is that the excel is being received from other source and the header is always changing , which is unnecessary and we need to have some automatic way to remov...

Chrome extension: accessing localstorage in content script

So, i have an options page where the user can define certain options and it saves it in localstorage: options.html Now, i also have a content script that needs to get the options that were defined on options.html page, but when i try to access localStorage from content script, it doesn't return the value from options page. How do i mak...

Creating metapackage using the packagemaker command

I want to create a metapackage using the packagemaker command on the bash shell. The metapackage will consist of an installer package, localizable resources, script and some descriptors to be installed at ./Library/Application Support. I just want to know the appropriate command. ...

Need slider that can increment exponentially (not using range)

At the moment I am using jQuery UI's slider to allow people to select a donation amount. The problem is, the slider is to small and needs to compensate for the minimum of $1 and the maximum of $10,000. The proposed solution is to use a small increment, maybe $1 or $2, for values between $1 - $1000, and then from there, raising the increm...

Script or program to read RAW data

Ok, I had a usb flash drive which had data and was using FAT32 file table, till yesterday!! I had been using it only in Windows. Now when I plugin the usb flash drive, Windows XP reports the file system as RAW and trying to access the drive asks to format the drive. I desperately need to get some data out from there (the backup is a few...

How to change the column type from string to varchar using script/generate in a rails app?

Trying to migrate a sqlite3 db for a rails app to mysql db. The column named "content" was a string type in sqlite3. I want to change it to varchar (or perhaps text) in mysql. I am not sure if there is a way to do this by using "ruby script/generate" command. Any ideas? Obviously, I could start all over again with desired column types...

Postscript font to EOT

Hi, I have a postscript font in my local language. Now to avoid errors in webpages i need them converted to EOT. How should i do this? ...

help with bash script

i have a homework: The student should write a bash program named fix-permissions.sh that accepts a list of users as argument If a user or more are given as arguments, the script should reset files permissions as follows.... "accepts a list of users as argument" can someone explain it to me please? ...

problems in a ruby screen-scraping script

Hi! I have a small crawler/screen-scraping script that used to work half a year ago, but now, it doesnt work anymore. I checked the html and css values for the reg expression in the page source, but they are still the same, so from this point of view, it should work. Any guesses? require "open-uri" # output file f = open 'results.csv'...

How to add an HTML class to a PHP script

Hi, First off, I don't know much (quite nothing) about PHP. I'm more familiar with CSS. I'm making use of Ben Ward script Tumblr2Wordpress (here's the script on GitHub) to export my Tumblr blog in XML (so I can import it in my Wordpress blog). This script reads tumblr's API, queries elements, do a bit of formatting and export the whole...

Use latest jQuery in WordPress (admin interface)

I want to use the latest jQuery (and jQuery UI) versions on my admin interface (editing a specific post type that I created). I tried this: // jQuery 1.x wp_register_script('jquery1x', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', false, null, true); // jQuery UI 1.8.4 PTBR wp_register_script('jquery-ui-custom-pt_BR',...

URL error in Article Dashboard Script

Hey Guys Ive got a website with Article Dashboard installed, you can find it here http://www.linux-website-hosting.com/ The problem is, Search engine friendly urls are activated in this script, so is ioncube and I cant turn search engine friendly urls off. So now, when I click on any of the categories or test articles, i get a page not...

How to convert .xlsx to .txt?

I want to know if there is a linux tool or a script available to convert xlsx file to .txt. Thanks. ...

How can I call a Perl script inside HTML page?

I have a single HTML file, how I use a Perl script(date/hour) in the HTML code? My goal: show a date/hour in HTML Obs.: alone both script are ok. Example: HTML File: <html> <body> code or foo.pl script </body> </html> Perl script(foo.pl): #!/usr/local/bin/perl use CGI qw/:push -nph/; $| = 1; print multipart_init(-boundary=>'----here...

what does this script do?

#!/bin/bash RYD=/share FILESPEC=*.sh DIRPERM=700 FILEPERM=750 OWNER=user:group CH_FSPEC=0 if [ -d $RYD ]; then find $RYD -type d | xargs chmod $DIRPERM if [ $CH_FSPEC -gt 0 ]; then find $RYD -type f | xargs chmod $FILEPERM else find $RYD -type f | grep -v "$FILESPEC" | xargs chmod $FILEPERM fi chown -R $OWNER $RYD for...

Python - Stripping timestamps and username from line in file

I'm writing a script that will print a random line of text from a file into an XCHAT channel. So far it works fine, but I want to add one last bit of functionality. I have logs with, for example, "Oct 23 12:07:59 (nickname> " appearing before every line of text. I just want to print the parts of the lines that follow the "(nickname>...