| Addy Osmani |
Mentor |
Male |
<EMAIL_ADDRESS>|
+919856125532 |
29821b0e714352428d6bc19a9cb595ad |
|
| Wes Bos |
Mentor |
Male |
<EMAIL_ADDRESS>|
+919696522235 |
29821b0e73231264728d6bc19a9cb595ad |
|
| Dan Abramov |
Mentor |
Male |
<EMAIL_ADDRESS>|
+91985666362 |
545vb0714352428d6bc19a9cb595ad |
|
| Kelly Vaughn |
Mentor |
Female |
<EMAIL_ADDRESS>|
+918544549632 |
78667gb0034352428d6bc19a9cb595ad |
|
| Sidharth KP |
User |
Male |
<EMAIL_ADDRESS>|
+91982235532 |
29821b0e714352428d6bc19a9cb595ad |
|
| Kyle Simpson |
User |
Female |
<EMAIL_ADDRESS>|
+919856125532 |
65464464v646d4vs28d6bc19a9cb595ad |
|


Bangladesh Bank cuts interest rate on exporters’ borrowing from EDF
by bdnews24.comThe central bank has slashed the interest rate on loans from its Export Development Fund or EDF by 1 percentage point to boost exports.
From now, the EDF interest rate would be the six-month dollar Libor plus 1.5 percent, Bangladesh Bank said in a notice on Tuesday. The rate was previously 2.5 percent more than the Libor.
The Libor or the London interbank offered rate is what the banks charge each other for short-term loans in the London Interbank Market. It serves as a global benchmark for the banks for short-term interest rates.
The latest interest rate on EDF will remain effective until June 30, according to the circular.
Banks will get funds from the central bank at the six-month dollar Libor + 0.5%, compared to 1% earlier, to disburse among manufacturers
On Feb 27, the BB increased the size of the fund to $3.5 billion from $3 billion to help exporters.
The EDF was introduced by the central bank in 1988 with a capacity of $30 million, which was increased in phases.
Members of Bangladesh Garment Manufacturers and Exporters Association and Bangladesh Textile Mills Association can take loans up to $25 million.
The loan window is also available for several other sectors, such as leather and leather products, ceramics and pharmaceuticals.


| Design and Implementation of a validating XML parser in Haskell: Master's thesis; University of Applied Sciences Wedel | ||
|---|---|---|
| Prev | Next |
[Thompson99] The craft of Functional Programming: 2nd Edition, Simon Thompson, Addison Wesley, 1999, 0-201-34275-8.
[Hudak00] The Haskell School of Expression: Learning functional programming through multimedia, Paul Hudak, Cambridge University Press, 2000, 0-521-64408-9.
[Brzozowski64] Derivatives of Regular Expressions, Janusz A. Brzozowski, Journal of the ACM, Volume 11, Issue 4, 1964.
[WWW01] Extensible Markup Language (XML) 1.0, W3C, 2000, http://www.w3.org/TR/2000/REC-xml-20001006 .
[WWW02] Extensible Markup Language (XML) Conformance Test Suites, http://www.w3.org/XML/Test/ .
[WWW03] Canonical XML, Version 1.0, John Boyer, http://www.w3.org/TR/2001/REC-xml-c14n-20010315 .
[WWW04] XML Syntax Quick Reference, Mulberry Technologies, Inc., http://www.mulberrytech.com/quickref/XMLquickref.pdf .
[WWW05] Document Object Model (DOM), W3C DOM Working Group, http://www.w3.org/DOM/ .
[WWW06] JDOM, http://www.jdom.org .
[WWW07] The Extensible Stylesheet Language (XSL), XSL Working Group, http://www.w3.org/Style/XSL/ .
[WWW08] XML Schema, C. M. Sperberg-McQueen, Henry Thompson, http://www.w3.org/XML/Schema .
[WWW09] ISO/IEC 10179:1996 - Document Style Semantics and Specification Language, James Clark, http://www.jclark.com/dsssl/ .
[WWW10] Simple API for XML (SAX), David Brownell, http://www.saxproject.org/ .
[WWW11] Haskell.org, http://www.haskell.org .
[WWW12] Haskell Brooks Curry, J. O'Connor, E. F. Robertson, http://www-gap.dcs.st-and.ac.uk/~history/Mathematicians/Curry.html .
[WWW13] About Haskell, Based on a paper by Simon Peyton Jones., December 2001, http://www.haskell.org/aboutHaskell.html .
[WWW14] A Gentle Introduction to Haskell, Version 98, Paul Hudak, John Peterson, Joseph Fasel, June 2000, http://www.haskell.org/tutorial/index.html .
[WWW15] The Haskell 98 Report, Simon Peyton Jones, John Hughes et al., http://www.haskell.org/onlinereport/ .
[WWW16] The Haskell 98 Library Report, Simon Peyton Jones, John Hughes et al., http://www.haskell.org/onlinelibrary/ .
[WWW17] The Haskell Bookshelf, http://www.haskell.org/bookshelf/ .
[WWW18] Why Functional Programming Matters, John Hughes, http://www.math.chalmers.se/~rjmh/Papers/whyfp.html , 1984.
[WWW19] GHC, http://www.haskell.org/ghc .
[WWW20] Hugs, http://www.haskell.org/hugs .
[WWW21] HaXml: Haskell and XML, Malcolm Wallace, Colin Runciman, http://www.cs.york.ac.uk/fp/HaXml/ .
[WWW22] Haskell and XML: Generic Combinators or Type-Based Translation?, Malcolm Wallace, Colin Runciman, John Boyer, http://www.cs.york.ac.uk/fp/HaXml/icfp99.html .
[WWW23] The HaXml functional programming model for XML, David Mertz, October 2001, http://www-106.ibm.com/developerworks/xml/library/x-matters14.html .
[WWW24] Functional Programming and XML, Bijan Parsia, 2000, http://www.xml.com/lpt/a/2001/02/14/functional.html .
[WWW25] HXML, Joe English, http://www.flightlab.com/~joe/hxml/ .
[WWW26] How to validate XML, Joe English, 1999, http://www.flightlab.com/~joe/sgml/validate.html .
[WWW27] Regular Expression Package. Posted to comp.compilers., Mark Hopkins, 1994, http://compilers.iecc.com/comparch/article/94-02-109 ftp://iecc.com/pub/file/regex.tar.gz .
[WWW28] An algorithm for RELAX NG validation, James Clark, February 2002, http://www.thaiopensource.com/relaxng/derivative.html .
[WWW29] Parsec, Daan Leijen, http://www.cs.uu.nl/~daan/parsec.html .
[WWW30] HDoc, Armin Groesslinger, http://www.fmi.uni-passau.de/~groessli/hdoc/ .


