My web application deals with strings that need to be converted to numbers alot - users often put commas, units (like cm, m, g, kg) and currency symbols in these fields so what I want to do is create a string extension method that cleans the field up and converts it to a decimal.
For example:
decimal myNumber = "15 cm".ToDecimal();
...
I am receiving a BASE64 encoded string from a WebService. The string represents an HTML page, and I can use built-in ColdFusion functions to convert and display it. However, I need a GIF representation of the HTML page, and I'm wondering if there's any way to do this using ColdFusion.
NOTE: The website I'm working on is ColdFusion 8.
U...
I have 1,2,3,4,5,6,7,8,9 stored as nvarchar inside Level in my db.
I then have a dropdownlist with values 1,2,3,4,5,6,7,8,9. When a user makes a selection (i.e 1) (Level.SelectedValue.ToString). This builds an sql query via a param like this:
"Select things From MBA_EOI Where level = 1"
When I run the select I get the following erro...
I have always had a problem with adding and subtracting time like for an
example:
10h:34min
+ 07h:46min
-----------
XX:XX
...
Hello,
I am using VS 2008 C#
Windows Application.
I have this DLL Import I am trying to use.
[DllImport("Mapi32.dll", PreserveSig = true)]
private static extern void
WrapCompressedRTFStream(
[MarshalAs(UnmanagedType.Interface)]
UCOMIStream lpCompressedRTFStream,
uint ulflags,
[MarshalAs(UnmanagedType.Interface)]
out UCOMIStream lpUnco...
I need a function to convert a 32bit or 24bit signed (in two's complement) hexadecimal string into a long int. Needs to work on both 32bit and 64bit machines (regardless of the size of long int) and work regardless of whether the machine is a two's complement machine or not.
SOLUTION:
long int hex2li (char hexStr[], int signedHex)
{
...
I need to convert my Mysql database to SQL Server 2005 database, Is there any tools available for this conversion.
...
In my application I inherit a javastreamingaudio class from the freeTTS package then bypass the write method which sends an array of bytes to the SourceDataLine for audio processing. Instead of writing to the data line, I write this and subsequent byte arrays into a buffer which I then bring into my class and try to process into sound. M...
can someone help me pls, im new to vb.net and im trying to work through the nhibernate firstsolution sample (written in c# re-posted here http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/01/your-first-nhibernate-based-application.aspx as thier site is down again) and im struggling to convert this one bit. ive tried numerous ...
I'm using XML::XML2JSON in Perl to convert JSON data to XML, I am passing through the following data (snippet):
{"question":{"isrequired":{"$t":"0"}}}
and when I use the XML:XML2JSON->json2xml function to convert the JSON data into XML, I get the following (snippet):
<isrequired/>
I need to retain the "0" element in the "isrequired...
I have string value in that I need to convert to double in VB.Net. Conditions are like below
string = "12345.00232232"
if condition is 3 (2 digits after decimal and comma)
display = 12,345.00
if condition is 5 (5 digits after decimal and comma)
display = 12,345.00232
If Condition is 7 ( 5 digits after decimal and no comma)
dis...
I am adding a feature to my program in which the user will have the ability to change their unit of measurement at any time, and have the program recalculate their input and output.
If the user inputs say, 20lbs for an item, then decides he wants to work in kilograms instead, he can select an option to do so at any time, and the program...
What methods are there to transform a PDF to HTML? It could be anything - online service, software, library. (Opensource preferred. In the last case, php or python would be preferred.) It has to keep the original layout (including page numbers, footnotes and such), keep the images (combining them to one single background image per page i...
Hi, Is it possible to convert an AVI file to 3gp in C# ? If so how could I do this? Any ideas will be appreciated, thanks in advance.
...
I have a c# winforms application which is running fine... Now i want to convert it to an assembly and use it in an asp.net web application.....
WHich dll i have to refernce?
http://img265.imageshack.us/img265/2272/dlls.jpg
...
All I really know is PHP and I used the decbin function etc, It was fairly easy to do. In this C++ program I want to do the same thing, just a simple number or string how would I do this?
...
In my current company, we have this decade old...let's call it a "Hello World" application.
While wanting to create a newer version of it, we also want to preserve older entries. These older entries contain hideous Word-generated HTML which was never filtered before.
If and when we move to a newer system, I'd prefer to have that HTML c...
I have a struct like this, with an explicit conversion to float:
struct TwFix32
{
public static explicit operator float(TwFix32 x) { ... }
}
I can convert a TwFix32 to int with a single explicit cast: (int)fix32
But to convert it to decimal, I have to use two casts: (decimal)(float)fix32
There is no implicit conversion from floa...
#define __T(x) L ## x
Found in code from one of the MFC source header file. It is mostly used for converting strings to ........ (I don't know what). If I am correct it converts strings to LPCTSTR...don't know what that type is either...
I can't seem to convert char* into LPCTSTR. While MFC file handling, the following code will ...
Hi, I am trying to create a method that takes a DataTable or a DataRowCollection and converts it to an array of a generic type. Something like this:
public static T[] ConvertToArray<T>(DataTable dataTable)
{
List<T> result = new List<T>();
foreach (DataRow dataRow in dataTable.Rows)
result.Add((T)dat...