This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package simurrythmia.ui.util; | |
import java.awt.GridBagConstraints; | |
import java.awt.GridBagLayout; | |
import java.awt.Insets; | |
import javax.swing.BorderFactory; | |
import javax.swing.JComponent; | |
import javax.swing.JPanel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am mverzilli on github. | |
* I am mverzilli (https://keybase.io/mverzilli) on keybase. | |
* I have a public key whose fingerprint is 1A62 F4E8 C9E1 3F5E 913E 60A4 029B 117E D8E9 4948 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JavaScript: | |
var data = [] | |
for (var i = 0; i < 84; i++) { | |
data.push(i * 10 / 84); | |
} | |
CoffeeScript: | |
data = (i * 10 / 84 for i in [0..83]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
width = 760 | |
height = 260 | |
xmin = -1.2 | |
xmax = 5 | |
x_scale = d3.scale.linear() | |
x_scale.domain([xmin, xmax]) | |
.range [0, width] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public User GetUserByEmail(string email) | |
{ | |
var key = email; | |
var user = Cache.Cache.Get<User>(key); | |
if (user == null) | |
{ | |
try | |
{ | |
user = builder.BuildFromNewDbs(email); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public User GetUserByEmail(string email) | |
{ | |
/* | |
* I use the email param as a key to get a user from cache, | |
* so I store the email in a variable called "key". | |
* If the user is in cache, we're done! If the user isn't in cache, | |
* I try to get it from the new database. | |
* If the user isn't in the new database, everything may blow up, | |
* so I have to be careful just in case it does. | |
* There's no way for me to know whether the user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public User GetUserByEmail(string email) | |
{ | |
/* | |
* I use the email param as a key to get a user from cache, | |
* so I store the email in a variable called "key". | |
* If the user is in cache, we're done! If the user isn't in cache, | |
* I try to get it from the new database. | |
* If the user isn't in the new database, everything may blow up, | |
* so I have to be careful just in case it does. | |
* There's no way for me to know whether the user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public User GetUserByEmail(string email) | |
{ | |
/* | |
* You give me an email and I'll give you a user. | |
* By the way, I'll make use of a cache layer so that | |
* your request doesn't result in performance issues. | |
* It's not a wonderful world (sorry, Louis Armstrong), | |
* so in case something goes wrong I'll just write it down | |
* for someone to take a look at it later. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@columns = [] | |
ConditionCodeProperty.select('property, format, field_name').select('GROUP_CONCAT(condition_code) as conditions').group('property, format, field_name').where(condition_code: current_user.condition_codes).each do |condition_code_property| | |
unless Result.is_common(condition_code_property.property) | |
common = Result.is_extended_common(condition_code_property.property) | |
column = { | |
property_name: condition_code_property.property, | |
value_accessor: condition_code_property.property, | |
human_name: Result.human_name_for(condition_code_property.property), | |
field_name: condition_code_property.field_name, | |
extended: !common, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@[Link(framework: "Accelerate")] | |
lib LibLapack | |
fun sgetrf_(m: Int32*, n: Int32*, a: Void*, lda: Int32*, ipiv: Int32*, info: Int32*) | |
fun sgetri_(n: Int32*, a: Void*, lda: Int32*, ipiv: Int32*, work: Void*, lwork: Int32*, info: Int32*) | |
end | |
# Matrix A (the one being inverted) | |
# Matrix [1 2 | |
# 3 4] |