Skip to content

Instantly share code, notes, and snippets.

@nick45chen
nick45chen / Holiday.java
Last active January 22, 2019 03:44
Mockito failed
package com.example.circlecisample;
import java.util.Calendar;
public class Holiday {
private static final int DECEMBER = 12;
private static final int DAY_OF_XMAS = 25;
private static final int DAY_OF_XMAS_NIGHT = 24;
@nick45chen
nick45chen / config.yml
Created January 22, 2019 06:15
~/.circleci/
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-28-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
@nick45chen
nick45chen / config.yml
Created January 22, 2019 06:15
~/.circleci/
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-28-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
@nick45chen
nick45chen / config.yml
Created January 22, 2019 06:15
path: ~/.circleci/
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-28-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>

原版本

{
    "syscode": 200,
    "sysmsg": "",
    "data": {
        "bannerList": [],
        "hotStoreList": [],
        "tabList": [],
@nick45chen
nick45chen / VersionViewModel.java
Last active August 13, 2019 09:45
版本更新ViewModel
/**
* 版本檢查 ViewModel
*/
/**
* 版本檢查 ViewModel
*/
public class VersionViewModel extends ViewModel {
private IVersionRepository repository;
private MutableLiveData<Boolean> isLoading = new MutableLiveData<>();
private MutableLiveData<String> alertMessage = new MutableLiveData<>();
@nick45chen
nick45chen / errorlog
Created March 12, 2020 04:47
No MediaQuery widget found.
════════ Exception caught by gesture ═══════════════════════════════════════════════════════════════
The following assertion was thrown while handling a gesture:
No MediaQuery widget found.
MyApp widgets require a MediaQuery widget ancestor.
The specific widget that could not find a MediaQuery ancestor was: MyApp
state: _MyAppState#6b131
The ownership chain for the affected widget is: "MyApp ← [root]"
Typically, the MediaQuery widget is introduced by the MaterialApp or WidgetsApp widget at the top of your application widget tree.
@nick45chen
nick45chen / Main.java
Created April 10, 2020 03:14
給晟豪
class Main() {
public static void main(String[] arge) {
Notice notice1 = new Notice(4, "課堂規定", "老師", new Date());
Notice notice2 = new Notice(8, "提交作業", "班代", new Date());
Notice notice3 = new Notice(3, "考試詳情", "老師", new Date());
ArrayList<Notice> noticeList = new ArrayList<>(); //加入泛型,讓ArrayList知道陣列裡面的物件類型
noticeList.add(notice1);
noticeList.add(notice2);
noticeList.add(notice3);
@nick45chen
nick45chen / main.dart
Created May 12, 2020 14:04
ModalBottomSheet
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override