`gcc -E -x c source.js | sed '/^#/d' > result.js``
This file contains 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.android.sunshine.app; | |
import android.animation.Animator; | |
import android.animation.ObjectAnimator; | |
import android.animation.ValueAnimator; | |
import android.graphics.Canvas; | |
import android.graphics.ColorFilter; | |
import android.graphics.Paint; | |
import android.graphics.PixelFormat; | |
import android.graphics.Rect; |
This file contains 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
<!DOCTYPE html> | |
<html ng-app="unsupportDeviceSearchApp"> | |
<head> | |
<title>기기 미지원 리스트</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> | |
</head> | |
<body ng-controller="unsupportDeviceSearchController"> | |
<form> | |
<input type="text" ng-model="query" ng-change="search()"> | |
</form> |
This file contains 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
private static final Interpolator INTERPOLATOR = new LinearInterpolator(); | |
private static int DURATION = 300; | |
private Property<View, Float> translateProperty = new Property<View, Float>(Float.class, "translateX") { | |
@Override | |
public Float get(View view) { | |
return view.getTranslationX(); | |
} |
This file contains 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
http://www.codewars.com/kata/5402724fd39b43c075000116/train/javascript | |
```javascript | |
function fill(n, x) { | |
var a = []; | |
for(var i=0;i<n;i++) { | |
if (typeof x === 'function') a[i] = x(); | |
else if(x instanceof Array) a[i] = x.slice(0); | |
else a[i] = x; | |
} |
This file contains 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
extern crate rand; // Cargo.toml 에 정의한 디팬던시를 가져오기 위해 extern crate 키워드로 가져오기 | |
use std::io; // 임포트 | |
use std::cmp::Ordering; | |
use rand::Rng; | |
fn main() { | |
println!("Guess the number"); // 기본적으론 함수 호출은 그냥 노말하게 호출, 느낌표는 매크로를 호출 | |
let secret_number = rand::thread_rng().gen_range(1, 101); // 상수에 바인딩. |
(영상)[https://www.youtube.com/watch?v=W23s6kYJbrA]
크롬 콘솔에서만 해보느라(귀찮아서) tdd를 못했넹....
하스켈 좀 공부해서 해보자. recursive
, map
, filter
가 주 로직이니 쉽게(는 아니고) 가능할거 같다
0 4 8
1 3 5 7 9
function undoRedo(object) {
function History(type, key, oldValue, newValue) {
this.type = type;
this.key = key;
this.oldValue = oldValue;
this.newValue = newValue;
http://www.codewars.com/kata/529bf0e9bdf7657179000008/train/javascript;
처음에는 합이 45가 나오니까 합을 모두 계산해서 해볼까...
했다가 그럴필요 없이 각 로우/컬럼/3x3박스에 1~9가 모두 들어있으면 되겠다 해서 이렇게 했는데;;
그냥 숫자가 모두 있다를 체크하는게 나을거 같아서 그냥 해봄;;
var hasAll = (arr) => arr.reduce((a,b)=>a+b)==45
OlderNewer