Wednesday, 31 March 2010

Using color in Android, by Java code

In last article, Using color in Android, by XML, described how to define color in XML file. Here, changing color using Java code will be described.



Keep using the main.xml and mycolor.xml

Modify Java code
package com.exercise.AndroidColor;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

public class AndroidColor extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

final LinearLayout backGround = (LinearLayout)findViewById(R.id.background);
Button whiteButton = (Button)findViewById(R.id.whitebutton);
Button redButton = (Button)findViewById(R.id.redbutton);
Button greenButton = (Button)findViewById(R.id.greenbutton);
Button blueButton = (Button)findViewById(R.id.bluebutton);

whiteButton.setOnClickListener(new Button.OnClickListener(){
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
backGround.setBackgroundResource(android.R.color.white);
}});

redButton.setOnClickListener(new Button.OnClickListener(){
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
backGround.setBackgroundColor(0xff000000 + 0xff0000);
}});

greenButton.setOnClickListener(new Button.OnClickListener(){
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
backGround.setBackgroundResource(R.color.green);
}});

blueButton.setOnClickListener(new Button.OnClickListener(){
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
backGround.setBackgroundResource(R.color.blue);
}});
}
}


Download the files.

Tuesday, 30 March 2010

Using color in Android, by XML

In Android, colors can be defined directly, such as "#ff0000" for red. You can also create a resource file under /res/values folder (with any file name), with your own color id defined inside. Such that you can access them in Java code using id. Android also defined a base set in android.R.color.

example:



/res/values/mycolor.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="red">#ff0000</color>
<color name="green">#00ff00</color>
<color name="blue">#0000ff</color>
</resources>


/res/layout/main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/background"
>

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>

<!-- "white" defined in Android base set of colors -->
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="WHITE"
android:textColor="@android:color/white"
android:id="@+id/whitebutton"
/>

<!-- direct define textColor -->
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="RED"
android:textColor="#ff0000"
android:id="@+id/redbutton"
/>

<!-- "green" defined in mycolor.xml -->
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="GREEN"
android:textColor="@color/green"
android:id="@+id/greenbutton"
/>

<!-- "blue" defined in mycolor.xml -->
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="BLUE"
android:textColor="@color/blue"
android:id="@+id/bluebutton"
/>
</LinearLayout>




Umbrella & TinyTSS - iPad Support

I've added iPad support to v222 of Umbrella and TinyTSS. As the device isn't out yet, I cannot be 100% certain it works perfectly. I'm confident it'll work just fine though. From what George Hotz posted on his blog, I have high hopes for a quick jailbreak for 3.2 (untethered). That jailbreak will make Umbrella and TinyTSS very important for early adopters of iPads with OS version 3.2.



Enjoy.



Edit: I've gotten quite a few reports of folks not being able to point to 'Saurik - Cydia' and obtain their shsh. Check your etc/hosts file having an entry in that file for gs.apple.com will cause your issue. Make sure that entry is commented out by putting # at the beginning of the line with gs.apple.com.



Edit: Ok guys, a couple notes. Yes your SHSH will be different each time you run it for 3.1.3. If you did a little bit of reading of my previous posts you would have noticed my mention of APTicket in the SHSHs for 3.1.3. This is a unique value for each SHSH request. So far iTunes doesn't use it yet (to my knowledge). This is why it is VITAL that you do NOT update iTunes past 9.1. (In my personal opinion I would have a version 9.0.2 lying around because that is what I use).





Future versions of iTunes can use this value to further [in]validate your local restore. This will eventually require an iTunes patch to do local restores. And then, when the new bootrom comes along, they can move the [in]validation based on the APTicket to the device and then anyone with THAT new bootrom will be really screwed.





Edit: Please do not direct link the download. I want the download and the hashes to appear together. Thank you for your understanding.



fw-umbrella-semaphore-222.zip 





fw-umbrella-semaphore-222.zip md5: d17e449ba79c1c1caa4c0a6dd970eb0e

fw-umbrella-semaphore-222.zip sha1: 6c2229d615e40560f0d67fec5649192dd35f6461




umbrella.exe md5:  b667ec438182bc6771e420ddbc657002

umbrella.exe sha1:  2408764b7b2d8b7ea80f6bf23d9044658d5dabbd

tinytss.exe md5:  35d4e41775fe7741bc48da8dff374bd4

