This file contains 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
package com.ponkotuy | |
import java.nio.charset.Charset | |
import io.netty.channel.ChannelHandlerContext | |
import io.netty.handler.codec.http._ | |
import org.littleshoot.proxy.impl.DefaultHttpProxyServer | |
import org.littleshoot.proxy.{HttpFilters, HttpFiltersAdapter, HttpFiltersSourceAdapter} | |
This file contains 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
# Time: 150513 9:34:49 | |
# User@Host: myfleet[myfleet] @ localhost [127.0.0.1] | |
# Thread_id: 63 Schema: myfleet QC_hit: No | |
# Query_time: 8.689849 Lock_time: 0.000136 Rows_sent: 2096 Rows_examined: 3635960 | |
# Full_scan: Yes Full_join: No Tmp_table: Yes Tmp_table_on_disk: No | |
# Filesort: Yes Filesort_on_disk: No Merge_passes: 0 Priority_queue: No | |
SET timestamp=1431477289; | |
select br.area_id, br.info_no, br.cell, br.win_rank, ci.alphabet, count(1) as cnt from battle_result br left join cell_info ci on br.area_id = ci.area_id and br.info_no = ci.info_no and br.cell = ci.cell where br.created > 1396278000000 and br.created < 1431442800000 group by br.area_id, br.info_no, br.cell, br.win_rank order by br.area_id, br.info_no, br.cell, br.win_rank; | |
# 以下のように書き換えたら3倍ぐらい早くなった |
This file contains 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._ | |
import com.jpexs.decompiler.flash.SWF | |
object Main { | |
def main(args: Array[String]) { | |
val path = "/home/yosuke/01_01.swf" | |
val is = new FileInputStream(new File(path)) | |
val swf = new SWF(is, path, "KanColle1_1", false) |
This file contains 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._ | |
import com.jpexs.decompiler.flash.SWF | |
import com.jpexs.decompiler.flash.tags.{ShowFrameTag, PlaceObject2Tag, DefineSpriteTag, DefineBitsJPEG3Tag} | |
import scala.collection.JavaConverters._ | |
object Main { | |
val LineRegex = """line(\d)""".r | |
def main(args: Array[String]) { |
This file contains 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
#!/bin/sh | |
# 勇者の塔を自動プレイする簡易スクリプト | |
# ただしNexus6(1440x2560)に限る | |
# 必要なもの: adb | |
# 条件: 兵士タブを開いた状態にし、スクロールを一番上にしておくこと | |
while : | |
do |
This file contains 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.text.SimpleDateFormat | |
import java.util.{Calendar, Date} | |
import com.github.nscala_time.time.Imports._ | |
object Main extends App { | |
def timer[A](name: String)(f: => A): A = { | |
val start = System.currentTimeMillis() | |
val result = f | |
println(s"${name}: ${System.currentTimeMillis() - start}ms") |
This file contains 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.Await | |
import scala.concurrent.duration._ | |
import akka.actor._ | |
import akka.pattern.gracefulStop | |
object Main extends App { | |
implicit val duration = 5.seconds | |
val system = ActorSystem() | |
// 初期化時に、データを渡すAcotrRefを引数にして初期化する | |
val ref = { |
This file contains 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
package com.ponkotuy; | |
import java.util.function.Consumer; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: yosuke | |
* Date: 13/05/31 | |
* Time: 3:23 | |
* 実装付きinterface |
This file contains 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 std.stdio; | |
import std.math; | |
class Penta | |
{ | |
private: | |
pure uint pentagonal(uint n) { | |
return n*(3*n - 1)/2; | |
} |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AtCoder { | |
class Cont014_4 { | |
static void Main(string[] args) { | |
string fst = Console.ReadLine(); |