Skip to content

Instantly share code, notes, and snippets.

(ns hiperk.jfx.checkbox-demo
(:require [fn-fx.fx-dom :as dom]
[fn-fx.diff :refer [component defui render should-update?]]
[fn-fx.controls :as ui]))
(defui Stage
(render [this {:keys [accepted?]}]
(ui/stage
:title "Checkbox Demo"
:shown true
@tothda
tothda / keybase.md
Created April 11, 2018 15:55
keybase.md

Keybase proof

I hereby claim:

  • I am tothda on github.
  • I am tothda (https://keybase.io/tothda) on keybase.
  • I have a public key ASD76X_gZujWlUDhHibp3daWs4NMU9mkc-bCpLLGXR7cFwo

To claim this, I am signing this object:

@tothda
tothda / java_trust_manager.rb
Created January 20, 2011 11:42
Disable Java SSL certificate and hostname verification from JRuby
require 'java'
class JavaTrustManager
include javax.net.ssl.X509TrustManager
include javax.net.ssl.HostnameVerifier
# implementation of X509TrustManager
def check_client_trusted(a, b); end
def check_server_trusted(a, b); end
def accepted_issuers
@tothda
tothda / gist:267522
Created January 2, 2010 15:13
Eight queens puzzle in clojure.
;; usage: (print-solutions (eight-queens))
(ns eight-queens
(:use clojure.test)
(:use clojure.contrib.str-utils))
(def N 8)
(defn distance [x y] (Math/abs (- x y)))
select
case when level = 1 then own || '.' || obj || ' (' || typ || ')' else
lpad (' ', 2*(level-1)) || obj || nvl2 (typ, ' (' || typ || ')', null)
end
from
(
/* THE OBJECTS */
select
null p1,
null p2,
select
lpad(' ', 2*level) || c "Privilege, Roles and Users"
from
(
/* THE PRIVILEGES */
select
null p,
name c
from
system_privilege_map
select
lpad(' ', 2*level) || granted_role "User, his roles and privileges"
from
(
/* THE USERS */
select
null grantee,
username granted_role
from
dba_users
## post.rb
class Post < ActiveRecord::Base
has_many :comments
def after_initialize
comments.first
end
end
require 'rubygems'
require 'sequel'
DB = Sequel.connect('jdbc:mysql://localhost/sequel_test?user=root&password=')
DB.create_table! :policies do # Create a new table
primary_key :id, :serial
date :term_start_date
varchar :policy_ref, :size => 30
end
-- Ha sikerül ilyen módon létrehozni egy (read-only) walletet akkor már csak annyi a teendő,
-- hogy a kódban a request elküldése elé elhelyezzük a következő kódot:
utlhttp.setwallet(wallet_path);
-- wallet_path a wallet elérési útját jelöli