Search Results

Search found 37183 results on 1488 pages for 'string conversion'.

Page 189/1488 | < Previous Page | 185 186 187 188 189 190 191 192 193 194 195 196  | Next Page >

  • php: regex remove bracket in string

    - by apis17
    hi, similiar like this example, http://stackoverflow.com/questions/1336672/php-remove-brackets-contents-from-a-string i have no idea to replace $str = '(ABC)some text' into $str = 'ABC'; currently use $str = preg_replace('/(.)/','',$str); but not works. how to fix this?

    Read the article

  • Encode and Decode a string in c#

    - by Jibu P C
    Hii, I had a requirement of encode a string provided to a unreadable format and also have to decode after certain action performed. I have tried 'Base64' encoding. But this is not a secure way. I need some other solutions. Give some help regarding the above context.

    Read the article

  • how to generate String difference vectors?

    - by SWKK
    Hi Guys, a bit of a vague question but I am looking for pointers as to how can I generate String diff vectors in C++. The scenario is such that given a paragraph I want to store the various differences(Edit, cut copy paste etc.) it goes through in a draft mode to review Audit history. Any hints in this regard will be really appreciated.

    Read the article

  • PHP curly string syntax question

    - by zildjohn01
    I'm running PHP 5.3.0. I've found that the curly string syntax only works when the first character of the expression is $. Is there a way to include other types of expressions (function calls, etc)? Trivial example: <?php $x = '05'; echo "{$x}"; // works as expected echo "{intval($x)}"; // hoped for "5", got "{intval(05)}"

    Read the article

  • [genshi] Print string as HTML

    - by infinito
    Hello, I would like to know if is there any way to convert a plain unicode string to HTML in Genshi, so, for example, it renders newlines as <br/>. I want this to render some text entered in a textarea. Thanks in advance!

    Read the article

  • MySQL: fetching a null or an empty string

    - by Oden
    Hey, I know whats the difference between a NULL value and an empty string ("") value, but if I want to get a value by using the OR keyword, I get no result for a NULL value The table i want to query looks like this: titles_and_tags +----+----------+------+ | id | title | tag | +----+----------+------+ | 1 | title1 | NULL | | 2 | title2 | tag1 | | 3 | title3 | tag2 | +----+----------+------+ The query i use looks like this: select * from `titles_and_tags` WHERE `title` LIKE "title" AND `tag` = "tag1" OR `tag` IS NULL So i want to get here a rows (id: 1,2), BUT this results 0 rows. What have i done wrong?

    Read the article

  • Django | capture sub domain as a string

    - by MMRUser
    How do I capture a part of sub-domain name and get that name as a string in my views through a request. ex: user.domain.com developer.domain.com I want to capture the user part of this domain name through a request (lets say when the first time user hits the page). Thanks.

    Read the article

  • LINQ expression until to break a string

    - by wonea
    Using LINQ I'm looking to break down the following path string[], however I'd like to break it up to the point of the Binn folder. Is there a WHERE UNTIL operator in LINQ? c:\ Program Files\ Microsoft SQL Server\ MSSQL10.SQLEXPRESS\ MSSQL\ Binn\ sqlservr.exe What I'd like todo var words = from word in thepath where UNTIL thepath == "Binn" select word;

    Read the article

  • Using RegEx to Identify parts of a Database Connection String

    - by David_Jarrett
    I'm trying to get to grips with regular expressions: I have a database connection string and I'd like to use a regular expression to identify specific Keys and Values within it. For example server=foo;database=bar;uid=foo;pwd=bar I'd like something to return "database=bar;" using the 'database' key to identify it, ideally it would be case insensitive. I can do this using normal code, but I think that this is exactly the sort of thing for which regular expressions were designed.

    Read the article

  • C# Get Keys from a Dictionary<string, Stream>

    - by alex
    Suppose I have a Dictionary like so: Dictionary<string, Stream> How can I get a list (or IEnumerable or whatever) of JUST the Keys from this dictionary? Is this possible? I could enumerate the dictionary, and extract the keys one by one, but I was hoping to avoid this. In my instance, the Dictionary contains a list of filenames (file1.doc, filex.bmp etc...) and the stream content of the file from another part of the application.

    Read the article

  • Coldfusion - taking a Serialized String and converting it to a Structure

    - by nobosh
    I have the following serialized string from a nested sortable list: ul[0][id]=main1&ul[0][children][0][id]=child2&ul[0][children][0][class]=&ul[1][id]=main3&ul[2][id]=main4&ul[3][id]=main5 I want to be able to record this in the database, and think I need a structure to do this. What's the best way to turn this into a structure, so I can sort it in the database, and easily render the list on the page in the future. Thanks,B

    Read the article

  • find substrings inside string

    - by senzacionale
    How can i find substrings inside string and then remember and delete it when i found it. EXAMPLE: select * from (select a.iid_organizacijske_enote, a.sifra_organizacijske_enote "Sifra OE", a.naziv_organizacijske_enote "Naziv OE", a.tip_organizacijske_enote "Tip OE" I would like to get all word inside " ", so Sifra OE Naziv OE TIP OE and return select * from (select a.iid_organizacijske_enote, a.sifra_organizacijske_enote, a.naziv_organizacijske_enote, a.tip_organizacijske_enote i try with regex, indexOf() but no one works ok

    Read the article

  • Split string by HTML entities?

    - by user366124
    My string contain a lot of HTML entities, like this &#x22;Hello&nbsp;&lt;everybody&gt;&nbsp;there&#x22; And I want to split it by HTML entities into this : Hello everybody there Can anybody suggest me a way to do this please? May be using Regex?

    Read the article

  • Decrypt PHP encrypted string in C#

    - by NotDan
    I have a string encrypted in PHP that I would like to decrypt in C#. I used the tutorial below to do the encryption, but am having problems decrypting. Can anyone post an example on how to do this? http://www.sanity-free.org/131/triple_des_between_php_and_csharp.html

    Read the article

  • PHP preg_match to get function-like string

    - by pistacchio
    Hi to all, if I have a string like 'foo(bar)', with the following code i can almost parse it the way i want: $results = array(); preg_match( "/\w*(?=(\(.*\))?)/", 'foo(bar)', &$results ); print_r($results); /* Array ( [0] => foo [1] => (bar) ) */ How can I modify the regex to have bar instead of (bar)? Thanks

    Read the article

  • Load image from string

    - by zaf
    Given a string containing jpeg image data, is it possible to load this directly in pygame? I've tried using StringIO but failed and I don't completely understand the 'file-like' object concept. Currently, as a workaround, I'm saving to disk and then loading an image the standard way: # imagestring contains a jpeg f=open('test.jpg','wb') f.write(imagestring) f.close() image=pygame.image.load('test.jpg') Any suggestions on improving this so that we avoid creating a temp file?

    Read the article

  • Variable name as a string in Javascript

    - by fish potato
    Is there a way to get a variable name as a string in Javascript? (like NSStringFromSelector in Cocoa) I would like to do like this: var myFirstName = 'John'; alert(variablesName(myFirstName) + ":" + myFirstName); --> myFirstName:John -- added I'm trying to connect a browser and another program using JavaScript. I would like to send instance names from a browser to another program for callback method.

    Read the article

  • javascript instanceof get type from string name

    - by dcp
    Let's say I have this (assume the name variable is "receiver"): if (!(receiver instanceof com.HTMLReceiver)) { throw new com.IllegalArgumentException( name + " is not an instance of com.HTMLReceiver."); } I'd like to factor this code out into a common method so I could call it like this: Helper.checkInstance(receiver, "com.HTMLReceiver"); But I don't know of a way to convert the com.HTMLReceiver from a string to its actual type so I can use instanceof on it. Is there a way?

    Read the article

< Previous Page | 185 186 187 188 189 190 191 192 193 194 195 196  | Next Page >