welcome to my blog
The best place on the internet for random code!
www.therealgromer.com









Dec
13
    
Posted (Mike) in General, Microsoft, Office 2007 on December-13-2007

If any of you have Office 2007, you’ll notice the pretty nice WordArt options in Power Point.  If you attempt to do the same in Word 2007 though, you’ll be in for a big disappointment.

WordArt

I’m hoping that  in the future, MS will release an update to fix this.  The old WordArt is ugly at best.  Microsoft dropped the ball on this.  ON a positive note, it’s the only gripe I have about Office 2007 so far!



Nov
15
    
Posted (Mike) in 2003 Server, BG Alert, Coding, General, Projects, Version Control on November-15-2007

Recently I had to reinstall 2003 on my server at home, which was home to my BG Alert SVN server. I vaguely remembered setting SVN up about a year ago, so I had to put my trust into Google. Unfortunately, there wasn’t one site that helped with the whole setup. Since I don’t want you to have to deal with that, I’ve put all the information here, in one post.

To get started, you will need to download subversion, the current version is 1.4.5. Make sure you select the setup.exe to download for the newest version as well.

Once you’ve downloaded and installed subversion on the server, create a directory for your repositories. This can be done in Windows Explorer or from the command prompts with the mkdir command (mkdir C:\repositories). You will also need to give the NT AUTHORITY\NetworkService account appropriate rights to the directory you create. If you forget to grant access, you might get denied when Read the rest of this entry »



Sep
06
    
Posted (Mike) in Coding, Linux, Neumont, SuSE on September-6-2007

When I first started using Linux (OpenSuSE 10.2), I spent a while trying to figure out how to share a folder on it with my Windows machine and vice versa. I found plenty of information through Google, but none of it was in one place. I figure it would be a great idea to put that information in one place for anyone else that wanted to set up a Samba share.

First thing you need to do is activate the Samba server on your Linux machine. It’s an easy process but you will need the root password. Open up YaST and click on Network Services in the left side. In the NetworkServices window, click on the Samba Server icon. You will now have the Samba Configuration window open and it should be on the Start Up tab:

YaST Samba Configuration Start Up Tab

You will want to select the way you want Samba server to boot up. I set mine to “During Boot” but you have the option to select “Manual.” You will also want to open the port in the firewall as well.

Next go to the Identity tab. You will want to enter in the workgroup your other computers are on. Mine were the default Windows “WORKGROUP.” You can also set it up to work on a Domain Controller, but I’m not 100% sure on how that works since I don’t run a DC in my house.

Samba Configuration Identity Tab

Once you’ve set your workgroup or domain, go to the “Shares” tab. You will be able to manage all the Samba shares here. To add a share, click the “Add” button and you’ll get the “New Share” window. Fill in the “Share Name” and the “Share Description” here. Also set the path to the directory you are sharing here. You are also able to set the share to read only here. This is also how you would share a printer.

YaST Samba Configuration Add Share

Once you’ve filled in all the new share information, clickt he OK button at the bottom right and you will come back to the Shares tab of the Samba Configuration window. Add any more shares that you want and then click the Finish button at the bottom right. It will save all the changes and you will then be able to open your shared folders from another computer:

Samba Shared Folder



Aug
25
    
Posted (Mike) in ASP.Net, BG Alert, C#, Coding on August-25-2007

I was getting this exception while finishing up the sign up page on BG Alert and I couldn’t figure out why it was doing it.  I was getting redirected after I was able to sign up.  I was getting my welcome email for my “new user,” but I was also getting an email about this error (the system sends me emails on any error for during this testing phase to help me fix bugs and issues).  I was even getting redirected, which is what threw me so much.  I was getting an error caused by the Response.Redirect, but it was still running.

Turns out that it was because the Response.Redirect was inside a try..catch block.  To fix this error, all you do is pull the Response.Redirect out of the try block or ignore the error.  Hope this helps some of you out!



May
28
    
Posted (Mike) in General on May-28-2007

With the release of Opera 9.21 a couple weeks ago, people started to tell me that it was hands down better than Firefox. I’ve been using Firefox on and off since version 0.7 and exclusively since version 1.0. I used Opera 7 in there somewhere and had tried it since I switched 100% to FF with v1.0. It never was as good as Firefox IMO.

Fast forward to 5/2007. This new Opera release is gaining users from Firefox so I decide to tell people it sucks and then try it. Makes sense, eh? Download was small and the install was just like any other program out there. I open it after the install and notice nothing has changed since I last used Opera. That isn’t a bad thing, Firefox hasn’t change it’s appearance in a long time either. I hit CTRL-T to open a Tab and I get a Speed Dial page. Pretty slick. I load it up with URLs to my favorite/most used sites and get this:

Speed Dial

It’s pretty much one of the coolest things I’ve ever seen in a browser. Put your 9 favorite or most used websites there, hit CTRL-T and click the one you want to open. You can also hit CTRL - #, where # is the Speed Dial number of the site you want to open. I did a search on Mozilla’s extension site and there was one Speed Dial extension and it was crap compared to Opera’s. You drag and drop in Opera’s version and it has clear buttons as well as context menus for every Speed Dial you have setup. From the context menu, you can clear the URL out of it, update the thumbnail and set the update interval.

Unfortunately, that’s the only positive thing I’ve taken from Opera 9.21 so far. It’s enough for me to keep testing it out, but I don’t think it will be enough for me to use it past this week. The find option in Opera is still an annoying popup like in Internet Explorer:

Find Window

With Firefox, when you hit CTRL-F, you get a search bar at the bottom that isn’t in the way at all. Another thing that bothered me about Opera is when you middle click on a bookmark in the bookmarks menu, it won’t open in a new tab. In fact, the only button that will do anything is the left mouse button. No context menu when right clicking on bookmarks in the bookmarks menu. Middle clicking will open in a new tab if the bookmark is in your “Personal Bar,” which is Opera’s name for a bookmarks bar. The other thing that really bothered me is when you only have one site open, the tab bar doesn’t go away. I couldn’t find a place in the preferences to change this behavior, as that happens by default in Firefox, but at least there is an option to change that.

Stupid Tabs

That’s about all I’ve gathered in the two hours of use I’ve put in. Like I said, I don’t see myself using this in place of Firefox, but I DO hope that someone comes out with a comperable Speed Dial for Firefox. It’s one of the coolest features I’ve seen in a browser.

Also, I am aware that there is a built in torrent feature, but I decided to not bother testing it out since nothing is going to beat uTorrent and I’m not going to leave a browser open to seed.

Edit… Opera apparently doesn’t like Wordpress:

Broken Wordpress

Fixed by copy/pasting into the edit page for this post in Firefox.



Apr
30
    
Posted (Mike) in Vista on April-30-2007

Wired networks > wireless networks. You really can’t deny it. I have no idea why Microsoft puts the wireless network adapter above the wired adapter in the priority list. Some of you may have changed this in Windows XP, pretty easy finding the Network Connections folder, going to Advanced -> Advanced Settings and reordering the adapters in there. It’s the same way in Vista…once you find the Advanced menu. Windows Vista made a lot of changes to some of the control panel, so it takes some time finding everything.

I’m sure there is a way to actually click on a menu item to open the Network Connections folder, but I think it’s easier to go to the Start menu and type in ncpa.cpl and hit enter.

Start -> ncpa.cpl

The Network Connections window in Vista looks almost the same as in XP, just a few little things. One of them is the lack of a menu bar. To get the menu bar showing, you need to click on Organize and then click on Layout which expands a menu and then click Menu Bar. Now the menu bar should be showing.

Layout menu

Now you can setup the connection order the same way as in XP. Go to the Advanced menu, click on Advanced Settings and you can highlight network adapters and click the up and down arrows to move the order around.

Advanced settings window.

You should be good to go now. Also, if anyone knows how to get to the Network Connections window without typing in ncpa.cpl in Start menu, please leave a comment.



Apr
27
    
Posted (Mike) in C#, Coding on April-27-2007

If any of you code in Visual Studio 2005, you might have seen this exception thrown before.

Loader Lock Detected

It can be really frustrating if you don’t have the answer. Let me take that stress away. All you need to do is press Ctrl + Alt + E and you will get this window:

Exceptions Window

Expand Managed Debugging Assistants and then scroll down until you see the LoaderLock checkbox. All you need to do is uncheck it.

Loader Lock Checkbox

Hit Okay and you won’t see this problem in this current project again. It will come back in other projects though. I’ve heard there are registry hacks to fix this, but I have yet to try. If anyone has, please comment on the success of it!



