Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@doble-d
doble-d / ghk_calculator.dart
Created January 13, 2021 21:17
Goldman-Hodgkin-Katz equation in dart lang.
import 'dart:math' as math;
// Temperatures should be in Kelvin
// pK, pNa, and pCl refer to the permeability. (e.g. If the channels for Na are closed, Na permeability is 0 (zero))
// Everything In or Out is in mM
// Membrane potential (voltage) is returned as mV
double ghkCalculator(double temperature,
double pK, double pNa, double pCl,
double kIn, double kOut,
@doble-d
doble-d / nernst_calculator.dart
Last active January 12, 2021 06:20
Nernst equation in dart lang
import 'dart:math' as math;
// Temperature should be in Kelvin
// Valence is just the valence. -1 for Cl- or +1 for Na+
// xOut and xIn are in mM
// Voltage returns as mV
double nernsCalculator(double temperature, double valence, double xOut, double xIn) {
double voltage;
const double faradayConstant = 96485.0;
@doble-d
doble-d / AND_OR_NOT
Created August 28, 2020 23:43 — forked from oliverdoetsch/AND_OR_NOT
Blogger: Globally conditional data tags for all page types
#AND
<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.searchQuery'>
<!--search_page AND index_page-->
</b:if>
</b:if>
#OR