convert

How do I split up a long value (32 bits) into four char variables (8bits) using C?

I have a 32 bit long variable, CurrentPosition, that I want to split up into 4, 8bit characters. How would I do that most efficiently in C? I am working with an 8bit MCU, 8051 architectecture. unsigned long CurrentPosition = 7654321; unsigned char CP1 = 0; unsigned char CP2 = 0; unsigned char CP3 = 0; unsigned char CP4 = 0; // What do I...

Service for converting SWFs with ActionScript to Video (MPEG, AVI, or MOV)

The SWF files generated by our application are a basic template that reference external resources (images, and textual data) that actionscript uses to fuel the display. Thus the SWF is responsible for the creative layout of the screen the flash player. It is the results of this actions script, images, and textual data that need to be c...

NSString to NSUInteger

Hi all, I've got a number in a NSString @"15". I want to convert this to NSUInteger, but I don't know how to do that... Regards, dodo ...

how to convert minutes to days,hours,minutes

hi how to convert minutes into days hours and minutes in java ( we have a week here , 7 days ) public String timeConvert(int time){ String t = ""; int h = 00; int m = 00; // h= (int) (time / 60); // m = (int) (time % 60); // if(h>=24) h=00; if((time>=0) && (time<=24*60)){ h= (int) (time / 60); m = (in...

CVS to Mercurial conversion: end of line problem

I recently converted a CVS repository to Mercurial. From the looks of it, everything went perfect. Except that every end-of-line character is in Unix style and I want them in Windows style. I know the hg convert command can be used to "convert" a Mercurial repository to a Mercurial repository. Can I use it to do nothing on the repos but...

Convert UNIX timestamp to .NET DateTime ticks in unmanaged code (without using .NET)

I need to "construct" .NET DateTime values in Python/C++. How can I compute the number of ticks stored by DateTime starting from a UNIX timestamp? A solution involving Win32 API calls it's ok (I believe FILETIME functions could help). ...

Creating ODT and PDF files as end result

Hello, I've been working on an app to create various document formats for a while now, and I've had limited success. Ideally, I'd like to dynamically create a fairly simple ODT/PDF/DOC file. I've been focusing my efforts on ODT, because it is editable, and open enough that there are several tools which will convert it to any of the oth...

An easy way to replace fread()'s with reading from a byte array?

I have a piece of code that needs to be run from a restricted environment that doesn't allow stdio (Flash's Alchemy compiler). The code uses standard fopen/fread functions and I need to convert it to read from a char* array. Any ideas on how to best approach this? Does a wrapper exist or some library that would help? Thanks! EDIT: I...

can we convert flv to mp4 directly from internet using ffmpeg

VB.Net This works fine for me "-i ""C:\myfile.flv"" -ar 22050 FileName.mp4" but can i use this one i.e. "-i ""http://www.example.com/myfile.flv"" -ar 22050 FileName.mp4" ...

C# convert bit to boolean.

Greetings. I have MS SQL server database that content data field of BIT type. this field will have either 0 or 1 values to present false and true. I want when I retrieve the data to convert the value of I got to false or true without using if-condition to convert the data to false if it is 0 or true if it is 1. I'm wondering if ther...

Convert a String into an Array of Characters

In PHP, how do i convert: $result = abdcef; into an array that's: $result[0] = a; $result[1] = b; $result[2] = c; $result[3] = d; ...

converting into XML

I am trying to convert a conversation I downloaded from Wikipedia into XML. I used the special export to get the page in XML format... that works great until I get to the main conversation. <conversation> {{PersonA|Cheese}} {{PersonB|I like it too...}} {{PersonA|Cheese?}} </conversation> Thats not the real conversation... ...

Matlab: convert global coordinates to figure coordinates

If I get coordinates via coords = get(0,'PointerLocation'); How can I convert them into points gotten via ginput? i.e, I would like to get the same values from coords = get(0,'PointerLocation'); coords=someConversion(coords); As I would have gotten by calling coords=ginput(1); And clicking inside the figure in the same spot a...

convert java applet code in to java script

Is any way to convert a java applet code to java script? ...

What is the best way to convert a doctrine nested set to an li-structure?

Hi, I'm using Doctrine NestedSet behavior. I'd like to render the tree using php to <ul>'s and <li>'s Here's an example of what the output might be: <ul> <li>Node 1</li> <li>Node 2 <ul> <li>Child 1 of Node 2</li> <li>Child 2 of Node 2 <ul> <li>Another Child</li> ...

Convert number into words using flex.

Hi I am trying to convert an entry using a numeric stepper in flex into words to display in a textarea. i.e a user uses the stepper to enter "89" as a value and in the text area the words "Eighty nine" are displayed. After much searching i haven't found anything that helps - a few javascript functions but that is all. any help sampl...

Making a DVD video with a still image and PCM 16bit audio with ffmpeg

I'm trying to make a small video with a still image and a sound file playing in the background to pass it to dvdauthor and create a DVD. The command I'm using is this: ffmpeg -loop_input -i image.jpg -qscale 2 -i song.flac -aspect 4:3 -target pal-dvd -acodec pcm_s16le -shortest output.mpg However, the resulting video file doesn't have...

how to convert html page to image using java or php

i want to know how to convert html file to image thanks and advance ...

How to convert a .NET WebService-Method-Result (Soap) into its original datatype?

Hello everyone. I have two "identical" webservices (Soap) on two different servers. Don't ask why :-) WebService-1 decides if it handels the request itself or if it passes the request to WebService-2. If so, the response of WebService-2 should directly be returned from WebService-1. The response datatype is complex and self defined. W...

How to convert a "dd/mm/yyyy" string to datetime in SQL Server?

I tried this SELECT convert(datetime, '23/07/2009', 111) but got this error The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. However SELECT convert(datetime, '07/23/2009', 111) is OK though How to fix the 1st one ? ...