Jonas Meurer: debian lts report 2017.01
- DLA 787-1: XSS protection via Content Security Policy for otrs2
- DLA 788-1: fix vulnerability in pdns-recursor by dropping illegitimate long querys
- DLA 798-1: fix multiple vulnerabilities in pdns
An updated anytime package arrived at CRAN yesterday. This is release number nine, and the first with a little gap to the prior release on Christmas Eve as the features are stabilizing, as is the implementation.
anytime is a very focused package aiming to do just one thing really well: to convert anything in integer, numeric, character, factor, ordered, ... format to either POSIXct or Date objects -- and to do so without requiring a format string. See the anytime page, or the GitHub README.md for a few examples.
This releases addresses two small things related to the anydate() and utcdate() conversion (see below) and adds one nice new format, besides some internal changes detailed below:
R> library(anytime)
R> anytime("Thu Sep 01 10:11:12 CDT 2016")
[1] "2016-09-01 10:11:12 CDT"
R> anytime("Thu Sep 01 10:11:12.123456 CDT 2016") # with frac. seconds
[1] "2016-09-01 10:11:12.123456 CDT"
R> Courtesy of CRANberries, there is a comparison to the previous release. More information is on the anytime page. For questions or comments use the issue tracker off the GitHub repo.Changes in anytime version 0.2.1 (2017-02-09)
- The new
DatetimeVectorclass from Rcpp is now used, and proper versioned Depends: have been added (#43)- The
anydateandutcdatefunctions convert again from factor and ordered (#46 closing #44)- A format similar to RFC 28122 but with additonal timezone text can now be parsed (#48 closing #47)
- Conversion from
POSIXttoDatenow also respect the timezone (#50 closing #49)- The internal
.onLoadfunctions was updated- The Travis setup uses https to fetch the run script
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Since I updated this evening, touch to click with my touchpad is almost
totally broken. Fortunately, a correction is
pending.
update: To reinstall packages version
1.5.5-4 solves the
problem in the meantime.
[domain/hostacl]
autofs_provider = none
ldap_schema = rfc2307bis
# to work properly we've to keep the search_base at the highest level
ldap_search_base = ou=foo,ou=people,o=myorg
ldap_default_bind_dn = cn=ro,ou=ldapaccounts,ou=foo,ou=people,o=myorg
ldap_default_authtok = foobar
id_provider = ldap
auth_provider = ldap
chpass_provider = none
ldap_uri = ldaps://ldapserver:636
ldap_id_use_start_tls = false
cache_credentials = false
ldap_tls_cacertdir = /etc/pki/tls/certs
ldap_tls_cacert = /etc/pki/tls/certs/ca-bundle.crt
ldap_tls_reqcert = allow
ldap_group_object_class = groupOfUniqueNames
ldap_group_member = uniqueMember
access_provider = simple
simple_allow_groups = fraappmgmtt
[sssd]
domains = hostacl
services = nss, pam
config_file_version = 2
Important side note: With current sssd versions you're more or less forced to
use ldaps with a validating CA chain, though hostnames are not required to
match the CN/SAN so far.
Relevant are:
Time for another update of RcppArmadillo with a new release 0.7.700.0.0 based on a fresh Armadillo 7.700.0. Following my full reverse-dependency check of 318 package (commit of log here), CRAN took another day to check again.
Armadillo is a powerful and expressive C++ template library for linear algebra aiming towards a good balance between speed and ease of use with a syntax deliberately close to a Matlab. RcppArmadillo integrates this library with the R environment and language--and is widely used by (currently) 318 other packages on CRAN -- an increase of 20 just since the last CRAN release of 0.7.600.1.0 in December!
Changes in this release relative to the previous CRAN release are as follows:
Courtesy of CRANberries, there is a diffstat report. More detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.Changes in RcppArmadillo version 0.7.700.0.0 (2017-02-07)
- Upgraded to Armadillo release 7.700.0 ("Rogue State")
- added
polyfit()andpolyval()- added second form of
log_det()to directly return the result as a complex number- added
range()to statistics functions- expanded
trimatu()/trimatl()andsymmatu()/symmatl()to handle sparse matriceChanges in RcppArmadillo version 0.7.600.2.0 (2017-01-05)
- Upgraded to Armadillo release 7.600.2 (Coup d'Etat Deluxe)
- Bug fix to memory allocation for
fields
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Recently Vincent Bernat wrote about writing his own simple terminal, using vte. That was a fun read, as the sample code built really easily and was functional.
At the end of his post he said :
evilvte is quite customizable and can be lightweight. Consider it as a first alternative. Honestly, I don t remember why I didn t pick it.That set me off looking at
evilvte, and it was one of those rare
projects which seems to be pretty stable, and also hasn't changed in any
recent release of Debian GNU/Linux:
firefox '%s'
That meant there was an obvious security problem.
It is a great terminal though, and it just goes to show how short, simple, and readable such things can be. I enjoyed looking at the source, and furthermore enjoyed using it. Unfortunately due to a dependency issue it looks like this package will be removed from stretch.
Recently Vincent Bernat wrote about writing his own simple terminal, using vte. That was a fun read, as the sample code built really easily and was functional.
At the end of his post he said :
evilvte is quite customizable and can be lightweight. Consider it as a first alternative. Honestly, I don t remember why I didn t pick it.That set me off looking at
evilvte, and it was one of those rare
projects which seems to be pretty stable, and also hasn't changed in any
recent release of Debian GNU/Linux:
firefox '%s'
That meant there was an obvious security problem.
It is a great terminal though, and it just goes to show how short, simple, and readable such things can be. I enjoyed looking at the source, and furthermore enjoyed using it. Unfortunately due to a dependency issue it looks like this package will be removed from stretch.
& or !, have special meaning on the web or the shell and can wreak
havoc when transferred. Certain software also has policies of refusing
(or requiring!) some special characters exactly for that reason. Weird
characters also make it harder for humans to communicate passwords
across voice channels or different cultural backgrounds. In a more
extreme example, the popular Signal software even resorted to using
only digits to
transfer key fingerprints. They outlined that numbers are "easy to
localize" (as opposed to words, which are language-specific) and
"visually distinct".
But the critical piece is the "memorable" part: it is trivial to
generate a random string of characters, but those passwords are hard for
humans to remember. As xkcd noted,
"through 20 years of effort, we've successfully trained everyone
to use passwords that are hard for human to remember but easy for
computers to guess". It explains how a series of words is a
better password than a single word with some characters replaced.
Obviously, you should not need to remember all passwords. Indeed, you
may store some in password managers (which we'll look at in another
article) or write them down in your wallet. In those cases, what you
need is not a password, but something I would rather call a "token", or,
as Debian Developer Daniel Kahn Gillmor (dkg) said in a private email, a
"high entropy, compact, and transferable string". Certain APIs are
specifically crafted to use tokens. OAuth, for
example, generates "access tokens" that are random strings that give
access to services. But in our discussion, we'll use the term "token" in
a broader sense.
Notice how we removed the "memorable" property and added the "compact"
one: we want to efficiently convert the most entropy into the shortest
password possible, to work around possibly limiting password policies.
For example, some bank cards only allow 5-digit security PINs and most
web sites have an upper limit in the password length. The "compact"
property applies less to "passwords" than tokens, because I assume that
you will only use a password in select places: your password manager,
SSH and OpenPGP keys, your computer login, and encryption keys.
Everything else should be in a password manager. Those tools are
generally under your control and should allow large enough passwords
that the compact property is not particularly important.
$ xkcdpass
estop mixing edelweiss conduct rejoin flexitime
In verbose mode, it will show the actual entropy of the generated
passphrase:
$ xkcdpass -V
The supplied word list is located at /usr/lib/python3/dist-packages/xkcdpass/static/default.txt.
Your word list contains 38271 words, or 2^15.22 words.
A 6 word password from this list will have roughly 91 (15.22 * 6) bits of entropy,
assuming truly random word selection.
estop mixing edelweiss conduct rejoin flexitime
Note that the above password has 91 bits of entropy, which is about what
a fifteen-character password would have, if chosen at random from
uppercase, lowercase, digits, and ten symbols:
log2((26 + 26 + 10 + 10)^15) = approx. 92.548875
It's also interesting to note that this is closer to the entropy of a
fifteen-letter base64 encoded password: since each character is six
bits, you end up with 90 bits of entropy. xkcdpass is scriptable and
easy to use. You can also customize the word list, separators, and so on
with different command-line options. By default, xkcdpass uses the 2 of
12 word list from 12
dicts, which is not specifically
geared toward password generation but has been curated for "common
words" and words of different sizes.
Another option is the diceware system. Diceware
works by having a word list in which you look up words based on dice
rolls. For example, rolling the five dice "1 4 2 1 4" would give the
word "bilge". By rolling those dice five times, you generate a five word
password that is both memorable and random. Since paper and dice do not
seem to be popular anymore, someone wrote that as an actual program,
aptly called diceware. It works in a
similar fashion, except that passwords are not space separated by
default:
$ diceware
AbateStripDummy16thThanBrock
Diceware can obviously change the output to look similar to xkcdpass,
but can also accept actual dice rolls for those who do not trust their
computer's entropy source:
$ diceware -d ' ' -r realdice -w en_orig
Please roll 5 dice (or a single dice 5 times).
What number shows dice number 1? 4
What number shows dice number 2? 2
What number shows dice number 3? 6
[...]
Aspire O's Ester Court Born Pk
The diceware software ships with a few word lists, and the default list
has been deliberately created for generating passwords. It is derived
from the standard diceware list with additions from the SecureDrop
project. Diceware ships with the EFF word
list
that has words chosen for better recognition, but it is not enabled by
default, even though diceware recommends using it when generating
passwords with dice. That is because the EFF list was added later
on. The project is
currently considering
making the EFF list be the default.
One disadvantage of diceware is that it doesn't actually show how much
entropy the generated password has those interested need to compute it
for themselves. The actual number depends on the word list: the default
word list has 13 bits of entropy per word (since it is exactly 8192
words long), which means the default 6 word passwords have 78 bits of
entropy:
log2(8192) * 6 = 78
Both of these programs are rather new, having, for example, entered
Debian only after the last stable release, so they may not be directly
available for your distribution. The manual diceware method, of course,
only needs a set of dice and a word list, so that is much more portable,
and both the diceware and xkcdpass programs can be installed through
pip. However, if this is all too complicated,
you can take a look at Openwall's
passwdqc, which is older and more
widely available. It generates more memorable passphrases while at the
same time allowing for better control over the level of entropy:
$ pwqgen
vest5Lyric8wake
$ pwqgen random=78
Theme9accord=milan8ninety9few
For some reason, passwdqc restricts the entropy of passwords between
the bounds of 24 and 85 bits. That tool is also much less customizable
than the other two: what you see here is pretty much what you get. The
4096-word list is also hardcoded in the C source code; it comes from a
Usenet sci.crypt
posting
from 1997.
A key feature of xkcdpass and diceware is that you can craft your own
word list, which can make dictionary-based attacks harder. Indeed, with
such word-based password generators, the only viable way to crack those
passwords is to use dictionary attacks, because the password is so long
that character-based exhaustive searches are not workable, since they
would take centuries to complete. Changing from the default dictionary
therefore brings some advantage against attackers. This may be yet
another "security through obscurity" procedure, however: a naive
approach may be to use a dictionary localized to your native language
(for example, in my case, French), but that would deter only an attacker
that doesn't do basic research about you, so that advantage is quickly
lost to determined attackers.
One should also note that the entropy of the password doesn't depend on
which word list is chosen, only its length. Furthermore, a larger
dictionary only expands the search space logarithmically; in other
words, doubling the word-list length only adds a single bit of entropy.
It is actually much better to add a word to your password than words to
the word list that generates it.
pass, the standard UNIX password
manager, delegates this task to the widely known
pwgen program. It turns out
that pwgen has a pretty bad track record for security issues,
especially in the default "phoneme" mode, which generates non-uniformly
distributed passwords. While pass uses the more "secure" -s mode, I
figured it was worth removing that option to discourage the use of
pwgen in the default mode. I made a trivial patch to pass so that it
generates passwords correctly on its own. The gory details are in this
email.
It turns out that there are lots of ways to skin this particular cat. I
was suggesting the following pipeline to generate the password:
head -c $entropy /dev/random base64 tr -d '\n='
The above command reads a certain number of bytes from the kernel
(head -c $entropy /dev/random) encodes that using the base64
algorithm and strips out the trailing equal sign and newlines (for large
passwords). This is what Gillmor described as a "high-entropy compact
printable/transferable string". The priority, in this case, is to have a
token that is as compact as possible with the given entropy, while at
the same time using a character set that should cause as little trouble
as possible on sites that restrict the characters you can use. Gillmor
is a co-maintainer of the Assword
password manager, which chose base64 because it is widely available and
understood and only takes up 33% more space than the original 8-bit
binary encoding. After a lengthy discussion, the pass maintainer, Jason
A. Donenfeld, chose the following pipeline:
read -r -n $length pass < <(LC_ALL=C tr -dc "$characters" < /dev/urandom)
The above is similar, except it uses tr to directly to read characters
from the kernel, and selects a certain set of characters ($characters)
that is defined earlier as consisting of [:alnum:] for letters and
digits and [:graph:] for symbols, depending on the user's
configuration. Then the read command extracts the chosen number of
characters from the output and stores the result in the pass variable.
A participant on the mailing list, Brian Candler, has
argued
that this wastes entropy as the use of tr discards bits from
/dev/urandom with little gain in
entropy
when compared to base64. But in the end, the maintainer
argued
that reading "reading from /dev/urandom has no [effect] on
/proc/sys/kernel/random/entropy_avail on Linux" and dismissed
the objection.
Another password manager, KeePass uses its own
routines to generate tokens, but the procedure is the same: read from
the kernel's entropy source (and user-generated sources in case of
KeePass) and transform that data into a transferable string.
pwgen
software showed. Furthermore, left to their own devices, users will
generate passwords that can be easily guessed by a skilled attacker,
especially if they can profile the user. It is therefore essential we
provide easy tools for users to generate strong passwords and encourage
them to store secure tokens in password managers.
Note: this article first appeared in the Linux Weekly News.
... but that doesn't mean the work is over.
One big job that needs to happen after the conference is to review and
release the video recordings that were made. With several hundreds of
videos to be checked and only a handful of people with the ability to do
so, review was a massive job that for the past three editions took
several months; e.g., in 2016 the last video work was done in July, when
the preparation of the 2017 edition had already started.
Obviously this is suboptimal, and therefore another solution was
required. After working on it for quite a while (in my spare time), I
came up with SReview, a video review
and transcoding system written in Perl.
An obvious question that could be asked is why I wrote yet another
system, though, and did not use something that already existed. The
short answer to that is "because what's there did not exactly do what I
wanted to". The somewhat longer answer also involves the fact that I
felt like writing something from scratch.
The full story, however, is this: there isn't very much out there, and
what does exist is flawed in some ways. I am aware of three other review
systems that are or were used by other conferences:
.dv files directly from the filesystem in a media
player. For this and other reasons, it could only ever be used from
the conference itself. If nothing else, that final limitation made it
impossible for FOSDEM to use it, but even if that wasn't the case it
was still too basic to ever be useful for a conference the size of
FOSDEM."That ending was there from the get-go," [director Damien Chazelle] told CNN in a recent interview. "I think I just have a thing about love stories where the lovers don't wind up together at the end; I find it very romantic."Huh, excuse me?
"I think there's a reason why most of the greatest love stories in history don't end with happily ever after," Chazelle said. "To me, if you're telling a story about love, love has to be bigger than the characters." Chazelle sees Mia and Sebastian's love as a "third character" and something that "lives on." "[The ending gives] you that sense that even if the relationship itself might be over in practical terms, the love is not over," he said. "The love lasts, and I think that's just a beautiful kind of thing."OH FOR THE LOVE OF. This is a wishy-washy explanation that tries to approach the thing from the artistic side. No, this is bullshit, because of multiple things. Let me try to roll back and explain what I think was the intention.
A pure maintenance release of the random package for truly (hardware-based) random numbers as provided by random.org is now on CRAN. As requested by CRAN, we made running tests optional. Not running tests is clearly one way of not getting (spurious, networking-related) failures ...
Courtesy of CRANberries comes a diffstat report for this release. Current and previous releases are available here as well as on CRAN.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
My most loathed feature of Go is the mandatory use of GOPATH:
I do not want to put my own code next to its
dependencies. Hopefully, this issue is slowly starting to
be accepted by the main authors. In the meantime, you can
workaround this problem with more opinionated tools (like gb) or
by crafting your own Makefile.
For the later, you can have a look at Filippo Valsorda s example
or my own take which I describe in more details here. This is not
meant to be an universal Makefile but a relatively short one with
some batteries included. It comes with a simple Hello World! application.
hellogopher example,
the CLI is handled in the cmd package while the application logic
for printing greetings is in the hello package:
.
cmd/
hello.go
root.go
version.go
glide.lock (generated)
glide.yaml
vendor/ (dependencies will go there)
hello/
root.go
root_test.go
main.go
Makefile
README.md
Makefile.
GOPATH handling
Since all dependencies are vendored, only our own project needs to be
in the GOPATH:
PACKAGE = hellogopher GOPATH = $(CURDIR)/.gopath BASE = $(GOPATH)/src/$(PACKAGE) $(BASE): @mkdir -p $(dir $@) @ln -sf $(CURDIR) $@
hellogopher, not
github.com/vincentbernat/hellogopher: this shortens imports and
makes them easily distinguishable from imports of dependency
packages. However, your application won t be go get-able. This is a
personal choice and can be adjusted with the $(PACKAGE) variable.
We just create a symlink from .gopath/src/hellogopher to our root
directory. The GOPATH environment variable is automatically exported
to the shell commands of the recipes. Any tool should work fine after
changing the current directory to $(BASE). For example, this
snippet builds the executable:
.PHONY: all all: $(BASE) cd $(BASE) && $(GO) build -o bin/$(PACKAGE) main.go
glide.yaml, you specify
what packages you need and the constraints you want on
them. Glide computes a glide.lock file containing the exact
versions for each dependencies (including recursive dependencies) and
download them in the vendor/ folder. I choose to check into the VCS
both glide.yaml and glide.lock files. It s also possible to only
check in the first one or to also check in the vendor/ directory. A
work-in-progress is currently ongoing to provide
a standard dependency management tool with a similar workflow.
We define two rules2:
GLIDE = glide glide.lock: glide.yaml $(BASE) cd $(BASE) && $(GLIDE) update @touch $@ vendor: glide.lock $(BASE) cd $(BASE) && $(GLIDE) --quiet install @ln -sf . vendor/src @touch $@
glide. This enables a user to easily
override it (for example, with make GLIDE=$GOPATH/bin/glide).
GOPATH. For example, here is the lint rule:
BIN = $(GOPATH)/bin GOLINT = $(BIN)/golint $(BIN)/golint: $(BASE) # go get github.com/golang/lint/golint .PHONY: lint lint: vendor $(BASE) $(GOLINT) # @cd $(BASE) && ret=0 && for pkg in $(PKGS); do \ test -z "$$($(GOLINT) $$pkg tee /dev/stderr)" ret=1 ; \ done ; exit $$ret
glide, we let the user a chance to override which golint
executable to use. By default, it uses a private copy. But a user can
use its own copy with make GOLINT=/usr/bin/golint.
In , we have the recipe to build the private copy. We simply issue
go get3 to download and build golint. In , the lint rule
executes golint on each package contained in the $(PKGS)
variable. We ll explain this variable in the next section.
vendor/ directory, the shortcut ./... is not what we expect
as we don t want to run tests on our
dependencies4. Therefore, we compose a list of packages
we care about:
PKGS = $(or $(PKG), $(shell cd $(BASE) && \ env GOPATH=$(GOPATH) $(GO) list ./... grep -v "^$(PACKAGE)/vendor/"))
$(PKG) variable, we use it. For
example, if they want to lint only the cmd package, they
can invoke make lint PKG=hellogopher/cmd which is more intuitive
than specifying PKGS.
Otherwise, we just execute go list ./... but we remove anything from
the vendor directory.
TIMEOUT = 20 TEST_TARGETS := test-default test-bench test-short test-verbose test-race .PHONY: $(TEST_TARGETS) check test tests test-bench: ARGS=-run=__absolutelynothing__ -bench=. test-short: ARGS=-short test-verbose: ARGS=-v test-race: ARGS=-race $(TEST_TARGETS): test check test tests: fmt lint vendor $(BASE) @cd $(BASE) && $(GO) test -timeout $(TIMEOUT)s $(ARGS) $(PKGS)
make test runs all tests;make test TIMEOUT=10 runs all tests with a timeout of 10 seconds;make test PKG=hellogopher/cmd only runs tests for the cmd package;make test ARGS="-v -short" runs tests with the specified arguments;make test-race runs tests with race detector enabled.go test includes a test coverage tool. Unfortunately, it only
handles one package at a time and you have to explicitely list
the packages to be instrumented, otherwise the instrumentation is
limited to the currently tested package. If you provide too many
packages, the compilation time will skyrocket. Moreover, if you want
an output compatible with Jenkins, you ll need some additional tools.
COVERAGE_MODE = atomic COVERAGE_PROFILE = $(COVERAGE_DIR)/profile.out COVERAGE_XML = $(COVERAGE_DIR)/coverage.xml COVERAGE_HTML = $(COVERAGE_DIR)/index.html .PHONY: test-coverage test-coverage-tools test-coverage-tools: $(GOCOVMERGE) $(GOCOV) $(GOCOVXML) # test-coverage: COVERAGE_DIR := $(CURDIR)/test/coverage.$(shell date -Iseconds) test-coverage: fmt lint vendor test-coverage-tools $(BASE) @mkdir -p $(COVERAGE_DIR)/coverage @cd $(BASE) && for pkg in $(PKGS); do \ # $(GO) test \ -coverpkg=$$($(GO) list -f ' join .Deps "\n" ' $$pkg \ grep '^$(PACKAGE)/' grep -v '^$(PACKAGE)/vendor/' \ tr '\n' ',')$$pkg \ -covermode=$(COVERAGE_MODE) \ -coverprofile="$(COVERAGE_DIR)/coverage/ echo $$pkg tr "/" "-" .cover" $$pkg ;\ done @$(GOCOVMERGE) $(COVERAGE_DIR)/coverage/*.cover > $(COVERAGE_PROFILE) @$(GO) tool cover -html=$(COVERAGE_PROFILE) -o $(COVERAGE_HTML) @$(GOCOV) convert $(COVERAGE_PROFILE) $(GOCOVXML) > $(COVERAGE_XML)
gocovmerge merges profiles from different runs into a single one;gocov-xml converts a coverage profile to the Cobertura format;gocov is needed to convert a coverage profile to a format handled
by gocov-xml.golint
described a few sections ago.
In , for each package to test, we run go test with the
-coverprofile argument. We also explicitely provide the list of
packages to instrument to -coverpkg by using go list to get a list
of dependencies for the tested package and keeping only our owns.
Makefile was to work around GOPATH,
it s also a good place to hide the complexity of some operations,
notably around test coverage.
The excerpts provided in this post are a bit simplified. Have a look
at the final result for more perks!
vendor/ directory may stay for dependency
management (retrieval of the latest versions of dependencies
matching a set of constraints).
glide.lock when a
change is detected in glide.yaml, rename the target to
deps-update and make it a phony target.
go get and then
immediately use it because it is convenient.
./... should not include the vendor/
directory by default. Dependencies should be trusted to have run
their own tests in the environment they expect them to
succeed. Unfortunately, this is unlikely to change.
A new minor version 0.2.1, of RcppCCTZ is now on CRAN. It corrects a possible shortcoming and rounding in the conversion from internal representation (in C++11 using int64_t) to the two double values for seconds and nanoseconds handed to R. Two other minor changes are also summarized below.
RcppCCTZ uses Rcpp to bring CCTZ to R. CCTZ is a C++ library for translating between absolute and civil times using the rules of a time zone. In fact, it is two libraries. One for dealing with civil time: human-readable dates and times, and one for converting between between absolute and civil times via time zones. The RcppCCTZ page has a few usage examples and details.
The changes in this version are summarized here:
We also have a diff to the previous version thanks to CRANberries. More details are at the RcppCCTZ page; code, issue tickets etc at the GitHub repository.Changes in version 0.2.1 (2017-02-04)
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
A new version of the nanotime package for working with nanosecond timestamps is now on CRAN.
nanotime uses the RcppCCTZ package for (efficient) high(er) resolution time parsing and formatting, and the bit64 package for the actual integer64 arithmetic.
This release adds an improved default display format always showing nine digits of fractional seconds. It also changes the print() method to call format() first, and we started to provide some better default Ops methods. These fixes were suggested by Matt Dowle. We also corrected a small issue which could lead to precision loss in formatting as pointed out by Leonardo Silvestri.
We also have a diff to the previous version thanks to CRANberries. More details and examples are at the nanotime page; code, issue tickets etc at the GitHub repository.Changes in version 0.1.1 (2017-02-04)
- The default display format now always shows nine digits (#10 closing #9)
- The default print method was updated to use formated output, and a new new converter
as.integer64was added- Several 'Ops' method are now explicitly defined allowing casting of results (rather than falling back on bit64 behaviour)
- The format routine is now more careful about not loosing precision (#13 closing #12)
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
A major new update of the RPushbullet package is now on CRAN. RPushbullet interfacing the neat Pushbullet service for inter-device messaging, communication, and more. It lets you easily send alerts like the one to the to your browser, phone, tablet, ... -- or all at once.
This release owes a lot to Seth Wenchel who was instrumental in driving several key refactorings. We now use the curl package instead of relying on system() calls to the binary. We also switched from RJSONIO to jsonlite. A new helper function to create the required resourcefile was added, and several other changes were made as detailed below in the extract from the NEWS.Rd file.
Courtesy of CRANberries, there is also a diffstat report for this release. More details about the package are at the RPushbullet webpage and the RPushbullet GitHub repo.Changes in version 0.3.0 (2017-02-03)
- The
curlbinary use was replaced by use of the curl package; several new helper functions added (PRs #30, #36 by Seth closing #29)- Use of RJSONIO was replaced by use of jsonlite (PR #32 by Seth closing #31)
- A new function
pbSetupwas added to aid creating the resource file (PRs #34, #37 by Seth and Dirk)- The package intialization was refactored so that non-loading calls such as
RPushbullet::pbPost(...)now work (#33 closing #26)- The test suite was updated and extended
- The Travis script was updated use run.sh
- DESCRIPTION, README.md and other files were updated for current
R CMD checkstandards- Deprecated parts such as 'type=address' were removed, and the documentation was updated accordingly.
- Coverage support was added (in a 'on-demand' setting as automated runs would need a Pushbullet API token)
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
On Wednesday, I spent the entire day in court in Follo Tingrett
representing the member association
NUUG, alongside the member
association EFN and the DNS registrar
IMC, challenging the seizure of the DNS name popcorn-time.no. It
was interesting to sit in a court of law for the first time in my
life. Our team can be seen in the picture above: attorney Ola
Tellesb , EFN board member Tom Fredrik Blenning, IMC CEO Morten Emil
Eriksen and NUUG board member Petter Reinholdtsen.
The
case at hand is that the Norwegian National Authority for
Investigation and Prosecution of Economic and Environmental Crime (aka
kokrim) decided on their own, to seize a DNS domain early last
year, without following
the
official policy of the Norwegian DNS authority which require a
court decision. The web site in question was a site covering Popcorn
Time. And Popcorn Time is the name of a technology with both legal
and illegal applications. Popcorn Time is a client combining
searching a Bittorrent directory available on the Internet with
downloading/distribute content via Bittorrent and playing the
downloaded content on screen. It can be used illegally if it is used
to distribute content against the will of the right holder, but it can
also be used legally to play a lot of content, for example the
millions of movies
available from the
Internet Archive or the collection
available from Vodo. We created
a
video demonstrating legally use of Popcorn Time and played it in
Court. It can of course be downloaded using Bittorrent.
I did not quite know what to expect from a day in court. The
government held on to their version of the story and we held on to
ours, and I hope the judge is able to make sense of it all. We will
know in two weeks time. Unfortunately I do not have high hopes, as
the Government have the upper hand here with more knowledge about the
case, better training in handling criminal law and in general higher
standing in the courts than fairly unknown DNS registrar and member
associations. It is expensive to be right also in Norway. So far the
case have cost more than NOK 70 000,-. To help fund the case, NUUG
and EFN have asked for donations, and managed to collect around NOK 25
000,- so far. Given the presentation from the Government, I expect
the government to appeal if the case go our way. And if the case do
not go our way, I hope we have enough funding to appeal.
From the other side came two people from kokrim. On the benches,
appearing to be part of the group from the government were two people
from the Simonsen Vogt Wiik lawyer office, and three others I am not
quite sure who was. kokrim had proposed to present two witnesses
from The Motion Picture Association, but this was rejected because
they did not speak Norwegian and it was a bit late to bring in a
translator, but perhaps the two from MPA were present anyway. All
seven appeared to know each other. Good to see the case is take
seriously.
If you, like me, believe the courts should be involved before a DNS
domain is hijacked by the government, or you believe the Popcorn Time
technology have a lot of useful and legal applications, I suggest you
too donate to
the NUUG defense fund. Both Bitcoin and bank transfer are
available. If NUUG get more than we need for the legal action (very
unlikely), the rest will be spend promoting free software, open
standards and unix-like operating systems in Norway, so no matter what
happens the money will be put to good use.
If you want to lean more about the case, I recommend you check out
the blog
posts from NUUG covering the case. They cover the legal arguments
on both sides.
Working with Date, Calendar, SimpleDateFormat in Android. As I mentioned In my last blog, I would talk about how I used Calendar and Date classes for the user to designate silent mode by setting time constraints and weekdays, in Lumicall. Date class to used to interpret dates as year, month, day, hour, minute, and second values. I had to compare whether the current time falls between Start Time and End Time specified by the user. So that, silent mode can be enabled within that time frame. I used Calendar Class to get the current hour in 24-Hour format and minute.
Calendar now = Calendar.getInstance(); int hour = now.get(Calendar.HOUR_OF_DAY); int minute = now.get(Calendar.MINUTE);Now, Since the user enters the Time in EditText Widgets, the values were retrieved as strings.
SimpleDateFormat simpleDateFormat= new SimpleDateFormat( HH:mm , Locale.ENGLISH); Date currentTime = parseDate(hour + ":" + minute) Date timeCompareOne = parseDate(hhStart + : +mmStart); Date timeCompareTwo = parseDate(hhEnd + : +mmEnd);
if(timeCompareOne.before(currentTime) && timeCompareTwo.after(currentTime)) Switch on the silent mode;Added a try catch block to handle the exception which will arise if the SimpleDateFormat.parse method is unable to parse the given Java String.
public Date parseDate(String date) try return inputParser.parse(date); catch (java.text.ParseException e) return new Date(0);Comparing Time? Done!
Calendar calendar = Calendar.getInstance(); int day = calendar.get(Calendar.DAY_OF_WEEK);If it s sunday, value returned by calendar.get(Calendar.DAY_OF_WEEK) is 1, if monday, 2 and so on..
Thanks for reading,| Series: | Wayfarers #2 |
| Publisher: | Harper Voyager |
| Copyright: | October 2016 |
| ISBN: | 0-06-256942-2 |
| Format: | Kindle |
| Pages: | 384 |
Next.