Skip to content

Instantly share code, notes, and snippets.

import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
public class GetYahoo {
public static void main(String args[]){
System.out.println(doGet("http://www.yahoo.co.jp/"));
@tshrkmd
tshrkmd / styles_noactionbar.xml
Last active November 3, 2022 09:58
Theme.AppCompat.Light.NoActionBar
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.AppCompat.Light.NoActionBar" parent="@style/Theme.AppCompat.Light">
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item> <!-- For 2.x version -->
</style>
</resources>
@tshrkmd
tshrkmd / play_scala_json_sample.scala
Last active December 28, 2015 18:39
ちょっと雑だけどplay2.2のjsonのバインドサンプル
package jp.daneko.json.sample
import org.specs2._
import play.api.libs.json._
import play.api.libs.functional.syntax._
class Sample extends Specification {
def is = s2"""
#include <stdio.h>
/*
* 月末を返却
* param yyyy 年
* param mm 月
* return 月末
*/
int get_end_month(int yyyy , int mm)
{
#include
#include
/**
* 構造体
*/
typedef struct sosu_list {
int no;
struct sosu_list *next;
import java.util.ArrayList;
/**
* 素数計算プログラム
* @author kerukerupappa
*
*/
public class Sosu {
private static ArrayList mSosuList = new ArrayList();
@tshrkmd
tshrkmd / sample.go
Last active February 14, 2017 01:01
interface studty
package main
import "fmt"
type GPS struct {
lat string
lon string
}
type Wifi struct {
rethinkdb:
image: rethinkdb:2.3
ports:
- "8080:8080"
- "28015:28015"
- "29015:29015"
restart: always
volumes:
- "/srv/rethinkdb:/data"
command: "rethinkdb --bind all --cache-size 2048"
@tshrkmd
tshrkmd / docker-android-build-image
Last active July 16, 2017 11:50
android build image
# based on https://registry.hub.docker.com/u/samtstern/android-sdk/dockerfile/ with openjdk-8
FROM java:8
MAINTAINER Toshihiro.Kamada <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
# Install dependencies
RUN dpkg --add-architecture i386 && \
apt-get update && \
@tshrkmd
tshrkmd / tmux.comf
Last active August 7, 2017 09:57
tmux.comf
# prefixキーをC-eに変更する
set -g prefix C-e
# C-bのキーバインドを解除する
unbind C-b
# キーストロークのディレイを減らす
set -sg escape-time 1
# ウィンドウのインデックスを1から始める