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
Assume that the android sdk path in your windows system is C:\Users\%USERNAME%\AppData\Local\Android\Sdk | |
1. fix monkeyrunner not found | |
add below directory to your system path | |
C:\Users\%USERNAME%\AppData\Local\Android\Sdk\tools\bin | |
2. fix SWT folder not found |
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
name: build-react-native-android-app | |
on: | |
push: | |
tags: | |
- 'v*rel*' | |
jobs: | |
build: | |
runs-on: ubuntu-16.04 |
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
// in your onCreate of MainActivity.java | |
final TextView txtMsgView = findViewById(R.id.textView); | |
txtMsgView.setMovementMethod(new ScrollingMovementMethod()); // Let users use the mouse or touchpad to move the scroll | |
txtMsgView.addTextChangedListener(new TextWatcher() { | |
@Override | |
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |
} | |
@Override | |
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |
} |
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
#!/usr/bin/python | |
# -*- encoding: utf-8 -*- | |
import socket | |
import struct | |
import sys | |
import signal | |
import time | |
recv_addr = ("224.1.1.1", 12345) |
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
#!/usr/bin/python | |
# -*- encoding: utf-8 -*- | |
# ref:https://stackoverflow.com/questions/33046733 | |
import requests | |
import socket | |
import ssl | |
try: | |
from http.client import HTTPConnection |
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 testGet = { | |
parameters:{}, | |
contextPath:"", | |
contentLength:-1, | |
queryString:"", | |
parameter:{} | |
}; | |
function doGet(req) { | |
Logger.log('get'); |
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
console.log('Arg list below:'); | |
process.argv.forEach((val, index) => { | |
console.log(`${index}: ${val}`); | |
}); | |
function isEmpty(obj) { | |
return !Object.keys(obj).length; | |
} | |
var args = process.argv.slice(2); |
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 android.content.Context; | |
import android.content.ContentResolver; | |
import android.provider.Settings; | |
import android.content.res.Resources; | |
private void readSomething() { | |
try { | |
Context mContext = getApplicationContext(); | |
ContentResolver mContextRes = mContext.getContentResolver(); |
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
cls | |
@echo off | |
set in_file=%1 | |
echo in_file=%in_file% | |
set out_file=%~dpn1.mp4 | |
echo out_file=%out_file% | |
ffmpeg.exe -f concat -safe 0 -i %in_file% -c copy "%out_file%" | |
rem pause |
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
cls | |
@echo off | |
set in_file=%1 | |
echo in_file=%in_file% | |
set out_file=%~dpn1_rotated%~x1 | |
echo out_file=%out_file% | |
ffmpeg.exe -i %in_file% -metadata:s:v rotate="90" -sn -an -vcodec copy "%out_file%" | |
rem pause |