[gecode-users] Advices for creating new variable type?
Christian Schulte
cschulte at kth.se
Tue Apr 26 15:02:21 CEST 2016
Hi,
No special way: you will just have to implement something in terms of your NoteVar. Frankly, I do not really know what you are after...
Cheers
Christian
--
Christian Schulte, www.gecode.org/~schulte
Professor of Computer Science, KTH, cschulte at kth.se
Expert Researcher, SICS, cschulte at sics.se
-----Original Message-----
From: Geoffroy Zoetardt [mailto:geoffzoet at hotmail.com]
Sent: Tuesday, April 26, 2016 15:02
To: cschulte at kth.se
Cc: users at gecode.org
Subject: Re: [gecode-users] Advices for creating new variable type?
Hi Christian,
For now, I don’t intend to implement specific propagators.
Concerning the constraint post functions, is there a special way to do it through gecode?
Thanks you for you quick answer!
Geoffroy
> Le 26 avr. 2016 à 11:02, Christian Schulte <cschulte at kth.se> a écrit :
>
> Hi Geoffroy,
>
> The key question here is whether you intend to also implement propapators that are specific to a NoteVar.
>
> If yes, then you will have to have a look at the Variable implementation part in MPG.
>
> If not, you can see a NoteVar just as modeling tool for which you provide your own constraint post functions but no dedicated propagators as all can be expressed by constraints over integer variables. Much easier.
>
> I'd try to give the latter a shot first.
>
> Cheers
> Christian
>
> --
> Christian Schulte, www.gecode.org/~schulte Professor of Computer
> Science, KTH, cschulte at kth.se Expert Researcher, SICS,
> cschulte at sics.se
>
> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On
> Behalf Of Geoffroy Zoetardt
> Sent: Tuesday, April 26, 2016 10:28
> To: users at gecode.org
> Subject: [gecode-users] Advices for creating new variable type?
>
> Hi everyone,
>
> I’m actually developing a binding between Gecode and OpenMusic (composition software made by the IRCAM).
> During this project, I want to create new type of variable closer to the musical objects already existing in OpenMusic (OM).
> For example, in OM there is a Note object with some attributes such as the pitch, the velocity, the duration and I want to create a NoteVar in Gecode to use all possibilities of constraint programming on Note object.
> For now, my idea is to implement each attribute as an IntVar content in the NoteVar object because there are mainly two application that I need to do with NoteVar:
> - Be able to apply constraints and search on attribute individually (reason for implementing them as IntVar).
> - Be able to apply constraints and search on the NoteVar object.
> Then I would like to have your advices on « What would be the best idea of implementation for NoteVar to easily apply the constraints and the search on this object? ».
> I hope that it is clear enough.
> Already thank you!
>
> Geoffroy Zoetardt
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4599 bytes
Desc: not available
URL: <http://www.gecode.org/pipermail/users/attachments/20160426/52bbf5ed/attachment.bin>
More information about the users
mailing list


| 1 | /* | |
| 2 | * Copyright 2001-2005 Stephen Colebourne | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.joda.time.chrono; | |
| 17 | ||
| 18 | import org.joda.time.Chronology; | |
| 19 | import org.joda.time.DateTimeField; | |
| 20 | import org.joda.time.DateTimeZone; | |
| 21 | import org.joda.time.field.StrictDateTimeField; | |
| 22 | ||
| 23 | /** | |
| 24 | * Wraps another Chronology, ensuring all the fields are strict. | |
| 25 | * <p> | |
| 26 | * StrictChronology is thread-safe and immutable. | |
| 27 | * | |
| 28 | * @author Brian S O'Neill | |
| 29 | * @since 1.0 | |
| 30 | * @see StrictDateTimeField | |
| 31 | * @see LenientChronology | |
| 32 | */ | |
| 33 | public final class StrictChronology extends AssembledChronology { | |
| 34 | ||
| 35 | /** Serialization lock */ | |
| 36 | private static final long serialVersionUID =<PHONE_NUMBER>097111960L; | |
| 37 | ||
| 38 | /** | |
| 39 | * Create a StrictChronology for any chronology. | |
| 40 | * | |
| 41 | * @param base the chronology to wrap | |
| 42 | * @throws IllegalArgumentException if chronology is null | |
| 43 | */ | |
| 44 | public static StrictChronology getInstance(Chronology base) { | |
| 45 |
1
1. getInstance : negated conditional → KILLED |
if (base == null) { |
| 46 | throw new IllegalArgumentException("Must supply a chronology"); | |
| 47 | } | |
| 48 |
1
1. getInstance : mutated return of Object value for org/joda/time/chrono/StrictChronology::getInstance to ( if (x != null) null else throw new RuntimeException ) → SURVIVED |
return new StrictChronology(base); |
| 49 | } | |
| 50 | ||
| 51 | private transient Chronology iWithUTC; | |
| 52 | ||
| 53 | /** | |
| 54 | * Create a StrictChronology for any chronology. | |
| 55 | * | |
| 56 | * @param base the chronology to wrap | |
| 57 | */ | |
| 58 | private StrictChronology(Chronology base) { | |
| 59 | super(base, null); | |
| 60 | } | |
| 61 | ||
| 62 | public Chronology withUTC() { | |
| 63 |
1
1. withUTC : negated conditional → NO_COVERAGE |
if (iWithUTC == null) { |
| 64 |
1
1. withUTC : negated conditional → NO_COVERAGE |
if (getZone() == DateTimeZone.UTC) { |
| 65 | iWithUTC = this; | |
| 66 | } else { | |
| 67 | iWithUTC = StrictChronology.getInstance(getBase().withUTC()); | |
| 68 | } | |
| 69 | } | |
| 70 |
1
1. withUTC : mutated return of Object value for org/joda/time/chrono/StrictChronology::withUTC to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return iWithUTC; |
| 71 | } | |
| 72 | ||
| 73 | public Chronology withZone(DateTimeZone zone) { | |
| 74 |
1
1. withZone : negated conditional → NO_COVERAGE |
if (zone == null) { |
| 75 | zone = DateTimeZone.getDefault(); | |
| 76 | } | |
| 77 |
1
1. withZone : negated conditional → NO_COVERAGE |
if (zone == DateTimeZone.UTC) { |
| 78 |
1
1. withZone : mutated return of Object value for org/joda/time/chrono/StrictChronology::withZone to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return withUTC(); |
| 79 | } | |
| 80 |
1
1. withZone : negated conditional → NO_COVERAGE |
if (zone == getZone()) { |
| 81 |
1
1. withZone : mutated return of Object value for org/joda/time/chrono/StrictChronology::withZone to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return this; |
| 82 | } | |
| 83 |
1
1. withZone : mutated return of Object value for org/joda/time/chrono/StrictChronology::withZone to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return StrictChronology.getInstance(getBase().withZone(zone)); |
| 84 | } | |
| 85 | ||
| 86 | protected void assemble(Fields fields) { | |
| 87 | fields.year = convertField(fields.year); | |
| 88 | fields.yearOfEra = convertField(fields.yearOfEra); | |
| 89 | fields.yearOfCentury = convertField(fields.yearOfCentury); | |
| 90 | fields.centuryOfEra = convertField(fields.centuryOfEra); | |
| 91 | fields.era = convertField(fields.era); | |
| 92 | fields.dayOfWeek = convertField(fields.dayOfWeek); | |
| 93 | fields.dayOfMonth = convertField(fields.dayOfMonth); | |
| 94 | fields.dayOfYear = convertField(fields.dayOfYear); | |
| 95 | fields.monthOfYear = convertField(fields.monthOfYear); | |
| 96 | fields.weekOfWeekyear = convertField(fields.weekOfWeekyear); | |
| 97 | fields.weekyear = convertField(fields.weekyear); | |
| 98 | fields.weekyearOfCentury = convertField(fields.weekyearOfCentury); | |
| 99 | ||
| 100 | fields.millisOfSecond = convertField(fields.millisOfSecond); | |
| 101 | fields.millisOfDay = convertField(fields.millisOfDay); | |
| 102 | fields.secondOfMinute = convertField(fields.secondOfMinute); | |
| 103 | fields.secondOfDay = convertField(fields.secondOfDay); | |
| 104 | fields.minuteOfHour = convertField(fields.minuteOfHour); | |
| 105 | fields.minuteOfDay = convertField(fields.minuteOfDay); | |
| 106 | fields.hourOfDay = convertField(fields.hourOfDay); | |
| 107 | fields.hourOfHalfday = convertField(fields.hourOfHalfday); | |
| 108 | fields.clockhourOfDay = convertField(fields.clockhourOfDay); | |
| 109 | fields.clockhourOfHalfday = convertField(fields.clockhourOfHalfday); | |
| 110 | fields.halfdayOfDay = convertField(fields.halfdayOfDay); | |
| 111 | } | |
| 112 | ||
| 113 | private static final DateTimeField convertField(DateTimeField field) { | |
| 114 |
1
1. convertField : mutated return of Object value for org/joda/time/chrono/StrictChronology::convertField to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return StrictDateTimeField.getInstance(field); |
| 115 | } | |
| 116 | ||
| 117 | //----------------------------------------------------------------------- | |
| 118 | /** | |
| 119 | * A strict chronology is only equal to a strict chronology with the | |
| 120 | * same base chronology. | |
| 121 | * | |
| 122 | * @param obj the object to compare to | |
| 123 | * @return true if equal | |
| 124 | * @since 1.4 | |
| 125 | */ | |
| 126 | public boolean equals(Object obj) { | |
| 127 |
1
1. equals : negated conditional → NO_COVERAGE |
if (this == obj) { |
| 128 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 129 | } | |
| 130 |
1
1. equals : negated conditional → NO_COVERAGE |
if (obj instanceof StrictChronology == false) { |
| 131 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 132 | } | |
| 133 | StrictChronology chrono = (StrictChronology) obj; | |
| 134 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return getBase().equals(chrono.getBase()); |
| 135 | } | |
| 136 | ||
| 137 | /** | |
| 138 | * A suitable hashcode for the chronology. | |
| 139 | * | |
| 140 | * @return the hashcode | |
| 141 | * @since 1.4 | |
| 142 | */ | |
| 143 | public int hashCode() { | |
| 144 |
3
1. hashCode : Replaced integer multiplication with division → NO_COVERAGE 2. hashCode : Replaced integer addition with subtraction → NO_COVERAGE 3. hashCode : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return 352831696 + getBase().hashCode() * 7; |
| 145 | } | |
| 146 | ||
| 147 | /** | |
| 148 | * A debugging string for the chronology. | |
| 149 | * | |
| 150 | * @return the debugging string | |
| 151 | */ | |
| 152 | public String toString() { | |
| 153 |
1
1. toString : mutated return of Object value for org/joda/time/chrono/StrictChronology::toString to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return "StrictChronology[" + getBase().toString() + ']'; |
| 154 | } | |
| 155 | ||
| 156 | } | |
Mutations | ||
| 45 |
1.1 |
|
| 48 |
1.1 |
|
| 63 |
1.1 |
|
| 64 |
1.1 |
|
| 70 |
1.1 |
|
| 74 |
1.1 |
|
| 77 |
1.1 |
|
| 78 |
1.1 |
|
| 80 |
1.1 |
|
| 81 |
1.1 |
|
| 83 |
1.1 |
|
| 114 |
1.1 |
|
| 127 |
1.1 |
|
| 128 |
1.1 |
|
| 130 |
1.1 |
|
| 131 |
1.1 |
|
| 134 |
1.1 |
|
| 144 |
1.1 2.2 3.3 |
|
| 153 |
1.1 |


