Click here to Skip to main content
15,893,994 members
Everything / Convert

Convert

convert

Great Reads

by Alexei Shamov
Convert types, parse and evaluate expressions in runtime, in .NET 2.0
by shijo joseph
An extension methods library which could do the equality comparison operations easily
by Amit Singh Baghel
A useful tip to export a Div to PDF (with Unicode support) with the help of NReco-PDF Generator for .NET (C#), JQuery and Handler in ASP.NET
by blitzkrieged
This is a demonstration of splicing an animated GIF (or any image) frame by frame without having to write to the disc.

Latest Articles

by Xavier Junqué i de Fortuny
Converts MathML coded string to/from plain text string
by Cinchoo
Quick tutorial on converting CSV file to JSON file using Cinchoo ETL
by rohitsies
CSV file generator using simplistic approach
by NewPast
Converting codes Focus on upgrading VB6 to VB.Net and converting C# VB.Net, and listing many other helpful converter including php, java & others.

All Articles

Sort by Title

Convert 

6 Feb 2015 by User 11197367
HiI'd like to know how I can cut down a .avi file and make a .gif file out of it.I want to create a Proram you can use to ripoff episode-changing gags from the Intro. This is (more or less) useful for Series like The Simpsons or American DadThanks.Sincerely:Jonas
6 Feb 2015 by Zoltán Zörgő
Check these: A Simple C# Wrapper for the AviFile Library[^]NGif, Animated GIF Encoder for .NET[^]https://dotnetpuzzle.wordpress.com/2012/05/09/animated-gif-image-with-c/[^]You can find there much everything you need to make it working.
6 Feb 2015 by Gaurav_Chaudhary
Try FFMPEG binary executable to which you can feed in console commands and get the gif image from a video file and you have more advanced options like time interval of frame etc... ffmpeg -i video.avi -t 5 out.gif
2 Oct 2021 by eboolean
def asallar(limit): limitn = limit+1 asal_degil = [False] * limitn asal_listesi = [] for i in range(2, limitn): if asal_degil[i]: continue for f in xrange(i*2, limitn, i): asal_degil[f] = True ...
23 Apr 2015 by BacchusBeale
For C, something like in the comments:def asallar(limit): \\ void asallar(int limit, int* asal_listesi){ limitn = limit+1 \\ int limitn =limit+1; asal_degil = [False] * limitn \\ int *asal_degil = malloc(...) asal_listesi = [] \\ vector asal_listesi; for i in range(2,...
10 Dec 2018 by CPallini
#include using namespace std; vector asallar(size_t limit) { vector nov(limit+1, false); vector result; for (size_t i=2; i
21 Jun 2013 by hansoctantan
Hello eveyone, I have install a free software that change the protected PDF Files to unprotected. The software run by dragging a PDF files in a desktop icon "PDF unlocker, drop PDF files here".When I try using it in Windows Run "C:\Program Files\Freeware PDF Unlocker\unlockpdf.cmd"...
21 Jun 2013 by Rajesh Anuhya
use like this to get the Shell window Shell "c:\telnet" ,vbNormalFocus Refer the below link,http://www.developerfusion.com/article/9/shell-and-shellexecute-function/[^]Thanks--RA
21 Jun 2013 by bayotle
I can't remember executing a shell directly, my programs builds them on the fly.Try the following and see if it works....shell chr(34) & "C:\Program Files\Freeware PDF Unlocker\unlockpdf.cmd" & chr(34) & chr(32) & chr(34) & "C:\Documents and Settings\USER001\Desktop\00000001.pdf" & chr(34)
21 Jun 2013 by Mike Meinz
Does this work?shell chr(34) & "C:\" & CHR(34) & "Program Files" & CHR(34) & "\" & CHR(34) & "Freeware PDF Unlocker" & CHR(34) & "\unlockpdf.cmd" & chr(34) & chr(32) & chr(34) & "C:\" & CHR(34) & "Documents and Settings" & CHR(34) & "\USER001\Desktop\00000001.pdf" & chr(34),vbNormalFocus
5 Jul 2012 by Mario Ghecea
This article describes the technique I used to ingest large text files to create an e-book publishing platform on the Android Market
3 Feb 2021 by kelzi
I coudn't convert 4 bytes Hex value to datetime format. FA 5B 04 00 = 31.12.2020 18:00 F9 5B 04 00 = 31.12.2020 17:00 E1 05 03 00 = 30.06.2011 17:00 21 06 03 00 = 01.07.2011 09:00 I think first change to Float or Int32 - Little Endian...
2 Feb 2021 by OriginalGriff
At a guess - and that's all it can be from two so similar samples - it looks a bit silly. The only difference between the two values is one hex digit - a "9" changes to a "A" while the resulting date changes by one hour - which would imply that...
3 Feb 2021 by Patrice T
Just a guess: FA 5B 04 00 = 31.12.2020 18:00 F9 5B 04 00 = 31.12.2020 17:00 E1 05 03 00 = 30.06.2011 17:00 21 06 03 00 = 01.07.2011 09:00 ^ this look like the month - 1 Need more samples and details, where does it come from ? Try couples of...
12 Aug 2013 by Member 4347041
Where can i find sample of code to make a software who changes .dwg or .dxf (from autocad) to g-code for CNC milling machine.
12 Aug 2013 by Sergey Alexandrovich Kryukov
There is no "conversion" in principle. First file is the output of AutoCAD or other CAD, a CAD file. The second one is the CAM file, describing technological process. Do I even have to explain why one cannot be just "converted" into the second, because of the lack of information?AutoCAD file...
9 Sep 2020 by wooriele
- (float) getVerticalOffset:(CGPoint)point1 point2:(CGPoint)point2 point3:(CGPoint)point3 point4:(CGPoint)point4 magnetLen:(float)length{ float result = length; if (point1.x > point2.x){ float t = point1.x; point1.x = point2.x; point2.x = t; } point1.x -= length;...
2 Jul 2013 by macrose
Please see link below..http://www.cocoabuilder.com/archive/cocoa/108318-converting-objective-to.html#108318Hope it helps.
14 Nov 2013 by shijo joseph
An extension methods library which could do the equality comparison operations easily
27 Mar 2011 by MarqW
Hi, I've a segment of code which combines the HTML signature from Outlook into an email settings (Code below).However, when the string contains accentuated characters (ie, é), the emails sent through the .NET Mail objects replace them with the "?" character. Is there anyway to retain the...
27 Mar 2011 by Wendelius
Try changing the BodyEncoding[^] property.
11 May 2017 by super_user
I have a grid and this already have data like this Column3 Column4 123 345 1345 235 now i want to add two more columns from textbox to grid e.g if i copy this data in textbox then want to add this data in grid excelcol1 excelcol2 345 abc 1234 abc after adding...
11 May 2017 by Richard MacCutchan
See GridViewRowCollection Class (System.Web.UI.WebControls)[^].
14 Apr 2016 by Member 12460800
I have letters in a string, I would like in result get all possible sets of those letters and convert them to numbers, each set should use all numbers, each number can occur only once in a set. numbers automatically should increment until 9. and output all possible combinations
14 Apr 2016 by xszaboj
I am not sure if this is what you need.But have a look on this problem:[^]and if this is the problem you are facingsolution is here:[^]it is in c#but general alghoritm is described here:Steinhaus Johnson Trotter permutation algorithm explained and implemented in Java...
18 Dec 2016 by NightWizzard
Convert amounts to their spoken equivalents
20 Jun 2013 by brknlpr
I am reading a binary file and one of them is in hexadecimal format in one richtextbox and the other is ascii form in another richtexbox as most of you know in hex editor when you change a code in ascii there is a change on hex form how can I access the other rtb and on which event should I...
20 Jun 2013 by CPallini
The index of the hex pair representing the character at index n is 2*n unless you have introduced separators.
20 Jun 2013 by lukeer
Have the value accessible as a property in some object. Two-way-bind that property to both visualisations. Convert to ASCII or hex nowhere but in the UI part.
27 Sep 2012 by mayaSage
Hello,Anyone has any idea how I can convert an audio file into binary code? Are there any programs I can use?Thank you,MayaSage
27 Sep 2012 by Sergey Alexandrovich Kryukov
The question makes no sense. Everything is "binary", including your original audio file.[EDIT]After OP's (incomplete) clarification:I can only guess that you need to represent the waveform and do some image recognition, but it all depends on what you have and what you want —...
26 Apr 2012 by vis2012
I am at intermediate level in VB.net stuck at doing automized audio converter..... like converting .wav audio to same .wave output(PCM 11.025kHz 16bit mono) for set of files in quicker manner.Can anybody help me?...................
26 Apr 2012 by Bernhard Hiller
NAudio can do alot of conversions, and it comes with source code:http://naudio.codeplex.com/[^]I expect that you can then figure what to do next.
28 Jun 2012 by Tim Corey
This question has a couple good suggestions if you really want to do this:How to convert a Powerpoint Presentation(.ppt) to a HTML5 presentation?[^]What is best, however, all depends on your requirements. For instance, importing your PowerPoint into Prezi might be a good option if you...
4 Aug 2010 by discoguru
Ok so here it is. For my final year project, I am thinking of writing a software which will essentially convert Braille to regular text (and then move on to convert that to audio, irrelevant at the moment).I plan to use easily available hardware like a scanner to import documents written...
4 Aug 2010 by E.F. Nijboer
hmmm... final project... and in the entire time at school you didn't once used google and got your way around with that? ;-POCR is simply recognizing predefined signs and specially with a neural network you can train it in any way you want. Just setup the rules for recognizing a single dot...
8 Oct 2010 by Flatstrap
Hi,I'm trying to convert a byte array across to a readable format (the 2nd column is time but does not have to be cast as time, it could be a cast as a string), what I'm expecting is a series of zero's like in the table below, which would represent...
8 Oct 2010 by Alan N
Hi, I think your expectation is incorrect. Test your assumption, e.g.class Program { static void Main(string[] args) { ShowBytes(0.0F); ShowBytes(1.70141183E+38F); } private static void ShowBytes(Single s) { Byte[] b = BitConverter.GetBytes(s); ...
8 Oct 2010 by Toli Cuturicu
Don't try to convert it to float. Float is lossy, and has rounding errors. Convert it to string, int, uint, long or ulong. You may also keep the bytes, but output them as hex.
14 Oct 2010 by Flatstrap
Thanks for the replies guys...Alan I like your frank response :) And Toli thanks for the advice. For anyone searching this I found a simple solution...private float GetFloat(){byte[] bytes = { 0, 0, 0, 127 }if (bytes[3] == 0) return 0.0f;...* code here*.}This...
19 Jan 2011 by User 7427435
How can I convert ui in the code to List?List b; = new List();MemoryStream c = new MemoryStream();BinaryFormatter g = new BinaryFormatter();g.Serialize(c,b); byte[] ui= c.ToArray();
19 Jan 2011 by Hiren solanki
Try this you can also use byte[] instead of List. Hope it helpsBinaryFormatter bf = new BinaryFormatter();using(Stream ms = new MemoryStream(bytes)) { List myList = (List)bf.Deserialize(ms);}Answer reference HERE[^]
12 Jul 2020 by ||Memo||
Hi guys. I am a new learner of C#. I have an error like this in my code : Severity Code Description Project File Line Suppression State Error CS1503 Argument 2: cannot convert from 'System.Linq.Expressions.Expression>'...
12 Jul 2020 by F-ES Sitecore
I am going to assume TContext is an Entity Framework DbContext and TEntity is an EF Entity. The "Set" method returns a dataset from that table; context.Set().Where(filter).ToList(); So you are getting a list of TContext items from...
10 Mar 2013 by ali_heidari_
find main method wich is first method to start debug !write this line : System.Windows.Forms.Application.Run(new Form1()); // i consider Form1 is your windows form classthis line will make your windows form and will show it !do not forget to add System.Windows.Forms to your project...
10 Mar 2013 by F. Aro
In your Program.cs You Must Run the GUI on another Thread :Just add For Exemple:Console.Write("Running the GUI...\nPress Enter To Abort"); new System.Threading.Thread(()=>{System.Windows.Forms.Application.Run(new ...
10 Mar 2013 by wingzero007
By keeping the same project, you can change the output type:1. Go to the properties of your project (right click on the project in VS).2. In the context menu, choose properties.3. In the window that appears, Select the Application tab (Should be the first one by default).4. Change the...
29 May 2023 by Flo_89
Hello :)For testing purposes I created a C# ConsoleLine application. Now I want to do a GUI and so I choose Project --> Add component and added a "Windows Forms" element. But although there is no Console.WriteLine or something left he always opens the Console and he does not show my Windows...
17 Dec 2015 by Member 11380736
c#Is it possible to convert a ArrayList to a 2D int[1,13] array ?The ArrayList is all numbers like "1111100000000", "0111110000000".And I want them to look like this:int[,] a = { { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, 1, 1,...
17 Dec 2015 by BillWoodruff
You could use Linq to create an int[],[] Array:// requiredusing System.Linq;int[],[] jaggedArray = aList.ToArray().Select(elem => elem.ToString().Select(ch => (int)Char.GetNumericValue(ch)).ToArray()).ToArray()// orint[],[] jaggedArray = aList.ToArray().Select(elem =>...
13 Apr 2015 by jaylisto
i have asp.net c#computing total number of hours.since i will pull the data from a database as a string value, i must convert that string to a datetime which seems not working at all.the value 2015, 4, 12, 22, 28, 20 must be a string ( i will pull the data from a database in a later...
13 Apr 2015 by phil.o
You can try DateTime.Parse() method with all its overloads.DateTime.Parse Method[^]DateTime.TryParse can be an option, too.
13 Apr 2015 by OriginalGriff
Don't.Never store DateTime values in a DB as a string: parse them at point of input (or as close as you can get) because only then can you tell what format the user has input them in, and that they are correct. It's far too late by the time they get to the database as they have lost all user...
23 Jun 2013 by TeacherDean
Good afternoon, I have finished my project and it is working, however. I need to change it to use the binding property of a textbox, instead of assigning the text manually, in my code behind. Below is my Xaml and my code behind. Any advice on how to change my current working project into ...
25 Sep 2012 by Saesee
Hi,I know a lot of subjects on the internet talk about this but I don't find an answer for my problem.I want to convert ImageSource to and from byte[] array.Not Bitmap, Image or others. I want an ImageSource to put in after in a XAML 'Image' tag.For now, I try to convert a byte[]...
25 Sep 2012 by Ashraff Ali Wahab
You text box contains the Base64(http://signature.freresdekor.fr/imgcsharp[^]) representation of the image.What you can do it take the entire text from the textbox, covert them to byte array using the below code and pass it to your converter.byte[] imgStr =...
25 Sep 2012 by sjelen
This is base64 encoded image. To get actual image bytes you need:void btnChargerImage_Click(object sender, RoutedEventArgs e){ if (tbBytes.Text != String.Empty) { // Convert my TextBox in a byte array //byte[] imgStr = new byte[tbBytes.Text.Length]; ...
25 Sep 2012 by Saesee
I Post here the entire solution I have (with your help :) )XAML :> Base64" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="130"/> Image"...
22 Apr 2010 by Alexei Shamov
Convert types, parse and evaluate expressions in runtime, in .NET 2.0
1 Dec 2011 by mgulde
Hello everybody,I am currently dealing with very large bitmaps (32bit, > 1GB) close to the bitmap size limit (~ 32 kpx squared). For file storage reasons, I would like to convert these bitmaps into more suitable formats, e.g. jpg or png. But I have to convert them without loading the whole...
1 Dec 2011 by MuhtarQong
Now, you are using Photoshop. What is the environment at the later stage of your project (.NET or Java or C)?
1 Dec 2011 by #realJSOP
You might want to look into using the FreeImage library or the ImageMajik library. I'm pretty sure one or both of them can handle images that size (GDI+ is the reason you can't do it in native .Net).Google is your friend.
19 Aug 2013 by Ritesh_Singh
A function which returns date in different formats base on the input given
18 Nov 2018 by Member 13722008
is possible to convert? struct sKeyState { bool bPressed; bool bReleased; bool bHeld; }; int m_numKeys; Uint8* m_keyOldState; const Uint8* m_keyNewState; bool m_mouseOldState[5]; bool m_mouseNewState[5]; owncopy( m_keyNewState, m_keyNewState + m_numKeys, m_keyOldState...
18 Nov 2018 by RickZeeland
You can try the free version of this Converter: C++ to C# Converter[^] But be warned, these converters are not suited for complex applications !
29 Mar 2011 by CalicoSkies
C++: Converting an MFC CString to a std::string
2 Apr 2011 by jean Davy
As you use CString, you have access to the CW2A ATL macro, assuming that you work with _UNICODE defined, here it is:CString theCStr;...std::string STDStr( CW2A( theCStr.GetString() ) );which will convert to "system encoding on the user's machine" (thanks Nemanja[^] comment !), if you...
7 Apr 2011 by oleg63
CString m_Name;CT2CA pszName(m_Name);std::string m_NameStd(pszName);Works for me everywhere... :)
30 Oct 2011 by steveb
In UNICODE:CString str = L"Test";std::wstring ws(str);std::string s;s.assign(ws.begin(), ws.end());
1 Nov 2011 by Kaqkk79
How about this (assuming your project is set to Unicode)?CString strMyString=L"Test string";std::string strMyStdAnsiStr = CStringA(strMyString);
13 Nov 2011 by geoyar
I am using CString str(_T("Test"));typedef std::basic_string string_t;string_t resStr(str);It works because the CSting has a cast to LPTCSTR.
1 Dec 2011 by stonexin
LPSTR WideChar2MBCS( const CString& strCS ){ const UINT wLen = strCS.GetLength() + 1; UINT aLen = WideCharToMultiByte(CP_ACP,0,strCS,wLen,NULL,0,NULL,NULL); LPSTR lpa = new char[aLen]; WideCharToMultiByte(CP_ACP,0,strCS,wLen,lpa,aLen,NULL,NULL); return...
13 Jun 2012 by ♥…ЯҠ…♥
Actually i was assigned with a task to identifyWhether the XSD UI file can be converted into C# UI solutionI googled a lot regarding this. But i could not find a dime about this.So it will be more helpful to know if it is applicable to do so or notIf applicable means how?...
13 Jun 2012 by Joshi, Rushikesh
Answer is with you but I don't under stand what was your requirement.That CS file is Object representation of XSD file, so you can create an object using that CS file and if you will serialize that object and will come with XML file then that XML file should be validated against XSD...
8 Mar 2020 by Richard MacCutchan
Sorry, this site does not provide free code conversion.
8 Mar 2020 by KarstenK
You should learn Javascript with some tutorial and solve that problem. Pay attention to clear coding and proper inclusion in the HTML. Use some Javascript supoorting editor with highlighting and code checking like Visual Studio Code. It isnt to...
4 Oct 2021 by Dave Kreskowiak
Nope. This is not a code conversion service. Googling for an answer to your homework and then trying to convert it only increases the amount of work you have to do. Now you have to understand TWO languages and understand precisely what the code...
13 Jul 2014 by addy25
Hey guys,I want to send a test message out to a list of people, however I want the message personalized each time.This ive done however im getting two errors in with my code:1:The best overloaded method match for Mailing.Mailing.SendEmail(string, string,...
13 Jul 2014 by ashok rathod
Change this line withSendEmail(emailSubject, emailText, p.EmailAddress );withSendEmail(emailSubject, emailText,p);this will solve both the above problems
14 Jul 2014 by CHill60
In your SendTestEmail code you have built up a list of people which you step through to generate the personalised message.On your first pass through this you are going to set up that message as "Dear Joe" and call the SendEmail method.But you are passing the list of people into that...
24 May 2013 by Helmi Avicenna
when I just execute this program error notification will be shown: Sub insert() Dim ds As New DataSet Dim xmlFile As XmlReader Dim sql As String Dim id As String Dim company As String Dim datecom As Date Dim time As String ...
24 May 2013 by Ron Beyer
You have an improper SQL statement, if you don't specify data for EVERY column, you must identify the columns you are inserting into.http://www.w3schools.com/sql/sql_insert.asp[^]Otherwise how can the data driver know what columns you are trying to use?
27 Jun 2012 by Sriranganatha
Discussion on which casting to use - static, dynamic or reinterpret
19 Oct 2020 by Member 14969139
Hello, I am running an INSERT SQL statement. The datetimepicker value in windows form needs to be converted to date type since my SQL table has Date data type. Have tried using CDATE() upon form load and upon button click but get an error...
19 Oct 2020 by OriginalGriff
Why? Just use the DateTimePicker.Value property[^] - it's already a DateTime value ready to be passed as a parameter to SQL via your INSERT query: using (SqlConnection con = new SqlConnection(strConnect)) { ...
20 Oct 2021 by Cinchoo
Quick tutorial on converting CSV file to JSON file using Cinchoo ETL
24 Nov 2013 by Johannes Bildstein
A library for colormodels and spaces, correct color-conversions and color-difference calculation.
17 Aug 2011 by radjiv1
Hi all, Anybody know a COM API to automate Adobe PDF to MS Word conversion?Your help is great appreciated, Radjiv
17 Aug 2011 by Sergey Alexandrovich Kryukov
Most difficult part is reading PDF. It's easier to find some SDK in Java or for .NET than in the form of a COM component. Anyway, there is a number of products, mostly commercial ones; try to find one:http://en.lmgtfy.com/?q=PDF+(ActiveX+OR+COM+OR+OCX)[^].Now, you will need to generate...
31 Aug 2011 by hans_coder
Take a look at this one: http://www.convert-in.com/p2wcom.htm
8 May 2014 by Sander Rossel
Hi all,I have a little problem in a SQL Server 2005 computed column.I'm working with a legacy table which stores a date in a field defined as NULLABLE CHAR(10) in the format dd-MM-yyyy.Of course that doesn't work at all... So I want to create a persisted computed column that stores the...
8 May 2014 by OriginalGriff
It makes sense to me! :laugh:This explains it: http://msdn.microsoft.com/en-us/library/ms178091.aspx[^]:CONVERTDeterministic unless one of these conditions exists:Source type is sql_variant.Target type is sql_variant and its source type is nondeterministic.Source or target type is...
12 Mar 2012 by sagar.sethi
i wann to convert to CloudQueueMessage in to string in asp.net C#
12 Mar 2012 by sagar.sethi
CloudQueueMess...
8 Oct 2020 by Richard MacCutchan
There is no direct conversion. Just write the PHP code from the beginning to do whatever it is the Java code is doing. If you need help learning PHP then go to PHP Tutorial[^].
8 Oct 2020 by OriginalGriff
This is not a code conversion service: we are not here to translate code for you. Even if we did, what you would end up with would not be "good code" in the target language – they are based on very different frameworks, and what makes something...
26 Feb 2021 by Member 15085259
Quote: //Declare a variable to store the searched city var city=""; // variable declaration var searchCity = $("#search-city"); var searchButton = $("#search-button"); var clearButton = $("#clear-history"); var currentCity = $("#current-city");...
28 Jul 2014 by kk2014
Hello,I have field in db table which have real datatype in SQL 2005. I want to convert it into time (HH:MM) format and add to another time.ex:0.3 (convert it to 00:30) and want to add into 17:45 so i can get 18:150.45(convert it to 00:45) and want to add into 17:45 so i can get...
28 Jul 2014 by Maciej Los
Please, read my comment to the question.DECLARE @rtime REAL SET @rtime = 0.3SELECT @rtime AS rTime , @rtime *60 AS RealTime, DATEADD(MINUTE , @rtime *60, '2014-07-29 17:45:00') AS NewTimeFor further information, please see: DATEADD[^]
15 Dec 2013 by niloufar.M
Hi. I want to convert a 32 bit frame to 24 bit to pass it to AForge filters. I am doing it using graphics as follow:bitmap bmap = new Bitmap(640, 480 , System.Drawing.Imaging.PixelFormat.Format32bppRgb);clone = new Bitmap(bmap.Width, bmap.Height,...