Click here to Skip to main content
15,899,679 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 

8 May 2023 by ToughDev
Code to set and get current time using the RTCC module on PIC24
4 Jan 2023 by Rodrigo_F_P
I found a FlowDocument conversion that passes to XPS and then puts it in my FixedDocument so I can view and print it, it was working perfectly. But now the images no longer appear in the print what could it be? Thanks in advance for...
29 Aug 2022 by Thorsten Bruning
Converting nearly every type to another type
14 Jun 2022 by Ziya1995
I have read about "Converting .exe into a readable source code".Is it really true? It writes "Yes".Now i am making an app to sell its source code on a marketplace, what stops buyers from turning my .exe app into a readable source code?I mean, i show my app for free and they may buy its...
12 Jan 2022 by Cinchoo
Tip to split large JSON file based on deeply nested array property using Cinchoo ETL
7 Nov 2021 by Cinchoo
Use Cinchoo ETL to deserialize selective XML nodes from large XML file
7 Jun 2021 by Member 12091625
Hi I’m not the best at C but I’m trying to write a C program that basically opens a text file Which contains ascii text and its working fine now I want that it convert ascii data into HEX and save into different file in HEX format kindly help me...
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:...
7 Jun 2021 by Richard MacCutchan
Use the %X format type in your printf statement: printf - C++ Reference[^]
12 May 2021 by CPallini
Here we go... #include int main() { if ( printf("code")
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...
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...
11 Mar 2021 by Richard MacCutchan
Sorry, but this site does not provide code to order. You either write it yourself or use Google to find samples.
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() { ...
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...
3 Mar 2021 by Shao Voon Wong
a variable type should be integer. Integer is a type of number which does not have fractional parts, unlike float. Input of zero works for both the integer and float types because 0 and 0.0 are all the bits of the variable set to zero, so they...
3 Mar 2021 by Peter_in_2780
You have declared a as float. Then you use scanf to store an integer value in that place. An integer 0 has the same bit pattern as a float 0.0, but the integer values for 1 and 2 are nothing like the floats for 1.0 and 2.0 I'll leave you to work...
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...
25 Feb 2021 by Member 14827175
I have a byte array consisted of 266 bytes. I want to break down the array at certain elements, convert those elements into relevant data- a couple of bools, uint, a string and a hex byte, upon conversion I want to actively update a set of...
25 Feb 2021 by Patrice T
Quote: How would I go about it, and what would be the most time efficient way to do it? Assuming the byte array is fixed length fields, butchering a byte array is so basic operations that it is difficult to see a difference of efficiency between...
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...
23 Dec 2020 by Johnny J.
I want to either convert a TBN file[^] to JPG or load it into an Image object from where I can save it to JPG. Unfortunately, the C# Image.FromFile cannot read TBN files despite the fact that they are basically JPGs. Obviously, simply renaming...
23 Dec 2020 by Gerry Schmitz
Quote: Renaming the file to JPG. Try ".jpg"
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], ...
25 May 2020 by Member 14840761
I'm new to this field - but I need to perform a MIDI-to-Wav conversion in C++.Is there a way to know what exactly are the steps involved in MIDI-to-Wav conversion?? I have no idea as of how to start .I cannot find solid sources or research paper...
25 May 2020 by Greg Utas
A .wav file is something you can listen to directly, whereas a MIDI file is more like sheet music. A MIDI file must therefore be performed to generate a .wav file. There are lots of MIDI applications which do this, from external synthesizers to...
24 May 2020 by Richard MacCutchan
Here are a couple of useful references on MIDI files: Standard MIDI file format, updated[^] and Skytopia: Crash course on the standard MIDI specification (SMF)[^].
8 May 2020 by RickZeeland
For an example of .ContinueWith() see: Chaining Tasks by Using Continuation Tasks | Microsoft Docs[^] It should look like this: taskA.ContinueWith(Sub(antecedent) Console.WriteLine("Today is {0}.", antecedent.Result) End Sub) You might...
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 :...
30 Apr 2020 by Member 14631177
Using ffmpeg_streaming module in Python web project with Flask, I try to set up video streaming from online camera into local file. My purpose is saving input stream that comes as HLS-compatible data. To implement this property, I've inserted...
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...
11 Apr 2020 by Hemil Gandhi
I am using below mentioned code to save my file as csv from xls, I studio code works fine but if I host the application it gives error on button click. Error details are mentioned below....plz help Server Error in '/NPCI' Application....
10 Apr 2020 by OriginalGriff
Read the error message - it's pretty clear: failed due to the following error: 80070005 Access is denied. Some part of the path you are trying to save to is not shared to the user that is executing the application with sufficient permission to...
7 Apr 2020 by randomp103
need help trying to figure out how to use the conversionFile command in c++ program to read an input text file ("test.txt") line by line into an array of strings and then convert it from pipe delimited to comma delimited by writing the changed...
7 Apr 2020 by Maciej Los
The simplest way to convert data between csv files is to use OleDB[^]. You can read text file with Schema.ini File (Text File Driver)[^] by specifying delimiter and dump data into another text file using different dilimiter. For connection string...
6 Apr 2020 by OriginalGriff
There is no "conversionFile command in c++" - you will have to write your own, or find code to exactly do what you want. The latter is unlikely, the former is pretty simple. But ... while we are more than willing to help those that are stuck:...
28 Mar 2020 by OriginalGriff
We are not a code conversion service: in addition translating code for one language to one using a totally different framework never gives "good code" in the target language. Instead, find some code that is in the correct language, or learn both...
16 Jan 2020 by Wendelius
Obviously the best way would be to use a date format for the field in the database. This way you could focus on formatting the date properly without any need to do conversions. However, if the format in the database is currently DDMMYY you could perhaps use something like the following to...
16 Jan 2020 by Member 13198628
Hi, Greetings Fellow Programmers. How can i convert this 190118 int to Date > January 01, 2018 using RDLC Report Expressions. Thanks. What I have tried: I've tried using this expression : =Format(Fields!DCDATE.Value,"MM/dd/yyyy") But i Get "#Error" from report viewer.
6 Jan 2020 by Stefan_Lang
How about solving the actual problem instead of trying to convert it? I don't know python, but if I understand this part of the code correctly: n = int(input()) numbers = [int(i) for i in input().split()] edges = [] nodes = [Node(count) for count in range(n + 1)] for i in range(n): nodes[i]...
1 Jan 2020 by OriginalGriff
Even if we provided such a service (which we don't) I'd strongly suggest that you don't do it. When you translate languages, what you end up with isn't "more efficient"; quite the reverse, it's normally less efficient than the original because it isn't designed to work well in that language....
1 Jan 2020 by Richard MacCutchan
1. Learn C++ 2. Write the application in C++. Sorry, but this site does not provide free coding or conversion services.
10 Jul 2019 by Brett Goodman
There is a new tool that makes it pretty simple - see wisejwebapps.com
12 Apr 2019 by KAID6IX
The method I need to create is: public static String IntToBinary(int inputInt). This method should take as input a single int, convert this int to a binary version of itself (e.g. 3 becomes “11”) and output that binary number as a string. I have written some code but it honestly doesn't do...
12 Apr 2019 by OriginalGriff
There are several ways to do this in Java: 1) Use the framework: Java lang.Integer.toBinaryString() method - GeeksforGeeks[^] 2) Do it yourself. The first is trivial, and probably not allowed for your homework! The second means you need to read the question more carefully. It specifically asks...
18 Mar 2019 by Member 14186325
For convert only: for %%i in (.\mid\*.mif) do ( for %%n in (POINT LINESTRING POLYGON MULTIPOLYGON MULTIPOINT MULTILINESTRING) do ( "ogr2ogr" -skipfailures .\shp\%%~ni_%%n.shp %%i -nlt "%%n" -where "OGR_GEOMETRY='%%n'" ) ) And for add geometry to one shapefile by geometry type: for %%g in...
3 Mar 2019 by Member 12045288
I have to convert .doc file byte array to html string using C# without using interop dll and Ms office installed is there any way to do that? What I have tried: I have gone multiple libraries but all are paid and I didn't find any library which does the work in memory stream without saving...
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[^]
3 Mar 2019 by Mehdi Gholam
Read this : c# - Convert from Word document to HTML - Stack Overflow[^]
29 Jan 2019 by User 11060979
I'm not sure what your problem exactly is, a.) OpenGL? b.) Calculations? From your question I see you recognized how to come from 3D- XYZ Space to xy(Y) space. Anyway: Here you will find a set of formulas from convert from Spectrum to XYZ on from there to xyY, sRGB, etc. and vice versa (of...
29 Jan 2019 by lock&_lock
I'm working with OpenGL and C. I have RGB input in openGL and need to do computation in CIE XYZ color space. So I do conversion following this color conversion rules. |X| |0.412453 0.357580 0.180423 | |R| |Y| = |0.212671 0.715160 0.072169 |.|G| |Z| |0.019334 0.119193 0.950227 | |B| ...
27 Jan 2019 by Richard MacCutchan
See sRGB - Wikipedia[^].
24 Jan 2019 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.
22 Jan 2019 by Richard Deeming
That code is reading the contents of a file which you have previously opened. You will presumably have a previous line that looks something like: Open EncryptedFilePath For Input As #EncryptedFileNumber File IO is much easier in .NET - the System.IO namespace[^] gives you all the tools you...
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:...
19 Nov 2018 by Richard MacCutchan
You can use the String.Split Method (System) | Microsoft Docs[^] to separate the three parts. You may need an initial check to see which control characters are being used.
19 Nov 2018 by Member 13621621
So I'm still getting use to VB.NET as I haven't had much time to play with it, and haven't done alot of coding since back in the vb6 days. Anyways, I'm working on a small personal project for me and my business partner to handle certain customer information. Basically it just has a few text...
29 Oct 2018 by OriginalGriff
This depend son what you want to do: manually via an app, or programatically - the two are different. Via an app: Open it in your new, shiny image editing program (or Paint, if that's what you have available) Use "Save as" (often hotkeyed to F12) and select TIFF as the output format. Give it a...
29 Oct 2018 by Sarita B Patil
I have a image with .tiff format in older version.Now i want to convert that image in Newer Version. What I have tried: I have searched on google but all are giving conversion from tiff to pdf or jpeg format or vice versa. But I need conversion from tiff to tiff but with a newer version.
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.
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...
4 Oct 2018 by Member 13932087
Currently, I have made an application related to thermal printer which is connected thru USB using MFC in VC++. Now, I need to convert that code in java code, which I need to run in Android Studio 3.2 for Android Application 5.0 (Lollipop). So, is their any conversion software is available for...
4 Oct 2018 by OriginalGriff
No, there probably isn't anything which will do what you want - and even if there was, the code you would end up with would not be "good" java code: MFC and the Java machine are not a good fit, and it wouldn't use Java the language or the Java environment well. Your best solution is to use the...
27 Sep 2018 by OriginalGriff
That's possibly more complicated that you think: a string is an array of characters (or it can be thought of, and treated as such) but a char in .NET is not equivalent to a byte, it is a Unicode value and is thus a 16 bit value, unlike byte which is an 8 bit value. There are ways to convert it,...
27 Sep 2018 by LRazvan96
Hello, I want to convert a data type in a byte address. + And i have to escape that "0x" from my data. And the data type will be as string(i think) but it may be int or whatever. I don't know what to write in code. Thanks! For example: What I have tried: public void blabla(string...
31 Aug 2018 by User 13886544
How can I delete a question that serves no purpose to either myself or those who continually choose to berate me and act like children...pardon me...not children...just assholes. What I have tried: Posted this question in a forum.
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...
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.
28 Jun 2018 by Member 13890789
Hello all, I have this working code in C++,but I am working on a new prototype with basically same circuit but different processor, for which I need the program in C. I do have a API references and examples in C for the processor , but converting a program is definitely not included in it....
28 Jun 2018 by Richard MacCutchan
Classes do not exist in C, so all the class methods must be put into inline functions. Class variables need to be declared wherever they are needed. Unless you are reasonably proficient at both languages this could be a difficult task. You could also try convert c to c - Google Search[^] as...
1 Jun 2018 by oleg63
Hi,How can I convert 2D array of C# objects(saMatrix) to 2D double array (dArray)?Thanks.Int32 iDim = 3;object saMatrix = null;- saMatrix {object[3, 3]} object {object[,]} [0, 0] 11.0 object {double} [0, 1] 12.0 object {double} [0, 2] 13.0 object {double} [1,...
6 May 2018 by Richard MacCutchan
You can go to The Java™ Tutorials[^] to learn some of the things you missed. Or, better still, go and talk to your teacher and ask for the missing notes.
6 May 2018 by Member 13814014
ı spent 2 hours yet i cant solve this question i missed a week of class becouse of illness so i am confused about the question very much please help me Ticket Reservation System You are a computer engineer working in the IT department of Biletix, a company of online reservation. You are asked...
6 May 2018 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action. Try it yourself, you may find it is...
24 Apr 2018 by Yisrael Lax
Library that provides custom casting functionality from one type to another between properties with disparate names and types
16 Apr 2018 by Shah Parth P
I need it for the database uploading purpose only. I am not a data entry operator.
16 Apr 2018 by Shah Parth P
I have one Word File containing MCQs and I want to convert them into Excel File. I want my excel file like this: RAW-> A B C D E F DATA->Question A B C D Correct Answer. Please Help me with some tools or technique. What I have tried: I tried online tools but it's not giving...
16 Apr 2018 by OriginalGriff
What does this have to do with development? Ignoring that we have no idea how the data is organised in your Word file - and that would be critical to any computer based approach - we aren't here to write code for you; this is not a code-to-order service. We are here to help developers with...
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() :...
1 Apr 2018 by The_Unknown_Member
Why do I need explicit cast in this case: class Program { static void Main() { bool boolVal = true; Animal a = boolVal ? new Dog() : new Cat(); } } class Animal { } class Dog : Animal { } class Cat : Animal { } At this...
31 Mar 2018 by Mehdi Gholam
Most likely a shortcoming of the compiler processor, i.e. the compiler takes one side of the ':' as the output type (probably the left) and assumes the second (right) must match otherwise throws and error without checking the inheritance tree in the case of Dog and Cat and the left side of the...
27 Mar 2018 by Member 13750892
The best solution is install 64 bit software at 64 bit and 32 bit software at 32 bit windows.
14 Mar 2018 by Maciej Los
Quote: I would get an advantage of LINQ: nice looking code and better performance. I'm not sure that my solution meets your criteria, but... I would change NoNonsenseCSV2DataTable(CSVfile As String) procedure into function. See: Public Function NoNonsenseCSV2DataTable(CSVfile As String) As...
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) ...
6 Mar 2018 by Sridhar0203
Hi, I just want to know is there any tool or online website to convert vbscript code into C#.
27 Feb 2018 by #realJSOP
Spell it out! No! Wait!
22 Feb 2018 by VICK
HI All,After googling alot, I have just landed on CP in search of some guidance to resolve my issue.We have been saving time in our table like 11:33 AM in table as 1133.Now i want to get it back in proper time format i.e. in AM PM format to use in our application.Can any body...
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
21 Jan 2018 by KarstenK
You must understand the so called bit shift operator (>>) which moves the bits of the input to lower side. So a repeating call moves all bits out of the memory. This operator moves the bits of the memory which is interpreted as some variable. To really understand it you must understand that all...
18 Dec 2017 by RamdhanSTO
so i already check it and its .AVC thanks broo
17 Nov 2017 by gacar
Converted Kenneth Haugland's solution to vb.net for vb.net users. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim input As String = "222222222102222110111112220111000220011110000011112222101111222011" Dim Base As String = "012" ...
13 Nov 2017 by RamdhanSTO
hi im ramdhanSTO so i have this project to convert CCTV video using VS2013, the format is *.dat and i want to convert it to *.mp4, can u guys help me out? its mean a lot, thanks. What I have tried: basically, i tried this code from this that code is convert *.avi to *.flv, and i edit it out...
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,...
10 Nov 2017 by GRCook
I have a complex project that utilizes various inherited forms to reference different tables from a strongly-typed dataset (InventoryDataSet). The base form contains all of the common controls and components, and each inherited form fills in the details applicable to the datatable it maintains....
7 Nov 2017 by gacar
I want convert base 3 biginteger value to base 10, and convert base 3 again. How can i do? I am using this code for that. But i am getting wrong result. This code working for short values eg("22222222210222211011111222") What I have tried: Private Sub Button1_Click(sender As Object, e As...
7 Nov 2017 by Kenneth Haugland
Have you heard of Horner's method[^]? It can remove the need to take the power of numbers, and you generally don't want to do that, since it is very slow. The call and check code is: string input = "22222222210222211011111222011100022001111"; string Base = "012"; ...
6 Nov 2017 by gacar
I found this solution and working now. Thanks to Kornfeld Eliyahu Peter for contributions. ( On-What-Base-Do-You-Stand) Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim BigValue As BigInteger =...
5 Nov 2017 by Patrice T
Your code is a mess of cascading conversions, you need to check that every conversion works as expected, use the debugger to do so. BigValue and TenBase are BigInteger, and you want TenBase = ToTenBase(BigValue, 3) see what you do with ToTenBase ToTenBase does BigValue as BigInteger => ToString...
4 Nov 2017 by OriginalGriff
Why are you using strings? That's very wasteful and inefficient. Instead, use the BigInteger Divide and Modulus operations to extract each digit one at a time, and include it in a running total: set powerOf = 1 set total = 0 while input not zero extract lowest digit using modulus 10 ...