- To capture the entire desktop, press Command-Shift-3. The screen shot will be automatically saved as a PNG file on your desktop.
- To copy the entire desktop, press Command-Control-Shift-3. The screen shot will be placed on your clipboard for you to paste into another program.
- To capture a portion of the desktop, press Command-Shift-4. A cross-hair cursor will appear and you can click and drag to select the area you wish to capture. When you release the mouse button, the screen shot will be automatically saved as a PNG file on your desktop. (The file is saved as PDF in Mac OS 10.3 and earlier.)
- To capture a specific application window, press Command-Shift-4, then press the Spacebar. The cursor will change to a camera, and you can move it around the screen. As you move the cursor over an application window, the window will be highlighted. The entire window does not need to be visible for you to capture it. When you have the cursor over a window you want to capture, just click the mouse button and the screen shot will be saved as a PNG file on your desktop. (The file is saved as PDF in Mac OS 10.3 and earlier.)
- Add Control to the two shortcuts above to place the screen shot on the clipboard instead of saving it to the desktop.
Guidelines to Write a Better Code, Problems Faced by me and how it got resolved, Providing Best Links to study Basics.
Friday, 22 June 2012
Screen Capture in MAC
Thursday, 14 June 2012
Difference between .nil?, .blank?, .empty? in ruby
In Ruby,
Because
nil in an object (a single instance of the class NilClass) so methods can be called on it. nil? is a standard method in Ruby that can be called on all objects and returns true for the nil object and false for anything else.empty? is a standard Ruby method on some objects like Arrays, Hashes and Strings. Its exact behaviour will depend on the specific object, but typically it returns true if the object contains no elements.blank? is not a standard Ruby method but is added to all objects by Rails and returns true for nil, false, empty, or a whitespace string.Because
empty? is not defined for all objects you would get a NoMethodError if you called empty? on nil so to avoid having to write things like if x.nil? || x.empty? Rails adds the blank? method.Wednesday, 23 May 2012
Error while rake db:migrate
" You have already activated rake 0.9.0, but your Gemfile requires rake 0.8.7 "
Solved it:
|
You'll need to tell bundle to update the rake version it's using for your app
bundle update rakeIt'll update your Gemfile.lock for you.Other solution : http://stackoverflow.com/questions/6080040/you-have-already-activated-rake-0-9-0-but-your-gemfile-requires-rake-0-8-7 |
Saturday, 17 March 2012
Installation Of Mysql in Mac OS
1. Download mysql : http://dev.mysql.com/downloads/mysql/
check your Intel-based Mac has a 32-bit or 64-bit processor
http://support.apple.com/kb/HT3696
Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive or
Mac OS X ver. 10.6 (x86, 32-bit), DMG Archive
2.Double click on dmg file.
Follow the readme.txt
3.Add this to the PAth
4. Go to Terminal
Enter >mysql
check your Intel-based Mac has a 32-bit or 64-bit processor
http://support.apple.com/kb/HT3696
Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive or
Mac OS X ver. 10.6 (x86, 32-bit), DMG Archive
2.Double click on dmg file.
Follow the readme.txt
3.Add this to the PAth
01. Launch 'Terminal'. 02. Enter ... echo 'export PATH=xyz:$PATH' >> ~/.bash_profile (and press the <return> key) ... where 'xyz' is your desired path(s). 03. Open another 'Terminal' window. 04. Enter ... env |
4. Go to Terminal
Enter >mysql
Thursday, 9 February 2012
Create New Branch, Merge with remote existing Branch and then push the new Branch to remote
A Few Steps to Create a Branch Locally and Merging with the remote existing Branch :
1. git branch -r => will display all the remote branches
2. git branch branch_name => create a new branch locally
3. git checkout branch_name => to switch to newly created branch
4.git fetch origin => fetch an entire remote
5.git merge origin/remote_branch_name => to merge the remote_branch with the newly created branch
6 git diff origin/remote_branch_name file_name =>if conflicts shows all the conflicts related to the files
7.git stash => if your changes can be ignored and will point to head
8.git merge origin/remote_branch_name
2 steps if you want to push the newly create branch in local to remote :
9. git push -u origin new_remote_branch_name
10. git remote -r => Find whether the newly created brach exist in remote.
1. git branch -r => will display all the remote branches
2. git branch branch_name => create a new branch locally
3. git checkout branch_name => to switch to newly created branch
4.git fetch origin => fetch an entire remote
5.git merge origin/remote_branch_name => to merge the remote_branch with the newly created branch
6 git diff origin/remote_branch_name file_name =>if conflicts shows all the conflicts related to the files
7.git stash => if your changes can be ignored and will point to head
8.git merge origin/remote_branch_name
2 steps if you want to push the newly create branch in local to remote :
9. git push -u origin new_remote_branch_name
10. git remote -r => Find whether the newly created brach exist in remote.
Monday, 9 January 2012
Basic functionality a git User needs to Know
Assumptions : Client has provided a git link ex:
To get your copy of app do
Note: By default, Git will create a directory that is the same name as the project in the URL you give it - basically whatever is after the last slash of the URL. If you want something different, you can just put it at the end of the command, after the URL.
To check multiple branch :
To jump to a perticular branch :
git checkout branch_name
Once done: to keep updating your copy :
To check the complete difference in the app :
for a perticular file give :
to check latest commits :
to just check modified files :
and to commit the changes to your local repo :
Finally to push the code to server :
To revert a file which is modified by you in the local mode
git://github.com/rshetty/examplegit.git
To get your copy of app do
git clone git://github.com/rshetty/examplegit.git
Note: By default, Git will create a directory that is the same name as the project in the URL you give it - basically whatever is after the last slash of the URL. If you want something different, you can just put it at the end of the command, after the URL.
To check multiple branch :
git branch -r
To jump to a perticular branch :
git checkout branch_name
Once done: to keep updating your copy :
git pull
To check the complete difference in the app :
git diff
for a perticular file give :
git diff file_name
to check latest commits :
git log
to just check modified files :
git status
and to commit the changes to your local repo :
git commit -m "message" filename
Finally to push the code to server :
git push
To revert a file which is modified by you in the local mode
git checkout filename
Subscribe to:
Comments (Atom)