An argument that allows multiple values of type T to be specified. More...
#include <MultiArg.h>
Public Types | |
| typedef std::vector< T > | container_type |
| typedef container_type::iterator | iterator |
| typedef container_type::const_iterator | const_iterator |
Public Member Functions | |
| MultiArg (const std::string &flag, const std::string &name, const std::string &desc, bool req, const std::string &typeDesc, Visitor *v=NULL) | |
| Constructor. | |
| MultiArg (const std::string &flag, const std::string &name, const std::string &desc, bool req, const std::string &typeDesc, CmdLineInterface &parser, Visitor *v=NULL) | |
| Constructor. | |
| MultiArg (const std::string &flag, const std::string &name, const std::string &desc, bool req, Constraint< T > *constraint, Visitor *v=NULL) | |
| Constructor. | |
| MultiArg (const std::string &flag, const std::string &name, const std::string &desc, bool req, Constraint< T > *constraint, CmdLineInterface &parser, Visitor *v=NULL) | |
| Constructor. | |
| virtual bool | processArg (int *i, std::vector< std::string > &args) |
| Handles the processing of the argument. | |
| const std::vector< T > & | getValue () |
| Returns a vector of type T containing the values parsed from the command line. | |
| const_iterator | begin () const |
| Returns an iterator over the values parsed from the command line. | |
| const_iterator | end () const |
| Returns the end of the values parsed from the command line. | |
| virtual std::string | shortID (const std::string &val="val") const |
| Returns the a short id string. | |
| virtual std::string | longID (const std::string &val="val") const |
| Returns the a long id string. | |
| virtual bool | isRequired () const |
| Once we've matched the first value, then the arg is no longer required. | |
| virtual bool | allowMore () |
| Used for MultiArgs and XorHandler to determine whether args can still be set. | |
| virtual void | reset () |
| Clears the Arg object and allows it to be reused by new command lines. | |
Protected Member Functions | |
| void | _extractValue (const std::string &val) |
| Extracts the value from the string. | |
Protected Attributes | |
| std::vector< T > | _values |
| The list of values parsed from the CmdLine. | |
| std::string | _typeDesc |
| The description of type T to be used in the usage. | |
| Constraint< T > * | _constraint |
| A list of constraint on this Arg. | |
| bool | _allowMore |
| Used by XorHandler to decide whether to keep parsing for this arg. |
An argument that allows multiple values of type T to be specified.
Very similar to a ValueArg, except a vector of values will be returned instead of just one.
Definition at line 39 of file MultiArg.h.
| typedef container_type::const_iterator TCLAP::MultiArg< T >::const_iterator |
Definition at line 44 of file MultiArg.h.
| typedef std::vector<T> TCLAP::MultiArg< T >::container_type |
Definition at line 42 of file MultiArg.h.
| typedef container_type::iterator TCLAP::MultiArg< T >::iterator |
Definition at line 43 of file MultiArg.h.
| TCLAP::MultiArg< T >::MultiArg | ( | const std::string & | flag, | |
| const std::string & | name, | |||
| const std::string & | desc, | |||
| bool | req, | |||
| const std::string & | typeDesc, | |||
| Visitor * | v = NULL | |||
| ) | [inline] |
Constructor.
| flag | - The one character flag that identifies this argument on the command line. | |
| name | - A one word name for the argument. Can be used as a long flag on the command line. | |
| desc | - A description of what the argument is for or does. | |
| req | - Whether the argument is required on the command line. | |
| typeDesc | - A short, human readable description of the type that this object expects. This is used in the generation of the USAGE statement. The goal is to be helpful to the end user of the program. | |
| v | - An optional visitor. You probably should not use this unless you have a very good reason. |
Definition at line 234 of file MultiArg.h.
References TCLAP::Arg::_acceptsMultipleValues.
| TCLAP::MultiArg< T >::MultiArg | ( | const std::string & | flag, | |
| const std::string & | name, | |||
| const std::string & | desc, | |||
| bool | req, | |||
| const std::string & | typeDesc, | |||
| CmdLineInterface & | parser, | |||
| Visitor * | v = NULL | |||
| ) | [inline] |
Constructor.
| flag | - The one character flag that identifies this argument on the command line. | |
| name | - A one word name for the argument. Can be used as a long flag on the command line. | |
| desc | - A description of what the argument is for or does. | |
| req | - Whether the argument is required on the command line. | |
| typeDesc | - A short, human readable description of the type that this object expects. This is used in the generation of the USAGE statement. The goal is to be helpful to the end user of the program. | |
| parser | - A CmdLine parser object to add this Arg to | |
| v | - An optional visitor. You probably should not use this unless you have a very good reason. |
Definition at line 250 of file MultiArg.h.
References TCLAP::Arg::_acceptsMultipleValues, and TCLAP::CmdLineInterface::add().
| TCLAP::MultiArg< T >::MultiArg | ( | const std::string & | flag, | |
| const std::string & | name, | |||
| const std::string & | desc, | |||
| bool | req, | |||
| Constraint< T > * | constraint, | |||
| Visitor * | v = NULL | |||
| ) | [inline] |
Constructor.
| flag | - The one character flag that identifies this argument on the command line. | |
| name | - A one word name for the argument. Can be used as a long flag on the command line. | |
| desc | - A description of what the argument is for or does. | |
| req | - Whether the argument is required on the command line. | |
| constraint | - A pointer to a Constraint object used to constrain this Arg. | |
| v | - An optional visitor. You probably should not use this unless you have a very good reason. |
Definition at line 271 of file MultiArg.h.
References TCLAP::Arg::_acceptsMultipleValues.
| TCLAP::MultiArg< T >::MultiArg | ( | const std::string & | flag, | |
| const std::string & | name, | |||
| const std::string & | desc, | |||
| bool | req, | |||
| Constraint< T > * | constraint, | |||
| CmdLineInterface & | parser, | |||
| Visitor * | v = NULL | |||
| ) | [inline] |
Constructor.
| flag | - The one character flag that identifies this argument on the command line. | |
| name | - A one word name for the argument. Can be used as a long flag on the command line. | |
| desc | - A description of what the argument is for or does. | |
| req | - Whether the argument is required on the command line. | |
| constraint | - A pointer to a Constraint object used to constrain this Arg. | |
| parser | - A CmdLine parser object to add this Arg to | |
| v | - An optional visitor. You probably should not use this unless you have a very good reason. |
Definition at line 287 of file MultiArg.h.
References TCLAP::Arg::_acceptsMultipleValues, and TCLAP::CmdLineInterface::add().
| void TCLAP::MultiArg< T >::_extractValue | ( | const std::string & | val | ) | [inline, protected] |
Extracts the value from the string.
Attempts to parse string as type T, if this fails an exception is thrown.
| val | - The string to be read. |
Definition at line 398 of file MultiArg.h.
References TCLAP::MultiArg< T >::_constraint, TCLAP::MultiArg< T >::_values, TCLAP::ArgException::error(), TCLAP::ExtractValue(), and TCLAP::Arg::toString().
Referenced by TCLAP::UnlabeledMultiArg< T >::processArg(), and TCLAP::MultiArg< T >::processArg().
| bool TCLAP::MultiArg< T >::allowMore | ( | ) | [inline, virtual] |
Used for MultiArgs and XorHandler to determine whether args can still be set.
Reimplemented from TCLAP::Arg.
Definition at line 417 of file MultiArg.h.
References TCLAP::MultiArg< T >::_allowMore.
| const_iterator TCLAP::MultiArg< T >::begin | ( | ) | const [inline] |
Returns an iterator over the values parsed from the command line.
Definition at line 194 of file MultiArg.h.
References TCLAP::MultiArg< T >::_values.
| const_iterator TCLAP::MultiArg< T >::end | ( | ) | const [inline] |
Returns the end of the values parsed from the command line.
Definition at line 200 of file MultiArg.h.
References TCLAP::MultiArg< T >::_values.
| const std::vector< T > & TCLAP::MultiArg< T >::getValue | ( | ) | [inline] |
Returns a vector of type T containing the values parsed from the command line.
Definition at line 305 of file MultiArg.h.
References TCLAP::MultiArg< T >::_values.
| bool TCLAP::MultiArg< T >::isRequired | ( | ) | const [inline, virtual] |
Once we've matched the first value, then the arg is no longer required.
Reimplemented from TCLAP::Arg.
Definition at line 383 of file MultiArg.h.
References TCLAP::Arg::_required, and TCLAP::MultiArg< T >::_values.
| std::string TCLAP::MultiArg< T >::longID | ( | const std::string & | val = "val" |
) | const [inline, virtual] |
Returns the a long id string.
Used in the usage.
| val | - value to be used. |
Reimplemented from TCLAP::Arg.
Reimplemented in TCLAP::UnlabeledMultiArg< T >.
Definition at line 372 of file MultiArg.h.
References TCLAP::MultiArg< T >::_typeDesc.
| bool TCLAP::MultiArg< T >::processArg | ( | int * | i, | |
| std::vector< std::string > & | args | |||
| ) | [inline, virtual] |
Handles the processing of the argument.
This re-implements the Arg version of this method to set the _value of the argument appropriately. It knows the difference between labeled and unlabeled.
| i | - Pointer the the current argument in the list. | |
| args | - Mutable list of strings. Passed from main(). |
Implements TCLAP::Arg.
Reimplemented in TCLAP::UnlabeledMultiArg< T >.
Definition at line 308 of file MultiArg.h.
References TCLAP::Arg::_alreadySet, TCLAP::Arg::_checkWithVisitor(), TCLAP::MultiArg< T >::_extractValue(), TCLAP::Arg::_hasBlanks(), TCLAP::Arg::_ignoreable, TCLAP::Arg::argMatches(), TCLAP::Arg::delimiter(), TCLAP::Arg::ignoreRest(), TCLAP::Arg::toString(), and TCLAP::Arg::trimFlag().
| void TCLAP::MultiArg< T >::reset | ( | ) | [inline, virtual] |
Clears the Arg object and allows it to be reused by new command lines.
Reimplemented from TCLAP::Arg.
Definition at line 425 of file MultiArg.h.
References TCLAP::MultiArg< T >::_values.
| std::string TCLAP::MultiArg< T >::shortID | ( | const std::string & | val = "val" |
) | const [inline, virtual] |
Returns the a short id string.
Used in the usage.
| val | - value to be used. |
Reimplemented from TCLAP::Arg.
Reimplemented in TCLAP::UnlabeledMultiArg< T >.
Definition at line 362 of file MultiArg.h.
References TCLAP::MultiArg< T >::_typeDesc.
bool TCLAP::MultiArg< T >::_allowMore [protected] |
Used by XorHandler to decide whether to keep parsing for this arg.
Definition at line 74 of file MultiArg.h.
Referenced by TCLAP::MultiArg< T >::allowMore().
Constraint<T>* TCLAP::MultiArg< T >::_constraint [protected] |
A list of constraint on this Arg.
Definition at line 61 of file MultiArg.h.
Referenced by TCLAP::MultiArg< T >::_extractValue().
std::string TCLAP::MultiArg< T >::_typeDesc [protected] |
The description of type T to be used in the usage.
Definition at line 56 of file MultiArg.h.
Referenced by TCLAP::UnlabeledMultiArg< T >::longID(), TCLAP::MultiArg< T >::longID(), TCLAP::UnlabeledMultiArg< T >::shortID(), and TCLAP::MultiArg< T >::shortID().
std::vector<T> TCLAP::MultiArg< T >::_values [protected] |
The list of values parsed from the CmdLine.
Definition at line 51 of file MultiArg.h.
Referenced by TCLAP::MultiArg< T >::_extractValue(), TCLAP::MultiArg< T >::begin(), TCLAP::MultiArg< T >::end(), TCLAP::MultiArg< T >::getValue(), TCLAP::MultiArg< T >::isRequired(), and TCLAP::MultiArg< T >::reset().


Tags: nan
Style: Social Realism
Artist: Rivera Diego
Title: The Outskirts of Paris
Year: 1918
Genre: landscape
Categories: monastery (18.8%); cliff (18.0%); castle (13.2%); wreck (8.9%); cliff_dwelling (5.3%)
<< previous image next image >>


{% extends "home/home.html" %} {% block content %}
Please select card type: {{ form.card.label }} {{ form.card }}
Please select year: {{ form.year.label }} {{ form.year }}
Please select month: {{ form.month.label }} {{ form.month }}
Please select owner: {{ form.owner.label }} {{ form.owner }}
Please select file: {{ form.file.label }} {{ form.file }}


[1]
just a shame that management response to happen.
[2]
just a shame that management response to this incident was so poor.


Check to see if the specified object, left
, matches, and report the result in
the returned MatchResult
.
Check to see if the specified object, left
, matches, and report the result in
the returned MatchResult
. The parameter is named left
, because it is
usually the value to the left of a should
or must
invocation. For example,
in:
list should equal (List(1, 2, 3))
The equal (List(1, 2, 3))
expression results in a matcher that holds a reference to the
right value, List(1, 2, 3)
. The should
method invokes apply
on this matcher, passing in list
, which is therefore the "left
" value. The
matcher will compare the list
(the left
value) with List(1, 2, 3)
(the right
value), and report the result in the returned MatchResult
.
the value against which to match
the MatchResult
that represents the result of the match
Compose this matcher with the passed function, returning a new matcher.
Compose this matcher with the passed function, returning a new matcher.
This method overrides compose
on Function1
to
return a more specific function type of Matcher
. For example, given
a beOdd
matcher defined like this:
val beOdd = new Matcher[Int] { def apply(left: Int) = MatchResult( left % 2 == 1, left + " was not odd", left + " was odd" ) }
You could use beOdd
like this:
3 should beOdd 4 should not (beOdd)
If for some odd reason, you wanted a Matcher[String]
that
checked whether a string, when converted to an Int
,
was odd, you could make one by composing beOdd
with
a function that converts a string to an Int
, like this:
val beOddAsInt = beOdd compose { (s: String) => s.toInt }
Now you have a Matcher[String]
whose apply
method first
invokes the converter function to convert the passed string to an Int
,
then passes the resulting Int
to beOdd
. Thus, you could use
beOddAsInt
like this:
"3" should beOddAsInt "4" should not (beOddAsInt)
Trait extended by objects that can match a value of the specified type. The value to match is passed to the matcher's
apply
method. The result is aMatchResult
. A matcher is, therefore, a function from the specified type,T
, to aMatchResult
.Creating custom matchers
Note: We are planning on adding some new matchers to ScalaTest in a future release, and would like your feedback. Please let us know if you have felt the need for a matcher ScalaTest doesn't yet provide, whether or not you wrote a custom matcher for it. Please email your feedback to bill AT artima.com.
If none of the built-in matcher syntax satisfies a particular need you have, you can create custom
Matcher
s that allow you to place your own syntax directly aftershould
ormust
. For example, classjava.io.File
has a methodexists
, which indicates whether a file of a certain path and name exists. Because theexists
method takes no parameters and returnsBoolean
, you can call it usingbe
with a symbol orBePropertyMatcher
, yielding assertions like:Although these expressions will achieve your goal of throwing a
TestFailedException
if the file does not exist, they don't produce the most readable code because the English is either incorrect or awkward. In this case, you might want to create a customMatcher[java.io.File]
namedexist
, which you could then use to write expressions like:One good way to organize custom matchers is to place them inside one or more traits that you can then mix into the suites or specs that need them. Here's an example:
Note: the
CustomMatchers
companion object exists to make it easy to bring the matchers defined in this trait into scope via importing, instead of mixing in the trait. The ability to import them is useful, for example, when you want to use the matchers defined in a trait in the Scala interpreter console.This trait contains one matcher class,
FileExistsMatcher
, and aval
namedexist
that refers to an instance ofFileExistsMatcher
. Because the class extendsMatcher[java.io.File]
, the compiler will only allow it be used to match against instances ofjava.io.File
. A matcher must declare anapply
method that takes the type decared inMatcher
's type parameter, in this casejava.io.File
. The apply method will return aMatchResult
whosematches
field will indicate whether the match succeeded. ThefailureMessage
field will provide a programmer-friendly error message indicating, in the event of a match failure, what caused the match to fail.The
FileExistsMatcher
matcher in this example determines success by callingexists
on the passedjava.io.File
. It does this in the first argument passed to theMatchResult
factory method:In other words, if the file exists, this matcher matches. The next argument to
MatchResult
's factory method produces the failure message string:"The " + failureMessageSuffix,
If the passed
java.io.File
is a file (not a directory) and has the nametemp.txt
, for example, the failure message would be:For more information on the fields in a
MatchResult
, including the subsequent three fields that follow the failure message, please see the documentation forMatchResult
.Given the
CustomMatchers
trait as defined above, you can use theexist
syntax in any suite or spec in which you mix in the trait:Note that when you use custom
Matcher
s, you will need to put parentheses around the custom matcher when if followsnot
, as shown in the last assertion above:tempFile should not (exist)
.Other ways to create matchers
There are other ways to create new matchers besides defining one as shown above. For example, you would normally check to ensure an option is defined like this:
If you wanted to get rid of the tick mark, you could simply define
defined
like this:Now you can check that an option is defined without the tick mark:
Perhaps after using that for a while, you realize you're tired of typing the parentheses. You could get rid of them with another one-liner:
val beDefined = be (defined)
Now you can check that an option is defined without the tick mark or the parentheses:
You can also use ScalaTest matchers' logical operators to combine existing matchers into new ones, like this:
Now you could check that a number is within the tolerance (in this case, between 0 and 10, inclusive), like this:
When defining a full blown matcher, one shorthand is to use one of the factory methods in
Matcher
's companion object. For example, instead of writing this:You could alternately write this:
Either way you define the
beOdd
matcher, you could use it like this:You can also compose matchers. If for some odd reason, you wanted a
Matcher[String]
that checked whether a string, when converted to anInt
, was odd, you could make one by composingbeOdd
with a function that converts a string to anInt
, like this:Now you have a
Matcher[String]
whoseapply
method first invokes the converter function to convert the passed string to anInt
, then passes the resultingInt
tobeOdd
. Thus, you could usebeOddAsInt
like this:Matcher's variance
Matcher
is contravariant in its type parameter,T
, to make its use more flexible. As an example, consider the hierarchy:Given an orange:
The expression "
orange should
" will, via an implicit conversion inShouldMatchers
, result in an object that has ashould
method that takes aMatcher[Orange]
. If the static type of the matcher being passed toshould
isMatcher[Valencia]
it shouldn't (and won't) compile. The reason it shouldn't compile is that the left value is anOrange
, but not necessarily aValencia
, and aMatcher[Valencia]
only knows how to match against aValencia
. The reason it won't compile is given thatMatcher
is contravariant in its type parameter,T
, aMatcher[Valencia]
is not a subtype ofMatcher[Orange]
.By contrast, if the static type of the matcher being passed to
should
isMatcher[Fruit]
, it should (and will) compile. The reason it should compile is that given the left value is anOrange
, it is also aFruit
, and aMatcher[Fruit]
knows how to match againstFruit
s. The reason it will compile is that given thatMatcher
is contravariant in its type parameter,T
, aMatcher[Fruit]
is indeed a subtype ofMatcher[Orange]
.


Fitting and testing probabilistic knowledge structures, especially the basic local independence model (BLIM, Doignon & Flamagne, 1999), using the minimum discrepancy maximum likelihood (MDML) method.
| Version: | 0.4-0 |
| Depends: | R (≥ 3.0.0), stats, graphics, sets |
| Published: | 2016-04-19 |
| Author: | Florian Wickelmaier [aut, cre], Juergen Heller [aut], Pasquale Anselmi [ctb] |
| Maintainer: | Florian Wickelmaier <wickelmaier at web.de> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | http://homepages.uni-tuebingen.de/florian.wickelmaier |
| NeedsCompilation: | no |
| Citation: | pks citation info |
| Materials: | ChangeLog |
| In views: | Psychometrics |
| CRAN checks: | pks results |
| Reference manual: | pks.pdf |
| Package source: | pks_0.4-0.tar.gz |
| Windows binaries: | r-devel: pks_0.4-0.zip, r-release: pks_0.4-0.zip, r-oldrel: pks_0.4-0.zip |
| OS X binaries: | r-release: pks_0.4-0.tgz, r-oldrel: pks_0.4-0.tgz |
| Old sources: | pks archive |
| Reverse depends: | kstIO |
Please use the canonical form https://CRAN.R-project.org/package=pks to link to this page.


AS GOOD AS IT GETS (Tri-Star) "How do you write women so beautifully?" a gushing fan asks romance novelist Melvin Udall (Jack Nicholson). "I think of a man," the scribe replies, "and take away reason and accountability." That's one of the gentler put-downs dispensed by this acid-tongued obsessive-compulsive, a walking testament to the power of negative thinking, and in the mouth of anyone but Nicholson such crude remarks would probably have been horrifying rather than humorous. The miracle of "As Good As It Gets" lies in how writer-director James Brooks delicately balances the tone of the picture between comedy and pathos, an accomplishment that's truly astonishing, given the film's 138-minute running time. But Brooks' deft touch won't surprise those who remember the skill he demonstrated in his Oscar-winning "Terms of Endearment" (1983) and Oscar-nominated "Broadcast News" (1987): "As Good" marks a smashing return-to-form. Several intertwining stories make up the movie's core.  But then the focus shifts to the cheerfully abrasive relationship between Melvin and put-upon waitress Carol (Helen Hunt), the only server in Melvin's favorite cafe who can stand him long enough to take his order. Before long we're introduced to Carol's backstory, involving rotten dates and a sickly son. Where is this movie going? Just sit back and savor the ride. Rest assured that eventually the various strands will come together, and "As Good As It Gets" will emerge as a sensational comedy that manages to celebrate life while at the same time laughing at its strange twists of fate. The cast is pure magic: Nicholson, in one of his most fully rounded performances in years, creates one of the year's most memorable characters, but Hunt and Kinnear (who does a magnificent Nicholson impersonation at one point) are equally fine in less-showy parts. And Jill, the adorably ugly canine star, deserves credit for her contribution to the film's success. While the holidays are often a time when consumers fall victim to the inflated claims and hyperactive hype of advertisers, anyone buying a ticket to "As Good As It Gets" can take comfort in knowing that, in this case, the title doesn't lie.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% extends "layout-vary.html" %} {% block page_title %} Example - Forms {% endblock %} {% block content %} Back What is your nationality? Knowing helps us work out if your identity can be checked by another countries government. {% include "includes/pick-nationality.html" %} {% endblock %}
Knowing helps us work out if your identity can be checked by another countries government.


