conversion

Lisp: Need help getting correct behaviour from SBCL when converting octet stream to EUC-JP with malformed bytes

The following does not work in this particular case, complaining that whatever you give it is not a character. (handler-bind ((sb-int:character-coding-error #'(lambda (c) (invoke-restart 'use-value #\?)))) (sb-ext:octets-to-string *euc-jp* :external-format :euc-jp)) Where *euc-jp* is a variabl...

how to convert string to binary integer file using command line under linux

What i want is to take an integer represented as a string, for example "1234", and convert it to a file called int, containing a 32-bit big endian integer, with the value 1234. The only way I have figured out to do this is something like echo 1234 | awk '{printf "0: %08X", $1}' | xxd -r > int which is a bit nasty! Does anyone know a...

How do you convert a GIF into a CUR file?

The title says it all really, how do you create a .cur (for a mouse cursor), from a GIF file? What tool or process can I use? ...

where can I lookup if I am running .net 3.5 or 3.5 sp1?

I want to verify if a computer is running .net 3.5 or 3.5 sp1, where do I look this info up? ...

How to speed up floating-point to integer number conversion?

We're doing a great deal of floating-point to integer number conversions in our project. Basically, something like this for(int i = 0; i < HUGE_NUMBER; i++) int_array[i] = float_array[i]; The default C function which performs the conversion turns out to be quite time consuming. Is there any work around (maybe a hand tuned functi...

Converting Oracle Forms 10 to Java

There are a number of commercial products available: Exodus Evo Also Oracle Application Express (APEX) is releasing a Forms Converter in Oracle Application Express 3.2 (which is now in beta). Has anyone used any of these tools? How much of the process do they automate? What’s the quality of the converted code? Are they worth the co...

Convert java 5 code using generics to code that can run on a J2ME device?

Are there any solutions or tools that transform java 5 code that uses all the new java 5 features(generics, autoboxing, varargs, static imports) into code that can run on a J2ME device? I am particularly interested in handling generics - the other features are nice to have but not mandatory. I need source code as the result of this conv...

High-quality PDF to Word conversion in PHP?

What's the best way of converting PDF docs to Microsoft Word format in PHP? This can be either as a PHP script or calling a (Linux) executable (with proc_open()). It just needs to be relatively fast and produce quality Word documents (in 97/2000/2003 format). Commercial software is OK. ...

How to convert a single char into an int

I have a string of digits, e.g. "123456789", and I need to extract each one of them to use them in a calculation. I can of course access each char by index, but how do I convert it into an int? I've looked into atoi(), but it takes a string as argument. Hence I must convert each char into a string and then call atoi on it. Is there a be...

Import VBScript General Date Time Into MS Access Date/Time Column

Setup I have a VBScript for driving the stress testing of a web service. The script creates a data file of measurements, with each record timestamped with a general date/time: FormatDateTime(Now(), 0) This creates dates like mm/dd/yyyy hh:mm:ss [AM|PM] I need to import this data file into a MS-Access 2003 database. The table in th...

Convert 12-hour date/time to 24-hour date/time

I have a tab delimited file where each record has a timestamp field in 12-hour format: mm/dd/yyyy hh:mm:ss [AM|PM]. I need to quickly convert these fields to 24-hour time: mm/dd/yyyy HH:mm:ss. What would be the best way to do this? I'm running on a Windows platform, but I have access to sed, awk, perl, python, and tcl in addi...

How do I convert Excel OpenXML shared strings to inline strings?

I have a large spreadsheet in Excel 2007 OpenXML format that I want to manipulate in xml programmatically. Excel saves it using the shared strings method which, while more efficient, complicates the process. Does anyone know if there is an option buried in Excel to save using inline strings, or maybe a utility already build to place all ...

How do I handle a DBNull to Boolean conversion in my XSD DataSet?

In my database, I have a few columns in one of my tables that are bit (boolean) values. They are allowed to be NULL since the fields are not always going to contain data. I've gone through the process of creating an XSD DataSet using the table and made sure that the AllowDBNull field is set to True. However, when I pull a down record f...

best tool for step/iges to stl conversion?

I need code to my app that converts CAD files (mostly .step, .iges) into 3D surface models (.stl). Do you have a suggestion? Freely available stuff? (One suggestion per posting) ...

.NET - Server-side Markdown to HTML Conversion

What is a good open source .NET library to convert markdown to HTML on the server? If this has been answered somewhere else please point me to the post. Thanks. ...

Is there a tool for converting VB to a scripting language, e.g. Python or Ruby?

I've discovered VB2Py, but it's been silent for almost 5 years. Are there any other tools out there which could be used to convert VB6 projects to Python, Ruby, Tcl, whatever? ...

How do I make a universal type conversion method.

What I want to do is: bool Convert( out Object output, Object source) { // find type of output. // convert source to that type if possible // store result in output. return success } Is it possible? Obviously, there is a brute force massive "if" construct that could work, but that would require writing an if block for e...

xml to json roundtrip conversion

Has any work been done to provide round trip from xml to json and back again? If so, does anyone have some practical advice for doing this? I understand that you'd probably have to limit the complexity of the schema and json structure, but what's the cost on both sides? And is is too prohibitive. ...

Retroactive svn import into git

Here is my problem: I used Subversion for some time, until I switched to Git. Some more time elapsed. There was no import of the history from Subversion to Git. It was a strict checkout, delete of the .svn dirs, then git init. Not a smart move. Now, thousands of git commits later, I find a backup of the Subversion repo made at the t...

How do I add an integer value with javascript (jquery) to a value that's returning a string?

I have a simple html block like: <span id="replies">8</span> Using jquery I'm trying to add a 1 to the value (8). var currentValue = $("#replies").text(); var newValue = currentValue + 1; $("replies").text(newValue); What's happening is it is appearing like: 81 then 811 not 9, which would be the correct answer. What am I doing...