I have a Solutronic PV-inverter that i collect data from via a small shell script on my RPi. I would like to feed these data into my local emonCMS on the RPi.
I am currently feeding the data to PVoutput.org from a shell script via a curl string like:
curl -d "d=`date '+%Y%m%d'`" -d "t=`date '+%H:%M'`" \ -d "v1=$eg1" -d "v2=$pg1" -d "v6=$udc" \ -H "X-Pvoutput-Apikey: xxxxxxxxxxxxxxxxxxyyyyyyyyyyyzzzzzzzzzzz" \ -H "X-Pvoutput-SystemId: 4950" http://pvoutput.org/service/r2/addstatus.jsp
$eg1 is energy today until now
$pg1 is power generated
$udc is dc voltage.
The script is run every 5 mins from cron to update pvoutput.org with live data.
I have seached on this site but can't find definitions on how i could use a similar curl (or other) string from a shell script to feed the same data into my local emonCMS. Anyone that can point me i the right direction.
Re: Howto feed data from my inverter to local emoncms
Read the wrong documentation - it was for emoncms version 2. That's why I could not get it to work.
I have got it right now and data is parsed to emoncms through this bash string:
Re: Howto feed data from my inverter to local emoncms
Excellent good work, good to see it used this way, Im working on improving the documentation so hopefully things should be clearer in the future
Re: Howto feed data from my inverter to local emoncms
Yes it is nice to get everything working even for a arduino newbie like me. Right now i have one Funky sensor delivering temp data to my RFM12Pi and my solar data is injected via curl from my bash script.
Thank you for a good emoncms
Re: Howto feed data from my inverter to local emoncms
I send some data to Emoncms using shell script and MQTT.
SAMPLE (Emoncms server Raspberry-Pi data):
RX goes to NODES
TX goes to INPUT/Feeds (I did a hacked version of EmonHubMqttInterfacer to do this directly)
Re: Howto feed data from my inverter to local emoncms
You might want to give Node-RED a try, now that it's included in the latest Image [1] and the Raspbian Jessie repositories. There's a first glimpse at what can be achieved at [2].
Together with the Johnny5-node from [3], driving an Arduino (via Firmata) is straightforward.
[1] http://openenergymonitor.org/emon/node/11799
[2] http://openenergymonitor.blogspot.de/2015/10/emonpi-nodered-and-mqtt.html
[3] http://flows.nodered.org/node/node-red-contrib-gpio


Basic Usage¶
In this section we cover the basics of setting up a VASP calculation using the plugin. The procedure can be logically split into two steps. The first step is to set up VASP input using the VASP interface provided by the pymatgen package. In the second step these objects, together with a set of user specified output parser instructions, are passed as an input to the AiiDA calculation.
Note
The pymatgen syntax will not be covered here in great detail! - just a short use-case example will be provided. For more details on pymatgen we refer you to pymatgen documentation.
Preparing Pymatgen Input¶
A short example of setting up pymatgen VASP input is given below. The goal is to create: POSCAR, INPUTCAR, KPOINTS, and POTCAR files, which represent a minimal input for any VASP calculation.
An excerpt from the full code is shown below to illustrate the input setup procedure:
import numpy as np
#
# Pymatgen imports
import pymatgen as mg
from pymatgen.io import vasp as vaspio
#
# POSCAR
lattice_constant = 5.97
lattice = lattice_constant * np.array([
[0.0, 0.5, 0.5],
[0.5, 0.0, 0.5],
[0.5, 0.5, 0.0]
])
lattice = mg.Lattice(lattice)
struct = mg.Structure(
lattice,
[Mn, Mn, Ga],
# site coords
[[0.00, 0.00, 0.00], [0.25, 0.25, 0.25], [0.50, 0.50, 0.50]]
)
poscar = vaspio.Poscar(struct, comment='cubic Mn2Ga')
# KPOINTS
kpoints = vaspio.Kpoints.monkhorst_automatic(
kpts=(10, 10, 10), shift=(0.0, 0.0, 0.0)
)
Therefore, for each VASP input file we have a pymatgen object representing it, e.g. KPOINTS is represented by the pymatgen.io.vasp.Kpoints object. Our task here is just to provide basic information needed to construct the VASP input files.
Full code used for this example can be found here .
Preparing AiiDA calculation¶
The aim of this section is to set up a working AiiDA calculation. We will assume that all pymatgen objects representing the VASP input have already been created. Our task then is to create a VASP calculation object and pass it the content of the pymatgen input files.
Before we pass the input files to the AiiDA calculation we need to split the POSCAR file, since it may contain both dictionary and array data. This is achieved by the disassemble_poscar function which returns a dictonary of POSCAR parts. It its important to note that each of these parts is already an instance of AiiDA’s Data class and can be directly stored in the AiiDA database. The split is done like this:
# AiiDA imports
from aiida.orm import Code, DataFactory
from aiida.orm.calculation.job.vasp import vasp as vplugin
from aiida import load_dbenv
load_dbenv()
# split the poscar for AiiDA serialization
poscar_parts = vplugin.disassemble_poscar(poscar)
Note
This intermediate step represents only a transitional solution which will be improved in future versions!
The next step is to create an instance of the AiiDA VASP calculation and pass it the input files. The code to do this is shown below:
# split the poscar for AiiDA serialization
poscar_parts = vplugin.disassemble_poscar(poscar)
# === Prepare Calculation
ParameterData = DataFactory('parameter')
StructureData = DataFactory('structure')
codename = 'Vasp' # this may be differ from user-to-user
code = Code.get(codename) # executable to call, module imports etc
calc = code.new_calc()
calc.label = "VASP plugin development"
calc.description = "Test input plugin"
calc.set_max_wallclock_seconds(5*60) # 5 min
calc.set_resources({
"num_machines": 1,
"num_mpiprocs_per_machine": 1,
'num_cores_per_machine': 24 # this will differ from machine-to-machine
})
calc.set_withmpi(True)
calc.use_poscar(poscar_parts['poscar'])
calc.use_structure(poscar_parts['structure'])
calc.use_incar(
ParameterData(dict=incar.as_dict())
)
calc.use_kpoints(
ParameterData(dict=kpoints.as_dict())
)
calc.use_potcar(
ParameterData(dict=potcar.as_dict())
)
# settings
settings = {'PARSER_INSTRUCTIONS': []}
pinstr = settings['PARSER_INSTRUCTIONS']
pinstr.append({
'instr': 'dummy_data',
'type': 'data',
'params': {}
})
# additional files to return
settings.setdefault(
'ADDITIONAL_RETRIEVE_LIST', [
'OSZICAR',
'CONTCAR',
'OUTCAR',
'vasprun.xml'
]
)
calc.use_settings(ParameterData(dict=settings))
The calculation can now be submitted.
What is important to notice are the calc.use_method‘s which are specific to the VASP plugin. These can be logically divided into four groups:
- use_incar, use_potcar, use_kpoints - passed as a ParameterData object, which store the dict representation of the pymatgen object
- use_poscar, use_structure, use_structure_extras - passed as correspondingly named objects in the poscar_parts dict, which was obtained by splitting up the POTCAR object. Note: the structure_extras in the example is not shown because this data is optional, i.e. it may contain array data that can be found in the CONTCAR file, e.g. the final velicities of ions, etc.
- use_settings - pased as ParameterData. Used to specify additional files to retreive and output parser instructions.
- use_chgcar, use_wavecar - passed as a SinglefileData object. See the next section for more details on using these inputs.
Full code used for this example can be found here .
CHGCAR and WAVECAR Files¶
The CHGCAR and WAVECAR files are usually used for continuation runs. The plugin treats them as an optional input. The SinglefileData object can be created like this:
from aiida.orm.data.singlefile import SinglefileData
input_file = SinglefileData()
input_file.set_file('path/to/the/file/CHGCAR')
The input_file now points to the actual file on the disc and will be copied to the AiiDA database when the calculation’s store_all method is called. It is important to note here that we must have an input CHACAR/WAVECAR file written at some location on the disc before we can create a SinglefileData object.
Once we have created a SinglefileData representation of the CHACAR/WAVECAR file we can pass it to AiiDA as an input like this:
chgcar = SinglefileData()
chgcar.set_file('path/to/the/file/CHGCAR')
...
calc.use_chgcar(chgcar)
and similarly for the WAVECAR file.


