Saturday, June 16, 2018

Devops -- git

cd git-2.7.2 1 id2 suod yum groupinstall "development tools"3 sudo yum groupinstall "development tools"4 wget https://github.com/git/git/archive/v2.7.2.tar.gz -O git.tar.gz5 yum install wget6 sudo yum install wget7 wget https://github.com/git/git/archive/v2.7.2.tar.gz -O git.tar.gz8 tar -zxf git.tar.gz9 make configure10 ls -l11 cd git.tar.tz12 ls13 cd git-2.7.2/14 ls15 make configure16 ./configure -prefix=/home/Users17 sudo make install18 pwd19 ./configure -prefix=/home/ashokkafle9620 sudo make install21 sudo apt-get install zlib1g-dev22 sudo yum install zlib1g-dev23 cd..24 sudo yum install zlib1g-dev25 cd ..26 sudo yum install zlib1g-dev27 cd git-2.7.228 make configure29 pwd30 ./configure -prefix=/home/ashokkafle9631 sudo make install32 ls33 sudo make install34 cd ..35 sudo yum install zlib1g-dev36 sudo yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel37 ls38 cd git39 ls40 ls -ltr configure*41 sudo make install42 git version43 git config --global user.name "ashokkafle96"44 gitconfig --global user.name "ashok.kafle@bison.howard.edu"45 git config --global user.name "ashok.kafle@bison.howard.edu"46 git config --list47 hostname48 ssh-keygen -t rsa -b 4096 -C "ashok.kafle@bison.howard.edu"49 pwd50 cd /home/ashokkafle96/.ssh51 ls -ltr

Monday, June 12, 2017

Java Practice

class FreshJuice {
   enum FreshJuiceSize{ SMALL, MEDIUM, LARGE }
   FreshJuiceSize size;
}

public class FreshJuiceTest {

   public static void main(String args[]) {
      FreshJuice juice = new FreshJuice();
      juice.size = FreshJuice.FreshJuiceSize.MEDIUM ;
      System.out.println("Size: " + juice.size);
   }
}


/*class FreshJuice {
    enum FreshJuiceSize{SMALL, MEDIUM, LARGE }
    FreshJuiceSize size;
}

public class FreshJuiceTest{
 
    public static void main(String args[]){
        FreshJuice juice = new FreshJuice();
        juice.size = FreshJuice.FreshJuiceSize.MEDIUM;
        System.out.println("Size: " + juice.size);
    }
}
*/
   

Friday, January 27, 2017

Leetcode python reverse digits of an integer( Has to be corrected though) assignments programming team

def revintegers(int num): #-321
 
    while num !=0 {
        if num > 0{
            mod = num % 10;  #-1
            num = num / 10; #
            revorder = revorder * 10 + mod;
            }
        elif num < 0 {
            num = -1 * num;
            mod = num % 10;
            num = num / 10;
            revorder = (revorder * 10 + mod) * -1;
            }
    return revorder;
        }
 
revintegers(321)

Tuesday, January 24, 2017

Java control flow

public class Conditionals {
public static void main(String[] args) {


if (1 < 4 && 0 > 5) {

System.out.println("You ordered a cup of hot, mint tea.");

} else if (21 <= 19 || 17 >= 28) {

System.out.println("You ordered freshly squeezed orange juice!");

} else if ( !(true == true) ) {

System.out.println("You ordered hot cocoa!");

} else {

System.out.println("You ordered a cup of Java!");

}

char answerChoice = 'C';

switch (answerChoice) {

case 'A': System.out.println("You answered: " + answerChoice + ". Please try again.");
break;

case 'B': System.out.println("You answered: " + answerChoice + ". Please try again.");
break;

case 'C': System.out.println("You answered: " + answerChoice + ". That is correct!");
break;

case 'D': System.out.println("You answered: " + answerChoice + ". Please try again.");
break;

default:
System.out.println("Please select a valid answer choice.");

}


}
}

JAVA (general) my first programming

String data type:

public class YourName {
public static void main(String[] args) {

System.out.println("Ashok");

}
}



Integer Data type:

public class DataTypes {
public static void main(String[] args) {

System.out.println(2);

}
}

Boolean data type:

public class DataTypesB {
public static void main(String[] args) {

System.out.println(true);

}
}

Make Bootbale USB

How to make Bootable USB from any windows CD or Copy an Existing Bootbale USB Without Downloading Software.

1. Open a cmd.exe command prompt as an an administrator. (Right click and run as administrator) 2. type in "diskpart" 3. type in "list disk" 4. type in "select disk _" where _ is the number corresponding to your usb disk 5. type in "clean" 6. type in "create partition primary" 7. type in select partition 1 8. type in "active" 9. type in "format fs=ntfs" 10. type in "assign" 11. type in exit to close the window 12. Change to the windows CD drive letter or existing windows bootable usb drive letter. "d:" 13. At the root of your drive letter, you need to change directories to the boot folder. "cd boot" 14. type in "bootsect.exe/nt60 f:" Where f: is the drive letter corresponding to the drive that you WANT to be putting the windows installation CD ON. 15. After everything has been done, just highlight all of the files/folders at the root of the CD or existing bootable usb, and copy them over to the new drive. It is now a bootable windows USB!

Monday, November 7, 2016

python class day1

class Employee:

def __init__(self,first,last,pay):
self.first = first
self.last = last
self.pay = pay
self.email = first + '.' + last + "@company.com"

def fullname(self):
return('{} {}'.format(self.first, self.last))
emp_1 = Employee('Corey', 'Schafer' , 50000)
emp_2 = Employee('Test', 'User', 60000)


'''print(emp_1)
print(emp_2)

emp_1.first = "corey"
emp_1.email = "Test.User@gmail.com"

emp_2.first = "anderson"
emp_2.email = "nderson@gmail.com"'''

print(emp_1.email)
print(emp_2.email)
#print(emp_1.fullname())
print(Employee.fullname(emp_1))


output:
Corey.Schafer@company.com
Test.User@company.com
Corey Schafer
=> None