format

convert array into .txt file [duplicate]

和自甴很熟 提交于 2019-12-05 12:26:43
This question already has answers here : Closed 9 years ago . Possible Duplicate: Convert array into csv Hi, How to convert array into .txt file? This is my array: Array ( [OrderList_RetrieveByContactResult] => Array ( [OrderDetails] => Array ( [0] => Array ( [entityId] => 156456 [orderId] => 110631 [orderName] => testing2 [statusTypeId] => 15656 [countryCode] => AU [orderType] => 2 [invoiceNumber] => 1001 [invoiceDate] => 2010-10-19T00:00:00 [userID_AssignedTo] => 245454 [shippingAmount] => 8.95 [shippingTaxRate] => 0 [shippingAttention] => tttesst [shippingInstructions] => this a test

Knitr - stop superscript in R Markdown

不问归期 提交于 2019-12-05 12:18:28
I need to stop superscript before comma - , or full stop - . . When converting the Rmd file to HTML knitr makes comma superscripted as well. Example: example.Rmd MyTitle ======================================================== J.Smith^1, K.John^2, H.Gone^*. example.html Let me know if this was asked before, I can't find relevant questions. gagolews You may insert HTML tags directly to Markdown documents. To toggle the "superscripting" mode, use sup . MyTitle ======================================================== J.Smith<sup>1</sup>, K.John<sup>2</sup>, H.Gone<sup>*</sup>. EDIT : You may also

How do I save an Excel file without getting a format warning when opening, using C# and Excel 2010

≯℡__Kan透↙ 提交于 2019-12-05 12:14:40
I'm using Excel 2010. I'm trying so save my excel file, with this code. It does save a .xls file, but when I open the file I get this message: The file you are trying to open, 'tre.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a thrusted source before opening the file. Do you want to open the file now? If I press yes the file opens. But what do I need to get rid of this format-popup? My code: using System; using System.Windows.Forms; using ExcelAddIn1.Classes; using ExcelAddIn1.Classes.Config; using Microsoft.Office

How to extract just the audio from an MP4 file and convert it to FLAC file in C#?

匆匆过客 提交于 2019-12-05 11:20:51
My goal is to write C# that turns Microsoft LYNC meeting audio into text. Here is my project so far. Initially I was trying to record from microphone, save it to WAV then convert WAV to FLAC and using GoogleSpeechAPI, convert FLAC to text. But I got stuck recording microphone audio to WAV format. The problem is it needs to be in a very specific WAV format, i.e. int16 or int24 for the WAV to work with the WAV to FLAC convertion method. I kept recording 8 bits per sample instead of (16 or 24 bits) per sample. So, starting over. Microsoft Lync directly records meetings and saves it as a video in

PHPExcel, Date being parsed incorrectly

混江龙づ霸主 提交于 2019-12-05 11:14:29
Currently, I'm making a program for my job that uses PHPexcel to basically take all of the data from an excel sheet, make a new excel sheet and format it to text, and transfer all of the data from the old excel sheet. My php has to be able to take in the values from the old excel sheet and parse them correctly, especially dates/numbers/etc. Everything is working fine except for the dates. For some reason when I get the formatted value of the cell; it does not match the date format in the first sheet. Specifically a value like this: 12/31/2099 . For some reason, it reads the formatcode

Underline format problem

风流意气都作罢 提交于 2019-12-05 11:10:44
According to the documentation i would like to overwrite predefined formats using this settings: formats: { bold : {inline : 'b' }, italic : {inline : 'i' }, underline: { inline: 'u' } }, I insert "this is a text" into the editor and press the underline-button. This is the result (this gets saved to database too): <p>thi<span style="text-decoration: underline;">s is a t</span>ext</p> Why do i get no u-tags, but the predefined span with underlined style? How do i get my lovely u-tags here? EDIT: I do know that u-tags are deprecated , but i need them for compatibility reasons! EDIT2: My solution

how to format 1700 to 1'700 and 1000000 to 1'000'000 in c#?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 10:33:25
I like to format all numbers like in math. is there a predefined function or is that just possible with substring and replace? edit: my culture is de-ch Best regards Try this int input = Convert.ToInt32("1700"); string result = String.Format("{0:##,##}", input); Or this Console.WriteLine(1700.ToString("##,##", new NumberFormatInfo() { NumberGroupSeparator = "'" })); var numformat = new NumberFormatInfo { NumberGroupSeparator = "'", NumberGroupSizes = new int[] { 3 }, NumberDecimalSeparator = "." }; Console.WriteLine(1000000.ToString("N",numformat)); Try this: Console.WriteLine(1000000.ToString

Formatting Excel cells (currency)

对着背影说爱祢 提交于 2019-12-05 10:23:13
问题 I developed an Add-In for Excel so you can insert some numbers from a MySQL database into specific cells. Now I tried to format these cells to currency and I have two problems with that. 1. When using a formula on formatted cells, the sum for example is displayed like that: "353,2574€". What do I have to do to display it in an appropriate way? 2. Some cells are empty but have to be formatted in currency as well. When using the same format I used for the sum formula and type something in,

PHPWord how to add text break / new line while in a text run

我是研究僧i 提交于 2019-12-05 09:28:23
How can I add a text break or go to the next line/row while in a text run? I tried to just do $section->addTextBreak(2); while in the text run but it just added the breaks to the section after the text run. I also tried $textrun->addTextBreak(2); but it gave me a fatal error. Any responses would be greatly appreciated. j0hny I'm afraid that this will not be possible with current version. I don't have deep understanding of this library, but from looking at the code, I found out that the textRun class consist only of addText and addLink methods. But I also need this feature along with several

How to validate a specific Date and Time format using Python

非 Y 不嫁゛ 提交于 2019-12-05 09:15:15
I am writing a program to validate portions of an XML file. One of the points I would like to validate is a Date Time format. I've read up on the forum about using time.strptime() but the examples weren't quite working for me and were a little over my expertise. Anyone have any ideas how I could validate the following. This is the format the date and time must be in. 2/26/2009 3:00 PM I am sure there is something built-in and very easy but I can't find. Many thanks if you've run by this before and have suggestions. Yes, you can use datetime.strptime() : from datetime import datetime def