I recently had to install Windows 98 through VMWare for some quick tests, and there were a few minor problems after the install that needed to be resolved. I thought I’d share them here if anyone ever needed them.
First, VMWare Tools needs to be installed to get video and some other drivers working.
Second, Windows 98 was really before the time when network cards were used to connect to the internet, as broadband technology was rare and modems were the commonplace solution, so it doesn’t make this process easy. To connect through your VMWARE bridge or NAT to the Internet (to use IE - FireFox [newer versions of?] doesn’t work on Windows 98), the following must be done through the MSN Connection Wizard (this is mostly from memory).
Open "Connect to the internet" from the desktop
Click Next
Select Modem Manually [next]
Select any of the normal modems in the list on the right, like a generic 56,000 modem [OK]
Click Next
Click lan/manual
Connect using my local area network (LAN) [next]
Click Next
"No" to email [next]
Click Finish
Lastly, the default sound driver does not work, so you need to do the following [Information found here by googling]
I really love my GPS (MagellanMaestro 3100) system that I received last Christmas as a present from my mother. I use it whenever navigating to new places I have never been before and it is always pretty darn accurate.
So it worked as usual without a hitch, calculating the best route flawlessly, on my way to Angel Sword last Saturday. On the way back, however, it sent me back on a different route which ended up making the 50 minutes trip take 10-20 minutes longer due to sticking me on backwater highway roads with only 1 lane, and getting stuck behind old geezers going below the speed limit. This had made me really mad at the time, and rather confused as to why it chose a different "fastest" route back; that is until I got to my destination and found out there was heavy construction on the highway going northbound (my way back) that had delayed one of my friends for 4 hours on his trip into Austin :-O. Glad I ended up following its directions after all and not going with my gut and taking the same route I took down there!
My fatal mistake was assuming the GPS calculated the routes itself instead of asking a central server elsewhere with traffic information. Now I know better!
I’ve been rereading one of the many Harry Potter books again, as usual when wanting to relax, for the millionth time through the series. I thought I’d check around and see if there was anything new, and apparently there are a few new things I didn’t know about.
According to a note on JK Rowling’s website (Wizard of the Month Archive), quoted verbatim:
(1980 - ) The Boy Who Lived, only known survivor of the Avada Kedavra curse and conqueror of Lord Voldemort, also known as Tom Riddle. Harry Potter joined the reshuffled Auror Department under Kingsley Shacklebolt at age 17, rising to become Head of said department in 2007.
And finally, an 800 word "Harry Potter Prequel" by JKR written for some charity book by WaterStone, or something like that. I found the text for it here, and it is quoted below.
The speeding motorcycle took the sharp corner so fast in the darkness that both policemen in the pursuing car shouted ‘whoa!’ Sergeant Fisher slammed his large foot on the brake, thinking that the boy who was riding pillion was sure to be flung under his wheels; however, the motorbike made the turn without unseating either of its riders, and with a wink of its red tail light, vanished up the narrow side street.
‘We’ve got ‘em now!” cried PC Anderson excitedly. ‘That’s a dead end!”
Leaning hard on the steering wheel and crashing his gears, Fisher scraped half the paint off the flank of the car as he forced it up the alleyway in pursuit.
There in the headlights sat their quarry, stationary at last after a quarter of an hour’s chase. The two riders were trapped between a towering brick wall and the police car, which was now crashing towards them like some growling, luminous-eyed predator.
There was so little space between the car doors and the walls of the alley that Fisher and Anderson had difficulty extricating themselves from the vehicle. It injured their dignity to have to inch, crab-like, towards the miscreants. Fisher dragged his generous belly along the wall, tearing buttons off his shirt as he went, and finally snapping off the wing mirror with his backside.
‘Get off the bike!’ he bellowed at the smirking youths, who sat basking in the flashing blue light as though enjoying it.
They did as they were told. Finally pulling free from the broken wind mirror, Fisher glared at them. They seemed to be in their late teens. The one who had been driving had long black hair; his insolent good looks reminded Fisher unpleasantly of his daughter’s guitar-playing, layabout boyfriend. The second boy also had black hair, though his was short and stuck up in all directions; he wore glasses and a broad grin. Both were dressed in T-shirts emblazoned with a large golden bird; the emblem, no doubt, of some deafening, tuneless rock band.
‘No helmets!’ Fisher yelled, pointing from one uncovered head to the other. ‘Exceeding the speed limit by - by a considerable amount!’ (In fact, the speed registered had been greater than Fisher was prepared to accept that any motorcycle could travel.) ‘Failing to stop for the police!’
‘We’d have loved to stop for a chat,’ said the boy in glasses, ‘only we were trying -’
‘Don’t get smart - you two are in a heap of trouble!’ snarled Anderson. ‘Names!’
‘And what’s nice about that one is, you can use it for a boy or a girl,’ said the boy in glasses.
‘Oh, OUR names, did you mean?’ asked the first, as Anderson spluttered with rage. ‘You should’ve said! This here is James Potter, and I’m Sirius Black!’
‘Things’ll be seriously black for you in a minute, you cheeky little -’
But neither James nor Sirius was paying attention. They were suddenly as alert as gundogs, staring past Fisher and Anderson, over the roof of the police car, at the dark mouth of the alley. Then, with identical fluid movements, they reached into their back pockets.
For the space of a heartbeat both policemen imagined guns gleaming at them, but a second later they saw that the motorcyclists had drawn nothing more than -
‘Drumsticks?’ jeered Anderson. ‘Right pair of jokers, aren’t you? Right, we’re arresting you on a charge of -’
But Anderson never got to name the charge. James and Sirius had shouted something incomprehensible, and the beams from the headlights had moved.
The policemen wheeled around, then staggered backwards. Three men were flying - actually FLYING - up the alley on broomsticks - and at the same moment, the police car was rearing up on its back wheels.
Fisher’s knees bucked; he sat down hard; Anderson tripped over Fisher’s legs and fell on top of him, as FLUMP - BANG - CRUNCH - they heard the men on brooms slam into the upended car and fall, apparently insensible, to the ground, while broken bits of broomstick clattered down around them.
The motorbike had roared into life again. His mouth hanging open, Fisher mustered the strength to look back at the two teenagers.
‘Thanks very much!’ called Sirius over the throb of the engine. ‘We owe you one!’
There was an earth-shattering crash, and Fisher and Anderson threw their arms around each other in fright; their car had just fallen back to the ground. Now it was the motorcycle’s turn to rear. Before the policemen’s disbelieving eyes, it took off into the air: James and Sirius zoomed away into the night sky, their tail light twinkling behind them like a vanishing ruby.
On a slightly off-topic non-official tangent, I really love this picture! Wish I knew who the artist was, especially to give credit here.
So I went to an open house at Angel Sword yesterday, which produces the world’s best swords. I first fell in love with their work when I saw them well over 10 years ago at Scarborough Fair Renaissance Festival in Dallas, and have schemed owning one since, which is not easy as their lowest series cost about $2,000. Of course, I could get smaller (and legal) blades from them like knives, but that’s just not the same or as fun ^_^; .
Their lowest line of swords, the Bright Knight series, holds at least the top two world records in ability from international competitions. I asked why they haven’t submitted their upper series lines (Angel Swords, Avatar series, etc) and the basic reply was “You don’t show your queens and kings if you can win with your jacks” :-). The master sword smith who started and still does most all of the work on the swords is Daniel Watson, whom has been working on swords for well over 30 years. The reason his swords are the best is that he uses combinations of ultra-tech with old tech to produce the best results. He has over 14 patents on processes and technology to produce the swords that he has been creating and refining over his lifetime that make no one able (easily) to catch up to his quality of work. The ultra-tech stuff includes cryogenics with quick freezing using liquid nitrogen and super heating, electromagnetic manipulating machines, metallurgy, and good old fashion hammer techniques, including cold forging, which most sword smiths apparently ignore.
I unfortunately had to miss a wedding of a friend of my sister’s up in Dallas for this, but I thought this more important/pressing as they only have these open houses every few [2-3] years, and I have reason to believe this may be the last one. It was supposed to start off at 9am. I got there 20 or so minutes early, well before anyone else, so I got some one on one time with Mr. Watson and another of his employees, Wolf (his real name ^_^). So I checked out his large stock of swords in the show room for the first hour or two while everyone else was arriving, and we all chatted and had general fun. There are so many beautiful swords and blades of every style, size, and make; pure works of art!
After that we went up to the forge and he did a demo with running commentary of reworking a knife, sharpening and fixing it up using types of buffers. That demonstration and everything else from the whole day was all quite fascinating. During this we also got a good list of accidents that have occurred in the shop, it was quite gruesome!!! :-D. After that we went back to the display room and had some more discussion.
Next was practical sword use ^_^. We all either borrowed swords or those who already owned ones used them, and we went out to their large front yard area (they are out in the country) and Daniel went over how to properly make cuts with a sword; proper torque and body movements to get the most out of a swing and such. Then each person that showed up (we had 10-15 people) got one wet tatami mat to practice on, which depending on your aim, one could get 5 to 10 solid cuts with. A single tatami mat, which is what most of us used, is about similar to cutting someone through the neck and a shoulder, while a double tatami mat, which they only had 1 made, is about equivalent to a solid cut through someone’s midsection. It was really fun ^_^.
We then broke for lunch with a lot more chatting about swords and many other interesting topics. The final part of the structured day was a voted upon sword creation process that we wanted to hear about. How he made his Avatar swords and the difference between the lines easily won out, as he had never released the information to anyone before (besides perhaps his apprentices and significant others). The reason he was now willing to tell us all about it was his final batch of patents on the processes went through very recently so it was safe to give it out. One of the guests video taped the whole talk, and I’m hoping to get my hands on a copy of it to post here with his permission later. He told me he wanted to edit it a bit first and show it to Mr. Watson before he did anything with it or released it anywhere. The main gist is that the lower lines just used the electromagnetic manipulation and other ultra-tech to achieve their chemical bonding properties so they can be cut to have much smaller angles on the edges without being too brittle, while the higher lines in addition have the hard work muscle and sweat forging and pounding put into them.
I think he ended his talk a little early to hit the 4pm mark when everything was supposed to end. A few people left then but I stayed around for over an hour to keep talking with the other participants. Everyone was really great and from many different walks of life and experiences all brought together by a common interest. After a few more people left, Mr. Watson brought out many of his whiskeys to let us try out. That’s the business he’s trying to break into and away from swords BTW, making whiskeys and rums and some other types of alcohol. I think I heard him mention to someone that some of the alcohols he was giving us were going for over $125 a shot!
I then left around 5pm, even though I wanted to stay longer, because I had another previous engagement I had promised to make... and then when I got there it didn’t even happen and I was quite perturbed about this, as they could have told me it wasn’t going to happen and I could have stayed at Angel Sword longer, but ah well.
I will probably be getting one of their blades very soon, as I just found out you can trade in their blades at no markdown to help get more expensive blades. So I can get a $2,000 one that I like and then have that around while I work up to a $6000 blade I really like ^_^. They also have a guarantee against breakage, chips, or damage, which is really hard to do anyways, so they can be used all you want without worry. He even showed us a sword that had been shot due to an accidental misfire of a .22 gun from the room above the show room. The sheath it was in clearly showed where the bullet went through, but there wasn’t even a ding or a scratch on the sword! The only remaining evidence was some copper that came off the bullet and etched into the metal a bit :-).
And here are all the pictures with captions that I took for the day! :-D Mouse over the thumbnails for larger copies. (Video clips to be uploaded soon.)
Show Room - Northeast corner
A large assortment of different kinds of swords.
Slightly left of the first picture, in the upper right corner are the few wakizashis on display.
Directly above the first picture.
The left side of the last picture. These two were BEAUTIFUL.
Show Room - Southeast corner
More assortments of swords. There were still a lot of areas in the show room I didn't even get pictures of.
The right side of the last picture.
Show Room - West side - Katanas and Knives
This whole wall was mostly katanas, with knives and other smaller blades in the glass display cases below them. Most of these swords were worth ~$3,500 a piece.
Directly to the right of the last picture.
Zoomed in from the last picture. The katana with the black and red hilt is the one I plan on getting soon, hopefully!
The Forge - Buffers and Sharpeners
Dan was showing us here how he sharpens and fixes blades with the buffers.
A zoomed out (and underexposed?) view of the buffer area. To the left is a larger belt buffer for larger blades.
3 short video clips spliced together of Mr. Watson working on a blade.
This is the sign in the 2nd picture directly above. I believe they take it to shows as a decoration.
The Forge - The Kiln
A normal heating kiln with tons of different types of hammers, tongs, and tools.
A different angle of the first picture.
This ones a little hard to see... it's a little better in my original large resolution copy. This is a shelf directly to the left of the kiln that contains racks of different types of metal sheets including (from top to bottom) steel?, brass, and copper.
The Forge - Mr. Watson hammering
Hammering on a piece of steel while describing the process of creating the different series of blades. Hopefully I can get a copy of the video someone took of this later.
The Forge - Electromagnetic Machine
All 3 of these are pretty blurry, but this is the electromagnetic machine used to rearrange the molecules of the steel and do micro hammering.
The Forge - The (High Pressure?) Furnace
This is the furnace. I believe it to be super high pressure, but I know it heats steel to over, IIRC 1400 Fahrenheit.
A picture taken from the same spot as above, but shifted slightly to the left. The LOUD and powerful mechanical hammer is in the way.
The Forge - Liquid Nitrogen tanks for cryogenics
A close up of a liquid nitrogen tank.
All 4 (or were there 5...?) tanks sitting next to each other.
The Forge - Unfinished blades
Blades that are being worked on. Mr. Watson is standing on the left side of the picture. He is currently standing right in front of the liquid nitrogen tanks from above.
The Forge - Other areas
A workbench. This is directly to the right of the kiln, shown above.
Another area of the forge with lots of other workstations and tools.
In the Yard - Group Photos
This was taken while we were waiting for Mr. Watson to come out and start demonstrating.
This one has most of the group that was there. The guy on the left side in the red shirt is Ingrid's husband. Lucky guy :-).
In the Yard - Mr. Watson teaching and demonstrating
Using Angel (yes that's his real name... I think) as a dummy :-)
Another "volunteer" 0:-)
In the Yard - Wolf cutting (video)
Wolf (real name) is one of Mr. Watson's employees. He did some of the first cuts, for demonstration purposes.
In the Yard - Angel cutting
Angel (yes that's his real name... I think) cutting. He seemed quite good. Probably the second most experienced guest there (maybe?), after Kendall.
In the Yard - Kendall cutting (videos)
Kendall cutting up his tatami mat. He is apparently quite adept with swords... has won some past sword competitions and is a martial arts instructor and such.
In the Yard - Ingrid cutting
Girls like swords too!!! heh. You may have seen Ingrid in a few other pictures (see Group #1) with her (5 month?) old boy that she brought along. Her husband was there too, they are both great people.
This is a picture of me receiving my first real programming language, Visual Basic 4.0, for Chanukah [a Jewish holiday, like Christmas in terms of gifts] in 1995 [I’m the one holding it, age 11, 5th grade]. I had been using QBasic before that. I just thought the picture was too cute to pass up ^_^. The person next to me, Luis Merino, was my best friend during elementary and middle school, and is the reason why I just found this picture. I’m flying up for his wedding in Salt Lake City, in which I will be a groomsman, this coming Tuesday :-).
Continued from Part 1. Once again, I received another notification of a friend joining from an email I gave to the LinkedIn system. I contacted LinkedIn before writing the previous post on the topic with the following message:
For reference, your privacy policy states the following
Information about your Contacts In order to invite others to connect with you directly in LinkedIn, you will enter their names and email addresses. This information will be used by LinkedIn to send your invitation including a message that you write. The names and email addresses of people that you invite will be used only to send your invitation and reminders.
I decided to search for accounts through your "Address Book Contacts" function, and manually entered my email contacts. I only used this function to find existing users, and not invite new ones. I expected the information to be immediately deleted from your servers, as it had no more use for the contacts I gave, but I found out today they were still there when one of said addresses was used to sign up a new account and LinkedIn informed me of such. While this is a nice feature, it would have been appropriate to allow the user to opt out of having LinkedIn keep the emails for further use, and downright shady that the user is not informed at all that given email addresses are kept by LinkedIn on your servers.
And this is the non-auto-generated response I received back 2 days later:
Dear Jeffrey We are aware of the issue you are currently experiencing and we are working diligently to resolve the issue. We appreciate your patience while this issue is being resolved.
I thought it obvious from this reply that they did not take what I said into consideration, and a high probability that they didn’t really even read it. I mentioned in the last post this exact thing happened to my friend who was trying to communicate with LinkedIn about a problem he was having with errors with their site code. This kind of thing is typical from large corporations that receive a large amount of communications and do not have the staff to handle it. I consider this practice almost as bad as out-sourced tech support (usually India), another pet peeve of mine, as communication is often hard and the tech support agents often don’t know what they are talking about... at least very much more so than when with other first-tier tech support channels provided in-country ^_^; . I went ahead and contacted eTrust a few days ago in hopes that I get a more personal response from them.
I got back from a couple day trip to Dallas last night. Man do I hate that drive, especially when it’s raining so hard you can barely see 6 feet in front of you, which seems to happen almost every time any of my friends or family make that drive (from Dallas to Austin or vice versa).
I just now beat Final Fantasy 4 DS too, yay. I was thoroughly happy with the remake they did of the game this time around, of which it had only one or two trifle annoyances of no real consequence, which is surprising for me as I always seem to find heavy fault in everything remade that I held dear as a child. The new game plus feature, as far as I can see, is pretty worthless though, as all it leaves you with is the augments, which I didn’t even use anyways. The cut scenes were all excellent, especially the opening credits pre-rendered cinematics, which I have included below. Now all I really have to wait for is the Chrono Trigger remake they are doing for the DS!!! :-D
I also finished the Eragon books again over the weekend, so with all of that sidetracking stuff out of the way I will be getting back to regularly posting stuff here as promised.
Final Fantasy IV DS Opening High Quality Stolen from YouTube, owned by SquareSoft
Final Fantasy IV DS Characters Art Owned by SquareSoft, Image from GamesPress
Sorry for the lack of posts and updates recently. I’ve been involved lately with both playing FF4 on the DS and rereading Eragon, as the next book is about to come out. Among other things... I’ll start posting regularly again come the new month.
This is a clip from the TV show “Malcolm in the Middle” in which the protagonist, Malcolm, demonstrates his freakish numeric abilities for the Krelboyne [the advanced learning/gifted class] Circus to save the day (episode “Krelboyne Picnic” Season 1 Episode .
I encoded this video, apparently, in February of 2007 and do not recall why. It’s a fun little clip, so instead of deleting it, since I recall that I could not find it at the time for whatever reason, I figured I’d put it here.
I am often asked to transfer data sets into MySQL databases, or other formats. In this case, I’ll use a Microsoft Excel file without line breaks in the fields to MySQL as an example. While there are many programs out there to do this kind of thing, this method doesn’t take too long and is a good example use of regular expressions.
First, select all the data in Excel (ctrl+a) and copy (ctrl+c) it to a text editor with regular expression support. I recommend EditPad Pro as a very versatile and powerful text editor.
Next, we need to turn each row into the format “('FIELD1','FIELD2','FIELD3',...),”. Four regular expressions are needed to format the data:
Search
Replace
Explanation
'
\\'
Escape single quotes
\t
','
Separate fields and quote as strings
^
('
Start of row
$
'),
End of row
From there, there are only 2 more steps to complete the query.
Add the start of the query: “INSERT INTO TABLENAME VALUES”
End the query by changing the last row's comma “,” at the very end of the line to a semi-colon “;”.
For example:
a b c d e f g h i
would be converted to
INSERT INTO MyTable VALUES ('a','b','c'), ('d','e','f'), ('h','h','i');
Sometimes queries may get too long and you will need to separate them by performing the “2 more steps to complete the query” from above.
After doing one of these conversions recently, I was also asked to make the data searchable, so I made a very simple PHP script for this.
This script lets you search through all the fields and lists all matches. The fields are listed on the 2nd line in an array as "SQL_FieldName"=>"Viewable Name". If the “Viewable Name” contains a pound sign “#” it is matched exactly, otherwise, only part of the search string needs to be found.
<? $Fields=Array('ClientNumber'=>'Client #', 'FirstName'=>'First Name', 'LastName'=>'Last Name', ...); //Field list print '<form method=post action=index.php><table>'; //Form action needs to point to the current file foreach($Fields as $Name => $Value) //Output search text boxes print "<tr><td>$Value</td><td><input name=\"$Name\" style='width:200px;' value=\"". (isset($_POST[$Name]) ? htmlentities($_POST[$Name], ENT_QUOTES) : '').'"></td></tr>';//Text boxes w/ POSTed values,if set print '</table><input type=submit value=Search></form>';
if(!isset($_POST[key($Fields)])) //If search data has not been POSTed, stop here return;
$SearchArray=Array('1=1'); //Search parameters are stored here. 1=1 is passed in case no POSTed search parameter are ... //... requested so there is at least 1 WHERE parameter, and is optimized out with the MySQL preprocessor anyways. foreach($Fields as $Name => $Value) //Check each POSTed search parameter if(trim($_POST[$Name])!='') //If the POSTed search parameter is empty, do not use it as a search parameter { $V=mysql_escape_string($_POST[$Name]); //Prepare for SQL insertion $SearchArray[]=$Name.(strpos($Value, '#')===FALSE ? " LIKE '%$V%'" : "='$V'"); //Pound sign in the Viewable Name=exact ... //... value, otherwise, just a partial patch } //Get data from MySQL mysql_connect('SQL_HOST', 'SQL_USERNAME', 'SQL_PASSWORD'); mysql_select_db('SQL_DATABASE'); $q=mysql_query('SELECT * FROM TABLENAME WHERE '.implode(' AND ', $SearchArray));
//Output retrieved data $i=0; while($d=mysql_fetch_assoc($q)) //Iterate through found rows { if(!($i++)) //If this is the first row found, output header { print '<table border=1 cellpadding=0 cellspacing=0><tr><td>Num</td>'; //Start table and output first column header (row #) foreach($Fields as $Name => $Value) //Output the rest of the column headers (Viewable Names) print "<td>$Value</td>"; print '</tr>'; //Finish header row } print '<tr bgcolor='.($i&1 ? 'white' : 'gray')."><td>$i</td>"; //Start the data field's row. Row's colors are alternating white and gray. foreach($Fields as $Name => $Value) //Output row data print '<td>'.$d[$Name].'</td>'; print '</tr>'; //End data row }
print ($i==0 ? 'No records found.' : '</table>'); //If no records are found, output an error message, otherwise, end the data table ?>
I was thinking earlier today how it would be neat for C/C++ to be able to get the address of a jump-to label to be used in jump tables, specifically, for an emulator. A number of seconds after I did a Google query, I found out it is possible in gcc (the open source native Linux compiler) through the “label value operator” “&&”. I am crushed that MSVC doesn’t have native support for such a concept :-(.
The reason it would be great for an emulator is for emulating the CPU, in which, usually, each first byte of a CPU instruction’s opcode [see ASM] gives what the instruction is supposed to do. An example to explain the usefulness of a jump table is as follows:
Of course, this could still be done with virtual functions, function pointers, or a switch statement, but those are theoretically much slower. Having them in separate functions would also remove the possibility of local variables.
Although, again, theoretically, it wouldn’t be too bad to use, I believe, the _fastcall function calling convention with function pointers, and modern compilers SHOULD translate switches to jump tables in an instance like this, but modern compilers are so obfuscated you never know what they are really doing.
It would probably be best to try and code such an instance so that all 3 methods (function pointers, switch statement, jump table) could be utilized through compiler definitions, and then profile for whichever method is fastest and supported.
//Define the switch for which type of opcode picker we want #define UseSwitchStatement //#define UseJumpTable //#define UseFunctionPointers
//Defines for how each opcode picker acts #if defined(UseSwitchStatement) #define OPCODE(o) case OP_##o: #elif defined(UseJumpTable) #define OPCODE(o) o: #define GET_OPCODE(o) &&o #elif defined(UseFunctionPointers) #define OPCODE(o) void Opcode_##o() #define GET_OPCODE(o) (void*)&Opcode_##o //The above GET_OPCODE is actually a problem since the opcode functions aren't listed until after their ... //address is requested, but there are a couple of ways around that I'm not going to worry about going into here. #endif
enum {OP_ADD=0, OP_SUB}; //assuming ADD=opcode 0 and so forth void DoOpcode(int OpcodeNumber, ...) { #ifndef UseSwitchStatement //If using JumpTable or FunctionPointers we need an array of the opcode jump locations void *Opcodes[]={GET_OPCODE(ADD), GET_OPCODE(SUB)}; //assuming ADD=opcode 0 and so forth #endif #if defined(UseSwitchStatement) switch(OpcodeNumber) { //Normal switch statement #elif defined(UseJumpTable) goto *Opcodes[OpcodeNumber]; //Jump to the proper label #elif defined(UseFunctionPointers) *(void(*)(void))Opcodes[OpcodeNumber]; //Jump to the proper function } //End the current function #endif
//For testing under "UseFunctionPointers" (see GET_OPCODE comment under "defined(UseFunctionPointers)") //put the following OPCODE sections directly above this "DoOpcode" function OPCODE(ADD) { //... } OPCODE(SUB) { //... }
#ifdef UseSwitchStatement //End the switch statement } #endif
#ifndef UseFunctionPointers //End the function } #endif
After some tinkering, I did discover through assembly insertion it was possible to retrieve the offset of a label in MSVC, so with some more tinkering, it could be utilized, though it might be a bit messy.
Since I just added my résumé which mentions my LinkedIn page, I thought I’d mention something else I just discovered about LinkedIn.
I would normally never give out any of my contacts’ email addresses to third parties under any circumstance, but I decided there was very little risk to do so at LinkedIn because it is a largely used website with many users that is also eTrust certified. Unfortunately, I have also heard eTrust certification isn’t exactly hard to get and shouldn’t have too much stock put in it, but it is still something.
Anyways, after reading LinkedIn’s privacy policy, I decided it would be ok to list some of my email contacts to discover if they also used LinkedIn or not. I, of course, added in a dummy email address of mine into this to watch for spam or advertisements, and it has to date not received anything, though I’m sure any company that illegally released email addresses wouldn’t be stupid enough to let go of newly acquired addresses immediately, but then again, I always assume too much of people/corporations... but I digress. I have discovered that they keep all the emails you give them because one of the emails I gave was recently used to sign up for a new account and LinkedIn immediately informed me of this.
While this is a nice extension to the "find your contacts through their emails" function, LinkedIn really should have given me an option to opt out of this, or at the very least informed me that it was keeping the emails I gave it on record. Unfortunately, even if they do have a good privacy policy and abide by it, there is still the chance a rogue staff member could harvest the emails and sell them.
Oh, LinkedIn is also a very buggy system in and of itself. I very often get timeout errors and many other errors to the extent of “The server cannot perform this operation at this time, please try again later”. A friend of mine has also been having trouble linking our profiles together for more than a week now, with no response to his email to them… besides a type of auto response he got back that had absolutely nothing to do with the reported problem.
A friend just asked me to write a PHP function to list all the contents of a directory and its sub-directories. Nothing special here... just a simple example piece of code and boredom...
It wouldn’t be a bad idea to turn off PHP’s “output buffering” and on “implicit flush” when running something like this for larger directories. Example output for “ListContents('c:\\temp');”:
A.BMP [230]
Dir1 [D]
codeblocks-1.0rc2_mingw.exe [13,597,181]
Dir1a [D]
DEBUGUI.C [25,546]
Dir2 [D]
Dir3 [D]
HW.C [12,009]
INIFILE.C [9,436]
NTDETECT.COM [47,564]
I decided to make it a little nicer afterwards by bolding the directories, adding their total size, and changing sizes to a human readable format. This function is a lot more memory intensive because it holds data in strings instead of immediately outputting.
function HumanReadableSize($Size) { $MetricSizes=Array('Bytes', 'KB', 'MB', 'GB', 'TB'); for($SizeOn=0;$Size>=1024 && $SizeOn<count($MetricSizes)-1;$SizeOn++) //Loops until Size is < a binary thousand (1,024) or we have run out of listed Metric Sizes $Size/=1024; return preg_replace('/\\.?0+$/', '', number_format($Size, 2, '.', ',')).' '.$MetricSizes[$SizeOn]; //Forces to a maximum of 2 decimal places, adds comma at thousands place, appends metric size }
Example output for “print ListContents2('c:\\temp', $Dummy);”:
A.BMP [230 Bytes]
Dir1 [12.99 MB]
codeblocks-1.0rc2_mingw.exe [12.97 MB]
Dir1a [24.95 KB]
DEBUGUI.C [24.95 KB]
Dir2 [0 Bytes]
Dir3 [20.94 KB]
HW.C [11.73 KB]
INIFILE.C [9.21 KB]
NTDETECT.COM [46.45 KB]
The memory problem can be rectified through a little extra IO by calculating the size of a directory before its contents is listed, thereby not needing to keep everything in a string.
Of course, after all this, my friend took the original advice I gave him before writing any of this code, which was that using bash commands might get him to his original goal much easier.
On computers equipped with certain brands of audio cards, when performing the system encryption pretest or when the system partition/drive is encrypted, the sound card drivers failed to load. This will no longer occur. (Windows Vista/XP/2003)
It is possible to access mounted TrueCrypt volumes over a network. (Windows)
I am quite impressed that they did this so quickly, and am sad I did not find out until now. They also fixed the other missing feature I reported to them within a month of that [version 5.1]
Support for hibernation on computers where the system partition is encrypted (previous versions of TrueCrypt prevented the system from hibernating when the system partition was encrypted). (Windows Vista/XP/2008/2003)
Also in the version history [5.1a], this little paragraph made me smile
[Update 2008-04-02: Although we have not filed any complaint with Microsoft yet, we were contacted (on March 27) by Scott Field, a lead Architect in the Windows Client Operating System Division at Microsoft, who stated that he would like to investigate our requirements and look at possible solutions. We responded on March 31 providing details of the issues and suggested solutions.]
Other very important features they have added for version 6.0 that I am super happy about:
Embedded backup header (located at the end of the volume)
Up to 20% faster resuming from hibernation when the system partition/drive is encrypted. (As I have always been super frustrated by super slow hibernation resume support on my now abandoned partition encryption software suite, BestCrypt.)
Multithreading support (Faster parallel processing, yay)
I did some speed tests of hibernation support in XP and got the following numbers: (Results are averages of at least 5 tests, in seconds)
*VMWare was running with 256MB of RAM and 1 virtual CPU on Laptop**. VMWare results were not always stable due to other processes on the host machine, so I terminated the worst offenders **Laptop is a 2.4ghz Pentium Core Duo with 2GB RAM and 60GB hard drive running at 7200RPM
The decoy (first) partition holds a decoy OS and is accessible from the password prompt (password #3) at bootup. You should not have any sensitive data in it, and can give out the password if need be. TrueCrypt recommends using this decoy OS at least as much as the hidden OS so if someone checks out the decoy they are not suspicious of it. If the perpetrator is suspicious of the decoy due to non use, the size of the partition, or just the fact that you have TrueCrypt installed, you may need to fall back onto the second stage of the security in the below paragraph.
The outer (second) partition holds some decoy files and a hidden volume inside of it. It is accessible by either the decoy or hidden OS by opening the partition through a normal TrueCrypt device mounting (password #1). It is recommended to give out its password only if you have already been forced to mount your decoy OS and the perpetrator suspects a secure partition as is explained in the above paragraph. If any data is written to it after creation, it can destroy information at random within the Hidden OS (see “Partition Sizes” at the bottom).
The hidden partition holds its own OS and is hidden within the outer (second) partition. It is accessible from the password prompt (password #2) at bootup or by mounting the partition from TrueCrypt as a device when the decoy OS is open. The decoy partition/OS is NOT accessible while the hidden OS is open.
Basic installation procedure:
Create a computer with 2 partitions. The second (outer) partition must be 5% larger than the first (decoy) for a FAT file system, or 110% (2.1x) larger for a NTFS file system (see “Partition Sizes” at the bottom). You might as well make the outer partition FAT since it won’t be used much, if at all, and this won’t affect the hidden partition.
Install your operating system on the first (decoy) partition with all of your applications and data that are not sensitive.
Run the TrueCrypt hidden install, this does the following:
Asks for outer volume password (Password #1). Creates and formats the second (outer) partition/volume.
Lets you copy some “sensitive looking” files to the outer partition. Nothing should ever be changed or added to the outer partition after this, see “Partition Sizes” at the bottom.
Asks for hidden volume password (Password #2). The hidden partition is created within the outer partition.
Asks for decoy volume password (Password #3).
Rescue disk is created
All data from the first (decoy) partition is copied to the hidden partition, and then all data from the first (decoy) partition is encrypted.
And finally, things that bugged me, because I like to vent :-) :
Forced creation of rescue disk on full volume encryption. Having the file is more than enough since it can be copied to other hard drives, but it wanted proof of the rescue disc creation, so I just mounted the ISO to a virtual drive.
No customized pre-boot screens. This isn’t important really, but I loved my hokie ASCII art ^_^;.
Partition sizes: The hidden OS partition will be the exact same size as the decoy and the outer partition must be at least 5% larger for FAT and 110% larger for NTFS than the decoy.
The hidden OS partition will be the exact size as the decoy partition because they are originally duplicates of each other, including their original partition tables, which include the size of the partition.
The outer (second) partition that holds the hidden partition must be at least 5% larger for FAT and 110% larger for NTFS than the decoy. The reason for this is the file contents tables. NTFS, unfortunately in this case, stores its file table in the middle of the partition. The outer partition’s file table does not, however, affect the hidden partition in any way.
So, for example (these numbers are theoretical, I am not entirely sure if these are correct), if we have a 2GB decoy partition, the outer NTFS partition must be at least 4.2GB and the hidden partition will be 2GB. If we made the outer partition 6GB, then 0-3GB would be writable, 3.0GB-3.6GB would be used for the file table, 3.6GB-4.0GB would be writable, and 4.0GB-6.0GB would be used by the hidden operating system. So, theoretically, you could write 3.4GB to the outer volume before problems started occurring, but I wouldn’t trust NTFS to only write to the beginning of the drive.
So I jumped on the bandwagon and switched over to Firefox 3.0 when it came out a week or two ago, and was pleasantly surprised after some forced addon (used to be called extension) updates that everything worked brilliantly, including my favorite plugin, Firebug. I meant to write this post containing the addons I use and recommend a long time ago (once again, jumping on the bandwagon as everyone else and their dog that has a blog has done this topic too...), but now is as good as ever, especially since there are some updates for Firefox’s new version.
This is a software suite that always you to store passwords and personal information in encrypted (against AES) container files against a master password, so it’s pretty darn secure. It interfaces well with both IE and Firefox, and really helps with the filling out of personal info on those long tedious credit card forms and such.
Notes: I just wish it worked better outside of web browsers in the Windows environment... maybe one day I’ll make something for that, it would be fun.
Allows you to go to a cache for the page you are currently on from one of the many caching services like Google Cache, Coral Cache, and archive.org’s Wayback Machine.
Notes: I modified this to allow you to open all cache sites at once and to work for Firefox 3... maybe one of these days I’ll release the additions.
“Embedding Internet Explorer in tabs of Mozilla/Firefox”
Notes: Since IE is sometimes a necessity when people refuse to conform to standards; and for developers to make sure things look right in the (unfortunately) most used web browser.
Go to parent directories of your current URL by clicking
Hide the protocol (ex: “http://”).
Notes: I originally used this because it fixed a major problem that plagued Firefox and still plagues IE in which the address bars show escaped URLs (like “Firefox%20Extensions” instead of “Firefox Extensions”), so foreign URLs, which used lots of non-ASCII characters were next to impossible to read. I submitted this to Mozilla a ways back, and fortunately it was fixed for Firefox 3. This, IMO, is one of the most important fixes for Firefox 3, and it wasn’t even really advertised.
“Allows you to open ANY file (executables, etc.) from the internet into the default program assigned by your operating system, without needing to save it first.”
Notes: This is not marked as compatible with Firefox 3, but works fine. Firefox has added an “applications” tab to its options dialog that kind of takes care of this, but this still does at least allow direct opening of all file extensions without also mapping them in Firefox.
Viewing how you browsed to pages through a referrer tree.
Notes: This is not compatible with Firefox 3, hasn’t been updated for ages, and is extremely slow as it uses a brute force method to build the referrer tree. I might see if I can find a better version of something like this (or make it) if the need ever arises again.
Toggle completely anonymous web browsing at the push of a button.
Notes: I found using the tor network way too slow, so I have since abandoned it for faster methods, which I will post about some day. Tor still remains an excellent “full-proof” way to stay anonymous on the internet though.
Notes: This addon hasn’t been updated in a long time... I’m not sure if it works with Firefox 3. To be honest, I don’t even remember what it does completely.