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
package com.github.jrper; | |
import javafx.beans.InvalidationListener; | |
import javafx.beans.property.Property; | |
import javafx.beans.property.SimpleObjectProperty; | |
import javafx.beans.value.ChangeListener; | |
import javafx.beans.value.ObservableValue; | |
import java.util.function.BiFunction; | |
import java.util.function.Consumer; |
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
// 本家が勧めてくる「高レベル・バインディングAPI」とやら | |
IntegerProperty num1 = new SimpleIntegerProperty(1); | |
IntegerProperty num2 = new SimpleIntegerProperty(2); | |
IntegerProperty num3 = new SimpleIntegerProperty(3); | |
IntegerProperty num4 = new SimpleIntegerProperty(4); | |
NumberBinding total = | |
Bindings.add(num1.multiply(num2),num3.multiply(num4)); | |
System.out.println(total.getValue()); | |
// こう書いた方が可読性が高いのでは?? |
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
>keytool -genkey -v -keystore sample.keystore -keysize 2048 -keyalg RSA -sigalg SHA256withRSA -alias test -validity 50000 | |
キーストアのパスワードを入力してください: | |
新規パスワードを再入力してください: //「キーストアのパスワード」と同じものを再度入力 | |
姓名は何ですか。 | |
[Unknown]: Fubuki DD Fubuki | |
組織単位名は何ですか。 | |
[Unknown]: Maiduru Naval Arsenal | |
組織名は何ですか。 | |
[Unknown]: Imperial Japanese Navy | |
都市名または地域名は何ですか。 |
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
// ユーティリティ | |
static class Utility | |
{ | |
// リソースのStreamをファイル名から取得する | |
public static Stream GetResourceStream(string name) { | |
// リフレクションにより、アセンブリ情報を取得する | |
var assembly = System.Reflection.Assembly.GetExecutingAssembly(); | |
// アセンブリ情報から、リソース名の一覧を取得する | |
string[] resnames = assembly.GetManifestResourceNames(); | |
// リソース名の一覧を検索し、条件に合ったものを返す |
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" ?> | |
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:local="clr-namespace:SampleApplication.Views" | |
x:Class="SampleApplication.Views.DetailPage"> | |
<MasterDetailPage.Master> | |
<local:MasterPage/> | |
</MasterDetailPage.Master> | |
<MasterDetailPage.Detail> |
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; | |
namespace CalcExpPoint | |
{ | |
static class Library | |
{ | |
// 達成に必要な経験値(Lv.1~Lv.165) | |
private static List<int> levelExpList = new List<int> { | |
0, | |
0, |
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
<Application | |
x:Class="HelloXamarin.WPF.App" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="clr-namespace:HelloXamarin.WPF" | |
StartupUri="MainWindow.xaml"> | |
<Application.Resources> | |
<ResourceDictionary> | |
<ResourceDictionary.MergedDictionaries> | |
<ResourceDictionary Source="/WPFLightToolkit;component/Assets/Default.xaml" /> |
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
# キーワードを1つ以上含む地名一覧 | |
select zip,ken_name,city_name,town_name from ad_address as ad,words as w1 where ad.town_name like '%'||w1.word||'%'||'%' | |
# キーワードを2つ以上含む地名一覧 | |
# Run Time: real 33.766 user 33.564572 sys 0.133176 | |
select zip,ken_name,city_name,town_name from ad_address as ad,words as w1,words as w2 where ad.town_name like '%'||w1.word||'%'||w2.word||'%' | |
# キーワードを3つ以上含む地名一覧 | |
# Run Time: real 1047.457 user 1041.483093 sys 2.566790 | |
select zip,ken_name,city_name,town_name from ad_address as ad,words as w1,words as w2,words as w3 where ad.town_name like '%'||w1.word||'%'||w2.word||'%'||w3.word||'%' |
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
// 画像データを用意する | |
var image1 = new Eto.Drawing.Bitmap(w1, h2, PixelFormat.Format24bppRgb); | |
var image2 = new Eto.Drawing.Bitmap(w2, h2, PixelFormat.Format24bppRgb); | |
// Eto.Drawing.Graphics型はIDisposeを継承しているのでusingが使える | |
using(var g = new Eto.Drawing.Graphics(image1)){ | |
// image2から切り出す範囲を指定(下記例だと左上座標は(x,y)、幅w3・高さh3の範囲) | |
var cropRect = new Eto.Drawing.Rectangle(x, y, w3, h3); | |
// tempImageはimage2から切り出された範囲 | |
var tempImage = image2.Clone(cropRect); | |
// image1の指定した位置(x2,y2)にtempImageを貼り付ける |
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 <chrono> | |
#include <cmath> | |
#include <cstdint> | |
#include <iostream> | |
#include <map> | |
#include <random> | |
#include <unordered_map> | |
#include <utility> | |
#include <vector> |