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?
I have a datetime field which has a value like this 5/11/2010 12:04:20 PM .... I am converting this field convert(varchar, dbo.Clients.CreatedDate,103) as CreatedDate and i get the result as 11/5/2010..... But how to get 11/5/2010 12:04 PM.....
I would like to convert an integer into an array, so that it looks like the following:
int number = 123456 ;
int array[7] ;
with the result:
array[0] = 1
array[1] = 2
...
array[6] = 6
I have 1 NSMutableArray and I want to convert whatever data in array will be in NSString.
tell me code for that. Array is nothing but object of NSMutableArray class.
I have legacy DB that store dates that means no-date as 9999-21-31,
The column Till_Date is of type DateTime not-null="true".
in the application i want to build persisted class that represent no-date as null,
So i used nullable DateTime in C# //public DateTime? TillDate {get; set; }
I created IUserType that knows to convert the entity null value…
I have been trying to figure out a way to convert bitmap files into a JPEG using the GD library in PHP.
I have tried numerous implementations but nothing seems to work. I have tried to tell my client that they should not use Bitmap files but he insists and quite frankly does not comprehend enough about computers to convert them to JPG on his…
I would like to only work with UTF8. The problem is I don't know the charset of every webpage. How can I detect it and convert to UTF8?
<?php
$url = "http://vkontakte.ru";
$ch = curl_init($url);
$options = array(
CURLOPT_RETURNTRANSFER => true,
);
curl_setopt_array($ch, $options);
$data = curl_exec($ch);
// $data = magic($data);
…
Hi all I have the following code:
Public Shared Function ConvertToString(ByVal list As IList) As String
Dim strBuilder = New System.Text.StringBuilder()
Dim item As Object
For Each item In list
strBuilder.Append(obj.ToString())
strBuilder.Append(",")
Next
Return…
I need to convert mediawiki into LaTeX syntax. The formulas should stay the same, but I need to transform, for example = something = into \chapter{something}.
Although this can be obtained with a bit of sed, things get a little dirty with the itemize environment, so I was wondering if a better solution can be produced. Anything…
I'm having this one PHP project on my OSX which is in latin1 -encoding. Now I need to convert files to UTF8. I'm not much a shell coder and I tried something I found from internet:
mkdir new
for a in ls -R *; do iconv -f iso-8859-1 -t utf-8 <"$a" new/"$a" ; done
But that does not create the directory structure and it…
I need an easy way to convert a List<int> to a string array.
I have:
var the_list = new List<int>();
the_list.Add(1);
the_list.Add(2);
the_list.Add(3);
string[] the_array = new string[the_list.Count];
for(var i = 0 ; i < the_array.Count; ++i)
the_array[i] = the_list[i].ToString();
...which looks to be…
I have some variables like these:
a(1)=00:26:00
a(2)=744:32:00
a(3)=8040:33:00
I want to convert them to numbers, so I use the datenum command.
The biggest number should be 8040:33:00, but look what happens.
datenum(a([1 2 3]))
ans =
1.0e+005 *
7.3487
7.3485
7.3486
But if I don´t calculate a(1):
datenum(a([2…
I would like to only work with UTF8. The problem is I don't know the charset of every webpage. How can I detect it and convert to UTF8?
<?php
$url = "http://vkontakte.ru";
$ch = curl_init($url);
$options = array(
CURLOPT_RETURNTRANSFER => true,
);
curl_setopt_array($ch, $options);
$data = curl_exec($ch);
…
I was doing some type conversion routines last night for a system I am working on. One of the conversions involves turning string values into their DateTime equivalents.
While doing this, I noticed that the Convert.ToDateTime() method had an overload which accepted a boolean parameter.
First question? Under what…
I am using "convert" from IM to get PNGs from multi-page TIFF files, everything is good except the speed. From "convert" documentation, I found:
For the MNG and PNG image formats, the quality value sets the zlib compression level (quality / 10) and filter-type (quality % 10). For compression level 0, the…
How can I convert a database to support UTF-8 and convert it's old data from what ever encoding they're in to UTF-8 ?
Extra Info:
I'm running a server which has many websites on it, and one of them is running WHMCS (php script to manage hosting clients).
WHMCS has an iPhone application where i can…
Hi all,
I got a problem when I try to use Apache POI project to convert my PPT to Images.My code as follows:
FileInputStream is = new FileInputStream("test.ppt");
SlideShow ppt = new SlideShow(is);
is.close();
Dimension pgsize = ppt.getPageSize();
Slide[] slide = ppt.getSlides();
for (int i…
Hi All,
I'm sure this is a piece of cake but I'm really struggling with something that seems trivial.
I need to check the inputted text of a textbox on the form submit and check to see if it's within a desired range (I've tried a Range Validator but it doesn't work for some reason so I'm trying…
hi
how to convert minutes into days hours and minutes in java
public String timeConvert(int time){
String t = "";
int h = 00;
int m = 00;
// h= (int) (time / 60);
// m = (int) (time % 60);
// if(h>=24) h=00;
if((time>=0) && (time<=24*60)){
h= (int)…
Hi,
I want to save(export) contents of MyView, which extends TextView, into a bitmap.
I followed the code: [this][1].
It works fine when the size of the text is small.
But when there are lots of texts, and some of the content is out of the screen, what I got is only what showed in the…