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; | |
| public class Test | |
| { | |
| enum T{ | |
| A, | |
| B, | |
| C = A, | |
| D, | |
| E, | |
| } |
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
| namespace Util | |
| { | |
| public class FileUtility | |
| { | |
| /// <summary> | |
| /// ファイル名として使用可能な形にする。 | |
| /// </summary> | |
| /// <param name="name">元のファイル名</param> | |
| public static string ValidFileName(string name) | |
| { |
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
| <?xml version="1.0" encoding="utf-8" ?> | |
| <configuration> | |
| <configSections> | |
| <section name="log4net" type=" log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | |
| </configSections> | |
| <log4net> | |
| <!-- <appender name="rollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> --> | |
| <appender name="rollingLogFileAppender" type="Log4Net.Async.AsyncRollingFileAppender,Log4Net.Async"> |
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
| module MathUtil | |
| # | |
| # Wallis の公式によって円周率を求めます。 | |
| # | |
| # [count] | |
| # 計算回数を指定します。 | |
| # | |
| # 使用例 | |
| # print(MathUtil.wallis_formula(10000000)) | |
| # >> 3.1415925750808533 |
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
| @echo off | |
| set /P waittime="Log off: Input wait time [sec]> %waittime%" | |
| set /A mintime=waittime/60 | |
| echo Log off : %mintime% [min] (%waittime% [sec]) | |
| timeout /t %waittime% | |
| shutdown /l |
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<iostream> | |
| using namespace std; | |
| const int LENGTH = 200; | |
| int char_count[LENGTH]; | |
| void set_str(char *dst, int n){ | |
| if (n == LENGTH){ | |
| 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| namespace Util | |
| { | |
| public class ChitokuChin | |
| { |
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
| # count = 計算回数 | |
| # precision = 精度 | |
| function y = wallis_formula(count,precision) | |
| output_precision(precision) | |
| i = 1 | |
| a = 1 | |
| while(i<=count) | |
| num = 4*(i^2) | |
| a = a * num/(num-1) | |
| 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
| namespace MathUtil | |
| { | |
| /// <summary> | |
| /// Wallis の公式 | |
| /// </summary> | |
| public class WallisFormula | |
| { | |
| /// <summary> | |
| /// 計算を実行する | |
| /// </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
| using MySql.Data.MySqlClient; | |
| using System; | |
| using System.Data; | |
| namespace ConnectMysqlSample | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { |