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 / 1.html
Last active September 21, 2015 16:07 — forked from stephenlb/1.html
Enter Chat and press enter
<div><input id=input placeholder=you-chat-here /></div>
Chat Output
<div id=box></div>
<script src=http://cdn.pubnub.com/pubnub.min.js></script>
<script>(function(){
var box = PUBNUB.$('box'), input = PUBNUB.$('input'), channel = 'chat';
PUBNUB.subscribe({
@mochadwi
mochadwi / Android Studio .gitignore
Created June 9, 2016 04:16 — forked from iainconnor/Android Studio .gitignore
A .gitignore for use in Android Studio
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
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
@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 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 / 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:";
@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 / 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 / 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 / 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