formatting

Change color of output. PHP

我只是一个虾纸丫 提交于 2020-01-07 03:03:58
问题 I created an script that returns interface status from cisco router/switch. Now, i want to change the color of my text based on the word Ex: connected=green notconnected=red Is this possible ? part of my script: $host = "hostname"; $name = "my.username\r"; $pass = "mypassword\r"; $form = <<<END <form method='post' action='' style='margin:auto; width:400px'> Adresa IP host : <input type='text' name='host'><br><br> <input type='submit' name='submit' value='Connect'> </form> END; echo '<img src=

Add word document and keep formatting

ε祈祈猫儿з 提交于 2020-01-07 02:50:42
问题 I am attempting to add my CV to the end of a document. The following code does just that but the formatting of the CV is messed up once it is inserted into the new document. Can I insert the file and keep the original formatting of the CV (I dont want to copy and paste from an open document): objword1.Selection.InsertFile Filename:=cv1Address, _ ConfirmConversions:=False, Link:=False, Attachment:=False 回答1: I'm afraid that you can't use the InsertFile-method but have to open the file and copy

How to highlight text in a Word document using Visual Basic

这一生的挚爱 提交于 2020-01-06 18:12:32
问题 I can't believe I'm not able to find the answer to this (simple) question, but I can't. (This for instance didn't really help, nor could I find an answer here.) All I want to do is to figure out how to use Visual Basic (not VBA) to programmatically (i) change the font colour in a specific paragraph or range in a Word document, or (ii) highlight the same text in the document. I've used various permutations of: myDoc.range.font.ColorIndex = Word.WdColor.wdColorRed myDoc.range.Highlight = Word

Parent container not expanding to child elements

随声附和 提交于 2020-01-06 14:58:20
问题 I have a bunch of vertically aligned tab items in which and I can't seem to get the parent container (the <a href...> in my HTML) to expand to cover the child elements. I've tried using a <br style="clear: both"> and overflow: hidden; but the first didn't do anything and the second just cut it off (using auto just added a scroll bar, which doesn't help) any thoughts on how to fix it? HTML sample: <li class="active"> <a href="#pane1a" data-toggle="tab"> <div class="preview-box"> <img class=

Render a newline in my data inside a jqGrid cell

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 06:09:14
问题 First off, I'm using version 3.7.1 with a jQuery UI framework theme. I'm trying to figure out how to have a newline or even a <br /> render inside of a jqGrid cell. An example of what I'm looking to have happen: ________________________________________________________ Item 1 | some data | Applies to OS 1 Applies to OS 2 Applies to OS 3 Applies to OS 4 __________________________________________________________ Item 2 | some data | Applies to OS 1 _______________________________________________

Render a newline in my data inside a jqGrid cell

梦想的初衷 提交于 2020-01-06 06:08:25
问题 First off, I'm using version 3.7.1 with a jQuery UI framework theme. I'm trying to figure out how to have a newline or even a <br /> render inside of a jqGrid cell. An example of what I'm looking to have happen: ________________________________________________________ Item 1 | some data | Applies to OS 1 Applies to OS 2 Applies to OS 3 Applies to OS 4 __________________________________________________________ Item 2 | some data | Applies to OS 1 _______________________________________________

Intellij Formatter keeps moving method level annotation and method signature in one line

不羁的心 提交于 2020-01-06 05:53:06
问题 I have tried several formatter settings in the IDE but I am not able to achieve following: @Test public void testMethod(){ .............. } IntelliJ keeps changing above code to: @Test public void testMethod(){ .............. } Has anyone been able to figure this out? 回答1: go to Settings and then go to Editor --> Code Style --> Java , then switch to tab Wrapping and Braces , node Keep when reformatting , checkbox Line breaks . Switch this checkbox on . Also look at Method annotations This

BaseX get line-breaks return between node-data

ぃ、小莉子 提交于 2020-01-06 03:23:50
问题 I'm using BaseX as my XML based DB. I make a simple query like xquery for $Book in /Libraray/Literaturelist/Literature/Title return fn:data($Book) I get all titles, just as a String that has got no line breaks. Is there a way to add line-breaks with XQuery after each node found by the query to separate the data? This is not really dependant on my XML file because I do not add line-breaks hardcoded within the tags. ;) 回答1: it depends on how you retrieve the query results. The most elegant way

Read a floating point data with F descriptor

为君一笑 提交于 2020-01-06 02:47:07
问题 I have a data file in the following format: 76 1 28.19345173 20.57121917 21.66248682 77 1 30.48106325 37.84001977 19.95790222 78 1 30.49966847 38 20.68928893 79 1 1.246861056 0.6998957711 34.74201206 I need to do some manipulation on this data file. Thus, I started writing a code to read the 4 last columns of the data file. Here is the format I used to read the wanted information and write it in a new file: Reading Format : format(21x,f16.11,10x,f16.11,10x,f16.11) Writing Format: format(A1,1x

Retain formatting when copying from word to outlook

爷,独闯天下 提交于 2020-01-05 17:49:10
问题 I have a code which replaces the text of certain format into a hyperlink. This code works during an incoming email. Incoming email -> copy the email to word editor(formatting lost) -> make necessary changes -> copy from word editor to outlook mail item(again replaced hyperlinks gets lost in mail item) My code is here for your refernce.. Sub IncomingHyperlink(MyMail As MailItem) Dim strID As String Dim Body As String Dim objMail As Outlook.MailItem Dim strtemp As String Dim RegExpReplace As