string

How to check that Java String is not all whitespaces

I want to check that Java String/character array is not just made up of whitespaces. How would I go about doing this in Java. This is a very similar question except it's Javascript http://stackoverflow.com/questions/2031085/check-if-string-contains-characters-whitespaces-not-only-whitespaces EDIT: I removed the bit about alphanumeric c...

SSAS - Always show zeros - NOT blanks

Hi, I have a cube that I access via Targit (BI Solution). When I browse / use that cube I want all quantity results to be a zero if null / blank NOT a blank, but no matter what I try I get blanks. I have changed the Null Processing property for the measure in question as well as attempted to change / remove the format string. I still...

HowTo get a Map from a csv string

Hi, I'm fairly new to Scala, but I'm doing my exercises now. I have a string like "A>Augsburg;B>Berlin". What I want at the end is a map val mymap = Map("A"->"Augsburg", "B"->"Berlin") What I did is: val st = locations.split(";").map(dynamicListExtract _) with the function private def dynamicListExtract(input: String) = { if (inp...

Java string comparisions/quotations

Hi, My problem is the comparision of two objects and the strings that they return (accessed through getters). Object one parses a csv file for dates and when printed out through exampleObject.getDateTime() returns the string: "2010-03-26-10-54-06.471000" Object two has its dateTime string set by the user. When I set the dateTime on o...

Python convert string object into dictionary

Hi I have been working to build a complex data structure which would return a dictionary. Currently that class return string object of the form { cset : x, b1 : y, b2 : z, dep : { cset : x1, b1 : y1, b2 : z1, dep : { cset : ...

CFString to string?

Hi, I have follow code to make a String to a CFString: internal static byte[] StringToCFString(string value) { byte[] b; b = new byte[value.Length + 10]; b[4] = 0x8c; b[5] = 07; b[6] = 01; b[8] = (byte)value.Length; Encoding.ASCII.GetBytes(value, 0, value.Length, b, 9); ...

convert decimal to a string - in thousands with rounding

Hi, I need to convert a decimal to currency string so i did this: CultureInfo usa = new CultureInfo("en-US"); NumberFormatInfo nfi = usa.NumberFormat; nfi.CurrencyDecimalDigits = 0; myValueFormated = String.Format(nfi, "{0:C}", value); It removed decimal places, gave me a comma separato...

Storing binary data in strings - ideologically wrong?

Hello. Some programming languages have support for strings, that are stored as folows: For example, AnsiString type in Delphi. These strings are conveniently managed and one can think, that it is a good idea to use them as a container for binary data since there are some effective operations on concatenation, substring extraction etc....

Sending special strings with "WriteLn" in "Indy" (Delphi)

Hi, In Indy when we are sending some strings to the server , they change and will be shown in new format . for example i tried to send a binary file(File.exe) with "WriteLn" command in indy : Ms.LoadFromFile(FileAddress); Ms.Read(B, Chunk); for j := low(B) to high(B) do begin Part := Part + chr(B[j]); end; ...

VBA String concatenation

Hey Guys, Is there any Java-like solution for concatenatin strings in VBA? I want to use a MsgBox in a way like this: ... Set UT = Workbooks(dropdownValue).Worksheets(1) With UT UT_rows = .Cells(3, 15).End(xlDown).Row End With MsgBox "Rows of the file: " + UT_rows But when I do that, my code hangs up at this point. (incompati...

php code to check for repeating characters / bogus text

hi there, i'm running a dating site and there is a place where people enter their profile - I already have a bad-words filter but now I have a problem where people enter a profile that is just garbage characters or just "aaaaaaaaaaaaaaaaaaaa" or "--------------" etc. I'm looking for an effective way of filtering out the long words of rep...

Help evaluating this json string array in vb.net

{"images":[{"id":"obj_0","src":"background.jpg","width":"640","height":"480"},{"id":"obj_9","src":"elements/pipe.png","width":50,"height":44,"top":196,"left":154,"rotation":"0"},{"id":"obj_13","src":"elements/cigarette.png","width":45,"height":67,"top":168,"left":278,"rotation":"0"},{"id":"obj_10","src":"elements/hat.png","width":227,"he...

Is there algorithm for sorting array of strings for GPU?

Array to sort has approximately one million strings, where every string can have length up to one million characters. I am looking for any implementation of sorting algorithm for GPU. I have a block of data with size approximately 1MB and I need to construct suffix array. Now you can see how it is possible to have one million strings i...

String to Date Parsing not working

I am getting date as string as a parameter from Servlet. Now when I am trying to parse it again to get util.Date, it gives me error. I am getting string "Fri Jul 02 00:00:00 IST 2010" & I want util.Date from it. Tried SimpleDateFormat, DateFormat but didn't work. ...

Converting relative paths to absolute paths C#

Hi, I have a program that trawls html files and finds href tags, takes the string inside (the link), and converts it to the file location. The problem comes when the href tag uses relative links, eg: <a href="../../../images/arrow.gif"/> In that case, my program returns: \\server\webroot\folder\foo\bar\mew\..\..\..\images\arrow.gif ...

How do I get STL std::string to work with unicode on windows?

Hello All, At my company we have a cross platform(Linux & Windows) library that contains our own extension of the STL std::string, this class provides all sort of functionality on top of the string; split, format, to/from base64, etc. Recently we were given the requirement of making this string unicode "friendly" basically it needs to s...

Is it possible to construct an "infinite" string?

Is there any real sequence of characters that always compares greater than any other string? My first thought was that a string constructed like so: std::basic_string<T>(std::string::max_size(), std::numeric_limits<T>::max()) Would do the trick, provided that the fact that it would almost definitely fail to work isn't such a big issu...

Javascript, String: Getting a Javascript var as a string

Because using .toString() for null vars doesn't work, and I can't be checking each and every one of these in my particular application. I know this is a stupidly simple problem with an answer that literally must be staring me in the face right now. ...

If is in - Statement. Python.

What statemen should i use for this kind of task: I need finde if string variable a is in string variable b. What should I use? ...

Bourne: How to preserve a string in a variable?

Hello, I'm trying to execute the following line in Bourne: LIST="-foo, -bar, baz" However, I am getting an error: -bar: command not found Can anyone help me figure this out? Thanks! ...