Skip to content

Instantly share code, notes, and snippets.

View ericnjeru's full-sized avatar
Coffee

Eric Njeru ericnjeru

Coffee
View GitHub Profile
@ericnjeru
ericnjeru / font-names.txt
Last active August 4, 2022 11:02
WordPress Elementor Available fonts
// System fonts.
'Arial'
'Tahoma'
'Verdana'
'Helvetica'
'Times New Roman'
'Trebuchet MS'
'Georgia'
@ericnjeru
ericnjeru / animations.py
Created April 10, 2021 08:38
Django model choices for https://animate.style/
animations = [
("animate__animated animate__bounce", "bounce"),
("animate__animated animate__flash", "flash"),
("animate__animated animate__pulse", "pulse"),
("animate__animated animate__rubberBand", "rubberBand"),
("animate__animated animate__shake", "shake"),
("animate__animated animate__swing", "swing"),
("animate__animated animate__tada", "tada"),
("animate__animated animate__wobble", "wobble"),
("animate__animated animate__jello", "jello"),
public class Image
{
@SerializedName("image_path")
@Expose
private String image_path;
@SerializedName("type")
@Expose
private String type;
//fragment class implementation
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
try {
if (ContextCompat.checkSelfPermission(Objects.requireNonNull(getContext()), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED ) {
ActivityCompat.requestPermissions(Objects.requireNonNull(getActivity()), new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 101);
}
import android.Manifest;
import android.app.Activity;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import android.telephony.TelephonyManager;
import androidx.annotation.RequiresApi;
//dependancies
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
implementation 'me.dm7.barcodescanner:zbar:1.9.8'
//scanner activity
import android.Manifest.permission.CAMERA
import android.app.Activity
import android.app.AlertDialog
import android.content.DialogInterface