Displaying 20 results from an estimated 282 matches for "carriage".
2010 May 11
1
has_one/belongs_to -- accessing the subordinate
...e/belongs_to relationship, what''s the best way to guarantee
that the belongs_to object gets created and is accessible alongside the
has_one object? I *think* the after_create callback is a good choice,
but I discovered an oddity while trying it.
F''rinstance, if every horse has a carriage:
============
ActiveRecord::Schema.define do
create_table(:horses) {|t| t.timestamps }
create_table(:carriages) {|t| t.timestamps; t.integer :horse_id }
end
class Horse < ActiveRecord::Base
after_create :create_carriage
has_one :carriage, :dependent => :destroy
private
def creat...
2007 Mar 08
1
reading a text file with a stray carriage return
...I'm hoping someone has a suggestion for handling a simple problem. A
client gave me a comma separated value file (call it x.csv) that has
an id and name and address for about 25,000 people (25,000 records).
I used read.table to read it, but then discovered that there are stray
carriage returns on several records. This plays havoc with read.table
since it starts a new input line when it sees the carriage return. In
short, the read is all wrong.
I thought I could write a simple function to parse a line and write it
back out, character by character. If a carriage re...
2019 Sep 06
2
[PATCH 1/1] log: do not print carriage return
From: Christian Hesse <mail at eworm.de>
Logging to stderr results in line endings being terminated with carriage
return (\r) and new line (\n). While this is fine for terminals it may
have undesired effects when running from crond and logging to syslog
or similar.
I run ssh from cron on an recent linux host. Viewing logs with
journalctl I see:
Sep 06 16:50:01 linux CROND[152575]: [96B blob data]
Adding swi...
2006 Nov 13
2
Embedded carriage returns in text document
...) and Linux (RedHat 9). To
read data from an Excel spreadsheet, I do "save as" in Excel, then
select the "Text (tab-delimited)" format. The resulting file uses a
tab separator and I can usually read the file using read.delim.
Sometimes, the header row contains embedded carriage returns. When I
view the file, these carriage returns appear as "^M".
Now the problem:
When I read.delim these files, they do not read correctly. Sometimes
I get error messages; sometimes only the first line is read.
Interestingly, invoking the option skip=1 (or a larger N) doe...
2006 Aug 19
1
need to find (and distinguish types of) carriage returns in a file that is scanned using scan
...In one part of this file there is a chunk of text within which i need to know the positions of line breaks. But scan seems only
An example of the file is:
"
a 0 1 0
bftt 020
cftt T 1 R
a 0 1 2 1 2
b 0 1 2 2 2
c 0 10 00
"
so precisely i need in the scanned file in R to know where each carriage return is in the file so that i can then identify the text strings (i.e. a, bftt, cftt, a, b, c ) that immediately follow the carriage return
On a subsidiary matter, it would be very helpful if i could distinguish between Unix, Dos, and Mac carriage returns in the data file
thanks
i should note...
2012 Apr 04
3
Remove carriage return in writing tab-delimited file.
Having problems with the write.table function. I can write a tab delimited
file just fine, but for each line in my matrix its inputs a carriage return
when i dont want it to.
For example my matrix might be:
ID V1 V2 V3
FARY1004 1 2 3
FARY2067 2 3 1
FARY4587 2 2 2
And I want the written File to be:
FARY1004 1 2 3FARY2067 2 3 1FARY4587 2 2
2
TIA
--
View this message in context: http://r.789695.n4.nab...
2012 Jun 25
1
Replacing text with a carriage return
I have a comma separated data file with no carriage returns and what
I'd like to do is
1. read the data as a block text
2. search for the string that starts each record "record_start", and
replace this with a carriage return. Replace will do, or just add a
carriage return before it. The string is the same for each record, but...
2006 Jul 05
3
splitting a story with double-spaced para''s
Quick question - if i want to separate a long string of text, separated
by single carriage returns, into an array of paragraphs, I can use the
following code:
paragraphs = article.content.split("\n")
The "\n" means a carriage return, as far as I can tell.
If I wanted to take text, that had been written using the more common
double carriage returns, into an array...
2009 Sep 01
2
antispam-plugin 1.2 and trailing carriage-returns
Guys,
Dovecot 1.0.15 [1], just built the latest antispam-plugin 1.2 (tarball)
for testing, mailtrain backend for SA integration. Both built from
custom spec files.
The mail that is being trained is different than its respective source
in the mbox file. The trained one shows added, trailing carriage-return
chars for all headers, which are not in the headers in the mbox file.
This breaks sa-learn -- both these variations are different, and SA
would learn *both* when run against each one separately.
How comes? Any insight? How could I fix this, other than wrapping the
sa-learn inside another s...
2010 Aug 04
1
Carriage return character issue
Hi all,
I imported a file (in CSV format) into R for processing, then imported the
result into MySQL. However, there are *carriage return* characters
(hexadecimal: *0D*) that are appended to the characters in the last field of
the table.
i.e *\r* appended to the character values (as shown below)
Before importing into MySQL: asdf
After importing into MySQL: asdf*\r*
**
**
Are there any options in the function "dbWriteT...
2007 Mar 19
1
Carriage returns and Sweave output
Dear all,
I have a code chunk in my Rnw file that, when executed, outputs
carriage return characters ('\r') to inform on the progress (e.g.
"sweep 4 of 1024\r"). But Sweave interprets this as a newline
character, and therefore I get countless pages of output in my
vignette where I only really want one line. Any ideas?
Thanks
E
2012 Apr 15
1
no carriage returns in BATCH output from 2.15.0
It seems like I must be missing something
since I haven't been able to find mention
of this.
Under Windows 7 I'm not getting carriage returns
in the output of BATCH files using 2.15.0 (both
64-bit and 32-bit). They are in the startup
messages, but not for the real output. Is this
on purpose?
Pat
--
Patrick Burns
pburns at pburns.seanet.com
twitter: @portfolioprobe
http://www.portfolioprobe.com/blog
http://www.burns-stat.com...
2006 Mar 17
4
cat(), Rgui, and support for carriage return \r...
...il, so would like to solicit input from this list.
I am successfully using
cat("\rBootstrap replication ", i, " of ", boot.num,)
flush.console() # To flush stdout on windows systems
which works as expected on *NIX systems and using Rterm under windows.
However, under Rgui the carriage return \r is ignored, and I certainly
don't want to use the newline escape sequence \n. Under Rgui it appears
as
Bootstrap replication 1 of 399Bootstrap replication 2 of 399Bootstrap...
but I want it to function properly if at all possible.
My question is simply whether there is a portable w...
2008 Aug 11
1
Unwanted carriage returns storing dataframes with dbWriteTable
If I save a dataframe with a character-typed last column to a relational
database with dbWriteTable, the values in the last column of the
resulting table in the database will have a '\r' (carriage return)
appended. If I read back the dataframe with dbReadTable the last column
in the resulting dataframe has also '\r' appended (see protocol below).
Setting or unsetting sql-mode (in the SQL-Server Version 5.0) to or from
'NO_BACKSLASH_ESCAPE' has no effect on this behavour ?...
2011 Jun 22
0
jslint and carriage returns
Hi, jslint doesn''t seem to like the carriage returns in the mapstraction files.
Is there a way around this? I didn''t see an option for it.
-Mike
2008 Oct 13
1
Perl CGI scripts - stripping out unwanted carriage returns etc
...work - the error log says:
No such file or directory: exec of '/var/www/cgi-bin/script.cgi' failed
Premature end of script headers: script.cgi etc
By comparing two identical very simple cgi scripts (one works, the other
doesn't), I've traced the problem to, apparently, unwanted carriage
returns which have somehow got into the perl text files. Is there a
quick and easy way (ie piece of software) to strip out these things, or
do I have to do it manually?
Thanks for any help,
Andy
2006 Feb 22
3
[OT] Email line separator
What line separator do you use when composing emails?
1. \n
2. \r\n
3. \r
Is there a ''official'' line separator for emails (rfc-document?)?
What separator is the most compatible between Windows, OS X and Linux?
--
Norman Timmler
http://blog.inlet-media.de
1999 Jul 16
3
Carriage Returns in files after copying
I apologize in advance if I'm wasting bandwidth with a simple question, but
I was unable to find a solution for this problem in the documentation...
I've got a set of shares set up on a SUN Enterprise 5500 using Samba 2.0.4.
In Windows NT, I map a drive to the share. When I copy a text file from
Windows NT to the SUN, editing the file in UNIX shows that ^M has been added
to the end of
2010 Apr 21
3
metaflac: malformed vorbis comment field field contains no '=' character
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Josh Coalson @ 04/19/2010 06:40 PM:
> I would have to see a file sample to debug it.
here you are:
http://www.sendspace.com/file/wgn39q
sorry for the large size, but it is actually the smallest one on the
album that was exhibiting the issue. hopefully you enjoy it...
classical japanese music from the edo period. ;)
-----BEGIN PGP
2023 Nov 10
1
Question about stderr output containing carriage return External
Hi all,
I have recently only discovered that openssh prints lines to stderr
separated by CLRF pairs, and am trying to understand where this
behavior comes from.
This behavior can be seen here:
--snip--
$ ssh u at u 2>&1 | sed -n l
ssh: Could not resolve hostname u: Name or service not known\r$
--snip--
I have seen section 11.3 from rfc4253, but am unsure whether that is
the origin of