Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Mochamad Iqbal Dwi Cahyo mochadwi

💭
I may be slow to respond.
View GitHub Profile
@mochadwi
mochadwi / clean_architecture.txt
Created Nov 15, 2019 — forked from gpetuhov/clean_architecture.txt
Clean architecture tutorials (MVC, MVP, MVVM)
View clean_architecture.txt
Detailed intro
https://medium.com/@dmilicic/a-detailed-guide-on-developing-android-apps-using-the-clean-architecture-pattern-d38d71e94029
Demo project
https://github.com/android10/Android-CleanArchitecture
https://github.com/googlesamples/android-architecture
https://github.com/antoniolg/androidmvp
@mochadwi
mochadwi / README.md
Last active Jul 24, 2019 — forked from IlyaEremin/app_version.gradle
Npm version for gradle
View README.md
@mochadwi
mochadwi / fine-grained-variance-check.md
Created Jan 8, 2019 — forked from mekarthedev/fine-grained-variance-check.md
Kotlin proposal: Allow `out` type parameter to occur in `in` position
View fine-grained-variance-check.md

Allow out type parameter to safely occur in in position

  • Type: Design proposal
  • Author: Viacheslav Makarov
  • Status: Draft

Summary

Reduce the need in @UnsafeVariance. Allow covariant types to have non-private methods with non-covariant signature. To protect class' covariance, out-project signatures

@mochadwi
mochadwi / DialogFragmentCallback.md
Created Jan 8, 2019 — forked from Joev-/DialogFragmentCallback.md
Getting results from DialogFragment to calling Fragment using Callbacks
View DialogFragmentCallback.md

##Getting results from DialogFragments to another Fragment.

When setting up the DialogFragment make a call to Fragment.setTargetFragment()
Then from DialogFragment you can access the main fragment with Fragment.getTargetFragment()
Use interfaces to provide the required actions to the calling Fragment.

##Example code.

###AddFriendDialogFragment - Calls back to calling fragment.

View activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
tools:context="com.example.android.quizpsikologi.MainActivity">
<LinearLayout
@mochadwi
mochadwi / MainActivity.java
Last active Aug 18, 2017 — forked from Bonetank/Java
Quiz App
View MainActivity.java
package com.example.android.quizpsikologi;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.TextView;
@mochadwi
mochadwi / binomial.cpp
Last active Feb 14, 2017 — forked from corinchen/binomial.cpp
binomial fix lho~
View binomial.cpp
#include<iostream>
using namespace std;
int binomial(int n, int k);
int main()
{
int n,k;
cout<<"\t\t\t Program menghitung Fungsi Binomial\t\t\t";
cout<<endl;
cout<<"Masukkan angka N:";
View gist:2d2512c9e8e80376af3ef26a6e19fc2e
program PasienRawatInap;
uses crt,sysutils;
const
nama_file = 'E:\DataMahasiswa\Tugas\Alpro\tugas_besar\data_pasien.txt';
Maks_pasien = 200;
user = 'rafli' ;
pass = '10116132' ;
type
dt_pasien = record
View data.pas
program distribusi_barang;
{I.S. : User Mengisi Data Pada Menu Isi Data}
{F.S. : Melakukan Pencarian Terhadap Data Yang Sudah Ada dan Menampilkan
Keseluruhan Data Yang Telah Terurut}
uses crt;
const
LokasiFile = 'D:\TUBESAlpro\databarang.txt';
maks = 20;
type
View gist:c5d314581688cd0cbeb6c4cdbffb3f49
program MengolahDataBuku;
{I.S.: user memasukan data buku}
{F.S.: menampilka data buku yang sudah terurut}
uses
crt, sysutils;
const
MaksBuku = 20;
// nama_file = 'E:\DataMahasiswa\Tugas\Alpro\file_test\data_buku.txt';
nama_file = 'data_buku.txt';
type