{% extends "web_app/base.html" %} {% load static %} {% block content %}
Whether you need daily, weekly, or monthly maintenance services, let us help you keep your lawn and flower beds in their best light.
READ MOREWe specialize in Landscape Design, Artificial Turf, Grass Installation, Tree removal, Drainage Installation, plant installation and more.
rEAD MOREDecks, Patios, Outdoor Kitchens, Bars, Entertainment Build Outs, Arbors, Gazebos, Pergolas, Fountains, Waterfalls.
rEAD MORERemodeling, Renovations, Kitchens, Bathrooms, Additions, Construction Build Outs, Floors, Painting, Walls, Ceilings, Cabinets, Countertops.
rEAD MORE


{{#markdown}}
Now that we have full data binding from server to client, let's interact with the data and see the updates in action.
In this chapter you will add the ability to insert a new party and delete an existing one from the UI.
First, let's create a simple form with a button that will add a new party.
# Component Architecture
In Angular 2, it's common practice to break your app into smaller components. Let's make a new component called `parties-form`, and put it inside it's own directory with the same name.
__`client/parties-form/parties-form.ts`:__
import {Component, View} from 'angular2/angular2';
@Component({
selector: 'parties-form'
})
@View({
templateUrl: "client/parties-form/parties-form.ng.html"
})
export class PartiesForm {}
Notice that we are exporting the class `PartiesForm` using ES6 module syntax. This is how files and dependencies can be passed to each other without the use of script tags in the view.
When data is `export`ed, it must also be `import`ed on the other end. We'll get to that soon.
Also note that we aren't bootstrapping this component, as it is going inside of the bootstrapped root component.
Inside `parties-form/parties-form.ng.html`, add the following form:
__`client/parties-form/parties-form.ng.html`:__
Link to the parties-form component in `index.ng.html`
__`client/index.ng.html`:__
{{dstache}}party.name}}
{{dstache}}party.description}}
And finally let your Socially Component know it should import and use the `parties-form` component.
__`client/app.ts`:__
import {Component, View, NgFor, bootstrap} from 'angular2/angular2';
import {PartiesForm} from 'client/parties-form/parties-form';
...
@View({
templateUrl: "client/index.ng.html",
directives: [NgFor, PartiesForm]
})
class Socially () { ... }
}
Again, first we import the class, then we add it to our list of View directives.
# Angular 2 Forms
Now let's get back to the form and make it functional.
In Angular 2, there are two main ways to create forms: we will address 'model-driven' forms in this step, but we'll also look at `template-driven` forms in step 06.
## Model Driven Forms
First up, import the form directives & controls.
__`client/parties-form/parties-form.ts`:__
import {Component, View} from 'angular2/angular2';
import {FORM_DIRECTIVES, Control, ControlGroup, Validators} from 'angular2/angular2';
@Component({
selector: 'parties-form'
})
@View({
templateUrl: "parties-form/parties-form.ng.html",
directives: [FORM_DIRECTIVES]
})
export class PartiesForm {}
}
By now you should have the hang of it. `import`, and add it to the View directives.
Next, we can construct our form controls. For controls give you access to useful form features such as validators and much more.
__`client/parties-form/parties-form.ts`:__
export class PartiesForm {
constructor() {
this.partiesForm = new ControlGroup({
name: new Control(''),
description: new Control('')
});
}
We are binding `this.partiesForm` here to a [Control Group](https://angular.io/docs/js/latest/api/forms/ControlGroup-class.html). Think of a control group as a wrapper for a group of form controls.
Alternatively, form controls can be created one at a time using Control, but it's easier to create them as a group.
this.partiesForm.controls.name = new Control('');
is the same as
this.partiesForm = new ControlGroup({
name: new Control('')
});
The first value provided is the initial value for the form control. For example, `this.name = new Control('Bob')` would initialize the form value to 'Bob', or `this.name = new Control()` would initialize the value to null.
this.partiesForm.value;
> { name: '', description: ''}
We could also access the control values individually.
this.partiesForm.controls.name.value;
> ''
A control can also take a Validator, which binds to the form. Name & description are both required, so let's specify that.
__`client/parties-form/parties-form.ts`:__
constructor() {
this.partiesForm = new ControlGroup({
name: new Control('', Validators.required),
description: new Control('', Validators.required)
});
The required validator here specifies that the form isn't valid if name or description are empty.
this.partiesForm.value = '';
this.partiesForm.valid
> false
First things first, let's bind the control group to the form and the controls to the input values.
__`client/parties-form/parties-form.ng.html`:__
Now each time the user types inside these inputs, the value of the partiesForm and its controls will be automatically updated. Conversely, if `this.partiesForm.value` is changed outside of the HTML, the input values will be updated accordingly.
Alternatively we can bind to the form by using a local variable in the template, indicated by the '#' symbol.
__`client/parties-form/parties-form.ng.html`:__
In Angular 2, events are indicated by the round bracket () syntax. Here we are telling Angular to call a method `add` on submit and pass in the value of the form, `f`. Let's add the add method to our PartiesForm class.
__`client/parties-form/parties-form.ts`:__
class PartiesForm {
constructor() { ... },
add(party) {
// validate if the form is valid
if (this.partiesForm.valid) {
// insert parties (insecure way)
Parties.insert({
name: party.name,
description: party.description
});
//reset input values to empty strings
this.partiesForm.controls.name.updateValue('');
this.partiesForm.controls.description.updateValue('');
}
}
}
Open a different browser, fill out the form, submit and see how the party is added on both clients. So simple!
> As a note, if you are dealing with more complex forms, use [Form Builder](https://github.com/angular/angular/blob/master/modules/angular2/src/forms/form_builder.ts), which further simplifies the use of Controls & ControlGroups.
## (click)
Now, let's add the ability to delete parties.
Let's add an X button to each party:
__`client/index.ng.html`:__
{{dstache}}party.name}}
{{dstache}}party.description}}
Here again, we are binding an event to the class context and passing in the party as a parameter.
Let's go into the class and add that function.
Add the function inside the Socially class in `app.ts`:
__`client/app.ts`:__
constructor() {...}
remove(party){
Parties.remove(party._id);
}
The Mongo Collection Parties has a function called 'remove'. We search for the relevant party by its identifier, `_id`, and delete it.
And this is how the class should now look:
__`client/app.ts`:__
class Socially {
constructor() {
Tracker.autorun(zone.bind(() => {
this.parties = Parties.find().fetch();
}));
}
remove(party) {
Parties.remove(party._id);
}
}
Now try to delete a few parties and also watch them being removed from other browser clients.
# Summary
So now you've seen how easy it is to manipulate the data using Angular's powerful directives and sync that data with Meteor's powerful Mongo.collection API.
{{/markdown}}


|
Elektra
0.8.21
|
This plugin is a filter plugin allowing Elektra to encrypt values before they are persisted and to decrypt values after they have been read from a backend.
The idea is to provide protection of sensible values before they are persisted. This means the value of a key needs to be encrypted before it is written to a file or a database. It also needs to be decrypted whenever an admissible access (read) is being performed.
The users of Elektra should not be bothered too much with the internals of the cryptographic operations. Also the cryptographic keys must never be exposed to the outside of the crypto module.
The crypto plugin supports different libraries as provider for the cryptographic operations. At the moment the following crypto APIs are supported:
libcrypto
)#ifdef ELEKTRA_CRYPTO_API_GCRYPT
libgcrypt20-dev
or libgcrypt-devel
#endif
#ifdef ELEKTRA_CRYPTO_API_OPENSSL
libssl-dev
or openssl-devel
#endif
#ifdef ELEKTRA_CRYPTO_API_BOTAN
libbotan1.10-dev
or botan-devel
#endif
GPG is a run-time dependency for all crypto plugin variants. Either the gpg
or the gpg2
binary should be installed when using the plugin. Note that gpg2
will be preferred if both versions are available. The GPG binary can be configured in the plugin configuration as /gpg/bin
(see GPG Configuration below). If no such configuration is provided, the plugin will look at the PATH environment variable to find the GPG binaries.
The following compilation variants are available:
Add "crypto" and the variants, that you want (you can add one of them or all), to the PLUGINS
variable in CMakeCache.txt
and re-run cmake
.
In order to add all compile variants you can add "CRYPTO" to the PLUGINS
variable.
An example CMakeCache.txt
may contain the following variable:
PLUGINS=crypto;crypto_gcrypt;crypto_openssl;crypto_botan
or it may look like:
PLUGINS=CRYPTO
All variants of the plugin work under macOS Sierra (Version 10.12.3 (16D32)).
To set up the build environment on macOS Sierra we recommend using Homebrew. Follow these steps to get everything up and running:
brew install openssl botan libgcrypt pkg-config cmake # The next step is required for pkg-config to find the include files of OpenSSL ln -s /usr/local/opt/openssl/include/openssl/ /usr/local/include/openssl
Also a GPG installation is required. The GPG Tools work fine for us.
At the moment the plugin will only run on Unix/Linux-like systems, that provide implementations for fork ()
and execv ()
.
To mount a backend with the gcrypt plugin variant that uses the GPG key 9CCC3B514E196C6308CCD230666260C14A525406, use:
kdb mount test.ecf user/t crypto_gcrypt "crypto/key=9CCC3B514E196C6308CCD230666260C14A525406"
Now you can specify a key user/t/a
and protect its content by using:
kdb set user/t/a kdb setmeta user/t/a crypto/encrypt 1 kdb set user/t/a "secret"
The value of user/t/a
will be stored encrypted. But you can still access the original value using kdb get
:
kdb get user/t/a
The path to the gpg binary can be specified in
/gpg/bin
The GPG recipient keys can be specified as encrypt/key
directly. If you want to use more than one key, just enumerate like:
encrypt/key/#0 encrypt/key/#1
If more than one key is defined, every owner of the corresponding private key can decrypt the values of the backend. This might be useful if applications run with their own user but the administrator has to update the configuration. The administrator then only needs the public key of the application user in her keyring, set the values and the application will be able to decrypt the values.
If you are not sure which keys are available to you, the kdb
program will give you suggestions in the error description. For example you can type:
kdb mount test.ecf user/t crypto_gcrypt
In the error description you should see something like:
The command ./bin/kdb mount terminated unsuccessfully with the info: The provided plugin configuration is not valid! Errors/Warnings during the check were: Sorry, the error (#130) occurred! Description: the configuration is invalid or incomplete. Ingroup: plugin Module: crypto At: /Users/pnirschl/Projects/libelektra/src/plugins/crypto/gpg.c:512 Reason: Missing GPG key (specified as encrypt/key) in plugin configuration. Available key IDs are: B815F1334CF4F830187A784256CFA3A5C54DF8E4,847378ABCF0A552B48082A80C52E8E92F785163F Mountpoint: Configfile: Please report the issue at https://issues.libelektra.org/
This means that the following keys are available:
So the full mount command could look like this:
kdb mount test.ecf user/t crypto_gcrypt "crypto/key=847378ABCF0A552B48082A80C52E8E92F785163F"
Please note that these options are meant for experts only. If you do not provide these configuration options, secure defaults are being used.
The length of the master password that protects all the other keys can be set in:
/crypto/masterpasswordlength
The number of iterations that are to be performed in the PBKDF2 call can be set in:
/crypto/iterations
The following key must be set to "1"
within the plugin configuration, if the plugin should shut down the crypto library:
/shutdown
Per default shutdown is disabled to prevent applications like the qt-gui from crashing. Shutdown is enabled in the unit tests to prevent memory leaks.
All of the plugin variants use the Advanced Encryption Standard (AES) in Cipher Block Chaining Mode (CBC) with a key size of 256 bit.
The ciphers and modes of operations are defined in the corresponding <plugin_variant>_operations.c
or <plugin_variant>_operations.h
file.


text-danger
text-warning
h1 text-info
h2 text-muted
anchor text-success
anchor text-primary
This is the leading text
then the text follows up with just normal text.
This text is centered with .text-center
This is a header text with .text-center
Link with .text-center
paragraph all uppercase
Header all uppercase
anchor all uppercase
ThiS Is A UPpERCasE AnD loweRcaSe seNtence
This is a text with .bg-danger
This is a heading with .bg-info
This is a span with .bg-success
a div with .bg-warning
link with .bg-primary
Heading
some text here thou =)


