Search Results

Search found 10789 results on 432 pages for 'ui scripting'.

Page 100/432 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Concatenate a variable with a string

    - by user311130
    Hello all, I wrote a small bat file: @echo off rem runs the {arg[0].exe} - using its fully qualified name %~f1 IF %errorlevel% NEQ 0 (set boolResult=False) ELSE (set boolResult=True) rem case1 EVENTCREATE /T ERROR /ID 700 /L "MyTest Application" /D "exitcode: %errorlevel%; session id is %SessionName%" rem case3 EVENTCREATE /T ERROR /ID 700 /L APPLICATION /D "exitcode: %boolResult%; session id is %SessionName%" rem case4 EVENTCREATE /T ERROR /ID 700 /L APPLICATION /D "exitcode: %errorlevel%; session id is %SessionName%" And I have got some questions, if you could help me out... case1: I get the following error: ERROR: 'MyTest Application' log does not exist. Cannot create the event. *The only way to initial eventlog in through high-leve (c#) code? case3: How can I concatenate a string with some bat variable ? case4: How do I add a newline in the description? "exitcode: %boolResult%\n session id is %SessionName%" didn't do that. Thanks for any assistance

    Read the article

  • My perl script is acting funny...

    - by TheGNUGuy
    I am trying to make a jabber bot from scratch and my script is acting funny. I was originally developing the bot on a remote CentOS box, but I have switched to a local Win7 machine. Right now I'm using ActiveState Perl and I'm using Eclipse with the perl plugin to run a debug the script. The funny behavior I'm experiencing occurs when I run or debug the script. If I run the script using the debugger it works fine, meaning I can send messages to the bot and it can send messages to me. However when I just execute the script normally the bot sends the successful connection message then it disconnects from my jabber server and the script ends. I'm a novice when it comes to perl and I can't figure out what I'm doing wrong. My guess is it has something to do with the subroutines and sending the presence of the bot. (I know for sure that it has something to do with sending the bot's presence because if the presence code is removed, the script behaves as expected except the bot doesn't appear to be online.) If anyone can help me with this that would be great. I originally had everything in 1 file but separated them into several trying to figure out my problem here are the pastebin links to my source code. jabberBot.pl: http://pastebin.com/cVifv0mm chatRoutine.pm: http://pastebin.com/JXmMT7av trimSpaces.pm: http://pastebin.com/SkeuWtu1 Thanks again for any help!

    Read the article

  • process killed -- delete output file?

    - by user151841
    I have a bash script that runs on our shared web host. It does a dump of our mysql database and zips up the output file. Sometimes the mysqldump process gets killed, which leaves an incomplete sql file that still gets zipped. How do I get my script to 'notice' the killing and then delete the output file if the killing occurred?

    Read the article

  • Generating MySQL UPDATE statements containing BLOB image data

    - by Bob
    I'm trying to write an SQL statement that will generate an SQL script that will update a BLOB field with an IMAGE being selected from the database. This is what I have: select concat( 'UPDATE `IMAGE` SET THUMBNAIL = ', QUOTE( THUMBNAIL ), ' WHERE ID = ', ID, ';' ) as UPDATE_STATEMENT from IMAGE; In the above, THUMBNAIL is a BLOB field containing raw image data. When I run the resulting script I get the following error: ERROR at line 2: Unknown command '\\'. I first tried this without the QUOTE() function, like so: select concat( 'UPDATE `IMAGE` SET THUMBNAIL = \'', THUMBNAIL, '\' WHERE ID = ', ID, ';' ) as UPDATE_STATEMENT from IMAGE; Running the resulting script produces this error: ERROR at line 2: Unknown command '\0'. What is the proper function to apply to this BLOB field in the select, so the UPDATE statements will work? If context is required, I'm looking to migrate thumbnails generated on one server to another server for certain image IDs only. I would use mysqldump, but I don't want to clobber the entire table. Any help is greatly appreciated!

    Read the article

  • crone tab shell script do not save output

    - by Anas
    i use cron tab with command wget http://www.mydomain.com/page.php to run one of my pages in server. It works, but problem is output is sved with names page.php, page.php1, page.php2, page.php3 etc. Can i run the page using wget without sving output

    Read the article

  • Unwanted Shell expansion when assigning the output of a shell command to a variable

    - by Rob Goodwin
    I am exporting a portion of a local prototypte svn repository to import into a different repo. We have a number of svn properties set throughout the repo so I figured I would write a script to list the file elements and their corresponding properties. How hard can that be right. So I write started writing a bash script that would assign the output of the svn proplist -v to a variable so I could check if the specified file had any properties. #!/bin/bash svn proplist -v $1 o=$(svn proplist -v "$1") echo $o now this works fine and echos the output of the svn proplist command. But if the proplist command returns something like svn:ignore : * build it performs a shell expansion on the * and inserts the entire directory listing prior to the build property value. So if the directory had a.txt, b.txt and build files/dirs in it, the output would look like. svn:ignore a.txt b.txt build I figure I need to somehow escape the output or something to keep the expansion from happening, but have yet to find something that works. There are other ways to do this, but I hate when I cannot figure something out. and I have to admin, I think this one beat me ( well given the time I can spend on it )

    Read the article

  • PHP XSS Prevention WhiteListing

    - by pws5068
    My site utilizes a WYSIWYG editor for users to update their accounts,enter comments, and send private messages. The editor (CKEditor) is great for only allowing users to enter valid input, but I worry about injection through TamperData or other means. How can I control this on the server side? I need to whitelist specific tags: <b><ul><ol><a><img><br>, will this be a SAFE approach to preventing XSS?

    Read the article

  • jQuery droppable accordion

    - by awshepard
    I've been playing around with trying to create a droppable accordion for a little while, and haven't gotten it to be very responsive. When I drag an item over the accordion, it takes 5+ seconds for the accordion element to open (if it does at all). Sometimes I have to "wave" the dragged element over the accordion element. I know I read something a while back about event processing in javascript - something along the lines of the browser not always passing control to the javascript engine when you think it does, or something like that, resulting in weird timing. Has anyone else seen tried to do this before? Have you found jquery/javascript to be this slow? Do you have any references for how to get a responsive droppable accordion (the jQuery UI site doesn't seem to, and I didn't find anything on SO or Google). Thanks!

    Read the article

  • iteratively creating graphs

    - by Andrei
    I have a bunch of files containing x and y coordinates, representing time and value (space-separated, but can be amended) For example: 15:06:59 0.0140 ....... I want to create a word file (or some equivalent) to show all these graphs. Right now I am using Excel. It pretty daunting task, as I ahve to plug paste numbers in two rows for each graph, and I have many of them. Thanks

    Read the article

  • shell script passing arguments

    - by arav
    From the wrapper shell scripts i am calling the Java program. I want the Unix shell script to pass all the arguments to java program except the EMAIL argument. HOW Can i remove the EMAIL argument and pass the rest of the arguments to the java program. EMAIL argument can come at any position. valArgs() { until [ $# -eq 0 ]; do case $1 in -EMAIL) MAILFLAG=Y shift break ;; esac done } main() { valArgs "$@" $JAVA_HOME/bin/java -d64 -jar WEB-INF/lib/test.jar "$@"

    Read the article

  • What is the fastest way to compare two list of items?

    - by edude05
    I have two folders with approximately 10,000 files each. I'd like to write a script or program that can tell me if these folders are in sync and then tell me what files are missing from each to make them in sync. Therefore, after generating a list of files, what is the fastest algorithm to sort them for unique files? What I'm thinking right now is comparing the first file on each list then if they are different remove one until they are the same, then remove both from the list (because they are not unique.) Is there a faster algorithm then this?

    Read the article

  • Identifying and removing null characters in UNIX

    - by fahdshariff
    I have a text file containing unwanted null characters. When I try to view it in I see ^@ symbols, interleaved in normal text. How can I: a) Identify which lines in the file contains null characters? I have tried grepping for \0 and \x0, but this did not work. b) Remove the null characters? Running strings on the file cleaned it up, but I'm just wondering if this is the best way? Thanks

    Read the article

  • How do I use a variable argument number in a bash script?

    - by Corbin Tarrant
    #!/bin/bash # Script to output the total size of requested filetype recursively # Error out if no file types were provided if [ $# -lt 1 ] then echo "Syntax Error, Please provide at least one type, ex: sizeofTypes {filetype1} {filetype2}" exit 0 fi #set first filetype types="-name *."$1 #loop through additional filetypes and append num=1 while [ $num -lt $# ] do (( num++ )) types=$types' -o -name *.'$$num done echo "TYPES="$types find . -name '*.'$1 | xargs du -ch *.$1 | grep total The problem I'm having is right here: #loop through additional filetypes and append num=1 while [ $num -lt $# ] do (( num++ )) types=$types' -o -name *.'>>$$num<< done I simply want to iterate over all the arguments not including the first one, should be easy enough, but I'm having a difficult time figuring out how to make this work

    Read the article

  • How do I get the window id and tab number of a Terminal window using AppleScript via the ScriptingBr

    - by Gavin Brock
    I can open a Terminal tab using the following AppleScript: tell application "Terminal" set myTab to do script "exec sleep 1" get myTab end tell This returns a string like: tab 1 of window id 3263 of application "Terminal". This is great, I can see the window id 3263 and tab number 1 (although I don't know how to query myTab to get only these values). In the Cocoa ScriptingBridge, I can do: SBApplication *terminal; SBObject *tab; terminal = [SBApplication applicationWithBundleIdentifier:@"com.apple.terminal"] tab = [terminal doScript:@"exec sleep 1" in:nil] How do I get the window id and tab number from the tab object?

    Read the article

  • shell script passing subset of arguments

    - by arav
    From the wrapper shell scripts i am calling the Java program. I want the Unix shell script to pass all the arguments to java program except the EMAIL argument. HOW Can i remove the EMAIL argument and pass the rest of the arguments to the java program. EMAIL argument can come at any position. valArgs() { until [ $# -eq 0 ]; do case $1 in -EMAIL) MAILFLAG=Y shift break ;; esac done } main() { valArgs "$@" $JAVA_HOME/bin/java -d64 -jar WEB-INF/lib/test.jar "$@"

    Read the article

  • How to find error in TCL code

    - by Adi
    Hi all, I am learning TCL and wanted to know how can I find out errors in my code. I mean what line no is error happening or how can I debug it. Following is the code which I am trying : proc ldelete {list value}{ set ix [lsearch -exact $list $value] if{$ix >=0}{ return [lreplace $list $ix $ix] } else { return $list } } Following is the error i am getting : extra characters after close-brace I will appreciate the help. Thanks aditya

    Read the article

  • Accessing property file through batch script

    - by Farid
    Hi everyone, I'm trying to write a batch script, this script is responsible to launch a jar with one parameters. This parameter indicate to my jar wich property file to use in order to setup some configuration. Then the script will zip the results produced by the jar and send them to a location. But in order to set the name of the zip file I would need to be able to read the property file directly from the batch, is there a way to do so ? Thanks and regards, F

    Read the article

  • How can I set the minDate/maxDate for jQueryUI Datepicker using a string?

    - by leo
    jQueryUI Datepicker documentation states that the minDate option can be set using "a string in the current dateFormat". So I've tried the following to initialize datepickers: $("input.date").datepicker({ minDate: "01/01/2010", maxDate: "12/31/2010" }); However, this results in my datepicker having a selectable date range that goes from 11/06/2015 to 12/17/2015. I've checked the current dateformat and its mm/dd/yy, which is supposed to mean 2 digits for the month, 2 for the day, and 4 for the year, separated by slashes. I've also tried including dateFormat: "mm/dd/yy" in the inizialization statement. I've also checked the values for minDate and maxDate afterwards and they ARE being set to the values I want: 01/01/2010 and 12/31/2010. I want to be able to set min/maxDate with strings because I'm being passed these values as strings from somewhere else. Maybe someone knows why this happens and how to solve this, or a workaround to achieve this, perphaps changing the format of the date strings or something? Thanks EDIT: Using: jQuery v1.3.2 and jQuery UI v1.7.2

    Read the article

  • Is using the windows script host, especially the FileSystemObject hereof a good idea?

    - by Dabblernl
    Recently I have been asked to do some maintenance on a VB6 application. This involves some file IO. I find the IO operations offered by referencing the windows script host and using the FileSystemObject a lot friendlier than the IO operations that come with VB6. But will this cause problems because of security issues, or because of the fact that the script host will be disabled on some users' computers?

    Read the article

  • Continuous Progress Bar in Javascript

    - by Goro
    Hello, I am trying to find the best option to create a simple progress bar that I need to be triggered periodically from within another JavaScript script. Every few minutes, a timer would cause the progress bar to start going from 0 to 100%. Once it reaches 100%, the bar would reset to 0. I am trying to implement a smooth animated version of the bar, like this one: http://www.webappers.com/progressBar/. (I tried adapting this particular one but I could not get it to work the way I described) I am looking into the jQuery UI ProgressBar: Is it possible to use it in the manner I have described? Thank you.

    Read the article

  • Enable access for assistive device programmatically

    - by Dheeraj
    Hi All, I want to enable Access for assistive devices in System Preferences programmatically. But Problem is that my application is not running as root user and i do not want my application to be as root user and also should not ask for any authentication in between. I want to tap all keyboard events globally. I am using CGEventTapCreate() for the same.In the documentation of CGEventTapCreate() API it is mentioned that, Event taps receive key up and key down events if one of the following conditions is true: The current process is running as the root user. Access for assistive devices is enabled. In Mac OS X v10.4 & later, you can enable this feature using System Preferences, Universal Access panel, Keyboard view. I tried manually by checking the Enable Access for assistive devices from System Preference and it gives me expected output. So is there any way to do the same via program without asking for authentication and also application is not running as root user? Thanks, Dheeraj.

    Read the article

  • Parsing Strings ( .crt files )

    - by user1661521
    Base Knowledge : I have a .crt file ( certification authoritie file ) and he is composed of many fields but in one line that resumes this question i have this : Certificate: ...(alot of stuff before)... Subject: C=US, ST=Maryland, L=Pasadena, O=Brent Baccala, OU=FreeSoft, CN=www.freesoft.org/[email protected] Subject Public Key Info: ...(alot of stuff after) and i need to parse the file to populate a .csv file and i have that done the problem that i need help is, i need to get the field: CN=www.fresoft.org but when i get this kind of CN=...(Value instead of the ...) with alot of slashes i get a error in the parsing like the raw string is: CN=foo/bar/the/hell/emailAddress=blablabla and i need only: foo/bar/the/hell and for a moment i got that in the correct column but when i dont have the emailAddress something just fail in my parsing and i then get in my CN .csv column the information wrong instead of |CN| foo/bar/the/hell i get: |CN| OU=FreeSoft, foo/bar/the/hell. I have this code doing the CN parsing: #!/bin/bash subject_line=$(echo $cert | grep -o "Subject:.*Subject Public Key Info") cn=$(echo $subject_line | grep -o "CN=.*" ) if [ $(echo $cn | grep -c ".*email.*") -gt 0 ]; then end_cn=$(echo $cn | grep -b -o emailAddress) end_cn_idx=$(echo $end_cn | grep -o .*:) final_end_cn=${end_cn_idx:0:-1} common_name=${cn:3:$final_end_cn-4} echo $common_name else end_cn=$(echo $cn | grep -b -o "Subject Public Key Info") end_cn_idx=$(echo $end_cn | grep -o .*:) final_end_cn=${end_cn_idx:0:-1} common_name=${cn:3:$final_end_cn-5} echo $common_name fi

    Read the article

  • Shell script to name videos on device

    - by Jordan
    I have a .sh script that automounts any usb device that is plugged in. I need it to also find if there are videos in a certain location on the device that is plugged in then write them to a videos.txt file. Here's what I have and its not working. Also I need it to put the mountpoint in the videos.txt file. ${MOUNTPOINT}$count is the path to the mounted device. VIDEOS=ls ${MOUNTPOINT}$count/dcim/100Video | grep mp4 if [ "$VIDEOS" -ne "" ] ; then "${MOUNTPOINT}$count" > ${MOUNTPOINT}$count/videos.txt; "$VIDEOS" >> ${MOUNTPOINT}$count/videos.txt; fi What am I doing wrong?

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >