You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Donald Smith <Do...@audiencescience.com> on 2014/02/11 23:50:59 UTC

Warning about copying and pasting from datastax configuration page: weird characters in config

In http://www.datastax.com/documentation/cassandra/2.0/mobile/cassandra/install/installRecommendSettings.html  it says:

Packaged installs: Ensure that the following settings are included in the /etc/security/limits.d/cassandra.conf file:
cassandra - memlock unlimited
cassandra - nofile 100000
cassandra - nproc 32768
cassandra - as unlimited

But when I copy and paste those four lines to linux, it inserts periods  in the first two lines so it looks like this:
cassandra - memlock.unlimited
cassandra - nofile.100000
cassandra - nproc 32768
cassandra - as unlimited

This happens for both firefox and chrome.  And it happened for my coworker too (though for him the spaces after “memlock” and “nofile” were deleted).    If I paste to windows it doesn’t happen.

Using firebug, I found the HTML source:

<pre class="pre">cassandra‌·-‌·memlock&ensp;unlimited‌¶cassandra‌·-‌·nofile&ensp;100000‌¶cassandra‌·-‌·nproc‌·32768‌¶cassandra‌·-‌·as‌·unlimited‌¶</pre>

The HTML on that page http://www.datastax.com/documentation/cassandra/2.0/mobile/cassandra/install/installRecommendSettings.html seems fragile.



According to http://www.w3.org/TR/html4/sgml/entities.html:



<!ENTITY ensp    CDATA "&#8194;" -- en space, U+2002 ISOpub -->



There were other specious characters included in some config I pasted from there, and that caused headaches. Specifically, earlier I saw:

cassandraâ- memlock unlimited
cassandraâ- nofile 100000
cassandra - nproc 32768
cassandra - as unlimited

(with the weird â chars added).

Don


Donald A. Smith | Senior Software Engineer
P: 425.201.3900 x 3866
C: (206) 819-5965
F: (646) 443-2333
donalds@AudienceScience.com<ma...@AudienceScience.com>

[AudienceScience]


Re: Warning about copying and pasting from datastax configuration page: weird characters in config

Posted by Robert Coli <rc...@eventbrite.com>.
On Tue, Feb 11, 2014 at 3:23 PM, Andy Losey <an...@addthis.com> wrote:

> I think the issue you're running into is the same reason not to compose a
> script or config file in notepad. Without using a true text editor (vi), or
> relying on copy and past, you're very likely to introduce non visible
> formatting characters, as you see with you paragraph symbols. Trusting code
> right off a webpage isn't going to always be WYSIWYG.
>

I think that technical docs should generally be assumed to be safely
cut-and-pasteable; problems encountered when cut and pasting them should,
IMO, be fixed.

There was a related issue previously where datastax doc software CMS was
turning "--" into emdashes. It's likely that they are not aware of cases
(mobile, etc.) in which edge cases like this are occurring. They are,
however, very helpful people and very responsive when contacted. I have
added them (docs a t datastax d o t com) to the bcc: on this thread for
their information.

Docs guys - for context, read here :
http://www.mail-archive.com/user@cassandra.apache.org/msg34631.html

=Rob

Re: Warning about copying and pasting from datastax configuration page: weird characters in config

Posted by Michael Shuler <mi...@pbandjelly.org>.
On 02/11/2014 05:23 PM, Andy Losey wrote:
> I think the issue you're running into is the same reason not to
> compose a script or config file in notepad. Without using a true text
> editor (vi), or relying on copy and past, you're very likely to
> introduce non visible formatting characters, as you see with you
> paragraph symbols. Trusting code right off a webpage isn't going to
> always be WYSIWYG.

Granted, I was using chrome and vi on a linux laptop and did have a 
couple different odd pastes after copying from the mobile page - no 
strange inserted characters, just incomplete text from what I actually 
highlighted.  I don't have any issues from the standard page.

-- 
Michael

Re: Warning about copying and pasting from datastax configuration page: weird characters in config

Posted by Andy Losey <an...@addthis.com>.
I think the issue you're running into is the same reason not to compose a script or config file in notepad. Without using a true text editor (vi), or relying on copy and past, you're very likely to introduce non visible formatting characters, as you see with you paragraph symbols. Trusting code right off a webpage isn't going to always be WYSIWYG.

Sent from my 21st century device.

> On Feb 11, 2014, at 6:01 PM, Donald Smith <Do...@audiencescience.com> wrote:
> 
> The same problem happens with the non-mobile page: http://www.datastax.com/documentation/cassandra/2.0/webhelp/index.html#cassandra/install/installRecommendSettings.html
> 
> I used the mobile page because someone embedded that link in a wiki page I was referring to.  (I'll change the link.)
> 
> Don
> 
> -----Original Message-----
> From: Michael Shuler [mailto:mshuler@pbandjelly.org] On Behalf Of Michael Shuler
> Sent: Tuesday, February 11, 2014 2:58 PM
> To: user@cassandra.apache.org
> Subject: Re: Warning about copying and pasting from datastax configuration page: weird characters in config
> 
>> On 02/11/2014 04:50 PM, Donald Smith wrote:
>> In
>> http://www.datastax.com/documentation/cassandra/2.0/mobile/cassandra/install/installRecommendSettings.html
>>  it says:
> 
> Just curious.. why are you using the mobile site on a desktop, instead of the main page? [0]
> 
> --
> Michael
> 
> [0]
> http://www.datastax.com/documentation/cassandra/2.0/webhelp/index.html#cassandra/install/installRecommendSettings.html

RE: Warning about copying and pasting from datastax configuration page: weird characters in config

Posted by Donald Smith <Do...@audiencescience.com>.
The same problem happens with the non-mobile page: http://www.datastax.com/documentation/cassandra/2.0/webhelp/index.html#cassandra/install/installRecommendSettings.html

I used the mobile page because someone embedded that link in a wiki page I was referring to.  (I'll change the link.)

 Don

-----Original Message-----
From: Michael Shuler [mailto:mshuler@pbandjelly.org] On Behalf Of Michael Shuler
Sent: Tuesday, February 11, 2014 2:58 PM
To: user@cassandra.apache.org
Subject: Re: Warning about copying and pasting from datastax configuration page: weird characters in config

On 02/11/2014 04:50 PM, Donald Smith wrote:
> In
> http://www.datastax.com/documentation/cassandra/2.0/mobile/cassandra/install/installRecommendSettings.html
>   it says:

Just curious.. why are you using the mobile site on a desktop, instead of the main page? [0]

--
Michael

[0]
http://www.datastax.com/documentation/cassandra/2.0/webhelp/index.html#cassandra/install/installRecommendSettings.html

Re: Warning about copying and pasting from datastax configuration page: weird characters in config

Posted by Michael Shuler <mi...@pbandjelly.org>.
On 02/11/2014 04:50 PM, Donald Smith wrote:
> In
> http://www.datastax.com/documentation/cassandra/2.0/mobile/cassandra/install/installRecommendSettings.html
>   it says:

Just curious.. why are you using the mobile site on a desktop, instead 
of the main page? [0]

-- 
Michael

[0] 
http://www.datastax.com/documentation/cassandra/2.0/webhelp/index.html#cassandra/install/installRecommendSettings.html