Apr
27
    
Posted (Mike) in C#, Coding on April-27-2007

If you are a programmer, I’m sure you have used try/catch blocks in your code to hopefully eliminate any dreadful unhandled exceptions. We all know they usually happen only when giving a presentation and that’s no good! You could go by throwing generic exceptions all day long…

  1. throw new Exception(“Hey, you broke my program :(”);

That’s a bit generic though. This is where custom exceptions come in. It’s more intuitive and much less generic than throwing Exception() every time. It will also give you better control over choosing what to do when any exception is thrown. Instead of having one catch block, you’ll have the catch blocks for your custom exceptions with the generic Exception() last to catch anything that got past.

First thing you’ll need to do is create a Windows Library project. I named mine CustomExceptions.

Create project window.

When the new project is open, you’ll have a file called Class1.cs which you can rename to the name of the exception you are going to create. When you do this, you will see a window like this:

Rename file popup.

Just click the Yes button and your class name will change throughout your project. Now we’re ready to do the actual coding. When creating custom exceptions, we must extend the ApplicationException class.

  1. public class IllegalInputException : ApplicationException
  2. {
  3. }

Now we need to create the instance variables to be used in your exception. We’ll need one for the severity level, one for the log level, one for the inner exception and one for the message.

  1. private int severityLevelOfException;
  2. private int logLevelOfException;
  3. private Exception innerException;
  4. private string customMessage;

The severity and log levels allow you to give a bit more information about the type and severity of the exception you are throwing. If your exception was caused by another exception, it will store the original exception data as the inner exception. Last, the custom message is what you put in it to be used when it is caught. Read the rest of this entry »



Apr
26
    
Posted (Mike) in Vista on April-26-2007

I have Vista Business installed on my desktop at home and love it so I decided I would install it on it’s own partition on my IBM T60p because I wanted to keep XP around just in case some of our school software didn’t work with it, I’d have the option to reboot into XP. I’m sure most of you might want that too so you’d also be going the dual boot route. The annoying problem I faced when I was done setting up Vista on its partition was when the boot menu comes up after POST, the two options are Microsoft Windows Vista and An Earlier Version of Windows. I found that annoying and then found out I couldn’t access boot.ini through msconfig or the System Properties so I did a little searching. What I found was there are two options: an easy one and a hard one. In case you’d like to do more research, the hard option is opening a command prompt (Start -> type in cmd and hit enter) and running BCDEDIT. It’s all command line and pretty confusing.

The easy way around this is downloading EasyBCD by NeoSmart Technologies. Once installed, you simply run it and click the Configure Boot button:

EasyBCD Configure Boot window.

In the bottom half on the right, select An Earlier Version of Windows in the Choose an OS to change the associated settings drop down menu. You can then change the name in the Name text box. Hit the Save Settings button, reboot and your boot menu will now have the new name and Windows Vista!



Apr
25
    
Posted (Mike) in BG Alert, Coding, Projects on April-25-2007

In addition to being a student at Neumont, I own a company named BG Alert, L.L.C. It provides parents of type 1 diabetics with ease of mind by keeping them up to date on their child’s blood glucose levels while at school, at a friend’s house, basically anywhere without parents. The child enters in their blood glucose level and sometimes some other important information about their health and they get an instant response from the database that instructs them what to do based on the numbers entered.

The best thing about this system is the parents create these messages and they are custom based on the time of day and their blood sugar at that time in the day. Once the system tells the child what to do, it sends an email and a text message to the parent(s). This eliminates the need for the parent to call the school every hour to see what’s going on and to tell them what to do. It allows the parents to have more freedom and not worry as much.

Right now, the website is not complete, but getting there. The ETA on completion is May 6th. The database is created as are most of the stored procedures used in it. The data and business layers are about 70% done as of tonight and the website has a layout that just needs the company’s copy and forms entered into. Fortunately, I’ve been able to have help from some of my good friends:

  1. Josh Arnold
  2. Dan Marolt
  3. Ryan Abreu
  4. Tommy English

Without these 4 guys, I would have an ETA of May 6th next year! If you have the opportunity to work with any of them, jump on that chance, you will not regret it.

Also, if you know of any parents of type 1 diabetics, tell them about my site and give them my email address (mike@bgalert.com), I’m going to need testers soon!