Skip to content

Instantly share code, notes, and snippets.

View ymow's full-sized avatar
:octocat:
OoOoOoOctoCat

Ymow Wu ymow

:octocat:
OoOoOoOctoCat
View GitHub Profile
@qrtt1
qrtt1 / 00-ITHOME 2021 鐵人賽-觀戰區.md
Last active March 17, 2023 02:05
ITHome 第 13 屆鐵人賽 (updated UTC 2021-11-07 10:14:45.317902)
<?xml version="1.0" encoding="utf-8"?>
<config>
<feature name="com.google.android.feature.PIXEL_2019_EXPERIENCE" />
</config>
@Ten-Wang
Ten-Wang / TestPractice.java
Last active January 17, 2019 06:20
測試密碼。(密碼條件 至少應包含數字、大小寫英文一個,排除特殊字元、至少需8個以上的字元)
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) {
@kangchihlun
kangchihlun / TaiwanConsensusBuilder.sol
Created January 6, 2019 06:31
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.2+commit.1df8f40c.js&optimize=false&gist=
pragma solidity ^0.5.2;
contract TaiwanConsensusBuilder {
address public contractOwner;
//==================================
// Modifiers (Safety Checks)
//==================================
modifier ownerOnly {
@Palatis
Palatis / .gitignore
Created June 19, 2017 09:44
archive output APK (AS 3.0 rc4)
/archive
@iansrc0811
iansrc0811 / books_crawler.rb
Last active June 25, 2019 07:53
爬博客來書名的爬蟲
require 'rubygems'
require 'nokogiri'
require 'mechanize'
require 'open-uri'
class Books_Crawler
def get_book_names(book_name)
book_item = self.start_crawler(book_name)
book_names = []
public class MusicFragment extends Fragment implements Handler.Callback {
/**
* New Instance
*/
public static MusicFragment newInstance() {
fragment = new MusicFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
@koocbor
koocbor / CreateDialog.java
Last active June 20, 2022 15:50
Full Screen Dialog in Android
FullScreenDialog dialog = new FullScreenDialog();
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
dialog.show(ft, FullScreenDialog.TAG);