convert

Url.Action how to convert utf-8?

Hi, <a href="<%=Url.Action("Search","Home",new{ value = "Şiir" }) %>">Şiir</a> domain/Search/%C5%9Eiir How can I convert it to utf-8? domain/Search/Şiir ...

Convert a Perl function to PHP

Hello, I want to convert the perl function below to PHP function, if someone could help a little bit I'd appreaciate it: sub encode32 { $_=shift; my($l,$e); $_=unpack('B*',$_); s/(.....)/000$1/g; $l=length; if($l & 7) { $e=substr($_,$l & ~7); $_=substr($_,0,$l & ~7); $_.="000$e" . '0' ...

Convert a Perl code to PHP

Hi; I need to convert the following perl function to php: pack("SSA12AC4L", $id, $loc, $name, 'ar', split(/\./, $get->getIP), time+(60*60); I use the following code (to test) in PHP: echo pack("SSA12AC4L", '25', '00001', '2u7wx6fd94fd', 'f', preg_split('/\./','10.2.1.1', -1, PREG...

C# GetBytes, WriteBytes and Embedded Statement Error

I have a problem. When I run my program, it comes up with an error, specifically the CS1023 error. I guess it's because I have a declaration inside a statement, but I don't know how else to write the code. Sometimes C# annoys me, because in C++ I could get away with similar things... anyway, here's the code. I would appreciate it if som...

GWT document format converter

Hello, I am searching on ways to make a small app using GWT for converting documents from one format to other. Mainly these formats .doc , .pdf , .odt , .rtf.. and maybe a couple more. Has anyone tried this before?? I came across the library JODConverter but it needs open office to be already installed and i don't really know how ...

Convert a single character to a string?

Simple question (in C++): How do I convert a character into a string. So for example I have a string str = "abc"; And I want to extract the first letter, but I want it to be a string as opposed to a character. I tried string firstLetter = str[0] + ""; and string firstLetter = & str[0]; Neither works. Ideas? ...

Usefulness of bool* in C#

Can I use bool* in any kind of meaningful way. How would I convert bool* to a byte for instance, or store bool* in a byte My goal is to manage my own memory in a project of mine, the specifics aren't important, just something id like to do. Now I would like to be able to store my own variables, and i happen to need to store a boolean va...

One more bash (now .bat) script

I need to convert about 12000 TIF files in many directories, and try to write bash-script: #!/bin/bash find -name "*.tif" | while read f do convert "$f" "${f%.*}.png" rm -f "$f" done Why it say: x.sh: 6: Syntax error: end of file unexpected (expecting "do") and what I should to do? Great thanks to you all, men, but I was cheated:...

Is there anyway of converting c# function to sql server stored procedure?

Hi, I have a stored procedure which is written in c#: SqlConnection scn = new SqlConnection("context connection=true;"); SqlCommand scm = new SqlCommand("Select * from EPMS_Filters",scn); SqlDataAdapter sda = new SqlDataAdapter(scm); DataSet ds = new DataSet(); //template for select Query. Stri...

Сonvert unicode (UTF-8) filenames to ANSI (DOS)

Directory listing with broken filenames encoding C:\Downloads\1>dir 18.01.2010 10:45 <DIR> РЎР?Р>Р?Р?С?Р+ 18.01.2010 10:45 <DIR> Р?Р?С'Р?Р>Р?Рє 18.01.2010 10:45 <DIR> Р"Р?С?Р?Р°С╪Р°-Р>РчС╪РчР+Р?Рё РєР?С?РїС?С? 18.01.2010 10:45 <DIR> Р•Р>Р•Р?РўР Р?Р?Р? Is there any tools for windows t...

passing CustomString& into a constructor won't implicit convert from "string"

I can get the compiler (msvc++ express) to convert "string" as a CustomString in a constructor, but not with a reference. Will it therefore not have the same chance of being optimized out with a pass-by-reference anyway, like passing by value with other types can, if the compiler thinks it can? won't implicit convert using new xmlNode...

Convert view xib to empty xib

I have created a "view xib" but I want to convert it to an "empty xib" (Without of course removing the old xib and creating a new one). Is that possible? ...

Convert/cast an stdClass object to another class

I'm using a third party storage system that only returns me stdClass objects no matter what I feed in for some obscure reason. So I'm curious to know if there is a way to cast/convert an stdClass object into a full fledged object of a given type. For instance something along the lines of: //$std_class is an stdClass instance $converte...

Converting QDomElement to QString / Container class

Hello, Let's say we have the following XML document: <root> <options> ... </options> <children> <child name="first">12345</child> <child name="second"> <additionalInfo>abcd</additionalInfo> </children> </root> I would like to get a string representation of the "child" nodes and appe...

Java lib for WordML to Word2002 conversion

Hello, For a project I am working on, I need to convert WordML stream into Word 2002 compatible .doc format (don't ask why - but quite a large group of users are still on Word 2002 with upgrade to latest version not feasible till Q4 2010). I have tried to research a lot of options and have mostly hit a dead end. My use case is that th...

Decimal to Binary, strange output

I wrote program to convert decimal to binary for practice purposes but i get some strange output. When doing modulo with decimal number, i get correct value but what goes in array is forward slash? I am using char array for being able to just use output with cout <<. // web binary converter: http://mistupid.com/computers/binaryconv.htm ...

Ruby: convert list of jpegs to flv file

Hi, I need to write a Ruby script that can take a collection of jpeg files and creat a slideshow of them in .flv format. the .flv file then needs to be stored into a database. Does anyone know what libraries/gems/I'm going to need to get this started? ...

Putting several hundred .doc pages into webpage.

I have hundreds of .doc files with text that I need put on web pages. I realize I could convert every .doc file to .txt, then use a server side include to embed the contents of each page into a webpage. This would save a lot of time because I could simply have one .php?txt=... page which will display a different .txt include depending o...

Convert audio files to mp3 using ffmpeg

Hi there, I need to convert audio files to mp3 using ffmpeg. When i write the command as ffmpeg -i audio.ogg -acodec mp3 newfile.mp3, I get the error: FFmpeg version 0.5.2, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 ...

Convert a lot of excel files

How can i convert a lot of '97 excel file to '95. I look for other solution as File - Save As. ...