Skip to content

Instantly share code, notes, and snippets.

View kamaubrian's full-sized avatar
🤓
KAIZEN

Kamau Brian kamaubrian

🤓
KAIZEN
View GitHub Profile
package dev.cellulant.test;
import java.util.*;
public class Main {
public static String[] uniqueNames(String[] names1, String[] names2) {
ArrayList<String> firstNameList = new ArrayList<>();
ArrayList<String> secondNameList = new ArrayList<>();
import kotlinx.coroutines.*
fun main(args: Array<String>) {
getAnswerSynchronously()
//getAnswerAsynchronously()
}
suspend fun getIntegerMultiplication(firstNumber: Int, secondNumber: Int): Int {
delay(1000)
return firstNumber * secondNumber
@kamaubrian
kamaubrian / checkGooglePlayServicesAvailable.java
Created October 10, 2018 17:34
Android: Check whether Google Play Services are installed and current
/**
* Check whether Google Play Services are available.
*
* If not, then display dialog allowing user to update Google Play Services
*
* @return true if available, or false if not
*/
private boolean checkGooglePlayServicesAvailable()
{
final int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());
splits {
abi {
enable true
reset()
include 'x86_64', 'x86', 'armeabi', 'armeabi-v7a', 'arm64-v8a'
universalApk false
}
}
class MyLoginModel implements LoginModel {
String user;
@Override
public String getUser() {
return user;
}
@Override
#include <iostream>
using namespace std;
int a[6]={20,5,1,3,17,3};
bool binarySearch(int first, int last, int key);
int main(){
int key;
cout<<"Enter the item to search"<<endl;
cin>>key;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.dita.dev.Controller;
import com.dita.dev.View.Grades;
import java.awt.Graphics;
import java.awt.Graphics2D;
#green {
-fx-background-color:
linear-gradient(#f0ff35, #a9ff00),
radial-gradient(center 50% -40%, radius 200%, #b8ee36 45%, #80c800 50%);
-fx-background-radius: 6, 5;
-fx-background-insets: 0, 1;
-fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.4) , 5, 0.0 , 0 , 1 );
-fx-text-fill: #395306;
}
import java.util.Scanner;
import java.util.LinkedList;
/*
Authors: Brian Kamau, Winny Kiburu
* */
public class Linked {
private static LinkedList<Object> items = new LinkedList<Object>();
private static Scanner scanner = new Scanner(System.in);
@kamaubrian
kamaubrian / zsh.md
Created December 18, 2017 15:58 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu