- Scott Chacon on the Interwebs(リンク切れ)
- Scott Chacon on the Interwebs
- GitHub Flow - The best way to use Git and GitHub
31 Aug 2011
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
MessagePackが文字列とバイナリをわけないのは問題?
Objective Cの実装使ってるとある問題にぶちあたった.なので,文字列をちゃんとバイナリ(Raw)と分けるべき,という提案
(*) 俺は熟読したわけではないので,中身が気になる人はちゃんと本スレを読みましょう
<!--その1 MethodParameterに文字列を設定 --> | |
・View(XAML)側 | |
<Button Content="AC" Name="buttonAC"> | |
<i:Interaction.Triggers> | |
<i:EventTrigger EventName="Click"> | |
<l:LivetCallMethodAction MethodName="ClearButton" MethodTarget="{Binding}" MethodParameter="AC"/> | |
</i:EventTrigger> | |
</i:Interaction.Triggers> | |
</Button> |
/* xaml | |
<Button Content="export" IsEnabled="{Binding ExportCommand.CanExecute}"> | |
<i:Interaction.Triggers> | |
<i:EventTrigger EventName="Click"> | |
<l:SaveFileDialogInteractionMessageAction> | |
<l:DirectInteractionMessage CallbackCommand="{Binding ExportCommand}"> | |
<l:SavingFileSelectionMessage Filter="{Binding ExportFilter}" /> | |
</l:DirectInteractionMessage> | |
</l:SaveFileDialogInteractionMessageAction> | |
</i:EventTrigger> |
# coding: utf-8 | |
# IC balance checker / 2013-2015 @Akkiesoft | |
# Licence: | |
# MIT License | |
# references: | |
# http://homepage3.nifty.com/slokar/pasori/libpafe-ruby.html | |
# http://iccard.jennychan.at-ninja.jp/format | |
require 'wiringpi' |
char mes0[] = { 0xe8, 0xa8, 0x88, 0xe7, 0xae, 0x97, 0 , 0 , 0, 0 , 0 , 0 ,0} | |
, mes1 [ ] = { 0 , 0 , 0 , 0 , 0 , 0 , 0xe5 , 0x9b , 0x9e , 0xe6 , 0x95 , 0xb0 | |
, 0xe3, 0x82, 0x92, 0xe5 , 0x85, 0xa5 , 0xe5 , 0x8a , 0x9b , 0x3a , 0x20 , 0 , 0 , 0 | |
, 0 } , mes2 [ ] = { 0x25 , 0x6c , 0x6c , 0x64 , 0 } , mes3 [ ] = { 0 , 0 , 0 , 0 | |
, 0 , 0 , 0xe4 , 0xb8 , 0xad , 0x2e , 0x2e , 0x2e , 0x28 , 0x25 , 0x36 , 0x2e , 0x32 | |
, 0x66 , 0x25 , 0x25 , 0x29 , 0x20 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } , mes4 [ ] = { 0x50 | |
, 0x49 , 0x20 , 0x3d , 0x20 , 0x25 , 0x2e , 0x36 , 0x66 , 0xa , 0 , 0 } , mes5 [ ] = { 0xa | |
, 0 , 0 , 0 , 0 , 0 ,0,0xe5, 0xae | |
, 0x8c , 0xe4,0xba ,0x86 , 0xa , |
void Main() | |
{ | |
var pb = new PictureBox { Image = Image.FromFile(@"D:\tmp\dotnet.png") }; | |
bool down = false; | |
Cursor dragCursor = null; | |
pb.MouseDown += (sender, e) => down = true; | |
pb.MouseUp += (sender, e) => { down = false; dragCursor = null; }; | |
pb.MouseMove += (sender, e) => | |
{ | |
if (down) |
//2本接続 | |
var observable = t.Streaming.StartObservableStream(StreamingType.User); | |
var disposable1 = observable.OfType<StatusMessage>().Subscribe(s => Console.WriteLine("status")); | |
var disposable2 = observable.OfType<EventMessage>().Subscribe(e => Console.WriteLine("event")); | |
//1本接続 | |
var observable = t.Streaming.StartObservableStream(StreamingType.User).Publish(); | |
observable.OfType<StatusMessage>().Subscribe(s => Console.WriteLine("status")); | |
observable.OfType<EventMessage>().Subscribe(e => Console.WriteLine("event")); | |
var disposable = observable.Connect(); |