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 jp.co.denso.android.denmobi.others; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.InvocationTargetException; | |
import java.net.InetAddress; | |
import java.util.ArrayList; |
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
NeoBundle 'tpope/vim-dispatch' | |
NeoBundle 'thoughtbot/vim-rspec' | |
let g:rspec_command = 'Dispatch rspec {spec}' | |
nmap <silent><leader>ff :call RunNearestSpec()<CR> |
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
extension Int { | |
var fizzbuzz: String { | |
var stuff = (self%3==0, self%5==0) | |
switch stuff { | |
case (true,false): | |
return "fizz" | |
case (false,true): | |
return "buzz" | |
case(true,true): | |
return "fizzbuzz" |
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
csv = <<'EOS' | |
勝海舟 コンパイラ C++プログラミング | |
勝海舟 コンパイラ Javaプログラミング | |
坂本龍馬 コンパイラ C++プログラミング | |
坂本龍馬 コンパイラ Ruby on Rails | |
坂本龍馬 データベース Ruby on Rails | |
坂本龍馬 データベース リレーショナルモデル | |
桂小五郎 コンパイラ Javaプログラミング | |
桂小五郎 コンピュータアーキテクチャ Javaプログラミング | |
桂小五郎 コンピュータアーキテクチャ オペレーティングシステム |
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
<?php | |
$html = file_get_contents('http://ishss10.doshisha.ac.jp/~hhaga/Teaching/dsa-2012/'); | |
$html = mb_convert_encoding($html, 'utf8', 'sjis-win'); | |
preg_match("/<table\swidth=\"60%\"\sborder=\"1\">(.*?)<\/table>/xsiu",$html,$table); | |
preg_match_all("/<TD.*?>(第.{1,2}回)<\/TD>.*?(http:\/\/dsmsf.doshisha\.ac\.jp\/Gateway\/contentPlayAction\.do\?contentId=\d{12})/xsiu",$table[1],$tr_list); | |
$hash = array(); | |
foreach($tr_list[2] as $key => $value) | |
$hash[$tr_list[1][$key]]=$value; | |
print_r($hash); | |
?> |
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
@RuntimePermissions | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
Button button = (Button) findViewById(R.id.button); | |
button.setOnClickListener(new View.OnClickListener() { | |
@Override |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<Button | |
android:id="@+id/button" | |
android:text="電話をかける" | |
android:layout_centerInParent="true" | |
android:layout_width="wrap_content" |
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
<?php | |
$direction = $_GET['direction']; | |
$station = $_GET['station']; | |
$direction_num = $direction == 'up' ? 0 : 1; | |
$station_id = array('shintanabe'=>'00004328','kyotanabe'=>'00001755','imadegawa'=>'00002735','demachiyanagi'=>'00003573','doshishamae'=>'00006957','kodo'=>'00001781'); | |
$station_code = array('shintanabe'=>'近鉄京都線','kyotanabe'=>'片町線','imadegawa'=>'京都市営烏丸線','demachiyanagi'=>'京阪本線',); | |
$url = "http://www.navitime.co.jp/diagram/".$station_id[$station]; | |
header('Content-Type:text/html; charset=UTF-8'); | |
$context = stream_context_create(array( | |
'http' => array( |
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
<?php | |
$id = $_GET['id']; //GETパラメーターを取得 | |
function is_on_service_time($line){ | |
return preg_match("/<FONT\scolor=\"\#0000cc\">\d{2}:<\/FONT>\s<A\shref=\"bin\/\d{5}\.html\">\d{2}<\/A>/xsiu",$line,$item); | |
} | |
$result_array = array(); | |
$url = "http://www.busqr.com/jikoku/01/stop/iku/".$id.".html"; |
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.util.List; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
public class MainViewListAdapter extends BaseAdapter{ | |
List<MainViewListEntry> entries; |
OlderNewer