conversion

How to Programmatically convert large scanline tiff image to tiled tiff image?

Hi, In Mac OSX Cocoa, How to Programmatically convert large scanline tiff image to tiled tiff image? The input tiff image size could be around (20000X12000) (20K X 12K) Regards, Dhanaraj ...

JBoss Drools 4 : from excel to drl

Hi all! Is it possible with drools4 api generate from a .drl file a decision table spreadsheet (.xls)? Thank's ...

How to convert a Navigablemap to String[][]

I need to convert a navigable map to a 2d String array.Below given is a code from an answer to one of my previous question. NavigableMap<Integer,String> map = new TreeMap<Integer, String>(); map.put(0, "Kid"); map.put(11, "Teens"); map.put(20, "Twenties"); map.put(30, "Thirties"); map.put(40, "Forties"); map.put(50, "Senior"); ...

Help needed on SQL query to Linq Conversion

Please help me write LINQ for this SQL select svc.SvcName, svcOptions.SvcOptionName, svcMap.Price from svcMap inner join svc on svcMap.SvcId = svc.SvcId inner join svcOptions on svcOptions.SvcOptionId = CASE WHEN (svcMap.DesiredSvcOptionId <> 0 AND svcMap.DesiredSvcOptionId <> svc.DisabledSvcOptionId) THEN ...

How can I convert between RGB565 and RGB24 image formats in MATLAB?

I am getting an RGB matrix from a microprocessor that outputs an image in RGB565 format. I want to read this into MATLAB, convert it to RGB24 format, and output the image. How do I do this? ...

Converting a SecureRandom and UUID into an int (java)?

Hello, I am having problems taking in a string (a persons name), and getting back a unique integer, it keeps going through the catch function, and I dont know why, other than the way I wrote SecureRandom is not working, but it is very confusing. I am very new to programming so please be kind! public static int uinqueID(String name){...

Converting bytes to a binary string in c#

In c# I am converting a byte to binary, the actual answer is 00111111 but the result being given is 111111. Now I really need to display even the 2 0s in front. Can anyone tell me how to do this? I am using: Convert.ToString(byteArray[20],2) and the byte value is 63 ...

How to best convert VB6 "Select Case 1067 To 2938..." to C#?

I'm converting some VB6 logic to C# and have encountered the following SELECT/CASE statement. Select Case ZipCode Case 1067 To 19417, 35075 To 35085, 48455 To 48465, 55583 To 55596, 67480 To 67551, 75392, 85126, _ 93047 To 93059, 21217 To 21739, 35091 To 35096, 48480, 55606 To 55779, 67655 To 67707, 76726 To 76835, _ 85221 To 87...

Convert ascii code to hexadecimal in UNIX shell script

I'd like to convert ASCII code (like - or _ or . etc) in hexadecimal representation in Unix shell (without bc command), eg : - => %2d any ideas ? ...

Converting between numbering systems

Hi, I'm trying to understand the reason for a rule when converting. I'm sure there must be a simple explanation, but I can't seem to wrap my head around it. Appreciate any help! Converting from base10 to any other base is done like this: number / desiredBase = number + remainder You do this until number = 0. But after all of the calc...

Convert html to word /excel / powerPoint with PHP

How to convert html to word /excel / powerpoint with PHP ? ...

C++: can an int be assigned a char* ??

I am reading chapter 2 of Advanced Linux Programming: http://www.advancedlinuxprogramming.com/alp-folder/alp-ch02-writing-good-gnu-linux-software.pdf In the section 2.1.3 Using getopt_long, there is an example program that goes a bit like this: int main (int argc, char* argv[]) { int next_option; // ... do { next_option = g...

html to text conversion using python language

import urllib2 from BeautifulSoup import * resp = urllib2.urlopen("file:///D:/sample.html") rawhtml = resp.read() resp.close() print rawhtml I am using this code to get text from a html document, but it also gives me html code. What should i do to fetch only text from the html document? ...

Android java conversion problem

Hello, I have currently the problem that I like to send some commands to an embedded devices via bluetooth (encoded in 16 bits). Unfortunately there seems to be a conversion error in Java or at least I don't know how to handle it. These bits are e.g. 1001 0010 1011 0010 I thought about using char for this (16bit), but sometimes it's c...

Convert INT(0-255) to UTF8 char in Java

Hi, since I need to control some devices, I need to send some bytes to them. I'm creating those bytes by putting some int values together (and operator), creating a byte and finally attaching it to a String to send it over the radio function to the robot. Unfortuantely Java has some major issues doing that (unsigned int problem) Does ...

C Language - [copy in place] float* to char* and the reverse

I want to copy a float buffer into a char (byte) buffer without allocating memory for two separate buffers. In another words I want to use one buffer and copy in place. The Problem is that if I need a float buffer then in order to copy that to a char then I will need a char* pointer; If I were copying from float* to float* it would be ...

char* to float*

I want to write a function that unpacks a char* buffer to a float* buffer. The char* buffer was originally packed as floats to bytes. What is the best way to do this? I have implemented integers below. I have packed an array of 4 byte sized integers in a char* buffer. This is the function I used to unpack it and assign it to int*. voi...

PHP HSV to RGB formula comprehension

I can convert RGB values to HSV with the following code... $r = $r/255; $g = $g/255; $b = $b/255; $h = 0; $s = 0; $v = 0; $min = min(min($r, $g),$b); $max = max(max($r, $g),$b); $r = $max-$min; $v = $max; if($r == 0){ $h = 0; $s = 0; } else { $s = $r / $max; $hr = ((($max - $r) / 6) + ($r / 2)) / $r; $hg = (...

Tools for converting LaTeX equations to Content MathML or OpenMath?

Do you know any open source tools or libraries (preferably Java, but that's not a strict requirement) in the GNU/Linux world that convert mathematical equations in LaTeX syntax to Content MathML or OpenMath? I need to convert tons of equations in batch mode, so I'm not looking for interactive apps. EDIT My focus is on the equations' ...

Fastest way to cast int to UInt32 bitwise?

Hello overflow, i have some low level image/texture operations where 32-bit colors are stored as UInt32 or int and i need a really fast bitwise conversion between the two. e.g. int color = -2451337; //exception UInt32 cu = (UInt32)color; any ideas? thanks and regards ...