conversion

Is there a way to control which implicit conversion will be the default used?

Suppose I have this: class String2(val x:String) { def *(times:Int) : String = { val builder = new StringBuilder() for( i <- 0 until times) { builder.append(x) } builder.toString() } } now if I add this implicit: implicit def gimmeString2(y:String) = new String2(y) I will get a co...

Is there a faster/better way to leettime?

I found leettime via twitter, and it's novel enough for me to want to mess around with it/share it with you guys. To my dismay this version doesn't do seconds. It also seems like there might be a more efficient way to generate the time, what do you think? Leet Time Now, how is this leettime calculated? For a given humanti...

how to convert .xsd file to wsdl?

Hi All, I have .xsd file i need to convert it into wsdl,how would i do so?and is this conversion the right approach. I have request and response data in same .xsd file ...

Python random and int to string question

Hi, I am using this line of code to generate a random list of integers: random.sample(range(2000), 100) With this code i know i wont have double value's with my result. Is their maybe a faster way to achieve the same results? Now i actually have to convert these int to string. Whats the fastest way to do this? Thanks ...

Triggering conversion tracking code on form submit

I have a PHP form that mail()s the form data on submit and then if successful returns them to the referring page (in other words keeping them on the same page as the form) and appends ?success=TRUE to the URL. The question is, how would I implement the AdWords and Yahoo Search Marketing conversion code snippets to trigger only when the ...

convertion method from vb.net to asp.net

can we convert desktop application in vb.net to Asp.net ...

Convert PDF pages to images with COCOA

Hi, I am having problem with PDF conversion to images. I would like to create an image file for every page in PDF document. This is the code I am using and works fine. Every page gets converted into the image, but I have problem with image resolution. I don't know how to set the resolution of the output images. Can someone help me out?...

Convert a vector<unsigned char> to vector<unsigned short>

Hi all. I'm getting data from a binary file, reading from file and writing in a vector of unsigned char. I can't edit it, because I'm using a external library. But the data that I'm reading from file is a 16 bits image, and I'd like to put the data in a vector of unsigned short Maybe I can do a cast for it? Rgds. ...

Converting from Mercurial to Subversion

Due to lack of Mercurial support in several tools, and managerial oppression it has become necessary to convert several trial Mercurial repositories to Subversion in order to conform with the company standard. Are there any tools or suggestions for how to achieve this without a loss of revision history and the like? ...

how to convert the webpage to xml document using java?

The assumption is the webpage is coded with correct tags. How can I Convert it to the XML file? I think the most webpages can be viewed as dom tree...How can I convert it to XML file? ...

C++ convert decimal hours into hours, minutes, and seconds

I have some number of miles and a speed in MPH that I have converted into the number of hours it takes to travel that distance at that speed. Now I need to convert this decimal number into hours, minutes, and seconds. How do I do this? My best guess right now is: double time = distance / speed; int hours = time; // double to integer con...

How to insert shapefiles into a MySQL database?

I am trying to find this shp2mysql tool. But all I found was a PHP implementation. There is any other version available in the internet? ...

Converting color value from float 0..1 to byte 0..255

What would be the correct way of converting color value from float to byte? At first I thought b=f*255.0 should do it, but now I'm thinking, that in this case only the exact 1.0 will be converted to 255, but 0.9999 will already be 254 which is probably not what I want... It seems that b=f*256.0 would be better except that it would have ...

C# to VB.Net Syntax conversion

Can any one translate the following syntax to vb.net. m_TextBox.Loaded += TextBoxLoaded m_TextBox.Loaded -= TextBoxLoaded; private void TextBoxLoaded(object sender, RoutedEventArgs e) { Init(); } .. containsTextProp.AddValueChanged(m_TextBox, (sender, args) => UpdateAdorner()); ... private void UpdateAdorner() {...} ...

Is it Possible to Convert ASP.net MVC Web Project to ASP.net Web Forms?

Good Morning, Has anyone attempted to convert/migrate an ASP.net MVC web application project to ASP.net web forms? If so, how did you accomplish this? Thanks, Sid Clarification/Update: The server is running IIS6 and I've modified global.asax. I followed Phil Haack's instructions on setting up IIS6 for use by MVC. I can now view the ...

Converting a dictionary key in double

Hi all I think it is not complicated but after doing some research I can't find an answer to a simple problem. I am iterating through keys in a dictionary and I would like to use the key which is a string as a double in some calculation. If I do this : foreach (KeyValuePair<string, List<string> price in dictionary) double ylevel = Co...

.net Equivalent of MSXML2.XMLHTTP40

I am working on converting a VB6 app into C# app. Here what i need to do Public Function SendData(sUsername as string ,sPassword as string, url as string , message as string ) As Boolean Dim XMLHttpRequest As MSXML2.XMLHTTP40 Set XMLHttpRequest = New MSXML2.XMLHTTP40 XMLHttpRequest.Open "GET", g_SonyFeedURL, True, sUsername, sPasswo...

HTML to plain text (for email)

Do you know any good HTML to plain text conversion class written in PHP? I need it for converting HTML mail body to plain text mail body. I wrote simple function, but I need more features like converting tables, adding links at the end, converting nested lists… -- regards takeshin ...

How to convert string (containing double max) to double

I have no problem converting "normal" double values, but I can't convert numeric_limits<double>::max() or DBL_MAX string representations? std::string max = "1.79769313486232e+308"; std::istringstream stream(max); double value; // enters here, failbit is set if (!(stream >> value)) ...

Coverting an int to a different base. php, .NET

Hey I have seen sites that instead of an int show you a string. For example d2fr4st == 147392525 and d2fr4ss == 147392524. What base is this? And how can I do the same conversion in php and .NET? At the moment converting from 147392524 to d2fr4ss would be most useful. ...