- Open Android Studio
- Go to: Tools > Create Command-line Launcher
- Leave as default, Press OK
- Add the following lines to your
.gitconfig
$apiKey = "" #Octopus API Key | |
$OctopusURL = "" #Octopus URL | |
$ProjectName = "" #project name | |
$Header = @{ "X-Octopus-ApiKey" = $apiKey } | |
#Getting Project By Name | |
$Project = Invoke-WebRequest -Uri "$OctopusURL/api/projects/$ProjectName" -Headers $Header| ConvertFrom-Json | |
#Getting Deployment Template to get next release version |
/* | |
* Copyright (C) 2008 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
public static float convertPixelsToDp(float px){ | |
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics(); | |
float dp = px / (metrics.densityDpi / 160f); | |
return Math.round(dp); | |
} | |
public static float convertDpToPixel(float dp){ | |
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics(); | |
float px = dp * (metrics.densityDpi / 160f); | |
return Math.round(px); |
package com.nezspencer.bakingapp.pojo; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
public class BakingRecipe implements Parcelable { | |
public static final Creator<BakingRecipe> CREATOR = new Creator<BakingRecipe>() { | |
@Override | |
public BakingRecipe createFromParcel(Parcel source) { | |
BakingRecipe var = new BakingRecipe(); |
{ | |
"name": "laravel/laravel", | |
"description": "The Laravel Framework.", | |
"keywords": ["framework", "laravel"], | |
"license": "MIT", | |
"type": "project", | |
"require": { | |
"php": ">=5.6.4", | |
"barryvdh/laravel-cors": "^0.9.2", | |
"fzaninotto/faker": "^1.6", |
<?php | |
return [ | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Name | |
|-------------------------------------------------------------------------- | |
| | |
| This value is the name of your application. This value is used when the |
<?php | |
namespace App\Http; | |
use Illuminate\Foundation\Http\Kernel as HttpKernel; | |
class Kernel extends HttpKernel | |
{ | |
/** | |
* The application's global HTTP middleware stack. |
//firebase realtime database (RTDB) | |
FirebaseDatabase.getInstance().reference.child("phoneNumber").setValue("+2345899xxx") | |
//Firestore | |
val map = mutableMapOf<String, Any>() | |
map["PhoneNumber1"] = "+2345899xxx" | |
FirebaseFirestore.getInstance().collection("Numbers").document("PhoneNumbers").set(map) |
@Override | |
fun onSuccess(){ | |
if(lifecycle.currentState.isAtLeast(Lifecycle.State.STARTED)) { | |
//perform action here | |
} | |
} |