I am Data Science consultant helping businesses make data-driven business decisions.
I combine my business acumen, rich technical experience and passion about everything data to build intuitive, easy-to-use data products, helping my clients become well-oiled, money-making machines.
I was profiled on Simply Statistic blog as on of the top performers in Johns Hopkins Unversity and Coursera Data Science Specialization.
Since 2009 I've been working in the affiliate marketing sector of iGaming industry with some of the major brands.
Read more about me.


--- layout: post title: Inktober day two description: Inktober 2019, day two, "mindless" date: '2019-10-02 22:59:12 +0100' categories: - Sketches ---
Day two, "mindless".


DOM Manipulation Exercises
Task 2 a
AddText
Task 2 b
Red
Red
Task 2 c
Go to Google
With jQuery
Task 4 a
Task 4 b
Red
Green
Task 4 c
ADD
The sum is


{% include "console/components/placeholders/table_placeholder.html" with
height='200px'
image='console/images/illustrations/outline/lab.svg'
message='No locations were found for your active license.'
title='No Locations Found'
url='/traceability/locations/locations?new=true'
only
%}


Release Notes for Sqoop 1.1.0: September, 2010
This document lists all Sqoop issues included in version 1.1.0
not present in the previous release, 1.0.0.
Bug fixes:
- [SQOOP-62] - Fix failing Oracle compatibility tests.
- [SQOOP-94] - COMPILING.txt does not mention all dependencies.
- [SQOOP-86] - Release note generation requires python 2.5.
- [SQOOP-85] - Additional documentation build adjustments.
- [SQOOP-81] - Creation of /tmp/sqoop/compile is not multi-user friendly.
- [SQOOP-84] - Fix documentation build error under CentOS.
- [SQOOP-80] - bin/configure-sqoop improperly escapes shell variable names.
- [SQOOP-47] - NPE if --append is specified with HBase import target.
- [SQOOP-72] - sqoop-eval should use PreparedStatement.execute().
- [SQOOP-38] - Direct PostgreSQL import only works when providing a port.
- [SQOOP-68] - Delimiters in strings are not escaped properly.
- [SQOOP-66] - Jar for ConnManager class is not included in job payload.
- [SQOOP-63] - JobBase classes unnecessarily create ConnManagers.
- [SQOOP-52] - Stop TestHBaseImport from timing out.
- [SQOOP-55] - BaseSqoopTestCase.createTableWithColTypes() calls close() twice.
- [SQOOP-45] - If compilation dir is unspecified, use a nonce directory.
- [SQOOP-6] - Job completion percentage is inaccurate.
- [SQOOP-15] - Do not assume that Job.getCounters() returns non-null.
- [SQOOP-32] - sqoop-export documentation in SqoopUserGuide refers to 'import-args'.
- [SQOOP-22] - Sqoop date tests are too permissive.
- [SQOOP-2] - MySQLExportMapper does not send username.
Improvements:
- [SQOOP-89] - Support multiple output files in ManagerCompatTestCase.
- [SQOOP-88] - Parameterize pre-table-import validity checks in SqlManager.
- [SQOOP-79] - Add scripts to start/stop metastore in background, use pidfiles.
- [SQOOP-51] - Document driver jar installation process.
- [SQOOP-75] - Allow configuration of ManagerFactories through a configuration subdirectory.
- [SQOOP-73] - Generated records should handle more boolean value formats.
- [SQOOP-40] - SqoopOptions should use annotations to bind fields to properties.
- [SQOOP-69] - Improve data accessible to ManagerFactory.accept().
- [SQOOP-65] - Refactor some utilities out of MySQLExportMapper.
- [SQOOP-59] - 'sqoop eval' should support DDL/DML operations.
- [SQOOP-56] - Improve parameterization of ManagerCompatTestCase.
- [SQOOP-54] - Allow per-manager configuration of isolation level for metadata queries.
- [SQOOP-53] - Build test jar and publish to maven.
- [SQOOP-35] - Bundle job dependencies via DistributedCache.
- [SQOOP-46] - Sqoop 'verbose' mode shows too much IPC chatter.
- [SQOOP-10] - Provide a useful error message when a Java compiler cannot be found.
- [SQOOP-4] - Add update-mode export process.
New features:
- [SQOOP-90] - Tool to merge datasets imported via incremental import.
- [SQOOP-76] - Add automated release note generation script.
- [SQOOP-36] - Redistribute mysql-connector-j with Sqoop.
- [SQOOP-41] - Add support for incremental imports.
- [SQOOP-39] - (SIP-6) Session Management API.
- [SQOOP-14] - Allow Sqoop to import data into HBase.
- [SQOOP-3] - Add ability to import arbitrary queries.
- [SQOOP-16] - Generate Eclipse project with ant.
Tasks:
- Increment version number for release.
- [SQOOP-78] - Consolidate web-based documentation and tarball documentation.
- [SQOOP-60] - Include SIP-6 document in source repository.
- [SQOOP-42] - Document saved jobs, metastore, and incremental imports.
- [SQOOP-77] - Rename saved sessions to saved jobs.
- [SQOOP-64] - Refactor named FIFO creation into standalone utility.
- [SQOOP-24] - Copy o.a.h.mapreduce.lib.db classes into Sqoop.
- [SQOOP-23] - Add accepted SIPs to the repository.
- Sqoop can compile against locally-installed Hadoop
- SequenceFile detection should ignore directories.
- OracleManager should limit getColNamesQuery() results.
- Allow explicitly-set git hash in version info.
- Provide maven install/deploy tasks.
- Add 'release' target for one-step full build.
- Add release audit capability.
- Add webdocs target to build release docs website.
- 'conf' directory added to classpath
- Adjust regex used to recognize CDH3 in ShimLoader.
- Update ivy to use latest CDH staging build.
- Set default Hadoop distribution to Cloudera (CDH).
- Increment version for master branch.


Brawn
4
Agility
3
Intellect
1
Cunning
Willpower
Presence
Soak
5
Wound Threshold
14
Strain Threshold
13
Melee/Ranged Defenses
0 | 0


This tab consists of several basic properties that should be set for all rooms. Most of these properties are presentational in manner and have little mechanical value in terms of gameplay.
SetShort(string)
The title of the room that appears at the top of the description when the player enters. Can take a string or a value escaped with $.
SetLight(int) or SetProperty("light",int)
Represents the brightness of a room. Default value is 30. For stellarmass
anything below 20 is considered low-light and anything below 12 is near pitch black.
As well, anything over 50 is over-bright.
SetClimate(string)
Sets the weather patterns for the room. Items are loaded from the configuration file.
SetLong(string)
The detailed description of the room. Viewed when the player first enters the room (if player has long descriptions turn on) or when using the look command.
n/a
This is just a switch to enable or disable the text boxes for Day and Night long descriptions. It does not generate any code for itself but instead allows SetDayLong() and SetNightLong() to be output to the file when saved.
SetDayLong(string)
An alternate to SetLong() that is to be used in tandem with SetNightLong(). It sets the long description to be displayed during the daytime. Only works for rooms with a climate set to something other than indoors.
SetNightLong(string)
An alternate to SetLong() that is to be used in tandem with SetDayLong(). It sets the long descriptio to be displayed during the night time. Only works for rooms with a climate set to something other than indoors.
n/a
Chooses the icon to display on the room in the map domain view. This does have any effect on the code generated for this room.


Rudder
This gem provides a DSL for building Concourse CI pipelines.
Rubygems release docs can be found above, or head over to rudder.jhmcstanton.com for the latest docs from HEAD.
Goals
The intent of this project is to allow Concourse users to build complex pipelines with a fully featured language rather than error-prone YAML files.
Related goals:
-
Support referencing first-class concourse features (
resource-types
,resources
,jobs
, etc) inside pipeline definition (for example, a task may be able to use a previously defined resource as an input by passing a reference to it, rather than just its name) -
Support breaking pipeline definitions into multiple pieces to allow composing them together
-
Small amounts of pipeline validation
Current State
Currently this project supports building a pipeline from a single definition file. Pipelines can utilize other pipeline definitions by either entirely importing the contents or borrowing only specific pieces.
TODOs:
-
More tests & add a coverage tool
-
Add CI
Non-Goals
-
Tieing this project directly to concourse. The ecosystem is fairly large, so supporting all resources the community creates or each new feature of concourse would be arduous. Instead this aims to be general, at the cost of allowing users to create incorrect pipelines
Development
Use bundle exec rake docker_up
to stand up a local concourse
instance for pipeline development. Credit goes to Stark and Wayne for their
excellent Concourse
tutorial that includes the docker-compose.yml
found here.
Installation
Add this line to your application's Gemfile:
gem 'rudder'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rudder
Usage
DSL
See the DSL class documentation for specific details.
Compiling Pipelines
Compile your Rudder
definitions using the provided CLI tool:
Usage: rudder [options]
-o, --output YAML_PATH YAML_PATH to write the pipeline config
-c, --config RUDDER_CONFIG Path to the RUDDER_CONFIG file to evaluate
-l CONCOURSE_VARS, Path to the CONCOURSE_VARS yaml file
--load-vars-from
-v, --version Show version
Development
After checking out the repo, run bin/setup
to install
dependencies. Then, run rake spec
to run the tests. You can
also run bin/console
for an interactive prompt that will allow
you to experiment.
To install this gem onto your local machine, run bundle exec rake
install
. To release a new version, update the version number in
version.rb
, and then run bundle exec rake
release
, which will create a git tag for the version, push git
commits and tags, and push the .gem
file to rubygems.org.
Docs
Build the docs with
bundle exec rake yard
Contributing
Bug reports and pull requests are welcome on GitHub at github.com/jhmcstanton/rudder.
License
The gem is available as open source under the terms of the MIT License.


Create a AudioAnalyser object, which uses an
[link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode AnalyserNode] to analyse audio data.
This uses the
[link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API].
// create an AudioListener and add it to the camera
const listener = new THREE.AudioListener();
camera.add( listener );
// create an Audio source
const sound = new THREE.Audio( listener );
// load a sound and set it as the Audio object's buffer
const audioLoader = new THREE.AudioLoader();
audioLoader.load( 'sounds/ambient.ogg', function( buffer ) {
sound.setBuffer( buffer );
sound.setLoop(true);
sound.setVolume(0.5);
sound.play();
});
// create an AudioAnalyser, passing in the sound and desired fftSize
const analyser = new THREE.AudioAnalyser( sound, 32 );
// get the average frequency of the sound
const data = analyser.getAverageFrequency();
[example:webaudio_sandbox webaudio / sandbox ]
[example:webaudio_visualizer webaudio / visualizer ]
Create a new [page:AudioAnalyser AudioAnalyser].
An [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode AnalyserNode] used to analyze audio.
A non-zero power of two up to 2048, representing the size of the FFT (Fast Fourier Transform) to be used to determine the frequency domain. See [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize this page] for details.
A Uint8Array with size determined by [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/frequencyBinCount analyser.frequencyBinCount] used to hold analysis data.
Uses the Web Audio's [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData getByteFrequencyData] method. See that page.
Get the average of the frequencies returned by the [page:AudioAnalyser.getFrequencyData getFrequencyData] method.
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]


Shiba Inu
Dog Breed
The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan. A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally bred for hunting.
The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan. A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally bred for hunting.
Just a static content.
Demonstrating a list of users getting from github api


A minimalistic implemention of CMA-ES without using numpy
.
The Covariance Matrix Adaptation Evolution Strategy, CMA-ES, serves for numerical nonlinear function minimization.
The main functionality is implemented in
This code has two purposes:
- for READING and UNDERSTANDING the basic flow and the details of the
CMA-ES algorithm. The source code is meant to be read. For a quick
glance, study the first few code lines of
fmin
and the code of methodCMAES.tell
, where all the real work is done in about 20 lines of code (search "def tell" in the source). Otherwise, reading from the top is a feasible option, where the codes offmin
,CMAES.__init__
,CMAES.ask
,CMAES.tell
are of particular interest. - apply CMA-ES when the python module
numpy
is not available. Whennumpy
is available,cma.fmin
orcma.CMAEvolutionStrategy
are preferred to run "serious" simulations. The latter code has many more lines, but usually executes faster, offers a richer user interface, better termination options, boundary and noise handling, injection, automated restarts...
Dependencies: math.exp
, math.log
and random.normalvariate
(modules
matplotlib.pylab
and sys
are optional).
Testing: call python purecma.py at the OS shell. Tested with Python 2.6, 2.7, 3.3, 3.5, 3.6.
URL: http://github.com/CMA-ES/pycma
Last change: September, 2017, version 3.0.0
This code is released into the public domain (that is, you may use and modify it however you like).
| Author | |
| Nikolaus Hansen, 2010-2011, 2017 |
| Class |
|
container to keep track of the best solution seen |
| Class | CMAES |
class for non-linear non-convex numerical minimization with CMA-ES. |
| Class |
|
data logger for class CMAES , that can record and plot data. |
| Class |
|
static "internal" parameter setting for CMAES |
| Class |
|
Symmetric matrix maintaining its own eigendecomposition. |
| Class | ff |
versatile collection of test functions in static methods |
| Class |
|
rudimental square matrix class |
| Function | argsort |
return index list to get a in order, ie a[argsort(a)[i]] == sorted(a)[i] |
| Function | dot |
usual dot product of "matrix" A with "vector" b. |
| Function | eig |
eigendecomposition of a symmetric matrix. |
| Function | eye |
return identity matrix as list of "vectors" (lists themselves) |
| Function | fmin |
non-linear non-convex minimization procedure, a functional interface to CMA-ES. |
| Function | minus |
subtract vectors, return a - b |
| Function | plus |
add vectors, return a + b |
| Function | safe |
return s as str safe to eval or raise an exception. |
| Function | test |
test of the purecma module, called if __name__ == "__main__". |
| Variable | __ |
Undocumented |
| Variable | __author__ |
Undocumented |
| Variable | __license__ |
Undocumented |
| Variable | __version__ |
Undocumented |
usual dot product of "matrix" A with "vector" b.
A[i] is the i-th row of A. With transpose=True, A transposed is used.
eigendecomposition of a symmetric matrix.
Return the eigenvalues and an orthonormal basis of the corresponding eigenvectors, (EVals, Basis), where
- Basis[i]:
list
, is the i-th row of Basis - the i-th column of Basis, ie [Basis[j][i] for j in range(len(Basis))] is the i-th eigenvector with eigenvalue EVals[i]
Details: much slower than numpy.linalg.eigh
.
non-linear non-convex minimization procedure, a functional interface to CMA-ES.
Parameters
objective_fct
:callable
- a function that takes as input a
list
of floats (like [3.0, 2.2, 1.1]) and returns a singlefloat
(a scalar). The objective is to find x with objective_fct(x) to be as small as possible.xstart
:list
or sequence- list of numbers (like
[3.2, 2, 1]
), initial solution vector, its length defines the search space dimension.sigma
:float
- initial step-size, standard deviation in any coordinate
args
:tuple
or sequence- additional (optional) arguments passed to
objective_fct
ftarget
:float
- target function value
maxfevals
:int
orstr
- maximal number of function evaluations, a string is evaluated with N as search space dimension
verb_disp
:int
- display on console every
verb_disp
iteration, 0 for neververb_log
:int
- data logging every
verb_log
iteration, 0 for neververb_save
:int
- save logged data every verb_save * verb_log iteration
Return
The tuple
(xmin:list
, es:CMAES
), where xmin is the
best seen (evaluated) solution and es is the correspoding CMAES
instance. Consult help(es.result) of property result
for further
results.
Example
The following example minimizes the function ff.elli
:
>>> try: import cma.purecma as purecma ... except ImportError: import purecma >>> def felli(x): ... return sum(10**(6 * i / (len(x)-1)) * xi**2 ... for i, xi in enumerate(x)) >>> res = purecma.fmin(felli, 3 * [0.5], 0.3, verb_disp=100) # doctest:+SKIP evals: ax-ratio max(std) f-value 7: 1.0 3.4e-01<PHONE_NUMBER> 14: 1.0 3.9e-01 2341.50170536 700: 247.9 2.4e-01 0.629102574062 1400: 1185.9 5.3e-07 4.83466373808e-13 1421: 1131.2 2.9e-07 5.50167024417e-14 termination by {'tolfun': 1e-12} best f-value = 2.72976881789e-14 solution = [5.284564665206811e-08, 2.4608091035303e-09, -1.3582873173543187e-10] >>> print(res[0]) # doctest:+SKIP [5.284564665206811e-08, 2.4608091035303e-09, -1.3582873173543187e-10] >>> res[1].result[1]) # doctest:+SKIP 2.72976881789e-14 >>> res[1].logger.plot() # doctest:+SKIP
Details
After importing purecma
, this call:
>>> es = purecma.fmin(pcma.ff.elli, 10 * [0.5], 0.3, verb_save=0)[1] # doctest:+SKIP
and these lines:
>>> es = purecma.CMAES(10 * [0.5], 0.3) >>> es.optimize(purecma.ff.elli, callback=es.logger.add) # doctest:+SKIP
do pretty much the same. The verb_save
parameter to fmin
adds
the possibility to plot the saved data during the execution from a
different Python shell like pcma.CMAESDataLogger().load().plot().
For example, with verb_save == 3 every third time the logger
records data they are saved to disk as well.
| See Also | |
CMAES , OOOptimizer . |
return s as str
safe to eval
or raise an exception.
Strings in the dict
known_words
are replaced by their values
surrounded with a space, which the caller considers safe to evaluate
with eval
afterwards.
Known issues:
>>> try: from cma.purecma import safe_str ... except ImportError: from purecma import safe_str >>> safe_str('int(p)', {'int': 'int', 'p': 3.1}) # fine ' int ( 3.1 )' >>> safe_str('int(n)', {'int': 'int', 'n': 3.1}) # unexpected ' i 3.1 t ( 3.1 )'
test of the purecma
module, called if __name__ == "__main__".
Currently only based on doctest
:
>>> try: import cma.purecma as pcma ... except ImportError: import purecma as pcma >>> import random >>> random.seed(8) >>> xmin, es = pcma.fmin(pcma.ff.rosenbrock, 4 * [0.5], 0.5, ... verb_disp=0, verb_log=1) >>> print(es.counteval) 1712 >>> print(es.best.evals) 1704 >>> assert es.best.f < 1e-12 >>> random.seed(5) >>> es = pcma.CMAES(4 * [0.5], 0.5) >>> es.params = pcma.CMAESParameters(es.params.dimension, ... es.params.lam, ... pcma.RecombinationWeights) >>> while not es.stop(): ... X = es.ask() ... es.tell(X, [pcma.ff.rosenbrock(x) for x in X]) >>> print("%s, %s" % (pcma.ff.rosenbrock(es.result[0]) < 1e-13, ... es.result[2] < 1600)) True, True
Large population size:
>>> random.seed(4) >>> es = pcma.CMAES(3 * [1], 1) >>> es.params = pcma.CMAESParameters(es.params.dimension, 300, ... pcma.RecombinationWeights) >>> es.logger = pcma.CMAESDataLogger() >>> try: ... es = es.optimize(pcma.ff.elli, verb_disp=0) ... except AttributeError: # OOOptimizer.optimize is not available ... while not es.stop(): ... X = es.ask() ... es.tell(X, [pcma.ff.elli(x) for x in X]) >>> assert es.result[1] < 1e13 >>> print(es.result[2]) 9300


passcombo.com
BOT
08-Jun-18 09:08 AM
true, are there any players owning like 25-30% of BTC hashrate? if they will to switch to 51% attack BCH - should not be a problem
not sure by algo which other networks can be attacked, but much smaller miners can attack probably any other coins below ?
owning 1% of BTC hasrate should allow to double spend in other networks - it's probably only a matter if it mapys off more to mine BTC or to attack other network
and BTW - is "attacking" in this sense sth immoral in any way? in the end it's just using property of network to make gains... so it's like mining - also using property of network to make profit
so we could actualyl say - it's natural evolution - good project will find ways, weak projects will die - evolution
its hardocdes into the system, so really no different than bank bailouts. legal, but unethical.
cant understand why you'd go for short term theft leading to loss of faith and value in the items stolen, rather than dominate supply long term.
if you are depositing to an exchange and then using your hashrate to double spend it, there is clear intent for making an invalid deposit. probably no specific laws against it, but this is not like invoking the existing code of a blockchain to generate extra coins, it is an action against the exchange
Simple, because if you're a bitcoin miner you don't care about the long term heath of bch
This is about profit motivated decisions with clear paths to execute
ahh. greed. that old chestnut.
Ver would use a 51% attack for his marketing tricks. Something like look more than 51% of btc miners have changed to mining bch
isnt usuary a form of double spend?
And the ultimate example of why sharing a hashing algorithm and not being the dominant chain using it is a critical security vulnerability, I mean we've seen it play out like twice a week for a while now
Double spend is an easy one yeah
it likely violates the terms and conditions of the exchange
<@U02LQ1WHQ> could this also happen to BarterDEX not only CEX ?
Shorting seems to be less effective because irrational marketing don't care that their coin is unsecured and useless
sounds like the verge holders I seen comments from
Unfortunately DEXs do nothing to mitigate this risk, unless you allow your users to set the number of required confs
correct, or using notarizations as equivalent of many confirmations
In fact you're at greater risk on a DEX because you'd lose the funds, whereas a CEX has to eat the loss
so big palyers can decide if they want to rob cex or individuals
The best thing you can do to protect yourself on a dx is no trade unsecured coins, sticking to highest hash rate for an algo or notatization coins are good ways of doing so
We'll probably see our first dx double spend attack on one of these shitcoins in the coming years
is there somwhere a summary of biggest networks by hash algo ?
There's a website that says how expensive it is to 51% attack different coins
That's probably the best substitute
Coins that you can buy > 51% of the hash power from nicehash are at the biggest risk
Coins that share an algo but can't be bought are a little less risky
dex mitigates risk by coins being spread out. not immune to attack, but much less cost vs benefit to the attacker.


Scrolls through the active window vertically by the number of rows you specify.
Syntax
VLINE(num_rows)
Num_rows is a number that specifies how many rows to scroll.
If num_rows is positive, Microsoft Excel scrolls down by the number of rows indicated by num_rows.
If num_rows is negative, Microsoft Excel scrolls up by the number of rows indicated by num_rows.
Related Functions
HLINE Horizontally scrolls through the active window by columns
HPAGE Horizontally scrolls through the active window one window at a time
HSCROLL Horizontally scrolls through a worksheet by percentage or by column number
VPAGE Vertically scrolls through the active window one window at a time
VSCROLL Vertically scrolls through a worksheet by percentage or by row number
Return to index


Hello! I'm Abhishek Jha, a self taught web developer based in Kathmandu , Nepal.
It's been a long time coming for me to finally find something that I truly enjoy doing and that is, building websites / web apps. The amount of technologies that are present in this field has been overwhelming, but I'm always excited to learn new things.
Here are the technologies I recently used:
HTML, CSS, Javascript (ES6+)
React, Redux, Sass, Git
and Firebase
This is an E-commerce project for me to familiarize myself with how React and Redux functioned. Firebase was used for data management and sign up / sign in authorization including google sign in. Stripe API was also integrated to handle payment during checkout.
This is the website with no functionality made up with CSS Grid and SASS. It mimics realestate landing page.This website is build with pure grid layout.
This is the website where it selects the media stream of user's choice and request for the picture in picture api to display the screen.
Interested to work with me?
Email me


