Thursday, 30 December 2010

Flash for 64 bit Linux

Short post. If you're using a Linux distro for the x64 (x86-64) architecture, this page from Adobe Labs has all the info and istructions you need to install it.

I've tried it and works very fast! So far, haven't had any problems with it.


The way I've done it is to extract the libflashplayer.so from the file (i.e. flashplayer10_2_p3_64bit_linux_111710.tar.gz, just right click on it and choose 'Extract here') and then move it to the /usr/lib64/mozilla/plugins/ folder via the following terminal commands:
cd ~/Downloads
sudo cp libflashplayer.so /usr/lib64/mozilla/plugins/
Of course this is assuming you downloaded the file to your home folder's Downloads folder (the usual case). If you're using Konqueror, you may need to add the Flash plugin by going to Settings>Configure Konqueror>Plugins (last item), then select the Plugins tab, and click on the "Scans for plugins" button.

*Notes*
  • The Adobe Labs link was updated as the preview of  the 64-bit Adobe Flash Player Square is now available for Linux, Mac OS X, and Windows).
  • More information is available at this Ubuntu Documentation page (removal of non-64 bit Flash plugins, alternative way of installing it, and such)

Hope this helps.

Thursday, 9 December 2010

My Online Footprints

Not only technomess keeps me busy. Probably that is why you do not see a large amount of posts on this blog, which is more like a notebook to me.


Although they are more closely related to my work as a Computer Technology teacher, they may be useful, or interesting:

  • An old blog managed and created by a former colleague ("magicpockets") and myself ("Delta"), now an archive of resources, ideas and notes from the time I had the privilege of working with him:  the HSTech blog.
  • My current new blog to provide additional information and resources for my students, Curious Computer Tech.
  • My tasty delicious bookmarks containing the treasures I have found online

And well, the rest is actually personal (facebook, twitter, flickr, and such) that I keep, well, personal and private.

Sunday, 7 November 2010

Ubuntu 10.10 and Lenovo Ideapad S10-3

Lenovo Ideapad S10-3

If you have a Lenovo Ideapad S10-3 (depicted above), and you want to test or install shiny new Ubuntu 10.10 on it, you need to take a couple of considerations.
  1. Use UNetbootin to create the bootable USB drive or SD card with Ubuntu 10.10
  2. When booting the flashdrive or SD card, pres TAB key quickly so you may add the following kernel boot parameter (add this to the end of the line starting with the word "kernel"):
intel_idle.max_cstate=0
Install Ubuntu (or any of its variants). You will need to manually add the additional kernel boot parameter once more when you see this screen:


Press the 'E' key as stated and edit the line that contains the words "quiet splash --" (or similar) and add:
intel_idle.max_cstate=0
right before the word "quiet" (after or in the middle may also work, but I did it this way), so it reads
intel_idle.max_cstate=0 quiet splash  --

Now let's see how to permanently change this boot parameter after you have installed Ubuntu to your computer's hard disk.

Open up the Terminal and type
sudo nano /etc/default/grub
You will see something like this:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
. . .

Change the 9th line so it reads:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=0"

Press Control+X, save the changes by saying Yes (Y key)
Now type the following in the Terminal, and we're done. Next time you'll boot as per normal.
sudo update-grub


Reference:

Friday, 10 September 2010

How to build a PC?

The smart way, of course. Research, learn, design, plan, build, test. Then play Starcraft 2. HA!

Starting guiding question: How computers work? (Howstuffworks.com)

How to select the parts for your Frankenstein PC - from Tom's Hardware (excellent resources IMO):

How to build a PC? (there are many books, magazines, web sites and YouTube videos about this, so get Googling and get some magazines!)
Recommended:

