Skip to content

Instantly share code, notes, and snippets.

View arifikhsan's full-sized avatar
🏡
Cool and Focusing

Arif Ikhsanudin arifikhsan

🏡
Cool and Focusing
View GitHub Profile
import java.util.InputMismatchException;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
System.out.println("IPK: ");
Scanner scanner = new Scanner(System.in);
double number = 0;
import java.util.*;
class Main {
public static void main(String[] args) {
ArrayList<Double> arrayList = new ArrayList<Double>();
arrayList.add(1.3);
arrayList.add(1.5);
arrayList.forEach((it) -> {
System.out.println(it);
});
@arifikhsan
arifikhsan / Connectivity.java
Created November 1, 2018 07:28 — forked from emil2k/Connectivity.java
Android utility class for checking device's network connectivity and speed.
/*
* Copyright (c) 2017 Emil Davtyan
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
@arifikhsan
arifikhsan / strings.xml
Last active November 8, 2018 23:29
ActionBarSearchView example data
<resources>
<string name="app_name">ActionBarSearchView</string>
<string-array name="array_country">
<item>Afghanistan</item>
<item>Albania</item>
<item>Algeria</item>
<item>Andorra</item>
<item>Angola</item>
<item>Antigua and Barbuda</item>
<item>Argentina</item>
@arifikhsan
arifikhsan / vim-heroku.sh
Created November 10, 2018 01:04 — forked from dvdbng/vim-heroku.sh
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@arifikhsan
arifikhsan / eb-cli-ubuntu-16-04
Last active November 15, 2018 14:42 — forked from navid-taheri/eb-cli-ubuntu-16-04
How to install eb cli (awsebcli) on Ubuntu 16.04
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install python3-setuptools
sudo easy_install3 pip
pip -V
#pip 9.0.1 from /usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg (python 3.5)
sudo chown -R username:username ~/.local/
@arifikhsan
arifikhsan / ResponseBroadcastReceiver.kt
Last active November 23, 2018 07:23
seonggok kode
var localObituaries = mutableListOf<ObituaryModel>()
var localLatestObituary: ObituaryPostNotificationModel
var localCities: MutableList<CityPostNotificationModel>
Log.d("aaaaaaaaaaaa", "aaaaaaaaaaaa")
val db = ObituaryDatabase.getInstance(params.first())
disposable.add(db.obituaryDao().getObituaries()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
class ApaHayo(private val db: ObituaryDao) {
fun doGetApa(onNext: (Triple<
Response<ObituarySqliteModel>,
Response<NotificationSettingSqliteModel>,
Response<NotificationSettingSqliteModel>
>) -> Unit,
onError: (Throwable) -> Unit): Disposable {
val stream: Observable<Triple<
Response<ObituarySqliteModel>,
package com.example.android.obituary.ui.dashboard.obituary
import android.content.Context
import android.content.Intent
import android.support.constraint.ConstraintLayout
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
package com.example.android.obituary.ui.dashboard.obituary
import android.arch.lifecycle.ViewModelProviders
import android.os.Bundle
import android.preference.PreferenceManager
import android.support.v4.app.Fragment
import android.support.v7.widget.LinearLayoutManager
import android.util.Log
import android.view.LayoutInflater
import android.view.View