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
$str = "abcd\n"; // 最後に改行があります | |
var_dump(preg_match('/cd$/', $str)); // int(1) 改行があってもマッチしてしまいます | |
var_dump(preg_match('/cd$/D', $str)); // int(0) | |
var_dump(preg_match('/cd\z/', $str)); // int(0) |
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
SELECT * FROM users WHERE id='$user_id' and password='$password' |
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
Android Studio30分集中超絶技巧100選 DroidKaigi 2018 | |
山本 ユウスケ @yusuke | |
マウス、トラックパッドを使うのはやめましょう | |
今日は以下のキーマップの話です | |
Mac OSX: Mac OSX 10.5+ | |
Windows/Linux: Default | |
他のキーマップだとQiitaやドキュメント、ブログなどを見る際に苦労します。 | |
設定画面 Cmd + , (Ctrl + Alt + S) | |
プロジェクト設定画面 Cmd + ; | |
File > Power Save Modeでバッテリー節約 |
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
<FrameLayout | |
style="@style/RippleFrameStyle" | |
android:padding="20dp"> | |
<Button | |
style="@style/ButtonStyle" | |
android:background="@drawable/icon" /> | |
</FrameLayout> |
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
/** | |
* ViewPager2のアイテムをカルーセル形式で表示するためのPageTransformer | |
* | |
* @param pageMargin ページ間のmargin | |
* @param itemOffset 隣のアイテムを見せる幅 | |
*/ | |
class CarouselPageTransformer( | |
@DimenRes val pageMargin: Int, | |
@DimenRes val itemOffset: Int, | |
) : ViewPager2.PageTransformer { |