pictures

How to Find Geographical Coordinates

hr
hr Heading 2 Icon How to Find Geographical Coordinates

Ever need to find your location using latitude and longitude? Do a search for your destination using Google Maps and then when your destination is in the center of the map - type:

JavaScript:
javascript:void(prompt('',gApplication.getMap().getCenter()));

into the browser address bar (no http or www) and your coordinates will appear.

Quick CSS for WordPress Images (Updated)

hr
hr Heading 2 Icon Quick CSS for WordPress Images (Updated)

A week or so ago, I posted some information on how to quickly style your WordPress images. After recently updating my company's web site (SDAC Inc. - I noticed if you used captions, my custom CSS would not work. Here is some CSS that will work with and without image captions:

CSS:
.alignright, .aligncenter, .alignleft {padding:4px;background:#ecece2;border:1px solid #c7c7bb;}
.alignright {float:right;margin-left:5px;}
.alignleft, .alignnone {float:left;margin-right:5px;}
.aligncenter {display: block;margin-left: auto;margin-right: auto;}

The difference? I used img.align.. which worked if you did not use captions, but if you use caption, there is an outer div class called align... The more generic CSS posted here takes care of both issues.

Quick CSS for WordPress Images

hr
hr Heading 2 Icon Quick CSS for WordPress Images

If you install WordPress and use the media uploader to manage your images in your posts - you can easily style your images quickly by adding the following code to your theme's stylesheet.

CSS:
img.alignright, img.aligncenter, img.alignleft {padding:4px;background:#efefef;border-color: #aaa #ccc #ddd #bbb;border-style: solid;border-width: 1px;}
img.alignright {float:right;margin-left:5px;}
img.alignleft, img.alignnone {float:left;margin-right:5px;}
img.aligncenter {display: block;margin-left: auto;margin-right: auto;}

This code will set up your images to float appropriately, as well as give a nice border as seen below.

Note* This information is now updated: Updated CSS

Find and Replace With phpMyAdmin (or using SQL)

hr
hr Heading 2 Icon Find and Replace With phpMyAdmin (or using SQL)

Ever need to find and replace something in your WordPress database? (perhaps you changed domain names and have the old domain name or folder structure hard coded into some of your posts) You can easily update your database by using phpMyAdmin or by using the following code in any SQL interface:

SQL:
UPDATE wp_posts SET post_content = REPLACE(post_content,"http://olddomain.com/blog","newdomain.com/");

The first part of the command says "update the database table wp_posts" (where your content is stored). The later part of the command says "use the field "post_content" (where all your actual post content is stored" and then find "http://olddomain.com/blog" and replace it with "http://newdomain.com". You can find anything (not limited to domain name) and replace it with anything as well. This is a great time saver!

How to Get Stuff Done

hr
hr Heading 2 Icon How to Get Stuff Done

The last few weeks I have been extremely busy and on top of that I have been dealing with a sick child and also being sick myself. There is no time to be wasted so efficient use of the time I had was crucial. I feel that since owning my own business, I have had to work very hard to make the most of my time and have a few tips:

Focus on 1-3 big tasks per day. Any more tasks than 3 will most likely cause you to spend too much time switching gears. I have begun making a list (yes - let the comments start pouring in as I was anti-list for a long time) of these items and then crossing each item off as I finish. This is surprisingly very rewarding.
Limit how often you check email. (See a post I wrote on this in the past)
Start the day with an easy task. It sometimes takes more time to get going mentally in the AM so starting with an easy task quickly builds confidence for other tasks later
Take time every hour to take a small break to keep your mind fresh
If you are having ... [more]

Add a “Pseudo” Pseudo Class Hover in Inline CSS.

hr
hr Heading 2 Icon Add a “Pseudo” Pseudo Class Hover in Inline CSS.

I have been busy this week with a few really cool projects - one of them to create a widget for any site that will show the latest news items from a RSS feed - while not limiting the widget to servers with PHP. After putting that together, I had to add inline CSS to style the feed output. Everything looked great but I could not figure out how to add a :hover to an inline style...until I realized I could fake it by adding some basic javascript: onmouseover and onmouseout to change the font color.

[html]
Title

repairing a mysql table

hr
hr Heading 2 Icon repairing a mysql table

I have run into some database problems over the years, but had to do something different today when I saw that this site had a problematic table (wp_posts). When I looked at the issue first, I got the message "MySQL error code 145 = Table was marked as crashed and should be repaired".

To repair a table, I have run (at a mysql prompt in the command line): REPAIR TABLE wp_posts; but today that did not work. After doing some research, I finally was able to fix the table by using: myisamchk -r wp_posts (see documentation. This was a lifesaver!


search

subscription information

Blog RSS

Comments RSS



Powered by FeedBlitz

blog categories

blog tags

most popular posts


blog archive

standards

Get Firefox!
XHTML
CSS