text:
---
layout: page
title: Developer Guide
---

* Table of Contents
{:toc}

--------------------------------------------------------------------------------------------------------------------

## Introduction

Thank you for your interest in the developing of Notor! This is an open-source project aimed at helping mentors take
quick, efficient notes to facillitate effective and efficient mentoring of many mentees. The design principles
scaffolding Notor are as follows.

1. **Efficient UX for the User:**
    - You shouldn't have to wait for Notor; it should simply run -- quickly and without hassle.
    - Look for how you can make the process faster, more streamlined, or more effective for our clients: mentors.
2. **CLI-first**
    - We target fast-typers who are comfortable taking notes on their computer.

In particular, we tackle the needs of mentor professors, who tend to be busy and are assigned mentees they are unlikely
to personally know or even contact often outside of the mentor relationship. Key features of Notor which scaffold this
are:

1. Powerful Organisation which is up to the user
    - useful for managing many mentees
2. A clean note-taking system
    - designed so that they can take notes concurrently with meeting the mentee so no information is forgotten
3. A last-contact / next-contact model
    - helps them contact the mentee regularly

### **Acknowledgements**

This project is a further iteration of the [_Notor-Level 3 (
AB-3)_](https://nus-cs2103-ay2122s1.github.io/tp/DeveloperGuide.html) project. All features we have are in addition to
those already present in AB-3. Removed features may or may not be listed as well.

--------------------------------------------------------------------------------------------------------------------

## **Setting up, getting started**

Refer to the guide [_Setting up and getting started_](SettingUp.md).

--------------------------------------------------------------------------------------------------------------------

## Glossary

* **Autocomplete**: A functionality to complete a `Tag` or a `Command` without users typing the complete strings
* **Command structure**: The order in which parameters and command words must be written in order for the command to be
  correctly parsed
* **Dummy data**: Sample data used in testing or example data present on first launch of application
* **Group**: A container containing `Person` objects with shared traits that is created by the user
* **Key power features**: Essential features that will be used often when running the software application
* **Mainstream OS**: Windows, Linux, Unix, MacOS
* **Metadata**: Personal data about a `Person` object
* **Note**: A general description of each `Person` to record their activities, with last edit timestamp attached
* **Pin**: Fixing a `Person` to the top of the current list of `Person` objects or a `Group`
* **Subgroup**: A child of a `Group` used to store multiple persons based on a more specific category than `Group`. A **
  Subgroup** can be created by specifying the parent group of the **Subgroup**. A person in a **Subgroup** is
  automatically in the parent `Group` as well
* **Tag**: A string descriptor attached to `Group` objects or `Person` objects
* **Ungrouped**: Used to describe a `Person` object with no grouping

--------------------------------------------------------------------------------------------------------------------

## **Design**

### Architecture

The **Architecture** of our iteration is built upon AB-3. Please refer to the AB-3 **Architecture**
section for the general Architectural design of the app. Only changes will be listed here.

### Logic Changes

#### Command Changes

![CommandClassDiagram](images/ParserClasses.png)
Due to the addition of many new commands and refactoring of the command structure, we have had to create a better class
system to handle them.

* `Parser` now takes in generic `T extends Command` since we have multiple types of commands, each with their own unique
  parser
* `Executor` instances are created by each `Command` class, which then handle the actual execution of commands and
  returning of `CommandResult`
* Commands now come in 3 general types, `PersonCommand`, `GroupCommand` and `Command`
    * `PersonCommand` operates on `Person` objects
    * `GroupCommand` operates on `Group` objects
    * `Command` operates without either a `Person` or `Group` object
* `Parser` and `Executor` classes come in the same 3 categories as `Command` classes
* `NotorParser` now parses both the `commandWord` and `subCommandWord` for user commands
    * `commandWord` refers to either `Person`, `Group` or one of the object agnostic commands
    * `subCommandWord` refers to an operation that can be carried out on a `Person` or `Group`

New Workflow for Adding Commands:

1. Create a `XYZCommand` class that extends either `PersonCommand`, `GroupCommand` or simply `implements Command`.
2. Create a `XYZCommandParser` class that extends the same type of `Parser` as the `Command` above is.
3. Add the new `XYZCommandParser` to the `parse()` method in `NotorParser`.
4. Create a `XYZCommandExecutor` class that extends the same type of `Executor` as the `Command` from step 1.
5. Implement all required methods and ensure all fields used by the methods are present.

### Model Changes

*(placeholder API for now, will update to our own link later when implemented.)*

**
API** : [`Model.java`](https://github.com/se-edu/Notor-level3/tree/master/src/main/java/seedu/address/model/Model.java)

![ModelClassDiagram](images/ModelClassDiagram.png)

* `Person` does not contain the `Address` field anymore.
* `Person` contains a new `Note` field, `SuperGroup` field and `SubGroup` field.
* `Person` does not contain direct reference to `SuperGroup` and `SubGroup` but
strings of SuperGroup and for display purposes.

* This UML diagram is the current class structure implemented.

Here is the better class structure to be implemented:
![ModelClassDiagram2](images/BetterModelClassDiagram.png)

* `Trie` allows tags to be autocompleted as commands are entered.
* Storing `String` objects in a `Trie` in Notor allows all tags to only get created once instead of once per
  object.
* Storing tags as `String` objects in a trie is simpler than a dedicated `Tag` class.

### Storage component

*(placeholder API for now, will update to our own link later when implemented.)*

**
API** : [`Storage.java`](https://github.com/se-edu/Notor-level3/tree/master/src/main/java/seedu/address/storage/Storage.java)

![StorageClassDiagram](images/StorageClassDiagram.png)

The `Storage` component,

* now includes a new `Archive` Storage component
* `Archive` allows users to temporarily remove `Person`s from their Address Book

### Common classes

**
API** : [`Trie.java`](https://github.com/AY2122S1-CS2103T-W08-1/tp/blob/master/src/main/java/seedu/address/commons/core/trie/Trie.java)

* Allows grouping and autocompletion of `Tag` and `Command` objects.
* Supports addition and deletion of items.
* Supports finding of first item.
* Supports finding of first item that contains specified keyword.

--------------------------------------------------------------------------------------------------------------------

## **Implementation**

This section describes some noteworthy details on how certain features are implemented.

### \[Proposed\] Undo/redo feature

#### Proposed Implementation

The proposed undo/redo mechanism is facilitated by `VersionedNotor`. It extends `Notor` with an undo/redo
history, stored internally as an `NotorStateList` and `currentStatePointer`. Additionally, it implements the
following operations:

* `VersionedNotor#commit()` — Saves the current address book state in its history.
* `VersionedNotor#undo()` — Restores the previous address book state from its history.
* `VersionedNotor#redo()` — Restores a previously undone address book state from its history.

These operations are exposed in the `Model` interface as `Model#commitNotor()`, `Model#undoNotor()`
and `Model#redoNotor()` respectively.

Given below is an example usage scenario and how the undo/redo mechanism behaves at each step.

Step 1. The user launches the application for the first time. The `VersionedNotor` will be initialized with the
initial address book state, and the `currentStatePointer` pointing to that single address book state.

![UndoRedoState0](images/UndoRedoState0.png)

Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command
calls `Model#commitNotor()`, causing the modified state of the address book after the `delete 5` command executes
to be saved in the `NotorStateList`, and the `currentStatePointer` is shifted to the newly inserted address book
state.

![UndoRedoState1](images/UndoRedoState1.png)

Step 3. The user executes `add n/David …` to add a new person. The `add` command also calls `Model#commitNotor()`
, causing another modified address book state to be saved into the `NotorStateList`.

![UndoRedoState2](images/UndoRedoState2.png)

:information_source: **Note:** If a command fails its execution, it will not call `Model#commitNotor()`, so the address book state will not be saved into the `NotorStateList`.

Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing
the `undo` command. The `undo` command will call `Model#undoNotor()`, which will shift the `currentStatePointer`
once to the left, pointing it to the previous address book state, and restores the address book to that state.

![UndoRedoState3](images/UndoRedoState3.png)

:information_source: **Note:** If the `currentStatePointer` is at index 0, pointing to the initial Notor state, then there are no previous Notor states to restore. The `undo` command uses `Model#canUndoNotor()` to check if this is the case. If so, it will return an error to the user rather
than attempting to perform the undo.

The following sequence diagram shows how the undo operation works:

![UndoSequenceDiagram](images/UndoSequenceDiagram.png)

:information_source: **Note:** The lifeline for `UndoCommand` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.

The `redo` command does the opposite — it calls `Model#redoNotor()`, which shifts the `currentStatePointer` once
to the right, pointing to the previously undone state, and restores the address book to that state.

:information_source: **Note:** If the `currentStatePointer` is at index `NotorStateList.size() - 1`, pointing to the latest address book state, then there are no undone Notor states to restore. The `redo` command uses `Model#canRedoNotor()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.

Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such
as `list`, will usually not call `Model#commitNotor()`, `Model#undoNotor()` or `Model#redoNotor()`.
Thus, the `NotorStateList` remains unchanged.

![UndoRedoState4](images/UndoRedoState4.png)

Step 6. The user executes `clear`, which calls `Model#commitNotor()`. Since the `currentStatePointer` is not
pointing at the end of the `NotorStateList`, all address book states after the `currentStatePointer` will be
purged. Reason: It no longer makes sense to redo the `add n/David …` command. This is the behavior that most modern
desktop applications follow.

![UndoRedoState5](images/UndoRedoState5.png)

The following activity diagram summarizes what happens when a user executes a new command:

#### Design considerations:

**Aspect: How undo & redo executes:**

* **Alternative 1 (current choice):** Saves the entire address book.
    * Pros: Easy to implement.
    * Cons: May have performance issues in terms of memory usage.

* **Alternative 2:** Individual command knows how to undo/redo by itself.
    * Pros: Will use less memory (e.g. for `delete`, just save the person being deleted).
    * Cons: We must ensure that the implementation of each individual command are correct.

_{more aspects and alternatives to be added}_

### \[Proposed\] Data archiving

_{Explain here how the data archiving feature will be implemented}_

--------------------------------------------------------------------------------------------------------------------

## **Documentation, logging, testing, configuration, dev-ops**

* [Documentation guide](Documentation.md)
* [Testing guide](Testing.md)
* [Logging guide](Logging.md)
* [Configuration guide](Configuration.md)
* [DevOps guide](DevOps.md)

--------------------------------------------------------------------------------------------------------------------

## **Appendix: Requirements**

### Product scope

**Target user profile**: mentor professors

* has a need to manage a significant number of contacts
* prefer desktop apps over other types
* can type fast
* prefers typing to mouse interactions
* is reasonably comfortable using CLI apps
* has groups of contacts that have different needs

**Value proposition**: manage contacts faster than a typical mouse/GUI driven app

### User stories

Priorities:

* High - must have

* Medium - nice to have

* Low - unlikely to have

* Default - already implemented)

|As a …                                                                                |I want to …                                                                                |So that I can …                                            |Priority    |Status     |When?         |
|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|------------|-----------|--------------|
|on the go user                                                                              |add notes without wifi or internet access                                                                     |use the app anywhere                                       |Default     |           |Iteration 1.2 |
|new user                                                                                |have dummy data                                                                                |see what my entries look like                              |Default     |           |Iteration 1.2 |
|new user                                                                                |remove all dummy entries easily                                                                               |start doing work quickly                                   |Medium      |           |Iteration 1.2 |
|general user, new user                                                                      |see a simple UI which shows essential features immediately and hides away advanced features till you need them|slowly learn the features                                  |High        |           |Iteration 1.2 |
|general user, mentor professor, module professor                                            |take notes with timestamps                                                                                |see my notes chronologically                               |High        |           |Iteration 1.2 |
|general user, mentor professor, module professor                                            |edit the groups or tags of a student                                                                          |                                                           |High        |           |Iteration 1.2 |
|mentor professor                                                                            |group the students based on the mentoring subjects                                                            |tag or comment on each group separately                    |High        |           |Iteration 1.2 |
|general user, mentor professor, module professor                                            |have easy-to-remember commands for inputting information                                                      |                                                           |High        |           |Iteration 1.2 |
|general user                                                                                |delete groups/subgroups                                                                                |                                                           |High        |Not started|Iteration 1.2 |
|experienced user, general user                                                              |add tags cumulatively                                                                                |not retype my old tags                                     |High        |Not started|Iteration 1.2 |
|new user                                                                                |see clear error messages that explains how to enter the correct command                                       |learn the right syntax from my errors                      |High        |Not started|Iteration 1.2b|
|experienced user, general user, mentor professor, module professor                          |edit previous notes I have taken                                                                              |                                                           |High        |           |Iteration 1.2b|
|mentor professor, module professor, new user                                                |have an easily accessible help page                                                                           |                                                           |High        |           |Iteration 1.2b|
|experienced user, general user, mentor professor, module professor, new user, on the go user|search by tag/category                                                                                |find students based on tag/category                        |High        |Not started|Iteration 1.2b|
|general user, mentor professor, module professor                                            |have notes attached to categories                                                                             |save notes relevant to a whole group                       |Medium      |           |Iteration 1.2b|
|general user                                                                                |create general notes                                                                                |take down any thoughts I have on the fly                   |Medium      |Not started|Iteration 1.2b|
|new user                                                                                |see a confirmation message if I choose to delete something                                                    |avoid accidental deletions                                 |Medium      |           |Iteration 1.2b|
|experienced user, mentor professor, module professor                                        |specify the kinds of data attached to contacts which is viewable from the front page                          |only see information that I need                           |Nice To Have|           |Iteration 1.3 |
|general user                                                                                |display all of the user information in an easy to reference format                                            |read large amounts of information at once easily           |Medium      |           |Iteration 1.3 |
|mentor professor, module professor                                                          |initialise the contacts for many students at once                                                             |add similar students by batch                              |Medium      |           |Iteration 1.3 |
|mentor professor                                                                            |see the last time I contacted a student                                                                       |know if I need to check up on them                         |Medium      |           |Iteration 1.3 |
|new user                                                                                |get prompted for the arguments.                                                                               |learn the command structure                                |Medium      |           |Iteration 1.3 |
|experienced user                                                                            |pin users I need to access regularly                                                                          |see commonly accessed users easily                         |Low         |           |Iteration 1.3b|
|experienced user                                                                            |see personal metadata such as number of high-priority students & number of contacts                           |determine my own usage                                     |Low         |           |Iteration 1.3b|
|new user                                                                                |see a short tutorial                                                                                |get familiar with key features                             |Low         |Not started|Iteration 1.3b|
|general user                                                                                |see a list of recently looked up people                                                                       |quickly add on thoughts on the people I've just seen       |Medium      |           |Iteration 1.3b|
|mentor professor, module professor                                                          |hide groups                                                                                |ignore groups no longer relevant to me                     |Low         |           |Iteration 1.3b|
|general user, mentor professor, module professor, on the go user                            |export the data to PDF & CSV / Excel                                                                          |reference the information in another format                |Low         |           |Iteration 1.3b|
|experienced user                                                                            |sort by complete inclusion of terms rather than matching any term                                             |narrow down my search results easily                       |Low         |Not started|Iteration 1.3b|
|general user                                                                                |create general reminders                                                                                |remind myself of tasks I need to do for my mentees/students|Low         |Not started|Iteration 1.3b|
|experienced user, module professor                                                          |set my own command aliases                                                                                |use my own commands when I am used to them                 |Low         |           |Delay         |
|experienced user, mentor professor, module professor                                        |use shorter commands                                                                                |save time                                                  |Medium      |           |Delay         |

### Use cases

(For all use cases below, the **System** is the `Notor` and the **Actor** is the `user`, unless specified
otherwise)

**Use case: Add a note to a person**

**MSS**

1. User requests to add a note to the person
2. Notor shows a list of persons
3. User requests to add a note to a specific person in the list
4. Notor opens up a pop up dialogue for the user to type the note for the person
5. User requests to save the note to the person
6. Notor stores the book to the person
7. Notor saves the note to storage

   Use case ends.

**Extensions**

* 2a. The list is empty. Use case ends.

* 3a. The given index is invalid.
    * 3a1. Notor shows an error message. Use case resumes at step 2.

**Use case: User types a command**

**MSS**

1. User starts typing a command in Notor
2. Notor shows possible commands starting with what user has typed
3. User presses tab to select the right command
4. User presses enter to execute the selected command
5. Notor runs command (UC1)

   Use case ends.

**Extensions**

* 2a. The typed string is not in any command.
    * 2a1. Notor displays no commands. Use case resumes at step 1.

### Non-Functional Requirements

1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed.
2. Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.
3. A user with above average typing speed for regular English text (i.e., not code, not system admin commands) should be
   able to accomplish most of the tasks faster using commands than using the mouse.
4. Installing a new update shall not in any way, modify or erase existing data and value from the previous version, and
   the new update should be compatible with the data produced earlier within the system.
5. Should be able to store notes in English language, and provisions shall be made to support all languages.
6. The system should be able to handle notes with at most 1000 lines without any noticeable decrease in performance, so
   that users can keep extensive notes on their mentees.
7. The user should not lose any data if the system exits prematurely.
8. The system should be able to reply to the prompt or command from the user within 3 seconds.
9. The system should be intuitive to use for a mentor professor.
10. Should ensure personal data privacy and security of data access.
11. Software testing will require the use of automated testing. The test will be deleted after successful implementation
    of the software system.

--------------------------------------------------------------------------------------------------------------------

## **Appendix: Instructions for manual testing**

Given below are instructions to test the app manually.

:information_source: **Note:** These instructions only provide a starting point for testers to work on;
testers are expected to do more *exploratory* testing.

### Launch and shutdown

1. Initial launch

    1. Download the jar file and copy into an empty folder

    1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be
       optimum.

1. Saving window preferences

    1. Resize the window to an optimum size. Move the window to a different location. Close the window.

    1. Re-launch the app by double-clicking the jar file.

       Expected: The most recent window size and location is retained.

1. _{ more test cases … }_

### Deleting a person

1.  Prerequisites: List all persons using the `list` command. Multiple persons in the list.

    1. Test case: `delete 1`

       Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message.
       Timestamp in the status bar is updated.

    1. Test case: `delete 0`

       Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.

    1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)

       Expected: Similar to previous.

1. _{ more test cases … }_

### Saving data

1. Dealing with missing/corrupted data files

    1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_

1. _{ more test cases … }_

repository: HalphasX/tp

repo_name: HalphasX/tp


text:
# protoc-gen-deepcopy

[![Go Reference](https://pkg.go.dev/badge/github.com/protobuf-tools/protoc-gen-deepcopy.svg)](https://pkg.go.dev/github.com/protobuf-tools/protoc-gen-deepcopy)

protoc-gen-deepcopy is a plugin for protoc which generates `DeepCopyInto()`, `DeepCopy()` and `DeepCopyInterface()` functions for .pb.go types.

## Generated

```proto
syntax = "proto3";

package generated;

option go_package = "github.com/protobuf-tools/protoc-gen-deepcopy/testdata/generated";

// TagType for ensure DeepCopyInto method is created.
message TagType {
    uint32 fieldA = 1;
    string fieldB = 2;
}

// TagTypeMap for ensure created map type.
message TagTypeMap {
    map<string, TagType> tag_types = 1;
}

// RepeatedFieldType for ensure repeated field in an API is not copied twice.
message RepeatedFieldType {
    repeated string ns = 1;
}
```

```go
// Code generated by protoc-gen-deepcopy. DO NOT EDIT.

package generated

import (
	proto "google.golang.org/protobuf/proto"
)

// DeepCopyInto supports using TagType within kubernetes types, where deepcopy-gen is used.
func (in *TagType) DeepCopyInto(out *TagType) {
	p := proto.Clone(in).(*TagType)
	*out = *p
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagType. Required by controller-gen.
func (in *TagType) DeepCopy() *TagType {
	if in == nil {
		return nil
	}
	out := new(TagType)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TagType. Required by controller-gen.
func (in *TagType) DeepCopyInterface() interface{} {
	return in.DeepCopy()
}

// DeepCopyInto supports using TagTypeMap within kubernetes types, where deepcopy-gen is used.
func (in *TagTypeMap) DeepCopyInto(out *TagTypeMap) {
	p := proto.Clone(in).(*TagTypeMap)
	*out = *p
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagTypeMap. Required by controller-gen.
func (in *TagTypeMap) DeepCopy() *TagTypeMap {
	if in == nil {
		return nil
	}
	out := new(TagTypeMap)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TagTypeMap. Required by controller-gen.
func (in *TagTypeMap) DeepCopyInterface() interface{} {
	return in.DeepCopy()
}

// DeepCopyInto supports using RepeatedFieldType within kubernetes types, where deepcopy-gen is used.
func (in *RepeatedFieldType) DeepCopyInto(out *RepeatedFieldType) {
	p := proto.Clone(in).(*RepeatedFieldType)
	*out = *p
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepeatedFieldType. Required by controller-gen.
func (in *RepeatedFieldType) DeepCopy() *RepeatedFieldType {
	if in == nil {
		return nil
	}
	out := new(RepeatedFieldType)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RepeatedFieldType. Required by controller-gen.
func (in *RepeatedFieldType) DeepCopyInterface() interface{} {
	return in.DeepCopy()
}
```

## Acknowledgement

protoc-gen-deepcopy was largely inspired by [istio.io/tools/cmd/protoc-gen-deepcopy](https://github.com/istio/tools/tree/master/cmd/protoc-gen-deepcopy).

repository: protobuf-tools/protoc-gen-deepcopy

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: protobuf-tools/protoc-gen-deepcopy


text:
# General election: Boris Johnson's team left flailing as Trump slams Brexit deal

Published at: **2019-11-01T08:19:43+00:00**

Author: **Dan Bloom, https://www.facebook.com/mirrordanbloom**

Original: [mirror](https://www.mirror.co.uk/news/politics/general-election-boris-johnsons-team-20786482)

Boris Johnson's team was forced onto the back foot today after Donald Trump launched a surprise attack on the Tory leader's Brexit deal.
A Cabinet minister backpedalled furiously after the lying US President declared the new pact means the US "can't make a trade deal with the UK".
And Mr Johnson's allies were also forced to deny a pact with Nigel Farage after Trump claimed he and Boris Johnson would make a "terrific team".
The hand grenade intervention - on the racist President's pal Farage's LBC show - came just hours before the Brexit Party declare where they will stand in the general election .
Farage's announcement in Westminster will be crucial to know whether he's 'going easy' on Brexiteer Tories to help keep them in power.

Last month, a leading member of Boris Johnson's team told journalists Farage was not a "fit and proper person" and "should never be allowed anywhere near government."
Yet a Brexit Party-Tory pact was previously agreed at a local level and Boris Johnson would be powerless to stop a 'Brexit alliance' if Farage decides to lead it.
The criticism of Mr Johnson's Brexit deal may be the most damaging aspect of the interview.
Boris Johnson had boasted he'd be able to do a trade deal with the US after getting rid of Theresa May's 'backstop', which could have trapped the UK in an EU customs union.
Yet Trump disagreed. The President told LBC: "We wanna do trade with the UK and they wanna do trade with us.
"And to be honest with you this deal under certain aspects of the deal you can’t do it, you can’t do it, you can’t trade.

"I mean we can’t make a trade deal with the UK and we can be, because I think we can do many times of numbers that we’re doing right now, and certainly much bigger numbers that you’re doing under the European Union.
"So I know Boris wants to be very careful with that. Yeah because under certain ways we’re precluded which would be ridiculous."
Shadow Housing Secretary Robert Jenrick was forced to disagree today. He told the BBC: "Well, that's not how we see it.
"We think that the new deal the Prime Minister has negotiated... enables the whole of the UK to leave the EU customs union and that means that we can now strike our own free trade deals around the world."
Former Trade Secretary Liam Fox added "I don't know" what the objections actually are. He told the BBC: "
Trump's further blow was his comment on Nigel Farage doing a deal with Boris Johnson.
He told Farage: "He’s a fantastic man and I think he’s the exact right guy for the time.
"And I know you and him will end up doing something that could be terrific if you and he, if you and he get together as, you know, unstoppable force."
Mr Jenrick told BBC Radio 4's Today programme: "We are not interested in doing any pacts with the Brexit Party, or, indeed with anybody else.
"We are in this to win it."
Meanwhile Labour hit back at Trump's devastating verdict on Jeremy Corbyn .
Trump said: "Corbyn would be so bad for your country.
"He’d be so bad, he’d take you in such a bad way. He’d take you into such bad places."
Shadow trade secretary Barry Gardiner told the BBC: "Of course he sides with the super-rich, Labour doesn't.
"So, it's no surprise to me that he thinks it would be bad news for people like him."
The President flatly denied the NHS would be up for grabs in trade talks.
But Jeremy Corbyn said: " Donald Trump is trying to interfere in Britain’s election to get his friend Boris Johnson elected.
"It was Trump who said in June the NHS is 'on the table'. And he knows if Labour wins US corporations won’t get their hands on it. Our NHS is not for sale."

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

branch_name: refs/heads/master

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
# ns-cloner-api
Adds an endpoint to the Wordpress REST API to allow NS Cloner to copy sites in a multisite installation.

# Notes

It is recommended to use this plugin with

- JWT Authentication for WP REST API (https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/)
- NS Cloner (https://de.wordpress.org/plugins/ns-cloner-site-copier/)
- The user you use must have the 'export' capability

# Endpoint

- POST http://HOSTNAME/wp-json/ns-cloner/v1/copy
    - Headers:
        - Content-Type: application/json
    - Body:
        - source_id: ID of the blog you wanna copy.
        - target_name: The Name of the new blog (e.g. NAME.HOSTNAME.COM). Be aware that there is no check yet if the name already exists.
        - target_title: The Title of the new blog

license: MIT


text:
## Description:
- My project works on displaying Current Time Stamps
- To create Current time stamps using python, we will need to import two Python modules one for creating GUI and another to get year data.
- **Pendulum**, Pendulum is one of the libraries in python which provides easily manages complex date manipulations better than native DateTime instances. It also manages timezones.
- And for the speaking purpose, we will use **pyttsx3**.

## Procedure:
```python
import pendulum
import pyttsx3
```
- First after importing modules.
- After that we will make a function **speak()** in which we will set the rate of speaking and the type of voice.
- Then we will take input from user for which year you want to display the calendar.
- After that in code section we will first use **pendulum.now()** which will tell the current date and time of that zone.
- After displaying it, a bot voice will ask you to enter a location which is evaluated in try and except block.

## Sample Output:
![LGM](https://github.com/AmitGupta700/Awesome_Python_Scripts/blob/main/AutomationScripts/Current%20Time%20Stamps/Images/Output.png)

## For any query please contact:
LinkedIn

gha_license_id: MIT


text:
# MobileNet ![You_asked for_this](https://img.shields.io/badge/You_asked-for_this-orange.svg)

> MobileNet on TensorFlow with ability to fine-tune and incorporate center or triplet loss

A tensorflow implementation of Google's [MobileNets](https://arxiv.org/abs/1704.04861) for re-training/fine-tuning on your own custom dataset with the addition of (optional) center loss or triplet loss. Additionally, this repo can be used to re-train Inception network as well with the above added benefits.

##  Tensorflow release
Currently this repo is compatible with Tensorflow 1.3.0.

##  News
| Date     | Update |
|----------|--------|
| 2017-10-25 | Currently working on triplet loss |
| 2017-10-25 | Added code to support center loss |

##  Pre-trained Model
Inception_v3 is the most accurate model, but also the slowest. For faster or smaller models, choose a MobileNet with the form `mobilenet_<parameter_size>_<input_size>_[(optional)quantized]`. For example,'mobilenet_1.0_224' will pick a model that is 17 MB in size and takes 224
     pixel input images, while 'mobilenet_0.25_128_quantized' will choose a much
      less accurate, but smaller and faster network that's 920 KB on disk and
      takes 128x128 images.

These models are automatically downloaded for you.

##  Installation
Details on how to install and re-train on your own dataset can be found on the ![wiki page](https://github.com/ronny3050/MobileNet/wiki/Re-train-MobileNet-on-your-own-dataset). Different parameters that can be tweaked are also given there.

##  Inspiration
The code is heavily inspired by the Tensorflow's [Retrain Script](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.py) and [FaceNet](https://github.com/davidsandberg/facenet).


text:
# Code-Challenge 01
Array Reverse (in place)

## Deployment Tutorial

### Author:
Lyndsey Thomas

### Links and Resources
* [submission PR]()
* [travis]()
* [front-end]()

#### Documentation
* [jsdoc]()

### Modules

##### Exported Values and Methods

### Setup

#### `.env` requirements
jest

#### Running the app
* `npm start`
* Endpoint: `/`
  * Returns true or false
* Endpoint: `/docs`
  * Renders Developer Documentation

#### Tests
* Unit Tests: `npm run test`
* Lint Tests: `npm run lint`
* Assertions Made
  * Assert
* Assertions Remaining
  * ... Things I want to tests, but didn't yet.

#### UML

![UML Diagram](./uml.jpeg)

gha_language: JavaScript


text:
# Vida Modeling
User Interface and Simulation Platform for a System Dynamics Model
Part of the Vida Decision Support System for COVID-19
Managed by the Space Enabled Research Group at the Massachusetts Institute of Technology
For more information on the Vida project, see https://www.media.mit.edu/projects/vida-decision-support-system/overview/

For questions, please contact Jack Reid at<EMAIL_ADDRESS>
This project utilizes numerous different, primarily public government data sources from around the world. For more information on the data, its sources,
and how it is formated in this repository, see SD_UI/Data/Data_Header_Explanation.txt and SD_UI/Data/Data_Descriptions.xlsx. For information on the
permitted uses of this data, please see the original source for that data.

The license for this code is available in the LICENSE file.

SD_UI_v1_5.py is the primary python script that runs the user interface.
SDlib_v1_v4.py is a package defining the underlying system dyanmics model.
MapWindow_v4.py is a package defining the visualization of shapefiles and their associated data in the user interface.
translations.csv serves as a lookup table to translate text in the user interface.
Context_Status_tracker.txt notes the current development status of each context area (i.e. each application location) of the user interface.
The Data folder contains all of the data using by the user interface. See Data/Data_Header_Explanation.txt for more details.
The Auxilary Files contains various scripts used by the developers to process data and conduct other actions. These are not directly used by SD_UI_v1_5.py.


text:
# Human-Resources-Application
A laravel 5.4 application used to manage supervisors and employees.

## To get started using this web app
```sh
git clone https://github.com/mikeyo241/Human-Resources-Application.git
cd Human-Resources-Application/
```

## Development Database Configuration
Don't use this configuration in a production environment.
```mysql
CREATE USER 'forge'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE HR_SYSTEM;
GRANT ALL PRIVILEGES ON HR_SYSTEM.* TO 'forge'@'localhost';
FLUSH PRIVILEGES;
```
## Testing the app in the browser
The database must be configured and the terminal should be in the project's root folder.
```sh
php artisan migrate
php artisan serve
```
Enter the address given ( most likely http://<IP_ADDRESS>:8000 ) into any browser to view the application.


text:
---
title: fault-injection
keywords:
  - Apache APISIX
  - API Gateway
  - Plugin
  - Fault Injection
  - fault-injection
description: This document contains information about the Apache APISIX fault-injection Plugin.
---

<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
-->

## Description

The `fault-injection` Plugin can be used to test the resiliency of your application. This Plugin will be executed before the other configured Plugins.

The `abort` attribute will directly return the specified HTTP code to the client and skips executing the subsequent Plugins.

The `delay` attribute delays a request and executes the subsequent Plugins.

## Attributes

| Name              | Type    | Requirement | Default | Valid      | Description                                                                                |
|-------------------|---------|-------------|---------|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abort.http_status | integer | required    |         | [200, ...] | HTTP status code of the response to return to the client.                                                                                |
| abort.body        | string  | optional    |         |            | Body of the response returned to the client. Nginx variables like `client addr: $remote_addr\n` can be used in the body.                                    |
| abort.headers     | object  | optional    |         |            | Headers of the response returned to the client. The values in the header can contain Nginx variables like `$remote_addr`. |
| abort.percentage  | integer | optional    |         | [0, 100]   | Percentage of requests to be aborted.                                                                                |
| abort.vars        | array[] | optional    |         |            | Rules which are matched before executing fault injection. See [lua-resty-expr](https://github.com/api7/lua-resty-expr) for a list of available expressions. |
| delay.duration    | number  | required    |         |            | Duration of the delay. Can be decimal.                                                                                |
| delay.percentage  | integer | optional    |         | [0, 100]   | Percentage of requests to be delayed.                                                                                |
| delay.vars        | array[] | optional    |         |            | Rules which are matched before executing fault injection. See [lua-resty-expr](https://github.com/api7/lua-resty-expr) for a list of available expressions.  |

:::info IMPORTANT

To use the `fault-injection` Plugin one of `abort` or `delay` must be specified.

:::

:::tip

`vars` can have expressions from [lua-resty-expr](https://github.com/api7/lua-resty-expr) and can flexibly implement AND/OR relationship between rules. For example:

```json
[
    [
        [ "arg_name","==","jack" ],
        [ "arg_age","==",18 ]
    ],
    [
        [ "arg_name2","==","allen" ]
    ]
]
```

This means that the relationship between the first two expressions is AND, and the relationship between them and the third expression is OR.

:::

## Enable Plugin

You can enable the `fault-injection` Plugin on a specific Route as shown below:

```shell
curl http://<IP_ADDRESS>:9180/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
    "plugins": {
       "fault-injection": {
           "abort": {
              "http_status": 200,
              "body": "Fault Injection!"
           }
       }
    },
    "upstream": {
       "nodes": {
           "<IP_ADDRESS>:1980": 1
       },
       "type": "roundrobin"
    },
    "uri": "/hello"
}'
```

Similarly, to enable a `delay` fault:

```shell
curl http://<IP_ADDRESS>:9180/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
    "plugins": {
       "fault-injection": {
           "delay": {
              "duration": 3
           }
       }
    },
    "upstream": {
       "nodes": {
           "<IP_ADDRESS>:1980": 1
       },
       "type": "roundrobin"
    },
    "uri": "/hello"
}'
```

You can also enable the Plugin with both `abort` and `delay` which can have `vars` for matching:

```shell
curl http://<IP_ADDRESS>:9180/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
    "plugins": {
        "fault-injection": {
            "abort": {
                "http_status": 403,
                "body": "Fault Injection!\n",
                "vars": [
                    [
                        [ "arg_name","==","jack" ]
                    ]
                ]
            },
            "delay": {
                "duration": 2,
                "vars": [
                    [
                        [ "http_age","==","18" ]
                    ]
                ]
            }
        }
    },
    "upstream": {
        "nodes": {
            "<IP_ADDRESS>:1980": 1
        },
        "type": "roundrobin"
    },
    "uri": "/hello"
}'
```

## Example usage

Once you have enabled the Plugin as shown above, you can make a request to the configured Route:

```shell
curl http://<IP_ADDRESS>:9080/hello -i
```

```
HTTP/1.1 200 OK
Date: Mon, 13 Jan 2020 13:50:04 GMT
Content-Type: text/plain
Transfer-Encoding: chunked
Connection: keep-alive
Server: APISIX web server

Fault Injection!
```

And if we configure the `delay` fault:

```shell
time curl http://<IP_ADDRESS>:9080/hello -i
```

```
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 6
Connection: keep-alive
Server: APISIX web server
Date: Tue, 14 Jan 2020 14:30:54 GMT
Last-Modified: Sat, 11 Jan 2020 12:46:21 GMT

hello

real    0m3.034s
user    0m0.007s
sys     0m0.010s
```

### Fault injection with criteria matching

You can enable the `fault-injection` Plugin with the `vars` attribute to set specific rules:

```shell
curl http://<IP_ADDRESS>:9180/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
    "plugins": {
        "fault-injection": {
            "abort": {
                    "http_status": 403,
                    "body": "Fault Injection!\n",
                    "vars": [
                        [
                            [ "arg_name","==","jack" ]
                        ]
                    ]
            }
        }
    },
    "upstream": {
        "nodes": {
            "<IP_ADDRESS>:1980": 1
        },
        "type": "roundrobin"
    },
    "uri": "/hello"
}'
```

Now, we can test the Route. First, we test with a different `name` argument:

```shell
curl "http://<IP_ADDRESS>:9080/hello?name=allen" -i
```

You will get the expected response without the fault injected:

```
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Connection: keep-alive
Date: Wed, 20 Jan 2021 07:21:57 GMT
Server: APISIX/2.2

hello
```

Now if we set the `name` to match our configuration, the `fault-injection` Plugin is executed:

```shell
curl "http://<IP_ADDRESS>:9080/hello?name=jack" -i
```

```
HTTP/1.1 403 Forbidden
Date: Wed, 20 Jan 2021 07:23:37 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: APISIX/2.2

Fault Injection!
```

## Delete Plugin

To remove the `fault-injection` Plugin, you can delete the corresponding JSON configuration from the Plugin configuration. APISIX will automatically reload and you do not have to restart for this to take effect.

```shell
curl http://<IP_ADDRESS>:9180/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
    "uri": "/hello",
    "plugins": {},
    "upstream": {
        "type": "roundrobin",
        "nodes": {
            "<IP_ADDRESS>:1980": 1
        }
    }
}'
```

repository: apache/apisix

gha_language: Lua

repo_name: apache/apisix


text:
# Database

We use an SQL (relational) database, which will be used to store information relative to the project.

## Structure

It contains five tables:

### ``objects``

- Goal: hold information about the objects of the game
- 6 columns:
  1. ``id`` - primary identifier
  2. ``name`` - the name of the object
  3. ``effect`` - an integer linked to the `Effects` enumerator, indicating which effect it has on the player / level
  4. ``traversable`` - a boolean indicating whether a character can pass through
  5. ``min_instances`` - how many instances can there be at least in a single level
  6. ``max_instances`` - how many instances can there be at most in a single level

### ``levels``

- Goal: hold information about each level
- 6 columns:
  1. ``id`` - primary identifier
  2. ``name`` - the name of the level (can be entered by the user)
  3. ``author`` - the author name, as a string
  4. ``shape`` - the shape of the level, formatted like `x,y`
  5. ``creation_date`` - the date the level was submitted
  6. ``last_modification_date`` - the date the level was last modified

### ``levels_content``

- Goal: hold a data structure capable of storing the content of each level
- 5 columns:
  1. ``id`` - primary identifier
  2. ``level_id`` - the ID of the level it is linked to, from the `levels` table
  3. ``pos_x`` - the `x` coordinate of the cell
  4. ``pos_y`` - the `y` coordinate of the cell
  5. ``value`` - the value of the cell: an integer linked to the id of the object, from the ``objects`` database

### `tests`

- Goal: hold information about each test performed
- 5 columns:
  1. ``id`` - primary identifier
  2. ``level_id`` - the ID of the level the test ran on
  3. ``algorithm`` - the name of the algorithm used for this test
  4. ``steps_number`` - how many steps the test contains
  5. ``run_date`` - the date the test was ran

### `tests_content`

- Goal: hold information about the content of the test, usually pathfinding steps
- 5 columns:
  1. ``id`` - primary identifier
  2. ``test_id`` - the ID of the test it is linked to, from the `tests` table
  3. ``step`` - the step index
  4. ``pos_x`` - the `x` coordinate of the character at the end of this step
  5. ``pos_y`` - the `y` coordinate of the character at the end of this step

repository: LilianBoulard/LevelTwo

gha_language: Python

repo_name: LilianBoulard/LevelTwo


text:
# `Bot.io`
[![MIT License](https://img.shields.io/badge/License-MIT-Blue.svg)](LICENSE)
[![Generic badge](https://img.shields.io/badge/Build-Passing-Green.svg)](https://mvnrepository.com/artifact/io.github.alexzhyshko/BotIO)

# Documentation for the [latest](https://search.maven.org/artifact/io.github.alexzhyshko/BotIO) version

#### [Usage example](https://github.com/alexzhyshko/Bot.io.examples/tree/master)

##### It's a simple Telegram Bot framework for Java to make your life easier

  - *Route an update to a specific class and method*
  - *Use built-in Dependency Injection for comfortable component usage*
  - *Easily scale your app only by adding one class and couple annotations*
  - *Use a built-in boilerplate class for Bot that has all you need by default*

## Tech

* **Java** - widespread programming language mainly used for enterprise projects
* **TelegramBots lib** - library for interaction with Telegram API ([link](https://github.com/rubenlagus/TelegramBots/wiki/Getting-Started), huge thanks to [**rubenlagus**](https://github.com/rubenlagus))

## Usage

### Annonations
* `@Component` - to include a class to an Application Context
* `@Filter` - to mark that a class is a filter
* `@Inject` - to inject an object to a field
* `@Async` - use this annotation on the type to mark that it contains async code. Use on method to specify which method should be ran asynchronously
* `@State` - use this annotation over a type to mark that it contains State logic, in parantheses specify stateNumber (default = 0)
* `@Message` - use this annotation over the method to specify which method should be used for mapping, in parentheses specify `message` to map(default = *)
* `@Callback` - use this annotation on the method to mark that it contains callback mapping. In parentheses specify `command` to map(default = *)
* `@UserServiceMarker` - marker annotation to mark user-created User Service class, which is to be used by core

### Startup
For startup use this line in your main method:
```
    Application.start();
```

### UserService
The framework offers a default in-memory user state tracking mechanism, but in order to override it, developer can perform next actions. For example, you need to
implement a mechanism to store user states to the database, in this case User Service overriding will come handy
* Define a class with any name(but logically - UserService)
* Add `@Component` and `@UserServiceMarker` so the context can find your custom User Service
* Create a method `int getUserState(int)` to let router use this method for routing
* * Create a method `int setUserState(int, int)` to let router use this method for routing
```
@Component
@UserServiceMarker
public class UserService {

	UserRepository repository;

	public int getUserState(int userid) {
		repository.getStateByUserId(userid);
	}

	public int setUserState(int userid, int state) {
		repository.setStateByUserId(userid, state);
	}

}
```

### Configuring
* Create an `application.properties` in `src/main/java`
* Add three properties:
    * rootPackage - root package, where to start file scan
    * bot.token
    * bot.username

### Router

* Create any class in your project
* Annotate it with `@Component` and `@State`, add `stateNumber` argument to `@State`
* Add any method and annotate it with `@State`(for routing regular message) or `@Callback`(for routing callback query) and add `message` or `command` argument respectively ro route specific message/command to metod. By default `*`, means that, if no other routes found, this route will be used.
All mapping will be performed automatically

### Routing to classes

* Inject a `RouterManager` class as a field and use its methods to change user's case according to given class name.
Can be completely replaced just by using UserService's `setUserState` method

### Session
* Using `@Inject` annotation inject a `SessionManager` field to your case class
* There is no need to choose proper session for user, it is auto mapped by itself
* To set a property, use `setProperty(key, value)`
* To get property, use `getProperty(key, targetClass)`

### Filters
* To declare that a class is a fiter, use `@Filter` and `@Component`
* Add `order` argument(zero-based) to specify ordder of filter, if you have several
* Add `enabled` argument(default true) to disable/enable filter
* Implement core interface `FilterAdapter` and its method
* If you want to terminate query(filter didn't match), throw a `FilterException`

### Sending messages
* Use `@Inject` over a `MessageSender` field in your case class
* Using built-in methods fill needed info for message: `chatId` and `text`.
* (Optional) Add buttons using built-in methods and button objects, you can set location or contact request to button
* Invoke `sendMessage` on your MessageSender instance to send message.
* After this, all attributes are restored to default and object can be reused.
Example:
```
    int userid = ApplicationContext.getCurrentUserId();
    sender.setChatId(userid);
    sender.setText("case 0 works");
    sender.sendMessage();
```

### Editing messages
* Use `@Inject` over an `MessageEditor` field in your case class
* Using built-in methods fill needed info for message: `chatId`, `text` and `messageId`.
* (Optional) Add inline buttons using built-in methods and inline button objects, you can set URL link to the button
* Invoke `editMessage` on your MessageEditor instance to edit message.
* After this, all attributes are restored to default and object can be reused.
```
    String data = update.getCallbackQuery().getData();
	editor.setChatId(ApplicationContext.getCurrentUserId());
	editor.setMessageId(update.getCallbackQuery().getMessage().getMessageId());
	editor.setText("New text");
	editor.setInlineButtons(Arrays.asList("New inline"), Arrays.asList("new_inline"));
	editor.sendMessage();
```

### Deleting messages
* Use `@Inject` over an `MessageDeleter` field in your case class
* Using built-in methods fill needed info for message: `chatId` and `messageId`.
* Invoke `deleteMessage` on your `MessageDeleter` instance to delete message.
* After this, all attributes are restored to default and object can be reused.
```
    int userid = ApplicationContext.getCurrentUserId();
    deleter.setChatId(userid);
    deleter.setMessageId(update.getCallbackQuery().getMessage().getMessageId());
    deleter.deleteMessage();
```

### Sending documents
* Use `@Inject` over a `DocumentSender` field in your case class
* Using built-in methods fill needed info for message: `chatId` and `file`.
* Invoke `sendDocument` on your DocumentSender instance to send document.
* After this, all attributes are restored to default and object can be reused.
```
    File file = new File("path to file");
    InputFile inputFile = new InputFile(file, file.getName());
    docSender.setChatId(userid);
    docSender.setFile(inputFile);
    docSender.sendDocument();
```

### Loading documents
* Use `@Inject` over a `DocumentLoader` field in your case class
* Using `loadDocument` and pass a documentId as parameter to get a `java.io.File` result
```
    int docId = someId;
    File result = docLoader.loadDocument(docId);
```

### Framework can be built to jar using shading


text:
---
id: version-0.5.2-dataloaders
title: DataLoaders
original_id: dataloaders
---

## Data Loaders

If you want to read more about _DataLoaders_ in general, you can head over to Facebook's [GitHub repository](https://github.com/facebook/dataloader).

GraphQL is very flexible in the way you can request data. This flexibility also introduces new classes of problems called _n+1_ issues for the GraphQL server developer.

In order to depict the issue that DataLoaders solve in this context, let me introduce a little GraphQL schema:

```graphql
type Query {
  person(id: ID): Person
}

type Person {
  id: ID
  name: String
  friends: [Person]
}
```

The above schema allows to fetch a person by its internal identifier and each person has a list of friends that is represented by a list of persons.

Since GraphQL requests are not fixed requests like REST requests, the developer really defines what data he/she wants. This avoids overfetching data that you do not need and also saves you unecessary roundtrips to the GraphQL backend.

So, a query against the above schema could look like the following:

```graphql
{
  a: person(id: "a") {
    name
  }

  b: person(id: "b") {
    name
  }
}
```

The above request fetches two persons in one go without the need to call the backend twice. The problem for the GraphQL backend is that field resolvers are atomic and do not have any knoledge about the query as a whole. So, a field resolver does not know that it will be called multiple times in parallel to fetch similar or equal data from the same data source.

This basically represents the first case where _DataLoaders_ help us by batching requests against our database or backend service. Currently, we allow _DataLoaders_ per request and globally.

So, let's look at some code in order to understand what they are doing. First, let's have a look at how we would write our field resolver without _DataLoaders_:

```csharp
public async Task<Person> GetPerson(string id, [Service]IPersonRepository repository)
{
    return await repository.GetPersonById(id);
}
```

The above example would result in two calls to the person repository that would than fetch the persons one by one from our data source.

If you think that through you can see that each GraphQL request would cause multiple requests to our data source resulting in slugish performance and uneccessary roundtrips to our data source.

This, means that we reduced the roundtrips from our client to our server with GraphQL but multiplied the roundtrips between the data sources and the service layer.

With _DataLoaders_ we can now centralise our person fetching and reduce the number of round trips to our data source.

First, we have to create a _DataLoader_ that now acts as intermediary between a field resolver and the data source.

```csharp
public class PersonDataLoader : DataLoaderBase<string, Person>
{
    private readonly IPersonRepository _repository;

    public PersonDataLoader(IPersonRepository repository)
      : base(new DataLoaderOptions<string>())
    {
        _repository = repository;
    }

    protected override Task<IReadOnlyList<Result<string>>> Fetch(
        IReadOnlyList<string> keys)
    {
        return _repository.GetPersonBatch(keys);
    }
}
```

The _DataLoader_ is now injected by the execution engine as a field resolver argument.

_DataLoaders_ have to be injected at field resolver argument level and **NOT** as constructor arguments since the lifetime of a _DataLoader_ is in many cases shorter than the class containing the field resolvers.

```csharp
public Task<Person> GetPerson(string id, [DataLoader]PersonDataLoader personLoader)
{
    return personLoader.LoadAsync(id);
}
```

Next, we have to register our _DataLoader_ with the schema. By default, _DataLoaders_ are registerd as per-request meaning that the execution engine will create one instance of each _DataLoader_ per-request **if** a field resolver has requested a _DataLoader_. This ensures that, _DataLoaders_ that are not beeing requested are not instantiated unnecessarily.

```csharp
Schema.Create(c =>
{
    // your other code...

    c.RegisterDataLoader<PersonDataLoader>();
});
```

Now, person requests in a single execution batch will be batched to the data source.

But there are still some more issues ahead that _DataLoaders_ will help us with. For that we should amend our query a little bit.

```graphql
{
  a: person(id: "a") {
    name
    friends {
      name
    }
  }

  b: person(id: "b") {
    name
    friends {
      name
    }
  }
}
```

The above query now drills down into the friends property, which again yields persons.

Let's, say our person object is located in a mongo database and the document would look something like the following:

```json
{
  "id":"a"
  "name":"Foo"
  "friends": [
    "b",
    "c",
    "d"
  ]
}

{
  "id":"b"
  "name":"Bar"
  "friends": [
    "a",
    "c",
    "e"
  ]
}
```

The person with ID `a` is also friends with person `b`. Moreover, `a` is also friends with `c` and `d`. Furthermore, `b` is friends with `a` and also friends with `c` and `e`.
The best case now would be that we only fetch `c`, `d` and `e` since we have already fetched `a` and `b`.

This is the second problem class the _DataLoader_ utility helps us with since the _DataLoader_ contains a cache and holds the resolved instances by default for the duration of your request.

For more information about our _DataLoader_ implementation head over to our _DataLoader_ [GitHub repository](https://github.com/ChilliCream/greendonut).

## Custom Data Loaders

We are supporting custom _DataLoader_ implementations. You can use our

repository: gsimantiras/hotchocolate-docs

repo_name: gsimantiras/hotchocolate-docs


text:
# ServiceBus

To use the sample, firstly, create a queue on Azure and copy its connection string. Secondly, create a secret in Key Vault whose name is "ServiceBusConnectionString
" and value is the connection string.

repository: thuannguy/AzurePlayground

repo_name: thuannguy/AzurePlayground


text:
+++
title = "GSoC Coding Period Update 1"
date = 2019-06-13T18:51:55+05:30
draft = false
tags = ["gsoc2019", "opensource"]
categories = ["Google Summer of Code 2019"]
+++

The coding period officially started from May 27. My first task was to [**Remove duplicate Wikidata items from article recommendations**](https://phabricator.wikimedia.org/T216721). I had a clear understanding of what had to be done to fix the issue.
I sent in a patch after making the code changes. My mentor advised me to make a few changes which I fixed and the patch got merged.

During this time, I also attended the MediaWiki Training 2019 organized in Bangalore, India.
It was a great event and I got to meet 4 other GSoCers working with Wikimedia Foundation this year.
We had various hands-on sessions conducted by Jay Prakash and Tito Dutta.
I learnt about MediaWiki, Extentions, Gadgets, ToolsForge and the MediaWiki API.


text:
Backbone File Manager
=====================

Backbone is a brand new file manager for Android 4.0 and up.  We wrote Backbone to strike a balance between intuitive use and powerful functionality so that you'd be covered whether you're to modifying system file permissions or just organizing downloads.

Android has matured - isn't it time your file manager did the same?

Backbone is based on on the amazing [CMFileManager](https://github.com/CyanogenMod/android_packages_apps_CMFileManager) by Jorge Ruesga

Developed By
============

* Brandon Bowles
* Brent Kensey

License
-------

    Copyright 2013 BrandroidTools

    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.

repository: bkensey/Backbone

repo_name: bkensey/Backbone


text:
Use the most restrictive HTL context possible.

== Noncompliant Code Example
``

``

== Compliant Solution
``

``

Available markup context:
* html          - Use this in case you want to output HTMLRemoves markup that may contain XSS risks
* text          - Use this for simple HTML contentEncodes all HTML
* elementName   - Allows only element names that are white-listed, outputs 'div' otherwise -
* attributeName - Outputs nothing if the value doesn't correspond to the HTML attribute name syntaxdoesn't allow 'style' and 'on*' attributes
* attribute     - Applies HTML attribute escaping
* uri           - Outputs nothing if the value contains XSS risks
* scriptToken   - Outputs nothing if the value doesn't correspond to an Identifier, String literal or Numeric literal JavaScript token
* scriptString  - Applies JavaScript string escaping
* scriptComment - Context for Javascript block comments. Outputs nothing if value is trying to break out of the comment context
* scriptRegExp  - Applies JavaScript regular expression escaping
* styleToken    - Outputs nothing if the value doesn't correspond to the CSS token syntax
* styleString   - Applies CSS string escaping
* styleComment  - Context for CSS comments. Outputs nothing if value is trying to break out of the comment context
* comment       - Applies HTML comment escaping
* number        - Outputs zero if the value is not a number
* unsafe        - Use this at your own risk, this disables XSS protection completely
Source : https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#121-display-context

repository: IanTeng/AEM-Rules-for-SonarQube

repo_name: IanTeng/AEM-Rules-for-SonarQube


text:
# Lab 6: Mapping COVID-19 using Twitter Data

I made various maps using twitter data in conjunction with COVID-19 Data from the New York Times and population data from the 2019 Census.

---

## 1. COVID-19 Tweets Through Time

I collected several million tweets using rtweet that contained either "covid19" or "covid19" from March 20,2020 to March 27, 2020.
There were around 250k tweets per day collected, which were then narrowed down to tweets with location data.

Then I limited the Time frame to show changes in volume. March 20 had the most tweets during this time frame with location data, while March 26 had the least.

---

## 2. COVID-19 Tweets at the U.S. County Level

### Next I looked at Tweets by County

### Then I got data on COVID-19 Cases by County

### And I compared COVID-19 Tweet Share by County to COVID-19 Case by County

These were based on one collection of 270k tweets, which were then narrowed down to about 14k by selecting for ones with geolocation data.

These tweets spanned March 25 - March 27.

Note: I will also be adding one adjusted for population.

---

## 3. Comparing COVID-19 Tweets to Medicare for All tweets by State
### Click either image to open a web map!
[](/projects/lab6/group3_1/index.html)

---

[](/projects/lab6/group3_3/index.html)

---

COVID-19 tweet data was collected using rtweet. Tweets contained either "covid19" or "covid19" from March 25,2020 to March 27, 2020.
Medicare for All tweets contained either "MedicareForAll" (the popular hashtag) or "Medicare for All" (the phrase) from March 25, 2020 to March 27. 2020.

There were 14k COVID-19 tweets and 900 Medicare for All tweets with location data.The tweets were adjusted for population.

---

## 4. Comparing Medicare for All Tweets to COVID-19 Cases

This map compares a state's COVID-19 Cases share to its Medicare for All tweet share.
I hope to also create a map containing these shares adjusted with population.


text:
# DepthOS

[![Join the chat at https://gitter.im/depthos-dev/community](https://badges.gitter.im/depthos-dev/community.svg)](https://gitter.im/depthos-dev/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

console, integrated, offline, stable OS

___compile___
```
make build
```
___dependencies___

_runtime_ - grub

_build_ - gcc, gas, nasm, make, ld


text:
## 17.3 Collect Data for a Bug Report

In general, it is recommended to **test with the available latest update release or even an available latest EA (Early Access) release to see if the issue persists** and then collect as much relevant data as possible when you create a bug report or submit a support call. The following sections suggest the data to collect and, where applicable, it provides recommendations for the commands or general procedure for obtaining the data.

* [Hardware Details]()

* [Operating System Details]()

* [Java SE Version]()

* [Command-Line Options]()

* [Environment Variables]()

* [Fatal Error Log]()

* [Core or Crash Dump]()

* [Detailed Description of the Problem]()

* [Logs and Traces]()

* [Results from Troubleshooting Steps]()

### 17.3.1 Hardware Details

Sometimes a bug arises or can be reproduced only on certain hardware configurations. If a fatal error occurs, the error log might contain the hardware details. If an error log is not available, document in the bug report the number and the type of processors in the machine, the clock speed, and, where applicable and if known, some details on the features of that processor. For example, in the case of Intel processors, it might be relevant that hyper-threading is available.

### 17.3.2 Operating System Details

On the Oracle Solaris operating system, the `showrev -a` command prints the operating system version and patch information.

On Linux, it is important to know which distribution and version is used. Sometimes the /etc/*release file indicates the release information, but as components and packages can be upgraded independently, it is not always a reliable indication of the configuration. Therefore, in addition to the information from the `*`release file, collect the following information:

* The kernel version. This can be obtained using the `uname -a` command.

* The `glibc` version. The `rpm -q glibc` command indicates the patch level of `glibc`.

* The thread library. There are two thread libraries for Linux, namely `LinuxThreads` and `NPTL`. The `LinuxThreads` library is used on 2.4 and older kernels and has "fixed stack" and "floating stack" variants. The Native POSIX Thread Library (`NPTL`) is used on the 2.6 kernel. Some Linux releases (such as RHEL3) include backports of `NPTL` to the 2.4 kernel. Use the command `getconf GNU_LIBPTHREAD_VERSION` to determine which thread library is used. If the `getconf` command returns an error to say that the variable does not exist, then it is likely that you are using an old kernel with the `LinuxThreads` library.

### 17.3.3 Java SE Version

The Java SE version string can be obtained using the `java -version` command.

Multiple versions of Java SE may be installed on the same machine. Therefore, ensure that you use the appropriate version of the `java` command by verifying that the installation bin directory appears in your `PATH` environment variable before other installations.

### 17.3.4 Command-Line Options

If the bug report does not include a fatal error log, it is important to document the full command line and all its options. This includes any options that specify heap settings (for example, the `-mx` option) or any `-XX` options that specify HotSpot specific options.

One of the features in Java SE is garbage collector ergonomics.  A machine is considered to be a server machine if it has at least two processors and 2GB or more of memory.

The `-XX:+PrintCommandLineFlags` option can be used to verify the command-line options. This option prints all command-line flags to the VM. The command-line options can also be obtained for a running VM or core file using the `jmap` utility.

### 17.3.5 Environment Variables

Sometimes problems arise due to environment variable settings. When creating the bug report, indicate the values of the following Java environment variables (if set).

* `JAVA_HOME`

* `JRE_HOME`

* `JAVA_TOOL_OPTIONS`

* `_JAVA_OPTIONS`

* `CLASSPATH`

* `JAVA_COMPILER`

* `PATH`

* `USERNAME`

In addition, collect the following operating-system-specific environment variables.

* On Oracle Solaris and Linux operating systems, collect the values of the following environment variables.

  * `LD_LIBRARY_PATH`

  * `LD_PRELOAD`

  * `SHELL`

  * `DISPLAY`

  * `HOSTTYPE`

  * `OSTYPE`

  * `ARCH`

  * `MACHTYPE`

* On Linux, also collect the values of the following environment variables.

  * `LD_ASSUME_KERNEL`

  * `_JAVA_SR_SIGNUM`

* On Windows, collect the values of the following environment variables.

  * `OS`

  * `PROCESSOR_IDENTIFIER`

  * `_ALT_JAVA_HOME_DIR`

### 17.3.6 Fatal Error Log

**It is recommended to test with the latest update release to see if the problem persists.**

When a fatal error occurs, an error log is created. For detailed information about this file, see[Appendix A](https://github.com/cncounter/java-troubleshoot-cn/tree/master/18_Appendix_A_Fatal_Error_Log/).

The error log contains much information obtained at the time of the fatal error, such as version and environment information, details on the threads that provoked the crash, and so forth.

If the fatal error log is generated, be sure to include it in the bug report or support call.

### 17.3.7 Core or Crash Dump

Core and crash dumps can be very useful when trying to diagnose a system crash or hung process. The procedure for generating a dump is described in[Collect Core Dumps](17_04_Collect_Core_Dumps.md).

### 17.3.8 Detailed Description of the Problem

When creating a problem description, try to include as much relevant information as possible. Describe the application, the environment, and most importantly the events leading up to the time when the problem was encountered.

* If the problem is reproducible, list the steps that are required to demonstrate the problem.

* If the problem can be demonstrated with a small test case, include the test case and the commands to compile and execute the test case.

* If the test case or problem requires third-party code (for example, a commercial or open source library or package), provide details on where and how to obtain the library.

Sometimes the problem can be reproduced only in a complex application environment. In this case, the description, coupled with logs, core file, and other relevant information, might be the sole means to diagnose the issue. In these situations the description should indicate if the submitter is willing to run further diagnosis or run test binaries on the system where the issue arises.

### 17.3.9 Logs and Traces

In some cases, log or trace output can help to quickly determine the cause of a problem.

For example, in the case of a performance issue the output of the `-verbose:gc` option can help in diagnosing the problem. (This is the option to enable output from the garbage collector.)

In other cases the output from the `jstat` command can be used to capture statistical information over the time period leading up to the problem.

In the case of a deadlock or a hung VM (for example, due to a loop) the thread stacks can help diagnose the problem. The thread stacks are obtained by pressing Control+\ on Oracle Solaris and Linux and Control+Break on Windows.

In general, include all relevant logs, traces and other output in the bug report or support call.

### 17.3.10 Results from Troubleshooting Steps

Before submitting the bug report, be sure to document any troubleshooting steps that were performed.

For example, if the problem is a crash and the application has native libraries, you might have already run the application with the `-Xcheck:jni` option to reduce the likelihood that the bug is in the native code. Another case could be a crash that occurs with the HotSpot Server VM (`-server` option). If you have also tested with the HotSpot Client VM (`-client` option) and the problem does not occur, this gives an indication that the bug might be specific to the HotSpot Server VM.

In general, include in the bug report all troubleshooting steps and results that have already occurred. This type of information can often reduce the time that is required to diagnose an issue.

<https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/bugreports003.html>

repository: cncounter/java-troubleshoot-cn

repo_name: cncounter/java-troubleshoot-cn


text:
# Partitions

## Problem

In number theory, a partition of a positive integer `n` is a way of writing `n` as a sum of positive integers. Two sums that differ only in the order of the summands are considered the same partition. For example, 4 can be partitioned in 5 distinct ways:

```
4
3 + 1
2 + 2
2 + 1 + 1
1 + 1 + 1 + 1
```

Write a function called `solution` that takes a single integer parameter between 1 and 50, and returns the number of distinct partitions of that integer

## Test Cases

```
solution(4)
# 5

solution(10)
# 42

solution(50)
# 204226
```

## Solution

``` python
def solution(n):
        """Returns the partitions for a positive integer, n"""
        return len(partitions(n, n))

def partitions(n, m):
    """
        Generates partitions for an integer n, with maximum summand, m.
    """
    results = []
    if n == 1:
        results.append([1])
        return results
    elif m == 1:
        results.append([1] * n)
        return results
    else:
        for i in range(m, 0, -1):
            if i == n:
                results.append([i])
            elif i < n:
                for result in partitions(n - i, i):
                    results.append([i] + result)
        return results

assert solution(4) == 5
assert solution(10) == 42
assert solution(50) == 204226
```

repository: davidbarone/python-puzzles

repo_name: davidbarone/python-puzzles


text:
# Python HTTP Server Starter

A minimalistic Python HTTP server app using [Flask](http://flask.pocoo.org/).

## Running locally

Make sure you have [Python]https://www.python.org/) installed.
The code has been developed and tested using `Python 2.7.10`.

```sh
git clone git@github.com:andrea-prearo/http_server_starter_collection.git
cd http_server_starter_collection/python_http_server_starter
pip install Flask
FLASK_APP=app.py flask run
```

Your app should now be running on [localhost:5000](http://localhost:5000).

You can terminate the app by pressing `Ctrl+C`.


text:
# TA_opendns-fetchstats
## A Splunk TA to pull stats from your OpenDNS account.
This Splunk Technology Add-on was built to pull statistics from OpenDNS.  Note that OpenDNS is the home and small business version of Cisco Umbrella.  The logic of this script was based on fetchstats: https://github.com/opendns/opendns-fetchstats.

Considering that OpenDNS is a free/inexpensive version of Umbrella, there isn't an API to pull down all the DNS data.  What this TA does is pull statistics that are collected day by day basis.  It recommended to schedule the input once per day right after midnight.  The script pulls data from the previous day.

This TA only supports Splunk 8.0+ since it uses python3.

## Using this Technology Add-on

* The add-on has to be installed on Search Heads
* If data is collected through Intermediate Heavy Forwarders, it has to be installed on Heavy Forwarders, otherwise on indexers
* Once installed, go to which ever Splunk server will be collecting the data, go to Manage Apps, find this app and click the *Set Up* link under actions.  Enter your username (typically an email address) and password.
* Once the TA is configured, you can enable the input provided.

## Compatibility

* Requires Splunk 8.0 or higher.


text:
# fjskl
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

# Table of Contents
[Description](#description)
[Installation](#installation)
[Usage](#usage)
[Contributing](#contributing)
[Tests](#tests)
[Questions](#questions)
[License](#license)

# Description

# Installation

# Usage

# Contributing

# Tests

# Questions

[Maintainer](https://github.com/)
For further questions, direct emails [here](mailto:)

# License
  This project is covered under [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0)

repository: iatenine/readme-generator

repo_name: iatenine/readme-generator


text:
# LuaCss

![version 1.0](https://img.shields.io/badge/version-1.0-green.svg)

CSS tokenizing and minimizing library for Lua 5.1.
No external dependencies - only pure Lua.
The library tries to closely follow the [CSS3 specification](https://www.w3.org/TR/css-syntax-3/).

- [Usage](#usage)
- [API](#api)
- [Options](#options)
- [Token Format](#token-format)
	- [Token Types](#token-types)

## Usage
`css.lua` is the library. `utf8.lua` is used by the library. Those are the only files you need.

```lua
local css = [[
div {
	color: blue;
	/* Blah. */
	background-color: #36B !important;
}

@media (min-width: 800px) {
	.box a:hover { text-decoration: underline; }
}
]]

local cssLib = require("css")
local minimizedCss = cssLib.minimize(css)

-- minimizedCss is:
-- div{color:blue;background-color:#36B!important}@media(min-width:800px){.box a:hover{text-decoration:underline}}
```

## API

### minimize
`cssString = minimize( cssString [, options ] )`

`tokens = minimize( tokens [, options ] )`

Minimize a CSS string or a token array.
In the case of tokens, the original array is unchanged and a new array is returned.
See available [options](#options).

### serialize
`cssString = serialize( tokens [, options ] )`

Convert a token array to CSS string.
See available [options](#options).

### serializeAndMinimize
`cssString = serializeAndMinimize( tokens [, options ] )`

Convert a token array to minimized CSS string.
See available [options](#options).

### tokenize
`tokens = tokenize( cssString )`

Convert a CSS string to tokens.

```lua
local tokens = cssLib.tokenize(css)

for i, token in ipairs(tokens) do
	print(i, token.type, token.value, token.unit)
end
```

Note that all instances of U+0000 (NULL) code points are converted to U+FFFD (replacement character) per the specification.

### _VERSION
`version = _VERSION`

Not a function! Get the version of the library, i.e. `"1.0.2"`.

## Options
`options` is a table that can have any of these fields:

### autoZero
Enable automatic conversion of *zero* values (e.g. `0px` or `0%`) to become simply `0` during minification.
The default value is `true`.

### strict
Trigger an error if a `badString` or `badUrl` token is encountered during minification.
Otherwise, the error message is only printed.
The default value is `false`.

## Token Format
```lua
token = {
	-- Always present:
	type           = tokenType,

	-- Present in some token types:
	value          = tokenValue,
	from           = unicodeRangeStart,
	idType         = hashTokenIdentifierType,
	numberType     = numberType,
	quoteCharacter = stringQuoteCharacter,
	representation = originalNumberRepresentation,
	to             = unicodeRangeEnd,
	unit           = dimensionUnit,
}
```

### Token Types

| Type               | Value | Description |
| ------------------ | ----- |------------ |
| `"atKeyword"`      | The name, e.g. `"media"`. | `@whatever` |
| `"badString"`      | nothing | Malformed string. |
| `"badUrl"`         | nothing | Malformed `url()`. |
| `"cdo"`
`"cdc"` | nothing | Long ago people used to wrap embedded CSS code inside HTML comments, thus these tokens (`"<!--"` and `"-->"`, respectively). |
| `"colon"`          | nothing | `:` |
| `"columnMatch"`    | nothing | Token that exists to help with parsing: ||. |
| `"comma"`          | nothing | `,` |
| `"comment"`        | The contents of the comment. | `/* Blah. */`
Note that comments starting with `!` are preserved during minification, e.g. `/*! Copyright info. */`. |
| `"dashMatch"`      | nothing | |= |
| `"dimension"`      | The number. | Numeric value with a unit.
This token has a `unit` field, e.g. with the value `"px"`.
This token also has the extra fields that the `number` type has. |
| `"function"`       | The name of the function, e.g. `"calc"`. | An identifier followed by a `(`. |
| `"hash"`           | The name, e.g. `"commentBox"` or `"A0FF5C"`. | Matches include ID selectors and color values.
This token also has an `idType` field with the value `"id"` or `"unrestricted"` (the latter *generally* meaning the value is a color starting with a number, e.g. `#2FBBAA`). |
| `"ident"`          | The name, e.g. `"div"` or `"font-size"`. | Any isolated identifier. |
| `"includeMatch"`   | nothing | `~=` |
| `"number"`         | The number. | Plain numeric value.
This token also has a `numberType` and `representation` field. `numberType` can be either `"integer"` or `"number"`. |
| `"percentage"`     | The number. | Numeric percentage value.
This token also has the extra fields that the `number` type has. |
| `"prefixMatch"`    | nothing | `^=` |
| `"semicolon"`      | nothing | `;` |
| `"string"`         | The contents of the string. | This token also has a `quoteCharacter` field whose value is either `"` (quote) or `'` (apostrophe).
Also see `badString`. |
| `"substringMatch"` | nothing | `*=` |
| `"suffixMatch"`    | nothing | `$=` |
| `"unicodeRange"`   | nothing | Unicode ranges has a `from` and a `to` field with Unicode code points. |
| `"url"`            | The URL. | This token also has a `quoteCharacter` field whose value is either `"` (quote), `'` (apostrophe) or an empty string.
Also see `badUrl`. |
| `"whitespace"`     | The contents of the whitespace sequence. | Whitespace characters are **space**, **horizontal tab** and **newline**. Note that all line endings are normalized into **newlines**. |
| `"("`, `")"`       | nothing | `(` and `)`, respectively. |
| `"["`, `"]"`       | nothing | `[` and `]`, respectively. |
| `"{"`, `"}"`       | nothing | `{` and `}`, respectively. |
| `"delim"`          | The delimiter. | Any other isolated punctuation character, e.g. `"."` or `"+"`. |

repository: ReFreezed/LuaCss

repo_name: ReFreezed/LuaCss


text:
# `@architect/utils` [![GitHub CI status](https://github.com/architect/utils/workflows/Node%20CI/badge.svg)](https://github.com/architect/utils/actions?query=workflow%3A%22Node+CI%22)
<!-- [![codecov](https://codecov.io/gh/architect/utils/branch/master/graph/badge.svg)](https://codecov.io/gh/architect/utils) -->

[@architect/utils][npm] are common utilities for the [@architect][arc] suite of projects.

## Installation

    npm i @architect/utils

# API

## `utils.banner(params)`

Responsible for printing the standard banner, and loading the basic environment variables and necessary AWS credentials necessary to run Architect.

`params` are required with the following available properties:

- `inventory` (required): Inventory object from `@architect/inventory`
- `disableBanner` (boolean): skip printing the banner and Architect's AWS environment bootstrapping routines
- `disableRegion` (boolean): don't print the AWS region (useful in public CI scenarios, for example)
- `disableProfile` (boolean): don't print the AWS profile (also useful in public CI scenarios)
- `version` (string): the package version string to print out (e.g. `Architect 1.2.3`)
- `quiet` (boolean): disable banner printing

## `utils.getLambdaName(fn)`

Returns a valid AWS Lambda function name based on its URL (route).

## `utils.pathToUnix(pathString)`

Converts any path to a Unix style path, with `/` as the seperator. This works around Windows issues where `/` is assumed across other parts of Architect.

## `utils.toLogicalID(str)`

Converts `str` into PascalCase for CloudFormation use.

## `utils.updater(name, params)`

`name` (a string) is required; `params` may include the boolean option `quiet` to manually override Architect's global printing status.

Returns a function to be reused for standardized logging updates with the following methods:

- `status` - prints an affirmative status update
  - optional: arbitrary number of supporting info on new lines with each additional param
- `start` - starts an animated progress indicator
  - aliases: `update`
- `done` - ends current progress indicator with an update
  - aliases: `stop`
- `cancel` - cancels current progress indicator without an update
- `err` - pretty prints an error
  - aliases: `error` and `fail`
- `warn` - cancels current progress indicator and prints a warning
  - aliases: `warn`
- `raw` - just logs a message as-is (while respecting quiet)

Automatically respects Architect's global printing status, and also respects the following env vars:

- `ARC_QUIET` - if truthy, disables printing
- `CI` - if truthy, disables certain terminal progress animations

[arc]: https://github.com/architect
[npm]: https://www.npmjs.com/package/@architect/utils

repository: architect/utils

repo_name: architect/utils


text:
---
heading: Salesforce Libraries
seo: Endpoint Setup | Salesforce Libraries | Cloud Elements API Docs
title: Endpoint Setup
description: Endpoint setup
layout: sidebarelementdoc
breadcrumbs: /docs/elements.html
elementId: 438
parent: Back to Element Guides
order: 5
---

## Endpoint Setup

Follow these steps to setup your Salesforce application with the endpoint.

__In order to create a Salesforce Element Instance you must have the Enterprise edition or Professional edition with API support is required. Also, to set up a new application in Salesforce, you must have Administrator privileges. Please contact your system administrator if you do not have those privileges.__

Via a web browser, log in to your Salesforce account:
[https://login.salesforce.com/](https://login.salesforce.com/)

Select "Setup" if not taken there by default:

1. In left hand nav menu, under create, select "Apps"

2. Click "New"
![Salesforce Connected App step 1](img/salesforce-connected-app-1.png)

3. Fill out the basic information about the app

4. Make sure to select "Enable OAuth Settings"

5. You’ll be required to enter a callback URL from the endpoint. This URL will be in your application’s address space, and you will be required to retrieve some information returned on this URL by the endpoint. For our example, we’ll use a callback URL of `https://mycoolapp.com/auth`.

6. Choose from the "Selected OAuth Scopes". "Full Access" and "Perform requests on your behalf at any time (refresh_token_, offline_access)" are the minimum needed scopes.

7. Add the selected scopes

8. Click "Save" at the bottom of the window ![Salesforce Connected App step 2](img/salesforce-connected-app-2.png)

9. Please make a note of the "Consumer Key"

10. Please make a note of the "Consumer Secret" ![Salesforce Connected App step 3](img/salesforce-connected-app-3.png)

Next [create an instance](salesforce-libraries-create-instance.html).

repository: cloud-elements/devportal

repo_name: cloud-elements/devportal


text:
# x6

> React components for building x6 editors

## Components

- Icon
- Dropdown
- Menu
- Menubar
- Toolbar
- ColorPicker

## Installation

```shell
# npm
$ npm install @antv/x6-components --save

# yarn
$ yarn add @antv/x6-components
```

## Usage

Import component and style:

```ts
import { Menu } from "@antv/x6-components/es/menu";
import "@antv/x6-components/es/menu/style";
```

We strongly recommend using [babel-plugin-import](https://github.com/ant-design/babel-plugin-import), which can convert the following code to the '@antv/x6-components/es/xxx' way:

```ts
import { Menu } from "@antv/x6-components";
```

And this plugin will also load corresponding styles too. Via `.babelrc` or babel-loader:

```json
{
  "plugins": [
    [
      "import",
      {
        "libraryName": "@antv/x6-components",
        "libraryDirectory": "es", // es or lib
        "style": true,
        "transformToDefaultImport": true
      }
    ]
  ]
}
```

## Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please [create an issue](https://github.com/antvis/x6/issues/new).


text:
---
title: "Tagging"
---

Use the `Appsignal.tag_request` method to supply extra context on errors and
performance issues. This can help to add information that is not already part of
the request, session or environment parameters.

You can use `Appsignal.tag_request` wherever the current request is accessible,
we recommend calling it before you application code runs in the request, such
as in a `before_action` using Rails.

```ruby
Appsignal.tag_request(
  :locale => I18n.locale
)
```

## Tags

Using tags you can easily add more information to errors and performance issues
tracked by AppSignal. There are a few limitations on tagging though.

- The tag key must be a `String` or `Symbol`.
- The tagged value must be a `String`, `Symbol` or `Integer`.
- The length of the tag key and tagged value must be less than 100 characters.

Tags that do not meet these limitations are dropped without warning.

```ruby
# Good, I18n.locale/default_locale returns a symbol
Appsignal.tag_request(
  user: current_user.id,
  locale: I18n.locale,
  default_locale: I18n.default_locale
)

# Bad, hash type is not supported
Appsignal.tag_request(
  i18n: {
    locale: I18n.locale,
    default_locale: I18n.default_locale
  }
)
```

## Link templates

Tags can also be used to create link templates. Read more about link templates
in our [link templates guide](/application/link-templates.html).

## Sending personal data

Please be mindful of sending personal data about your users to AppSignal. You
can choose to send user data, but a better workflow would be to send user IDs
or hashes and use [link templates](/application/link-templates.html) to link
them back to your own system.

repository: andrew/appsignal-docs

gha_language: Ruby

repo_name: andrew/appsignal-docs


text:
# Void Magic

Void Magic is an addon for [Thaumcraft 4](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292130-thaumcraft-)

### License
You are free to do whatever you wish with this mod and this source code, provided that you provide proper attribution.
Please don't distribute this mod behind any sort of ad-wall such as adf.ly or the like.
Please make any modifications of this code open-source.


text:
### Philosophy

When developing themes, we set out to tackle a common problem with working in development teams. There are two kinds of people who work on a website:

1. Developers
2. Designers

We love creating packages which are both developer-centric as well as designer-friendly. The only way to do this properly is keep a good separation of concerns.

Backend developers aren't great with design (because let's face it, backend developers would rather just "Twitter Bootstrap" every site they work on).

Frontend designers don't want to tackle with complex PHP code.

For this reason, we wanted to keep all asset handling within views and not in controllers or configuration files.

repository: jaeheeship/arthealing

repo_name: jaeheeship/arthealing