This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.*; | |
| import java.awt.event.*; | |
| // Adaptee | |
| class EditDiagramController { | |
| public void stateBtnClicked(ActionEvent e) { | |
| System.out.println("state clicked"); | |
| } | |
| public void transBtnClicked(ActionEvent e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.newpc.qrcode; | |
| import android.app.Activity; | |
| import android.content.Intent; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.widget.Button; | |
| import android.widget.TextView; | |
| import android.widget.Toast; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Try to figure out how redux works by implementing a minimized version of redux | |
| const counter = (state = 0, action) => { | |
| switch (action.type) { | |
| case 'INC': | |
| return state + 1; | |
| case 'DEC': | |
| return state - 1; | |
| default: | |
| return state; |