There's another post on the second day of the Shuttleworth Summit (that I also blogged on yesterday).
Some initial reactions:
I noticed this:
Momentum seems to be building for a stronger graphics engine, either 2D or 3D, with Python bindings, that'll run interactively from within a browser. The Squeak folks may be willing to contribute to this effort. Guido feels we'll need to recruit new talent for this, as the Python community is currently pretty maxed out on projects. Should such an engine be developed, turtle stuff would be incorporated therein.
I'm a bit surprised -- Python graphics doesn't seem to be in bad shape, what with Pygame, VPython, and other projects.
As a plugin, perhaps there's nothing in Python to use. I don't get the plugin thing. Plugins seem totally irrelevant now. Maybe Logo written in ActionScript (the Flash Javascript-a-like), or Flash as an output medium... but introducing another plugin seems pointless.
Mozilla + XPCOM + Python + Canvas/SVG... that seems like a usable combination. But not for the ability to distribute -- unless you also offered a server-side programming alternative where graphics were pushed out to the browser, instead of generated in-process to the browser.
Honestly, I just don't think fancy graphics are important. Graphics of some sort? Sure, but I don't think the graphics have to be top of the line. Other issues are far more important, and the graphics technique should be chosen based on those other issues. Things like how the development environment feels.
Graphics? Eh. Have you seen the pictures kids draw? That ain't high art (you must appreciate that link in the absurdity of its sentiment, otherwise it might seem mean). And yet art or not, it makes kids happy to draw. It's the process, not the product, and if adults and teachers can figure that out, the kids will be totally comfortable working that way. That's what kids do.
AppleScript had an experimental (never released) i18n functionality. Like Hypertalk, the language is pseudo-English with fairly regular syntax, so you could write a script in English, send the bytecode to someone in Japan, and the other person could open the script with the syntax (although not the variables) localized to Japanese automatically.
I don't think Python graphics are nearly easy enough to use. Anything geared towards beginners is going to have to start at a much higher level. A good IDE a la Hypercard is critical.
Ease of use is a separate matter. The raw material is there, it just needs more work on the API, and a more constrained set of functionality.
# Ian Bicking
As someone who learned to program with Python, I would like to offer a counterview.
Essentially that minimilism is essential. And a sense of direct, unmediated, transparent contact with underlying mechanisms. The Python prompt is an example of that kind of environment.
This is true I think partly on cognitive grounds, but also partly on motivational grounds. I am motivated to learn to program to gain independance from others' notions of how things need to be - otherwise I might go about the business of being a happy Windows user. A heavy IDE leaves me confused about what is possible from outside of it - from day one.
Before coming to Python I had found Scheme via the DrScheme project - and found myself confused from the beginning as to what was the environment and what was the programming language. And moved on.
In finding Python, a generic text editor and the raw prompt I find what - for me - was the right environment.
And I think the most important point - the progress was not only immediate, but has been sustained.
I like your reference to childrens' drawings.
We should not be concerned with the sophistication of the output - which is what I think the heavy IDE aided approach seems too often to focus upon. Teaching children or anyone else that is what is important at the initial stages is the output, rather than the process, is misleading them. And children - in particular - are intuitive enough to know when they are being mislead. If we can't find a way to introduce children to programming without misleading them - and I seem to be open to that possiblity that this is true more than many others - perhaps we should simply wait until they are developed, cognititively, to the point where we can.
Why start a process in a way that is not sustainable.
What does the environment teach us really about the most important aspect of becoming a programmer in any meaningful sense - i.e., working independantly of large sets of mysterious depedencies. Most IDEs for beginning programmers are not only neutral, but I think counterproduct on this point - introducing programming as another form of dependency, rather than as the kind of liberating acitivity it should be understood, from the beginning, to be. And I think needs to be, if interest in it is to be sustained.
Art
I started programming 26 years ago, and the first program I wrote was a little tank twirling in different directions and prowling around the screen: I got such a buzz from that experience, I'll NEVER forget it: I was hooked, excited and motivated to learn more (I've been programming ever since) - for me the graphical element was crucial (I was 14 at the time), so I can fully understand the Logo-like mindset of including simple graphics as a learning tool.
That first language was Basic, and since, I've used C/C++/Java/Perl/Assembler (and a few others) for work, but until I came across Python (about 6/7 years ago), I didn't really ENJOY programming like I did at the start. Python gave me that buzz because it let me DO THINGS, and do them quickly and easily (much as I could with those original 8k BASIC interpreters and a few peeks and pokes).
Now, to get back more to the topic of graphics: over the last few years, I've been re-visiting graphics, using Python of course, on the web (SVG/CSS) and locally using Tk; AnyGui; PyGame; WxPython. Anygui was my favourite project as it abstracted the details, but, as we know, it didn't get completed. However, my experiments with this and PyGame and wx all lead me to the conclusion that it would be incredibly useful to have a REALLY SIMPLE graphics capability accessible from the python standard library. Now, I don't want a simple wrapper around existing libraries as they all seem to require a little too much boilerplate code to do simple things: what we need is something a lot more akin to Logo, but perhaps updated to allow more complex, modern graphics. I'm not sure of the exact form that this might take (although PyGame goes some way towards providing the capability), but I, for one, agree that it should be done.
P.S. I'm a Vim/command line guy and never use an IDE if I can avoid it, but I have found Eclipse useful for Java coding, and I also agree that a usable IDE is important for approachability (if only to avoid typing pydoc -g :)
Best Regards, Tushar.
# Tushar
I think we are pretty much on the same page.
My main Python project is itself devoted to graphics:
Graphics are motivational and the feedback loop of code to graphics has been important for me.
An IDE has not been.
I also am in agreement as to the fact that it would be wonderful to have some high potency graphical capabilities within the Python standard distribution.
The most likely candidate might be VPython:
www.vpython.org.
I think it is in the right spirit and has the kind of small footprint that would make it appropriate as a battery included. I think the main push back is crossplatform issues - it has some fairly exotic dependencies on Linux, does not run natively on Mac, and the more exotic OS's I would suspect might be even more problematic.
Though none of this sounds unsolveable with reasonable effort.
Art
Just as a note, pygame has already been used in education a bit. Here are some details.
It has been taught to 9-12 year olds by a person I met at a community learning center.
Also, I did a set of 'lectures' for an online teaching website teaching python using pygame.
There is also a book in development which uses a very logo like style. Pysgear is also built on top of pygame.
There has also been university level courses which teach pygame.
It will be nice if and when we can get to the point of talking about what has been effective rather than what ahs been used.
And what has been effective has to be measured against defined goals - a subject about which there is a lot of confusion, and I think sometimes almost intentional ambiguity.
As Ian say about Logo:
""" It's important to remember that this is not about teaching programming. It's about teaching math, or abstraction, or debugging. """
That's pretty vague stuff, IMO. What kind of math? What kinds of "abstraction"? In what way is this more powerful than non computer-aided approaches for a given age group? What age groups are we talking about?
Personally I can't live with these ambiguities within the context of discussions as dire as the issue of educationa and children. Too undisciplined and too much room for the geeks to justify a geek-centric view of the domain.
So I am very much off the Kay bus, and make no bones about it.
And I don't actually believe that Kay has an interest in Python - at least the Python we know and love. I think his interest is in the energy of the Python community. Hopefully that energy remains focused on developing and eveolving its own approaches, rather than adapting and porting those from other domains and communities.
And I think that means evolving narrower curriculums with clearly defined goals - the Software Carpentry project, the physics curriculums related to Vpython, etc and etc. No Big Idea. Lots of big ideas.
Art
So I am very much off the Kay bus, and make no bones about it.
And I don't actually believe that Kay has an interest in Python - at least the Python we know and love. I think his interest is in the energy of the Python community. Hopefully that energy remains focused on developing and eveolving its own approaches, rather than adapting and porting those from other domains and communities.
You seem to have a chip on your shoulder about Alan Kay. Why is that? Really; since he doesn't have a blog or anything, much of what I can infer of his intentions is highly indirect. And I've become addicted to primary sources, so indirect reports are highly unsatisfying. So I'm curious what exactly you are reacting against in his work or ideas.
# Ian Bicking
I am not sure "chip on my shoulder" is fair.
What I do is look and read and see what water he has to say holds outside the context of who he is and what he has accomplished outside of realms directly related to education and children.
And the common sense answer always coming back to me is - very little.
To answer in true detail would take more space than is appropriate to take here.
What is typical in his writing on the subject is a good analysis of the issues - saying all the right things, mostly from other sources, about what our intent should be about children and learning proces and etc. and etc., and then part 2 is the presentation of his answers, but there is no coherent effort to connect the dots on how in any objectively, definable way his answers address those problems. Except that he is Alan Kay.
Bottom line, I think the questions being addressed can - at this stage - only be approached with a sense of humility. There are many who for example believe that exposure of children to computers as a learning mechanism is not simply overstated, but is fact actively harmful. My mind is open to the possibility that they are wrong. And that they are right.
Bottom line is that Kay consistently seems to me to fail the humility test, where that is the most meaningful test to pass in this domain at this time, in my view.
Art
There are too many varied and wide goals for everyone to focus on them.
The pygame goal is to make games programming easier. So people don't need C or C++ to do games. 'Takes the "C++" out of "Game Development"' It's amazing how many people are able to make some sort of game that could never finish anything with C/C++.
So pygame and python allow more people to do something fun with programming. I think programming is a useful skill to have. So teaching programming through games making is a fun way to teach something. People who are interested in something are more likely to learn it.
I think games programmers are often the least geeky/nerdy programmer types around. By that I mean, they are often more socially able. I think this is because games programmers are drawn to it for different reasons than other types of programmers.
Music, and games programming goes together often too. People interested in music programming often gravitate to python for its ease of use. However I think python is a little limited at the moment for audio programming. However python-gst, and pymedia are getting closer to allowing complicated things. The 'Processing' smalltalk like language is where it is at for audio ease of use at the moment.
I like the 'mathematician in the street' quote from your web page... a friend of mine is doing a comedy show about teaching maths in a less nerdy way right now. http://www.grouphug.com.au/tmr/ Teaching maths through comedy.
The teaching math through comedy link is too cool (and unfortuantely a bit too far from me). I am all for detaching math from notions of solemnity - and am working towards making PyGeo at least a bit sillier. Why limit representing a point in space to, say, a sphere. Why not - I dont' know - a propeller blade. Nothing is accomplished in particular except some silliness - which is something.
On the pygame front - I had the opportunity to meet with Winston Wolff who is working in New York on a business model centered around teaching game programming as supplementary education, mostly for gifted children. He is a CS guy out of UC Berkeley who has some background in the game industry.
I was trying to sell him PyGeo(sell as in free but I'd love to see it used in your curriculum), so I did more talking than listening.
But he certainly seems to be smart, with the right background, and committed to his ideas, both as ideas and as a way to pay the bills.
Art
The teaching math through comedy link is too cool (and unfortuantely a bit too far from me). I am all for detaching math from notions of solemnity - and am working towards making PyGeo at least a bit sillier. Why limit representing a point in space to, say, a sphere. Why not - I dont' know - a propeller blade. Nothing is accomplished in particular except some silliness - which is something.
On the pygame front - I had the opportunity to meet with Winston Wolff who is working in New York on a business model centered around teaching game programming as supplementary education, mostly for gifted children. He is a CS guy out of UC Berkeley who has some background in the game industry.
I was trying to sell him PyGeo(sell as in free but I'd love to see it used in your curriculum), so I did more talking than listening.
But he certainly seems to be smart, with the right background, and committed to his ideas, both as ideas and as a way to pay the bills.
Art
The reason why Canvas/SVG is important isn't so much "Pretty Graphics" as the ability to reasonably portray non-rectilinear anything. Displaying any sort of finite state diagram or other visualization aid is nigh impossible without Canvas/SVG.
As "python-in-mozilla"http://developer.mozilla.org/en/docs/Building_PyXPCOM is making progress, the framework should be there to use.
"""The reason why Canvas/SVG is important isn't so much "Pretty Graphics" as the ability to reasonably portray non-rectilinear anything. Displaying any sort of finite state diagram or other visualization aid is nigh impossible without Canvas/SVG."""
Canvas and SVG are poor opengl hacks. Canvas plans to be OpenGLES one day.
I'm frustrated by a growing trend to look back at what has been done and try to recreate it instead of creating something new through innovation alone. I'm writting in regards to LOGO. Yes, many of us grew up learning logo as our first language. I remember the C64 lab in gradeschool where we would spend 45 minutes at a time staring at that triangular turtle on the screen.
It was a different day back then. LOGO was actually advanced for what the hardware could do, it was designed around how graphics were processed, and Lisp was prehaps the best language of the day.
Newer hardware has some great 3d capabilities. Utilizing them for education is something for modern-day innovation.
RE: Python 3d, I'm a developer with the Soya3d project (www.soya3d.org). We've got an awesome OO 3d frameworking going that's under-utilized by the Python community. Definetly worth checking out.
Although I expect there's ample links and discussion at EDU-SIG list, I still feel compelled to link an gratuitous example of graphics in a "Kids Programming Language":http://www.kidsprogramminglanguage.com/
# DeamG


{% from "wiki/includes/document_macros.html" import show_for with context %} {{ show_for(products, header=_('Article is for:'), close_button=True) }}


Fold out menu with css only;
Lorem ipsum dolor amet gochujang raw denim kogi cloud bread poke lo-fi typewriter cardigan banjo. Activated charcoal letterpress hashtag yuccie.  Mustache edison bulb cray ugh everyday carry ethical banjo helvetica forage you probably haven't heard of them fanny pack tacos.
Flexitarian PBR&B taxidermy prism mumblecore microdosing lyft YOLO pug williamsburg fashion axe small batch palo santo. Sustainable wayfarers poke enamel pin. Iceland skateboard whatever, pop-up forage ramps vexillologist scenester af trust fund la croix everyday carry raclette fingerstache fashion axe. Offal flannel selvage yuccie kale chips blue bottle tattooed hella typewriter skateboard hoodie shabby chic poke. Adaptogen pop-up gluten-free neutra ennui cronut gentrify whatever post-ironic.


ArtKitchen
84 Reviews
Nearby
American (New), Breakfast & Brunch, Cafes
Hours Today: 8:00 AM -6:00 PM
Open
0.5 mi
$
Add Review
Add Photo
Check In
Bookmark
1 free house coffee with any sandwich
Check in here to unlock this offer
61 Halsey St, Newark, NJ 07102
Nearby
Search
About Me
More


Let us help you stay compliant with all applicable federal, state and city laws and regulations.
We deliver Employee Handbooks that will allow you to keep your workplace safe, help to avoid discrimination lawsuits, protect your valuable information, outlines expectations and helps to create open lines of communication. An employee handbook will also help to set and meet employee expectations and will show that you treat employees consistently. While also introducing your employees to the company’s culture, mission and values.
We provide job descriptions that ensure you are in compliance with the following.
We deliver HR policies that will provide:
Guidelines to effectively deal with any employee and/or work place challenges both fairly and consistently.
A method for you to comply with your obligations to be fair and consistent while dealing with any employee and/or work place challenges.
A way to help you comply with your legal obligations under labor legislation.
Certainty in the workplace of what's expected of everyone.
Our friends at the Equal Employment Opportunity Commission (EEOC) secure 404 million from employers every year because of compliance challenges.
During the last 5 years 60% of companies have faced a lawsuit of the employee variety.
The average employee lawsuit costs a company $250,000.
There are many instances of senior company leaders not behaving in a professional manner.
There are many laws and regulations that you must follow as a small business owner.
cavnessHR can assist small business in retaining and recruiting the right talent by providing salary and compensation recommendations based on the labor market. We can show how your current salary and compensation structure compares with the labor market. We can also create your initial salary and compensation benchmarking. By knowing your salary and compensation comparison, you will know if you are paying your employees in alignment with your salary and compensation philosophy. This will also assist in retaining and recruiting great talent.
Do you have a question that is HR related or need a HR solution to a business challenge? Contact cavnessHR to start a discussion on how we can add value and help in solving your business challenges. cavnessHR is always available for HR discussions.


No relief yet: Thick layer of smog envelopes Delhi on Sunday morning
The day is forecast to remain generally cloudy with light rain or drizzle expected later on
by Press Trust of IndiaDelhi was enveloped in a thick layer of smog on Sunday morning with the minimum temperature settling at 18.7 degrees Celsius, four notches above the season's average.
The city received 0.3 mm rain in the past 24 hours which slightly lowered the hazardous level of air pollutants in the air.
Relative humidity was 85 per cent at 8.30 a.m., said a MeT department official.
The day is forecast to remain generally cloudy with light rain or drizzle expected later on. The maximum temperature will be around 28 degrees Celsius, he said.
The air seed was around three knots at 8.30 a.m., the official said, adding the visibility was poor due to the smog.
Some respite is expected from the heavy pollution, with strong surface winds forecast in daytime on Monday and Tuesday.


Home
New to Lifting?
You're Here
About
Healthy
Food Quiz
(Click the Foods)
Eggs
Soda
Almonds
Candy
Chicken
Donut
Yogurt
Hotdog
Olive Oil
Chips
Granola
Bacon
healthy food counter
unhealthy food counter
UnHealthy
Copyright 2018 by Aidan Cler
Powered by 960 Grid System ~ Core CSS.
Learn More


uhidd
services
rc
In response to a rule in /usr/local/etc/devd/uhidd-devd.conf
, the Plug and Play manager starts individual uhidd services on demand as ugen
devices appear.
The rc
system has a uhidd_enabled
flag, that causes autostart of uhidd services on every ugen
device that lives in /dev
at that point in the bootstrap.
The external formats import subsystem generates service bundles from<EMAIL_ADDRESS>to<EMAIL_ADDRESS>.
If this is not enough, one can simply create more.
Each of these launches a uhidd
dæmon against the given ugen
device, and is individually startable, parameterized via its private environment directory, and enabled just like any other service.
When enabled, they are wanted by the uhidd
target.
In response to a rule in /usr/local/etc/devd/uhidd-nosh.conf
, the Plug and Play manager starts individual uhidd services on demand as ugen
devices appear, by running system-control start uhidd@
device.
The uhidd
target can itself be enabled, which will result in all enabled uhidd@
device services being automatically started at bootstrap.
This is the equivalent of uhidd_enabled="YES"
in the old rc
system, and indeed what directly results from running rcctl enable uhidd
.
The uhidd
target can be manually started with system-control start uhidd
.
This is the equivalent of starting the non-specific uhidd service in the old rc
system, and indeed what directly results from running service uhidd start
.


UniHome
Dashboard
Lights
Temperature
Security
Health
User Details
Logout
ConneX UniHome
T
he
P
roject
DashBoard
Room
Room 1
Occupants
Temperature
Heartrate
Security
Brightness
Eco Mode
Away Mode
Party Mode!


{%extends 'all-temp/base.html'%} {% load staticfiles %} {%block content%} {{bock.super}}
Gifted by the world’s most generous community of photographers. 🎁


--- layout: post title: ! 'Videos of my #bikecommute last Thursday : http://tinyurl.com/dmexga' published: true date: 2009-04-27 categories: [] posterous_url: http://verdammelt.posterous.com/videos-of-my-bikecommute-last-thursday-httpti posterous_slug: videos-of-my-bikecommute-last-thursday-httpti --- Videos of my bike commute home (on a lovey but windy day)
Part I: www.flickr.com/photos/verdammelt/3478663744/in/photostream/


Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects. It expands opportunities for code reuse.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.
Montage Studio is a cloud based development environment that enables simple drag-and-drop development for even the most sophisticated projects.


Sign Up Today
Race fee: $216
Make check payable to the Happy Trails Running Club
Note: We recommend that you seek your doctor's and family's approval before you sign up. Race fees are not refundable.
Race fee: $216
Make check payable to the Happy Trails Running Club
Note: We recommend that you seek your doctor's and family's approval before you sign up. Race fees are not refundable.


Hi again folks, my self-hosted server has been running fine for a couple of months now on virtual machines.
MySQL is running on one machine.
EmonCMS is(was) running on a separate Ubuntu server machine.
I'm still running version EmonCMS v7.
My EmonCMS server developed networking issues after applying Heartbleed patches (Solaris host, virtualization nightmare!).
I configured a clone of the EmonCMS server and everything is(was) running fine. To ensure my dashboards were migrated to the new emon server, I copied the entire emoncms directory (/var/www/emoncms) from the old machine to the new machine. Now the issue I am having is that for some reason all my inputs and feeds are no longer accessible from this new instance. My inputs from the node(s) are creating new inputs but not using the existing inputs. MySql clearly shows the old inputs still there with new inputs being created with different ID's. My dashboards and other menu items are showing up but not "connecting" to the old feeds.
Any ideas ???
Re: Problem migrating self-hosted server ?
Did you have any luck with this? it may be a redis issue if your using redis? Might be worth trying a $ redis-cli then flushall..
Re: Problem migrating self-hosted server ?
Hi Trystan, no success on this issue. I did manage to "revive" my broken server.
Yes, I'm using redis. I will try migrating system(s) systems again just because it's nice to have a procedure for migrations.
Thanks. I'll post my adventures.


--- layout: post title: "A Visitor functor" description: "Some Visitors can be functors. Another functor example for object-oriented programmers." date: 2018-08-13 6:56 UTC tags: [Software Design] --- {% include JB/setup %}
{{ page.description }}
This article is an instalment in an article series about functors. In the previous article, you saw how to implement a generalised tree as a functor. In this article, you'll see another functor example, which will also be an application of the Visitor design pattern.
The Visitor design pattern is often described in such a way that it's based on mutation; the Visit
and Accept
methods in those descriptions typically return void
. You can, however, also implement immutable variations. This blog already contains an older example of this.
In this article, you'll see how to implement a full binary tree using the Visitor design pattern. You can make the tree generic, so that each node can contain values of any generic type.
public interface IBinaryTree<T> { TResult Accept<TResult>(IBinaryTreeVisitor<T, TResult> visitor); }
As promised, this interface implies an immutable variant where the Accept
method doesn't mutate the input Visitor, but rather returns a new value. You can learn how you arrive at this particular generic method signature in my article Visitor as a sum type.
A full binary tree is a tree where each node has either zero or two children. This means that a Visitor must have two methods, one for each case:
public interface IBinaryTreeVisitor<T, TResult> { TResult Visit(Node<T> node); TResult Visit(Leaf<T> leaf); }
The IBinaryTreeVisitor<T, TResult>
interface introduces two new concrete classes: Node<T>
and Leaf<T>
. A leaf node is a node with zero children:
public sealed class Leaf<T> : IBinaryTree<T> { public T Item { get; } public Leaf(T item) { if (item == null) throw new ArgumentNullException(nameof(item)); Item = item; } public TResult Accept<TResult>(IBinaryTreeVisitor<T, TResult> visitor) { if (visitor == null) throw new ArgumentNullException(nameof(visitor)); return visitor.Visit(this); } public override bool Equals(object obj) { if (!(obj is Leaf<T> other)) return false; return Equals(Item, other.Item); } public override int GetHashCode() { return Item.GetHashCode(); } }
While a leaf node has no children, it still contains an Item
of the generic type T
. A leaf node still counts as a binary tree, so it implements the IBinaryTree<T>
interface. Complying with the Visitor design pattern, its Accept
method is implemented using double dispatch. Thereby, any visitor
knows that it's now visiting a concrete Leaf<T>
object.
Likewise, a node is a (sub)tree:
public sealed class Node<T> : IBinaryTree<T> { public T Item { get; } public IBinaryTree<T> Left { get; } public IBinaryTree<T> Right { get; } public Node(T item, IBinaryTree<T> left, IBinaryTree<T> right) { if (item == null) throw new ArgumentNullException(nameof(item)); if (left == null) throw new ArgumentNullException(nameof(left)); if (right == null) throw new ArgumentNullException(nameof(right)); Item = item; Left = left; Right = right; } public TResult Accept<TResult>(IBinaryTreeVisitor<T, TResult> visitor) { if (visitor == null) throw new ArgumentNullException(nameof(visitor)); return visitor.Visit(this); } public override bool Equals(object obj) { if (!(obj is Node<T> other)) return false; return Equals(Item, other.Item) && Equals(Left, other.Left) && Equals(Right, other.Right); } public override int GetHashCode() { return Item.GetHashCode() ^ Left.GetHashCode() ^ Right.GetHashCode(); } }
In addition to an Item
, a Node<T>
object also contains a Left
and a Right
sub-tree. Notice that the Accept
method is literally identical to Leaf<T>.Accept
. Its behaviour differs, though, because this
has a different type.
A couple of static helper methods makes it a bit easier to create binary tree objects:
public static class BinaryTree { public static IBinaryTree<T> Leaf<T>(T item) { return new Leaf<T>(item); } public static IBinaryTree<T> Create<T>( T item, IBinaryTree<T> left, IBinaryTree<T> right) { return new Node<T>(item, left, right); } }
The main convenience of these two methods is that C# (limited) type inference enables you to create tree objects without explicitly typing out the generic type argument every time. You'll soon see an example of creating a binary tree of integers.
Since IBinaryTree<T>
is a generic type, you should consider whether it's a functor. Given the overall topic of this article, you'd hardly be surprised that it is.
In the previous two functor examples (Maybe and Tree), the Select
methods were instance methods. On the other hand, the .NET Base Class Library implements IEnumerable<T>.Select
as an extension method. You can do the same with this binary tree Visitor:
public static IBinaryTree<TResult> Select<TResult, T>( this IBinaryTree<T> tree, Func<T, TResult> selector) { if (tree == null) throw new ArgumentNullException(nameof(tree)); if (selector == null) throw new ArgumentNullException(nameof(selector)); var visitor = new SelectBinaryTreeVisitor<T, TResult>(selector); return tree.Accept(visitor); }
This Select
method has the right signature for turning IBinaryTree<T>
into a functor. It starts by creating a new instance of a private helper class called SelectBinaryTreeVisitor<T, TResult>
. Notice that this class has two generic type arguments: the source type T
and the destination type TResult
. It also contains selector
, so that it knows what to do with each Item
it encounters.
SelectBinaryTreeVisitor<T, TResult>
is a Visitor, so you pass it to the tree
object's Accept
method. The Accept
method returns a variable that you can directly return, because, as you'll see below, the return type of SelectBinaryTreeVisitor<T, TResult>
's Visit
methods is IBinaryTree<TResult>
.
SelectBinaryTreeVisitor<T, TResult>
is a private
helper class, and is the most complex functor implementation you've seen so far. The Visitor design pattern solves a specific problem, but it was never the simplest of design patterns.
private class SelectBinaryTreeVisitor<T, TResult> : IBinaryTreeVisitor<T, IBinaryTree<TResult>> { private readonly Func<T, TResult> selector; public SelectBinaryTreeVisitor(Func<T, TResult> selector) { if (selector == null) throw new ArgumentNullException(nameof(selector)); this.selector = selector; } public IBinaryTree<TResult> Visit(Leaf<T> leaf) { var mappedItem = selector(leaf.Item); return Leaf(mappedItem); } public IBinaryTree<TResult> Visit(Node<T> node) { var mappedItem = selector(node.Item); var mappedLeft = node.Left.Accept(this); var mappedRight = node.Right.Accept(this); return Create(mappedItem, mappedLeft, mappedRight); } }
Since the class implements IBinaryTreeVisitor<T, IBinaryTree<TResult>>
, it must implement the two Visit
overloads. The overload for Leaf<T>
is simple: use the selector
to map the Item
, and use the Leaf
convenience method to return a new Leaf<TResult>
containing the mapped item. Notice that while SelectBinaryTreeVisitor<T, TResult>
looks like it has a generic 'return' type argument of TResult
, it implements IBinaryTreeVisitor<T, IBinaryTree<TResult>>
, which means that the return type of each Visit
method must be IBinaryTree<TResult>
, and that matches Leaf<TResult>
.
The overload for a Node<T>
object looks twice as big, but it's still simple. Like the leaf overload, it uses selector
to map the Item
, but in addition to that, it must also recursively map the Left
and Right
sub-trees. It does this by passing itself, in its role as a Visitor, to the left and right nodes' Accept
methods. This returns mapped sub-trees that can be used to create a new mapped tree, using the Create
convenience method.
While the implementation of such a Visitor is cumbersome, it's easy enough to use.
var source = BinaryTree.Create(42, BinaryTree.Create(1337, BinaryTree.Leaf(0), BinaryTree.Leaf(-22)), BinaryTree.Leaf(100));
You can translate this binary tree of integers to a tree of strings using method call syntax:
IBinaryTree<string> dest = source.Select(i => i.ToString());
or by using query syntax:
IBinaryTree<string> dest = from i in source select i.ToString();
In both of these examples, I've explicitly declared the type of dest
instead of using the var
keyword. There's no practical reason to do this; I only did it to make the type clear to you.
Why would anyone ever do something so complicated as this?
The answer to such a question is, I believe, that it's only complicated in some programming languages. In Haskell, all of the above can be reduce to a single type declaration:
data BinaryTree a = Node a (BinaryTree a) (BinaryTree a) | Leaf a deriving (Show, Eq, Functor)
Notice that the Haskell compiler can automatically derive an implementation of the Functor
typeclass, although that does require the DeriveFunctor
language extension.
This may explain why binary trees aren't part of object-oriented programmers' normal tool box, whereas they are more commonplace in functional programming.
While not strictly required, in order to keep the examples equivalent, you can define these two aliases:
leaf :: a -> BinaryTree a leaf = Leaf create :: a -> BinaryTree a -> BinaryTree a -> BinaryTree a create = Node
This enables you to create a binary tree like this:
source :: BinaryTree Int source = create 42 ( create 1337 ( leaf 0) ( leaf (-22))) ( leaf 100)
As usual you can map the tree using the fmap
function:
dest :: BinaryTree String dest = fmap show source
or by using infix notation:
dest :: BinaryTree String dest = show <$> source
The <$>
operator is an alias for fmap
.
As usual, F# lies somewhere between the extremes of C# and Haskell, although it's closer to Haskell in simplicity. The type declaration is similar:
type BinaryTree<'a> = | Node of ('a * BinaryTree<'a> * BinaryTree<'a>) | Leaf of 'a
Unlike Haskell, however, F# doesn't have any built-in functor awareness, so you'll have to implement the map function yourself:
// ('a -> 'b) -> BinaryTree<'a> -> BinaryTree<'b> let rec map f = function | Node (x, left, right) -> Node (f x, map f left, map f right) | Leaf x -> Leaf (f x)
Notice that you have to use the rec
keyword in order to make map
recursive. Instead of having to create a new helper class, and all the byzantine interactions required by the Visitor design pattern, the implementation uses simple pattern matching to achieve the same goal. In the Node
case, it uses f
to translate x
, and recursively calls itself on left
and right
. In the Leaf
case, it simply returns a new Leaf
value with x
translated by f
.
Create helper functions to keep all three examples aligned:
// 'a -> BinaryTree<'a> let leaf = Leaf // 'a -> BinaryTree<'a> -> BinaryTree<'a> -> BinaryTree<'a> let create x left right = Node (x, left, right)
You can now create a binary tree of integers:
// BinaryTree<int> let source = BinaryTree.create 42 ( BinaryTree.create 1337 ( BinaryTree.leaf 0) ( BinaryTree.leaf -22)) ( BinaryTree.leaf 100)
which you can translate like this:
// BinaryTree<string> let dest = source |> BinaryTree.map string
Here, all of the above functions are defined in a module named BinaryTree
.
The Select
method obeys the first functor law. As usual, it's proper computer-science work to actually prove that, but you can write some tests to demonstrate the first functor law for the IBinaryTree<T>
interface. In this article, you'll see a few parametrised tests written with xUnit.net. First, you can define some reusable trees as test input:
public static IEnumerable<object[]> Trees { get { yield return new[] { BinaryTree.Leaf(0) }; yield return new[] { BinaryTree.Create(-3, BinaryTree.Leaf(2), BinaryTree.Leaf(99)) }; yield return new[] { BinaryTree.Create(42, BinaryTree.Create(1337, BinaryTree.Leaf(0), BinaryTree.Leaf(-22)), BinaryTree.Leaf(100)) }; yield return new[] { BinaryTree.Create(-927, BinaryTree.Leaf(2), BinaryTree.Create(211, BinaryTree.Leaf(88), BinaryTree.Leaf(132))) }; yield return new[] { BinaryTree.Create(111, BinaryTree.Create(-336, BinaryTree.Leaf(113), BinaryTree.Leaf(-432)), BinaryTree.Create(1299, BinaryTree.Leaf(-32), BinaryTree.Leaf(773))) }; } }
This is just a collection of five small binary trees that can be used as input for parametrised tests. The first tree is only a single node - the simplest tree you can make with the IBinaryTree<T>
API.
You can use this static property as a source of input for parametrised tests. Here's one that demonstrates that the first functor law holds:
[Theory, MemberData(nameof(Trees))] public void FirstFunctorLaw(IBinaryTree<int> tree) { Assert.Equal(tree, tree.Select(x => x)); }
Here, I chose to implement the identity function as an anonymous lambda expression. In contrast, in a previous article, I explicitly declared a function variable and called it id
. Those two ways to express the identity function are equivalent.
As always, I'd like to emphasise that this test doesn't prove that IBinaryTree<T>
obeys the first functor law. It only demonstrates that the law holds for those five examples.
Like the above example, you can also write a parametrised test that demonstrates that IBinaryTree<T>
obeys the second functor law. You can reuse the Trees
test case source for that test:
[Theory, MemberData(nameof(Trees))] public void SecondFunctorLaw(IBinaryTree<int> tree) { string g(int i) => i.ToString(); bool f(string s) => s.Length % 2 == 0; Assert.Equal(tree.Select(g).Select(f), tree.Select(i => f(g(i)))); }
This test defines two local functions, f
and g
. Instead of explicitly declaring the functions as Func
variables, this test uses a (relatively) new C# feature called local functions.
Again, while the test doesn't prove anything, it demonstrates that for the five test cases, it doesn't matter if you project the tree
in one or two steps.
Statically typed functional languages like F# and Haskell enable you to define sum types: types that encode a selection of mutually exclusive cases. Combined with pattern matching, it's easy to deal with values that can be one of several non-polymorphic cases. Object-oriented languages like C# or Java don't have good support for this type of data structure. Object-oriented programmers often resort to using type hierarchies, but this requires down-casting in order to work. It also comes with the disadvantage that with type hierarchies, the hierarchy is extensible, which means that as an implementer, you never know if you've handled all sub-types. The Visitor design pattern is a way to model sum types in object-oriented programming, although it tends to be verbose.
Nevertheless, if you have a generic type that models a set of mutually exclusive cases, it just may be a functor. In Haskell, you can make such a type a Functor
with a mere declaration. In C#, you have to write considerable amounts of code.
Next: Reactive functor.


Recently I've been attempting to view world around from p2p node's perspective
i.e. how can a p2p node learn about
global topology of network it's part of. Nodes are aware of neighbourhood
but not how neighbours are themselves stuctured. Node has no idea of
edges existing between a pair of vertices, when it's not one of those. Nodes follow one cooperative
protocol by forwarding messages to peers who hasn't yet seen certain message.
Each peer authors its own message & helps in forwarding peer-authored messages
while playing role of hop. By inspecting message body, node learns
of which hops has helped in forwarding certain message & pictures path in network. A few
of these messages, traversed through different paths, helps in forming substantial portion of network graph.
Last week I wrote about it here.
In previous setting of simulation, network topologies were statically synthesized & small number
of participants collaborated. This week I explore more dynamically generated network
topologies. I also bring in libp2p based nodes into picture. Main goal is to understand
how to tweak the algorithm so that it can adaptively catch changes happening throughout
network, while keeping network wide peer specific topology probings at minimum.
I classify messages passed around by respective purpose. Broadly speaking, there're
three kinds of messages which can be sent across network.
I consider each participant of p2p network as vertex
& each TCP connection between a pair of them as an edge, while picturing
p2p overlay network as graph. P2P networks keep changing
their structure frequently, due to some node going down or network partition
occuring, which is why node's world view should be adapting to those changes.
I name, TCP connection being established between two peers as edge added event,
whereas disconnection of two peers triggers edge removed event. When either
of these two events happen, news is gossiped throughout network. And this allows
existing participants to either add or remove an edge from graph, which it's maintaining locally
as world view.
But some peer who has just joined network may be interested in exploring world
around, so it authors one probe message, which is passed throughout network collecting
trace of hops who cooperated in gossiping, helping every participant to refresh
their world view. And this is what I call, probing.
Probing helps any network participant to learn network topology
while it's not really necessary that everyone probes, rather single peer
probes & everyone learns.
When announcing edge added event, both of peers upon which edge
is incident, authors their own message with kind set to add.
Each incident node sends message to other one, at very first step of
connection establishment, making other side of edge aware of self-identity.
After that each of them shares message with their neighbours,
so that it can be propagated throughout network. Before announcing, peer sets self-id
as other side of edge, denoting edge has been established between two peers; also
appends self as hop of message so that network doesn't send this message back to
this peer again --- reducing cost to some extent.
Similarly when disconnection between two peers occur, edge removed event is propagated. But this time each of those affected nodes, author their own message with kind set to del and puts edge description in terms of ( previously ) incident node identifiers, so that when other participants receive message they can delete this edge from their locally maintained view of network.
Probing specific crafted message carries authorship details, kind set to probe & identifier of hops i.e. trace of path through which message has traversed. That's why inspection of probe message body, helps peer in deciding whom to forward message & picturing a path in network. Over time a peer receives multiple copies of same message traversed via different paths, from its neighbours --- learning of existence of multiple paths in network. Peers follow collaborative gossip protocol & message path is determined by trace in message body, which is updated before forwarding it to next hop.
For running simulation, I set up N-many libp2p nodes, each listening for
incoming connections while each also attempting to establish
connection with M-many randomly chosen peers, essentially
forming a dynamically synthesized nework topology.
During network forming step, each peer follows protocol i.e. announces
edge added message to its local neighbours, which is eventually propagated
throughout network, helping current network participants to learn of existence of
edge between a pair of nodes.
After network forming, one peer attempts to gauge network i.e. broadcasts
probe message to its neighbours, resulting into whole network learning
of message along with path trace, helping them to picture network structure.
In this step all current participants get a full picture of network.
To simulate link failure scenario, one randomly chosen connection
is dropped, which triggers edge removed message being broadcasted
to other neighbours still connected, from both of peers which just got disconnected.
By inspecting this message participants remove edge from graph which they
locally maintain as world view.
At the very end, randomly one connection is established, triggering propagation of
edge added message, letting peers update their world view, by adding new edge
in graph.
Randomly generated simulation setup has 7 nodes & 15 edges, where peer_1
probes, as a result of it everyone pictures whole world. This is how peer_1 sees
world around itself after running probing step.
Now I take a look at how peer_2 sees world around itself, after end of probing round.
And both of peer_1 & peer_2 find similar world view.
When I check remaining nodes world views, I find exact similarity.
I plot collected metrics i.e. data transferred over each edge ( read TCP connection ) for collaborative probing. I see some edges carrying more data compared to others due to presence of important vertices i.e. vertices having >= 3 edges, where they can have at max 6.
I trigger edge disconnection & let disconnection message get propagated throughout network. I find Peer 1 looses connection with Peer 4, so both of them must remove that edge from their local view of network --- which they do.
But interesting part is, does others also capture this change ? For checking that, I snapshot Peer 2's network view at this moment & it also captures change as expected.
During edge disconnection, some messages are passed around network, each edge's contribution
towards its network wide propagation is captured in following cost graph.
After a careful inspection, I see connection Peer 1 <-> Peer 4 & Peer 1 <-> Peer 3
doesn't anyhow contribute to forwarding of edge removed message, which is desired
behaviour because none of these edges exist in graph as of now.
Link between Peer 1 & Peer 4 just got failed, while Peer 1 & Peer 3 is going to
get connected in next step of simulation.
Finally it's time to simulate random connection establishment between a pair of peers. After edge added message passing has stabilised, I take a look at world view of Peer 1, finding existence of new edge between Peer 1 & Peer 3.
For understanding whether Peer 7 has learned of this change in topology, I snapshot its world view at this point of time. As expected all other peers who were not involved in connection establishment ( i.e. none of incident vertices ) has correctly learned change.
Cost analysis shows newly created edge i.e. Peer 1 <-> Peer 3 carrying edge addition message, while Peer 1 <-> Peer 4 doing nothing, because it doesn't exist anymore.
Results of simulation seem promising for dynamically adapting world view to network
state changes. Peers can even colloborate on when to probe, avoiding chances of
simultaneous probing, because if one peer starts probing, all will be benefitting from it.
I keep code used for simulating & generating these findings here.
I note few points for further exploration,


No Place to Hide: Book Review
Greenwald's No Place to Hide is an example of great storytelling that has a deeper and relevant impact.
Greenwald's No Place to Hide is an example of great storytelling that has a deeper and relevant impact.
Brought to us by the same author as Deep Work comes another guide on how to love what you do and do what you love.
Making it All Work: Winning at the Game of Work and the Business of Life shows you how to not only get things done but explains why we're getting things done and forces you to look at the bigger picture.
Wealth management, escaping debt, building wealth - these are all things that are essential to learn. Ramit Sethi goes about teaching you how to be rich in a great way.
Avoid distractions, schedule your time, get into some Deep Work.
Who knew there were so many ways to gain traction and perform marketing? Traction delves into a ton of methods and how to use them effectively.
Learn to say no effectively.
Quick notes on The Phoenix Project and how it relates to my career
Work/life balance, politics, feminism - This book has it all.
Main points from the masterpiece, thought-provoking, philosophy book
Thoughts on the insightful and scientific breakdown on how our minds work
Thoughts on this business and management book.
Takeaways from the great business book by the folks at Basecamp
Review of Brady vs. Manning: The Untold Story of the Rivalry That Transformed the NFL


| Interface | Description |
|---|---|
| IAccelerationIntegrator |
IAccelerationIntegrator
encapsulates an algorithm for integrating acceleration
information over time to produce velocity and position.
|
| IBNO055IMU |
Interface API to the Adafruit 9-DOF Absolute Orientation
IMU Fusion Breakout - BNO055 sensor.
|
| IFunc<TResult> |
IFunc<TResult> represents a nullary function that
returns a val of the indicated type.
|
| IHandshakeable |
Interface for use with HandshakeThreadStarter
|
| II2cDevice | |
| II2cDeviceClient |
II2cDeviceClient is the public interface to a utility
class that makes it easier to use I2cDevice
instances.
|
| II2cDeviceClientUser |
II2cDeviceClientUser allows one to retrieve an underlying
I2cDeviceClient from an object that
respresents an I2C hardware sensor.
|
| IOpModeStateTransitionEvents |
An interface used to receive notifications about various
OpMode state transitions
|
| Class | Description |
|---|---|
| IBNO055IMU.Parameters |
Instances of Parameters contain data indicating how a
BNO055 absolute orientation sensor is
to be initialized.
|
| II2cDeviceClient.HeartbeatAction |
Instances of HeartBeatAction indicate what action to
carry out to perform a heartbeat should
that become necessary.
|
| II2cDeviceClient.ReadWindow |
RegWindow is a utility class for managing the window of
I2C register bytes that are read from
our I2C device on every hardware cycle
|
| II2cDeviceClient.TimestampedData |
TimestampedData pairs together data which has been read
with the timestamp at which the read
occurred, as best that can be determined
|
| Enum | Description |
|---|---|
| IBNO055IMU.ACCELUNIT | |
| IBNO055IMU.ANGLEUNIT | |
| IBNO055IMU.I2CADDR | |
| IBNO055IMU.PITCHMODE | |
| IBNO055IMU.REGISTER |
REGISTER provides symbolic names for each of the BNO055
device registers
|
| IBNO055IMU.SENSOR_MODE |
Sensor modes are described in Table 3-5 (p21) of the
BNO055 specification, where they are
termed "operation modes".
|
| IBNO055IMU.TEMPUNIT | |
| II2cDeviceClient.READ_MODE |
READ_MODE controls whether when asked to read we read
only once or read multiple times.
|


Drupal Core Way
page--front.html.twig
Field Layout Way
- Set a node as the home page
- Configure node Display layout
Display Suite Way
- Set a node as the home page
- Configure node Display layout
- Much more robust than field_layout module
Paragraphs Way
- Set a node as the home page
- Configure paragraph types
- Configure paragraph type Display Suite layout
- Create a page with paragraphs
Ideally used with Display Suite
Page Manager Way
- Most complex layout subsystem
- Most powerful layout
- More than just a layout tool
Page Manager
- Page Variants
- Selection Rules / Access
- Contexts (passing data to blocks)
- In Place Editor
Much more than page layout
You should learn the Drupal layout subsystems
Possibly a topic for Day 3?
Lets talk about doing it the "easiest" way.
Overriding Page Templates
Step 1: Break the Page Down
Step 2: Define the regions
Step 3: Write the markup for the front page
Drawbacks to this method
- More code to maintain
- Template overrides can be excessive for minor tweaks
- Not using layout tools within Drupal Admin
- Not "where the puck is going"


TOURNAMENT
SIT&GO
| CATEGORY | THEME | PLAYERS | BUY-IN |
|---|---|---|---|
| {{ Game_Room['game_theme'] }} | {{ players[str(Game_Room['game_room_id'])] }} | {{ Game_Room['min_buy_in'] }} € |
BALANCE IS TOO LOW TO ENTER!
SPORTS
POT
TOURNAMENT
SIT&GO
| CATEGORY | THEME | PLAYERS | BUY-IN |
|---|---|---|---|
| {{ Game_Room['game_theme'] }} | {{ players[str(Game_Room['game_room_id'])] }} | {{ Game_Room['min_buy_in'] }} € |
BALANCE IS TOO LOW TO ENTER!
SPORTS
POT


{% load i18n %}{% autoescape off %} {% blocktrans %}
Use the link below to reset your password.
If you didn't request this email, you can safely ignore it.


| R/C | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| 1 | |||||||||
| 2 | |||||||||
| 3 | |||||||||
| 4 | |||||||||
| 5 | |||||||||
| 6 | |||||||||
| 7 | |||||||||
| 8 | |||||||||
| 9 |
| Name: | Saimon Thada Magar | |
|---|---|---|
| Pursuing: | B.Tech CSE | |
| College: | BFCET, Bathinda | |
| Address: | Rampur-6, Palpa, Nepal | |
| Knowledge: | C++, JAVA, Web Designing, Photoshop, MS-Office etc. | |
| Hobbies: | Programming, Sports, Singing, Travelling, Reading etc. |
| Name: | Sumit Poudel | |
|---|---|---|
| Pursuing: | B.Tech CSE | |
| College: | BFCET, Bathinda | |
| Address: | Rampur-6, Palpa, Nepal | |
| Knowledge: | C++, JAVA, Web Designing, Photoshop, MS-Office etc. | |
| Hobbies: | Programming, Drawing, Music, Reading etc. |


Welcome to the about page!
Who is David McFarlane?
David McFarlane is a student studing at Fanshawe to be a web devopler aka the person typing this out right now :) I am 19 and I work part time at shoppers drug mart. Whenever I have freetime i'm usual playing video games, hanging out with friends, or watching netflix. So pretty much typical stuff. My favouite games include dark souls 1, devil may cry 5, Monster Hunter world, and mario 64. I believe these games are very well designed. I also went to london england last year. It was alot of fun I just wished I had more time to spend there. There isn't too much to know about me but, if you are wanting more you can email me in the contact page!


View Dataset information
Top view
Bottom view
Show dataset info
Passenger's Sex:
Male
Female
Passenger's Port of Embarkation:
Cherbourg
Queenstown
Southampton
Passenger's Ticket Class:
First Class
Second Class
Third Class
Passenger's Age:
No. of Siblings/Spouses on Board:
No. of Parents/Children on Board:
Passenger fare:
Predict


Materials
Materials are one of the most important part of knowledge, through them you can define how an object will display. A material can be defined inside a script (a file with the extension .material) and have the following format:
material globalTerrain
{
cull none
texture
{
filename common/terrain.png
texcoord uv
}
texture
{
filename common/shadows.png
texcoord uv
blendfunc srcalpha invsrcalpha
texEnv modulate
}
}
First, you define the material name after the keyword "material" (keep in mind that EVERY keyword in knowledge is case sensitive, so "MaTeRiAl" is very different from "material"). Every material name is unique and can't be duplicated, in case of duplication only the first named material will be created and an error will be written to the log. The next thing you might be interested are the material properties, wich are the follow:
Material properties
nodraw
The object is ignored by the renderer and its not drawn.
receiveLight (default is on, options are: off | false | no)
When lights are enabled, the object automatically receives light, if you specify this parameter to one of the options object will ignore lights and will be fully lit.
ambient (default is "0 0 0")
Set the material ambient property to the color specified (example: "255 0 0" - for red, "255 255 255" - for white)
specular (default is "0 0 0")
Set the material specular property to the color specified (example: "255 0 0" - for red, "255 255 255" - for white)
diffuse (default is "0 0 0")
Set the material diffuse property to the color specified (example: "255 0 0" - for red, "255 255 255" - for white)
cull (default is "back", options are: "back" | "front" | "none" or "disabled" | "both")
Cull the specified faces so they are not drawn, let "back" if you want maximum performance.
depthTest (default is "on", options are: "true", "on" or "yes" | "false", "off" or "no")
Forces the renderer to compare the depth of objects when drawing.
depthWrite (default is "on", options are: "true", "on" or "yes" | "false", "off" or "no")
Forces the renderer to write to the depth buffer when drawing the object with this material.
texture {}
Define a new material stage (up to 8)
Texture Section
The texture section is where you will define the texture layers (up to 8 layers) and how they will blend between themselves. There are some keywords on this section that define how the texture will behave and blend.
filename (options are: "a string with the path of the texture, related to the resources.cfg file" - example: "common/test.png")
The filename of the texture to be loaded.
animname (options are: "baseFileName numberOfImages frameRate" | "fileName fileName2 ... fileName3 frameRate")
There are two ways you can define animated textures:
1) You define a base filename, the number of images and the framerate:
super/ballRolling0.png 10 16 - Will load the images super/ballRolling0.png, super/ballRolling1.png ... super/ballRolling9.png and will animate through those 10 frames at the rate of 16 frames per second. You can specify at max 16 frames per animation.
2) You define all the images of the animation and at the end, specify the frameRate:
test/3Frames0.png test/3Frames1.png test/3Frames2.png 3 - Will load the three images and at the end will animate through those 3 frames at the rate of 3 frames per second. You can specify at max 16 frames per animation.
cubename (options are: "the base filename for the cube faces")
The base filename to load the cube faces. Example: (test/cube.png - Will load the cube faces like test/cube_front.png, test/cube_up.png ... test/cube_left.png)
texenv (default is "replace", options are: "replace" | "modulate" | "add" | "decal" | "blend")
Define the type of texture generation for the texture. Those functions should work like the OpenGL ones, from the manual:
| Internal Format |
modulate | decal | blend | replace |
| RGB |
Cv = CtCf Av = Af |
Cv = Ct Av = Af |
Cv = (1 - Ct) Cf+CtCc Av = Af |
Cv = Ct Av = Af |
| RGBA |
Cv = CtCf Av = Af |
Cv = (1 - At) Cf + AtCt Av = Af |
Cv = (1 - Ct) Cf+CtCc Av = AtAf |
Cv = Ct Av = Af |
scale (default is: "0 0", options are: "a two component vector with the desired scale" - example: "5 10")
Defines the scalling of the texture, first parameter is the Horizonte scalling, second is the Vertical one.
scroll (default is: "0 0", options are: "a two component vector with the desired scrolling" - example: "20 10")
Defines the amount of pixels the texture is scrolling per frame, first parameter is the Horizonte scrolling, second is the Vertical one.
rotate (default is: 0, options are: "the angular velocity of the texture")
Defines the angular velocity of the texture, making it rotate by frame.
texcoord (default is: "uv", options are: "uv" | "pos" | "sphere" | "cubemap" | "eyeLinear" | "normal" | "binormal" | "tangent")
Defines the texture coordinate generation. Each option is explained below:
| Function | Details |
| "uv" | Coordinate follows the defined UVW coordinates on the model. |
| "sphere" | Coordinates are generated from a sphere map. |
All other coordinate functions are not implemented yet or are work in progress.
blendfunc
Defines the blending function on the texture. Each blending function is explained below as a scale factor to the image colors:
kr, kg, kb and ka - Are defined as kc = 2^(mc) - 1, where mc is the number of the color bitplanes (mr for red, mg for green, mb for blue, ma for alpha)
Rs, Gs, Bs, As -> Source Colors
Rd, Gd, Bd, Ad -> Destination Colors
| Component | Scale |
| "zero" | 0, 0, 0 |
| "one" | (1, 1, 1) |
| "srcclr" | (Rs/kr, Gs/kg, Bs/kb, As/ka) |
| "invsrcclr" | (1, 1, 1, 1) - (Rs/kr, Gs/kg, Bs/kb, As/ka) |
| "dstclr" | (Rd/kr, Gd/kg, Bd/kb, Ad/ka) |
| "invdstclr" | (1, 1, 1, 1) - (Rd/kr, Gd/kg, Bd/kb, Ad/ka) |
| "srcalpha" | (As/ka, As/ka, As/ka, As/ka) |
| "invscralpha" | (1, 1, 1, 1) - (As/ka, As/ka, As/ka, As/ka) |
| "dstalpha" | (Ad/ka, Ad/ka, Ad/ka, Ad/ka) |
| "invdstalpha" | (1, 1, 1, 1) - (Ad/ka, Ad/ka, Ad/ka, Ad/ka) |
You can check more about those functions on the OpenGL documentation, on the glBlendFunc() function.
If you just want to use transparent images (with alpha channel), you better use "blendfunc srcalpha invsrcalpha"