To rename a file or directory on the remote system, locate and select (highlight) the file or directory that you would like to rename and do any one of the following:
Remote File -> Rename...
menu item
from the menu bar
Ctrl + R
(Command + R
on Mac
OS X) on your key board
Rename...
from the context menu
When you do any of the above actions, a new dialog titled
Rename Remote File or Directory
is displayed allowing you to specify a new name.
From
Enter the name of the file or directory that you would like
to rename.
If you have selected a file or
directory in the remote pane before opening the
Rename Remote File or Directory
dialog, the
From
field is pre-populated with the selected object's name.
To
Enter the new name for the file or directory that you are
renaming.
Rename
Clicking on this button would rename (or try to rename) the
file or directory and closes the
Rename Remote File or Directory
dialog.
Cancel
Clicking this button would discard the input you have
provided and closes the
Rename Remote File or Directory
dialog.
Help
Clicking this button displays this help topic.
In the
From
and
To
fields, you may enter absolute or relative path names. Below are a few
examples to demonstrate how the rename works based on the input you
provide. All examples assume that your current working directory is
set to
/wd
.
Example 1
If you enter
old.txt
in the
From
field and
new.txt
in the
To
field, the file
/wd/old.txt
will be renamed to
/wd/new.txt
.
Example 2
If you enter
old.txt
in the
From
field and
subDir/new.txt
in the
To
field, the file
/wd/old.txt
will be renamed to
/wd/subDir/new.txt
. In this case, the file is actually moved to another directory. Make
sure that the directory
/wd/subDir
exists in order for this to work.
Example 3
If you enter
/dir1/sample.txt
in the
From
field and
/dir2/sample.txt
in the
To
field, the file
sample.txt
will be moved from
/dir1
to
/dir2
.
All the above examples would work well even with directories; i.e. you can rename or move directories just the same way as you could with files.


{% extends "base.html" %} {% block content %}
Sorry we couldn't find that page
Click here to return home.


The Bloom Date
The Bloom Date
HOME
Signup
Login
Login
Remember me
Forgot password?
Login Now
Don't have an account?
Sign up


ZwWdP
|
Zeit |
Interpret |
Titel |
|
20 h |
The Boo Radleys |
Wake Up Boo |
|
|
Ozomatli |
45 |
|
|
Squeeze |
Up The Junction |
|
|
Bill Pritchard |
Tommy & Co |
|
|
Erdmöbel |
Das Leben ist schön |
|
|
Lloyd Cole |
Writers Retreat |
|
|
Gonzales |
Knight Moves |
|
|
Soul Hooligan |
Space Travel |
|
|
Cherry Ghost |
A Month Of Mornings |
|
|
Hint |
You Little Trooper |
|
|
The Morning Benders |
Excuses |
|
|
Nichtmares On Wax |
Bleu My Mind |
|
|
La Düsseldorf |
Rheinita |
|
|
Ichisan |
Space Patrol |
|
21 h |
Manic Street Preachers |
Umbrella |
|
|
Lloyd Cole |
Like A Broken Record |
|
|
Cherry Ghost |
Kissing Strangers |
|
|
Paul Steel |
In A Coma |
|
|
Erdmöbel |
77ste Liebe |
|
|
Josh Rouse |
Boys Don't Cry |
|
|
Oasis |
Cigarettes And Alcohol |
|
|
Aqua Velvet |
You Showed Me |
|
|
Brown Recluse |
Night Train |
|
|
The Mornng Benders |
Wet Cement |
|
|
Barbara Mason |
Oh How It Hurts |
|
|
Robert Cooper |
The Tyranny Of Parents |
|
|
Chris Farlowe |
Handbags And Gladrags |
|
|
Screaming' Jay Hawkins |
I Put A Spell On You |
|
|
David Gold |
Like Summer |
|
22 h |
Burt Bacharach |
The Look Of Love |
|
|
Josh Rouse |
Under Cold Blue Stars (Navy Blazer Remix) |
|
|
Erdmöbel |
Snoopy T-Shirt |
|
|
The Simon Park Orchestra |
Seventeen |
|
|
Robert Cooper |
Poignant |
|
|
Michel Magne |
Bach Anal |
|
|
Jonsi |
Time To Pretend |
|
|
Au Revoir Simone |
Shadows (Jens Lekman Remix) |
|
|
Britanica |
Surf's Up |
|
|
John Cameron |
Liquid Sunshine |
|
|
Chad & Jeremy |
Everyone's Gone To The Moon |
|
|
Pete Drake |
Forever |
|
|
Aqua Velvet |
98,6 |
|
|
The Real Tuesday Weld |
The End |


