Skip to content

Instantly share code, notes, and snippets.

convexHull <- function(x)
{
indices <- chull(x[,1], x[,2])
points <- x[indices,]
points
}
convexHullFactory <- function()
{
list(name=convexHull,udxtype=c("transform"),intype=c("float","float"), outtype=c("float","float"), outnames=c("x","y"))
}
@ondrej-kvasnovsky
ondrej-kvasnovsky / gist:c8bc49e83eabd858d226
Last active May 27, 2016 21:28
Management vocabulary

"It is what it is."

"Now is now."

"We do not know what we do not know."

"Keep doing what you are doing."

"You gotta do what you gotta do."

@ondrej-kvasnovsky
ondrej-kvasnovsky / History.java
Created June 18, 2015 01:32
Back and forward implementation
import java.util.ArrayDeque;
import java.util.Deque;
public class History<ENTITY> {
private Deque<ENTITY> backStack = new ArrayDeque<>();
private Deque<ENTITY> forwardStack;
private ENTITY current;
private int max;
@ondrej-kvasnovsky
ondrej-kvasnovsky / app.css
Created July 7, 2015 22:18
Remove shadow from TextArea in JavaFX 8
.text-area {
-fx-background-insets: 0;
-fx-background-color: transparent, white, transparent, white;
-fx-background-radius: 0, 0, 0, 0;
-fx-box-border: none;
-fx-focus-color: -fx-control-inner-background;
-fx-faint-focus-color: -fx-control-inner-background;
-fx-text-box-border: -fx-control-inner-background;
-fx-border-width: -1;
@ondrej-kvasnovsky
ondrej-kvasnovsky / questions.txt
Created July 28, 2015 17:26
Software Craftsman Questions
Are we missing big pictue?
Are we missing the goal and crucial features of application?
Are we talking too much about big picture, goals, crucial features? Maybe we should just do it.
@ondrej-kvasnovsky
ondrej-kvasnovsky / rejection.md
Last active October 22, 2015 05:51
Apps that use non-public APIs will be rejected

October 18, 2015 at 5:29 PM

From Apple

2.5 - Apps that use non-public APIs will be rejected

The use of non-public APIs can lead to a poor user experience should these APIs change in the future, and is therefore not permitted. The following non-public APIs are included in your application:

From the framework: '/usr/lib/libicucore.A.dylib'

  • ubrk_getRuleStatus
@ondrej-kvasnovsky
ondrej-kvasnovsky / test.sh
Last active October 30, 2015 20:54
Test Java 1.8.0_51 and 1.8.0_60 with otool
~ cd /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib
~ otool -L libjfxwebkit.dylib | grep icu
# nothing is found
~ cd /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib
~ otool -L libjfxwebkit.dylib | grep icu
/usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current version 51.1.0)
~ cd /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib
~ otool -L libjfxwebkit.dylib | grep icu
@ondrej-kvasnovsky
ondrej-kvasnovsky / playground1.swift
Last active January 29, 2016 06:58
Playground 1 for Swift
//: Playground
import UIKit
// variable
var str = "Hello, playground"
print(str)
//: Playground
import UIKit
// we can use semicolons
let cat = "🐱"; print(cat)
// integer
print(UInt8.min)
print(UInt8.max)