Skip to content

Instantly share code, notes, and snippets.

View derohimat's full-sized avatar
🏠
Working from home

Deni Rohimat derohimat

🏠
Working from home
View GitHub Profile
package com.gaharitechnology.vokon.ui.view;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;
public class GridHeaderSpacingItemDecoration extends RecyclerView.ItemDecoration {
private int spanCount;
private int spacing;
//
// main.c
// contoh menu C
//
// Created by Deni Rohimat on 11/11/16.
// Copyright © 2016 Deni Rohimat. All rights reserved.
//
#include <stdio.h>
package net.derohimat.basemvp.ui.view;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;
public class GridHeaderSpacingItemDecoration extends RecyclerView.ItemDecoration {
private int spanCount;
private int spacing;
private boolean includeEdge;
@derohimat
derohimat / Root Checker
Last active April 27, 2017 15:39
Root Checker Android
public static boolean isEmulator() {
return Build.FINGERPRINT.startsWith("generic")
|| Build.FINGERPRINT.startsWith("unknown")
|| Build.MODEL.contains("google_sdk")
|| Build.MODEL.contains("Emulator")
|| Build.MODEL.contains("Android SDK built for x86")
|| Build.MANUFACTURER.contains("Genymotion")
|| (Build.BRAND.startsWith("generic") && Build.DEVICE.startsWith("generic"))
|| "google_sdk".equals(Build.PRODUCT);
}
#include <iostream>
#include <vector>
using namespace std;
void Binary_Search(const vector<int> &numbers, int value);
int main() {
vector<int> my_numbers;
@derohimat
derohimat / main.cpp
Last active May 22, 2017 15:20
dynamic struct
#include <iostream>
using namespace std;
struct NilaiMatKul {
char nim[11];
char nama[30];
char nilai[2];
};
@derohimat
derohimat / main.cpp
Last active May 31, 2017 07:21
sort header
#include <iostream>
#include "sort.h"
using namespace std;
int main() {
int dataArr[100];
int menu, lanjut, n, i, sdhInput;
menu = 0;
@derohimat
derohimat / main.cpp
Created June 4, 2017 14:41
Dynamic Array C++
#include <iostream>
using namespace std;
struct NilaiMatKul {
char nim[11];
char nama[30];
char nilai[2];
};
@derohimat
derohimat / operatorcpp.cpp
Last active April 21, 2018 10:16
Operator C++
#include <iostream>
class Balok {
private:
int sisi;
public:
Balok() {
sisi = 0;
}
public class MyClass {
public static void main(String args[]) {
Author author = new Author("Deni R", "rohimatdeni@gmail.com", 'L');
Book book = new Book("Pemrograman Android", author, 100000.0, 1000);
System.out.println("Book name : " + book.getName());
System.out.println(book.getAuthor());
System.out.println("Price : " + book.getPrice());
System.out.println("Quantity : " + book.getQty());