發表文章

目前顯示的是 10月, 2020的文章

osmdroid PreferenceManager.getDefaultSharedPreferences(ctx)

Error  osmdroid Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference  Solution: Change From: // This will casuse error Context ctx = getApplicationContext(); Configuration. getInstance ().load(ctx, PreferenceManager. getDefaultSharedPreferences (ctx)); To Context ctx = getApplicationContext(); Configuration. getInstance ().setUserAgentValue(ctx.getPackageName()); Example import android.content.Context; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import org.osmdroid.api.IMapController; import org.osmdroid.config.Configuration; import org.osmdroid.tileprovider.tilesource.TileSourceFactory; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapView; public class MapActivity extends AppCompatActivity { MapView map = null ; @Override protected void onCreate(Bundle savedInstanceState) { super .onCreate(savedInstanceState); //It must added, otherwise the map w...

startService no reponse

圖片
  Solution: >.< The AndriodManitest is missing < service android :name =".LocationService" />

他們其餘没那麼偉大 ISBN 9789861735672

他們其餘没那麼偉大 ISBN 9789861735672 這本書"抽"的, 是介紹不同我們心目的歷史偉人的令人面. 一本花生的小品, 但他們也有共通點, 就是極權下 (中世紀或者古代) 帝皇的時期, 人民的生活如蟻一樣,  雖然現在也是 :) , 只是好一點把了. 當權者或貴族, 可以任意把自己地域的市民的頭和身體分開, 政令可以任意改動, 如明天全部唔可以用火住食.  而且, 勤力不是好事, 因為好多人也是很努力的犯錯, 人生都是不用太努力, 哈哈哈, 犯錯小的就是勝利者.   

炒煙肉意粉

圖片
 一個人的煮食. 炒 煙肉 意粉 製法: 1)燒一大鍋水,意粉按包裝指示少1分鐘煮熟,瀝乾水備用 2)大火,炒香煙肉,加入橄欖油和蒜蓉炒勻(若煙肉出油太多,減少橄欖油份量) 3)加入腸仔片略炒,再加入乾辣椒和辣椒油炒勻 4)加入意粉炒勻,試味,再以鹽和胡椒粉來調味,隨口味加入更多辣椒油 5)最後灑上芝士和羅勒

visual studio unable to connect to web server iis express

圖片
 Delete .VS .  Reopen --> It works 

Android studio Connect to Firebase

圖片
  Make sure to call FirebaseApp.initializeApp(Context) first. Default FirebaseApp is not initialized in this process com.example.login Default FirebaseApp is not initialized in this process com.example.taxibeta1. Make sure to call FirebaseApp.initializeApp(Context) first. Setting: 1. under build.gradle classpath 'com.google.gms:google-services:4.2.0' 2. under build.gradle apply plugin : 'com.google.gms.google-services' and Add implementation 'com.google.firebase:firebase-storage:19.2.0' implementation 'com.google.firebase:firebase-analytics:17.5.0' implementation 'com.google.firebase:firebase-auth:19.4.0' implementation 'com.google.firebase:firebase-firestore:21.7.0' 3. Error occurs Add  google-services.json Check the error and see the path, the json file is downloaded in Firebase 4. Test code, you are able to connect Firebase private void uploadImage(Bitmap bitmap) { FirebaseApp. initializeApp ( this ); FirebaseStorage storage = ...

Postman Unsupported Media Type

圖片
  Solution: