This file contains hidden or 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
| export IMPLOG=/oradir # directory for Import log | |
| export DUMP_DATE=`date +%y%m%d` #making dumpdate | |
| echo "schemas migration : " `date` >> $IMPLOG | |
| impdp system/systempw directory=oradir content=metadata_only dumpfile=dumpfile.dmp logfile=logfile.log schemas=SCHEMA >> $IMPLOG | |
| #for all export data, User system account. | |
| #directory : What you create directory on Oracle upper step. | |
| #CONTENT=METADATA_ONY : Only import metadata (not records) | |
| #dumpfile : Dump file what you made using expdb in 'directory' | |
| #logfile : making log file |
This file contains hidden or 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.math.*; | |
| public class Multiply { | |
| public static Double multiply(Double a, Double b) { | |
| BigDecimal s1 = new BigDecimal(String.valueOf(a)); | |
| BigDecimal s2 = new BigDecimal(String.valueOf(b)); | |
| //return a * b | |
| return s1.multiply(s2).doubleValue(); | |
| } | |
| } |
This file contains hidden or 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 static String HighAndLow(String numbers) { | |
| // Code here or | |
| String[] splitStr = numbers.split(" "); // split by " " | |
| int lNum = Integer.parseInt(splitStr[0]); //lowest number init; | |
| int hNum = Integer.parseInt(splitStr[0]); // highest number init; | |
| for(int i=1; i<splitStr.length; i++){//compare | |
| if(lNum>Integer.parseInt(splitStr[i])) | |
| lNum = Integer.parseInt(splitStr[i]); | |
| if(hNum<Integer.parseInt(splitStr[i])) | |
| hNum = Integer.parseInt(splitStr[i]); |
This file contains hidden or 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.Arrays; | |
| import java.util.List; | |
| import java.util.Collections; | |
| import java.utils.Arrays; | |
| public class FindOdd { | |
| public static int findIt(int[] a) { | |
| int odd = 0; | |
| List<Integer> list = Arrays.asList(ArrayUtils.toObject(a)); | |
| for(int i : a){ | |
| if(Collections.frequency(list, i)%2>0){ |
This file contains hidden or 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.ArrayList; | |
| import java.util.Collections; | |
| public class Line { | |
| static int ticketPrice= 25; | |
| public static String Tickets(int[] peopleInLine) | |
| { | |
| int checkPrice = 0; | |
| int changeIndex = -1; |
This file contains hidden or 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 Kata { | |
| public static String high(String s) { | |
| String bitWords = ""; | |
| int bitWordsPoint = 0; | |
| String[] words = s.split(" "); | |
| int tempPoint = 0; | |
| for(String word : words) { | |
| tempPoint = getWordsPoint(word.toLowerCase()); |
This file contains hidden or 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.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.stream.Collectors; | |
| import java.util.stream.Stream; | |
| public class DirReduction { | |
| public static String[] dirReduc(String[] arr) { | |
| // Your code here. | |
| //for simpler result |
This file contains hidden or 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.Arrays; | |
| import java.util.List; | |
| public class Solution { | |
| // Comparing value at same index between List "a" and List "b" | |
| static List<Integer> compareTriplets(List<Integer> a, List<Integer> b) { | |
| //First. Using if condition | |
| //if List "a"' value is bigger than List "b" | |
| //, adding 1 point at List "resultList" 's index 0 value. |
This file contains hidden or 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
| // Complete the plusMinus function below. | |
| static void plusMinus(int[] arr) { | |
| int result = 0; | |
| for(int i=0; i<arr.length; i++){ | |
| result += ( (arr[i]>0) ? (arr.length+1) : ( (arr[i]<0) ? (1) : 0 ) ); | |
| } | |
| //plus number | |
| System.out.println(String.format( "%.6f",(result/(arr.length+1))/(double)(arr.length))); | |
| //minus number | |
| System.out.println( String.format( "%.6f",(result%(arr.length+1))/(double)(arr.length))); |
This file contains hidden or 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 Solution { | |
| static void next_move(int posr, int posc, String[] board){ | |
| //add logic here | |
| int targetX = 0, targetY = 0, tempX = 0, gap = 10, fromIndex = 0; | |
| for(int i=0; i<board.length; i++) { | |
| if(board[i].indexOf('d',fromIndex)>-1) { | |
| tempX = board[i].indexOf('d',fromIndex); | |
| if(Math.abs(posc-tempX)+Math.abs(posr-i)<gap ) { | |
| gap = Math.abs(posc-tempX)+Math.abs(posr-i); |