Search Results

Search found 14591 results on 584 pages for 'scripting language'.

Page 111/584 | < Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >

  • Executing Shell Scripts from the OS X Dock?

    - by Wilco
    I'm sure the answer is ridiculously obvious, but so far Google hasn't been very helpful. How do I set up a shell script to execute from the dock? It seems that simply creating a shortcut will open the file in my editor. Is there a flag I need to set somewhere to tell it to run instead of opening it for editing?

    Read the article

  • Make a mouse pointer do a hyper-jump?

    - by John M
    I run a dual monitor setup. To get from monitor 1 to 2 (or vice-versa) requires lots of unnecessary mouse movement. My thought was to leverage a extra mouse button (I have two) and have the mouse hyper-jump (apologies to Star Trek) from the XY coordinates on monitor 1 to the same XY coordinates on monitor 2. How would I go about doing this? Could it be done via C#?

    Read the article

  • Creating DOM elements on the fly - check if the data is not harmful

    - by user313353
    I already posted a question closely related to the this one. I watched the Mix10 video with P. Haacked and S. Hanselman. I am building an AJAX-powered site whose input forms are created on the fly. All the code to accomplish this is done within a script tag or a javascript file. For example the following DOM elements are created when the page loads and are wrapped into an existing div defined in a view: $('#myform').append('); $('#myform').append(''); When I click the submit button I need to get the values of the input form whose id is 'Name': $("#Name").val() and then I return a Json object: { Name: name }; For this kind of scenario there is no way to use Html.Encode() or AntiXss.HtmlEncode() on the client-side. The only way to check if the input is not harmful is done on the server-side (via a service layer). This seems a limitation. All is fine if and only if a view has a set of predefined inputs. When it is time to create them on the fly, the situation is different. Have you thought of that situation guys? Thanks for the attention you have put on this. Roland Brussels, Belgium

    Read the article

  • Shortest distance between a point and a line segment

    - by Eli Courtwright
    I need a basic function to find the shortest distance between a point and a line segment. Feel free to write the solution in any language you want; I can translate it into what I'm using (Javascript). EDIT: My line segment is defined by two endpoints. So my line segment AB is defined by the two points A (x1,y1) and B (x2,y2). I'm trying to find the distance between this line segment and a point C (x3,y3). My geometry skills are rusty, so the examples I've seen are confusing, I'm sorry to admit.

    Read the article

  • How do I send a file as an email attachment using Linux command line?

    - by Kit Roed
    I've created a script that runs every night on my Linux server that uses mysqldump to back up each of my MySQL databases to .sql files and packages them together as a compressed .tar file. The next step I want to accomplish is to send that tar file through email to a remote email server for safekeeping. I've been able to send the raw script in the body an email by piping the backup text file to mailx like so: $ cat mysqldbbackup.sql | mailx [email protected] cat echoes the backup file's text which is piped into the mailx program with the recipient's email address passed as an argument. While this accomplishes what I need, I think it could be one step better, Is there any way, using shell scripts or otherwise, to send the compressed .tar file to an outgoing email message as an attachment? This would beat having to deal with very long email messages which contain header data and often have word-wrapping issues etc.

    Read the article

  • Lua on the iPhone

    - by Fabrizio Farinelli
    Hi, I'm trying to load at run-time Lua scripts on the iPhone. Is there a possibility to do that? How can I getting started with Lua? I can't find something. The only thing I can find is that this should be possible, but I am wondering how. Thanks

    Read the article

  • I want to design a html form in python

    - by VaIbHaV-JaIn
    when user will enter details in the text box on the html from <h1>Please enter new password</h1> <form method="POST" enctype="application/json action="uid"> Password<input name="passwd"type="password" /><br> Retype Password<input name="repasswd" type="password" /><br> <input type="Submit" /> </form> </body> i want to post the data in json format through http post request and also i want to set content-type = application/json

    Read the article

  • search for a string , and add if it matches

    - by Sharat Chandra
    I have a file that has 2 columns as given below.... 101 6 102 23 103 45 109 36 101 42 108 21 102 24 109 67 and so on...... I want to write a script that adds the values from 2nd column if their corresponding first column matches for example add all 2nd column values if it's 1st column is 101 add all 2nd column values if it's 1st colummn is 102 add all 2nd column values if it's 1st colummn is 103 and so on ... i wrote my script like this , but i'm not getting the correct result awk '{print $1}' data.txt > col1.txt while read line do awk ' if [$1 == $line] sum+=$2; END {print "Sum for time stamp", $line"=", sum}; sum=0' data.txt done < col1.txt

    Read the article

  • How to login as another user and then log out in bash script?

    - by Neuquino
    Hi, I need to write a bash script to do something as another user and then return to the initial user... Suppose I run the following as root: #!/bin/bash USER=zaraza su - "${USER}" #do some stuff as zaraza ________ #here I should logout zaraza #continue doing things as root In the console I should write "exit", but in bash is a keyword and it exits the script... Thanks in advance,

    Read the article

  • Shell Script - print selected columns

    - by teepusink
    Hi, I have a txt file with columns separated by tabs and based on that file, I want to create a new file that only contains information from some of the columns. This is what I have now awk '{ print $1, $5 }' filename newfilename That works except that when column 5 contains spaces e.g 123 Street, only 123 shows up and the street is considered as another column. How can I achieve what I'm trying to do? Thanks, Tee

    Read the article

  • Valid HTTP header? `GET /page.html Http1.0`?

    - by Earlz
    Ok so I've been reading up on HTTP and found this page. This is an example HTTP request that was posted there: GET /http.html Http1.1 Host: www.http.header.free.fr Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, Accept-Language: Fr Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) Connection: Keep-Alive I tried it in telnet and it worked. But everywhere else I see this kind of request line GET /http.html HTTP/1.1 The important different is that HTTP is all caps and the / character. Are they both correct? They both seem to work on the sites I've tested it on. I've skimmed the RFC of HTTP but didn't find anything of use. Has anyone else seen this kind of request header? Is it officially supported?

    Read the article

  • How to get number of rows deleted from mysql in schell script

    - by simonlord
    Hi all I can't work out how to get the mysql client to return the number of rows deleted to the shell when running a delete. Does anyone know what option will enable this? Or ways around it? Here's what i'm trying, but i get no output: #!/bin/bash deleted=`mysql mydb -e "delete from mytable where insertedtime < '2010-04-01 00:00:00'"|tail -n 1` I was expecting something like this as the output from mysql: deleted 999999 Which is why i have the tail -n 1 so i only pick up the count and not the column name. Any help would be most appreciated.

    Read the article

  • LuaInterface - how to register overloaded methods?

    - by JeffreySadeli
    Hello world! I'm trying to integrate Lua to my C# app when I hit a little snag. I was hoping someone with more expertise could help point me to the right direction. Let's say I have the following C# methods: public void MyMethod(int foo) { ... } public void MyMethod(int foo, int bar) { ... } I would like to register it to my Lua script environment so that I can do something like this: -- call method with one param MyMethod(123) -- call method with two params MyMethod(123, 456) I tried RegisterFunction("MyMethod", this, this.GetType().GetMethod("MyMethod")) but it reasonably complains about ambiguous match. Any ideas?

    Read the article

  • Deploying a Web Application from the command line

    - by Grant
    Hi. Im looking to deploy a web application on a build server. It is a very small web app and so far i have written a nice little console app that checks out from SVN and then calls msbuild on the .sln file. This of course is not the same as publishing a web app and so far have not found a programatic way of publishing. So my question is this.. After msbuild has run can i simply delete all .cs and .vb files and then deploy? or Should i really try and find a way to publish programatically?

    Read the article

  • Playground for Artificial Intelligence?

    - by Dolph Mathews
    In school, one of my professors had created a 3D game (not just an engine), where all the players were entirely AI-controlled, and it was our assignment to program the AI of a single player. We were basically provided an API to interact with the game world. Our AI implementations were then dropped into the game together, and we watched as our programs went to battle against each other. It was like robot soccer, but virtual, and with lots of big guns. I'm now looking for anything similar (and open source) to play with. (Preferably in Java, but I'm open to any language.) I'm not looking for a game engine, or a framework... I'm looking for a complete game that simply lacks AI code... preferably set up for this kind of exercise. Suggestions?

    Read the article

  • Problem With Inserts of multibyte (converted to utf-8) strings in the mysql tables of utf_unicode_ci encoding

    - by user381595
    http://domainsoutlook.com/sandbox/keyword/?s=http://bhaskar.com raw example of my keyword density analyser. Every keyword shows up properly with no problems in unicode conversions etc. Now, When I am adding these words to the database column of a table, the words show up as messed up. http domainsoutlook.com/b/site/bhaskar.com.html For example on this front end page if you see there is a keyword that is shown as a blank but still occurs on the website 8 times. (It isnt empty in the database though). I have checked and there is no problem with mysql_real_escape_String...because the output stays the same before and after the word is gone through mysql_real_escape_String. Another problem was that I wanted to fix my urls for arabic language. They should be showing up as /word-{1st letter of the word}/{whole word}.html but its showing as /word-{whole word}/{1st letter of the word}.html I really need answers for these two questions.

    Read the article

  • Shortest distance between two line segments

    - by Frank
    I need a function to find the shortest distance between two line segments. A line segment is defined by two endpoints. So for example one of my line segments (AB) would be defined by the two points A (x1,y1) and B (x2,y2) and the other (CD) would be defined by the two points C (x1,y1) and D (x2,y2). Feel free to write the solution in any language you want and I can translate it into javascript. Please keep in mind my geometry skills are pretty rusty. I have already seen http://stochastix.wordpress.com/2008/12/28/distance-between-two-lines/ and I am not sure how to translate this into a function. Thank you so much for help.

    Read the article

  • Help with variables and new lines, and quoting in a bash script

    - by Scott
    I would like to automate the following svn command. Note this command produces the desired results on my system - Ubuntu 10.04, svn 1.6.6, bash shell, when issued from the command line: svn ci -m $'Added new File: newFile.txt\nOrig loc: /etc/networking/newFile.txt' /home/user/svnDir/newFile.txt I would like to run that command in a bash script, assuming that the original full path to the file is contained in the variable $oFileFull, and the filename is in $oFileName. The script is executed from the svn directory. I need to allow for the possibility that the file name and or path contain spaces. so the line inside my shel script might look like: svn ci -m$'Added new file: ${oFileName}\nOrig loc: ${oFileFull}' ${oFileName} But I want the variables (which may contain spaces) expanded before the command is executed, and I cannot figure out how to do this while enclosing the svn comment in single quotes which is necessary in order to get the new line in the subversion comment log. I am pulling my hair out trying to figure out how to properly quote and assemble this command. Any help appreciated.

    Read the article

  • Send mail from a Windows script

    - by Jörgen Lundberg
    I would like to send mail from a script on a Windows Server 2003 Standard Edition. I think the server setup is pretty much out of the box. The mail server is an Exchange one, and when you're on the internal network you can use plain old SMTP. I have done it from my machine with Perl, but unfortunately Perl is not available on the server. Is there an easy way of doing this from a .bat-file or any other way that doesn't require installing some additional software? Edit: Thanks for the quick replies. The "blat" thingie would probably work fine but with wscript I don't have to use a separate binary. I didn't see PhiLho's post the first time I edited and selected an answer. No need for me to duplicate the code here. Just save the script to a file, say sendmail.vbs, and then call it from the command prompt like so: wscript sendmail.vbs

    Read the article

  • Output only characters between [ABC] and [/ABC]

    - by user564530
    $ cat somefile.txt afsdfv asdf[ABC]dafga asdfasf yxcvyxv[/ABC] asdadf yv[ABC]sdfb sdfgadfg [/ABC]adf asdf $ cat somefile.txt | NEEDEDONELINER > output.txt dafga asdfasf yxcvyxv sdfb sdfgadfg $ So the "NEEDEDONELINER" only outputs the characters between a [ABC] and [/ABC]. [ABC] could occur several times, and there could be random characters around it. I only need the random chars between the [ABC] and [/ABC]. I don't have time to learn Perl :\ Thank you in anticipiation!

    Read the article

< Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >