So, I got obsessed over the past two weeks or so "solving" archive files. This involved trying to extract the resources from video game archive files. Even if I don't care about the result, it was like solving a puzzle to figure out how to get the resources out. I'll probably write about it sometime.
What I wanted to point out now is the hex editor I used. To solve archive formats, you need to open up the archive files as binary. I started off using Textpad, since it's my text editor of choice on windows. It's not that convenient though... after reading some tutorials, I settled on Hex Workshop.
Hex Workshop lets you easily copy and paste binary, allows you to easily set bookmarks to binary fragments, easily lets you color-code the binary, easily lets you jump to specific offsets, lets you have multiple files open simultaneously, and has a hex calculator. I heartily recommend it. It is pretty pricey (~$90)... but that's pretty much the price of two video games. I think it's worth it as I've had so much more fun doing this than playing games recently. Hex Workshop
On another note, on a slow day, I played around with Cheat Engine. It was a lot of fun. Cheat Engine lets you easily mess around with Windows memory. The most obvious use is changing game memory to give you unlimited whatever. It's really fun to play with in general and comes with a great tutorial that'll get you started. If you have some time, give it a try. http://www.cheatengine.org/
Sunday, November 28, 2010
Sunday, October 31, 2010
C# Web Service Plain Text Response
It took me far longer than I expected in order to figure out how to return plain text from a C# web service. I'm not sure why this took so long for me to figure out, but if it wasn't just me, then maybe this post can help other people out.
The Problem: When writing a web service endpoint in C#, if the return type is a String, the result will be an XML formatted string.
For example, the following web service:
returns the following string:
It isn't that big a deal and the contained text can be easily parsed out, but it wasn't what I wanted and extra parsing code somehow seems wrong. I wanted the result to simply be the text I set.
The Solution: The return type needs to be a Stream.
So now the following web service:
returns the expected result:
The Problem: When writing a web service endpoint in C#, if the return type is a String, the result will be an XML formatted string.
For example, the following web service:
- public String TestServiceA(Stream input)
- {
- return "Some kind of Text";
- }
- <string>Some kind of Text</string>
The Solution: The return type needs to be a Stream.
So now the following web service:
- public Stream TestServiceB(Stream input)
- {
- MemoryStream ms = new MemoryStream();
- StreamWriter sw = new StreamWriter(ms);
- sw.Write("Some kind of Text");
- sw.Flush();
- ms.Position = 0;
- return ms;
- }
- Some kind of Text
Thursday, September 30, 2010
Router and Bridge
Router and Bridge
At home we're basiscally using five computers, one computer for each one of us. We all need internet access, we don't want anyone to have to use wireless, and it would be nice if we can all see each other's shared data. We have two 4 LAN Port routers, a D-Link 624 (wireless) and a D-Link 604. Those routers have worked very well for us, much better than Linksys routers have worked. We decided to have one router act as a bridge. Since one port from 604 would connect to one port from 624 (making them kind of act as a single router) we would have a total of six LAN ports. I feel it's really common knowledge how to set up a router, but making the other router act as a bridge isn't as clear. These are the steps to do this and they should be pretty adaptable for any routers.
1. Set up the first router as normal.
2. Connect a PC directly to the second router (and not the first router.)
3. Reboot the PC.
4. Log in to the secondrouter (usually defaulted at 192.168.0.1, with User Name = admin and no password).
5. Go to the DHCP menu and disable DHCP by checking "Disabled" for DHCP Server and Static DHCP.
6. Go to the LAN menu and change the IP Address to 192.168.0.99. (It can't conflict with the first router.)
7. Click Apply to save the settings. (You lose the connection to the second router since its IP address changed.)
8. Connect one of the second router's Local (LAN) ports to the first router.
At home we're basiscally using five computers, one computer for each one of us. We all need internet access, we don't want anyone to have to use wireless, and it would be nice if we can all see each other's shared data. We have two 4 LAN Port routers, a D-Link 624 (wireless) and a D-Link 604. Those routers have worked very well for us, much better than Linksys routers have worked. We decided to have one router act as a bridge. Since one port from 604 would connect to one port from 624 (making them kind of act as a single router) we would have a total of six LAN ports. I feel it's really common knowledge how to set up a router, but making the other router act as a bridge isn't as clear. These are the steps to do this and they should be pretty adaptable for any routers.
1. Set up the first router as normal.
2. Connect a PC directly to the second router (and not the first router.)
3. Reboot the PC.
4. Log in to the secondrouter (usually defaulted at 192.168.0.1, with User Name = admin and no password).
5. Go to the DHCP menu and disable DHCP by checking "Disabled" for DHCP Server and Static DHCP.
6. Go to the LAN menu and change the IP Address to 192.168.0.99. (It can't conflict with the first router.)
7. Click Apply to save the settings. (You lose the connection to the second router since its IP address changed.)
8. Connect one of the second router's Local (LAN) ports to the first router.
Tuesday, August 31, 2010
Free Quality Burning Software
http://www.imgburn.com/
This summer I needed to burn an DVD ISO Image, but I was away from home and didn't have any burning software on my laptop. So I needed something free. A quick search turned out ImgBurn, which worked for me very well, seemed very well made, and was very simple to use. So if you need free CD/DVD burning software, I recommend that you try ImgBurn.
This summer I needed to burn an DVD ISO Image, but I was away from home and didn't have any burning software on my laptop. So I needed something free. A quick search turned out ImgBurn, which worked for me very well, seemed very well made, and was very simple to use. So if you need free CD/DVD burning software, I recommend that you try ImgBurn.
Missed Time
Whoops, missed a few months. I was out of the country and didn't have the time to post anything. I'm back home now so I'll make up for it.
Thursday, July 08, 2010
Subversion Intro
I've been using subversion (nope, not a git guy yet) for most of my own work, even got our projects at my current job onto subversion. It's much better than source safe/offsite (which I used at a previous job) and I even prefer it to CVS. Subversion is designed specifically to be a modern replacement for CVS and shares a number of the same key developers. It uses a copy-modify-merge for file sharing. To read more about subversion, you can read their very good documentation at http://svnbook.red-bean.com/. The following is a link to an appendix from the svnbook that introduces subversion for cvs users. I think that it will be a very helpful and painless way to quickly understand subversion with a cvs background. You can read it starting at http://svnbook.red-bean.com/en/1.2/svn.forcvs.html.
Subversion’s homepage is http://subversion.tigris.org/. I install it using the instructions found on http://www.excastle.com/blog/archive/2005/05/31/1048.aspx.
The most direct way of using subversion is through the subversion client tool called svn. You can download the tool from subversion’s site, http://subversion.tigris.org/. For directions on using the tool, refer to the appropriate section at http://svnbook.red-bean.com/.
Another subversion client option for Win32 users is TortoiseSVN, which is implemented as a Windows shell extension. TortoiseSVN can be downloaded from http://tortoisesvn.tigris.org/. It is very simple and intuitve to use as all commands are added to the right click context menu when using windows explorer. Special icons are used to show which files and folders are under revision control.
If you're using Eclipse, there is a plugin called SubClipse that will integrate Eclipse and Subversion. You can download the plug-in from http://subclipse.tigris.org/. A good guide to installation and usage for the plug-in can be found at http://dev2dev.bea.com/pub/a/2005/11/subclipse.html?page=1.
Subversion’s homepage is http://subversion.tigris.org/. I install it using the instructions found on http://www.excastle.com/blog/archive/2005/05/31/1048.aspx.
The most direct way of using subversion is through the subversion client tool called svn. You can download the tool from subversion’s site, http://subversion.tigris.org/. For directions on using the tool, refer to the appropriate section at http://svnbook.red-bean.com/.
Another subversion client option for Win32 users is TortoiseSVN, which is implemented as a Windows shell extension. TortoiseSVN can be downloaded from http://tortoisesvn.tigris.org/. It is very simple and intuitve to use as all commands are added to the right click context menu when using windows explorer. Special icons are used to show which files and folders are under revision control.
If you're using Eclipse, there is a plugin called SubClipse that will integrate Eclipse and Subversion. You can download the plug-in from http://subclipse.tigris.org/. A good guide to installation and usage for the plug-in can be found at http://dev2dev.bea.com/pub/a/2005/11/subclipse.html?page=1.
Monday, May 31, 2010
Hiren Boot CD
I'd heard about Hiren's Boot CD before, but I never needed it until last weekend. There were a few Windows machines that none of us knew the passwords or even account names to anymore. Using Hiren's Boot CD, we were easily able to get back in. We could see the accounts on the machine, we could reset the passwords, and we could lock/unlock accounts. It was very convenient.
There aren't many times most people would need a tool like this, but it's nice that it's there just in case. Read more about it (and get links to it) at http://en.wikipedia.org/wiki/Hiren's_BootCD A mac version of this type of program seems to be Boot-123.
There aren't many times most people would need a tool like this, but it's nice that it's there just in case. Read more about it (and get links to it) at http://en.wikipedia.org/wiki/Hiren's_BootCD A mac version of this type of program seems to be Boot-123.
Friday, April 30, 2010
Wednesday, March 31, 2010
Sharp Develop
Thought I'd point out Sharp Develop, a free alternative to Visual Studio. In some ways, it's much more convenient and friendly. I'd suggest giving it a try, C# is a pretty good language to work in.
Sunday, February 28, 2010
iPhone Headphone Issue
The sound from my iPhone when using headphones was coming out funny. The speaker was perfectly fine, but when using headphones, any voices (whether in music or while on the phone) had a weird tinny echo. I tried resetting the phone a few times, but that didn't do anything. I took out a flashlight and looked in the headphone outlet... it turned out there was lint in the jack. Using a toothpick, I fished it out and then the sound was back to normal. Just thought I'd post, in case anyone else is having the same problem.
Monday, January 04, 2010
Driverless Network Printer on Windows 7
Sheesh, I spent like half an hour trying to add a network printer on my new Windows 7 machine. When I tried to add an HP Laserjet 1200 PCL5 printer, it said a driver couldn't be found, even though I saw Windows 7 had the driver when I tried to add it locally. This is how I ended up adding the printer (instructions were found at: http://www.sevenforums.com/drivers/2726-printer-network-no-driver.html). You'll need some computer know-how, but it's not too tough. Essentially, you create a local printer, then change its settings to your network printer:
0. Go to "Devices and Printers" from the start menu.
1. Add Printer (click)
2. Choose local printer
3. Choose use existing port
4. If your network printer type is not listed, click windows update (requires internet).
5. Wait...
6. Check to see if your printer is now listed. If not, this guide won't work.
7. Choose newly listed printer.
8. Printer will then install.
And to now use your network printer...
1. Right click printer icon. Left click printer properties.
2. Click port tab.
3. Add new port. Local port
4. Type in address of shared printer ie \\Name or ip address of computer with attached shared printer\Shared printer name
5. Click general tab. Print test page. See if your test page printed.
0. Go to "Devices and Printers" from the start menu.
1. Add Printer (click)
2. Choose local printer
3. Choose use existing port
4. If your network printer type is not listed, click windows update (requires internet).
5. Wait...
6. Check to see if your printer is now listed. If not, this guide won't work.
7. Choose newly listed printer.
8. Printer will then install.
And to now use your network printer...
1. Right click printer icon. Left click printer properties.
2. Click port tab.
3. Add new port. Local port
4. Type in address of shared printer ie \\Name or ip address of computer with attached shared printer\Shared printer name
5. Click general tab. Print test page. See if your test page printed.
Subscribe to:
Posts (Atom)