Categories
Laptop OsX

How To Take A ScreenShot on Mac

You can capture a Screenshot of your entire screen or just a selected portion of it. The screenshot is automatically saved to your desktop.

How to take a screenshot of your entire screen

  1. Press Shift+Command (⌘)+3.
  2. The screenshot will be saved as a .png file on your desktop

How to take a screenshot of a selected portion of your screen

how to take screenshot in mac

  1. Press Shift+Command (⌘)+4. The pointer changes to a crosshair.
  2. Move the crosshair to where you want to start the screenshot, then click and drag to select an area.
    Note: While dragging the Crosshair, you can hold Shift, Option, or Space bar to change the way the selection moves
  3. When you have selected the area that you want, release your mouse or trackpad button. To cancel, press the Esc (Escape) key before you release the button.
  4. The screenshot will be saved as a .png file on your desktop
Categories
Android Apps Device Nexus 5

Error 70 Gapps install – Fixed

If you are encountering the following error while trying to flash Gapps with your custom rom:

Error 70: Insufficient storage space available in System partition.

Here is the simple fix for the problem:

  • Flash a smaller size version of the Gapps ROM via TWRP.  Pick either Pico/Micro versions of the ram.
  • For Nexus 5 and CM14/Lineage the Micro Version works just fine
  • After installing the smaller version you can install the remaining apps via the Play Store

 

Categories
JavaScript Open Source Solutions Web

JavaScript Date Format YYYY-MM-DD

Here is a simple function that takes the input of JS Date and returns a string of format YYYY-MM-DD:

var getDateFromDateTime = function(date) {
date = new Date(date); //Using this we can convert any date format to JS Date
var mm = date.getMonth() + 1; // getMonth() is zero-based
var dd = date.getDate();
if(mm<10){ mm="0"+mm; } if(dd<10){ dd="0"+dd; } return [date.getFullYear(), mm, dd].join('-'); // padding };

Categories
JavaScript Open Source Solutions Web

Convert JavaScript Date format YYYYMMDD

Here is a simple function that takes the input of JS Date and returns a string of format YYYYMMDD:

var getDateFromDateTime = function(date) {
date = new Date(date); //Using this we can convert any date format to JS Date
var mm = date.getMonth() + 1; // getMonth() is zero-based
var dd = date.getDate();
if(mm<10){ mm="0"+mm; } if(dd<10){ dd="0"+dd; } return [date.getFullYear(), mm, dd].join(''); // padding };

Categories
Android Apps Device Open Source Solutions

How to Disable Back Button Press in Android

You need to override the “onBackPressed” method to avoid the default action. You can leave the function empty if you dont want any action to be taken on press of the Back Button.

The Code:

@Override
public void onBackPressed() {
}

Note: this requires API Level 5 or higher.