Govt loses RM90m in duties over illegally imported vehicles, says Customs D-G
TUMPAT, Nov 25 — The government lost about RM90 million in unpaid duties this year as 1,800 vehicles were brought into the country illegally.
Royal Malaysian Customs Department director-general, Datuk Seri Paddy Abdul Halim said the vehicles were seized across the country through various operations conducted by the agency from January till yesterday.
“The vehicles were initially brought into the country without tax exemption on a temporary basis, but some syndicates and individuals used various tricks to avoid paying duties.
“The vehicles were then sold at a lower price to customers, and it was in violation of the law, as they do not have valid ownership grants and road tax stickers,” he told a press conference at the Pengkalan Kubor Customs office, here, today.
He said among the tricks used were changing the licence plate number, as well as forging the grant and the vehicle’s chassis number.
“Most of the vehicles were brought in from Singapore, and the syndicates changed the original licence plate numbers to Thai plate numbers.
“We also suspect the involvement of insiders and further investigation will be conducted on this matter. However, no suspects have been arrested so far,” he said.
Paddy said in Kelantan alone, the Customs Department had seized 111 vehicles this year worth RM2.8 million, with tax losses amounting to RM3.8 million.
He advised the public not to trust anyone who offered imported cars at cheap prices, as these were likely to be cloned cars.
“The public can check with Customs to ensure the vehicle purchased is legal,” he added. — Bernama