Enable authentication using TLS client certificates
Estimated reading time: 10 minutesOverview
In many organizations, authenticating to systems with a username and password combination is either restricted or outright prohibited. With Docker Enterprise 3.0, UCP’s CLI client certificate-based authentication has been extended to the web user interface (web UI). DTR has also been enhanced to work with UCP’s internally generated client bundles for client certificate-based authentication. If you have an external public key infrastructure (PKI) system, you can manage user authentication using a pool of X.509 client certificates in lieu of usernames and passwords.
Benefits
The following table outlines existing and added capabilities when using client certificates — both internal to UCP and issued by an external certificate authority (CA) — for authentication.
| Operation | Benefit |
|---|---|
| UCP browser authentication | Previously, UCP client bundles enabled communication between a local Docker client and UCP without the need of a username and password. Importing your client certificates into the browser extends this capability to the UCP web UI. |
| DTR browser authentication | You can bypass the login page for the DTR web UI when you use TLS client certificates as a DTR authentication method. |
| Image pulls and pushes to DTR | You can update Docker engine with a client certificate for image pulls and pushes to DTR without the need for docker login . |
| Image signing | You can use client certificates to sign images that you push to DTR. Depending on which you configure to talk to DTR, the certificate files need to be located in certain directories. Alternatively, you can enable system-wide trust of your custom root certificates. |
| DTR API access | You can use TLS client certificates in lieu of your user credentials to access the DTR API. |
| Notary CLI operations with DTR | You can set your DTR as the remote trust server location and pass the certificate flags directly to the Notary CLI to access your DTR repositories. |
Limitations
- The security of client certificates issued by your organization’s PKI is outside of UCP’s control. UCP administrators are responsible for instructing their users on how to authenticate via client certificates.
- Username and password authentication cannot be disabled.
- If client certificates have been configured, they will be used for
all
docker push
anddocker pull
operations for all users of the same machine. - Docker Enterprise 3.0 does not check certificate revocation lists (CRLs) or Online Certificate Status Protocol (OCSP) for revoked certificates.
UCP / DTR browser authentication
The following instructions apply to UCP and DTR administrators. For non-admin users, contact your administrator for details on your PKI’s client certificate configuration.
To bypass the browser login pages and hide the logout buttons for both UCP and DTR, follow the steps below.
-
Add your organization’s root CA certificates via the UCP web UI or via the CLI installation command.
For testing purposes, you can download an admin client bundle from UCP and convert the client certificates to
pkcs12
-
Download UCP’s
ca.pem
fromhttps://<ucp-url>/ca
either in the browser or viacurl
. When usingcurl
, redirect the response output to a file.curl -sk https://<ucp-url>/ca -o ca.pem
-
Enable client certificate authentication for DTR. If previously installed, reconfigure DTR with your UCP hostname’s root CA certificate. This will be your organization’s root certificate(s) appended to UCP’s internal root CA certificates.
docker run --rm -it docker/dtr:2.7.0 reconfigure --debug --ucp-url \ <ucp-url> --ucp-username <ucp_admin_user> --ucp-password \ <ucp_admin_password> --enable-client-cert-auth --client-cert-auth-ca "$(cat ca.pem)"
See DTR installation and DTR reconfiguration CLI reference pages for an explanation of the different options.
-
Import the PKCS12 file into the browser or Keychain Access if you’re running macOS.
Client certificate to PKCS12 file conversion
From the command line, switch to the directory of your client bundle and run the following command to convert the client bundle public and private key pair to a .p12
file.
openssl pkcs12 -export -out cert.p12 -inkey key.pem -in cert.pem
Create with a simple password, you will be prompted for it when you import the certificate into the browser or Mac’s Keychain Access.
PKCS12 file browser import
Instructions on how to import a certificate into a web browser vary according to your platform, OS, preferred browser and browser version. As a general rule, refer to one of the following how-to articles:
- Firefox: https://www.sslsupportdesk.com/how-to-import-a-certificate-into-firefox/
- Chrome: https://www.comodo.com/support/products/authentication_certs/setup/win_chrome.php
- Internet Explorer: https://www.comodo.com/support/products/authentication_certs/setup/ie7.php
Image pulls and pushes to DTR
For pulling and pushing images to your DTR (with client certificate authentication method enabled) without performing a docker login
, do the following:
-
Create a directory for your DTR public address or FQDN (Fully Qualified Domain Name) within your operating system’s TLS certificate directory.
-
As a superuser, copy the private key (
client.pem
) and certificate (client.cert
) to the machine you are using for pulling and pushing to DTR without doing adocker login
. Note that the filenames must match. -
Obtain the CA certificate from your DTR server,
ca.crt
fromhttps://<dtrurl>/ca
, and copyca.crt
to your operating system’s TLS certificate directory so that your machine’s Docker Engine will trust DTR. For Linux, this is/etc/docker/certs.d/<dtrurl>/
. On Docker for Mac, this is/<home_directory>/certs.d/<dtr_fqdn>/
.This is a convenient alternative to, for Ubuntu as an example, adding the DTR server certificate to
/etc/ca-certs
and runningupdate-ca-certificates
.curl -k https://<dtr>/ca -o ca.crt
On Ubuntu
cp ca.crt /etc/ca-certs
-
Restart the Docker daemon for the changes to take effect. See Configure your host for different ways to restart the Docker daemon.
Add your DTR server CA certificate to system level
You have the option to add your DTR server CA certificate to your system’s trusted root certificate pool. This is MacOS Keychain or /etc/ca-certificates/
on Ubuntu. Note that you will have to remove the certificate if your DTR public address changes.
Reference guides
- Docker Engine
- Docker Desktop
Note: The above configuration means that Docker Engine will use the same client certificate for all pulls and pushes to DTR for all users of the same machine.
Image signing
DTR provides the Notary service for using Docker Content Trust (DCT) out of the box.
| Implementation | Component Pairing | Settings |
|---|---|---|
Sign with docker trust sign |
|
Copy ca.crt from https://<dtr-external-url>/ca to:
|
| Enforce signature or hash verification on the Docker client |
|
export DOCKER_CONTENT_TRUST=1 to enable content trust on the Docker client. Copy ca.crt from https://<dtr-external-url>/ca to /<home_directory>/.docker/tls/ on Linux and macOS. docker push will sign your images. |
| Sign images that UCP can trust |
|
Configure UCP to run only signed images. See Sign an image for detailed steps. |
DTR API access
With curl
, you can interact with the DTR
API by passing a public certificate and private key pair instead of
your DTR username and password/authentication token.
curl --cert cert.pem --key key.pem -X GET \
"https://<dtr-external-url>/api/v0/repositories?pageSize=10&count=false" \
-H "accept:application/json"
In the above example, cert.pem
contains the public certificate and key.pem
contains the private key. For non-admin users, you can generate a client bundle from UCP or contact your administrator for your public and private key pair.
For Mac-specific quirks, see curl on certain macOS versions.
Notary CLI operations with DTR
For establishing mutual trust between the Notary client and your trusted registry (DTR) using the Notary CLI, place your TLS client certificates in <home_directory>/.docker/tls/<dtr-external-url>/
as client.cert
and client.key
. Note that the filenames must match. Pass the FQDN or publicly accessible IP address of your registry along with the TLS client certificate options to the Notary client. To get started, see Use the Notary client for advanced users.
Self-signed DTR server certificate
Also place
ca.crt
in<home_directory>/.docker/tls/<dtr-external-url>/
when you’re using a self-signed server certificate for DTR.
Troubleshooting tips
DTR authentication via client Certificates
Hit your DTR’s basic_info
endpoint via curl
:
curl --cert cert.pem --key key.pem -X GET "https://<dtr-external-url>/basic_info"
If successfully configured, you should see TLSClientCertificate
listed as the AuthnMethod
in the JSON response.
Example Response
{
"CurrentVersion": "2.7.0",
"User": {
"name": "admin",
"id": "30f53dd2-763b-430d-bafb-dfa361279b9c",
"fullName": "",
"isOrg": false,
"isAdmin": true,
"isActive": true,
"isImported": false
},
"IsAdmin": true,
"AuthnMethod": "TLSClientCertificate"
}
DTR as an insecure registry
Avoid adding DTR to Docker Engine’s list of insecure registries as a workaround. This has the side effect of disabling the use of TLS certificates.
DTR server certificate errors
Example Error
Error response from daemon: Get https://<IP_ADDRESS>/v2/: x509: certificate is valid for <IP_ADDRESS>, not <IP_ADDRESS>
-
On the web UI, make sure to add the IP address or the FQDN associated with your custom TLS certificate under System > General > Domains & Proxies.
-
From the command line interface, reconfigure DTR with the
--dtr-external-url
option and the associated PEM files for your certificate.
Intermediate certificates
For chain of trust which includes intermediate certificates, you may optionally add those certificates when installing or reconfiguring DTR with --enable-client-cert-auth
and --client-cert-auth-ca
. You can do so by combining all of the certificates into a single PEM file.
curl on certain macOS versions
Some versions of macOS include curl
which only accepts .p12
files and specifically requires a ./
prefix in front of the file name if running curl
from the same directory as the .p12
file:
curl --cert ./client.p12 -X GET \
"https://<dtr-external-url>/api/v0/repositories?pageSize=10&count=false" \
-H "accept:application/json"


Before Your Trip:
Many bus stations, grocery stores, and banks have trustworthy ATMs that you can use throughout your trip. Before you leave, be sure to tell your bank that you are leaving the country so they do not flag your debit or credit card as stolen. You will also need to make sure that you know your pin number, as it is different internationally for some institutions.
Nuevo Soles:
Peru uses the Nuevo Sol for their monetary system. The Sol is divided into centimos of 5,10,20, and 50 in coins. Soles come in coins of 1, 2, or 5, and bills of 10,20,50,100, and 200. Always try and have small bills and coins on you, as many places do not carry much change. Many businesses also accept credit cards, though they may ask for your passport number first. Depending on your card provider, you may be charged a small fee for the international transaction.
Withdrawing Money:
Be cautious when using an ATM, and don't let people see how much you are drawing out, your pin number, or where you are putting your money after you withdraw it. Be smart–avoid drawing out money when it's dark or there are few people around. If something does not feel right about the ATM you are using, don't use it! It may be smart to keep your large bills one place, and your small bills and/or coins somewhere else, in case you are robbed or pick-pocketed. When taking out money, most ATMs will allow you to withdraw either Soles or American Dollars.
| Scotia Bank (Airport) |
| Av. Bolognesi S/N con Av Fitzcarrald, Chiclayo |
| Scotia Bank |
| Av Fernando Belaunde Terry No 685 Urb. La Primavera, Chiclayo |
| Banco Continental |
| Calle San Pedro 101 Pacasmayo, Chiclayo |
| Casino Bagdad Chiclayo |
| Elias Aguirre 498, Chiclayo (Global Net) |
| Grifo Repsol La Victoria (Gas Station) |
| Av Los Incas 100, Chiclayo (Global Net) |
| Terminal Terrestre Ormeno Chiclayo (Bus Station) |
| Av Francisco Bolognesi 964, Chiclayo (Global Net) |
| BBVA Continental in Real Plaza |
| CC Real Plaza Chiclayo, San Martin, Chiclayo |
***Most ATMs will charge fees of around 14 soles per transaction. However, if you have a bank that is part of the international banking alliance, you may withdraw money for free when using a Scotiabank ATM. The banks included in this alliance are as follows: ABSA, Bank of America, Barclays, BNP Paribas, China Construction Bank, Deutsche Bank, Santander Serfin, Scotiabank, Westpac, and UkrSibbank. Currently, the only bank in Peru part of this alliance is Scotiabank. Thus, if you have an account opened in one of these other banks, you should be able to withdraw money for free at Scotiabank ATMs.
Talk with your bank regarding what options they have about ATM withdrawals. Check outthis for more ideas of how to save money on ATMs while traveling.
Exchange Rate: While traveling, the exchange rate is something that you will always want to keep an eye on. Before exchanging your money for Soles, check the current rate here to make sure you are getting a good deal.


| 002:251 Khan | : |
So they routed them by Allah's Leave and Dawud (David) killed Jalut (Goliath), and Allah gave him [Dawud (David)] the kingdom [after the death of Talut (Saul) and Samuel] and Al-Hikmah (Prophethood), and taught him of that which He willed. And if Allah did not check one set of people by means of another, the earth would indeed be full of mischief. But Allah is full of Bounty to the 'Alamin (mankind, jinns and all that exists). |
| 002:251 Maulana | : |
So they put them to flight by Allah's permission. And David slew Goliath, and Allah gave him kingdom and wisdom, and taught him of what He pleased. And were it not for Allah's repelling some men by others, the earth would certainly be in a state of disorder: but Allah is Full of grace to the worlds. |
| 002:251 Pickthal | : |
So they routed them by Allah's leave and David slew Goliath; and Allah gave him the kingdom and wisdom, and taught him of that which He willeth. And if Allah had not repelled some men by others the earth would have been corrupted. But Allah is a Lord of Kindness to (His) creatures. |
| 002:251 Rashad | : |
They defeated them by GOD's leave, and David killed Goliath. GOD gave him kingship and wisdom, and taught him as He willed. If it were not for GOD's support of some people against others, there would be chaos on earth. But GOD showers His grace upon the people. |
| 002:251 Sarwar | : |
They defeated their enemy through God's will. David slew Goliath and God granted David the kingdom and wisdom and also taught him whatever He wanted. Had God not made one group of people repel the other, the earth would have become full of corruption, but God is generous to His creatures. |
| 002:251 Shakir | : |
So they put them to flight by Allah's permission. And Dawood slew Jalut, and Allah gave him kingdom and wisdom, and taught him of what He pleased. And were it not for Allah's repelling some men with others, the earth would certainly be in a state of disorder; but Allah is Gracious to the creatures. |
| 002:251 Sherali | : |
So they routed them by the command of ALLAH, and David slew Jalut, and ALLAH gave him sovereignty and wisdom and taught him of what HE pleased. And had not ALLAH repelled some men by others, the earth would be full of mischief. But ALLAH is the Lord of grace to all peoples. |
| 002:251 Yusufali | : |
By Allah's will they routed them; and David slew Goliath; and Allah gave him power and wisdom and taught him whatever (else) He willed. And did not Allah Check one set of people by means of another, the earth would indeed be full of mischief: But Allah is full of bounty to all the worlds. |
Concepts/Themes Covered: أركان الإسلام > التوحيد > توحيد الله تعالي > صفات الله تعالى > ذو فضل Pillars of Islam> Islamic> Oneness of Allah> His Glory's Characteristics> The Full of Bounty to Mankind أركان الإسلام > التوحيد > توحيد الله تعالي > مشيئته Pillars of Islam> Islamic> Oneness of Allah> His Will الجهاد > الجهاد في سبيل الإسلام > الدعوة إلى الجهاد Jihad> The Call to Jihad>The Call for the Holy War الإنسان والعلاقات الأخلاقية > الأخلاق الحميدة > الحكمة Man and The Moral Relations> Good Morals>Wisdom تنظيم العلاقات المالية > تملك الأموال Organizing Financial Relationships>Possessing Property
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


--- layout: post title: Mac Advanced Account Options categories: [] tags: - geek - mac - ssd status: publish type: post published: true meta: _original_post_id: '' _original_import_author: John Duprey author: ---
The cool part about this article is being able to right click on the account and get "Advanced Options". WHEN I upgrade to SSD, I will certainly move my home dir off to "conventional storage".


This is a set of demonstrations of binding JQuery Mobile widgets to object properties using Polymer's Observe-js library.


In this section, you will use the knowledge gained from previous sections to create datasets, visualizations, and dashboards of your choice from public APIs.
Register at The Movie Database. Request an API key for educational purposes. Create a variety of datasets using TMDB's public APIs. An example of a URL that you can use for dataset creation is https://api.themoviedb.org/3/movie/popular?api_key=your_tmdb_api_key&language=en-US, which returns some currently popular movies. Create a variety of visualizations using these datasets.
Register at BlueMix for a free account. Create the Insights for Twitter service. Use this service to analyze tweets and sentiments, and aggregate sentiments about one of the popular movies from TMDB. Visualize the distribution of these sentiments.


Need to turn on the gas and then switch it on in the laundry or something
Electric heaters provided
Secret
See for yourself


Product Designer @ Tencent WeChat AI
Internship
HoloBoard - an Immersive AR Teaching Board
How might we design AR blackboard through rigorous HCI research
Galaxy - gamifying the sharing of Netflix experiences
How do I reinvent and invigorate the discovery and sharing experience of Netflix in one day
SUPERvisor - AR face shields for COVID-19
How do we discover pain points during the pandemic and propose light and deployable AR visor for swab testers


Content
We use jQuery to select elements and work with 3rd party plugins. The entirety of the custom JS is wrapped in a classic jQuery(document).ready(function(){})
function to make sure the page is
loaded before the scripts will be running.
We recommend to use jQuery for basic DOM operations but obviously you can customize this file or furtherly add other Javascript files to your liking.


Hi! I've just registered the domains gecode.org and gecode.net for the next two years ;-) I will set up the web server next week. So let's start documenting stuff and put some web pages online! Guido -- Guido Tack Programming Systems Lab http://www.ps.uni-sb.de/~tack


My Team
Nick
Manager
ID: 1
Email:
<EMAIL_ADDRESS>Office Number = 26
Jack
Intern
ID: 3
Email:
<EMAIL_ADDRESS>School: DU
Ben
Engineer
ID: 2
Email:
<EMAIL_ADDRESS>GitHub =
benmacho


This is an example using RECTANGLE, CIRCLE, and EXTRUDE ADD/REMOVE.
In a new sketch, draw a Center Point Rectangle at the origin by going to the tool bar on the top and then clicking on the drop down arrow to select the Center Point Rectangle tool.
Then click once to start sketching and then click again to stop.
** Note: Every time you draw a new sketch, Onshape prompts you to define a plane to draw the sketch on. It's like picking which side of a sheet of paper you will be drawing on. **
On the tool bar, we will use the Dimension tool to specify the lengths of the sides. Click on a side of the rectangle to adjust the length to 2in.
Do the same for the other side of the rectangle to create a square.
To create a cube, we want to use the Extrude function, which can be found on the left side of the tool bar.
** Note: There are two ways you can use the Extrude function: **
1) Click Extrude while you are still in Sketch 1 (the sketch of the square from before) or
2) Click the check mark to finish Sketch 1, click Extrude, and then click on Sketch 1 to specify what you are extruding
To make the square into a cube, we want to Add an extrude. Since this is our first extrude to this sketch, we are creating a New extrude.
Change the depth of the extrude (or height of the cube) to 2in.
To make a hole, we need to start with a new sketch and draw a circle, a tool which can be found in the sketch tool bar.
** Remember again that Onshape will always prompt you to define a plane where the sketch will be drawn, so click on any plane that you want to extrude a hole through. **
** For a better view, you can change your perspective view to the plane you chose to draw a sketch on. Ex: top view for sketching on the top plane **
Click on the circle icon in the tool bar and draw a Center Point Circle by clicking once to start the sketch and then clicking again to stop.
We can use the Dimension tool again to specify the length of the diameter by clicking on the rim of the circle (circumference). Set this to 1 in.
To actually make a hole, we want to use the Extrude function again, but instead of adding an extrude, we want to remove an extrude.
In the same sketch, click the extrude tool and click remove.
Set the depth to 2in because we want the hole to go all the way through our cube (and remember that our cube is 2 inches tall).
** Note: You can only Extrude Remove a sketch if there already is an extruded part. In other words, you cannot extrude remove a surface. **
This is an example using RECTANGLE, CIRCLE, LINE, EXTRUDE ADD, and SWEEP REMOVE.
Note: The first 3 steps of this approach are the exact same as those in Approach #1.
In a new sketch, draw a Center Point Rectangle at the origin by going to the tool bar on the top and then clicking on the drop down arrow to select the Center Point Rectangle tool.
Then click once to start sketching and then click again to stop.
** Note: Every time you draw a new sketch, Onshape prompts you to define a plane to draw the sketch on. It's like picking which side of a sheet of paper you will be drawing on. **
On the tool bar, we will use the Dimension tool to specify the lengths of the sides. Click on a side of the rectangle to adjust the length to 2in.
Do the same for the other side of the rectangle to create a square.
To create a cube, we want to use the Extrude function, which can be found on the left side of the tool bar.
** Note: There are two ways you can use the Extrude function: **
1) Click Extrude while you are still in Sketch 1 (the sketch of the square from before) or
2) Click the check mark to finish Sketch 1, click Extrude, and then click on Sketch 1 to specify what you are extruding
To make the square into a cube, we want to Add an extrude. Since this is our first extrude to this sketch, we are creating a New extrude.
Change the depth of the extrude (or height of the cube) to 2in.
To make a hole, we need to start with a new sketch and draw a circle, a tool which can be found in the sketch tool bar.
** Remember again that Onshape will always prompt you to define a plane where the sketch will be drawn, so click on any plane that you want to extrude a hole through. **
** For a better view, you can change your perspective view to the plane you chose to draw a sketch on. Ex: top view for sketching on the top plane **
Click on the circle icon in the tool bar and draw a Center Point Circle by clicking once to start the sketch and then clicking again to stop.
We can use the Dimension tool again to specify the length of the diameter by clicking on the rim of the circle (circumference). Set this to 1 in.
Another way to tell Onshape that you want a specific part of your piece empty is to specify the path in which a surface should follow through.
Since our cube and our circle on top are centered at the origin, we'll use the line tool to draw a line from the center of the circle that you just drew to the origin, which is there the bottom face of the cube lies.
To do this, select either the Front plane or the Right plane and then draw a line from the center point of the circle to the origin and click the green check mark to finish your sketch.
** Note: We chose either the Front plane or the Right plane because remember that whichever plane we choose is where our sketch will go. Therefore, we have to choose a plane that clearly intersects the center of the circle and the origin. For this reason, we cannot choose the Top plane since it doesn't go through the center points; our line would just be drawn on the bottom of our cube. **
Now that we have the shape of our hole (circle on the top plane) and a clear path for it (the line that goes through the cube from the top center to the origin, or the bottom center), we can use the sweep tool to cut out our hole.
Select the sweep tool and make sure you are under "Solid" instead of "Surface." We want to sweep the entire circle to create a solid hole and not just the surface of the circle.
Select the face of the circle on the top for the "Faces and sketch regions to sweep," then select "Sweep path" and click on the line going through the cube.
Onshape by default assumes that you are always Adding a feature (like sweep, extrude, etc.), so you'll probably receive an error at this point. Make sure to switch it to "Remove" instead of "Add" sweep because again, we want to remove the solid hole from the cube.
Click the green check mark to finish your sweep.


