Click here to Skip to main content
15,895,667 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 Updated

Convert 

U 30 Apr 2024 by Xavier Junqué i de Fortuny
Converts MathML coded string to/from plain text string
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...
7 Mar 2023 by vor_zakon_developer
Performing the conversion from XML to Java classes using JAXB statement.But I am facing some problems. That is, it can successfully convert the values in the attributes in the XML tag.But I can't translate the xml tag's own values. For example I...
24 Feb 2023 by Member 15002990
#read the list of words from the file file1=open("C:/Users/user/Downloads/EnglishWords4Letters.txt",'r') #store the list of words in a python list words_list=list(file1.read().split('\n')) #take phone number as input from user number=input('Enter...
3 Dec 2022 by moshaveran
How Can I extract text from a rectangle area of a PDF ? my pdf is searchable. What I have tried: I used to convert my PDF into a IMAGE and select the desired area by dragging a rectangle and convert it to text by using Tesseract OCR. But now...
3 Dec 2022 by Dave Kreskowiak
How about you Google for "C# iTextSharp Extract text from PDF example".
2 Dec 2022 by moshaveran
HI Friends I have code that returns the text in the image by Tesseract OCR. But the accuracy of the resulting text is not acceptable at all! I will attach the my photo. return text is :'EPVWUAG2LOSCBPZAANIZZ10 1' Please guide me how to get the...
2 Dec 2022 by Dave Kreskowiak
More accurately? Well, the source image you posted is pretty bad, so I doubt you're going to get acceptable accuracy with ANY OCR package. Your only options are to try various OCR packages to see if they can do a better job, or write your own...
14 Nov 2022 by Member 15758581
I'm currently coding an FileExplorer but I encountered a small problem. I wanted to set the start location to C:\Users\"UserName" so that the user directly gets his main directorys... Problem here is, I can't get the code to work, because...
14 Nov 2022 by Alan N
For me it just works and with a hard coded directory path I get an exact clone of the RH panel of File Explorer. However I can't understand your compiler error. I'd suggest that you clean the solution, delete the content of that method and type...
13 Nov 2022 by OriginalGriff
Why are you using a WebBrowser to code a file explorer? The URL property of a WebBrowser control is a Uri class instance, not a string: WebBrowser.Url Property (System.Windows.Forms) | Microsoft Learn[^] You can construct a Uri using a...
27 Oct 2022 by Member 7750028
In an edit box of my dlg application, user may enter lower or upper case letters. I want the edit box to convert/display the text in Upper case. What I have tried: EN_CHANGE tried. But how exactly I do not know. How to code it.
27 Oct 2022 by Member 7750028
I am withdrawing the Question posed to this Forum. I am getting Aged (but only 74 now)! or is it my poor Eyesight (poor readability without Spects & due to Long Sight defect) I did not even see the 'Edit->Properties->Styles where the Upper case...
19 Oct 2022 by codeRidersX
hello im trying to convert my php code to JS since the company i work for needs my code to be in JS , to be honest im no completly sure how to do so below is the PHP code who i need to be in JS:
19 Oct 2022 by OriginalGriff
You do realize that the two languages run on different computers, right? PHP runs on your server, and uses server resources. Javascript runs on the client, inside a browser sandbox which denies it access to local (client) machine resources. it is...
3 Jul 2022 by Member 13858049
I need to convert this javaskript code to jquery, I would be very grateful for help: let btn = document.getElementById("btnSend"); let form = document.getElementById("zeForm"); let input = document.getElementById("zeInput"); let msg = document.getElementById("msg"); let allowedValues =...
3 Jul 2022 by Member 15695858
Use of JQuery to Add Edit Delete Table Row
3 Jul 2022 by Member 15695858
$("form").submit(function(e){ e.preventDefault(); var name = $("input[name='name']").val(); var email = $("input[name='email']").val(); $(".data-table tbody").append(""+name+""+email+"EditDelete"); ...
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...
14 May 2022 by TASHEY “Toinky” MUSIC
#include using namespace std; // To store all the independent // sets of the graph set > independentSets; // To store all maximal independent // sets in the graph set > maximalIndependentSets; map
14 May 2022 by Greg Utas
If you have to do an assignment in Java, have found C++ code that does it, and therefore want to convert it, you should try to do the assignment from scratch for several reasons: 1. What will you do when you get an assignment for which you can't...
18 Jan 2022 by CPallini
Such a code is already very C-like. You just need to use printf instead of cout using the proper format specifiers, see printf - C++ Reference[^].
18 Jan 2022 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...
17 Dec 2021 by Piraisudan
Hi Guys, Currently I'm working in Linux platform and I need to convert ".img" QEMU file into ".elf" format. How to do that? What I have tried: Unable to find the specific command to do that.
17 Dec 2021 by Richard MacCutchan
See .img file to .elf - Google Search[^].
5 Dec 2021 by Learn.net37
hello, the following code is to convert from English to Arabic but somehow the Arabic appear as a question mark, but when converting from arbic to English it's work I don't if some one can help me, I will be appreciate this is for design code ...
5 Dec 2021 by Member 15457066
In Widows Control PAnel.. Regional Option... Administrative Tab... Select in Langauge Non Unicode Programe.. Select the Arabic langauge of that Region
20 Oct 2021 by Cinchoo
Quick tutorial on converting CSV file to JSON file using Cinchoo ETL
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...
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 ...
9 Aug 2021 by hassan nabi
I want to bring MATLAB code in Python without coding. Is there an app؟ What I have tried: I just think the solution is to rewrite it But I want to know if it is possible to convert without coding?
9 Aug 2021 by Richard MacCutchan
See How to convert the MATLAB code into the Python? - MATLAB Answers - MATLAB Central[^]
9 Aug 2021 by OriginalGriff
No, it's not possible without rewriting. Matlab and Python operate in completely different frameworks, and what works well in one is difficult or clumsy to implement in the other. Use the Matlab code as a specification for what the Python code...
5 Aug 2021 by molwantwa isaac
print("BMI Calculator\n\n1. Weight in pounds, height in inches\n2. weight in kilograms, height in meters\n"); choice=int(input("choice: ")) while((choice !=1) and (choice !=2)): choice = int(input("invalid choice! please...
5 Aug 2021 by CPallini
Try #include #include #include using namespace std; class Bmi { double m, h, f; public: Bmi(double m, double h, double f): m{m},h{h}, f{f} {} double operator() () {return f * m / h /h; } const string desc() { ...
5 Aug 2021 by Patrice T
Quote: this is my C code but it keeps on executing a infinite loop Yes, you exactly designed your code to do so. In this loop, you forgot to read user input again. while((choice != 1)||(choice != 2)) { printf("invalid choice! please...
5 Aug 2021 by Greg Utas
Quickly scanning your code, I see while((choice != 1) || (choice != 2))... This will always evaluate to true and therefore loop forever. I think you want && instead of ||.
1 Aug 2021 by Devendra Sarang
I am trying to fetch data from sql server data base from C# code. I have 2 columns of "datetime" data type. but i want only date part of that field when feting data from C#. When i am using same query in SSMS , it is showing only date part as...
1 Aug 2021 by OriginalGriff
That's because when the date info arrives in C#, it comes in as a DateTime value - C~ has no concept of a Date without a Time component, unlike SQL. What you need to do is format the DateTime value as "just the date" when you convert it to a...
29 Jul 2021 by Member 14474717
Hello! I am not programmer, but I want to make a surprise for one person. I saw this code on cake to read and want to write the same, but on C#. I try to found converter of something like it in Google but falled. Can anybody help me with this?...
25 Jun 2021 by ♥…ЯҠ…♥
Hi everyone, I have a dll which is created using VB6.0. But i do not have source code for the particular dll file. I want the source code for that. I tried certain decompilers which my friend suggested to me. But i am not satisfied with the conversion. The code obtained is native...
23 Jun 2021 by Richard MacCutchan
You are still trying to convert a string of alphabetic characters to an integer. LicenseHolders.Add(new LicenseHolder() { MyInt = Convert.ToInt32("MyString" )}); What numeric value do you expect to get from "MyString"? Also, do not use...
23 Jun 2021 by Flidrip
Hello everyone! How can I convert this string to Int32? ExampleCollection = new ObservableCollection(); ExampleCollection.Add(new LicenseHolder() { MyString1 = "StringName1" }); ExampleCollection.Add(new LicenseHolder() { MyString2 =...
23 Jun 2021 by TheRealSteveJudge
I would like to recommend this article: How to convert string to int in C#?[^] The safest method of converting a string to e.g. an int is the TryParse() method. You can only convert strings to numeric values if they represent a number e.g....
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[^]
28 May 2021 by Member 15220655
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication8 { class Program { static void Main(string[] args) { Console.WriteLine("son kiriting"); ...
28 May 2021 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...
28 May 2021 by Richard MacCutchan
1. Learn C#. 2. Learn C++. 3. Rewrite in the language of your choice.
23 May 2021 by Muhammad Nifhail Bin Zambri
I'm working on converting JSON files into CSV using ChoETL . So far the converting is working fine! My code is : var sampleJson = File.ReadAllText(@"C:\cpi\log\V510ResultsInfo\cpi001.json"); StringBuilder stringBuilder = new...
22 May 2021 by DSFVDSCSDC
I cannot import the json content in the example into the tables with the standard displayed codes. How do I convert nested data to datatable? What I have tried: public class Location { public double lat { get; set;...
22 May 2021 by Sandeep Mewara
You can use any online JSON to C# class converter for the same: // Usage // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); public class Location { public double lat { get; set; } public double lon {...
10 Mar 2021 by Member 14156312
I have a dict like this {'b50a': '02246,17.4.0.1'} I would like to convert it to a string but change the position. My expectation result like this: 02246,17.4.0.1\b50a Anyone can help me please. I really appreciated. Thanks What I have...
10 Mar 2021 by Richard MacCutchan
I gave you the link to the tutorial at How to convert string to array with Python?[^]. It really is time you made use of it and actually learned the language you are trying to use. This is the sort of basic question that is explained very early...
10 Mar 2021 by H13m5
Hello, I'd like to convert the JAVA code shared by GIT-HUB to C#. I also used "Java to C# Converter" but it was not very successful.if u know ,help me out thanks in advance
10 Mar 2021 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...
10 Mar 2021 by CHill60
So you want to print the value followed by the key. Ways to do that can differ whether you are using Python 2 or 3 Have a look at solutions to this post How do I print the key-value pairs of a dictionary in python[^] E.gFor i in DictValue ...
9 Mar 2021 by Member 14156312
Hello, I am newbie with Python. I would like to convert string to array. This is my strin looks like: Hello World my expectation it become ["hello","world"] What I have tried: This is my string comes from:
9 Mar 2021 by Maciej Los
Quote: This is my strin looks like: Hello World I tried like this: arr = string.split() print(arr) it return this: ['World'] it not include the "hello". Not true! Take a look at below examples: #Example 1 txt = "Hello,\nWord!" x =...
8 Mar 2021 by Richard MacCutchan
Go to The Python Tutorial — Python 3.7.10 documentation[^] where everything is explained in clear terms.
28 Feb 2021 by Nilesh vairat
I have a SQL statement which is causing a lot of performance issues on a production server. Can you please help me out with a way so that i can convert this sql statement to linq so that I can search the output linq to narrow down the issue. We are using entity framework in the code. ...
28 Feb 2021 by Member 12045843
select CAST(f.kondata AS date),Count(*) from final as f full join toplam as t on f.id_donanim=t.id_donanim where f.kondata between '2021-01-01 14:29:20.147' and '2021-02-01 06:06:06.000' group by CAST(f.kondata AS date) order by CAST(f.kondata...
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");...
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...
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...
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...
1 Feb 2021 by Yuncheol Chang
public static string PutHangul(int x, int y, int rot, string data) { if (data.Trim().Length == 0) return ""; int aHeight; int aWidth; int i, j, k; Byte bb; ...
1 Feb 2021 by thatraja
Code Rewrite[^] is the best way. Agree with other answer. Converters won't give you 100% converted code. Some libraries & 3rd party components code won't be available in all languages so Converter can't convert those section. For simple/minimal...
31 Jan 2021 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...
24 Jan 2021 by RickZeeland
This shows how you can get the values: //using System.Linq; //using System.Xml.Linq; XDocument xdoc = XDocument.Load("MyFile.xml"); foreach (XElement node in xdoc.Root.Descendants()) ...
23 Jan 2021 by Sơ Mi Tv
I am writing an application that converts XML file to TAR file. I tried using XmlReader for conversion. but the problem I got at "repairStatus" is in the content. There are 2 cases in the file are "Repaired" and "False Call" I cannot split them...
21 Jan 2021 by RickZeeland
You can generate classes here: Xml2CSharp.com | Convert your XML Examples into XmlSerializer compatible C# Classes[^] The rest is up to you :) Example: using System; using System.Xml.Serialization; using System.Collections.Generic; namespace...
10 Jan 2021 by Richard MacCutchan
The algorithm is not that complicated if you actually think about it: Dim numbers = New Integer() { 2000, 100, 6000 } ' Iterate through the list. Dim nexti As Integer For Each item As Integer In numbers Console.Write($"{item}: ") Dim ans...
9 Jan 2021 by nicoheylen
Can someone help me with the conversion of this python function to a vb.net function? """Function to convert a decimal integer to four byte doubleword""" __version__ = '1.0.0' def ddConverter(decimalInput): ''' Takes a decimal integer...
9 Jan 2021 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...
25 Nov 2020 by Richard MacCutchan
The main logic is quite easy to figure out even without knowing Python. The missing bit about String slicing is explained at 3. An Informal Introduction to Python — 3.1.2. Strings[^] and the following section on Lists.
25 Nov 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...
29 Oct 2020 by Gerry Schmitz
Five Different Methods for How to Print SharePoint List Item | Customer and Employee Engagement Blog[^]
20 Oct 2020 by Member 14076283
Hello, I am still to new to programming. This is a project I stumbled upon. I couldn't find any help off Google searches, so I came here. Any help is great. What I have tried: #source code in python: datalist=[] n=int(input("Enter number of...
20 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...
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)) { ...
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...
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...
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[^].
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;...
28 Aug 2020 by peterkm
To start with, I suggest to find C++ equivalents for Python libraries which you do not mention in your sample ... like this equivalent of Numpy GitHub - dpilger26/NumCpp: C++ implementation of the Python Numpy library[^] Researching needs to...
28 Aug 2020 by wiseman s
I doesn't know anything about pyhton. But I want to implement " Joachim Weickert 'Coherence-Enhancing Shock Filters' " for C++ and openCV. Only source code that I found written in pyhton. opencv functions are OK . I can adapt but some variable...
28 Aug 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...
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], ...
13 Aug 2020 by Ben Crockett
Cant figure out how to convert 2020-07-14T03:10:01 into datetime.. help! What I have tried: convert(datetime, dda2.transaction.timestamp,103) + CAST(dda2.transaction.timestamp as DATETIME) This isn't working
13 Aug 2020 by OriginalGriff
Try: SELECT CONVERT(DATETIME, '2020-07-14T03:10:01', 126)
12 Aug 2020 by Sandeep Mewara
There might be more ways but for one of it, here you go, details well explained in one of our own CP article: Reporting Services 2008 – Embedding a PDF Document[^] Look at it, see if it works out of box for you (seems should be), or else seems...
12 Aug 2020 by John Robert Connolly
I have a table that stored binary pdf files. So the table has a binary data type but the actual file in the binary record is a PDF document. What I need to do is convert that binary PDF File to an image file so that I can display the image\PDF in...
4 Aug 2020 by Member 12431965
i could convert it to binary but i couldn't vice versa itthis is my codebyte[] bytes = System.IO.File.ReadAllBytes(sellected-file);textBox2.Text = string.Join(" ", bytes.Select(b => Convert.ToString(b,2).ToUpper()));thanks in advanceWhat I have tried:byte[] bytes =...
20 Jul 2020 by OriginalGriff
Step 1: Learn Python. Step 2: Learn C. Step 3: Use the Python code as a specification for a new C app. Never convert languages, it doesn't produce good code in the target language because it uses a totally different framework, and the data...
20 Jul 2020 by Richard MacCutchan
You cannot 'convert' that to C code, you need to write it from scratch and use the Windows GDI+ libraries for rendering of your images. See GDI+ - Win32 apps | Microsoft Docs[^]. [edit] Actually, if you are running that on a Unix/Linux system...
18 Jul 2020 by Member 10659604
I need an urgent help ,i want to convert below Python code to PHP code. Any help would be really appreciated ... Thanks In Advance..!# P1 , P2 , P3 are arrayex = (P2 - P1)/(numpy.linalg.norm(P2 - P1))i = dot(ex, P3 - P1)ey = (P3 - P1 - i*ex)/(numpy.linalg.norm(P3 - P1 - i*ex))ez...
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...