Probably the best tip I’ve ever come across…
How to use Firebug Lite on iOS (iPad, iPhone, etc.):
http://martinkool.com/post/13629963755/firebug-on-ipad-and-iphone
A Blog with Techincal Tips
Probably the best tip I’ve ever come across…
How to use Firebug Lite on iOS (iPad, iPhone, etc.):
http://martinkool.com/post/13629963755/firebug-on-ipad-and-iphone
Back in 2009, I posted an article titled “Keeping your iTunes Library Fresh” that showed how to create a smart playlist that would improve over a simple shuffle of your music library. Based on your ratings, it would play the music you like more often than the music you like less.
If you have tried out the new iTunes Match service from Apple, you may be disappointed that these playlists are not synced to iCloud (you see a little cloud icon next to your playlist name with a slash through it that clicked tells you it is ineligible for iCloud):
The playlist needs to be refactored so that it doesn’t depend on other playlists.
Unfortunately iTunes does not let you construct a single playlist that matches exactly to what was created in my old post (you can’t set a “limit to” number of songs for a single matching subsection–only to entire playlists). However, as a next-best thing, you can take advantage of the “Last Skipped” clause to help minimize the occurrence of poorly-rated music. The following is a single stand-alone playlist that corresponds to the “Good Mix” playlist from the old post (hold down the Option/Alt key when clicking the “+” button to create one of the indented “All”/”Any” subsections):
Here’s another single stand-alone playlist that corresponds to the “Christmas Mix” playlist from my old post:
Adjust the time values to your preferences. The reason why the no-star ratings are given equal weight as the 5-star songs is that it is likely that it is music that you just purchased and thus want to hear it frequently until you make a decision on what other rating you want to give it or it will help encourage you to rate all of your music. If you have a ton of unrated music simply make a zero-star-rated playlist and work your way through it.
If you are noticing client-side performance issues in your ADF Faces application and must support legacy browsers like Internet Explorer 7 and Internet Explorer 8, there are many techniques available to help optimize your application for these browsers:
At some point, you may have an inlineStyle whose value is BIDI sensitive; in LTR (left-to-right) mode, you may want a “left” style but in RTL (right-to-left) mode, you may want a “right” style. You don’t have to write a managed bean to give you the corresponding style, you can use EL (expression language).
Here’s an example assigning a padding for the “start” side of 10px:
inlineStyle="padding-#{adfFacesContext.rightToLeft?'right':'left'}:10px;"
See oracle.adf.view.rich.context.AdfFacesContext for other properties.
Adobe Illustrator CS4 has a very frustrating object gradient editing tool. Chances are that you already have the colors of your gradient somewhere in your artwork but not necessarily have spent the time to create a swatch for it. It would be much easier if Illustrator actually let you choose your color stop colors with an eye dropper tool. Actually it does–but it isn’t very obvious. Here are the steps:
Step 1 – Select your shape with the selection tool.
Step 2 – Open the gradient palette and select the color stop whose color you wish to change (notice the triangle above the color has a black fill).
Step 3 – Change to the eye dropper tool (or press “i”)
Step 4 – It is very important that you hold down the shift key when you click to pick up a color or else the gradient will be replaced with a solid color but now the color stop is using your newly-chosen color!
Adobe Illustrator CS4 does not let you directly apply special styling such as a gradient on the stroke of a shape but there is a workaround. This post walks you through the process to get it done.
Step 2 – Add a stroke to the shape by choosing Effect – Path – Outline Stroke.
Step 3 – The stroke appears with a solid color.
Step 4 – Convert the solid stroke into a separate object by choosing Object – Path – Outline Stroke.
Step 5 – You now have separate objects so you can select the stroke separately to make changes.
Step 6 – Finally, you can apply a gradient style on the separated stroke object and can apply other effects like a drop shadow. Rearrange the order of the 2 objects so that the drop shadow of the stroke does not cover up the inner shape.
If you are ever debugging a JSF 2 application, are seeing some “UIInstructions” components mysteriously polluting the component tree, and want to get rid of them (e.g. breaking desired sole-child configurations for layout geometry reasons), this tip is for you…
These UIInstructions components are likely due to the presence of an HTML DOCTYPE (or other content) appearing in one or more of your JSF fragment files. These fragment files are likely missing a ui:composition wrapper.
More info on why you might want the HTML DOCTYPE (or other content):
http://download.oracle.com/javaee/6/javaserverfaces/2.0/docs/pdldocs/facelets/ui/composition.html
As browsers evolve, changes have been made with how the HTML “accessKey” attribute works. There are differences across platforms for the same browser version as well as differences across browser versions on the same platform. There are even some cases where the exact same browser treats accessKey differently for button elements vs. anchor elements! This post shows some examples of how to invoke the accessKey and what the behavior is.
<html>
<body>
<button onclick="javascript:alert('hi button with onclick')"
accessKey="r">Button t<u style="color:red">r</u>y me</button>
<a href="javascript:;" onclick="alert('hi anchor with onclick');return false;"
accessKey="o">Anchor with <b style="color:red">o</b>nclick</a>
</body>
</html>
| Browser | Operating System | Key Combination | Button Behavior | Anchor Behavior |
|---|---|---|---|---|
| Chrome 7.0.517.41 | Linux | Alt + letter | Clicks the button (3) | Clicks the anchor (3) |
| Chrome 7.0.517.41 | Mac OS X | Control + Option + letter | Clicks the button (3) | Clicks the anchor (3) |
| Chrome 7.0.517.41 | Windows | Alt + letter | Clicks the button (3) | Clicks the anchor (3) |
| Firefox 1.5 | Windows | Alt + letter | Clicks the button (1) | Unknown |
| Firefox 2 | Linux | Alt + Shift + letter | Clicks the button (1) | Clicks the anchor |
| Firefox 2 | Mac OS X | Control + letter | Clicks the button (1) | Clicks the anchor |
| Firefox 2 | Windows | Alt + Shift + letter | Clicks the button (1) | Unknown |
| Firefox 3 | Linux | Alt + Shift + letter | Clicks the button (1) | Clicks the anchor |
| Firefox 3 | Mac OS X | Control + letter | Clicks the button (1) | Clicks the anchor |
| Firefox 3 | Windows | Alt + Shift + letter | Clicks the button (1) | Clicks the anchor |
| Internet Explorer 6 | Windows | Alt + letter | Sets focus on the button (2) | Unknown |
| Internet Explorer 7 | Windows | Alt + letter | Sets focus on the button (2) | Sets focus on the anchor (2) |
| Internet Explorer 8 | Windows | Alt + letter | Clicks the button (3) | Sets focus on the anchor (2) |
| Internet Explorer 9 (beta) | Windows | Alt + letter | Clicks the button (3) | Sets focus on the anchor (2) |
| Safari 3.1.2 | Mac OS X | Control + Option + letter | Clicks the button (3) | Clicks the anchor (3) |
| Safari 3.1.2 | Windows | Alt + letter | Clicks the button (3) | Clicks the anchor (3) |
| Safari 5.0.2 | Mac OS X | Control + Option + letter | Clicks the button (3) | Clicks the anchor (3) |
| Safari 5.0.2 | Windows | Alt + letter | Clicks the button (3) | Clicks the anchor (3) |
When defining the attributes for an ADF Faces af:pageTemplate or af:declarativeComponent inside of an af:xmlContent, you need to provide an attribute-class definition. This looks something like:
<attribute-class>java.lang.String</attribute-class>
but what if you needed an array of Strings? That has a bit stranger syntax:
<attribute-class>[[Ljava.lang.String;</attribute-class>
Why is this not just "java.lang.String[]"? These attribute-class entries are the result of calling Class.forName. The Class.forName on an array of objects looks like "[[Lsome.package.SomeClass;".