Showing posts with label Computing. Show all posts
Showing posts with label Computing. Show all posts

Friday, January 23, 2009

New Hidden Mars Edit feature


MarsEdit

I know it's been a while since I've last posted anything on this blog, but I've got something really cool to share...

I'm usually not one that gets too involved with too much software by submitting bug reports and being whiney and cry about features that I think are missing or to diss software outright without giving it a chance (sorry Microsoft you've had your chances and missed them all! -- Not a big fan)

But I digress...

As you might already have noticed I'm a fairly large fan of MarsEdit, the amazing Mac blog publishing application... and I made a feature request of a sort on the MarsEdit forum.

The request was due to having a certain setting in Blogger that I had that wasn't really average, and was messing up how Blogger and MarsEdit interacted causing the format of my posts to get a little messed up.

Specifically my problem was:

... the line break tags disappear and are substituted with a hard return when the posts are imported into MarsEdit.

I have Blogger's "Convert line breaks" setting (in Settings > Formatting) set as "No" to take advantage of more advanced layout options that can be achieved through MarsEdit.

I can't remember what release I noticed they started to disappear, but I've been secretly hoping somehow it'd get fixed...

And maybe now that I've mentioned this hopefully it will be sooner!

[The developer] probably automatically assume[s] that Blogger blogs won't have that option on, and to keep Blogger from adding line break tags after every line - even if there is already a line break tag at the end of the line... which was a Blogger integration bug that was in one of the earlier releases of MarsEdit as I recall.

And having to redo the formatting every time I wanted to update a post or view and copy a section from one post to another was a little annoying... so I provided my point-of-view to the developer of MarsEdit, Daniel Jalkut through the MarsEdit Forum.

I wasn't necessarily expecting a whole lot, just hoping that he might do something to fix it or show me some other way to work with the little inconvenience I was having regarding MarsEdit... It was really no biggie!

He did get back to me on the forum rather quickly with a response and saw that there was something he could do to the app that might help out.

After hearing very little in the meantime, even after a software update that happened a long time ago, I was curious if Daniel already implemented the change or was considering it for a future release.

And as it turns out...

Yes, it's true you can make a difference in the programs you love!

Daniel had implemented a hidden feature in MarsEdit for the ultimate compatibility with Blogger blogs that have the "Convert line breaks" setting set to "No"!

Here's all you have to do:

  1. Quit MarsEdit if it's open.
  2. Open Terminal.app on your mac (Application/Utilities/Terminal.app)
  3. Copy the following:
    defaults write com.red-sweater.marsedit DisableBloggerMarkupMassage -bool YES
  4. Paste that line (one single non-carriage-return line) into the Terminal window
  5. Then hit the return key
  6. Open MarsEdit
  7. Then for each of your Blogger blogs that you have do the following:
    1. Select the blog so that it's highlighted in blue in the list on the left blog list
    2. If the blog's Preview Text Filter setting (accessed through the toolbar's "Show Settings" button and in the "Composing" tab for the blog's settings) isn't set to "None", change it to "None"
      [click OK after checking &/or changing]
    3. Then when the blog is still selected / highlighted on the left, click on the "Refresh" button in the toolbar (the circular blue arrow)
  8. See the changes

Now your Blogger blogs - when they're reloaded - will have the <br /> tags intact when opening the Post for Editing, and will also render previews correctly when you select a post.

NOTE: This setting affects all Blogger blogs in MarsEdit, it isn't a blog-specific setting but is universal in that regard... So make sure you have all your Blogger blogs in MarsEdit to have the "Convert line breaks" setting set to "No" when you use this special hidden feature!

It would be cool if someone else can benefit from this new feature too... hey, I know:

Why not let me know if you like this feature or use it by leaving a comment below?!

Also, give tons of thanks to Daniel Jalkut the MarsEdit developer for implementing this new hidden feature!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2009/01/new-hidden-mars-edit-feature.html

Monday, May 19, 2008

My MySpace Profile Is Open

I finally made my MySpace profile public. If you want you can check it out at www.myspace.com/bvanscoter...

I think I out-did myself with the cool theme that I applied to it... I created the images and decided to go with a Bleach theme for it (at least for now).

I'm a little into that show!

I really like how this video puts together a bunch of scenes from Bleach to some killer music:

Bleach - Ichigo's Resolve

As well, I thought this video was quite sweetly put together... because it goes so well with the story-line of the series:

Bleach - Red September

After having my profile closed to public viewing so I could get it all themed properly with CSS and what-not... I finally made my profile public.

Which means you can view my profile without any limitations right now!

And while you're at it go ahead and add me as a friend!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/05/my-myspace-profile-is-open.html

Thursday, May 1, 2008

