Today I was stumped by a very simple yet awesome problem by my friend Sandip What is the answer of : 7 % -2 and to the surprise ruby irb printed it as : -1 After some research I what I found about this and why here is explanation and links From Ruby Programming Language, O,really Division, Modulo, and Negative Numbers When one (but not both) of the operands is negative, Ruby performs the integer division and modulo operations differently than languages like C, C++, and Java do (but the same as the languages Python and Tcl). Consider the quotient -7/3. The floating-point result is –2.33. The result of integer division must be an integer, however, so this number must be rounded. Ruby rounds toward negative infinity and returns –3. C and related languages round toward zero instead and return –2. (This is just one way to characterize the results; no floating-point division is actually done, of course.) An important corollary of Ruby's definition of integer
db:migrate runs (single) migrations that have not run yet. db:create creates the database db:drop deletes the database db:schema:load creates tables and columns within the (existing) database following schema.rb db:setup does db:create, db:schema:load, db:seed db:reset does db:drop, db:setup Normally, db:migrate used after having made changes to the schema via new migration files after creating db i.e when db already exists. db:schema:load is used when you setup a new instance of your app.
I upgraded my ubuntu 12:04 to 12:10 couple of days And to my surprise the pidgin integration in notification menu had disappeared. I couldn't figure out why this people f**ked up such an important integration. After some research and logic I was able to do some juggad and get my original gnome 2 notification style menu in notification bar . Here are the steps I followed I did not want Empathy or gwibber so I removed then Now follow these steps carefully. Open dconf-editor Add 'pidgin.desktop' to applications in com > canonical > indicator > messages Change value to 'all' in system-whitelist in com > canonical > unity > panel Now Logoff and Login again and you will be able to see the Pidgin in messages notification menu. Also it now shows the gnome classic style chat notification in notification tray.. Pidgin showing in notification tray. Wohhoo..!!! , and now I am connected
Comments
Post a Comment