Skip to content

Instantly share code, notes, and snippets.

View cwdoh's full-sized avatar

Changwook Doh cwdoh

View GitHub Profile
interface Heater {
fun on()
fun off()
fun isHot() : Boolean
}
class ElectricHeater(var heating: Boolean = false) : Heater {
override fun on() {
println("~ ~ ~ heating ~ ~ ~")
heating = true
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 June 26, 2017 08:35
Scaffolding JobService
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
@cwdoh
cwdoh / JobSchedulerSample.java
Last active June 8, 2018 08:21
JobScheduler
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 December 9, 2016 08:12
print '1 234 56 7'
// 조건:
// 입력 없음
// 출력값: 1 234 56 7
let i = 1
[1, 3, 2, 1].map(c => { let o =''; while (c--) { o += i++ } return o }).join(' ')
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) 입니다.
@cwdoh
cwdoh / designer.html
Created July 26, 2014 03:23
designer
<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>
@cwdoh
cwdoh / designer.html
Created July 25, 2014 15:51
designer
<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>
@cwdoh
cwdoh / designer.html
Created July 25, 2014 11:42
designer
<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%;
@cwdoh
cwdoh / designer.html
Created July 25, 2014 06:34
designer
<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">