The Easy Way To Install X11 On Max OS X Tiger

A few days ago I asked my dad to look into compiling and figuring out how to work with something that uses FUSE, MacPorts, and I guess requires X11 app for what he's doing (he told me he needed it for the task - and I believe him because I don't know).

By the way I'm talking about the X11 app, not the X11 Software Development Kit or SDK.

Well, when my dad upgraded to Mac OS X Tiger he didn't do the custom install to install the X11 app... Apple didn't automatically include it in the regular or basic install.

So yesterday my dad spent several hours re-installing the entire Tiger operating system again just so that he can get the X11 app on his computer...

Well, as it turns out when I upgraded the MacMini's hard drive and installed Tiger again I didn't do a custom install to get the X11 app on my computer.

Now here's the difference in approach to how I went about installing X11...

Instead of straight-away thinking that I had to re-install Mac OS X Tiger all over again using a custom install and checking off the X11 install, I first did a Google search to see if I can just install X11 on its own.

Good thing I did too... because you can install X11 on Tiger if you forgot before! I really didn't want to spend another good part of a day to install Mac OS X 10.4 Tiger again!!

All you have to do is insert the Mac OS X 10.4 Tiger install DVD and use the "Optional Installs.mpkg" to install the X11 app by itself...

You have to go through the standard SLA's and destination drive stuff... then you can check off the various optional installs that you want to make... and in that list you can check off X11 and continue with the install to get the X11 app on your computer!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/05/easy-way-to-install-x11-on-max-os-x.html

Saturday, April 26, 2008

The Virtual Store Concept And Thoughts

On April 21st, 2008 The Unofficial Apple Weblog (TUAW) reported that Apple filed a virtual stores patent in which customers might be able to see where other shoppers are in the store and possibly interact with each other.

TUAW makes an intriguing point that "this system would also allow for storewide announcements of special events or sales going down."

MacNN where Apple's virtual store patent was first revealed tells of some of the creepy almost stalker-like features in Apple's patent (under the headline "Caution: A Work In Progress").... which would probably be or quickly become annoying!

Now as TUAW mentioned "I doubt the old methods of clicking and browsing by yourself are going away anytime soon."

The reason the standard web interface of today won't disappear anytime soon boils down to why people are shopping online and what their purpose is.

More frequently than not people who are "shopping" online are just looking for more information... whether it be more information about a particular product or any number of things...

