Thursday, March 21, 2013

Hightlight words in VIM

~/.vimrc
:autocmd CursorMoved * exe printf('match IncSearch /\V\<%s\>/', escape(expand('<cword>'), '/\'))

Tuesday, February 5, 2013

Android Tab Layout

Tab Layout:

  • TabHost must be at the root node for the layout and contains TabWidget and FrameLayout
    • TabWidget is for displaying the tab
    • FrameLayout is for displaying the tab content
  • To Create a tab:
    • Create a TabHost.TabSpec object to build necessary properties for a tab
      • Tab indicator
      • tab content
      • Tab icon
    • Add the TabHost.TabSpec object to TabHost which will create the defined tab

--
Regards,
Pavan

Wednesday, January 2, 2013

Happy New Year

Wish you a Happy and Prosperous New year.


First blank page of a 365 page book. Write a good one.
-- 
Regards,
Pavan

Friday, December 14, 2012

Heroku ActiveAdmin issue | TCP/IP connections on port 5432

-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       rake aborted!
       could not connect to server: Connection refused
       Is the server running on host "127.0.0.1" and accepting
       TCP/IP connections on port 5432?


Solution :

Look at the view source of active admin page it should have 

active_admin.css
print.css
active_admin.js

Include that in production.rb

with     

config.assets.initialize_on_precompile = false

  config.assets.precompile += %w(active_admin.css active_admin.js active_admin/print.css)

And done!