This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.io.InputStream; | |
public class ExecuteDOSCommand { | |
public static void main(String[] args) { | |
final String dosCommand = "ipconfig"; | |
try { | |
final Process process = Runtime.getRuntime().exec(dosCommand ); | |
final InputStream in = process.getInputStream(); | |
int ch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class ArrayListMatrix { | |
public static void main(String args[]){ | |
List<ArrayList<Integer>> a = new ArrayList<>(); | |
ArrayList<Integer> a1 = new ArrayList<Integer>(); | |
ArrayList<Integer> a2 = new ArrayList<Integer>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package interviewbitProgramming; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Scanner; | |
/** | |
* Created by Akshay Pethani on 2016-12-06. | |
* | |
* Detailed Problem can be found on following link: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
color 02 | |
echo. | |
echo ========================== | |
echo Folder Shortcut Healer | |
echo ========================== | |
echo. | |
echo. | |
echo CREATED BY AKSHAY PETHANI | |
echo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package interviewbitProgramming; | |
import java.util.ArrayList; | |
import java.util.Scanner; | |
public class MinStepsInInfiniteGrid { | |
public static void main(String args[]){ | |
System.out.println("Enter the No of Points: "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class FindDuplicateInArray { | |
public static void main(String args[]){ | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Enter the No of elements: "); | |
int size =sc.nextInt(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Properties; | |
import javax.mail.*; | |
import javax.mail.internet.*; | |
class Mailer{ | |
public static void send(String from,String password,String to,String sub,String msg){ | |
//Get properties object | |
Properties props = new Properties(); | |
props.put("mail.smtp.host", "smtp.gmail.com"); | |
props.put("mail.smtp.socketFactory.port", "465"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConsoleOutputColorChangeDemo { | |
public static final String RESET = "\u001B[0m"; | |
public static final String BLACK = "\u001B[30m"; | |
public static final String RED = "\u001B[31m"; | |
public static final String GREEN = "\u001B[32m"; | |
public static final String YELLOW = "\u001B[33m"; | |
public static final String BLUE = "\u001B[34m"; | |
public static final String PURPLE = "\u001B[35m"; | |
public static final String CYAN = "\u001B[36m"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class VigenereCipher { | |
public static void main(String args[]){ | |
Scanner sc = new Scanner(System.in); | |
String plainText; | |
int i,j,p; | |
String key; |
OlderNewer