All Files (93.3% covered at 1.12 hits/line)
32 files in total.
194 relevant lines.
181 lines covered and
13 lines missed
- 1
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
- 1
protect_from_forgery with: :exception
end
# class CategoriesController < ApplicationController
# def index
# @categories = Category.all
# @post = Post.all
# end
#
# def show
# @category = Category.find(params[:id])
# @posts = @category.posts
# end
#
# def new
# @category = Category.new
# end
#
# def create
# @category = Category.new(category_params)
# if @category.save
# flash[:notice] = "Category successfully added!"
# redirect_to categories_path
# else
# render :new
# end
# end
#
# def edit
# @category = Category.find(params[:id])
# end
#
# def update
# @category = Category.find(params[:id])
# if @category.update(category_params)
# redirect_to categories_path
# else
# render :edit
# end
# end
#
# def destroy
# @category = Category.find(params[:id])
# @category.destroy
# redirect_to categories_path
# end
#
# private
# def category_params
# params.require(:category).permit(:name)
# end
# end
- 1
class PostsController < ApplicationController
- 1
def index
# @posts = Post.all
# @tags = Tag.all
end
- 1
def show
- 3
@post = Post.find(params[:id])
end
- 1
def new
- 3
@post = Post.new
# @category = Category.find(params[:category_id])
# @post = @category.posts.new
end
- 1
def create
- 3
@post = Post.new(post_params)
- 3
if @post.save
- 3
redirect_to root_path
else
render :new
end
# @category = Category.find(params[:category_id])
# @post = @category.posts.new(post_params)
# if @post.save
# flash[:notice] = "Post successfully added!"
# redirect_to<EMAIL_ADDRESS># else
# render :new
# end
end
- 1
def edit
# @category = Category.find(params[:category_id])
- 1
@post = Post.find(params[:id])
- 1
@tags = @post.tags
end
- 1
def update
- 1
@post = Post.find(params[:id])
- 1
if @post.update(post_params)
- 1
redirect_to post_path(@post)
else
@tags = @post.tags
render :edit
end
end
#
# def update
# @category = Category.find(params[:category_id])
# @post = @category.posts.find(params[:id])
# if @post.update(post_params)
# redirect_to category_path(@category)
# else
# render :edit
# end
# end
#
# def destroy
# @category = Category.find(params[:category_id])
# @post = Post.find(params[:id])
# @post.destroy
# redirect_to<EMAIL_ADDRESS># end
- 1
def destroy
- 1
@post = Post.find(params[:id])
- 1
@post.destroy
- 1
redirect_to root_path
end
- 1
private
- 1
def post_params
- 4
params.require(:post).permit(:title, :contributor, :image, :description, :tag_ids => [])
end
end
- 1
class StaticController < ApplicationController
- 1
def index
- 9
@posts = Post.all
- 9
@tags = Tag.all
end
end
- 1
class TagsController < ApplicationController
- 1
def index
# @tags = Tag.all
end
- 1
def new
- 1
@tag = Tag.new
end
- 1
def show
@tag = Tag.find(params[:id])
end
- 1
def create
- 1
@tag = Tag.new(tag_params)
- 1
if @tag.save
- 1
redirect_to root_path
else
render :new
end
end
- 1
def edit
@tag = Tag.find(params[:id])
end
- 1
def update
@tag = Tag.find(params[:id])
if @tag.update(tag_params)
redirect_to tag_path(@tag)
else
render :edit
end
end
- 1
def destroy
@tag = Tag.find(params[:id])
@tag.destroy
redirect_to root_path
end
- 1
private
- 1
def tag_params
- 1
params.require(:tag).permit(:name)
end
end
- 1
module ApplicationHelper
end
- 1
class Category < ActiveRecord::Base
- 1
validates :name, :presence => true
- 1
has_many :posts
end
- 1
class Post < ActiveRecord::Base
# belongs_to :category
- 1
has_and_belongs_to_many :tags
- 1
validates :title, :presence => true
- 1
validates :contributor, :presence => true
- 1
validates :image, :presence => true
- 1
validates :description, :presence => true
end
- 1
class Tag < ActiveRecord::Base
- 1
validates :name, :presence => true
- 1
has_and_belongs_to_many :posts
end
- 1
require File.expand_path('../boot', __FILE__)
- 1
require "rails"
# Pick the frameworks you want:
- 1
require "active_model/railtie"
- 1
require "active_job/railtie"
- 1
require "active_record/railtie"
- 1
require "action_controller/railtie"
- 1
require "action_mailer/railtie"
- 1
require "action_view/railtie"
- 1
require "sprockets/railtie"
# require "rails/test_unit/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
- 1
Bundler.require(*Rails.groups)
- 1
module ShelterMe
- 1
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Do not swallow errors in after_commit/after_rollback callbacks.
- 1
config.active_record.raise_in_transactional_callbacks = true
end
end
- 1
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
- 1
require 'bundler/setup' # Set up gems listed in the Gemfile.
# Load the Rails application.
- 1
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
- 1
Rails.application.initialize!
- 1
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
- 1
config.cache_classes = true
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
- 1
config.eager_load = true
# Configure static file server for tests with Cache-Control for performance.
- 1
config.serve_static_files = true
- 1
config.static_cache_control = 'public, max-age=3600'
# Show full error reports and disable caching.
- 1
config.consider_all_requests_local = true
- 1
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates.
- 1
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment.
- 1
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
- 1
config.action_mailer.delivery_method = :test
# Randomize the order test cases are executed.
- 1
config.active_support.test_order = :random
# Print deprecation notices to the stderr.
- 1
config.active_support.deprecation = :stderr
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
- 1
Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# Be sure to restart your server when you modify this file.
- 1
Rails.application.config.action_dispatch.cookies_serializer = :json
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
- 1
Rails.application.config.filter_parameters += [:password]
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym 'RESTful'
# end
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Be sure to restart your server when you modify this file.
- 1
Rails.application.config.session_store :cookie_store, key: '_shelter_me_session'
# Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
- 1
ActiveSupport.on_load(:action_controller) do
- 1
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
end
# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
# self.include_root_in_json = true
# end
- 1
Rails.application.routes.draw do
- 1
root :to => 'static#index'
- 1
resources :posts
- 1
resources :tags
# root :to => 'categories#index'
#
# resources :categories do
# resources :posts
# end
end
- 1
FactoryGirl.define do
- 1
factory(:post) do
- 1
title "Big Bike"
- 1
contributor "Sue Marie"
- 1
description "Nice Bike"
- 1
image 'image'
end
end
- 1
FactoryGirl.define do
- 1
factory(:tag) do
- 1
name "Boat"
end
end
# require 'rails_helper'
#
# describe "the add a category process" do
# it "adds a new category" do
# visit categories_path
# click_on "Add Category"
# fill_in 'Name', :with => "Bike"
# click_on 'Submit'
# expect(page).to have_content "Bike"
# end
# end
#
# describe "the update a category process" do
# it "updates a category" do
# visit categories_path
# click_on "Add Category"
# fill_in 'Name', :with => "Bike"
# click_on 'Submit'
# click_on "Bike"
# click_on "Update Category"
# fill_in 'Name', :with => 'Bikes'
# click_on 'Submit'
# expect(page).to have_content "Bikes"
# end
# end
#
# describe "the delete a category process" do
# it "deletes a category" do
# visit categories_path
# click_on "Add Category"
# fill_in 'Name', :with => "Bike"
# click_on 'Submit'
# click_on "Bike"
# click_on "Delete Category"
# expect(page).to_not have_content "Bikes"
# end
# end
- 1
require 'rails_helper'
- 1
describe "the add a post process" do
- 1
it "add a post" do
- 1
visit root_path
- 1
click_on "Add Post"
- 1
fill_in 'Title', :with => "Treehouse"
- 1
fill_in 'Contributor', :with => "Sue Marie"
- 1
fill_in 'Description', :with => "Nice house"
- 1
fill_in 'Image', :with => "Image"
- 1
click_on 'Submit'
- 1
expect(page).to have_content 'Treehouse'
end
end
- 1
require 'rails_helper'
- 1
describe "the add a tag process" do
- 1
it "add a tag" do
- 1
visit root_path
- 1
click_on "Add Tag"
- 1
fill_in 'Name', :with => "Tree"
- 1
click_on 'Submit'
- 1
expect(page).to have_content 'Tree'
end
end
- 1
require 'rails_helper'
- 1
describe "the delete a post process" do
- 1
it "delete a post" do
- 1
visit root_path
- 1
click_on "Add Post"
- 1
fill_in 'Title', :with => "Treehouse"
- 1
fill_in 'Contributor', :with => "Sue Marie"
- 1
fill_in 'Description', :with => "Nice house"
- 1
fill_in 'Image', :with => "Image"
- 1
click_on 'Submit'
- 1
click_on "Treehouse"
- 1
click_on 'Delete Post'
- 1
expect(page).to_not have_content 'Treehouse'
end
end
- 1
require 'rails_helper'
- 1
describe "the add a post process" do
- 1
it "add a post" do
- 1
visit root_path
- 1
click_on "Add Post"
- 1
fill_in 'Title', :with => "Treehouse"
- 1
fill_in 'Contributor', :with => "Sue Marie"
- 1
fill_in 'Description', :with => "Nice house"
- 1
fill_in 'Image', :with => "Image"
- 1
click_on 'Submit'
- 1
click_on 'Treehouse'
- 1
click_on "Edit Post"
- 1
fill_in 'Title', :with => "Shoebox"
- 1
fill_in 'Contributor', :with => "Sue Marie"
- 1
fill_in 'Description', :with => "Nice house"
- 1
fill_in 'Image', :with => "Image"
- 1
click_on 'Submit'
- 1
expect(page).to have_content 'Shoebox'
end
end
# require 'rails_helper'
#
# describe Category do
# it { should validate_presence_of :name }
# end
- 1
require 'rails_helper'
- 1
describe Post do
- 2
it { should validate_presence_of :title }
- 2
it { should validate_presence_of :contributor }
- 2
it { should validate_presence_of :image }
- 2
it { should validate_presence_of :description }
- 2
it { should have_and_belong_to_many :tags}
end
- 1
require 'rails_helper'
- 1
describe Tag do
- 2
it { should validate_presence_of :name }
- 2
it { should have_and_belong_to_many :posts}
end
# This file is copied to spec/ when you run 'rails generate rspec:install'
- 1
ENV['RAILS_ENV'] ||= 'test'
- 1
require File.expand_path('../../config/environment', __FILE__)
# Prevent database truncation if the environment is production
- 1
abort("The Rails environment is running in production mode!") if Rails.env.production?
- 1
require 'spec_helper'
- 1
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
# run as spec files by default. This means that files in spec/support that end
# in _spec.rb will both be required and run as specs, causing the specs to be
# run twice. It is recommended that you do not name files matching this glob to
# end with _spec.rb. You can configure this pattern with the --pattern
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
#
# The following line is provided for convenience purposes. It has the downside
# of increasing the boot-up time by auto-requiring all files in the support
# directory. Alternatively, in the individual `*_spec.rb` files, manually
# require only the support files necessary.
#
# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
# Checks for pending migrations before tests are run.
# If you are not using ActiveRecord, you can remove this line.
- 1
ActiveRecord::Migration.maintain_test_schema!
- 1
RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
- 1
config.fixture_path = "#{::Rails.root}/spec/fixtures"
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
- 1
config.use_transactional_fixtures = true
# RSpec Rails can automatically mix in different behaviours to your tests
# based on their file location, for example enabling you to call `get` and
# `post` in specs under `spec/controllers`.
#
# You can disable this behaviour by removing the line below, and instead
# explicitly tag your specs with their type, e.g.:
#
# RSpec.describe UsersController, :type => :controller do
# # ...
# end
#
# The different available types are documented in the features, such as in
# https://relishapp.com/rspec/rspec-rails/docs
- 1
config.infer_spec_type_from_file_location!
end
- 1
Shoulda::Matchers.configure do |config|
- 1
config.integrate do |with|
- 1
with.test_framework :rspec
- 1
with.library :rails
end
end


Welcome to the playground!
Here you can try out all the functionality of SpiderEye or test and debug new features.
On the API page you can call the default SpiderEye client API.
On the Bridge page you can call custom defined endpoints on the .Net side.


The purpose of this project was to analyze how weather change as you get closer to the equator. To accomplish this analysis, we first pulled data from the OpenWeatherMap API to assemble a dataset on over 500 cities.
After assmbling the dataset, we used Matplotlib to plot various aspects of the weather vs lattitude. Factors we looked at included: temperature, cloudiness, wind speed, and humidity. This site provides the source data and visualizations created as part of the analysis, as well as explanations and descriptions of any trends and correlations wtinessed.


Revelation 16:15
Behold, I come as a thief.


GA Assessing was founded in 2003, by myself Graeme Abbott. I am a member of the IMA in Cape Town and a qualified motor assessor with 30 years experience in the trade. I completed the NCT 2 & 3 at Oude Molen Technical College, the Trade Test as a Motor Mechanic at Faber Nissan in Parow as well as completing the Fitting and Turning Trade Test at Cape Town City Council in Pinelands, Mechanical Branch.
Over the years, I have worked and gained extensive experience in many panel beating workshops.
I compile a full detailed report and take digital photos of all damages both related and old. My turn around time is approximately 24 hours on all motor claims provided the vehicle does not need to be stripped for closer inspection. I cover the whole of the Western Cape, from Vredenburg on the West Coast to Hermanus on the South Coast and all areas in and around Cape Town.
I am qualified to assess the below, as well as bad workmanship claims on engines & gearboxes:
Motor Vehicles
Busses
Trucks
Trailers
Boats
Motor Bikes
Bicycles
I am qualified to assess the below, as well as bad workmanship claims on engines & gearboxes:
-<PHONE_NUMBER>
-<PHONE_NUMBER>
-<EMAIL_ADDRESS>- 27 Bay Way, Table View, Cape Town


#include <Endpoint.hpp>
|
| virtual | ~Endpoint ()=default |
| |
| virtual void | open (void)=0 |
| | Create the shared memory regions belonging to the Endpoint. More...
|
| |
| virtual void | close (void)=0 |
| | Unlink the shared memory regions belonging to the Endpoint. More...
|
| |
| virtual void | write_policy (const std::vector< double > &policy)=0 |
| | Write a set of policy values for the Agent. More...
|
| |
| virtual double | read_sample (std::vector< double > &sample)=0 |
| | Read a set of samples from the Agent. More...
|
| |
| virtual std::string | get_agent (void)=0 |
| | Returns the Agent name, or empty string if no Agent is attached. More...
|
| |
| virtual void | wait_for_agent_attach (double timeout)=0 |
| | Blocks until an agent attaches to the endpoint, a timeout is reached, or the operation is canceled with stop_wait_loop(). Throws an exception if the given timeout is reached before an agent attaches. The name of the attached agent can be read with get_agent(). More...
|
| |
| virtual void | wait_for_agent_detach (double timeout)=0 |
| | Blocks as long as the same agent is still attached to the endpoint, a timeout is reached, or the operation is canceled with stop_wait_loop(). The name of the attached agent can be read with get_agent(). More...
|
| |
| virtual void | stop_wait_loop (void)=0 |
| | Cancels any current wait loops in this Endpoint. More...
|
| |
| virtual void | reset_wait_loop (void)=0 |
| | Re-enables wait loops occurring after this call. More...
|
| |
| virtual std::string | get_profile_name (void)=0 |
| | Returns the profile name associated with the attached application, or empty if no controller is attached. More...
|
| |
| virtual std::set< std::string > | get_hostnames (void)=0 |
| | Returns the list of hostnames used by the attached application, or empty if no controller is attached. More...
|
| |
◆ ~Endpoint()
| virtual geopm::Endpoint::~Endpoint |
( |
| ) |
|
|
virtualdefault |
◆ close()
| virtual void geopm::Endpoint::close |
( |
void |
| ) |
|
|
pure virtual |
◆ get_agent()
| virtual std::string geopm::Endpoint::get_agent |
( |
void |
| ) |
|
|
pure virtual |
◆ get_hostnames()
| virtual std::set<std::string> geopm::Endpoint::get_hostnames |
( |
void |
| ) |
|
|
pure virtual |
Returns the list of hostnames used by the attached application, or empty if no controller is attached.
Implemented in geopm::EndpointImp.
◆ get_profile_name()
| virtual std::string geopm::Endpoint::get_profile_name |
( |
void |
| ) |
|
|
pure virtual |
Returns the profile name associated with the attached application, or empty if no controller is attached.
Implemented in geopm::EndpointImp.
◆ make_unique()
| std::unique_ptr< Endpoint > geopm::Endpoint::make_unique |
( |
const std::string & |
data_path | ) |
|
|
static |
Factory method for the Endpoint used to set the policy.
◆ open()
| virtual void geopm::Endpoint::open |
( |
void |
| ) |
|
|
pure virtual |
◆ read_sample()
| virtual double geopm::Endpoint::read_sample |
( |
std::vector< double > & |
sample | ) |
|
|
pure virtual |
Read a set of samples from the Agent.
- Parameters
-
| [out] | sample | The sample values. The order is specified by the Agent. |
- Returns
- The age of the sample in seconds.
Implemented in geopm::EndpointImp.
◆ reset_wait_loop()
| virtual void geopm::Endpoint::reset_wait_loop |
( |
void |
| ) |
|
|
pure virtual |
◆ stop_wait_loop()
| virtual void geopm::Endpoint::stop_wait_loop |
( |
void |
| ) |
|
|
pure virtual |
◆ wait_for_agent_attach()
| virtual void geopm::Endpoint::wait_for_agent_attach |
( |
double |
timeout | ) |
|
|
pure virtual |
Blocks until an agent attaches to the endpoint, a timeout is reached, or the operation is canceled with stop_wait_loop(). Throws an exception if the given timeout is reached before an agent attaches. The name of the attached agent can be read with get_agent().
Implemented in geopm::EndpointImp.
◆ wait_for_agent_detach()
| virtual void geopm::Endpoint::wait_for_agent_detach |
( |
double |
timeout | ) |
|
|
pure virtual |
Blocks as long as the same agent is still attached to the endpoint, a timeout is reached, or the operation is canceled with stop_wait_loop(). The name of the attached agent can be read with get_agent().
Implemented in geopm::EndpointImp.
◆ write_policy()
| virtual void geopm::Endpoint::write_policy |
( |
const std::vector< double > & |
policy | ) |
|
|
pure virtual |
Write a set of policy values for the Agent.
- Parameters
-
| [in] | policy | The policy values. The order is specified by the Agent. |
Implemented in geopm::EndpointImp.
The documentation for this class was generated from the following files:


Techtonica Application Workshop Day 2
Projected Time
2.5 hours
Prerequisites
- You should be digitally literate before doing this workshop—we define that as being able to use the mouse, keyboard, browser, and email easily.
- You should have already completed the day 1 workshop.
Motivation
Doing this workshop is part of the Techtonica application process. It will give you a good idea of what it’s like to learn technical concepts at Techtonica.
Objectives
Participants will be able to:
- Write some beginner JavaScript
- Collaborate with others
- Figure out some new JavaScript concepts
- Connect their JavaScript to their HTML
Specific Things To Learn
- Creating a JavaScript array
- Displaying a JavaScript array on the page
- Indexing into an array or string
- Selecting a random item from an array
Materials
Common Mistakes & Misconceptions
- HTML, CSS, and JavaScript can go in CodePen’s HTML box, but they are different languages, so they’ll need to be identified as those languages using HTML tags (
<style>
or <script>
) (but let’s keep them in their boxes for now).
Practice
JavaScript
Feel free to look through the JavaScript I slides linked above or to use Google to move quickly through the other steps. There’s not a lot of time, so try to stick to accomplishing what’s in here for now:
- Sign in to your CodePen account and start a new pen. Title it, “Workshop 2—My Name—Full Date” (for example, “Workshop 2—Jane Doe—10/23/2019”). Delete the existing code in the boxes.
- Make a JavaScript (not HTML) list of products to sell.
- Figure out how to display your list on the page exactly as it is in JavaScript (don’t add HTML to the page using JavaScript).
- Write a function that will display a random item from your list on the page.
- Display the last item from your list on the page.
- Display all the list items longer than three letters.
- Check your indentation so your code is easy to read!
- Submit your CodePen link via email at the end of the workshop.
Challenge
- Do this one on your own! Start a new CodePen. Can you write a JavaScript function that does the following?
Given a string, return a new string where the second and last characters are exchanged.
- Submit your CodePen link via email at the end of the workshop.
Check for Understanding
- Summarize to each other.
- Make a cheat sheet.
- Try making a new CodePen and doing it all again without looking at any resources.
Supplemental Materials


{% extends 'main_template.html' %} {% load staticfiles %} {% block seo %}
Last Updated on June 23, 2014. This Privacy Policy is effective immediately for users registering accounts after that date and will become effective on June 25, 2014 for pre-existing users.
This Privacy Policy describes our policies on the collection, use, and disclosure of information about you in connection with your use of our websites, emails, and mobile applications ("Site"). The terms "we", "us", and "Picasso" refer to Picasso Inc., an Ontario corporation. When you use the Site, you consent to our collection, use, and disclosure of information about you as described in this Privacy Policy.
We may store the information you submit to or through the Site, as well as information we collect in connection with your use of the Site.
We use the information to fulfill your requests, provide the Site’s functionality, improve the Site’s quality, personalize your experience, track usage of the Site, provide feedback to businesses that are listed on the Site, display relevant advertising, provide customer support, message you, back up our systems and allow for disaster recovery, enhance the security of the Site, and comply with legal obligations.
Among the information we collect, please note:
Account Information: If you create an account on Picasso, we may store and use your full name, email address, zip code and other information you may provide with your account, such as your gender and birth date.  If you feel that an unauthorized account has been created depicting you or your likeness, you can request its removal by contacting us.
Public Content: The information that you post to the Site is intended for public consumption, including your reviews, tips, photos, check-ins, comments, likes, Talk posts, bookmarks, friends, lists, compliments, and account profile. We may display this information on the Site, share it with businesses, and further distribute it to a wider audience through third party sites and services.
Contacts: You can invite your friends to join the Site by providing their contact information, or by allowing us to use your address book from your computer, mobile device, or other sites. If you invite a friend to join and connect with you on the Site, we may transmit your friend’s contact information to Picasso long enough to process your requests.
Communications: When you sign up for an account, you are opting in to receive emails from other Picasso users, businesses, and Picasso itself. You can manage your email preferences, but note that you cannot opt out of receiving certain administrative or legal notices from Picasso. If you exchange messages with others through the Site, we may store them in order to process and deliver them, allow you to manage them, and investigate possible wrongdoing in connection with the Site. If you send information from the Site to your phone via SMS text message, we may log your phone number, phone carrier, and the date and time that the message was processed. Carriers may charge recipients for texts that they receive.
Transactional Information: If you make requests or purchases through the Site, we may collect and store certain information about you to process your requests and populate forms for future transactions, such as your phone number, address, email, and credit card information. This information may be shared with third parties who help process and fulfill your requests. When you submit credit card numbers, we encrypt that information using industry standard technology. If you write reviews about teachers or businesses with which you transact through the Site, we may publicly display the fact that you transacted with those teachers and businesses.
Site Activity: We may store information about your use of the Site, such as your search activity, the pages you view, the date and time of your visit, and the businesses you call using our mobile applications. We also may store information that your computer or mobile device provides to us in connection with your use of the Site, such as your browser type, type of computer or mobile device, browser language, IP address, mobile carrier, unique device identifier, location, and requested and referring URLs.
We, and third parties with whom we partner, may use cookies, web beacons, local shared objects (sometimes called "flash cookies"), and similar technology in connection with your use of the Site and third party websites ("Cookies"). Cookies are small data files that may have unique identifiers, and reside, among other places, on your computer or mobile device, in emails we send to you, and on our web pages. Cookies may transmit information about you and your use of the Site, such as your browser type, search preferences, data relating to advertisements that have been displayed to you or that you have clicked on, and the date and time of your use. Cookies may be persistent or stored only during an individual session.
Types of Cookies used on the Site include:
|
Category of Use |
Explanation |
|
Processes |
Intended to make the Site work in the way you expect it to. For example, we use a Cookie that tells us whether you have already signed up for an account. |
|
Authentication, Security, and Compliance |
Intended to prevent fraud, protect your data from unauthorized parties, and comply with legal requirements. For example, we use Cookies to determine if you are logged in. |
|
Preferences |
Intended to remember information about how you prefer the site to behave and look. For example, we use a Cookie that tells us whether you have declined to allow us to use your phone’s geolocation data. |
|
Notifications |
Intended to allow notice of information or options that we think could improve your use of the site. For example, we use a Cookie that allows us to stop showing you the signup notification if you have already seen it. |
|
Advertising |
Intended to make advertising more relevant to users and more valuable to advertisers. For example, we use a Cookie that tells us if you have recently clicked on an ad. |
|
Analytics |
Intended to help us understand how visitors use the Site. For example, we use a Cookie that tells us how our search suggestions correlate to your interaction with the search page. |
Managing Cookies:
It may be possible to disable some (but not all) Cookies through your device or browser settings, but doing so may affect your ability to use the Site. The method for disabling cookies may vary by device and browser, but can usually be found in preferences or security settings.
We may share information about you with third parties as follows:
Advertisers: We may allow third parties to use Cookies on the Site to collect the same type of information for the same purposes as Picasso does for itself. They may be able to associate the information they collect with other information they have about you from other sources.
Service Providers: Some of the services that are offered through the Site, such as dinner reservations and food delivery, may be provided by third-party providers. We also outsource some of Picasso’s functions to third-party providers, such as technical and customer support, tracking and reporting functions, quality assurance testing, payment processing functions, and other services. We may share information from or about you with these third-party providers so that they can perform their services or complete your requests.
Aggregate Information: We may share user information in the aggregate with third parties, such as advertisers and content distributors. For example, we may disclose the number of users that have been exposed to, or clicked on, advertisements.
Business Transfers: We may share information from or about you with subsidiaries, joint ventures, or other companies under common control, in which case we will require them to honor this Privacy Policy. If another company acquires Picasso or all or substantially all of our assets, that company will possess the same information, and will assume the rights and obligations with respect to that information as described in this Privacy Policy.
Businesses and Teachers on Picasso: We may share information from or about you (such as your age and gender) and your use of the Site (such as which businesses you bookmark or call) with businesses and teachers on Picasso. You may adjust your settings to increase or decrease the amount of information we share.
Investigations: We may investigate and disclose information from or about you if we have a good faith belief that such investigation or disclosure is (a) reasonably necessary to comply with legal process and law enforcement instructions and orders, such as a search warrant, subpoena, statute, judicial proceeding, or other legal process served on us; (b) helpful to prevent, investigate, or identify possible wrongdoing in connection with the Site; or (c) protect our rights, reputation, property, or that of our users, affiliates, or the public.
Links: The Site may contain links to unaffiliated third party websites. Except as set forth herein, we do not share your personal information with them, and are not responsible for their privacy practices. We suggest you read the privacy policies on all such third party websites.
Facebook and Twitter: If you are logged into Facebook, and you access but are not logged into the Site, we may receive information from Facebook to make it easier for you to create an account on the Site and show you relevant content from your Facebook friends. This information personalizes your experience and helps you create a Picasso account. You can also connect your Picasso account to your accounts on third party services like Facebook or Twitter, in which case we may collect and store information identifying your account with the third party service. We use the information to help you connect and share public content with your friends and followers.
Other users may be able to identify you, or associate you with your account if you include personal information in the content you post publicly. You can reduce the risk of being personally identified by using the Site pseudonymously, though doing so could detract from the credibility of your contributions to the Site. Users can also use the Member Search feature to find one another based on their names or email addresses.
Please also note that the messages you send or receive using the Site are only private to the extent that both you and the sender/recipient keep them private. For example, we do not have any control over whether a recipient of one of your messages publicly posts it or its contents. Similarly, Picasso may also access such messages in the course of investigations relating to Site use.
You can close your account by contacting us. We will remove your public posts from view and/or dissociate them from your account profile, but we may retain information about you for the purposes authorized under this Privacy Policy unless prohibited by law. For example, we may retain information to prevent, investigate, or identify possible wrongdoing in connection with the Site or to comply with legal obligations. Please note that businesses cannot remove their business listings, ratings or reviews by closing their accounts.
The Site is intended for general audiences and is not directed to children under 13. We do not knowingly collect personal information from children under 13. If you become aware that a child has provided us with personal information without parental consent, please contact us. If we become aware that a child under 13 has provided us with personal information without parental consent, we take steps to remove such information and terminate the child's account.
We follow generally accepted industry standards to protect the personal information submitted to us, both during transmission and once we receive it. However, no method of transmission over the Internet or via mobile device, or method of electronic storage, is 100% secure. Therefore, while we strive to use commercially acceptable means to protect your personal information, we cannot guarantee its absolute security.
If you believe that Picasso has not adhered to this Privacy Policy you may contact us online or write to us at the following address:
Picasso Inc.
Attn: Privacy Officer
130 Bloor Street West
Toronto, ON
Canada
We may revise this Privacy Policy from time to time. The most current version of the Privacy Policy will govern our use of information about you and will be located here. If we make material changes to this Privacy Policy, we will notify you by email or by posting a notice on the Site prior to the effective date of the changes. By continuing to access or use the Site after those changes become effective, you agree to be bound by the revised Privacy Policy.


Marquesa Asmussen
Marquesa is a Seattle-based software developer. She comes from a diverse background with experience in sales, construction, the food and beverage industry and the performing arts. She is a passionate communicator who strives to make connections and build a sense of community, uplifting and encouraging her peers to grow themselves. Marquesa is driven to give her clients the best possible development experience and finished product.
Sarah Creager
Sarah is a nurse and musician, currently working on the front-lines against COVID-19. She is changing careers to pursue her passion for software development. She is committed to creating software that's accessible to everyone, with a human touch that is approachable and inviting.
Alex Grazda
Alex is a software engineering student at Code Fellows. He has worked 18 years in retail customer service and 5 years as a Project Manager. Alex has always been intrigued by software development. He is changing careers into an industry that has never-ending potential. He is passionate about traveling. He would love to work for a company that allows him to work remotely and and live out his passion.
Joe Ivans
Joe is a software engineer with experience in enterprise development. He is passionate about architecture and high-level enterprise design. Joe previously served as an OIF Marine.


While text-decoration
certainly isn't the most cutting edge feature, it is a very useful one. It has been around
quite a while, but recently got overhauled into the CSS Text Decoration Module Level 3 spec. The new text
decoration features give you a lot more control than you had before.
Show me what you got!
Note: This examply only works in Firefox at the moment.
How does it work?
After yesterday's extremly tricky Audio API, the text-decoration CSS property is a breeze. The CSS property
text-decoration-line
defines where you want your text line positioned. The value can be either underline
,
overline
or line-through
.  You can use the most basic line style values you already know from CSS borders. The
color of the line is controlled with text-decoration-color
.
Most unfortunately, the more useful features like text-decoration-skip
have not been implemented by any browser
yet. This would allow you to specify when you want the line interrupted, ie. you could have the line skip spaces.
Useful?
It's a tiny thing but it gives you a tad more control than the old CSS2.1 version. Previously, you needed all
kinds of hacks to creaty nice wavy underlines — now we can replace all that junkyard code with clean-cut
text-decoration-*
properties in a breeze.
Great, but can I use it today?
Not quite. Firefox supports some of the spec since version 6, but none of the other browsers currently support it. There is a resolved bug for this in Webkit, but we couldn't get it to work in Chrome or in Chrome Canary.
Show me the source!
Feel free to look around the differente source files we used for this example.


