Monday, May 30, 2011

Changing permissions for /var/www Ubuntu Server

The video below explains how to change the permissions for /var/www Ubuntu Server




Saturday, May 28, 2011

How to Fix it. IPhone sound stop working

FYI

If your IPhone or Ipod Touch internal sound stop working, the volume control is non-reponsive and the sound meter does not appear. Below is what you need to do.

On the top of your device there is a small button. Click and hold it, then slide to power off and turn it back on. This reboots your device and the mic will work again.

Wednesday, May 25, 2011

Don't trust your memory

A good habit is to always document and comment your discoveries. Have a piece of paper or computer be an extension of your brain. Many may say "I figured it out once, I can figure it out again." That may be true but it sucks!

When I discover something new I tend not to write it down because I trust my memory. However, its not always reliable when working with huge amount of data. Our brain can only hold so much. Recently I forgot how I set up a feature in Microsoft's Access which I created 3 days ago. I can recreate it but with an unnecessary headache.

Monday, May 23, 2011

Difficulties in your path

All afternoon I tried to get gmail to send an email using php. When I finally discovered what was wrong I remember the poem Push on.

There are difficulties in your path. Be thankful for them. They will test your capabilities of resistance; you will be impelled to persevere from the very energy of the opposition. But what of him that fails? What does he gain? Strength for life. The real merit is not in the success, but in the endeavor; and win or lose, he will be honored and crowned. William Morley

Saturday, May 21, 2011

Create and Learn

In a canoe, if you decide to row only on one side what will happen? You will go around in a circle. So why are you only studying? If you're only learning a craft but not putting into practice what you learn, you're shotting yourself in the foot. I have spent a lot of my time learning new techniques and software however I can't find time to create. I have committed everyday to learn about programming but now I'm committing some days to only creating. Because what's the point of knowledge if you're not going to do anything with it?

Wednesday, May 18, 2011

printObj() => outputs object properties

The javascript function below is used to output the objects and its properties. Alternative to the php function => print_r
I use it mostly for looking up the document DOM eg. printObj(document)

Insert code inside JavaScript <script> tags
_________________________________________________

function printObj(obj) //reads the objects properties
{
var object ="";// sets the variable
for(var type in obj)
{object += type +"=> " + obj[type] + "<br /> ";}
document.write(object);
}

//create a new array or object
var num = new Array(1,2,3,45,6);
//outpuy the object and its properties by
printObj(num)
______________________________________________

Output:
0=> 1
1=> 2
2=> 3
3=> 45
4=> 6



bookmarklet: shows all the the p tags for the page. Copy and paste the code below in the address bar.

javascript:e = document.getElementsByTagName('p');function printObj(obj){var object ="";for(var type in obj){object += type +"=> " + e[type].innerHTML + "<br />";}document.write(object);}printObj(e);

Monday, May 16, 2011

Bad Experience: Ergonomics

Couple of months ago I bought a Microsoft Ergonomic Keyboard and a Logitech Wireless Trackball M570 to make my computer experience more comfortable. However, I started feeling pain on my wrist like I never had before. I didn't want to believe that these devices were causing pain so I wore wrist braces to see if it would help and it didn't. I pulled out my non-ergonomic keyboard and regular mouse on 04/25/11 and the pain has diminished. I have since sold my ergonomic keyboard and trackball to an advertised fool. What I do now is put a pillow under my arm when typing and that seems to solve the problem.

Saturday, May 14, 2011

Running 2 hard drives

Running two hard drives is easy. What's needed is connecting an extra hard drive on your motherboard. It can be either a SATA and or a IDE connection. Once the new hard drive is plugged in (the motherboard automatically detects it) enter into your computer BIOS and change the boot order.

The BIOS software is built into the PC, and is the first code run by a PC when powered on, access by pressing a specific key when the computer boots up, before the operating system is loaded .

Usually the original hard drive is listed first. Change the boot order so the new hard drive is listed as first boot, make sure an operating system CD is insert and reboot the computer. Once the computer restarts the new hard drive will boot and the operating system will install.

To change back to the old hard drive go back to BIOS and change the boot order.

If any question leave a comment.

Wednesday, May 11, 2011

10 years from now

When I hear someone 10 years younger than me talk about how they will be going on a field trip at their school, will be meeting up with friends, are getting into trouble and etc. It takes me back, I stop and think about when I was that age and wish I did more. But then I remembered that no one has invented a time machine yet so my only option is to change. Stop waiting to make a billion dollars to have fun. Go out and travel more, meet with friends, take risks, overcome fear and live your life not someone else because the last thing you want is to look back 10 years from now and wish you did more.

Monday, May 9, 2011

Setup xampp/lampp on Linux unbuntu

video below gives everything you need to set up xampp/lampp

and the link below gives additional information. Like how to create a xampp control panel app.


PS. if you looking to reset password. Follow the video and you'll discover it.

Saturday, May 7, 2011

How to get the microphone to work, Ubuntu 11.04

First click on the speaker on the right hand corner->sound preference->input. Make sure that a input device is selected, the input volume is not muted, or isnt set too low.
------------------------------------------------------
Open terminal and enter:
alsamixer

press F5 to view all controls bars
tab allows you to select a specific bar (the description will turn red)

the arrow keys up and down allows you to increase or decrease the property selected

Capture, Capture 1, Input Source, Rear Mic and Rear Mic Boost was what allowed my microphone to work.

Initially I turned everything up until I saw a red square on each bar. Then I played with the Input Source and realize that by setting the first Input Source to Rear Mic it made my microphone work. Then I played with the volumes to reduce the background noise.

I used the 'sound recorder' to test my microphone. I tried skype and the microphone also worked.

AlsaMixer v.1.0.24.2 my configuration











Any questions leave it in the comments

Wednesday, May 4, 2011

The way to Learn

Studying sucks! The best way to learn is multiple exposure. You retain more of a movie when you watch it twice compared to once, and more on the third than second and so on. It's the same with studying. Stop this memorizing bull that makes a fun subject boring. Watch a tutorial and read a book but don't try to remember everything. Realize that as long you're being exposed to the information multiple times over time your subconscious mind will link things together.

Monday, May 2, 2011

It ain't easy being Lazy

Larry Wall the creator of Perl programming language couldn't put it better. One of the first qualities of being a great programmer is laziness. He later says "its only a joke" but deep down I know its not. However, its not the same laziness of sitting on the couch all day watching TV but a laziness towards doing repetitive tasks.

Growing up I was always taught not to be lazy but here goes another unconventional way of life for a programmer. It seems that programmers are always breaking the rules, next we will be break the law of gravity.

Programmers make computers their slaves not the other way around. Computers were meant to make our life simpler, free our time and be more efficient. I'm really stating the obvious. The desire to be lazy was what created amazon.com, zappos.com and other online stores.