Skip to content

Instantly share code, notes, and snippets.

View bopbi's full-sized avatar
💭
🕺 🕺

Bobby Prabowo bopbi

💭
🕺 🕺
View GitHub Profile
import io.reactivex.subjects.BehaviorSubject
fun main() {
val bh: BehaviorSubject<String> = BehaviorSubject.create()
val operation = bh.scan ("X"){ t1: String, t2: String ->
println("reduce")
"$t1-$t2"
}
@bopbi
bopbi / SupportFragmentController.java
Created January 3, 2019 04:52
Robolectric AndroidX SupportFragmentController
package xxx;
import android.content.Intent;
import android.os.Bundle;
import android.widget.LinearLayout;
import org.robolectric.Robolectric;
import org.robolectric.android.controller.ActivityController;
import org.robolectric.android.controller.ComponentController;

Keybase proof

I hereby claim:

  • I am bopbi on github.
  • I am bopbi (https://keybase.io/bopbi) on keybase.
  • I have a public key ASCyEAqSEf0g3OrAxjlFPZmtk4IkbeAiFl72VCffeY3DbQo

To claim this, I am signing this object:

@bopbi
bopbi / .buckconfig
Last active July 9, 2017 10:26
Buck settings for iOS app build
[cxx]
default_platform = iphonesimulator-x86_64
cflags = -g -fmodules -fobjc-arc -D BUCK -w
combined_preprocess_and_compile = true
[swift]
version = 3.1
compiler_flags = -DBUCK -whole-module-optimization -enable-testing -suppress-warnings
{
"id": null,
"type":"parent_child",
"validation": null,
"maxlength": 256,
"minlength": 0,
"label": "Store Stock data ",
"hint": null,
"alignment": null,
"value": [
@bopbi
bopbi / urut.c
Created November 28, 2016 15:27
Selection Sort.c
#include <stdio.h>
int main() {
int numbers[10] = {6,3,8,1,9,2,5,7,4,10};
for (int i = 0; i < 10; i++) {
printf(" %d ", numbers[i]);
}
@bopbi
bopbi / sudoku.c
Last active February 16, 2022 05:51
C Source code for solving sudoku using recursion, based on http://www.geeksforgeeks.org/backtracking-set-7-suduku/
#include <stdio.h>
#define N 9
#define UNASSIGNED 0
int is_exist_row(int grid[N][N], int row, int num){
for (int col = 0; col < 9; col++) {
if (grid[row][col] == num) {
return 1;
}
@bopbi
bopbi / .gitignore
Created February 25, 2016 16:11
Android Studio .gitignore file
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
@bopbi
bopbi / gist:57ac0bcccf8e91a19593
Created February 22, 2016 07:30
Run Tizen install manager on mac
java -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallF­onts -jar InstallManagerV2.jar
#include <stdio.h>
#include <stdlib.h>
struct linked_list {
int value;
struct linked_list *next;
};
struct node {
int value;