Sugree

Main menu

  • About
    • Self
  • Project
    • Barcode Generator / Reader
    • GT200
    • GeoPin
    • Mitter
    • Red Mob
    • Thairath Breaking News
    • Twitter Android SDK
    • jibjib
    • microblog-purple
    • English
    • Thai

Beauty

Submitted by sugree on Fri, 05/22/2009 - 13:41
  • Python
  • Ruby
  • Thai

@punneng อยากได้ Enumerable#collect ใน Python ต้องจัดให้

models.each{ |obj| obj.id } #=> [1,2,3,4,5...]

ผมชอบแบบนี้

[obj.id for obj in models]

@wiennat ชอบท่ายาก

map(lambda obj: obj.id, models)

@manat เล่นของสูง

models.map(&:id)
Roti (alpha) thinks you may like these:
  • Beauty
  • Beauty and the Surgery
  • The Beauty of Pride
  • Age is Beauty
  • Perishable Beauty
  • Login to post comments

Popular Tags

Android BarCamp BarCampBangkok Book Django Drupal Education Family Google Hardware Hardy Health Interview Intrepid Java jibjib Joke Life microblog-purple OpenOffice.org OpenSource Podcast Python Review SoC Social Network Trip Twitter Ubuntu Weekly Suki
more tags

Powered By

debian
apache
drupal
drupal.in.th
openfreehost
inox
feedburner

© 2007-2008 Sugree Phatanapherom. Creative Commons [Feed Content / Comment]
RoopleTheme