CISCO 841M 設定:15:IPV6(DS-LITE)を試してみた
IPV6(DS-LITE)
とりあえず、つながるところまで
ipv6 unicast-routing
ipv6 cef
bridge irb
bridge 1 protocol ieee
bridge 1 route ip
interface Tunnel1
ip address 192.0.0.2 255.255.255.252
tunnel source GigabitEthernet0/5
tunnel destination [AFTRのIPv6アドレス]
tunnel mode ipv6
tunnel path-mtu-discovery
interface GigabitEthernet0/5
no shutdown
ipv6 address autoconfig default
ipv6 enable
ipv6 dhcp client pd PREFIX
bridge-group 1
interface Vlan1
ipv6 address PREFIX ::1/64
ipv6 enable
ipv6 nd other-config-flag
ipv6 dhcp server STATELESS
bridge-group 1
ipv6 dhcp pool STATELESS
import dns-server
import domain-name
no ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Tunnel1
ip route 0.0.0.0 0.0.0.0 Dialer1 ← いらないはずだが、いる
少し問題
ipv6非対応のサイトが通信できてなかったので、Dialer1 の静的ルートも残したままになっています。V4とV6の共存でV4カプセルを自動で作ってくれるのかと思ったのですが、なんかうまくいっていないようで、上の設定だと「V6はTunnel1」「V4はDialer1」を通過している気がします。 また時間を見つけて試してみようかな。。[AFTRのIPv6アドレス]が違うのか、追加したルートが違うのか、なんでしょうねぇ・・・
WPF双方向データバインディング INotifyPropertyChangedとメソッド置換で遊んでみた
はじめに
INotifyPropertyChangedとメソッドを動的に置き換えて遊んでみました。業務でこんなことすると怒られます。というか動作保証できないし(汗) シュミで遊ぶときはこんな部品があっても良いかな。。。(最適化すると動かないけど)
INotifyPropertyChangedを実装する方法
単に何も考えず実装するとこんな感じかな。
・ViewModelプロパティ定義
public string BindText1 {
get { return this.bindText1; }
set {
this.bindText1 = value;
NotifyPropertyChanged();
}
}
趣味プロで実装するとこんな感じかな(笑)
・ViewModelプロパティ定義
・ViewModelクラスの親クラス
まとめ
好きこそものの上手なれ。 やればできそう、というようなことも会話で役に立つかもしれませんし、時間を見つけていろいろ遊んでみたいと思いますー
Joke-INotifyPropertyChanged-Implementが間違ってました。動くもので修正
プログラムでモデルとクエリ結果をJOINしてみた
はじめに
SQLが書けない環境でJOINを共通的に使えるようにするために
プログラム
private static <T, D extends Cloneable> void join(boolean p1, List<D> p2, Map<String, List<T>> p3, Function<D, String> p4, Map<String, BiConsumer<D, T>> p5) throws CloneNotSupportedException {
for (int i = 0; i < p2.size(); i++) {
String key = p4.apply(p2.get(i));
if (p3.containsKey(key)) {
if (p5!= null)
p5.get(key).accept(p2.get(i), p3.get(key).get(0));
for (int n = 1; n < p3.get(key).size(); n++) {
D clone = CloneUtils.cloneObject(p2.get(i));
if (p5!= null)
p5.get(key).accept(clone, p3.get(key).get(n));
p2.add(i++, clone);
}
} else if (p1) {
p2.remove(i--);
} else {
if (p5!= null)
p5.get(key).accept(clone, p3.get(key).get(n)); //nullを設定できれば
}
}
}
利用例
List<・・・> ‘daoList;//結合したいデータ
List<Cloneable> ‘dtoList;//結合されるソース
・・・
Function<daoモデル, String> key1 = m -> ・・・;//結合キーの左
Function<dtoモデル, String> key2 = m -> ・・・;//結合キーの右
join(true, dtoList, daoList.stream().collect(Collectors.groupingBy( key1 )), key2 , daoList.stream().collect(Collectors.toMap(key1 , m -> setter, (m1, m2) -> m1)));
ひとこと
SQL書かないでね・という開発ではORMを調べるのも大変になりますが、それよりも仕様理解に充てる時間を増やしたいときはこんな感じで進めていくのも一案。