MainelyDesign.com Blog

Software Tagged Blog Posts

The Funniest Error Message Ever - Thank You Eclipse

Posted on 10/18/2010 at 06:34 pm | Viewed 2,643 times | 0 comments

In a depature from my [normally] on-topic (i.e. dry) posts I had to post this error message up here. It made me laugh! I was working on the fattest CakePHP controller known to man (over 4,000 lines, I know... not skinny) when Eclipse ran into issues.  Eclipse gave a very descriptive error message, stating that it couldn't, well see for yourself:

Using KDiff3 as Git GUI Merge Tool on Windows XP and Windows 7

Posted on 09/23/2010 at 01:39 pm | Viewed 8,218 times | 0 comments

I've been looking for the silver bullet solution to using KDiff3 as my git mergetool on Windows (using Git GUI).  I've finally got a solution that works in every Windows environment I've tried:

  1. Add the KDiff3 directory to your Windows System Path (e.g. C:\Program Files\KDiff3\)
  2. Add kdiff3 as your Git mergetool (From Git Bash, run git config --global merge.tool kdiff3)
  3. Add kdiff3 complete path to Git Config (From Git Bash, run git config --global meregtool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe")
  4. Go into Git GUI settings and set the mergetool to kdiff3 (if Git GUI doesn't pick up this setting from git config, which it should)

Difference Between Truncate and Empty (Delete From) in Mysql

Posted on 06/23/2010 at 02:30 pm | Viewed 2,640 times | 1 comment

I use Navicat for administering all of my MySQL databases.  It has a command that I always use- empty table.  I noticed today that all along there has been a command right below it for truncate table.  Hmmm.  I figured this would result in the same outcome and wondered what the difference is between emptying a mysql table and truncating the same table.

Export to PDF from Microsoft Publisher

Posted on 03/05/2010 at 10:54 am | Viewed 1,374 times | 0 comments

I have a client that sends me newsletters in Microsoft Publisher format.  I wanted to output the newsletter as a PDF, but wanted to keep the text for SEO and so users can copy and paste the text if needed.  Microsoft Publisher doesn't have an export to PDF function, so usually I would just do a File > Print and select Adobe PDF as the printer.  However, this would just be an "image" of the document, not the actual document with selectable text.  This is how you can get a PDF with rendered text out of Microsoft Publisher...

Faking Symlinks on Windows 2003

Posted on 09/17/2009 at 04:25 pm | Viewed 2,752 times | 0 comments

My production server is a LAMP server.  I love it.  I have one cental location for my CakePHP application and symlink the folders I need to each individual hosting account.  It's pretty easy to do and very powerful.  I work on another server that is Windows 2003.  Everytime I sit down to do work, I bemoan not having the ability to create symlinks.  Turns out there is a way...

Manually Installing MySQL on Windows 2003 Server

Posted on 09/02/2009 at 12:02 pm | Viewed 1,354 times | 0 comments

I have been trying to install MySQL on a web server running Windows 2003 for quite a while now.  I was finally successful! Here's how I did it...

Does your server have a hard-coded IP address?

If so, you need to make localhost refer to the manually assigned IP address in your hosts file.  This file is located in C:\Windows\System32\drivers\etc.

Cheatsheet for Creating .MOV Files from .VOB files (DVDs)

Posted on 07/30/2009 at 11:38 am | Viewed 1,444 times | 0 comments

Every now and again I need to take a video from a promotional DVD and put it on a client's web site.  I use a handy utility that will convert almost any video file into a flash video (.swf/.flv).  The hard part usually comes from having to rip the video from the DVD. 

Avoiding Flash (.flv) 404 Errors on IIS 6 (Windows 2003)

Posted on 07/15/2009 at 11:11 am | Viewed 2,458 times | 2 comments

An interesting thing happens on Windows 2003 Server (IIS 6) when you try and play a .flv file through an embedded shockwave player...nothing.  Well, actually you get a 404 error. 

Fixing the .flv 404 error is simple

All you need to do is tell the IIS server that the MIME type for .flv exists.  Then, the web server can send the appropriate MIME-TYPE header when needed.

Fixing the Default HP OfficeJet Scanner Settings (which suck)

Posted on 05/28/2009 at 11:11 pm | Viewed 1,643 times | 0 comments

The default settings for my OfficeJet L7500 All-In-One Scanner suck!  I thought the scanner was junk.  Every photo I scanned, espcially glossy finished photos, were coming out looking like they were from a 1960s era camera: over-exposed and super high contrast.  Not good!  I thought I had good Photoshop skills, but even they were no match for the over-exposed mess that HP was sending into Photoshop.

Best Eclipse Feature: Link With Editor

Posted on 05/21/2009 at 09:43 am | Viewed 1,816 times | 0 comments

I use Eclipse for all of my CakePHP development work.  I love that you can get code completion, class inheritance, and more by following these steps.  I also loved that I could have 20 something files opened, and when I changed the active document in the editor, my PHP Explorer hierarchy would change in response. 

Dealing with MySQL Old-Style Passwords

Posted on 05/20/2009 at 04:37 pm | Viewed 1,625 times | 0 comments

I ran into a problem I've seen before- Client does not support authentication protocol requested by server; consider upgrading MySQL client. Last time I came across this MySQL error, it was a simple query to fix the issue (from dev.mysql.com):

UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') WHERE Host = 'some_host' AND User = 'some_user';
FLUSH PRIVILEGES;

Naming a Text File .htaccess on Windows

Posted on 05/13/2009 at 12:15 pm | Viewed 1,319 times | 0 comments

A big pain- you can't just name a file .htaccess through Windows Explorer.  It complains that you need to supply a name!  No problem.

Here's how you can name a file .htaccess (only tested on Notepad, though hopefully it will work on more):

  1. Load up your file in Notepad or create a new file in Notepad
  2. Add your .htaccess declarations
  3. File > Save As
  4. In the filename text box put ".htaccess" - with the double quotes (".htaccess" exactly)
  5. In the filetype select box choose 'All Files'
  6. Save it!

Keep Old Settings When Upgrading Eclipse

Posted on 05/12/2009 at 01:02 pm | Viewed 1,603 times | 0 comments

I decided to upgrade my version of Eclipse to 3.4 (Ganymede) mainly so I could use the Git plugin.  I wanted to migrate my settings from one install to the other.  I know I had done this before, when I upgraded from 3.2 to 3.3, but forgot how.  So I don't have to scratch my head so much next time, here is how you can move your settings after you upgrade your version of Eclipse.

Avoiding New Line Errors using Git on Windows

Posted on 05/12/2009 at 12:27 pm | Viewed 1,752 times | 0 comments

I'm finally working on moving my code over to a version control system.  I've tried several times over the past few years to start using Subversion, but I never quite got into it.  After hearing so much about Git, I decided I needed to start using it.  Luckily, most people tell you to forget everything about Subversion when using Git- no problem there!

Getting Full Resolution Pictures out of MS Word (almost)

Posted on 04/29/2009 at 11:14 am | Viewed 2,635 times | 6 comments

People use what they know.  Most of the time I get photos embedded in an MS Word document for use on a web site.  My workaround to date has been to enlarge the picture (in Word) until it is as big as it gets (keeping quality) or the size I need.  I would then do a print screen and paste into Photoshop. 

I knew that there had to be a better way, but at least I was getting as much resolution as possible from the photo/picture.  Well I came across an interesting scenario today- I couldn't enlarge the photo.  I don't know if formatting was locked on it, but I didn't have time to fiddle with it.  Instead I searched for a way to export embedded photos at full resolution and found this thread.

Full Tag List

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design