Hi,
We have this field in our database indicating a true/false flag for each day of the week that looks like this : '1111110'
I need to convert this value to an array of booleans.
For that I have written the following code :
char[] freqs = weekdayFrequency.ToCharArray();
bool[] weekdaysEnabled = new bool[]{
Convert.ToBoolean(int....
I have some issues with number <-> string conversion i cannot sort out.
We have written a serialization framework which uses several xml serialization techniques. But i have seen some inconsistent number conversions in the generated output:
using:
var c = TypeDescriptor.GetConverter(double);
var s = c.ConvertToString(value);
and
va...
Hello...I have a large text string number (20 characters, no decimals) that needs to be converted to a number. I tried Convert.ToInt64 but the value is too large. What is the best conversion method for a number this large? And, what is the actual max value for Convert.ToInt64()?
Thanks
...
EDIT : I had tried these two ways before -
List doubleList =
stringList.ConvertAll(x => (double)x);
List doubleList =
stringList.Select(x =>
(double)x).ToList();
and got this error-
Cannot convert type 'string' to
'double'
I read about something similiar that convert ints to doubles...but I have List of st...
I currently have a jpeg file which I converted to an flv using the following command:
ffmpeg -r 10 -b 180000 -i test.jpg test.mp4
Now, I want to increase the duration of this .mp4 clip, so the picture stays on the screen for more than a split second. Eventually, I hope to merge a stream of these files to create a slide show out of jpe...
I'd like to get some source code properly formatted (indents) and color coded to either VS2010 or Eclipse color coding and formatting for display in a browser. I have various languages (.NET, Java, JavaScript, CSS, XML) and can't find any free software that will do this.
I vaguely remember an obsolete API that was used in .Net Framewor...
NSString *contentPath = [[NSBundle mainBundle] pathForResource:@"test2" ofType:@"rtf"];
NSData *databuffer;
NSFileHandle *file = [NSFileHandle fileHandleForReadingAtPath:contentPath];
if (file == nil)
NSLog(@"Failed to open file");
databuffer = [file readDataToEndOfFile];
[file closeFile];
NSString *contentText =[[NSString alloc...
Hi all,
I'm having a problem converting an inline assembler function to .asm file. I need seperate inline assembler code because in x64 architecture doesn't have support for inline assembly.
Here is the code,
#include <windows.h>
#include <string>
#include <iostream>
#include <tlhelp32.h>
using namespace std;
int filter(int code...
Hi,
can somebody tell me where I am making mistake in the converting:
C:
typedef struct _REGISTRY_EVENT {
REG_NOTIFY_CLASS eventType;
TIME_FIELDS time;
HANDLE processId;
ULONG dataType;
ULONG dataLengthB;
ULONG registryPathLengthB;
/* Contains path and optionally data */
UCHAR registryData[];
} REGISTRY_...
I need to convert (0, 128, 64) to something like this #008040. I'm not sure what to call the latter, making searching difficult.
...
What is the best way to convert a string to hex and vice versa in C++?
Example:
A string like "Hello World" to hex format: 48656C6C6F20576F726C64
And from hex 48656C6C6F20576F726C64 to string: "Hello World"
...
I have an app which has a section that needs to convert the temperature from Celsius to Fahrenheit, but for some reason on only a couple phone models (like the htc desire and Sony Ericsson X10) it crashes at this part, but I have no idea why. can anyone help?
double cel = x/10;
finalTFF = 9.0f/5.0f * cel + 32.0;
DecimalFormat twoD...
Hi,
We are building a scheduling application wherein one user may set his "general availability" for all weeks like the following:
Sunday | Monday | ... | Friday | Saturday
When we ask a person A in India to indicate his "availability", we ask him to select from a drop down of values something like this:
12:00am
12:30am
01:00am
...
...
In .NET the Integer Parse methods are useful for converting a string to an int, but the string must be a valid integer without any extra characters. Is there a function that will convert the integer portion of a string to an int and ignore everything else in the input string?
I'm looking for something like this:
int x = ConvertFunction...
I am converting a low level C library to Delphi.
I find a lot of casts. I think it is normal in C World. I think I am safe in throwing them out. Integer is 32 bit only here. What do you think?
What could be the overhead of OOP if I convert it to objects etc?
Similarly I want to know the cost of try .. finally and exceptions.
Give me ...
Hi guys, I got a small problem
.
I have this date format from .net json output:
Date(1280471989140);
when I try to convert using
+ (NSDate*)dateFromUnixDate:(double)unixdate {
NSTimeInterval unixDate = unixdate;
return [NSDate dateWithTimeIntervalSince1970:unixDate];}
but I got the wrong date back,why?
thanks
...
This seems trivial
<cfset username = urldecode(url.username, "utf-8")>
Where username in the URL = %F8yvind
Decoded username = �yvind
How do I get the corresponding html entity: ø?
I need to use the username as a lookup value in the db.
Thanks!
...
In a nutshell, I am trying to print out the name of the month not the integer value of each month. (for example if the date is 2/2/2002, I would like the "month" to read out "February" instead of "2."
I am pulling in the system.DateTime.now to get the current month. When I try to print out the current month on the form, it just puts th...
We have entire application source code in C written on AIX 5.3 with Oracle 10g.
We wish to upgrade to new AIX servers using 6.1 and Oracle 11gR2.
We think we should upgrade to 64-bit mode since Oracle is unikely to support 32-bit much longer.
What we want to do initially is to estimate the time and effort to convert; hence we would ap...
Hi all,
This may be an oft-repeated question but I have searched and found no convincing answer.
Is there any way or tool or library that converts a PDF containing images,text, etc to PS(PostScript) ?
Any help would be greatly appreciated.
Regards
p1nG
...