Search Results

Search found 44874 results on 1795 pages for 'string format'.

Page 39/1795 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • Crystal Reports Formula Workshop boolean condition to string

    - by Jay
    Hello, I'm currently trying to create a report using Crystal Reports that comes with Visual Studio 2008. I would like to include a field of type boolean on my report that shows a string rather than true or false. The string should contain either contain a € or a % sign. How would I go about doing this in the Formula Workshop? I've tried things like e.g. if {tblAankoopDetails.SoortKorting} = true then "€" else "%" However this never seems to work and results in warnings such as "The formula result must be a number". This should be fairly simple but this is my first go at using Crystal Reports. Help would be much appreciated. Jay

    Read the article

  • Not-quite-JSON string deserialization in Python

    - by cpharmston
    I get the following text as a string from an XML-based REST API 'd':4 'ca':5 'sen':1 'diann':2,6,8 'feinstein':3,7,9 that I'm looking to deserialize into a pretty little Python dictionary: { 'd': [4], 'ca': [5], 'sen': [1], 'diann': [2, 6, 8], 'feinstein': [3, 7, 9] } I'm hoping to avoid using regular expressions or heavy string manipulation, as this format isn't documented and may change. The best I've been able to come up with: members = {} for m in elem.text.split(' '): m = m.split(':') members[m[0].replace("'", '')] = map(int, m[1].split(',')) return members Obviously a terrible approach, but it works, and that's better than anything else I've got right now. Any suggestions on better approaches?

    Read the article

  • PHP: How to check if query string or POST vars contain same var twice

    - by thomasrutter
    It may sound strange, but in my PHP application I need to check if the same variable name has been declared more than once in the query string or POST variables, and return an error value if this is the case. If my application doesn't return an error in this case, it fails a compliance check. When accessing vars using $_GET, $_POST, etc, PHP only returns the last value given for each variable name. I can't find a way to tell if any variable appeared more than once. I simply need to find out if the query string or the variables in the POST body contained the same variable name more than once, whatever the values.

    Read the article

  • String labels on boxplot outliers

    - by Benoît Collette
    Hi! I want to put string labels on outliers in a boxplot. Here's a simplification of the dataset I'm using: [,x] [,y] [,z] 7 2 a 10 2 b 112 3 c boxdata<-boxplot(x ~ y) To put values as label on outliers by group, I use this function: for(i in 1:length(boxdata$group)){ text(boxdata$group[i], boxdata$out[i], which(x==boxdata$out[i]),labels=boxdata$out[i],pos=4) } The problem is that I want to put z (string) as label instead of outlier value, but I don't know how to proceed. What do I need to do? Thank you! Ben

    Read the article

  • varchar comparison in SQL Server

    - by Ram
    I am looking for some SQL varchar comparison function like C# string.compare (we can ignore case for now, should return zero when the character expression are same and a non zero expression when they are different) Basically I have some alphanumeric column in one table which needs to be verified in another table. I cannot do select A.col1 - B.col1 from (query) as "-" operator cannot be applied on character expressions I cannot cast my expression as int (and then do a difference/subtraction) as it fails select cast ('ASXT000R' as int) Conversion failed when converting varchar 'ASXT000R' to int Soundex would not do it as soundex is same for 2 similar strings Difference would not do it as select difference('abc','ABC') = 4 (as per msdn, difference is the difference in the soundex of 2 character expressions and difference =4 implies least different) Is there any other way of doing it ?

    Read the article

  • parsing string off a configuration using strtok in C

    - by Jessica
    in the configuration file i have entries similar to this one: filepath = c:\Program Files\some value Where the path can contain spaces and there are no quotes on that string. I tried parsing this with strtok like: char *option; char *value; value = strtok(line, " ="); strcpy(option, value); value = strtok(NULL, " ="); where line is the line I am reading from the file, option will contain the left side of the equal (filepath) and value will contain the right side (c:\program files\some value). I know, it's poor coding, but I haven't found something better. sorry... In any case, for those options where there's no space in the right side it works great, but in those containing spaces it only return the string until the 1st space: c:\Program. Is there any other way to do this? Code is appreciated. Jessica

    Read the article

  • Copying part of a string in C

    - by wolfPack88
    This seems like it should be really simple, but for some reason, I'm not getting it to work. I have a string called seq, which looks like this: ala ile val I want to take the first 3 characters and copy them into a different string. I use the command: memcpy(fileName, seq, 3 * sizeof(char)); That should make fileName = "ala", right? But for some reason, I get fileName = "ala9". I'm currently working around it by just saying fileName[4] = '\0', but was wondering why I'm getting that 9. Note: After changing seq to ala ile val ser and rerunning the same code, fileName becomes "alaK". Not 9 anymore, but still an erroneous character.

    Read the article

  • C#, string replace russian to english

    - by Fabio Beoni
    Hello, I have a strange problem replacing chars in string... I read a .txt file containing russian text, and starting from a list of letters russian to english (ru=en), I loop the list and I WOULD like to replace russian characters with english characters. The problem is: I can see in the debug the right reading of the russian and the right reading of the english, but using myWord = myWord.Replace(ruChar, enChar), the string is not replaced. My txt file is a UTF-8 encoding. Any suggestions?? Thank you to all...

    Read the article

  • Accessing object property as string and setting its value

    - by ludicco
    Hello there, I have an object in csharp from the class Account each account have a owner, reference, etc. One way I can access an accounts properties is through accessors like account.Reference; but I would like to be able to access it using dynamic string selectors like: account["PropertyName"]; just like in javascript. so I would have account["Reference"] which would return the value...but I also would like to be able to sign a new value after that like: account["Reference"] = "124ds4EE2s"; I've noticed I can use DataBinder.Eval(account,"Reference") to get a property based on a string, but using this I can't sign a value to the property. Any idea on how I could do that? Thanks a lot

    Read the article

  • Parsing a string

    - by sfactor
    i have a string of the format SUCCESS,12:34:56:78:90, i want to separate these two values that are separated by commas into two different strings. how do i do that in gcc using c language.

    Read the article

  • jQuery AJAX converting variable string to html styled text

    - by sadmicrowave
    I've got an AJAX transmission of a variable string in my primary coding language (Visual FoxPro 9) that looks like this: AjaxResponse = CREATEOBJECT("Custom") lcMessage = "<li class='hello'>Hello</li>" AjaxResponse.AddProperty("Reply", lcMessage) Response.ContentType = "text/html" Response.Write(AjaxResponse.Reply) While using the jQuery function .ajax() I've created a success: function that looks like this: $.ajax({ url: 'index?Proc=GetUuserHistory', dataType: "html", success: function(data){ $("div#history-text").text(data); }; }); My problem is that the text inserting into 'div#history-text' is unformatted and contains the li tags still. I've tried substituting the .text for .prepend, .append, and .html with no luck...is there a way to convert this string back to html format after its been received using Ajax?

    Read the article

  • connection string reading data from excel in asp.net

    - by Greg
    Hello, I am trying to read data from excel file in asp.net. I have added the connection string to webConfig file: <add name="xls" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=HPM_DB.xls;Extended Properties=Excel 8.0"/> But it shows me an errormessage when I run this query: string query = "Select * from [IO_Definition$]"; IO_Definition is the name of the spreadsheet in my excel file. I also added the excel file to the App_Data folder of the website. The error is: The Microsoft Jet database engine could not find the object 'IO_Definition$'. Make sure the object exists and that you spell its name and the path name correctly. The thing is, when I write the absolute path of the excel file in the connectionString it does work. Is there anyway I can make it work without writing the absolute path? Thanks, Greg

    Read the article

  • Removing a character from a string

    - by Prasanth Madhavan
    i have a string. I want to delete the last character of the string if it is a space. i tried the following code, str.erase(remove_if(str.begin(), str.end(), isspace), str.end()); but my g++ compiler gives me an error saying: error: no matching function for call to ‘remove_if(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, <unresolved overloaded function type>)’ please help.

    Read the article

  • Lua Programming for PSP: Sending a string, then spliting that string

    - by Trey Andrews
    How do I send a string between 2 PSPs? Here is a test script: Script A Adhoc.init() Adhoc.connect() data1 = "Trey777" data2 = "This is a test!!..." Outdata = "Name"..data1.."text"..data2 function senddata() Adhoc.send(Outdata) end While true do screen.waitVblankStart() screen:flip() end Script B red = Color.new(255,0,0) Adhoc.init() Adhoc.connect() function recevmsg() data = Adhoc.recv() ----What do I here to split the text? ----print name to line '0,10' ----print text to line'0,20' end While true do screen.waitVblankStart() screen:flip() end Each script will be loaded onto a different PSP. One will send and one will receive. I need to know how does it split a string? string.find and sub return numbers, not text

    Read the article

  • Sybase ODBC connection String with .net

    - by nitinkhanna
    Hi, I am having SYBASE 12.5 install on my server as well as my PC, I am unable to get the correct connection string. I have used the connectionstrings.com but unable to get the correct one. After runnig and making the connection Driver={Sybase ASE ODBC Driver};srvr=server_name;database=database_name;UID=user_name;PWD=pass; and some other combination of thic connection string I am getting the Datasource ="" Driver ="" DataBase="" ServerVersion = Invalid Operation. Connection is closed What am I suppose to correct in that. Please help. Thanks

    Read the article

  • Copying non null-terminated unsigned char array to std::string

    - by karlphillip
    If the array was null-terminated this would be pretty straight forward: unsigned char u_array[4] = { 'a', 's', 'd', '\0' }; std::string str = reinterpret_cast<char*>(u_array); std::cout << "-> " << str << std::endl; However, I wonder what is the most appropriate way to copy a non null-terminated unsigned char array, like the following: unsigned char u_array[4] = { 'a', 's', 'd', 'f' }; into a std::string. Is there any way to do it without iterating over the unsigned char array? Thank you all.

    Read the article

  • Performance intensive string splitting and manipulation in java

    - by juhanic
    What is the most efficient way to split a string by a very simple separator? Some background: I am porting a function I wrote in C with a bunch of pointer arithmetic to java and it is incredibly slow(After some optimisation still 5* slower). Having profiled it, it turns out a lot of that overhead is in String.split The function in question takes a host name or ip address and makes it generic: 123.123.123.123-*.123.123.123 a.b.c.example.com-*.example.com This can be run over several million items on a regular basis, so performance is an issue.

    Read the article

  • Java String Replace and null characters

    - by praspa
    Testing out someone elses code (of course it was ...) , I noticed a few JSP pages printing funky non-ascii characters. Taking a dip into the source I found this tidbit. // remove any periods from first name e.g. Mr. John --> Mr John firstName = firstName.trim().replace('.','\0'); Does replacing a character in a String with a null character even work in Java? I know that '\0' will terminate a c-string. Would this be the culprit to the funky characters? Thanks PR

    Read the article

  • Search a string to find which records in table are inside said string

    - by Improfane
    Hello, Say I have a string. Then I have a number of unique tokens or keywords, potentially a large number in a database. I want to search and find out which of these database strings are inside the string I provide (and get the IDs of them). Is there a way of using a query to search the provided string or must it be taken to application space? Am I right in thinking that this is not a 'full text search'? Would the best method be to insert it into the database to make it a full text search?

    Read the article

  • java string detection of ip

    - by user384706
    Hi, Assume a java string that contains an IP (v4 or v6) or a hostname. What is the best way to detect among these cases? I am not interested so much on whether the IP is in valid range (e.g. 999.999.999.999 for IPv4). I am interested in just a way to detect if a String is a hostname or an IP (v4 or v6). Initially I though this: if(theString.indexOf("@")!=-1){ //Not an Ip } but I am not sure if I should always expect a format containing @ always. Thanks

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >