Archive

Geek Talk

I started using Ubuntu 11.10 (Upgraded from 11.04) lately because my 2-yr old Macbook White has been experiencing kernel panics which deems unusable at the moment. So far, I am very much liking Ubuntu and would probably keep using it for work and quick hacks. However, one problem that arises with my Ubuntu is that it blanks out when resized.

To fix this :

  • Go to System Settings -> Additional Drivers
  • Activate NVIDIA accelerated graphics driver (version 173)
  • Reboot your computer

A more graphical how-to can be seen at http://askubuntu.com/questions/66652/windows-go-blank-when-resizing. Credits to the guy who was able to solve this!

Eclipse and Maya

I am currently stumped with connecting the Eclipse Maya Editor on my macbook. It always shows a “Bad version number in .class file” error, that’s why the Maya Editor Prefs Page throws a NoClassDefFoundError whenever I load Eclipse. I tried checking the jar file which was unhelpful because it was producing “non-human readable” ASCII characters. I also changed my Java Preferences to version 1.6 which caused the JVM on Eclipse to crash after I rebooted my macbook. I am hoping I could make this work without installing Bootcamp so I won’t waste my time installing Windows 7 (and Maya later on). I’ll try looking for other solutions on the forums but it seems that installing Bootcamp is an optimal solution right now.

Eclipse and Project Euler

Anywhoo, I decided to take a break on working with Maya and try to do a little bit of coding in Java. I am solving some of the problems on ProjectEuler even though I haven’t done much. My goal for doing this is to develop my logical thinking and to come up with efficient algorithms in the long run. I will be using Eclipse as my IDE for the exercises so it should be fun! Yaay!

Problem 1

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

In Java…

public class NatNumMult35 {

	/*
	 *If we list all the natural numbers below 10 that are multiples of 3 or 5,
	 *we get 3, 5, 6 and 9. The sum of these multiples is 23.
	 *
	 *Find the sum of all the multiples of 3 or 5 below 1000.
	 *
	 */

	private int num;
	private int sumMult=0;
	public NatNumMult35(int num) {
		this.num = num;
		sumMult = this.sumOfMultiples(this.getMultiplesOfThreeAndFive(num));
	}

	public int[] getMultiplesOfThreeAndFive(int num){
		int[] multThreeAndFive = new int[2];

		multThreeAndFive[0] = (num-1)/3;
		//Determines how many multiples of 3 in a given number;

		multThreeAndFive[1] = (num-1)/5;
		//Determines how many multiples of 5 in a given number;

		return multThreeAndFive;
	}

	public int sumOfMultiples(int[] temp){
		int sum=0;

		for(int i=1; i = temp[0]; i++){
                   // Adds up multiples of 3; 
	           sum+=(3*i);
		}

		for(int i=1; i = temp[1]; i++){
                  // Adds up multiples of 5 which are not divisible by 3. 
			if(((5*i)%3) != 0) {
				sum+=(5*i);
			}

		}

		return sum;
	}
}

When using Maya, the Insert Key is important when you want to move the pivot of any polygon or object. However, this feature becomes harder on Mac keyboards as they don’t have Insert keys.

So this was what I’ve tried and it worked for me: fn + left button

To change the pivot back to the move tool for the object, you can also use fn + left button again and it “locks” the pivot and returns to the move tool.

Ever had those moments where you are in the middle of cramming to-do lists on your computer and all those social networking sites the Internet is distracting you from doing your to-do list well? I have. I’ve found a great way of achieving total productivity through mac applications in PsychologyToday.

Anti-Social and Freedom are two mac applications which are described in the article entitled, Does Blocking Your Social Networking Sites Make You Anti-Social. I don’t want to get into too much details about the article but the gist is that improving productivity from technology overload may be solved through technology itself, thus, Anti-Social and Freedom!

I’ve chosen the Freedom Mac App because it completely disables the network connection for at most 8 hours at a time. And this is what I’ve thought of it so far:

The Upside:

  • Disables your network connection to completely block off the Internet while you’re working.
  • No distractions from your Facebook, Gmail, Google Reader, WordPress, etc.
  • Improves time productivity
  • Gets more work done.
  • Best for people who don’t have control over checking their mails and social networking sites. (Like me!)

The Downside

  • You can’t just “turn on” the network connection when you desperately need research materials during cram time.
  • The trial lasts for five Freedom times and after that either you have to live yourself without it or buy it for $10 via Paypal or Google Checkout.
  • Shutting down computer would reset the total time you’ve blocked yourself from the web.
  • When you do decide to shut the computer down because of loss of self-control, you may have to rethink the fact that (1) you may be addicted with the Internet, or (2) you need to submit something REALLY IMPORTANT that it can’t wait ’till later.

I’m still using the trial version and have not yet bought it for $10 but this may be a good investment since I currently can’t control my time without checking the latest happenings around the web. It does not and will not make me an Anti-Social, as described by the author, but it can, however, make me more productive.

And yes, I’ll be buying it for later. I can’t wait what productive things I can do without the web!

I’ve recently tried my hands on WordPress Theme Development and I have to say everything becomes easier once you get to know the basic structure of WordPress in particular. Of course, a prerequisite of learning how to make a WP theme will be HTML, CSS, and PHP. Javascript can be an optional tool if you want to create a more dynamic website rather than static ones.

So far, I’m on Day 2 and I have been able to set up WordPress CMS on my MAMP, add dummy posts, pages on WP, etc, create basic template files, retrieve and display posts and pages (and subpages), add dynamic widget sidebar on the footer, and design basic CSS layout on it. Pretty productive on my first two days, huh? There are many resources over the Internet which are very useful and easy to understand. I will try and gather them and come up with a tutorial about this in a couple of days. Of course, provided that I finish the one that mini-project that I’m working on right now. :)

I always forget how to print my screen in Mac OS X. It’s not that I’m not used to a Mac but I’m just a forgetful person. So for archiving purposes, here are some of the essential keyboard shortcuts on how to print the screen on Mac OS X.

Printing the Desktop Screen

  • Press the keys [Command or Apple⌘ Key  + Shift Key + 3]
  • You can find your screen-captured image on your Desktop.

Printing a Specific Application Screen

  • Press the keys [Command or Apple⌘ Key  + Shift Key + 4]
  • If you’ve seen a target-looking cursor on your screen, press the [Spacebar]
  • If you’ve seen a camera cursor on your screen, click on the application that you want to capture.
  • You can find your screen-captured image on your Desktop.

*Credit goes to TechieCorner for reminding me how to do it. :)

Ever since my Dad bought us an unlimited Sun Broadband wireless, my sister and I sometimes fight over who gets to use the modem for the time-being. I later discovered that it was possible for a Mac(I have a white Macbook, OSX Leopard) to share its Internet Connection via Network Devices.

Ways of Sharing Internet Connection via Airport:

1. Sharing the DHCP connection.

on Mac:

  1. Open System Preferences.
  2. Click on the “Sharing” icon
  3. Click on the “Internet Sharing” item list.
  4. On the “Internet Sharing” item list, make sure that there’s a written name(i.e. ruzette) in the Computer Name field, selected source of connection (i.e. HUAWEI Mobile) in the Share your Connection from Combo Box and check the Airport Check Box in the To Computers Using list.
  5. On the “Airport Options”, make sure that the “Enable encryption (using WEP)” remains unchecked.
  6. Check the “Internet Sharing” check box.

on Windows XP:

  1. On your Wireless Connections, Click on the Network name provided on the Mac.
  2. Click Connect.
  3. If it is not entirely connected (i.e, Limited Connection), go to Command Line Prompt (Start->Run->Type “cmd” -> OK) then type “ipconfig /renew”(It renews all your adapters’ connections). Hit the Enter key.

2. Sharing the WEP connection.

