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 void main(String[] args){ | |
| for(int x=1;x<=100;x++){ | |
| if(x%3==0){ | |
| System.out.print("Fizz"); | |
| if(x%5==0){ | |
| System.out.print("Buzz"); | |
| } |
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 PasswordValidator { | |
| public static boolean validate(String password) { | |
| if (password.matches("((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{8,20})")) | |
| return true; | |
| return false; | |
| } | |
| public static boolean symbol(String password) { | |
| if (password.matches(".*[@#$%].*")) |
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
| #laravel | |
| alias pa="php artisan" | |
| #git | |
| alias gi="git init" | |
| alias gs="git status" | |
| alias ga="git add" | |
| alias gc="git commit -m" | |
| alias gac="git add .;git commit -m" | |
| alias gp="git push" |
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
| var ic = '090303086521'; | |
| if(ic.match(/^(\d{2})(\d{2})(\d{2})-?\d{2}-?\d{4}$/)) { | |
| var year = RegExp.$1; | |
| var month = RegExp.$2; | |
| var day = RegExp.$3; | |
| console.log(year, month, day); | |
| var now = new Date().getFullYear().toString(); |
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 function boot() | |
| { | |
| ... | |
| ... | |
| $this->app->bind('path.tenant', function () use ($tenant) { | |
| return "tenant_{$tenant->id}"; | |
| }); | |
| ... | |
| } |
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
| <?php | |
| if (! function_exists('store_file')) { | |
| /** | |
| * @param $file | |
| * @param string $disk | |
| * @param bool $add_time | |
| * @param bool $replace_space | |
| * @param null $prefix |
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
| dependencies { | |
| compile ('pl.charmas.android:android-reactive-location2:2.0@aar') { | |
| ['com.android.support', 'com.google.android.gms', 'io.reactivex.rxjava2'].each{ | |
| exclude group: it | |
| } | |
| } | |
| } |
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 interface ItemClickCallback<Item> { | |
| public void onItemClick(Item item); | |
| } |
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
| Fragment fragment = new TaskFormFragment(); | |
| fragment.setTargetFragment(this, 1000); | |
| getFragmentManager() | |
| .beginTransaction() | |
| .replace(R.id.frame_map, fragment, "form") | |
| .addToBackStack("form") | |
| .commit(); | |