conversion

How do I use System.Data.DataTableExtensions' CopyToDataTable method?

I'd like to create a data table given a List using the CopyToDataTable method available in DataTableExtensions. I've previously asked the question How do I transform a List into a DataSet? and got an exceptional answer from CMS which was to achieve what I wanted by creating an extension public static DataTable ToDataTable<T>(this IEnumer...

Is there a free way to convert RTF to PDF?

How can I programmatically convert RTF documents to PDF? ...

Steps to debug/step through some java code?

Hi folks, yes, this is a very noobish question. I'm a .NET developer and I need to step through some java code to see exactly what is going on so i can port some java into some c#. So far i've not needed to do that .. until now. So .. i have absolutely zero knowledge of java debugging. So can someone please explain in blond-speak how i...

Converting LPCWSTR with WideCharToMultiByte. Need help.

i have a function like this: BOOL WINAPI MyFunction(HDC hdc, LPCWSTR text, UINT cbCount){ char AnsiBuffer[255]; int written = WideCharToMultiByte(CP_ACP, 0, text, cbCount, AnsiBuffer , 0, NULL, NULL); if(written > -1) AnsiBuffer[written] = '\0'; if(written>0){ ofstream myfile; myfile.open ("C:\\example.txt", ios::app); myfile.writ...

Is there an equivalent to out-of-process COM EXE in .NET?

One of the nice things about COM/ActiveX was the out-of-process EXE. You could have an EXE which exposed methods and properties in a form usable by both other processes, including VBScript and JScript. At the same time the EXE could have its own functionality, related or unrelated to that exposed by its type library. What is the .NET eq...

HTML+CSS to RTF (in PHP)?

I am desperately seeking a solution to converting HTML + CSS (2.1) to RTF in PHP. While I have found a superb solution for HTML to PDF in Prince XML, I've yet to find anything that: can convert HTML to RTF (or DOC); runs on a Linux server; is callable from PHP; handles paged media and the ability to add page headers and footers; and h...

How do I convert Word files to PDF programmatically?

I have found several open-source/freeware programs that allow you to convert .doc files to .pdf files, but they're all of the application/printer driver variety, with no SDK attached. I have found several programs that do have an SDK allowing you to convert .doc files to .pdf files, but they're all of the proprietary type, $2,000 a lice...

Invalid Conversion Problem in C++

I have the following snippet: string base= tag1[j]; That gives the invalid conversion error. What's wrong with my code below? How can I overcome it. Full code is here: #include <iostream> #include <vector> #include <fstream> #include <sstream> #include <time.h> using namespace std; int main ( int arg_count, char *arg_vec[] ) { ...

How can I convert this XAML code into C# code?

How can I convert this XAML code into C# code? <Window.Resources> <DataTemplate x:Key="itemtemplate"> <TextBlock Text="{Binding Path=Text}"/> </DataTemplate> </Window.Resources> ...

Does C++0x support std::wstring conversion to/from UTF-8 byte sequence ?

I saw that C++0x will add support for UTF-8, UTF-16 and UTF-32 literals. But what about conversions between the three representations ? I plan to use std::wstring everywhere in my code. But I also need to manipulate UTF-8 encoded data when dealing with files and network. Will C++0x provide also support for these operations ? ...

.NET TIFF file: RGB to CMYK conversion possible without a third party library?

Following up my previous question: if and how would it be possible to take RGB based TIFF files and convert them over to CMYK with standard .NET (3.5) functionality? Is that possible at all? ...

Any fast way to convert a scriptlet-infected JSP app into Struts?

We've got a legacy app to support. It's pure JSP, i.e. JSP opens connections, does business logic, submits forms (usually to the same JSP), and so on. It's 400+ pages, with some pages are as large as 100K. The app is expected to be extended and modified over the next few years, so we're looking into ways to split presentation and busine...

Converting Autocad DXF to Microsoft XAML

Anyone got a good and preferably cheap and easy way to do this? The closest I got was to save a file to .SVG and use Inkscape to convert it to XAML. All lines and such converted nicely, but all the text was just a pile of text on top of the document. I also tried importing the DXF to Adobe Illustrator and using Mike Swansons AI to XAM...

Is there a good PDF to XHTML strict converter

It is basically all in the title, I need to take a bunch of large PDFs and have them in XHTML 1.0 strict, close is good enough, then I can clean it up. Thanks ...

Milliseconds wrong when converting from XML to SQL Server datetime

I've run into a problem related to converting datetimes from XML (ISO8601: yyyy-mm-ddThh:mi:ss.mmm) to SQL Server 2005 datetime. The problem is when converting the milliseconds are wrong. I've tested both implicit and explicit conversion using convert(datetime, MyDate, 126) from nvarchar, and the result is the same: Original ...

Converting Excel to PDF with VS2008 and Office2007

I am trying to use Interop.Excell to save an Excel Workbook as a PDF file. I am using VS2008 and Office2007, and have downloaded and installed the SaveAsPDFandXPS.exe from Microsoft. This enabled me to save a Word document as a pdf using the following code: object frmt = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF; ...

Any issues converting ASP.NET applications from 1.1 Framework to 2.0?

We are migrating many ASP.NET 1.1 web applications to new servers. We would like to convert all of them to 2.0 in the process. Ideally, in the end, the 1.1 framework will not even be installed on the new servers. We've never had major issues converting applications to 2.0 from 1.1. Our biggest issue has always been changing Configuration...

VXML getting 'src' for subdialog from variable

Our business is transitioning from an old asp system to a newer ASP.NET system, including massive improvements to our database. There is going to be a period of coexistence, during which old & new will run side-by-side. One app which needs coexistence is a voicemail system we use. It works as follows: User calls. User inputs an acco...

Change column type from ntext to varbinary(max)

I have a table that has ntext field. MSDN says that ntext is deprecated and they suggest other data types: ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), var...

How to convert an image (i.e. pdf) for use in a LaTeX document?

What is the preferred way to convert various images, bitmap and vector, for use in a LaTeX and PDFLaTeX document? There are many ways to do this, some make use of standard inclusions in the various LaTeX packages, others give better results. ...