Skip to content

Instantly share code, notes, and snippets.

View mysticfall's full-sized avatar

Xavier Cho mysticfall

  • Green Cat Software
  • Seoul, South Korea
View GitHub Profile
@mysticfall
mysticfall / gist:4721323
Last active December 12, 2015 05:28
Test case for a very experimental expression language support planned for Pivot4J 0.7 release. The purpose of the feature is to provide non-vendor specific alternative to Mondrian's Parameter() and ParamRef() pseudo-functions. The "fm:" prefix means it uses FreeMarker template engine for EL translation. The expression parameters is preserved whe…
/*
* ====================================================================
* This software is subject to the terms of the Common Public License
* Agreement, available at the following URL:
* http://www.opensource.org/licenses/cpl.html .
* You must accept the terms of that agreement to use this software.
* ====================================================================
*/
package com.eyeq.pivot4j.el;
@mysticfall
mysticfall / po.ko
Last active December 14, 2015 14:18
Saiku translation for Korean language.
{
"locale" : "ko",
"translator_name" : "Xavier Cho",
"Loading datasources...." : "데이터 원본을 읽어오는 중입니다...",
"New query" : "새 질의",
"Open query": "질의 열기",
"Logout" : "로그아웃",
"About" : "정보",
"Issue Tracker" : "문제점 보고",
"lt" : "한국어",
@mysticfall
mysticfall / gist:0cad779345150ba23869
Created August 31, 2014 07:48
IsolatedScope example
object CustomerDirective extends ElementDirective with TemplateUrlProvider with IsolatedScope {
override val name = "myCustomer"
override val templateUrl = "my-customer-iso.html"
bindings ++= Seq(
"customerInfo" := "info",
"title" :@ "",
"close" :& "onClose"
package todomvc.example
import scala.scalajs.js
import scala.scalajs.js.Any.{ fromFunction1, fromString, jsArrayOps }
import scala.scalajs.js.annotation.JSExport
import org.scalajs.dom.{ Element, console }
import com.greencatsoft.angularjs.{ Attributes, Controller, ElementDirective, IsolatedScope, Requires, TemplatedDirective }
import com.greencatsoft.angularjs.core.Scope
package com.greencatsoft.greenlight.grammar
import scala.language.implicitConversions
import com.greencatsoft.greenlight.{ TestRegistry, TestReporter }
import com.greencatsoft.greenlight.grammar.ModalVerb.{ Can, Must, Should }
import com.greencatsoft.greenlight.grammar.Specification.{ CaseDescription, WhatIsExpected }
import com.greencatsoft.greenlight.grammar.Statement.{ Assertation, CaseDefinition }
import com.greencatsoft.greenlight.grammar.Verb.FollowedByNegation
import com.greencatsoft.greenlight.matcher.Matcher
using System;
using System.IO;
using System.Threading.Tasks;
using AlleyCat.Autowire;
using AlleyCat.Common;
using Godot;
namespace AlleyCat.IO
{
[Singleton(typeof(IResourceMonitor))]
var loader = ResourceUtils
.Load<PackedScene>("res://Data/Scenes/Character Creator.tscn")
.ToObservable(this.GetScheduler());
var progress = loader.SelectMany(v => v.LeftAsEnumerable().ToObservable());
var scene = loader.SelectMany(v => v.RightAsEnumerable().ToObservable());
progress.Subscribe(e => GD.Print($"- Progress: {e.Done} of {e.Total}"));
scene.Subscribe(s => GD.Print($"- Finished loading: {s}"));
@mysticfall
mysticfall / PairedEyeSight.cs
Created March 25, 2019 02:51
Snippet from initial attempt to implement the eye tracking
protected virtual void OnAnimation(float delta)
{
if (!Skeleton.FindClosestAncestor<INamed>().Exists(n => n.DisplayName == "Player"))
{
LookAt(Skeleton.FindPlayer<IHumanoid>().Map(p => p.Vision.Viewpoint));
}
EyeTrackingTarget.Iter(target =>
{
Range<float> AddRange(Range<float> range1, Range<float> range2) =>
@mysticfall
mysticfall / BlendmapTest.cs
Created July 22, 2019 22:57
WIP converting generate_map.gd in C#
using System;
using System.Collections.Generic;
using static System.Linq.Enumerable;
using System.Linq;
using AlleyCat.Common;
using AlleyCat.Event;
using Godot;
using Godot.Collections;
using JetBrains.Annotations;
using LanguageExt;
class Fixture:
value = rv.from_value(1)
doubled = rv.map(value)(ops.map(lambda v: v * 2))
numbers = rv.combine(value, doubled)(lambda o: rx.combine_latest(*o))
combined = rv.combine_latest(value, doubled)(ops.map(lambda v: f"value = {v[0]}, doubled = {v[1]}"))
zipped = rv.zip(value, doubled)(ops.map(lambda v: f"{v[0]} * 2 = {v[1]}"))