- 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.
Subscribe to:
Comments (Atom)