tinytss.exe sha1:  a383bb72f7cb6b5058a5c1b4568bbef672a533ae

umbrella64.exe md5: 31f0ce296d28a00b05b2fa82cde83a45

umbrella64.exe sha1: cf5dabd9e03c349158e220047b32b5fc07227d18

tinytss64.exe md5: aeeeae6bdd85343d8b4438f2d0edcc76

tinytss64.exe sha1: f5d9355a067a888fcffb76a5e5238848a40e9c57

Umbrella.dmg md5: 018b29a3662bc2c9b55ed93fe32d95a6

Umbrella.dmg sha1: a071492b0417ce2b2926b8df015f7f9c99412365

FAQ: The Firmware Umbrella

I've seen so many questions, comments, misinformation about ECIDs, SHSHs, Apple's TSS Server, Saurik, etc. I've decided to give a quick overview of my app along with its role and how it works with Saurik's Cydia on file mechanism.



Q: What is Umbrella?

A: Umbrella is a small application that sends the same requests to Apple's TSS server (details aren't important) that iTunes sends to Apple's TSS server when iTunes is trying to verify your 3gs restore. When it receives the response from Apple's TSS server, it saves the response (if the response is positive) in a formatted file that can be used with TinyTSS.



Q: I'm not jailbroken. Do I need to be jailbroken to be able to get my SHSH hashes saved (either locally or on Cydia)?

 A: NO. Umbrella only uses your ECID (which you can obtain in a couple different ways without being jailbroken) to obtain your SHSH hashes. If you select the Saurik - Cydia option in the "SHSH Repository" combo box, Umbrella will request the SHSH files through Cydia. This will have Cydia send the request to Apple (thereby saving the results in Cydia's "on file" list) and return the results to you. This also allows you to request from Cydia older SHSH hashes for your ECID IF CYDIA ALREADY HAS THEM. I cannot emphasize that enough...



Q: If I have a new device or simply never decided to jailbreak until now, is there any possible way for me to get older SHSH hashes for my device?

A: Unfortunately NO. The way Apple's TSS server works is they effectively only sign SHSH hashes for a specific firmware version for a limited time. Once they stop signing a version (like 3.1.2) and start signing a new version (like 3.1.3) they _do_not_sign_ the older version again. It's very much like missing the last boat to old-version-local-restore-land. You just can't get it anymore.



Q: So there is no other way for me to obtain older SHSH hashes for my device if I waited too long or just by dumb luck bought my device too recently?

A: Yes and No. Yes Apple TSS server will NOT sign your simple ECID request from Umbrella. This is the default answer and for most folks, I'm sorry. If you are one of the very few individuals that happened to save your temporary files during a 3.0.1 or 3.0 or 3.1 or 3.1.2 restore AND happen to have all of the required temporary files, TinyTSS can reconstitute your temporary files into your SHSH hash for the version of temporary files that you have saved. Keep in mind, the files are deleted after the restore process so if you are reading this and thinking "WOW I WONDER IF THEY'RE STILL THERE FROM THE RESTORE I DID 45 mins AGO!?" I can answer the question for you - They aren't. You have to have saved the files DURING the restore process. Not before. Not after. You have a tiny window in which to save those files and very few people actually save them at the right time. BUT. If you are one of the insanely lucky individuals that saved the right temp folders at the right time during a restore of an older firmware version. You can use TinyTSS to create your SHSH hash file for that version.





Q: What do I need in order to run Umbrella?

A: It depends on your OS. If you're on a Mac java is typically installed on for you on Snow Leopard. If you run an older version of OSX, you'll have to open Terminal and run "java -version" and see if you get a 'version'. You need version 1.5+ to run Umbrella and TinyTSS. (JDK/JSDK/JRE all work fine so if you are just a user don't worry about installing the full JDK/JSDK the JRE will work fine for you). If you run Linux just "sudo apt-get install sun-java6-bin" if I remember correctly. If you run Windows, you'll need to check your java version by opening a command window and typing "java -version". If it comes back 1.5 or greater you can run the .exe files. Otherwise you'll have to upgrade your java runtime environment (JRE) via java.sun.com. Incidentally, you'll also need your ECID for Umbrella (there are countless tutorials on this) and you'll need a proper SHSH hash file for TinyTSS (or a folder/folders containing temp restore files for SHSH file reconstitution).



Q: How do I know if my SHSH file is valid?

A: If the file that gets saved is anywhere from 60-65k bytes then the file should be just fine.



Q: The file I got from Cydia does not match the file that Umbrella got from Apple should I be worried?

A: Absolutely not. The only difference between the files is whitespace and the XML headers. Neither make any difference at all to the TSS process. (Incidentally when TinyTSS responds to iTunes TSS requests in a real restore, iTunes is perfectly tricked by the reponses that TinyTSS generates).



Q: Should I be worried about iTunes updates?

A: VERY MUCH YES!!! iTunes updates can completely break the restore process. The whole reason TinyTSS works is because iTunes is faked into thinking it's talking to the REAL Apple TSS server. Future versions of iTunes can very easily stop this process. In fact, evidence is showing that future versions of iTunes WILL break local restores by Cydia and TinyTSS. Apple also seems to be planning to move this functionality into the bootrom of devices so that restores will be ONLY possible via a valid responds from Apple themselves.



Q: What iTunes version do you use?

A: I'm on 9.0.2 because Requiem works perfectly on it and local restores work perfectly as well.



Q: Why do I get error 16xx, 13xx etc when I try restoring using TinyTSS?

A: First, ensure that you have TinyTSS running. Then, make sure your hosts file has an entry matching (whitespaces and quotes ignored) "127.0.0.1 gs.apple.com". Then, make sure you are restoring to the exact version of OS that you have REAL SHSH hashes for. Changing the name of the file won't change the hashes. (Yes - some folks actually thought that would make a difference). If you have valid hashes for the version you wish to restore to check the version of iTunes you are running. I know for a fact that 9.0.2 works every time. I have heard that 9.0.3 works fine as well. Beyond that I'm unsure. If you're getting exceptions go ahead and write a comment and I'll take a look at it.



Q: Why did you do this in Java?

A: Because it was faster for me to get this out to everyone in Java (across multiple platforms, OSes, OS Versions) than it would have been in any other language.



Q: I cannot listen on port 80! I can't start up TinyTSS because it says the port is in use! HELP!

A: On this I cannot help you much. You're going to have to do some legwork to figure out your own machine. Google is your friend. Try googling " default services port 80" and see if you get any hints. TinyTSS MUST listen on port 80 AND the hosts entry must exist (127.0.0.1 gs.apple.com) in order to trick iTunes.



Q: Umbrella is just not working it's saying that it cannot even get my SHSH file for the current device version!

A: Did you remember to remove the hosts entry? If you have 127.0.0.1 gs.apple.com OR if you have an entry pointing gs.apple.com to any other site ie: cydia. You may have to comment it out using # and save it and then try Umbrella again. 



Q: Can I use my friend's hacked ipsw to downgrade my 3.1.3 device to 3.1.2?

A: No. You MUST have your ECID shsh hashes for the version you wish to restore to on a 3GS/ipod touch 3G device.





Those are the few questions I can think of off the top of my head. There are many more and I'll add to this list as I think of more questions.



 



Monday, 29 March 2010

Great Media Developer Available (Limited Time Offer!)

I have been meaning to post this for a few weeks. One on my friends and coworkers, Dwayne Wolff, did not make the transition from Sun Microsystems to Oracle. He is the best Flash/Audio/Video/Illustrator/Artist/Media guy I have every worked with. He can take anybody's stick figure drawing and turn them into something cool. He is currently available and would be a great pick up for anyone needing a great artist/media guy.



For more information, check out these links.

http://www.dwaynewolff.com/staging - Media samples galore here.



http://www.linkedin.com/in/dwaynewolff - Resume and such



Better move quick, cause I don't think he will be on the market for long.

Bring forth the Pay Walls

SiliconValley.com has this post announcing a pay wall for the Time and Sunday Times of London. Starting June 1, the paper will cost about $150 a year and will provide "enhanced" features.



A pay wall is not a bad idea, especially if you provide really good "enhanced" content. ESPN has been doing this for years. However, I think they are charging too much. I discontinued my Wall Street Journal account because $150 is just too much for what you get. I just wanted to the news, I am not a day trader. They really need to identify their audiences and charge appropriately.



If Fox just cuts their prices to say $25 - $60 a year, I think they will be much more successful. My guess is they will have limited success at this price.

Android Scripting Environment, ase_r20.apk, released!

The Android Scripting Environment (ASE) brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device. These scripts have access to many of the APIs available to full-fledged Android applications, but with a greatly simplified interface.

Android Scripting Environment Project Home>>>

Related article describe how to install ase on Android Emulator: android-scripting: Android Scripting Environment

Tuesday, 23 March 2010

Upgrade Firefox to 3.6.2

Firefox LogoFirefox 3.6 has a serious security flaw that needs updating. From the menu, choose Help, then Check for Updates. That should get you the latest and greatest version of the browser.

Monday, 22 March 2010

Seamonkey 2.0 Becoming a Favorite

SeaMonkey LogoAs you may know, I like trying out different browsers. I have been using the new SeaMonkey 2.0.3 browser and am really beginning to enjoy this old school browser.



Like Firefox, SeaMonkey supports the FlashBlock add-on which goes a long way to avoiding those poorly written, CPU hogging, Flash ads. It has a new default theme that is clean and easy on the eyes. SeaMonkey also has the ability to show favicons for bookmarks on the toolbar. Plus since it uses the same rendering engine as Firefox, its fast and compatible with most websites. The only feature it currently is missing is the ability to double click and open a tab on the tab bar.



I use it a lot for the multiple profile feature which allows me to run as different users in the same browser. Firefox has can do this, but the feature is more up front and easier to use in SeaMonkey.



Check it out if you want to try an old school browser. And don't forget the integrated e-mail, IRC chat client, and page editor (Composer) that are integrated into this browser.

NullPointerException when Deploying EJB Client

Duke Waving

While testing the labs for one of our course a week or two back, I ran into the following error. A null pointer exception when an EJB 3 client is deployed. There are no errors in the source code.



Warning: Could not find file /export/home/student/sges-v3/glassfish/domains/domain1/generated/xml/EJB31/EJB31Client.jar to copy.

Copying 1 file to /export/home/student/solutions/mod02_sessions/EJB31/dist

Copying 4 files to /export/home/student/solutions/mod02_sessions/EJB31/dist/EJB31Client

Copying 1 file to /export/home/student/solutions/mod02_sessions/EJB31/dist/EJB31Client

java.lang.NullPointerException

at org.glassfish.appclient.client.acc.ACCLogger$1.run(ACCLogger.java:149)

at java.security.AccessController.doPrivileged(Native Method)

at org.glassfish.appclient.client.acc.ACCLogger.reviseLogger(ACCLogger.java:146)

at org.glassfish.appclient.client.acc.ACCLogger.init(ACCLogger.java:93)

at org.glassfish.appclient.client.acc.ACCLogger.init(ACCLogger.java:80)

at org.glassfish.appclient.client.AppClientFacade.createBuilder(AppClientFacade.java:360)

at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:247)

at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:75)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)

at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)

Java Result: 1



When you look on the app server, EJB31Client.jar is, in fact, in the wrong place. It turns out that this is a bug with GlassFish V3 and Java 6 update 18. To solve the problem, drop back to Java 6 update 17 or upgrade to GlassFish 3.0.1 when it becomes available.



For more information see the following links.

Thursday, 18 March 2010

Colorado Law Wipes out Amazon Associates

I purposefully avoid writing about politics on this blog. But given the events of last week, I feel I have no choice but to speak up.  So I promise only a few informational posts and then back to tech.



What Happened?

The state of Colorado passed a law (House Bill 10-1193) in attempt to collect sales tax from Amazon. To protect their business, Amazon.com fired all their associates in the state of Colorado. The result according to the AP was the loss of 4200 small businesses and 5000 jobs in the state of Colorado.



What was the Goal of the Legislation?

Out of state Internet and mail order businesses, like Amazon.com, are not required to collect state sales tax in states where they have no physical presence.  This principle has been confirmed in several supreme court cases. Most recently, two cases address the issue directly.

  • In 1967, the U.S. Supreme Court determined in Bellas Hess v. Illinois that states could not require companies without either property or employees in the state to collect sales and use tax � in other words, companies needed a physical nexus.

  • The 1992 Supreme Court Case Quill v. North Dakota then reaffirmed the principle that a company must have a substantive nexus in order for the state to require the company to collect sales taxes.

