Skip to content

Instantly share code, notes, and snippets.

View mohemohe's full-sized avatar
🍣
さーもん

mohemohe mohemohe

🍣
さーもん
View GitHub Profile
@mohemohe
mohemohe / hoge.cs
Last active August 29, 2015 13:57
ある時点よりも前の日付に作成され、かつ自分のアカウントに関連していないテーブルを削除したい感じ
if (IsNotWriting() == true)
{
if ((DataCount = GetTotalRecords("Status")) > LeaveData)
{
using (var sqlc = new SQLiteConnection("Data Source=" + _DBdir + _DBfile))
{
sqlc.Open();
using (SQLiteCommand cmd = sqlc.CreateCommand())
{
@mohemohe
mohemohe / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mohemohe
mohemohe / App.xaml.cs
Created December 1, 2014 12:28
kovlang
private void Application_Startup(object sender, StartupEventArgs e)
{
Settings.Initialize();
if (String.IsNullOrEmpty(Settings.Language) == false)
{
SetCurrentCulture(Settings.Language);
}
else
{
@mohemohe
mohemohe / anxtu!.bf
Last active February 28, 2016 08:47
うおおおあああ!!!(ブチミリ)
>>>>>>++++++++++[<<<<<<+++++++++++++>+++++++++++++>++++++>+++++++>++++++++++>+++++++++++++++>-]<<<<<<->+>+++++>+++>-->--->++++[<<<<<.>.<.>>>>.<<<<.>>>.<<<<.>>>.>>>-]
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Threading;
using System.Threading.Tasks;
using Livet;
using Livet.Commands;
public class AutoScrollBehavior : Behavior<ScrollViewer>
{
private ScrollViewer _scrollViewer;
private double _beforeHeight;
protected override void OnAttached()
{
base.OnAttached();
_scrollViewer = AssociatedObject;
@mohemohe
mohemohe / Benri.cs
Last active March 19, 2017 16:58
競プロ用べんりクラス
using System;
using System.Collections;
using System.Collections.Generic;
public static class Benri
{
public static class StdIn
{
public static int[] ReadStdIn()
{
@mohemohe
mohemohe / ghippos_bleu.xml
Last active August 29, 2015 14:17
Krile StarryEyes用テーマ
<?xml version="1.0" encoding="UTF-8" ?>
<ThemeProfile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/StarryEyes.Settings.Themes">
<ProfileVersion>1</ProfileVersion>
<GlobalFont>
<FontFamilyName>メイリオ</FontFamilyName>
<FontSize>12</FontSize>
</GlobalFont>
<BaseColor>
<BackgroundColor>#FFFAFCFC</BackgroundColor>
<ForegroundColor>#FF505050</ForegroundColor>
@mohemohe
mohemohe / Xorshift.cs
Last active October 19, 2015 11:18
Xorshift128
/// <summary>
/// System.Random と同じような感じで使える Xorshift
/// </summary>
class Xorshift
{
ulong x = 123456789, y = 362436069, z = 521288629, w;
/// <summary>
/// マジックナンバーによる固定のシード値を使用して、 Xorshift インスタンスを初期化します
/// </summary>
@mohemohe
mohemohe / DebugHelper.cs
Created April 17, 2015 20:14
WPFでコンソールにログを表示したいときとかに
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace GomokuCharhan.Helpers
{
static class DebugHelper
{
[Conditional("DEBUG")]
[DllImport("Kernel32")]