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
| version: '2' | |
| services: | |
| nginx: | |
| image: 'nginx' | |
| ports: | |
| - '80:80' | |
| volumes: | |
| - /home/mikamikuh/dev/tomcat-test/nginx.dev.conf:/etc/nginx/nginx.conf | |
| network_mode: host | |
| links: |
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 void mergeSort(int[] array) { | |
| divide(array, 0, array.length / 2, array.length - 1); | |
| } | |
| public void divide(int[] array, int low, int middle, int high) { | |
| if(high >= middle && middle > low) { | |
| divide(array, low, middle/2, middle - 1); | |
| divide(array, middle, ((high - middle + 1) / 2) + middle, high); | |
| merge(array, low, middle, high); | |
| } |
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 void selectionSort(int[] array) { | |
| for(int i = 0; i < array.length - 1; i++) { | |
| int index = i; | |
| int min = array[i]; | |
| for(int j = i + 1; j < array.length; j++) { | |
| if(min > array[j]) { | |
| min = array[j]; | |
| index = j; | |
| } |
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 void bubbleSort(int[] array) { | |
| for (int i = array.length - 1; i > 0; i--) { | |
| for (int j = 0; j < i; j++) { | |
| if (array[j] > array[j + 1]) { | |
| int n = array[j]; | |
| array[j] = array[j + 1]; | |
| array[j + 1] = n; | |
| } | |
| } | |
| } |
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
| var Person = function(name, age) { | |
| this.name = name; | |
| this.age = age; | |
| }; | |
| var one = new Person("Mikami", 27); | |
| var two = new Person("Hoge", 50); | |
| console.log(one.name); | |
| console.log(one.age); |
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
| using UnityEngine; | |
| using System.Collections; | |
| public class GameTrigger : MonoBehaviour { | |
| // スコアの合計 | |
| public int totalScore = 0; | |
| void OnTriggerEnter (Collider col) | |
| { | |
| // 景品コンポーネントを取得 |
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
| using UnityEngine; | |
| using System.Collections; | |
| public class ItemObject : MonoBehaviour { | |
| public int score = 1; | |
| } |
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
| using UnityEngine; | |
| using System.Collections; | |
| public class GameTrigger : MonoBehaviour { | |
| // スコアの合計 | |
| public int totalScore = 0; | |
| void OnTriggerEnter (Collider col) | |
| { | |
| // 景品コンポーネントを取得 |
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
| using UnityEngine; | |
| using System.Collections; | |
| public class GameTrigger : MonoBehaviour { | |
| void OnTriggerEnter (Collider col) | |
| { | |
| // 衝突したオブジェクトの削除 | |
| Destroy (col.gameObject); | |
| } |
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
| using UnityEngine; | |
| using System.Collections; | |
| public class BulletController : MonoBehaviour { | |
| // 衝突時のパーティクル | |
| public GameObject particle; | |
| // 衝突開始時に呼ばれるメソッド | |
| void OnCollisionEnter(Collision col) { |
NewerOlder