Skip to content

Instantly share code, notes, and snippets.

View JobGetabu's full-sized avatar
🏠
🐱‍👤

Job Getabu JobGetabu

🏠
🐱‍👤
View GitHub Profile
@JobGetabu
JobGetabu / problem.md
Created January 30, 2020 09:34
MissingInteger Find the smallest positive integer that does not occur in a given sequence.

Write a function:

fun solution(A: IntArray): Int

that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A.

For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5.

Given A = [1, 2, 3], the function should return 4.

@JobGetabu
JobGetabu / Cell
Created October 26, 2018 14:01
Folding cell implementation like car wash cell
<?xml version="1.0" encoding="utf-8"?>
<com.ramotion.foldingcell.FoldingCell xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:folding-cell="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
folding-cell:additionalFlipsCount="4"
folding-cell:animationDuration="1300"
folding-cell:backSideColor="@color/bgBackSideColor"
folding-cell:cameraHeight="30"
@JobGetabu
JobGetabu / LoginActivity.java
Last active October 24, 2018 11:04
Login implementation
package com.job.darasastudent.ui;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.Snackbar;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AppCompatActivity;
@JobGetabu
JobGetabu / authsample.java
Created May 28, 2018 18:00
Firebase Auth
//firebase email password auth in fragments
public class EmailPasswordLogInFragment extends Fragment {
public static final String TAG = "EmailPassLogInFragment";
private View mRootView;
private FirebaseAuth mAuth;
public EmailPasswordLogInFragment() {
// Required empty public constructor