What's in your clipboard?
-
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
Some text from a document I am preparing for the big boss Opción 2: reuniones quincenales Primera Semana Hora Lunes Martes Miércoles Jueves Viernes 7:30 Pulso Epidemiológico 8:00 Gabinete de Apoyo 9:00 DGAEpi / InDRE CENSIDA 10:00 DGPS 11:00 12:00 13:00 14:00 15:00 16:00 CONADIC 17:00 Gabinete CNEGySR 18:00 19:00 20:00 21:00
-
A legal pad.
Christopher Duncan Author of The Career Programmer and Unite the Tribes www.PracticalUSA.com
-
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
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;
}
} -
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
Server Error in '/' Application I think I could have predicted that one....
-
Hey, man. Surviving the insanity over there? :)
Christopher Duncan Author of The Career Programmer and Unite the Tribes www.PracticalUSA.com
-
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
haemophilic
-
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
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.
-
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
-
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
-
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
-
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
Virut.n __________ It was a really (really) bad day.