text:
---
layout: post
title: "Working from home with kids - Hear how these dads make it work. "
permalink: "/media/technews/working-from-home-with-kids"
category: technews
image: "/images/technews/fathersday-01.png"
---
Once upon a time, dads were not expected to be as involved in their children’s upbringing as moms. Today, however, fathers are much more hands on and taking on more domestic duties. The work from home arrangement in the last year or so have also given working dads more time to spend with their kids.

This Fathers’ Day, let’s hear from three dads – Loh Shi Wei, Eden Seah and Mehul Shah – on how they juggle their public service careers with their role as fathers.

---

![GovTech Dads!!](/images/technews/fathersday-01.png)
*Our GovTechies Eden, Shi Wei and Mehul share how make WFH work in this Fathers' Day Special! PHOTO: GOVTECH*

### **First off, tell us more about what you do at GovTech?**

**Shi Wei:** Both Eden and I belong to the Services Group, which means we are GovTechies that are deployed to other government agencies to help build up their ICT systems and capabilities. I’m the Agency Chief Information Security Officer (ACISO) at the Singapore Land Authority (SLA). I oversee the information security management of the agency and am also responsible for the planning, development and implementation of information security strategies and policies in line with regulatory requirements and whole-of-government direction.

**Eden:**
I sit at the Ministry of Education (MOE) as an Application Infrastructure Engineer and handle ICT and cybersecurity governance. Mostly I will review MOE’s IT systems and environment and provide advice on protecting systems and data against cyber and internal threats.

**Mehul:**
I am a Manager in Government Digital Services division – the team that creates many digital services and products for our citizens and businesses in Singapore. I help the team with product marketing and engagement for TraceTogether. I also support internal communications efforts within the division. Since earlier in the year I’ve been picking up UX (User-Experience) design as well, on the HealthCerts project.

### How would you describe yourself as a father?

**Eden:** I’ve only become a father last year; my daughter is now 8 months old. Since becoming a father, I feel a deep yearning to see my daughter every day and watch her grow.

**Shi Wei:** I think I’m a chill father as I allow my children the room and space to explore and learn new things at their own pace rather than worrying if they are lagging behind other kids of the same age group.

**Mehul:**  Apart from the typical guidance role, I enjoy being his friend, and partner-in-crime in cheeky or crazy activities! My son’s a ball of fun and spending time with him energises me.

### **Has your role as a dad changed since Covid-19 struck and work from home began? How have your teammates supported you during this time?**

**Shi Wei:**  I do not see much changes to my role as a father except that I am spending more time at home and am able to witness my childrens’ growing up milestones. The pandemic has given me the opportunity to bond with my children more, which is something I am grateful for. It has been a trying time for everyone, but I am grateful to my bosses and teammates for their support during the times when I needed to take some time out to take care of my children when they are unwell and cannot attend school. They have been very understanding.

**Mehul:** Agree with Shi Wei, my teammates and bosses have also been very understanding during this period. I am very grateful for that!

**Eden:**  My daughter was born when COVID-19 struck. Work from home became the new norm and I had the opportunity to spend more time with my daughter. Like Shi Wei, I see this as a blessing in disguise.

My teammates have been very supportive and reassuring. They give me the confidence to take time off to look after my daughter when needed as they help to cover some of my duties.

### **What’s a typical day like for you when working from home? And do you struggle with balancing full-time work with giving your kids daily attention?**

**Mehul:** I start my day by helping my boy get ready before sending him to playgroup. I would then return home to start planning out the tasks to work on for the day prior to meetings or checking emails.

It isn’t that hard to balance between work and my kid, because most times he’s in playgroup on the weekdays. However, if he’s at home then it’s about prioritising less urgent tasks for later and spending that time with him to play or keeping him company as he plays. Sometimes I have to remind myself while working, to cherish those fleeting moments with him as he grows up fast!

**Shi Wei:**  I start my day at 7.30am in the morning to prepare my elder son for school and will send him to school by 8.30am. I will then have a quick bite and start my workday. Lunch break is spent with my wife (who is also working from home). I will typically stop my work at about 6pm to pick up my elder son from school and have a good dinner with my family at about 7pm. I devote the remaining time to my family after that before helping the kids to bed at about 10pm.

While this sounds neat and organised, in all honesty, it can be really challenging at times, especially if my elder son is at home. He will tend to come into my room where I work and ask me to play with him. In such instances, if possible, I will take about 15 minutes off my work and give him some attention before resuming my work.

**Eden:**  I will be working alongside my wife in the study room during working hours, while sneaking in some time during work to have small chats and play with my daughter. After work hours, I usually spend the rest of the evening with my wife and daughter over dinner and more playtime.

It must be hard for my daughter to be away from her parents during the day when she is most active and wanting to spend time with us. At times we can hear her crawling to the door and knocking it as if she is calling out to us.

### Sounds like quite a handful to handle. Do you take “me time”? If so, what do you enjoy doing?

**Eden:** I do evening runs or high-intensity workout sessions. I also enjoy watching Japanese anime and shows on Netflix.

**Shi Wei:**  I definitely do “me time”! It is important to have “me time” as a way of relieving stress and staying sane, more so during this pandemic. It is also a way to recharge and refresh my mind and gather my thoughts. I enjoy building something out of Lego and playing games on my mobile during this time.

**Mehul:** My favourite time of the day is when I get to relax with lo-fi music. Recently, I have also been enjoying outdoor walks with friends.

### **You guys seem to have it all together. Any top tips for your fellow fathers to achieve balance of work and kids?**

**Mehul:**  I’ll share a quick story, there was one time, my son was going through a reel of washi tape while I was on call. He was sticking it on himself, the walls, all around the house! He somehow also has the uncanny timing of coming into the room whenever I am in a call. There highs and lows of fatherhood, but it is important to appreciate all these moments and make time for their growing up years.

**Eden:**  As a new father, I think balance can be achieved with supportive family and a wife who shares the difficulties and joys of raising our kids. To all the dads out there, share the Father’s Day happiness with your wife who is also juggling both work and raising our children.

**Shi Wei:** Not sure if these are top tips, but they work for me. One, always make time for the little things such as having meals together with the kids (without the distractions of the phone / tablets) and everyday interactions such as sending them to and picking them up from school. Two, know what’s truly urgent and important. Work can be urgent and important, but your kids' growing up milestones are just equally important. Once you miss those milestones, you will never have them back again

### Finally, what are the joys that being a father brings to you?

**Mehul:** Watching him grow, discover and learn new activities or skills. The fact that you would feel instantaneously refreshed to see him even after a seemingly tiring day.

**Eden:**  I guess every parent melts at their childrens’ smiles. My joy comes from my daughter’s smiles and giggles whenever she sees me walking out of the study room.

**Shi Wei:** Seeing my kids grow up healthily and happy. The smiles on their faces can really make me forget about any stress or troubles that I am facing.

*Kudos to all fathers who wear many hats in their daily lives and for keeping a strong front before your families and colleagues. A good support system is important, and we hope that you have found time for yourself and enjoy the special moment you currently share with your children. Happy Father’s day!*

repository: isomerpages/isomerpages-govtech

branch_name: refs/heads/staging

gha_language: SCSS

repo_name: isomerpages/isomerpages-govtech


text:
# Join a Lambda Function to a VPC to obtain a Static IP

Cloudformation template that will create and join a Lambda function to a newly created VPC in order to obtain a fixed outgoing (Egress) IP address.

Template will invoke the following:

- Create a new VPC
- Create 2x Public Subnets
- Create 2x Private Subnets
- Create 2x Elastic IP Addresses
- Create 2x NAT Gateways
- Create an Internet Gateway
- Create 2x public subnet routing tables
- Create 2x private subnet routing tables
- Create a new lambda function
- Attach the lambda function to the newly created VPC

repository: awslabs/aws-cloudformation-templates

branch_name: refs/heads/master

extension: md

gha_language: Python

license_type: permissive

repo_name: awslabs/aws-cloudformation-templates


text:
JeffPD
======

A professional development website for teachers at Inwood Academy for Leadership Charter School.