These high level primitives are based on the idea of partial application, which first appeared on computers in POP-2 but actually date back to the work of logicians Curry and Schoenfinkel. The derived mapping primitives are found in various languages but are prosleytised for Prolog by Naish, Lee, Technical Report 96/2, U. Melbourn.
Using apply/n, a function is applied to arguments one at a time until it has enough to be called. While it does not have enough, it returns a partially applied function with frozen arguments.
This concept is readily understood in a functional language where the result is separated from the input arguments, although even there a strictly typed language would have some difficulties with the result. In Prolog there are no type constraints but the goals are relationships not functions, and the result or results can be anywhere. The user, of course, knows where to look but there remains the problem of how to retrieve a partial application. This is solved by an extra argument in apply for this return value. In the event that apply actually closes out the argument list and the goal is called then that extra argument is redundant, so if the user is aware when it is a closure then apply can be used with one less argument.
Thus we have:
Eg.:
plus(A, B, C) :- (number(A) -> (number(B) -> C is A + B ; number(C), B is C - A) ; number(B), number(C), A is C - B).?- apply(plus, 1, X) . % /3
X = plus(1) % plus(1,X) failed
?- apply(plus(1), 2, X) . % /3
X = 3 % plus(1,2,X) succeeded
?= apply(plus, X, Y). % /3 put a var in the result position (1)
Y = plus(X)
?- apply(plus(X), 1, Y). % /3
Y = plus(X, 1),
?- apply(plus(X, 1), 2). % /2 close out with no more vars
X = 1
Higher arities of apply may be defined which are simply repeated calls to apply/3.
Apply a given goal to each element of a list:
% map(f, [e1, e2, ... , en], [f e1, f e2, ... , f en])
map(_, [], []). map(F, [A|As], [FA|FAs]):- apply(F, A, FA), map(F, As, FAs).
As map, but with indexed iterations:
mapI(__, _, Null, []):- Null == []. mapI(I, F, [A|As], [FA|FAs]):- apply(FI, I, A, FA), I1 is I + 1, mapI(I1, F, As, FAs).
Applies a given goal to the corresponding elements of two lists:
map2(_, [], _, []). map2(_, _, [], []). map2(F, [A|As], [B|Bs], [FAB|FABs]):- apply(F, A, B, FAB), map2(F, As, Bs, FABs).
converse(F, X, Y, FYX):- apply(F, Y, X, FYX).
compose(F, G, X, FGX):- apply(G, X, GX), apply(F, GX, FGX).
Select elements from list by predicate P:
filter(_, [], []). filter(P, [A0|As0], As):- ( apply(P, A0) -> As = [A0|As1] ; % transfer A0
As = As1 % skip A0 ),
filter(P, As0, As1).
As filter, but indexed:
filterI(_, _, [], []). filterI(I, P, [A0|As0], As):- ( % filter with index as parameter not not apply(P, I, _) -> % snap the bindings As = [A0|As1] ; % transfer A0
As = As1 % skip A0
), I1 is I + 1, filterI(I1, P, As0, As1)
Applies an infix operation between adjacent elements of a list:
% foldr(op, b, [e1, e2, ... , en], (e1 op (e2 op ( ... (en op b) ))))
foldr(F, B, [], B). foldr(F, B, [A|As], R):- foldr(F, B, As, R1), apply(F, A, FA), apply(FA, R1, R).
As foldr, but in reverse order:
% foldl(op, b, [e1, ... , en1, en], (en op (en1 op ( ... (e1 op b) ))))
foldl(_, _, [], A, A). foldl(FC, FB, [X|Xs], A0, A) :- apply(FC, X, A0, A1), foldl(FC, FB, Xs, A1, A).
A lambda expression defines an anonymous expression with a list of bound variables. It is implemented as a term with functor lambda and arguments that are the elements of the bound variable list followed by the body:
lambda(BV1, BV2, ... BVn, Body)
It can be used by apply in lieu of a simple goal. When a lambda expression is applied to a value that value is bound to BV1, which means it is also bound in the body. If the arity of the lambda expression is two (one BV and a body) that means the final bound variable has been set and the body is ready to be called. If not, a new shorter lambda expression without BV1 is returned .
The body may, after all be a simple goal for the purpose of declaring the BVs and thus the arity of that goal, so that apply does not have to keep stabbing around for an executable clause before all the BVs are set. Furthermore, it removes the ambiguity that arises when there exists multiple clauses of the same name but different arity.
Eg:
?- apply(lambda(X,Y,Z, plus), 1, Map), apply(Map, 2).
X = 1
Y = 2
Z = 3
Map = lambda(2, 3, plus(1,2,3))
In general, the body is not a simple goal but an expression involving operators and perhaps calling goals as well. An important feature is that the body may contain free variables (FVs) which require to be set but are not on the BV list, They are set by the context in which the lambda expression is used.
Eg: The minor of a determinant:
main:- Det = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]], minor(Det, 2, 2, Minor), % get Minor22 write(Minor),nl. minor(D, Row, Col, M) :- Map1 = lambda(X, X =\= Row), % Row is free Map2 = lambda(Y, Y =\= Col), % Col is free filterI(1, Map1, D, R1), % filter rows map(filterI(1, Map2), R1, M). % select row and filter cols
.
?- main.
[[1, 3, 4], [9, 11, 12], [13, 15, 16]]
This illustrates the use of free variables. It also shows how, to improve clarity, the lambda expressions (Maps) may defined outside the point of application. In fact they could be imported from elsewhere, because the bound variable list would still be valid, however, free variables would have to be bound where the map is defined.
It is not necessary to use a lambda expression to make use of free variables but a direct call must be applied to those variables as arguments first, and then the mapping arguments follow. Thus, the order of the arguments is constrained and the free variables must be local.
A determinant may be evaluated by summing the product of the elements of one row (or column) and their cofactors. Cofactors are simply minors signed according to the joint parity of their coordinates.
detL([[A, B], [C, D]], N):- N is A*D - B*C. detL(D, N)- % expand D by 1st row D = [Row1|Rows], % get 1st row minors(D, Minors), % minors of the 1st row map(detL, Minors, DetMs), % determinants of those minors map2(times, Row1, DetMs, Terms), % aij*|Aij| foldr(minus, 0, Terms, N). % Sigma, apply cofactor signs here
It is more efficient to intruduce the signs in the final fold operation by using minus instead of sum.
Another way to evaluate a determinant is to choose any non-zero element as a pivot (A) and replace D from all possible rectangles A, B, C, D (where D is not in the pivot row or column) by the determinant A*D - B*C. This eliminates the pivot row and column and thus reduces each dimension of the array by 1. Repeat that until one dimension is one. The resulting scalar or vector is too large by a scalar factor which is the product of all pivots, each raised to a power two less than the smaller dimension of the array to which it is applied..
detP(Det, N):- detP([], Det, N).
detP([_|Pivots], UnNormal, Normal):- UnNormal = [[X]|_], !, mapI(ptoN, 1, Pivots, Cs), foldr(times, 1, Cs, Coeff), map(normalize(Coeff), UnNormal, Normal). % Normal is singleton if Det square detP(Pivots, Det, N):- Det = [Row1|Rows], pivot(Row1, 1, PivCol, A), % choose Pivot (A) Map = lambda(X, X =\= PivCol), filterI(1, Map, Row1, Bs), % Bs is row1 without the pivot map(nth(PivCol), Det, [_|Cs]), % Cs is pivot column without the pivot minor(Det, 1, PivCol, M), % pivot minor M, not always square map2(abcds(A, Bs), Cs, M, MM), % for each row detP([A|Pivots], MM, N).
This method is more efficient than Laplace expansion.
Notice that the above description of pivotal condensation admits the possibility of non-square arrays.
Consider the matrix representation of a set of n simultaneous equations:
AX = K
where A is the square array of coefficients, X is the column vector of unknowns and K the column vector of constants.
Form a new array :
|A -K| | I |
where A is consolidated on the right by -K and |A -K| is consolidated below by the conforming unit matrix I.
Pivotally condense this array n times to a vector C, which is n+1 long, containing the n solutions plus a scale factor. Divide through by that factor and truncate C to n. All these operations are coded into the routine solveSE/3, which needs just A and K to return C.
Because the condensation scale factor is different in this case than that for determinants the condensation is recoded, but remains essentially the same.


@Maptimesoton
Maptime exists because community, inclusivity, and accessibility are important and necessary components of positive learning experiences.


