こんにちは。今回は現実逃避を兼ねて Jade の素晴らしさをお伝えしたいと思います。
[Jade][0] は JST (JavaScript Templates) の一つであり、HTML を書くための[軽量マークアップ言語][1] である [Haml][2] に影響を受けた JavaScript テンプレートエンジンでもあります。
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
2013 Minori Yamashita ympby@gmail.com
-- ここにあなたの名前を追記 --
@import WatchKit; | |
@interface CachingInterfaceController : WKInterfaceController | |
- (void)updateLabel:(WKInterfaceLabel *)label withString:(NSString *)string; | |
- (void)updateLabel:(WKInterfaceLabel *)label asHidden:(BOOL)hidden; | |
- (void)updateImage:(WKInterfaceImage *)image withImageNamed:(NSString *)imageName; | |
- (void)updateImage:(WKInterfaceImage *)image withBaseNameForAnimation:(NSString *)baseName withRange:(NSRange)range duration:(NSTimeInterval)duration repeatCount:(NSInteger)repeatCount; | |
- (NSString *)currentImageNameForImage:(WKInterfaceImage *)image; |
require 'net/https' | |
require 'json' | |
require 'uri' | |
# | |
# Use your project key to query the API | |
# 1) go to Google API Console: https://code.google.com/apis/console/ | |
# 2) go to "Services" tab and enable "Page Speed Online API" | |
# 3) go to "API Key" tab and copy your "API Key" | |
# |
public static void sendFeedbackScreenshot(final Activity activity) { | |
try { | |
final View rootView = activity.getWindow().getDecorView().findViewById(android.R.id.content); | |
rootView.setDrawingCacheEnabled(true); | |
Bitmap bitmap = rootView.getDrawingCache(); | |
// Activity.getCacheDir() won't work here, because the email intent can't | |
// access your app's internal storage. So you need to find a good temporary | |
// location in SD card storage. | |
File outputDir = new File(android.os.Environment.getExternalStorageDirectory(), "tmp"); | |
File outputFile = new File(outputDir, "screenshot.png"); |
// Say this is in your app delegate | |
- (void) attemptAutologin | |
{ | |
NSURL *autologinURL = ...some..url..that..does..autologin..on..your..server | |
self.safariViewController = [[SFSafariViewController alloc] initWithURL:autologinURL]; | |
self.safariViewController.modalPresentationStyle = UIModalPresentationOverFullScreen; | |
self.safariViewController.view.alpha = 0.0; | |
[self.window.rootViewController presentViewController:self.safariViewController | |
animated:NO |
なんかダメだな、Qiita見てると 「恐らくはJavaScriptの達人であろう所のTwitterやGoogleのプログラマ達が取り組んですらあの体たらく、常人はJavaScript避けるべき」な主張してる人見かけるし、それって自分の無能を棚に上げてチャレンジしないって言ってるようにしか聞こえないし、それでいいとするならそれでいいけど、そんな悲しい主張、Qiitaみたいなエッジな技術者がたくさん集まるような場所ですんなよっていいたくなる。
Node学園に来てくれてる海外エンジニアはそんなの気にしないでUX最適にするっていうのにチャレンジしてるからあんなに活躍できてるわけで、なんでそんな主張して賛成してる奴多いんだよ。そんなんだから日本のweb開発遅れるんだよって言いたくなる。