But it all comes down to the basic marketing concept that people are looking for a solution for a problem they have... even if it is just a problem only that they perceive! (But that's a post for another day)

In such a case where people are looking for the solution to their problem or want more information about a particular product then the idea for such an interactive virtual store may be an attractive option...

And may also be perceived as a good option for people who are really interested in making a purchase but are a little unsure... and need that little extra social proof or assistance.

However, in the case that I'm sure we all frequently come across is quite simply the fact that we want what we want and we want it now!!

Many times we've already done our research about the thing we're going to get and the only thing standing between us and having it is the distance between our chair and the place where the thing we want is...

And we don't want to bother with anyone else - they'll just slow us down - so if we can log online, put the thing we want in our shopping cart, pull out our credit card and have it show up at our door we couldn't be more satisfied!

Why try and put any extra steps or roadblocks in our way to get what we want. Plus, why would you want to add a whole new level of complexity to everything that we didn't ask for or ever wanted....

Which is why the standard web interface of today won't... and shouldn't disappear!

It will be a nice feature separate of the standard web-based shopping interface for those who would like it, but give us all the option to do things as we would normally do as fast as possible...

Because if you start adding those extra features into the load-time of the website, it has the potential to make it a much more agonizing experience to get through all the steps for getting what we want!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/04/virtual-store-concept-and-thoughts.html

The New Virtual World

On April 4th, 2008 Marketing Vox reported on Nickelodeon's virtual world development... particularly about various extensions to couple their current virtual worlds and a new virtual world concept developed by Nick - Monkey World.

According to the article Monkey World will contain social networking features but will be more of a massive multiplayer online game (MMOG) than a traditional virtual world.

This idea at least to me seems to be a better approach than what most people think of as a virtual world... since most of the virtual worlds I've tried out seem to be lacking in the area of organizing and collecting/storing your in-world social data.

Also, having something to accomplish in the virtual world much like a MMOG operates would reduce the standard boringness of going to a virtual world and just explore... it gives you something to do if you aren't feeling quite social at the time or are new - it gives you something that you can connect with other users about!

Having something to connect with other users in a virtual world is important because knowing what to say to someone else to connect with them in a standard virtual world can be challenging...

But once you add in the dynamic of all having a common goal or at least something to work for like in a MMOG you instantly have something in common that you can begin a conversation or even a friendship with!

I think that the two unique dynamics of Nick's new Monkey World with integrated social networking and an MMOG-like concept can become a model for all virtual worlds.

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/04/new-virtual-world.html

Tuesday, April 22, 2008

PHP File Upload Problem Solved!

I finally managed to solve the PHP File Upload Stalemate!

Thanks, in part, to this forum thread... and a bunch of tinkering around in my php.ini file...

I realized that the directives that I modified from:

memory_limit = 8M
post_max_size = 8M
upload_max_filesize = 2M

And changed to:

memory_limit = 8000M
post_max_size = 7000M
upload_max_filesize = 6000M

Was causing me to get the following in my HTTPD/error_log:

[error] PHP Warning: POST Content-Length of 363120480 bytes exceeds the limit of -1249902592 bytes in Unknown on line 0

More specifically it appears that it was the fact that there was just too much of a differential in the post_max_size and the upload_max_filesize that was causing the error...

Which was why PHP would overflow to the negative value... and is considered a feature - though not too many people (probably including myself) would really consider such as a feature!!

I was able to fix the error by modifying my edits of the directives to:

memory_limit = 8000M
post_max_size = 6000M
upload_max_filesize = 6000M

And now it works like a charm!...

So far at least with the large 346.3 M file I tested it with. Hopefully it will still work with larger files!

Now it's pretty much off to the races to finish testing the rest of my project.

One set-back down and very likely several more to go!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/04/php-file-upload-problem-solved.html

Wednesday, April 9, 2008

PHP File Upload Stalemate!

In one of the projects that I have been working on that I've been most hopeful about keeps leading me to one error after another in a stalemate!

This project involves file uploads to a server.

I am doing this with an Apache Server (on Mac OSX) and PHP 5.

I've successfully - or so I think - reconfigured the php.ini file to allow for the capability to upload larger files.

Which is almost identical to this php.ini example, except for the following directives:

memory_limit = 8M
post_max_size = 8M
upload_max_filesize = 2M

Which I've changed to:

memory_limit = 8000M
post_max_size = 7000M
upload_max_filesize = 6000M

And now when I try to upload a large file, which is a .dv video file (one of the larger files I first came across on my computer)... I get the following in my HTTPD/error_log:

[error] PHP Warning: POST Content-Length of 363120480 bytes exceeds the limit of -1249902592 bytes in Unknown on line 0

Now 363120480 bytes is about 346.3 M and is the approximate size of the file I'm trying to upload.

But 1249902592 bytes is 1192 M, and that doesn't match any of the limits I've set in my php.ini file!

Plus 346.3 M < 1192 M!!!

I don't know what's up with the 1249902592 byte-value being negated in the warning - it doesn't make any sense... or is it just a dash in front of the byte-value?

Also, the first time I tried to upload the .dv file the server timed out or something... and got the "this server dropped connection" (or similar) message in Safari.

But that only appeared the first time I tried to upload the file and didn't appear any time after... Which is Totally Bizzare!

I've tried looking in the httpd.conf file for any possible settings that might be hanging things up and countlessly poured over all the directives in the php.ini file... but to no resolve!

Even changing the PHP directive max_execution_time = 30 (because it would normally take about 30 seconds for the upload to fail) to max_execution_time = 300 does nothing... It will still fail after about 30 seconds.

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/04/php-file-upload-stalemate.html

Tuesday, March 25, 2008

Why I've Not Posted In A While...

Some of you may have noticed I haven't posted in a while... and wondered quietly to yourself "Why?"

(Ok, maybe not, but I'll tell you anyway...)

And that is for the plain reason that I royally messed up my computer and nearly lost everything on it!

Here's the story:

As I mentioned earlier after I came back from my relatively recent trip to California I had to use Disk Utility on my MacMini's Hard Disk, due to it getting corrupted somehow.

When I used Disk Utility to repair my HD, it created a folder at the root level of my startup disk called "lost+found" (or something like that)... which I didn't notice until about a couple weeks ago.

From that folder I was able to get back a little of the music I lost the first time (see this post for more).

In that folder were a bunch of other folders with with a bunch of numbers for their names and in the folders were a bunch of resources with a bunch of numbers in their names... which I had no idea where they were from.

Well, after pulling the music I found from the folders I proceeded to delete the /lost+found folder.

When emptying the trash, in order to delete the folder it asked me to enter my password... Which should probably have been a sign that something in there shouldn't be deleted.

But not thinking, I went ahead and entered my password and deleted the folder anyway.

Then the next time I shutdown my computer (which I hardly ever do) and tried to start it again I was greeted with a black screen that said:

disk0s2: 3x0xe0030005 (UNDEFINED).
disk0s2: 3x0xe0030005 (UNDEFINED).
disk0s2: 3x0xe0030005 (UNDEFINED).
Mar 13 12:16:10 Launchd: can't exec /bin/sh for single users Input/Output error

And it would keep showing that error line after line over and over again.

So apparently I messed with something that shouldn't have been messed with.

I tried whatever I could to try to fix it, but that day we didn't have Internet access... so I couldn't look anything up online!

The first thing I did was to copy all my important files and documents over to an external hard disk. Which I had to do booting from my OSX Install Disk and using terminal.

I started copying everything over one file and folder at a time using the commands $ cp /file/to/copy /place/to/copy/to and $ mkdir /location/to/create/directory...

Remember I didn't have Internet access so I didn't have internet access and was not all that brushed up on *nix commands to know about the recursive copy command flag ($ cp -R /entire/folder/to/copy /location/to/copy/to) until I asked my dad if there was an easier way to copy files through the terminal.

After doing that I figured that maybe if I just upgraded from tiger to leopard I might be able to save just about everything. But after I tried to do that I the computer wouldn't recognize the disk as a mountable volume.

Knowing that I'd have to erase that disk anyway to get it back, I just decided to install the new bigger hard disk I had just bought after I got back from California.

I chose to install the new hard disk on the same day when Time Warner Cable was checking out our cable internet connections in our house.

So I popped open my MacMini and installed the new hard disk I had... a huge 250 GB disk to replace the 100 GB disk I originally got with it.

I needed this new disk so that I could install both Leopard and Tiger on two separate partitions, with all my music and other stuff on the 100 GB disk I couldn't do it with sufficient space for each boot partition.

And it wasn't until just the end of last week that I was able to install everything back on Tiger for production once again!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/03/why-i-not-posted-in-while.html

Wednesday, March 12, 2008

How To Handle A Faulty HD & The Loss Of Your Music With Your iPod

Ok, that might be a bit of a long name, but it's important... if you don't want to loose as much time and music as I have when you run into a similar situation!

I'm not sure how but in the last couple weeks, after taking my Mac Mini computer with me on a trip to California, I've lost a fair amount of data on my hard drive.

I'm aware that my Hard Drive was corrupted before my trip so it might not be entirely on how my baggage was handled to and from California.

But in California when I would select some of the songs that went missing in my iTunes playlist or library, I would always encounter the annoying spinning beachball pointer, or the swirling torrent of colors...

While in California I didn't want to hassle with trying to fix it because there was enough things there I was busy doing... or should have been doing.

I had all my music synced on my iPod, so all I had to do was somehow find a way to get the music from my iPod back into my iTunes directory somehow.

So when I got back from California, being fed-up with the tracks that were no longer on my HD and subsequently causing my iPod to take forever to sync and making it impossible to browse my iTunes music directory, I downloaded and installed Super Remove Dead Tracks from Doug's AppleScripts for iTunes.

That was the absolutely wrong script to use at the time, because it didn't do anything for the core problem of my corrupt Hard Drive and erased the mp3 files from my iPod the next time it was synced.

Though I'm glad that it was only 55 tracks of not-so important stuff (though I will try to get it back again somehow anyways).

If you don't really care about the music that you've lost then it might be just fine to use that script.

Since I knew that I was going to try to upgrade from Tiger to Leopard... or actually install them both on the same HD... I knew I was going to have to repair the HD.

So I popped in the Tiger install disks that came with my Mac Mini, and used the Disk Repair Utility to repair my corrupted Hard Disk.

As one should expect several files, mostly my music though, went missing in the process; but after repairing the HD I was able to browse the iTunes directory and click on dead tracks in my iTunes library without getting the beachball cursor or the swirling torrent of colors cursor!

That solved that problem....

But as a result more music went missing. This time it was 100 tracks with a lot of good stuff, so I really want to get it back in the easiest way possible.

I first downloaded and installed iLinkPod to see what I could get from the music files on my iPod.

Realizing how much time it would take to manually identify each individual or even a group of files to pick out the ones that went missing I soon went looking for another alternative.

Then I eventually found and tried out Ollie's iPod Extractor - but I had no luck with it... I kept getting an AppleScript error indicating to big of a parameter string or something.

Here's How To Get Your Music Off Your iPod And Into iTunes Again...

I kept searching until I found the Show iPod Song Files script on Doug's AppleScripts for iTunes site.

NOTE: to use this script you must have the "Manually manage music (and videos)" checkbox on your iPod's setting checked.

Install it in your iTunes Scripts folder.

Select a song (or songs) in your iPod's library or one of it's playlists and then click on the scripts icon in the menubar (left of the "Help" menubar item) and choose the Show iPod Song Files option.

This will then open up a window in the finder with the music file highlighted.

As long as you have the "Copy files to iTunes Music folder when adding to library" checkbox selected in your iTunes Preferences' "Advanced" settings all you have to do is double-click or open the highlighted file and it will add it to your iTunes Library and folder in the right spot!

Sure that might be a little more work than what Ollie's iPod Extractor is supposed to do but if you don't have too much music missing (or have the time) and Ollie's iPod Extractor doesn't work for you, then you can use the Show iPod Song Files script from Doug's AppleScripts for iTunes site.

Which is exactly what I will be using to recover my files!

Recently I just heard about PodWorks, but I don't think it checks to see if any of the mp3 files (listed in the iTunes Library file) are missing from your iTunes folder to copy them over.... it looks like it just will transfer the mp3 files that aren't listed in the iTunes Library file.

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/03/how-to-handle-faulty-hd-loss-of-your.html

New Blog Design

Today I finally was able to work through and put together phase two of my site design, and that was of redesigning this blog's site template.

I made the site template of this blog much like the template of my website at www.benjaminvanscoter.com, by taking the template and style that I was using and modifying it to fit within the template I have on my site.

Sure, it might not be perfect or all that glamorous... (as I think of that terrible PCD or whoever sings it song)... but it looks good and will do the job for the time being.

Now I can work on posting about a lot of the stuff that I've been holding off on!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/03/new-blog-design.html

Saturday, January 26, 2008

My New Website

Yesterday I finally finished up the the last few pieces of my new website at http://www.benjaminvanscoter.com/.

This isn't the very first upload of my site, and in fact was a complete overhaul of what I put there originally. (I didn't post about my original upload because I didn't come around to it, but if you might have seen the link on the sidebar of this blog when I first loaded my original content.)

If you never saw my original site, then you won't notice how different and totally sweet the new design and flow is of my newly updated website.

I made several changes to the template structure, and colors... perhaps most noticeable right away would be the new header image and background to the menu bar on the top.

Also I made some file-structure changes so that it isn't so flat and complicated to edit.

As starters I changed the Home page to be more of an overview of my skills and qualifications where you can then check out what you are most interested in.

You might particularly notice that the About page isn't just one page loaded with tons of information but is more of a landing-page where you can pick and choose to check out whatever your interested in.

Also, I changed the Portfolio and Services pages to be more expandable and more like landing-pages as well.

I've also added a bunch more content from my experiences with Underachieving and learning from the Rich Dad Series as well as my education

My Resume though remains almost entirely the same, but with the addition of file icons at the bottom.

Now my website will be more suitable as a means for me to let people know what I'm doing or involved in and am interested in as well as for others to learn about me and what I can do.

I even have a Resources section where I keep a list of some of the resources I use and others could benefit from.

Of course I have bigger plans for this site... like implementing easy page bookmarking links and a whole bunch more information, resources and perhaps some more services... but what is currently there now will suffice for the time being.

So go ahead and check out my website!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/01/my-new-website.html

Thursday, January 3, 2008

OK: Qumana = Bad Idea

So I was checking out some of the posts I had flagged on The Unofficial Apple Weblog's feed through NetNewsWire... and I came across this post about the Qumana blog editor -- that I wanted to try out and take a look at.

Because I have MarsEdit and like it a lot, but why not see what other things are out there and see what they meant by:

It's not as Mac-like as MarsEdit by a long shot, but if you'd like to try a free editor that works easily with a variety of blogging platforms then Qumana is worth a look.

Which from first glance I thought... well that's because it's a Java App.

So I downloaded Qumana - though without entering my email I just clicked on the download button for the Mac Version.

Then I unzipped the download, and moved the Application into my Applications folder.

Launched the program, and followed the prompts to load and give Qumana access to my weblogs I have under one of my accounts in Blogger.

Then I get to the main screen where it lists the Blogs I have available....

And wanting to see the posts in my blogs I click on the "Refresh Posts", which it should have been able to get the posts on my blog(s) relatively easily...

But not everything works out as you would like!

I'm greeted by a happy error message with a big bold red stop-sign with an exclamation mark in it saying:

java.lang.Exception: RPC handler object "blogger2" not found and no default handler registered

Whatever that is supposed to mean!

Isn't one of the things to do before releasing any software is to test your software under a bunch of various environments or make sure it's dead easy for people to tell if it won't work with whatever environment they might be using?

In either case....

Goodbye Qumana

You Stink!!!!

MarsEdit... You ROCK!!!

So don't mess around with Qumana unless you're willing to have bugs like that!

By the way I'm still operating in Mac OSX 10.4 - maybe they designed it for Mac OSX 10.5 - I dunno.

I didn't upgrade, yet -- but you will hear about my upgrade experience soon.

In either case... MarsEdit is still probably the best blog editor for me - since HTML doesn't scare me and I love all the keyboard shortcuts!

I've even just opened a new MarsEdit post just to write up some long lists to do the markup faster than I would just typing it all regularly in a text editor and just copy and paste all the HTML into my page.

However, I have yet to purchase an upgrade to MarsEdit 2.x -- but I know I will be doing that soon!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/01/ok-qumana-bad-idea.html

Thursday, November 8, 2007

Stat Tracking On OPCRochester.org

It's been a while since I last made my church's website opcrochester.org active again.

But before that it had been down for a long time... which I might say was mostly due to a web-host that I bought a reseller package through and had the my church's - Covenant Orthodox Presbyterian Church's - website hosted on totally disappearing out of the ether!

But for the most part it was mostly in part my laziness that didn't get it back up despite the pastor & his wife and other people in my church asking me about it from time to time for one reason or another.

Now I have done one more thing with the Covenant Presbyterian Church website to enhance it a little more, and that is to add Google's Analytics tool to it.

Of course it isn't something that anyone looking at Covenant Orthodox Presbyterian Church's website would notice, but will give and anyone at the church who might be interested in such a better idea of the usage and usefulness of the website.

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2007/11/stat-tracking-on-opcrochesterorg.html

Browser Oddities... Going Insane

Today I was working on creating a template for the new site I'm creating for my cousin's insurance company, VanScoter Insurance, LLC.

But there were several things about CSS and various browser oddities that were quite simply driving me insane to try to get the stuff to display correctly!

The first thing that was bothering me was figuring out how the heck to get Internet Explorer to center a container "div" tag... a <div id="container"> that encompassed all the of the pages contents.

Obviously <div id="container"> was inside the <body> tag

Through a ton of trial and error and examining other style sheets I finally figured out what was required to get the container to center in the window.... using css:

body {
    /* whatever params */
    text-align: center;
    /* any other params */
}
#container {
    /* whatever params */
    text-align: left; /* for inheritance purposes */
    margin: [top] auto [bottom?];
    /* any other params */
}

The left and right margins can be centered on Mozilla engines using auto... but for some reason Internet Explorer needs to have the text-align: center; property set in the body (which really isn't technically the right use or interpretation of the property).

Also, because of inheritance in CSS, if you don't want everything on your page to be centered you'll need to redefine text-align to be left or whatever else when defining your container id's properties.

I was glad when I figured that out... cause it was a problem that I hadn't been able to figure out since I started re-doing my cousin's website.

The second thing that was bugging the heck out of me was how the CSS float property was interpreted in the Mozilla engine... particularly with nested elements.

Mozilla does a really strange thing when interpreting the nested divs when floating them, take a look...

Here's the basic HTML background:

<div id="container">

<div id="sidebar">
<p>Many</p>
<p>....</p>
<p>Many</p>
<p>Lines</p>
<p>of</p>
<p>Contents</p>
</div>

<div id="main">
<p>Not as many lines</p>
<p>of contents.</p>
</div>

</div>

Now if you do something like this in CSS:

#sidebar {
    /* whatever params */
    float: left;
    /* any other params */
}

As long as there are more lines in the <div id="sidebar"> tag, you will wind up with something that like this when rendered in the Mozilla engine:

As you can see the <div id="container"> doesn't continue to the bottom of the <div id="sidebar">, but merely just ends wherever the <div id="main"> ends.

Thanks to this forum thread / post by Variable, I got the solution to this problem.

All it takes is an extra line or two to get it to work!

Here's the new HTML (changes bolded):

<div id="container">

<div id="sidebar">
<p>Many</p>
<p>....</p>
<p>Many</p>
<p>Lines</p>
<p>of</p>
<p>Contents</p>
</div>

<div id="main">
<p>Not as many lines</p>
<p>of contents.</p>
</div>

<div id="fillcontainer"></div>

</div>

And here's the new CSS (changes bolded):

#sidebar {
    /* whatever params */
    float: left;
    /* any other params */
}

