Skip to content

Instantly share code, notes, and snippets.

View ionoy's full-sized avatar

Mihhail Maslakov ionoy

  • Estonia
View GitHub Profile
{
{
{
{
def _var5 = template(TourneyList, _ .View)
};
when (
{
def _var7 = TourneyList.Selected != null;
TourneyList.Selected != null
[Unit]
class Draggable
{
public OffsetX : int { get; set; }
public OffsetY : int { get; set; }
public this(moveHandler = null, downHandler = null, upHandler = null)
{}
public Handler() : void
handle mousedown(down) {
handle mousemove(move) until mouseup {
....
}
}
handle keydown(k0) {
if(k0 == 'a') {
handle once keydown(k1) {
if(k1 == 'b') {
macro HandleOnce(eventName, eventArgs, body)
syntax ("handle", eventName, eventArgs, "once", body)
{
HandleImpl.OnceImpl(eventName, eventArgs, body);
}
macro Handle(eventName, eventArgs, body)
syntax ("handle", eventName, eventArgs, body)
{
HandleImpl.Impl(eventName, eventArgs, body);
this.ReturnInt = function() {
var _N_T_temp_var_1 = "__lbl__1";
__gotoSwitchLoop: while(true) {
switch(_N_T_temp_var_1) {
case __lbl__23:
var __returnValue;
_N_T_temp_var_1 = "__lbl__3";
continue __gotoSwitchLoop;;;
break;
C:\dev\open-source\NemerleWeb\NemerleWeb.Samples\MVVM\CompListPage.n(8,4): warning : hint: CompListPage: 242ms
C:\dev\open-source\NemerleWeb\NemerleWeb.Samples\MVVM\Knockout\Tutorial_1_Introduction.n(5,12): warning : hint: IntroductionPage: 13ms
C:\dev\open-source\NemerleWeb\NemerleWeb.Samples\MVVM\Knockout\Tutorial_2_ListsAndCollections.n(7,4): warning : hint: ListsAndCollectionsPage: 42ms
C:\dev\open-source\NemerleWeb\NemerleWeb.Samples\MVVM\Knockout\Tutorial_3_SinglePageApps.n(8,6): warning : hint: SPAPage: 10ms
C:\dev\open-source\NemerleWeb\NemerleWeb.Samples\MVVM\Knockout\Tutorial_3_SinglePageApps.n(11,18): warning : hint: Mail: 1ms
C:\dev\open-source\NemerleWeb\NemerleWeb.Samples\MVVM\Knockout\Tutorial_3_SinglePageApps.n(23,18): warning : hint: FolderData: 1ms
C:\dev\open-source\NemerleWeb\NemerleWeb.Samples\MVVM\Knockout\Tutorial_5_LoadingAndSaving.n(8,4): warning : hint: LoadingAndSavingPage: 26ms
C:\dev\open-source\NemerleWeb\NemerleWeb.Samples\MVVM\Peg\CalculatorPage.n(9,4): warning : hint: Calculat
var rotating = from c1 in mouseClick
let originalValue = model.Value
from move in _mouseMove.TakeUntil(mouseClick)
select new {
originalValue,
downPos = c1.pos,
movePos = move.EventArgs.GetPosition(this)
};
Subject<Data> DataStream { get; set; }
Producer(data) {
DataStream.OnNext(data);
}
DataStream.Where(...)
.ObserveOn(NewThreadScheduler)
.Subscribe(...)
@ionoy
ionoy / gist:7040729
Last active December 25, 2015 21:09
queue.Enqueue(data)
producer.OnNext(true)
producer.ObserveOn(Scheduler.NewThread).Subscribe(_ => {
T res;
if(queue.TryDequeue(out res)) {
work(res);
}
});
_NW$_self.__nweb_meta = {
properties: [{ name: "SelectedUrl", attrs: [''] },{ name: "ActiveNodes", attrs: [''] },{ name: "Search", attrs: [''] },{ name: "Pinned", attrs: [''] },{ name: "Root", attrs: [''] }],
fields: [{ name: "_splitterAdded", attrs: [''] },{ name: "_N_SelectedUrl_9968", attrs: ['System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)','System.Runtime.CompilerServices.CompilerGenerated'] },{ name: "_N_ActiveNodes_9961", attrs: ['System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)','System.Runtime.CompilerServices.CompilerGenerated'] },{ name: "_N_Search_9954", attrs: ['System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)','System.Runtime.CompilerServices.CompilerGenerated'] },{ name: "_N_Pinned_9947", attrs: ['System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)','System.Runtime.CompilerServices.CompilerGenerated'] },{ name: "_N_Root_9938", attrs: