Skip to content

Instantly share code, notes, and snippets.

View jballanc's full-sized avatar

Joshua Ballanco jballanc

View GitHub Profile
@jballanc
jballanc / repl-session.clj
Last active August 29, 2015 14:06
Nested datomic components
(use '[datomic.api :only [q db] :as d])
(use 'clojure.pprint)
(def uri "datomic:mem://seattle")
(d/create-database uri)
(def conn (d/connect uri))
(def schema-tx
[{:db/id #db/id[:db.part/db]
:db/ident :author/name
--- /Users/jballanc/Downloads/ConcurrentStatisticsImpl.java 2014-08-25 04:04:59.000000000 +0300
+++ ConcurrentStatisticsImpl.java 2014-08-24 19:58:59.000000000 +0300
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2010, Red Hat Inc. or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Inc.

Ruby on Rails Interview Questions

Q1.

What is the difference between Ruby's Hash and ActiveSupport's HashWithIndifferentAccess?

Answer

The Hash class in Ruby's core library retrieves values by doing a standard ==

iOS Interview Questions

Q1.

In the UITableViewCell constructor - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier what is the purpose of the reuseIdentifier? What is the advantage of setting it to a non-nil value?

Answer

# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Glencoe Software, Inc.
# All rights reserved.
import time
import tempfile
import os
import omero.gateway
# Mac OS X Specific
.DS_Store
.AppleDouble
.LSOverride
# Xcode Project Files
*.mode1v3
*.mode2v3
*.pbxuser
Delivered-To: jballanc@circleci.com
Received: by 10.216.96.132 with SMTP id r4csp199874wef;
Thu, 22 May 2014 10:01:54 -0700 (PDT)
X-Received: by 10.152.10.168 with SMTP id j8mr43748070lab.37.1400778114799;
Thu, 22 May 2014 10:01:54 -0700 (PDT)
Return-Path: <role-employees-do-not-contact+bncBCVKDHFPTUBRBAW37CNQKGQEUXGVBDI@circleci.com>
Received: from mail-lb0-x246.google.com (mail-lb0-x246.google.com [2a00:1450:4010:c04::246])
by mx.google.com with ESMTPS id ja5si412369lac.43.2014.05.22.10.01.54
for <jballanc@circleci.com>
class Foo
=> MyAttribute
def bar
puts "Attributed method"
end
=> typecheck("Fixnum -> String")
def baz(num)
"Your number is #{num}"
end

Keybase proof

I hereby claim:

  • I am jballanc on github.
  • I am jballanc (https://keybase.io/jballanc) on keybase.
  • I have a public key whose fingerprint is 565E 8F89 E532 9642 47B2 D319 A838 04FC 9A1C 6D3A

To claim this, I am signing this object:

> cat sample.txt
first
second
start
third
fourth
fifth
sixth
stop