Amazon.com and many other Internet companies offer Associate programs. These programs pay web site owners small commissions when site users are referred to Amazon.com and make purchases. The Associate takes no orders. Associates do not do any sort of fulfillment. The Associate only refers customers to Amazon. Once there, Amazon takes the order, sends the product, collects the money and essentially does all the work. Associate programs are very beneficial to both parties in the program.





The Democrat lead legislature in Colorado decided that Amazon would be an easy target for some additional sales tax revenue. The Colorado law (House Bill 10-1193) essentially states that anyone involved in an Associate program constitutes the "physical presence" required for a retailer to collect state sales tax. Amazon warned the state that if the law passed, they would have to shutdown their Associate program in the state. Their warning was ignored and here we are.





The Real Story on Tax Revenue and Fees



The goal of law was to raise an addition $4.7 million dollars in tax revenues. What Colorado legislators fail to realize is that Amazon Associates were ALREADY PAYING INCOMES TAXES on any money they received. Some bloggers and web site owners, with enough traffic, manage to make a living through advertising and Associate programs. Although I was hardly making enough money to "retire" I was making several hundred dollars a year from my relationship with Amazon.



With one stroke of the pen, the legislature and Governor Ritter wiped out any revenue Associates were getting.  Not only will Colorado not receive $4.7 million dollars from sales tax, they won't receive a dime in income taxes from the 5000 people they put of of business. In addition, the loss of Internet business income tax revenue could be catastrophic. Anyone doing business has a choice of where to incorporate or form an LLC. States known for being business friendly like Nevada, Delaware, and Wyoming, make it easy to setup a business in their state.



