Advertise with Googlier.com Music – ayn blog https://blog.andrewng.com saving your inboxes by posting the useless stuff here Fri, 14 Nov 2014 18:24:58 +0000 en-US hourly 1 https://wordpress.org/?v=7.1.2 54220945 wifi orchestra via Skype https://blog.andrewng.com/2014/11/14/wifi-orchestra-via-skype/ https://blog.andrewng.com/2014/11/14/wifi-orchestra-via-skype/#respond Fri, 14 Nov 2014 18:24:58 +0000 http://blog.andrewng.com/?p=3348 While Skype’s days have come and gone, this is a really cool video:

]]>
https://blog.andrewng.com/2014/11/14/wifi-orchestra-via-skype/feed/ 0 3348
The xx in Taipei https://blog.andrewng.com/2013/08/04/the-xx-in-taipei/ https://blog.andrewng.com/2013/08/04/the-xx-in-taipei/#respond Mon, 05 Aug 2013 06:34:56 +0000 http://blog.andrewng.com/?p=3090 Amazing they came to Taipei, epic show. Didn’t bring a real camera coz it was just too hot to carry anything, iPhone shots.

The xx

The xx

]]>
https://blog.andrewng.com/2013/08/04/the-xx-in-taipei/feed/ 0 3090
Spotify Top 50 Lists https://blog.andrewng.com/2013/05/22/spotify-top-50-lists/ https://blog.andrewng.com/2013/05/22/spotify-top-50-lists/#respond Wed, 22 May 2013 08:22:11 +0000 http://blog.andrewng.com/?p=2711 This is cool, top 50 for US:

Top 50 for Hong Kong:

And nope, nothing for Taiwan.

]]>
https://blog.andrewng.com/2013/05/22/spotify-top-50-lists/feed/ 0 2711
Denis Kozhukhin – Franz Liszt – “Mazeppa” Etude https://blog.andrewng.com/2012/05/16/denis-kozhukhin-franz-liszt-mazeppa-etude/ https://blog.andrewng.com/2012/05/16/denis-kozhukhin-franz-liszt-mazeppa-etude/#respond Wed, 16 May 2012 17:16:25 +0000 http://blog.andrewng.com/?p=2555

]]>
https://blog.andrewng.com/2012/05/16/denis-kozhukhin-franz-liszt-mazeppa-etude/feed/ 0 2555
Liebestod from Tristan und Isolde for piano – Lise de la Salle https://blog.andrewng.com/2012/01/05/liebestod-from-tristan-und-isolde-for-piano-lise-de-la-salle/ https://blog.andrewng.com/2012/01/05/liebestod-from-tristan-und-isolde-for-piano-lise-de-la-salle/#respond Thu, 05 Jan 2012 18:06:53 +0000 http://blog.andrewng.com/?p=2475

If you like Tristan und Isolde, make sure to check out the movie Melancholia.

]]>
https://blog.andrewng.com/2012/01/05/liebestod-from-tristan-und-isolde-for-piano-lise-de-la-salle/feed/ 0 2475
Fabbrini Steinway https://blog.andrewng.com/2011/06/20/fabbrini-steinway/ https://blog.andrewng.com/2011/06/20/fabbrini-steinway/#respond Tue, 21 Jun 2011 05:25:58 +0000 http://blog.andrewng.com/?p=2365

More info about Fabbrini here.

]]>
https://blog.andrewng.com/2011/06/20/fabbrini-steinway/feed/ 0 2365
Fritz Kreisler – Recitative and Scherzo caprice, Op.6 by Hyunsu Shin https://blog.andrewng.com/2011/05/31/fritz-kreisler-recitative-and-scherzo-caprice-op-6-by-hyunsu-shin/ https://blog.andrewng.com/2011/05/31/fritz-kreisler-recitative-and-scherzo-caprice-op-6-by-hyunsu-shin/#respond Wed, 01 Jun 2011 05:33:39 +0000 http://blog.andrewng.com/?p=2343

