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
/* | |
* 以下のコードは | |
* アラン・シャロウェイ,ジェームズ・R・トロット:著 / 村上 雅章:訳 / (2005) / 『デザインパターンとともに学ぶ オブジェクト指向のこころ』 / 株式会社ピアソン・エデュケーション | |
* より、自分なりにC#用に改変させていただいたコードです | |
*/ | |
using System; | |
using System.Collections.Generic; |
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
#include<stdio.h> | |
//#define DEBUG | |
#ifdef DEBUG | |
unsigned long long int count = 0; | |
#endif | |
struct Node | |
{ |
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
//「あるセールスマンが幾つかの都市を一度ずつ訪問して出発点に戻ってくるときに、移動距離が最短になる経路」を求める(全探索)。 | |
//このプログラムでは、セールスマンが巡回しなければならない街の数nを入力した場合に、自動的に街に'A'から始まるASCIIコード | |
//に対応した名前が街名として順次割り当てられます。セールスマンは'A'からスタートし、最終的に'A'に戻ってくるものとしています。 | |
//また、経路A->Bと、経路B->Aは同じものとみなしますので入力は必要最低限の項目を1回ずつ行うことになります。 | |
//(A->Bを入力したらB->Aを入力する必要はないものとする)。 | |
//通れないルートが有る場合、例えばA->C(またはC->A)には交通手段がないときには、経路入力の時に0を入力して下さい。 | |
//その道を通るルートの計算を除外します。 |
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 System; | |
using System.Text; | |
using System.Web; | |
using System.Diagnostics; | |
namespace CSharpConsole | |
{ | |
class ブラウザ開いてYahoo検索する |
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 System; | |
using System.Net; | |
using System.IO; | |
using System.Windows.Forms; | |
using System.Drawing; | |
class ストリームからイメージを作成する | |
{ | |
[STAThread] | |
static void Main(string[] args) |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
using System.Web; | |
namespace CSharpConsole |
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
#include "Input.h" | |
char* GetStrLineRec(int *size){ | |
static int endFlag = 0; | |
static int index; | |
static char* str; | |
char ret; | |
if (endFlag == 0){ |
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 System; | |
using System.Text; | |
using System.Web; | |
namespace Es.Web | |
{ | |
class BrowserSeaech | |
{ | |
/// <summary> |
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
private List<Material> materials = new List<Material>(); | |
foreach(Transform child in transform) | |
{ | |
if(child != null && child.renderer != null && child.renderer.material != null) | |
foreach(Material mat in child.renderer.materials) | |
materials.Add(mat); | |
} |
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 class AlphaGameObject : MonoBehaviour | |
{ | |
private Color alpha = new Color(0, 0, 0, 0.01f); | |
private List<Material> materials = new List<Material>(); | |
private void Start() | |
{ | |
//マテリアルの取得 | |
foreach(Transform child in transform) | |
{ |
OlderNewer