This keyboard was developed for keyboarding the Quinault language of the United States.
No font is included in this package. It can be used with Times New Roman or another Unicode encoded font.
Quinault Keyman Keyboard is copyright © 2016-2018 SIL International. It is distributed under The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Vim documentation: diff
main help file*diff.txt* For Vim version 7.2. Last change: 2008 Jul 21 VIM REFERENCE MANUAL by Bram Moolenaar *diff* *vimdiff* *gvimdiff* *diff-mode* This file describes the +diff feature: Showing differences between two, three or four versions of the same file. The basics are explained in section |08.7| of the user manual. 1. Starting diff mode |vimdiff| 2. Viewing diffs |view-diffs| 3. Jumping to diffs |jumpto-diffs| 4. Copying diffs |copy-diffs| 5. Diff options |diff-options| {not in Vi}
1. Starting diff mode The easiest way to start editing in diff mode is with the "vimdiff" command. This starts Vim as usual, and additionally sets up for viewing the differences between the arguments. vimdiff file1 file2 [file3 [file4]] This is equivalent to: vim -d file1 file2 [file3 [file4]] You may also use "gvimdiff" or "vim -d -g". The GUI is started then. You may also use "viewdiff" or "gviewdiff". Vim starts in readonly mode then. "r" may be prepended for restricted mode (see |-Z|). The second and following arguments may also be a directory name. Vim will then append the file name of the first argument to the directory name to find the file. This only works when a standard "diff" command is available. See 'diffexpr'. Diffs are local to the current tab page |tab-page|. You can't see diffs with a window in another tab page. This does make it possible to have several diffs at the same time, each in their own tab page. What happens is that Vim opens a window for each of the files. This is like using the |-O| argument. This uses vertical splits. If you prefer horizontal splits add the |-o| argument: vimdiff -o file1 file2 [file3 [file4]] If you always prefer horizontal splits include "horizontal" in 'diffopt'. In each of the edited files these options are set: 'diff' on 'scrollbind' on 'scrollopt' includes "hor" 'wrap' off 'foldmethod' "diff" 'foldcolumn' value from 'diffopt', default is 2 These options are set local to the window. When editing another file they are reset to the global value. The differences shown are actually the differences in the buffer. Thus if you make changes after loading a file, these will be included in the displayed diffs. You might have to do ":diffupdate" now and then, not all changes are immediately taken into account. In your .vimrc file you could do something special when Vim was started in diff mode. You could use a construct like this: if &diff setup for diff mode else setup for non-diff mode endif While already in Vim you can start diff mode in three ways. *E98* :diffsplit {filename} *:diffs* *:diffsplit* Open a new window on the file {filename}. The options are set as for "vimdiff" for the current and the newly opened window. Also see 'diffexpr'. *:difft* *:diffthis* :diffthis Make the current window part of the diff windows. This sets the options like for "vimdiff". :diffpatch {patchfile} *:diffp* *:diffpatch* Use the current buffer, patch it with the diff found in {patchfile} and open a buffer on the result. The options are set as for "vimdiff". {patchfile} can be in any format that the "patch" program understands or 'patchexpr' can handle. Note that {patchfile} should only contain a diff for one file, the current file. If {patchfile} contains diffs for other files as well, the results are unpredictable. Vim changes directory to /tmp to avoid files in the current directory accidentally being patched. But it may still result in various ".rej" files to be created. And when absolute path names are present these files may get patched anyway. To make these commands use a vertical split, prepend |:vertical|. Examples: :vert diffsplit main.c~ :vert diffpatch /tmp/diff If you always prefer a vertical split include "vertical" in 'diffopt'. *E96* There can be up to four buffers with 'diff' set. Since the option values are remembered with the buffer, you can edit another file for a moment and come back to the same file and be in diff mode again. *:diffo* *:diffoff* :diffoff Switch off diff mode for the current window. :diffoff! Switch off diff mode for all windows in the current tab page. The ":diffoff" command resets the relevant options to their default value. This may be different from what the values were before diff mode was started, the old values are not remembered. 'diff' off 'scrollbind' off 'scrollopt' without "hor" 'wrap' on 'foldmethod' "manual" 'foldcolumn' 0
2. Viewing diffs *view-diffs* The effect is that the diff windows show the same text, with the differences highlighted. When scrolling the text, the 'scrollbind' option will make the text in other windows to be scrolled as well. With vertical splits the text should be aligned properly. The alignment of text will go wrong when: - 'wrap' is on, some lines will be wrapped and occupy two or more screen lines - folds are open in one window but not another - 'scrollbind' is off - changes have been made to the text - "filler" is not present in 'diffopt', deleted/inserted lines makes the alignment go wrong All the buffers edited in a window where the 'diff' option is set will join in the diff. This is also possible for hidden buffers.  *:DiffOrig* *diff-original-file* Since 'diff' is a window-local option, it's possible to view the same buffer in diff mode in one window and "normal" in another window. It is also possible to view the changes you have made to a buffer since the file was loaded. Since Vim doesn't allow having two buffers for the same file, you need another buffer. This command is useful: command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis \ | wincmd p | diffthis (this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences between the current buffer and the file it was loaded from. A buffer that is unloaded cannot be used for the diff. But it does work for hidden buffers. You can use ":hide" to close a window without unloading the buffer. If you don't want a buffer to remain used for the diff do ":set nodiff" before hiding it. *:diffu* *:diffupdate* :diffu[pdate] Update the diff highlighting and folds. Vim attempts to keep the differences updated when you make changes to the text. This mostly takes care of inserted and deleted lines. Changes within a line and more complicated changes do not cause the differences to be updated. To force the differences to be updated use: :diffupdate Vim will show filler lines for lines that are missing in one window but are present in another. These lines were inserted in another file or deleted in this file. Removing "filler" from the 'diffopt' option will make Vim not display these filler lines. Folds are used to hide the text that wasn't changed. See |folding| for all the commands that can be used with folds. The context of lines above a difference that are not included in the fold can be set with the 'diffopt' option. For example, to set the context to three lines: :set diffopt=filler,context:3 The diffs are highlighted with these groups: |hl-DiffAdd| DiffAdd Added (inserted) lines. These lines exist in this buffer but not in another. |hl-DiffChange| DiffChange Changed lines. |hl-DiffText| DiffText Changed text inside a Changed line. Vim finds the first character that is different, and the last character that is different (searching from the end of the line). The text in between is highlighted. This means that parts in the middle that are still the same are highlighted anyway. Only "iwhite" of 'diffopt' is used here. |hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines, because they don't really exist in this buffer.
3. Jumping to diffs *jumpto-diffs* Two commands can be used to jump to diffs: *[c* [c Jump backwards to the previous start of a change. When a count is used, do it that many times. *]c* ]c Jump forwards to the next start of a change. When a count is used, do it that many times. It is an error if there is no change for the cursor to move to.
4. Diff copying *copy-diffs* *E99* *E100* *E101* *E102* *E103* *merge* There are two commands to copy text from one buffer to another. The result is that the buffers will be equal within the specified range. *:diffg* *:diffget* :[range]diffg[et] [bufspec] Modify the current buffer to undo difference with another buffer. If [bufspec] is given, that buffer is used. Otherwise this only works if there is one other buffer in diff mode. See below for [range]. *:diffpu* *:diffput* *E793* :[range]diffpu[t] [bufspec] Modify another buffer to undo difference with the current buffer. Just like ":diffget" but the other buffer is modified instead of the current one. When [bufspec] is omitted and there is more than one other buffer in diff mode where 'modifiable' is set this fails. See below for [range]. *do* do Same as ":diffget" without argument or range. The "o" stands for "obtain" ("dg" can't be used, it could be the start of "dgg"!). *dp* dp Same as ":diffput" without argument or range. When no [range] is given, the diff at the cursor position or just above it is affected. When [range] is used, Vim tries to only put or get the specified lines. When there are deleted lines, this may not always be possible. There can be deleted lines below the last line of the buffer. When the cursor is on the last line in the buffer and there is no diff above this line, the ":diffget" and "do" commands will obtain lines from the other buffer. To be able to get those lines from another buffer in a [range] it's allowed to use the last line number plus one. This command gets all diffs from the other buffer: :1,$+1diffget Note that deleted lines are displayed, but not counted as text lines. You can't move the cursor into them. To fill the deleted lines with the lines from another buffer use ":diffget" on the line below them. *E787* When the buffer that is about to be modified is read-only and the autocommand that is triggered by |FileChangedRO| changes buffers the command will fail. The autocommand must not change buffers. The [bufspec] argument above can be a buffer number, a pattern for a buffer name or a part of a buffer name. Examples: :diffget Use the other buffer which is in diff mode :diffget 3 Use buffer 3 :diffget v2 Use the buffer which matches "v2" and is in diff mode (e.g., "file.c.v2")
5. Diff options *diff-options* Also see |'diffopt'| and the "diff" item of |'fillchars'|. FINDING THE DIFFERENCES *diff-diffexpr* The 'diffexpr' option can be set to use something else than the standard "diff" program to compare two files and find the differences. When 'diffexpr' is empty, Vim uses this command to find the differences between file1 and file2: diff file1 file2 > outfile The ">" is replaced with the value of 'shellredir'. The output of "diff" must be a normal "ed" style diff. Do NOT use a context diff. This example explains the format that Vim expects: 1a2 > bbb 4d4 < 111 7c7 < GGG --- > ggg The "1a2" item appends the line "bbb". The "4d4" item deletes the line "111". The '7c7" item replaces the line "GGG" with "ggg". When 'diffexpr' is not empty, Vim evaluates to obtain a diff file in the format mentioned. These variables are set to the file names used: v:fname_in original file v:fname_new new version of the same file v:fname_out resulting diff file Additionally, 'diffexpr' should take care of "icase" and "iwhite" in the 'diffopt' option. 'diffexpr' cannot change the value of 'lines' and 'columns'. Example (this does almost the same as 'diffexpr' being empty): set diffexpr=MyDiff() function MyDiff() let opt = "" if &diffopt =~ "icase" let opt = opt . "-i " endif if &diffopt =~ "iwhite" let opt = opt . "-b " endif silent execute "!diff -a --binary " . opt . v:fname_in . " " . v:fname_new . \ " > " . v:fname_out endfunction The "-a" argument is used to force comparing the files as text, comparing as binaries isn't useful. The "--binary" argument makes the files read in binary mode, so that a CTRL-Z doesn't end the text on DOS. *E97* Vim will do a test if the diff output looks alright. If it doesn't, you will get an error message. Possible causes: - The "diff" program cannot be executed. - The "diff" program doesn't produce normal "ed" style diffs (see above). - The 'shell' and associated options are not set correctly. Try if filtering works with a command like ":!sort". - You are using 'diffexpr' and it doesn't work. If it's not clear what the problem is set the 'verbose' option to one or more to see more messages. The self-installing Vim includes a diff program. If you don't have it you might want to download a diff.exe. For example from http://jlb.twu.net/code/unixkit.php. USING PATCHES *diff-patchexpr* The 'patchexpr' option can be set to use something else than the standard "patch" program. When 'patchexpr' is empty, Vim will call the "patch" program like this: patch -o outfile origfile < patchfile This should work fine with most versions of the "patch" program. Note that a CR in the middle of a line may cause problems, it is seen as a line break. If the default doesn't work for you, set the 'patchexpr' to an expression that will have the same effect. These variables are set to the file names used: v:fname_in original file v:fname_diff patch file v:fname_out resulting patched file Example (this does the same as 'patchexpr' being empty): set patchexpr=MyPatch() function MyPatch() :call system("patch -o " . v:fname_out . " " . v:fname_in . \ " < " . v:fname_diff) endfunction Make sure that using the "patch" program doesn't have unwanted side effects. For example, watch out for additionally generated files, which should be deleted. It should just patch the file and nothing else. Vim will change directory to "/tmp" or another temp directory before evaluating 'patchexpr'. This hopefully avoids that files in the current directory are accidentally patched. Vim will also delete files starting with v:fname_in and ending in ".rej" and ".orig". top - main help file


Raytracer
In this project, I wrote a ray tracer! Ray tracing involves tracing the path of light rays to generate images. By tracing the path of many many rays, I can determine how objects in a scene interact with eachother. For example, I can trace a bunch of rays from a light source, to an object, to the camera, determine how the object appears in the scene, and render or "draw" it to the screen accordingly.
Part 1: Ray Generation and Scene Intersection
The first thing I did was implement a raytrace_pixel() method. The method integrates the irradiance of the pixel.
Irradiance:
The flux of radiant energy per unit area (normal to the direction of flow of radiant energy through a medium)
In other words, I implemented raytrace_pixel() to find the amount of light energy in the given pixel, which tells me how bright the pixel should be. I did this by generating a given number of "rays" through the pixel.
Ray:
A line with a start point, but no end point.
In my program, a ray is given an origin (it's start point), a vector which dictates it's direction, a depth, and a "min_t" and "max_t". The "min_t" and "max_t" allow me to treat the ray as a segment, if I wish. So I can cut it off at the minimum time and maximum time I set. This becomes important later!
In this case, all of the rays I generate have the "camera"'s position as their origin and a vector towards the pixel as their direction. You can think of the camera as where your eye is in the scene. So basically I am drawing a bunch of lines from my eyeball to a point in space and summing up all of the radiant energy, or irradiance, that my eyeball is detecting at that point in space.
Primitive Intersections
Primitive:
These are the building blocks of the scenes. Triangles are used most commonly, but all kinds of shapes can be used!
Next, I used the Moller Trumbore algorithm to implement a method, Triangle::intersect(), that lets me know if a given Ray intersects that particular triangle. The Moller Trumbore algorithm gives a way to move the origin of the ray and change the base of it to get a vector: [t, u, v] where t represents the distance from the ray's original origin to the plane the triangle is on, and u and v are the Barycentric coordinates within the triangle that the ray intersects. (See part 5 of my rasterizester project for more on Barycentric coordinates).
Since most of the scenes I will be rendering are made up of triangles, it is super important to be able to tell whether the Rays I trace are intersecting them. If I trace a ray from a light's position out in some direction and it intersects a triangle, T1, I can tell exactly which point on that triangle T1 is lit up by that particular ray... almost. What if there is another, larger triangle T2 in between the light and T1?? Then the point I found on T1 wouldn't be lit up at all, since it would be obstructed by T2.
Here is where "min_t" and "max_t" come in. When I trace a ray from a light and use the Moller Trumbore algorithm to test whether it is intersecting the primitives triangles, T1 and T2, in my scene, I will find out it intersects both of them and the "t's" (distances) the triangles were from the origin of the ray. However, I am only interested in the closest intersection since that is the one which is lit! So, once the ray intersects T2, I set the ray's "max_t" to the distance T2 is from the origin of the ray. That way, when I test T1, I will be able to tell it isn't the closest intersection, since it's t value will be greater than the ray's "max_t".
I implemented a similar method for intersecting spheres, and then I was able to render my first images!
 As you can imagine, really complicated scenes require A LOT of triangles. We could be talking on the scale of hundreds of thousands of triangles, or even more.
With that in mind, it isn't efficient to loop through every single triangle of the mesh for every ray I need to trace. I am tracing potentially thousands of rays per primative per scene. For simple meshes like those in part one, that will suffice, but for more complicated meshes like Wall-E I need a better solution. This is where bounding volume heirarchys come in.
By subdividing my mesh into bounding volumes, I can first test if a ray intersects a large bounding volume containg part of the mesh.  Before, I would have had to test all of the primitives in that volume! If it does, I can descend into the smallest bounding volume the ray intersects, and test only the primitives in that box.
Constructing the BVH
To construct the BVH, I find a bounding box that contains all of the primitives in the scene. Then, I create an empty BVH node. If the amount of primitives in the box are under a specified max_leaf_size, then I am done. Otherwise, I need to divide that bounding box into smaller ones.
To accomplish this, I split the current bounding box in half. It is a 3D bounding volume, so I split it along it's longest dimension. Then, I put each of the primitives into either the left or right box. If their centroid in the chosen axis is less than the split point, they go in the left box, and vice versa. This continues recursively until all of the primitives are contained in boxes with <= max_leaf_size total primitives.
Now if I am testing a ray which intersects a primitive Wall-E's hand, I save myself a bunch of work, since I don't have to loop through any of the primitives outside of the little bounding volume that contains his hand. Again, this is super important, because sometimes I am tracing thousands of rays per pixel!
Intersecting a Bounding Volume
To find intersections in my bounding volume, I start with the ray and the root node of my bvh tree (the giant box that holds all of the primitives).
This continues until I reach a bounding volume the ray doesn't intersect, or until I reach the leaf node and test the primitives inside.
Part 3: Direct Illumination
Up until this part, I was only tracing camera rays. The lighting in the scenes was just based on the normal vectors from the primitive to the camera. Now I will start tracing rays from lights to the scene to determine the radiance of each pixel!
To determine the direct lighting of the scene, I sum over all of the light sources in the scene. From each light, I take sample rays and compute the incoming radiance from those directions. Then I convert the incoming radiance to outgoing radiance using the Bidirectional Scattering Distribution Function (BSDF) of the surface.
The image is very noisy!
Notice the shadows on the dragon's neck and tail are much more distinct!
Part 4: Indirect Illumination
Now, instead of just considering light rays directly from the light to the surface, I let the rays "bounce". This lets me detect radiance that is coming not only directly from the light, but from light bouncing off the other objects!
Notice the colors visible in the shadows!
To accomplish this, first I take a sample from the surface BSDF at the point where the ray hits. Using the illumination from that sample, I determine whether to stop there or let the ray bounce again. I can't just let the rays bounce forever (too expensive!), but fortunately I can achieve a pretty realistic result using "Russian Roulette" to decide how whether or not to terminate the ray. I flip a biased coin with probability proportional to illumination of returning true. If the illumination is already very low, I am more likely to terminate the ray. If it is very high, I am more likely to let it keep bouncing. This way even though I am sampling "randomly", I am making sure the brightest rays are being represented.
If the coinflip returns true, I recursively trace the ray again, offsetting it's origin slightly and sending it off in the direction of the incoming radiance converted to world coordinates. The light from the ray is accumulated in the scene until the russian roulette terminates it.
Global Illumination at varying Sample Rates
As you can see, it takes a lot of samples per pixel to completely eliminate the noise in the image! Images with only one sample per pixel take seconds to render, while images with 1024 samples take hours!
Varying Camera Ray Depths
This is skipping ahead a little, but once I add the glass and metallic materials, you can clearly see the effects of increasing the max ray depth.
Rays enter the glass sphere but they never leave!
Now the rays bounce inside the glass!
You can tell they are still trapped inside because the mirror ball still shows a dark glass sphere.
Finally the rays are making it outside of the glass.
Now the rays are showing up on the right wall too!
Part 5: Materials
Remember the Bidirectional Scattering Distribution Functions I mentioned earlier? They take convert the incoming radiance of a ray to outgoing radiance. Different materials have different BSDFs, since light reacts differently to them. I implemented glass and mirror BSDFs to generate the image you see above.
Mirror and Glass BSDF
The mirror ball (left) requires a mirror BSDF. This was relatively simple to implement, since the ray just reflects off of the mirror. The glass ball (right) is much more complicated. Sometimes light reflects off glass, and sometimes it refracts inside! To simulate this, I used another biased coin flip based off of the Schlick's Approximation. If the coin returned true, I reflected the incoming radiance as I did with the mirror BSDF, except with the Schlick coefficient as the probability density function (for mirror the probability density function was 1). Otherwise, I refracted the incoming radiance.
Rays enter the glass sphere but they never leave!
Now the rays bounce inside the glass!
You can tell they are still trapped inside because the mirror ball still shows a dark glass sphere.
Finally the rays are making it outside of the glass.
Now the rays are showing up on the right wall, and bouncing back onto the glass!


SECOND 'SCANDAL'
Death of toddler, 3, weeks before Milly Main tragedy at Glasgow superhospital investigated by police
by Katy PaganTHE death of a toddler at the same Glasgow superhospital where Milly Main died from an infection is being probed by police.
The three-year-old boy passed away at the Queen Elizabeth University hospital in August 2017 - three weeks before leukemia survivor Milly, 10, died.
He was being treated for a rare genetic condition one one of the wards which was closed because of fears over water contamination, according to the Mail on Sunday.
The Crown Office confirmed cops were called after the boy's death.
An investigation led by the Scottish Fatalities Investigation Unit is now underway.
It comes as expert reports from NHS Greater Glasgow and Clyde are "under consideration".
A Crown Office spokesman said: “The Procurator Fiscal has received a report in connection with the death of a three-year-old boy at the Queen Elizabeth University Hospital on 9 August 2017.
“The investigation into the death, under the direction of Scottish Fatalities Investigation Unit (SFIU), is ongoing and the family will continue to be kept updated in relation to any significant developments."
A police spokeswoman confirmed a report was submitted to the Procurator Fiscal but declined to comment further.
The Scottish Government said: "The death of any child is heartbreaking and we sympathise with their loved ones. An SFIU investigation is under way, so it would be inappropriate to comment further."
A spokeswoman for NHS Greater Glasgow and Clyde said: "We have already provided information to this family but are sorry that they have further questions.
"We fully investigated this child’s death at the time and also asked for two independent experts to investigate the case, the outcome of which has been communicated to the family.
"We are absolutely committed to providing patients and families with information and ensuring they get answers to the questions they have. In this case the full findings were shared with the family."
We told earlier how a whistleblower claimed tragic Milly died at the hospital after catching an infection linked to the ward's water supply.
Milly's heartbroken mum has now demanded NHS chiefs stop "bullying" the anonymous employee who exposed the "cover up".
Kimberly Darroch, 35, claims her daughter contracted a fatal infection while in remission from leukaemia the Queen Elizabeth University Hospital.
The mum, from Lanark, has said she is "100 per cent" certain contaminated water caused the infection and told the BBC she feels "let down" and "lied to" in the wake of her daughter's death.


0.4.23 / 2018-05-07
- Fix deprecation warning in Node v10 due to the last usage of
new Buffer
(#185, by @felixbuenemann)
- Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn)
0.4.22 / 2018-05-05
- Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson)
- Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson)
0.4.21 / 2018-04-06
- Fix encoding canonicalization (#156)
- Fix the paths in the “browser” field in package.json (#174 by @LMLB)
- Removed “contributors” section in package.json - see Git history instead.
0.4.20 / 2018-04-06
- Updated
new Buffer()
usages with recommended replacements as it’s being deprecated in Node v10 (#176, #178 by @ChALkeR)
0.4.19 / 2017-09-09
- Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147)
- Re-generated windows1255 codec, because it was updated in iconv project
- Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8
0.4.18 / 2017-06-13
- Fixed CESU-8 regression in Node v8.
0.4.17 / 2017-04-22
- Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn)
0.4.16 / 2017-04-22
- Added support for React Native (#150)
- Changed iso8859-1 encoding to usine internal ‘binary’ encoding, as it’s the same thing (#147 by @mscdex)
- Fixed typo in Readme (#138 by @jiangzhuo)
- Fixed build for Node v6.10+ by making correct version comparison
- Added a warning if iconv-lite is loaded not as utf-8 (see #142)
0.4.15 / 2016-11-21
- Fixed typescript type definition (#137)
0.4.14 / 2016-11-20
- Preparation for v1.0
- Added Node v6 and latest Node versions to Travis CI test rig
- Deprecated Node v0.8 support
- Typescript typings (@larssn)
- Fix encoding of Euro character in GB 18030 (inspired by @lygstate)
- Add ms prefix to dbcs windows encodings (@rokoroku)
0.4.13 / 2015-10-01
- Fix silly mistake in deprecation notice.
0.4.12 / 2015-09-26
- Node v4 support:
- Added CESU-8 decoding (#106)
- Added deprecation notice for
extendNodeEncodings
- Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol)
0.4.11 / 2015-07-03
0.4.10 / 2015-05-26
- Changed UTF-16 endianness heuristic to take into account any ASCII chars, not
just spaces. This should minimize the importance of “default” endianness.
0.4.9 / 2015-05-24
- Streamlined BOM handling: strip BOM by default, add BOM when encoding if
addBOM: true. Added docs to Readme.
- UTF16 now uses UTF16-LE by default.
- Fixed minor issue with big5 encoding.
- Added io.js testing on Travis; updated node-iconv version to test against.
Now we just skip testing SBCS encodings that node-iconv doesn’t support.
- (internal refactoring) Updated codec interface to use classes.
- Use strict mode in all files.
0.4.8 / 2015-04-14
- added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94)
0.4.7 / 2015-02-05
- stop official support of Node.js v0.8. Should still work, but no guarantees.
reason: Packages needed for testing are hard to get on Travis CI.
- work in environment where Object.prototype is monkey patched with enumerable
props (#89).
0.4.6 / 2015-01-12
- fix rare aliases of single-byte encodings (thanks @mscdex)
- double the timeout for dbcs tests to make them less flaky on travis
0.4.5 / 2014-11-20
- fix windows-31j and x-sjis encoding support (@nleush)
- minor fix: undefined variable reference when internal error happens
0.4.4 / 2014-07-16
- added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3)
- fixed streaming base64 encoding
0.4.3 / 2014-06-14
- added encodings UTF-16BE and UTF-16 with BOM
0.4.2 / 2014-06-12
- don’t throw exception if
extendNodeEncodings()
is called more than once
0.4.1 / 2014-06-11
0.4.0 / 2014-06-10
- code is rewritten from scratch
- all widespread encodings are supported
- streaming interface added
- browserify compatibility added
- (optional) extend core primitive encodings to make usage even simpler
- moved from vows to mocha as the testing framework


With kids, it's sometimes difficult to calm them down to focus on the task at hand. This app listens to your classroom's loudness, releases a surprise animal, and keeps track of how long the kids can keep their streak going!
Teachers can login and save microphone sensitivity.

The longer your classroom stays quiet, the better the score! Plus, new animals come out to play!


构建最终原生二进制文件
By default, a Kotlin/Native target is compiled down to a *.klib
library artifact, which can be consumed by Kotlin/Native
itself as a dependency but cannot be executed or used as a native library.
To declare final native binaries such as executables or shared libraries, use the binaries
property of a native target.
This property represents a collection of native binaries built for this target in addition to the default *.klib
artifact
and provides a set of methods for declaring and configuring them.
The
kotlin-multiplatform
plugin doesn't create any production binaries by default. The only binary available by default is a debug test executable that lets you run unit tests from thetest
compilation.
声明二进制文件
Use the following factory methods to declare elements of the binaries
collection.
| Factory method | Binary kind | Available for |
|---|---|---|
executable |
Product executable | All native targets |
test |
Test executable | All native targets |
sharedLib |
Shared native library | All native targets, except for WebAssembly |
staticLib |
Static native library | All native targets, except for WebAssembly |
framework |
Objective-C framework | macOS, iOS, watchOS, and tvOS targets only |
The simplest version doesn't require any additional parameters and creates one binary for each build type. Currently there two build types available:
DEBUG
– produces a non-optimized binary with debug informationRELEASE
– produces an optimized binary without debug information
The following snippet creates two executable binaries: debug and release.
kotlin {
linuxX64 { // Use your target instead.
binaries {
executable {
// Binary configuration.
}
}
}
}
You can drop the lambda if there is no need for additional configuration:
binaries {
executable()
}
You can specify for which build types to create binaries. In the following example, only the debug
executable is created.
binaries {
executable([DEBUG]) {
// Binary configuration.
}
}
binaries {
executable(listOf(DEBUG)) {
// Binary configuration.
}
}
You can also declare binaries with custom names.
binaries {
executable('foo', [DEBUG]) {
// Binary configuration.
}
// It's possible to drop the list of build types (in which case, all the available build types will be used).
executable('bar') {
// Binary configuration.
}
}
binaries {
executable("foo", listOf(DEBUG)) {
// Binary configuration.
}
// It's possible to drop the list of build types (in which case, all the available build types will be used).
executable("bar") {
// Binary configuration.
}
}
The first argument sets a name prefix, which is the default name for the binary file. For example, for Windows the code
produces the files foo.exe
and bar.exe
. You can also use the name prefix to access the binary in the build script.
访问二进制文件
You can access binaries to configure them or get their properties (for example, the path to an output file).
You can get a binary by its unique name. This name is based on the name prefix (if it is specified), build type, and
binary kind following the pattern: <optional-name-prefix><build-type><binary-kind>
, for example, releaseFramework
or
testDebugExecutable
.
Static and shared libraries have the suffixes static and shared respectively, for example,
fooDebugStatic
orbarReleaseShared
.
// Fails if there is no such binary.
binaries['fooDebugExecutable']
binaries.fooDebugExecutable
binaries.getByName('fooDebugExecutable')
// Returns null if there is no such binary.
binaries.findByName('fooDebugExecutable')
// Fails if there is no such binary.
binaries["fooDebugExecutable"]
binaries.getByName("fooDebugExecutable")
// Returns null if there is no such binary.
binaries.findByName("fooDebugExecutable")
Alternatively, you can access a binary by its name prefix and build type using typed getters.
// Fails if there is no such binary.
binaries.getExecutable('foo', DEBUG)
binaries.getExecutable(DEBUG) // Skip the first argument if the name prefix isn't set.
binaries.getExecutable('bar', 'DEBUG') // You also can use a string for build type.
// Similar getters are available for other binary kinds:
// getFramework, getStaticLib and getSharedLib.
// Returns null if there is no such binary.
binaries.findExecutable('foo', DEBUG)
// Similar getters are available for other binary kinds:
// findFramework, findStaticLib and findSharedLib.
// Fails if there is no such binary.
binaries.getExecutable("foo", DEBUG)
binaries.getExecutable(DEBUG) // Skip the first argument if the name prefix isn't set.
binaries.getExecutable("bar", "DEBUG") // You also can use a string for build type.
// Similar getters are available for other binary kinds:
// getFramework, getStaticLib and getSharedLib.
// Returns null if there is no such binary.
binaries.findExecutable("foo", DEBUG)
// Similar getters are available for other binary kinds:
// findFramework, findStaticLib and findSharedLib.
将依赖项导出到二进制文件
When building an Objective-C framework or a native library (shared or static), you may need to pack not just the classes
of the current project, but also the classes of its dependencies. Specify which dependencies to export to a binary using
the export
method.
kotlin {
sourceSets {
macosMain.dependencies {
// Will be exported.
api project(':dependency')
api 'org.example:exported-library:1.0'
// Will not be exported.
api 'org.example:not-exported-library:1.0'
}
}
macosX64("macos").binaries {
framework {
export project(':dependency')
export 'org.example:exported-library:1.0'
}
sharedLib {
// It's possible to export different sets of dependencies to different binaries.
export project(':dependency')
}
}
}
kotlin {
sourceSets {
macosMain.dependencies {
// Will be exported.
api(project(":dependency"))
api("org.example:exported-library:1.0")
// Will not be exported.
api("org.example:not-exported-library:1.0")
}
}
macosX64("macos").binaries {
framework {
export(project(":dependency"))
export("org.example:exported-library:1.0")
}
sharedLib {
// It's possible to export different sets of dependencies to different binaries.
export(project(':dependency'))
}
}
}
You can export only
api
dependencies of the corresponding source set.
You can export maven dependencies, but due to current limitations of Gradle metadata, such a dependency should be either a platform dependency (for example,kotlinx-coroutines-core-native_debug_macos_x64
instead ofkotlinx-coroutines-core-native
) or be exported transitively.
By default, export works non-transitively. This means that if you export the library foo
depending on the library bar
,
only methods of foo
are added to the output framework.
You can change this behavior using the transitiveExport
flag. If set to true
, the declarations of the library bar
are exported as well.
binaries {
framework {
export project(':dependency')
// Export transitively.
transitiveExport = true
}
}
binaries {
framework {
export(project(":dependency"))
// Export transitively.
transitiveExport = true
}
}
For example, assume that you write several modules in Kotlin and then want to access them from Swift. Since usage of several Kotlin/Native frameworks in one Swift application is limited, you can create a single umbrella framework and export all these modules to it.
构建 universal frameworks
By default, an Objective-C framework produced by Kotlin/Native supports only one platform. However, you can merge such
frameworks into a single universal (fat) binary using the lipo
tool.
This operation especially makes sense for 32-bit and 64-bit iOS frameworks. In this case, you can use the resulting universal
framework on both 32-bit and 64-bit devices.


Toggle navigation
Register as Sender
Email*
Phone*
Password*
Confirm Password*
Reset
×
Please check email
An email is sent to {{ your email address }}.


Thank you for your interest in my work. Feel free to explore the site and play with the projects displayed below.
-Aundra Miller
Travellers to Kauai can easily find popular destinations, recommended restaurants, suitable housing, and more.
One of Portland's finest cupcake shops showcase their selection of unique and intriguing cupcakes.
Students prank their accounting teacher with an ironic and humerous site.
Following my training at Epicodus, I will be able to skillfully program in PHP, JavaScript, and Drupal, navigate a BASH console, and manage projects in GitHub. I also have experience setting up and working inside of WordPress themes.
After graduating high school, I was trained as a test processor and tutor for a local Christian academy. One year later, I was trained and hired as a content developer for an Inbound marketing agency in Washington.
During my time as a writer, I had the opportunity to create several websites for clients using WordPress. Inspired by the beauty, complexity, and power of many impressive websites, I realized the kind of potential these websites could have for small businesses and non-profits. Driven by a desire to create functional, impressive, and memorable websites, I chose to pursue a career in website design and development.
I am one of five girls, raised by my loving parents in Oregon City, OR. Outside of programming, I enjoy music, sports, computer games, art, and writing.
After receiving my high school diploma, I took a year of college classes at Clackamas Community College before deciding to attend Epicodus.