Wednesday, March 28, 2018

How to completely uninstall Android Studio?

Execute these commands from the terminal
rm -Rf /Applications/Android\
rm -Rf ~/Library/Preferences/AndroidStudio*
rm -Rf ~/Library/Preferences/*
rm -Rf ~/Library/Preferences/*
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
rm -Rf ~/Library/Caches/AndroidStudio*
rm -Rf ~/.AndroidStudio*
if you would like to delete all projects:
rm -Rf ~/AndroidStudioProjects
to remove gradle related files (caches & wrapper)
rm -Rf ~/.gradle
use the below command to delete all Android Virtual Devices(AVDs) and *.keystore. note: this folder is used by others Android IDE as well, so if you still using other IDE you may not want to delete this folder)
rm -Rf ~/.android
to delete Android SDK tools
rm -Rf ~/Library/Android*

Wednesday, March 21, 2018

Format an External Hard Drive or USB Flash Drive for Mac OS X

How to Format an External Drive for Mac Compatibility
This is a simple procedure and is achieved the same way for all drive types and through all connections, be they USB, Firewire, or Thunderbolt. Formatting a drive will erase all data and partitions on the disk:
  1. Connect the hard drive or USB key to the Mac
  2. Launch Disk Utility, located in Applications > Utilities
  3. Locate the drive name from the left hand side of Disk Utility and click on it
  4. Click on the “Erase” tab across the top
  5. Format a USB Flash Drive for use in Mac OS X
  6. Next to “Format:” click the contextual menu and select “Mac OS Extended (Journaled)”
  7. Format to Mac Filesystem
  8. Name the drive if you want, the name can be changed at any point
  9. Click the “Erase” button and confirm again on the next pop-up window
Format a USB Drive for use on a Mac
That’s all there is to it, the drive will now format and erase everything on it.
Smaller external hard drives, SSD’s, and USB flash keys format quickly, while a larger hard drive may take a while longer. When completed, the drive will be formatted to the Mac OS X compatible HFS+ filesystem.
The videos below demonstrate the complete process of formatting an external hard drive for full Mac OS X compatibility, this uses the new Disk Utility in modern versions of OS X:
Similarly, you can perform the same type of process in OS X for making a USB flash drive compatible with Mac OS using the Disk Utility in OS X, as you can see, it’s a quick procedure that is done in short order on any Mac:
Should you intend to make an OS X installer drive or create any other bootable Mac OS X volume from a drive, or use a new drive as a fully compatible Time Machine backup drive, you will also need to complete this process.

Wednesday, March 7, 2018

R Language

R is a language and environment for statistical computing and graphics . R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, …) and graphical techniques, and is highly extensible. One of R’s strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formulae where needed. Great care has been taken over the defaults for the minor design choices in graphics, but the user retains full control .

  • an effective data handling and storage facility,
  • a suite of operators for calculations on arrays, in particular matrices,
  • a large, coherent, integrated collection of intermediate tools for data analysis,
  • graphical facilities for data analysis and display either on-screen or on hardcopy, and
  • a well-developed, simple and effective programming language which includes conditionals, loops, user-defined recursive functions and input and output facilities.
Many users think of R as a statistics system. We prefer to think of it of an environment within which statistical techniques are implemented. R can be extended (easily) via packages.
R Statistics examples are:
1) Mean,Median & Mode
2) Linear Regression
3) Multiple Regression
4) Logistic Regression
5) Normal or Binomial Distribution
6) Poisson Regression
7)Analysis of Covariance
8)Time Series Analysis
9) Decision Tree
10) Random Forest

R is an integrated suite of software facilities for data manipulation, calculation and graphical display. It includes
The term “environment” is intended to characterize it as a fully planned and coherent system, rather than an incremental accretion of very specific and inflexible tools, as is frequently the case with other data analysis software.
R, like S, is designed around a true computer language, and it allows users to add additional functionality by defining new functions. Much of the system is itself written in the R dialect of S, which makes it easy for users to follow the algorithmic choices made. For computationally-intensive tasks, C, C++ and Fortran code can be linked and called at run time. Advanced users can write C code to manipulate R objects directly.

Tuesday, March 6, 2018

Error:Unable to resolve dependency for ':@debugUnitTest/compileClasspath' ':@debugUnitTest/compileClasspath': Could not resolve project :CordovaLib.">

Error:Unable to resolve dependency for ':@debugUnitTest/compileClasspath': Could not resolve project :CordovaLib.':@debugUnitTest/compileClasspath': Could not resolve project :CordovaLib.">

I commented the lines below in the build.gradle file:
//debugCompile project(path: 'CordovaLib', configuration: 'debug') 

//releaseCompile project(path: 'CordovaLib', configuration: 'release')
and added:
compile project(':CordovaLib')
This worked for me.

Monday, March 5, 2018

Install Or Reinstall All Cordova Plugins In Package.json With Ionic

When installing the dependencies of an existing app your need to install all of the cordova plugins listed in package.json. Or you may just want to ensure they are all installed properly.
Check out the following ionic commands:
# Only install all plugins
ionic state restore --plugins
# or
cordova state restore --plugins

# Only remove all installed plugins
ionic state clear -- plugins

# Remove all then Install all plugins in package.json
ionic state reset -- plugins

Friday, March 2, 2018


On iOS devices using the Safari browser, you are able to add a shortcut to your home screen to any site online. By default, these shortcuts will display as a screenshot of the website. This article will explain how to set an icon to your website so that when it is saved onto iOS home screens this will display instead.

Creating And Uploading Your Icon

The image for the shortcut must be 150x150 pixels in size. This will allow it to used across all iOS devices - those with regular displays and retina displays too!
Additionally, in order for the icon to work correctly, it must follow the following specifications:
  • Must be saved in .png format
  • Must be titled apple-touch-icon
Once you have created your icon, you can then upload it into the files area within your Create account (not the images area).
To upload the icon:
  1. Log into your Create account
  2. Click 'Content' from the top menu
  3. Click 'Files' from the left-hand menu
  4. Click the 'Add File' button
  5. Follow the steps to upload your image

Adding The Icon To Your Site

Once you've uploaded the icon, you will need to add a small piece of code to the Custom <HEAD> of the page you would like to use the icon for - if you want to use it for any page that a shortcut is created for, you'll need to paste the code into each page individually. The code is below:
<link rel="apple-touch-icon" href="/sitefiles/12345/678/90/apple-touch-icon.png">
The informational following the href is the file path for the file you just uploaded. This must be the file unique to your site.
To get the file path for the icon that you've uploaded, simply click the 'link' icon on the 'Files' section. 
This will then displayed the URL for the icon.
Copy and paste this file path exactly as it appears into the code below.
<link rel="apple-touch-icon" href="INSERT_FILE_PATH_HERE">
To then add this code to your custom <HEAD>:
  1. Click 'Content' from the top menu
  2. Click the options icon beside the page you would like to add the icon for
  3. Click the 'Meta Info' tab
  4. Paste the code into the 'Custom <HEAD>' field
  5. Save changes and repeat as necessary
  6. You will need to publish your site for the changes to apply

Testing The Icon

It can take several hours for the icon to update once your site is published. When you're ready to test, simply follow the steps below on your iOS-enabled device (such as an iPad or iPhone):
  1. On your iOS device, open your Safari browser and go to the page on your site that you would like to make a shortcut for
  2. Click the share icon in the browser
  3. Select the option 'Add to Home Screen'                                               
  4. On the 'Add to Home' page you should be able to see the icon you uploaded on the left
If you do not see the icon you uploaded, please double-check that you have followed the steps above, including formatting the file as required.

Friday, February 16, 2018

'adb' is not recognized as an internal or external command, operable program or batch file

Android Debug Bridge (henceforth adb) is a tool that allows us to run command line actions to interact with a connected Android device. With this tool you can run adb commands from the command prompt. There are many things that you can do with this handy tool. But for now, we are just going to learn how to install ADB to the command prompt in Windows. Without this installation, you would have to browse to "sdkplatform-tools" folder manually to locate adb.exe and use it via the command prompt. If you try to run it without doing this, you will get an error message like:

'adb' is not recognized as an internal or external command, operable program or batch file.

The first thing that you should have downloaded and extracted is the Android SDK Bundle. This bundle includes almost all the necessary tools to develop Android applications. The other thing that you must have downloaded is Java SE bundle. Android requires Java Development Kit (JDK) and Java Runtime Environment (JRE), and this bundle seems to have both. Learn how to install Android System Development Kit with Java SE in detail.

Now, that everything is prepared, navigate to the folder where you extracted Android Developer Tools bundle. The folder, has a default name that goes something like adt-bundle-windows-x86_64-20131030. The name may be different if your OS version and released date is different. This is a package file that you can directly use after extraction. No installation is required. After locating this folder, navigate to sdkplatform-tools. There you will find adb.exe.

Follow these steps now:

  1. Find the entire path to adb.exe. Something like: C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools
  2. Left click on start, right click on "Computer" and then left click on "Properties".
  3. Then click on "Advanced System Settings" in the Window that opens.
  4. From the advanced tab, click on "Environment Variables".
  5. Locate a "Variable" called "Path" under "System Variables". Click on it and then hit on "Edit".
  6. There will already be a "Variable value". Append the full path to adb to it. Remember to add a semi-colon (;) to the beginning of your value.
    My Variable value is:
  7. Hit on OK and then OK again in the next screen as well to save the changes that you made.
Now you can easy run commands like C:>adt from any directory in the command prompt.

Thursday, February 15, 2018

npm install -g — ERR! Please try running this command again as root/Administrator.

npm install -g — ERR! Please try running this command again as root/Administrator.

When running npm install -g somepackage, you may get an EACCES error asking you to run the command again as root/Administrator. Here’s how to fix this on OS X.
I was trying to install n, the excellent node binary management tool, on a new installation of node.js and got the following error
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/n'
npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules/n']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR! Please try running this command again as root/Administrator.
This is a permissions issue and the fix, courtesy of Tim Schaub, is to recursively change the owner of the files in your /usr/local folder to the current user:
sudo chown -R $USER /usr/local

Tuesday, January 30, 2018

Enabling Developer Mode Options on Android Phone or Tablet

This is two step process ,

  1.  first step is to Enabling Developer Mode Options on Android Phone or Tablet
  2.  second step is to Switch On the USB Debugging of the device. Let’s see how to do both of the activities in the below tutorial.

Step 1: Enable Developer Options

1) Tap on the Main Menu icon.

2) Go to the Settings.

3) Scroll down to ‘About phone‘ and tap on it.

4) Scroll down to the bottom again, where you see ‘Build number’ (Your build number may vary). Tap On Build number Seven (7) times. After the third tap, you’ll see a playful dialog that says you’re four taps away from being a developer. Keep on tapping, and *poof*, you’ve got the developer settings options.

5) You can notice the Developer Options on your screen now.

Step 2: Switch On USB Debugging

1)  Go to the Developer Options.

2) Tick the USB Debugging check box.

3) It may display the Pop Up message, if Yes simply click OK.

3) And it’s done, you can see the USB Debugging is ON now.

Mobile Application Testing

Mobile Application Testing

Mobile Application Testing is a process by which a developed application of a mobile device is tested for its functionality, consistence & usability. It can be automated and manual. It almost goes through the normal testing process but the testing techniques may vary for mobile devices.

Importance of Mobile Application Testing

As we discussed in the last chapter that Mobile market is booming, mobile websites and Apps are exploding like anything in the market. Each and every business is trying to get the maximum benefits out of this mobile technology. With the exponential increase for mobile usage has led to mobile testing. Businesses are focusing on creating mobile strategies and roadmap before implementing the application for their users. It became essential to develop an app with effective features and functionalities which are beneficial to the customer. But it is more critical to have an effective testing plan and strategy before any app is developed. As client is usually in millions for a certain product – and a product with bugs is never appreciated. It often results in monetary losses, legal issue and irreparable brand image damage.

Challenges in Mobile Application Testing

Performing Mobile Testing is not an easy task, as it is different and much more complex from enterprise testing and website testing. Mobile applications have a smaller footprint on the virtual machine as opposed to a desktop application. Mobile Testing needs to be performed on variety of software platform, versions, hardware, network condition and what makes it more complex are the various devices, fast changing mobile OS, the frequent introduction on new devices, and unpredictability of simulators.
  • Different range of mobile devices with different screen sizes and hardware configurations like hard keypad, virtual keypad (touch screen) and trackball etc.
  • Wide varieties of mobile devices like HTC, Samsung, Apple and Nokia.
  • Different mobile operating systems like Android, Symbian, Windows, Blackberry and IOS.
  • Different versions of operation system like iOS 5.x, iOS 6.x, BB5.x, BB6.x etc.
  • Different mobile network operators like GSM and CDMA.
  • Frequent updates – (like android- 4.2, 4.3, 4.4, iOS-5.x, 6.x) – with each update a new testing cycle is recommended to make sure no application functionality is impacted.

Types of Mobile Testing

When we talk about Mobile Device Testing, it can be categorized broadly in two segments;
  1. Hardware testing/Mobile testing: This is to assure the quality of mobile devices. The device including the internal processors, internal hardware, screen sizes, resolution, space or memory, camera, radio, Bluetooth, WIFI etc. This is sometimes referred to as, simple “Mobile Testing”.
  2. Software testing/Application testing: The applications that work on mobile devices and their functionality are tested. It is called the “Mobile Application Testing” to differentiate it from the earlier method. Even in the mobile applications, there are few basic differences that are important to understand:
a) Native apps: A native application is created for use on a platform like mobile and tablets. These applications get installed on the mobile device and often delivered from the App Store.
b) Mobile web apps: Web applications as one accessed using a browser on the mobile device or server-side apps to access websites on mobile using different browsers like chrome, Firefox by connecting to a mobile network or wireless network like WIFI.
c) Hybrid apps: These are combinations of native app and web app. Hybrid embeds a browser in a native application. These also run on devices, online or offline.