conversion

Convert strings to Java objects automatically

I want to convert user input that comes as Map<String, String[]> to objects in Java. More specically I want to convert the params of a HttpServletRequest to the fields of an arbitrary domain object. I'd like to have something like this: Domain d = Converter.convert(params, new Domain()); If there is more than one element in the strin...

Convert MP4 to Ogg with C#

Does anyone know a simple way of converting a mp4 file to an ogg file? Have to do it, but don't have much knowlegde about it, and all I can find are programs, not examples or libraries. Thanks in advance ...

How to convert a floating point number to its binary representation (IEEE 754) in Javascript?

What's the easiest way to convert a floating point number to its binary representation in Javascript? (e.g. 1.0 -> 0x3F800000). I have tried to do it manually, and this works to some extent (with usual numbers), but it fails for very big or very small numbers (no range checking) and for special cases (NaN, infinity, etc.): function flo...

Getting the hour from a datetime?

How can I select the hour from a datetime? I'm looking for the equivalent of Oracle's TO_CHAR( d, 'HH24' ), which would return 17 for 2010-06-23 17:22:31. I tried to find out about the best time (best answer/questin-ration) to ask an SQL-related question on StackOverflow, using Data Explorer. I got it to work, but I'm sure there is a...

How to update guid ID references when converting to identity IDs

I am trying to convert tables from using guid primary keys / clustered indexes to using int identities. This is for SQL Server 2005. There are two tables MainTable and RelatedTable, and the current table structure is as follows: MainTable [40 million rows] IDGuid - uniqueidentifier - PK -- [data columns] RelatedTable [400 million row...

PHP Convert ISO date to more readable format?

Just a simple question. How do I convert a PHP ISO time (like 2010-06-23T20:47:48-04:00) to something more readable? Is there a function already built in PHP? I've looked around but I haven't seen anything to convert times. If there's not a function, is it possible? Thank you ...

How to convert aspx page into html page?

I have designed my web page in asp.net its in aspx page. i need to covert it into html page .Because my server not support .aspx page help me to solve this issue ...

Convert Flash to WPF

Is there a way to convert Flash animations into WPF animations automatically, like converting mp3 to wma? I'm interested in converting these two items to WPF: http://activeden.net/item/background-animation-blurry-light-cells/21980 http://activeden.net/item/abstract-lines-with-gradient-background-random-effect/64777 ...

Is there automatic entity relationship diagram generator based on simple ascii syntax?

I am looking for a tool which would generate entity relationship diagram based on simple ascii syntax. Syntax could be something like: thing1 <-> thing2 thing3 <->> thing4 thing5 <<-> thing2 thing1 <<->> thing5 Where: <-> is one to one <->> is one to many <<->> is many to many Or anything similar. There should be this kind of tool...

Converting an uint64 to string in C++

What's the easiest way to convert an uint64 value into a standart C++ string? I checked out the assign methods from the string and could find no one that accepts an uint64 (8 bytes) as argument. How can I do this? Thanks Nelson R. Pérez ...

Getting strange error when attempting to convert Unmanaged C++ class to Managed C++ class (for use in .net)

Greetings, First off, I am not a C++ developer, so please forgive my shortcomings.... I am attempting to take another developer's C++ unmanaged code and re-work it so it can be called from a managed DLL from our c#.net application. Please keep in mind that I'm a .net developer, and I haven't touched C++ in like 12 years. And when I ...

Convert CAD to raster

Hello, How do printers convert the vectorial CAD graphics to dots in paper? I have a 50mmx50mm with 4095x4095 points "printing" system and I'd like to print some CAD files to it? Should I use the existing printing system? Or convert the CAD file to something my "printer" undertands and if so, how? Thank you ...

Why is only one implicit conversion allowed to resolve the parameters to a function in C++?

This works: #include<cstdio> class A{ public: A(int a):var(a){} int var; }; int f(A obj) { return obj.var; } int main() { std::cout<<f(23); // output: 23 return 0; } while this doesn't: #include<cstdio> class A{ public: A(int a, int b):var1(a), var2(b){} int var1, var2; }; int f(A obj) { return (...

convert java.util.Map[String, Object] to scala.collection.immutable.Map[String, Any]

How do I convert java.util.Map[String, Object] to scala.collection.immutable.Map[String, Any], so that all values in the original map (integers, booleans etc.) are converted to the right value to work well in Scala. ...

_bstr_t to char pointer and calling atof(...)

Is this code not going to produce an error: _bstr_t text=n.GetText(); atof((char*)text) Where text is a double value. I know that the _bstr_t produces a const char* in the conversion; so I'm not sure if the atof() is going to work? ...

Convert 1000 to 1024 bytes

Im trying to convert a size, lets say 244410368 bytes to xxxxxx mebibyte (MiB) but I have no idea how. All this 1000 and 1024 bytes/bits are rather confusing. ...

conversion from std::vector<char> to wchar_t*

i'm trying to read ID3 frames and their values with TagLib (1) and index them with CLucene (2). the former returns frame ID's as std::vector<char> (3) and the latter writes field names as tchar* [wchar_t* in Linux] (4). i need to make a link between the two. how can i convert from std::vector<char> to wchar_t* by means of the STL? thank ...

Recognizing a character to be Chinese and get Chinese "pinyin" phonetics from simplified characters?

Is it possible to A) find out if a character is Chinese (simplified) and in that case B) get the pinyin? example: 你好 => nǐhǎo using java or php? Cheers ...

Is there any reason why you cannot select a statement as a bit in SQL Server?

Hi, I am wondering why the following fails: SELECT price<500 as PriceIsCheap and forces you to do the following: SELECT CASE WHEN (price<500) THEN 1 ELSE 0 END as PriceIsCheap When, as per the answer to this related question, the conversion table says that an implicit conversion should occur. ...

Jtree to XML convertion and viceversa

How to Convert a Jtree To Xml and Xml back to a Jtree.what is the Procedure and anybody please let me know Thank u ...