Search Results

Search found 1625 results on 65 pages for 'ansi escape'.

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

  • Supporting more than one codebase in ANSI-C

    - by Ilker Murat Karakas
    I am working on a project, with an associated Ansi-C code base. (let me call this the 'main' codebase). I now am confronted with a typical problem (stated below), which I believe I would be able to solve much easily if I had an object-oriented language at hand. The problem is this: I will have to start more than one codebases; i.e. I will have to start supporting a parallel codebase (even maybe more in the future). The initial codebases for all the new (i.e. parallel) codebases will initially be identical as the old (i.e. 'main') codebase. As we are talking about the 'C' language, I have till now been thinking of adding '#ifdef' statements to code, and writing the branch-spacific code inside those 'ifdef' blocks. Hoping that I made the problem clear (enough!), I would like to hear thoughts on clever patterns that would help me handle this problem elegantly in Ansi C. Cheers

    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

  • Aggregate functions in ANSI SQL

    - by morpheous
    I want to use multiple aggregate functions in a query. All the examples i have seem on aggregate functions however, are trivial. Typically, they are of the form: SELECT field1,agg_func1, agg_func2 GROUP BY SOME_COLUMNS HAVING agg_func1 OP SOME_SCALAR Where: OP: is a boolean operator (e.g. <, = etc) SOME_SCALAR: is a scalar (i.e. a constant number) What I want to know is if it is possible to write (IN ANSI SQL) queries like: SELECT field1,agg_func1, agg_func2, agg_func3 GROUP BY SOME_COLUMNS HAVING (agg_func1 OP1 agg_func2) OP2 (agg_func2 OP3 agg_func3) Where: OP[N] are boolean operators or ANSI SQL clause operators like 'BETWEEN', 'LIKE', 'IN' etc. Also, assuming this is possible (I have not seen any documentation saying otherwise) are there any efficiency/performance considerations (i.e. penalties) when the HAVING clause consists of a boolean expression combining the output of the aggregate functions - instead of the normal comparison of the output of the aggregate with a constant number (e.g. min('salary') 100 ) - which is often used in the most banal examples involving aggregate functions?

    Read the article

  • How to escape/strip special characters in the LaTeX document?

    - by Igor
    We implemented the online service where it is possible to generate PDF with predefined structure. User can choose a LaTeX template and then compile it with an appropriate inputs. The question we worry about is the security, that the malicious user was not able to gain shell access through the injection of special instruction into latex document. We need some workaround for this or at least a list of special characters that we should strip from the input data. Preferred language would be PHP, but any suggestions, constructions and links are very welcomed. PS. in few word we're looking form mysql_real_escape_string for LaTeX

    Read the article

  • How to correctly set GNU Screen to display currently running program in hardstatus

    - by johnny_bgoode
    In bash, to display the name of the current program in the GNU Screen hardstatus line takes only two configuration lines. First, tell screen what the end of your prompt normally looks like, and supply a default title for a window when you are sitting at in the shell: shelltitle "$ |bash" Next, place this escape sequence in the PS1 variable, before the characters that normally terminate the prompt '$ ' in this case: \033k\033\\ This technique works, to a point. The hardstatus window title is updated to the name of the currently running program, and then switches back to the default title shortly after execution is finished. One major problem, however, is that this escape string is not escaped itself, causing line-wrapping problems with commands longer than the initial line. This was annoying, so I set out looking for a solution. Turns out, simply escaping the previous escape sequence corrects line wrapping: \[\033k\]\[\033\\\] Great! My hardstatus window title still updates to the name of the currently running program, and now my longer commands wrap to the second line correctly. However, with this new escape sequence in my PS1, screen updates the window title to the actual command I am typing, not simply the name of the current program once it is executed. I am wondering, has anyone gotten this working correctly - i.e. line wrapping and proper updating of the hardstatus window title?

    Read the article

  • Alt-Escape has different effect on different Win-XP machines

    - by Ram Rachum
    This is really weird. On my desktop computer, I often use Alt-Escape to send the active window to the background. This is really useful for window management. However, when I try pressing Alt-Escape on my new laptop, it does something similar but not identical: It sends the active window back, but not all the way to the background. i.e., instead of giving it the lowest index number, it just decrements its index number, probably by 1. Both computers have the same Windows XP Professional. Why is this? And how can I make my laptop computer send the active window to the background instead?

    Read the article

  • Bash color prompt and long commands

    - by Eric J.
    I'm colorizing parts of my bash prompt using ANSI escape sequences. This works great, until the command I'm currently typing in is long enough that it has to wrap. Instead of the rest of the command displaying on the next line, it wraps back to column 1 of the current line, overwriting the beginning of the prompt. I get that behavior with this prompt: export PS1="[\u][\033[0;32;40mdemo \033[0;33;40m1.5.40.b\033[0;37;40m] \w> \033[0m" but it works correctly with the same prompt, ANSI sequences remove: export PS1="[\u][demo 1.5.40.b] \w> " I'm connecting using the current version of Putty, with default Putty settings. The OS is Ubuntu 8.10.

    Read the article

  • Copy/Paste in emacs ansi-term shell

    - by user130208
    I have configured my emacs to run zsh shell within ansi-term. However, copy/paste no longer works i.e. nothing is getting pasted from kill-ring to the terminal. Changing the TERM to vt100, or eterm doesn't solve the problem. Would appreciate any ideas or solution. Thanks Sandeep

    Read the article

  • Types questions in ANSI C

    - by shaharg
    Hi, I having few questions about typed in ANSI C: 1. what's the difference between "\x" in the beginning of a char to 0x in the beginning of char (or in any other case for this matter). AFAIK, they both means that this is hexadecimal.. so what's the difference. when casting char to (unsigned), not (unsigned char) - what does it mean? why (unsigned)'\xFF' != 0xFF? Thanks!

    Read the article

  • Browser: Continue gif animation after escape is pressed

    - by cottsak
    Firefox (and other browsers i believe) stop gif animation when you click the Stop button or invoke it via the Escape key. I have a text input that on change makes ajax requests to update other elements. As part of this ajaxyness i have an animated gif to show feedback. I also trap the escape key press in this input so as to clear the text field for better UX. My problem is after the escape key is pressed once, none of the ajax gifs animate anymore until the page is refreshed. Does anyone know a workaround? Stuff i've tried: I tried the e.stopPropagation(); and e.cancelBubble = true; in the function handling the e.keyCode == 27 and that didn't seem to work. I suspect that this stops trigging more js events and the browser catches the escape irrespective of js activity. I have the gif showing/hiding via adding/removing a css class so it's difficult to apply the "change gif url to reset" workaround. I dont even know if this works anyway - didn't test it. But it seems difficult. If anyone knows that this works and knows of an easy way to apply the hack with background-image: url(../images/ajax-loader_dotcirclel13x13.gif); css then please let me know.

    Read the article

  • Continue gif animation after escape is pressed

    - by cottsak
    Firefox (and other browsers i believe) stop gif animation when you click the Stop button or invoke it via the Escape key. I have a text input that on change makes ajax requests to update other elements. As part of this ajaxyness i have an animated gif to show feedback. I also trap the escape key press in this input so as to clear the text field for better UX. My problem is after the escape key is pressed once, none of the ajax gifs animate anymore until the page is refreshed. Does anyone know a workaround? Stuff i've tried: I tried the e.stopPropagation(); and e.cancelBubble = true; in the function handling the e.keyCode == 27 and that didn't seem to work. I suspect that this stops trigging more js events and the browser catches the escape irrespective of js activity. I have the gif showing/hiding via adding/removing a css class so it's difficult to apply the "change gif url to reset" workaround. I dont even know if this works anyway - didn't test it. But it seems difficult. If anyone knows that this works and knows of an easy way to apply the hack with background-image: url(../images/ajax-loader_dotcirclel13x13.gif); css then please let me know.

    Read the article

  • escape exactly what in javascript

    - by Emin
    Hi all, Being a newbie in javascript I came to a situation where I need more information on escaping characters in a string. Basically I know that in order to escape " I need to replace it with \" but what I don't know is for which characters I need to escape a particular string for. Is there a list of these "characters to escape"? or is it any character that is not a-zA-Z0-9 ? In my situation, I don't have control over the content that is being displayed on my page. Users enter some text and save it. I then use a webservice to extract them from the database, build a json array of objects, then iterate the array when I need to display them. In this case, I have - naturally - no idea of what the text the user has entered and therefore for what characters I need to escape. I also use jQuery for this specific project (just in case it has a function I am not aware of, to do what I need) Providing examples would be appreciated but I also want to learn the theory and logic behind it. Hope someone can be of any help.

    Read the article

  • Fatal error: Call to a member function escape() on a non-object in .....on line 10

    - by danyo
    i am making a simple javascript login form for wordpress. i have the form submitting to the following bit of php to handle the login: <?php get_header(); global $user_ID; if (!$user_ID) { if($_POST){ //We shall SQL escape all inputs $username = $wpdb->escape($_REQUEST['username']); $password = $wpdb->escape($_REQUEST['password']); $remember = $wpdb->escape($_REQUEST['rememberme']); if($remember) $remember = "true"; else $remember = "false"; $login_data = array(); $login_data['user_login'] = $username; $login_data['user_password'] = $password; $login_data['remember'] = $remember; $user_verify = wp_signon( $login_data, false ); //wp_signon is a wordpress function which authenticates a user. It accepts user info parameters as an array. if ( is_wp_error($user_verify) ) { echo "<span class='error'>Invalid username or password. Please try again!</span>"; exit(); } else { echo "<script type='text/javascript'>window.location='". get_bloginfo('url') ."'</script>"; exit(); } } else { //get_header(); ?> any ideas on why i am getting the error? Cheers, Dan

    Read the article

  • bash tips needed for understanding how to escape characters in command-line

    - by Jesper Rønn-Jensen
    My knowledge of commandline bash is missing on a particular area: I constantly forget how to properly escape characters. Today I wanted to echo this string into a file: #!/bin/env bash python -m SimpleHTTPServer echo "#!/bin/env bash\npython -m SimpleHTTPServer" server.sh && chmod +x server.sh -bash: !/bin/env: event not found That's right: Remember to escape ! or bash will think it's a special bash event command. But I can't get the escaping right! \! yields \! in the echoed string, and so does \\!. Furthermore, \n will not translate to a line break. Do you have some general tips that makes it easier for me to understand escaping rules? To be very precise, I'll accept an answer which tells me which characters I should escape on the bash command line? Including how to correctly output newline and exclamation mark in my example.

    Read the article

  • How to escape <, >, and & characters to html entities in Oracle PL/SQL

    - by SWilk
    Hi, I need to send HTML emails directly from oracle PL/SQL package. This works almost fine. I have problem with the fact that some of the data fetched from a table contain things like <S>, <L>, and similar fragments, which sometimes ar treated as HTML tags, and even if not, they are always ignored and never displayed. So, I need to escape this column before inserting into email body. Is there a function to escape html special chars into entities automaticly? Or do I need to replace('<','&lt;',string) manually all the special characters? I found a function to escape URLs but not one for HTML :( Best regards, SWilk

    Read the article

  • Escape doube and single backslashes in a string in Ruby

    - by Nick Gorbikoff
    Hello. I'm trying to access a network path in my ruby script on a windows platform in a format like this. \\servername\some windows share\folder 1\folder2\ Now If I try to use this as a path, it won't work. Single backslashes are not properly escaped for this script. path = "\\servername\some windows share\folder 1\folder2\" d = Dir.new(path) I tried everything I could think of to properly escape slashes in the path. However I can't escape that single backslash - because of it's special meaning. I tried single quotes, double quotes, escaping backslash itself, using alternate quotes such as %Q{} or %q{}, using ascii to char conversion. Nothing works in a sense that I'm not doing it right. :-) Right now the temp solution is to Map a network drive N:\ pointing to that path and access it that way, but that not a solution. Does anyone have any idea how to properly escape single backslashes? Thank you

    Read the article

  • Character Encoding, UTF or ANSI?

    - by Paulocoghi
    I'm using Eclipse in Ubuntu to edit PHP files. But, unfortunately, some of these PHP files were created in Notepad++ in Windows XP, with ANSI encoding defined. Also, these files generates HTML codes with charset=ISO-8859-1. When I configured Eclipse to ISO-8859-1, many special characters were lost and changed to '???', and when I try to save a file with ISO enconding, Eclipse displays an error that was not possible to save the file because some characters aren't compatible with the charset. How can I save these files without changing the encoding, or how can I change the encoding without lose characters.

    Read the article

  • How is "Esc" key handled in WPF Window?

    - by Markus2k
    I want the Escape key to close my WPF window. However if there is a control that can consume that Escape key, I don't want to close the Window. There are multiple solutions on how to close the WPF Window when ESC key is pressed. eg. http://stackoverflow.com/questions/419596/how-does-the-wpf-button-iscancel-property-work However this solution closes the Window, without regard to if there is an active control that can consume the Escape key.

    Read the article

  • Double-Escaped Unicode Javascript Issue

    - by Jeffrey Winter
    I am having a problem displaying a Javascript string with embedded Unicode character escape sequences (\uXXXX) where the initial "\" character is itself escaped as "&#92;" What do I need to do to transform the string so that it properly evaluates the escape sequences and produces output with the correct Unicode character? For example, I am dealing with input such as: "this is a &#92;u201ctest&#92;u201d"; attempting to decode the "&#92;" using a regex expression, e.g.: var out = text.replace('/&#92;/g','\'); results in the output text: "this is a \u201ctest\u201d"; that is, the Unicode escape sequences are displayed as actual escape sequences, not the double quote characters I would like.

    Read the article

  • Escaping and unescaping a string with single and double quotes in Javascript

    - by Reina
    I have a search box that a user can search for any string including single AND double quotes, once they have searched, the backend is passing the keyword back to me so I can put it back in the box. I don't know what the string is so I can't escape quotes myself, below is an example: var keyword = "hello"; $("#selectionkeywords").val(); The issue I am having is that if the user enters "hello" the keyword becomes ""hello"" and I get this error: missing ) after argument list [Break On This Error] jQuery("#selectionkeywords").val(""hello""); The user could also enter single quotes so that rules it out as well. I tried using escape unescape but I still have the same issue e.g. escape(""hello"") I could get the value in an unescaped format e.g. "hello" but I don't know what to do with it, escape doesn't work on it I end up with this %26%23034%3Bhello%26%23034%3B So I'm pretty much stuck at the moment as I can't do anything to the string, any ideas?

    Read the article

  • How should I escape strings in JSON?

    - by Bytecode Ninja
    When creating JSON data manually, how should I escape string fields? Should I use something like Apache Commons Lang's StringEscapeUtilities.escapeHtml, StringEscapeUtilities.escapeXml, or should I use java.net.URLEncoder? The problem is that when I use SEU.escapeHtml, it doesn't escape quotes and when I wrap the whole string in a pair of 's, a malformed JSON will be generated.

    Read the article

  • C# alternative for javascript escape function

    - by FosterZ
    hi, what is an alternative for javascript escape function in c# for e.g suppose a string:"Hi Foster's i'm missing /you" will give "Hi%20Foster%27s%20i%27m%20missing%20/you" if we use javascript escape function, but what is the alternative for c#. i have searched for it but no use.

    Read the article

  • Which keycode for escape key with jQuery

    - by Shishant
    I have two functions. When enter is pressed the functions runs correctly but when escape is pressed it doesn't. What's the correct number for the escape key? $(document).keypress(function(e) { if (e.which == 13) { $('.save').click(); } // enter (works as expected) if (e.which == 27) { $('.cancel').click(); } // esc (does not work) });

    Read the article

  • Bizarre Escape Character Question

    - by William Calleja
    I have the following c# code embedded in a literal <% %> of a c# asp.net page string commandString = "SELECT tblData.Content " + "FROM tblData " + "WHERE (tblData.ref = N\'%"+myCurrentREF+"%\')"; This is breaking my code since it apparently cannot use the \' escape character. Why is it so? other escape characters like \" are working so why isn't \' working?

    Read the article

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