format

mySQL format number output , thousands separator

时光毁灭记忆、已成空白 提交于 2019-12-06 04:31:57
I have a mySQL query which is outputting decimal fields with a comma. SELECT Metals.Metal, FORMAT(Fixes.GBPam, 3) AS AM, FORMAT(Fixes.GBPpm, 3) AS PM, DATE_FORMAT(Fixes.DateTime, '%d-%m-%y') AS Date FROM Fixes, Metals WHERE Metals.Id = Fixes.Metals_Id Fields GBPam and GBPpm are both of type decimal(10,5) Now I want columns AM and PM to be formatted to 3 decimal places in my sql query - Correct I want values in the thousands to be formatted as xxxx.xxx and not x,xxx.xxx - Incorrect Example output from mysql query: Metal AM PM Date Gold 1,081.334 NULL 11-09-12 Silver 21.009 NULL 10-09-12

FFmpeg av_guess_format returns NULL

让人想犯罪 __ 提交于 2019-12-06 04:29:40
I'm following the example code here: http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/output-example_8c-source.html My code is as follows: fmt = av_guess_format(NULL, filename, NULL); if (!fmt) { LOGE(1,"Could not deduce output format from file extension: using MPEG.\n"); fmt = av_guess_format("mp4", NULL, NULL); } if (!fmt) { LOGE(1, "Could not find suitable output format\n"); exit(1); } The two times that I call av_guess_format, it is returning NULL both times. I am calling both av_register_all() and avcodec_register_all() beforehand. Any ideas as to why this is returning NULL? Thanks in

ckeditor font style 13 px

最后都变了- 提交于 2019-12-06 04:24:24
I had earlier asked question about it. But after trying out all the possiblities where the error occurs, I have found that in ckeditor if you copy some text and paste it, it is default pasted as <p style="font-size: 13px;"> example picture HTML CODE <div><p>Original Text</p> <p><strong><u>The quick brown fox jumps over the lazy dog</u></strong></p> <p>The quick brown fox jumps over the lazy dog</p> <p>Copied Text</p> <p style="font-size: 13px;"><strong><u>The quick brown fox jumps over the lazy dog</u></strong></p> <p style="font-size: 13px;">The quick brown fox jumps over the lazy dog</p> <

How to determine text format in C#

烂漫一生 提交于 2019-12-06 04:11:55
问题 Is there a way to determine the format of text in C#/.NET something like this would be very useful. public TextFormat TextTools.GetTextFormat(string text); switch(TextTools.GetTextFormat(mystring)) { case TextFormat.RichText: break; case TextFormat.PlainText: break; } Ive looked around on msdn but couldnt find such a tool 回答1: It's a pretty heuristic check but you can try to build your own function starting with something like this (of course you can extend it to handle different formats):

Formatted table output, printing into R console

心不动则不痛 提交于 2019-12-06 04:11:32
问题 I have function that processes some data and I would like to print the intermediate steps while the function (a loop) proceeds. I could do that in 1 point where the updated data is all in one data.frame() . I'm thinking of some simple table as for example I saw as part of Rapporter tool box. So the question is how or whether it is possible to print table with numerical values into console. Thanks. EDIT: print() is not the solution I'm after and here is why: function print() prints the numeric

karma/jasmine console more detailed test results

给你一囗甜甜゛ 提交于 2019-12-06 03:53:38
I'm using Karma with Jasmine for my javascript unit tests. Suppose I have a failing test like this: expect(objectA).toEqual(expectedObjectA); When it fails, I see the two objects dumped on the console and a message telling me the objects are not equal: This is not very helpful because in order to find out why they are not equal, I have to to copy paste the text from the console, split the two objects from that object dump, format them, put them in a diff editor. (Sometimes even that doesn't help because the object are not equal because they have members which are functions). Is there a way to

java pdfbox printerjob wrong scaling / page format

别说谁变了你拦得住时间么 提交于 2019-12-06 03:48:20
I'm trying to print an existing pdf file with pdfbox. Currently I'm using pdfbox 2.0.0 RC3 through maven. This is my current code: PDDocument document = PDDocument.load(new File(myPdfFile)); PrinterJob job = PrinterJob.getPrinterJob(); if (job.printDialog()) { job.setPageable(new PDFPageable(document)); job.print(); } document.close(); For testing I printed a test pdf with Adobe Acrobat and the same pdf with the few lines of code. Everything works fine except for the borders. All borders (header, footer, left & right side) are to small and the footer is way too small. Is there a magic method

How to convert a string to a numeric in autohotkey?

醉酒当歌 提交于 2019-12-06 03:16:23
FormatTime, CurrentMinute , , m assigns the current minute to variable %CurrentMinute% , and its value is a string, not a numeric. I wanna do some calculations on the value of %CurrentMinute% , so how could I convert it to numeric? Thanks for any help in advance! AutoHotkey automatically converts numbers and strings as needed. FormatTime, CurrentMinute,, m NextMinute := CurrentMinute + 1 来源: https://stackoverflow.com/questions/13106275/how-to-convert-a-string-to-a-numeric-in-autohotkey

PE Format - IAT Questions

浪尽此生 提交于 2019-12-06 03:16:21
问题 I'm trying to write an exe packer for windows. I've got some of the basics worked out so far. The part I'm up to though is reading the "BOUND IMPORT Directory Table" (or .idata section?), basically the section of the PE file that contains the list of DLLs that the loader needs to import. I'm wondering what the best way to either: [A] find out where the IAT is (because running PEView against a few different .exe's seems to show that this list can be contained in multiple different places) and

Suppress print newline in python 3 str.format

橙三吉。 提交于 2019-12-06 02:40:10
I am using Python 3 and am trying to use my print statements with the str.format. e.g: print ('{0:3d} {1:6d} {2:10s} '.format (count1,count2,string1)) When I try to use the end='' to suppress the subsequent newline, this is ignored. A newline always happens. How do I suppress the subsequent newline? Source: int1= 1 int2 = 999 string1 = 'qwerty' print ( '{0:3d} {1:6d} {2:10s} '.format (int1,int2,string1)) print ('newline') print ( '{0:3d} {1:6d} {2:10s} '.format (int1,int2,string1,end='')) print ('newline') Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux Type "copyright",