Skip to content

Instantly share code, notes, and snippets.

Avatar

Changwook Doh cwdoh

View GitHub Profile
View CoffeeMaker.kt
interface Heater {
fun on()
fun off()
fun isHot() : Boolean
}
class ElectricHeater(var heating: Boolean = false) : Heater {
override fun on() {
println("~ ~ ~ heating ~ ~ ~")
heating = true
View UpdateJobIntentService.java
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.JobIntentService;
import android.util.Log;
import android.widget.Toast;
import
/**
* Example implementation of a JobIntentService.
*/
public class UpdateJobIntentService extends JobIntentService {
@cwdoh
cwdoh / SyncJobService.java
Last active Jun 26, 2017
Scaffolding JobService
View SyncJobService.java
package com.example.android.jobscheduler.service;
import android.app.job.JobParameters;
import android.app.job.JobService;
import android.content.Intent;
public class SyncJobService extends JobService {
ArtworkDownloader mDownloader;
@Override
View JobSchedulerSample.java
class JobSchedulerSample {
private static final int JOB_ID_UPDATE = 0x1000;
static void setUpdateJob(Context context) {
// 대용량 데이터를 업데이트하기 위한 적정 조건 설정
JobInfo job =
new JobInfo.Builder(
// Job에 설정할 Id 값
JOB_ID_UPDATE,
// 조건 만족 시 UpdateDataByWiFiService가 실행
@cwdoh
cwdoh / out.js
Created Dec 9, 2016
print '1 234 56 7'
View out.js
// 조건:
// 입력 없음
// 출력값: 1 234 56 7
let i = 1
[1, 3, 2, 1].map(c => { let o =''; while (c--) { o += i++ } return o }).join(' ')
View Welcome to Polytechnic with Eric Bidelman [Korean].srt
1
00:00:00,000 --> 00:00:01,054
ERIC BIDELMAN : 환영합니다, 여러분.
ERIC BIDELMAN:
Welcome, everyone.
2
00:00:01,054 --> 00:00:01,137
저는 에릭 바이들먼(Eric Bidelman) 입니다.
View designer.html
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<polymer-element name="my-element">
<template>
<style>
View designer.html
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-item/paper-item.html">
<polymer-element name="my-element">
<template>
<style>
View designer.html
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../paper-ripple/paper-ripple.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
View designer.html
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">