This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?><!-- | |
~ Use Extended FAB on Android even if Material Components doesn't support it yet | |
~ See https://github.com/material-components/material-components-android/issues/79 | |
~ | |
~ Created by Simone Sestito | |
--> | |
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity | |
import android.app.Dialog | |
import android.content.DialogInterface | |
import android.graphics.Color | |
import android.graphics.Point | |
import android.graphics.drawable.ColorDrawable | |
import android.graphics.drawable.GradientDrawable | |
import android.os.Build | |
import android.support.design.widget.BottomSheetBehavior | |
import android.support.design.widget.CoordinatorLayout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.your.package | |
import android.app.Dialog | |
import android.os.Bundle | |
import com.your.package.R | |
import com.google.android.material.bottomsheet.BottomSheetDialog | |
import com.google.android.material.bottomsheet.BottomSheetDialogFragment | |
/** | |
* BottomSheetDialog fragment that uses a custom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.airbnb.epoxy | |
import android.content.Context | |
import android.graphics.Bitmap | |
import android.support.annotation.IdRes | |
import android.support.annotation.Px | |
import android.support.v7.widget.RecyclerView | |
import android.view.View | |
import com.bumptech.glide.Glide | |
import com.bumptech.glide.RequestBuilder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB2 SQL-Error: -007 SQLState: 42601 | |
Short Description: STATEMENT CONTAINS THE ILLEGAL CHARACTER | |
The specified 'character' is not a valid character in SQL statements. System action: The statement cannot be executed. Programmer response: Correct the syntax and resubmit the statement. Refer to Chapter 2 of DB2 SQL Reference for information about the valid SQL character set. | |
DB2 SQL-Error: -010 SQLState: 42603 | |
Short Description: THE STRING CONSTANT BEGINNING IS NOT TERMINATED | |
The statement contains a string constant, beginning with 'string', that is not terminated properly. System action: The statement cannot be executed. Programmer response: Examine the statement for missing quotation marks or apostrophes in the indicated string constant. | |
DB2 SQL-Error: -029 SQLState: 42601 | |
Short Description: INTO CLAUSE REQUIRED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const admin = require("admin"); | |
function getFirebaseUser(req, res, next) { | |
console.log("Check if request is authorized with Firebase ID token"); | |
if ( | |
!req.headers.authorization || | |
!req.headers.authorization.startsWith("Bearer ") | |
) { | |
console.error( | |
"No Firebase ID token was passed as a Bearer token in the Authorization header.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const trackTime = timing => { | |
const now = performance.now(); | |
if (!timing.startTime) timing.startTime = now; | |
const elapsed = now - timing.startTime; | |
const {duration} = timing; | |
if (duration != null && duration <= elapsed) timing.startTime = null; | |
return elapsed; | |
}; | |
const delay = (callback, duration) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ColorFilter duotoneColorFilter(@ColorInt int colorBlack, @ColorInt int colorWhite, float contrast) { | |
ColorMatrix cm = new ColorMatrix(); | |
ColorMatrix cmBlackWhite = new ColorMatrix(); | |
float lumR = 0.2125f; | |
float lumG = 0.7154f; | |
float lumB = 0.0721f; | |
float[] blackWhiteArray = new float[]{ | |
lumR, lumG, lumB, 0, 0, | |
lumR, lumG, lumB, 0, 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register all of the routes for an application. | |
| It's a breeze. Simply tell Laravel the URIs it should respond to | |
| and give it the controller to call when that URI is requested. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var elixir = require('laravel-elixir'); | |
var gulp = require('gulp'); | |
var vulcanize = require('gulp-vulcanize'); | |
// npm install --save-dev browser-sync gulp-vulcanize vulcanize | |
/* | |
|-------------------------------------------------------------------------- | |
| Elixir Asset Management | |
|-------------------------------------------------------------------------- |
NewerOlder