Skip to content

Instantly share code, notes, and snippets.

View atsushisakai-gh's full-sized avatar
🏠
Working from home

Atsushi Sakai atsushisakai-gh

🏠
Working from home
View GitHub Profile
@atsushisakai-gh
atsushisakai-gh / iOS_Lunch_movies.md
Last active June 6, 2018 12:22
これまでに「井戸端iOS」見た動画一覧
// v3以前
Glide.with(context)
.loadFromMediaStore(localMedia.getLocalPath())
.asBitmap()
.imageDecoder(new StreamBitmapDecoder(
Downsampler.AT_LEAST,
Glide.get(mContext).getBitmapPool(),
DecodeFormat.PREFER_ARGB_8888
))
.into(imageView);
@GlideModule
public final class MiteneGlideModule extends AppGlideModule {
// Daggerでinjectできるように設定済みである前提
@Inject okhttp3.OkHttpClient authOkHttpClient;
@Override
public void applyOptions(Context context, GlideBuilder builder) {
// 必要なOptionを書きます
}
// onlyRetrieveFromCache
// trueを指定することで、URLにアクセスすることなくキャッシュからのみ画像を取得することが可能
GlideApp.with(fragment)
.load(url)
.onlyRetrieveFromCache(true)
.into(imageView);
@atsushisakai-gh
atsushisakai-gh / matome.md
Last active March 7, 2018 07:41 — forked from ainame/matome.md
井戸端iOS飯で過去に見た動画まとめ

井戸端iOS

とは?

井戸端iOSとは、昼休み1時間+MTG分の30分の計1時間30分を利用して、 NBFオフィスのコラボのプロジェクターとスクリーンを利用して、 最新のスマホアプリ開発技術に関する動画を見ながらご飯を食べて、 交流する場です。

ぜひお気軽にご参加ください。

Demo

Overview

  • Swiftkiqをバックエンドに持つアプリケーション
  • Kituraを利用したServer Side Swiftアプリケーション

Detail

Purpose

  • LINEブログのランキングページをスクレイピングして各ブログをクローリング、記事の中の画像を取得してくる
; 1.2 ==============================================================
; (/ (+ 5 4 (- 2 (- 3 ( + 6 (/ 4 5))))) (* 3 (- 6 2) (- 2 7)))
; 1.3 ==============================================================
; (define (square i) (* i i))
;
; (define (func x y z)
; (if (= x (large x y))
; (+ (square x) (square (large y z)))
; (+ (square y) (square (large x z)))
navigator.getUserMedia({video:true}, function(stream) {
video.src = (window.webkitURL || window.URL).createObjectURL(stream);
localMediaStream = stream;
}, onFailSoHard);
navigator.getUserMedia = navigator.webkitGetUserMedia || navigator.getUserMedia;
if(navigator.getUserMedia){
console.log('You can getUserMedia.');
} else {
alert('Your Browser cannot use getUserMedia API!!');
}