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
Main{ | |
DataTypePowerSwitch.PSItem item; | |
SourcePowerSwitch a = new SourcePowerSwitch(); | |
a.addItem(item); | |
} | |
public class SourcePowerSwitch implements DataTypePowerSwitch, PSData { | |
public void addItem(DataTypePowerSwitch.PSItem item) { | |
addItem a = new addItem(); | |
a.addItem(item); |
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
val snackBar = Snackbar.make(fullscreen_content.rootView, "Test", Snackbar.LENGTH_SHORT) | |
snackBar.setAction("Dismiss", { snackBar.dismiss() }) | |
Snackbar.make(fullscreen_content.rootView, "Test", Snackbar.LENGTH_SHORT) | |
.setAction("Dismiss", { it.dismiss() }) |
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 ValidUtils { | |
// (?=.*\d) # must contains one digit from 0-9 | |
// (?=.*[a-zA-Z]) # must contains one alphabet characters | |
// (?!.*[\W_]) # must no special characters | |
// . # match anything with previous condition checking | |
// {8,} # length at least 8 characters | |
private final static String STR_PASSWORD_PATTERN = "((?=.*\\d)(?=.*[a-zA-Z])(?!.*[\\W_]).{8,})"; | |
private final static Pattern PASSWORD_PATTERN = Pattern.compile(STR_PASSWORD_PATTERN); | |
public static boolean isPasswordValid(String password) { |