G116.9+0.2
CTB 1
- Right Ascension: 23 59 10
- Declination: +62 26
- Size (/arcmin): 34
- Type: S
- Flux density at 1 GHz (/Jy): 8
- Spectral Index: 0.57
Notes: Has been called G117.3+0.1 and G116.9+0.1.
- Radio: Incomplete shell.
- Optical: Filaments on sky survey.
- X-ray: Centrally brightened, with NE `breakout'.
- Point sources: Pulsar outside rim to E.
- Distance: Association with HI features implies 1.6 kpc.
References:
- Willis 1973, A&A, 26, 237. NRAO 300-ft at 2.7 GHz (5': S=3.9±1.0 Jy), and 37-m at 1.7 GHz (S=5.5±2.0 Jy), plus review of flux densities.
ADS
- van den Bergh et al. 1973, ApJS, 26, 19. Optical observations.
ADS
- Velusamy & Kundu 1974, A&A, 32, 375. NRAO 300-ft at 2.7 GHz (5': S=4.2±0.2 Jy).
ADS
- Angerhofer et al. 1977, A&A, 55, 11. NRAO 140-ft at 5 GHz (6.'8: S=3.0±0.3 Jy).
ADS
- Dickel & Willis 1980, A&A, 85, 55. WSRT at 610 MHz (56''×64'') and 1.4 GHz (22''×25'').
ADS
- Reich & Braunsfurth 1981, A&A, 99, 17. Effelsberg 100-m at 2.7 GHz (4.'4: S=4.8±0.4 Jy) and S1.4 GHz=7.8±0.8 Jy from 1.4 GHz survey data, plus HI from Maryland–Green Bank survey.
ADS
- Lozinskaya 1981, SvAL, 7, 17. Mean optical velocity.
ADS
- Landecker et al. 1982, AJ, 87, 1379. DRAO at 1.42 GHz and HI (2'×2.'3: S=8.3±0.5 Jy), plus review of flux densities.
ADS
also see: Landecker et al. 1983, AJ, 88, 877. Erratum.
ADS
- Fesen et al. 1985, ApJ, 292, 29. Optical spectra.
ADS
- Hailey & Craig 1994, ApJ, 434, 635. Optical spectroscopy.
ADS
- Hailey & Craig 1995, ApJ, 455, L151. ROSAT of nearby pulsar.
ADS
- Fesen et al. 1997, AJ, 113, 767. Optical observations.
ADS
- Craig et al. 1997, ApJ, 488, 307. ROSAT observations.
ADS
- Reich 2002, in NSPS, p1. Effelsberg 100-m at 10.6 GHz (69''), including polarisation.
ADS
- Yar-Uyanıker et al. 2004, ApJ, 616, 247. CGPS at 1.4 GHz (49''×55''), including HI (1.'0×1.'1).
ADS
- Lazendic & Slane 2006, ApJ, 647, 350. X-ray observations.
ADS
- Tian & Leahy 2006, ChJAA, 6, 543. CGPS at 408 MHz (3.'4×3.'8: S=15.0±1.5 Jy) and 1.4 GHz (1.'0×1.'1: S=8.1±0.4 Jy).
ADS
- Kothes et al. 2006, A&A, 457, 1081. CGPS at 408 MHz (~3': S=10.5±0.8 Jy) and 1420 MHz (~1': S=7.0±0.8 Jy), including review of flux densities.
ADS
- Pannuti et al. 2010, AJ, 140, 1787. ASCA and Chandra observations.
ADS
- Sun et al. 2011, A&A, 536, A83. Urumqi 25-m at 5 GHz (9.'5: S=3.6±0.4 Jy) including polarisation and review of flux densities.
ADS
- Clark et al. 2017, ApJ, 834, 106. Fermi pulsar detection.
ADS
- Wu et al. 2018, ApJ, 854, 99. Radio detection of pulsar.
ADS
- Zyuzin et al. 2018, MNRAS, 476, 2177. X-ray observations of pulsar.
ADS
- Katsuragawa et al. 2018, PASJ, 70, 110. Suzaku observations.
ADS
Last updated: 11 Jun 2019
home |
documentation |
detailed listings |
summary listings
Dave Green/Cambridge, UK/


Andrew Yang won't return to MSNBC until they apologize 'on-air' to his campaign
by Sam DormanBusinessman and 2020 candidate Andrew Yang had a biting response to MSNBC after the network asked him to appear on air amid his campaign's complaints that the network treated him unfairly in its coverage of the Democratic field.
"Was asked to appear on @msnbc this weekend - and told them that I’d be happy to after they apologize on-air, discuss and include our campaign consistent with our polling, and allow surrogates from our campaign as they do other candidates’," he said. "They think we need them. We don’t."
ANDREW YANG SUPPORTERS GATHERED OUTSIDE MSNBC DEBATE BLASTING NETWORK'S TREATMENT OF CANDIDATE
Yang and his followers previously attacked MSNBC, noting the relatively low amount of speaking time he had in comparison to other candidates at Wednesday's Democratic debate.
 Yang reportedly said at a watch party. "The hypocrisy of MSNBC in a way just makes us stronger. I'm almost -- almost grateful."
According to a New York Times analysis, Yang spoke for less time (6 minutes, 48 seconds) than any other candidate on the stage. By contrast, the majority of candidates spoke for more than 10 minutes. Only Yang, Rep. Tulsi Gabbard, D-Hawaii, and billionaire Tom Steyer spoke for fewer than 10 minutes.
By Thursday afternoon, a hashtag trended on Twitter: #MSNBCFearsYang.
CLICK HERE TO GET THE FOX NEWS APP
Prior to that debate, the network excluded Yang from a graphic on polling and one previewing the debate.
The network attempted to apologize on Sunday but faced mockery from Yang's campaign manager. "Thank you @MSNBC, for making this apology for the 15th time. The #YangGang is very excited for #16," campaign manager Zach Graumann said.


| Team 1 - Join Team | Raised |
|---|---|
| Bob Smith | $100.00 |
| Susan Alexander | $110.00 |
| Laurence Black | $20.00 |
| Michael Black | $30.00 |
| Chester Evans | $30.00 |
| Bob Jones | $15.00 |
| Jane Jones | $110.00 |
| Grover Red | $15.00 |
| Michael Red | $30.00 |
| Jane White | $110.00 |
| Laurence White | $20.00 |
| Jack Williams | $20.00 |
| Team Gifts | $0.00 |


{% comment %} {% include "owner/dashboard/title_count.html" %} {% endcomment %}
| Phone Number | First Name | Last Name | Member Since | {% comment %}Actions | {% endcomment %}
|---|---|---|---|---|
| {{worker.phone_number}} | {{ worker.first_name}} | {{ worker.last_name }} | {{ worker.timestamp }} |


Create container
Delete container
Select and upload files
List files
Delete selected files
Status:
Files:


| Home | Libraries | People | FAQ | More |
The changes made to the Boost.Signals2 API compared to the original Boost.Signals library are summarized below. We also provide some notes on dealing with each change while porting existing Boost.Signals code to Boost.Signals2.
与原 Boost.Signals 库相比，Boost.Signals2 API 所作的更改总结如下。 我们还提供了一些说明，说明当现有 Boost.Signals 代码移植到 Boost.Signals2 时， 如何处理每一个变化。
The namespace boost::signals
has been replaced by boost::signals2
to avoid conflict with the original Boost.Signals implementation, as well as the Qt "signals" macro.
All the Boost.Signals2 classes are inside the boost::signals2
namespace,
unlike the original Boost.Signals which has some classes in the boost
namespace in addition to its own boost::signals
namespace.
名字空间 boost::signals
已被 boost::signals2
取代，
以避免与原 Boost.Signals 实现以及 Qt 的“signals”宏冲突。
所有 Boost.Signals2 的类都在
boost::signals2
名字空间中，
不像原 Boost.Signals 除了其本身的
boost::signals
名字空间，有某些类在
boost
名字空间。
The Boost.Signals2 header files are contained in the
boost/signals2/
subdirectory instead of the boost/signals
subdirectory used by the original Boost.Signals. Furthermore, all the headers except
for the convenience header boost/signals2.hpp
are inside the
boost/signals2/
subdirectory, unlike the original Boost.Signals which
keeps a few headers in the parent boost/
directory
in addition to its own boost/signals/
subdirectory.
Boost.Signals2 头文件位于
boost/signals2/
子目录，而不是原 Boost.Signals 所使用的
boost/signals
子目录。
此外，除了便捷头文件
boost/signals2.hpp
，
所有头文件都在 boost/signals2/
子目录，不像原 Boost.Signals 除了其本身的
boost/signals/
子目录，另外在父目录
boost/
中也有几个头文件。
For example, the signal
class is now
in the boost::signals2
namespace instead of the
boost
namespace,
and it's header file is now at boost/signals2/signal.hpp
instead of
boost/signal.hpp
.
例如，signal
类目前在 boost::signals2
名字空间，
而不是 boost
名字空间，
它的头文件目前是
boost/signals2/signal.hpp
而不是 boost/signal.hpp
。
While porting, only trivial changes to #include
directives
and namespace qualifications should be required to deal with these changes.
Furthermore, the new namespace and header locations for Boost.Signals2
allow it to coexist in the same program with the original Boost.Signals library,
and porting can be performed piecemeal.
移植时，为处理这些更改，应该只需对
#include
指示和名字空间限定作些微不足道的更改。
此外，Boost.Signals2 新的名字空间和头文件位置
使它能够与原 Boost.Signals 库共存于同一程序，
这样移植就可以逐渐进行。
Automatic connection management is now achieved through the use of
shared_ptr
/weak_ptr
and slot::track
(), as described in the
tutorial.
However, the old (thread-unsafe) Boost.Signals scheme of automatic connection management
is still supported via the boost::signals2::trackable
class.
自动连接管理现在是通过利用
shared_ptr
/weak_ptr
和 slot::track
()
达到的，见
教程
所述。
然而，通过
boost::signals2::trackable
类，旧的（线程不安全的）Boost.Signals
的自动连接管理方案仍被支持。
If you do not intend to make your program multi-threaded, the easiest porting path is to simply replace
your uses of boost::signals::trackable
as a base class with
boost::signals2::trackable
. Boost.Signals2 uses the same
boost::visit_each
mechanism to discover
trackable
objects
as used by the original Boost.Signals library.
如果您不打算让您的程序多线程化，
最方便的移植路径是，简单地把作为基类使用的
boost::signals::trackable
替换为
boost::signals2::trackable
。
与原 Boost.Signals 库一样，
Boost.Signals2 使用同样的
boost::visit_each
机制来发现
trackable
对象。
Support for postconstructors (and predestructors) on objects managed by shared_ptr
has been added with
the deconstruct
factory function.
This was motivated by the importance of
shared_ptr
for the new connection tracking scheme, and the
inability to obtain a shared_ptr
to an object in its constructor.
The use of deconstruct
is described in the
tutorial.
对于由 shared_ptr
所管理的对象，
增加了对 postconstructor（和 predestructor）的支持，以及
deconstruct
工厂函数。
这样做的动机在于
shared_ptr
对新的连接跟踪方案的重要性，
并且不能在对象的造构函数中获得它的
shared_ptr
。
deconstruct
的使用在
教程
中描述。
The use of deconstruct
is in no way required,
it is only provided in the hope
it may be useful. You may wish to use it if you are porting code where
a class creates connections to its own member functions in its constructor,
and you also
wish to use the new automatic connection management scheme. You could then
move the connection creation from the constructor to to the an
adl_postconstruct
function, where
a reference to the owning shared_ptr
is available for
passing to slot::track
.
The deconstruct
function would be used create objects
of the class and run their associated adl_postconstruct
function.
You can enforce use of deconstruct
by
making the class' constructors private and declaring
deconstruct_access
a friend.
deconstruct
的使用绝不是必需的，提供它只是希望它有用。
如果您移植的代码中，
一个类在其构造函数中创建连接到其自身的成员函数，
并且你还希望使用新的自动连接管理方案，
这时您就可以使用它。
然后，您可以将创建连接从构造函数移到
adl_postconstruct
函数，其中有个引用，指向拥有该对象的
shared_ptr
，
它可以传递给
slot::track
。
deconstruct
函数将被用于创建类的对象，并运行其相关的
adl_postconstruct
函数。
您可以使类的构造函数私有，并声明
deconstruct_access
为友元，来强制使用
deconstruct
。
The slot
class takes a new Signature
template parameter,
is useable as a function object, and has some additional features to support the
new Boost.Signals2 automatic connection management scheme.
slot
类需要一个新的 Signature
模板参数，该参数用作一个函数对象，
并具有一些附加功能以支持新的 Boost.Signals2 自动连接管理方案。
The changes to the slot class should generally not cause any porting difficulties,
especially if you are using the boost::signals2::trackable
compatibility class mentioned above. If you are converting your code over to
use the new automatic connection management scheme, you will need to
employ some of the new slot features, as described in the
tutorial.
对插槽类的更改一般应不会造成任何移植困难，
尤其是如果您使用的是上述的兼容类
boost::signals2::trackable
。
如果您是要将您的代码转换为使用新的自动连接管理方案，
您将需要用到一些新的插槽功能，请见
教程
所述。
The optional_last_value
class has replaced last_value
as the default combiner for signals.
optional_last_value
类已取代
last_value
，
成为了信号的默认合并器。
The last_value
combiner is still provided, although its
behavior is slightly changed in that it
throws an exception when no slots are connected on signal invocation, instead of
always requiring at least one slot to be connected (except for its void specialization
which never required any slots to be connected).
last_value
合并器仍然存在，
但其行为略有改变，
当信号调用时无插槽连接会抛异常，
而不是总是要求至少有一个插槽连接
（除了 void 特化，它从不要求任何插槽连接）。
If you are porting signals which have a void
return type in their signature
and they use the default combiner, there are no changes required. If you are
using the default combiner with a non-void return type and care about the
value returned from signal invocation, you will have to take into account that
optional_last_value
returns a
boost::optional
instead of a plain value. One simple
way to deal with this is to use boost::optional::operator*()
to access the
value wrapped inside the returned boost::optional
.
如果您移植的信号返回类型是 void
，
并且使用默认的合并器，那就不需要任何更改。
如果您使用的是返回类型非空的默认合并器，
并且关心信号调用的返回值，
您就必须考虑到
optional_last_value
返回的是 boost::optional
，
而不是一个简单的值。
处理该问题最简单的一种方法，就是使用
boost::optional::operator*()
来访问返回的 boost::optional
中所封装的值。
Alternatively, you could do a port by specifying the Combiner
template parameter
for your signals2::signal
to be last_value
.
或者，您也可以这样移植：指定
signals2::signal
的 Combiner
模板参数为
last_value
。
The signal
class has an additional typedef
signal::extended_slot_type
and new signal::connect_extended
()
methods. These allow connection of slots
which take an additional connection
argument, giving them thread-safe
access to their signal/slot connection when they are invoked. There is also a
new ExtendedSlotFunction
template parameter for specifying the underlying slot function
type for the new extended slots.
signal
类添加了一个
signal::extended_slot_type
类型定义，和新的
signal::connect_extended
()
方法。
这使得连接的插槽可以接受一个额外的
connection
参数，使插槽被调用时可以线程安全地访问其信号/插槽连接。
还有一个新的
ExtendedSlotFunction
模板参数，来为新的扩展插槽指定底层的插槽函数类型。
These additions should have no effect on porting unless you are also converting
your program from a single threaded program into a multi-threaded one. In that case,
if you have slots which need access to their connection
to the signal invoking them (for example to block or disconnect their connection)
you may wish to connect the slots with
signal::connect_extended
().
This also requires adding an additional connection argument to the slot.
More information on how and why to use extended slots is available
in the tutorial.
这些添加应该不会影响移植，
除非您同时在把程序从单线程转换为多线程的。
在这种情况下，如果您有插槽需要访问其
connection
（例如，阻止或断开其连接，即插槽与调用插槽的信号之间的连接），
您可能希望用
signal::connect_extended
()
来连接插槽。
这也要求插槽增加一个额外的连接参数。
教程
中有如何以及为什么使用扩展插槽的详细信息。
The signal
class has a new Mutex
template parameter for specifying
the mutex type used internally by the signal and its connections.
signal
类有个新的 Mutex
模板参数，用来指定信号及其连接内部使用的互斥体类型。
The Mutex
template parameter can be left to its default value of
boost::signals2::mutex
and should have little effect on porting.
However, if you have a single-threaded program and are
concerned about incuring a performance overhead from unneeded mutex locking, you may
wish to use a different mutex for your signals such as dummy_mutex
.
See the tutorial
for more information on the Mutex
parameter.
Mutex
模板参数可保持缺省值
boost::signals2::mutex
，
应该不会影响移植。
但是，如果你有一个单线程程序，
担心因不必要的互斥锁而招致性能开销，
你不妨为你的信号使用不同的互斥体，如
dummy_mutex
。
关于 Mutex
参数的更多信息请见
教程。
The signal::combiner()
method, which formerly returned a reference to the
signal's combiner has been replaced by signal::combiner
(which now returns the combiner by value) and signal::set_combiner
.
signal::combiner()
方法，
原来返回一个指向信号合并器的引用，已被
signal::combiner
（现在按值返回合并器）和
signal::set_combiner
取代。
During porting it should be straightforward to replace uses of the old reference-returning
signal::combiner()
function with the new "by-value" signal::combiner
and signal::set_combiner
functions.
However, you will need to inspect each call of the combiner
method in your code
to determine if your program logic has been broken by the changed
return type.
移植过程中，
将旧的返回引用的 signal::combiner()
函数替换为新的“按值”方式的
signal::combiner
和
signal::set_combiner
函数，应该是简单的。
但是，您需要检查代码中每个
combiner
方法调用，以确定您的程序逻辑没有因更改返回类型而破坏。
Connections no longer have block()
and unblock()
methods. Blocking
of connections is now accomplished by creating shared_connection_block
objects,
which provide RAII-style blocking.
连接不再有
block()
和 unblock()
方法。
连接的阻塞现在通过创建
shared_connection_block
对象完成，它提供了 RAII 方式的阻塞。
If you have existing Boost.Signals code that blocks, for example:
如果您现有的 Boost.Signals 代码有阻塞，例如：
namespace bs = boost::signals; bs::connection my_connection; //... my_connection.block(); do_something(); my_connection.unblock();
then the version ported to Boost.Signals2 would look like:
那么移植到 Boost.Signals2 的版本将如下所示：
namespace bs2 = boost::signals2; bs2::connection my_connection; //... { bs2::shared_connection_block blocker(my_connection); do_something(); } // blocker goes out of scope here and releases its block on my_connection
Last revised: June 12, 2007 at 14:01:23 -0400 |


Template Extensions¶
New in Cookiecutter 1.4
A template may extend the Cookiecutter environment with custom Jinja2 extensions, that can add extra filters, tests, globals or even extend the parser.
To do so, a template author must specify the required extensions in cookiecutter.json
as follows:
{
"project_slug": "Foobar",
"year": "{% now 'utc', '%Y' %}",
"_extensions": ["jinja2_time.TimeExtension"]
}
On invocation Cookiecutter tries to import the extensions and add them to its environment respectively.
In the above example, Cookiecutter provides the additional tag now, after
installing the jinja2_time.TimeExtension and enabling it in cookiecutter.json
.
Please note that Cookiecutter will not install any dependencies on its own! As a user you need to make sure you have all the extensions installed, before running Cookiecutter on a template that requires custom Jinja2 extensions.
By default Cookiecutter includes the following extensions:
cookiecutter.extensions.JsonifyExtension
cookiecutter.extensions.RandomStringExtension
jinja2_time.TimeExtension
Jsonify extension¶
The cookiecutter.extensions.JsonifyExtension
extension provides a jsonify
filter in templates
that converts a Python object to JSON:
{% {'a': True} | jsonify %}
Would output:
{"a": true}
Random string extension¶
New in Cookiecutter 1.7
The cookiecutter.extensions.RandomStringExtension
extension provides a random_ascii_string
method in templates that generates a random fixed-length string, optionally with punctuation.
Generate a random n-size character string. Example for n=12:
{{ random_ascii_string(12) }}
Outputs:
bIIUczoNvswh
The second argument controls if punctuation and special characters
!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~
should be present in the result:
{{ random_ascii_string(12, punctuation=True) }}
Outputs:
fQupUkY}W!)!
Slugify extension¶
The cookiecutter.extensions.SlugifyExtension
extension provides a slugify
filter in templates
that converts string into its underscored (“slugified”) version:
{% "It's a random version" | slugify %}
Would output:
it-s-a-random-version
It is diferent from a mere replace of spaces since it also trates some special characters such as ‘ in the example above. The function accepts all arguments that can be passed to the slugify function of python-slugify. For example to change the output from it-s-a-random-version to it_s_a_random_version, the parameter separator=’_’ would be passed to slugify().


Today I want to talk about blocks, Procs, and lambdas. If you have never seen them before, you're in the right place. Hopefully by the end of this reading, you'll have a much better understanding of the three terms and when to use them appropriately. Let us start with a block.
So... what is a block?! Well, I don't mean to shock you or anything, but you've been using blocks ever since... God knows how long. Whenever we iterated through an array/hash or used #map! or #collect! to change their elements, we used blocks. A block is a code that goes in between 'do' and 'end' -- or {}. Here are two equivalent, yet syntactically different, examples of a block:
Blocks are incredibly useful in accessing individual elements within a collective objects like arrays and hashes, and they do this by setting variables within the pipelines. To show you what is responsible for the convenient way the blocks function, I present to you... yield.
Thanks to #yield, I can now create my own method (#iterate!) that works exactly the same as #map! or #collect!. It's always good to know how and why something works, instead of just blindedly enjoy its convenience.
One thing I should have mentioned is the fact that the blocks are not objects. They are just 'blocks' of code that implement the user-given information to perform a certain task. But what if you want to repeatedly use the same block? We sure don't want to write it over and over since that wouldn't be such a D.R.Y. way of coding, now is it? Here is when Procs -- short for Procedures -- come into play. Procs are in fact objects that can be stored as variables. To make it even easier for you to understand: Procs are basically your code blocks being 'stored' in a variable for repeated use! How nice of ruby. Here's an example of how to use Procs.
Neat, right? You can even look at it as a 'copy' and 'paste' type of deal. It literally copies the block you give to Proc.new and pastes it to the #map! method. One thing to notice is the use of an ampersand (&): it converts the Proc into a block so the block described in the Proc object can be implemented.
Lastly, I will tell you about lambdas. It works almost the same way as the Proc object. Let's take a look.
This seems awfully similar to Procs, no? Well, as a matter of fact, a lambda is essentially a Proc object.At this point you're probably asking yourself, "Then what's the difference between a Proc and lambda?" As I mentioned before, Procs act as a 'cut and paste' tool. Moreover, it does not look for any argument parameters. Lambdas, on the other hand, are Proc objects that search for the argument parameters.
Another difference is in their way of interpreting #return. Lambdas return the value of themselves, whereas Procs return out of the block.


001 /* 002 * Copyright (C) 2008 The Guava Authors 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017 package com.google.common.collect; 018 019 import static com.google.common.base.Preconditions.checkNotNull; 020 import static com.google.common.collect.Ranges.create; 021 022 import com.google.common.annotations.Beta; 023 import com.google.common.annotations.GwtCompatible; 024 import com.google.common.base.Equivalence; 025 import com.google.common.base.Predicate; 026 027 import java.io.Serializable; 028 import java.util.Collections; 029 import java.util.Comparator; 030 import java.util.NoSuchElementException; 031 import java.util.Set; 032 import java.util.SortedSet; 033 034 import javax.annotation.Nullable; 035 036 /** 037 * A range (or "interval") defines the boundaries around a contiguous span of values of some 038 * {@code Comparable} type; for example, "integers from 1 to 100 inclusive." Note that it is not 039 * possible to iterate over these contained values unless an appropriate {@link 040 * DiscreteDomain} can be provided to the {@link #asSet asSet} method. 041 * 042 *
Types of ranges
 043 * 044 *
Each end of the range may be bounded or unbounded. If bounded, there is an associated 045 * endpoint value, and the range is considered to be either open (does not include the 046 * endpoint) or closed (includes the endpoint) on that side. With three possibilities on each 047 * side, this yields nine basic types of ranges, enumerated below. (Notation: a square bracket 048 * ({@code [ ]}) indicates that the range is closed on that side; a parenthesis ({@code ( )}) means 049 * it is either open or unbounded. The construct {@code {x | statement}} is read "the set of all 050 * x such that statement.") 051 * 052 *

 053 *
Notation Definition Factory method 054 *
{@code (a..b)} {@code {x | a < x < b}} {@link Ranges#open open} 055 *
{@code [a..b]} {@code {x | a <= x <= b}}{@link Ranges#closed closed} 056 *
{@code (a..b]} {@code {x | a < x <= b}} {@link Ranges#openClosed openClosed} 057 *
{@code [a..b)} {@code {x | a <= x < b}} {@link Ranges#closedOpen closedOpen} 058 *
{@code (a..+∞)} {@code {x | x > a}} {@link Ranges#greaterThan greaterThan} 059 *
{@code [a..+∞)} {@code {x | x >= a}} {@link Ranges#atLeast atLeast} 060 *
{@code (-∞..b)} {@code {x | x < b}} {@link Ranges#lessThan lessThan} 061 *
{@code (-∞..b]} {@code {x | x <= b}} {@link Ranges#atMost atMost} 062 *
{@code (-∞..+∞)}{@code {x}} {@link Ranges#all all} 063 *

 064 * 065 *
When both endpoints exist, the upper endpoint may not be less than the lower. The endpoints 066 * may be equal only if at least one of the bounds is closed: 067 * 068 *
 069 *
{@code [a..a]} : a singleton range 070 *
{@code [a..a); (a..a]} : {@linkplain #isEmpty empty} ranges; also valid 071 *
{@code (a..a)} : invalid; an exception will be thrown 072 *
 073 * 074 *
Warnings
 075 * 076 *
 077 *
Use immutable value types only, if at all possible. If you must use a mutable type, do 078 * not allow the endpoint instances to mutate after the range is created! 079 *
Your value type's comparison method should be {@linkplain Comparable consistent with equals} 080 * if at all possible. Otherwise, be aware that concepts used throughout this documentation such 081 * as "equal", "same", "unique" and so on actually refer to whether {@link Comparable#compareTo 082 * compareTo} returns zero, not whether {@link Object#equals equals} returns {@code true}. 083 *
A class which implements {@code Comparable<UnrelatedType>} is very broken, and will cause 084 * undefined horrible things to happen in {@code Range}. For now, the Range API does not prevent 085 * its use, because this would also rule out all ungenerified (pre-JDK1.5) data types. This 086 * may change in the future. 087 *
 088 * 089 *
Other notes
 090 * 091 *
 092 *
Instances of this type are obtained using the static factory methods in the {@link Ranges} 093 * class. 094 *
Ranges are convex: whenever two values are contained, all values in between them must 095 * also be contained. More formally, for any {@code c1 <= c2 <= c3} of type {@code C}, {@code 096 * r.contains(c1) && r.contains(c3)} implies {@code r.contains(c2)}). This means that a {@code 097 * Range<Integer>} can never be used to represent, say, "all prime numbers from 1 to 098 * 100." 099 *
When evaluated as a {@link Predicate}, a range yields the same result as invoking {@link 100 * #contains}. 101 *
Terminology note: a range {@code a} is said to be the maximal range having property 102 * P if, for all ranges {@code b} also having property P, {@code a.encloses(b)}. 103 * Likewise, {@code a} is minimal when {@code b.encloses(a)} for all {@code b} having 104 * property P. See, for example, the definition of {@link #intersection intersection}. 105 *
 106 * 107 *
Further reading
 108 * 109 *
See the Guava User Guide article on 110 * {@code Range}. 111 * 112 * @author Kevin Bourrillion 113 * @author Gregory Kick 114 * @since 10.0 115 */ 116 @GwtCompatible 117 @Beta 118 public final class Range<C extends Comparable> implements Predicate<C>, Serializable { 119 final Cut<C> lowerBound; 120 final Cut<C> upperBound; 121 122 Range(Cut<C> lowerBound, Cut<C> upperBound) { 123 if (lowerBound.compareTo(upperBound) > 0) { 124 throw new IllegalArgumentException("Invalid range: " + toString(lowerBound, upperBound)); 125 } 126 this.lowerBound = lowerBound; 127 this.upperBound = upperBound; 128 } 129 130 /** 131 * Returns {@code true} if this range has a lower endpoint. 132 */ 133 public boolean hasLowerBound() { 134 return lowerBound != Cut.belowAll(); 135 } 136 137 /** 138 * Returns the lower endpoint of this range. 139 * 140 * @throws IllegalStateException if this range is unbounded below (that is, {@link 141 * #hasLowerBound()} returns {@code false}) 142 */ 143 public C lowerEndpoint() { 144 return lowerBound.endpoint(); 145 } 146 147 /** 148 * Returns the type of this range's lower bound: {@link BoundType#CLOSED} if the range includes 149 * its lower endpoint, {@link BoundType#OPEN} if it does not. 150 * 151 * @throws IllegalStateException if this range is unbounded below (that is, {@link 152 * #hasLowerBound()} returns {@code false}) 153 */ 154 public BoundType lowerBoundType() { 155 return lowerBound.typeAsLowerBound(); 156 } 157 158 /** 159 * Returns {@code true} if this range has an upper endpoint. 160 */ 161 public boolean hasUpperBound() { 162 return upperBound != Cut.aboveAll(); 163 } 164 165 /** 166 * Returns the upper endpoint of this range. 167 * 168 * @throws IllegalStateException if this range is unbounded above (that is, {@link 169 * #hasUpperBound()} returns {@code false}) 170 */ 171 public C upperEndpoint() { 172 return upperBound.endpoint(); 173 } 174 175 /** 176 * Returns the type of this range's upper bound: {@link BoundType#CLOSED} if the range includes 177 * its upper endpoint, {@link BoundType#OPEN} if it does not. 178 * 179 * @throws IllegalStateException if this range is unbounded above (that is, {@link 180 * #hasUpperBound()} returns {@code false}) 181 */ 182 public BoundType upperBoundType() { 183 return upperBound.typeAsUpperBound(); 184 } 185 186 /** 187 * Returns {@code true} if this range is of the form {@code [v..v)} or {@code (v..v]}. (This does 188 * not encompass ranges of the form {@code (v..v)}, because such ranges are invalid and 189 * can't be constructed at all.) 190 * 191 *
Note that certain discrete ranges such as the integer range {@code (3..4)} are not 192 * considered empty, even though they contain no actual values. 193 */ 194 public boolean isEmpty() { 195 return lowerBound.equals(upperBound); 196 } 197 198 /** 199 * Returns {@code true} if {@code value} is within the bounds of this range. For example, on the 200 * range {@code [0..2)}, {@code contains(1)} returns {@code true}, while {@code contains(2)} 201 * returns {@code false}. 202 */ 203 public boolean contains(C value) { 204 checkNotNull(value); 205 // let this throw CCE if there is some trickery going on 206 return lowerBound.isLessThan(value) && !upperBound.isLessThan(value); 207 } 208 209 /** 210 * Equivalent to {@link #contains}; provided only to satisfy the {@link Predicate} interface. When 211 * using a reference of type {@code Range}, always invoke {@link #contains} directly instead. 212 */ 213 @Override public boolean apply(C input) { 214 return contains(input); 215 } 216 217 /** 218 * Returns {@code true} if every element in {@code values} is {@linkplain #contains contained} in 219 * this range. 220 */ 221 public boolean containsAll(Iterable<? extends C> values) { 222 if (Iterables.isEmpty(values)) { 223 return true; 224 } 225 226 // this optimizes testing equality of two range-backed sets 227 if (values instanceof SortedSet) { 228 SortedSet<? extends C> set = cast(values); 229 Comparator<?> comparator = set.comparator(); 230 if (Ordering.natural().equals(comparator) || comparator == null) { 231 return contains(set.first()) && contains(set.last()); 232 } 233 } 234 235 for (C value : values) { 236 if (!contains(value)) { 237 return false; 238 } 239 } 240 return true; 241 } 242 243 /** 244 * Returns {@code true} if the bounds of {@code other} do not extend outside the bounds of this 245 * range. Examples: 246 * 247 *
 248 *
{@code [3..6]} encloses {@code [4..5]} 249 *
{@code (3..6)} encloses {@code (3..6)} 250 *
{@code [3..6]} encloses {@code [4..4)} (even though the latter is empty) 251 *
{@code (3..6]} does not enclose {@code [3..6]} 252 *
{@code [4..5]} does not enclose {@code (3..6)} (even though it contains every value 253 * contained by the latter range) 254 *
{@code [3..6]} does not enclose {@code (1..1]} (even though it contains every value 255 * contained by the latter range) 256 *
 257 * 258 * Note that if {@code a.encloses(b)}, then {@code b.contains(v)} implies {@code a.contains(v)}, 259 * but as the last two examples illustrate, the converse is not always true. 260 * 261 *
Being reflexive, antisymmetric and transitive, the {@code encloses} relation defines a 262 * partial order over ranges. There exists a unique {@linkplain Ranges#all maximal} range 263 * according to this relation, and also numerous {@linkplain #isEmpty minimal} ranges. Enclosure 264 * also implies {@linkplain #isConnected connectedness}. 265 */ 266 public boolean encloses(Range<C> other) { 267 return lowerBound.compareTo(other.lowerBound) <= 0 268 && upperBound.compareTo(other.upperBound) >= 0; 269 } 270 271 /** 272 * Returns {@code true} if there exists a (possibly empty) range which is {@linkplain #encloses 273 * enclosed} by both this range and {@code other}. 274 * 275 *
For example, 276 *
 277 *
{@code [2, 4)} and {@code [5, 7)} are not connected 278 *
{@code [2, 4)} and {@code [3, 5)} are connected, because both enclose {@code [3, 4)} 279 *
{@code [2, 4)} and {@code [4, 6)} are connected, because both enclose the empty range 280 * {@code [4, 4)} 281 *
 282 * 283 *
Note that this range and {@code other} have a well-defined {@linkplain #span union} and 284 * {@linkplain #intersection intersection} (as a single, possibly-empty range) if and only if this 285 * method returns {@code true}. 286 * 287 *
The connectedness relation is both reflexive and symmetric, but does not form an {@linkplain 288 * Equivalence equivalence relation} as it is not transitive. 289 */ 290 public boolean isConnected(Range<C> other) { 291 return lowerBound.compareTo(other.upperBound) <= 0 292 && other.lowerBound.compareTo(upperBound) <= 0; 293 } 294 295 /** 296 * Returns the maximal range {@linkplain #encloses enclosed} by both this range and {@code 297 * connectedRange}, if such a range exists. 298 * 299 *
For example, the intersection of {@code [1..5]} and {@code (3..7)} is {@code (3..5]}. The 300 * resulting range may be empty; for example, {@code [1..5)} intersected with {@code [5..7)} 301 * yields the empty range {@code [5..5)}. 302 * 303 *
The intersection exists if and only if the two ranges are {@linkplain #isConnected 304 * connected}. 305 * 306 *
The intersection operation is commutative, associative and idempotent, and its identity 307 * element is {@link Ranges#all}). 308 * 309 * @throws IllegalArgumentException if {@code isConnected(connectedRange)} is {@code false} 310 */ 311 public Range<C> intersection(Range<C> connectedRange) { 312 Cut<C> newLower = Ordering.natural().max(lowerBound, connectedRange.lowerBound); 313 Cut<C> newUpper = Ordering.natural().min(upperBound, connectedRange.upperBound); 314 return create(newLower, newUpper); 315 } 316 317 /** 318 * Returns the minimal range that {@linkplain #encloses encloses} both this range and {@code 319 * other}. For example, the span of {@code [1..3]} and {@code (5..7)} is {@code [1..7)}. 320 * 321 *
If the input ranges are {@linkplain #isConnected connected}, the returned range can 322 * also be called their union. If they are not, note that the span might contain values 323 * that are not contained in either input range. 324 * 325 *
Like {@link #intersection(Range) intersection}, this operation is commutative, associative 326 * and idempotent. Unlike it, it is always well-defined for any two input ranges. 327 */ 328 public Range<C> span(Range<C> other) { 329 Cut<C> newLower = Ordering.natural().min(lowerBound, other.lowerBound); 330 Cut<C> newUpper = Ordering.natural().max(upperBound, other.upperBound); 331 return create(newLower, newUpper); 332 } 333 334 /** 335 * Returns an {@link ImmutableSortedSet} containing the same values in the given domain 336 * {@linkplain Range#contains contained} by this range. 337 * 338 *
Note: {@code a.asSet(d).equals(b.asSet(d))} does not imply {@code a.equals(b)}! For 339 * example, {@code a} and {@code b} could be {@code [2..4]} and {@code (1..5)}, or the empty 340 * ranges {@code [3..3)} and {@code [4..4)}. 341 * 342 *
Warning: Be extremely careful what you do with the {@code asSet} view of a large 343 * range (such as {@code Ranges.greaterThan(0)}). Certain operations on such a set can be 344 * performed efficiently, but others (such as {@link Set#hashCode} or {@link 345 * Collections#frequency}) can cause major performance problems. 346 * 347 *
The returned set's {@link Object#toString} method returns a short-hand form of the set's 348 * contents, such as {@code "[1..100]}"}. 349 * 350 * @throws IllegalArgumentException if neither this range nor the domain has a lower bound, or if 351 * neither has an upper bound 352 */ 353 // TODO(kevinb): commit in spec to which methods are efficient? 354 @GwtCompatible(serializable = false) 355 public ContiguousSet<C> asSet(DiscreteDomain<C> domain) { 356 checkNotNull(domain); 357 Range<C> effectiveRange = this; 358 try { 359 if (!hasLowerBound()) { 360 effectiveRange = effectiveRange.intersection(Ranges.atLeast(domain.minValue())); 361 } 362 if (!hasUpperBound()) { 363 effectiveRange = effectiveRange.intersection(Ranges.atMost(domain.maxValue())); 364 } 365 } catch (NoSuchElementException e) { 366 throw new IllegalArgumentException(e); 367 } 368 369 // Per class spec, we are allowed to throw CCE if necessary 370 boolean empty = effectiveRange.isEmpty() 371 || compareOrThrow( 372 lowerBound.leastValueAbove(domain), 373 upperBound.greatestValueBelow(domain)) > 0; 374 375 return empty 376 ? new EmptyContiguousSet<C>(domain) 377 : new RegularContiguousSet<C>(effectiveRange, domain); 378 } 379 380 /** 381 * Returns the canonical form of this range in the given domain. The canonical form has the 382 * following properties: 383 * 384 *
 385 *
equivalence: {@code a.canonical().contains(v) == a.contains(v)} for all {@code v} (in other 386 * words, {@code a.canonical(domain).asSet(domain).equals(a.asSet(domain))} 387 *
uniqueness: unless {@code a.isEmpty()}, {@code a.asSet(domain).equals(b.asSet(domain))} 388 * implies {@code a.canonical(domain).equals(b.canonical(domain))} 389 *
idempotence: {@code a.canonical(domain).canonical(domain).equals(a.canonical(domain))} 390 *
 391 * 392 * Furthermore, this method guarantees that the range returned will be one of the following 393 * canonical forms: 394 * 395 *
 396 *
[start..end) 397 *
[start..+∞) 398 *
(-∞..end) (only if type {@code C} is unbounded below) 399 *
(-∞..+∞) (only if type {@code C} is unbounded below) 400 *
 401 */ 402 public Range<C> canonical(DiscreteDomain<C> domain) { 403 checkNotNull(domain); 404 Cut<C> lower = lowerBound.canonical(domain); 405 Cut<C> upper = upperBound.canonical(domain); 406 return (lower == lowerBound && upper == upperBound) ? this : create(lower, upper); 407 } 408 409 /** 410 * Returns {@code true} if {@code object} is a range having the same endpoints and bound types as 411 * this range. Note that discrete ranges such as {@code (1..4)} and {@code [2..3]} are not 412 * equal to one another, despite the fact that they each contain precisely the same set of values. 413 * Similarly, empty ranges are not equal unless they have exactly the same representation, so 414 * {@code [3..3)}, {@code (3..3]}, {@code (4..4]} are all unequal. 415 */ 416 @Override public boolean equals(@Nullable Object object) { 417 if (object instanceof Range) { 418 Range<?> other = (Range<?>) object; 419 return lowerBound.equals(other.lowerBound) 420 && upperBound.equals(other.upperBound); 421 } 422 return false; 423 } 424 425 /** Returns a hash code for this range. */ 426 @Override public int hashCode() { 427 return lowerBound.hashCode() * 31 + upperBound.hashCode(); 428 } 429 430 /** 431 * Returns a string representation of this range, such as {@code "[3..5)"} (other examples are 432 * listed in the class documentation). 433 */ 434 @Override public String toString() { 435 return toString(lowerBound, upperBound); 436 } 437 438 private static String toString(Cut<?> lowerBound, Cut<?> upperBound) { 439 StringBuilder sb = new StringBuilder(16); 440 lowerBound.describeAsLowerBound(sb); 441 sb.append('\u2025'); 442 upperBound.describeAsUpperBound(sb); 443 return sb.toString(); 444 } 445 446 /** 447 * Used to avoid http://bugs.sun.com/view_bug.do?bug_id=6558557 448 */ 449 private static <T> SortedSet<T> cast(Iterable<T> iterable) { 450 return (SortedSet<T>) iterable; 451 } 452 453 @SuppressWarnings("unchecked") // this method may throw CCE 454 static int compareOrThrow(Comparable left, Comparable right) { 455 return left.compareTo(right); 456 } 457 458 private static final long serialVersionUID = 0; 459 }


By @astronomyblog & @LoveGraphs. Stats last updated 28 December 2017.
It seems there may have been at least 86 shows and 602 listed appearances. With 7 people per show, Comedy.co.uk has all appearances listed. The host/captains/regulars have included Lee Mack (Team Captain × 86), David Mitchell (Team Captain × 86), Rob Brydon (Host × 72, Panellist × 1), Angus Deayton (Host × 14).
Total appearances:
Guest appearances i.e. ignoring the host/captains/regulars:
All people:
Guests i.e. ignoring the host/captains/regulars:
Last updated: 2017/12/28


Detail rows spanning columns can be added to responsive tables by adding divs
with reponsive classes inside
the table row. Add table
and table-hover
classes to the table
element.
The first div
represents the tabulated columns and their data. The next div
represents the
detail row that spans mulitple columns but is considered within the same table row.
Add any of the col-xs-*
, col-sm-*
, col-md-*
col-lg-*
classes to the
inner div
element to achieve responsiveness.


Basic sort algorithm that has similar behavior to Array.prototype.sort for null and undefined, but also allows sorting by an object property.
Install with npm:
$ npm install --save default-compare
Install with yarn:
$ yarn add default-compare
var defaultCompare = require('default-compare');
basic array
var arr = ['c', 'a', undefined, 'b', 'd', null, 'e'];
console.log(arr.sort(defaultCompare));
//=> ['a', 'b', 'c', 'd', 'e', null, undefined]
objects sorted by their "name" property
var arr = [
{name: 'c', title: 'C'},
{name: 'a', title: 'A'},
{title: 'G'},
{name: 'b', title: 'B'},
{name: 'd', title: 'D'},
{name: null, title: 'F'},
{name: 'e', title: 'E'}
];
arr.sort(function(a, b) {
return defaultCompare(a, b, 'name');
});
console.log(arr);
//=> [
//=> {name: 'a', title: 'A'},
//=> {name: 'b', title: 'B'},
//=> {name: 'c', title: 'C'},
//=> {name: 'd', title: 'D'},
//=> {name: 'e', title: 'E'},
//=> {name: null, title: 'F'},
//=> {title: 'G'}
//=> ];
Basic sort algorithm that has similar behavior to Array.prototype.sort
for null and undefined, but also allows sorting by an object property.
Params
a
{Mixed}: First value to compare.b
{Mixed}: Second value to compare.prop
{String}: Optional property to use when comparing objects. If specified must be a string.returns
{Number}: Returns 1 when a
should come after b
, -1 when a
should come before b
, and 0 when a
and b
are equal.Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Brian Woodward
Copyright © 2017, Brian Woodward. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on September 11, 2017.


Puppet Class: oracle_inventory
- Inherited by:
-
oracle_inventory::inventory_pointer
- Defined in:
- manifests/init.pp
Summary
Provides facts from central inventory interrogation.Overview
oracle_inventory
This module manages the Oracle central inventory pointer, and provides facts from the inventory.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'manifests/init.pp', line 33
class oracle_inventory (
Boolean $manage_pointer = true,
Enum['present', 'absent'] $ensure = 'present',
String $file_owner = 'root',
String $file_group = 'root',
Stdlib::Filemode $file_mode = '0644',
Optional[Stdlib::UnixPath] $pointer_file = $::facts[oracle_inventory_pointer],
Stdlib::UnixPath $inventory_dir = '/u01/app/oraInventory',
String $inst_group = 'oinstall',
){
## Take care of Ruby GEM dependency for fact script
ensure_packages(['xml-simple'], {
ensure => installed,
provider => puppet_gem
})
## Manage the inventory pointer file if not on Windows
if $manage_pointer and $::kernel != 'windows' {
include ::oracle_inventory::inventory_pointer
}
}
|


--- layout: post title: Using Objective C subscripting with iOS on Xcode 4.4 tags: - Tumble status: publish type: post published: true meta: _edit_last: '1' dsq_thread_id: '792650106' _wp-svbtle-kudos: '4' --- Objective C as of Xcode 4.4 now has literals and subscripting:
NSDictionary *dict = @{ @"hello" : @"world"}; // dictionary literal syntax NSLog(@"%@", dict[@"hello"]); // subscript syntax NSLog(@"%@", [dict objectAtKeyedSubscript: @"hello"]); // equivalent to line 2As shown above, subscripting is interestingly implemented by way of operator overloading, something Apple has stayed clear until now. What this means is ANY class can define what happens when subscripting syntax is used on it. Well, I started a new iOS project to demonstrated a novel Flickr integration and thought it a good chance to leverage the streamlined syntax to access NSDictionary and NSArray objects. But, I quickly learned from compiler feedback that NSDictionary and NSArray (and their mutable subclasses) do not implement the necessary functions in iOS 5 SDK. However, if the magic takes place by way of the Xcode toolchain, perhaps an Objective C Category can coerce NSDictionary and NSArray to behave on SDKs that do not yet formally support it. The following category extensions allow subscripting on some of the core classes:
@interface NSArray(Subscripting) - (id) objectAtIndexedSubscript:(NSUInteger)index; @end @interface NSMutableArray(Subscripting) - (void) setObject:(id)obj atIndexedSubscript:(NSUInteger)index; @end @interface NSDictionary(Subscripting) - (id) objectForKeyedSubscript:(id)key; @end @interface NSMutableDictionary(Subscripting) - (void) setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key; @end


The last view, HISTOGRAMS, is for looking at the histograms themselves. Unlike the HISTOGRAMTIMES view that lists each collection interval as its own row, this view aggregates histogram data across multiple intervals to produce a single histogram of a given type for a given service class.
Running theis query produces 41 bins and all of the largest bins are empty. At the top, there is a bin whose BIN_TOP is -1. This bin represents all of those activities whose inter-arrival time was too large to fit in the histogram. Seeing a NUMBER_OF_BIN greater than zero when the BIN_TOP is -1 indicates that you should probably increase the high bin value of your histogram. In the output, the NUMBER_IN_BIN should be 0, so there is no need to make such a change. From this result, you can find out the number of milliseconds apart from each other that the majority of activities arrived at.


Final Exam- Computer Science Rewind
COMPUTER SCIENCE REWIND
Final Exam Website
| Projects |
JS |
HTML |
CSS |
| 1. |
Amazing |
Strawberry |
amazing |
| 2. |
Excellent |
Vanilla |
Excellent |
| 3. |
Very |
Chocolate |
Very |
| 4. |
Very |
Chocolate |
Very |
| 5. |
Very |
Chocolate |
Very |
How to make other ice cream flavors?
- Sea Salt Caramel
- Brownie Chocolate Chip
- Cookies nd' Cream
- Coffee
- Double-Chocolate Fudge
- Pistachio
- Mint Chocolate Chip
- Mango


In Brazil, a lot of people try to save time. In most families, both the husband and the wife work full-time, so their free time is very short and very important to them. They look for quick and convenient ways to do their shopping and other things, so they can have free time to enjoy themselves and do the things they really like to do. Back in the day people used to go to many different places to buy the things they needed at home. They used to go to the butcher for meat and chicken, to the fruit market for fresh fruit, and to the bakery for bread. Nowadays, most people just go to one place to get everything they need. They can buy fruit, vegetables, bread, meat, milk and frozen foods at their local supermarket. When people eat out, they often go to fast food restaurants. There people order their food at the counter and have to wait only a few seconds or minutes.  Sometimes people leave their trash on the table for the employees to clean up. It doesn’t take too long to eat a meal at a fast food restaurant, but it’s not always a healthy choice. Back in the day people used to go to many different places to buy the things they needed at home. They used to go to the butcher for meat and chicken, to the fruit market for fresh fruit, and to the bakery for bread. Nowadays, most people just go to one place to get everything they need. They can buy fruit, vegetables, bread, meat, milk and frozen foods at their local supermarket. When people eat out, they often go to fast food restaurants. There people order their food at the counter and have to wait only a few seconds or minutes.  Sometimes people leave their trash on the table for the employees to clean up. It doesn’t take too long to eat a meal at a fast food restaurant, but it’s not always a healthy choice. n Brazil, a lot of people try to save time. In most families, both the husband and the wife work full-time, so their free time is very short and very important to them. They look for quick and convenient ways to do their shopping and other things, so they can have free time to enjoy themselves and do the things they really like to do. Back in the day people used to go to many different places to buy the things they needed at home. They used to go to the butcher for meat and chicken, to the fruit market for fresh fruit, and to the bakery for bread. Nowadays, most people just go to one place to get everything they need. They can buy fruit, vegetables, bread, meat, milk and frozen foods at their local supermarket. When people eat out, they often go to fast food restaurants. There people order their food at the counter and have to wait only a few seconds or minutes.  Sometimes people leave their trash on the table for the employees to clean up. It doesn’t take too long to eat a meal at a fast food restaurant, but it’s not always a healthy choice. Back in the day people used to go to many different places to buy the things they needed at home. They used to go to the butcher for meat and chicken, to the fruit market for fresh fruit, and to the bakery for bread. Nowadays, most people just go to one place to get everything they need. They can buy fruit, vegetables, bread, meat, milk and frozen foods at their local supermarket. When people eat out, they often go to fast food restaurants. There people order their food at the counter and have to wait only a few seconds or minutes.  Sometimes people leave their trash on the table for the employees to clean up. It doesn’t take too long to eat a meal at a fast food restaurant, but it’s not always a healthy choice.


_Small_Time_Crooks_ (PG) ** 1/2 (out ****)
_Small_Time_Crooks_ delivers small time laughs. That's not exactly a damning statement; the Y2K edition of the Woody Allen Annual Project is good for a few giggles. But that's exactly the problem--all there is to be had are giggles.
Only a few of these light guffaws are to be had courtesy Allen the actor. He plays Ray Winkler, an ex-con whose job as a lowly dishwasher doesn't exactly provide a cushy life for him and his fed-up wife, Frenchy (Tracey Ullman), a manicurist. Allen is in full, tiresome nebbish mode, and he is matched in the shrillness department by Ullman, a talented, versatile comedienne who sometimes gets so caught up in her characters' quirks that any sense of humanity gets lost in them (which is the case here).
So it's hard to much care whether or not Ray's big and none-too-bright get-rich-quick scheme--to rob a bank--works out or not. I'm not giving anything away by saying they indeed to get rich quickly (albeit not in the manner they had expected), and suddenly the Winklers are part of New York high society. Ray just wants to live as a regular guy, but Frenchy wants to be one of those snooty socialites, and she turns to British art dealer David (Hugh Grant) for lessons in class and refinement.
Grant's character is the umpteenth variation on the Brit gentleman parts he has built his career with, but he's more appealing company than the Winklers. Then again, many of the supporting characters are more fun than the leads. Michael Rapaport, Tony Darrow, and Jon Lovitz are all funny as Ray's partners-in-crime, but they virtually vanish after the film jumps ahead in time on year. Luckily, still prominently present after the time gap is Elaine May, who plays the dimmest of the film's cast of dim bulbs, Frenchy's cousin May.
As with all Allen films, there are a few good wisecracks and individual gags (_not_ among them is a particularly forced bit involving a burst water main). But never do they come together into a filling whole, making _Small_Time_Crooks_ a minor, middling effort from a major talent.
Michael Dequina<EMAIL_ADDRESS>|<EMAIL_ADDRESS>|<EMAIL_ADDRESS>|<EMAIL_ADDRESS>Mr. Brown's Movie Site: http://welcome.to/mrbrown CinemaReview Magazine: http://www.CinemaReview.com on ICQ: #25289934 | on AOL Instant Messenger: MrBrown23
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


You’ve signed up for an MOT reminder
You’ll get a text message a month before your MOT is due.
What happens next?
We’ve sent you a confirmation text message.
You’ll get a reminder each year a month before your MOT is due, and again 2 weeks later if you don’t have your MOT yet.
If you want to unsubscribe at any time, text STOP NA61RDO to 87364.


{{extend 'default/layout_base.html'}}
{{=T("What's your package of products and services and the value it has for customers.")}}
{{=T('List actions/tasks important that your company must meet as a Value Proposition and Business Model to your work.')}}
{{=T('Most important resources required to operate the Business Model.')}}
{{=T('Network of suppliers and partners that help your company run.')}}
{{=T('All costs involved in the operation of your Business Model.')}}
{{=T('Who are the customers you want to meet? They have a specific profile? How are they grouped? How are you located? There is a common need?')}}
{{=T('Types of relationships that a company establishes with Customer segment to win them and keep them.')}}
{{=T('How your company communicates and reaches its customers to deliver a Value Proposition.')}}
{{=T('Money the company generates. How much and how you will get customers.')}}
{{=T('The Canvas is a business model that indicates the potential for an idea of the digital economy becoming a profitable product...')}} "


ProcessService.executeProcessTasks()
method.IProcessServiceListener
to the service's internal list of listenersIUiServiceListener
to the service's internal list of listenersMavenTask
to the service's list of tasks.ProcessService
instead of held locally.


Maps
1. Tap Anywhere to enter the initial interface
2.Choose on the different features.
Maps
Dog Repellant
Emergency Button
About
Help
3. Maps shows the main purpose of the application
4. Dog repellant - used to keep away from dogs.
5. Emergency Button - Press and select the current network provider to ask for help directly to the Police on Baguio City


App Basics
Created with Course Signals messages in mind, PassNote assists instructors in composing effective, research-driven messages to encourage learner success.
PassNote is a small external web app that can be used in conjuction with any feedback delivery tool instructors wish to use such as Course Signals, Blackboard Retention Center, email, or any of the myriad of digital tools available.
In your browser, go to www.purdue.edu/passnote
Creating a message
Performance Levels
Begin by selecting a learner's performance level from the left column. The three performance levels are represented with red, yellow, and green.
- Red X - Low performing, at risk learner
- Yellow Triangle - Learner with average performance
- Green Check - High performing learner
Topics
Select a topic from the dropdown beneath the performance levels. Once a performance level and topic are chosen, customized message snippets will appear in the left column. Additional snippets are available by selecting a different topic from the drop-down.
Message Snippets
Message snippets are customized for each performance level and topic. Choose a snippet from the left column by clicking on it. Each chosen snippet will be copied to the main message area and become part of the overall message to be sent. Snippets from multiple performance levels and topics may be used in the same message. Once selected, the snippet will be grayed out to ensure it is not used again in the same message.
Main Message Area
Each snippet is color-coded by performance level in the main message area. Message snippets may be reordered by clicking and dragging to a new position. A snippet may be deleted by using the "x" in the upper right hand corner of its bounding box.
The total word count appears above the messsage area to assist in creating a message of the appropriate length for each performance level.
- Green - 40 words
- Yellow - 52 words
- Red - 62 words
Sending a Message
Completed messages can be copied directly to the computer's clipboard via the clipboard icon in the upper right corner of the main message area. An email may also be generated via the envelope icon.


{% extends "layout.html" %} {% block page_title %} GOV.UK prototype kit {% endblock %} {% block content %} Enter address manually Enter address House or flat number and street Town or city Postcode {% endblock %}


Flink supports different notions of time in streaming programs.
Processing time: Processing time refers to the system time of the machine that is executing the respective operation.
When a streaming program runs on processing time, all time-based operations (like time windows) will use the system clock of the machines that run the respective operator. An hourly processing time window will include all records that arrived at a specific operator between the times when the system clock indicated the full hour. For example, if an application begins running at 9:15am, the first hourly processing time window will include events processed between 9:15am and 10:00am, the next window will include events processed between 10:00am and 11:00am, and so on.
Processing time is the simplest notion of time and requires no coordination between streams and machines. It provides the best performance and the lowest latency. However, in distributed and asynchronous environments processing time does not provide determinism, because it is susceptible to the speed at which records arrive in the system (for example from the message queue), to the speed at which the records flow between operators inside the system, and to outages (scheduled, or otherwise).
Event time: Event time is the time that each individual event occurred on its producing device. This time is typically embedded within the records before they enter Flink, and that event timestamp can be extracted from each record. In event time, the progress of time depends on the data, not on any wall clocks. Event time programs must specify how to generate Event Time Watermarks, which is the mechanism that signals progress in event time. This watermarking mechanism is described in a later section, below.
In a perfect world, event time processing would yield completely consistent and deterministic results, regardless of when events arrive, or their ordering. However, unless the events are known to arrive in-order (by timestamp), event time processing incurs some latency while waiting for out-of-order events. As it is only possible to wait for a finite period of time, this places a limit on how deterministic event time applications can be.
Assuming all of the data has arrived, event time operations will behave as expected, and produce correct and consistent results even when working with out-of-order or late events, or when reprocessing historic data. For example, an hourly event time window will contain all records that carry an event timestamp that falls into that hour, regardless of the order in which they arrive, or when they are processed. (See the section on late events for more information.)
Note that sometimes when event time programs are processing live data in real-time, they will use some processing time operations in order to guarantee that they are progressing in a timely fashion.
Ingestion time: Ingestion time is the time that events enter Flink. At the source operator each record gets the source’s current time as a timestamp, and time-based operations (like time windows) refer to that timestamp.
Ingestion time sits conceptually in between event time and processing time. Compared to processing time, it is slightly more expensive, but gives more predictable results. Because ingestion time uses stable timestamps (assigned once at the source), different window operations over the records will refer to the same timestamp, whereas in processing time each window operator may assign the record to a different window (based on the local system clock and any transport delay).
Compared to event time, ingestion time programs cannot handle any out-of-order events or late data, but the programs don’t have to specify how to generate watermarks.
Internally, ingestion time is treated much like event time, but with automatic timestamp assignment and automatic watermark generation.
The first part of a Flink DataStream program usually sets the base time characteristic. That setting
defines how data stream sources behave (for example, whether they will assign timestamps), and what notion of
time should be used by window operations like KeyedStream.timeWindow(Time.seconds(30))
.
The following example shows a Flink program that aggregates events in hourly time windows. The behavior of the windows adapts with the time characteristic.
Note that in order to run this example in event time, the program needs to either use sources that directly define event time for the data and emit watermarks themselves, or the program must inject a Timestamp Assigner & Watermark Generator after the sources. Those functions describe how to access the event timestamps, and what degree of out-of-orderness the event stream exhibits.
The section below describes the general mechanism behind timestamps and watermarks. For a guide on how to use timestamp assignment and watermark generation in the Flink DataStream API, please refer to Generating Timestamps / Watermarks.
Note: Flink implements many techniques from the Dataflow Model. For a good introduction to event time and watermarks, have a look at the articles below.
A stream processor that supports event time needs a way to measure the progress of event time. For example, a window operator that builds hourly windows needs to be notified when event time has passed beyond the end of an hour, so that the operator can close the window in progress.
Event time can progress independently of processing time (measured by wall clocks). For example, in one program the current event time of an operator may trail slightly behind the processing time (accounting for a delay in receiving the events), while both proceed at the same speed. On the other hand, another streaming program might progress through weeks of event time with only a few seconds of processing, by fast-forwarding through some historic data already buffered in a Kafka topic (or another message queue).
The mechanism in Flink to measure progress in event time is watermarks. Watermarks flow as part of the data stream and carry a timestamp t. A Watermark(t) declares that event time has reached time t in that stream, meaning that there should be no more elements from the stream with a timestamp t’ <= t (i.e. events with timestamps older or equal to the watermark).
The figure below shows a stream of events with (logical) timestamps, and watermarks flowing inline. In this example the events are in order (with respect to their timestamps), meaning that the watermarks are simply periodic markers in the stream.
Watermarks are crucial for out-of-order streams, as illustrated below, where the events are not ordered by their timestamps. In general a watermark is a declaration that by that point in the stream, all events up to a certain timestamp should have arrived. Once a watermark reaches an operator, the operator can advance its internal event time clock to the value of the watermark.
Note that event time is inherited by a freshly created stream element (or elements) from either the event that produced them or from watermark that triggered creation of those elements.
Watermarks are generated at, or directly after, source functions. Each parallel subtask of a source function usually generates its watermarks independently. These watermarks define the event time at that particular parallel source.
As the watermarks flow through the streaming program, they advance the event time at the operators where they arrive. Whenever an operator advances its event time, it generates a new watermark downstream for its successor operators.
Some operators consume multiple input streams; a union, for example, or operators following a keyBy(…) or partition(…) function. Such an operator’s current event time is the minimum of its input streams’ event times. As its input streams update their event times, so does the operator.
The figure below shows an example of events and watermarks flowing through parallel streams, and operators tracking event time.
Note that the Kafka source supports per-partition watermarking, which you can read more about here.
It is possible that certain elements will violate the watermark condition, meaning that even after the Watermark(t) has occurred, more elements with timestamp t’ <= t will occur. In fact, in many real world setups, certain elements can be arbitrarily delayed, making it impossible to specify a time by which all elements of a certain event timestamp will have occurred. Furthermore, even if the lateness can be bounded, delaying the watermarks by too much is often not desirable, because it causes too much delay in the evaluation of event time windows.
For this reason, streaming programs may explicitly expect some late elements. Late elements are elements that arrive after the system’s event time clock (as signaled by the watermarks) has already passed the time of the late element’s timestamp. See Allowed Lateness for more information on how to work with late elements in event time windows.
Currently, with pure event time watermarks generators, watermarks can not progress if there are no elements to be processed. That means in case of gap in the incoming data, event time will not progress and for example the window operator will not be triggered and thus existing windows will not be able to produce any output data.
To circumvent this one can use periodic watermark assigners that don’t only assign based on element timestamps. An example solution could be an assigner that switches to using current processing time as the time basis after not observing new events for a while.
Sources can be marked as idle using SourceFunction.SourceContext#markAsTemporarilyIdle
. For details please refer to the Javadoc of
this method as well as StreamStatus
.
Please refer to the Debugging Windows & Event Time section for debugging watermarks at runtime.
As a general rule, operators are required to completely process a given watermark before forwarding it downstream. For example,
WindowOperator
will first evaluate which windows should be fired, and only after producing all of the output triggered by
the watermark will the watermark itself be sent downstream. In other words, all elements produced due to occurrence of a watermark
will be emitted before the watermark.
The same rule applies to TwoInputStreamOperator
. However, in this case the current watermark of the operator is defined as
the minimum of both of its inputs.
The details of this behavior are defined by the implementations of the OneInputStreamOperator#processWatermark
,
TwoInputStreamOperator#processWatermark1
and TwoInputStreamOperator#processWatermark2
methods.


This page is now deprecated as jenkins.io has been launched!
This page summarizes the current thinking toward Jenkins 2.0 website renewal.
Project structure
This 2.0 website project is organized into the following tracks:
- Tech track
- Content track
- Sticker making track
- Prototyping track
Tech Track
Settle on the underlying technology to host the content. There has been a lot of discussions about this already, summarized in the e-mail from Daniel.
Content Track
Content track actually goes through a sequence:
Identifying "pillars"
The users & devs of the project need to come to a consensus about what are the pillars of the site. It doesn't have to be one thing, but it can't be too many.
For example, on Bootstrap, the central pillar is the demonstration of the functionality. On devianart, the central pillar is the user illustrations.
This involves some brainstorming and prioritizations. Looking at the current traffic might be useful.
Add meat to pillars
Once pillars are identified, drill down on each pillar and brainstorm on what features/functionalities/attributes they need to have. Not everything can be done in a reasonable effort, so this probably gets trimmed down in a later stage.

Filling in the rest
When pillars are done, let's collect all the other content we need to have, and hang them off from somewhere. This can be pushed toward the end so that we can focus on the pillars, and there are so many ways to put those peripheral content anyway.
Artwork/graphics making track
Ideally, there shall be no connection between form and function. So in a separate track of conversations, someone needs to come up with buttons, layouts, styles, colors, fonts, etc.
This is the track that we think we need to bring in somebody, because this is a very different skill set from that of the Jenkins dev community.
Prototyping track
As each track progresses further along, Gus said he'd like to create prototypes and iterate on them. This could be back-of-napkin drawings, wire frame mockups, some functioning HTML pages, or prototype of the tech stack. He said he needs to use his hands to think, and I think we all benefit from seeing.
Needs/wants/requirements
People with comprehensive inputs are welcome to submit their thoughts to ML or here as a child page:
Resources
- Tasks are tracked here
- Mailing list thread
- Earlier static site prototype by Unknown User (rtyler)


Status Code Tests
Success
Bad Request
Unauthorized
Forbidden
Internal
Not Implemented
Not Found
JSON
XML
Send


In Universal algebra freeness is a well defined algebraic property. We will explore equational theories which are tightly connected to free algebras. We will consider free monoids. Then we'll explain how monads can be brought into the picture in the context of monoidal categories. This will lead to a precise definition of a free monad as a free monoid.
This post requires familiarity with some very basic Category Theory and does not assume any knowledge on Universal Algebra. Most mathematical notions will be introduced but you might want to dig into literature for some more examples; though most of the books are quite lengthy and not suited for non-mathematicians - you've been warned ;). Knowing this I tried to bring all the required definitions, together with some very basic examples. As you read you may want to read about semigroups, monoids, groups, $G$-sets, lattices, Boolean or Heyting algebras from WikiPedia articles or try to find info on nCatLab (though this is is a heavy resource, with mostly with higher categorical approach, so probably better suited for more familiar readers).
We will need some preliminary definitions. Let's begin with a definition of algebra. For a set $A$ we will denote $A^n$ the $n$-th cartesian product of $A$, i.e. $A^2=A\times A$.
Examples includes many classical algebraic structures, like semigroups, where there is only a single operation of arity 2, monoids which in addition have one operation of arity $0$ - the unit element of multiplication. Other source of examples are Boolean algebras with two 2-ary operations $\wedge$ and $\vee$ or more generally lattices, Heyting algebras. Also rings, modules, fields, vector spaces and countless other structures. Universal algebra has a very general theory describing common concepts but also deals with very special cases of some of more esoteric algebras.
This means that homomorphism preserve operations. For example a homomorphism of monoids is a map that preserves the multiplication and unit. For boolean algebras, it means that a homomorphism preserves the $\vee$ (also called join) and $\wedge$ (usually called meet) operations, etc.
It is an easy observations that homomorphism are closed under composition and since the identity map is always a homomorphism this leads to well defined categories, e.g. category of monoids, category of boolean algebras, category of rings, ...
As you can see the definition of a free algebra requires a context, this interesting in its own! There are free monoids in the class of all monoids and there are free commutative monoids in the class of commutative monoids (i.e. monoids in which $m\cdot n=n\cdot m$ for each elements $m,n$).
Many theories allow free algebras. Let's see some other examples:
This is also true for
semi-rings.
You might have used this fact when using
purescript-validation
library. A free semiring generated by a
type a
has type
[[a]]
; for example
[[()]]
is isomorphic to
$\mathbb{N}[X]$, since (please excuse mixing
Haskell and mathematical notation):
$$[[()]]\simeq[\mathbb{N}]\simeq\mathbb{N}[X]$$
Free algebras play an essential role in a proof of beautiful and outstanding Birkhoff theorem. It states that a class of algebras $\mathcal{C}$ is an equational theory if and only if the class is closed under cartesian products, homomorphic images and subalgebras. Equational theories are classes of algebras which satisfy a set of equations; examples includes: semigroups, monoids, groups or boolean or Heyting algebras but also commutative (abelian) semigroups / monoids / groups, and many other classical algebraic structures.
We need to be a little bit more precise language to speak about equational theories in the full generality of Universal Algebra, which we are going to introduce.
We will denote the set of terms on $X$ by $\mathsf{T}^{(f_i)_{i=1,\dots,n}}(X)$ or simply $\mathsf{T}(X)$.
For example in groups: $x^{-1}\cdot x$, $x\cdot y$ and $1$ (the unit of the group) are terms. Terms are just abstract expressions that one can build using algebraic operations that are supported by the algebra type. Each term $t$ defines a term function on every algebra of the given type. In groups the following terms are distinct but they define equal term function: $x^{-1}\cdot x$ and $1$; on the other hand the two (distinct) terms $(x\cdot y)\cdot z$ and $x\cdot (y\cdot z)$ define equal term functions. The two terms $x\cdot y$ and $y\cdot x$ define distinct term functions (on non commutative groups or commutative monoids). Another example comes from boolean algebras (or more broadly lattice theory) where the two terms $x\wedge (y\vee z)$ and $(x\wedge y)\vee(x\wedge z)$ define equal term functions on Boolean algebras (or more generally distributive lattices). If $t$ is a term then the associated term function on an algebra $\underline{A}$ we let denote by $\tilde{t}^{\underline{A}}$. Term functions are natural to express equalities within a theory. Now we are ready to formally define equational classes of algebras.
For example the class of monoids is an equational theory for $$\mathbf{E}=\bigl\{(1\cdot x,\, x),\; (x\cdot 1,\, x),\; \bigl((x\cdot y)\cdot z,\, x\cdot (y\cdot z)\bigr)\bigr\}$$ i.e. all the algebras with two operations: one of arity 0 (the unit) and one of arity 2 (the multiplication), such that the $1$ is the unit for multiplication $\cdot $ and multiplication is associative. The class of commutative monoids is also an equational theory with one additional equation $(x\cdot y,\, y\cdot x)$. Groups, Boolean or Heyting algebras, lattices are also equational theories.
Coming back to free algebras: it turns out that the set of terms $\mathsf{T}^{(f_i)}(X)$ on a given set of variables $X$ has an algebra structure of type $(f_i)_{i=1,\dots,n}$: it is given by the inductive step in the definition of terms: if $t_i\in \mathsf{T}^{(f_i)}(X)$ for $i=1,\dots,j_i$ then $$ f_j^{\underline{\mathsf{T}^{(f_i)}(X)}}(t_1,\ldots,t_{j_i}) := f_j(t_1,\ldots,t_{j_i})\in \mathsf{T}(X) $$ Furthermore $\underline{\mathsf{T}^{(f_i)}(X)}$ is a free algebra over $X$ in the class of all algebras of the given type $(f_i)_{i=1,\dots,n}$. An extension of a map $h:X\rightarrow\underline{A}=(A,(f_i^{\underline{A}})_{i=1,\ldots,n})$ can be build inductively following the definition of terms and using the homomorphism property: $$ h(f_i(t_1,\ldots,f_{i_j})) := f_i^{\underline{A}}(h(t_1),\ldots,h(t_{i_j})) $$ The map $h$ is indeed a homomorphism: $$ \begin{array}{ll} h\bigl(f_i^{\underline{\mathsf{T}(X)}}(t_1,\ldots,t_{i_j})\bigr) & = h(f_i(t_1,\ldots, t_{i_j}) \\\\ & = f_i^{\underline{A}}(h(t_1),\ldots, h(t_{i_j})) \\\\ \end{array} $$ Note that the class of algebras of the same type is usually very broad, but this is the first approximation to build free algebras in an equational theory. This is just the equational theory for the empty set $\mathbf{E}$.
Let’s see this on an example and let us consider algebras
of the same type as a monoid: with one nullary operation
(unit $1$ or mempty
if you like) and one 2-ary
operation (multiplication / mappend
). Let $X$
be a set of variables. Then $1$ is a valid term, and also
if $t_1$ and $t_2$ are terms on $X$ then also $t_1\cdot
t_2$ is a term, but also $t_1\cdot 1$ and $1\cdot t_2$ are
valid and distinct terms. $\mathsf{T}(X)$ resembles
a monoid but it isn't. It is not associative and the
unitality condition is not valid since $t\cdot 1\neq
t\neq 1\cdot t$ as terms. We still need a way to enforce
the laws. But note that if you have a map
$f:X\rightarrow M$ to a monoid $M$ which you'd like to extend to
a homomorphism $\mathsf{T}(X)\rightarrow M$ that preserves
$1$ (which is not the unit, yet) and multiplication (even
though it is not associative), you don’t have much choice:
$\mathsf{T}(X)\rightarrow M$: $t_1\cdot t_2$ must be mapped
to $f(t_1)\cdot f(t_2)\in M$.
We need a tool to enforce term equations. For that one can use
Equivalence relations and congruences form complete lattices (partial ordered which have all suprema and minima, also infinite). If you have two equivalence relations (congruences) then their intersection (as subsets of $A^2$) is an equivalence relation (congruence).
The set of equations that defines the class of monoids generates a congruence relation on the term algebra $\underline{\mathsf{T}^{f_i}(X)}$ (i.e. an equivalence relation which is compatible with operations: $x_1\sim y_1$ and $x_2\sim y_2$ then $(x_1\cdot y_1) \sim (x_2\cdot y_2)$). One can define it as the smallest congruence relation which contains the set $\mathbf{E}$. Equivalence relation on a set $A$ is just a subset of the cartesian product $A\times A$ (which satisfy certain axioms), so it all fits together! One can describe this congruence more precisely, but we'll be happy with the fact that it exists. To show that, first one need to observe that intersection of congruences is a congruence, then the smallest congruence containing the set $\mathbf{E}$ is an intersection of all congruences that contain $\mathbf{E}$. This intersection is non empty since the set $A\times A$ is itself a congruence relation.
The key point now is that if we take the term algebra and take a quotient by the smallest congruence that contains all the pairs of terms which belong to the set $\mathbf{E}$ we will obtain a free algebra in the equational class defined by $\mathbf{E}$. We will leave the proof to a curious reader.
Let’s take a look on a free monoid that we can build this way. First let us consider the free algebra $\underline{\mathsf{T}(X)}$ for algebras of the same type as monoids (which include non associative monoids, which unit does not behave like a unit). And let $\sim$ be the smallest relation (congruence) that enforces $\mathsf{T}(X)/\sim$ to be a monoid.
Since monoids are associative every element in $\underline{\mathsf{T}(X)}/\sim$ can be represented as $x_1\cdot( x_2\cdot (x_3\cdot\ldots \cdot x_n))$ (where we group brackets to the right). Multiplication of $x_1\cdot( x_2\cdot (x_3\cdot\ldots \cdot x_n))$ and $y_1\cdot( y_2\cdot (y_3\cdot\ldots \cdot y_m))$ is just $x_1\cdot (x_2\cdot (x_3\cdot\ldots\cdot(x_n\cdot (y_1\cdot (y_2\cdot (y_3\cdot\ldots\;\cdot y_m)\ldots)$. In Haskell if you’d represent the set $X$ as a type $a$ then the free monoid is just the list type $[a]$ with multiplication: list concatenation and unit element: the empty list. Just think of
-- A set with `n` elements corresponds -- to a type with `n` constructors: data X = X_1|⋯|X_n
It turns out that monads in $\mathcal{Hask}$ are also an equational theory. Just the terms are higher kinded: $*\rightarrow*$ rather than $*$ as in monoids. The same construction of a free algebra works in the land of monads, but we need to look at them from another perspective. Let us first take a mathematical definition of view on monads.
m
with two
natural transformations:
class Monad m where return :: a -> m a join :: m(m a) -> m awhich is unital and associative, i.e. the following law holds:
-- | associativity join . join == join . fmap join -- | unitality join . return = id = join . fmap return
These axioms are easier to understand as diagrams:
It is a basic lemma that this definition a monad is equivalent to what we are used to in Haskell:
class Monad m where return :: a -> m a >>= :: m a -> (a -> m b) -> m b
Having join
one defines >>=
as
ma >>= f = join $ f <$> ma
and the other way, having >>=
then
join = (>>= id)`Not only these two constructions are reverse to each other, but also they translate the monad laws correctly.
Most examples of monoidal categories are not strict but are associative and unital up to a natural transformation. Think of $(A\times B)\times C\simeq A\times(B\times C)$ in $\mathcal{Set}$ (or any category with (finite) products, like $\mathcal{Hask}$). Let me just stress out that since $\otimes$ is a bifunctor, for any two maps $f:\;a_1\rightarrow b_1$ and $g:\;a_2\rightarrow b_2$ we have a map $f\otimes g: a_1\otimes a_2\rightarrow b_1\otimes b_2$, and moreover it behaves nicely with respect to composition: $(f_1\otimes g_1) \cdot (f_2\otimes g_2) = (f_1\cdot f_2)\otimes(g_1\cdot g_2)$ for composable pairs of arrows $f_1,\;f_2$ and $g_1,\;g_2$.
Now we can generalise a definition of a monoid to such categories:
The main point of this section is that these diagrams have exactly the same shape as associativity and unitality for monads. Indeed, a monoid in the category of endo-functors with functor composition as a monoidal product $\otimes$ and unit the identity functor is a monad. In category theory this category is strict monoidal, if you try to type this in Haskell you will end up with a non strict monoidal structure, where you will need to show penthagon equation.
These consideration suggest that we should be able to build a free monad using our algebraic approach to free algebras. And this is what we will follow in the next section.
Firstly, what should replace the set of generators $X$ in
$\mathsf{T}(X)/\sim$?
First we generalised from the category of sets $\mathcal{Set}$ to
a monoidal category $(\mathcal{C},\otimes, 1)$: its clear
that we just should pick an object of the category
$\mathcal{C}$. Now since our category is the category of
(endo) functors of $\mathcal{Hask}$ the set of generators
is just a functor. So let's pick a functor f
.
To get a free monad we need to decypher $\mathsf{T}(f)/\sim$ in the context of a monoid in a monoidal category of endofunctors. Note that here $\mathsf{T}(f)$ and $\mathsf{T}(f)/\sim$ are functors! To simplify the notation, let $\mathsf{Free}(f):=\mathsf{T}(f)/\sim$. So what is a term in this setting? It should be an expressions of a Haskell's type: $$ \begin{equation} \begin{array}{c} \bigl(\mathsf{Free}(f)\otimes\mathsf{Free}(f)\otimes\ldots\otimes \mathsf{Free}(f)\bigr)(a) \\\\ \quad\quad = \mathsf{Free}(f)\bigl(\mathsf{Free}(f)\bigl(\ldots (\mathsf{Free}(f)(a)\bigr)\ldots\bigr) \end{array} \end{equation} $$ In our setup the monoidal product $-\otimes-$ is just the functor composition, thus $\mathsf{Free}(f)(a)$ must be a type which (Haskell's) terms are of Haskell's types:
a, f a, f (f a), f (f (f a)), ...
The monadic join
will take something of
type $\mathsf{Free}(f)\;(\mathsf{Free}(f)\;(a))$, e.g. $f^n(b)=f\;(f\;(\dots f\;(b)\dots)$ (by abusing the notation $f^n$)
where $b$ has type
$f^m(a)=(f\;(f\;(\dots(f\;(a)\dots)$ and return something
of type $\mathsf{Free}(f)(a)$ and it should be quite clear
how to do that: just take the obvious element of type
$f^{n+m}(a)$. Altogether, this is a good trace of a monad,
so let us translate this into a concrete Haskell type:
data Free f a = Return a -- ^ the terms of type a | Free (f (Free f a)) -- ^ -- recursive definition which embraces -- `f a`, `f (f a)` and so on instance Functor f => Functor (Free f) where fmap f (Return a) = Return (f a) fmap f (Free ff) = Free (fmap (fmap f) ff)
Free f
is just a tree shaped by the functor
f
. This type indeed embraces all the terms of
types: a, f a, f (f a), ...
into a single
type. Now the monad instance:
instance Monad (Free f a) where return = Return join (Return ma) = ma -- ^ stitch a tree of trees into a tree join (Free fma) = Free $ join <$> fma -- ^ recurs to the leaves
As you can see, takes a tree of trees and outputs a bigger
tree, that's what join
does on the
Return
constructor.
Before formulating the next result let's describe morphisms
between monads.    Return) $ fa -- | by definition of (foldFree f) = join $ f $ fmap return $ fa -- | since f is a natural transformation = join $ fmap return $ f fa -- | by monad unitality axiom = f fa
foldFree
corresponds to foldMap
which is
defined in a very similar way
foldMap :: Monoid m => (a -> m) -> [a] -> m
foldMap _ [] = mempty
foldMap f (a : as) = mappend (f a) (foldMap f as)
Note that foldMap
is an isomorphism onto
monoid homomorphisms with an inverse
g :: Monoid m => ([a] -> m) -> a -> m g f a = f [a]
Furthermore, if we had polymorphic functions over monoidal
categories in our type system, foldMap
and
foldFree
would be specialisations of the
same function!
data Const a b = Const aThen
Free (Const a)
is isomorphic to Either a
toEither :: Free (Const a) b -> Either a b toEither (Return b) = Right b toEither (Free (Const a)) = Left a fromEither :: Either a b -> Free (Const a) b fromEither (Right b) = Return b fromEither (Left a) = Free (Const a)Since
Either ()
is isomorphic with
Maybe
also Maybe
is a free
monad.
Free Identity
is isomorphic to:
data Nat = Zero | Succ Nat
newtype Writer m a = Writer { runWriter :: (m, a) }
deriving Functor
toFree1 :: Free Identity a -> Writer Nat a
toFree1 (Return a) = Writer (Zero, a)
toFree1 (Free (Identity fa)) = case toFree1 fa of
Writer (n, a) -> (Succ n, a)
fromFree1 :: (Nat, a) -> Free Identity a
fromFree1 (Writer (Zero, a))
= Return a
fromFree1 (Writer (Succ n, a))
= Free (Identity (fromFree1 (Free1 n a)))
Note that Nat
is the free monoid with one
generator (Nat
$\simeq$[()]
) in
the cateogry $\mathcal{Hask}$, and so is Free
Identity
but in the monoidal category of
endofunctors of $\mathcal{Hask}$!
data F2 a = FX a | FY a deriving Functor. Then we have
data S2 = SX | SY toFree2 :: Free F2 a -> Writer [S2] a toFree2 (Return a) = Writer ([], a) toFree2 (Free (FX fa)) = case toM2 fa of Writer (m, a) -> Writer (SX : m, a) toM2 (Free (FY fa)) = case toM2 fa of Writer (m, a) -> Writer (SY : m, a) fromFree2 :: Writer [S2] a -> Free F2 a fromFree2 (Writer ([], a)) = Return a fromFree2 (Writer (SX : xs, a)) = Free (FX (fromM2 $ Writer (xs, a))) fromFree2 (Writer (SY : xs, a)) = Free (FY (fromM2 $ Writer (xs, a)))
toFree2
and fromFree2
are isomorphisms.
I think you see the pattern: if you take a functor with $n$
constructors you will end up with a writer monad over
a free monoid with $n$ generators. You might ask if all
the monads are free then? The answer is no: take a non
free monoid m
then the monad Writer
m
is a non free monad. You can prove your self that
the writer monad Writer m
is free if and only
if the monoid m
is a free monoid in
$\mathcal{Hask}$.
I hope I convinced you that monads are algebraic constructs and I hope you'll find universal algebra approach useful. In many cases we are dealing with algebraic structures which we require to satisfy certain equations. Very often they fit into equational theories, which have a very clear description and which allow free objects. Freeness is the property that lets one easily interpret the free object in any other object of the same type. In the monad setting they are really useful when writing DSLs, since you will be able to interpret it in any monad, like IO or some pure monad.


Blox
orz Clone
WebGL Game.
Home
Level
Level 1
Level 2
Theme
Theme 1
Theme 2
Change Backround
Music
Black Irish
Game Stats
Score
0
Moves
0
Lifes
3
Game Controls
Brick Keys
Up,Down, Left, Right Arrows in the keyboard
Camera Keys
W,S,A,D,Q,E,Z,X,R


--- title: ICSM10 type: poster longtitle: Using Clone Detection to Identify Bugs in Concurrent Software authors: Kevin Jalbert, Jeremy S. Bradbury links: http://kevinjalbert.com, http://faculty.uoit.ca/bradbury year: 2010 month: Jun. booktitle: In Proc. of 26th IEEE International Conference on Software Maintenance (ICSM 2010) location: Timișoara, Romania ---
We use clone detection, a technique for finding duplicated source code, and rule evaluation as the foundation for detecting bug patterns in concurrent software. If we can identify a bug pattern as being duplicated then we can localize our regression testing effort to the exploration of interleavings relevant to the potential bug. If the potential bug is indeed an actual bug, then targeting specific thread interleavings instead of examining all possible executions will increase the probability of the bug being detected sooner.


Module: ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Included In:
| |
| Defined in: | actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb |
Overview
Screenshot helper for system testing.
Instance Attribute Summary
- #failed? ⇒ Boolean readonly private
- #supports_screenshot? ⇒ Boolean readonly private
Instance Method Summary
-
#take_failed_screenshot
Takes a screenshot of the current page in the browser if the test failed.
-
#take_screenshot
Takes a screenshot of the current page in the browser.
- #display_image private
- #image_name private
- #image_path private
- #inline_base64(path) private
- #output_type private
- #save_image private
Instance Attribute Details
#failed? ⇒ Boolean
(readonly, private)
[ GitHub ]
84 85 86
# File 'actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb', line 84
def failed? !passed? && !skipped? end
#supports_screenshot? ⇒ Boolean
(readonly, private)
[ GitHub ]
88 89 90
# File 'actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb', line 88
def supports_screenshot? Capybara.current_driver != :rack_test end
Instance Method Details
#display_image (private)
[ GitHub ]65 66 67 68 69 70 71 72 73 74 75 76 77 78
# File 'actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb', line 65
def display_image = "[Screenshot]: #{image_path}\n" case output_type when "artifact" << "\e]1338;url=artifact://#{image_path}\a\n" when "inline" name = inline_base64(File.basename(image_path)) image = inline_base64(File.read(image_path)) << "\e]1337;File=name=#{name};height=400px;inline=1:#{image}\a\n" end end
#image_name (private)
[ GitHub ]40 41 42
# File 'actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb', line 40
def image_name failed? ? "failures_#{method_name}" : method_name end
#image_path (private)
[ GitHub ]44 45 46
# File 'actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb', line 44
def image_path "tmp/screenshots/#{image_name}.png" end
#inline_base64(path) (private)
[ GitHub ]80 81 82
# File 'actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb', line 80
def inline_base64(path) Base64.encode64(path).gsub("\n", "") end
#output_type (private)
[ GitHub ]52 53 54 55 56 57 58 59 60 61 62 63
# File 'actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb', line 52
def output_type # Environment variables have priority output_type = ENV["RAILS_SYSTEM_TESTING_SCREENSHOT"] || ENV["CAPYBARA_INLINE_SCREENSHOT"] # If running in a CI environment, default to simple output_type ||= "simple" if ENV["CI"] # Default output_type ||= "inline" output_type end
#save_image (private)
[ GitHub ]#take_failed_screenshot
Takes a screenshot of the current page in the browser if the test failed.
take_failed_screenshot
is included in
application_system_test_case.rb
that is generated with the
application. To take screenshots when a test fails add
take_failed_screenshot
to the teardown block before clearing
sessions.
35 36 37
# File 'actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb', line 35
def take_failed_screenshot take_screenshot if failed? && supports_screenshot? end
#take_screenshot
Takes a screenshot of the current page in the browser.
take_screenshot
can be used at any point in your system tests
to take a screenshot of the current state. This can be useful for debugging
or automating visual testing.
The screenshot will be displayed in your console, if supported.
You can set the RAILS_SYSTEM_TESTING_SCREENSHOT
environment variable to
control the output. Possible values are:
inline
(default)-
display the screenshot in the terminal using the iTerm image protocol (iterm2.com/documentation-images.html).
simple
-
only display the screenshot path. This is the default value if the
CI
environment variables is defined.
artifact
-
display the screenshot in the terminal, using the terminal artifact format (buildkite.github.io/terminal/inline-images/).
23 24 25 26
# File 'actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb', line 23
def take_screenshot save_image puts display_image end


We have default localization object that contains all visible texts.
If you need to change some text field or select option use localization
input to pass your version.
Your localization version will be deeply merged with the default one, allowing you to override only what you want.
Pass localization object to localization
input to have translated texts.
See this example of the translation of the "Seconds" tab into Ukrainian.
Use this manifest for full localization.


{% load static %}
I don't have the server set up to send emails right now. I can easily reset your password manually, though; just shoot me an email for help! jackdevriesmusic@gmail.com


The String expression syntax
String expressions are used to create string values dynamically, using a syntax that is not dissimilar in principle to C# interpolated strings. It allows the creation of a string value using placeholders where dynamic values may be inserted using a path expression.
The syntax of a string expression is:
string:A string here using zero or more $placeholders
String expressions are included in the main ZptSharp package
Support for string
expressions is included in the main ZptSharp NuGet package.
Additionally, string
expressions are one of the standard expression types activated by AddStandardZptExpressions()
.
How to use placeholders
A placeholder always begins with a single dollar character $
, after which is a TALES path expression (and a path expression only) which provides the value to be inserted into the placeholder.
If the TALES expression does not evaluate to a string then it will be converted to one via Object.ToString()
unless it is null, which is interpreted as an empty string.
The expression may follow directly after the dollar character, for example $myVariable
or it may be wrapped in braces, for example ${myVariable}
.
Braces or no braces?
Whether or not braces are used impacts which characters are permitted for use in the expression. Without braces, expressions that are used in a string placeholder may only use a limited set of characters. The table below shows which characters are permitted in each scenario. If you wish to use any of the characters which are disallowed without braces, then your expression must be enclosed in braces.
| Character(s) | Without braces | With braces |
|---|---|---|
| Alphabetic (upper & lower case) | Yes | Yes |
| Numeric | Yes | Yes |
Underscore: _ |
Yes | Yes |
Forward-slash: / |
Yes | Yes |
| Space | No | Yes |
Period: . |
No | Yes |
Comma: , |
No | Yes |
Tilde: ~ |
No | Yes |
Pipe (aka "Vertical bar"): \| |
No | Yes |
Question mark: ? |
No | Yes |
Hyphen-minus: - |
No | Yes |
Escaping dollar characters
If you wish your string to include a literal dollar character, it must be escaped by doubling-it up: $$
.
You must manually encode markup-reserved characters
Because string expressions are used exclusively in DOM attributes, this means that expressions must also follow the rules for the underlying markup. For example TALES itself would not raise an error for this expression:
string:He said "$greeting"
However, in practice this would not work because in context that expression would appear in an attribute like so. It will be obvious that those extra double-quote characters break the DOM because they have a special meaning within an attribute.

This will be replaced

This problem is fixed by simply encoding the reserved characters according to the rules of the markup.
In this case those double-quote characters must be replaced with "
, meaning that the final working example would look like this:

This will be replaced

Example
Here is an example of a string expression in use.
This makes use of the path expression alternation technique to show where braces might be required in a placeholder.
If the path expression here/username
cannot be traversed, then TALES will use the alternate guestUsername
variable instead.
This technique requires the use of a pipe character though, forcing the whole expression to be enclosed in braces.

You are logged in as JoeBloggs.