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
// load the module | |
var Clustal = require("biojs-io-clustal"); | |
// console | |
var current = document.createElement('p'); | |
document.body.appendChild(current); | |
Clustal.read("http://dev.biojs-msa.org/v1/dummy/samples/p53.clustalo.clustal", function(seqs){ | |
current.innerHTML = seqs.length + " seqs have been loaded"; | |
}) |
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
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script src="http://wzrd.in/bundle/biojs-vis-chromosome@latest"></script> | |
<link rel="stylesheet" href="https://raw.githubusercontent.com/4ndr01d3/js-components/master/util-area_selector/css/area_selector.css"> | |
<link rel="stylesheet" href="https://raw.githubusercontent.com/4ndr01d3/js-components/master/biojs-vis-chromosome/css/chromosome.css"> | |
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css"> | |
<div id='yourDiv'></div> |
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
var parser = require("biojs-io-newick").parse_nwk; | |
var canvas = document.createElement("canvas") | |
canvas.width = 500 | |
canvas.height = 500 | |
document.body.appendChild(canvas) | |
var context = canvas.getContext("2d") | |
context.lineWidth = 5; | |
context.font="16px Arial"; |
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
var parser = require("biojs-io-snipspector"); | |
var _ = require("underscore"); | |
var vis = function(opts){ | |
var divEl = opts.el; | |
var self = this; // save reference to itself (in callbacks this is different) | |
var el = divEl; | |
parser.read("http://files.biojs.net/chromosomes/manny", function(result){ | |
for(var i=0; i < result.length; i++) { |
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
iv: -0x1p+0, -0x1.ccccccccccccdp-1 | |
iv: -0x1p+0, -0x1.ccccccccccccdp-1 | |
Interval!real(-1, -0.9, 2, 0, -nan, 0.118267, 2.00562, LinearFun!real(nan, nan, nan), LinearFun!real(nan, nan, nan)) | |
--- | |
iv.lx -1.0000000000 (-0x8p-3) | |
hat.a 0.1182672100 (0xf.23614391d01ffb5p-7) | |
hat.slope 1.1826721000 (0x9.761cca3b2214947p-3) | |
hat.y -0.9000000000 (-0xe.6666666666668p-4) | |
hat(p1) 0.0000000000 (0x0p+0) | |
hat(p2) 0.1182672100 (0xf.23614391d01ffb5p-7) |
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
type: float | |
iv1: -0x1p+0, -0x1.ccccccp-1 | |
Interval!float(-1, -0.9, 2, 0, -nan, 0.118267, 2.00563, LinearFun!float(nan, nan, nan), LinearFun!float(nan, nan, nan)) | |
iv.lx -1.0000000000 (-0x1p+0) | |
hat.a 0.1182672605 (0x1.e46c36p-4) | |
hat.slope 1.1826723814 (0x1.2ec39ep+0) | |
hat.y -0.8999999762 (-0x1.ccccccp-1) | |
hat(p1) -0.0000000075 (-0x1p-27) //-0 | |
hat(p2) 0.1182672605 (0x1.e46c36p-4) | |
--- |
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
> rdmd -unittest -main ele.d | |
-0x1.820d74p-3 | |
-0x1.820d74p-3 | |
> rdmd -unittest -main-m32 ele.d | |
-0x1.820d76p-3 | |
-0x1.820d74p-3 |
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
void main() | |
{ | |
alias S = float; | |
S s1 = 0x1.24c92ep+5; | |
S s2 = -0x1.1c71c8p+0; | |
import std.math : std_pow = pow; | |
import core.stdc.stdio : printf; | |
import core.stdc.math: powf; |
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
import std.stdio; | |
alias S = float; | |
float shL = 0x1.1b95eep-4; // -0.069235 | |
float shR = 0x1.9c7cfep-7; // -0.012588 | |
F fun(F)(F x) | |
{ | |
return 1.0 + x * 2; | |
} |
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
S fun(S)(in S x) | |
{ | |
return -1 / x; | |
} | |
void main() | |
{ | |
alias S = double; // same for float | |
S i = fun!S(3); | |
assert(i == S(-1) / 3); // this lines passes |
OlderNewer