目前分類:未分類文章 (16)

瀏覽方式: 標題列表 簡短摘要

這一次的路線是:

捷運劍潭站 -> 1717 , 108 路公車 -> 小油坑服務站  -> 七星山 -> 冷水坑停車場 -> 捷運士林站。

文章標籤

Deyu 發表在 痞客邦 留言(0) 人氣()

在地朋友推薦的牛肉麵店,走到店門口寫著牛肉麵節第三名的招牌。

IMG_8963

Deyu 發表在 痞客邦 留言(0) 人氣()

清燉半筋半肉麵 230 $$

穆家牛肉麵

文章標籤

Deyu 發表在 痞客邦 留言(0) 人氣()

最近一次健身中,單手去抓槓鈴橋位置時,直接閃到,閃到後還在做一組硬舉,放下的瞬間,我的腰一動就痛。

人生第一次腰閃到啊。

Deyu 發表在 痞客邦 留言(0) 人氣()

起因就是

防疫前後對比

Deyu 發表在 痞客邦 留言(2) 人氣()

我整部戲都看完了,直接說結論:這部我個人給予很低的評價。

除非你真的很閒,或是想進行運動放著當背景音效可以考慮啦。

Deyu 發表在 痞客邦 留言(0) 人氣()

 

Youtube 影片教學:https://www.youtube.com/watch?v=6Bdme2_g8yE

Deyu 發表在 痞客邦 留言(0) 人氣()

運用github的資料跟一些視覺圖表做出來的。

完整影片我放在youtube:https://youtu.be/4LoWXL47QhE

Deyu 發表在 痞客邦 留言(0) 人氣()

簡單的說就是用預覽程式打開檔案,,,然後在你想要去除的背景拖曳,選取暗紅色的部分然後剪下,去背就完成了。

我用成步驟跟你說。

Deyu 發表在 痞客邦 留言(0) 人氣()

以現在這個環境,個人比較推薦學習Js之類的直譯語言。

不是因為職業考量,而是你如果學習Java-Android的話,你會花很多時間在等待編譯,打包之類的,改一行有時候要等很久才能驗證。

Deyu 發表在 痞客邦 留言(0) 人氣()

環境是OSX bash 

# 設定檔案權限

Deyu 發表在 痞客邦 留言(0) 人氣()

    void getHttpFileName(){

//譬如是一個 yesbaby 的 jpg圖片黨  網址我亂打的...

Deyu 發表在 痞客邦 留言(0) 人氣()

//此button要去findViewById功能才會在你螢幕裡哦

 

Deyu 發表在 痞客邦 留言(0) 人氣()

 

//在ContentView裡面 id 為YourLayout的RelativeLayout 裡 add一個 /res/layout/cont_inter.xml的view

Deyu 發表在 痞客邦 留言(0) 人氣()

這個範例我有放在github專案上歡迎參閱:
https://github.com/DeyuGoGo/AndroidBloger

package go.deyu.androidbloger;

import android.Manifest;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v4.app.ActivityCompat;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.List;

public class MapActivityActivity extends Activity implements View.OnClickListener {

/*    記得在你的manifests上增加:
    <activity android:name=".MapActivityActivity"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    定位需要幾秒,等一下囉。
 */
    private TextView textView;
    private TextView textView2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.map_activity);

        textView = (TextView) findViewById(R.id.textView);
        textView2 = (TextView) findViewById(R.id.textView2);
        findViewById(R.id.button).setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.button:
                requestUserLocation();
                break;
        }
    }
    public void requestUserLocation() {
        final LocationManager mLocation = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
        //判斷當前是否已經獲得了定位權限
        if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){
            Toast.makeText(MapActivityActivity.this,"權限沒開",Toast.LENGTH_SHORT).show();
//            如果是6.0以上的去需求權限
            requestCameraPermission();
            return;
        }

        mLocation.requestSingleUpdate(LocationManager.NETWORK_PROVIDER, new LocationListener() {
            @Override
            public void onLocationChanged(final Location location) {
                final StringBuffer sb = new StringBuffer();
                sb.append("Now location is : \n")
                        .append("lat : " + location.getLatitude()).append("\n")
                        .append("lng : " + location.getLongitude());
                        textView.setText("lat : " + location.getLatitude());
                        textView2.setText("lng : " + location.getLongitude());
                        Toast.makeText(MapActivityActivity.this,sb.toString(),Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onStatusChanged(final String s, final int i, final Bundle bundle) {
            }

            @Override
            public void onProviderEnabled(final String s) {
            }

            public void onProviderDisabled(final String s) {
            }
        },  MapActivityActivity.this.getMainLooper());
    }
    private void requestCameraPermission(){
        if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.M)
            return;

        final List<String> permissionsList = new ArrayList<>();
        if(this.checkSelfPermission(Manifest.permission.CAMERA)!=PackageManager.PERMISSION_GRANTED)
            permissionsList.add(Manifest.permission.CAMERA);
        if(this.checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)!=PackageManager.PERMISSION_GRANTED)
            permissionsList.add(Manifest.permission.ACCESS_FINE_LOCATION);
        if(permissionsList.size()<1)
            return;
        if(this.shouldShowRequestPermissionRationale(Manifest.permission.CAMERA))
            this.requestPermissions(permissionsList.toArray(new String[permissionsList.size()]) , 0x00);
        else
            goToAppSetting();
    }

    private void goToAppSetting(){
        Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
                Uri.fromParts("package", this.getPackageName(), null));
        startActivityForResult(intent , 0x00);
    }
}

 


Deyu 發表在 痞客邦 留言(2) 人氣()

Bitmap轉String

 

Deyu 發表在 痞客邦 留言(0) 人氣()

Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