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
# This is an example file to display laravel project directly through Ansible | |
# assuming that you have a folder /var/www/my_website with "shared" and "releases" subfolders, | |
# "shared" subfolder has "bootstrap/cache" and "storage/cache", "storage/sessions", "storage/views" subfolders as well as "logs" | |
# | |
# - also assuming that your ssh user has access to github (his keys are added to github) | |
# - also assuming you have installed composer and git on your deployment server: | |
--- | |
- hosts: all | |
tasks: |
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 RegexMatchDP { | |
public static void test() { | |
RegexMatchDP sut = new RegexMatchDP(); | |
String[][] samples = new String[][]{ | |
{"abcdefg", "a*b*c*de.*"}, | |
{"abcdefg", ".*"}, | |
{"abcdefg", "ad.*"}, // no match | |
{"abcdf", "a*b*c*de.*"}, // no match | |
{"airbnb", "a*.*b*"}, | |
}; |
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 TrieDictionaryWildCard | |
public static class TrieNode { | |
public boolean end = false; | |
public final Map<Character, TrieNode> children = new HashMap<>(); | |
} | |
public static class TrieFinder { | |
private final char wildcard; |