Skip to content

Instantly share code, notes, and snippets.

View gist:aa5afcb5b8cf550984693056b470c679
curl --location --request POST 'https://hktb-ed.mc-tb.maaiiconnect.com/lc-orc/v1/services/lc-test-tag1.m800.com/terminate-tf-inquiry' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0' \
--header 'Accept: application/json' \
--header 'Accept-Language: zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3' \
--header 'X-M800-Platform: web' \
--header 'X-M800-Device-Identifier: 26e5d71b-eacb-409d-b4bd-ca022d7d4084' \
--header 'X-M800-DeviceID: 26e5d71b-eacb-409d-b4bd-ca022d7d4084' \
--header 'X-M800-TabId: b24dbf44-2d06-4ab8-8cf3-b975b2373bfc' \
--header 'X-M800-Client-ReqID: 15946092232892' \
--header 'Authorization: bearer m800v1.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.uWs60IKcB_ssiv2A4tIyDd0F3gAEyJ2vLF5lzZ1az5C0tgGWdhzp9wOitNmqidaEZiqbAE-6wUHiX-DBWZLYuSYTKsFm6uzWG8sZCtElAWVoKPCtcx_ZPQmYN3iK5oCtTsR0-sO6RE_Z90GC5ZSI0a6P2NL2KnZ46RxpsBqNub3eimBTxFIOVSz58yqL_nPQudcVOGMpsPOXjjMYw0R1YEnEz7H7seanby9i3p_8NXEAwQo_7vPS6WHkJvE0sS2zpFIroWRJY0OrPehLUzFFs3pMO6HR7C7cAhhgxuuvzx05J6yG4r_vU0
View class2.dart
import 'package:flutter/material.dart';
import 'package:flutter_classs1/common_item.dart';
//Alice--入口點, 寫法相當於
//void main() {
// runApp(new MyApp()); //只有一行的話,建議簡化
//}
void main() => runApp(new MyApp());
View gist:ba5c7c1e8bb13d589afe2097db52e0b2
package com.asus.robot.storytelling.chromecast;
import android.text.TextUtils;
import android.util.Log;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
View full.java
package com.asus.robot.storytelling.activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import com.asus.robot.storytelling.R;
View main.js
console.log("test");
var wolfRoleList = [{
name: "fake_postman",
show_up: "videos/En_033.1_34.1_b.mp4",
knocking: "videos/En_035.mp4",
let_me_in: "videos/En_041.mp4",
press_open_door: "videos/En_045.mp4",
first_reject: "videos/En_052.mp4",
second_reject: "videos/En_055.mp4",
View gist:82e6b800ef2d902a087d2b14e33508e3
publishing {
publications {
aar(MavenPublication) {
groupId packageName
version = libraryVersion
artifactId "robotrtcsdk"
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
pom.withXml {
def dependencies = asNode().appendNode('dependencies')
View gcm_id.java
new Thread(new Runnable() {
@Override
public void run() {
try {
InstanceID instanceID = InstanceID.getInstance(getApplicationContext());
final String token = instanceID.getToken(getApplicationContext().getString(com.asus.robotrtcsdk.R.string.gcm_defaultSenderId),
GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
runOnUiThread(new Runnable() {
@Override
public void run() {
View shake_anim.java
View view = findViewById(R.id.tv_hello);
RotateAnimation rotateAnimation = new RotateAnimation(-5, 5, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
rotateAnimation.setDuration(1000);
rotateAnimation.setRepeatMode(Animation.REVERSE);
rotateAnimation.setRepeatCount(Animation.INFINITE);
view.startAnimation(rotateAnimation);
View setupWindowTranslucentStatus.java
public static void setupWindowTranslucentStatus(Activity activity) {
if (activity.getResources().getIdentifier("windowTranslucentStatus", "attr", "android") != 0) {
Window w = activity.getWindow(); // in Activity's onCreate() for
// instance
w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}
}
@SemonCat
SemonCat / getScreenInches.java
Last active Oct 20, 2015
Android ScreenInches
View getScreenInches.java
private int getScreenInches(Context context) {
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
DisplayMetrics displayMetrics = new DisplayMetrics();
display.getMetrics(displayMetrics);
int widthPixels = displayMetrics.widthPixels;
int heightPixels = displayMetrics.heightPixels;
float widthDpi = displayMetrics.xdpi;
float heightDpi = displayMetrics.ydpi;