h/t @noirlfriends (he doesn’t really use Twitter lol).

]]>
https://blog.andrewng.com/2011/05/31/fritz-kreisler-recitative-and-scherzo-caprice-op-6-by-hyunsu-shin/feed/ 0 2343
some dope vids https://blog.andrewng.com/2009/08/14/some-dope-vids/ https://blog.andrewng.com/2009/08/14/some-dope-vids/#respond Fri, 14 Aug 2009 20:34:35 +0000 http://blog.andrewng.com/?p=1736 MMM:

Ann:

Junya:

]]>
https://blog.andrewng.com/2009/08/14/some-dope-vids/feed/ 0 1736
RjDj https://blog.andrewng.com/2008/10/12/rjdj/ https://blog.andrewng.com/2008/10/12/rjdj/#comments Mon, 13 Oct 2008 06:53:27 +0000 http://blog.andrewng.com/2008/10/12/rjdj/ This is pretty damn cool!

]]>
https://blog.andrewng.com/2008/10/12/rjdj/feed/ 1 1510
autocomplete with multiple related form fields (in rails) https://blog.andrewng.com/2008/09/08/autocomplete-with-multiple-related-form-fields-in-rails/ https://blog.andrewng.com/2008/09/08/autocomplete-with-multiple-related-form-fields-in-rails/#comments Mon, 08 Sep 2008 20:42:01 +0000 http://blog.andrewng.com/?p=1457 I?m an advisor and consultant for a social network site where you go upload images and tag the stuff you own and the stuff you want. One of the thing we wanted to do in the stuff-tagging form was to have related autocompletion fields. In this case, we want an autocompletion of brand names, and then based on the brand name input, we narrow down the autocompletion for models to only the models for that brand. This should be a pretty commonly done, but the auto_complete plugin in Rails has no easy way to do this.

The obvious approach was to use Rails? autocompletion plugin to do the first field, and then use Scriptaculous directly for the second field, my first approach looked like this:

<%= text_field_with_auto_complete :product, :brand %> 

<input id="product_model" name="product[name]" size="30" type="text" />
<div class="auto_complete" id="product_model_auto_complete"></div>

<script type="text/javascript">
  new Ajax.Autocompleter(
    'product_model',
    'product_model_auto_complete',
    '/products/auto_complete_for_product_model',
    { parameter: 'brand=' + $F('product_brand') }
  );
</script>

But this didn?t work because the parameters are populated on instantiation of the Ajax.Autocompleter, so dynamic form content are not properly sent to the controller. Took some googling and playing around to figure this out, but the solution is to append the additional parameter by overriding the callback.

<%= text_field_with_auto_complete :product, :brand %> 

<input id="product_model" name="product[name]" size="30" type="text" />
<div class="auto_complete" id="product_model_auto_complete"></div>

<script type="text/javascript">
  new Ajax.Autocompleter(
    'product_model',
    'product_model_auto_complete',
    '/products/auto_complete_for_product_model',
    { callback: function(e, qs) {
        return qs + '&brand=' + $F('product_brand');
      }
    }
  );
</script>

Just for fun, I?m including the ajax endpoint to show how I generate the results in the desired unordered list format using the auto_complete_result helper. You should always specify a limit in these type of queries.

def auto_complete_for_product_model
  @results = Product.find_by_sql(
  [ %Q{select p.name from brands b, products p
      where lower(b.name) = ? 
      and p.brand_id=b.id 
      and lower(p.name) like ? limit 10}, 
    "#{params[:brand].downcase}", 
    "#{params[:product][:name].downcase}%" ]) if params[:brand] && params[:product][:name]    
    render :inline => "<%= auto_complete_result @results, 'name' %>"
end

BTW, this site is gonna make an appearance at the Techcrunch 50 demo pit, I should be there, check my Tweets, stop by and say hi if you happen to be around.

]]>
https://blog.andrewng.com/2008/09/08/autocomplete-with-multiple-related-form-fields-in-rails/feed/ 2 1457