Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Product Lifecycle
  3. Free Tools
  4. Smartpaster

Smartpaster

Scheduled Pinned Locked Moved Free Tools
databasecomtutorial
5 Posts 5 Posters 8 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jorgen Andersson
    wrote on last edited by
    #1

    Smartpaster[^] allows you to paste as stringbuilder for example. Extremely useful when you're inlining SQL code.

    Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

    K J 2 Replies Last reply
    0
    • J Jorgen Andersson

      Smartpaster[^] allows you to paste as stringbuilder for example. Extremely useful when you're inlining SQL code.

      Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

      K Offline
      K Offline
      Kevin McFarlane
      wrote on last edited by
      #2

      Yes, I've been using this for years. :thumbsup:

      Kevin

      1 Reply Last reply
      0
      • J Jorgen Andersson

        Smartpaster[^] allows you to paste as stringbuilder for example. Extremely useful when you're inlining SQL code.

        Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #3

        Reading the page suggests that it is going to paste a text block using StringBuilder which I can only assume means something like the following?

        StringBuilder sb =..
        sb.append("stuff");
        sb.append(" other stuff");
        

        That idiom of course isn't efficient for static text compared to...

        String s = "stuff"
               + " other stuff";
        
        N B 2 Replies Last reply
        0
        • J jschell

          Reading the page suggests that it is going to paste a text block using StringBuilder which I can only assume means something like the following?

          StringBuilder sb =..
          sb.append("stuff");
          sb.append(" other stuff");
          

          That idiom of course isn't efficient for static text compared to...

          String s = "stuff"
                 + " other stuff";
          
          N Offline
          N Offline
          Nagy Vilmos
          wrote on last edited by
          #4

          Looking at the code, it can paste either way or as a comment.


          Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

          1 Reply Last reply
          0
          • J jschell

            Reading the page suggests that it is going to paste a text block using StringBuilder which I can only assume means something like the following?

            StringBuilder sb =..
            sb.append("stuff");
            sb.append(" other stuff");
            

            That idiom of course isn't efficient for static text compared to...

            String s = "stuff"
                   + " other stuff";
            
            B Offline
            B Offline
            BillWoodruff
            wrote on last edited by
            #5

            This question is not meant to be "picky-picky:" and I, personally, have no experience with the OP's mentioned use-case of "in-lining SQL," but, I think comparing a very brief example of using an example of StringBuilder versus string concatenation using "+" ... in "flat code:" i.e., outside a loop ... is not that particularly meaningful because: hypotheses: 1. it ignores the probable fact that at some point the StringBuilder will be converted to a string, which is going to cost you some cycles ? 2. at such a small scale of test, performance differences will be minuscule ... perhaps not even mensurable ? The main place I use StringBuilder is in loops that are parsing files, and doing something that's going to create a huge bunch of characters. It is rare, in my experience, to encounter other people's code where there are really long examples of string concatenation outside loops using "+," and code that does concatenation within the loop, using "+," in my experience, will be usually quite short. I will try PasteBuilder, and see what it does for me :) best, Bill

            "Every two days we create as much information as we did from the dawn of civilization up until 2003". Eric Schmidt of Google.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups