Joe McLaughlin’s Blog

Progamming & Code Excerpts


This is a script I wrote at work. It’s just some javascript that loops through a series of radio buttons for a selection of questions. I’m checking to see if they are checked and if the ones selected are “generally not” or “no”. If so I set the focus to the textarea and prompt the user for input.

Question Yes For the Most Part Generally Not No Don’t Know
Other
N/A
54. My physical work environment is:
  Kept clean by janitorial staff.
  Kept in good repair.
  Free from safety hazards.
  Physically comfortable.
  Free from distractions.
  If you answered “Generally Not” or “No” for any segment of question ##54 please provide specific examples, including building address, floor, room numbers etc. and a description of the issue.
 

function check54and56(q)
{
// Determine which question was passed to function. 54 or 56?
if(q == ‘54′)
{
questions = [”answer_1″, “answer_2″, “answer_3″, “answer_4″, “answer_5″];
ta_answer = “answer_6″;
}
else if(q == ‘56′)
{
questions = [”answer_8″, “answer_9″, “answer_10″];
ta_answer = “answer_11″;
}
outer: for(i=0; i<questions.length; i++)
{
var radios = document.frm12.elements[questions[i]];
inner: for (var x=0; x <radios.length; x++)
{
// Debug Only
//alert(”Answer ‘” + questions[i] + “‘\nRadio ‘” +x+ “‘ checked: ” + radios[x].checked + “\nRadio ‘” +x+ “‘ value: ” + radios[x].value);
if(radios[x].checked == true)
{
if(radios[x].value == ‘no’ || radios[x].value == ‘generally not’)
{
alert(”Please enter some examples for question “+q+” in the textarea below.”);
document.frm12.elements[ta_answer].focus();
break outer;
}
}
}
}
}

Sphere: Related Content

DevShed continues their series looking at connecting a PHP5 script to the powerful Yahoo! search backend with part four of the series today. This part focuses on reworking some of the previous examples to make them more modular using custom defined functions.

Logically, these examples can be really useful for learning the basic concepts surrounding the use of these search services, but undoubtedly, it’s necessary to modify and improve their source code to make it more compact and completely reusable.

They start the overhaul with the web search (complete with example results) then push on to the video and image searches and work them over the same way.

Sphere: Related Content

In this post to the Developer Tutorials blog, Akash Mehta talks about the “version dilemma” that developers face when looking for good hosting - with all of the push towards PHP5 these days, why is it that so many hosting environments are still running on PHP4?

If you purchase a cheap hosting account with many of the major web hosts around today, chances are they will be running PHP 4. The problem for web hosts is this: the PHP community may have moved on from version 4, but a lot of the code out there hasn’t.

He recommends one solution that several hosting providers are starting to gravitate towards - offering both to their customers and allowing them to switch between them (via something like cPanel).

Sphere: Related Content

Jonathan Snook has posted about a method he’s using to make the creation/use of static pages in a CakePHP application (or website) simpler.

Traditionally in a CakePHP application, to do static pages you have two options: use the built-in Pages controller or set up an empty action in a controller.

Feeling that neither of these two options met how he wanted things to work, Jonathan (and Nate Abele) developed a class that extends the error handler in the CakePHP framework to handle “missing” actions and controllers. This means that, if an unknown controller/action combo is called, this script will check in its correct location (in the structure of the site) and try to find it to render it.

Sphere: Related Content

Based off of a previous article from Mike Willbanks, Stuart Herbert has posted some of his own thoughts on tuning and tweaking your applications for the best performance you can get out of them.

There’s some good advice in there, and I thought it’d be a good idea to quickly add a bit more detail about the separate approaches that Mike raises.

He goes over the APC caching, memcache, the “gzip trick”, the “Not Modified” header and optimized SQL statements.

He also mentions one thing that Mike didn’t mention - a split between static files (no PHP needed) and their dynamic cousins. Having a more pure Apache (no PHP installed) can help give a minute jump in speed that, depending on the size of the site, could really add up from a user’s perspective.

Sphere: Related Content

Latest PECL Releases:

Sphere: Related Content

Have you ever facing this problem before in your area? Well, I faced it the last 3 days and I even can’t check my mail and read any news.

It’s absolutely like the online world is collapsed! No Google, no Blog, no browsing, no chatting, no, no and no online activities. It break my working pattern into piece. It’s so stressing at first. But if you can shift your attention to other things, the situation may become beneficial.

I succeed to shift my thinking into something more useful than keep opening the “Server Not Found” Page on my FireFox.

I tried to do the following things and it proved to give me more meaningful knowledge and valuable information:

1. I read my e-books collection

You may be never realize it and never care about it when you activities is filled with blogging and communication channel building. You will find your hard drive full-packed with e-books from several Internet gurus and experts that you don’t even have time to read although you have downloaded it.

I was so surprised when I open my e-book folder. There are bunch of nice e-books that I forget to read! I happened to download and bought a lot of Internet marketing books in the last 2 weeks and I haven’t read it yet!

Re-visit your own e-books folder will bring you lots of fresh idea for your blog.

2. I arranged my stuffs - Give me more Fresh view of my desk

You may realize that your surrounding have been like a rat nest if you are a messy worker like me. One thing that I never realized it the post-it notes that sticks on my LCD screen. It’s has become a post-it notes jungle!

I forgot to remove notes and just keep stickin’ all the weeks. There is also a pile of print out papers containing lessons from several gurus. And again, I never read it! Just a glimpses and I threw it away to the corner. Bad habit.

I start arranging from my upper desk to my inner desk (Ouch, the dust is so thick! I could imagine that I actually using the desk! P ). Cleaning here and cleaning there. Finally everything is settled!

The desk is look fresher now. It actually stimulation my brain and I feel I have a brand new story to share on my blog! )

3. I optimized my PC - Fasten the working time

The longer you use your PC, the slower it will be. Especially if you use that PC for multiple uses. Like Multimedia, Gaming, Design, Blogging, Surfing and Downloading.

I used several program to do the task automatically, but my favorite is Tune-Up Utilities(aff). Yup, you must buy it. But you can try the free trial version before buying.

With the PC free of trouble, I can blog my day with less headache. Never looked down on computer problem if you have some. Get it fix by software or by your trusted technician ASAP.

4. Is there a point 4? Nope! )

I use my 3 days time effectively to improve the other side of blogging to support the blogging itself.

Well, it’s my own activities that I transform it into a tips. I hope it could help you shift your bad day into a meaningful day. )

How about you? Do you have any good tips to spend in the connection down moment?

^_^

Sphere: Related Content

10-dollars

I found an interesting poll held by Darren Rowse at Pro-blogger blog. The poll is about how much is your earning since October. It’s a nice question and I happen to vote my voice into the poll too.

After voting, I saw something interesting in the result. I found the highest vote went to:

  • I don’t make money blogging, and
  • Under $10

Make money under $10 online for a month is not a great news. While many other vote goes to $100 - $499, Earning $10 for the entire October is just way too small.

That’s why I think we must shift our thinking about blogging. Many bloggers around the world rely on Google Adsense too much. Yes, it’s a free money and easy to apply. But it’s not how you begin your money making journey if you want to earn more then $10.

I’m also making this mistake at first. But I’m finally realized that I must combine several effort and tactics to make more than $10 a month, or even $10 a day!

It’s no secret, the only (free & fast) way to achieve the goal is to do affiliate marketing combined with article marketing. Your blog will become the host of your affiliates source, and promote it with article marketing at several free directories to gain conversion and sales.

But it won’t happen overnight. You will need to set a goal to promote your blog (containing Affiliate links or your other money source) with several articles a day.

These directories that bring results for me, but I cannot guarantee they will bring you results:

  • Articlecity.com
  • Goarticles.com
  • Ezinearticles.com
  • Articlealley.com
  • Articledashboard.com

There are so many article directory out there. You can try to search on Google with this keyword: “article directory” (with quote).

Your task is to submit at least 2 articles a day to the article directory and you will begin to see some sales in the next 2-3 weeks (and continue to make sales if you persistence on the task).

It’s sound easy, right? )

Well, 1 warning for you. NEVER use article submitter software to submit your articles to hundred of article directories. Search Engines will banned you because of duplicate contents and you will never receive any traffic from them.

So, when you will you achieve the stats of $10 a day?

Let’s say you promote a great product/service for $100 and the merchant pay you 50% of the sales price. If you manage to sell 1 product every 5 days, that’s mean $10 a day! )

Is selling 1 product every 5 days difficult?

Yes, if you don’t know how to write a pre-selling letter. That’s why you need to learn. Making money online is easy, if you keen to learn and keen to practice.

If you just sit around and hoping there is a magic happening on your life, forget about making money online. You won’t reach $10 just by lying down in your comfort zone and hoping for magic.

I recommend you to read Ken Evoy’s Preselling Book. Although it’s an old book, it’s still work like charm! )

, , ,

Sphere: Related Content

Everybody know that Wordpress is a great blog platform. Beside having its own extend pages to add more plugins to your blog, It also have its own free theme directory.

Because it’s so easy, you tend to switch plugin and theme regularly. Well, it’s nothing wrong anyway in changing plugin. But it’s a critical problem if you switch your theme too often.

I recently stumbled on a post about reasons that make your search engine ranking dropped.

The first reason is about the changes of your blog (theme and permalinks) could effect on your search engine position.

It said that on every time you change your blog theme, search engines will re-calculate your placement on their SERP. Which mean, your current position on the keyword that you usually get inside the top 10 search results will drop, or even disappear from the result.

ranking-droppedI’ve seen a lot of my blogger friends switching their theme often. Some even switch theme for more than 3 times in the first 3 months.

I don’t know how is the effect for them, but I felt it myself that my search engine ranking is dropping since I switch to this new theme.

But it’s not for long. Around 1-2 weeks, I started to see some better search term and result since the PR update a week ago. For example:

Yup, it’s amazing stats for me! )

But some keyword seems not related to my post at all. It’s a funny how Google decide the relevancy of its search result.

I’m not sure how the Search Engine look at my blog, may be it’s the inbound links that I received that decide everything.

Well, that’s not the focus that you should seek. Instead, I think we must focus on using a permanent theme for more a long term (like 6 month or more) to avoid re-calculation of your blog.

,

Sphere: Related Content

Believe it or not, blogging on blogging is not the tao to make money online anymore. The reason is because the blogging subject has been covered by whole lots of expert like Darren and Lorelle. It’s never become easier to find topic that they haven’t covered to blog about.

As far as I learn, this niche isn’t where the Tao of Online Money Wealth located. You should seek for other niche or may be you can keep spinning your blog to another type of blogging niche that not discussing about blogging but have the relation with it.

For example, you may cover the coding and design if you have the interest and a set of skills in this subject. Or you may be can spin the subject to some other mentality development subject to empower a blogger’s soul.

Blogging on Blogging is dead because it’s saturated or jammed by blogger. You’ll just keep echoing the idea from experts (You know, there are so many of them out there and they might have covered most of the evergreen articles) and you can’t pull much attention from readers.

Although there is an advice about being a purple cow in your niche, blogging niche is certainly not a great niche kick some ass anymore. You will struggle sooo hard to be able to get some benefit out of it.

While you can actually get lots of benefits from other niches, why you should struggle your life-and-death in blogging niche?

Except you are a great blogger like Lorelle, you might be able to find some great idea to turn this around and keep exist in the strive competition. How about if you are a complete beginner?

One word - Avoid it.

Guru like Yaro also say the same sentence. Avoid to blog your subject about blogging. It won’t worth your time.

I tasted the experience and I’ve felt the result. To tell you frankly, I build this blog by focusing around 70% of my roam time and 30% for other project. Believe it or not, other blogs that stand on a different niches, is proved to be able to generate much more income than this blog! )

I was surprised too. At first, I thought if I devoted more on a blog so I can get better result! But that principle seems to be wrong.

Almost 90% of my income is not from this blog. At first, this blog is genuinely blogging on blogging tips, tricks and tweaks. My old readers will know what I’m talking about. At the time, I got no serious traffic from search engines, only from some famous social media like digg.com and StumbleUpon (with the helps from my buddies).

I decided to take a different action to spin my presentation. The result are, since I spin my subject slowly away from blogging (getting away from blogging but still related to it) , I’ve seen some nice improvement in search engine traffic, referral, and more subscribers to my feed.

Those action give me an understanding about:

Targeting a popular niches with a different approach and perspectives is better than meddling inside those niches.

This is my understanding as far as my experience growth. Blogging on Blogging is a hardcore road to blogging success. As an advise, try to switch your attention to what you love to do, instead of putting your perspective on what other peoples love.

Follow where your passion is, and the money will follow you.

It’s wise not to follow the same mistake as I did. Don’t play with fire and be a little obedience to what those experts teach us. For sure, we’ll get what we want! )

Sphere: Related Content

« Previous Entries  



Certifications

Calendar

July 2008
S M T W T F S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031