Skip to content

Instantly share code, notes, and snippets.

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

mohemohe mohemohe

🍣
さーもん
View GitHub Profile
@mohemohe
mohemohe / Program.cs
Last active August 29, 2015 13:55
Example of how to use covconv API in C#.NET .
using System;
namespace example_covlangAPI
{
internal class Program
{
private static void Main(string[] args)
{
string uri = "http://api.ghippos.net/covlang/";
@mohemohe
mohemohe / Program.rb
Last active August 29, 2015 13:55
Example of how to use covconv API in Ruby .
# coding: utf-8
require 'net/http'
require 'uri'
response = Net::HTTP.post_form(URI.parse('http://api.ghippos.net/covlang/'),
{'ja_JP'=> 'ここに原文を入力すると、こふ語になります。'})
puts response.body
@mohemohe
mohemohe / kovkovkov.md
Created February 14, 2014 19:39
あまり真面目に捉えるな

こふ語学概論B

注意

こふ語自体が発展途上であるため,正確性には疑問がある.

まえがき

このドキュメンヨは,こふ語の単語変化の規則を,実例を交えながら紹介するものである.

/// <summary>
/// 方向を返します
/// </summary>
/// <returns>0.0〜3.5までで表される方向</returns>
/// <param name="dx">x軸方向の移動量(右が正)</param>
/// <param name="dy">y軸方向の移動量(下が正)</param>
static double ReturnDirection(int dx, int dy)
{
if (dx == 0 && dy == 0) // 移動してないなら
{
@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
{
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 / 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>