format

Change the format of the axis tick labels in LiveCharts

旧巷老猫 提交于 2019-12-23 17:16:35
问题 I just can't find a solution for changing the format of the y-axis tick labels. Now I get labels like 0.03 and 0.035 . But I always need three digits behind the decimal point. The big question is, how to access the label format? This is my code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Forms; using System

What is the most direct way to reproduce this printf-like format with ColdFusion?

北城余情 提交于 2019-12-23 17:04:58
问题 I've been thrown into ColdFusion for a very simple assignment. The application has some logic to display "help codes" (let's not get into what is a help code), however, the logic is buggy and needs to be fixed. Given a two-letters code, a 1-4 digits number, and another 1-2 digits number, I would need to display them like this printf call would: printf("%s%04d%02d", letterCode, bigNumber, smallNumber); If you're not familiar with the printf function, it accepts a format string (the first

python string formatting

穿精又带淫゛_ 提交于 2019-12-23 15:44:48
问题 I need some help with the Python's new string formatter. Basically, I want the outer curly braces to not escape the string replacement field. This works: foo = 'bar' print '{%s}' % foo But, this doesn't: foo = 'bar' print('{{0}}'.format(foo)) Desired output: '{bar}' 回答1: It looks like you want: >>> foo = 'bar' >>> print('{{{0}}}'.format(foo)) '{bar}' The outer pair of doubled {{ and }} are copied literally to the output, leaving {0} to be interpreted as a substitution. 回答2: {{ is an escaped {

Android soft keyboard show numbers view first

佐手、 提交于 2019-12-23 15:19:44
问题 I have a login screen on my app which accepts a CPF as login (CPF is an unique number identification that every Brazilian citizen have, e.g: 10546819546), but it can also accept passport numbers as the login, and these may have letters on it. My problem is that I want the keyboard, when it pops up, to show to number/symbols "view" before the default alphabet one. Changing the inputMethod to phone or number does not solve my problem, because as I said, the login may contain letters. I've seen

No leading zeros for months R [duplicate]

和自甴很熟 提交于 2019-12-23 13:33:14
问题 This question already has answers here : Formatting a date in R without leading zeros (2 answers) Closed 3 years ago . format() in R does not have an obvious option to display the month without leading 0 (and the same with the year). Is there another way to get this result? The solution should allow the user to flexibly choose whether 0s are to be omitted only for the day or the month or the year or for any combination. in: as.Date("2005-09-02") out: 2/9/5 or 0 only removed for month: out: 2

Zend Framework, mapping the extension of a URL to the format parameter?

与世无争的帅哥 提交于 2019-12-23 12:23:42
问题 It is possible to map the extension of a URL, to the format parameter in ZF? I'd like the default routing to still work, including mapping parameters from the URI, so you'd be able to say: http://example.com/controller/action/param1/value1/param2/value2.json Here: $this->_getParam('format') => "json" And likewise: http://example.com/module/controller/action/param1/value1/param2/value2.xml Here: $this->_getParam('format') => "xml" I've fiddled with the default routes, but i cannot get it to

Number formatting as-you-type in an input field in Angular2 with double binding

流过昼夜 提交于 2019-12-23 12:17:57
问题 With pipes like <input.... [ngModel]="whatever | myCurrencyPipe" (ngModelChange)="whatever = $event" type="text" name="myCurreny" ... you can format an existing value. Scarcely you want to overwrite the value, you have problems. And with the solution above, the double binding has been abrogated. There are plenty of jQuery-Libraries but I am looking for native angular2 solutions. Can someone help me? 回答1: Extend NgModel directive. Overwrite function viewToModelUpdate(value) called after every

Changing the format of the day title in weekview

倖福魔咒の 提交于 2019-12-23 12:13:55
问题 How can I change the formatting of the date in Fullcalendar -> weekview. It now says: Sun 7/24 Mon 7/25 Tue 7/26 Wed 7/27 Thu 7/28 Fri 7/29 Sat 7/30 I want to switch month and day around so it says Sun 24/7 Mon 25/7 Tue 26/7 Wed 27/7 Thu 28/7 Fri 29/7 Sat 30/7 which is the way our users are used to in the country where I live/work. 回答1: I have found a solution: columnFormat: { month: 'ddd', week: 'ddd d/M', day: 'dddd d/M' }, 回答2: There is a mistake, the first character must be lowercase: c

vba paste values and keep source formatting?

只谈情不闲聊 提交于 2019-12-23 12:00:06
问题 I am trying to copy and paste some value from a column in one workbook to another: Workbook 1 Column A 10/02/1990 41 11/01/2017 52 Workbook 2 Column I 10/02/1990 41 11/01/2017 52 The problem i am getting is if i simply copy my values from column 1 in workbook A and paste them to column I in workbook 2. then i get results like so: Column I 34331 41 121092 52 This is because the formatting is somehow getting lost/confused by excel. So i have created a button where users can paste this data

Convert SAS numeric to python datetime

白昼怎懂夜的黑 提交于 2019-12-23 10:58:11
问题 This is probably a simple solution, but how would I go about converting a SAS datetime number (number of seconds since 1/1/1960.) An example of one of the values inside of the pandas column is 1716470000. I tried: df['PyDatetime'] = pd.to_datetime(df,infer_datetime_format=True) and I get numbers like '1970-01-01 00:00:01.725480' 回答1: You'll need the built-in datetime module: import datetime sastime = 1716470000 epoch = datetime.datetime(1960, 1, 1) print(epoch + datetime.timedelta(seconds