GIL https://wiki.python.org/moin/GlobalInterpreterLock
5 threads:
python3 ./multithreading.py
Execution time with GIL: 20.465982913970947
Execution time without GIL: 4.411532878875732
GIL https://wiki.python.org/moin/GlobalInterpreterLock
5 threads:
python3 ./multithreading.py
Execution time with GIL: 20.465982913970947
Execution time without GIL: 4.411532878875732
spring.datasource.url=jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE | |
spring.datasource.driverClassName=org.h2.Driver | |
spring.datasource.username=sa | |
spring.datasource.password= | |
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect | |
spring.h2.console.enabled=true |
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
# If you use bash, this technique isn't really zsh specific. Adapt as needed. | |
source ~/keychain-environment-variables.sh | |
# AWS configuration example, after doing: | |
# $ set-keychain-environment-variable AWS_ACCESS_KEY_ID | |
# provide: "AKIAYOURACCESSKEY" | |
# $ set-keychain-environment-variable AWS_SECRET_ACCESS_KEY | |
# provide: "j1/yoursupersecret/password" | |
export AWS_ACCESS_KEY_ID=$(keychain-environment-variable AWS_ACCESS_KEY_ID); | |
export AWS_SECRET_ACCESS_KEY=$(keychain-environment-variable AWS_SECRET_ACCESS_KEY); |
# If you use bash, this technique isn't really zsh specific. Adapt as needed. | |
source ~/keychain-environment-variables.sh | |
# AWS configuration example, after doing: | |
# $ set-keychain-environment-variable AWS_ACCESS_KEY_ID | |
# provide: "AKIAYOURACCESSKEY" | |
# $ set-keychain-environment-variable AWS_SECRET_ACCESS_KEY | |
# provide: "j1/yoursupersecret/password" | |
export AWS_ACCESS_KEY_ID=$(keychain-environment-variable AWS_ACCESS_KEY_ID); | |
export AWS_SECRET_ACCESS_KEY=$(keychain-environment-variable AWS_SECRET_ACCESS_KEY); |
function findAll(entityType: string, query: QueryObject): Promise<Array<any>> { | |
const table: Dexie.Table<any, any> = db.table(entityType); | |
// if there is filter query try to apply filters | |
const maybeFiltered = applyFilteringObject(table, query.filter); | |
const maybePaginated = applyPaginationObject(maybeFiltered, query.pagination) | |
const promise = maybePaginated.toArray(); | |
return promise; | |
} |
function get(url, callback) { | |
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == XMLHttpRequest.DONE) { | |
callback(xhr.responseText) | |
} | |
} | |
xhr.open('GET', url, true); | |
xhr.send(null); | |
} |
package com.emil.android.util; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.telephony.TelephonyManager; | |
/** | |
* Check device's network connectivity and speed | |
* @author emil http://stackoverflow.com/users/220710/emil |
package com.collectiveidea.example; | |
import android.content.Intent; | |
import android.support.test.espresso.intent.Intents; | |
import android.support.test.rule.ActivityTestRule; | |
import android.support.test.runner.AndroidJUnit4; | |
import com.collectiveidea.example.ui.LoginActivity; | |
import com.collectiveidea.example.ui.MainActivity; | |
import com.collectiveidea.example.util.AccountUtility; |
install PostgreSQL 9 in Mac OSX via Homebrew | |
Mac OS X Snow Leopard | |
System Version: Mac OS X 10.6.5 | |
Kernel Version: Darwin 10.5.0 | |
Install notes for PostgreSQL 9.0.1 install using Homebrew: | |
sh-3.2# brew install postgresql |