And for the Singapore "Hardware Scene":
Look at their pricelist (you may have to become a member -it's free-) their shootouts, and their product guides (AKA reviews).

Tip: Never go cheap on motherboards or power supplies (PSUs), or you may regret it...

Good luck and happy building.

Friday, 11 June 2010

Change the Firefox cache location

Not necessarily the safest thing to do, I agree, but this is how I set up Firefox on my desktop PCs to avoid fragmentation and keep temporary files separate from my OS, Documents, data, and applications.

  1. Type about:config into the Firefox navigation bar and hit [Enter]
  2. Right click anywhere and select NEW, then STRING.
  3. Enter browser.cache.disk.parent_directory in the first popup box
  4. And then the location in the second popup box, for example: k:\tempintfiles
 If the entry already existed, simply right click on it and select MODIFY and enter your new directory path.

 Information taken from http://www.infohole.com/blog/computing/firefox-cache-location/

Tuesday, 23 February 2010

Java's static arg(h)s

The classic Java question when we finally manage to compile and run our "Hello world". What's with the public static void main(String args[]) line?
So our example is
public class TestArgs {
 public static void main(String args[]) {
  for (int i = 0; i < args.length; i++) {
   System.out.println("args[" + i + "] is " + args[i]);
  }
 }
}
I'm assuming you have some background knowledge here, and common sense. main( ) has to be public, since it is the main point of entry to our program and has to be easily accessible. As it is the first method that is run, it also has to be static, because we need to invoke it without instantiating its class. By this I mean that we do not need to create an object before we invoke the main method. Finally, void means that our main method returns nothing.

String args[] lets you pass arguments to your main method when you run your program. The argument(s) will be put in an array of string elements. The sample program prints all the arguments you pass via command line.

So a sample run should work like this:

javac TestArgs.java
java TestArgs uno 2 tres 4 cinco
Hello!
args[0] is uno
args[1] is 2
args[2] is tres
args[3] is 4
args[4] is cinco

Monday, 8 February 2010

technomess on twitter

Yes, technomess also on twitter now!
Small stuff like news and quick posts will go there.

You're welcome to follow using the button on the sidebar or

https://twitter.com/technomess/

Sunday, 24 January 2010

Ubuntu Linux: Install Sun's Java JDK

If you're using Debian (this works with Ubuntu as well, and may work with other Debian derivatives) and want to install Sun's Java Development Kit, and ensure it is set properly.
First, let's start by opening a terminal. Remember to use su or sudo for admin tasks.
sudo apt-get install sun-java6-jdk -y
You'll be asked to accept the accept the license terms before installing the JDK.
After all is done, type the following to test your JDK:
java -version
javac -version
Many Linux distributions come with other versions of the JRE (runtime environment). If this is the case, use the following terminal commands to choose which want to use as default:
update-alternatives --config java
update-alternatives --config javac
The first line lets you choose a JRE and the second, a compiler (provided more than one alternative is installed).

Notes: You need the nonfree/multiverse repository(-ies) enabled. OR, if you're using Ubuntu 10.04 onwards, the "partner" repository (Sun's/Oracle's Java packages have been moved to partner). Via command line, you may easily do this by pasting the following line in your terminal:

sudo add-apt-repository “deb http://archive.canonical.com/ maverick partner”
sudo apt-get update
 If you're using Ubuntu 10.10, the word in bold should be maverick; for 10.4, use lucid.

Wednesday, 6 January 2010

Java programming fun

This is an interesting problem solved using Java, but without using any fancy extra methods.

public class TestIsSubString {

/*
* Write a isSubString method that searches for a specific string within
* another string; the method must return true if the former exists in the
* latter string. Otherwise, the method return false.
*/

public static boolean isSubString(String part, String whole) {
// The hard way, with nested loops instead of whole.indexOf(part)!= -1
// Note to self: local variables MUST be init'd
int hits = 0; // flag type of variable
boolean isFound = false;
for (int i = 0; i <= whole.length()-part.length(); i++) {
hits = 0;
//isFound = false;
for (int j = 0; j < part.length(); j++) {
if( part.charAt(j) == whole.charAt(i + j) ) {
hits ++;
}
}
System.out.println("Hits = " + hits + " | len = " + part.length());
if( hits == part.length() ) {
isFound = true;
}
}
return isFound;
}

public static void main(String[] args) {
String text = "The cat in the hat.";

System.out.println("isSubString(\"cat\", \"The cat in the hat.\") "
+ isSubString("cat", text));

System.out.println("isSubString(\"bat\", \"The cat in the hat.\") "
+ isSubString("bat", text));

System.out.println("isSubString(\"The\", \"The cat in the hat.\") "
+ isSubString("The", text));

System.out.println("isSubString(\"hat.\", \"The cat in the hat.\") "
+ isSubString("hat.", text));

}
}

Get back the command prompt in Windows 10

If you've updated your Windows 10 system to the Creators Update (or newer), you may have noticed that the contextual menu (shift+right c...