conversion

Convert C# to VB.Net - Using MVCContrib Blockrenderer to render a partial view to a string

I need to render a partialview to a string, and I am trying to convert a C# example to VB.Net, as I am stuck with that for this project. This is causing me a headache from these two problems: ObjectViewData - I can't figure out what that is RenderPartial is a sub, but seems to be used as a function - I don' get it I reference the MV...

Lambda expression from C# to VB.Net

What would this line of C# using Lambda expression be in VB.Net? string s = blockRenderer.Capture(() => RenderPartialExtensions.RenderPartial(h, userControl, viewData)); Something with function of - but I can't figure out exactly how... ...

Convert .Net Color Objects to HEX codes and Back

As per the question title, How could I take a hex code and convert it to a .Net Color object, and do it the other way? I googled and keep getting the same way which doesn't work. ColorTranslator.ToHtml(renderedChart.ForeColor) Which returns the name of the color as in 'White' instead of '#ffffff'! Doing it the other way seems to ha...

C# Extract list of fields from list of class

I've got a list of elements of a certain class. This class contains a field. class Foo {public int i;} List<Foo> list; I'd like to extract the field from all items in the list into a new list. List<int> result = list.ExtractField (e => e.i); // imaginary There are surely multiple ways to do that, but I did not find a nice-looking s...

Getting 'Public Sub New()' has multiple definitions with identical signatures after converting a website to WAP

I have converted a web site to a web application and after conversion I am getting loads of errors saying almost(50) 1. Getting 'Public Sub New()' has multiple definitions with identical signatures 2. 'UpdateProgress1' is already declared as 'Protected Dim WithEvents UpdateProgress1 As System.Web.UI.UpdateProgress' in this class. CAn ...

Convert VS2005 dtsx project from to VS2008

I have a numnber of dtsx projects created under VS2005. When I try to convert the solution to 2008 it converts fine but then the .dtproj file can't be loaded: myProj.dtproj' cannot be opened because its project type (.dtproj) is not supported by this version of the application. I have SQLServer2005 installed but I got rid of VS2005 as...

type conversion from webservice object to class object

hi all, i've created bunch of classes. i have webservices which reference these classes and contains the classes as parameters and return objects. when i call the weservice, i have to convert the class to the webservice object else i can type conversion error. is there a generic way to convert between these types without having to as...

C# Regex Split To Java Pattern split

I have to port some C# code to Java and I am having some trouble converting a string splitting command. While the actual regex is still correct, when splitting in C# the regex tokens are part of the resulting string[], but in Java the regex tokens are removed. What is the easiest way to keep the split-on tokens? Here is an example of ...

double string conversion and locale

A common international issue is the conversion of double values represented in strings. These stuff is found in a lot of areas. Starting with csv files which are either called comma separated or character separated because sometimes they are stored like 1.2,3.4 5.6,6.4 in English regions or 1,2;3,4 5,6;6,4 in for example Ger...

Convert our app from java version 6 to 5,

Hi guys, Is there any solution through which I can convert java'a higher application, created in netbeans IDE 6.5.1, into lower version of java version 5. ...

Is automated source translation seen as beneficial and/or necessary?

I have recently spent several years translating legacy FORTRAN into Java. Prior to that, I found myself translating FORTRAN into C (for which I wrote a simple translation tool). After all this work, I find myself wondering how many others are doing similar language-to-language translations and whether an automated way of doing so would...

SSIS SQL char conversion to MS Access Yes/No field

I have an SSIS package I am developing. I am attempting to write data from SQL Server 2005 to MS Access 2007. I am pretty stumped on how to convert a SQL char(1) field to an Access Yes/No field. From the information I have gathered, the SQL equivalent of an Access Yes/No field would be a bit field, with values of either 0 or 1. My SQL...

C comparison char and int

In the code block below what's the impicit conversion that takes place in the if statement for 7? I would have though it would end up being (0x98 <= 0x07) but that's not what happens as the condition evaluates to true and DoMyStuff gets called. char minstogo = 0x98; if(minstogo <= 7) { DoMyStuff(); } ...

SystemTray for jdk 1.5

I am converting code from jdk 1.6 to jdk 1.5 and the code is: import java.awt.SystemTray; public static void main(String[] args) { if (SystemTray.isSupported()) { SystemTray tray = SystemTray.getSystemTray(); } try { tray.add(trayIcon); } catch (AWTException e) { System.err.println("TrayIcon could...

Problem converting from int to float

There is a strange behavior I cannot understand. Agreed that float point number are approximations, so even operations that are obviously returning a number without decimal numbers can be approximated to something with decimals. I'm doing this: int num = (int)(195.95F * 100); and since it's a floating point operation I get 19594 inst...

Is there any free tool to convert a file with more than 65000 registers from DBF format to CSV?

Dear all, I need to convert a very large file from DBF format to CSV format. I have tried Microsoft Excel to do the job, but the problem is that I cannot see more than 65500 registers when I open and export the file. Microsoft Access couldn't open the file, too. I have found on google some shareware tools, searching for "DBF to CSV". ...

Converting a company from SVN to Hg?

We're a heavy user of SVN here. While the advantages of GIT over SVN made us want to change, the advantages of Hg over SVN mean it's now time to change and we need to start doing so very soon. I'm not so worried on the client side, but here are my questions. There are some excellent books on setting file metaproperties, properly organ...

N-Grams for sequence correction

Sorry for the difficult question. I have a large set of sequences to be corrected by either/or adding digits or replacing them (never removing anything) that looks like this: 1,2,,3 => 1,7,4,3 4,,5,6 => 4,4,5,6 4,7,8,9 => 4,7,8,9,1 4,7 => 4,8 4,7,1 => 4,7,2 It starts with a padded original sequence, and a sample correction. I'd lik...

Delphi: Is it necessary to convert string to WideString?

I found a Windows API function that performs "natural comparison" of strings. It is defined as follows: int StrCmpLogicalW( LPCWSTR psz1, LPCWSTR psz2 ); To use it in delphi, I declared it this way: interface function StrCmpLogicalW(psz1, psz2: PWideChar): integer; stdcall; implementation function StrCmpLogicalW; e...

Html To Doc(Word) Or RTF Format

Hi, What would the best possible way to convert a html page (with css, tables, images etc.) to be converted to word or rtf format. I already know about adding the content-type = application/word header and that's not an option because we need the images embedded in the document so that it can be viewed without an active internet con...