Skip to content

Instantly share code, notes, and snippets.

View mochadwi's full-sized 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 November 15, 2019 18:38 — forked from gpetuhov/clean_architecture.txt
Clean architecture tutorials (MVC, MVP, MVVM)
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 July 24, 2019 09:04 — forked from IlyaEremin/app_version.gradle
Npm version for gradle
@mochadwi
mochadwi / fine-grained-variance-check.md
Created January 8, 2019 05:36 — forked from mekarthedev/fine-grained-variance-check.md
Kotlin proposal: Allow `out` type parameter to occur in `in` position

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 January 8, 2019 04:36 — forked from Joev-/DialogFragmentCallback.md
Getting results from DialogFragment to calling Fragment using Callbacks

##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.

@mochadwi
mochadwi / activity_main.xml
Last active August 18, 2017 03:16 — forked from Bonetank/XML
Quiz
<?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 August 18, 2017 03:12 — forked from Bonetank/Java
Quiz App
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 February 14, 2017 05:15 — forked from corinchen/binomial.cpp
binomial fix lho~
#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:";
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
@mochadwi
mochadwi / data.pas
Created January 14, 2017 12:12 — forked from anonymous/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
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