i've been using the Chosen jquery\prototype <select> enhancer for a little over a year now and am definitely a big fan.
then recently i started integrating a jquery form validation plugin called Validity. the main gold star for Validity is its simplicity and readability.
one small problem, at least in my case, was the result of applying Validity to a Chosen select. validation was working logically, but i found that when Validity tried to show a validation indicator in the DOM it wasn't visible. further inspection confirmed that Validity was actually drawing the indicator offscreen because Chosen, as a part of its normal functioning, hides the <select> control that it wraps (the same <select> control that one would presumably have tied to Validity's validation pipeline).
Writing a Custom Output Mode
and here's my custom outputMode:
the code to pay attention to is here:
if($obj.hasClass('chzn-select')){
$obj = $('#' + getIdentifier($obj) + '_chzn');
}
here i check the form element being validated to see if its Chosen, then re-point $obj to the DOM object Chosen creates as a visual placeholder for the underlying select control. that's it =;)
also, note that i make the assumption that my Chosen controls will always be classed with 'chzn-select'.
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
✓ Live Streaming✓ Interactive Chat✓ Private Shows✓ HD Quality
Anya is LIVE right now
FREE
Free to watch • No registration required • HD streaming
Just uploaded Multiclock 1.0 to the Google Play market ;)
Multiclock Clock & Alarm. Choose from several built-in presets or personalize your own clock. Also includes a richly featured alarm system and looks great on tablets!
This is the first release of Multiclock. While there are many more features slated for the app, I wanted to get this version out now to start testing its basic features in the wild. So your feedback is very appreciated!
After not much deliberation I decided to take BokehHD off Google Play at least temporarily. The app had a nice queue of downloads, but frankly I just wasn't happy enough with the app itself. It had performance issues when used as a LWP and wasn't as visually interesting and real as I had set out for initially. In fact, the reason I made BokehHD in the first place was that there is no quality, realistic bokeh app on the Market that I know. They all kinda suck as far as I'm concerned and I didn't want to be just-another-sucky-bokeh-app.
Anyway, I have some new ideas on how to achieve the desired effect. As to if and when those make it into a new app for Android ... only the spice worms know.
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
✓ Live Streaming✓ Interactive Chat✓ Private Shows✓ HD Quality
Anya is LIVE right now
FREE
Free to watch • No registration required • HD streaming
workaround class for Android animation set repeatCount problem
then start the animation with something like this:
in my case i wanted the animation to 'auto' start after the activity was created. there's a couple ways to do this, but the point is that you have to allow the UI thread to finish laying out the activity's view before starting the animation (this is another known issue with the old view animation framework).
of course, doing it this way doesn't work. the animation will fire once and never repeat. the problem is that AnimationSet doesn't currently support the repeatCount and repeatMode properties. fortunately, an official bug has already been filed and upgraded to 'future release': https://code.google.com/p/android/issues/detail?id=17662
in the meantime, i coded the following support class to faux repeat AnimationSet indefinitely:
jQuery plugin that converts a div into a stock ticker driven by live Google Finance data
there’s a couple ‘ticker’ like jQuery plugins already out there, but i didn’t see any that had a live data source connected … so this will query google finance on load then every 15 minutes.
running r1 Google TV emulator on a Windows pc (sorta)
the skinny
background
i got really excited when i saw that Google had finally released an Android SDK add-on for Google TV. but as i read through the first paragraph of the post and saw that the emulator image would only run on native linux with kvm my enchantment dwindled. not that i've ever really taken sides in the OS war, but i was currently only running windows PCs. according to the post google will eventually put out a revision of the add-on that supports 'other' operating systems, presumably windows, but i didn't want to wait. i decided it was time to finally suck it up and get unbuntudual-booting on one of my machines like all the cool kids. so i spent most of two days trying to get unbuntu and the google tv emulator working on first my laptop, then my desktop. i'll skip the gory details ... but i ran into quite a few problems, sometimes with ubuntu, sometimes with the emulator, sometimes with one pc versus the other, etc. i should note that i'm experienced, but hardly an expert on ubuntu\linux. and whatever my problems were, they were above both my knowledge and skill for finding answers fast via search. though i had several problems, the most critical revolved around getting ubuntu installed correctly on my desktop pc (which other-wise runs Windows 7). i was close to abandoning the task all together, but then asked myself "couldn't the emulator just run from a live version of ubuntu?" the answer turns out to be yes. that is, instead of going through a native install of ubuntu (or some other linux based OS) you can just run it from a USB flash drive, install the android SDK and the google tv add-on, and viola. the good news: if you're already running Windows and looking for a relatively fast, cheap, painless way to check out your android apps on the google tv emulator, this might work for you. the bad news: USB flash drives support significantly less read\write operations than traditional hard drives and external USB drives. that is, too much read\write will fry the flash drive. so this is *not* a good way to develop your app directly against the google tv emulator. this is fine for me, but if its a problem for you, consider using a USB external drive or, perhaps, going the more robust route of actually installing linux.
how to
1 - get a USB flash drive
i used a 4GB drive, though you can probably get away with using a 2GB. a 1GB drive will almost definitely be too small to hold the standard ubuntu distro, java jre, android sdk, your apps, etc. (of course, you could probably save a lot of space by using a slimmer linux system). if you have one handy, awesome. if not, read step 2 before going out and buying one.
2 - BIOS config
the end result of this procedure is a bootable USB drive that runs ubuntu live (ie, without a native install) and runs the google tv emulator. to run the emulator you need both linux as well as KVM. KVM is a linux virtualization platform and it requires that both a) you're CPU supports virtualization, and b) that CPU virtualization is enabled. to check these conditions you'll need to check your PC's bios settings. if your cpu doesn't support virtualization, you can technically still run the emulator. but on my machine (intel 2.66 quad), it was un-usably slow, slower even than the 'traditional' android avd images. point being, if your cpu doesn't support virtualization, you might want to stop here. so before you do anything else it would be good to check: plug in your USB drive (if you already have one), reboot your machine, and enter BIOS setup. you might have to poke around to find the virtualization settings (it was in two totally different places on my two PCs). if you find it, enable it. if your BIOS doesn't support BBSthis would also be a good time to elevate the boot priority of your USB drive. when your done, save and quit BIOS setup, allow your machine to boot normally.
3 - configure the flash drive
this is relatively easy to do and the ubuntu site lays it all out for you: download | ubuntu follow their instructions up until the very end when you're ready to burn the ubuntu image to your drive using the Universal USB Installer. step 4 of the Installer asks you to select a Persistence option. instead of the default (No Persistence), you'll want at least 1 GB of persisted space (i actually configured 2 GB). this will allow you to install java, android, etc and have it available whenever you boot from the drive. click Create ... the burn will take a little while, mostly due to the persisted space.
4 - boot unbuntu
with your USB drive plugged in, reboot your machine. if your BIOS supports BBS, enter the BBS menu and chose your USB drive. if not, you should have elevated the boot priority of your USB drive in step 2. BIOS will forward the boot sequence to your USB drive at this point and you'll get the Installer Boot Menu. Choose "Run Unbuntu from this USB". your machine will be booted with live ubuntu at this point...
5 - install and configure ubuntu packages
the first time unbuntu loads it will ask you to set a password for your 'key ring' ... do this. and configure wireless access if that's how your connecting to the Internet. unbuntu will prompt you to do that too as i recall. now you've got some packages to install. open the system terminal (applications > accessories > terminal) install java...
this last step changed your login's group membership. for this to take effect, you need to log out and back on (apparently). once you're back in, go back to terminal and enter this to allow rw permissions on the KVM folder:
sudo chmod a+rw /dev/kvm
6 - install Android SDK + Google TV Add-On
go to the android sdk siteand download the latest sdk for linux.
- extract the tgz to a local folder
- go to the SDK's 'tools' folder > run 'Android' (the Android SDK\AVD Manager).
- Available Software > 3rd party > Google Inc
- check Google TV Add-On > Install Selected (this will automatically include the Add-On's dependencies)
- when the update is complete, with the SDK\AVD Manager still open, go to Virtual Devices and create a new AVD targeting Google TV. at this point go back to\open Terminal...
cd <Android SDK location>/tools ./emulator @<google tv avd name> -verbose -scale 0.4
this will launch the google tv avd and stream some trace info back to the terminal ... look for the following: "emulator: KVM mode auto-enabled!" if you see that, you should be good to go. in my experience the emulator runs really well ... significantly better than running the typical ARM based avds. now all you have to do is get your apks over to the drive and install them with ADB...
cd <Android SDK location>/platform-tools ./adb install <path to your apk>
off and on, i’ve been trying to debug a memory issue in my newest app for like months now. today i finally found the asshole causing all the damage … apparently Typeface.createFromAsset leaks memory!
googling the problem revealed the issue had already been reported to the Android team along with a triangulation of the root cause. a fix hasn’t made it into an OS release as of this time tho.