Skip to content

Instantly share code, notes, and snippets.

View ronjdaugherty34's full-sized avatar

Ronald Daugherty ronjdaugherty34

  • Redford, MI
View GitHub Profile
@ZacSweers
ZacSweers / RxJava.md
Last active September 3, 2018 18:52 — forked from cesarferreira/RxJava.md
Party tricks with RxJava, RxAndroid & Retrolambda

View Click

Instead of the verbose setOnClickListener:

RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));

Filter even numbers

Observable
    .just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 11, 2025 17:09
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@hyamamoto
hyamamoto / broadcast_basic.dart
Created March 3, 2014 06:23
Snippets to show basic use of "Dart Stream API" in case I forget. (written for dart-1.3.0-dev)
import 'dart:async';
void main() {
var data = [1,2,3,4,5];
var stream = new Stream.fromIterable(data);
var broadcastStream = stream.asBroadcastStream();
broadcastStream.listen((value) => print("(3)stream.listen: $value"));
broadcastStream.first.then((value) => print("(3)stream.first: $value")); // 1
@KodeSeeker
KodeSeeker / MaxRepeatinginRange.java
Created February 23, 2014 19:34
Array of N integers . Find the element that is repeated most number of times
// Returns maximum repeating element in arr[0..n-1].
// The array elements are in range from 0 to n-1
int maxRepeating(int[] arr)
{
int len= arr.length;
// Iterate though input array, for every element
// arr[i], increment arr[arr[i]%k] by k
for (int i = 0; i< len; i++)
arr[arr[i]%len] += len;
@luoxiaoxun
luoxiaoxun / LeetCode-Merge Two Sorted Lists
Created June 24, 2013 05:48
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
C++:
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
@dodyg
dodyg / gist:5823184
Last active October 20, 2024 12:25
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.