conversion

ASP.NET MVC - Is IsPostBack still here?

I know, I know, I know. I shouldn't be doing webforms inside of MVC, I completely agree. But, the people who sign my paycheck will not approve a complete conversion of our site to MVC right now. So I am taking incremental steps, page by page, to convert them over while adding new features in MVC. So my question is how can I access th...

Char to int conversion in C.

If I want to convert a single numeric char to it's numeric value, for example, if: char c = '5'; and I want c to hold 5 instead of '5', is it 100% portable doing it like this? c = c - '0'; I heard that all character sets store the numbers in consecutive order so I assume so, but I'd like to know if there is an organized library fun...

GhostScript command line parameters to convert EPS to PDF

Just installed GhostScript 8.54 for Windows. Does anyone know of the minimum parameters to pass to gswin32c.exe to make it convert, say, someFile.eps to someFile.eps.pdf? ...

How to attach/restore MySQL database copy?

I need to convert a MySql Database to SQL server. I received the database in a zip file containing only *.frm, *.MYI and *.MYD. Im not familiar with MySQL. I downloaded and installed version 5.1 server and tools. I copied that folder containing the files to the folder where the other databases are located. Using MySql administrator, in C...

warning:[unchecked] unchecked conversion

Hi all, I am getting following warning : warning:[unchecked] unchecked conversion [javac]found:java.util.List [javac] required:java.util.List<edu.fullerton.cs476s09.espressobar.jpa.espressobar_milk> return query.getResultList(); What may the problem and probable solution. I am using following code: @Stateless @Remote(Order.class) //...

IntPtr to Uint32? C#

Hello, I need to call VirtualAllocEx and it returns IntPtr. I call that function to get an empty address so I can write my codecave there(this is in another process). How do I convert the result into UInt32,so I could call WriteProcessMemory() lately with that address? ...

C#: Convert a UInt16 in string format into an integer(decimal)

Here's the problem. I ,for example,have a string "2500".Its converted from byte array into string.I have to convert it to decimal(int). This is what I should get: string : "2500" byte[] : {0x25, 0x00} UInt16 : 0x0025 //note its reversed int : 43 //decimal of 0x0025 How do I do that? ...

How to Set the URL property of a Web Browser control to a String

I'm using a Web Browser control in C# and I'd like to be able to plug in different URLs depending on other things that have happened in the program. How can I set the URL property to a string in the code? Can I convert a string to the System.Uri type? string link; string searchedtitle = "The+Italian+Job"; link = "http://www.imdb.com/fin...

How do I convert multiple png images to a single tiff file

I have a byte array of several images in the png format. I have to convert this to a tiff file and then into the corresponding byte array. This tiff file will hold multiple images. I have searced a lot, but I haven't been successful. The catch is. i have to do this in java only!! :) Can anyone provide some insight as regards my issue? ...

Java to JSP. How to?

hi i have written a java program which currently runs as a desktop app, it is returning all results accurately as required in the console. I am now faced by a challenge to convert this application to a web application (JSP). Currently, the code for my projects is in user/workspace (as i am using eclipse) and my tomcat has been insta...

Visual Studio 2008 shuts down after converting solutions

VS2008 shuts down right after converting any VS2005 solution. The solution icon is changed from 8 to 9 but if I try to open the solution it tries to convert it again and then it shuts down (and so forth). Anyone seen this? Is a re-install the only way to go here? ...

How can I fix this up to do generic conversion to Nullable<T>?

I currently use this handy conversion extension method to do conversions between types: public static T To<T>(this IConvertible obj) { return (T)Convert.ChangeType(obj, typeof(T)); } However, it doesn't like converting valid values to Nullable, for example, this fails: "1".To<int?>(); Obviously, 1 is easily ...

asp.net page is not responding while converting word document to html

i m using microsoft.office 11.0 object library and microsoft word 11.0 object library. The code makes problem only when we host the website locally or in server other wise it function well. i think below code makes problem. Ant one pls help me. i m in an urgent. Microsoft.Office.Interop.Word.Document doc = wordApplication.Documents.Open...

flv stream decoding, 3gp encoding

Are there any open source projects in any language and other recourses that I need to look at in order to implement flv to 3gp conversion? It's better to be streaming, I mean return first portion of 3gp before last portion of flv is downloaded. Or are there any similar services already implemented - my goal is to have something like ht...

Converting Byte array to Int-likes in C#

BitConverter.ToUInt16() expects the bytes to be reversed, i guess that's how they are stored in memory. But how can I convert it when it's not reversed, w/o modifying the array? Byte[] ba = { 0, 0, 0, 6, 0, 0 }; BitConverter.ToUInt16(ba, 2); // is 1536/0x0600, but I want 6/0x0006 ...

Streaming "proxy" converting video formats

This is related to my another question Here I'd like to ask if it is in theory (according to video file formats and codecs, etc) possible to have such scenario: 1) Client on iPhone has a reference to video in flv format. It sends http request to converting "proxy" like http://convproxy.com?source=url_of_original_video.flv by just click...

Jython: parsing text to float containing commas

How can I parse a float scanned from a sheet as text, containing commas? txt = "1,903.44" value = float(txt) # This fails due to ',' in string UPDATE: Sorry I wasn't clear. I'm using jython 2.5, which doesn't have the locale module. ...

Need Help to Converting Delphi Time to .Net Time

I am porting a Delphi application to C# and I've run into a problem. The Delphi app records the time into a log file, which then gets read back into the program. But the format of the time it records confuses me. I can find no .Net library to convert it properly. Delphi recorded time in log file: 976129709 (this gets converted to 1/14/...

Removing non-integers from a string in C++

There was a passing comment in a book of mine about people inputting commas into integers and messing up your program, but it didn't elaborate. That got me thinking, so I tried writing a little algorithm to take an std::string and remove all non-integer characters. This code compiles but skips over output. Why isn't anything being assign...

C# --> Java code generator

I have a small (~2000 lines of code) class that I would like to use from both java & .NET. There are several approaches to do this - among them wrapping the class as a service, using some interop voodoo, or duplicating the code to both C# & java. Do you know an out-of-the-box tool that accomplishes the latter - takes a simple C# class w...