Livesite is viewable here: [www.jeffpd.com](http://www.jeffpd.com)

Site serves two major purposes:
1. Hosts professional development resources for teachers to learn about Educational Technology tools and strategies
2. Allows EdTech coaches to log notes about their coaching sessions with teachers.

license: MIT

repository: jeffthemaximum/jeffPD

repo_name: jeffthemaximum/jeffPD


text:
### Request

```java
curl -X POST "http://localhost:8080/api/save-instructors" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"address\": \"Istanbul\", \"instructorName\": \"Mustafa\", \"phoneNumber\":<PHONE_NUMBER>12, \"salary\": 200, \"type\": \"VisitingResearcher\"}"
```

### Response

```java
{
  "type": "VisitingResearcher",
  "id": 14,
  "instructorName": "Mustafa",
  "address": "Istanbul",
  "phoneNumber": "555444342312",
  "Courses": [],
  "salary": 200,
  "courses": []
}
```

##### Response headers

```java
 connection: keep-alive
 content-type: application/json
 keep-alive: timeout=60
 transfer-encoding: chunked
```

repository: OzanClk/fifth-homework-OzanClk

branch_name: refs/heads/main

repo_name: OzanClk/fifth-homework-OzanClk


text:
---
title: Blog 2
layout: post
author: marcus.monteiro
permalink: /blog-2/
source-id: 1L59TRExVD_JfcwJPYoOKA7IuwYQ8_Bt6Gb5CW_NaTGk
published: true
---

    Title
    Blog 2
    Date
    01/01/01

    Starting point:

    Target for this lesson?

    Did I reach my target?

    How did you use your learning habits this week?

    Persevering
    After about half an hour, I found out why I could not change my background.

    Questioning?

    Independence
    I found out how to fix my background on my own.

    Reflecting

    Engagement

    What could have gone better in your learning?

    If I had corrected my test blog as it didn't publish properly! I also need to fix some style.scss.

    What changes do you need to make to improve your learning next time?

    Check everything before I publish my blog so that it can run smoothly and show up on my web page instead of failing to show up.


text:
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 0.1.0 (2021-10-27)

### Features

* **eslint-plugin-ryanair-typescript:** Rename the new eslint plugin ([402eee7](https://github.com/Ryanair/linters/commit/402eee7fe317830534e03a69851d1faf3d2919c9))

repository: Ryanair/linters

gha_language: JavaScript

gha_license_id: MIT

repo_name: Ryanair/linters


text:
Chess
=====
![Travis CI](https://travis-ci.org/Newbrict/Chess.svg?branch=master)

I've decided to stop working on this, it's a near-fully functional
client side chess engine ( just missing what's mentioned on the issues ) written
in coffeescript.

If there's any interest I will continue, otherwise other things will be made :)

Contributing
---

Keep your code pretty :)

```
git clone git@github.com:Newbrict/Chess.git
cd Chess
npm install
gem update --system
gem install compass

# If you don't have grunt
npm install -g grunt-cli

grunt serve

grunt test
```

repository: Newbrict/Chess

repo_name: Newbrict/Chess


text:
---
layout: post
title: Implementing resource based authorization in GraphQL
tags: csharp graphql
---

Late last year I wrote about [Securing a GraphQL endpoint][previous], using [ASP.NET Core policy based authorization][policy].

The short version of this is that we can create authorization policies and use [Hot Chocolate][hc] to apply those policies to fields in our schema. If the current user cannot fufill those policy requirements then the execution of that field is stopped and `null` is returned. It's impotant to note that this doesn't stop the entire query but just the field in question.

## What is "resource based authorization"?

All of the examples used in the above articles we can think of "declarative authorization" where able to simply annotate the schema with our authorization requirements.

Sometimes however we need to take into account the data (or resource) in question needs to be taken into account. Microsoft terms this [resource based authorization][resource] or "imperative authorization".

Examples of this include:
- Only the author of the document can edit it.
- When viewing customer details if they are a minor then a specific permission is required.

You'll notice that in that article the solution involves adding code to particular MVC actions to enforce thse policies.

## An implementation in GraphQL

### Authorization in the resolver

We can follow a similar implementation model in GraphQL as shown in the above article in MVC. This would be how we add the policy evaluation is the resolver for the field.

``` csharp
public async Task<Document> GetDocument(IResolverContext context, Guid documentId)
{
    // Hot Chocolate pushes the current user into `ContextData`
    var user = (ClaimsPrincipal) context.ContextData[nameof(ClaimsPrincipal)];

    var document = await _repository.Find(documentId);

    var authResult = await _authorizationService.AuthorizeAsync(user, document, "EditPolicy");

    return authResult.Succeeded ? document : null;
}
```

In this code we can reuse the requirement and requirement handlers in [the article][resource] which is quite nice.

### Creating a more reusable policy

We can implement this in another way in [Hot Chocolate 11][hc] which I think puts in a better place, the change they've added is an option to the `@authorize` directive which controls whether the policy evaluation occurs before or after the resolver (the only and now default behavior was before the resolver).  This coupled with the fact that Hot Chocolate injects the `IDirectiveContext` as the reource being evaluated.

We can then modify the requirement handler as follows, here we look at the result of the resolver to get the document and run the same check as we did before.

``` csharp
public class DocumentAuthorizationHandler :
    AuthorizationHandler<SameAuthorRequirement, Document>
{
    protected override Task HandleRequirementAsync(AuthorizationHandlerContext context,
                                                   SameAuthorRequirement requirement,
                                                   IMiddlewareContext middleware)
    {
        if (middleware.Result is Document document && context.User.Identity?.Name == document.Author)
        {
            context.Succeed(requirement);
        }

        return Task.CompletedTask;
    }
}
```

We can now apply our "imperative policy" is a declarative fashion as follows.

``` graphql
type Query {
    document(id: ID!): Document @authorize(policy: "EditPolicy", apply: AFTER_RESOLVER)
}
```

One of the major benefits of this approach is I can then easily apply this policy on multiple fields in our schema rather than having to go through our entire code base and inject the code. Even more useful is the ability to apply the directive to types which applies the policy to all fields on the type.

## Conclusion

With the changes in Hot Chocolate 11 controlling when authorization directives are applied can let use build policies that implement "resource based authorization" in way that can be used across the entire schema.

[hc]: https://chillicream.com/
[policy]: https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-5.0
[resource]: https://docs.microsoft.com/en-us/aspnet/core/security/authorization/resourcebased?view=aspnetcore-5.0
[previous]: https://compiledexperience.com/blog/posts/securing-graphql

gha_language: HTML

gha_license_id: NOASSERTION


text:
### [CVE-2020-36211](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-36211)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

An issue was discovered in the gfwx crate before 0.3.0 for Rust. Because ImageChunkMut does not have bounds on its Send trait or Sync trait, a data race and memory corruption can occur.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/Artisan-Lab/Rust-memory-safety-bugs

repository: trickest/cve

repo_name: trickest/cve


text:
# auth0-aws
An API based solution to the soon-to-be-deprecated aws delegation endpoint in Auth0

## Getting Started
This is a serverless application that constructs and deploys an API gateway endpoint and lambda function using cloudformation.
It includes 1 simple role example that grants list permission to s3 buckets. Any role which that you wish to assume this way must include policy with sts:AssumeRole action for lambda service

```
> npm install -g serverless
> npm install
```
Modify the ```dev.settings.yml``` file to match your environment/configuration.

To deploy the endpoint
Assuming you have AWS CLI and credentials
```
> sls deploy
```

Create an API in Auth0 and add a scope with the format "assume:<role_name>"
Once deployed, hit the API endpoint with an API access token acquired from Auth0 with the given scope and you will receive a response containing the sts result
e.g.
```javascript
{
		 AssumedRoleUser: {
		  Arn: "arn:aws:sts::123456789012:assumed-role/demo/Bob",
		  AssumedRoleId: "ARO123EXAMPLE123:Bob"
		 },
		 Credentials: {
		  AccessKeyId: "<REDACTED_AWS_ACCESS_KEY>",
		  Expiration: <Date Representation>,
		  SecretAccessKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
		  SessionToken: "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA=="
		 },
		 PackedPolicySize: 6
}
```

## ToDo
* This currently just demonstrates assuming a single role. It needs to be able to assume any role that the user has a scope for
* Would be nice to externalise the role definition(s) so this can be consumed without changing project files
* A bit more doco filling in the assumed knowledge.
* Testing


text:
Description
===========
Moonraker is a simple build system I use to define common tasks (such as packaging a .love file).

```moonscript
default "echo"

where = windows! and where or which

desc "Find moon's path"
task test: =>
  "MOON_PATH: " .. where "moon" -- results returned from a task are printed to screen

desc "List some stuff"
task dir: "test", =>
  cd, status = echo "%CD%" -- calls to any unknown global will os.execute and return the result (string) and status code (number)
  "PWD: " .. cd

desc "Echo some useless information"
task echo: {"test", "dir"}, =>
  echo "doing echo"
```

Usage
==================

Simply call moonraker. Without any arguments it will call the default task from the .moonraker file. The first argument is an optional file, the second is the task to run.

repository: szensk/moonraker

repo_name: szensk/moonraker


text:
### [CVE-2022-39007](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-39007)
![](https://img.shields.io/static/v1?label=Product&message=EMUI&color=blue)
![](https://img.shields.io/static/v1?label=Product&message=HarmonyOS&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3D%2012.0.0%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Version&message=%3D%202.0%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Permission%20verification%20bypass%20vulnerability&color=brighgreen)

### Description

The location module has a vulnerability of bypassing permission verification.Successful exploitation of this vulnerability may cause privilege escalation.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/karimhabush/cyberowl


text:
# ModBus-Websocket prototype

Proof of concept about reading registers from modbus device into a browser with websockets.

Simple nodejs project with two dependencies:
* modbus-serial
* websocket

Comes with  HTML file to read the values from websocket (charts based on Smoothie Charts).

The server reads the same 3 registers each second and broadcast it to all clients.

## Usage

First: `npm install`, then...

### Server

Two modes are available: connected or faked (debug/offline mode).

`node index.js <host> <slave_id>`

Establish a TCP connection and read the register 40150, 40151, 40152 (based on Schneider Electric ION 7650 register map). Respectively Ia, Ib, Ic.

`node index.js debug`

Fake a ModBus provider and throw random values.

### Client

Open `index.html` in a browser (tested with Firefox and Chrome) and look at the values.

repository: gcolajan/modbus-poc

repo_name: gcolajan/modbus-poc


text:
# Project 5 - Encryption

Time spent: 10 hours spent in total

## User Stories

The following **required** functionality is completed:

1\. Symmetric Encrypt/Decrypt
  * [x]  Required: Repair the symmetric encrypt and decrypt code

2\. Encrypted Message 1
  * [x]  Required: Decrypt the government message
  * [x]  Required: Encrypt a response and include in this README:
         6VN4dY3iQ67fZDiTsB2rMYgb+yDFRjJp3mBSqeHma4g=

3\. Generate Public-Private Keys
  * [x]  Required: Repair the key generator code
  * [x]  Required: Generate keys for "johnsteed" and add him to the Agent Directory

4\. Asymmetric Encrypt/Decrypt
  * [x]  Required: Repair the asymmetric encrypt and decrypt code

5\. Create/Verify Signature
  * [x]  Required: Repair the create and verify signature code

6\. Encrypted Message 2
  * [x]  Required: Decrypt the message
  * [x]  Required: Verify the message
  * [x]  Required: Include a response message in this README:

         Body:
          2jGwnk1W6qf1qyWjTcaI+CSQE1joDe8k+15JGlEM8iEFZQE3Beq9EC1cALwbs90LZX5VyurDSg1Si84teXz76RQ5dV3u3TnWJ4XpaBJQRpvjJ+XSGbmcBc3SE2UcUH9hYOWjiNY7FYShfL4w5bHwzF9kBW4lX96QoKvDXteOFCqolRce6afyzHc1yKsQuzkK4iZ9vwZFE19UhNPidKTJiRKtEi3tBnOG1Kj69O1hCnWH2uduX9cNCbw3dEtAstTr60mQ7vIqbCI+aD8harQZH0F4X17eEChhkvvOx7BPHmjTtOzFNHyxzRSlR9LZUUTUTcMVNpLaV1q01pG2PHwubA==

         Public Key:
          -----BEGIN PUBLIC KEY-----
          MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqimZ9ohXVGxlzSBUf59q
          PzjUWPthuhrAhPANKtxX7dir0FS/6Y5IFqrWKSxNKPEPW8kapD89HjUCE1Qm9eak
          MoOP0zKj/TDOjvvJdWeG2qUUzdXoP1o+IjbQU+At6t9qsYt6Uqn92l/p9lFmbsFs
          8p5STM1sc/uvirPPTA/l8amOA5ZUIvBli7TGiT1XUxEJt6MfO7eWrsnqrbo+diam
          6fGcBd/JHyG5PV1m1UUHgLR3B0LMGH7iIkETvcCzTrlMM4RieGdKugvyyf31g30p
          Op/MbbRFiT0sdZHJoJqgUlIhr0ydCBJ0et4BT3mGos1kte0M+ZTE5orxj0Xn3U5w
          3QIDAQAB
          -----END PUBLIC KEY-----

         Signature:
          ICXMD8by9ch8HhJZRXrpb4NMdFwVmzjOV1gDBggwGcZe1vS4HGus/mHCONP2R6dcIRoXPamPgPIDCzPz6qnAJq5GFXv7wy3G6++ChJc+KvhwAxszil02UNV+cz6/ZaYwlafLbW77r5HR1JQqwCnh2othq1k5fQ4x6t+RFeYESIqAYa2SU8Mj5U3BlhG2vrd7K9N2P1nIoFBfZ4chYi4kuwlDyKIsD11PBoeVrmj2p1gRF9rSsOiEArG3qP6/1+FloqWAg2GqDwtQ5I6hFiUGb/MUTPUJoyvxLSdXrTGAxeTbGexYXCzV0xX7LPuyGv5+vat2E0BHJYHDSODYPQOBgA==

7\. Agent Messages
  * [x]  Required: Repair the dropbox code
  * [x]  Required: Repair the messages area
  * [x]  Required: Display encrypted messages for all agents
  * [x]  Required: Messages indicate whether the message signature is valid
  * [x]  Required: Your messages are automatically decrypted

8\. Identify the Double Agent
  * [x]  Required: Decrypt as many email messages as possible
  * [x]  Required: Identify the double agent: Natasha

The following objectives are **optional**:

* Bonus Objective 1\.
  * [x ]  Track down the bugs in the code and fix them.

* Bonus Objective 2\.
  * [x]  Write a report of your discoveries (longer than 300 characters).
  * [x]  Compose a secure email for sending over an insecure network.
  * [x]  Include the email with your encrypted report in this README:

        To: apex_hq
        From: agent_99
        Subject: Bugs Report

        Key: XDSNpJs8R0vZ9wsVD8RCn4EpdHDZHIXB41Axbx4ewQ6CkJKzH8IsZZ6bb/Qs7uSXDcQId8Lb4zQirhYSOQ/5IDR4Z91Y0oWhSkLb77ppUQDA9/E7ahLrfSX1SXxlqv8rsSedVeu2WcUv/9u9Js8wRiEzZ0zlpI0NUc1zpj/fzGLIYOdpmxknG6BClqToe1xO308AB8643K45HUDBGI2M5XhGav5a96dDCyfCBwmlK28r4ROBxZJGAIId4h460SvXwbKdDcuxMLLWG8GK2vJt0Qld4CNieoKCZxZZa5PqB5jenLVBKFpEmM6J6xxHgol/TeT6qNz8c9qIskCrKdr+tg==

        Encryted Message: oiNCLnOOemWXjPZ3dJ43CQ4goHrGJF0CX95VzosQ0K2VRn/gInEohcmbIO0A0YgQFhzLjH7U9uDdunJhXzsQkmwbgjOetwBubpsxTH2yRlgDVczkc4JNLjZB3gNYlf7a+V/oUyIk+85zPHw6J1f4I2zvsR7YNr7Lq+8HFHdMGMR13kQA2pOKVHSv061h3bI4kywBmnTTD5jPtx4IAWbSEwMCXz1SXoGdUkpAJ3iO1a7e6bzfx804l91CHXrvs+6kBKlRl2jRboagLFP30d+nPpjOJW2j5H8WDeY0ULdN0S7kqzK74azm4LoUGxLRztXeBos0MYhSzFvCA2F0TzV90htHlijHDb145xl643YNV3ygWAGFnhPiYzb/YcxZmB1p8XJSHHDyitzJcZj8Q0IoKY73h4PzT6Y27MULHnmJUsU9OEvBVzcQfW9YlhG8tdHb

        Signature(Using encryted key and encryted message):
        WQV1/iDTvPpKnXzI35SB6ZZS4wkjJpiTSQY8q7rV+W7+1qZ2WnWW8qp+U64WyLDtFmt4Slj2vOCWD6suKAUvRle4Hp7xXxRmbT/a7lIPXa7e/mqPvJLA241+bsl9XamiftpULkVvgDn/Wt2SaDkXQkOKoQ87whH86UoVm6YXAVKmG9DjYVPNmVUuOyoHJwzfhyR0wDJG0dQNMEg0f7PFE9992lr363HQU42Lfo2naj4ZwU3DPXSBgfKCx3x9f2IzMzJxi+4kkJ2gY/TZjyFIIyYi0jDqIhLHq6l0AMl9KYN6b0Q3N/yPvLJKrhmzY39DmdSt8l7qtY6v35O4flx+hw==

* Bonus Objective 3\.
  * [x]  Add a "Create/Verify Checksum" section to the Encryption Tools area.

* Advanced Objective 1\.
  * [x]  Add support for other symmetric algorithms.

## Video Walkthrough

Here's a walkthrough of implemented user stories:

<img src='http://i.imgur.com/RWkAIqF.gif' title='Video Walkthrough' width='' alt='Video Walkthrough' />

GIF created with [LiceCap](http://www.cockos.com/licecap/).

## Notes

Describe any challenges encountered while building the app.

## License

    Copyright [2017] [Ki Yin Kenny Lam]

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.


text:
## Inference Speed Evaluation

### Update History
* `2019.8.1` inference python code for MXNet-cudnn and TensorRT-cudnn is online.

### Additional Prerequirements
* [onnx](https://onnx.ai/) (pip3 install onnx==1.3.0)
* [pycuda](https://developer.nvidia.com/pycuda) (pip3 install pycuda==2019.1.1 or [install guide](https://pypi.org/project/pycuda/))
* [tensorrt](https://developer.nvidia.com/tensorrt) =5.x (use pip3 to install the corresponding .whl file in python folder)

> CAUTION:
>
> Carefully check the version compatible between CUDA, CUDNN, pycuda, TensorRT and onnx.

### Getting Started
1. (optional) temporally add mxnet python path to env if mxnet is not globally set
2. set `eval_with_mxnet_flag` to True to evaluate with mxnet with cudnn, or with tensorrt with cudnn (cannot run both at the same time due to some conflicts)
3. set `symbol_file_path`, `input_shape` and `real_run_loops`
4. run the script


text:
# Exercices

Here is some exercices to learn a bit more about how Jekyll works. For each of them, I'm gonna explain the purpose of it, then you can start searching [the doc](https://jekyllrb.com/docs/) or google it. I'll add some hints and a link to the answer. When you complete an exercice, take a look at the answser, some time there is more informations.

## List of exercices

- [1. Get the theme files](#1-Get-the-theme-files)
- [2. Add a link to your facebook page](#2-Add-a-link-to-your-facebook-page)
- [3. Change basics infos of your site](Change-basics-infos-of-your-site-and-make-some-defaults-settings)
- [4. Add the categories](#4-Add-the-categories)
- [5. Add a list of authors](#5-Add-a-list-of-authors)
- [6. Be crazy](#6-Be-crazy)
- [Bonus: FTP & Github page](#Bonus)

## 1. Get the theme files

> Difficulty: :red_circle::black_circle::black_circle::black_circle::black_circle:

For these exercices we'll need to changes some lines in the default layout of the minima theme. So the easiest way to do that is to add these files into your folder project rather then have them in your gem folder.

> :bulb: Hint #1: You need a code to **returns** the location of the gem-based theme files.
>
> :bulb: Hint #2: You'll find it in the documentation, in the "theme" chapter.

> :heavy_exclamation_mark: Don't cut the files and folder you'll find, or other website you've created with Jekyll could not work properly anymore.

> :heavy_check_mark: [The answer](/answers/1_theme.md)

## 2. Add a link to your facebook page

> Difficulty: :red_circle::black_circle::black_circle::black_circle::black_circle:

Let's start with something easy. Base on what we already seen, you should be able to add a link to your facebook.

> :bulb: Hint #1: There's already a link to Twitter & Github
>
> :bulb: Hint #2: It's in the `_config.yml` file

> :heavy_exclamation_mark: You have to restart your Jekyll to see the changes made in the `_config.yml` file.

> :heavy_check_mark: [The answer](/answers/2_facebook.md). There is more infos.

## 3. Change basics infos of your site and make some defaults settings

> Difficulty: :red_circle::red_circle::black_circle::black_circle::black_circle:

You just edit the `_config.yml` file, maybe you noticed some other stuff in there... Let's change your title, description and email. Look for your changes.

Now we'll do something usefull for Jekyll-Admin, we'll set some default value, so you can't forget to put the layout.

> :bulb: Hint #1: you're gonna need this [in the doc](https://jekyllrb.com/docs/configuration/front-matter-defaults/)

> :heavy_exclamation_mark: You have to restart your Jekyll to see the changes made in the `_config.yml` file.

> :heavy_check_mark: [The answer](/answers/3_infos.md).

## 4. Add the categories

> Difficulty: :red_circle::red_circle::red_circle::black_circle::black_circle:

We've seen that you can add some categories to your posts, but if you look closely, they're not showing in the front page or in the post itself. And there is no page to show all of them.

Let's fix that.

* Check the doc [here](https://jekyllrb.com/docs/posts/)
* Create a new page for displaying all the categories
* Display the categories of a post in the homepage
* Display the categories of a post in the post page itself

> :bulb: Hint #1: You'll need to create a new html page at the root folder.
>
> :bulb: Hint #2: You'll need this `site.categories`, `post.categories`, `page.categories`,...
>
> :bulb: Hint #3: You'll need to use [Liquid](https://jekyllrb.com/docs/liquid/) templating engine.
>
> :bulb: Hint #4: Take a look at [this tutorial](https://blog.webjeda.com/jekyll-categories/)
>

> :heavy_check_mark: [The answer](/answers/4_categories.md).

## 5. Add a list of authors

> Difficulty: :red_circle::red_circle::red_circle::black_circle::black_circle:

Ok so now that we have some articles in categories, we may want to show the authors of each and a list of authors.

Let's do it.

* Create a new page for displaying all the authors
* Display the author of a post in the homepage
* Display the author of a post in the post page itself

> :bulb: Hint #1: It's almost the same as for the categories. But you'll need to use Data File to stock all the members
>
> :bulb: Hint #2: Check the doc [here](https://jekyllrb.com/docs/datafiles/) but not too quickly at the example

> :heavy_check_mark: [The answer](/answers/5_authors.md).

## 6. Be crazy

> Difficulty: :red_circle::red_circle::red_circle::red_circle::black_circle:

Now that you've seen how Jekyll work and how you can customize it, let's get creative and add a theme and/or plugin(s).

[Install a theme](5_theme.md#Install-a-gem-based-theme)

[Install another plugin](4_plugins.md)

Here is some information about the files of the default minima theme:

Files                                       | What he does
------------                                | -------------
/_includes/diqsus_comments.html             | Display comments from [Disqus](https://disqus.com/) if enable
/_includes/footer.html                      | Display the footer
/_includes/google-analytics.html            | Enable Google Analytics
/_includes/head.html                        | Add <head> tag for all pages
/_includes/header.html                      | Display the header of your theme
/_includes/icon-github.html                 | Tell how the icon of Github should be working (link,...)
/_includes/icon-github.svg                  | SVG for the logo of Github
/_includes/icon-twitter.html                | Tell how the icon of Twitter should be working (link,...)
/_includes/icon-twitter.svg                 | SVG for the logo of Twitter
/_includes/socials.html                     | Display the icons of all socials web site who has been enable
------------                                | ------------
/_layouts/default.html                      | A default template of your pages (html, body, "includes",...)
/_layouts/home.html                         | A default template for the homepage.
/_layouts/page.html                         | A default template for displaying every page.
/_layouts/post.html                         | A default template for displaying every posts.
------------                                | ------------
/_sass/minima.scss                          | The compiled sass file for styling the theme.
/_sass/minima/_bases.scss                   | Sass file with the basics styling (like body, font, h,...)
/_sass/minima/_layout.scss                  | Sass file with everything usefull for the layouts
/_sass/minima/_syntax-highlighting.scss     | Sass file with some syntax higlight for codes

But there can be more of them. It depends on the theme you get. But in brief:

* In `_layouts` you can add all the html you need for creating differents page layout. Imagine you want a post to appear different for a certain category, you can just create a new layout called `post-different.html` and now in your Frontmatter you just need to add `layout: post-different`
* In `_includes` you can add html pages for everything you need to call on your theme and that can be repeated. For example: you want to add a navbar, you can add it to `header.html` or create a seperate file `navbar.html`. If you do a new file, you must add something like this to `default.html`

```liquid
{%- include navbar.html -%}
```

* In `_sass` you put your `.scss` files for the theme.

## Bonus

### Github page

By lack of time, I didn't experiment with Github Pages, but if you want there is plenty of infos in the [official doc of Jekyll](https://jekyllrb.com/docs/github-pages/) and [Github](https://help.github.com/en/articles/setting-up-your-github-pages-site-locally-with-jekyll)

I can't give you support for it.

### FTP

Easy, connect to your FTP and then paste the content of `_site` in the folder you want. If there is a problem with the links, you'll need to edit your `_config.yml`

```yml
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
```

repository: scalajeremy/Jekyll-workshop

repo_name: scalajeremy/Jekyll-workshop


text:
# [Conditional Recurrent Flow: Conditional Generation of Longitudinal Samples with Applications to Neuroimaging](https://openaccess.thecvf.com/content_ICCV_2019/papers/Hwang_Conditional_Recurrent_Flow_Conditional_Generation_of_Longitudinal_Samples_With_Applications_ICCV_2019_paper.pdf)

Seong Jae Hwang, Zirui Tao, Won Hwa Kim, Vikas Singh, "Conditional Recurrent Flow: Conditional Generation of Longitudinal Samples with Applications to Neuroimaging", International Conference on Computer Vision (ICCV), 2019.

http://pitt.edu/~sjh95/

## Code
The code largely leverages an excellent repository for invertible architectures: [FrEIA](https://github.com/VLL-HD/FrEIA)
1. Essential Dependencies:
- PyTorch
- [FrEIA](https://github.com/VLL-HD/FrEIA) (need to check the version)
- Numpy
2. Optional Dependencies (e.g., for visualization, progress bar, etc.)
- tqdm
- matplotlib

## Data
1. [Moving Digit MNIST](http://www.cs.toronto.edu/~nitish/unsupervised_video/) from [this paper](http://www.cs.toronto.edu/~nitish/unsup_video.pdf) is essentially built off of the traditional MNIST digits. Various properties of the sequences (e.g., directions, speed, sizes, etc.) can be adjust within the data generator.
2. [Moving Fashion MNIST](https://github.com/zalandoresearch/fashion-mnist) can simply replace the Moving Digit MNIST within the data generator since they have the identical image sizes (and number of labels).
3. Neuroimaging data ([TADPOLE](https://tadpole.grand-challenge.org/)): The longitudinal neuroimaging data is a part of the [TADPOLE](https://tadpole.grand-challenge.org/) Challenge by the [EuroPOND consortium](http://europond.eu/) in collaboration with the [Alzheimer's Disease Neuroimaging Initiative (ADNI)](http://adni.loni.usc.edu/).

repository: hanlaoshi/crow

repo_name: hanlaoshi/crow


text:
# Hydrosphere serving examples
This repo contains demo scenarios and pre-trained models to show Hydro Serving capabilities.

[Hydrosphere documentation]( https://hydrosphere.io/serving-docs/latest/index.html)

-----

## Data Management
Some models contain dataset for training/testing purposes. This data is stored on s3 bucket: s3://hydrosphere-examples.
Data is managed using [dvc](https://github.com/iterative/dvc). To load data you have to:
 - install and configure  awscli: [Installation guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html)
     - Warning: do not forget to configure credentials for your aws account in awscli: you need to create a user
 - install `dvc[s3]` to manage s3 remote cache
 - pull necessary data from dvc:

    to pull all data:
     ```commandline
    dvc pull
    ```

     to pull data for certain model:
     ```commandline
    dvc pull examples/MODEL_NAME/data/*
    ```

---------
## Python Runtime Examples:
[Python serving documentation](https://hydrosphere.io/serving-docs/latest/tutorials/python.html)
###  [Acitvity recognition](examples/activity_recognition)
   Activity recognition model

### [Census Dataset](examples/adult)

### [Face recognition pipeline](examples/face_recognition)
   Face recognition pipeline based on facenet

### [Fraud detection](examples/fraud_detection)
   Fraud detection model

### [Mobilenet](examples/mobilenet)
   Object detection model based on Mobilenet

### [Titanic & XGBoost](examples/titanic_xgboost)

### [Mnist Python](examples/mnist_py)
   Digit classification model

### [Amazon Reviews](examples/text_classification)
   [Amazon customer reviews](https://www.kaggle.com/bittlingmayer/amazonreviews) (input text) and star ratings (output labels)  for sentiment prediction

## Tensorflow Runtime Examples:
[Tensorflow serving documentation](https://hydrosphere.io/serving-docs/latest/tutorials/tensorflow.html)
### [Mnist Tensorflow](examples/mnist_tf)
   Digit classification model

## Spark Runtime Examples:
### [Binarizer](examples/binarizer)

repository: adilakhter/hydro-serving-example

repo_name: adilakhter/hydro-serving-example


text:
---
layout: post
title:  "The Power of Three"
date:   2016-11-17 12:00:00
categories: INLS161
author: "Tabitha"
---
#### **Assignment 5:**

For this assignment, my team and I expanded on the script we created for Assignment 4.
Our script asks a series of introductory questions, as one might ask when getting to know someone new. (We have run the script
so many times in the past few weeks that the names, favorite colors, ages, favorite movies, and haircolors of my teammates are now permanently
etched into my memory.) The script reads the information, logs the user into MySQL, and stores the data in a nifty little table in a database. In addition to the new functions
in our script, we also added a README.md file with some instructions for setting up the database and table before running the script
so that everything will (hopefully) come together smoothly.

Click here to visit our Github repository.

We learned a lot from this assignment, like:

* how to create databases and tables and add values to them in MySQL

* how to generate a random string variable for use as a Primary Key to avoid errors with duplicates

* how to change data types in a table when you don't do it right the first time

* that there are, in fact, important differences between MySQL code and SQL code

* that being a coder is a lot like being a librarian in that you basically just Google the shit out of everthing

* that none of us is a very good dancer

This was by far the most challenging assignment yet. There were so many steps involved and so many opportunities for error!
I'm really glad I had Kelsey and Uri by my side - troubleshooting is much faster when you have the power of three brains to work with.
From the start, conceptualizing what we wanted the script to do was hard for all of us because we don't have a ton of coding experience,
and there were a few times we created trouble for ourselves by making errors that took lots of valuable time to de-mystify.
In the end, there was definitely room for improvement - but I'm super proud of my team. Nothing brings people together like
shared struggle.

The accomplishment felt by all of us on Team Fred when we finally managed to get our script to function and our databases
to sync up was priceless. And thanks to Gif-Master Kelsey, that moment is now forever immortalized:

via GIPHY

extension: markdown


text:
# prolibr

As of now this micro package provides only one function to initialize and
configure project specific library for Rstudio project. Package leverages
default R session startup mechanism through use of .Rprofile file.

## Installation

``` r
# install.packages("devtools")
devtools::install_github("Bijection1to1/prolibr")
```
## Usage

``` r
prolibr::use_project_lib()
```
After that R session must be restarted for changes to take effect.


text:
# Twitch.js
__ATTENTION:__ This library is still under initial development.

Public APIs may break with any release that increases y in version 0.y.z until this library reaches 1.0 (as per [SemVer](http://semver.org/#spec-item-4)).

## Installation

To add Twitch.js to your project, just execute:

	yarn add twitch

## Basic usage

### Constructing a client instance

The first thing you do is constructing a Twitch client instance. The easiest way to get one is to supply static credentials:

```typescript
import TwitchClient from 'twitch';

const clientId = '123abc';
const accessToken = 'def456';
const twitchClient = TwitchClient.withCredentials(clientId, accessToken);
```

You can also have the client refresh the tokens automatically if necessary by supplying an additional parameter containing the necessary data:

```typescript
import TwitchClient, {AccessToken} from 'twitch';

const clientId = '123abc';
const accessToken = 'def456';
const clientSecret = 'foobar';
const refreshToken = '999999';
const twitchClient = TwitchClient.withCredentials(clientId, accessToken, {clientSecret, refreshToken, onRefresh: (token: AccessToken) => {
	// do things with the new token data, e.g. save them in your database
}});
```

The following sections assume that you have created a `twitchClient` already.

### Calling the Twitch API

The API methods are organized into the different API subresources, like `/users` and `/streams`. All the API methods are `async` and thus can be awaited. Have a quick example:

```typescript
async function isStreamLive(userName: string) {
	try {
		const user = await twitchClient.users.getUserByName(userName);
		await twitchClient.streams.getStreamByChannel(user.id); // will reject the promise if the stream is not live
		return true;
	} catch (e) {
		return false;
	}
}
```

We make extensive use of convenience methods that fetch related resources, so this can also be written a bit easier:

```typescript
async function isStreamLive(userName: string) {
	try {
		const user = await twitchClient.users.getUserByName(userName);
		await user.getStream(); // will reject the promise if the stream is not live
		return true;
	} catch (e) {
		return false;
	}
}
```

### Connecting to Twitch Chat

TODO

### Connecting to PubSub

TODO

## Support
You can join the [Discord Server](https://discord.gg/b9ZqMfz) for support.

repository: JakubKohout/twitch

repo_name: JakubKohout/twitch


text:
# VbScript Scenario Analysis Samples

## [AdvCatAutomation.xlsm](AdvCatAutomation.xlsm)

This excel workbook provides a sheet to define all parameters for AdvCat and compute conjunctions.

### Dependencies

* Licenses: [STK Premium Space](https://www.ansys.com/content/dam/amp/2022/june/webpage-requests/stk-product-page/brochures/stk-premium-space-brochure.pdf)
* Other Scripts: N/A
* Scenario: N/A

---

## [CATS Angle Analysis Tool.xlsm](CATS%20Angle%20Analysis%20Tool.xlsm)

This script allow you to specify a target and an actor satellite and compute the CATS angle between the two satellites.

### Dependencies

* Licenses: [STK Pro](https://www.ansys.com/content/dam/amp/2022/june/webpage-requests/stk-product-page/brochures/stk-pro-brochure.pdf)
* Other Scripts: N/A
* Scenario: N/A

---

## [STK12_SolarPanelTool_Automation.vbs](STK12_SolarPanelTool_Automation.vbs)

This script will create a scenario and a satellite to automate solar panel tool computations.

### Dependencies

* Licenses: [STK Pro](https://www.ansys.com/content/dam/amp/2022/june/webpage-requests/stk-product-page/brochures/stk-pro-brochure.pdf)
* Other Scripts: N/A
* Scenario: N/A

---

## [volumetricSatisfactionIntervals.vbs](volumetricSatisfactionIntervals.vbs)

This script will create a 5 3D Windows so that these can be combine and pieced together to make a panorama view.

### Dependencies

* Licenses: [STK Pro](https://www.ansys.com/content/dam/amp/2022/june/webpage-requests/stk-product-page/brochures/stk-pro-brochure.pdf)
* Other Scripts: N/A
* Scenario: N/A

---

repository: AnalyticalGraphicsInc/STKCodeExamples

gha_language: Jupyter Notebook

repo_name: AnalyticalGraphicsInc/STKCodeExamples


text:
About
=========

A Server for hosting PIPlayer Trials.  Please see (https://github.com/ProjectImplicit/PIPlayer)
This server provides:

* User Authentication
* Participant Assignments
* Data Collection
* Data Reporting
* Session management
* A new bullet

It is built in Java using the Spring Framework and Spring Boot.  There is exceptional documentation
on these technologies here:  http://spring.io/guides#gs

RELEASES
==========
We are currently working on a beta release of our core libraries in the "split_sites" branch, with an expected
launch in early September 2016.

Getting Started
===============

Requirements
---------------
You must have the following applications installed in order to build and run the server.
* Java 7 JDK - (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)
* Node (Server side Javascript - for building the PIPlayer, see http://howtonode.org)
* Bower (Javascript package management tool - just run "npm install bower -global")
* Mysql (Relational Database - http://dev.mysql.com/doc/refman/5.1/en/installing.html)

Database Setup
---------------
Install MySQL, and execute the following commands to establish
a user account.  You can use a different password if you change
the datasource.password setting in src/main/resources/application.properties

> CREATE DATABASE pi CHARACTER SET utf8 COLLATE utf8_general_ci;
> CREATE USER 'pi_user'@'localhost' IDENTIFIED BY 'pi_password';
> GRANT ALL PRIVILEGES ON pi.* TO 'pi_user'@'localhost' IDENTIFIED BY 'pi_password' WITH GRANT OPTION;

Installing Javascript Dependencies
-------------------
Javascript dependencies, including the PIPlayer are installed using Bower, just run `bower install`

Because of the way the PIPlayer script is currently designed, you will need to install the PIPlayer dependencies
manually,  you can do this by:

> cd src/main/resources/static/bower/PIPlayer
> bower install

**Please Note:**  if you run into problems with PI Player scripts not executing you might try editing the file
/PIServer/src/main/resources/static/bower/PIPlayer/dist/js/config.js
Set the baseUrl:'../bower/PIPlayer/dist/js',

Running
--------
You can start up the webserver in development mode (meaning hot swappable / auto reloading) with:
$ ./gradlew clean bootrun
(on windows this is ./gradlew.bat clean bootrun)

You can now visit the website at : http://localhost:9000

Deploying
--------
You can generate a WAR file suitable for deployment in a web server with
$ ./gradlew war
Then you will find the war file in ./build/lib/piServer-0.1.0.war

If you need to modify the default configuration for production (and you most likely will) then you should edit
the file WEB-INF/classes/application.properties that exists within the WAR file (just edit the file in place)
There are three major areas to configure for a production installation:
1. You will need to create/update/modify permissions on a database.
1. You will need an account with Tango (a service to automate the giving of gift cards.)

A word on Sensitive Data
======================
It is critical that we keep the link between a participants personal medical history and
their identifiable information (such as email) separate.  It is also important that we
be able to re-connect this information in the event that we need to contact the particpant
because we identify a pattern in the data collected that we much ethically notify the
participant about.
To keep participant data anonymous (but ultimately linkable) there is the ability to export
and then expunge this information from the main web server.
A series of REST endpoints exist that allow for listing all data that is available, downloading
that data, and then removing the data from the server. These end points include:

**GET** *[SERVER]/api/export*:  Returns a list of all questionnaires, including the number of records, and if the records can and should be deleted after export.
For example: *curl -u admin@email.com:passwd localhost:9000/api/export* would return:
```javascript
[
   {
      "name" : "SUDS",
      "deleteable" : true,
      "size" : 9
   },
   {
      "name" : "DASS21_DS",
      "deleteable" : true,
      "size" : 16
   },
   {
      "name" : "Demographic",
      "deleteable" : true,
      "size" : 4
   }
   ...
]

```
**GET** *SERVER/api/export/NAME*:  Returns all the data available on the server at that moment.
For example: *curl -u admin@email.com:passwd localhost:9000/api/export/ImageryPrime* would return:
```javascript
[
   {
      "id" : 1,
      "vivid" : 0,
      "situation" : "Waiting at doctors office",
      "prime" : "prime",
      "think_feel" : null,
      "date" :<PHONE_NUMBER>000,
      "session" : "PRE",
      "participantDAO" : 5
   },
   {
      "id" : 2,
      "vivid" : 0,
   ...
```
**DELETE** *SERVER/api/export/NAME/ID*:  Removes a record from the Database.
For example: *curl -u admin@email.com:passwd  -X DELETE localhost:9000/api/export/ImageryPrime/1* would remove the item above.  This is secure delete, where the id linking the record to a participant is first overwritten, then deleted.

Encryption
-----------
You can enable encryption of the link between questionnaire data and the participant.
When you do so, the system will use a public key to encrypt the participant id
when recording the questionnaire.

Generating a key:
--------------------------
(Taken from:
http://stackoverflow.com/questions/11410770/load-rsa-public-key-from-file)

1. Generate a 2048-bit RSA private key
```$ openssl genrsa -out private_key.pem 2048```
2. Convert private Key to PKCS#8 format (so Java can read it)
```$ openssl pkcs8 -topk8 -inform PEM -outform DER -in private_key.pem \ -out private_key.der -nocrypt```
3. Output public key portion in DER format (so Java can read it)
```$ openssl rsa -in private_key.pem -pubout -outform DER -out public_key.der```
4. Place the public key in the resources directory of the WAR file, and place the
private key on the server running the PIExport script.

Manually Decrypting a link from the command line
--------------------------
if you place the encrypted string in a file, you can decrypt it with
base64 -d encrypted.txt  | openssl rsautl -decrypt -inkey private_key.pem
If you are copying the key from a file, you can deocde it directly with
echo myEncryptedString | base64 -d | openssl rsautl -decrypt -inkey private_key.pem

Testing
--------
$ ./gradlew test

Test results can be found in  ...PIServer/build/reports/tests/index.html

Security Overview
==================

Our Security Model is build on the popular Spring Security Framework.  Specifically version
3.2.3   We currently use a form based authentication (a web login form) that provides the following
basic projections and features:

* Every URL in the site requires authentication.
* CSRF attach prevention (http://en.wikipedia.org/wiki/Cross-site_request_forgery)
* Session Fixation Protection (http://en.wikipedia.org/wiki/Session_fixation)
* Security header integration
    * HTTP Strict Transport Security for secure requests
    * X-Content-Type-Options integration
    * Cache Control (can be overridden later by your application to allow caching of your static resources)
    * X-XSS-Protection integration
    * X-Frame-Options integration to help prevent Clickjacking

In production, we will secure the site using SSL encryption; all page requests occur over an HTTPS connection.

Adding a Questionnaire
======================

To Create a new Questionnaire you will to do 4 things:

1. Create an HTML web form to ask your questions.
2. Create a Java Model that represents the data from the form. (I promise this is simple)
3. A repository for storing your form data (Extremely simple)
4. Add details to the Questionnaire controller to allow you to correctly handle the form.

The questionnaire must have a unique name from all other questionnaires.  It should not contain
spaces, or special characters, thought in a pinch it could use an underscore "_".  A good convention
is camelCase, where you upper case individual terms in your unique name, such as "UniqueName"

You will see references to **myForm** in the steps below.  Please replace this with the name of the form you are creating.  You may also see **MyForm** at which point you should upper case the first letter.

Step 1:
-------
Create the html form.  New forms should be placed in

/src/main/resources/templates/questions/**myForm**.html

It's a good idea to start with an existing form you like, and modify it.  However, there is nothing to prevent you from creating the page you want from scratch.  "Credibility" offers a good example of a simple one page form.  "Demographics" shows a multi-page form.  "DASS21" is a multi-page form with validation.

Be sure to give the HTML <Form> tag a unique action.
This will be used over again to wire your new questionnaire into the system, so make it unique and descriptive.  Making this the same as the file name of the form you are creating is recommended.
```
<form id="wizard" th:action="@{/questions/**myForm**}" method="POST">
```
From here, you just create your HTML form elements.  Give thoughtful names to these elements, you will be using them again in the next step.

You can see your form as you develop it.  Just execute:
```prompt
gradlew bootrun
```
and visit http:\\localhost:9000/questions/**myForm**

Any changes you make will be automatically visible by refreshing the page.  You don't need to stop and start the server to see your changes.

Step 2:
---------

Create a Java class for containing your form.  This should be located at:

/src/main/java/edu/virginia/psyc/pi/persistence/Questionnaire/**MyForm**.java
(please note the upper casing of the name)

This file defines how your data will be stored in the database.  While this looks an awful lot like programming, it is a very boilerplate format, that can be quickly implemented over and over again.

It should look roughly like this:

```java
package edu.virginia.psyc.pi.persistence.Questionnaire;

import lombok.Data;
import javax.persistence.*;

/**
 * The MyForm Web form.
 */
@Entity
@Table(name="MY_FORM")  // 1. The database is case insensitive, so using an _ can add a lot of clairty here.
@Data // 2. This will create a getX setX method for all our privately declared values.
public class MyForm extends QuestionnaireData { // 3. Be sure to extend QuestionnaireData

   // 4. Define your form fields here using appropriate types.
   //    These should match exactly the "name" attribute on the
   //    the form elements created in Step 1.
   // -----------------------------------------------------
    private int someNumbericInput;
    private String anyTextualInput;
}

```

Step 3:
---------
Define a Java Repository - this file will be located here:
```
/src/main/java/edu/virginia/psyc/pi/persistence/Questionnaire/**MyForm**Repository.java
```
The Repository is VERY simple, and consists completely of only the content shown below.  It exists to give us a critical hook into the database if we need to access this data later in a unique way.

```java
package edu.virginia.psyc.pi.persistence.Questionnaire;

import edu.virginia.psyc.pi.persistence.ParticipantDAO;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

 public interface **MyForm**Repository extends JpaRepository<**MyForm**, Long> {
     List<**MyForm**> findByParticipantDAO(ParticipantDAO p);
 }

```

Step 4:
---------
Wire up the Controller

There is a Questionnaire controller located at:
```
/src/main/java/edu/virginia/psyc/pi/mvc/QuestionController.java
```
You aren't creating a new file this time, just adding a new method to an existing file.

You need to define an additional method on this controller, that will take the data from the form
covert it to our model in step 2, then use the repository in step 3 to store it in the Database. While this sounds complicated, the code is shown in full below.

```java
    @Autowired private **MyForm**Repository **myForm**Repository;

    @RequestMapping(value = "**MyForm**", method = RequestMethod.GET)
    public ModelAndView show**MyForm**(Principal principal) {
        return modelAndView(principal, "/questions/**MyForm**", "**MyForm**", new **MyForm**());
    }

    @RequestMapping(value = "**MyForm**", method = RequestMethod.POST)
    RedirectView handle**MyForm**(@ModelAttribute("**MyForm**") **MyForm** **myForm**,
                                 BindingResult result, Principal principal) throws MessagingException {

        recordSessionProgress(**myForm**);
        **myForm**Repository.save(**myForm**);
        return new RedirectView("/session/next");
    }
```

That is it.  When participants fill out your new form, it will be stored in a new table named **MY_FORM** in the database.  From here we can create various reports to present this data which will be covered shortly.


text:
# Doctor Look UP

#### Epicodus March 22 2019

### _By Doris Warren_

### Description

**JavaScript Week 2** An application built to help you find a doctor near you!

### Setup | Installations Requirments

* _Clone this repository from Github [link](https://github.com/DorisWarren/doctor-look-up.git)._
* _Navigate to project from command line._
  * _$ cd doctor-lookup_
* _On command line enter the following_
  * _$ npm Install_
  * _$ npm run start_
* _Application requires API key._
  * _Instructions_
    *  _Create a file named .env in root directory_
    *  _Sign up for Better Doctor API to request a key_
    *  _Place key in .env file as shown: exports.apiKey=KEYGOESHERE_

### Specs
* _Searching for Doctors that specialize in a specific illness._
  * _Input: Flu / Colds_
  * _Output: Doctor that specializes in Flu or Sore Throats_

* _Searching for a specific Doctor by first and last name._
  * _Input: Doctors name_
  * _Output: Doctors Info_

* _If request is not found it will prompt you with an error message._
  * _Input: Doctor requested_
  * _Output: "There was an error processing your request"_

### Technologies and Resources

###### FRONTEND
  * _HTML_
  * _CSS_
  * _JavaScript_
  * _jQuery_

###### BACKEND
  * _NodeJS_
  * _NPM_
  * _Webpack_

###### LINTER
  * _Eslint_

### Support and Contact details
* _If you have any questions or concerns please, feel free to contact me at<EMAIL_ADDRESS>
### Copyright (c) 2019 Doris Warren MIT license.

repository: DorisWarren/doctor-look-up

repo_name: DorisWarren/doctor-look-up


text:
+++
menutitle = "Second VPC"
chapter = false
weight = 50
+++

## Create a second VPC via Cloudformation

Now that you have seen the details of manually deploying subnets, Internet Gateways, Route tables, EC2 Instances, lets look at the Infrastructure as Code way.

Make sure you are logged into your AWS account (Either your AWS account or via the AWS Event Dashboard)

![Both VPCs Diagram](/images/2ndvpc-diagramboth.png)

repository: geseib/vpcintro

repo_name: geseib/vpcintro


text:
Description
===========
Easy Proximity-based Sharing for iOS

Perfect for any iOS app that needs to quickly share items with nearby friends, such as groups, photo albums, photos, links, user profiles, etc, using Bluetooth Low Energy.

Users simply click "find nearby", and items from their friends' phones magically pop up on their screen for them to add with one tap.

Credits
===========
SimpleShare was created by Laura Skelton.

Features
===========
* Easiest way to share items with nearby friends
* Shares an array of item IDs over Bluetooth LE
* Best way to allow users to join groups based on proximity
* Shares info even when the app is in background mode (unlike iBeacons)

Installation
===========
* Open the SimpleShare Demo project and your XCode project
* Drag the "SimpleShare" directory to your project (Make sure "Copy items into destination group folder", "Create groups for any added folders", and your target are all selected.)
* Add the CoreBluetooth framework to your project (Under Build Phases -> Link Binary With Libraries, click the "+" to add "CoreBluetooth.framework" to your project.)
* In your app's Info.plist file, add "Required Background Modes" -> "App shares data using CoreBluetooth", if you would like your devices that are sharing items to keep sharing even if they are in background mode.
* Create a unique UUID to identify your app in SimpleShare. You can generate one here: http://www.uuidgenerator.net . Then plug it in to your application (after importing SimpleShare.h in any file you use SimpleShare in).

```objc
#import "SimpleShare/SimpleShare.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [SimpleShare sharedInstance].simpleShareAppID = @"your-uuid-goes-here";
    return YES;
}
```

Usage
===========
See the SimpleShare Demo app for examples.

For simplicity, the SimpleShare Demo generates random UUIDs and shares them with nearby friends using the app. In a real app, you would probably get a user's items (such as their photo album IDs, or group IDs) from a web server, share those items with nearby friends, and then download the item details using the itemIDs from the server on your friend's phone.

Usage Examples:

```objc
#import "SimpleShare/SimpleShare.h"

@interface MyViewController : UITableViewController <SimpleShareDelegate>

@property (nonatomic, retain) NSMutableArray *myItemIDs;

@end

@implementation MyViewController
@sythesize myItemIDs;

- (void)viewDidLoad
{
    [super viewDidLoad];

    // Normally we'd get this array from a server that sends us a list of the user's items. For simplicity we're just creating a randomly generated array of item ID's to share.
    self.myItemIDs = [[NSMutableArray alloc] initWithObjects:[[NSUUID UUID] UUIDString], [[NSUUID UUID] UUIDString], [[NSUUID UUID] UUIDString], [[NSUUID UUID] UUIDString], [[NSUUID UUID] UUIDString], nil];

    // Tell SimpleShare the item IDs we are sharing
    [SimpleShare sharedInstance].delegate = self; // lets this file receive delegate messages, such as the following:

    [SimpleShare sharedInstance].myItemIDs = self.myItemIDs; // send the array of itemIDs you are sharing to SimpleShare

}

#pragma mark - SimpleShare Delegate

- (void)simpleShareFoundFirstItems:(NSArray *)itemIDs
{
    // get rid of old found nearby items
    _nearbyItems = nil;

    _nearbyItems = [[NSMutableArray alloc] init];

    // add the first items to the array
    [_nearbyItems addObjectsFromArray:itemIDs];

    // pop up nearby items controller to show found items
    [self performSegueWithIdentifier:@"addNearbyItems" sender:self];
}

- (void)simpleShareFoundMoreItems:(NSArray *)itemIDs
{
    // add the new items to the array
    [_nearbyItems addObjectsFromArray:itemIDs];

    // update nearby items controller
    [_nearbyItemsController setNearbyItemIDs:_nearbyItems];
    [_nearbyItemsController.tableView reloadData];
}

- (void)simpleShareFoundNoItems:(SimpleShare *)simpleShare
{
    // update UI to show it is done looking for items
    [self.navigationItem setRightBarButtonItem:_findItemsButton];

}

- (void)simpleShareDidFailWithMessage:(NSString *)failMessage
{
    // update UI to show it is not looking for items
    [self.navigationItem setRightBarButtonItem:_findItemsButton];

    // update UI to indicate it is not sharing items
    _shareItemsButton.title = @"Share";
    _shareItemsButton.action = @selector(shareMyItems:);

}

@end
```

Flickr Demo
===========
A second demo app uses the Flickr API to show how to use the shared item IDs to get useful information from one phone to another with bluetooth magic by connecting with a web API. SimpleShare sends the IDs of Flickr photos over Bluetooth LE between nearby users, and connects with the Flickr API to fill in image thumbnails and titles for the photos found from nearby users.

Future
===========
Since the sharing is simply done over Bluetooth LE, with a comma-separated string of item IDs shared between phones, this should work well cross-platform. An Android version of this project would allow the phones to easily share items regardless of platform.

repository: mintuz/simple-share

repo_name: mintuz/simple-share


text:
# Nobody Talk

Nobody Talk is a simple web app for anonymous conversation. It's entirely made for NodeJS using [Express][express] and [Socket.IO][socket-io] frameworks.

The app was based on [Socket.IO example][chat-example]. Most of what I did was, actually, removing some functionality I didn't want. Every thing is basically the same, except for a few customizations of mine.

## Installation

You will need [NodeJS][nodejs] and [NPM][npm]. Provided that, simply clone the project and:

```bash
$ npm install
$ npm start
```

If you only want to see it working, you can try it out [here][demo].

## Contributing

Pull requests are welcome. Here is a list of what I would like to do if I had some more time:
 - Notify clients some info like: when someone leaves or joins; how many are connected. That stuff;
 - Improved styling on the input box;
 - Fix an annoying non expected behavior on some browsers. It seems that the alignment of messages goes crazy on some computers, on such a way that the messages go further to the right at each new message. The weird part is that I have, currently, Firefox, Chromium and Chrome installed on my computer and it works just fine on them. I wonder why it goes crazy like that on some other computers.
 - Create some tests using PhantomJS or ZombieJS. I don't know which one to pick.

[nodejs]: http://nodejs.org/
[npm]: https://www.npmjs.org/
[express]: http://expressjs.com/
[socket-io]: http://socket.io/
[demo]: http://nobody-talk.herokuapp.com/
[chat-example]: https://github.com/Automattic/socket.io/tree/master/examples/chat

repository: possatti/nobody-talk

repo_name: possatti/nobody-talk


text:
# ConaStat

## Author
Eve Nyarang'o

## Description
This is an android application that shows historical and realtime statistical data on COVID-19 from different country.

## Installation
Download and install Android SDK
Download and install JAVA
Clone or download this repository (link in the section below) to your local machine and run in ur code editor.
Run the application on the emulator

## BDD
Enter the continent
Find country
Navigate to the homepage with up button

## Technologies Used
Java
Android

## Demo
![WhatsApp Image 2021-01-11 at 10 10 45 (1)](https://user-images.githubusercontent.com/70526252/104154456-0708a780-53f6-11eb-85da-c242391ab2c6.jpeg)
![WhatsApp Image 2021-01-11 at 10 10 45](https://user-images.githubusercontent.com/70526252/104154464-0bcd5b80-53f6-11eb-8c7c-5aeac281bb4b.jpeg)

## Link
https://github.com/EveNyarango/ConaStat

## Bugs
No known bug.

## Contact Information
 Email<EMAIL_ADDRESS>
 ## License and copyright
 MIT [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Copyright (C) **{Eve Nyarang'o}

repository: EveNyarango/ConaStat

repo_name: EveNyarango/ConaStat


text:
# 27. Remove Element

## Description

Given an array nums and a value val, remove all instances of that value in-place and return the new length.

Do not allocate extra space for another array, you must do this by **modifying the input array** in-place with O(1)
extra memory.

The order of elements can be changed. It doesn't matter what you leave beyond the new length.

### Clarification:

Confused why the returned value is an integer but your answer is an array?

Note that the input array is passed in by **reference**, which means a modification to the input array will be known to
the caller as well.

Internally you can think of this:

```
// nums is passed in by reference. (i.e., without making a copy)
int len = removeElement(nums, val);

// any modification to nums in your function would be known by the caller.
// using the length returned by your function, it prints the first len elements.
for (int i = 0; i < len; i++) {
    print(nums[i]);
}
```

### Example 1:

```
Input: nums = [3,2,2,3], val = 3
Output: 2, nums = [2,2]
Explanation: Your function should return length = 2, with the first two elements of nums being 2.
It doesn't matter what you leave beyond the returned length. For example if you return 2 with nums = [2,2,3,3] or
 nums = [2,3,0,0], your answer will be accepted.
```

### Example 2:

```
Input: nums = [3,2,2,3], val = 3
Output: 2, nums = [2,2]
Explanation: Your function should return length = 2, with the first two elements of nums being 2.
It doesn't matter what you leave beyond the returned length. For example if you return 2 with nums = [2,2,3,3]
or nums = [2,3,0,0], your answer will be accepted.
```

### Constraints:

* 0 <= nums.length <= 100
* 0 <= nums[i] <= 50
* 0 <= val <= 100

## Solution

* **java**

```java
/*
 Success Detail:
 Runtime: 0 ms, faster than 100.00% of Java online submissions for Remove Element.
 Memory Usage: 37 MB, less than 73.64% of Java online submissions for Remove Element.
 */
class Solution {
    public int removeElement(int[] nums, int val) {
        int index = 0;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] != val) {
                nums[index] = nums[i];
                index++;
            }
        }
        return index;
    }
}
```

repository: openbuff/leetcode

repo_name: openbuff/leetcode


text:
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tfp.edward2.interceptable" />
<meta itemprop="path" content="Stable" />
</div>

# tfp.edward2.interceptable

``` python
tfp.edward2.interceptable(func)
```

Decorator that wraps `func` so that its execution is intercepted.

The wrapper passes `func` to the interceptor for the current thread.

If there is no next interceptor, we perform an "immediate" call to `func`.
That is, `func` terminates without forwarding its execution to another
interceptor.

#### Args:

* <b>`func`</b>: Function to wrap.

#### Returns:

The decorated function.

repository: matthew-mcateer/probability

repo_name: matthew-mcateer/probability


text:
# The Lunch Picker [![GitHub version](https://badge.fury.io/gh/peterlopez%2Fthe-lunch-picker.svg)](https://github.com/peterlopez/the-lunch-picker/releases)

Find a bite to eat - [thelunchpicker.com](https://thelunchpicker.com)

## Requirements

1. Docker Compose v3.2
1. Node / npm
1. [Yelp API access token](https://www.yelp.com/developers/documentation/v3/authentication) in [Docker .env file](https://docs.docker.com/compose/environment-variables/#the-env-file)

#### For developing/testing newsletter feature

*\*optional*

1. Composer v1.7 for SendGrid API library
1. [SendGrid API token](https://sendgrid.com/docs/ui/account-and-settings/api-keys/#creating-an-api-key) and [SendGrid Transactional Template ID](https://github.com/sendgrid/sendgrid-php/blob/master/USE_CASES.md#transactional-templates) in [Docker .env file](https://docs.docker.com/compose/environment-variables/#the-env-file)

## Development

Steps to setup local development environment:

1. `git clone`
1. `npm install`
1. Get API key from Yelp and put it into `.env` file with name `YELP_TOKEN`
1. `docker-compose up -d`
1. `php composer.phar install` *optional for newsletter
1. `gulp watch`

## Contributing

If you're interested in making this web app better you can start by checking open issues and pull requests on GitHub.

#### code style and setup

* PHP - handles Yelp API communication and Newsletter feature
  * scripts called via AJAX should be very minimal and only do a few things: validate request and input, start necessary action if any, and output response
  * the majority of server side functionality should be contained in PHP classes specific to a few tasks.
  * use `boolean` variables for long conditionals i.e.
    * `$formIsInvalid = empty($_POST['realemailaddress']) || empty($_POST['cuisines']) || empty($_POST['location']);`
* JS
  * almost all JS should written inside functions within `Object`s for the features they represent.
  * each `Object` should have an `init()` function which will bind any necessary event handlers. Then, other functions can be called as they are triggered by callbacks or by other functions.
  * each of these `Object`s should be available globally (attached to `window`). For example `Filters.reset()` or `Filters.$container` should be available to call from anywhere.
* SCSS
  * use [BEM](http://getbem.com/introduction/)
  * try not to nest selectors too deep
* Gulp build process
  * all files in `js/` are compiled and minified together and placed in `build/`. Therefore, there should be no dependencies on any code running before another. Use callbacks instead.
  * all files in `scss/` are compiled and minified together and placed in `build/`. Variables and mixins should be placed in files starting with and underscore `_` to make sure they are compiled first.

repository: peterlopez/the-lunch-picker

repo_name: peterlopez/the-lunch-picker


text:
# Horiseon: Code Refactor
## Table of Contents
  * [Background](#background)
  * [Goals](#goals)
  * [Client Request](#client-request)
  * [Acceptance Criteria](#acceptance-criteria)
  * [Testing](#testing)
  * [References](#references)
  * [License](#license)

## Background
Accessibility focuses on how a disabled person accesses or benefits from a site, system or application. Accessibility is an important part of the designing your site and should be considered throughout the development process. Section 508 is the governing principle and it requires that all government information be accessible to disabled users. (https://www.usability.gov/what-and-why/accessibility.html)

## Goals
The goal of this project is to refactor the exisitng code for Horiseon:copyright: to ensure accessibility, as well as organize, edit, and clean up HTML and CSS files. Using semantic tags and alt text for images, the goal of increased accessibility has been acheived. All duplicate code was removed and each line was reorganized.

## Client Request

AS A marketing agency
I WANT a codebase that follows accessibility standards
SO THAT our own site is optimized for search engines

## Acceptance Criteria

GIVEN a webpage meets accessibility standards
WHEN I view the source code
THEN I find semantic HTML elements
WHEN I view the structure of the HTML elements
THEN I find that the elements follow a logical structure independent of styling and positioning
WHEN I view the image elements
THEN I find accessible alt attributes
WHEN I view the heading attributes
THEN they fall in sequential order
WHEN I view the title element
THEN I find a concise, descriptive title

## Testing
Testing available through the Bureau of Internet Accessibility

[Visual](https://www.boia.org/blog/how-do-we-perform-accessibility-testing-for-the-impact-of-visual-disabilities)

[Auditory](https://www.boia.org/blog/how-do-we-perform-accessibility-testing-for-the-impact-of-auditory-disabilities)

[Cognitive, Nuerological, Learning](https://www.boia.org/blog/how-do-we-perform-accessibility-testing-for-the-impact-of-cognitive-learning-and-neurological-disabilities)

[Physical](https://www.boia.org/blog/how-do-we-perform-accessibility-testing-for-the-impact-of-physical-disabilities)

[Speech](https://www.boia.org/blog/how-do-we-perform-accessibility-testing-for-the-impact-of-speech-disabilities)

## References

[Semantic Elements](https://www.w3schools.com/html/html5_semantic_elements.asp)

[Alt-text](https://moz.com/learn/seo/alt-text)

## License
MIT License

Copyright :copyright: 2020 Lauren Hooper

[License Information](LICENSE)


text:
# MissionControl Core Plugin

This is a plugin for the [MissionControl CMS](http://github.com/jamiemill/missioncontrol). Whilst it is fairly self-contained it is really designed to be used in that context and probably won't work anywhere else.

## Features

All MissionControl sites require this `core` plugin which takes care of the following:

*	__Pages__ - these represent the main pages of the site. The core plugin takes over the standard CakePHP `/pages/*` route.

*	__Layouts__ - Each page uses a certain "layout", which contains the outer markup of the finished page, e.g. HTML `<head>`, plus usually the header, main menu and footer of a page. These should be placed in `{APP}/views/layouts/` and named with a `.ctp` extension. They should contain the following line to output the inner "template" content in the right place:

		<?php echo $content_for_layout ?>

*	__Templates__ -  These contain the main markup of each page, and, like layouts, can be shared between as many pages as you like. They live in `{APP}/views/pages/`, and should be named with a `.ctp` extension.

*	__Content Areas__ - these are marked parts of a page layout or template that can have content added in the CMS. They are defined by a call to the `content_area` element and given a unique (within the page) name called a "slug", like so:

		<?php echo $this->element('content_area', array('slug' => 'callout')); ?>

*	__Blocks__ - All content lives within a "block", which can be placed inside any of the available Content Areas of a page. NOTE: Blocks were conceived to allow different types of content to be inserted into a Content Area, e.g. A text block and then a contact form block, but at present only "text" blocks are available so you wouldn't usually bother to place more than one block in each content area.

*	__Custom Fields__ - these are like Wordpress's custom fields, and let you create arbitrary name-value pairs of data that will be passed to the view and can be used in the template like so:

		<?php echo $layout->getCustomField($data,'box4_title') ?>

*	__Search__ - I'm not sure how 'finished' this is, but the idea is that (via the Searchable plugin) any record can be indexed into a search index table which has a fulltext index for searching.

*	__Email-sending__ via the SwiftEmail library via a component which extends the cake standard Email library which wasn't able to communicate with secure email servers (e.g. Gmail).

*	__Rich-text editing__ via the jQuery version of TinyMCE which has to be present in the `webroot/js/tiny_mce` directory.

*	__Menu construction__ Pages exist within a single hierarchical, ordered list and can be set to be visible or invisible within the main menu. A limitation of MissionControl is that there is only one master menu/page structure unlike Drupal for instance where menus are independent from pages.

*	__Developer command-line tools__ for managing ACLs and fixtures.

*	__CoreAppController__ - the class inside `core_app_controller.php` holds some logic that is necessary for almost all requests in a MissionControl site, and therefore all other plugin controllers extend this controller (and are therefore dependant on it). It extends AppController so will inherit any Application-specific code. You may wish any new application-specific controllers to extend CoreAppController rather than AppController directly, especially if they should be subject to access control.

## Access Control

MissionControl uses CakePHP's standard Auth and ACL components which use a list of ACOs, AROs and a linking table.

*	__ACOs__ represent controllers and their actions as children. If you enable access to a whole controller node, permission to access all its children is implied.

*	__AROs__ represent User Groups. There are six pre-defined groups in MissionControl (managed by the `users` plugin): Guest, User, Contributor, Editor, Administrator and Superadministrator. Each inherits permissions from the previous, (except Superadministrator can always do anything). "Guest" is supposed to represent a non-authenticated anonymous user, but usually Authentication is just turned off for public actions (`$this->Auth->allow(XXX)`)

Because the `acos`, `aros` and `aros_acos` tables are MPTT trees, this means they can't be edited manually in the database because the `lft` and `rght` fields will become invalid. Instead there are a couple of console shell commands that should be used to manage permissions. Before running them please `cd` to the application directory (the one that contains `webroot` etc).

### Managing AROs (which represent user groups)

There is a `permissions` shell in `vendors/shells/permissions.php`. When run on the command-line, it will allow you to perform the following action:

	cake permissions rebuild_aros

This will empty the `aros` table, run through the available user `Group` records and create corresponding AROs for each. Note that individual Users are not represented with AROs, only Groups are, so it is not possible to assign individuals unique permissions.

### Managing ACOs (which represent controller actions)

You should use Mark Story's excellent `acl_extras` plugin shell for managing ACOs. When adding new controller actions, the ACO table will need to be updated to include the new action(s) at the correct point in the tree. You can do so by running:

	cake acl_extras aco_update

or

	cake acl_extras aco_sync

The latter also removes dead entries caused by deleting or renaming controller methods.

### Managing aros_acos linking records (which represent permissions)

The `permissions` shell will also let you do:

	cake permissions reset

This will look for and execute available CakePHP shell `tasks` _(named what ?)_ inside each plugin (plus one for the app itself) which set permissions for their own area of responsibility. e.g.:

*	`{APP}/vendors/shells/tasks/app_permissions`
	- this shell contains commands to create any application-specific permissions that are not covered by the plugin permissions already. You should customise this if you add your own controllers to the app.
*	`{APP}/plugins/core/vendors/shells/tasks/core_permissions.php`
	- this contains most of the core permissions for MissionControl, essentially gives "Contributor" and above users access to all main page editing actions.
*	`{APP}/plugins/file_library/vendors/shells/tasks/file_library_permissions.php`
	- as above, but for the file library plugin.
*	`{APP}/plugins/news/vendors/shells/tasks/news_permissions.php`
	- as above but for news
*	`{APP}/plugins/file_library/vendors/shells/users/users_permissions.php`
	- this gives administrators access to user-management actions, and all users access to change their password and view their profile etc.

### Adding/Modifying Group IDs:

_If you add new Groups, the constants that hold the group IDs will become invalid, and therefore the permission update console tasks that use them will also be broken... This needs work!_

## More Info

Please see the readme file inside the other plugins for more info.

Copyright (c) 2009-2010 Jamie Mill - jamiermill/a/gmail.com