convert

How to reformat and sort dates stored in nvarchar

I am trying to display Month and YY part of the date column such that it should appear as Original Format Apr 12 2009; Feb 20 2009; Dec 24 2008; May 18 2009; Jan 8 2009; Dec 6 2008; Apr 19 2009; Jan 4 2009; May 13 2009; Jan 5 2009 From these dates the day part should be ripped off such that it appears as "Apr 09" ...

Convert ListBox.ObjectCollection to String array in VB.NET

I'm programming an application in VB.NET in which I need to take the Items from a ListBox, which are an ListBox.ObjectCollection and convert into a String array to be passed as a parameter to a Sub procedure. How should I do it? ...

Easy way to convert exec sp_executesql to a normal query?

When dealing with debugging queries using Profiler and SSMS, its pretty common for me to copy a query from Profiler and test them in SSMS. Because I use parameterized sql, my queries are all sent as exec sp_executesql queries. exec sp_executesql N'/*some query here*/', N'@someParameter tinyint', @ someParameter =2 I'll take this ...

Calculating SVG paths

Hi guys I have a quite complex image map (made up of over 150 pieces) and I want to convert the coords within the map to SVG path standard format. The reason why is I want to use the following instead of an image map http://raphaeljs.com/australia.html. But I need the coords to be in SVG path standard format. How can I convert an imag...

Convert .NET syntax into PHP using SoapHeader() call

Hi, I need to convert this .NET syntax into PHP using SoapHeader() call. esb.RequestServerVersionValue = new RequestServerVersion(); esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1; Thanks a lot! :) ...

How do I convert my Git repository to Mercurial and bring along its tags

I am wanting to toy around with Mercurial a bit, so I am trying to convert one of my existing repositories over. I run the following command on my Mac: hg convert myrepos myrepos-hg The command successfully imports all of my commits, but it doesn't bring along the 8 or so tags that were marked in the Git repository (nor are any of th...

How to create image (or other "read-only" format) from .doc

Anyone know of a way to convert a .doc with mail-merge fields into an image in C#? Basically we want to be able to display a "read-only" version of the document. This can be an image or some other read-only format if anyone can think of one. ...

How to convert MyISAM to InnoDB

I'm using MySQL 5, and my database experienced some corruption last week. The technicians at my web host managed to save it, but the tables are all converted from the original InnoDB to MyISAM. Currently, some functions in my eCommerce application does not work. Is there a easy way for me to convert them back to InnoDB again? I can't f...

ImageMagick and Piping

I have the following commands that create a sprite containing a normal state and a hover state: convert -background none -pointsize 11 -fill white -size 100x -gravity NorthWest caption:'Test' top.png convert -background none -pointsize 11 -fill grey -size 100x -gravity SouthWest caption:'Test' bottom.png montage top.png bottom.png -geom...

convert html to pdf output result UTF-8(for php)

How to convert html to pdf.Show outupt result UTF-8.I use html2pdf libary.This libary don't support utf-8.Please tell me which libaries i use and how to solve this probleam. ...

Convert XML file to DBF

Hi, I'm trying to convert an XML file to DBF. Right now I do this manually, opening the XML file in Excel 2003 and saving it as a DBF 4 file type. This is a boring and time consuming process, made worse by the fact that neither Office 2007, nor Office 2008 for Mac allow saving as DBF any more. I'd like a way to automate this, if possib...

Casting vs Converting an object toString, when object really is a string

Hello! This isn't really an issue, however I am curious. When I save a string in lets say an DataRow, it is cast to Object. When I want to use it, I have to cast it ToString. As far as I know there are several ways of doing this, first is string name = (string)DataRowObject["name"]; //valid since I know it's a string and another one ...

Converting JPEG colorspace (Adobe RGB to sRGB) on Windows (.Net)

I need to generate thumbnail and medium sized images from large photos. These smaller photos are for display in an online gallery. Many of the photographers are submitting JPEG images using Adobe RGB. I would like to use sRGB for all thumbnails and medium size images I am using dotnet (asp.net) and need a way to convert from Adobe RG...

(Ruby) Converting string values into assignable properties for OpenStructs...?

Hi All, I've got a bit of an odd situation. If I were using a hash, this issue would be easy, however, I'm trying to use "OpenStruct" in Ruby as it provides some decently cool features. Basically, I think I need to "constantize" a return value. I've got a regular expression: textopts = OpenStruct.new() textopts.recipients = [] ...

How to convert OpenOffice ODF files to HTML

I have some ODF files with math formulas and I need to render them...or else the boss will fire me (lol). Please, is there any way to do this ? or they can only be rendered in OpenOffice ? ...

Hex to Ascii? Java

Hi. I'm looking for a way to convert hex to ascii in Java. An example: byte temps[] = new byte[4]; temps[0] = 0x74; temps[1] = 0x65; temps[2] = 0x73; temps[3] = 0x74; String foo = ..(temps); System.out.print(foo); That should ou...

Cisco IOS "show conf" to XML?

Is there either: A freely available program that can convert the output of a Cisco's "show conf" to some sensible XML, like this (probably not very sensible) block form: Is there either: A freely available program that can convert the output of a Cisco's "show conf" to some sensible XML, like this (probably not very sensible) block for...

Convert Bitmap to Image

So after I pull an image out of DLL and put it into an image control it is a BitmapImage. To package it back into the dll it has to be converted back to an image. How can I convert it back to image and how can i repackage it back into the dll? This is all in wpf written in c#. private void compileDLL_Click(object sender, RoutedEventArgs...

Convert System.Windows.Media.ImageSource to System.Drawing.Bitmap

Title says it all. How can I convert a System.Windows.Media.ImageSource to System.Drawing.Bitmap? ...

Convert rows from a data reader into typed results

I'm using a third party library which returns a data reader. I would like a simple way and as generic as possible to convert it into a List of objects. For example, say I have a class 'Employee' with 2 properties EmployeeId and Name, I would like the data reader (which contains a list of employees) to be converted into List< Employee>. I...