iptables has a fairly detailed manual page (man iptables
),
and if you need more detail on particulars. Those of you familiar
with ipchains may simply want to look at
Differences Between iptables and ipchains; they are very
similar.
There are several different things you can do with iptables
.
You start with three built-in chains INPUT
, OUTPUT
and FORWARD
which you can't delete. Let's look at the
operations to manage whole chains:
There are several ways to manipulate rules inside a chain:
iptables may be a module, called (`iptable_filter.o'), which should be
automatically loaded when you first run iptables
. It can
also be built into the kernel permenantly.
Before any iptables commands have been run (be careful: some distributions will run iptables in their initialization scripts), there will be no rules in any of the built-in chains (`INPUT', `FORWARD' and `OUTPUT'), all the chains will have a policy of ACCEPT. You can alter the default policy of the FORWARD chain by providing the `forward=0' option to the iptable_filter module.
This is the bread-and-butter of packet filtering; manipulating rules. Most commonly, you will probably use the append (-A) and delete (-D) commands. The others (-I for insert and -R for replace) are simple extensions of these concepts.
Each rule specifies a set of conditions the packet must meet, and what to do if it meets them (a `target'). For example, you might want to drop all ICMP packets coming from the IP address <IP_ADDRESS>. So in this case our conditions are that the protocol must be ICMP and that the source address must be <IP_ADDRESS>. Our target is `DROP'.
<IP_ADDRESS> is the `loopback' interface, which you will have even if you have no real network connection. You can use the `ping' program to generate such packets (it simply sends an ICMP type 8 (echo request) which all cooperative hosts should obligingly respond to with an ICMP type 0 (echo reply) packet). This makes it useful for testing.
# ping -c 1 <IP_ADDRESS> PING <IP_ADDRESS> (<IP_ADDRESS>): 56 data bytes 64 bytes from <IP_ADDRESS>: icmp_seq=0 ttl=64 time=0.2 ms --- <IP_ADDRESS> ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max = 0.2/0.2/0.2 ms # iptables -A INPUT -s <IP_ADDRESS> -p icmp -j DROP # ping -c 1 <IP_ADDRESS> PING <IP_ADDRESS> (<IP_ADDRESS>): 56 data bytes --- <IP_ADDRESS> ping statistics --- 1 packets transmitted, 0 packets received, 100% packet loss #
You can see here that the first ping succeeds (the `-c 1' tells ping to only send a single packet).
Then we append (-A) to the `INPUT' chain, a rule specifying that for packets from <IP_ADDRESS> (`-s <IP_ADDRESS>') with protocol ICMP (`-p icmp') we should jump to DROP (`-j DROP').
Then we test our rule, using the second ping. There will be a pause before the program gives up waiting for a response that will never come.
We can delete the rule in one of two ways. Firstly, since we know that it is the only rule in the input chain, we can use a numbered delete, as in:
To delete rule number 1 in the INPUT chain.
# iptables -D INPUT 1 #
The second way is to mirror the -A command, but replacing the -A with -D. This is useful when you have a complex chain of rules and you don't want to have to count them to figure out that it's rule 37 that you want to get rid of. In this case, we would use:
The syntax of -D must have exactly the same options as the -A (or -I or -R) command. If there are multiple identical rules in the same chain, only the first will be deleted.
# iptables -D INPUT -s <IP_ADDRESS> -p icmp -j DROP #
We have seen the use of `-p' to specify protocol, and `-s' to specify source address, but there are other options we can use to specify packet characteristics. What follows is an exhaustive compendium.
Source (`-s', `--source' or `--src') and destination (`-d', `--destination' or `--dst') IP addresses can be specified in four ways. The most common way is to use the full name, such as `localhost' or `www.linuxhq.com'. The second way is to specify the IP address such as `<IP_ADDRESS>'.
The third and fourth ways allow specification of a group of IP addresses, such as `<IP_ADDRESS>/24' or `<IP_ADDRESS>/<IP_ADDRESS>'. These both specify any IP address from <IP_ADDRESS> to <IP_ADDRESS> inclusive; the digits after the `/' tell which parts of the IP address are significant. `/32' or `/<IP_ADDRESS>' is the default (match all of the IP address). To specify any IP address at all `/0' can be used, like so:
[ NOTE: `-s 0/0' is redundant here. ] # iptables -A INPUT -s 0/0 -j DROP #
This is rarely used, as the effect above is the same as not specifying the `-s' option at all.
Many flags, including the `-s' (or `--source') and `-d' (`--destination') flags can have their arguments preceded by `!' (pronounced `not') to match addresses NOT equal to the ones given. For example. `-s ! localhost' matches any packet not coming from localhost.
The protocol can be specified with the `-p' (or `--protocol') flag. Protocol can be a number (if you know the numeric protocol values for IP) or a name for the special cases of `TCP', `UDP' or `ICMP'. Case doesn't matter, so `tcp' works as well as `TCP'.
The protocol name can be prefixed by a `!', to invert it, such as `-p ! TCP' to specify packets which are not TCP.
The `-i' (or `--in-interface') and `-o' (or `--out-interface') options
specify the name of an interface to match. An interface is
the physical device the packet came in on (`-i') or is going out on
(`-o'). You can use the ifconfig
command to list the
interfaces which are `up' (i.e., working at the moment).
Packets traversing the INPUT
chain don't have an output
interface, so any rule using `-o' in this chain will never match.
Similarly, packets traversing the OUTPUT
chain don't have an
input interface, so any rule using `-i' in this chain will never match.
Only packets traversing the FORWARD
chain have both an
input and output interface.
It is perfectly legal to specify an interface that currently does not
exist; the rule will not match anything until the interface comes up.
This is extremely useful for dial-up PPP links (usually interface
ppp0
) and the like.
As a special case, an interface name ending with a `+' will match all
interfaces (whether they currently exist or not) which begin with that
string. For example, to specify a rule which matches all PPP
interfaces, the -i ppp+
option would be used.
The interface name can be preceded by a `!' with spaces around it, to
match a packet which does not match the specified
interface(s), eg -i ! ppp+
.
Sometimes a packet is too large to fit down a wire all at once. When this happens, the packet is divided into fragments, and sent as multiple packets. The other end reassembles these fragments to reconstruct the whole packet.
The problem with fragments is that the initial fragment has the complete header fields (IP + TCP, UDP and ICMP) to examine, but subsequent packets only have a subset of the headers (IP without the additional protocol fields). Thus looking inside subsequent fragments for protocol headers (such as is done by the TCP, UDP and ICMP extensions) is not possible.
If you are doing connection tracking or NAT, then all fragments will get merged back together before they reach the packet filtering code, so you need never worry about fragments.
Please also note that in the INPUT chain of the filter table (or any other table hooking into the NF_IP_LOCAL_IN hook) is traversed after defragmentation of the core IP stack.
Otherwise, it is important to understand how fragments get treated by
the filtering rules. Any filtering rule that asks for information we
don't have will not match. This means that the first fragment is
treated like any other packet. Second and further fragments won't be.
Thus a rule -p TCP --sport www
(specifying a source port of
`www') will never match a fragment (other than the first fragment).
Neither will the opposite rule -p TCP --sport ! www
.
However, you can specify a rule specifically for second and further fragments, using the `-f' (or `--fragment') flag. It is also legal to specify that a rule does not apply to second and further fragments, by preceding the `-f' with ` ! '.
Usually it is regarded as safe to let second and further fragments through, since filtering will effect the first fragment, and thus prevent reassembly on the target host; however, bugs have been known to allow crashing of machines simply by sending fragments. Your call.
Note for network-heads: malformed packets (TCP, UDP and ICMP packets too short for the firewalling code to read the ports or ICMP code and type) are dropped when such examinations are attempted. So are TCP fragments starting at position 8.
As an example, the following rule will drop any fragments going to <IP_ADDRESS>:
# iptables -A OUTPUT -f -d <IP_ADDRESS> -j DROP #
iptables
is extensible, meaning that both the
kernel and the iptables tool can be extended to provide new features.
Some of these extensions are standard, and other are more exotic. Extensions can be made by other people and distributed separately for niche users.
Kernel extensions normally live in the kernel module subdirectory, such as /lib/modules/2.4.0-test10/kernel/net/ipv4/netfilter. They are demand loaded if your kernel was compiled with CONFIG_KMOD set, so you should not need to manually insert them.
Extensions to the iptables program are shared libraries which usually live in /usr/local/lib/iptables/, although a distribution would put them in /lib/iptables or /usr/lib/iptables.
Extensions come in two types: new targets, and new matches (we'll talk about new targets a little later). Some protocols automatically offer new tests: currently these are TCP, UDP and ICMP as shown below.
For these you will be able to specify the new tests on the command line after the `-p' option, which will load the extension. For explicit new tests, use the `-m' option to load the extension, after which the extended options will be available.
To get help on an extension, use the option to load it (`-p', `-j' or `-m') followed by `-h' or `--help', eg:
# iptables -p tcp --help #
The TCP extensions are automatically loaded if `-p tcp' is specified. It provides the following options (none of which match fragments).
Followed by an optional `!', then two strings of flags, allows you to filter on specific TCP flags. The first string of flags is the mask: a list of flags you want to examine. The second string of flags tells which one(s) should be set. For example,
# iptables -A INPUT --protocol tcp --tcp-flags ALL SYN,ACK -j DROP
This indicates that all flags should be examined (`ALL' is synonymous with `SYN,ACK,FIN,RST,URG,PSH'), but only SYN and ACK should be set. There is also an argument `NONE' meaning no flags.
Optionally preceded by a `!', this is shorthand for `--tcp-flags SYN,RST,ACK SYN'.
followed by an optional `!', then either a single TCP port, or a range of ports. Ports can be port names, as listed in /etc/services, or numeric. Ranges are either two port names separated by a `:', or (to specify greater than or equal to a given port) a port with a `:' appended, or (to specify less than or equal to a given port), a port preceded by a `:'.
is synonymous with `--source-port'.
and
are the same as above, only they specify the destination, rather than source, port to match.
followed by an optional `!' and a number, matches a packet with a TCP option equaling that number. A packet which does not have a complete TCP header is dropped automatically if an attempt is made to examine its TCP options.
It is sometimes useful to allow TCP connections in one direction, but not the other. For example, you might want to allow connections to an external WWW server, but not connections from that server.
The naive approach would be to block TCP packets coming from the server. Unfortunately, TCP connections require packets going in both directions to work at all.
The solution is to block only the packets used to request a connection. These packets are called SYN packets (ok, technically they're packets with the SYN flag set, and the RST and ACK flags cleared, but we call them SYN packets for short). By disallowing only these packets, we can stop attempted connections in their tracks.
The `--syn' flag is used for this: it is only valid for rules which specify TCP as their protocol. For example, to specify TCP connection attempts from <IP_ADDRESS>:
-p TCP -s <IP_ADDRESS> --syn
This flag can be inverted by preceding it with a `!', which means every packet other than the connection initiation.
These extensions are automatically loaded if `-p udp' is specified. It provides the options `--source-port', `--sport', `--destination-port' and `--dport' as detailed for TCP above.
This extension is automatically loaded if `-p icmp' is specified. It provides only one new option:
followed by an optional `!', then either an icmp type name (eg `host-unreachable'), or a numeric type (eg. `3'), or a numeric type and code separated by a `/' (eg. `3/3'). A list of available icmp type names is given using `-p icmp --help'.
The other extensions in the netfilter package are demonstration extensions, which (if installed) can be invoked with the `-m' option.
This module must be explicitly specified with `-m mac' or `--match mac'. It is used for matching incoming packet's source Ethernet (MAC) address, and thus only useful for packets traversing the PREROUTING and INPUT chains. It provides only one option:
followed by an optional `!', then an ethernet address in colon-separated hexbyte notation, eg `--mac-source 00:60:08:91:CC:B7'.
This module must be explicitly specified with `-m limit' or `--match limit'. It is used to restrict the rate of matches, such as for suppressing log messages. It will only match a given number of times per second (by default 3 matches per hour, with a burst of 5). It takes two optional arguments:
followed by a number; specifies the maximum average number of matches to allow per second. The number can specify units explicitly, using `/second', `/minute', `/hour' or `/day', or parts of them (so `5/second' is the same as `5/s').
followed by a number, indicating the maximum burst before the above limit kicks in.
This match can often be used with the LOG target to do rate-limited logging. To understand how it works, let's look at the following rule, which logs packets with the default limit parameters:
# iptables -A FORWARD -m limit -j LOG
The first time this rule is reached, the packet will be logged; in fact, since the default burst is 5, the first five packets will be logged. After this, it will be twenty minutes before a packet will be logged from this rule, regardless of how many packets reach it. Also, every twenty minutes which passes without matching a packet, one of the burst will be regained; if no packets hit the rule for 100 minutes, the burst will be fully recharged; back where we started.
Note: you cannot currently create a rule with a recharge time greater than about 59 hours, so if you set an average rate of one per day, then your burst rate must be less than 3.
You can also use this module to avoid various denial of service attacks (DoS) with a faster rate to increase responsiveness.
Syn-flood protection:
# iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
Furtive port scanner:
# iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT
Ping of death:
# iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT
This module works like a "hysteresis door", as shown in the graph below.
rate (pkt/s) ^ .---. | / DoS \ | / \ Edge of DoS -|.....:.........\....................... = (limit * | /: \ limit-burst) | / : \ .-. | / : \ / \ | / : \ / \ End of DoS -|/....:..............:.../.......\..../. = limit | : :`-' `--' -------------+-----+--------------+------------------> time (s) LOGIC => Match | Didn't Match | Match
Say we say match one packet per second with a five packet burst, but packets start coming in at four per second, for three seconds, then start again in another three seconds.
<--Flood 1--> <---Flood 2---> Total ^ Line __-- YNNN Packets| Rate __-- YNNN | mum __-- YNNN 10 | Maxi __-- Y | __-- Y | __-- Y | __-- YNNN |- YNNN 5 | Y | Y Key: Y -> Matched Rule | Y N -> Didn't Match Rule | Y |Y 0 +--------------------------------------------------> Time (seconds) 0 1 2 3 4 5 6 7 8 9 10 11 12
You can see that the first five packets are allowed to exceed the one packet per second, then the limiting kicks in. If there is a pause, another burst is allowed but not past the maximum rate set by the rule (1 packet per second after the burst is used).
This module attempts to match various characteristics of the packet creator, for locally-generated packets. It is only valid in the OUTPUT chain, and even then some packets (such as ICMP ping responses) may have no owner, and hence never match.
Matches if the packet was created by a process with the given effective (numerical) user id.
Matches if the packet was created by a process with the given effective (numerical) group id.
Matches if the packet was created by a process with the given process id.
Matches if the packet was created by a process in the given session group.
This experimental module must be explicitly specified with `-m unclean or `--match unclean'. It does various random sanity checks on packets. This module has not been audited, and should not be used as a security device (it probably makes things worse, since it may well have bugs itself). It provides no options.
The most useful match criterion is supplied by the `state' extension, which interprets the connection-tracking analysis of the `ip_conntrack' module. This is highly recommended.
Specifying `-m state' allows an additional `--state' option, which is a comma-separated list of states to match (the `!' flag indicates not to match those states). These states are:
A packet which creates a new connection.
A packet which belongs to an existing connection (i.e., a reply packet, or outgoing packet on a connection which has seen replies).
A packet which is related to, but not part of, an existing connection, such as an ICMP error, or (with the FTP module inserted), a packet establishing an ftp data connection.
A packet which could not be identified for some reason: this includes running out of memory and ICMP errors which don't correspond to any known connection. Generally these packets should be dropped.
An example of this powerful match extension would be:
# iptables -A FORWARD -i ppp0 -m state ! --state NEW -j DROP
Now we know what examinations we can do on a packet, we need a way of saying what to do to the packets which match our tests. This is called a rule's target.
There are two very simple built-in targets: DROP and ACCEPT. We've already met them. If a rule matches a packet and its target is one of these two, no further rules are consulted: the packet's fate has been decided.
There are two types of targets other than the built-in ones: extensions and user-defined chains.
One powerful feature which iptables
inherits from
ipchains
is the ability for the user to create new chains, in
addition to the three built-in ones (INPUT, FORWARD and OUTPUT). By
convention, user-defined chains are lower-case to distinguish them
(we'll describe how to create new user-defined chains below in
Operations on an Entire Chain).
When a packet matches a rule whose target is a user-defined chain, the packet begins traversing the rules in that user-defined chain. If that chain doesn't decide the fate of the packet, then once traversal on that chain has finished, traversal resumes on the next rule in the current chain.
Time for more ASCII art. Consider two (silly) chains: INPUT
(the
built-in chain) and test
(a user-defined chain).
`INPUT' `test' ---------------------------- ---------------------------- | Rule1: -p ICMP -j DROP | | Rule1: -s <IP_ADDRESS> | |--------------------------| |--------------------------| | Rule2: -p TCP -j test | | Rule2: -d <IP_ADDRESS> | |--------------------------| ---------------------------- | Rule3: -p UDP -j DROP | ----------------------------
Consider a TCP packet coming from <IP_ADDRESS>, going to <IP_ADDRESS>. It
enters the INPUT
chain, and gets tested against Rule1 - no match.
Rule2 matches, and its target is test
, so the next rule examined
is the start of test
. Rule1 in test
matches, but doesn't
specify a target, so the next rule is examined, Rule2. This doesn't
match, so we have reached the end of the chain. We return to the
INPUT
chain, where we had just examined Rule2, so we now examine
Rule3, which doesn't match either.
So the packet path is:
v __________________________ `INPUT' | / `test' v ------------------------|--/ -----------------------|---- | Rule1 | /| | Rule1 | | |-----------------------|/-| |----------------------|---| | Rule2 / | | Rule2 | | |--------------------------| -----------------------v---- | Rule3 /--+___________________________/ ------------------------|--- v
User-defined chains can jump to other user-defined chains (but don't make loops: your packets will be dropped if they're found to be in a loop).
The other type of extension is a target. A target extension
consists of a kernel module, and an optional extension to
iptables
to provide new command line options. There are
several extensions in the default netfilter distribution:
This module provides kernel logging of matching packets. It provides these additional options:
Followed by a level number or name. Valid names are (case-insensitive) `debug', `info', `notice', `warning', `err', `crit', `alert' and `emerg', corresponding to numbers 7 through 0. See the man page for syslog.conf for an explanation of these levels. The default is `warning'.
Followed by a string of up to 29 characters, this message is sent at the start of the log message, to allow it to be uniquely identified.
This module is most useful after a limit match, so you don't flood your logs.
This module has the same effect as `DROP', except that the sender is sent an ICMP `port unreachable' error message. Note that the ICMP error message is not sent if (see RFC 1122):
REJECT also takes a `--reject-with' optional argument which alters the reply packet used: see the manual page.
There are two special built-in targets: RETURN
and
QUEUE
.
RETURN
has the same effect of falling off the end of a
chain: for a rule in a built-in chain, the policy of the chain is
executed. For a rule in a user-defined chain, the traversal continues
at the previous chain, just after the rule which jumped to this chain.
QUEUE
is a special target, which queues the packet for
userspace processing. For this to be useful, two further components are
required:
The following is a quick example of how to use iptables to queue packets for userspace processing:
With this rule, locally generated outgoing ICMP packets (as created with, say, ping) are passed to the ip_queue module, which then attempts to deliver the packets to a userspace application. If no userspace application is waiting, the packets are dropped.
# modprobe iptable_filter # modprobe ip_queue # iptables -A OUTPUT -p icmp -j QUEUE
To write a userspace application, use the libipq API. This is distributed with iptables. Example code may be found in the testsuite tools (e.g. redirect.c) in CVS.
The status of ip_queue may be checked via:
The maximum length of the queue (i.e. the number packets delivered to userspace with no verdict issued back) may be controlled via:
/proc/net/ip_queue
The default value for the maximum queue length is 1024. Once this limit is reached, new packets will be dropped until the length of the queue falls below the limit again. Nice protocols such as TCP interpret dropped packets as congestion, and will hopefully back off when the queue fills up. However, it may take some experimenting to determine an ideal maximum queue length for a given situation if the default value is too small.
/proc/sys/net/ipv4/ip_queue_maxlen
A very useful feature of iptables
is the ability to group
related rules into chains. You can call the chains whatever you want,
but I recommend using lower-case letters to avoid confusion with the
built-in chains and targets. Chain names can be up to 31 letters
long.
Let's create a new chain. Because I am such an imaginative fellow,
I'll call it test
. We use the `-N' or `--new-chain' options:
# iptables -N test #
It's that simple. Now you can put rules in it as detailed above.
Deleting a chain is simple as well, using the `-X' or `--delete-chain' options. Why `-X'? Well, all the good letters were taken.
# iptables -X test #
There are a couple of restrictions to deleting chains: they must be empty (see Flushing a Chain below) and they must not be the target of any rule. You can't delete any of the three built-in chains.
If you don't specify a chain, then all user-defined chains will be deleted, if possible.
There is a simple way of emptying all rules out of a chain, using the `-F' (or `--flush') commands.
# iptables -F FORWARD #
If you don't specify a chain, then all chains will be flushed.
You can list all the rules in a chain by using the `-L' (or `--list') command.
The `refcnt' listed for each user-defined chain is the number of rules which have that chain as their target. This must be zero (and the chain be empty) before this chain can be deleted.
If the chain name is omitted, all chains are listed, even empty ones.
There are three options which can accompany `-L'. The `-n' (numeric)
option is very useful as it prevents iptables
from trying to
lookup the IP addresses, which (if you are using DNS like most people)
will cause large delays if your DNS is not set up properly, or you
have filtered out DNS requests. It also causes TCP and UDP ports to
be printed out as numbers rather than names.
The `-v' options shows you all the details of the rules, such as the the packet and byte counters, the TOS comparisons, and the interfaces. Otherwise these values are omitted.
Note that the packet and byte counters are printed out using the suffixes `K', `M' or `G' for 1000, 1,000,000 and 1,000,000,000 respectively. Using the `-x' (expand numbers) flag as well prints the full numbers, no matter how large they are.
It is useful to be able to reset the counters. This can be done with the `-Z' (or `--zero') option.
Consider the following:
# iptables -L FORWARD # iptables -Z FORWARD #
In the above example, some packets could pass through between the `-L' and `-Z' commands. For this reason, you can use the `-L' and `-Z' together, to reset the counters while reading them.
We glossed over what happens when a packet hits the end of a built-in
chain when we discussed how a packet walks through chains earlier. In
this case, the policy of the chain determines the fate of the
packet. Only built-in chains (INPUT
, OUTPUT
and
FORWARD
) have policies, because if a packet falls off the end
of a user-defined chain, traversal resumes at the previous chain.
The policy can be either ACCEPT
or DROP
, for
example:
# iptables -P FORWARD DROP #


{{/* Add some debugging info - embed in site-sidebar.html to help you understand what is going on */}} {{ if or ( (eq .Site.Params.Debug true) (ne (getenv "HUGO_ENV") "production") ) }}


temperature climate COVID- regional dry tropical humidity transmission LCPC cases environmental virus local âˆ’. confirmed observed SARS-CoV- climates Table association statistical data number {border-style positive Mexico daily px;} #ffffff;} Image associated average conditions mean phase air high low onset precipitation temperate tempered factors temperatures weather .â€¯mm .â€¯Â°C LTR Meteorological epidemic evaporation imported spread states â€¯Â°C Fig. cols., monthly survival (as March SARS bars) countries effect outbreak relative state (.â€¯Â°C Monthly days seasonal values â€" ICPC TCPC analysis. areas evolution higher infectivity px; reported statistically temperature, {font-family CoV Dry, February However, Mexican cases, considered contagion coronavirus correlation effective effects epidemics font-size information initial laboratory possible regions respectively. resulted significant studies time ICPC, SARS, Temperate, Therefore, Total alongside capital cold conditions. deceases double; indoor infection influenza long lowest massive negative precipitations room shows specific total winter Doremalen Elsevier TCPC, Warm according account analysis border-color border-width city classification classified color condition contention database emerged environment factor highest humid lower max meteorological new onset. period previous related respiratory showed solid; surfaces transmission. variable wind {font-style {font-weight â€¯Â°C. > (LCPC) (green Chan Climate Experimental. High Jameel, Keshavarzi, KÃ¶ppen-Geiger Local MERS Mexico's Mexico, Moreover, SARS-CoV SHhPa Semi-warm Temperate Transmission absolute bold centre clusters concomitant contrast, controlled courier; did em; fastest favor favorable hospital infected min minimum negatively order others) outbreaks people positively previously pt;} quarantine range registered research resource respectively) respectively). results role season significance stable study type version viruses â€¯Â°C,


Rory Stewart launches London mayor election campaign - but he has no ideas
by Stefan BosciaRory Stewart today revealed he will rely on the general public to form much of his policy platform for his mayor of London campaign.
His London Speaks initiative will see Stewart and campaigners collect ideas from people throughout London on how they would improve the capital.
Read more: Rory Stewart falls behind in the race to become London mayor
Stewart said on a group call to campaigners last night that campaign volunteers will go door-to-door asking: “What would you change in your neighbourhood in the next week?”
He said the ideas generated in the drive will make up the core of his manifesto.
It comes after he said last week that he would create citizens’ assemblies if elected mayor next May to tackle issues such as knife crime.
Stewart said that hundreds of groups would be formed to discuss ideas generated from his London Speaks initiative.
“We would set up groups in each borough to discuss ideas [from the doorstop],” he said.
“Then we need to move on to see if we could apply the lessons from each neighbourhood to the rest of London.”
Read more: Rory Stewart: The ex-Tory in need of a London story
The former MP for Penrith and the Border announced in early October he would step down at the next election and stand for mayor of London as an independent.
The former international development secretary gained attention during the Conservative leadership campaign over the summer.
He finished fifth in the 10-person race, beating out more fancied candidates like foreign secretary Dominic Raab.
Stewart’s grass roots drive to become mayor begins in earnest next Monday, with the first London Speaks event.
“We are trying to build a movement,” Stewart told campaigners.
“It’s going to be tough and we’re going to have to be willing to take some risks.”
Read more: Rory Stewart signals potential fare rise as he slams TfL losses under Sadiq Khan
Stewart’s plans attracted scorn from some quarters of the Labour party.
A Labour source joked: “Excellent news that Rory seems to have discovered ‘canvassing’.”
Main image credit: Getty Images


Burnage crash: Teen dies after car hits building following police chase
The car slammed into a building during a police chase through Burnage, Manchester
by Matthew Dresch, https://www.mirror.co.uk/authors/matthew-dresch/A teenager has died and another man is fighting for his life after their car crashed into a building during a police chase.
Greater Manchester Police said officers attempted to stop a Ford Fusion at around 9.25pm in Burnage, Manchester, last night.
However, the vehicle failed to stop and crashed into a nearby building.
The two men in the car were taken to hospital with injuries believed to be life-threatening.
"One of them - believed to be a boy in his late teens - has since sadly died," police said.
"The other remains in hospital for treatment."
Police said the case has been referred to the Independent Office for Police Conduct, which had launched an investigation in the circumstances around the crash, in line with policy.
Detective Chief Superintendent Jon Chadwick, of Greater Manchester Police’s Professional Standards Branch, said: “I would like to extend our sincere condolences to the family of the person who has passed away following the collision in Burnage last night.
“The response to the incident is still ongoing and there are a number of road closures in place in the nearby area, with the scene likely to remain for some time.
“In line with our usual policy with incidents of this nature, we have made a referral to the Independent Office for Police Conduct and they have made a decision to launch an independent investigation into the circumstances surrounding the collision.”
Images from the scene show firefighters working to rescue the two men from the vehicle.


--- layout: default --- {{page.title}} by {{page.author}} {{ content }} Install It $ apm install {{ page.package_name }}
$ apm install {{ page.package_name }}


interface ProximityZone
The data object that contains configuration defined with ProximityObserver.ProximityZoneBuilder.
Author
Estimote Inc<EMAIL_ADDRESS>abstract val attachmentKey: String |
|
abstract val attachmentValue: String |
|
abstract val desiredMeanTriggerDistance: Double |
|
abstract val onChangeAction: (List<ProximityAttachment>) -> Unit |
|
abstract val onEnterAction: (ProximityAttachment) -> Unit |
|
abstract val onExitAction: (ProximityAttachment) -> Unit |


[Changing Point-Of-View]
Good work! Now, I will explain to you how you can change your point-of-view.
Try moving your mouse while pressing down the right button. You can set your viewpoint in any direction.
When you need to examine the area around your character, you can use this feature to change your viewpoint as needed.
Exit the Tutorial


Ocean [ar01], ocean, in The Outer Sea
Last updated Turn #116
Ocean [ar01], ocean, in The Outer Sea
------------------------------------------------------------------------
11: The Savvy Aardvark [ha5r], ship, 2 hulls, 1 rowing port, 6 sails,
11: 7% damaged, arrived from Ocean [ar02], owner:
11: Phantasm [n4b], Imperial Empire, earl, with two workers,
11: eight sailors
11: A storm batters the ship and causes some damage.
12: The Savvy Aardvark [ha5r], ship, 2 hulls, 1 rowing port, 6 sails,
12: 9% damaged, departed for Ocean [ar00].
Routes leaving Ocean:
North, to Ocean [aq01], 6 days
East, to Ocean [ar02], 6 days
South, to Ocean [as01], 6 days
West, to Ocean [ar00], 6 days
It is raining.


Here is my three-step plan to reinvigorate British politics.
Step One : The Liberal Democrats elect Chris Huhne as their next leader.
Step Two : A cabinet putsch in the Labour Party sees Geoff Hoon oust Gordon Brown.
Step Three : Returning to their roots, the Conservatives ditch David Cameron and replace him with a proper toff, Lord Home. As is the way with the aristocracy, his name is not simply pronounced as it looks, but as “Hume”.
Done and dusted.
The Hoouhmnes


{% extends 'nova/base.html' %}
{% load i18n %}
{% block title %}Create Network{% endblock %}
{% block page_header %}
{# to make searchable false, just remove it from the include statement #}
{% include "horizon/common/_page_header.html" with title=_("Create Network") %}
{% endblock page_header %}
{% block dash_main %}
{% include 'nova/networks/_create.html' with form=network_form %}
{% endblock %}


Go to the source code of this file.
Functions | |
| void | init_movement_ports () |
| void | init_timers () |
| void | left_pos_interrupt_init () |
| void | right_pos_interrupt_init () |
| void | set_motor_speed (unsigned char left_motor, unsigned char right_motor) |
| void | RIGHT_TURN () |
| void | LEFT_TURN () |
| void | FORWARD () |
| void | REVERSE () |
| void | STOP () |
| void | linear_distance_mm (unsigned int dist, short dir) |
| void | rotate_angle_deg (unsigned int angle, short dir) |
| void | perform_task (char *task) |
Variables | |
| unsigned long int | ShaftCountRight |
| Right shaft count. | |
| unsigned long int | ShaftCountLeft |
| Left shaft count. |
This file defines various functions for Firebird V movement, interrupts, motor speed and pin configurations
Copyright (c) 2010, ERTS Lab IIT Bombay<EMAIL_ADDRESS>All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
Source code can be used for academic purpose. For commercial use permission form the author needs to be taken.

Software released under Creative Commence cc by-nc-sa licence. For legal information refer to: http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode
| void FORWARD | ( | ) |
Move forward
| void init_movement_ports | ( | ) |
Initialize pins for Motors and PWM
| void init_timers | ( | ) |
Initialize pins for timer
| void left_pos_interrupt_init | ( | ) |
Initialize left position interrupt
| void LEFT_TURN | ( | ) |
Hard left turn
| void linear_distance_mm | ( | unsigned int | dist, |
| short | dir | ||
| ) |
Function to move the robot in a straight line for a given distance
| dist | Distance to move the robot (in millimeters) |
| dir | The direction to move the robot. 0 means forward and 1 means backward |
| void perform_task | ( | char * | task ) |
Function to decode the task and perform it
| task | The task string which is to be decoded and performed |
| void REVERSE | ( | ) |
Move backward
| void right_pos_interrupt_init | ( | ) |
Initialize right position interrupt
| void RIGHT_TURN | ( | ) |
Hard right turn
| void rotate_angle_deg | ( | unsigned int | angle, |
| short | dir | ||
| ) |
Function to turn the robot for a specified angle and direction
| angle | Angle to turn the robot (in degrees) |
| dir | The turn direction. 0 means right turn and 1 means left turn |
| void set_motor_speed | ( | unsigned char | left_motor, |
| unsigned char | right_motor | ||
| ) |
Assign speed to left and right motors
| left_motor | Speed of left motor |
| right_motor | Speed of right motor |
| void STOP | ( | ) |
Stop movement
| unsigned long int ShaftCountLeft |
Left shaft count.
| unsigned long int ShaftCountRight |
Right shaft count.


--- layout: post title: On the subject of the US... date: 2007-08-01 00:00:00 category: personal ---
...I'm going to be in San Francisco for a couple of days either side of our trip to the desert later this month. If you're in the vicinity and fancy catching up, leave a comment or drop me an email. I've only been to the US once before, so (the customs experience aside) I'm getting very excited :)


|
ActiveTcl User Guide
|
||
lset - Change an element in a list
lset varName ?index...? newValue
The lset command accepts a parameter, varName, which it interprets as the name of a variable containing a Tcl list. It also accepts zero or more indices into the list. The indices may be presented either consecutively on the command line, or grouped in a Tcl list and presented as a single argument. Finally, it accepts a new value for an element of varName.
If no indices are presented, the command takes the form:
lset varName newValue
or
lset varName {} newValue
In this case, newValue replaces the old value of the variable varName.
When presented with a single index, the lset command treats the content of the varBane variable as a Tcl list. It addresses the index'th element in it (0 refers to the first element of the list). When interpreting the list, lset observes the same rules concerning braces and quotes and backslashes as the Tcl command interpreter; however, variable substitution and command substitution do not occur. The command constructs a new list in which the designated element is replaced with newValue. This new list is stored in the variable varName, and is also the return value from the lset command.
If index is negative or greater than or equal to the number of elements in $varName, then an error occurs.
If index has the value end, it refers to the last element in the list, and end-integer refers to the last element in the list minus the specified integer offset.
If additional index arguments are supplied, then each argument is used in turn to address an element within a sublist designated by the previous indexing operation, allowing the script to alter elements in sublists. The command,
lset a 1 2 newValue
or
lset a {1 2} newValue
replaces element 2 of sublist 1 with newValue.
The integer appearing in each index argument must be greater than or equal to zero. The integer appearing in each index argument must be strictly less than the length of the corresponding list. In other words, the lset command cannot change the size of a list. If an index is outside the permitted range, an error is reported.
In each of these examples, the initial value of x is:
set x [list [list a b c] [list d e f] [list g h i]] => {a b c} {d e f} {g h i}
The indicated return value also becomes the new value of x (except in the last case, which is an error which leaves the value of x unchanged.)
lset x {j k l} => j k l lset x {} {j k l} => j k l lset x 0 j => j {d e f} {g h i} lset x 2 j => {a b c} {d e f} j lset x end j => {a b c} {d e f} j lset x end-1 j => {a b c} j {g h i} lset x 2 1 j => {a b c} {d e f} {g j i} lset x {2 1} j => {a b c} {d e f} {g j i} lset x {2 3} j => list index out of range
In the following examples, the initial value of x is:
set x [list [list [list a b] [list c d]] \ [list [list e f] [list g h]]] => {{a b} {c d}} {{e f} {g h}}
The indicated return value also becomes the new value of x.
lset x 1 1 0 j => {{a b} {c d}} {{e f} {j h}} lset x {1 1 0} j => {{a b} {c d}} {{e f} {j h}}
list, lappend, lindex, linsert, llength, lsearch, lsort, lrange, lreplace
element, index, list, replace, set
Copyright © 2001 by Kevin B. Kenny. All rights reserved. Copyright © 1995-1997 Roger E. Critchlow Jr.


Hi, my name is Ty Allen. I'm from Ingersoll, ON, which is a decent sized town, but I wouldn't blame you for not knowing it. I live here with my Mom and Dad, 3 sisters and 2 cats. I go to Fanshawe College and I am studying Interactive Media Design. I'm also pretty tall (193cm) which most people point out.
I have a few hobbies, but I like to play video games the most. Currently, I have been playing Super Smash Bros. Ultimate, Overwatch, Rivals of Aether and Xenoblade Chronicles. I enter tournaments for Smash bros, and Rivals which are both fighting games. I do pretty well in Smash tournaments, but I've only started entering tournaments for Rivals recently, so I'm not that great. Aside from gaming, I like to watch anime, read books and occasionally do art. I wish I was more into art, but it takes a lot of time which is taken up by school and my other hobbies.


To get the current US Futures data, index the FuturesChains property of the current Slice with the canonical Futures Symbol. Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your Future at every time step.
def OnData(self, slice: Slice) -> None: chain = slice.FuturesChains.get(self.future_symbol) if chain: for contract in chain: self.Log(f"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}")
public override void OnData(Slice slice) { if (slice.FuturesChains.TryGetValue(_futureSymbol, out var chain)) { foreach (var contract in chain) { Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}"); } } }
You can also iterate through all of the FuturesChain objects in the current Slice.
def OnData(self, slice: Slice) -> None: for canonical_symbol, chain in slice.FuturesChains.items(): for contract in chain: self.Log(f"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}")
public override void OnData(Slice slice) { foreach (var kvp in slice.FuturesChains) { var canonicalSymbol = kvp.Key; var chain = kvp.Value; foreach (var contract in chain) { Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}"); } } }
For more information about accessing Futures data, see Handling Data.


3 step CBS explorer ✔
① Theme
Choose a theme to display on the map. For more information see the CBS explanation of the themes.
② Classification
Choose a classification method to visualise your theme. You can choose between quantile, equal interval and diverging from the mean by standard deviation based steps.
Quantile
Equal interval
Diverging
③ Colorscheme
Pick a colorscheme you like, note that diverging maps require a different set of colors...
...and choose the number of classes you want to display on the map: and you are all set.
Result
You can change the opacity of your visualisation to see the map below:
Show labels on top of your map:


| Modifier and Type | Method and Description |
|---|---|
static ShardOperationFailedException[] |
ExceptionsHelper.groupBy(ShardOperationFailedException[] failures)
Deduplicate the failures by exception message and index.
|
| Modifier and Type | Method and Description |
|---|---|
static ShardOperationFailedException[] |
ExceptionsHelper.groupBy(ShardOperationFailedException[] failures)
Deduplicate the failures by exception message and index.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
ActionWriteResponse.ShardInfo.Failure |
| Modifier and Type | Method and Description |
|---|---|
protected ClearIndicesCacheResponse |
TransportClearIndicesCacheAction.newResponse(ClearIndicesCacheRequest request,
int totalShards,
int successfulShards,
int failedShards,
List<TransportBroadcastByNodeAction.EmptyResult> responses,
List<ShardOperationFailedException> shardFailures,
ClusterState clusterState) |
| Modifier and Type | Method and Description |
|---|---|
protected FlushResponse |
TransportFlushAction.newResponse(int successfulShards,
int failedShards,
int totalNumCopies,
List<ShardOperationFailedException> shardFailures) |
| Modifier and Type | Method and Description |
|---|---|
protected ForceMergeResponse |
TransportForceMergeAction.newResponse(ForceMergeRequest request,
int totalShards,
int successfulShards,
int failedShards,
List<TransportBroadcastByNodeAction.EmptyResult> responses,
List<ShardOperationFailedException> shardFailures,
ClusterState clusterState) |
| Modifier and Type | Method and Description |
|---|---|
protected RecoveryResponse |
TransportRecoveryAction.newResponse(RecoveryRequest request,
int totalShards,
int successfulShards,
int failedShards,
List<RecoveryState> responses,
List<ShardOperationFailedException> shardFailures,
ClusterState clusterState) |
| Constructor and Description |
|---|
RecoveryResponse(int totalShards,
int successfulShards,
int failedShards,
boolean detailed,
Map<String,List<RecoveryState>> shardRecoveryStates,
List<ShardOperationFailedException> shardFailures)
Constructs recovery information for a collection of indices and associated shards.
|
| Modifier and Type | Method and Description |
|---|---|
protected RefreshResponse |
TransportRefreshAction.newResponse(int successfulShards,
int failedShards,
int totalNumCopies,
List<ShardOperationFailedException> shardFailures) |
| Modifier and Type | Method and Description |
|---|---|
protected IndicesSegmentResponse |
TransportIndicesSegmentsAction.newResponse(IndicesSegmentsRequest request,
int totalShards,
int successfulShards,
int failedShards,
List<ShardSegments> results,
List<ShardOperationFailedException> shardFailures,
ClusterState clusterState) |
| Modifier and Type | Class and Description |
|---|---|
static class |
IndicesShardStoresResponse.Failure
Single node failure while retrieving shard store information
|
| Modifier and Type | Method and Description |
|---|---|
protected IndicesStatsResponse |
TransportIndicesStatsAction.newResponse(IndicesStatsRequest request,
int totalShards,
int successfulShards,
int failedShards,
List<ShardStats> responses,
List<ShardOperationFailedException> shardFailures,
ClusterState clusterState) |
| Modifier and Type | Method and Description |
|---|---|
protected UpgradeStatusResponse |
TransportUpgradeStatusAction.newResponse(UpgradeStatusRequest request,
int totalShards,
int successfulShards,
int failedShards,
List<ShardUpgradeStatus> responses,
List<ShardOperationFailedException> shardFailures,
ClusterState clusterState) |
| Modifier and Type | Method and Description |
|---|---|
protected UpgradeResponse |
TransportUpgradeAction.newResponse(UpgradeRequest request,
int totalShards,
int successfulShards,
int failedShards,
List<org.elasticsearch.action.admin.indices.upgrade.post.ShardUpgradeResult> shardUpgradeResults,
List<ShardOperationFailedException> shardFailures,
ClusterState clusterState) |
| Constructor and Description |
|---|
FieldStatsResponse(int totalShards,
int successfulShards,
int failedShards,
List<ShardOperationFailedException> shardFailures,
Map<String,Map<String,FieldStats>> indicesMergedFieldStats) |
| Modifier and Type | Class and Description |
|---|---|
class |
ShardSearchFailure
Represents a failure to search on a specific shard.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultShardOperationFailedException |
| Modifier and Type | Method and Description |
|---|---|
ShardOperationFailedException[] |
BroadcastResponse.getShardFailures()
The list of shard failures exception.
|
| Constructor and Description |
|---|
BroadcastResponse(int totalShards,
int successfulShards,
int failedShards,
List<? extends ShardOperationFailedException> shardFailures) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Response |
TransportBroadcastByNodeAction.newResponse(Request request,
int totalShards,
int successfulShards,
int failedShards,
List<ShardOperationResult> results,
List<ShardOperationFailedException> shardFailures,
ClusterState clusterState)
Creates a new response to the underlying request.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract BroadcastResponse |
TransportBroadcastReplicationAction.newResponse(int successfulShards,
int failedShards,
int totalNumCopies,
List<ShardOperationFailedException> shardFailures) |
| Modifier and Type | Method and Description |
|---|---|
static RestStatus |
RestStatus.status(int successfulShards,
int totalShards,
ShardOperationFailedException... failures) |
| Modifier and Type | Method and Description |
|---|---|
static void |
RestActions.buildBroadcastShardsHeader(XContentBuilder builder,
ToXContent.Params params,
int total,
int successful,
int failed,
ShardOperationFailedException[] shardFailures) |
| Modifier and Type | Class and Description |
|---|---|
class |
SnapshotShardFailure
Stores information about failures that occurred during shard snapshotting process
|
Copyright © 2009–2016. All rights reserved.


{{ _('Customize Firefox to fit exactly the way you browse with our growing catalog of mobile add-ons.')|fe(url='#') }}
{{ _('Dress up your Firefox with thousands of cool designs from GetPersonas.com.')|fe(url='http://www.getpersonas.com') }}
{{ _('Post messages to Twitter and other social networks from the Awesome Bar.') }}
{{ _('Remove ads and regain control of the way you view the web.') }}
{{ _('View sites by masquerading as an iPhone, Android, or desktop browser.') }}


To create a half a crossword puzzle, type (or paste) some words in the wordlist panel on the left.Click the gear on the left to customize the font, title and size of your puzzle.Or for a quick demo click here:
This popup can be closed by clicking the fancy × in the top right corner or by clicking outside the popup box!


The Auckland Bands Association (ABA) helps member brass bands with education, band competitions, solo competitions and encourages the formation of new bands in the Auckland and Northland areas of New Zealand. We are linked to BBANZ the Brass Bands Association of New Zealand - the national body for New Zealand brass bands.
From this website you can see news and events throughout the area, contact a local band, see contest results, apply to enter a contest, apply to be part of our highly successful youth programmes and seek helpful information from our team.


They say the earth has music for those who listen. I'm an ordinary being who likes to question things around me. There's a kind of inexplicable beauty when you lose yourself in the vast ocean of question that interest you, ranging from Competitive coding to Full stack web developing. In this context, it is important to imagine ideas in your head to gain perspective.


| |
NectarTECH will support S.F. Exchange Colocation
Facility with thier engineers facility onsite 24 hours a day,
7 days a week
NectarTECH Managed services are flexible and
affordable. Our staff will support any technologies, hardware,
platforms, and applications. We are in the professional service
business, providing system administrations, data-base administration,
network engineering, security administration as well as other
IT services, while employing a full time dedicated staff to
assist out clients.
NectarTECH Managed Services adds value in two
ways. First, we specialize in certain technologies, either
companywide or by employing individuals with specialized skills
and experience. Second, we implement a variety of processes
and systems that are shared by all our customers. These systems
include those for monitoring a web site's uptime and performance,
as well as customer resource management components such as
call-center and ticket tracking systems.
However the real benefit of using NectarTECH
Managed services shows up later, when you decide to enhance
your site by adding new features and systems that you couldn't
have anticipated at the time you selected us and designed
your initial configuration. If your online business tend to
live on cutting edge of web and Internet technologies, you
will do well with NectarTECH, because we can commit to this
type of flexibility.
|
Databases |
|
Streaming content |
|
Security |
|
Ultimate Availability |
|
Specific application packages |
|


Accounting
Manufacturing
SRM
CRM
Facility
HR
Pierre DUPONT
Profile
Settings
Déconnexion
Main
Parties
My Communications
Communications
Visits
Logged-in Users


*{IE compatibility tag - idea take from http://stackoverflow.com/questions/25557299/internet-explorer-11-disable-display-intranet-sites-in-compatibility-view-via}*


Home
About
Products
Blog
Contact
Contact Us
Comments, concerns, questions? Don't hesitate to contact us!
Submit


'Discoloured' tap water reported on Pulau Tekong; SAF servicemen getting water from alternative sources: MINDEF
by Aqil Haziq MahmudSINGAPORE: Discoloured tap water was reported at some parts of the Basic Military Training Centre (BMTC) on Pulau Tekong on Wednesday morning (Nov 20), the Ministry of Defence (MINDEF) said.
"BMTC is working with (national water agency) PUB to restore potable water supply at the earliest opportunity," MINDEF said on Thursday in response to queries sent by CNA on Wednesday.
PUB told CNA on Thursday it received reports of discoloured tap water at BMTC at 7.30am on Wednesday, adding that its officers "immediately" went on-site to flush out the water network.
"Essential water needs for servicemen, including drinking water and food preparation, have been met by alternative sources within BMTC and PUB-deployed water wagons," MINDEF said.
The water wagons provide temporary water supply to "affected users", PUB elaborated.
"PUB has collected water samples for testing and is currently investigating the cause of the incident," the agency stated.
MINDEF said the safety and well-being of servicemen is of "paramount importance".
In March 2018, then-Second Minister for Defence Ong Ye Kung told Parliament that all full-time national servicemen, except those in elite and support vocations, will undergo BMT on Pulau Tekong.


3.7.3. Disk Encryption¶
The default ISO and kickstart files in SIMP now encrypt the first
physical volume if the simp_disk_crypt
option is provided at the boot
command line.
Warning
The system is set to automatically decrypt at boot! This means that the password is embedded in the initrd file.
Note
The /boot
directory is not encrypted, since that would prevent the
system from booting automatically.
<IP_ADDRESS>. Method¶
When enabled, SIMP implements disk encryption, with automatic decryption, so that users have the option to use their own keys in the future. Alternatively, users may remove the system local keys and require that a password be entered at each boot.
The primary goal of providing automatic decryption was to give users a clean and seamless experience when using the initial system. It is understood that this is not best practice since automatic decryption of the disks requires the system to embed the password files in the system initrd.
Disk encryption was not enabled by default for two reasons. The first is that it can take an unacceptable amount of time to build a system if enough entropy is not present. The second is that a lot of hardware contains the ability to encrypt the disk at that level. If this is present, the utility of a second layer of disk encryption is not necessarily warranted or a good idea.
<IP_ADDRESS>. Implementation¶
The system keys are referenced in /etc/crypttab
and, by default, reside at
/etc/.cryptcreds
. At build time, these files are copied into all
initrd files present on the system. This ensures that all kernels can
successfully boot the system.
The /etc/dracut.conf
file is also updated to ensure that any new kernel
loads will be able to boot successfully.
Warning
The /etc/.cryptcreds
file is encrypted when the system is off.
However, a copy is in the unencrypted initrd files in /boot
and
should not be considered secure from physical access to the raw disk image.
Note
Please be aware that all characters in the /etc/.cryptcreds
file are
part of the password. The lack of a trailing newline is very important.
<IP_ADDRESS>. Replacing the Current Password¶
Note
The underlying system uses LUKS, so any usage outside of this document should refer to the LUKS implementation that matches your system version.
To change the password, you will need to perform the following steps.
- Back up the original password file
- If something goes amiss, you’re seriously going to need this
- Get the UUID of your partition
- This will be in the
/etc/crypttab
file. You’ll want the entireUUID=<uuid>
string
- Create the new password
Remember that this needs to be exactly what you will use. If you ever expect to type this at the command line, don’t forget to strip your trailing spaces.
#!/usr/bin/python import sys import random import string # The length of the new password length = 1024 # What the password should consist of charset = string.lowercase+string.uppercase+string.digits passfile = open('/etc/.cryptcreds.new','w') passfile.write("".join(random.choice(charset) for i in range(length)))
- Update the key
There is a faster way to do this in EL 7, but this method works on both systems
$ cryptsetup luksAddKey --key-slot 1 --key-file /etc/.cryptcreds UUID=<uuid> /etc/.cryptcreds.new $ cryptsetup luksKillSlot --key-file /etc/.cryptcreds 0 $ cryptsetup luksAddKey --key-slot 0 --key-file /etc/.cryptcreds.new UUID=<uuid> /etc/.cryptcreds.new $ cryptsetup luksKillSlot --key-file /etc/.cryptcreds.new 1 # Only do this step if the previous steps succeeded! $ mv /etc/.cryptcreds.new /etc/.cryptcreds
- Update your initrd files
You want to make sure to update all of your initrd files since you’ll want to be able to boot from any kernel.
for x in `ls -d /lib/modules/*`; do installed_kernel=`basename $x` dracut -f "/boot/initramfs-${installed_kernel}.img" $installed_kernel done
<IP_ADDRESS>. Removing the Password File¶
If you wish to remove the password file from your system, you will need to perform the following steps:
- Back up the password file!
- If you lose this, you won’t be able to get into your system after reboot
- Using your favorite text editor, remove the install_items line in /etc/dracut.conf that contains the reference to /etc/.cryptcreds
- Remove the /etc/.cryptcreds file from the system
- Update your initrd files
You want to make sure to update all of your initrd files since you’ll want to be able to boot from any kernel.
for x in `ls -d /lib/modules/*`; do installed_kernel=`basename $x` dracut -f "/boot/initramfs-${installed_kernel}.img" $installed_kernel done


class Transcoder
Public Class Methods
available()
click to toggle source
Return all currently available transcoder hosts.
# File app/models/transcoder.rb, line 11 def self.available all.select { |t| t.available? }.shuffle end
Public Instance Methods
available?()
click to toggle source
Check if this transcoder is currently available.
# File app/models/transcoder.rb, line 16 def available? @available ||= begin response = RestClient::Request.execute( method: :get, url: build_jobs_url, timeout: EBU::NETWORK_TIMEOUT, open_timeout: EBU::NETWORK_TIMEOUT ) response.code == 200 ? true : false rescue Timeout::Error => e false rescue => e false end end
get_progress(job)
click to toggle source
# File app/models/transcoder.rb, line 67 def get_progress(job) begin response = RestClient::Request.execute( method: :get, url: [build_jobs_url, job.codem_id].join('/'), timeout: EBU::NETWORK_TIMEOUT, open_timeout: EBU::NETWORK_TIMEOUT ) if response.code == 200 && obj = JSON.parse(response.to_str) obj["progress"] else 0.0 end rescue Timeout::Error => e 0.0 rescue => e 0.0 end end
send_job(job)
click to toggle source
Send a job to the transcoder.
This will attempt to directly create a job on the transcoder. If the
transcoder did not accept the job it will return nil
.
Otherwise it will return the Codem ID that was assigned to it.
Examples¶ ↑
# t = Transcoder.first # t.send_job VariantJob.first => "4db5881df91da078bb7f9d9092b7c2cc26b29d58"
# File app/models/transcoder.rb, line 42 def send_job(job) begin response = RestClient::Request.execute( method: :post, url: build_jobs_url, payload: job.to_codem_json, timeout: EBU::NETWORK_TIMEOUT, open_timeout: EBU::NETWORK_TIMEOUT ) if response.code == 202 if (obj = JSON.parse(response.to_str)) obj["job_id"] else raise "Job #{job.id} was created on transcoder #{self.id}, but no job ID was returned." end else nil end rescue Timeout::Error => e nil rescue => e nil end end


You style in a language called CSS, which is completely different from HTML. You can see it in that style="text-decoration:underline;" bit before. CSS can do all kinds of things. It can make elements big, small, blink, shadowed, change color when you hover over them, and much, much more.
Let's say I wanted all of my div elements to be underlined. You've seen one way to do that already:

Hamlet's Soliloquoy, by Bill Shakespeare.

To be, or not to be: that is the question.

If I have a lot of div elements, writing "text-decoration:underline;" in all of them is going to be a huge pain. Plus, if I decide I don't want them underlined I'd have to go through and delete every occurrence of "text-decoration:underline;"
Fortunately, CSS lets us use stylesheets. ('CSS' stands for Cascading Style Sheets
) A stylesheet looks like this:

This takes every div element and underlines it. Now I only need to change one piece of code to change the style of every div.
The div is called a CSS selector because it selects to which elements the CSS rules are being applied. A rule consists of a property and a value. In this case there's only one selector with one rule, but you can have any number. The format's always the same:


The tal:condition
attribute
The tal:condition
attribute is used to conditionally render an element and its descendents.
The attribute value is a TALES expression and if the expression result is 'truthy' then the element and its content/descendents are rendered.
If the expression result is not 'truthy' then the element, its content & descendents are removed from the DOM and not rendered or further processed by ZPT.
Aborting a condition attribute
If the result of an expression in a tal:condition
attribute value is an instance of AbortZptActionToken
, such as via the root context default
, then a tal:condition
attribute will behave as if it were not present.
In other words, the element and content/descendents will be rendered.
Further processing is halted if the expression is not 'truthy'
If the condition expression is not 'truthy' and the element & contents/descendents is to be removed then additionally, further processing of TAL attributes upon that element is also halted. Usually this is not an issue, because the element will be removed anyway, so further manipulation is irrelevant.
Be aware that global variable definitions present upon the same element will also not be processed in this case though; this could feasibly have an impact upon other parts of the document. It is probably best not to place global definitions upon elements that have condition attributes, so as to avoid this potentially-confusing scenario.
Example
In this example, the first

element will be rendered but the second will not.
This is because a non-empty-string is truthy but a null reference is not.

This text will be displayed.

This text will not be displayed.


HOME
COMPANY PROFILE
OUR BUSINESS
DOWNLOAD
CONTACT
Download
Download
<
Contact Us
For more infomation call
(888) 988-8839
Or Fax to
(951) 547-6886
Index
Company Profile
Download
DOWNLOAD
Resource
Company Brochure
Product Picture Album
Price List
Technical Manual
Certification information
More


Introduction
GPS enabled devices, such as smart phones, have gained large popularity in the last few years. It allows people to record their outdoor activities through GPS trajectories, which enables researchers to infer further knowledge about the moving behavior of mobile users [8]. An important topic in analyzing GPS data is the identification of significant or interesting places visited by users [1] because if we extract them, we can know each user well and this will allow us to have a better prediction on the user’s next location.
Generally, a prediction problem involves using past observations to predict or forecast one or more possible future observations. The goal is to guess about what might happen in the future. Knowing the future can impact our decisions today so we have a great interest in predicting it.
In this project we tried first working on finding an algorithm that can help us define the points of interest of the users we have in the dataset. For that we implement an algorithm that can identify the users stop points.
Next step was predicting the next location of the users to do that we used different approaches (Markov chains, Random forest and Recurrent neural network).
KEYWORDS: GPS Trajectory; Clustering algorithm; Points of interests (POI); Prediction; Markov chain; Random Forest; DBSCAN; HDBSCAN.
Motivation
With the popularity of smartphones and other equipment that can be used to record locations via the Global Navigation Satellite System (GNSS) [8], capturing and recording trajectory data based on such equipment becomes more convenient. The smartphone for exemple combines different sophisticated features. It allows users to keep pictures, memories, personal info, health [9,10] etc. And with each use to some application we can get the user GPS coordinates at a period of time [11].
So why don’t we use this data to better understand the users? If we get to know the next step of each individual we can for example suggest some near restaurants, shops and places they used to go to, or notify them if someone they know is close to where they are.
It could be also beneficial for the police department [12], it can help them identify criminals’ places or finding missing people and more likely it can also help people with Alzheimer’s, by notifying their relatives about their places.
Problem statement
Mobility is part of human’s daily life. We move from one place to another for different reasons. For example we go to a certain place to work and to another place to meet people.
Mobility patterns of users have been studied intensively. The ubiquity of mobile phones with their embedded sensors and available applications opened new possibilities both for academia and industry to study human mobility patterns [2,3].
In this project the main objective is to extract the useful data from different users trajectories in order to predict their next locations afterwards.
Presentation of our data
In this project we are working on a time series dataset (see Fig. 1) that contains 288 user GPS coordinates of three month (March, April, May). These users lives in Spain.
The data was collected whenever the users are connected to their accounts.
Figure 1. Time series database of GPS coordinates.
We can see in Figure 2 the representation of 10\% of the users on the map. As we can notice the users are so active inside and outside of Spain. In Figure 3 we see the GPS representation of a user on the map.
Figure 2. Represantation of 10\% of the users population we have on the map.
Figure 3. Representation of one user GPS coordinates on the map.
Methodology
The first objective is to extract the points of interest (POIs) which represent the locations that the individual visit frequently (Home, Place of work, gym \dots, etc), of the different users we have in the dataset after grouping it by users so that it would be easy to analyse them separately.
Working on a real world data means the existence of noise the first two clustering algorithms (K-means and GMM) as we can see in Figures 4 y 5 they weren’t capable of eliminating the noise in our data, because in these algorithms each point must belong to one cluster which is not convenient for our data, not all the points are part of a location some points shows us only the trajectory that the user did to get to the desired place so we can say that these two approaches are not able to differentiate between a stop point and a trajectory.
Figure 4. Graphic representation of a user GPS coordinations after k-means clustering.
Figure 5. Graphic representation of a user GPS coordinations after GMM clustering.
So we had to look for other approaches that can eliminate the noise. The first algorithm we tried was DBSCAN [6], but it wasn’t easy for us to estimate the best parameters, especially that each user has it’s proper trajectory and also the density of the points wasn’t unified for the same user, some group of points are so close to each other then others.
For that the next algorithm we used was HDBSCAN [5] because in this algorithm the threshold is not fixed so it’s capable of identifying clusters of different densities. This algorithm gives us some good results but after implementing the clusters on the map we can see that for some users the clusters didn’t include just the meaningful points but also some of the noise (the trajectory of the user) as we can see in Figure 4.
Figure 6. Implementation of a user clusters on the map after removing the noise with HDBSCAN
For that we needed to implement an algorithm that can identify the users stop points, which tells us where and when a user has stopped (stayed). It consists of a timestamp, a user identifier as well as longitude and latitude coordinates. It also has two additional variables: t_start and t_end indicating the start-time and end-time of the stop (see Figure 5).
The stop location extraction algorithm [7] has two parameters which are dependent on the application:
$\bullet \quad $ Roaming distance: defines how far a user is allowed to roam to still be considered part of the stop location (dashed orange line
$\bullet \quad $ Stay duration: specifies the minimum amount of time a user has to stay within the roaming distance for his position to be considered as being part of a particular stop location.
Figure 7. Output of the stop algorithm.
Figure 8. Representation of the stop points of the users on the map.
The next step is to aggregates stop locations in close proximity of each other to know where and how often a user has stopped at a destination. The destination consists of a timestamp, a user identifier as well as latitude and longitude coordinates. In addition, the visitation count denotes the number of stops at a particular destination and cluster_assignment identifies the destination itself.
What we are actually interested in is the destination where a user has stopped and not necessarily the exact GPS position recorded. For instance, the group of stop locations surrounding a building should be regarded as one destination. In other words, we need to cluster or aggregate the stop locations into destinations (see Figure 7).
To aggregate the stop locations into destinations we use Scipy’s hierarchical clustering functions (see Figure 8). For our application there are two important parameters: \emph{The linkage parameter} defines how the clusters are formed. \emph{The distance parameter} specifies within what spatial distance stop locations are to be considered of the same cluster.
Figure 9. Output of destination algorithm
To get medoid for each destination, now that we have assigned each stop location to a destination, we want to have only one point representing each destination.
To have one representative point per cluster, we calculate the medoid of the stop locations within each destination. We also calculate the number of stop locations at each destination, which is useful for ranking destinations based on visitation counts.
Figure 10. Representation of the users destinations on the map.
Next step is to predict n-next steps to do that we use two different approaches the markov chains and random forest. But before that we need to split our data into two parts train which we give 90\% of our data and the rest(10\%) to the test.
After running the hidden markov chains model on our data we get to predict the next clusters of each user. We are predicting the clusters because each cluster represent a POI.
After training our model we calculate the accuracy of it for each user and to get the general accuracy score we get the mean score and it was 49\%. that means that our model is not that good at predicting the next location.
So the next approach we used is random forest which is a supervised learning algorithm that can be used for class classification or regression (prediction).
The accuracy of Random forest model is 94\% which shows that the model is doing well at predicting the users next locations.
References
[1] S. Gambs and M.O. Killijian, Next Place Prediction using Mobility Markov Chains, MPM’12, April 10, 2012, Bern, Switzerland.
[2] Z. Fu, Z. Tian, Y. Xu and C. Qiao, A Two-Step Clustering Approach to Extract Locations from Indi- vidual GPS Trajectory Data, ISPRS Int. J. Geo-Inf. Vol. 5, 166, 1–17, 2016. doi:10.3390/ijgi5100166
[3] N. Palmius and A. Tsanas and K. E. A. Saunders and A. C. Bilderbeck and J. R. Geddes and G. M. Goodwin and M. De Vos, Detecting Bipolar Depression From Geographic Location Data, IEEE Trans Biomed Eng., Vol. 64, No. 8, 1761–1771, 2017. doi: 10.1109/TBME.2016 2611862
[4] J. Busk and M. Faurholt-Jepsen and M. Frost and J. E. Bardram and L. Vedel Kessing and O. Winther, Forecasting Mood in Bipolar Disorder From Smartphone Self-assessments: Hierarchical Bayesian Approach, JMIR Mhealth Uhealth, Vol. 8, No. 4, 1–14, 2020
[5] P. Widhalm and P. Nitsche and N. Brandie, Transport mode detection with realistic Smartphone sensor data. In Proceedings of the International Conference on Pattern Recognition, Tsukuba, Japan, 11–15 November 2015; IEEE: Piscataway, NJ, USA, 2012; 573–576.
[6] A. Bogomolov and B. Lepri and J. Staiano and N. Oliver and F. Pianesi and A. Pentland, Once Upon a Crime: Towards Crime Prediction from Demographics and Mobile Data. In Proceedings of the 16th International Conference on Multimodal Interaction, Istanbul, Turkey, 12–16 November 2014; ACM: New York, NY, USA, 2014; 427–434.
[7] V. Bogorny, C. Renso, A.R. de Aquino, F. de Lucca Siqueira and L.O. Alvares, Constant–A Con- ceptual Data Model for Semantic Trajectories of Moving Objects, Trans. GIS Vol. 18, 66–88, 2014.
[8] L. Xiang, M. Gao and T. Wu, Extracting Stops from Noisy Trajectories: A Sequence Oriented Clustering Approach, ISPRS Int. J. Geo-Inf. Vol. 5, 29, 1–18, 2016. doi:10.3390/ijgi5030029
[9] Ester M., Kriegel H.P., Sander J. and Xu X. A density-based algorithm for discovering clusters in large spatial databases with noise. KDD-96 Proceedings, 226–231, 1996
[10] Campello R.J.G.B., Moulavi D., Sander J. Density-Based Clustering Based on Hierarchical Density Estimates. In: Pei J., Tseng V.S., Cao L., Motoda H., Xu G. (eds) Advances in Knowledge Discovery and Data Mining. PAKDD 2013. Lecture Notes in Computer Science, Vol. 7819. Springer, Berlin, Heidelberg, 2013.
[11] R. Hariharan and K. Toyama. Project Lachesis: Parsing and Modeling Location Histories. KDD- 96 Proceedings, In: Egenhofer M.J., Freksa C., Miller H.J. (eds) Geographic Information Science. GIScience 2004. Lecture Notes in Computer Science, Springer, Berlin, Heidelberg, Vol. 3234, 106– 124, 2004
[12] Camacho-Lara, S. Current and Future GNSS and Their Augmentation Systems In: Handbook of Satellite Applications; Springer Science and Business Media LLC: Berlin, Germany, 2013, pp. 617?654.


Stay aware of the latest information on the COVID-19 outbreak by reading updates available on this website and through your national and local public health authority.
View an up-to-date map and statistics of the spread of Covid-19 with the most recently upated stats from reliable sources.
Pen down your thoughts about the pandemic


But Ant said, “I am collecting food for the winters and I recommend you to do the same.”
Grasshopper said, “We have got plenty of food at present.Why bother about winter now?”.
The Ant ignored him and went on its way.
When the winter came grasshopper had no food to eat.
He saw that Ant and begged for food, but she said, “When I worked hard, you enjoyed”.
Then grasshopper learned his lesson the hard way.


Data Scientist with four years of data analysis experience. Currently pursuing a certificate course in Data Science (University of Washington). Four projects in Astronomy research with two research publications that stemmed from using data analysis and programming. Skilled in Python, SQL, Statistics and Data Visualisation. Strong research background with a Master's Degree focused on Astronomy and Astrophysics led to analytical and critical thinking ability and taught complex problem solving skills. Love to learn new things. Passionate about data and love to find patterns in it.
● Assisted the academic committee in development of theoretical and data analysis questions in Astronomy for the 10th International Olympiad on Astronomy & Astrophysics (IOAA 2016), which improved problem designing and solving capabilities. ● Conducted several sky observation sessions that helped to gain prowess in oral communication.
● Gained experimental designing skills by assisting in the design, standardization and testing of 430 experimental setups for the 46th International Physics Olympiad (IPhO 2015).
The three-course certificate program is meant to teach cutting-edge tools to prepare data sets, analyse it and extract meaning from it. The program involves using statistics, machine learning algorithms and data visualization techniques to real life data scenarios.
Estimated the amount of Helium present in 38 Sun-like stars by developing four different sets of computational models, which lead to an agreement within 1σ for all the stars and great promises to determine these parameters more precisely in the era of upcoming space missions
Calculated the locations of significant zones in 67 stars using Monte Carlo method, which was later used to estimate helium abundances in Sun-like stars (mentioned above) and do computational modeling of solar-type stars
Data Analysis of complex data on Novae and nova-like variables to classify the objects and determine the elemental abundance in them using data visualization and statistical techniques.


Windows Application Verifier
Here. "The Windows Application Verifier (AppVerifier) examines executable programs for common application quality issues. Running this tool on an application aids a tester in detecting issues dealing with stability, security, and compatibility."
This tool should be required for all QA departments, just like FxCop is required for all .NET developers.
[staff.develop.com/candera/weblog2]


Rockets hit military base near Baghdad airport
Six 'fighters' wounded in attack with no claim of responsibility, military says.
Four Katyusha rockets struck a military base next to Baghdad International Airport in Iraq's capital on Monday wounding "six fighters", the military said.
Security forces found a rocket launcher and several rockets after a search of the area, it said in a statement.
There was no immediate claim of responsibility.
It was the latest in a spate of rocket attacks on military installations. On Thursday, two Katyusha rockets landed inside Balad airbase, but there were no casualties or damage reported from the attack.
The Balad base hosts US forces and contractors and is located about 80 kilometres (50 miles) north of Baghdad.
On Tuesday, five rockets hit the Ain al-Asad airbase, which hosts US forces in Anbar province in western Iraq. No casualties were reported.