This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

problem in copying

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whenever i copy a source code from javaranch to test it on my computer every line gets a number. so i have to delete all those no. going in in each line. its really annoying sometime because sometime they are very big. i know how to delete those no. on one go in microsoft word but i cant install that since i dont have it. also i dont want so install it since i am low on disk space. can someone please tell me how select only those no. to delete.i mean they look something like that

1. class join{
2. public static void main(String[] args){
3. new join().go();
4. }

i cant go in each line to delete them
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
search the link (view plain) on the code.
click on the "view plain" link and a pop up will open that will display only the code not the line numbers.

you will find the links like => "view plain" "copy to clipboard" "print" "?"
 
Sheriff
Posts: 21974
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If proper code blocks are used I don't get that problem. I can simply select everything, copy it and it won't include any line numbers.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I don't "View Plain" I get # instead of the line numbers: this behavior is browser-dependent (FF = #, Chrome = nothing).

Chrome:FF
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Ranch Office, btw.
 
Rob Spoor
Sheriff
Posts: 21974
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a browser issue. IE6, IE8, Opera, Chrome and Safari all omit the line numbers. Firefox shows either the line numbers (if all text is selected) or # (if only part is selected).
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Rob Prime wrote:It's a browser issue. IE6, IE8, Opera, Chrome and Safari all omit the line numbers. Firefox shows either the line numbers (if all text is selected) or # (if only part is selected).



Interesting, I didn't know that some browsers don't select the numbers/pound signs. I'll have to have a look at the Javascript and see if I can figure out why Firefox does.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firefox does it when you copy items in a list

Eric
 
    Bookmark Topic Watch Topic
  • New Topic