Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

For Rahul Mahindrakar  RSS feed

 
sunil choudhary
Ranch Hand
Posts: 144
Java Redhat Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Rahul,
I saw in one of your post that you insisted on using the tags I wished to bring one of inconvience on using that.
see it this way.. in this post Gaurav has not used the tags and Peter Tran has
http://www.javaranch.com/ubb/Forum24/HTML/007948.html
Now When I copy the the GAuravs post in clipboard and paste it in notepad for saving and compiling on my machine the code is properly formatted.
However with Peter's code (using the tags )needs special effort to format it
especially when there is // thing anywhere in middle of the code.
you see it becomes mandatory that I must format all the code in my Notepad again..
I hope I am not the "only" one facing this problem.
Now Rahul,Am I missing something ..on how to copy paste the code in the javaranch pages...
Please enlighten me if I am missing somehting of relevence or do not encourage the use of code tags
I hope I am clear in my explanation
Sunil
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sunil,
I get your point. What i was trying to emphasise was to that code tags improve readability of the code. For example it is easier to read code as

rather than
class
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}

However the problem you stated exists.
I am forwarding this post to the Javaranch forum to check out what other say and see if there is a solution.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rather than cutting and pasting directly to notepad, try the following: for the post you want to grab code from, select the Edit/Delete icon. Now, unless the post is your own, you will not actually be able to re-edit or delete the post, because you don't have the password. However, that isn't checked until later, if you press "Submit" - which you're not going to do. Instead, you will get an Edit/Delete screen which has the text of the post loaded into an edit box. Here you can select the text you want, and then copy and paste it into a real editor - or Notepad if you prefer. And this way you should be able to maintain the formatting of the original post. Then just use the "Back" key on your browser to leave the JavaRanch "editor" and go back to the regular ranch. Try it out, it really does work.
 
sunil choudhary
Ranch Hand
Posts: 144
Java Redhat Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jim
it works.
How ever,
I will appreciate if you find better solution in some time to come
Sunil
 
Joseph Russell
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just testing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!