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?
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.
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!
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?
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?
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.
I have a C# string object that contains the code of a generic method, preceded by some standard C-Style multi-line comments.
I figured I could use System.Text.RegularExpressions to remove the comment block, but I can seem to be able to get it to work.
I tried:
code = Regex.Replace(code,@"/\*.*?\*/","");
Can I be pointed in the right direction?
When I use \LaTeX{} to show the LaTeX logo, the following line of text is pushed down in order to accommodate the subscript 'E' in LaTeX.
How do I override this? Is there an option I can pass to \LaTeX{} ?
I was just messing around with Apple's GLPaint sample app to learn more about OpenGL, and I noticed that whenever you draw a line, it's always preceded by a dot. Basically, it looks like:
.________
Does anyone know why this happens? I'm guessing it's some weirdness with touchesBegan/Moved/Ended, but I can't verify. It's been driving me crazy all morning!
I would like to insert a line break into the first space between words in a string variable. Here is my code so far:
<cfset myPosition = find(" ", #myVar#)>
<cfset lineBreak = Chr(13)&Chr(10)>
<cfset myVar = insert(#lineBreak#, #myVar#, #myPosition#)>
What am I doing wrong?
Let say i want to read the integers a, b and c from stdin (in one line, do not need to press return after each number). In c++, i would just do:
cin a b c;
How to do this in Python ?
Web config has debug=true and the project is a debug build and the pdb files are present in the bin directory, but I do not get line numbers in my stacktrace when an execption is thrown.
Works fine with local IIS/Cassini but not on our test IIS servers. Is there some obvious setting that I might be missing?
Hi,
I have drawn NSTextView object on NSView, which i added by calling addSubview method.
When I enter text and press enter text i had entered come down by one line correspondingly.
What can be the reason behind it, and how to cope with this problem.
I have alignment file and long record in it. Suppose while displaying to an end user i want to show Sequence ID and 50 sequences in each line and continue further till the end of file.
Can anyone suggest me algorithm or example code in python.
Thanks in advance
Hi,
I'm getting this error when trying to restore an SSAS database from a backup:
The ddl2:MemberKeysUnique element at line 63, column 4862 (namespace http://schemas.microsoft.com/analysisservices/2003/engine/2) cannot appear under Load/ObjectDefinition/Dimension/Hierarchies/Hierarchy.
Google hasn't turned up any helpful solutions. (a lot of people found that installing SP2 made the error go away but this has always previously worked in our environment)
I don't really understand what the error means. Can somebody interpret or suggest a fix?
Thanks,
Phil
Hello
I already wrote a program that read locations from android GPS ; each locatin(long , lat) will be sent to remote server to save it and display it in a website map.
what I'm trying to do now is to display my path in android by drawing line between the points
I didn't find any sufficient answer until this moment! so how this can be done?
Is it possible to create, for instance, a box model hack while using in-line CSS?
For example:
<div id="blah" style="padding: 5px; margin: 5px; width: 30px; /*IE5-6 Equivalent here*/">
Thanks!
I have a Line Series Chart in Flex with values from 0 to 90. I would like to set the background of the chart in such a way that, 0 - 30 is in green, 31 - 60 is in red and 61 - 90 is in blue.
I am new to Flex. Can someone tell me how this can be done?
\documentclass{book}
\usepackage{amsmath}
\usepackage[german]{babel}
\usepackage{amssymb}
\usepackage{amsxtra}
\usepackage[dvips]{epsfig,psfrag}
\usepackage{listings}
....
this is how my file starts. I didn't even edit it, I received it like this. However, if I want to make a pdf, it gives me the undefined control sequence error at the first line... What is wrong??
Hi, if I have a input with new lines in it like:
[INFO]
xyz
[INFO]
How can I pull out the xyz part. I tried a pattern like /^\[INFO\]$(.*?)$\[INFO\]/ms, but perl gives me:
Use of uninitialized value $\ in regexp compilation at scripts\t.pl line 6.
I've been trying things to get interpolation to stop like using qr// but alas, no love.
hi,
I'm using Drupal for a website, and I've a link "Unselect All" to deselect all items.
How can I remove the dotted line around "Unselect All" when I click on it ?????
This is the link: http://www.sanstitre.ch/drupal/
thanks