My First Website
This is the first website I am going to make. It will teach me the basics
of html and CSS.
HTML Learning Goals
- Page Structure
- Element Attributes
- Tag Types
- Linking in other resources
- What Properties are
- How you use elements, and element attributes to change styles
- How CSS Styles Cascade
- How to include these styles
| TH 1 |
TH 2 |
TH 3 |
TH 4 |
| TD 1 1 |
TD 1 2 |
TD 1 3 |
TD 1 4 |
| TD 2 1 |
TD 2 2 |
TD 2 3 |
TD 2 4 |
| TD 3 1 |
TD 3 2 |
TD 3 3 |
TD 3 4 |


Total: {{totalCart() | currency}}
Discount: {{bill.discount | currency}}
Subtotal: {{subtotal() | currency}}


@(message: String) @main("Task Management") {
You can use this system to create your own personal tasks. Add start and due dates, custom types ( you can add your own type), for each task you can add some related persons.
How cool is that? Get more more organized and complete your responsibilities with this task manager. With custom types you can add from simple tasks like personal stuff (clean house, do groceries,...) or you can manage your work related tasks. Cool!


causal_data_augmentation.causal_data_augmentation.api_support¶
causal_data_augmentation.causal_data_augmentation.api_support.method_config¶
- class AugmenterConfig¶
Bases:
object
Base class for defining the augmenter configurations.
- class FullAugment(weight_threshold=None, weight_threshold_type='total', normalize_threshold_by_data_size=True, weight_kernel_cfg=<factory>)¶
Bases:
causal_data_augmentation.causal_data_augmentation.api_support.method_config.FullAugmentKind
Augmenter configuration class for those augmenters that augment the data to the fullest possible extent.
- Parameters
weight_threshold (
Optional
[float
]) – The weight threshold.weight_threshold_type (
str
) – How the weight threshold should be applied. Defaults to'total'
indicating that the threshold is imposed on the weights obtained after fully filling in the probability tree.normalize_threshold_by_data_size (
bool
) – Whether to divide the given threshold by the training data set size to make the threshold compensate for the initial uniform weights (the depth-1 edge weights in the probability tree are $1/n$ where $n$ is the data set size).weight_kernel_cfg (
dict
) – Additional configurations to be passed to the weight kernels.
- normalize_threshold_by_data_size: bool = True¶
- weight_kernel_cfg: dict¶
- weight_threshold: Optional[float] = None¶
- weight_threshold_type: str = 'total'¶
- class FullAugmentKind¶
Bases:
causal_data_augmentation.causal_data_augmentation.api_support.method_config.AugmenterConfig
Intermediate class for defining the augmenter configurations for those augmenters that augment the data to the fullest possible extent.