Will ANY Internet businesses incorporate in the state of Colorado now?  Will Colorado receive fees from these new companies?  Will Colorado lawyers be paid to setup these companies?  The answers are no, no, and no. Anyone with any sort of substantial Internet business will set up a corporation out of state in the next few weeks and/or months. Permanently exiling any state income tax revenue to another state.



What can you Do About It?

Call your state representatives and ask them to repeal the law.



If you can't wait, look into setting up an out of state corporation or LLC. I am looking into that myself and will report back with more information as I find it out.





For More Information

There is a lot more information out there from other Colorado bloggers that is much more detailed than this post.  I just wanted to write up a summary and give myself a chance to vent. :)



Ari Armstrong: Stop the Amazon Tax

Repeal the Amazon Tax - Some bloggers trying to get together to get the tax repealed.

Diane Hsieh: Colorado Screws Amazon Associates

Monday, 15 March 2010

Backup Your Google Sites Wiki

Google LogoLooking for a way to backup your you Google Sites Wiki. Check out this tool: google-sites-liberation. Haven't tried it yet, but it looks promising.

Friday, 12 March 2010

SDK Tools, Revision 5 available

SDK Tools, Revision 5 (March 2010)
Dependencies:
  • If you are developing in Eclipse with ADT, note that SDK Tools r5 is designed for use with ADT 0.9.6 and later. After installing SDK Tools r5, we highly recommend updating your ADT Plugin to 0.9.6.
  • For Mac OS platforms, OS X 10.4.x (Tiger) is no longer officially supported.
SDK and AVD Manager:
  • Fixes SSL download for the standalone version of the SDK Updater.
  • Fixes issue with 64-bit JVM on Windows.
  • Adds support for platform samples components.
  • Improves support for dependency between components.
  • AVDs now sorted by API level.
  • The AVD creation dialog now enforces a minimum SD card size of 9MB.
  • Prevents deletion of running AVDs.
  • Settings are now automatically saved, no need to click "Apply".
Emulator:
  • Emulator now requires SD card to be 9MB or more.
Layoutopt:
  • Fixes layoutopt.bat to execute correctly on Windows.
You can refer to my article to know how to Install Android SDK on Eclipse 3.5 Galileo, in Ubuntu 9.10. Or, if you have install Android 1.6 SDK or later version, you can refer to another article to upgrade Android SDK using Android SDK and AVD Manager.

Monday, 8 March 2010

Android NDK r3 released!

The third release of the Android Native Development Kit (NDK) is now available for download from the Android developer site.

The Android NDK is a companion tool to the Android SDK that lets Android application developers build performance-critical portions of their apps in native code.



Android Scripting Environment, ase_r17, released!

