How to convert from pixels to millimeters

July 2nd, 2008

I am working with PHP and FPDF to generate a PDF invoice. The designers have created a couple of very helpful documents, there are three total. The first is a mockup of the invoice. The second shows fonts, font sizes, and font colors. The last document show the positioning of all elements on the invoice. My only problem, is that the document was made with pixels at a resolution of 300 DPI rather than in millimeters. Anyone that is familiar with FPDF will know that PDF’s created with FPDF can not be generated with pixels in mind. PDF documents in FPDF can only use point (pt), millimeteres (mm), centimeters (cm), or inches (in). Read the rest of this entry »

Two IP Address on a single network card on FreeBSD

June 30th, 2008

I needed to get one of my servers to respond to another IP Address. I have mostly used Linux and not FreeBSD. Linux is quite easy, but I have never done anything like this on FreeBSD, so here is how I got it work properly. Read the rest of this entry »

Rounding to the nearest half dollor (or quarter dollar)

June 18th, 2008

One of my recent projects required that I round the price I was calculating to the nearest half dollar. This started out at a pain. Rounding to the floor, or to the ceiling, or normal rounding is quite easy. But I have never had to round to the nearest half dollar. (or quarter dollar) After a little bit of time thinking about it, I came up with a solution. Read the rest of this entry »

C# Image Server Client (Using XML for the application protocol)

June 5th, 2008

Our assignment in class this week was to create a network based client that would connect to the teachers Image Server and make requests via XML for information such as getting a category list, getting and image list, and ultimately, getting the image itself. There were a few different things that needed to be handled to make this work properly. Granted, this isn’t the best code in the word, since the summer semester is so short, but it does work. For it to run properly, you have to be connected to the VPN at UVU. Read the rest of this entry »

C# Database Connection Example Program

May 29th, 2008

We were given a programming assignment in my network programming class that is defined as below. This is my solution to the assignment. I know it isn’t the best code in the world, but it works and will hopefully help someone else who is in need of knowing how to connect to a MSQL database using C#.

Write a program that will connect to the Image Database, list the categories from the category table then when the user selects a category in the list, show the name of all images in that category in another list box. To access the database, you will need to be logged into CSEVPN. Read the rest of this entry »

New Urinal Video Games Launched in Belgium

May 21st, 2008

Interesting article on the advances of modern technology. I never thought that I would be able to play video games at the same time as going to the bathroom. But some genius in Belgium has developed a game designed to be played by patrons of the a local bar. All I can say is “WOW”. Someone has way to much time on their hands. Here is a link to the article. Enjoy!

Multicast Network Chat in C#

May 21st, 2008

In my network programming class CS3670 at UVU (UVSC) we had an assignment to write a multicast chat program that would allow everyone in the class talk in the same chat window. This was used to show that we were able to use the multicast addresses and to also demonstrate our use of the UDP client libraries. Here is my solution: Read the rest of this entry »

C# (C Sharp) Console and Input Program

May 20th, 2008

Well, I’ve started a network development class at UVU (UVSC) and I have to quickly learn C Sharp to be able to get my assignments and labs done. Here is my version of the first lab (which is a simple hello world style lab) Read the rest of this entry »

Microsoft AlphaImageLoader crashing IE 6

May 20th, 2008

I’ve been developing a website for a local group that supports the arts (www.scera.org). The client called my place of work and mentioned that some of their users were having difficulties with IE 6 locking up. After spending several hours on the issue, I discovered that Microsoft has a bug, that causes the filter to no work properly when the images are preloaded. So to fix this issue I had to do the following: Read the rest of this entry »

Iron Man Review

May 19th, 2008

I have been incredibly excited for this summer to come. Why is that you may ask? Well, there are several very exciting movies coming out in the next few months. I saw Iron Man last week, and I must say, overall I was very impressed. The special effects were great. The script was well written (a few of the comic book movies have had some dumb lines). Everyone that I have talked to has enjoyed the film. Even the wifes of my friends and co-workers have enjoyed it. This isn’t just your typical super hero comic book movie. It is fun for all. I recommend you watch it and, make sure that you stay through the credits. There is a scene with Nick Fury, I know of several people that were confused by this scene. But this leaves the door open for a lot of really good things.


Switch to our mobile site