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
| import com.maddyhome.idea.vim.key.KeyParser | |
| import com.maddyhome.idea.vim.key.Shortcut | |
| import com.maddyhome.idea.vim.command.Command | |
| import javax.swing.KeyStroke | |
| import java.awt.event.KeyEvent | |
| // gc, gf, gs, ga でそれぞれのGotoコマンド実行 | |
| parser.registerAction(KeyParser.MAPPING_NORMAL, "GotoClass", Command.Type.OTHER_READONLY, new Shortcut("gc")) | |
| parser.registerAction(KeyParser.MAPPING_NORMAL, "GotoFile", Command.Type.OTHER_READONLY, new Shortcut("gf")) |
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
| Host heroku.com | |
| User freemember007 | |
| Hostname 107.21.95.3 | |
| PreferredAuthentications publickey | |
| IdentityFile ~/.ssh/id_rsa | |
| port 22 |
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
| @TargetApi(Build.VERSION_CODES.LOLLIPOP) | |
| public static String getForegroundProcess(Context context) { | |
| String topPackageName = null; | |
| UsageStatsManager usage = (UsageStatsManager) context.getSystemService(Context.USAGE_STATS_SERVICE); | |
| long time = System.currentTimeMillis(); | |
| List<UsageStats> stats = usage.queryUsageStats(UsageStatsManager.INTERVAL_DAILY, time - 1000*1000, time); | |
| if (stats != null) { | |
| SortedMap<Long, UsageStats> runningTask = new TreeMap<Long,UsageStats>(); | |
| for (UsageStats usageStats : stats) { | |
| runningTask.put(usageStats.getLastTimeUsed(), usageStats); |
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 <T extends Object> List<T> asList(T... args) { | |
| List<T> list = new ArrayList<>(); | |
| for (int i = 0; i < args.length; i++) { | |
| list.add(args[i]); | |
| } | |
| return list; | |
| } |
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
| document.getElementById('undo').addEventListener('click', function () { | |
| var data = signaturePad.toData(); | |
| if (data) { | |
| data.pop(); // remove the last dot or line | |
| signaturePad.fromData(data); | |
| } | |
| }); |
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
| export interface IPointGroup { | |
| color: string; | |
| points: IBasicPoint[]; | |
| } |
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
| export interface IPointGroup { | |
| + maxWidth: number; | |
| color: string; | |
| points: IBasicPoint[]; | |
| } | |
| @@ -230,6 +231,7 @@ export default class SignaturePad { | |
| private _strokeBegin(event: MouseEvent | Touch): void { | |
| const newPointGroup = { | |
| color: this.penColor, | |
| + maxWidth: this.maxWidth, |
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
| 1. 進入一個 Activity | |
| onStart | |
| onResume | |
| 2. 進入 Multi-window 模式 | |
| onPause | |
| onStop | |
| onStart |
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
| python main.py original_string_key new_string_key |
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
| package com.linecorp.linesdk.dialog.internal; | |
| import android.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.graphics.drawable.BitmapDrawable; | |
| import android.graphics.drawable.Drawable; | |
| import android.support.annotation.Nullable; | |
| import android.support.v4.graphics.drawable.RoundedBitmapDrawable; | |
| import android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory; |
OlderNewer