formatting

Java JOptionPane Output

烂漫一生 提交于 2019-12-11 10:28:03
问题 Can anybody tell me what I am doing wrong here. I need to calculate some values from user-input into some JOptionPane-input-dialog-boxes, then outputting the answers. I would greatly appreciate any help I get. Thanks In Advance! Input Number of loans to compare (Could be more than 1) Selling price Down payment You will ask the following for each loan they want to compare Interest rate Number of years Processing You will need to calculate the monthly payment for each scenario listed in part d

Exponential number in custom number format of Excel

不羁岁月 提交于 2019-12-11 10:25:33
问题 In an Excel chart, I have some values on the x-axis: 1, 2, 3, 4, 5 But these values are actually in logarithm. Therefore, I need to show the exponential numbers as the labels of x-axis like: 10, 100, 1000, 10000, and 100000. I tried the 'Format Axis' --> 'Number' --> 'Custom' in order to add a new format code to support that. But it didn't work. The best thing I've got so far is 10^#,##0;10^#,##0 But it just gives me exactly 10^x which is not what I need. Any idea? 来源: https://stackoverflow

A good rich text control for Silverlight [closed]

三世轮回 提交于 2019-12-11 09:52:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm looking for a good rich text control for Silverlight. The one on codeplex seems to be out of date and another free one I saw on vectorlight doesn't seem to save as RTF (it uses custom xml) or doesn't have printing capabilities. I'm thinking about dishing out some bucks for the Telerik, ComponentOne, or

How to convert locale formatted number to BigInteger in Java?

心已入冬 提交于 2019-12-11 09:49:45
问题 I searched a lot but nothing helped me :( Suppose I need convert 12.090.129.019.201.920.192.091.029.102.901.920.192.019.201.920 (in Portuguese group separator: .) to BigInteger value. How to do that conversion? I tried use NumberFormat, DecimalFormat and nothing works or I didn't on right way :( 回答1: Get a NumberFormat instance for a Portuguese Locale, and then parse the number with it. This will also handle locale-specific decimal separators. NumberFormat nf = NumberFormat.getNumberInstance

Remove formatting of var_export() php

杀马特。学长 韩版系。学妹 提交于 2019-12-11 09:44:57
问题 I am using the following command to print an array of data to a file saved as .php so i can use include to grab the array later. $toFile = '$Data = '. var_export($DataArray,true).'; '; file_put_contents( $filename.'.php', "<?php ".$toFile." ?>"); It is printed to the file formatted to make it easy to read but it ends up taking up a lot more space on the disk due to spaces and newline and such. Is there an easy way to remove the formatting so it take up less space. I thought of using str

displayformatattribute to custom format a string

断了今生、忘了曾经 提交于 2019-12-11 09:41:38
问题 I want to be able to mark properties in my viewmodel to be formatted using a custom format when displayed in my MVC view. I assume I need my own displayformatattribute and set the displayformat but I am not sure how to set this displayformat or where. If I want to show a number as currency it is easy, just set DataFormatString to "{0:C}" in the constructor of the attribute. But if for example I want to mask email addresses (so remove the domain name), how would I do this using either a

Aligning multiline Java strings in Eclipse

主宰稳场 提交于 2019-12-11 09:32:14
问题 I'm a little new with the Eclipse formatter system. Given an assignment to String over a couple of lines like this: String cypher = "OPTIONAL MATCH (update:UPDATE {name: {name}})," + "(update)-[:INSTALLED_IN]->(installation)<-[:CURRENT]-(computer:COMPUTER {name: {computerName}})" + "RETURN update, installation, computer"; I wish to have Eclipse format it when hitting Ctrl + Shift + F and produce the following, with all + signs aligning nicely under = : String cypher = "OPTIONAL MATCH (update

How to keep original text formatting of text with python powerpoint?

放肆的年华 提交于 2019-12-11 09:27:52
问题 I'd like to update the text within a textbox without changing the formatting. In other words, I'd like to keep the original formatting of the original text while changing that text I can update the text with the following, but the formatting is changed completely in the process. from pptx import Presentation prs = Presentation("C:\\original_powerpoint.pptx") sh = prs.slides[0].shapes[0] sh.text_frame.paragraphs[0].text = 'MY NEW TEXT' prs.save("C:\\new_powerpoint.pptx") How can I update the

oracle query Concatenate all the columns with ','

假如想象 提交于 2019-12-11 09:15:18
问题 I am using the HR Schema and I would like to concatenate all the columns with ',' for every row. My code is : SELECT employee_id || ',' || first_name || ',' || last_name || ',' || email || ',' || phone_number || ','|| job_id || ',' || manager_id || ',' || hire_date || ',' || salary || ',' || commission_pct || ',' || department_id THE_OUTPUT FROM employees; Is there a better way (for instance using listagg function) ? I am thinking if the table has 1000 columns I can't do the above Thanks a

Python : How do i get a new column for every file I read?

蓝咒 提交于 2019-12-11 09:07:42
问题 Im trying to read 3 text files and combine them into a single output file. so far so good, the only problem is that I need to create columns for every file i read. right now I have all the extracted data from the files in a single column. #!/usr/bin/env python import sys usage = 'Usage: %s infile' % sys.argv[0] i=3 #start position outfile = open('outfil.txt','w') while i<len(sys.argv): try: infilename = sys.argv[i] ifile = open(infilename, 'r') outfile.write(infilename+'\n') for line in ifile