Search Results

Search found 1174 results on 47 pages for 'escape'.

Page 2/47 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • PHP escape $ sign and echo a string my fetching database

    - by pnm123
    Hello, I want to know how to echo a string that have a $ sign from a database. At this time, the value on database 'Buy one for $5.00' converts to 'Buy one for .00'. Ex:- Field: title | Value: Buy one for $5.00 <?php $row = mysql_fetch_array..... $title = $row['title']; echo $title; ?> Thank you, pnm123

    Read the article

  • Escape not idempotent in zsh's vi emulation?

    - by user1063042
    I have zsh configured to use vi keybindings. I've noticed some unexpected behavior with "escape". In vim (I haven't tested vanilla vi) if I hit escape twice, I can hit 'i' once to return to insert mode. In zsh if I happen to hit escape twice, hitting 'i' won't return me to insert mode, I have to hit it twice. Another example of this comes up in navigation. If I hit escape once, I can use '^' and '$' as expected. But if I've accidentally hit escape twice (or more) they fail to work until I return to insert mode and escape again. Do I somehow have zsh configured incorrectly, or is this just a known difference in zsh's vi emulation?

    Read the article

  • How does one escape the GPL?

    - by tehtros
    DISCLAIMER I don't pretend to know anything about licensing. In fact, everything I say below may be completely false! Backstory: Recently, I've been looking for a decent game engine, and I think I've found one that I really like, Cafu Engine. However, they have a dual licensing plan, where everything you make with the engine is forced under GPL, unless you pay for a commercial license. I'm not saying that it's a bad engine, they even say that they are very relaxed about the licensing fees. However, the fact that it even involves the GPL scares me. So my question is basicly, how does one escape the GPL. Here's an example: The id Tech engine, also known as the Quake engine, or the Doom engine, was the base for the popular Source engine. However, the id Tech engine has been released under the GPL, and the Source engine is proprietary. Did Valve get a different license? Or did they do something to escape the GPL? Is there a way to escape the GPL? Or, if you use GPL'd source code as a base for another project, are you forced to use the GPL, and make your source code available to the world. Could some random person take the id Tech engine, modify it past the point of recognition, then use it as a proprietary engine for commercial products? Or are they required to make it open source. One last thing, I generally have no problem what-so-ever with open source. However I feel that open source has it's place, but that is not in the bushiness world.

    Read the article

  • Process ANSI escape codes before piping

    - by Tiddo
    I'm trying to pipe the output of a script (Mocha) to another script. However there is one problem: Mocha generates quite a few ansi escape characters to update the screen on the fly. These characters are also send through the pipe. Is there a way to process the ansi sequence such that the output is the same as the final output to the screen? I do want to keep color escape sequences, but not the curser movement escapes. Edit: I have a partial solution now (for Mocha only): so far it seems that Mocha with the spec output (the one I use) only generates color ecape characters and the CSI 0G escape sequence. The CSI 0G escape character means that the cursor should move back to the beginning of the line. Mocha uses this to overwrite a line completely. Therefore you could simply create a sed regexp which will delete everything up to that escape sequence on a line: sed 's/^.*\x1b\[0G//g'. I am still looking for the complete solution though.

    Read the article

  • how to remap Ctrl to Escape if pressed and released on its own

    - by psvm
    I want to remap Control, so that: A. If it is pressed and released with no other key, it acts as Escape. B. If it is pressed & held together with another key, it acts as Control (no change in behavior in this case). I'm aware of How do I remap certain keys?, so I suspect it may be done with xmodmap. But that answer does not explain how to map the modifier keys. I looked into the examples and grammar sections of the xmodmap manpage, but they do not explain that. The answer in Remapping Caps Lock to Control and Escape (not the usual way) mention that it is not possible to do that to CapsLock, since it is a Lock key, but I hope this may be possible to do it with Control which is a mod key. A solution with something different than xmodmap will also be accepted. (I'm running Xmonad in Ubuntu 12.04, so perhaps there is a way to set this up in xmonad.hs?)

    Read the article

  • Using hibernate criteria, is there a way to escape special characters?

    - by Kevin Crowell
    For this question, we want to avoid having to write a special query since the query would have to be different across multiple databases. Using only hibernate criteria, we want to be able to escape special characters. This situation is the reason for needing the ability to escape special characters: Assume that we have table 'foo' in the database. Table 'foo' contains only 1 field, called 'name'. The 'name' field can contain characters that may be considered special in a database. Two examples of such a name are 'name_1' and 'name%1'. Both the '_' and '%' are special characters, at least in Oracle. If a user wants to search for one of these examples after they are entered in the database, problems may occur. criterion = Restrictions.ilike("name", searchValue, MatchMode.ANYWHERE); return findByCriteria(null, criterion); In this code, 'searchValue' is the value that the user has given the application to use for its search. If the user wants to search for '%', the user is going to be returned with every 'foo' entry in the database. This is because the '%' character represents the "any number of characters" wildcard for string matching and the SQL code that hibernate produces will look like: select * from foo where name like '%' Is there a way to tell hibernate to escape certain characters, or to create a workaround that is not database type sepecific?

    Read the article

  • How to escape spaces in .desktop files Exec line

    - by nh2
    I want to make a .desktop file like described here. [Desktop Entry] Name=Sublime Text 2 GenericName=Sublime Text 2 Comment=Edit text files Exec=/home/user/opt/sublime/Sublime Text 2/sublime_text %U However, running that from Nautilus's context menu using Open with this gives me Could not find '/home/user/opt/sublime/Sublime' So I tried Exec="/home/user/opt/sublime/Sublime Text 2/sublime_text" %U and got Text ended before matching quote was found for ". (The text was '"/home/user/opt/sublime/Sublime') What is the correct way to escape spaces in the Exec line of .desktop files?

    Read the article

  • Error with TextMate 2 --shell-escape and gnuplot 10.8.2

    - by Manuel
    I have had TM 1.X since a long time ago, but a week ago I updated my system to Mountain Lion 10.8.2 and installed TM2. The problem is that I write with LaTeX, and sometimes I use gnuplot for the graphs (I installed gnuplot with macports). But now it doesn't work because the --shell-escape doesn't work, this is the error message I get: Package pgfplots Error: Sorry, the gnuplot-result file '"untitled 2.pgf-plot.table"' could not be found. Maybe you need to enable the shell-escape feature? For pdflatex, this is ' pdflatex -shell-escape'. You can also invoke ' gnuplot .gnuplot' manually on the respective gnuplot file.. And then, looking around I discovered that it's not just gnuplot but everything which needs --shell-escape. Question What happened? How can I get TM have the correct rights so this works? It worked right in Snow Leopard with TM 1.5.

    Read the article

  • How do I escape spaces in command line in Windows without using quotation marks?

    - by David
    For example what is the alternative to this command without quotation marks: CD "c:\Documents and Settings" The full reason I don't want to use quotation marks is that this command DOES work: SVN add mypathname\*.* but this command DOES NOT work : SVN add "mypathname\*.*" The problem being when I change mypathname for a path with spaces in it I need to quote the whole thing. For example: SVN add "c:\Documents and Settings\username\svn\*.*" But when I try this I get the following error message: svn: warning: 'c:\Documents and Settings\username\svn\*.*' not found

    Read the article

  • Cannot escape character '@' in fstab file

    - by ubuntico
    I want to attach remote FTP directory as a local directory in my system. I will use curlftpfs line in the fstab file , but to login I have to pass my user name and password. The user name has a special character (@) and it needs to be escaped via octal ascii code. The octal ascii for '@' is 100. But when I try to enter the following into the FSTAB file, curlftpfs#myself\100myself.com:ftpPassword@ftp://ftp.mysite.com /mnt/somedir I get an error saying Error connecting to ftp: Couldn't resolve host 'myself.com:ftpPassword@ftp://ftp.mysite.com' The fstab does not recognize escaped symbol @ (\100) and thinks that the FTP site should start immediately after the @ symbol (just like I haven't escaped it). Can someone help? Why I cannot escape @, when it can be done for space character, for example?

    Read the article

  • How do I escape reserved words used as column names? MySQL/Create Table

    - by acidzombie24
    I am generating tables from classes in .NET and one problem is a class may have a field name key which is a reserved MySQL keyword. How do I escape it in a create table statement? (Note: The other problem below is text must be a fixed size to be indexed/unique) create table if not exists misc_info ( id INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL, key TEXT UNIQUE NOT NULL, value TEXT NOT NULL)ENGINE=INNODB;

    Read the article

  • How do i escape reserve names in a column? MySQL/Create Table

    - by acidzombie24
    I am generating tables from classes in .NET and one problem is a class may have a field name key which is a reserved mysql keyword. How do i escape it in a create table statement? (Note: The other problem below is text must be a fixed size to be indexed/unique) create table if not exists misc_info ( id INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL, key TEXT UNIQUE NOT NULL, value TEXT NOT NULL)ENGINE=INNODB;

    Read the article

  • Define custom escape sequences in terminal

    - by Ipkiss
    I would like to change the escape sequences used by some keys in my terminal. My goal is to define custom mappings in Vim (terminal version). In the following I use shift-space as an example, but I would prefer if the proposed solution could be generic. My current terminal (gnome-terminal) uses a simple space as escape sequence for shift-space, as can be seen by typing ctrl-v shift-space. A quick check with the true xterm shows the same behavior. I would like that the shift-space key combo generates another escape sequence (e.g., the one of shift-F30, which I would never use otherwise). So, how would I go about doing that? And is it really a good idea? Let me know if there are better alternatives... Note: I'm aware that this is only part of the problem: after the terminal sends a proper escape sequence for my keys, I still need to teach Vim what it means. But I think I know how to deal with that.

    Read the article

  • How to swap Escape and Caps Lock?

    - by pexeer
    I am using Archlinux. When I program , I like to swap the Escape and Caps Lock. I know that gnome can do this job. But Gnome 3.6.2 in the Archlinux can not find this. So i use the xmodmap and create a file : ~/.xmodmap clear Lock keysym Caps_Lock = Escape keysym Escape = Caps_Lock add Lock = Caps_Lock when i run: xmodmap ~/.xmodmap it works well. But it can not work automatic when i login the gnome, even though i add xmodmap ~/.xmodmap to ~/.xprofile. Am I doing something wrong ? How can I solve this issue?

    Read the article

  • Using pyodbc to insert rows into a MS Access MDB, how do I escape the paramaters?

    - by MDBGuy
    Hi, I'm using pyodbc to talk to a legacy Access 2000 .mdb file. I've got a cursor, and am trying to execute this: c.execute("INSERT INTO [Accounts] ([Name], [TypeID], [StatusID], [AccountCat], [id]) VALUES (?, ?, ?, ?, ?)", [u'test', 20, 10, 4, 2]) However, doing so results in pyodbc.Error: ('HYC00', '[HYC00] [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented (106) (SQLBindParameter)') I understand I can simply change the question marks to the literal values, but in my experience proper escaping of strings across databases is... not pretty. PHP and mysql team up to bring mysql_real_escape_string and friends, but I can't seem to find pyodbc's function for escaping values. If you could let me know what the recommended way of inserting this data (from python) is, that'd be very helpful. Alternatively, if you have a python function to escape the odbc strings, that would also be great. Thanks for the help.

    Read the article

  • How do I escape a string for a shell command in nodejs (V8 Javascript engine)?

    - by Maciek
    In nodejs, the only way to execute external commands is via sys.exec(cmd). I'd like to call an external command and give it data via stdin. In nodejs there does yet not appear to be a way to open a command and then push data to it (only to exec and receive its standard+error outputs), so it appears the only way I've got to do this right now is via a single string command such as: var dangerStr = "bad stuff here"; sys.exec("echo '" + dangerStr + "' | somecommand"); Most answers to questions like this have focused on either regex which doesn't work for me in nodejs (which uses Google's V8 Javascript engine) or native features from other languages like Python. I'd like to escape dangerStr so that it's safe to compose an exec string like the one above. If it helps, dangerStr will contain JSON data.

    Read the article

  • how to escape slashes in perl command in unix script?

    - by understack
    end_date=$(date +"%m/%d/%Y") /usr/bin/perl -pi -e "s/_end_date_/${end_date}/g" filename I want to replace string '_end_date_' with current date. Since current date has slashes in it(yes I want the slashes), I need to escape them. How can I do this? I've tried several ways like replacing slashes with "\/" using sed and perl itself but it didn't work. Finally I used 'cut' to break date in 3 parts and escaped slashes but this solution doesn't look good. Any better solution?

    Read the article

  • how to escape the ' in ssh?

    - by Dean Hiller
    I need to escape the ' in this command for ssh exec grep IPADDR /etc/sysconfig/network-scripts/ifcfg-eth0 |awk -F= '{print $2}' How do I escape that? I currentl y have this which does not work ssh host 'grep IPADDR /etc/sysconfig/network-scripts/ifcfg-eth0 |awk -F= '{print $2}'' nor does this ssh host 'grep IPADDR /etc/sysconfig/network-scripts/ifcfg-eth0 |awk -F= \'{print $2}\'' thanks, Dean

    Read the article

  • How to escape this in the bash script?

    - by allenskd
    I'm trying to complete a batch of 3 videos to leave it there till morning processing but it seems there are special characters in it... I try it "raw" in the terminal and it works but in bash script it stops working Example: args1="-r 29.97 -t 00:13:30 -vsync 0 -vpre libx264-medium -i" args12="-r 29.97 -ss 00:40:30 -vsync 0 -vpre libx264-medium -i" args2="[in] scale=580:380 [T1],[T1] pad=720:530:0:50 (other arguments with lots of [ and ]" In the output it says Unable to find a suitable output format for 'scale=580:380' not sure why... like I said, the command runs fine in the command-line, just not in the script /usr/local/bin/ffmpeg "$args1" "${file}" -vf "$args2" "$args3" "${args[0]}_${startingfrom}_0001_02.mp4"

    Read the article

  • Memory concerns while plotting escape from DLL Hell in Delphi

    - by Peter Turner
    I work on a program with about 50 DLLs that are loaded from one executable, it's an old organically grown program where the only rationale for creating a new DLL is that one previously didn't exist to fill a given need. (and namespaces didn't exist in Delphi so it never crossed our mind to make dll1.main.pas, dll2.main.pas or something even more unique) What we want to do is consolidate all these DLLs into one executable, since none of them are used out of the program, there shouldn't be much of a problem. The concern my boss has is that if we did this, the memory overhead for terminal server clients would go through the roof. So, I've stepped through enough initialization code to know that lots of stuff is done every time a DLL is loaded in to memory, but say I've got a project with about 4000 files, and 50 dlls, 10 of which are probably utilized by any one user in any one session of the program. The 50 dlls are about 2/3rds form files, if not more, but beyond that there's not a lot of other resources being loaded (only a few embedded pictures, icons, cursors, etc..). If I loaded all these files in to memory, how much memory is used per unit? how much is used per class? How do I keep the overhead down? and what is the biggest project one can reasonably expect to build with Delphi? This tidbit won't help answering, but I think it might clarify what my boss is worried about, we currently start our program at about 18megs, normal working conditions are usually less than 40 megs, he thinks it could climb as high as 120 megs.

    Read the article

  • Escape apostrophes inside double quoted strings (Javascript)

    - by George Sheppard
    Say i have a string that i need to evaluate in javascript such as : window.some_class.update( 'Runner', 'update_runner', '{"runner":{"id":"1","name":"Nin's Lad" } }'); In order for eval() to evaluate it, i need to escape the apostrophe in runner_name (Nin's Lad). Is this possable with regex? I dont want to escape the single quotes around Runner and update_runner. I'd just like to escape any single quotes inside double quotes. Thanks,

    Read the article

  • How to escape parameter in windows command line?

    - by Rryk
    I need to run the following command from the command line in Windows 7: SumatraPDF.exe -inverse-search "\"C:\Program Files\eclipse\inverse_search.bat\" \"%f\" %l" However I need to modify it a little, since my installation of Eclipse is located in here: C:\Program Files (x86)\Eclipse (C++) How do I escape this line correctly? Do I need to escape parenthesis and pluses too? Or is it just enough to escape double quotes?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >