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
<?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; |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"font_face": "Migu 1M", | |
"font_size": 13, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Emmet", | |
"CoffeeCompile" | |
], |
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
#include <stdio.h> | |
// 1.一番ベーシックな構造体の定義の文法 | |
struct sample1{ | |
float f; | |
}; | |
int main() | |
{ | |
struct sample1 a; |
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 math | |
import string | |
class BinPacking: | |
def minBins(self, tuple_items): | |
items = list(tuple_items) | |
bin_count = 0 | |
while 100 in items and 200 in items: | |
items.remove(100) |
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 math | |
import string | |
class RectangularGrid: | |
def countRectangles(self, width, height): | |
counter = 0 | |
for i in range(1,width+1): | |
for j in range(1,height+1): | |
if i != j: | |
counter += ( (1+ (width-i)) * (( 1 + (height- j))) ) |
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
def quicksort(list): | |
if len(list) <= 1: | |
return list | |
pivot = list[0] | |
left = [] | |
right = [] | |
for val in list[1:len(list)]: | |
if val < pivot: | |
left.append(val) | |
else: |
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; |
OlderNewer