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
// This code is for Java 7 | |
import java.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
import java.security.*; | |
public class Solution { | |
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
function createFolders(inputFolderNames) { | |
let folderMap = {} | |
let createdFolderNames = [] | |
inputFolderNames.forEach(pFolderName => { | |
if(folderMap[pFolderName] !== undefined){ | |
let folderTime = folderMap[pFolderName] + 1; | |
let toBeAddedFolderName = pFolderName + "(" + folderTime + ")" | |
while(folderMap[toBeAddedFolderName] !== undefined){ | |
folderTime++ | |
toBeAddedFolderName = pFolderName + "(" + folderTime + ")" |
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
1. Open terminal then type: touch ~/.bash_profile | |
2. Open the ~/.bash_profile by Finder or using vi command and put below contents: | |
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home | |
export ANDROID_HOME=~/Library/Android/sdk | |
export ANDROID_SDK_ROOT=~/Library/Android/sdk | |
export ANDROID_SDK_HOME=~/Library/Android/sdk | |
export PATH=$PATH:$JAVA_HOME/bin | |
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/tools/bin | |
export PATH=$PATH:$ANDROID_HOME/platform-tools |
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
## Download | |
* https://www.selenium.dev/downloads/ | Previous Version | Server standalone 3.141.59 | |
* Custom Matcher | https://github.com/TuHuynhVan/custom-matcher-selenium-grid-with-appium/tree/master/3.149.build | |
## Hub config | hubConfig.json | |
``` | |
{ | |
"host": "192.168.1.202", | |
"port": 4444, | |
"newSessionWaitTimeout": 60, |
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
package test; | |
import driver.DriverFactoryEx; | |
import io.appium.java_client.AppiumDriver; | |
import io.appium.java_client.MobileElement; | |
import io.qameta.allure.Allure; | |
import org.apache.commons.io.FileUtils; | |
import org.openqa.selenium.OutputType; | |
import org.openqa.selenium.TakesScreenshot; | |
import org.testng.ITestResult; |
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
package exercises.constructor; | |
import java.util.Arrays; | |
import java.util.List; | |
public class Vehicle { | |
private final double BYCICLE_PRICE = 1; | |
private final double ELECTRIC_BYCICLE_PRICE = 3; | |
private final double MOTOR_BYCICLE_PRICE = 5; |
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
package exercises.constructor; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Scanner; | |
public class BaigiuXe { | |
/* | |
* Bac bao ve: |
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
package arraylist.practice; | |
public class MyArrayList { | |
static final int INITIAL_ARRAY_LENGHT = 10; | |
private Integer[] container; | |
private int nodeIndexToStoreData; | |
public static void main(String[] args) { | |
MyArrayList arrList = new MyArrayList(); |
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
package practice; | |
/** | |
* Fibonacci: 0, 1, 1, 2, 3, 5, 8, 13... | |
* n: 1, 2, 3, 4, 5, 6 Input an number n. | |
* Output the Fibonacci number with that position | |
*/ | |
public class FibonacciFinder { | |
public static void main(String[] args) { |
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
package practice; | |
public class SumArray { | |
public static void main(String[] args) { | |
int[] arr_1 = { 1, 2, 3, 4 }; | |
System.out.println(sumArray(arr_1)); | |
} | |
public static int sumArray(int[] a) { |
NewerOlder