Questions tagged [converter]

Converters can change data from one type to another, translate data based on cultural information, or modify other aspects of the presentation.

Value converters are culture-aware. Both the Convert and ConvertBack methods have a culture parameter that indicates the cultural information.

Ref: IValueConverter

3976 questions
592
votes
23 answers

Convert Int to String in Swift

I'm trying to work out how to cast an Int into a String in Swift. I figure out a workaround, using NSNumber but I'd love to figure out how to do it all in Swift. let x : Int = 45 let xNSNumber = x as NSNumber let xString : String =…
Steve Marshall
  • 7,149
  • 4
  • 13
  • 17
302
votes
10 answers

Convert xlsx to csv in Linux with command line

I'm looking for a way to convert xlsx files to csv files on Linux. I do not want to use PHP/Perl or anything like that since I'm looking at processing several millions of lines, so I need something quick. I found a program on the Ubuntu repos called…
user1390150
  • 3,029
  • 2
  • 12
  • 3
224
votes
9 answers

Calendar date to yyyy-MM-dd format in java

How to convert calendar date to yyyy-MM-dd format. Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, 1); Date date = cal.getTime(); SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); String date1 =…
Sarika.S
  • 6,786
  • 27
  • 72
  • 103
180
votes
20 answers

Converting XML to JSON using Python?

I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we…
Pete Karl II
  • 3,551
  • 3
  • 19
  • 27
167
votes
1 answer

ffmpeg - Converting MOV files to MP4

I have just installed ffmpeg and I am trying to encode all my uploaded videos to .mp4 file. Most of the users currently upload .mov and I want to convert every video to .mp4. I am running the command as follows: ffmpeg -i movie.mov -vcodec copy…
user1503606
  • 2,818
  • 10
  • 36
  • 69
113
votes
13 answers

How to convert a String into an ArrayList?

In my String, I can have an arbitrary number of words which are comma separated. I wanted each word added into an ArrayList. E.g.: String s = "a,b,c,d,e,.........";
Sameek Mishra
  • 8,234
  • 28
  • 86
  • 113
108
votes
3 answers

How to convert LocalDate to SQL Date Java?

How do I convert a LocalDate to a java.sql.Date? Attempt: Record r = new Record(); LocalDate date = new Date(1967, 06, 22); r.setDateOfBirth(new Date(date)); This fails (won't compile) and all I can find is Joda time stuff. I'm using Java 8
Gemtastic
  • 5,673
  • 6
  • 29
  • 48
100
votes
8 answers

Convert .flac to .mp3 with ffmpeg, keeping all metadata

How can I convert .flac to .mp3 with ffmpeg, keeping all metadata (that is converting Vorbis comment in .flac files to ID3v2 metadata of .mp3)?
Vito Gentile
  • 11,015
  • 8
  • 52
  • 81
88
votes
2 answers

How Convert VB Project to C# Project

I have a project written in VB, and I need to convert the whole project to C# project. I don't want to do it file by file, I found some online converters, but they convert only lines of codes, not the whole project. I found on researches, and here…
Romo Daneghyan
  • 1,809
  • 1
  • 15
  • 21
80
votes
3 answers

Validation Error: Value is not valid

I have a problem with a p:selectOneMenu, no matter what I do I cannot get JSF to call the setter on the JPA entity. JSF validation fails with this message: form:location: Validation Error: Value is not valid I have this working on several other…
klonq
  • 3,332
  • 4
  • 31
  • 58
78
votes
11 answers

How can doc/docx files be converted to markdown or structured text?

Is there a program or workflow to convert .doc or .docx files to Markdown or similar text? PS: Ideally, I would welcome the option that a specific font (e.g. consolas) in the MS Word document will be rendered to text-code: ```....```.
Lorenz Lo Sauer
  • 20,692
  • 12
  • 75
  • 85
75
votes
9 answers

Java: How to convert String[] to List or Set

How to convert String[] (Array) to Collection, like ArrayList or HashSet?
Mark
  • 14,967
  • 11
  • 61
  • 90
71
votes
3 answers

How to transform an XML file using XSLT in Python?

Good day! Need to convert xml using xslt in Python. I have a sample code in php. How to implement this in Python or where to find something similar? Thank you! $xmlFileName = dirname(__FILE__)."example.fb2"; $xml = new…
aphex
  • 1,016
  • 1
  • 12
  • 17
64
votes
5 answers

Is there a good HAML -> ERB/HTML converter?

I'm looking for a reliable way to convert a HAML template to an equivalent ERB/HTML template? Has anyone come across one?
Karlas Furecz
62
votes
8 answers

How to convert string to long

how do you convert a string into a long. for int you int i = 3423; String str; str = str.valueOf(i); so how do you go the other way but with long. long lg; String Str = "1333073704000" lg = lg.valueOf(Str);
John
  • 895
  • 3
  • 9
  • 25
1
2 3
99 100