on Mac:

  1. Open System Preferences.
  2. Click on the “Sharing” icon
  3. Click on the “Internet Sharing” item list.
  4. On the “Internet Sharing” item list, make sure that there’s a written name(i.e. ruzette) in the Computer Name field, selected source of connection (i.e. HUAWEI Mobile) in the Share your Connection from Combo Box and check the Airport Check Box in the To Computers Using list.
  5. On the “Airport Options”, check the “Enable encryption (using WEP)” box. Set the WEP-length to 40-bit.
  6. Now this is the fun and vital part. After setting the WEP-length to 40-bit. You can only create hexadecimal passwords, meaning that only numbers from 0-9 and letters from A to F are allowed. Also, make sure that the “$(dollar sign) is in front of the password (i.e. “$09342ABF”). Click OK. (Any combination using the mentioned numbers and letters is allowed. )
  7. Check the “Internet Sharing” check box.

on Windows:

  1. On your Wireless Connections, Click on the Network name provided on the Mac.
  2. Click Connect.
  3. If it is not entirely connected (i.e, Limited Connection), Right click on the “Wireless Connection” icon, Click on Properties.
  4. On the Properties window, click on the “Wireless Networks” tab. Select the Network name on the Mac then select the “Configure” button. Check the “Data encryption (WEP enabled)” and the “Network Authentication (Shared mode)” boxes. Enter the network key we provided on the Mac except that we remove the dollar sign(“$”) in front of the key.
  5. Make sure that the “Enable IEEE 802.x authentication for this network” remains unchecked in the Authentication tab.
  6. Click OK.
  7. Restart your connection if it still does not work.

***Special Thanks to lion for posting the WEP connection how-to on Mac-Forums. ;)

The procedures on Windows XP can also be applicable on Windows Vista. :)

Can’t connect to Sun SPOT?

Installing the Sun SPOT to your PC is as easy as one, two, and three! But if you can’t connect download your source code to Sun SPOT, you need to download the spotfinder binary found at the Downloads section on SunSpotworld.com and replace the one found at …/SunSPOT/sdk/bin . :)

That should get it working!

Due Date: March 07, 2009, 9:00 PM. +8:00 GMT

Create an OpenGL application that displays a cube, with the following specifications:

  1. There must be a way to view the cube from all sides
  2. Using the HSV color model, the cube faces must be three different colors, with opposite faces of the cube having the same color. The three colors must be 120 degrees from each other along the HSV color wheel
  3. The program must accept 6 inputs: (a) Increase/decrease hue, (b) Increase/decrease value, (c) Increase/decrease saturation

Submit a zip file with the following to kireene@yahoo.com (or submit a cd during class time)

  1. Executable program that will run under Windows XP SP3. include all files necessary to run the executable, such as additional link libraries, etc.
  2. Complete copy of the source code with comments.
  3. A readme.txt file containing your name and instructions on how to use your program.

CS 176 Project

Due date: 14 March 2009

Documentation Format:

  1. Overview of the Project
  2. Functionality
  3. Implementation Details
  4. Conclusion

Appendix: User’s Manual

Choose a presentation schedule before 07 March 2009.

During the presentation, submit the following:

  1. Complete copy of the source code
  2. Executable program with necessary eternal libraries
  3. Hard copy of the documentation
  4. Soft copy of the documentation in pdf format

You will be required to demonstrate the program. No powerpoint presentation necessary.

Internet Explorer is used by the vast majority of the worlds computer users

Internet Explorer is used by the vast majority of the world's computer users

Yes, you’ve read it correctly. Microsoft Internet Explorer, or more commonly known as IE, has a security flaw that will possibly allow other users to take control of your computer and steal passwords. This flaw will someday be adapted by criminals for their illegal transactions. What is unbelievable is that the previous releases already contained this flaw, and this is the only time that Microsoft had taken notice of it.

So far, Microsoft has advised its users to be vigilant while they develop a patch for IE. It is best to change the security setting of IE to high and to switch to a Windows user account with limited rights privileges or you can use other browsers such as Firefox or Opera.

Full information on this news can be found on the BBC News Website.

Follow

Get every new post delivered to your Inbox.