Skip to content

Instantly share code, notes, and snippets.

View azzumw's full-sized avatar
💭
Building Github Profile

Azzum Waqar azzumw

💭
Building Github Profile
  • Nest Pensions
  • London
View GitHub Profile
@azzumw
azzumw / SelectFragmentLocation.kt
Created June 11, 2022 20:19
stackOF_FusedLocationClient
package com.udacity.project4.locationreminders.savereminder.selectreminderlocation
//import com.udacity.project4.utils.setDisplayHomeAsUpEnabled
//import com.udacity.project4.utils.wrapEspressoIdlingResource
import android.Manifest
import android.annotation.SuppressLint
import android.content.Intent
import android.content.IntentSender
@azzumw
azzumw / TaskViewModelTest.kt
Created May 30, 2022 14:54
TaskViewModelTest class from TODO app Udacity
package com.example.android.architecture.blueprints.todoapp.tasks
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.example.android.architecture.blueprints.todoapp.data.Task
import com.example.android.architecture.blueprints.todoapp.data.source.FakeTestRepository
import kotlinx.coroutines.runBlocking
import org.hamcrest.CoreMatchers.*
import org.hamcrest.MatcherAssert.assertThat
@azzumw
azzumw / MathPower.java
Created May 21, 2022 22:00
Emre Math power Exercise
class MathPower {
public static void main(String[] args) {
//this is labelled as final to make it constant. This value does not change.
final int base = 2;
/*this is power variable which will increment in the loop
we need to increment it until we reach 20.
*/
@azzumw
azzumw / Menu.java
Created February 7, 2021 14:50
Menu PrcessMenuOption method
private void processMenuOption(int optionEntered){
VendingMachine vm = VendingMachine.getInstance();
switch (optionEntered){
case 1: System.out.println("Current Products Available");
setMenuOptions(vm.getProducts());
int optionSelected = displayMenu();
vm.purchaseProduct(vm.getProducts().get(optionSelected-1),in);
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.macintosh.thebakingappproject"
minSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.0"
package com.example.macintosh.thebakingappproject;
import com.example.macintosh.thebakingappproject.IdlingResource.EspressoIdlingResource;
import com.example.macintosh.thebakingappproject.IdlingResource.OkHttpIdlingResource;
import com.example.macintosh.thebakingappproject.IdlingResource.SimpleIdlingResource;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.macintosh.thebakingappproject"
minSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.0"
package com.example.macintosh.thebakingappproject;
import android.app.IntentService;
import android.app.Service;
import android.appwidget.AppWidgetManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.support.annotation.Nullable;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import com.google.android.exoplayer2.DefaultLoadControl;
import com.google.android.exoplayer2.DefaultRenderersFactory;
import com.google.android.exoplayer2.ExoPlayerFactory;
import com.google.android.exoplayer2.SimpleExoPlayer;
@azzumw
azzumw / Step
Created November 17, 2018 17:36
package com.example.macintosh.retrofitrecyclercardview.Models;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Step {
@SerializedName("id")
@Expose
private Integer id;
@SerializedName("shortDescription")