Search Results

Search found 35302 results on 1413 pages for 'string literals'.

Page 152/1413 | < Previous Page | 148 149 150 151 152 153 154 155 156 157 158 159  | Next Page >

  • Removing HTML from a Java String

    - by Mason
    Is there a good way to remove HTML from a Java string? A simple regex like replaceAll("\\<.*?>","") will work, but things like &amp; wont be converted correctly and non-HTML between the two angle brackets will be removed (ie the .*? in the regex will disappear).

    Read the article

  • in python how to remove this \n from string or list

    - by pritesh modi
    this is my main string "action","employee_id","name" "absent","pritesh",2010/09/15 00:00:00 so after name coolumn its goes to new line but here i append to list a new line character is added and make it like this way data_list*** ['"action","employee_id","name"\n"absent","pritesh",2010/09/15 00:00:00\n'] here its append the new line character with absent but actually its a new line strarting but its appended i want to make it like data_list*** ['"action","employee_id","name","absent","pritesh",2010/09/15 00:00:00']

    Read the article

  • How to convert map to url query string?

    - by Ula Krukar
    Do you know of any utility class/library, that can convert Map into URL-friendly query string? Example: I have a map: - "param1"=12, - "param2"="cat" I want to get: param1=12&param2=cat. PS. I know I can easily write it myself, I am just surprised that I cannot find it anywhere (I checked Apache Commons so far).

    Read the article

  • connection string through tcp/ip

    - by sreenath sreenath
    I had an issue can you suggest some idea , I remember we spoke aboutsomething around this issue Iam in head office Dubai I had developed my winform application with sql server here in my office .... Now its time for deployment but what the issue is before implementation it should be tested by the clients in Kenya.I cannot hold the expense of traveling to Kenya and setting up the server there i TRIED OF TEAMWEAVER bUT IT S HARD TO GO WITH IT , Is ther any idea for sharing my application via internet?? moreover like connection string through internet/tcp/ip

    Read the article

  • Sorting string column containing numbers in SQL?

    - by Ish
    Dear Folks, I am trying to sort string column (containing numbers). // SELECT `name` FROM `mytable` ORDER BY `name` ASC +----------+ +-- name --+ +----------+ +-- a 1 ---+ +-- a 12 --+ +-- a 2 ---+ +-- a 3 ---+ You see natural sorting algorithm of Mysql is placing a 12 after a 1 (which is ok for most apps), But I have unique needs, so I want result should be sorted like this. +----------+ +-- name --+ +----------+ +-- a 1 ---+ +-- a 2 ---+ +-- a 3 ---+ +-- a 12 --+ Is it possible with just SQL, or I have to manipulate result-set at application level? Thanks for reading...

    Read the article

  • Python and ReportLab: add a string at the end of every page

    - by user608341
    Hi peoples, I'm building a pdf document with reportlab, using the Paragraph class: doc = SimpleDocTemplate(response, leftMargin=lateral_margin, rightMargin=lateral_margin, topMargin=top_bottom_margin, bottomMargin=top_bottom_margin) Document = [] Document.append(Paragraph("bla bla bla bla", my_style)) doc.build(Document) Now I want to add at the end of every page a string, how can I do that??

    Read the article

  • Sort string based upon the count of characters Options

    - by prp
    Sample Data : input : "abcdacdc" Output : "cadb" here we have to sort strings in order of count of characters. If the count is same for characters. maintain the original order of the characters from input string. my approach: i have used array of 26 for maintaining occurrence of all characters and sort it then print it.But while doing so i am not able to maintain order in case if two characters have same count. please suggest any improvement or any other algo.

    Read the article

  • Does -localizedDescription of NSError return the actual localized string, or does it return a key fo

    - by mystify
    Must I do something like this? NSString *errorDescription = [error localizedDescription]; NSString *errorInfoStr = NSLocalizedString(errorDescription, nil); Or do I use NSLocalizedString already when populating the userInfo dictionary with the NSLocalizedDescriptionKey key and value? So the value for that is not actually a key for NSLocalizedString, but it is the actual localized string ready to show up on screen?

    Read the article

  • Oracle - Return shortest string value in a set of rows

    - by Sridhar
    Hi, I'm trying to write a query that returns the shortest string value in the column. For ex: if ColumnA has values ABCDE, ZXDR, ERC, the query should return "ERC". I've written the following query, but I'm wondering if there is any better way to do this? BTW, the query should return a single value. select distinct ColumnA from ( select ColumnA, rank() over (order by length(ColumnA), ColumnA) len_rank from TableA where ColumnB = 'XXX' ) where len_rank <= 1 Thank you.

    Read the article

  • Java monospace draw string

    - by javaAmator
    Hello! How can I draw a String in Java (using Graphics2d) in monospace mode? I have a font that looks like LCD screen font, and I want to draw something like LCD label. I am using Digital 7 Mono font. Do you know where I can find another font that will be monospace and lcd (I wan to type only digitals)?

    Read the article

  • C++ problem with string stream istringstream

    - by user69514
    I am reading a file in the following format 1001 16000 300 12.50 2002 24000 360 10.50 3003 30000 300 9.50 where the items are: loan id, principal, months, interest rate. I'm not sure what it is that I am doing wrong with my input string stream, but I am not reading the values correctly because only the loan id is read correctly. Everything else is zero. Sorry this is a homework, but I just wanted to know if you could help me identify my error. if( inputstream.is_open() ){ /** print the results **/ cout << fixed << showpoint << setprecision(2); cout << "ID " << "\tPrincipal" << "\tDuration" << "\tInterest" << "\tPayment" <<"\tTotal Payment" << endl; cout << "---------------------------------------------------------------------------------------------" << endl; /** assign line read while we haven't reached end of file **/ string line; istringstream instream; while( inputstream >> line ){ instream.clear(); instream.str(line); /** assing values **/ instream >> loanid >> principal >> duration >> interest; /** compute monthly payment **/ double ratem = interest / 1200.0; double expm = (1.0 + ratem); payment = (ratem * pow(expm, duration) * principal) / (pow(expm, duration) - 1.0); /** computer total payment **/ totalPayment = payment * duration; /** print out calculations **/ cout << loanid << "\t$" << principal <<"\t" << duration << "mo" << "\t" << interest << "\t$" << payment << "\t$" << totalPayment << endl; } }

    Read the article

  • how to convert string to control ?

    - by Gold
    hi i have string MyText that hold "L1" i have label control that his name is "L1" is there any way to read label L1 using MyText ? somthing like: TMT = MyText.text or: TMT = ((Control)MyText.ToString()).Text; thank's in advance

    Read the article

  • How do I set a property in python using its string name

    - by dave
    Hey, here's a dumb question: how can I set an object property given its name in a string. I have a dictionary being passed to me and I wish to transfer its values into namesake properties using code like this: for entry in src_dict: if entry.startswith('can_'): tgt_obj[entry] = src_dict_profile[entry] I'm still a bit of a noob with Python so would appreciate some help. - dave.

    Read the article

  • ruby - can't modify frozen string (TypeError)

    - by Straff
    Got ... '[]=': can't modify frozen string (TypeError) when trying to modify what I thought was a copy of ARGV[0]. Same results for each of arg = ARGV[ 0 ] arg_cloned = ARGV[ 0 ].clone arg_to_s = ARGV[ 0 ].to_s arg[ 'x' ] = 'y' arg_cloned[ 'x' ] = 'y' arg_to_s[ 'x' ] = 'y'

    Read the article

  • PHP - Check for whitespace at beginning of string

    - by ITg
    I need to use preg_match to check that only a-z0-9. is used (including full stop(.)). I don't want to replace anything. My problem is that it doesn't notice white space at beginning of a string. Also, if anyone knows how to check there is no two full stops in a row, I would be very grateful. What I have so far: ("/[^a-z0-9.]+$/",$request) Thanks !

    Read the article

  • Extract two double Values from String using RegEx in Java

    - by tzippy
    I am reading a file by line and need to extract latitude and longitude from it. This how lines can looks: DE 83543 Rott am Inn Bayern BY Oberbayern Landkreis Rosenheim 47.983 12.1278 DE 21147 Hamburg Hamburg HH Kreisfreie Stadt Hamburg 53.55 10 What's for sure is, there are no dots surrounded by digits except for the ones representing the doubles. Unfortunately there are Values without a dot, so it's probably best to check for numbers from the end of the String. thanks for your help!

    Read the article

< Previous Page | 148 149 150 151 152 153 154 155 156 157 158 159  | Next Page >