formatting

Background Color based on difference with cell

夙愿已清 提交于 2019-12-13 07:17:30
问题 I am trying to create a VBA code which allows me to allocate background colors to a cell based on its difference with the neigbouring cell to the left. Allow me to explain: http://imgur.com/UUfaFRA When you look at the image above you can see: C3 is red because it's value is higher than B3 . C4 has no color as it's value is equal to B4 C5 is green because it's value is lower than B5 I tried to put this into a VBA code but don't succeed: Sheets("x").Range("C3").FormulaR1C1 = "=IF(RC>RC[-1]

Manually changing the size of the Bubbles for Plotly Bubble Map in R

妖精的绣舞 提交于 2019-12-13 07:15:54
问题 I am currently trying to change the sizes of the Bubbles for Plotly's bubble map manually. I was successful in changing the colors of the map using the data provided but I am unable to use the same logic to change the size. To change the colors I simply called: colors_wanted <- c("red", "blue", "black", "pink") and passed this command to colors within plot_ly . Do you think it is possible to change the sizes rather than using the formula in this case sqrt to claim the sizes? library(plotly)

How to -remove multiple items at once?

徘徊边缘 提交于 2019-12-13 06:34:57
问题 I currently have a list of 25,000+ server names. Each name has a ton of extra stuff added on to the name, which I want to remove. Here is a sample data: WindowsAuthServer @{htew804WIN} I want to remove "WindowsAutherServer @{" and "WIN}" from each server, leaving just "htew804" left. I currently have: $remove1 = $file -remove "WindowsAutherServer @{","" $final = $remove1 -remove "WIN}","" This works, but I would like to do it all in one step if possible. Can this be done? 回答1: This RegEx

Formatting nested lists/tuples

a 夏天 提交于 2019-12-13 05:53:24
问题 I have an output (a long one!) from some function, which looks in this way: [[(0.0, 1.0, 2.0), (1.0, 2.0, 0.0), (2.0, 1.0, 0.0)], [(1.6324986294474886e-06, 1.000000272083105, 1.9999992744450537), (1.0, 1.9999985559929883, 9.626713411705526e-07), (1.9999957124111243, 1.000000714598146, 9.527975279416402e-07)], ......................, [(0.00016488526381860965, 1.0000274825531668, 1.9999267116402146), (0.9999999810184469, 1.9998541492231847, 9.723903843230245e-05), (1.9995669148822666, 1

How would you format/indent this piece of code?

天涯浪子 提交于 2019-12-13 05:52:08
问题 How would you format/indent this piece of code? int ID = Blahs.Add( new Blah( -1, -2, -3) ); or int ID = Blahs.Add( new Blah( 1,2,3,55 ) ); Edit: My class has lots of parameters actually, so that might effect your response. 回答1: I agree with Patrick McElhaney; there is no need to nest it.... Blah aBlah = new Blah( 1, 2, 3, 55 ); int ID = Blahas.Add( aBlah ); There are a couple of small advantage here: You can set a break point on the second line and inspect 'aBlah'. Your diffs will be cleaner

Excel Conditional Formatting Two lists on different spreadsheets

你。 提交于 2019-12-13 05:46:22
问题 I have two lists, List A and List B , on two different spreadsheets, that I need to compare and format. List A is a reference list with two columns, Name and Type . List B contains only one column, Name , and may contain some of the names in List A and not necessarily in that order. With conditional formatting I want to use List A to format List B's names depending on the type specified for the name in the Type column in List A. I have tried with some different formulas but not got it to work

Why is the Highcharts tick placement different in two similar charts?

最后都变了- 提交于 2019-12-13 05:26:40
问题 I have a question regarding the tick placement in two similar Highcharts chart. In the first example, I have specified the xAxis property and in the second example I have specified an x and y value in the series. The data is exactly the same, but as you can see the ticks are placed differently. I have tried to play around with the tickmarkPlacement , minPadding , maxPadding to make the first example look like the second, but without success. Could someone tell me wy the two charts, place

Java NumberFormat with equivalent negative and positive pattern

杀马特。学长 韩版系。学妹 提交于 2019-12-13 04:55:21
问题 I want to format a number without any prefix (or the same prefix) for both positive and negative numbers. The specification of NumberFormat states that you can specify a sub pattern for positive numbers and a sub pattern for negative numbers, separated by a semicolon. Each subpattern has a prefix, numeric part, and suffix. The negative subpattern is optional; if absent, then the positive subpattern prefixed with the localized minus sign ('-' in most locales) is used as the negative subpattern

TinyMCE formatted text in MySQL database

拜拜、爱过 提交于 2019-12-13 04:07:13
问题 I have been searching for an answer for this for quite some time now, and I haven't been able to find a logical one yet. I want to use TinyMCE to allow users to post formatted blogs. I don't want to force the user to use HTML tags in the textarea to put a new paragraph, they should just be able to hit the return key to get a new line, push a button to get bolded text, etc... My question is, if I am storing these blog posts in a mysql database, how can I preserve the formatting in the database

Text de-justification to get correct substring

情到浓时终转凉″ 提交于 2019-12-13 04:04:05
问题 I have a text file which is made up with justify (all tabs aligned - different size). Therefore I can't get the desired value at a certain column (substring). Since this is a migration I can't change the format of the file. How can I "de-justify" the text to spaces while preserving the spacing length, any scripts out there? I need the upper value. replacing \t with a fixed value doesn't help. *EDIT: files seems to be formatted with fmt *EDIT2: Solution found it seems; when I use fmt on