The Android Scripting Environment (ASE) brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device. These scripts have access to many of the APIs available to full-fledged Android applications, but with a greatly simplified interface.

Android Scripting Environment Project Home>>>

Related article describe how to install ase on Android Emulator: android-scripting: Android Scripting Environment

Zip a Directory and Subdirectories with 7zip

7zip is an open source zipping tool for Windows. Since I often do a lot of fairly intense zipping, I needed to know how to create a zip archive of a directory and its subdirectories with 7zip from the command line. Here is the syntax:



7z a -r -tzip ArchiveFileNameHere.zip DirectoryNameHere



That is it. The a adds the files and the -r recurses the subdirectories. 7zip has a number of compression options so the -t option selects the .zip format.

Sunday, 7 March 2010

Convert an Unordered List into a Simple Table

CSS ButtonWorking on a page last night I decided I would like to have a different look for some lists. So I created a Thin List Table that turned out pretty good. Really easy to use and good for discussing code samples.

Symmetry Restored to How To Pages

Spent some of last nite and a lot of today fixing up the CSS on my How To pages. Check out the CSS Pages here.

Saturday, 6 March 2010

CSS Rollover Menu

CSS Button

I added a how to on creating a rollover menu with CSS. A little bit easier than I thought given the code.



After working on this, it seems like using a div as a container for special lists seems like a really good idea. That way, you can right the list the same way every time and just swap out the div class to change is styling. The HTML ends up being really simple.

Thursday, 4 March 2010

To Flash or not to Flash, That is the Question

Firefox LogoIn a past blog post, I discussed the future of the Flash plugin. Since then, I have been paying closer attention to Flash in my browsers.



Have you ever had this problem? You reading a book or something with you laptop sitting on your desk with a few browser tabs open. Suddenly, your laptop starts making sounds like a 737 getting ready to taxi for take off. You take a quick look at Task Manager or Performance Meter and you see that one of your browsers has pegged the CPU utilization at 100%. The culprit? Usually some poorly written Flash ad.



I had thought this only happened on my Mac. But since I have been setting up a Windows 7 machine, the exact same thing has happened with Windows 7. So, what to do?



If you are using Firefox, you have a great option to fix the problem, FlashBlock. This addon blocks all Flash on your web page, and replaces with a small Flash icon. If you want to see the content, like a video for example, just click on the icon and it plays. This addon has really improved the performance of Firefox and my web browsing experience greatly. Finally an easy to use solution to protect you from poorly written Flash ads.



Update: I forgot to mention you can customize the toolbar and add a button that will turn Flash on and off on demand. FlashBlock is the best add on ever!  lol.

Win7Tip: Java Plugin not Installed after Installing Java 6 64 bit on Windows 7

Duke WavingIt is a bit of a long title but here is the problem.



Problem: Java JDK/JRE 6 is installed on my Windows 7 system, but the Java Plugin is not installed in any of my browsers. What gives?



Solution: My guess is, the installed browsers (Firefox, Chrome, IE, Seamonkey, Safari) are all 32 bit versions. So the 64 bit Java installer does not update them.



To solve the problem, just install the 32 bit version of Java 6. This installs the plugin for all the browsers. You end up with Java in the following locations:



32 bit: c:\Program Files\Java

64 bit: c:\Program Fiels (x86)\Java



Just put the Java of your choice in your path and you should be good to go.

Monday, 1 March 2010

Set Menu/Application Font Size in Firefox

Firefox LogoAfter using a Windows 7 machine for a week or two I noticed that the font size of the menus of Firefox seems a little small. It turns out you can actually adjust the size of the application fonts in Firefox using CSS.



First, you need find the sample template for changing the Firefox UI, userChrome-example.css. This can be found in the following directory:

c:\Program Files\Mozilla Firefox\defaults\profile\chrome



First, copy userChrome-Example.css to userChrome.css.



Next, add a rule to set the default font size. For example, this sets the font size to 10pts:

* {
font-size: 10pt !important;
}


With the file created and rule added, copy userChrome.css to your profile directory for Firefox. This gets a little tricky as the AppData directory is hidden by default so you may need to actually type the name into Windows Explorer. So here is the path:

c:\Users\UserName\AppData\Roaming\Mozilla\Firefox\Profiles\someRandomeString.default\chrome



That is it. The font size for menu and other application text should now be set to 10 pts.