How can I read text of a current line (where cursor is situated) from Macros?
I'm going to use such a fucntion:
Public Sub AddTextToChangeLogFile()
Dim textOnACurrentLine As ???
textOnACurrentLine = ???
If textOnACurrentLine.Text <> String.Empty Then
Dim sw As New StreamWriter("C:\###\Changes.txt", True)
sw.WriteLine(textOnACurrentLine + ". file: " + DTE.ActiveDocument.Name)
sw.Close()
End If
End Sub
I am working on a Symfony project and I currently have this:
<?php echo preg_replace('/\n/','<br />', $review->getComments()); ?>
and would very much like to be able to make all getters add html line breaks so i don't have to pepper my code with preg_replace. the $object-getFieldname methods are work automatically so I am looking to extend this somewhere to globally add a new method. What is the best approach here?
Hello
I have printer in CUPS that due driver problems (hp 1010) form time to time goes into pause.
I would like to write a shell script that will be once per hour resuming printer in cups.
But I have no idea after googling for couple of minutes how to resume printer from shell command line.
Regards Stan
In the Korn shell on AIX UNIX Version 5.3 with the editor mode set to vi using:
set -o vi
What are the key-strokes at the shell command line to autocomplete a file or directory name ?
Is there a way in python to turn a try/except into a single line?
something like...
b = 'some variable'
a = c | b #try statement goes here
Where b is a declared variable and c is not... so c would throw an error and a would become b...
I just starting using a Mac and have been frustrated that command line options are required immediately following the command so that this works:
ls -la /usr
but this doesn't:
ls /usr -la
ls: -la: No such file or directory
Is there any way to change this? Or can someone tell me why the placement of options is agnostic on most Linux platforms, but not on Mac?
Hi everyone,
how to display record of the list in different line
['0 , INDIVS08 , ODI_TEMP', '1 , C$_0EMPLOYEES , ODI_TEMP', '2 , C$_0PACS08 , ODI_TEMP']
i want to display as
'0 , INDIVS08 , ODI_TEMP' ,
'1 , C$_0EMPLOYEES , ODI_TEMP',
'2 , C$_0PACS08 , ODI_TEMP'
Thanks for all of your help
I have another problem with this script:(
Here it is:http://www4.zippyshare.com/v/47586838/file.html
It says me: Undefined variable: arr in C:\wamp\www\FlashChat_v607\chat\inc\config.php on line 76
Please help me!I will appreciate your help:)
Not that I would want to use this practically (for many reasons) but out of strict curiousity I would like to know if there is a way to reverse order a string using LINQ and/or LAMBDA expressions in one line of code, without utilising any framework "Reverse" methods.
e.g.
string value = "reverse me";
string reversedValue = (....);
and reversedValue will result in "em esrever"
EDIT
Clearly an impractical problem/solution I know this, so don't worry it's strictly a curiosity question around the LINQ/LAMBDA construct.
Ok I just started a template for a website
http://clickforclicks.com/design1/
I'm trying to make it tableless.
Notice I have a red div along the side. I tried to get one on the otherside aswell that looked the same. But when I do it. It goes to a new line =[
How might I get this effect without using Javascript or Absolute positioning that wont look proper on all resolution sizes.
How do I remove the last two chars from each line in a text file using just Linux commands?
Also my file seems to have weird ^A delimiters in it. What char does ^A correspond to?
A periodic computer generated message (simplified):
Hello user123,
- (604)7080900
- 152
- minutes
Regards
Using python, how can I extract "(604)7080900", "152", "minutes" (i.e. any text following a leading "- " pattern) between the two empty lines (empty line is the \n\n after "Hello user123" and the \n\n before "Regards"). Even better if the result string list are stored in an array. Thanks!
When trying to use some of the commands from the Git bundle for TextMate (eg. 'Show Uncommited Changes') I get an error message like 'sh: line 1: git: command not found'.
How do I make TextMate work with Git?
With vim how do I to turn this:
t.string :crypted_password :null => false
t.string :password_salt, :null => false
into this:
t.string :crypted_password, :null => false
t.string :password_salt, :null => false
without manually adding the spaces to each line?
I wrote a foreach loop for my datagridview to write all rows to txt file.
I have a problem as it adds 2 empty lines at the end, as 1 row is full of empty cells after adding/reading to datagrid view.
Is there any way to omit the last line or delete it in txt?
foreach (DataGridViewRow item in this.DB.Rows)
{
foreach (DataGridViewCell item2 in item.Cells)
{
if(item2.Value != null)
filewrite.Write(item2.Value.ToString() + " ");
}
filewrite.WriteLine("");
}
My input file content is
welcome
welcome1
welcome2
My script is
for groupline in `cat file`
do
echo $groupline;
done
I got the following output.
welcome
welcome1
welcome2
Why it is not print the empty line. I want the reason.
I want to create a makefile variable that is a multi-line string (e.g. the body of an email release announcement). something like
ANNOUNCE_BODY="
Version $(VERSION) of $(PACKAGE_NAME) has been released
It can be downloaded from $(DOWNLOAD_URL)
etc, etc"
But I can't seem to find a way to do this. Is it possible?
Hi,
I have a line chart with four lines:
- Total
- A
- B
- C
It is a only a limited number of lines, and I want to allow the user to specify via input parameters what lines to show (i.e. ShowTotal, ShowA, ShowB, ShowC booleans).
Can it be done, and how?
How to use getStartupArgs()
Since 0.9.1 it seems you can read the command line arguments issue #245 with the getStartupArgs() method (documentation)
But I do know how to use it, I've put it in in all the Griffon lifecycle, Controller, Service, and I get the exception
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: [LifeCycle|Controller|Service].getStartupArgs() is applicable for argument types: () values: []
Caused by: groovy.lang.MissingMethodException: No signature of method: [LifeCycle|Controller|Service].getStartupArgs() is applicable for argument types: () values: [
]
How can I write to files using Python (on Windows) and use the Unix end of line character?
e.g. When doing:
f = open('file.txt', 'w')
f.write('hello\n')
f.close()
Python automatically replaces \n with \r\n.
Hi
I need to deploy my COM dll as a COM+ application. I used to do that from Component Services manager (dcomcnfg.exe). But my requirement is to deploy it from command-line. Is there a command to do that?
Thanks.
My application builds and prints HTML reports using AxWebBrowser.ExecWb method. Lately each time a report is printed a thin horizontal line is printed across it. It's not supposed to be there, it doesn't appear in any preview (Word, browser), but it's always there on the paper, always at the same absolute location and regardless of the printer type. Any ideas?