Saturday, November 24, 2018

Monday, November 5, 2018

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded

ERROR:

"The VirtualBox Linux kernel driver (vboxdrv) is either not loaded 
or there is a permission problem with /dev/vboxdrv. 
Please reinstall the kernel module by executing"



sudo modprobe vboxdrv

if  does not worked then

sudo apt update
sudo apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms

reboot and run

sudo modprobe vboxdrv































SRC: https://askubuntu.com/questions/920689/how-to-fix-modprobe-vboxdrv-error-in-virtualbox

Wednesday, December 6, 2017

Ubuntu Stuck on Blue Screen Error

ISSUE: Ubuntu Stuck on Blue Screen While Booting




Solution:
  1. Press ctrl + alt + F1
  2. run command "sudo apt-get upgrade"
  3. sudo dpkg --configure -a

Saturday, December 2, 2017

IO Error: The network adapter could not establish the connection

I'm not sure if the following steps will help you or not to solve the "IO Error: The network adapter could not establish the connection" issue just give a try it works in my case.

The error  was:


(In NetBeans and in Sqldeveloper)

Steps:



Step 1: Open CMD
Step 2: Type services.msc and hit enter




Step 3: Search for Oracle Services and make sure that the following three are running:
                                             OracleXETNSListener
                                             OracleXEClrAgent
                                             OracleServiceXE







Step 4: If not then just right click and hit start

That's all :).

Hope This will help you :p.


Thursday, November 2, 2017

Visual Studio 2017 Offline Installation

1) You will never get an ".iso" file officially from Microsoft for Visual Studio 2017 (Any edition).
2) Thus you remains with 2 options:
  1. Grab a web installer as Microsoft suggest and install whatever the components you need and double click on it.
  2. Follow the following steps to create an offline installer setup so that whenever you format you don't have to download it again or you can install it to another pc without an internet connection.
I downloaded Visual studio 2017 Community edition from here but this procedure will work  for other editions too. It took me near about 13 hours and download size was ( 30.5 GB )
<<Download link for VS Community 2017 edition >> Link working as of 03-11-2017.

Steps to create offline installer of VS2017:
  • Download visual studio setup exe file from the above link.
  • Open Command Prompt
  • Move to your downloaded directory where the exe file is
  • And use the following command
                  vs_community_something.something.exe     
                             This is name of your downloaded file
                             In my case it is -> vs_community__1972895516.1509628450.exe
                             It differs per download so don't worry about matching the exact digits :p
                
                --layout dir_path    
                     where dir_path is a location where your offline installer will present.  By default, all                             languages will be downloaded. For me I only want english US for that

                --lang en-US
                     you can use any language.
                     
 ISO CODE
LANGUAGE
cs-CZ
Czech
de-DE
German
en-US
English
es-ES
Spanish
fr-FR
French
it-IT
Italian
ja-JP
Japanese
ko-KR
Korean
pl-PL
Polish
pt-BR
Portuguese - Brazil
ru-RU
Russian
tr-TR
Turkish
zh-CN
Chinese - Simplified
zh-TW
Chinese - Traditional
      


Full command format:

vs_community setup.exe --layout "dir_path" --lang ISO-CODE        

In my case it is:
vs_community__1972895516.1509628450.exe  --layout "D:\VS\" --lang en-US

once you type the command and hit enter it will open Visual Studio command prompt and starts downloading.
Once the Downloading is done it will show you the following message in command prompt

Setup completed successfully.
Press any key to continue...

REMEMBER IT DOESN'T HAVE ANY PAUSE or RESUME OPTION SO YOU HAVE TO DOWNLOAD IT  COMPLETELY.

ALL THE BEST AND TELL ME TIME TAKEN AND SPEED YOU GET AND TOTAL DOWNLOAD SIZE :)


Tuesday, September 19, 2017

Code::blocks ppa


To install Code::Blocks from this PPA, open a terminal and type:

sudo add-apt-repository ppa:damien-moore/codeblocks-stable
sudo apt-get update
sudo apt-get install codeblocks codeblocks-contrib

Wednesday, August 2, 2017

RMI basic arithmetic

RMI Program for arithmetic operations:
_________________________________________________________________________________

Interaface

package RMIDemo;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 *
 * @author yogesh
 */
public interface one extends Remote{
    public int add(int num1,int num2)throws RemoteException;
    public int sub(int num1,int num2)throws RemoteException;
    public int mul(int num1,int num2)throws RemoteException;
    public int div(int num1,int num2)throws RemoteException;

}
_________________________________________________________________________________

Implementation Class

package RMIDemo;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

/**
 *
 * @author yogesh
 */
public class two extends UnicastRemoteObject implements one{
    public two()throws RemoteException{}

    @Override
    public int add(int num1, int num2) throws RemoteException {
        System.out.println("Addition Performed");
        return ((num1+num2));
    }

    @Override
    public int sub(int num1, int num2) throws RemoteException {
        System.out.println("Subtraction Performed");
        return ((num1-num2));
    }

    @Override
    public int mul(int num1, int num2) throws RemoteException {
        System.out.println("Multiplication Performed");
        return ((num1*num2));
    }

    @Override
    public int div(int num1, int num2) throws RemoteException {
        System.out.println("Division Performed");
        return ((num1/num2));
    }
    
}
_________________________________________________________________________________

Server Class

package RMIDemo;

import java.io.IOException;
import java.net.MalformedURLException;
import java.rmi.AlreadyBoundException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.Registry;

/**
 *
 * @author yogesh
 */
public class rmiserver {
    public static void main(String[] args) throws RemoteException, AlreadyBoundException, MalformedURLException, IOException {
        Registry r = java.rmi.registry.LocateRegistry.createRegistry(1099);//1099 is the port number
        Runtime.getRuntime().exec("cmd /c C:\\Program Files\\Java\\jdk1.8.0_144\\bin\\rmic C:\\Users\\Yogesh\\Documents\\NetBeansProjects\\DSLabs\\build\\classes\\RMIDemo.two");

        two twox=new two();
        Naming.bind("add", twox);
        Naming.bind("sub", twox);
        Naming.bind("mul", twox);
        Naming.bind("div", twox);
        System.out.println("ALL OBJECTS CREATED");
        System.out.print("\nListing");
        String s[]=Naming.list("two");
        for(String str:s){
            System.out.println(""+str);
        }
    }
}

_________________________________________________________________________________

Client Class

package RMIDemo;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.util.Scanner;

/**
 *
 * @author yogesh
 */
public class rmiclient {
    public static void main(String[] args) throws NotBoundException, MalformedURLException, RemoteException {
        Scanner sc=new Scanner(System.in);
        System.out.print("\nEnter two Numbers:");
        int num1=sc.nextInt();
        int num2=sc.nextInt();
        one onex=(one)Naming.lookup("rmi://localhost/add");
        one oney=(one)Naming.lookup("rmi://localhost/add");
        one onez=(one)Naming.lookup("rmi://localhost/add");
        one onew=(one)Naming.lookup("rmi://localhost/add");
        System.out.println("Addition="+onex.add(num1,num2));
        System.out.println("Subtraction="+oney.sub(num1,num2));
        System.out.println("Multiplication="+onez.mul(num1,num2));
        System.out.println("Division="+onew.div(num1,num2));
        
    }
}
_________________________________________________________________________________

EXECUTING DEMO IN NETBEANS