formatting

How to set 'lang' property in Highcharts using Angular JS?

Deadly 提交于 2019-12-11 04:03:07
问题 We are using Highcharts in our application using Angular JS. I want to set the formatting of amounts in a user culture specific formats which I am receiving from $locale service. After refering a link i got know that we can set values in below property for Highcharts: Highcharts.setOptions({ lang: { thousandsSep: ',' } }); But while writing it in my code I am getting error that Highcharts is not defined, and also not working even if I set only lang property in the config object: function

Aspose.Cells - Set Border For Range

混江龙づ霸主 提交于 2019-12-11 03:34:48
问题 I'm currently working with Aspose.Cells. I've largely managed to do what I need to do however one issue remains; I can't see an easy way to apply a border to a defined range. I can for a cell, however when applying the style to the range all cells in the range are formatted. The only way I can see around this is to write a method to enumerate all cells within the range to determine the right border attributes. This seems a slightly hideous way to achieve what I see as a simple task, so am

LyX — Title, Abstract, Keywords Missing When Using Elsevier Class in View

江枫思渺然 提交于 2019-12-11 03:34:33
问题 I'm pretty new to using LyX, but have looked around this forum, as well as others and haven't found anyone else who has encountered this problem. The issue is that, when I click on the 'eyes' to preview my document in .pdf form, there are the two numbered sections with the corresponding body text, but my title, abstract, and keywords, as well as the 'new page' formatting, are all missing; the two sections are at the top of the page as though they had never been included. Some pertinent

Custom formatted number with period and comma

╄→гoц情女王★ 提交于 2019-12-11 03:18:46
问题 Somewhat related to this question and several other SO questions relating to formatting decimals (all of which did not help me in this instance). I am trying to format a Long into a String e.g. 123456 -> 012.345,6 ( period followed by comma as strange as it may seem, it's a project requirement). I am experimenting with DecimalFormat for the formatting: private static final DecimalFormat format = new DecimalFormat("##0.000,0"); However it throws an exception during instantiation: java.lang

VB.NET - RichTextBox - Apply formatting to selected text

馋奶兔 提交于 2019-12-11 03:08:08
问题 I have a RichTextBox control on my form. I also have this button, labeled Bold , that I want, if someone selects text in the RichTextBox , then presses the button, the selected text turns bold. Any way to do that? Simple, everyday task for end users. Thanks. 回答1: A variation on the above that takes into consideration switching bold on/off depending on the currently selected text's font info: With Me.rtbDoc If .SelectionFont IsNot Nothing Then Dim currentFont As System.Drawing.Font =

python string formatting fixed width

China☆狼群 提交于 2019-12-11 02:49:39
问题 I want to put a bunch of floating point numbers into a fixed-width table. That is, I want a maximum of 12 characters used. I want a minimum of 10 decimals used (if available); however, if 10 decimals makes it take up more than 12 characters, then round. My original thought was to try something like this # I only want 12 characters used total num1 = 0.04154721841 num2 = 10.04154721841 # not what I want print "{:<12.11g}".format((num1)) # what I want print "{:<12.10f}".format((num1)) # not what

Formatting in NetBeans: CSS specific

北战南征 提交于 2019-12-11 02:46:55
问题 I would like to use spaces for indentation for most code, but use tabs for indentation in CSS. In Visual Studio and Notepad++, you can configure this for all languages. But in NetBeans (setup for PHP), I can only select "All languages" or "PHP". Is there a way to make other languages have specific formatting settings (specifically CSS)? 回答1: Depending on the IDE modules that you have, you will see PHP, Java or All Languages. But there is no way to change formatting styles for CSS-only in

Why does string.Format come in several flavors?

风流意气都作罢 提交于 2019-12-11 02:44:23
问题 .NET provides four very similar versions of String.Format(...) (excluding the one that takes an IFormatProvider argument): Format(String, Object) Replaces one or more format items in a specified string with the string representation of a specified object. Format(String, Object, Object) Replaces the format item in a specified string with the string representations of two specified objects. Format(String, Object, Object, Object) Replaces the format items in a specified string with the string

C - formatting MAC address

≡放荡痞女 提交于 2019-12-11 02:42:38
问题 I am currently working with parsing some MAC addresses. I am given an output that does not include leading zeros (like so). char* host = "0:25:25:0:25:25"; and I would like to format it like so char* host = "00:25:25:00:25:25"; What would be the easiest way to go about this? For those wondering, I am using the libpcap library. 回答1: I may be missing something in the question. Assuming you know it is a valid MAC, and the input string is thus parsable, have you considered something as simple as:

How to format a variable of double type

冷暖自知 提交于 2019-12-11 02:39:13
问题 I have a variable of double type representing a value of about 34.323423423123456. I'd like to format it to have only two decimal places (e.g. 34.32), rounded properly; e.g. 2.229934345 would become 2.23. I am new to Java and none the tricks I know from C# worked. 回答1: Related to this Question use DecimalFormat setRoundingMode 回答2: Here's an example format string, I believe it correctly rounds the resulting value. See Markus' post if you need more control over the rounding or format: String