Skip to content

Instantly share code, notes, and snippets.

View kamaubrian's full-sized avatar
🤓
KAIZEN

Kamau Brian kamaubrian

🤓
KAIZEN
View GitHub Profile
@kamaubrian
kamaubrian / gist:dcd344334a50b63dd67bd84f77e16717
Created September 21, 2017 04:47 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@kamaubrian
kamaubrian / LoginController.java
Created September 27, 2017 18:01 — forked from jewelsea/LoginController.java
JavaFX sample for an fxml based Login screen to main application transition with login session data transfer
package login;
import javafx.event.*;
import javafx.fxml.FXML;
import javafx.scene.control.*;
/** Controls the login screen */
public class LoginController {
@FXML private TextField user;
@FXML private TextField password;
@kamaubrian
kamaubrian / studentController.java
Created October 9, 2017 05:41
java Controller
/*
* 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 Controller;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import View.*;
*
* 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 Model;
import Model.utils.*;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
@kamaubrian
kamaubrian / zsh.md
Created December 18, 2017 15:58 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
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);
#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;
}
/*
* 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;
#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;
class MyLoginModel implements LoginModel {
String user;
@Override
public String getUser() {
return user;
}
@Override