conversion

Unix timestamp to .net DateTime

I must be doing an obvious mistake but I can't figure it out. I am importing a date stored in a mysql database (it is stored by the ExpressionEngine CMS). It is a unix timestamp, i.e. seconds since 1/1/1970 00:00. So I'm doing something like this: DateTime dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0); dateTime = dateTime.Add...

How to convert a unichar value to an NSString in Objective-C?

Hi there, I've got an international character stored in a unichar variable. This character does not come from a file or url. The variable itself only stores an unsigned short(0xce91) which is in UTF-8 format and translates to the greek capital letter 'A'. I'm trying to put that character into an NSString variable but i fail miserably. ...

Convert java syntax to actionscript

I'm porting an existing java library to actionscript and since they are both realy similar, 95% of the work is simply flipping variable and function definition around. public int foo(int bar) {} //converts to public function foo(bar:int):void {} Boring stuff. Is there a tool to automate the transition between java syntax and actionsc...

Culture-conversion in C# with DateTime

I'm having trouble getting my ASPX-App to work on the productive server. As my local environment is german but the server is english and my whole code didn't provide culture-support, I'm currently implementing that throughout the script. As you might think, as I'm writing this in here, it doesn't quite work the way I want it to. The Ap...

Best way to convert PDF to PowerPoint serverside in .NET

I have a PDF file that I want to convert to PowerPoint using .NET. What is the best tool for the job? The most important part of the conversion is that it looks as similar to the source as possible. Well, that and it can be done programmaticly. ...

Mac File Name Conversion

I'm looking for the officially sanctioned algorithm to convert from mac FSSpec to a HFS full path name (ie: one with colons) that includes the volume. Preferably expressed in C ...

Empty main form in GUI app converted from Delphi to Lazarus

I have converted my 2 GUI apps from Delphi to Lazarus. Both apps compile for Win32 platform, i386 and with GUI. Main form were converted using Lazarus tool and can be edited from IDE. But when I run such application main form does not appear, only blank form without any controls. I tried to debug this. It runs all code in initialization...

Conversion Deadlock problem, please help!

Hi all, really hope you can help. We've got a problem with conversion deadlocking going on within one environment (the same proc + trigger works in at least four other environments). The stored proc in question inserts a row into a table (cmsreceipt) that has a trigger which updates another table (cmsreceiptarchive). To try and preven...

Parsing a hex formated DEC 32 bit single precision floating point value in python

I'm having problems parsing a hex formatted DEC 32bit single precision floating point value in python, the value I'm parsing is represented as D44393DB in hex. The original floating point value is ~108, read from a display of the sending unit. The format is specified as: 1bit sign + 8bit exponent + 23bit mantissa. Byte 2 contains the si...

Convert single char to int

How can I convert char a[0] into int b[0] where b is a empty dynamically allocated int array I have tried char a[] = "4x^0"; int *b; b = new int[10]; char temp = a[0]; int temp2 = temp - 0; b[0] = temp2; I want 4 but it gives me ascii value 52 Also doing a[0] = aoti(temp); gives me error: invalid conversion from ‘char’ to ‘cons...

How to convert NSNumber objects for computational purposes?

I an developing some code in which I use a scanner to get to NSNumbers from a string, say x and y. Now I want to compute something simple from x and y, say, z = 10.0/(x + y/60.0)/60.0). I can't do this directly, since the compiler doesn't like ordinary arithmetic symbology applied to number objects. So, I tried defining xD and yD, of t...

SVG Elliptical Arcs with Java

I recently wrote a java program transforming a SVG document to HTML/Canvas: It was easy to translate a path such as d="M 0 0 L 100 100 z" to something like GeneralPath L= new GeneralPath(); L.moveTo(0,0); L.lineTo(100,100); L.closePath(); However I don't know how to translate the Elliptical Arc command to Java/GeneralPath. For exa...

Using Silverlight to display images from a network server.

I need to display images from a network server that generates tiff images. I would like to use silverlight 3 to display these images. I would like to stream the jpeg to the client. Is this possible if the images "live" on a server other than the web server? ...

Algorithm to convert infinitely long base 2^32 number to printable base 10.

I'm representing an infinitely precise integer as an array of unsigned ints for processing on a GPU. For debugging purposes I'd like to print the base 10 representation of one of these numbers, but am having difficulty wrapping my head around it. Here's what I'd like to do: //the number 4*(2^32)^2+5*(2^32)^1+6*(2^32)^0 unsigned int aN...

SQL Server CONVERT(NUMERIC(18,0), '') fails but CONVERT(INT, '') succeeds?

PRINT CONVERT(NUMERIC(18,0), '') produces Error converting data type varchar to numeric. However, PRINT CONVERT(INT, '') produces 0 without error... Question: Is there some SQL Server flag for this or will I need to do case statements for every varchar to numeric conversion? (aside from the obvious why?) ...

How convert byte to decimal?

Hi... Please guide me how make convert that input to decimal.tq. BF C2 FF 12 65 E4 EE 17 BF C2 64 F2 41 84 11 C1 C4 38 41 14 10 C1 04 10 49 04 18 41 06 72 B5 FF 17 BF C2 64 72 41 84 11 C1 85 19 C1 07 17 7D C2 5F 3D 5E FD DE 57 FD 10 E1 94 30 B5 FF 17 BF C2 FF 12 65 CC 76 17 BF C2 FF 12 69 FC 77 ...

How to convert seconds to hh:mm:ss with the Django's date template tag ?

Hello, Edit : is there a way to easily convert {{ value|date:"Z" }} to one of the +hh:mm or -hh:mm formats (because date:"Z" returns xxxx or -xxxx seconds). Show this for more explanations about the needed format. Thank you and sorry for my ugly english. ;) ...

string to integer

I can't do this in C++ string temp = "123"; int t = atoi(temp); why???? ...

does .net provides api to convert ascii to bcd?

Platfrom 3.5 .net.(c#) please refer me to code which converts ascii to bcd (c#). ...

Convert PowerPoint (ppt) to PDF using C/Objective-C (maybe even on an iPhone)

Greetings, I'd like to convert a PointPoint file to PDF using C/Objective-C (bonus points if you suggest a solution that could run on an iPhone directly). There are a number of Java libraries to work with MSFT files (odftoolkit, apache poi), but I'd really like to perform this operation on an iPhone device. Apple has built in libraries...