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
function IllegalArgumentError(message) { | |
Error.call(this, message); | |
this.name = 'IllegalArgumentError'; | |
} | |
IllegalArgumentError.prototype = new Error(); | |
IllegalArgumentError.prototype.constructor = IllegalArgumentError; |
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
"use strict"; | |
// Base Girl object. | |
function Girl() { | |
this.name = ''; | |
this.traits = {}; | |
} | |
// Scout `is a` Girl | |
function Scout() { |
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
def fib(n: Long): Long = { | |
@annotation.tailrec | |
def go(n: Long, x: Long, y: Long): Long = | |
n match { | |
case 0 => x | |
case 1 => y | |
case _ => go(n - 1, y, x + y) | |
} | |
go(n, 0, 1) |
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 static <T extends Comparable<? super T>> int rank(T[] seq, T key) { | |
return rank(seq, key, 0, seq.length - 1); | |
} | |
public static <T extends Comparable<? super T>> int rank(T[] seq, T key, int lo, int hi) { | |
if (lo > hi) | |
return -1; | |
int mid = lo + (hi - lo) / 2; | |
int rel = key.compareTo(seq[mid]); |
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
# PostgreSQL | |
if (outcome != success) of /subsystem=datasources/jdbc-driver=postgres:read-resource | |
/subsystem=datasources/jdbc-driver=postgres:add(driver-name=postgres,jdbc-compliant=true,driver-module-name=org.postgres.jdbc,driver-class-name=org.postgresql.Driver,driver-datasource-class-name=org.postgresql.ds.PGPoolingDataSource,xa-datasource-class=org.postgresql.xa.PGXADataSource) | |
end-if | |
# SQL Server | |
if (outcome != success) of /subsystem=datasources/jdbc-driver=sqlserver:read-resource | |
/subsystem=datasources/jdbc-driver=sqlserver:add(driver-name=sqlserver,jdbc-compliant=true,driver-module-name=org.jtds.jdbc,driver-class-name=net.sourceforge.jtds.jdbc.Driver,driver-datasource-class-name=net.sourceforge.jtds.jdbcx.JtdsDataSource,xa-datasource-class=net.sourceforge.jtds.jdbcx.JtdsDataSource) | |
end-if |
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
# PostgreSQL | |
/subsystem=datasources/data-source={{data-source-name}}:add(jndi-name="{{jndi-name}}",driver-name="postgres",connection-url="{{jdbc-uri}}",user-name={{username}},password={{password}},enabled=true,use-java-context=true,background-validation=false,validate-on-match=true,valid-connection-checker-class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker",exception-sorter-class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter",min-pool-size=1,max-pool-size=10,idle-timeout-minutes=3) | |
# SQL Server | |
/subsystem=datasources/data-source={{data-source-name}}:add(jndi-name="{{jndi-name}}",driver-name="sqlserver",connection-url="{{jdbc-uri}}",user-name={{username}},password={{password}},enabled=true,use-java-context=true,background-validation=false,validate-on-match=true,valid-connection-checker-class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker",min-pool-size=1,max-pool-size=10,idle-timeout-minutes=3) | |
# Oracl |
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
/subsystem=resource-adapters/resource-adapter=file/connection-definitions={{data-source-name}}:add(enabled=false,jndi-name="{{jndi-name}}",class-name="org.teiid.resource.adapter.file.FileManagedConnectionFactory",min-pool-size=1,max-pool-size=10,flush-strategy=FailingConnectionOnly) | |
/subsystem=resource-adapters/resource-adapter=file/connection-definitions={{data-source-name}}/config-properties=ParentDirectory:add(value={{directory-pathname}}) | |
/subsystem=resource-adapters/resource-adapter=file/connection-definitions={{data-source-name}}:write-attribute(name=enabled,value=true) |
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
# PostgreSQL | |
xa-data-source add --name={{data-source-name}} --jndi-name={{jndi-name}} --driver-name=postgres --user-name={{username}} --password={{password}} --use-java-context=true --min-pool-size=1 --max-pool-size=10 --idle-timeout-minutes=3 --background-validation=false --validate-on-match=true --valid-connection-checker-class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker" --exception-sorter-class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter" --xa-datasource-properties={ServerName={{host}},PortNumber=5432,DatabaseName={{database}}} |
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
# PostgreSQL | |
module add --name=org.postgres.jdbc --dependencies=javax.api,javax.transaction.api --resources={/path/to/jdbc/driver.jar} | |
# SQL Server | |
module add --name=org.jtds.jdbc --dependencies=javax.api,javax.transaction.api --resources={/path/to/jdbc/driver.jar} | |
# Oracle | |
module add --name=com.oracle.jdbc --dependencies=javax.api,javax.transaction.api --resources={/path/to/jdbc/driver.jar} | |
# MySQL |
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
{ | |
"keyboard": "atreus62", | |
"keymap": "atreus62-ehsanj", | |
"layout": "LAYOUT", | |
"layers": [ | |
[ "KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_TAB", "KC_Q", "KC_W", "KC_F", "KC_P", "KC_G", "KC_J", "KC_L", "KC_U", "KC_Y", "KC_SCLN", "KC_EQL", "LT(3,KC_DEL)", "KC_A", "KC_R", "KC_S", "KC_T", "KC_D", "KC_H", "KC_N", "KC_E", "KC_I", "KC_O", "LT(2,KC_QUOT)", "KC_LSPO", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_K", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSPC", "MEH_T(KC_CAPS)", "TO(1)", "KC_BSLS", "KC_LEFT", "LCTL_T(KC_RGHT)", "LALT_T(KC_BSPC)", "LGUI_T(KC_ESC)", "RGUI_T(KC_ENT)", "RALT_T(KC_SPC)", "RCTL_T(KC_UP)", "KC_DOWN", "KC_LCBR", "KC_RCBR", "ALL_T(KC_SLCK)" ], | |
[ "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_S", "KC_D", " |
OlderNewer