scripting

Vim, how to scroll to bottom of a named buffer

I have a vim-script which splits output to a new window, using the following command: below split +view foo I've been trying to find a way from an arbitrary buffer to scroll to the bottom of foo, or a setting to keep it defaulted to showing the bottom lines of the buffer. I'm doing most of this inside of a python block of vim script....

A Scripting language for XNA

I've written a game engine, which i want to integrate scripting into. However, i've looked at the available choices, which seem to be the following: Xnua Jint Managed Scripting The problems with those are (respectively): Built for XNA 1 -- there's an XNA 3.1 port but it's under the Apache license which i'm not sure is compatible wi...

What free classfields/ad portal script would you recommend?

I am looking for a free for commercial use classfields/ad portal script that would work either under apache + postgresql/mysql or under windows (asp.net + sql server express). Could you recommend something? Maybe I should use joomla with an extension like adsManager? ...

v8 is too slow for my purpose

I'm working on a music visualization plugin for libvisual. It's an AVS clone -- AVS being from Winamp. Right now I have a superscope plugin. This element has 4 scripts, and "point" is run at every pixel. You can imagine that it has to be rather fast. The original libvisual avs clone had a JIT compiler that was really fast, but it had som...

How to link LuaSQL in a C++ application?

My script runs fine when I execute it from outside the application (terminal), but when its called from inside the C++ application it shuts down in the require("luasql.mysql") call. Can anyone help? ...

How do you run a long PHP script and keep sending updates to the browser via HTTP?

How do you run a long PHP script and keep sending updates to the browser via HTTP? Something to do with output buffering but I don't know exactly how. ...

What is the difference between a module and a script in Python?

Think the title summarizes the question :-) ...

shell scripting error logging

Hi all, I'm trying to setup a simple logging framework in my shell scripts. For this I'd like to define a "log" function callable as log "LEVEL" $message Where the message is a variable to which I have previously redirected the outputs of executed commands. My trouble is that I get errors with the following {message=command 2>&3 1>...

Batch file script for attrib

I want to create a batch file for run attrib script for pen drive. But problem is pen drive changes. batch file that 1st ask to write drive letter Then run attrib script for that drive. (my pendrive gets virus from class that i want to clear at home by aplying attrib script below everyday attrib -r -a -s -h /s /d ...

collect the value returned by netstat into a variable

netstat -an | grep hypen echo $variable hypen | wc -l How to collect the value of netstat -an | grep echo $variable | wc -l to a varibale conn_count. ...

VB6 Parser/Lexer/Scripter

I've got a game in VB6 and it works great and all, but I have been toying with the idea of creating a scripting engine. Ii'm thinking I'd like VB6 to read in flat text script files for me and then lex/parse/execute them. I have good programming experience, and I've built a simple C compiler, as well as a LOGO emulator before. My questi...

How to add the number of active netstat connections of different machine?

I've written this code to get the connections from one machine and adding them with the number of connection of the other machine. This code is not giving any netstat, 0 is coming for the live active connections. #!/usr/bin/ksh -xvf Machine_Detail="prpm@sp204|LC1_R11_LCP|LC1_R12_LCP|LC1_FR15_LCP|LC1_R16_LCP prpm1@sp2048|LC1_R13...

how to get font color changing script just like mail box??

I need to add a font color changing tool section in my form's text area same as we have in our mail boxes.I tried to find on net but didnt get anything useful.Please tell me how can i implement that font color changing tool on my page using javascript???? ...

ANT doesn't get exit code return by a python script

Hi, I'm currently using ant for building my java project on a Windows XP machine. I have different tasks defined in the build.xml and one of this is the exec of a Python script for analyzing the application output. I would like to make ANT failing when a particolar tag is discovered by script. I'm trying using: sys.exit(1) or os.syst...

How do I wait for a service/process to start before continuing a batch script?

I am writing a windows batch script to uninstall some software. However I need to wait after the uninstaller has finished for a service to be restarted before continuing with the next uninstall. I can make the script wait for the uninstaller to finsh using:- for /f "usebackq" %%M in ('tasklist /nh /fi "imagename eq %process_1%"') do...

Finding missing files by checksum

Hi there, I'm doing a large data migration between two file systems (let's call them F1 and F2) on a Linux system which will necessarily involve copying the data verbatim into a differently-structured hierarchy on F2 and changing the file names. I'd like to write a script to generate a list of files which are in F1 but not in F2, i.e. t...

echo value inside a variable ?

x=102 y=x means when i echo $y it gives x echo $y x --and not 102 and when i echo $x it give 102 lets say I dnt know what is inside y and i want the value of x to be echoed with using y someting like this a=`echo $(echo $y)` echo $a Ans 102 ...

grep value inside a variable pointing to other variable

using : ksh *abc = 1 efg = 2 hgd = 3 not known to me * say if i have Value="abc efg hgd" abc efg hgd all contains some value which i dnt know. Now I want to grep the value contained inside abc. like for i in $Value do grep "echo $(($((echo $i | cut -d'|' -f2))))" done this grep should look for the value...

Footprint of Lua on a PPC Micro

We're developing some code on Freescale PPC micros (5517 and 5668 at the moment), and I was wondering if we could put Lua on them. The devices need to be easily programmed/reconfigured in the field, and the current product uses a proprietary interpreted logic language that can be loaded in, and our software (written in C) runs an interp...

Make a Vim plugin that calls a bash script.

Sometimes I edit a file that represents a server restart. I would like to "bind" this restart to my vim session, so, after saving a file, it would call a bash script that would restart for me. For example, calling :wapache automatically calls restart_apache.sh somewhere in my machine. Is this possible? Is there a plugin that would orga...