conversion

PostgreSQL - How to convert seconds in a numeric field to HH:MM:SS

I'm new to PostgreSQL (I have been using MS SQL for many years) and need to convert a numeric column which contains a time in seconds to HH:MM:SS format. I have Googled and found that to_char(interval '1000s', 'HH24:MI:SS') works so I am attempting to use this with my field name: to_char(fieldname, 'HH24:MI:SS') gives an error cannot u...

How to convert window coordinates relative to a specific view?

Example: I have a CGPoint in window coordinates: CGPoint windowPoint = CGPointMake(220.0f, 400.0f); There is aView which has a superview in a superview in a superview. Somewhere deep in the view hierarchy, probably even transformed a few times. When you get a UITouch, you can ask it for -locationInView: and it will return the coordin...

C#: is there a need to convert a VC#2008 Express solution to a VS2008 Professional solution?

I've been using Visual C# 2008 Express for a good while now, but after comparing it with Visual Studio 2008 Professional, I've decided to 'upgrade' to Visual Studio 2008 Professional, which is easy since I can just grab it for free from DreamSpark (I have a student account there). I cannot upgrade to Visual Studio 2010 Professional as my...

NSDateFormatter return nil on 2 different input which in same format!?

Hi all! I am newbie of objective-c and i got this crazy problem… for low precision test case: dateString = @"2010-05-25 11:05:21", conversion success. dateString = @"2010-03-01 15:54:36", conversion fail. for high precision test case: dateString = @"2010-05-25 11:05:21.937113", conversion success. dateString = @"2010...

AES Key encoded byte[] to String and back to byte[]

In the similar question "Conversion of byte[] into a String and then back to a byte[]" is said to not to do the byte[] to String and back conversion, what looks like apply to most cases, mainly when you don't know the encoding used. But, in my case I'm trying to save to a DB the javax.crypto.SecretKey data, and recoverd it after. The i...

Converting PDF to images using ImageMagick.NET - how to set the DPI

Hi, I'm trying to convert pdf files to images. ImageMagick is a great tool, and using the command line tool gets me desired result. but i need to do this in my code, So added a reference to http://imagemagick.codeplex.com/ And the following code sample renders each page of the pdf as an image: MagickNet.InitializeMagick(); using (Image...

C# Bug or Brain Teaser? Cast working only with Coalesce (??) Operator

This is very strange, maybe someone can explain what's happening, or this is a bug (though I tend to think that this is probably just something intricate about C#). The following code throws the error "Cannot implicitly convert type 'uint?' to 'uint'.": public void Test(UInt32? p) { UInt32 x = p; } However, this code works witho...

Is there such a thing as a C# style extension method in C++ ?

I'm currently learning C++ and i run into the simple problem of converting an int to a string. I've worked around it using: string IntToString(int Number) { stringstream Stream; Stream << Number; return Stream.str(); } but though it would be more elegant to use something like: int x = 5; string y = x.toString(); but how...

Html to pdf converter

Is there any free html to pdf converter dll available for asp.net 3.5? If not what is the best and cheapest paid dll available? ...

Converting time from UTC to Local and vice versa

Hi I am trying to figure out a way to convert a FILETIME structure from UTC to Local and vice versa. I've been using the two functions: FileTimetoLocalFileTime() and LocalFileTimeToFileTime(). The problem seems that they do not work as expected. As an example: First I got a local file time using: WIN32_FIND_DATA fd; FindFirstFile(_T...

How to convert gp4 file to pdf

There is any opensource convertor available or java api for converting gp4 file to pdf Thanks in advance ...

Converting an IP address to a number:

Question: When I convert the IP address 192.168.115.67 to a number, is it done like this: 192*256^3 + 168*256^2+115*256^1+67*256^0 = 3232265027 or like this: 192*256^0 + 168*256^1+115*256^2+67*256^3 = 1131653312 I find both variants online, and frankly it doesn't matter as long as I do all the internal IP-range comparison using the sam...

How can I get the Visual Studio 2010 converstion wizard to come back up?

When I first opened my website project with Visual Studio 2010 the conversion wizard came up and I said that I didn't want to convert the project. Now I'm ready to convert the project, but I can't find a shortcut or a way to get it back? I tried to remove the suo file, and that didn't do it. If I go into the project properties I can s...

Convert character to the corresponding virtual-key code

Hi, Currently, I'm using the method VkKeyScan in the Win32 API to convert a character to its virtual-key code. But the problem that this seems to have is that, when i pass small alphabets, it works fine whereas when i pass in a capital alphabet, it doesn't return the appropriate key code and similarly with special characters like "(" or...

Input system reference trouble

Hello, I'm using SFML for input system in my application. size_t WindowHandle; WindowHandle = ...; // Here I get the handler sf::Window InputWindow(WindowHandle); const sf::Input *InputHandle = &InputWindow.GetInput(); // [x] Error At the last lines I have to get reference for the input system. Here is declaration of GetInput from...

Desktop VB.NET <> C# converter

I've been using the Developer Fusion's tool for converting code snippets, and now I'm looking for a quality tool to convert entire projects between those languages, with minimum errors. Is there any good one available? ...

Sparx Enterprise Architect conversion (from source to UML)

I need to make a UML class diagram for a project. I used Sparx Enterprise Architect in the past to generate source code from a diagram so I'm using that. The project is complete so all of the code is done and I don't really want to write all the classes / functions manually, so I was trying to generate the diagram from the source code ...

How to convert Xml files to Text Files

Hi all, I have around 8000 xml files that needs to be converted into text files. The text file must contain title, description and keywords of the xml file without the tags and removing other elements and attributes as well. In other words, i need to create 8000 text files containing the title,description and keywords of the xml file. I ...

How to convert Xml files to Text Files 2

Hi all, I have around 8000 xml files that needs to be converted into text files. The text file must contain title, description and keywords of the xml file without the tags and removing other elements and attributes as well. In other words, i need to create 8000 text files containing the title,description and keywords of the xml file. I ...

how to convert current date into string in java?

how to convert current date into string in java? ...