Mounting an ISO file..
Feb 25, 2009 in Linux
sudo mount -o loop /path/to/file.iso /somedir ls /somedir
Feb 25, 2009 in Linux
sudo mount -o loop /path/to/file.iso /somedir ls /somedir
Feb 12, 2009 in .Net, Microsoft
// 32 bit source Bitmap System.Drawing.Bitmap b int bWidth, bHeight; int idx = 0; bWidth = b.Width; bHeight = b.Height; byte[,] Disp = new byte[bWidth, bHeight]; // create a new 16 bit bitmap Bitmap b565 = new Bitmap(b.Size.Width,b.Size.Height,System.Drawing.Imaging.PixelFormat.Format16bppRgb565); Graphics g = Graphics.FromImage(b565); // draw the 32 bit source bitmap to the 16 bit bitmap g.DrawImage(b, new Point(0, 0)); g.Dispose(); BitmapData bmd = b565.LockBits(new Rectangle(0, 0, 480, 272), System.Drawing.Imaging.ImageLockMode.ReadOnly, b565.PixelFormat); byte[] Result = new byte[bWidth * bHeight * 2]; unsafe { // get a pointer to the beginning of image data in the 16 bit bitmap byte* bitdata = (byte*)bmd.Scan0; for (int y = 0; y < bmd.Height*bmd.Width*2; y++) { // just copy the image data from the Bitmap to the byte array Result[y] = bitdata[y]; } } b565.UnlockBits(bmd); USBD480_DrawFullScreen(ref di, Result);
Feb 12, 2009 in Software
Make multiple sources into targets..
.SUFFIXES: .SUFFIXES: .htm .htmt SRCS := $(wildcard *.htmt) TARGS := $(patsubst %.htmt, %.htm, ${SRCS}) all : $(TARGS) echo "-- done --" %.htm : %.htmt cpp $< | egrep -v '^\#' > $@
Feb 10, 2009 in Engineering, Software
From
http://www.patterndepot.com/put/8/JavaPatterns.htm
Creational Patterns
All of the creational patterns deal with the best way to create
instances of objects. This is important because your program should not
depend on how objects are created and arranged.
Structural Patterns
Structural patterns describe how classes and objects can be combined
to form larger structures. The difference between class patterns and object
patterns is that class patterns describe how inheritance can be used to provide
more useful program interfaces. Object patterns, on the other hand, describe
how objects can be composed into larger structures using object composition,
or the inclusion of objects within other objects.
Behavioral Patterns (page 129)
Behavioral patterns are those patterns that are most specifically
concerned with communication between objects.