formatting

Gnuplot smooth confidence interval lines as opposed to error bars

非 Y 不嫁゛ 提交于 2019-12-18 23:04:26
问题 I'd like a 95% confidence interval line above and below my data line - as opposed to vertical bars at each point. Is there a way that I can do this in gnuplot without plotting another line? Or do I need to plot another line and then label it appropriately? 回答1: You can use the filledcurves style to fill the region of 95% confidence. Consider the example data file data.dat with the content: # x y ylow yhigh 1 3 2.6 3.5 2 5 4 6 3 4 3.2 4.3 4 3.5 3.3 3.7 and plot this with the script set style

What's the best way to get the UTC offset in Perl?

假如想象 提交于 2019-12-18 21:28:10
问题 I need to get the UTC offset of the current time zone in Perl in a cross platform (Windows and various flavors of Unix) way. It should meet this format: zzzzzz, which represents ±hh:mm in relation to UTC It looks like I should be able to get it via strftime() , but it doesn't appear to be consistent. Unix: Input: perl -MPOSIX -e "print strftime(\"%z\", localtime());" Output: -0700 Windows: Input: perl -MPOSIX -e "print strftime(\"%z\", localtime());" Output: Mountain Standard Time While it

Formatting the results of a MySQL query as if it were run from the console

走远了吗. 提交于 2019-12-18 19:09:32
问题 I'm writing a quick and dirty reporting script that queries a report and emails the results. When using the MySQL console the results are in a nicely formatted table: mysql> select * from users; +-----------+------------+-------+ | firstname | city | zip | +-----------+------------+-------+ | Maria | Holland | 12345 | | Rene | Doylestown | 65432 | | Helen | Conway | 98745 | +-----------+------------+-------+ 3 rows in set (0.01 sec) Is there an easy way to replicate this formatting when

Jquery Mobile - Using image as link - Blue line below image

喜夏-厌秋 提交于 2019-12-18 18:40:05
问题 I'm attempting to use thumbnail images as buttons in JQM. I'm aware that JQM adds some formatting and styles. I have the image buttons looking and behaving exactly as I want them except for one thing -- on my phone a blue underline is added to all images that are being used as links. Some info: -My phone is a Samsung Galaxy SII Skyrocket - Android version 2.3.5 -The blue line does not appear in the most recent versions of Firefox, Google Chrome, IE, or Safari. -The functionality appears to

Emacs code to automatically set indent-tabs-mode according to existing code

折月煮酒 提交于 2019-12-18 15:17:40
问题 Is there ready Emacs code/package to automatically set indent-tabs-mode according to the file being visited? That is, if the currently visited file uses tabs for indentation, indent-tabs-mode should be set buffer-locally to true. Correspondingly if spaces are used, indent-tabs-mode should be set to false. The purpose of this is to automatically detect and use the tab mode of an existing project (without needing Emacs-specific file variable annotations), to stay consistent with the tab style

TimeSpan “pretty time” format in C#

匆匆过客 提交于 2019-12-18 14:13:09
问题 Typing in the title to this question brought me to this question. I'm looking for the same thing, but something perhaps less statically formatted if you get what I mean? I'm writing a quick program that will be taking a TimeSpan duration of two DateTime objects and outputting them for printing to paper. The format that would be preferred is: XX days, YY hours, ZZ minutes (seconds are irrelevant; as are days because I don't expect the timespan to incorporate more than a few hours). Say the

In C#, what is the best method to format a string as XML?

允我心安 提交于 2019-12-18 13:54:08
问题 I am creating a lightweight editor in C# and would like to know the best method for converting a string into a nicely formatted XML string. I would hope that there's a public method in the C# library like "public bool FormatAsXml(string text, out string formattedXmlText)", but it couldn't be that easy, could it? Very specifically, what would the method "SomeMethod" have to be that would produce the output below? string unformattedXml; string formattedXml; unformattedXml = "<?xml version=\"1.0

JQuery/JS Markdown plugin?

£可爱£侵袭症+ 提交于 2019-12-18 13:34:06
问题 I'm writing a chat app, and I'd like to add some simple functionality where users use markup to affect text formatting, like bold or italics . I'm envisioning this would be like how it is done on Google Talk or StackOverflow. Does JQuery have any plugins to do this? 回答1: stackoverflow is using WMD editor. You can use WMD editor code. It's written by javascript. check http://blog.stackoverflow.com/2009/01/wmd-editor-reverse-engineered/ For WMD to HTML , you can use ShowDown javascript. Github

Vba check if partial bolding in cell

混江龙づ霸主 提交于 2019-12-18 13:18:10
问题 I'm generating XML from a list of text within a worksheet but I cant figure out how to check if the current cell has a bold word within it. What I need to do is check each cell in column A, read the text into a string, if I hit any bold words add the tags around it. I know you can read a cells contents character by character but not its formatting. Any help would be greatly appreciated! 回答1: Here is a way that you can use to check if the cell has Mixed characters which are bold. In this case

Formatting Zero Values as Empty String?

╄→гoц情女王★ 提交于 2019-12-18 13:01:27
问题 I'm struggling with my first foray into WPF string formatting. I'd like to be able to format a textbox column in a data grid with an empty string when the underlying value is zero and format all other values as 0.000. However, my XAML doesn't seem to be up to the job as it shows blanks for all values and not just for zeros: <DataGridTextColumn Header="dL" Binding="{Binding Path=Value.DLHistoric, StringFormat='{}{0.000;; }'" Width="Auto" /> I am using the semicolon operator as described here