2020年2月13日木曜日

VisualStudioCodeでのコード整形 Shift + alt + f

VisualStudioCodeでのコード整形 Shift + alt + f
sublime SublimeAStyleFormatter コード整形 Ctrl+ alt + f

C++ 始まり

MinGW
http://www.mingw.org/



end


2019年11月23日土曜日

PythonでWebServerを動かす方法

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月7日木曜日

chrome コマンドの一覧を表示する方法

about:about

一覧画面はアドレスバーに
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);

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>
   




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);
        }
    }


    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);
        }
    }
SamplingRate =44100
Frequency =800

SamplingRate =44100
Frequency =44100

SamplingRate =360
Frequency =4

https://docs.google.com/spreadsheets/d/1IvCVmJ_WYIhO6PaumFV5mpf3XDIjgu4TwmDbSwwLuK8/edit?usp=sharing




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'
}