Search This Blog
2009-08-27
2009-08-23
C++ fails on my logic...
union u1 {
char[0];
long[0];
}
union u2 {
char[1];
}
union u3 {
char;
long;
}
union u4 {
char;
long[0];
}
union u5 {
char[1];
long[0];
}
// i can undesrtand these...
sizeof(u1); // 0
sizeof(u2); // 1
sizeof(u3); // 8
// but these do not make sense to me...
sizeof(u4); // 8... not 1?
sizeof(u5); // 8... not 1?
// found this when trying to code this:
template <unsigned int unitSize = 1, unsigned int length = 1>
union Bytes {
char c[length * (unitSize / sizeof(char))];
bool b[length * (unitSize / sizeof(bool))];
short s[length * (unitSize / sizeof(short))];
int i[length * (unitSize / sizeof(int))];
long l[length * (unitSize / sizeof(long))];
float f[length * (unitSize / sizeof(float))];
double d[length * (unitSize / sizeof(double))];
long double ld[length * (unitSize / sizeof(long double))];
};
2009-08-20
Enabling Rich Text Editing in your web page...
Midas Specification
Given a document, you can add the attribute "designMode" and set it to "on" to get an editable document. For example, in JavaScript, if you have an iframe with an id of 'edit', you can get its contentDocument and set designMode to "on" like this:
document.getElementById("edit").contentDocument.designMode="on";
2009-08-19
2009-08-15
Electronic whiteboard for Linux (ubuntu)
Linux Tips: Electronic whiteboard for Linux (ubuntu)
How to convert our computer screen on to a digital electronic whiteboard, under Linux, could not be simpler. Only need a knob for Wii (Nintendo Console), an infrared emitter (such as a remote control), and the software for it...
2009-08-04
BrowserShots
Check Browser Compatibility, Cross Platform Browser Test - Browsershots
Browsershots makes screenshots of your web design in different browsers.
2009-08-03
Krut
Krut Computer Recorder
Krut is a screencast tool that is written in Java and well suited for making video tutorials (instructional videos) on most platforms.
2009-08-02
2009-08-01
Subscribe to:
Posts (Atom)