#fillcontainer {
    /* whatever params */
    clear: both;
    /* any other params */
}

And now you will correctly have something that looks like it should:

Internet Explorer would render it like the above picture without the addition of the <div id="fillcontainer"> and the extra CSS code.

At least Internet Explorer correctly nests div tags when they're floated, unlike Mozilla... which is the only one thing I can think of that Microsoft has ever done right!

It might be simple, but you want everyone to see the website you create the same no matter what browser they use -- and it's stupid little browser oddities like this that drive people like me insane!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2007/11/browser-oddities-going-insane.html

Thursday, October 25, 2007

My iPod

So, the other day I finally got my iPod in the mail...

Yes! I finally had the money to buy myself an iPod after paying off all my credit card bills.

Plus, my iRiver had hit rock bottom as far as barely being useful... though I will still keep it around for doing miscellaneous recording and what-not.

  &  
iPod Video                       MicroMemo

I got myself the 80 GB Generation 5.5 iPod video in the color black. And for it I also got the XtremeMac MicroMemo Voice Recorder also in the color black, which I got Tuesday.

Both of these should serve me well for what I intend to use them for as long as they stand up to the quality any Apple product should stand up to!

I got the previous generation of the iPod Video and not the iPod Classic because Apple is being too much of a monger by going to a tightly knit closed system on all its electronic devices not allowing most prior third party devices work on their new devices.

