This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1.9.3-p286 :148 > CollectionItem.find("50f86e333fb21614e9010910").updated_at | |
| => 2013-01-18 15:02:42 +0100 | |
| 1.9.3-p286 :149 > CollectionItem.tire.search { filter :term, { _id: "50f86e333fb21614e9010910" } }.results.first["updated_at"] | |
| => "2013-01-18T15:02:42+01:00" | |
| 1.9.3-p286 :150 > CollectionItem.tire.search { filter :range, { updated_at: { from: 10.hours.ago, to: Time.now } } }.total_entries | |
| => 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html ng-app> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script> | |
| </head> | |
| <div> | |
| <span ng-init="editorEnabled = false" ng-hide="editorEnabled" ng-click="editorEnabled = true"> | |
| La valeur est : {{value}} ! Cliquez-moi pour la changer ! | |
| </span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| compiling cont.c | |
| compiling ./enc/ascii.c | |
| compiling ./enc/us_ascii.c | |
| compiling ./enc/unicode.c | |
| compiling ./enc/utf_8.c | |
| compiling newline.c | |
| compiling ./missing/setproctitle.c | |
| compiling dmyext.c | |
| compiling dln.c | |
| compiling encoding.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Owner | |
| def initialize(preferred_dog_name = "unknown") | |
| @preferred_dog_name = preferred_dog_name | |
| end | |
| def dog_name | |
| "my favourite dog is #{@preferred_dog_name}" | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| irb(main):001:0> class Point < Struct.new(:x, :y); end | |
| => nil | |
| irb(main):002:0> p = Point.new(3, 6) | |
| => #<struct Point x=3, y=6> | |
| irb(main):003:0> p.x | |
| => 3 | |
| irb(main):004:0> p.y | |
| => 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Objet natif Range, support des chaines, chiffres, dates... | |
| # Tous les chiffres entre 0 et 10 inclus. | |
| 0..10 | |
| #=> 0..10 | |
| # Tous les chiffres pairs entre 0 et 10 inclus. | |
| (0..10).select(&:even?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [$]nicolas@MacBook-Air-de-Nicolas-Blanco:[git:master] /Users/nicolas/projects/weboob-> ack urlEdit /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/weboob-0.e-py2.7.egg/weboob/applications/qvideoob | |
| /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/weboob-0.e-py2.7.egg/weboob/applications/qvideoob/main_window.py | |
| 47: self.connect(self.ui.urlEdit, SIGNAL("returnPressed()"), self.openURL) | |
| 74: self.ui.urlEdit.setEnabled(False) | |
| 77: self.ui.urlEdit.setEnabled(True) | |
| 126: url = unicode(self.ui.urlEdit.text()) | |
| 136: self.ui.urlEdit.clear() | |
| /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/weboob-0.e-py2.7.egg/weboob/applications/qvideoob/ui/main_window_ui.py | |
| 96: self.urlEdit = QtGui.QLineEdit(self.frame_3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Traceback (most recent call last): | |
| File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/weboob-0.e-py2.7.egg/weboob/applications/qvideoob/minivideo.py", line 70, in mousePressEvent | |
| video_widget = Video(video, self) | |
| File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/weboob-0.e-py2.7.egg/weboob/applications/qvideoob/video.py", line 35, in __init__ | |
| self.ui.urlEdit.setText(video.url) | |
| AttributeError: 'Ui_Video' object has no attribute 'urlEdit' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for p in *.json; do mv $p ${p//pretty./}; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected | |
| helper_method :current_user | |
| helper_method :decorated_current_user | |
| def current_user | |
| @current_user ||= User.where(:_id => session[:user_id]).first if session[:user_id] | |
| end | |
| def decorated_current_user | |
| UserDecorator.decorate(current_user) if current_user |