Skip to content

Instantly share code, notes, and snippets.

View IzumiSy's full-sized avatar
🎯
Focusing

Seiya IZUMI IzumiSy

🎯
Focusing
View GitHub Profile
@koturn
koturn / lambda.c
Last active April 15, 2022 02:34
C言語におけるラムダを関数マクロで実現したものです。 GNU拡張文法(複文の式化、関数内の関数定義)を用いているので、gccでしか用いることができません。 また、トップレベルで用いることも不可能です。 C++でもコンパイルエラーにならないように、C++0xのラムダに変換するようにしています。 利便性を考え、ある程度の省略表記を許すようにしています。
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*!
* @brief GNU拡張機能を用いたラムダ関数を実現するマクロ
*
* gccもしくはC++0x対応コンパイラでのみコンパイル可能<br>
* トップレベルで用いることはできない
@kaishuu0123
kaishuu0123 / xv6.md
Last active April 23, 2022 15:56
xv6 を読む
@jhjguxin
jhjguxin / first_vs_limit.markdown
Last active September 10, 2020 08:59
mongoid limit(1).first vs .first vs find_by performance?

.first vs .limit(1) performance?

Q:

Hi there, I noticed the following:

This query:

AvailabilityUpdate.where(hotel_id: "AT_INN_BINDERS").only(:timestamp).limit(1).entries.first.timestamp
@Daniel15
Daniel15 / 1_README.md
Last active September 8, 2025 07:24
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@everpeace
everpeace / Why People Want Microservices.md
Last active November 8, 2022 10:37
マイクロサービス化が進む背景について考えてみた

マイクロサービス化が進む背景について考えてみた

最近マイクロサービスって流行ってますよね。バズってると言ってもいいくらい。

個人的には、「マイクロサービスって結局何なの?」とか、「SOAと何が違うわけ?」とかいう議論は苦手です。

でも「なんでみんなマイクロサービスで作りたいのか?なんでマイクロサービスで作られるサービスが多いのか?」にはすごく興味があるんです。

僕は今、シリコンバレーにある日系SIerの小さな子会社で駐在員をやっていますが、このエリアに居ると、とにかく最近、

「サービス全体が、独立した小さなサービスの集合で構成されるようになってきている」

@takezoe
takezoe / DailyScala_FunctionAdvance.md
Last active December 3, 2019 04:18
Scalaの関数を活用するためのあれこれ

Scalaの関数を活用する

Functionオブジェクト

Scalaでは関数をファーストクラスオブジェクトとして扱うことができる。以下のような感じで関数やメソッドを変数に代入するとFunctionオブジェクトに変換される。実際は引数の数に応じてFunction0Function22というトレイトが用意されている。なので引数の数が22個以上の関数を変数に代入しようとするとエラーになる。

def hello(name: String) = s"Hello ${name}!"

// 関数を変数に代入
@hashrock
hashrock / vuejs.md
Last active October 5, 2023 23:42
Vue.js資料まとめ(古いので注意)

#まず見るべき

以下のURLは、常に更新されているコンテンツです。

@carlisia
carlisia / rom-references
Last active January 8, 2019 10:23
ROM - References for creating a custom adapter
We couldn’t find that file to show.
@iraycd
iraycd / horrible-storyboard.md
Created June 10, 2015 14:20
Bad Experiences with Storyboard.

Interestingly Apple doesn't even use Storyboards in their recently open-sourced ResearchKit as [Peter Steinberger has noticed][1] (under the subheading "Interface Builder").

As expected, Apple keeps improving Storyboards and Xcode. Some of the points that applied to iOS 7 and below don't apply to iOS 8 anymore (and are now marked as such). So while Storyboards inherently still have flaws, I revise my advice from don't use to selectively use where it makes sense.

Even now that iOS 7 is out, I would advise against to use caution when deciding whether to use Storyboards. Here are my reasons:

  • Storyboards fail at runtime, not at compile time: You have a typo in a segue name or connected it wrong in your storyboard? It will blow up at runtime. You use a custom UIViewController subclass that doesn't exist anymore in your storyboard? It will blow up at runtime. If you do such things in code, you will catch them early on, during compile time. Update: My new tool **[StoryboardLin