So to take advantage of being able to use the most third party devices I got the previous generation iPod Video.

Even though Apple is being a bit of a monger with their current closed system for their devices I still think that what they do and create is just as sexy as.... well... this picture:

So when I got my iPod was busy uploading all my music onto it and checking out all the extras that came with and how to use all those cool little functions.

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2007/10/my-ipod.html

Friday, October 5, 2007

Genius Work-Around

Like I was saying in this post I started working on this cool little script in JavaScript that moves HTML objects around on a website, a really cool script overall for all sorts of floating message effects....

And after I got home from work a little after 7:00 AM this morning I have been working on giving it classes to be smart... actually, to move more than one HTML object around in a totally customizable fashion.

However, when doing such I ran into a little problem... apparently a problem a lot of people have with Classes or Objects and the setInterval() method...

Especially when you try to do this:

setInterval("ObjectName.methodName()", this.pinginterval);

Which made making my script work with classes a whole lot harder than I thought it was going to be!


And Nothing Here Is Or Was Helpful!

So I found my own super-Genius - with a capital G - workaround!!!

Instead of doing this ...

setInterval("ObjectName.methodName()", this.pinginterval);

... I did this ...

setInterval("functionName('"+ObjectName+"')", this.pinginterval);

This works for me because my Classes or Objects are in an array:

var Objects = new Array('ObjectName1', 'ObjectName2', ... 'ObjectNameN');

So as long as I kept passing the ObjectName as a parameter to each subsequent function I could then call anything I want from the Class or Object simply by using:

Objects[ObjectName].Paramater

What tripped me up and had me pulling my hair out trying to figure out what was wrong with a particular line I typed, was a simple syntax error - when I typed:

setInterval("functionName("+ObjectName+")", this.pinginterval);

Instead of typing:

setInterval("functionName('"+ObjectName+"')", this.pinginterval);

Did you see it?

I forgot to include the single quotes around the function's parameter...

So basically when the line I typed was processed by the browser it would have seen functionName(strObjectName); instead of functionName('strObjectName'); as it should be in proper syntax.....

A stupid mistake that sent me hunting and trying to figure out what was wrong with it for about a half hour!

And now after I finished the script the time is 3:30 PM

I've been working on it for about 7½ hours. (Once you factor in eating and watching TV for a bit as I pulled my hair out to find a solution!!)

This all just goes to show one thing....

I AM A GENIUS!!

And that's final!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2007/10/genius-work-around.html

JavaScript Action Text

I am working on this cool little script in JavaScript that will move HTML objects around on a website, a really cool script overall for the unblockable 'pop-up' floating messages and other really cool object moving uses.