|
First Assignment
|
Namespaces | |
| motion | |
| It moves the robot within the map respecting the behavior. | |
Functions | |
| def | motion.callback_get_behaviour (data) |
| callback function callback_get_behavior More... | |
| def | motion.update_position (x, y) |
| function update_position More... | |
| def | motion.move_normal () |
| function move_random More... | |
| def | motion.move_reach_user () |
| function move_reach_user More... | |
| def | motion.move_sleep_position () |
| function move_sleep_position More... | |
| def | motion.callback_get_position (position) |
| function callback_get_position More... | |
| def | motion.reach_goal () |
| function reach_goal More... | |
| def | motion.main () |
| main function More... | |
Variables | |
| motion.behaviour = None | |
| all these param are now saved in the class Map2D in map2Dclass.py xmax define max dimension of the map along X xmax = 30 ymax define max dimension of the map along Y ymax = 30 xhome define X house position for the robot xhome = 10 yhome define Y house position for the robot yhome = 10 xuser define X user position for the robot xuser = 20 yuser define Y user position for the robot yuser = 20 More... | |
| bool | motion.at_home = False |
| motion.goal = None | |
| float | motion.random_time = 0.5 |
| motion.map_2D = Map2D() | |
| object Map2D, we need it to access the values describing the map 2D within which the robot is moving More... | |


External div
internal viv
this div has padding and margin on four sides of 20px
this div has padding on top, left, bottom and right of 5px, 100px, 50px, 30px; 50px margin on top and bottom and 20 px on left and right
This table cell has 10px margin and 20px padding on all four sides.
Notice it ignores the margins! |