convert

Most Efficient Way to Test Object Type

I have values stored as strings in a DataTable where each value could really represent an int, double, or string (they were all converted to strings during an import process from an external data source). I need to test and see what type each value really is. What is more efficient for the application (or is there no practical differenc...

What's the best way of converting a mysql database to a sqlite one?

I currently have a relatively small (4 or 5 tables, 5000 rows) MySQL database that I would like to convert to an sqlite database. As I'd potentially have to do this more than once, I'd be grateful if anyone could recommend any useful tools, or at least any easily-replicated method. (I have complete admin access to the database/machines...

Generic Type Conversion FROM String

Hi Guys, Here is the problem I am having, I have a class that I want to use to store "properties" for another class, these properties simply have a name and a value. Ideally, what I would like is to be able to add typed properties, so that the "value" returned is always of the type that I want it to be. The type should always be a pr...

Is there an easy way to convert C# classes to PHP?

I am used to writing C# Windows application. However I have some free hosted PHP web space that I would like to make use of. I have a basic understanding of PHP but have never used it's object oriented capabilities. Is there an easy way to convert C# classes to PHP classes or is it just not possible to write a fully object oriented appl...

.Net Parse verses Convert

In .Net you can read a string value into another data type using either .parse or Convert.To. I'm not familiar with the fundamentals of parse versus convert so I am always at a loss when asked which one is better/faster/more appropriate. So - which way is best in what type of circumstances? ...

What is the best .WTV conversion tool?

.WTV is the new DVR-MR format for recorded TV-shows in the Vista Media Center with TV Pack 2008 installed. Since there is a bug in that TV Pack, not allowing to see the current playback posision within the MSAS COM State integration service, the only way to 'fix' the commercial skipping addin, is to convert the .WTV file into a .DVR-MR,...

wav <> mp3 for flash(as3)

Dear All, I'm wondering about MP3 decoding/encoding, and I was hoping to pull this off in Flash using AS3 I'm sure it'll be a right pain... I have no idea where to start, can anyone offer any pointers? reference material? ----much later--- Thank you all very much for your input... It seems I have a long road ahead of me yet! ...

What is the best way to convert between char* and System::String in C++/CLI

What is the approved way to convert from char* to System::string and back in C++/CLI? I found a few references to marshal_to<> templated functions on Google, but it appears that this feature never made the cut for Visual Studio 2005 (and isn't in Visual Studio 2008 either, AFAIK). I have also seen some code on Stan Lippman's blog, but it...

What are some gotchas when retargeting .net 2.0 to 3.5?

I am currently working on a project that is moving from .NET 2.0 to 3.5 across the board. I am well aware that 3.5 is basically a set of added functionality (libraries, if you will) on top of what 2.0 offers. Are there any gotchas that I might hit by simply re-targeting the compiler to 3.5? ...

Converting vb.net to c# tips

I am using reflector disassembly as a quick way to convert some vb.net to c# and am hitting some problems with certain VB-isms: Conversions Strings Information.IsNothing When trying to compile the converted code, I need to find and change all of these and more. Any tips on converting vb.net to C# in a clean way? ...

How to convert decimal to hex in JavaScript?

How do you convert decimal values to their hex equivalent in JavaScript? ...

How do I convert GMT to LocalTime in Win32 C?

I want to convert various location/date/times in history from GMT to local time. It seems that SystemTimeToTzSpecificLocalTime is better than FileTimeToLocalFileTime. When the date/time pairs also include various locations, the conversion gets hairy. I've found a data set at ftp://elsie.nci.nih.gov/pub/ that seems to be nicely complete ...

Is there any built-in way to convert an integer to a string (of any base) in C#?

Convert.ToString() only allows base values of 2, 8, 10, and 16 for some odd reason; is there some obscure way of providing any base between 2 and 16? ...

How to convert a unmanaged double to a managed string?

From managed c++, I am calling an unmanaged c++ method which returns a double. How can I convert this double into a managed string? Sorry if this is a stupid question, I'm still very new with C++ in .net. Thanks! ...

How to convert from Decimal to T?

I've built a wrapper over NumbericUpDown control. The wrapper is generic and can support int? and double? I would like to write a method that will do the following. public partial class NullableNumericUpDown<T> : UserControl where T : struct { private NumbericUpDown numericUpDown; private T? Getvalue() { T? value = numericU...

Converting Reverse Polish Notation

Is there any way to interpret Reverse Polish Notation into "normal" mathematical notation when using either C++ or C#? I work for an engineering firm, so they use RPN occasionally and we need a way to convert it. Any suggestions? ...

How do you convert a string to a node in XQuery?

I would like to convert a string into a node. I have a method that is defined to take a node, but the value I have is a string (it is hard coded). How do I turn that string into a node? So, given an XQuery method: define function foo($bar as node()*) as node() { (: unimportant details :) } I have a string that I want to pass to the...

How to convert Pixels to Points (px to pt) in .NET? (C#)

I have a need to convert Pixels to Points in C#. I've seen some complicated explanations about the topic, but can't seem to locate a simple formula. Let's assume a standard 96dpi, how do I calulate this conversion? ...

Is casting the same thing as converting?

In Jesse Liberty's Learning C# book, he says "Objects of one type can be converted into objects of another type. This is called casting." If you investigate the IL generated from the code below, you can clearly see that the casted assignment isn't doing the same thing as the converted assignment. In the former, you can see the boxing/un...

How do I convert an M4A file to an MP3 or WMA file programmatically?

Greetings, I'm trying to find either a free .NET library or a command-line executable that lets me convert M4A files to either MP3s or WMA files. Please help :). ...