convert

Convert minutes into a week to time using Java's Date and Calendar classes

Overview This is the scenario: I'm given a value which represents a portion of the total number of minutes that exist in a standard week (assuming 10,080 minutes a week and 1,440 minutes a day) starting midnight Saturday (so 0 minutes Sunday @ 12am). I need to convert this minute value into an actual time value (like 8:35am) and I wan...

How to convert object array to string array in Java

I use the following code to convert an object array to a string array : Object Object_Array[]=new Object[100]; // ... get values in the Object_Array String String_Array[]=new String[Object_Array.length]; for (int i=0;i<String_Array.length;i++) String_Array[i]=Object_Array[i].toString(); But I wonder if there is another way to do thi...

Converting a string to an enum in C#

Possible Duplicate: Converting a string to an enumeration value in C# How do I convert a enum to a string in C#? Note: I have the answer and will post, I searched for the answer here first but couldn't find it so I thought I would add the question / answer to the site once I found it. ...

How can I left-pad the string representation of a float?

Hello. I'm trying to convert a single precision floating point number into an ascii representation of the four bytes that make it (sign/exponent/mantissa). My current code is: Integer.toString(Float.floatToRawIntBits(f),16); Float.floatToRawIntBits makes an integer using the same bytes, and then Integer.toString creates the ascii dig...

help me convert Processing code to C#

I am trying to convert this code from java to C# (located here) I have some winform experience but not a lot with the drawing of pixels on a winform applications. I feel fairly confident I can convert over most of the sub methods im just unclear on how i would draw indiviual pixels on the screen any help or tools for converting over j...

How to read a csv file into a .net datatable

How can I load a csv file into a System.Data.DataTable, creating the datatable based on the CSV file? Is there a class library for this or can I use ADO.net to connect to the file? ...

How to convert a RDL to RDLC file with a different schema?

I'm using Sql Server Reporting Services (SSRS) 2008 to create RDL files, but also need to create a RDLC file. The problem is that SSRS 2008 uses a 2008 schema, while Visual Studio 2008 uses the 2005 schema. Is there a tool or work around for this solution? Note: I'm not using tablix, so that should not be a problem. ...

Looking for a safe converter to convert .mde file to .mdb

Hi do you know a safe converter to convert .mde file to .mdb ? ...

convert string to datetime in ado.net

I am trying to save data into my database using a vb form. I am using a datetimepicker to insert the date into my database. Here's an example saveCommand.Parameters.AddWithValue("A_BOOKDATE", abookdatePicker1.Text).DbType = DbType.DateTime In my database i set its attribute to time ,now the thing is i used the same line of code on anot...

ASP: convert milliseconds to date

I need to convert a field with milliseconds created by PHP app to a date value. Is there a way to do this using vbcript? or convert to datetime in SQL 2005 Example: 1113192000 to mm/dd/yyyy hh:mm:ss Thanks, Sam ...

Convert PHP to C++ code

I'm looking for a way to convert PHP code to C++. There are a few reasons I want to do so: Main reason: There are bunch of great PHP tools/software that I'd love to use and incorporate into C++ GUI or non-GUI applications To boost performance To avoid dependency on PHP libraries To avoid disclosing source code on shared hosting enviro...

C# Can't get String to DateTime conversion to work

Hi, I've done some simple string -> DateTime conversions before using DateTime.ParseExact(), but I have a string that I can't seem to get parsed properly. I'm probably doing something very obvious wrong but I just can't see what it is. The code is as follows: string date = "Tue Jun 23, 2009 2:23 pm"; DateTime lastupdate = DateTime.Par...

Convert a String to Number - Java

Hi, What is the easiest and correct way to convert a String number with commas (for example: 835,111.2) to a Double instance. Thanks, Rod ...

Convert byte array to short array in C#

I'm currently reading a file and wanted to be able to convert the array of bytes obtained from the file into a short array. How would I go about doing this? ...

How to convert from int to string in objective c: example code...

I am trying to convert from an int to a string but I am having trouble. I followed the execution through the debugger and the string 'myT' gets the value of 'sum' but the 'if' statement does not work correctly if the 'sum' is 10,11,12. Should I not be using a primitive int type to store the number? Also, both methods I tried (see comm...

Replace URL with a link using regex in python

Hello, how do I convert some text to a link? Back in PHP, I used this piece of code that worked well for my purpose: $text = preg_replace("#(^|[\n ])(([\w]+?://[\w\#$%&~.\-;:=,?@\[\]+]*)(/[\w\#$%&~/.\-;:=,?@\[\]+]*)?)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\3</a>", $text); $text = preg_replace("#(^|[\n ])((...

How do i convert string value to int? in C#

I have a string which typically is in the format "0xFF". I'll trim it since there is a chance of whitespace. How do i convert that into hex and convert "34" to decimal. I know about .Parse but does this support hex characters when the string is 0x123? ...

Convert double to string C++?

I want to combine a string and a double and g++ is throwing this error: main.cpp: In function ‘int main()’: main.cpp:40: error: invalid operands of types ‘const char [2]’ and ‘double’ to binary ‘operator+’ Here is the line of code which it is throwing the error on: storedCorrect[count] = "("+c1+","+c2+")"; storedCorrect[] is a stri...

Makefile – build all possible targets

I'd like to use a makefile to convert a set of svgs to pngs. The following snippet shows what I've done so far. %.png: origs/%.svg convert -resize "32x" $< $@ make foo.png works now. but I'm stuck with the all target. I'd like to convert everything (all svgs that is) with a single command. In all examples I've found the all targ...

SQL converting Text fields

I'm bumping into somenull fields in a SQL2005 db. Some report Null and others have values like 1.00 or 713.00. I'd like a bullet proof way to convert the 'Null's to 0 and the '1.00' and '713.00' values into Money types. ...