Test your application
Creating automatic test suites for your application is a good way to make it robust. It allows you to work in a very agile way.
Play tests are built using JUnit 4 or Selenium depending what you want to test.
Escrevendo testes
The tests must be created in the test/
directory. This folder will only be added to the sources path when the application is run in test
mode. You can write 3 different kinds of tests.
Unit test
A unit test is written using JUnit. In this kind of test you can test the model of your application (including some utilities).
Here is an example of a Unit test:
import play.test.*;
import org.junit.*;
public class MyTest extends UnitTest {
@Test
public void aTest() {
assertEquals(2, 1 + 1); // A really important thing to test
}
@Test
public void testUsers() {
assertEquals(3, Users.count());
}
}
Functional test
A functional test is written using JUnit. In this kind of test you can test your application by accessing directly the controller objects.
Here is an example of a Functional test:
import play.test.*;
import play.mvc.*;
import play.mvc.Http.*;
import org.junit.*;
public class ApplicationTest extends FunctionalTest {
@Test
public void testTheHomePage() {
Response response = GET("/");
assertStatus(200, response);
}
}
Using the renderArgs()
method, you can also get direct access to the arguments passed to the view, instead of having to make assertions about the response itself. For example:
@Test
public void testUserIsFoundAndPassedToView() {
Response response = POST("/user/find?name=mark&dob=18011977")
assertThat(renderArgs("user"), is(notNullValue());
User user = (User) renderArgs("user");
assertThat(user.name, is("mark"));
}
Selenium test
Acceptance tests are written using Selenium. Here you can test your application by running it in an automated browser.
Selenium tests are written using HTML tables. You can either use this native syntax or use the #{selenium /}
tag.
Here is an example of a Selenium test:
#{selenium 'Test security'}
// Try to log in the administration area
clearSession()
open('/admin')
assertTextPresent('Login')
type('login', 'admin')
type('password', 'secret')
clickAndWait('signin')
// Verify that the user in correctly logged in
assertText('success', 'Welcom admin!')
#{/selenium}
Because Selenium tests are run within your browser access to emails sent by the mock email and to String values placed in the Play Cache must be made using extensions to Selenium.
Here is an example of accessing the most recent email sent to a specific email account:
#{selenium 'Test email sending'}
// Open email form and send an email to boron@localhost
open('/sendEmail')
assertTextPresent('Email form')
type('To', 'boron@localhost')
type('Subject', 'Berillium Subject')
clickAndWait('send')
// Extract the last email sent to boron@localhost into a JavaScript
// variable called email
storeLastReceivedEmailBy('boron@localhost', 'email')
// Extract the subject line from the email variable into a variable
// called subject
store('javascript{/Subject:\s+(.*)/.exec(storedVars["email"])[1]}', 'subject')
// Test the contents of the subject variable
assertEquals('Berillium Subject', '$[subject]')
#{/selenium}
Here is an example of accessing a String stored in the Play Cache (for example the correct answer to a CAPTCHA):
#{selenium 'Get string from cache'}
open('/register')
assertTextPresent('Registration form')
type('Email'<EMAIL_ADDRESS>type('Password', 'secretpass')
type('Password2', 'secretpass')
// .. Fill in the registration form ..
// Get the value of the magicKey variable from the cache
// (set to the CAPTCHA answer in the application)
storeCacheEntry('magicKey', 'captchaAnswer')
// Type it into the form
type('Answer', '$[captchaAnswer]')
clickAndWait('register')
#{/selenium}
Fixtures
When you run tests, you need to have stable data for your application. The simplest way is to reset your database before each test.
The play.test.Fixtures
class helps you to manipulate your database and to inject test data. You typically use it in a @Before
method of a JUnit test.
@Before
public void setUp() {
Fixtures.deleteDatabase();
}
To import data, it is simpler to define them in a YAML file that the Fixtures helper can automatically import.
# Test data
Company(google):
name: Google
Company(zen):
name: Zenexity
User(guillaume):
name: guillaume
company: zen
And then:
@Before
public void setUp() {
Fixtures.deleteDatabase();
Fixtures.loadModels("data.yml");
}
You can read more about Play and YAML in the YAML manual page.
For Selenium tests, you can use the #{fixture /}
tag:
#{fixture delete:'all', loadModels:'data.yml' /}
#{selenium}
// Write your test here
#{/selenium}
Sometimes it is convenient to split data into several YAML files. You can load fixtures from multiple files at once:
Fixtures.loadModels("users.yml", "roles.yml", "permissions.yml");
and for Selenium tests:
#{fixture delete:'all', loadModels:['users.yml', 'roles.yml', 'permissions.yml'] /}
Rodando os testes
To run the tests, you must run your application in test
mode using the play test
command.
# play test myApp
In this mode, Play will automatically load the test-runner
module. This module provides a Web based test runner, available at the http://localhost:9000/@tests URL.
When you run a test, the result is saved into the /test-result
directory of your application.
On the test runner page, each test is a link. You can ‘right click’ and ‘Open in a new tab’, to run the test directly outside of the test-runner.
When you run tests this way, Play will start with a special test
framework ID. So you can define special configurations in the application.conf
file.
If you want several different test configurations, you can use framework IDs matching the pattern test-?.*
(e.g: test-special
).
If you use a framework ID other then the default test
, you must make sure ALL test configuration in application.conf
is available with that framework ID. When launching test with special test framework ID you do it like this: play test --%test-your-special-id
For example:
%test.db=mem
%test.jpa.ddl=create-drop
Integração contínua, and running the tests automatically
The auto-test
command does the same as the test
command, but it automatically launches a browser, runs all the tests, and stops.
This is a useful command if you want to set up a continuous integration system;
After the run, all results are saved to the /test-result
directory. Moreover, this directory contains a marker file (either result.failed
or result.passed
) for the test suite’s final result. Finally, this directory contains all the logs, in an application.log
file.
So setting up a continuous integration system to test your application, could be:
- Checkout the latest version of your application
- Run
play auto-test
- Wait for the end of the process
- Check for the marker file
result.passed
orresult.failed
in the/test-result
directory
Run these steps in a CRON tab, and you’re done!
You can change the web browser compatibility mode used by the headless browser by configuring headlessBrowser.
Continuing the discussion
Next: Security guide.


Ayumi's portfolio page
ABOUT
WORK
CONTACT
AYUMI SAITO
A CREATOR / DEVELOPER / DREAMER
My Projects
A Travel blog
A Study blog
Contact
Social Media
Twitter
Linkedin
Github
Name:
E-mail:
Comment:


{% extends 'layouts/layout.html' %} {% block pageTitle %} About - NHS.UK prototype kit {% endblock %} {% block beforeContent %} {{ breadcrumb({ items: [ { href: "/diat/home", text: "Home" }, { href: "/diat/assessment", text: "Assessment" } ], href: "/diat/service-health-check", text: "Service health check" }) }} {% endblock %} {% block content %}
Format: Workshop
Length: 2 to 3 hours
Discover where your service is against the Digital Service Standard.
We’ll provide feedback and advice on developing your service. Follow-up advice is also available.
Email # for more information, to talk to a subject matter expert, or to book.


CREATEDB
Section: PostgreSQL Client Applications (1)Updated: 2012-08-14
Index Return to Main Contents
NAME
createdb - create a new PostgreSQL databaseSYNOPSIS
createdb [ option... ] [ dbname ] [ description ]
DESCRIPTION
createdb creates a new PostgreSQL database.
Normally, the database user who executes this command becomes the owner of the new database. However a different owner can be specified via the -O option, if the executing user has appropriate privileges.
createdb is a wrapper around the SQL command CREATE DATABASE [create_database(7)]. There is no effective difference between creating databases via this utility and via other methods for accessing the server.
OPTIONS
createdb accepts the following command-line arguments:
- dbname
- Specifies the name of the database to be created. The name must be unique among all PostgreSQL databases in this cluster. The default is to create a database with the same name as the current system user.
- description
- Specifies a comment to be associated with the newly created database.
- -D tablespace
- --tablespace tablespace
- Specifies the default tablespace for the database.
- -e
- --echo
- Echo the commands that createdb generates and sends to the server.
- -l locale
- --locale locale
- Specifies the locale to be used in this database. This is equivalent to specifying both --lc-collate and --lc-ctype.
- --lc-collate locale
- Specifies the LC_COLLATE setting to be used in this database.
- --lc-ctype locale
- Specifies the LC_CTYPE setting to be used in this database.
- -E encoding
- --encoding encoding
- Specifies the character encoding scheme to be used in this database. The character sets supported by the PostgreSQL server are described in in the documentation.
- -O owner
- --owner owner
- Specifies the database user who will own the new database.
- -T template
- --template template
- Specifies the template database from which to build this database.
The options -D, -E, -l, -O, and -T correspond to options of the underlying SQL command CREATE DATABASE [create_database(7)]; see there for more information about them.
createdb also accepts the following command-line arguments for connection parameters:
- -h host
- --host host
- Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket.
- -p port
- --port port
- Specifies the TCP port or the local Unix domain socket file extension on which the server is listening for connections.
- -U username
- --username username
- User name to connect as.
- -w
- --no-password
- Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.
- -W
- --password
-
Force createdb to prompt for a
password before connecting to a database.
This option is never essential, since createdb will automatically prompt for a password if the server demands password authentication. However, createdb will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt.
ENVIRONMENT
- PGDATABASE
- If set, the name of the database to create, unless overridden on the command line.
- PGHOST
- PGPORT
- PGUSER
- Default connection parameters. PGUSER also determines the name of the database to create, if it is not specified on the command line or by PGDATABASE.
This utility, like most other PostgreSQL utilities, also uses the environment variables supported by libpq (see in the documentation).
DIAGNOSTICS
In case of difficulty, see CREATE DATABASE [create_database(7)] and psql(1) for discussions of potential problems and error messages. The database server must be running at the targeted host. Also, any default connection settings and environment variables used by the libpq front-end library will apply.
EXAMPLES
To create the database demo using the default database server:
$ createdb demo
To create the database demo using the server on host eden, port 5000, using the LATIN1 encoding scheme with a look at the underlying command:
$ createdb -p 5000 -h eden -E LATIN1 -e demo CREATE DATABASE demo ENCODING 'LATIN1';
SEE ALSO
dropdb(1), CREATE DATABASE [create_database(7)]
Index
This document was created by man2html, using the manual pages.
Time: 05:29:02 GMT, December 24, 2015


Do you have questions, suggestions or requests/ideas for additional content? I would love to hear from you! Feel free to share whatever is on your mind and I will do my best to accomodate every request and answer every question. Check out the links to additional information first!


For a more comprehensive guide, visit our main website.
| Command | Description | Format |
|---|---|---|
| Add | Creates a new task and add it to our list. | add NAME [by DEADLINE] [from START_TIME to END_TIME] [repeat PATTERN FREQUENCY] [tag TAG...] |
| List | Lists out only certain tasks that fulfill criterias/filters. | list [TYPE...] [by DEADLINE] [from START_TIME] [to END_TIME] [tag TAG...] [sort SORTING_ORDER] |
| Show | Further filters the listed tasks by criterias/filters. | show [TYPE...] [on DATE] [by DEADLINE] [from START_TIME] [to END_TIME] [tag TAG...] |
| Hide | Excludes certain tasks that met the criterias/filters. | hide [TYPE...] [on DATE] [by DEADLINE] [from START_TIME] [to END_TIME] [tag TAG...] |
| Find | Searches tasks with given certain name (this will work even if you do not know the entire full name). | find KEYWORD... |
| Update | Changes details pertaining to a task. | update INDEX [name NAME] [by DEADLINE] [from START_TIME to END_TIME] [repeat PATTERN FREQUENCY] [tag TAG...] |
| Complete | Marks a task as done. | complete INDEX |
| Delete | Removes a task from the list. | delete INDEX |
| Undo | Reverses the action(s) made by you. | undo [last STEPS] |
| Redo | To "reverse" the undo. | redo [last STEPS] |
| Clear | Removes all tasks from the list. | clear |
| Switch List | Opens another task list (if it does not exist, a new task list will be created). | switchlist FILENAME |
| Rename List | Renames the current task list. | renamelist FILENAME |
| Relocate | Moves all task lists to a different folder/directory. | relocate PATH |
| Collapse | Shrinks all tasks into a single row, only showing the name of the tasks. | collapse |
| Expand | Reveals the details for all the tasks. | expand |
| Calendar | Changes the view of the calendar on the right side of the UI. | calendar day|week|today |
| Help | Displays this screen. | help |