Tuesday 30 August 2016

Diffrent ways to take Screenshots in Linux

You can take a screenshot in any of the following ways:
  • From any panel
    You can add a Take Screenshot button to any panel. To add an object to a panel, perform the following steps:
    1. Right-click on a vacant space on a panel to open the panel popup menu.
    2. Choose Add to Panel.
      The Add to Panel dialog opens.The available panel objects are listed alphabetically, with launchers at the top.
      You can type a part of the name or description of an object in the findbox. This will narrow the list to those objects that match what you type.
      To restore the full list, delete the text in the find box.
    3. Either drag an object from the list to a panel, or select an object from the list and click Add to add it at the spot on the panel where you first right-clicked.
     Click on the Take Screenshot button to take a screenshot of the entire screen.
  • Use shortcut keys
    To take a screenshot, use the following shortcut keys:
    Default Shortcut Keys
    Function
    Print Screen
    Takes a screenshot of the entire screen.
    Alt+Print Screen
    Takes a screenshot of the window which is active.
  • From the Menubar
    Choose Applications ▸ Accessories ▸ Take Screenshot.
  • From the Terminal
    You can use the mate-screenshot command to take a screenshot. The mate-screenshot command takes a screenshot of the entire screen, and displays theSave Screenshot dialog. Use the Save Screenshot dialog to save the screenshot.
    You can also use options on the mate-screenshot command as follows:
    Option
    Function
    --window
    Takes a screenshot of the window that has focus.
    --delay=seconds
    Takes a screenshot after the specified number of seconds, and displays the Save Screenshot dialog. Use the Save Screenshot dialog to save the screenshot.
    --include-border
    Takes a screenshot including the border of the window.
    --remove-border
    Takes a screenshot without the border of the window.
    --border-effect=shadow
    Takes a screenshot and adds a shadow bevel effect around it.
    --border-effect=border
    Takes a screenshot and adds a border effect around it.
    --interactive
    Opens a window that lets you set options before taking the screenshot.
    --help
    Displays the options for the command.

When you take a screenshot, the Save Screenshot dialog opens. To save the screenshot as an image file, enter the filename for the screenshot, choose a location from the drop-down list and click the Save button. You can also use the  Copy to Clipboard button to copy the image to the clipboard or transfer it to another application by drag-and-drop.

Taking Screenshot of a portion of Screen

Some times we may need to take screenshot of portion of screens instead of full screen or full window. So for this purpose there are some options also available in linux like you can use Shift+PrintScreen to take screen shot of region. If it doesn't work for you ,you can also use following methods

Method 1:
  • Goto Applications>>Accessories>>Take Screenshot
    alt text
  • Now you can select the portion of a screen.
Method 2:
  • If you use shutter Applications>>Accessories>>Shutter
  • Open it and click selection in the top of the screen.
    alt text
  • Now you can select the portion of the screen.
Method 3:
  • Take a screenshot of a whole desktop by hitting printscreen.
  • Open the screenshot using GIMP.
  • Press SHIFT+C to crop the portion.


Monday 29 August 2016

How To Create Symlinks(Soft Link or Symbolic link) On Linux/Windows


Symbolic link (also symlink or soft link) is the nickname for any file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution.

Soft links are basically a pointer to file path  Symlink(Soft link) is actually point to another path (a file name). it resolves the name of the file each time you access it through the symlink. If you move the file, the symlink will not follow and give you an error like file not exist. If you replace the file with another one, keeping the name, the symlink will point to the new file. Symlinks can span filesystems. With symlinks you have very clear distinction between the actual file and symlink, which stores no info beside the path about the file it points to.

In linux OS you can create a symlink

~ $ ln -s <target folder/file path> <symlink file path>

Here -s is to tell, we want to create a symbolic link

Example.

~ $ ln -s /home/satishk/KSPdf /home/satishk/blogFolder/KSPdf

Name of target folder and the symlink folder could be diffrent

~ $ ln -s /home/satishk/KSPdf /home/satishk/blogFolder/newNameOfKSPdf

After creation of symlink you can verify the link by following command or by clicking the symlink folder

 $ readlink KSPdf

result : /home/satishk/KSPdf

To read more about Soft Link or Hard Link you can use following command on your terminal

$ man ln

or can also click here to know more about the ln command


Symlink on windows

The way of symlink creation is on windows is little different from linux. To create a symlink on windows base machine you can you the following command.

Mklink /d <target folder> <symlink file path>

Here /d is to tell, we want to create a symbolic link

mklink /D \MyDocs \Users\User1\Documents

for more info on windows you can click
here

Friday 26 August 2016

Update dependant table using inner join in mysql

Update columns value of a table using value from a column from other table is very simple and straightforward in mysql. try this..


update table_A as a
inner join table_B as b on (a.tbl_a_id=b.tbl_a_id) 
set a.columnWhoseValueToBeUpdated=b.columnFromWhereValueToBeUpdated;




Configer Sublime Text Editor to compile and run java program

Sublime Text is an editor which has the balance between simplicity and power. Many programmers are using Sublime for their daily program...