text-formatting

Creating columns of text with a variable width font

☆樱花仙子☆ 提交于 2019-12-06 02:39:45
问题 I'm trying to create coloumns of text for a C# app that will be running on MSN Messenger. I'm having trouple getting everything to line up. Here's an example of the output that I want: 1) Pizza Hut 123 Fake St. 2) Domino's Pizza 123 Fake St. 3) The Cheesecake Cafe 123 Fake St. 4) Capital Pizza & Steakhouse 123 Fake St. 5) Funky Pickle Pizza 123 Fake St. 6) Boston Pizza 123 Fake St. 7) Rose Bowl Rouge Lounge 123 Fake St. 8) Royal Pizza 123 Fake St. 9) A Columbus Pizza & Donair Inc 123 Fake St.

How to read output from linux process status (ps) command in R?

我只是一个虾纸丫 提交于 2019-12-05 08:54:35
here is the data.txt: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 2280 728 ? Ss 20:44 0:00 init [2] root 2 0.0 0.0 0 0 ? S 20:44 0:00 [kthreadd] root 202 0.0 0.0 0 0 ? S< 20:44 0:00 [ext4-dio-unwri root 334 0.0 0.1 2916 1452 ? Ss 20:44 0:00 udevd --daemon how to read the data into a data.frame? 1.can not to decide separator the last field is a problem, space can not be the separator, init [2] ,udevd --daemon are the one field,can not be separated by space . 2.no fixed width every line has different width. so ,how can i read the data.txt into a data.frame? I would do

Export the Eclipse XML Formatting Rules?

。_饼干妹妹 提交于 2019-12-05 06:56:05
Is there a way to export the settings defined in Window > Preferences Dialog under XML > XML Files > Editor in Eclipse 3.5 Galileo (Java EE Package)? And where do Eclipse stores these settings? Now i got an eclipse_xml_format.epf with the following content /instance/org.eclipse.wst.xml.core/lineWidth=120 /instance/org.eclipse.wst.xml.core/indentationChar=space /instance/org.eclipse.wst.xml.core/indentationSize=4 But i can't import this file! VonC The file recording those XML settings is: <workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.wst.xml.core.prefs That is:

Make xml more readable

独自空忆成欢 提交于 2019-12-05 00:48:08
问题 Is there any way to take an xml string in .net and make it easyer to read? what i mean is can i convert this: <element1><element2>some data</element2></element1> to this: <element1> <element2> some data </element2> </element1> is there any built in class for this? as sql server 2005 seems to remove all formatting on xml to save space or some thing... 回答1: If you're using .NET 3.5, you can load it as an XDocument and then just call ToString() which will indent it appropriately. For example:

Different textsizes in a button

时光毁灭记忆、已成空白 提交于 2019-12-04 19:35:32
问题 I want to create a button. This button contains a letter with a size of 22pixels and some letters to the right of it with a size of 16 pixels. Like this: How can I achieve this? At the moment I have this: private void setText(Button btn, String text, String underText) { Spannable span = new SpannableString(text + "\n" + underText); btn.setText(span); } 回答1: You can apply AbsoluteSizeSpan in your Spannable to make different size of Text in same content. private void setText(Button btn, String

Creating columns of text with a variable width font

℡╲_俬逩灬. 提交于 2019-12-04 06:47:53
I'm trying to create coloumns of text for a C# app that will be running on MSN Messenger. I'm having trouple getting everything to line up. Here's an example of the output that I want: 1) Pizza Hut 123 Fake St. 2) Domino's Pizza 123 Fake St. 3) The Cheesecake Cafe 123 Fake St. 4) Capital Pizza & Steakhouse 123 Fake St. 5) Funky Pickle Pizza 123 Fake St. 6) Boston Pizza 123 Fake St. 7) Rose Bowl Rouge Lounge 123 Fake St. 8) Royal Pizza 123 Fake St. 9) A Columbus Pizza & Donair Inc 123 Fake St. But because it is a variable width font it is displaying like this: 1) Pizza Hut 123 Fake St. 2)

Make xml more readable

为君一笑 提交于 2019-12-03 15:54:25
Is there any way to take an xml string in .net and make it easyer to read? what i mean is can i convert this: <element1><element2>some data</element2></element1> to this: <element1> <element2> some data </element2> </element1> is there any built in class for this? as sql server 2005 seems to remove all formatting on xml to save space or some thing... If you're using .NET 3.5, you can load it as an XDocument and then just call ToString() which will indent it appropriately. For example: using System; using System.Xml.Linq; public class Test { static void Main() { string xml = "<element1>

Nice bit of code to format an xml string

亡梦爱人 提交于 2019-12-03 03:01:08
Anyone got a ready made function that will take an XML string and return a correctly indented string? eg <XML><TAG1>A</TAG1><TAG2><Tag3></Tag3></TAG2></XML> and will return nicely formatted String in return after inserting linebreaks and tabs or spaces? The RTL has FormatXMLData in XMLDoc.pas that accepts and returns strings. Using OmniXML : program TestIndentXML; {$APPTYPE CONSOLE} uses SysUtils, OmniXML, OmniXMLUtils; function IndentXML(const xml: string): string; var xmlDoc: IXMLDocument; begin Result := ''; xmlDoc := CreateXMLDoc; if not XMLLoadFromAnsiString(xmlDoc, xml) then Exit; Result

Visual Basic richtextbox - setting specific text to Italic font style

空扰寡人 提交于 2019-12-02 06:56:00
问题 I have created a Richtextbox, which produces text based on user-inputted variables as well as some basic formatting - eg: name = txtname.text richtextbox1.text = "Hello my name is " & name & "." What i want to do is set the text in the name variable in Italics when it is displayed, like this. Hello my name is Bob . Best I've been able to find is to do with selection ranges, but not had any luck with that. Cheers! 回答1: Try this: Me.RichTextBox1.Rtf = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{

Apply multiple font colors to the text in a single Google Sheets cell

别说谁变了你拦得住时间么 提交于 2019-11-30 19:43:33
I am trying to format a cell to have multiple font colors using a function in Google Apps Script. I am unable to find any documentation on it. Also, using getFontColor() doesn't return anything useful. Is there any way to programmatically reproduce this functionality that is available to users via the Google Sheets web UI? The Sheets API is a bit daunting to start using, but allows very fine-grained control over your spreadsheets. You'll have to enable it , as it is an "Advanced Service". I strongly recommend reviewing the Sample Codelab . With the Sheets API, the TextFormatRun property can be