formatting

Sort without moving formatting

若如初见. 提交于 2020-01-04 15:28:34
问题 I have an Excel table in which multiple rows are given different coloured backgrounds by VBA macros. These background colours should be locked to the rows. My problem is that when the table is sorted by one column or another the background colours move as the data is reordered. Can I format in another way to stop this happening so that the cells remain locked? The code I use to format is: For Each Row In rng.Rows If Condition Then Row.Select cIndex = ColourIndex(colour) With Selection

How to Convert a simple Google text-only Document to HTML via Google Apps Script?

余生颓废 提交于 2020-01-04 15:16:11
问题 I need to take the contents of a Google Doc and turn it into the HTML code equivalent (for sending as an HTML email), via Google Apps Script. I can read the file and get the text by cycling thru the elements in the body, but how would one get the formatting (bold, italic) into HTML? Via isBold(offset) and isItalic(offset) and cycling thru each character? Thanks for any help. ~ 回答1: This is perfectly doable using a document to compose your message, converting it to html format and using that

RegEx for Phone Number Numbers with Letters

本小妞迷上赌 提交于 2020-01-04 10:52:42
问题 I need to format a phone number as one long string of numbers (US Phone Number format) // I know there are tons more $phones = array( '1(800) 555-1212', '1.800.555.1212', '800.555.1212', '1 800 555 1212', '1.800 CALL NOW' // 1 800 225-5669 ); foreach($phones as $phone) { echo "new format: ".(preg_replace("/[^0-9]/", "", $phone)."<br />\n"; } Now this should return something like this: 8005551212 (with or without the 1) but how do I map/convert the number with CALL NOW to: 18002255669 回答1: You

Resize div along with content inside according to window size

与世无争的帅哥 提交于 2020-01-04 05:46:08
问题 I have looked up a million techniques and I can't get this to work and I know there is other posts similar to this. I'm sorry if it bugs anyone but I need specific instructions for my code cuz me stupid. Thank you so much in advance! I want the div container contentContactBox, along with all of the divs inside it, to proportionally resize when the browser window is resized. On the left side of the contentcontactBox is some text and on the right is a google map imbed. I want them all to shrink

Barplots in R: Strange Empty 1st Column

元气小坏坏 提交于 2020-01-04 02:34:40
问题 The following code creates a Barplot in R. However, the 1st column is empty. I don't understand why... There is no NA values in my data set. How can I remove the space between the "Bayview Column" and the Y-Axis? # 2. Bar Plot for Police District barplot(xtabs(~sample$PoliceDistrict), main="Police District Distribution of Incidents", xlab="Number of Incidents in Police District", ylab="Frequency", col=rainbow(nlevels(as.factor(sample$PoliceDistrict))), las=2, # cex.lab=0.50 This is for the x

How to pretty print using jq, so that multiple values are on the same line?

爱⌒轻易说出口 提交于 2020-01-04 02:11:31
问题 What I get from jq is: { "frameGrid": { "size": [ 24, 24 ], "dimensions": [ 1, 1 ], "names": [ [ "default" ] ] } } What I would like to see is something more like this: { "frameGrid": { "size": [24,24], "dimensions": [1,1], "names": [["default"]] } } I know both forms are valid, and that jq has a compact/pretty print mode. But is there something in-between? I'm looking to somehow format a larger json file that has many more array values than this, so that it's easily readable and printable.

How to align a text to justified in Crystal Reports?

柔情痞子 提交于 2020-01-03 19:38:36
问题 I have a text like below. ABC agrees to provide programming services for ABI ‎("‎CLIENT‎") ‎as described below under "‎Programming Services‎" ‎for <u>which CLIENT is to pay</u> a rate described in Attachment A. This text should be underlined and the whole text should be justified. I have used a formula field with TextInterpretation as HTMLText . The text is underlined, but it's not justified correctly. I tried to use TextObject , it's justified but the required text is not underlined. Please

How to align a text to justified in Crystal Reports?

给你一囗甜甜゛ 提交于 2020-01-03 19:38:15
问题 I have a text like below. ABC agrees to provide programming services for ABI ‎("‎CLIENT‎") ‎as described below under "‎Programming Services‎" ‎for <u>which CLIENT is to pay</u> a rate described in Attachment A. This text should be underlined and the whole text should be justified. I have used a formula field with TextInterpretation as HTMLText . The text is underlined, but it's not justified correctly. I tried to use TextObject , it's justified but the required text is not underlined. Please

Keep text formatting in SQL

丶灬走出姿态 提交于 2020-01-03 19:07:11
问题 I have a text area that inserts its content into a SQL table. Is there a way to keep the formatting of the text and then use it in HTML? 回答1: If you mean keep the Enters then replace the char 10 and char 13 with <br/> When using SQL (note the enters) select replace(' test test',' ','<br/>') This results in <br/>test<br/>test 回答2: I'll assume you're talking about preserving line breaks. Either: Output the text inside a <pre> tag or Convert newlines to <br /> tags before insertion to the DB. (E

Keep text formatting in SQL

放肆的年华 提交于 2020-01-03 19:07:08
问题 I have a text area that inserts its content into a SQL table. Is there a way to keep the formatting of the text and then use it in HTML? 回答1: If you mean keep the Enters then replace the char 10 and char 13 with <br/> When using SQL (note the enters) select replace(' test test',' ','<br/>') This results in <br/>test<br/>test 回答2: I'll assume you're talking about preserving line breaks. Either: Output the text inside a <pre> tag or Convert newlines to <br /> tags before insertion to the DB. (E