string

Is there a software that helps configure structured strings?

I'm using a JavaScript component that takes a 2D array as an input. There is a particular format to it, and I basically need to develop grid GUI to help configure such a string, instead of having to type it manually. [ [0,"Chart","linear"], [2,"3D",false], [1,"Labels",["Student","Business","Professional","Retired"]] ] Any ideas ...

How can I convert a numerical value to text in JavaScript?

I would like to convert a numerical value to a text string. I am opening several windows with the window.open() command and I would like these windows not to be on top of each other. For that I use the argument "left" and "top" in the windows.open command but these parameters need to be text entities. for (var i = 0; i < final_number; ...

How are strings embedded in binary files?

I'm writing my own bytecode and virtual machine (on .NET) and one thing i can't figure out is how to embed strings into my bytecode. Any ideas now how i should do it? ...

Cast between String and Classname

I have a string, containing an Class name. It is, for example, a string containing "Article". That string came up from the params[]. What should I do to work with this string as if it was a class name? For instance, I want to do: Article.all and so on. Any idea? ...

Adding a Javascript string value in a LinkButton inside a DataList Item on ASP .NET

I was able to create a client script click event on a link button for normal ID's and numbers. But when I tried to do this with a string it causes a parse error. Not the difference lies on adding the single quote to enclose the Even("name") value. If the single quote is missing a javascript error occurs. If it exist, an ASPX parse error ...

What is the difference between the ways to create a string in C?

What is the difference between these two forms of a string variable in C language? char *string1; char string2[]; Is there any other way to do it? Thank you very much. ...

Cannot pass string to CreateThread receiver

I have a thread function that looks something like this: DWORD WINAPI Thread_ProcessFile( LPVOID lpParam ) { char *filename = (char*)lpParam; printf( "%s\n", filename ); } I also have a class that calls CreateThread and uses the above function for the routine address: void CMyClass::ProcessFile( void ) { HANDLE tHwnd = 0; char s...

MS SQL 2008 cast null to string

Hello! I got a few stored procedures that uses a TRY/CATCH statement, so i execute the main program and if it generates any errors i catch them. Now my problem is in the catch statement, i have this piece of code: BEGIN TRY INSERT INTO ContentTypes (ContentName, ContentPath) VALUES (@ContentName, @ContentPath) SET @QRe...

PHP Multi Byte str_replace?

I'm trying to do accented character replacement in PHP but get funky results, my guess being because i'm using a UTF-8 string and str_replace can't properly handle multi-byte strings.. $accents_search = array('á','à','â','ã','ª','ä','å','Á','À','Â','Ã','Ä','é','è', 'ê','ë','É','È','Ê','Ë','í','ì','î','ï','Í','Ì','Î','Ï','œ','ò','ó',...

PHP: strtotime()... again.

How do I have to write "+3 days at 12:34:56" to make strtotime() parse it properly? ...

What is the fastest (built-in) comparison for string-types in C#

What is the fastest built-in comparison-method for string-types in C#? I don't mind about the typographic meaning here it's only for use in sortedLists and stuff like that to search fast in large collections. I think there are only two methods: Compare and CompareOrdinal. What's the fastest? The second question is if there is a faster m...

Determine to SQL Order by ASC or DSC

I have a datalist that receives values from a MySQL database. This datalist can be sorted by various column values such 'Title', 'Author', 'Published Date', etc. To determine what value to sort by, the value is inserted into the query string. I.e. www.web.com/default.aspx?order_by=title I also determine wheter to order in ascendi...

How to split a string by multiple delimiters in PHP?

"something here ; and there, oh,that's all!" I want to split it by ; and , so after processing should get: something here and there oh that's all! ...

How do I get the length of a textbox?

I am unable to get length of textbox $('input[id$=textinput1]').val().length returns nothing I cannot use $('#textinput1').val().length - although this works Update: My Element looks like this <input id="textinput1" type="text" /> ...

C#- problem with splitting string

I have a set of values based on which i have split the string string[] seperator = new string[9]; seperator[0] = "*"; //is the client seperator[1] = "/"; //is the name of company seperator[2] = "("; //name of the market seperator[5] = ":"; //ID seperator[6] = "?"; //orderType ...

Need to convert data set to string in C#

Hey all, Have an Excel data source which I am querying ok and posting data in data grid. The trick is that I want the data in a string variable but am failing to do that. I have tried arrayLists and arrays and I am not getting there yet because dataset has multiple data types (numbers, strings). Please help me. Source code: <%@ Page ...

get every combination of strings

I had a combinatorics assignment that involved getting every word with length less than or equal to 6 from a specific combination of strings. In this case, it was S = { 'a', 'ab', 'ba' }. The professor just started listing them off, but I thought it would be easier solved with a program. The only problem is that I can't get a good alg...

Resources and localization - parent / child strings in .resx files?

I'm creating WebResources.resx file with several string messages I'd like to categorize: Signup_Status_Inactive Signup_Status_Reserved etc... Since it's just an XML file in the background, is it possible to create parent/child relationships so I don't have to prefix related strings and follow a better dot notation? To get around this ...

Remove extra white space from inside a C string?

I have read a few lines of text into an array of C-strings. The lines have an arbitrary number of tab or space-delimited columns, and I am trying to figure out how to remove all the extra whitespace between them. The end goal is to use strtok to break up the columns. This is a good example of the columns: Cartwright Wendy 93 Willi...

Reading a float from string

Hello, I have a simple string that I want to read into a float without losing any visible information as illustrated below: s = ' 1.0000\n' When I do f = float(s), I get f=1.0 How to trick this to get f=1.0000 ? Thank you ...