I have a python script that makes an attribute table of a raster. This runs through all the rasters that I have which are floats, converts them to ints, then makes an attribute table.
On the first 3 rasters, I get a warning message,
Value range for c:\raster2 exceeds 100000 and number of unique values exceeds 500.
Please use BUILDVAT...
I have setup.py in a buildout project:
from distutils.core import setup
setup(name='',
version='1.0',
author='Denis Kolodin',
author_email='...',
url='...',
scripts = ['scripts/myscript.py'], # The script I want to add to 'bin/' dir
)
Why buildout don't add that script to 'bin/'?
Can I develop scripts (not eggs) with buildou...
I am trying to make elinks dump the web-page at the URL which starts at the current buffer position in vim (and ends at EOL), by mapping this keyboard shortcut and putting it in my .vimrc:
nmap owp :norm yE \| new \| .!elinks -dump @"<CR>
This yanks the rest of the line into the " register. Then it's supposed to open a new buffer and ...
I am trying to write a C shell equivalent script for the bash script mentioned here.
This is what I have :
#! /bin/tcsh
set now=`date +%Y%m%d%H%M.%S`
if (( ! -f "./cache" ) || (-n "`find ./monme -newer ./cache`" ))
then
touch cache -t "$now"
echo "new files added" | mail -s "new build" [email protected]
endif
and this i...
I'm currently using AppleScript to clean up an Xcode project. I'd like my script to remove some build configurations that won't be relevant to other developers on my team.
For example, if I have "Debug", "DebugTest", and "Release", I would like the script to remove "DebugTest".
I'm currently using the following script:
tell applicatio...
I thought C shell script will behave like C and use short circuit evaluation for logical operators.
if ((! -e $cache ) || ("`find $monitor -newer $cache`" != "")) then
...
endif
But in the if statement, even if the first condition is true, the second is checked giving me errors.
Do we have a short circuit logical OR in C shell script...
Hi Friends,
I made a login script in Perl which has to run on Mac OS X clients and record the Logged in Directory Service user name.
I tried using getlogin() , getpwuid($<) respectively.
Now the problem is that since the login script runs as root on the system when the client logs in, getpwuid($<) always gives me the username as root....
I am trying to write an Ant <scriptfilter...> to change occurrences of the string "__LINE__" to the correct line number in Java source files.
Does anyone have an example of using JavaScript (or some other embedded scripting language) to do this? In particular, how do I create a "global" variable that is initialized to 1 when the script ...
Hey everyone,
This question sort of covers both ServerFault.com and here, but this seems more programming than server. I set up my home computer to run Apache server. It answers to port 5900, which has been port forwarded from my wireless router. I then set up a Dynamic DNS server to continually update what the IP address of my home ...
Are there any good introductory tutorials for Perl server-side scripting available freely on the internet?
I checked perl.org and google searches like perl server scripting, server side script examples in perl, but did not get any good results.
Is Perl not that common as a server-side language? It is mentioned here as one.
...
Hi,
I have many lines of form:
A:B:C
I want to print those lines(complete) where the 3rd field (fields separated by :) contain a certain pattern.
Example:
new/old:california/new york:/ms/dist/fx/PROJ/fx/startScript
new/old:startScript/new york:/ms/dist/fx/PROJ/fx/stopScript
When searching for pattern startScript, the 1st line shoul...
Hi,
I want to print all the lines where 3rd field (fields separated by : ) DO NOT start with # (to signify that 3rd field is a comment). Please note that there may be space(s) between : and #.
Example Input:
A:B:#hdfghdfg
A:B: #dfdfdfg
A:B:C
Desired output:
A:B:C
I tried:
awk -F : '$3 ~ /^#/ { print }' run_out5 > run_out6
b...
I know that usually you don't want one-liners/single commands to get too long but it seems like there's occasionally a longish one-liner that would benefit from replacing repetitive elements with a function.
Is it possible to use a short function chop down the length of your command?
For example there's no ceiling or round function ...
I'd like to trigger a script to update some statistics when a user submits a new record, but I don't want the user to have to wait for the script to finish before being redirected.
>-- Time -->
> redirect User -> User Does Stuff -> more stuff -> etc
/
User Input -> Submit...
Hello,
When I have:
dirty working directory,
dirty staging area,
and I copied some new files to the project,
how do I stage only the new ones?
git alias adduntracked=…
...
Is there any method in JScript to get the handle of the main window of a process by providing the process name? The Process.MainWindowHandle property works only in JScript .NET. Is anything similar available in classic JScript?
...
I need to increase the size of a field in a table from VARCHAR(100) to VARCHAR(255). For different reasons, this causes the table to be dropped and recreated (along with relationships, FKs, etc). That is acceptable however, I’m performing this change in a SQL2008R2 (express) (or 2008 Express, same result), but the script doesn’t work in ...
[I have posted this question earlier in the PowerShell Technet forum, but without a response]
I am attempting to change Windows XP Quick Launch settings (enable / disable it using PowerShell). Existing VBScript solutions rely either on Registry or SendKeys, so I thought that this would be feasible in PowerShell through UIAutomation. My ...
Certain languages like awk script allow for conditional assignments. For example, say you had a list file in the format:
<item name, no spaces> <price as float>
e.g.
Grape 4.99
JuicyFruitGum 0.45
Candles 5.99
And you wanted to tax everything over $1... you could use the awk script:
awk '{a=($2>1.00)?$2*1.06:$2; print a}' prices.d...
How do I exit out of an awk function? "exit" stops entire program?
...