Skip to content

Instantly share code, notes, and snippets.

View anakahala's full-sized avatar

anakahala anakahala

View GitHub Profile
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
<!-- optional, add some variables
https://github.com/nlog/NLog/wiki/Configuration-file#variables
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
<!-- optional, add some variables
https://github.com/nlog/NLog/wiki/Configuration-file#variables
@anakahala
anakahala / ClosedXMLSample2.cs
Last active December 21, 2021 02:02
ClosedXMLSample2
using ClosedXML.Excel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClosedXmlSample
{
class Program
@anakahala
anakahala / ClosedXMLSample.cs
Created December 20, 2021 23:38
ClosedXMLSample
using ClosedXML.Excel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClosedXmlSample
{
class Program
@anakahala
anakahala / ConvertUtc.cs
Last active August 29, 2015 14:26
UTC時間変換
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication6
{
class Program
{
@anakahala
anakahala / gist:9248889
Last active August 29, 2015 13:56
Vue.jsでボタン活性非活性
<!doctype html>
<html>
<head>
<title>Button Disabled By Vue.js</title>
<meta charset="utf-8">
</head>
<body>
<h2>Button Disabled By Vue.js</h2>
<div id="app">
<div>
@anakahala
anakahala / Pascalize.cs
Last active January 4, 2016 21:19
「property_name」みたいなのを「PropertyName」にする
/// <summary>
/// delimiterで区切られた文字をパスカル形式にします
/// </summary>
/// <param name="value">value</param>
/// <param name="delimiter">delimiter</param>
/// <returns>Pascalizeed value</returns>
public static string Pascalize(string value, string delimiter)
{
if (string.IsNullOrEmpty(value) || string.IsNullOrEmpty(delimiter))
{
// 商品マスタ全件取得
List<MShohin> shohinList = mshohinDataAccess.SelectList();
foreach(MShohin s in shohinList)
{
// 何かしらの処理
var shohinCd = s.ShohinCd;
var shohinName = s.ShohinName;
}
@anakahala
anakahala / gist:5611733
Created May 20, 2013 11:33
LINQ拡張メソッド版
resultList = intList.Where(i => i <= 5).ToList();
@anakahala
anakahala / gist:5611723
Created May 20, 2013 11:29
ループ版
List<int> intList = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8 };
List<int> resultList = new List<int>();
foreach (int i in intList)
{
if (i > 5)
{
break;
}
resultList.Add(i);