I try to convert a String^ to basic string...but I get the error after this code. What does it mean and how can I fix it? I need to input basic string into a class constructor. The string^ would not work.
System::String^ temp = textBox1->Text;
string dummy = System::Convert::ToString(temp);
error C2440: 'initializing' : cannot convert...
Is there a built-in Delphi function which would convert a string such as '3,232.00' to float? StrToFloat raises an exception because of the comma. Or is the only way to strip out the comma first and then do StrToFloat?
Thanks.
...
I have lots of object defined in the system, perhaps 1000 objects,
and some of them have this method:
public Date getDate();
Is there anyway I can do something like this:
Object o = getFromSomeWhere.....;
Method m = o.getMethod("getDate");
Date date = (Date) m.getValue();
...
Exact duplicate: http://stackoverflow.com/questions/18465/net-parse-verses-convert
can anyone help me?
...
How can I make my old Dbase 2 progs run under SQL?
I want to do two things.
have my old Dbase progs run under windows with huge datasets on my personal computer (so it would have no internet need)
and
2. Have my old dbase progs run from an sql server on the internet where I could log on form the internet and work the program and dat...
My app reads frames from video (using pyglet), extracts a 'strip' (i.e. region - full width by 1 to 6 video lines), then pastes each strip (appends it) into an image that can later be written out an *.png file.
Problem is Pyglet GL images are stored in graphics memory, so are very limited re size.
My current klunky workaround is build u...
Hi all,
i am using soap request in my application and using initWithBytes to convert the retrieved NSMutableData to NSString.
NSString *theXML = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding];
while i am running the app on the simulator everything works fine. but at the...
EDIT: I also got an answer to make sector a vector of vectors:
vector<vector<char>>sector;
and that gets rid of the rest of my errors.
EDIT: I've made sector an array of pointers as someone suggested, and still get three errors:
EDIT: I have edited the program, but it has not fixed all of the errors:
I have this section of a progra...
Hi,
I have used a WPF RichTextBox to save a flowdocument from it as byte[] in database. Now i need to retrieve this data and display in a report RichTextBox as an rtf.
when i try to convert the byte[] using TextRange or in XAMLReader i get a FlowDocument back but how do i convert it to rtf string as the report RichTextBox only takes rtf...
I've got a function which fills an array of type sbyte[], and I need to pass this array to another function which accepts a parameter or type byte[].
Can I convert it nicely and quickly, without copying all the data or using unsafe magic?
...
Probably an easy answer: how do I convert this without importing external modules? I've read the CPAN but couldn't explicitly pinpoint a method that does the following:
Convert: 20080428 to 28-APR-08
Any ideas?
Even directing me to a tutorial would be appreciated.
Regards,
PIAS
...
I have a C++ DLL returning an int* to a C# program. The problem is the int* in C# remains null after the assignment.
When I assign the C++ result to an IntPtr, I get a correct non-null value. However any attempt to convert this to an int* results in null.
I've tried:
IntPtr intp = cppFunction (); // Non-null.
int* pi = (i...
Assume that a solution only contains classes and that those classes are all written to .NET 2.0 specifications. If that solution were to be opened, converted and saved in Visual Studio 2008, would it be possible to reopen the solution later in Visual Studio 2005 with some minimal modifications to the .SLN file?
How would one go about d...
I have an input ByteArrayOutputStream and need to convert that to a CharBuffer.
I was trying to avoid creating a new string. Is there anyway to do this.
I was trying to do the following, but I don't have the encoding for the string so the code below will not work (invalid output).
ByteBuffer byteBuffer = ByteBuffer.wrap(byteOutputStr...
Hi,
What is the easiest way to convert a PHP script (.php) into OpCode/Bytecode (Operation Code) using C#? I can use DLLs if I have to.
I need this to be done for the project I am working in order to analyze PHP code easier.
Any thoughts or ideas are welcome.
...
I have an image that I get and attempt to load into a graphics object using Graphics.FromImage(image), however this throws an exception if the image has an indexed pixel format.
Is there a way to safely convert an indexed image?
Update: Thanks to Joe for the tip to just draw the old image over the new one, instead I was trying to conve...
In C# i just put the method in the parentheses that i want to run on each row of the collection, but it isn't working in VB.NET.
ex:
SubSonic.PartCollection Parts;
...
Parts.ForEach(TestMethod);
I've tried this in VB.Net, but it's not compiling, and i'm not quite sure what I'm missing.
Dim Parts as SubSonic.PartCollection
...
parts....
any PHP or Ruby library to convert Tranditional Chinese to Simplified Chinese or vice versa (Big5 <--> GB)? the iconv library won't do it as it merely convert the encoding -- the glyph stays the same.
...
I want to convert long to int.
If the value of long > int.MaxValue, I am happy to let it wrap around.
What is the best way?
...
Hi guys
I am having some issues trying to convert a double to C++ string. Here is my code
std::string doubleToString(double val)
{
std::ostringstream out;
out << val;
return out.str();
}
The problem I have is if a double is being passed in as '10000000'. Then the string value being returned is 1e+007
How can i get th...