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. The Lounge
  3. What's in your clipboard?

What's in your clipboard?

Scheduled Pinned Locked Moved The Lounge
64 Posts 60 Posters 0 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.
  • C Christopher Duncan

    A legal pad.

    Christopher Duncan Author of The Career Programmer and Unite the Tribes www.PracticalUSA.com

    H Offline
    H Offline
    HS Jeon
    wrote on last edited by
    #55

    Hi Chris Jason Jeon

    hi

    C 1 Reply Last reply
    0
    • C Chris Maunder

      I do that thing where I copy something to the clipboard and carry it around for ages, not daring to Ctrl+C again until I've pasted the precious clipboard contents somewhere safe. Quite often, though, I completely forget what I'm carrying around (usually within about 0.5 secs of hitting Ctrl+C) so I paste into notepad to see what I've got. Kinda of like Christmas. But not really. So my lucky dip today was: http://msdn.microsoft.com/en-us/library/ms645505.aspx[^] But the thing is: I don't remember going to that page. I haven't used the MessageBox function in years. What's in your clipboard?

      cheers, Chris Maunder The Code Project Co-founder Microsoft C++ MVP

      U Offline
      U Offline
      urbane tiger
      wrote on last edited by
      #56

      using Tiff;
      using GLib;
      public class TiffReadWrite : Object
      {
      private uint32[] raster;
      private uint32 width;
      private uint32 height;
      private uint32 size;
      private string fname { get; set; }
      private string fmode { get; set; }
      public TiffReadWrite(string filename, string mode)
      {
      this.fname = filename;
      this.fmode = mode;
      }
      public void read_image()
      {
      var tif = new TIFF(fname, fmode);
      if (tif == null) {
      error("Couldn't open file %s\n", fname);
      }
      tif.GetField(TIFFTAG_IMAGEWIDTH, out this.width);
      tif.GetField(TIFFTAG_IMAGELENGTH, out this.height);
      this.size = this.width * this.height;
      raster = new uint32[size];
      if (!tif.ReadRGBAImage(this.width, this.height, this.raster, 0)) {
      error("Couldn't read image %s!\n", this.fname);
      }
      }
      public void write_image(string filename)
      {
      var newtif = new TIFF(filename, "w");
      var row = new uint8[width]; newtif.SetField(TIFFTAG_IMAGEWIDTH, this.width);
      newtif.SetField(TIFFTAG_IMAGELENGTH, this.height); newtif.SetField(TIFFTAG_BITSPERSAMPLE, 8);
      newtif.SetField(TIFFTAG_COMPRESSION, COMPRESSION_LZW); newtif.SetField(TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
      newtif.SetField(TIFFTAG_ORIENTATION, ORIENTATION_BOTLEFT);
      for (uint32 h = 0; h < this.height; h++) {
      for (uint32 w = 0; w < this.width; w++) {
      row[w] = (uint8) raster[this.width * h + w];
      }
      newtif.WriteScanline((tdata_t) row, h, 0);
      }
      }
      public static int main(string[] args)
      {
      string in_arg = args[1];
      if (in_arg == null) {
      stderr.printf("Argument required!\n"); return 1;
      }
      var tt = new TiffReadWrite(in_arg, "r"); tt.read_image();
      tt.write_image("/tmp/test.tiff"); return 0;
      }
      }

      1 Reply Last reply
      0
      • C Chris Maunder

        I do that thing where I copy something to the clipboard and carry it around for ages, not daring to Ctrl+C again until I've pasted the precious clipboard contents somewhere safe. Quite often, though, I completely forget what I'm carrying around (usually within about 0.5 secs of hitting Ctrl+C) so I paste into notepad to see what I've got. Kinda of like Christmas. But not really. So my lucky dip today was: http://msdn.microsoft.com/en-us/library/ms645505.aspx[^] But the thing is: I don't remember going to that page. I haven't used the MessageBox function in years. What's in your clipboard?

        cheers, Chris Maunder The Code Project Co-founder Microsoft C++ MVP

        D Offline
        D Offline
        Dan Caseley
        wrote on last edited by
        #57

        Server Error in '/' Application I think I could have predicted that one....

        1 Reply Last reply
        0
        • H HS Jeon

          Hi Chris Jason Jeon

          hi

          C Offline
          C Offline
          Christopher Duncan
          wrote on last edited by
          #58

          Hey, man. Surviving the insanity over there? :)

          Christopher Duncan Author of The Career Programmer and Unite the Tribes www.PracticalUSA.com

          1 Reply Last reply
          0
          • C Chris Maunder

            I do that thing where I copy something to the clipboard and carry it around for ages, not daring to Ctrl+C again until I've pasted the precious clipboard contents somewhere safe. Quite often, though, I completely forget what I'm carrying around (usually within about 0.5 secs of hitting Ctrl+C) so I paste into notepad to see what I've got. Kinda of like Christmas. But not really. So my lucky dip today was: http://msdn.microsoft.com/en-us/library/ms645505.aspx[^] But the thing is: I don't remember going to that page. I haven't used the MessageBox function in years. What's in your clipboard?

            cheers, Chris Maunder The Code Project Co-founder Microsoft C++ MVP

            D Offline
            D Offline
            DrFrankenstein90
            wrote on last edited by
            #59

            haemophilic

            1 Reply Last reply
            0
            • C Chris Maunder

              I do that thing where I copy something to the clipboard and carry it around for ages, not daring to Ctrl+C again until I've pasted the precious clipboard contents somewhere safe. Quite often, though, I completely forget what I'm carrying around (usually within about 0.5 secs of hitting Ctrl+C) so I paste into notepad to see what I've got. Kinda of like Christmas. But not really. So my lucky dip today was: http://msdn.microsoft.com/en-us/library/ms645505.aspx[^] But the thing is: I don't remember going to that page. I haven't used the MessageBox function in years. What's in your clipboard?

              cheers, Chris Maunder The Code Project Co-founder Microsoft C++ MVP

              F Offline
              F Offline
              Fahad Sadah
              wrote on last edited by
              #60

              http://tinyurl.com/dzzfsl[^] was in my clipboard. I was trying to trick a wikipedia admin into following that link. If followed by a wikipedia admin, it will block Jimbo Wales (head of wikimedia foundation) from editing wikipedia.

              1 Reply Last reply
              0
              • C Chris Maunder

                I do that thing where I copy something to the clipboard and carry it around for ages, not daring to Ctrl+C again until I've pasted the precious clipboard contents somewhere safe. Quite often, though, I completely forget what I'm carrying around (usually within about 0.5 secs of hitting Ctrl+C) so I paste into notepad to see what I've got. Kinda of like Christmas. But not really. So my lucky dip today was: http://msdn.microsoft.com/en-us/library/ms645505.aspx[^] But the thing is: I don't remember going to that page. I haven't used the MessageBox function in years. What's in your clipboard?

                cheers, Chris Maunder The Code Project Co-founder Microsoft C++ MVP

                R Offline
                R Offline
                Ribose
                wrote on last edited by
                #61

                A lot of spaces...

                ~Ribose

                1 Reply Last reply
                0
                • C Chris Maunder

                  I do that thing where I copy something to the clipboard and carry it around for ages, not daring to Ctrl+C again until I've pasted the precious clipboard contents somewhere safe. Quite often, though, I completely forget what I'm carrying around (usually within about 0.5 secs of hitting Ctrl+C) so I paste into notepad to see what I've got. Kinda of like Christmas. But not really. So my lucky dip today was: http://msdn.microsoft.com/en-us/library/ms645505.aspx[^] But the thing is: I don't remember going to that page. I haven't used the MessageBox function in years. What's in your clipboard?

                  cheers, Chris Maunder The Code Project Co-founder Microsoft C++ MVP

                  D Offline
                  D Offline
                  dextrous1
                  wrote on last edited by
                  #62

                  This task is currently locked by a running workflow and cannot be edited. Gotta love pasting sharepoint dev errors in google! :-)

                  1 Reply Last reply
                  0
                  • C Chris Maunder

                    I do that thing where I copy something to the clipboard and carry it around for ages, not daring to Ctrl+C again until I've pasted the precious clipboard contents somewhere safe. Quite often, though, I completely forget what I'm carrying around (usually within about 0.5 secs of hitting Ctrl+C) so I paste into notepad to see what I've got. Kinda of like Christmas. But not really. So my lucky dip today was: http://msdn.microsoft.com/en-us/library/ms645505.aspx[^] But the thing is: I don't remember going to that page. I haven't used the MessageBox function in years. What's in your clipboard?

                    cheers, Chris Maunder The Code Project Co-founder Microsoft C++ MVP

                    C Offline
                    C Offline
                    capitolc
                    wrote on last edited by
                    #63

                    *slow claps* I'm gleaming! *slow claps* I would like to thank you all for allowing me to participant AND win (by 1pt) my first bracket... call it what you want, I feel goooooood! :p

                    -=the best is yet to come=-

                    1 Reply Last reply
                    0
                    • C Chris Maunder

                      I do that thing where I copy something to the clipboard and carry it around for ages, not daring to Ctrl+C again until I've pasted the precious clipboard contents somewhere safe. Quite often, though, I completely forget what I'm carrying around (usually within about 0.5 secs of hitting Ctrl+C) so I paste into notepad to see what I've got. Kinda of like Christmas. But not really. So my lucky dip today was: http://msdn.microsoft.com/en-us/library/ms645505.aspx[^] But the thing is: I don't remember going to that page. I haven't used the MessageBox function in years. What's in your clipboard?

                      cheers, Chris Maunder The Code Project Co-founder Microsoft C++ MVP

                      P Offline
                      P Offline
                      pi by e never claimed to be rational
                      wrote on last edited by
                      #64

                      Virut.n __________ It was a really (really) bad day.

                      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