Posts

Problem with YAML in Perl

I have no idea why this fix but I was installing MySQLSandbox with an error occurred but this link helps me solve it, http://www.linuxquestions.org/questions/linux-newbie-8/problem-in-upgrading-cpan-918683/ Anyhow, to be particular, this one helps me solve the problem $ su - # cpan # cpan> install Bundle::CPAN # cpan> reload cpan # cpan> exit

Setting global environment in Mac OS X

I just wanted to quote myself on setting the environment variable in Mac OS X. From, http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x This is stated as, 1) Open a terminal prompt 2) Type  sudo vi /etc/launchd.conf  (note: this file might not yet exist) 3) Put contents like the following into the file # Set environment variables here so they are available globally to all apps # (and Terminal), including those launched via Spotlight. # # After editing this file run the following command from the terminal to update # environment variables globally without needing to reboot. # NOTE: You will still need to restart the relevant application (including # Terminal) to pick up the changes! # grep -E "^setenv" /etc/launchd.conf | xargs -t -L 1 launchctl # # See http://www.digitaledgesw.com/node/31 # and http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x/ # # Note that you must hardcode the paths below, don't u...

MySQL: Running MySQL in command line thru mysqld

Just wanted to take note of this. Instead of running your MySQL as a service, or thru mysqld_safe, the command line you can run can actually be like this.   / usr / local / mysql / bin / mysqld  --basedir = / usr / local / mysql  --datadir = / usr / local / mysql / data  --plugin-dir = / usr / local / mysql / lib / plugin  --user =mysql  --log-error = / usr / local / mysql / data / macmini.local.err  --pid-file = / usr / local / mysql / data / macmini.local.pid

vim problems with ^M (caret M), due to file format incompatibility

The problem with ^M or caret M that you see in files during editing or modifying is that incompatibility with vim 's default file format. Usually, if I have a file edited or created in Mac OS X, and when its edited via Linux, I got ^M plus the lines are displayed as one line which is freaking hard to edit. To fix this, just do edit the file, then reload the file in vim , :e ++ff=mac or :e ++ff=unix if it was created in Unix. This will render with a great view editor of your file from what you expected it should be. According to vim's Wiki, " unix LF only (each line ends with an LF character). dos CRLF (each line ends with two characters, CR then LF). mac CR only (each line ends with a CR character). CR is  carriage return  (return cursor to left margin), which is Ctrl-M or ^M or hex 0D "   You can read for more info for file format in this page  http://vim.wikia.com/wiki/File_format

Understanding Threads and Multithreading

In this blog, I just wanna accumulate all things that I need to note regarding threads. Threads are just a light-weight process. It's actually a process but it runs under a process, literally a subsets of a process, where in this process, threads can share resources like memory. Threads in this subject is distinct from multi-core systems, which deals with instructions that are sent in the hardware resources like instruction set pass from USB to processor, stuff like that, in which multi-core can empower an OS to implement multi-threading. So multi-core is more of dealing with central processing units to execute program instructions . Multithreading aims to increase utilization of a single ore by using thread-level as well as instruction-level parallelism. As the two (multithreading in cores and threads in OS) techniques are complementary, they are sometimes combined in systems with multiple multithreading CPUs and in CPUs with multiple multithreading cores. courtesy of Wi...

Programming Advice

I wanna take note on this blog  "The Best Programming Advice I Ever Got" with Andrei Alexandrescu  as I found this notably important as a programmer or developer. How about yours? What do you think a good programmer should have?

Programming Opinions - Great Blog to Read

I think this blog is cool to read 20 controversial programming opinions