Click here to Skip to main content
15,899,124 members
Everything / Conversion

Conversion

conversion

Great Reads

by NightWizzard
Convert amounts to their spoken equivalents
by Yisrael Lax
Library that provides custom casting functionality from one type to another between properties with disparate names and types
by ToughDev
Code to set and get current time using the RTCC module on PIC24
by Johannes Bildstein
A library for colormodels and spaces, correct color-conversions and color-difference calculation.

Latest Articles

by ToughDev
Code to set and get current time using the RTCC module on PIC24
by Thorsten Bruning
Converting nearly every type to another type
by Cinchoo
Tip to split large JSON file based on deeply nested array property using Cinchoo ETL
by Cinchoo
Use Cinchoo ETL to deserialize selective XML nodes from large XML file

All Articles

Sort by Updated

Conversion 

27 Feb 2018 by #realJSOP
Spell it out! No! Wait!
6 Sep 2012 by __TR__
VB.Net to C# Converter[^]Good way to convert VB.Net to C#?[^]More links here[^]
6 Feb 2013 by Aarti Meswania
this way..declare @AfterPoint varchar(3); set @Afterpoint=2;declare @val numeric(18,9); set @val=1234.89535656;declare @SQLQuery varchar(max); Set @SQLQuery = 'select cast(' + convert(varchar(100), @val) + ' as numeric(18,' + @AfterPoint + '))';exec(@SQLQuery);other solution...
29 Oct 2013 by Abdul Saeed khan
I have Date time input field from where I am taking date and converting it to another format, my code for thattry { DateTime dt = dtiFrom.Value.Date; string format = "DD-MM-YYYY"; // Use this format MessageBox.Show(dt.ToString(format)); // here its shows...
30 Oct 2013 by Abdul Saeed khan
Your format should be as follows:string format = "dd-MM-yyyy";Casing is important with string formatting, you may think it strange that the month uses upper-case, but this is because lower case m and mm is used to represent minutes.Note that the reason your output displays DD and YYYY...
21 Oct 2018 by Abhijeet Bhurke
I have a c++ program named SBLIB DLL Ver 1.0 for Win32 I would like to convert it to 64 bit. I tried to convert it using VS 2008, but not working. I have the below codes, can any one help me. I want to use this DLL in 64 bit OS. Currently this dll can work in all 32 bit OS Source files as...
13 Jan 2013 by Abhinav S
This error may actually have nothing to do with the size of the excel. One of the rows after row 20000 may have some data that may be of a different type. It will be worth doing a quick data validation of the Excel file.
18 Mar 2015 by Abhinav S
There is no easy way to convert a form application to a web application.The UI will be new, even if you use the same business logic.
9 Nov 2015 by Abhinav S
Trycode for converting avi to mp4[^]Convert .avi to .mp4 using c#[^]Media files conversion using C#[^]
22 Oct 2012 by ad_robot
Hi Everyone, I'm trying to interpret some data from an embedded sensor device into a C++ program. The device uses a numerical format called 1.15 fractional format. This means it transmits 2 hex bytes into a value rangle of ~1
29 Oct 2014 by Adrian Fatol
You can read the pdf contents of a file using for example some pdf to text or pdf to html library (eg class.pdf2text.php[^]). Then you save those contents to a doc file with something like XHTML2RTF[^]or you can try this High-quality PDF to Word conversion in PHP?[^]
18 Mar 2015 by Afzaal Ahmad Zeeshan
Before I answer your question, I want to question you... Do you have any idea what web development is, and where does web application run? If you're having a Windows-based application; and you've also mentioned .NET 2.0. Chances are that you're also using some of the .NET-based assemblies to...
12 Jan 2016 by AgarwalPriyanka, ErGauravSharma
Challenges faced in data migration testing
28 Nov 2014 by Ainy Mughal
Try this.TimeSpan time = TimeSpan.Parse(timeString)
15 Mar 2013 by Alexandre Bencz
Hi :)I'm try to convert a simple code of C# to C++/CLI, but when I try to build the converted code, i got this erros:Quote:1>------ Build started: Project: Compiler2, Configuration: Debug Win32 ------1> Source.cpp1>Source.cpp(21): error C2143: syntax error : missing ';' before...
6 Feb 2013 by Ali_100
Set FormattedValue = CASE When rg.ReferredFieldType = 'NUM' Then CAST(#PointedMslValues.Value AS NUMERIC(18,cAST(rg.ReferredDecimalPoints) ) --more...
11 Oct 2016 by Ali_100
I am in trouble, tried many times but could succeed , foreach (var tempitem in mbsRateTempList) { foreach (var Saveditem in mbsSavedRecordList) { if (tempitem.MbsSecurityId == Saveditem.MbsSecurityId && tempitem.CouponRate ==...
11 Oct 2016 by Ali_100
I am sorry, I was trying to convert in to lambda or linq but could n't able to do.FYI:I did it byvar query = (from x in mbsRateTempList from y in mbsSavedRecordList .Where(y => y.CouponRate == x.CouponRate && x.Price == y.Price ...
15 Aug 2020 by Alpit_Abrol
import RPi.GPIO as GPIO class keypad(): def __init__(self, columnCount = 3): GPIO.setmode(GPIO.BOARD) # CONSTANTS if columnCount is 3: self.KEYPAD = [ [1,2,3], [4,5,6], ...
3 Mar 2021 by Amaan Ahmad
#include int main() { float a, b; printf("Type 0 to convert km to miles\nType 1 to convert kg to pounds\nType 2 to convert cm to inches\n"); scanf("%d", &a); if (a == 0) { printf("Enter km to convert in...
19 Jan 2014 by Amruth Raj
I am trying to convert an image to SVG File. For this I am using color_trace_multi.exe which traces multiple color images using potrace. The command line argument which I am using iscolor_trace_multi.exe -i src D:\Demo\temp.png -c 16When I run the above code, I am getting an error...
6 Sep 2012 by Amund Gjersøe
According to Microsoft you should be able to use BmpBitmapDecoder (or the decoder of choice). I've tested, and it worked:Stream bmpStream = new System.IO.FileStream("smiley.bmp", FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);BmpBitmapDecoder bmpDecoder = new...
7 Jul 2015 by Andy Lanng
Wow! I am sooo good to you!There is no Bengali calendar in .Net. I think this is an oversight so I made one!!!It's a rough cut but it worksI know, right: I'm frickin' AWESOME!usage:var thisDate = DateTime.Now;BengaliCalendar bCal = new...
12 Aug 2015 by Andy Lanng
See solution one.Interfaces work a little differently. They are not an object assigned into memory, but just pointers to an existing objects memory.Take a look at this: private static void Main() { Employee employee1 = new Employee(); ...
23 Sep 2013 by Aniket Yadav
UseFormat$(YourDate, "d-mmm-yyyy") for 2-Aug-2013OrFormat$(YourDate, "dd-mmm-yyyy") for 02-Aug-2013
6 Jul 2015 by Anisuzzaman Sumon
I have searched Google a little bit to find out the logic of converting Gregorian date to Bengali date.However so far I searched I found several software of this kind but I need the logic or calculation behind this.Will someone be enough kind to share me some sort of resources of implementing...
21 Mar 2016 by AnvilRanger
Of course it will throw an exception. You have white space between each digit in the string. First remove the white space then use the int.TryParse to do your convertions.
14 Mar 2018 by ATeDe
Sub NoNonsenseCSV2DataTable(CSVfile As String) 'A,B,C,D,E '00001,4,1,2,3560 '00002,4,12,1,2000 '00003,1,1,2,4500 '00004,4,12,1,2538.63 '00005,1,1,2,3400 '00006,1,1,2,2996.48 Dim dTable As New DataTable Using reader As New StreamReader(CSVfile) ...
21 Jan 2018 by Avni Salhotra
#include // library of functions for this chip #include // library containing printf() function #include "configureUSART.h" // library for configureUSART(baud) #include "configuration_bits.h" void printCharAsBinary(unsigned char number); void WaitOneSecond(void);...
21 Jan 2018 by Avni Salhotra
I have solved this thank you all for help
18 Jan 2013 by awal89
how can I modify this code to php code usedThis example code,,,Thanks...
10 Oct 2012 by bbirajdar
Don't be lazy. Grow up. How long will you be dependent on others just to search on google ?I got this links in 10...
21 Sep 2015 by Ben Denger
Hello, im able to Convert a Doc file to PDF. But the Way i am doing it is very slow, which makes it nearly unusable.Im doing it the following way: wordDocument = appWord.Documents.Open(path, ReadOnly: false, Visible: false); ...
3 Mar 2014 by BillWoodruff
Yes, you can sort the values in an Enum for display in a ComboBox alpha-numerically, or any other way you want:// requires Linq// preserve the current ComboBox selectionprivate V currentVName;private void Form1_Load(object sender, EventArgs e){ var vAry =...
11 Dec 2015 by BillWoodruff
Looked at from a "different" point of view, I see this as asking the question: "how can I have a .NET object that will behave like this: it will have a counter that is sequential, and is unique for all instances of the object; it will embody a DateTime, and it will 'do the right thing' to...
1 Apr 2018 by BillWoodruff
When you specify the return Type, and the ternary values that may be returned are of different Types, the compiler must check if a Type conversion is possible. These work because the compiler can determine there is a conversion possible: bool boolVal = true; Animal a1 = boolVal ? new Dog() :...
26 Feb 2021 by BillWoodruff
imho: using a bunch of bytes to store information that requires parsing to interpret is, generally, a bad idea. While you can simulate "global" variables in C# using static Fields, or static Properties, or certain Types declared as Const...
16 Oct 2015 by binaryoffset
Hello. I am currently trying to copy an array of ‘double’ values into an array of “unsigned char”. I have checked my code to know that the expected values in 2 dimensional double arrays, sig_out_imageR, sig_out_imageG and sig_out_imageB are correct (values were written to a file).I am...
18 Jul 2014 by Bjørn
A custom Json state machine parser, viewer and serializer for Json data
4 Sep 2015 by bkelly13
I work on classified systems and we need to copy some source code to an unclassified machine. Using any media other than printed copy is forbidden (no cdrom, thumb drive, etc). I tried PDFXchange and it was out right terrible. I had copied the text from Visual Studio, converted it all to an...
29 Apr 2013 by bobb024
Hello,looking for a way to convert "10/10.00" to decimal.
29 Apr 2013 by bobb024
public static decimal FractionToDouble(string fraction) { decimal result; if (decimal.TryParse(fraction, out result)) { return result; } string[] split = fraction.Split(new char[] { ' ', '/' }); ...
10 Jul 2019 by Brett Goodman
There is a new tool that makes it pretty simple - see wisejwebapps.com
15 Jul 2014 by C3D1
Hey Guys,i'm trying to convert a COLORREF to a Hex-CString and then back from Hex-CString into COLORREF and i've run into a small problem.Here some Code for Converting from COLORREF to a CString (Hexadecimal):This part isn't the problem.COLORREF crefColor = RGB(128,0,0);DWORD...
15 Jul 2014 by C3D1
Big thanks to Jochen Arndt for his hint.I updated my code for converting from Hexadecimal CString to COLORREF to this:CString sValue(_T("#800000"));LPCTSTR pszTmp = sValue;pszTmp++; // cut the #LPTSTR pStop;INT nTmp = _tcstol(pszTmp, &pStop, 16);INT nR = (nTmp & 0xFF0000) >>...
1 Nov 2012 by CafedeJamaica
ASP .Net will work with C#, if you read up on how to create a class in C# you can reuse all the code you have written in the project you are trying to convert to ASP .NET.
2 Nov 2012 by CafedeJamaica
You can do this using certificates, if you create your own certificates using a certification authority or by using visual studio(link following) http://msdn.microsoft.com/en-us/library/ms733813(v=vs.100).aspx[^]then you can use the following code to do your encryptionCryptography...
3 Feb 2014 by caseywalls1
MailMigra for Incredimail is fabulous software to convert Incredimail to Windows Mail. As I had used it so I can safely vouch for it & recommend it to others to try also. Open the site to know more about it http://www.mailmigra.com/incredimail/windows-live-mail.html.
10 Jul 2013 by CDCC8
Hi everyone,I have a file with a Base64 string that i have to decode into numbers, and i don't know how to do this in C#.I know how to convert to binary,using Convert.FromBase64String. However i've got to obtain numbers like coordenates X/Y to plot this into a graph, because this is a...
22 Apr 2013 by CHill60
Okay ... Start with getting rid of the GoTo's and labels ... Use If ... End If ... in your VBA if you have to.Next ... I think VBA allows "default" properties on controls that you can't get away with in VB.NET Examples.cobCurrent.Clear()should be cobCurrent.Items.Clear() and...
3 Jul 2014 by CHill60
Here is one technique...1. Download a free PDF creator e.g. http://www.pdfforge.org/pdfcreator[^] or http://www.cutepdf.com/[^] ... there are others2. If your free PDF creator doesn't hook to the Explorer context menu (right-click on a file to check) then set your default printer to...
29 Apr 2021 by CHill60
As Richard has pointed out - you need to translate the document not just change the encoding. Google Translate is available as an API - Cloud Translation Google Cloud[^] but it is not free (nor particularly expensive) There are other similar...
20 Jul 2015 by Chris Copeland
Hi all,How would one accomplish a type conversion utility for the Compact Framework 2.0 (.NET 3.5)? I'm trying to implement some bespoke structures which mimic some of the standard .NET Framework classes (for instance, the Padding struct).I sense that type conversion is supported, given...
24 Feb 2015 by ChrisCreateBoss
I'm using WinForms. I want to show the progress of a video conversion in a progressBar ,I'm currently using the NReco.VideoConverter, I've tried FFLib.Encoder too, it has an EventHandler named Progress, but I can't make it work with the progressBar.I've tried progressBar1.Value +=...
7 Nov 2021 by Cinchoo
Use Cinchoo ETL to deserialize selective XML nodes from large XML file
12 Jan 2022 by Cinchoo
Tip to split large JSON file based on deeply nested array property using Cinchoo ETL
6 Sep 2012 by Code-Hunt
Hi allPlease tell me tool for converting vb.net code to C# code..i want to convert my project to c#
30 Nov 2012 by codeninja-C#
Hi,You can easily do this task with c# without converting perl script. At first understand the logic of above code.Your output shows that it generate all the possibilities of color,car,time which is based on your test cases and text.txt file.--SJ
6 Dec 2012 by codeninja-C#
string hex = "0x333366";int r = Convert.ToInt32(hex.Substring(2,2),16);int g = Convert.ToInt32(hex.Substring(4,2),16);int p = Convert.ToInt32(hex.Substring(6,2),16);--SJ
24 Sep 2012 by CPallini
Google is your friend.See, for instance, converting numbers in to words C#[^] at stackoverflow.
28 Aug 2013 by CPallini
You may easily transform your input string into a CDate function accepted one, just using the Mid function (optionally you may use also Left and Right) and the string concatenation operator.
3 Oct 2014 by CPallini
As already suggest, you'd better try to rewrite it from scratch (and, you know, C is a 'Microsoft language' too). In any case how could we help you without know without knowing what 'StringPush', 'VarPush', .. do?Morevover it doesn't look a very robust piece of code (at least judging by the...
11 Aug 2015 by CPallini
As already noted by Pascal-78, probably your DLL is not UNICODE. Depending on your needs you have to perform a conversion (Have a look at "WideCharToMultiByte function"[^]).
29 May 2017 by CPallini
Of course it is possible. However it couldn't be an automatic process and, depending on the application complexity (you said nothing about) it could be time consuming.
28 Jun 2018 by CPallini
Quote: I am not a pro at either C nor C++ . I was able to convet the basic protocols which are just a very small part of the code Then change processor. Seriously. Unless it is a very trivial code, you have to be proficient in both C++ and C in order to accomplish the task.
3 Mar 2021 by CPallini
In addition to other solutions: Don't use float unless you have very good reason for. Use double instead. Your code should handle incorrect user choice. The cm to inch formula in your code is wrong. Try #include int main() { ...
12 May 2021 by CPallini
Here we go... #include int main() { if ( printf("code")
7 Jun 2021 by CPallini
You know, there is not an 'hexadecimal format' for a file. However, there could be a file containing the hexadecimal representation of binary (as well ASCII) data. To obtain such a file replace (as already suggested by Richard) Quote:...
17 Dec 2012 by cyberexel
Hi,I have a Huawei modem model E220 which I have found out stores information in a database (.mdb). I would like to read the sms from the database but I have discovered the SMS information is stored in OLE Object (Long binary data) format. Basically this database has all fields in this OLE...
2 Mar 2014 by dan!sh
I don't think you are using right object for the job. Order of elements in an Enum should be governed by integer value it holds and not by the text. Image a days of week enum that is displayed alphabetically on screen.I think what you need here is a sorted list or dictionary.
1 Mar 2015 by Daniel 11317535
I want to know what are good libraries for converting tiff to pdf in Java. Any suggestion Closed off stack overflow questionhttp://stackoverflow.com/questions/356550/a-good-library-for-converting-pdf-to-tiff[^]
21 Oct 2018 by Daniel Pfeffer
15 seconds of Google found this: General Porting Guidelines | Microsoft Docs[^] Which discusses issues in conversion of 32-bit Windows code to 64-bit. See also the subjects in the menu on the left of the screen.
19 Jan 2015 by Dave Kreskowiak
More than likely, there isn't one. You're going to have to do the vast majority of the conversion by hand.
21 Sep 2015 by Dave Kreskowiak
There is no way to speed that up. The operation is completely out of your control.You can TRY other PDF libraries, such as CutePDF and "printing" the word document to a PDF file, but you'll likely end up with the same problem.
13 Nov 2017 by Dave Kreskowiak
.DAT is not a format. It's a generic file extension that can mean anything at all that just stands for DATA. You have to understand the arrangement, or format if you will, of the bytes in the file. You need the documentation on the format of the file whatever device you have wrote. Without that,...
29 Aug 2018 by Dave Kreskowiak
Your question shows a ton of naivety. All files are already "binary". So you're going to have to explain what you mean by this. Are you looking to show the content in a hex-editor format, with the offset and byte value at that offset along with a text representation of that byte? .BIN files...
11 Apr 2020 by Dave Kreskowiak
What nobody has mentioned yet is that you cannot use Office Interop, in your case Excel, in a web application. It may work fine on your machine, but in a multi-user app and deployed to a web server, Office is not supported. On the "Access...
24 Feb 2021 by Dave Kreskowiak
There's no such thing as a "global" variable in C#, or .NET really. You're not going to "detect" anything happening to a variable. However, you can store what you consider "global" data in Properties in a static class. The property get/set code...
10 Jun 2014 by David Belknap
I'm able to convert the PK line but not the following in my VS 2010 project. I've looked at expression trees, lambdas, etc. but haven't gotten anything to work yet. The automated tools I've found online don't convert it correctly. Any help would be appreciated.public virtual void...
10 Jun 2014 by David Belknap
This solution looked promising but after I changed the == to a single =, then I got the error"'t' is already declared as a type parameter of this method."The t inside the Function(t) is highlighted as the error.if I change the t to another letter then I get the error"Statement lambdas...
10 Jun 2014 by David Belknap
I gave up and kept it in C# in a separate project and called it from a VB project
1 Nov 2012 by Deenuji
we can convert C#.net coding to Asp.net?if we can means how????
1 Nov 2012 by Deenuji
I need code for string to binary conversion in asp.net??? then i need code as well as encryption and decryption in asp.net???? pls help me guys???
1 Nov 2012 by Deenuji
How to convert text to binary and octal and hexadecimal in asp.net???? actually i want to generate some secret key and public key using given upload text????
1 Nov 2012 by Deenuji
i want to generate public key and secret key based on any algorithm??? but those generation is based on our uploading file(text)?
1 Nov 2012 by Deenuji
1st write this function on your page:public static string ConvertToBin(string asciiString) { StringBuilder sb = new StringBuilder(); foreach (string letter in asciiString.Select(c => Convert.ToString(c, 8))) { sb.Append(letter); } ...
6 Dec 2012 by Deenuji
Actually i'm using color extender to pick the color in asp.net...but while i'm picking the color it generate the hex decimal values....but i need only rgb values...Pls any one guide me....
7 Dec 2012 by Deenuji
Solution:Write this coding in button or whatever... System.Drawing.Color MyColor = System.Drawing.Color.FromArgb(val);
12 Dec 2012 by Deenuji
Actually i using color extender tool to generate the colors....while i'm picking the colors, this tools return only hexadecimal values ...but i need to generate color name too...How to generate color name from this hex or RGB values????
22 Jan 2019 by Dinesh Kumar Dora
Hello friends i recently converted my VB6 project to VB.net. I am getting the following errors in the converted VB.net project: 'UPGRADE_ISSUE: Constant vbUnicode was not upgraded. Click for more:...
28 Aug 2013 by dinesh_redhawk
How to convert a string [28Aug2013] to Date type [28-Aug-2013]I tried using CDate conversion func, but failed as it can only convert strings in format [dd/mmm/yyyy] OR [dd-mmm-yyyy] only. i.e only date formatted strings.Now the problem here is i can't change the string format from...
29 Apr 2021 by Dr. Bhanu Murthy
I have text file processed output from Cpus programs. This text file I want to convert to local languages say telugu, hindi etc., Is there a solution for this. What I have tried: I tried in cplus program itself using wchar_t and wstring, but...
23 Jun 2014 by Ehsan.MA
Information on how to use UnitConversionLib in C# for changing units and quantities
14 Jan 2013 by Emi_pretty
i asked just logic not code , brother.. if you are thinking that i got any assignment at class then you are wrong. i have made it in 2 ways. i can send you complete code .ok. just tell me how can i do iit through arrays, if you can
22 Jan 2015 by Emiliano Musso
A quick method to convert a CSV file in XML
28 Oct 2013 by Eren001
hello everyone , i'm new to programming could some one help me to find a project or a code to convert a midi file to music sheet ( it would be better if in vb.net) ? i really appreciate any help
7 Sep 2012 by Espen Harlinn
Have a look at the free .Net IDE SharpDevelop[^] - it performs code conversion pretty well.Best regardsEspen Harlinn
8 May 2020 by evry1falls
I'm working on a VB.Net project. Using Google Drive Api v3.0. A part of my assignment is to get the Webbrowser Control in the project to make all the calls to the Api, not the Windows default browser. I found this code here :...
3 Mar 2019 by F-ES Sitecore
You can try DocX. Not sure if it does .doc files or only .docx ones. NuGet Gallery | DocX 1.3.0[^]
25 Jan 2016 by Feverbird
Hey there my beloved Community,i'm currently trying to convert any file into a textfile consisting of it's own bits and bytes (e.g. any exe file to a string of 100010010010010010101...) and then reconverting them to a working file.the conversion to a string seems to work, but somehow i...