if (dirtiness.is_dirty)
io_res = writeback_mb(wb, res.found_seg, res.found_mb, dirtiness.data_bits, true);
if (!io_res)
if (mark_clean_mb(wb, res.found_mb))
dec_nr_dirty_caches(wb);
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
| diff --git a/src/dm-writeboost-target.c b/src/dm-writeboost-target.c | |
| index 33c24d1..7b2d04f 100644 | |
| --- a/src/dm-writeboost-target.c | |
| +++ b/src/dm-writeboost-target.c | |
| @@ -373,30 +373,18 @@ void dec_nr_dirty_caches(struct wb_device *wb) | |
| wake_up_interruptible(&wb->wait_drop_caches); | |
| } | |
| -static bool taint_mb(struct wb_device *wb, struct metablock *mb, struct bio *bio) | |
| +static bool taint_mb(struct wb_device *wb, struct metablock *mb, u8 data_bits) |
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
| class A { | |
| val x = 0 | |
| class B { | |
| class C { | |
| def f = x | |
| } | |
| } | |
| } | |
| => |
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
| case class Hoge(n: Int) { | |
| def run: Route = { | |
| complete(StatusCodes.OK) | |
| } | |
| } | |
| def hoge: Route = { | |
| pass { | |
| Hoge(1).run | |
| // complete(StatusCodes.OK) |
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
| val route = extractRequestContext { ctx => | |
| if (true) { | |
| complete(StatusCodes.InternalServerError) | |
| } | |
| parameter("hoge") { hoge => | |
| extractRequestContext { ctx => | |
| complete(StatusCodes.OK) | |
| } | |
| } | |
| } |
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
| createBucket(mybucket): | |
| HttpRequest(PUT,http://127.0.0.1:8080/mybucket/,List(Host: 127.0.0.1:8080, Authorization: AWS accessKey:QbGVxD/xVPDyw9FZ8KKLPKzxGXo=, User-Agent: aws-sdk-java/1.9.7 Mac_OS_X/10.10 Java_HotSpot(TM)_64-Bit_Server_VM/25.45-b02/1.8.0_45, Date: Thu, 13 Aug 2015 00:54:56 GMT, Content-Type: application/x-www-form-urlencoded; charset=UTF-8, Content-Length: 0, Connection: Keep-Alive),Empty,HTTP/1.1) | |
| listBuckets: | |
| HttpRequest(GET,http://127.0.0.1:8080/,List(Host: 127.0.0.1:8080, Authorization: AWS accessKey:ero7mumf5Va0wYHBRFsfmuKG5wc=, User-Agent: aws-sdk-java/1.9.7 Mac_OS_X/10.10 Java_HotSpot(TM)_64-Bit_Server_VM/25.45-b02/1.8.0_45, Date: Thu, 13 Aug 2015 01:01:16 GMT, Content-Type: application/x-www-form-urlencoded; charset=UTF-8, Connection: Keep-Alive),Empty,HTTP/1.1) | |
| listObjects(mybucket): | |
| HttpRequest(GET,http://127.0.0.1:8080/mybucket/,List(Host: 127.0.0.1:8080, Authorization: AWS accessKey:t1QNqkTgwCJ3r9ajPvI6+3PUFBU=, User-Agent: aws-sdk-java/1.9.7 Mac_OS_X/10.10 Java_HotSpot(TM)_64-Bi |
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.net.URI | |
| import com.amazonaws.DefaultRequest | |
| import com.amazonaws.auth.{SigningAlgorithm, BasicAWSCredentials} | |
| import com.amazonaws.http.HttpMethodName | |
| import com.amazonaws.services.s3.internal.{RestUtils, S3Signer} | |
| import com.amazonaws.util.HttpUtils | |
| import scala.collection.mutable | |
| import collection.JavaConversions._ |
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.util.parsing.combinator._ | |
| class SampleParsers extends RegexParsers { | |
| def ok: Parser[Int] = success(0) | |
| def int: Parser[Int] = """[0-9][0-9]?""".r ^^ { _.toInt } | |
| def char: Parser[Char] = """[A-z]""".r ^^ { _.charAt(0) } | |
| def lit: Parser[Int] = "[" ~> int <~ "]" | |
| def rep0lit = rep(lit) | |
| def rep1lit = rep1(lit) | |
| } |
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 org.scalatest._ | |
| class Sample extends FunSuite { | |
| test ("sample") { | |
| assert(1 === 1) | |
| } | |
| } | |
| // error message |
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
| A=["", "+", "-"] | |
| A.product(A, A, A, A, A, A, A).each do |combi| | |
| expr = [1,2,3,4,5,6,7,8,9].zip(combi).flatten.join("") | |
| puts expr if eval(expr) == 100 | |
| end |