I am going to be using this script on the new website I am creating for my cousin's insurance agency (VanScoter Insurance Agency) to create something that looks like the moving text on Noto Insurance's website... but the major difference is that with the script I am making it won't use flash, which is harder for search engines to read and index, and will load faster.

But, to make so that it can move multiple HTML objects on the same page that are different CSS Classes (which is how each object is identified on the page) I am needed to figure out how to use classes in JavaScript.


Web Developer's Journal

So when researching how to create and use classes I found this Tutorial on WebDevelopersJournal.com that describes how to create functions and classes...

And as it turns out, classes are easier to define and create in javascript than I thought they would be.

So once I get home (I'm doing this post at work - The Ridgemont Wegmans) I am going to fix up my script.

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2007/10/i-am-working-on-this-cool-little-script.html

Wednesday, October 3, 2007

Pip & My Sequel Trouble


PHP


MySQL

Ok, it's actually PHP 4.4.7 and MySQL 5.0.x!

On my Mac Mini (Intel) I've got Mac OS X 10.4.10 and it comes with it's own Apache Server, in fact all Mac OSX distributions have Apache built in.

I don't remember, but apparently sometime I had installed PHP 4.4.7 and PHP 5 (to use both) I wanted to get MySQL on it because I wanted to start developing some serious web stuff locally...

Since the unfortunate total disappearance a month ago of the last web host I had used... and subsequently lost everything I was working on because I was developing it on their server(s) -- Bad mistake: Not backing anything up just because I didn't have MySQL!

So I got the latest MySQL 5.0.45 release for Mac OS X in the easy installer package format.


PHPMyAdmin

I proceeded to install it and checked to see if it worked with PHP 5 using PHPMyAdmin.

AND... Giddy it worked!

Now I go into the Terminal.app Unix Shell Application and type:

sudo cp /etc/httpd/php4.httpd.conf /etc/httpd/httpd.conf

Switch to PHP 4 and reload the PHPMyAdmin... And I'm Greeted with:

Error

MySQL said:

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

What On Earth!!

I have no idea what that really means...

So I spent the good part of four days researching and trying a bunch of crap to get it to work... by changing the php.ini file by changing the line...

; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =

TO:

; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =/tmp/mysql.sock

Restart the Apache Server and try to reload PHPMyAdmin...

And to no avail I still see...

Error

MySQL said:

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

So after taking a break and coming back I think of linking the mysql socket to where PHP 4 is looking for it....

mysql

MySQL Supportenabled
Active Persistent Links 0
Active Links 0
Client API version 4.1.22
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient

... In... /var/mysql/mysql.sock

And The info for PHP 5, which works with MySQL is:

mysql

MySQL Supportenabled
Active Persistent Links 0
Active Links 0
Client API version 5.0.19
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/php5/include/mysql
MYSQL_LIBS -L/usr/local/php5/lib/mysql -lmysqlclient

So why not create an alias linking /var/mysql/mysql.sock to /tmp/mysql.sock

Not being so fluent in Unix Command-Line stuff, I struggled to figure out how to do this and found this site... Here's what I did (the clean and easy to follow version):

  1. Create 'mysql' folder in /var/
  2. Create A Link Of /tmp/mysql.sock As /var/mysql/mysql.sock
  3. Restart The Apache Server

The Commands:

$ sudo mkdir /var/mysql/
$ sudo ln /tmp/mysql.sock /var/mysql/mysql.sock
$ sudo apachectl graceful
/usr/sbin/apachectl graceful: httpd gracefully restarted

And ooh-la-la it works!

Sure it's probably a bit unorthadox, and PHP 4 only has Client API for 4.1.22... but MySQL doesn't change much on the front-end I'm assuming so it should be pretty good.

Everything was confirmed working after creating and editing the same table in MySQL 5 using PHP 4 and PHP 5

Update:

It has come to my attention that though the above may work... it may not work as well as it should...

Because I've run into the instance where the link I would create using $ sudo ln /tmp/mysql.sock /var/mysql/mysql.sock would disappear from /var/mysql/mysql.sock when switching from PHP 4 to PHP 5 and back to PHP 4 again after I restart somewhere in between I think.

I'm not sure where it is breaking down... but there's a couple more robust solutions that I'd suggest... and that is to change the standard link using the ln command to a symbolic link using the ln -s command in terminal.

So now the commands would now be:

$ sudo mkdir /var/mysql/
$ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
$ sudo apachectl graceful
/usr/sbin/apachectl graceful: httpd gracefully restarted

Or you can do what I did, and just make the folder /var/mysql a symbolic link... which is a little less work:

$ sudo ln -s /tmp/ /var/mysql/
$ sudo apachectl graceful
/usr/sbin/apachectl graceful: httpd gracefully restarted

Note: if you want to do the above there can't be a folder /var/mysql/ already, you'll need to delete it. This can be done using:

$ rm -r /var/mysql/

These commands should work better because of the difference between a hard link and a symbolic link...

A hard link (ln) disappears if the linked-to file disappears... and a symbolic link (ln -s) remains even if the linked-to file disappears and for this situation is what we need since mysql.sock seems to disappear somewhere along the lines of a restart or as described above.

Plus, since symbolic links allow you to have a folder point to another destination folder you can do $ sudo ln -s /tmp/ /var/mysql/

Disclaimer: I take no responsibility for what happens to your system if you use these instructions. Though I have been able to use this methods successfully your results may vary. It is highly advisable you backup any files before changing or modifying them.

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2007/10/pip-my-sequel-trouble.html

 

pages

legal information

privacy policy

We respect your privacy and promise to never sell, barter, share or rent your information to any unauthorized third party. By providing your contact information you are also requesting and agreeing to receive important information about future events. (You may unsubscribe at any time.)
view full privacy policy here

certification of authenticity

I certify that the information contained on this site is true and complete to the best of my knowledge and understanding, any discrepencies will be governed by the terms of use.

terms of use

Everything we provide is provided "as is" including but not limited to the implied warranties of merchantability or fitness for a particular purpose, without any promise or guarantee of earnings. All forward looking statements on any of our materials are intended as an expression our opinion and will not responsible for any incidental or consequential damages from your actions.
view official terms of use