PythonでWebServerを動かす方法
python -m http.server --bind 192.168.11.111
python -m http.server --bind 192.168.11.111 --directory C:\FFmpeg
python -m http.server 80 --bind 192.168.11.111 --directory C:\FFmpeg
downloads
https://www.python.org/downloads/release/python-380/
2019年11月23日土曜日
2019年11月7日木曜日
chrome コマンドの一覧を表示する方法
about:about
一覧画面はアドレスバーに
about:about
と入力すると確認できます。
パソコンに接続されている従来のプリンタを Google クラウド プリントに追加できます。
chrome://devices/
一覧画面はアドレスバーに
about:about
と入力すると確認できます。
パソコンに接続されている従来のプリンタを Google クラウド プリントに追加できます。
chrome://devices/
2019年10月20日日曜日
在前台运行服务
在前台运行服务
https://developer.android.com/guide/components/services#Foreground
Intent notificationIntent = new Intent(this, ExampleActivity.class);
PendingIntent pendingIntent =
PendingIntent.getActivity(this, 0, notificationIntent, 0);
Notification notification =
new Notification.Builder(this, CHANNEL_DEFAULT_IMPORTANCE)
.setContentTitle(getText(R.string.notification_title))
.setContentText(getText(R.string.notification_message))
.setSmallIcon(R.drawable.icon)
.setContentIntent(pendingIntent)
.setTicker(getText(R.string.ticker_text))
.build();
startForeground(ONGOING_NOTIFICATION_ID, notification);
https://developer.android.com/guide/components/services#Foreground
Intent notificationIntent = new Intent(this, ExampleActivity.class);
PendingIntent pendingIntent =
PendingIntent.getActivity(this, 0, notificationIntent, 0);
Notification notification =
new Notification.Builder(this, CHANNEL_DEFAULT_IMPORTANCE)
.setContentTitle(getText(R.string.notification_title))
.setContentText(getText(R.string.notification_message))
.setSmallIcon(R.drawable.icon)
.setContentIntent(pendingIntent)
.setTicker(getText(R.string.ticker_text))
.build();
startForeground(ONGOING_NOTIFICATION_ID, notification);
2019年10月8日火曜日
网络安全配置
网络安全配置
https://developer.android.com/training/articles/security-config
NetworkSecurityConfig: No Network Security Config specified, using platform default
res/xml/network_security_config.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">ekidata.jp</domain>
</domain-config>
</network-security-config>
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config"
... >
...
</application>
</manifest>
https://developer.android.com/training/articles/security-config
NetworkSecurityConfig: No Network Security Config specified, using platform default
res/xml/network_security_config.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">ekidata.jp</domain>
</domain-config>
</network-security-config>
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config"
... >
...
</application>
</manifest>
2019年9月1日日曜日
android 音声の周波数を作成
android 音声の周波数を作成
byte b = (byte)(Math.sin(bufferIndex/2*Math.PI(SamplingRate /Frequency))
角度 =bufferIndex /2*Math.PI(4400/800);
byte値(音声のビット、B辺) = (byte) (Math.sin(temp) * 120(C辺);
private void hz() {
byte[] bs = new byte[44100];
Double temp;
for (int i = 0; i < bs.length; i++) {
temp = i / 2 * Math.PI / (44100 / Double.parseDouble("800"));
bs[i] = (byte) (Math.sin(temp) * 120);
}
audioTrack.play();
while (true) {
audioTrack.write(bs, 0, bs.length);
}
}
byte b = (byte)(Math.sin(bufferIndex/2*Math.PI(SamplingRate /Frequency))
角度 =bufferIndex /2*Math.PI(4400/800);
byte値(音声のビット、B辺) = (byte) (Math.sin(temp) * 120(C辺);
private void hz() {
byte[] bs = new byte[44100];
Double temp;
for (int i = 0; i < bs.length; i++) {
temp = i / 2 * Math.PI / (44100 / Double.parseDouble("800"));
bs[i] = (byte) (Math.sin(temp) * 120);
}
audioTrack.play();
while (true) {
audioTrack.write(bs, 0, bs.length);
}
}
private void hz() { byte[] bs = new byte[44100]; Double temp; for (int i = 0; i < bs.length; i++) { temp = i / 2 * Math.PI / (44100 / Double.parseDouble("800")); bs[i] = (byte) (Math.sin(temp) * 120); } audioTrack.play(); while (true) { audioTrack.write(bs, 0, bs.length); } }
2019年8月9日金曜日
minSdkVersion 28
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.kankanla.pi28"
minSdkVersion 28
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.kankanla.pi28"
minSdkVersion 28
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
compileSdkVersion 29
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.kankanla.pi292"
minSdkVersion 29
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.kankanla.pi292"
minSdkVersion 29
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
登録:
投稿 (Atom)