Search Results

Search found 5222 results on 209 pages for 'characters'.

Page 123/209 | < Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >

  • Perl Term::ReadKey don't wait for newline

    - by tim
    In a perl script, I'm trying to accept input without blocking and without echoing the characters entered (The script is producing output and I want to have 'hotkeys' to alter its behaviour). I got as far as using use Term::ReadKey; ReadMode( "cbreak", STDIN ); if($input = ReadKey($pause_time, STDIN)){ #process input } But once the user types anything then the script stops until a newline is entered. I'd like the input to be processed per-character, without waiting for a newline.

    Read the article

  • detect a postback from a radiobutton list

    - by user228777
    I am trying to detect a postback from Radiobutton list. I am trying to use following code: If Page.Request.Params.Get("__EVENTTARGET") = optDownload.UniqueID.ToString Then But Page.Request.Params.Get("__EVENTTARGET") returns "ctl00$ContentPlaceHolder1$pnlBarAccounts$i0$i2$i0$CHChecking$Acct1$optDownload$4" And = optDownload.UniqueID.ToString returns "ctl00$ContentPlaceHolder1$pnlBarAccounts$i0$i2$i0$CHChecking$Acct1$optDownload" There is a difference in last 2 characters, how do I detect a postback from Radiobutton list?

    Read the article

  • How to use Unicode in C++?

    - by Dox
    Assuming a very simple program that: -ask a name. -store the name in a variable. -display the variable content on the screen. It's so simple that is the first thing that one learns. But my problem is that I don't know how to do the same thing if I enter the name using japanese characters. So, if you know how to do this in C++, please show me an example (that I can compile and test) Thanks.

    Read the article

  • replace new lines with comas in shell

    - by mpapis
    I want to replace new lines in text with coma or space but do not change the last new line. I know of this question: How to replace new lines with tab characters - but it does produce an tab on end instead of new line. So far I have come with: awk 'NR>1{printf","} {printf $1} END{printf"\n"}' Is there an easier way to do this? This is not an assignment, I am just curious want to level up my scripting.

    Read the article

  • Unload AppDomain Assembly

    - by burkhardg
    I want to read some information from a .Net assembly and then modify the DLL by appending a short sequence of characters. The first part works fine but the second step fails as the assembly is still in use. This is the case although I loaded the assembly in its own AppDomain and after I finished step 1 unloaded the AppDomain.

    Read the article

  • Dividing a string into list according to the format given

    - by user506710
    Hello all , I have a string like "SAB_bARGS_D" . What I want is that the string gets divided into list of characters but whenever there is a _ sign the next character gets appended to the previous one. So the answer to above should be ['S','A','B_b','A','R','G','S_D'] It can be done by using a for loop traversing through the list but is there an inbuilt function that I can use..... Thanks a lot

    Read the article

  • regex. How can I match the value between '+' and ':' ?

    - by martin
    I have this string: sometext +[value]:- I would like to match the value(1-3 numerical characters) (with regex, javascript) sometext may contain a +sign if i'm unlucky so I don't wanna end up with matching some +text +value:- I sat up last night banging my head against this, so I would be really glad if someone could help me.

    Read the article

  • How to type in two text fields simulatenously (jQuery)

    - by tester
    I was unsuccessful in finding a jQuery plugin that allowed me to write in two inputs simultaneously. I'm trying to write a normal title in one field, and at the same time type in another input write the same text without special characters or spaces. e.g. Input 1: This is my Title! Input 2: ThisIsMyTitle

    Read the article

  • Signs that a SQL statement is dangerous

    - by Matt
    Hi, I want to develop a function in PHP that checks how dangerous a SQL statement is. When i say dangerous i mean, certain symbols, characters or strings that are used to get data from a database that the user shouldnt see. For example: SELECT * FROM users WHERE userId = '1' can be injected in several ways. Although i clean the params, i also want to monitor how safe the query is to run. Thanks in advance

    Read the article

  • Python - 2 Questions: Editing a variable in a function and changing the order of if else statements

    - by Eric
    First of all, I should explain what I'm trying to do first. I'm creating a dungeon crawler-like game, and I'm trying to program the movement of computer characters/monsters in the map. The map is basically a Cartesian coordinate grid. The locations of characters are represented by tuples of the x and y values, (x,y). The game works by turns, and in a turn a character can only move up, down, left or right 1 space. I'm creating a very simple movement system where the character will simply make decisions to move on a turn by turn basis. Essentially a 'forgetful' movement system. A basic flow chart of what I'm intending to do: Find direction towards destination Make a priority list of movements to be done using the direction eg.('r','u','d','l') means it would try to move right first, then up, then down, then left. Try each of the possibilities following the priority order. If the first movement fails (blocked by obstacle etc.), then it would successively try the movements until the first one that is successful, then it would stop. At step 3, the way I'm trying to do it is like this: def move(direction,location): try: -snip- # Tries to move, raises the exception Movementerror if cannot move in the direction return 1 # Indicates movement successful except Movementerror: return 0 # Indicates movement unsuccessful (thus character has not moved yet) prioritylist = ('r','u','d','l') if move('r',location): pass elif move('u',location): pass elif move('d',location): pass elif move('l',location): pass else: pass In the if/else block, the program would try the first movement on the priority on the priority list. At the move function, the character would try to move. If the character is not blocked and does move, it returns 1, leading to the pass where it would stop. If the character is blocked, it returns 0, then it tries the next movement. However, this results in 2 problems: How do I edit a variable passed into a function inside the function itself, while returning if the edit is successful? I have been told that you can't edit a variable inside a function as it won't really change the value of the variable, it just makes the variable inside the function refer to something else while the original variable remain unchanged. So, the solution is to return the value and then assign the variable to the returned value. However, I want it to return another value indicating if this edit is successful, so I want to edit this variable inside the function itself. How do I do so? How do I change the order of the if/else statements to follow the order of the priority list? It needs to be able to change during runtime as the priority list can change resulting in a different order of movement to try.

    Read the article

  • What's the easiest way to assign a string returned from the server to a javascript string?

    - by powerboy
    The following does not work: var js_str= '<?php echo $str_from_server; ?>'; The problem is that, $str_from_server can contain any characters. If it contains single quotes or line breaks or others, the above code will break. And I do not have access to the server-side code. What's the easiest way to "escape" the contents of $str_from_server into a javascript string, and then it can be restored later?

    Read the article

  • How to save massive numbers in php...

    - by James Rattray
    I want Pi to like 100,000,000 decimals/digits... And variables (well for me) say they have a limit of 67,000,000 bytes... Is there any way around this? can you save the first 10,000 characters/digits into one? can you save it into an array 10,000 in each? Is there a way? If so how? Thanks alot...

    Read the article

  • Joomla 1.5 & Indic Unicode Fonts - How-to?

    - by Ganesh
    I am using Inscript Keyboard to directly type into TinyMCE. However when I click on save, all the characters appear as question marks on website and even in article list on admin side. How I should solve the problem? I am specifically talking about Marathi but the problem-solution might be same for all Devnagrari fonts. Thanks in advance.

    Read the article

  • C# Function that generates strings according to input

    - by mouthpiec
    Hi, I need a C# function that takes 2 strings as an input and return an array of all possible combinations of strings. private string[] FunctionName (string string1, string string2) { //code } The strings input will be in the following format: String1 eg - basement String2 eg - **a*f**a Now what I need is all combinations of possible strings using the characters in String2 (ignoring the * symbols), and keeping them in the same character position. Eg: baaement, baaefent, baaefena, basefent, basemena, etc any help? :)

    Read the article

  • need to crawl images and the whole web pages

    - by Kei Situ
    hey, I am starting a project and wonder the relationship between the characters in images and the whole web page where the images reside. so first, i want to crawl some images and their web pages.....need to save the crawl result in local disk for further analysis. I wonder if there is any open source for this issue? thx^_^

    Read the article

< Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >