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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import codecs | |
import glob | |
import re | |
import os | |
# 上限ファイル数 (適宜変更) | |
limit = 3 |
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.Globalization; | |
namespace System | |
{ | |
public static class DateTimeExtensions | |
{ | |
/// <summary> | |
/// 指定した日付を "yyyyMMdd" 形式で返します。 | |
/// </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
public partial class App | |
{ | |
public App() | |
{ | |
PrepareEUDCFont(); | |
} | |
/// <summary> | |
/// 外字フォントを Window のデフォルトフォントに追加します。 | |
/// </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
const string PWS_CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
/// <summary> | |
/// 指定した長さの文字からなるランダムなパスワードを返します。 | |
/// </summary> | |
/// <param name="length">生成するパスワードの長さ</param> | |
/// <param name="availableChars">使用可能な文字の一覧</param> | |
/// <returns>生成されたパスワード</returns> | |
public static string GenerateRandomPassword(int length, string availableChars = PWS_CHARS) | |
{ | |
if (string.IsNullOrEmpty(availableChars)) availableChars = PWS_CHARS; |
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.ComponentModel; | |
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; | |
namespace YourApplication | |
{ | |
internal class LocalizedCategoryAttribute : CategoryAttribute | |
{ | |
public LocalizedCategoryAttribute(string resourceKey) | |
: base(LocalizedResources.GetString(resourceKey)) { } | |
} |
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.Runtime.CompilerServices; | |
/// <summary> | |
/// 環境変数を管理します。 | |
/// </summary> | |
public static class Env | |
{ | |
/// <summary> | |
/// デフォルトの .env ファイルのファイル名 | |
/// </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 System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
/// <summary> | |
/// Provides iterators to read lines in a file. | |
/// </summary> | |
public static class TextFile | |
{ | |
/// <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
<template> | |
<div ref="wrapper" class="fd__wrapper"> | |
<input type="hidden" :name="name" :value="value"> | |
<input ref="textBox" type="text" class="fd__display-textbox" :disabled="disabled" | |
:value="displayText" :placeholder="placeholder" readonly="readonly" @click="textBoxClicked"> | |
<div class="fd__list" v-show="showList"> | |
<div class="fd__filter-input"> | |
<input ref="filterTextBox" type="text" class="fd__filter-textbox" placeholder="Filter..." v-model="filterString"> | |
</div> | |
<ul> |
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
Param( | |
[parameter(mandatory)][String]$outputFile | |
) | |
$divider="-- $("=" * 100)" | |
$files = Get-ChildItem .\*.* -Include *.sql -Exclude $outputFile | |
if (Test-Path $outputFile) { Clear-Content $outputFile } | |
function output { | |
process { | |
Out-File -Encoding UTF8 -FilePath $outputFile -Append -InputObject $PSItem |
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 ConvertToPascalCase([Parameter(ValueFromPipeline)] [string] $text) { | |
($text -split '-' | ForEach-Object { | |
"$($_.ToCharArray()[0].ToString().ToUpper())$($_.Substring(1))" }) -join '' | |
} | |
function ConvertToKebabCase([Parameter(ValueFromPipeline)] [string] $text) { | |
([regex]"^-*").Replace(([regex]"[A-Z]").Replace($text, { "-" + $args[0].Groups[0].Value.ToLower() }), "") | |
} |
OlderNewer