CURLOPT_DNS_CACHE_TIMEOUT
: controls the TTL of a DNS cache entry. The default is 60s. Use -1 to keep the entry forever.CURLOPT_RESOLVE
: pre-populate the DNS cache manually.CURLOPT_DNS_SERVERS
: use alternate DNS servers (instead of system default ones). Warning: works only with c-ares (and it requires c-ares version >= 1.7.4),CURLOPT_DNS_USE_GLOBAL_CACHE
: cache DNS queries between easy handles. Warning: this is not thread-safe and documented as deprecated. Use the share interface instead (see below).
This file contains hidden or 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
// covariant functor | |
trait Functor[F[_]] { | |
def fmap[A, B](f: A => B): F[A] => F[B] | |
} | |
// contravariant functor | |
trait Contravariant[F[_]] { | |
def contramap[A, B](f: B => A): F[A] => F[B] | |
} |
Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.
Terminology:
- Producers send messages to brokers
- Consumers read messages from brokers
- Messages are sent to a topic
This file contains hidden or 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
import scala.concurrent.duration.FiniteDuration | |
/** | |
* The email message sent to Actors in charge of delivering email | |
* | |
* @param subject the email subject | |
* @param recipient the recipient | |
* @param from the sender | |
* @param text alternative simple text | |
* @param html html body |
This file contains hidden or 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
import java.io.File | |
import language.experimental.macros | |
import scala.reflect.macros.Context | |
object Macros { | |
def LINE: Int = macro lineImpl | |
def lineImpl(c: Context): c.Expr[Int] = { | |
import c.universe._ |
#MessagePackの文字列型追加において、Extended型を導入する提案
本提案は https://gist.github.com/frsyuki/5022569 https://gist.github.com/frsyuki/5022460 において提案された「バイナリ型」の構造に変更を施すものである。
##解決しようとする問題
- MessagePackへの拡張は今後行われないとしても、独自に拡張する提案が今後頻発しそう
- 拡張フォーマットは、既存のMessagePackに対して後方互換にならない(なりようがない)ため、相互運用性を損なう可能性が高い。これが問題
##提案する手法
This file contains hidden or 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
/* curl_multi_test.c | |
Clemens Gruber, 2013 | |
<[email protected]> | |
Code description: | |
Requests 4 Web pages via the CURL multi interface | |
and checks if the HTTP status code is 200. | |
Update: Fixed! The check for !numfds was the problem. |
NewerOlder