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
| <?php | |
| const CHANNEL_ACCESS_TOKEN = '[取得したCHANNEL ACCESS TOKEN]'; | |
| $entityBody = file_get_contents('php://input'); | |
| $data = json_decode($entityBody, true); | |
| foreach ($data['events'] as $event) { | |
| switch ($event['type']) { | |
| case '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
| <?php | |
| const CHANNEL_ACCESS_TOKEN = '[取得したCHANNEL ACCESS TOKEN]'; | |
| $entityBody = file_get_contents('php://input'); | |
| $data = json_decode($entityBody, true); | |
| foreach ($data['events'] as $event) { | |
| switch ($event['type']) { | |
| case '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
| function isIsogram($string) { | |
| foreach (range('a','z') as $let){ | |
| if (substr_count(strtolower($string), $let) > 1){return false;} | |
| } | |
| return true; | |
| } |
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
| function accum($s) { | |
| $result = array(); | |
| for ($i = 0; $i < strlen($s); $i++) { | |
| $str = ""; | |
| for ($j = 0; $j <= $i; $j++) { | |
| $str = $str . $s[$i]; | |
| } | |
| $result[] = ucfirst(strtolower($str)); | |
| } | |
| return implode("-", $result); |
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
| _method:PUT | |
| id:1 | |
| 種類:キャラ | |
| レアリティ:R | |
| 色:青 | |
| カード名:なでこスネーク | |
| lv:1 | |
| コスト:1 | |
| パワー:6000 | |
| メモ: |
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
| public function stock() | |
| { | |
| //モデルからテーブルを取得 | |
| $monogataris = $this->Monogataris->find('all'); | |
| //ビューの$monogatarisへ取得したエンティティをセット | |
| $this->set(compact('monogataris')); | |
| if ($this->request->is(['post', 'put'])) { | |
| $id = $this->request->data('id'); | |
| $monogatari = $this->Monogataris->get($id); |
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
| @Override | |
| protected String doInBackground(Uri.Builder... builder) { | |
| try { | |
| document = Jsoup.connect("http://ws-tcg.com/ws_today").get(); | |
| return "成功"; | |
| }catch(IOException e){ | |
| return "失敗"; | |
| } | |
| } |
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
| <?php | |
| echo "Hello Java!"; | |
| ?> |
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
| package com.exam; | |
| public class PackageTest{ | |
| private int i = 1000; | |
| public int show(){ | |
| return i; | |
| } | |
| } |
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
| ImageView iv; | |
| TextView tv; | |
| // X軸最低スワイプ距離 | |
| private static final int SWIPE_MIN_DISTANCE = 50; | |
| // X軸最低スワイプスピード | |
| private static final int SWIPE_THRESHOLD_VELOCITY = 200; | |
| // Y軸の移動距離 これ以上なら横移動を判定しない | |
| private static final int SWIPE_MAX_OFF_PATH = 250; |
NewerOlder