Search Results

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

Page 182/1488 | < Previous Page | 178 179 180 181 182 183 184 185 186 187 188 189  | Next Page >

  • Cannot convert from string exception

    - by swetha
    I got an exception sayin, CollectionConverter cannot convert from System.String. sample piece of code : TypeConverter type1 = TypeDescriptor.GetConverter(somemethodtype); Obj = typeConvert.ConvertFromString(result["xxx"].ToString()); can someone tell me y i get dis exception and how to resolve?

    Read the article

  • Writing preprocessor directives to get string

    - by Dave18
    Can you write preprocessor directives to return you a std::string or char*? For example: In case of integers: #define square(x) (x*x) int main() { int x = square(5); } I'm looking to do the same but with strings like a switch-case pattern. if pass 1 it should return "One" and 2 for "Two" so on..

    Read the article

  • Convert String to java.util.Date

    - by Vinayak.B
    Hi Folks, I storing the date to SQLite database in the format d-MMM-yyyy,HH:mm:ss aaa And again retrieving it with the same format, the problem now is, I am gettin every thing fine exepth the Hour. Hour I am geting 00 every time, Here the print statement String date--->29-Apr-2010,13:00:14 PM After convrting Date--->1272479414000--Thu Apr 29 00:00:14 GMT+05:30 2010 Please where I am doing wrong. Cheers, Vinayak

    Read the article

  • How to select all the attributes that contain certain String in an XML Document using LINQ

    - by jaircazarin
    Similar to XPath: How to match attributes that contain a certain string but without using XPath. Is it possible? <c BarFoo="val1"> <d Foo="val2" someAttribute=""> <e FooBar="val3" /> </d> </c> Basically I want to select all the attribute values in the document that their attribute name contains "Foo", so it should return the values of "BarFoo", "FooBar", "Foo" (va1, val2, val3)

    Read the article

  • Use string as input to re.compile

    - by williamx
    I want to use a variable in a regex, like this: variables = ['variableA','variableB'] for i in range(len(variables)): regex = r"'('+variables[i]+')[:|=|\(](-?\d+(?:\.\d+)?)(?:\))?'" pattern_variable = re.compile(regex) match = re.search(pattern_variable, line) The problem is that python adds an extra backslash character for each backslash character in my regex string (ipython), and makes my regex invalid: In [76]: regex Out[76]: "'('+variables[i]+')[:|=|\\(](-?\\d+(?:\\.\\d+)?)(?:\\))?'" Any tips on how I can avoid this?

    Read the article

  • User agent string of Opera Mini on iPhone

    - by nickf
    So hell froze over and Apple accepted Opera Mini into the app store. Does anyone know what the user agent string will be? The documentation says that Opera's template is like this: Opera/9.80 (J2ME/MIDP; Opera Mini/$CLIENT_VERSION/$SERVER_VERSION; U; $LANGUAGE) Presto/$PRESTO_VERSION

    Read the article

  • Database-independant SQL String Concatenation in Rails

    - by Craig Walker
    I want to do a database-side string concatenation in a Rails query, and do it in database-independent way. SQL-92 specifies double-bar (||) as the concatenation operator. Unfortunately it looks like MS SQL Server doesn't support it; it uses + instead. I'm guessing that Rails' SQL grammar abstraction has solved the db-specific operator problem already. If it does exist, how do I use it?

    Read the article

  • RowFilter including [ character in search string

    - by JeffC
    I fill a DataSet and allow the user to enter a search string. Instead of hitting the database again, I set the RowFilter to display the selected data. When the user enters a square bracket ( "[" ) I get an error "Error in Like Operator". I know there is a list of characters that need prefixed with "\" when they are used in a field name, but how do I prevent RowFilter from interpreting "[" as the beginning of a column name?

    Read the article

  • How convert a string into a ActiveSupport::TimeWithZone?

    - by Nisanio
    How convert a string into a ActiveSupport::TimeWithZone? My dilemma is this. I need to update a field (called updated_at). The field in mysql is datetime, and the class is ActiveSupport::TimeWithZone. But the dates are strings like "10/17/2008". I used "10/17/2008".to_date (And I intend .to_time and to_datetime), and even if in console the ActiveRecord class save succesfully, the field in the database still is the current date... Thanks in advanced.

    Read the article

  • struct.error: unpack requires a string argument of length 4

    - by Thomas O
    Python says I need 4 bytes for a format code of "BH": struct.error: unpack requires a string argument of length 4 Here is the code, I am putting in 3 bytes as I think is needed: major, minor = struct.unpack("BH", self.fp.read(3)) "B" = Unsigned char (1 byte) + "H" unsigned short (2 bytes) = 3 bytes (!?) struct.calcsize("BH") says 4 bytes.

    Read the article

  • Split String in C#

    - by ritu
    I thought this will be trivial but I can't get this to work. Assume a line in a CSV file: "Barak Obama", 48, "President", "1600 Penn Ave, Washington DC" string[] tokens = line.split(',') I expect this: "Barak Obama" 48 "President" "1600 Penn Ave, Washington DC" but the last token is 'Washington DC' not "1600 Penn Ave, Washington DC". Is there an easy way to get the split function to ignore the comma within quotes?

    Read the article

  • Regex for finding an unterminated string

    - by Austin Hyde
    I need to search for lines in a CSV file that end in an unterminated, double-quoted string. For example: 1,2,a,b,"dog","rabbit would match whereas 1,2,a,b,"dog","rabbit","cat bird" 1,2,a,b,"dog",rabbit would not. I have very limited experience with regular expressions, and the only thing I could think of is something like "[^"]*$ However, that matches the last quote to the end of the line. How would this be done?

    Read the article

< Previous Page | 178 179 180 181 182 183 184 185 186 187 188 189  | Next Page >