text:
# POSIX Access Control Lists

POSIX Access Control Lists (ACLs) allows you to assign different
permissions for different users or groups even though they do not
correspond to the original owner or the owning group.

For example: User john creates a file but does not want to allow anyone
to do anything with this file, except another user, antony (even though
there are other users that belong to the group john).

This means, in addition to the file owner, the file group, and others,
additional users and groups can be granted or denied access by using
POSIX ACLs.

## Activating POSIX ACLs Support

To use POSIX ACLs for a file or directory, the partition of the file or
directory must be mounted with POSIX ACLs support.

### Activating POSIX ACLs Support on Server

To mount the backend export directories for POSIX ACLs support, use the
following command:

```console
mount -o acl
```

For example:

```console
mount -o acl /dev/sda1 /export1
```

Alternatively, if the partition is listed in the /etc/fstab file, add
the following entry for the partition to include the POSIX ACLs option:

```text
LABEL=/work /export1 ext3 rw, acl 14
```

### Activating POSIX ACLs Support on Client

To mount the glusterfs volumes for POSIX ACLs support, use the following
command:

```console
mount –t glusterfs -o acl
```

For example:

```console
mount -t glusterfs -o acl <IP_ADDRESS>:glustervolume /mnt/gluster
```

## Setting POSIX ACLs

You can set two types of POSIX ACLs, that is, access ACLs and default
ACLs. You can use access ACLs to grant permission for a specific file or
directory. You can use default ACLs only on a directory but if a file
inside that directory does not have an ACLs, it inherits the permissions
of the default ACLs of the directory.

You can set ACLs for per user, per group, for users not in the user
group for the file, and via the effective right mask.

## Setting Access ACLs

You can apply access ACLs to grant permission for both files and
directories.

**To set or modify Access ACLs**

You can set or modify access ACLs use the following command:

```console
setfacl –m  file
```

The ACL entry types are the POSIX ACLs representations of owner, group,
and other.

Permissions must be a combination of the characters `r` (read), `w`
(write), and `x` (execute). You must specify the ACL entry in the
following format and can specify multiple entry types separated by
commas.

| ACL Entry            | Description                                                                                |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| u:uid:\<permission\> | Sets the access ACLs for a user. You can specify user name or UID                                                                                |
| g:gid:\<permission\> | Sets the access ACLs for a group. You can specify group name or GID.                                                                             |
| m:\<permission\>     | Sets the effective rights mask. The mask is the combination of all access permissions of the owning group and all of the user and group entries. |
| o:\<permission\>     | Sets the access ACLs for users other than the ones in the group for the file.                                                                    |

If a file or directory already has a POSIX ACLs, and the setfacl
command is used, the additional permissions are added to the existing
POSIX ACLs or the existing rule is modified.

For example, to give read and write permissions to user antony:

```console
setfacl -m u:antony:rw /mnt/gluster/data/testfile
```

## Setting Default ACLs

You can apply default ACLs only to directories. They determine the
permissions of a file system objects that inherits from its parent
directory when it is created.

To set default ACLs

You can set default ACLs for files and directories using the following
command:

```console
setfacl –m –-set
```

Permissions must be a combination of the characters r (read), w (write), and x (execute). Specify the ACL entry_type as described below, separating multiple entry types with commas.

u:_user_name:permissions_
Sets the access ACLs for a user. Specify the user name, or the UID.

g:_group_name:permissions_
Sets the access ACLs for a group. Specify the group name, or the GID.

m:_permission_
Sets the effective rights mask. The mask is the combination of all access permissions of the owning group, and all user and group entries.

o:_permissions_
Sets the access ACLs for users other than the ones in the group for the file.

For example, to set the default ACLs for the /data directory to read for
users not in the user group:

```console
setfacl –m --set o::r /mnt/gluster/data
```

> **Note**
>
> An access ACLs set for an individual file can override the default
> ACLs permissions.

**Effects of a Default ACLs**

The following are the ways in which the permissions of a directory's
default ACLs are passed to the files and subdirectories in it:

- A subdirectory inherits the default ACLs of the parent directory
  both as its default ACLs and as an access ACLs.
- A file inherits the default ACLs as its access ACLs.

## Retrieving POSIX ACLs

You can view the existing POSIX ACLs for a file or directory.

**To view existing POSIX ACLs**

- View the existing access ACLs of a file using the following command:

```console
getfacl
```

For example, to view the existing POSIX ACLs for sample.jpg

```console
getfacl /mnt/gluster/data/test/sample.jpg
```

```{ .text .no-copy }
owner: antony
group: antony
user::rw-
group::rw-
other::r--
```

- View the default ACLs of a directory using the following command:

```console
getfacl
```

For example, to view the existing ACLs for /data/doc

```console
getfacl /mnt/gluster/data/doc
```

```{ .console .no-copy }
owner: antony
group: antony
user::rw-
user:john:r--
group::r--
mask::r--
other::r--
default:user::rwx
default:user:antony:rwx
default:group::r-x
default:mask::rwx
default:other::r-x
```

## Removing POSIX ACLs

To remove all the permissions for a user, groups, or others, use the
following command:

```console
setfacl -x
```

#### setfaclentry_type Options

The ACL entry_type translates to the POSIX ACL representations of owner, group, and other.

Permissions must be a combination of the characters r (read), w (write), and x (execute). Specify the ACL entry_type as described below, separating multiple entry types with commas.

u:_user_name_
Sets the access ACLs for a user. Specify the user name, or the UID.

g:_group_name_
Sets the access ACLs for a group. Specify the group name, or the GID.

m:_permission_
Sets the effective rights mask. The mask is the combination of all access permissions of the owning group, and all user and group entries.

o:_permissions_
Sets the access ACLs for users other than the ones in the group for the file.

For example, to remove all permissions from the user antony:

```console
setfacl -x u:antony /mnt/gluster/data/test-file
```

## Samba and ACLs

If you are using Samba to access GlusterFS FUSE mount, then POSIX ACLs
are enabled by default. Samba has been compiled with the
`--with-acl-support` option, so no special flags are required when
accessing or mounting a Samba share.

## NFS and ACLs

Currently GlusterFS supports POSIX ACL configuration through NFS mount,
i.e. setfacl and getfacl commands work through NFS mount.

repository: gluster/glusterdocs

repo_name: gluster/glusterdocs


text:
[p5.js](https://p5js.org/) is a library to make javascript more accessible to people.

It can easily be implemented into NodeCG simply by including both the standard p5.js file and the [p5.dom](https://p5js.org/reference/#/libraries/p5.dom) library in the `shared` folder as this folder is always mounted.

p5.js can be used as normal and NodeCG calls are included when needed.

An example bundle containing a counter and a lower third is located in the [NodeCG simple examples](https://github.com/nodecg/nodecg-simple-examples) repo.

license: MIT

repository: OdatNurd/nodecg

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: OdatNurd/nodecg


text:
# 1 Naming Conventions
## 1.1 General Naming Conventions

### 1.1.1 Names representing types must be in mixed case starting with upper case.

Line, SavingsAccount

> Common practice in the C++ development community.

### 1.1.2 Variable names must be all lower-case with underscores separating words.

line, savings_account

> Common practice in the C++ development community. Makes variables easy to distinguish from types, and effectively resolves potential naming collision as in the declaration Line line.

### 1.1.3 Named constants (including enumeration values) must be all uppercase using underscore to separate words. Discussion

MAX_ITERATIONS, COLOR_RED, PI

> Common practice in the C++ development community.

In general, the use of such constants should be minimized. In many cases implementing the value as a method is a better choice:
```C++
int getMaxIterations() // NOT #define MAX_ITERATIONS 25
{
	return 25;
}
```
This form is both easier to read, and it ensures a unified interface towards class values.

In cases where the value is needed as a constant expression two possibilities are encourages:
```C++
constexpr int getMaxIterations() // NOT #define MAX_ITERATIONS 25
{
	return 25;
}
```

### 1.1.4 Names representing methods or functions must be verbs and written in mixed case starting with lower case.

getName(), computeTotalWidth()

> Common practice in the C++ development community. This is identical to variable names, but functions in C++ are already distinguishable from variables by their specific form.

### 1.1.5 Names representing namespaces should be all lowercase.

model::analyzer, io::iomanager, common::math::geometry

### 1.1.6 Names representing typedefs should be written like type names.
```C++
typedef std::vector<cv::Point> PointVector; //NOT: PointVector_t, NOT: PointVector_type
typedef boost::shared_ptr<aslam::Camera> CameraPtr; //NOT: Camera_ptr
```
Using the same naming convention as for types allows easier exchange in cases where a typename is replaced by an actual type later. Discussion.

### 1.1.7 Names representing a structure should be written in mixed case starting with upper case and finished with _t.
```C++
struct Points_t
{
	:
};
```
### 1.1.8 Abbreviations and acronyms must not be uppercase when used as name.
```C++
exportHtmlSource(); // NOT: exportHTMLSource();
openDvdPlayer();    // NOT: openDVDPlayer();
```
Using all uppercase for the base name will give conflicts with the naming conventions given above. A variable of this type would have to be named dVD, hTML etc. which obviously is not very readable. Another problem is illustrated in the examples above; When the name is connected to another, the readbility is seriously reduced; the word following the abbreviation does not stand out as it should.

### 1.1.9 Global variables.

Global variables are forbidden.

### 1.1.10 Class variables should have underscore suffix.
```C++
class SomeClass
{
private:
	int length_;
}
```
Apart from its name and its type, the scope of a variable is its most important feature. Indicating class scope by using underscore makes it easy to distinguish class variables from local scratch variables. This is important because class variables are considered to have higher significance than method variables, and should be treated with special care by the programmer. A side effect of the underscore naming convention is that it nicely resolves the problem of finding reasonable variable names for setter methods and constructors:
```C++
void setDepth (int depth)
{
	depth_ = depth;
}
```
An issue is whether the underscore should be added as a prefix or as a suffix. Both practices are commonly used, but the latter is recommended because it seem to best preserve the readability of the name.

It should be noted that scope identification in variables has been a controversial issue for quite some time. It seems, though, that this practice now is gaining acceptance and that it is becoming more and more common as a convention in the professional development community. Discussion

### 1.1.11 Generic variables should have the same name as their type.
```C++
void setTopic(Topic* topic) // NOT: void setTopic(Topic* value)
                            // NOT: void setTopic(Topic* aTopic)
                            // NOT: void setTopic(Topic* t)

void connect(Database* database) // NOT: void connect(Database* db)
                                 // NOT: void connect (Database* oracleDB)
```
> Reduce complexity by reducing the number of terms and names used. Also makes it easy to deduce the type given a variable name only. If for some reason this convention doesn't seem to fit it is a strong indication that the type name is badly chosen.

Non-generic variables have a role. These variables can often be named by combining role and type:
```C++
Point  startingPoint, centerPoint;
Name   loginName;
```
### 1.1.12 All names should be written in English.
```C++
fileName;   // NOT: nomFichier
```
English is the preferred language for international development.

### 1.1.13 Variables with a large scope should have long names, variables with a small scope can have short names.

Scratch variables used for temporary storage or indices are best kept short. A programmer reading such variables should be able to assume that its value is not used outside of a few lines of code. Common scratch variables for integers are i, j, k, m, n and for characters c and d.

### 1.1.14 The name of the object is implicit, and should be avoided in a method name.
```C++
line.getLength();   // NOT: line.getLineLength();
```
The latter seems natural in the class declaration, but proves superfluous in use, as shown in the example.

## 1.2 Specific Naming Conventions
### 1.2.1 The terms get/set must be used where an attribute is accessed directly. Use getVariableRef() if a reference is returned:
```C++
employee.getName();
employee.setName(name);

matrix.getElement(2, 4);
matrix.setElement(2, 4, value);

person.getAgeRef();
```

> Common practice in the C++ development community. In Java this convention has become more or less standard. Discussion about how to handle references

### 1.2.2 The term compute can be used in methods where something is computed.
```C++
valueSet->computeAverage();
matrix->computeInverse()
```

> Give the reader the immediate clue that this is a potentially time-consuming operation, and if used repeatedly, he might consider caching the result. Consistent use of the term enhances readability.

### 1.2.3 Plural form should be used on names representing a collection of objects.
```C++
vector<Point>  points;
int            values[];
```
> Enhances readability since the name gives the user an immediate clue of the type of the variable and the operations that can be performed on its elements.

### 1.2.4 The prefix n should be used for variables representing a number of objects.

nPoints, nLines

### 1.2.5 Iterator variables should be called i, j, k if the loop is rather small (less than 10 lines):
```C++
for (int i = 0; i < nTables); ++i)
{
	:
}
```
The notation is taken from mathematics where it is an established convention for indicating iterators. Variables named j, k etc. should be used for nested loops only.

Iterators should be called it
```C++
for (vector<MyClass>::iterator it = list.begin(); it != list.end(); ++it)
{
	Element element = *it;
	...
}
```
### 1.2.6 The prefix is should be used for boolean variables and methods.

isSet, isVisible, isFinished, isFound, isOpen

> Common practice in the C++ development community and partially enforced in Java. Using the is prefix solves a common problem of choosing bad boolean names like status or flag. isStatus or isFlag simply doesn't fit, and the programmer is forced to choose more meaningful names.

There are a few alternatives to the is prefix that fit better in some situations. These are the has, can and should prefixes:
```C++
bool hasLicense();
bool canEvaluate();
bool shouldSort();
```
### 1.2.7 Complement names must be used for complement operations.

get/set, add/remove, create/destroy, start/stop, insert/delete,
increment/decrement, old/new, begin/end, first/last, up/down, min/max,
next/previous, open/close, show/hide, suspend/resume, etc.

> Reduce complexity by symmetry.

### 1.2.8 Naming pointers specifically should be avoided.
```C++
Line* line; // NOT: Line* pLine;
            // NOT: LIne* linePtr;
```
Many variables in a C/C++ environment are pointers, so a convention like this is almost impossible to follow.
Also objects in C++ are often oblique types where the specific implementation should be ignored by the programmer.
Only when the actual type of an object is of special significance, the name should emphasize the type.

### 1.2.9 Negated boolean variable names must be avoided.
```C++
bool isError; // NOT: isNoError
bool isFound; // NOT: isNotFound
```
The problem arises when such a name is used in conjunction with the logical negation operator as this results in a double negative. It is not immediately apparent what !isNotFound means.

### 1.2.10 Enumeration constants can be prefixed by a common type name.
```C++
enum Color
{
	COLOR_RED,
	COLOR_GREEN,
	COLOR_BLUE
};
```

> This gives additional information of where the declaration can be found, which constants belongs together, and what concept the constants represent.

An alternative approach is to always refer to the constants through their common type: Color::RED, Airline::AIR_FRANCE etc.

The C++11 enum class specifier can be used. The values cannot be implicitly converted to int anymore enforcing additional type-safety.
```C++
enum class Enumeration
{
	Val1,
	Val2,
	Val3 = 100,
	Val4 // = 101
};
```
### 1.2.11 Exception classes should be suffixed with Exception.
```C++
class AccessException
{
	:
}
```

> Exception classes are really not part of the main design of the program, and naming them like this makes them stand out relative to the other classes.

## 1.3 Source Files

### 1.3.1 C++ header files should have the extension .hpp (preferred) or .h. Source files should have the extension .cpp.

MyClass.cpp, MyClass.hpp

> These are all accepted C++ standards for file extension.

### 1.3.2 A class should be declared in a header file and defined in a source file where the name of the files match the name of the class.

include/MyClass.hpp, src/MyClass.cpp

> This makes it easy to find the associated files of a given class.

### 1.3.3 All definitions should reside in source files.

Except the definition needs to stay in an included file (inline functions or any templated definition).
Then it should be in a separate implementation header which is included at the end of the declaring header.
Only definitions that are also very short and trivial as simple getters, setters or constructors with short initialization lists only or empty function implementations may be written directly in the declaring header file.

A non-templated class in MyClass.hpp:

```C++
class MyClass
{
public:
	int getValue () const {return value_;}  // NO, unless inlining required.
	...

private:
	int value_;
};
```

A templated class in MyTemplatedClass.hpp:

```C++
template<typename T>
class MyTemplatedClass
{
public:
	virtual ~MyTemplatedClass(){} // Okay because trivial and templated.
	int getValue () const {return value_;} // Okay because trivial and templated.

	int calcComplicated(); // Only declaration in this header file because its definition is nontrivial.
	...

private:
	int value_;
};
```

## 1.4 Include Files and Include Statements

### 1.4.1 Header files must contain an include guard.

```C++
#ifndef CLASSNAME_H
#define CLASSNAME_H
  :
#endif // CLASSNAME_H
```

> The construction is to avoid compilation errors. The name convention resembles the location of the file inside the source tree and prevents naming conflicts.

### 1.4.2 Include statements should be sorted and grouped.

Sorted by their hierarchical position in the system with low level files included first. Leave an empty line between groups of include statements.
The order of includes should be: C libs / C++ stl / ... / local includes. Local includes should be included using " ", others using <>.
The include statements should be grouped by libraries.

```C++
#include <fstream>
#include <iomanip>

#include <qt/qbutton.h>
#include <qt/qtextfield.h>

#include "com/company/ui/PropertiesDialog.h"
#include "com/company/ui/MainWindow.h"
```

> In addition to show the reader the individual include files, it also give an immediate clue about the modules that are involved. Include file paths must never be absolute. Compiler directives should instead be used to indicate root directories for includes.

### 1.4.3 Avoid nested includes.

All what the class needs should be included, for clarity Include all files which are required in the current translation unit.
Do not rely on the include being done earlier up the include hierarchy.

### 1.4.4 Include statements must be located at the top of a file only.

Common practice. Avoid unwanted compilation side effects by "hidden" include statements deep into a source file.

# 2 Statements

## 2.1 Types

### 2.1.1 Types that are local to one file only can be declared inside that file.

Enforces information hiding.

### 2.1.2 The parts of a class must be sorted public, protected and private.

All sections must be identified explicitly. Not applicable sections should be left out.
The ordering is "most public first" so people who only wish to use the class can stop reading when they reach the protected/private sections.

### 2.1.3 Type conversions should always be done explicitly.

You should not rely on implicit type conversion.
```C++
floatValue = static_cast<float>(intValue); // NOT: floatValue = intValue;
```
By this, the programmer indicates that he is aware of the different types involved and that the mix is intentional.

## 2.2 Variables

### 2.2.1 Variables should be initialized where they are declared.

This ensures that variables are valid at any time. Sometimes it is impossible to initialize a variable to a valid value where it is declared:
```C++
int x, y, z;
getCenter(&x, &y, &z);
```

> In these cases it should be left uninitialized rather than initialized to some phony value.

### 2.2.2 Variables must never have dual meaning.

Enhance readability by ensuring all concepts are represented uniquely. Reduce chance of error by side effects.

### 2.2.3 Use of global variables should be avoided.

In C++ there is no reason global variables need to be used at all. The same is true for global functions.

### 2.2.4 Use of static variables should be minimized.

In C++ there only a few situations where static variables need to be used at all. One example is the Singleton pattern.
In most other cases static variables should be replaced by enums.

### 2.2.5 Class variables should never be declared public.

The concept of C++ information hiding and encapsulation is violated by public variables. Use private variables and access functions instead.
One exception to this rule is when the class is essentially a data structure, with no behavior (equivalent to a C struct). In this case it is appropriate to make the class instance variables public.

### 2.2.6 C++ pointers and references should have their reference symbol next to the type rather than to the name.
```C++
float* x; // NOT: float *x;
int& y;   // NOT: int &y;
```
The pointer-ness or reference-ness of a variable is a property of the type rather than the name.
> C-programmers often use the alternative approach, while in C++ it has become more common to follow this recommendation.

### 2.2.7 Implicit test for 0 should not be used other than for boolean variables and pointers.
```C++
if (nLines != 0)  // NOT: if (nLines)
if (value != 0.0) // NOT: if (value)
```
It is not necessarily defined by the C++ standard that ints and floats 0 are implemented as binary 0.
Also, by using an explicit test the statement gives an immediate clue of the type being tested.
It is common also to suggest that pointers shouldn't test implicitly for 0 either, i.e. if (line == 0) instead of if (line).
The latter is regarded so common in C/C++ however that it can be used.

### 2.2.8 Test of a pointer should use the C++11 nullptr type or implicit conversion to it instead of comparing against NULL / 0.
```C++
if (data != nullptr)  // NOT: if (data == NULL)
if(data) //NOT: if (data == 0)
```
### 2.2.9 Variables should be declared in the smallest scope possible.

Keeping the operations on a variable within a small scope, it is easier to control the effects and side effects of the variable.

## 2.3 Loops

### 2.3.1 Only loop control statements must be included in the for() construction.
```C++
sum = 0;                       // NOT: for (i = 0, sum = 0; i < 100; i++)
for (i = 0; i < 100; i++)                sum += value[i];
	sum += value[i];
```
Increase maintainability and readability. Make a clear distinction of what controls and what is contained in the loop.

### 2.3.2 do-while loops can be avoided.

do-while loops are less readable than ordinary while loops and for loops since the conditional is at the bottom of the loop.
The reader must scan the entire loop in order to understand the scope of the loop. In addition, do-while loops are not needed.
Any do-while loop can easily be rewritten into a while loop or a for loop. Reducing the number of constructs used enhance readbility.

### 2.3.3 The form while(true) should be used for infinite loops.
```C++
while (true)
{
	:
}

for (;;) // AVOID!
{
	:
}

while (1) // NO!
{
	:
}
```
## 2.4 Conditionals

### 2.4.1 Complex conditional expressions must be avoided. Introduce temporary boolean variables instead.
```C++
bool isFinished = (elementNo < 0) || (elementNo > maxElement);
bool isRepeatedEntry = elementNo == lastElement;
if (isFinished || isRepeatedEntry)
{
	:
}

// NOT:
if ((elementNo < 0) || (elementNo > maxElement)||
     elementNo == lastElement)
{
	:
}
```

> By assigning boolean variables to expressions, the program gets automatic documentation. The construction will be easier to read, debug and maintain.

### 2.4.2 The nominal case should be put in the if-part and the exception in the else-part of an if statement.
```C++
bool isOk = readFile (fileName);
if (isOk)
{
	:
}
else
{
	:
}
```

> Makes sure that the exceptions don't obscure the normal path of execution. This is important for both the readability and performance.

### 2.4.3 The conditional should be put on a separate line. While not being necessary, the use of curly brackets around the statement is encouraged.
```C++
if (isDone)       // NOT: if (isDone) doCleanup();
	doCleanup();

if (isDone)		  // NOT: if (isDone) doCleanup();
{
	doCleanup();
}
```

> This is for debugging purposes. When writing on a single line, it is not apparent whether the test is really true or not.

### 2.4.4 Executable statements in conditionals must be avoided.
```C++
File* fileHandle = open(fileName, "w");
if (!fileHandle)
{
	:
}

// NOT:
if (!(fileHandle = open(fileName, "w")))
{
	:
}
```

> Conditionals with executable statements are just very difficult to read. This is especially true for programmers new to C/C++.

## 2.5 Miscellaneous

- Never have lengthy files or functions, this usually indicates a problem in the project structure Optimally functions should be shorter than 300 lines and contain a single functionality which can also be tested externally. Separation in several translation units speeds up compilation time and improves clarity.

- Whenever possible, avoid too many dependencies on external libraries Before adding a dependency to an external library for just a few function calls, think about whether the functionality can't also be provided by an existing dependency or implemented inside your project.

- Add a namespace around your project, this helps integration with other projects. Using namespaces keeps the global namespace clean and avoids ambiguity of names for types, methods etc.

- The use of magic numbers in the code should be avoided. Numbers other than 0 and 1 should be considered declared as named constants instead. If the number does not have an obvious meaning by itself, the readability is enhanced by introducing a named constant instead. A different approach is to introduce a method from which the constant can be accessed.

- Floating point constants should always be written with decimal point and at least one decimal.
```C++
double total = 0.0;    // NOT:  double total = 0;
double speed = 3.0e8;  // NOT:  double speed = 3e8;

double sum;
:
sum = (a + b) * 10.0;
```
- Floating point constants should always be written with a digit before the decimal point.

double total = 0.5;  // NOT:  double total = .5;

- Functions must always have the return value explicitly listed.
```C++
int getValue()   // NOT: getValue()
{
	:
}
```
If not explicitly listed, C++ implies int return value for functions. A programmer must never rely on this feature, since this might be confusing for programmers not aware of this artifact.

- goto should not be used. Goto statements violate the idea of structured code. Only in some very few cases (for instance breaking out of deeply nested structures) should goto be considered, and only if the alternative structured counterpart is proven to be less readable.

- The condition braces must not be on the same line as the condition
```C++
if(isOk)   // NOT: if(isOk) {
{
	:
}
```

- The indentation must be four spaces wide
```C++
int getValue()   // NOT: getValue()
{
	:	// OK
  :		// NOT
}
```

gha_language: C


text:
-   Fix portal.json 404
    -   Request is unnecessary in this case
-   Disable code splitting (if possible) and call it out in readme. Validate behavior of `import()`
-   Flesh out README.md in template with additional info and validate hyperlinks
-   Develop against an existing app use case - instead of using app/layout in template?
-   Use Case that needs investigation (may run into issues):
    -   Develop library, upload to app via designer and push to prod
    -   Go to make changes to same library and test in designer (this functionality doesn't yet exist)
    -   We are now loading duplicate libraries. What happens now? GAD could handle this by not loading the existing library resource, but we don't have a good way to match which existing library resource is the current dev library

repository: guushub/vertigis-web-sdk

repo_name: guushub/vertigis-web-sdk


text:
# ps-web-component
testing building and publishing a stencil web component

## Using this component

### Script tag

- [Publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages)
- Put a script tag similar to this `<script<EMAIL_ADDRESS>in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc

### Node Modules
- Run `npm install my-component --save`
- Put a script tag similar to this `<script src='node_modules/my-component/dist/mycomponent.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc

### In a stencil-starter app
- Run `npm install my-component --save`
- Add an import to the npm packages `import my-component;`
- Then you can use the element anywhere in your template, JSX, html etc

repository: psinkinson/stencil-component

repo_name: psinkinson/stencil-component


text:
---
layout: post
title: "Cooking the books"
date: "2019-08-28"
categories: ["Web strategy"]
---

Over the past two days, we optimized tf out of our B2B lead generation site.

A prominent "Click Here for $1,000 Cash" button has driven engagement through the roof, and pointing all CTAs to the Contact Us form page has successfully increased the Form Page Visit conversion rate. 🏆

But did we really improve the site?

As ridiculous as these examples are, the answer is "maybe."

_Intuitively_, we'd expect the "$1,000 Cash" CTA to frustrate visitors, as there's no $1,000 to be had. There's not even a mention of it on the form page where the CTA takes them.

Speaking of which, we'd expect most of the additional form page visitors to be more bewildered than motivated. They only landed there because they couldn't find a way to get more info on the product.

Still.

Either the updates improved the site's conversion rate, or they didn't. We _know_ we've got more engagement and form page visits; the stats calculator assures us of this fact.

The problem is that same stats calculator gravely informs us that, since we only get about 100 conversions a month, we need 6 weeks of data just to detect an effect of _30% or greater._

If these changes have driven conversions down to 75 a month, that is terrible - and we won't know it. If they raised conversions to 120 a month, that is HUGE - and we won't know it.

So how can we decide whether to keep our "$1,000" CTAs and keep sending all clickers straight to the contact form?

branch_name: refs/heads/main


text:
---
Added: v2.1.0
Status: Active
---
# Content Node Selector Panel component

Opens a [Content Node Selector](content-node-selector.component.md) in its own dialog window.

## Basic Usage

```html
    <adf-content-node-selector-panel
        [currentFolderId]="currentFolderId"
        [dropdownHideMyFiles]="dropdownHideMyFiles"
        [dropdownSiteList]="dropdownSiteList"
        [rowFilter]="rowFilter"
        [imageResolver]="imageResolver"
        (select)="onSelect($event)">
    </adf-content-node-selector-panel>
```

### Properties

| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| currentFolderId | string | null | Node ID of the folder currently listed |
| dropdownHideMyFiles | boolean | false | Hide the "My Files" option added to the site list by default. [See More](sites-dropdown.component.md) |
| dropdownSiteList | [SitePaging](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) |  | custom site for site dropdown same as siteList. [See More](sites-dropdown.component.md#properties) |
| rowFilter | RowFilter | null | Custom row filter function. [See More](document-list.component.md#custom-row-filter) |
| imageResolver | ImageResolver | null | Custom image resolver function. [See More](document-list.component.md#custom-image-resolver) |
| pageSize | number | 10 | Number of items shown per page in the list |
| isSelectionValid | ValidationFunction | defaultValidation | Function used to decide if the selected node has permission to be the chosen. The defaultValidation always returns true.  |
| breadcrumbTransform | (node) => any | null | Action to be performed to the chosen/folder node before building the breadcrumb UI. Can be useful in case a custom formatting is needed to the breadcrumb, so changing the node's path elements that help build the breadcrumb can be done through this function. |

#### Using breadcrumbTransform example

Before opening the Content Node Selector, you can add a breadcrumbTransform function to the ContentNodeSelectorComponentData to make changes to what is displayed on the breadcrumb. For example, something like this:
```
    const data: ContentNodeSelectorComponentData = {
        title: title,
        actionName: action,
        currentFolderId: contentEntry.parentId,
        imageResolver: this.imageResolver.bind(this),
        rowFilter : this.rowFilter.bind(this, contentEntry.id),
        isSelectionValid: this.hasEntityCreatePermission.bind(this),
        breadcrumbTransform: this.changeBreadcrumbPath.bind(this), // here is the transform function
        select: select
    };

    this.openContentNodeDialog(data, 'adf-content-node-selector-dialog', '630px');
```
where the transform function could be something like this:
```
    private changeBreadcrumbPath(node: MinimalNodeEntryEntity) {

        if (node && node.path && node.path.elements) {
            const elements = node.path.elements;

            if (elements.length > 1) {
                if (elements[1].name === 'Sites') {
                    elements.splice(1, 1);
                }
            }
        }

        return node;
    }
```
and here is the display of the breadcrumb before and after transform:
![Content Node Selector breadcrumbTransfrom before/after screenshot](docassets/images/breadcrumbTransform.png)

### Events

| Name | Description |
| ---- | ----------- |
| select | Emitted when the user has chosen an item |

## Details

This component opens a _content node selector_ in its own dialog window. This behaves a lot like the
standard file open/save dialogs used by applications to choose files. Full details are given in the
[Content Node Selector component](content-node-selector.component.md) page (this is similar but does
not manage the dialog window for you). Also, the
[Content Node Dialog service](content-node-dialog.service.md) has several methods that give you
finer control over the behavior of the dialog.

## See also

-   [Content Node Selector component](content-node-selector.component.md)
-   [Content Node Dialog service](content-node-dialog.service.md)


text:
# Binary search in a sorted 1D array

## Authors: Anastasia Lebedeva, Terrell Douglas

## Challenge
Write a function called binary_search which takes in 2 parameters: a sorted array and the search key. Without utilizing any of the built-in methods available to your language, return the index of the array’s element that is equal to the search key, or -1 if the element does not exist.

### Example Input ---> Output:
* [4,8,15,16,23,42], 15 ---->  2
* [11,22,33,44,55,66,77], 90 ----> -1

## Approach & Efficiency
In our solution we created function wich takes two arguments(ordered list and search key element).
Create low var equal to 0, create high var equal to len(arr)
Set While loop which will rub on;y if len(arr)> 0
Set middle var to product of (low+high)//2
compare middle value with key value and either:
    - return value if equal
    -adjust high or low values
    - return -1 if key doesn't exist in arr
return -1 if lenght of arr is 0

Big O(log N)

## Solution
![Whiteboard Solution](https://github.com/nastinsk/python-data-structures-and-algorithms/blob/master/assets/array-binary-search.jpg)

[Link to Code](https://github.com/nastinsk/python-data-structures-and-algorithms/blob/master/challenges/array_binary_search/array_binary_search.py)

gha_language: Python


text:
### Level Comparison

The below charts show the load balance between the different levels of the tree.
Tree construction is compared against one call to `find_colliding_pairs`.

Some observations:
* The cost of rebalancing the first level is the most erratic.
    This is because in some cases we're hitting the worst cases of pdqselect.
	I like to think of the algorithm as a sponge and the problem as water seeping through it.
	First you you have coarse filtering, then it gets more precise.
* The load goes from the top levels to the bottom levels as the aabbs spread out more.
* The load on the first few levels is not high unless the aabbs are clumped up.
* The leaves don't have much work to do since aabbs have a size, they aren't likely to
  into a leaf.

<link rel="stylesheet" href="css/poloto.css">

{{#include raw/level_analysis_theory_rebal.svg}}
{{#include raw/level_analysis_theory_query.svg}}
{{#include raw/level_analysis_bench_rebal.svg}}
{{#include raw/level_analysis_bench_query.svg}}

### Evenness of load

{{#include raw/query_evenness_theory_default.svg}}
{{#include raw/query_evenness_theory_dense.svg}}
{{#include raw/query_evenness_theory_sparse.svg}}

The above charts show that the work load is pretty even between the left and right recursing of the algorithm.
As aabbs get more clumped up, the right side starts to dominate more. I'm not sure why this is, but I do know that picking the median based off of the right and bottom of the aabbs instead of left and top makes no difference in this case. I think it is just that this particular spiral distribution becomes not so uniform when the aabbs are extremely clumped up.

{{#include raw/query_num_per_node_theory_default.svg}}
{{#include raw/query_num_per_node_theory_dense.svg}}
{{#include raw/query_num_per_node_theory_sparse.svg}}

The above charts show that the number of elements per node becomes very saturated / evenly distributed when elements are not as clumped up.

repository: WaDelma/broccoli

repo_name: WaDelma/broccoli


text:
# Orchid Alert
[![Build Status](https://travis-ci.org/TheOrchid/Alert.svg?branch=master)](https://travis-ci.org/TheOrchid/Alert)
[![Total Downloads](https://poser.pugx.org/orchid/alert/d/total.svg)](https://packagist.org/packages/orchid/alert)
[![Latest Stable Version](https://poser.pugx.org/orchid/alert/v/stable.svg)](https://packagist.org/packages/orchid/alert)
[![Latest Unstable Version](https://poser.pugx.org/orchid/alert/v/unstable.svg)](https://packagist.org/packages/orchid/alert)
[![License](https://poser.pugx.org/orchid/alert/license.svg)](https://packagist.org/packages/orchid/alert)

This is an alert package for Orchid CMS.

## Installation

Pull in the package through Composer.

Run `composer require orchid/alert` to get the latest stable version of the package.


text:
# tappx
 - Technical Test for :tappx - React  and UX/UI
- Repo: https://github.com/martinrebo/tappx-devapp
- Hosting: https://tappx-devapp.ey.r.appspot.com/

## Known Issues
- In some cases Random User API respond with a empty ID field for the user.
- Unit Tests: I didn't have enough time to develop a testing strategy. (No coverage, no confidence)

## TECH
- Create React App for boiler plate React code
- Custom Hook for Right Context Menu
- CSS: CSS Modules + Inline Styles + CSS grid + Flexbox
- Context Hook for Global State and dispatch actions
- Unit Tests: Jest + React Testing Library (smoke tests)

## EXTRA - SPECS
- *Right Context Menu*: Right click on the table to see a context menu with a dummy console log functionality
- *Piechart Component*: Using CSS + HTML + Polyfill shows the % of developers by gender.

 # Frontend Test

Hi, the main idea of this test is to develop a basic application using some specific
technologies to check your level.

## What do we need to be developed?
● User Interface: Design and implement a clean and visually attractive UI
● Client Side/Frontend service: Developed with ReactJS
The app that you are going to build is an App Developer Manager. It's a one page app
that consumes an Api service to generate random person data and lets it interact with
this person data.
The App will be a simple but responsive and visually attractive page. The design of
this app has to follow the tappx brand colors that you can see at tappx.com
The app consists in a unique view that contains:
● A page header, with the tappx logo and the title of the page.
● A button that adds a new random developer to the table, and stores it at
localstorage.
● A responsive table, that shows the developers stored at the bbdd.

### The button
A ‘New Developer’ button that gets a random user from a random user generator API:
https://randomuser.me/documentation, updates the table and stores at localstorage.
The fields that will be used are: name, location(city), email, and cell.

### The Table
It has to show the name, city, email and cell of the developers and also add an extra
column with an edit and delete action button.
The delete button will remove the developer. The edit button has to open a modal.
The table has to be initially set up with 50 developers. It has to be generated with the
random user generator.

### The Modal
The modal will be a form that lets to modify the data obtained from the random user
generator, and also contains new optional fields:
● Name, City, email, Cell and Bundle as input text
● Active, as a checkbox
● Category, a select with this options: Tool, Music, Game, Social
● Submit and cancel buttons
Before submitting the form, it has to validate the bundle field and show an error
message if something is wrong. Submitting updates the developer data stored at
localstorage.
A valid bundle value should be lowercase and a valid android package name. A valid
package name should follow the next rules:
● It must have at least two segments (one or more dots).
● Each segment must start with a letter.
● All characters must be alphanumeric or an underscore [a-zA-Z0-9_].
● Valid example: com.tappx.app, net.test.foto
● Invalid example: testapp, test.1app

## Frontend Template
We’d like to see more elements at the App, only to see your design and CSS abilities.
These elements do not have to do any functionality or backend business logic.
You can add more elements to the modal, table, header, footer. Or create a second
view. As an example, you can add:
- A section to the table with some row filters (category, active)
- A search bar at the header
- The header can also contain a navigation bar with a dropdown.
- Before or after the table, you can add a grid with some boxes that show fake
stats data.
- Add icons or images.
- A sidebar menu with multi level sections.
- Pagination.

## Others:
You are free to structure the project as you see fit and use the libraries and tools you
think necessary to complete the task. Apply creativity and add whatever you want if you
have extra time.
You must to do the test by yourself

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `yarn start`

Runs the app in the development mode.

Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.

You will also see any lint errors in the console.

### `yarn test`

Launches the test runner in the interactive watch mode.

See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `yarn build`

Builds the app for production to the `build` folder.

It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

 The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

### Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

### Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

### Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

### Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

### `yarn build` fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

repository: warteamx/tappx-devapp

repo_name: warteamx/tappx-devapp


text:
# Constraint

The Constraint module provides combinators returning `Processor`s with the described behavior.
Consult [types](./types.md) for a description of the types involved.

### `exists: Processor<a>`
A `Processor` that return the value in its context if it is defined, otherwise it fails.

### `anything: Processor<Maybe<a>>`
A `Processor` that always succeeds on its input.
This is equivalent to `Processor#identity`

### `check: (a -> Boolean) -> String -> Processor<a>`
Create a `Processor` that succeeds with its input value if it is both defined and the predicate provided as the first argument returns true.
If the value is defined but the does not pass the predicate the failure message will be used in the `Reason`.

### `last: [Processor<a>] -> Processor<a>`
Create a `Processor` that runs all of the input `Processor`s.
If all input processors succeed, the output processor succeeds with the value of the last input processor.
If any processors fail, the output processor fails with the sum of `Reasons` produced by the input processors.
This is useful for combining many `check` results into a single `Processor`

### `property: Processor<a> -> String -> Processor<[String a]>`
Create a `processor` for the property of an object.
If the input constraint is successful and the property is defined, the `Processor` will result in an array of length 2 containing the input key as the first value and the value at that property as the second.
This is useful in conjunction with [assoc](#assoc).
The property name is the second parameter to allow the same constraint to be easily used among multiple properties with currying.

### `optionalProperty: Processor<a> -> Options -> String -> Processor<[String a]>`
Like property, but if the value in the given field is undefined, returns an empty array instead.
Useful in conjunction with [assoc](#assoc) to define fields that need not necessarily be present.
If options.default is defined, it will be used for the result instead of an empty array.

### `rejectProperty: String -> Processor<[]>`
The inverse of property.
This processor succeeds with an empty array if the given property is not in the input object.
Otherwise, it fails.

### `assoc: [Processor<[String a]] -> Processor<Object>`
Combine an array of property processors into a processor that returns an object. Example:

    association = constraint.assoc([
        property(isEven, 'a'),
        property(isOdd, 'b'),
        property(isEven, 'c')
    ]);

If the input processors are not property processors (i.e. they do not return empty arrays or arrays of length 2 where the first item is a string) the result of the output processor is undefined.

### `array: Processor<Number> -> Processor<a> -> Processor<[a]>`
Create an array `Processor` from a `Processory` verifying the length of an Array and the subsequently verifying each element with the `Processor` given by the second argument. Note that existence and isNumberness of length is verified by default despite the following example. If you don't care about the length you may use `anyLenArray`. Example:

    var isEven = constraint.check(x => x % 2 === 0, 'is not even'),
        evenArray = constraint.array(constraint.isNumber, isEven);

If you wish to do something unusual like limit the length of an array to a given size, yet not reject larger arrays, you may construct a length validator that returns a different length from the length of the actual array.
If your length validator returns something that is not a number, it will be discarded in favor of the actual length of the array.

### `anyLenArray: Processor<a> -> Processor<[a]>`
Create an array processor that does not constrain the array length at all.

### `isA: T -> Processor<a>`
Create a processor that succeeds if the input value is defined and an instance of `T`.

## Other combinators
There are further combinators that are defined and generally do what you would expect. They include

* isEq
* isGt
* isGte
* isLt
* isLte
* isNumber
* isString
* isArray

Note that for less than, greater than variants, the input value from the context is tested against the input in the first position.
Hopefully this does what you expect, but for completeness, assuming the value in `Context` is `y`, `isGt(x)` will create a Processor that tests, informally, whether `x < y` which is equivalent to the test `y > x` which you might expect from the method name.

repository: rzeigler/sifted

repo_name: rzeigler/sifted


text:
# simple-react-todo
A simple React.JS "To do", made as a challenge at RocketSeat Ignite Bootcamp

It's simple to run the application, just follow these steps 👨🚀:

1 - Clone the repository

2 - Install the dependencies using the command "yarn install" or "npm install"

1 - Run the project with the command "yarn dev" or "npm dev"

repository: gustavowarmling/simple-react-todo

repo_name: gustavowarmling/simple-react-todo


text:
Back to [main page](../index.md).

#### Solution to challenge #2

```
a = raw_input("Type something: ")
print a
```
Back to the [lesson](3_PythonPrograms.md)

#### Solution to challenge #4
One possible solution
```
dna = 'AGCTTCGA'

print dna.count('A')
print dna.count('C')
print dna.count('T')
print dna.count('G')
```
another possible solution:
```
dna = 'AGCTTCGA'
elem =  dna.count ('A')
print  elem
elem =  dna.count ('C')
print  elem
elem =  dna.count ('T')
print  elem
elem =  dna.count ('G')
print  elem
```
Back to the [lesson](3_PythonPrograms.md)

Back to [main page](../index.md).


text:
# Operating Systems

#### Introduction to Operating Systems

https://www.youtube.com/watch?v=9GDX-IyZ_C8

## Additional Resources

* https://theopenacademy.com/content/operating-systems-and-system-programming

license: Unlicense

repository: carrot-u/carrot-u-docs

gha_language: Ruby

gha_license_id: Unlicense

repo_name: carrot-u/carrot-u-docs


text:
# How to connect device to wifi in STA mode

## Overview

This app shows how to connect the device to any wifi accesspoint.
wifi STA configuration is done in mos.yml file.

Note: The controller platform used for this project is ESP32, you can choose what ever the controller supported by mongoose os but mos.yml configuration remains same.

Lokesh CJ


text:
# Broad Contextual QnA Bot and Document Ingestion pipeline

## Why was this made?

We saw a number of customers with a large volume of existing QnA material - thousands of documents with hundreds of questions.

Issues seen with this workload:

* Currently QnA Maker isn't able to scale to this volume of questions.
* With a large number of documents covering diverse topics, the lack of context between sequential questions caused a poor user experience.
* Document parsing in QnA Maker was sometimes hit and miss, depending on the formatting.

## When would this be useful?

If you have:

* A large number of QnA based documents (100-1000s)
* Would like to do custom preprocessing before or after question/answer extraction

## Proposed solution

We attempted to ingest this large quantity of documents and process them to create a simple knowledge graph of documents and questions (with relations), which could be used to create a QnA bot capable of answering questions for a broad range of topics.

| Stage         | Purpose                                                                                | Tech                    | Status                  | Folders |
| ------------- | ---------------------------------------------------------------------------------------- | ----------------------- | ----------------------- |-------------|
| Preprocessing | Extract Question-Answer pairs from documents, correct formatting errors and extract additional metadata | Python, Spacy, PDFMiner | Early workable solution | /python |
| Ingest        | Upload JSON output from preprocessor to QnAMaker + Azure Search then create a mapping table    | Javascript              | Working                 | /qnamaker & /azuresearch |
| Bot Interface | Enable broad searching with context by combining Azure search with the QnA Maker output       | Javascript, BotBuilder  | Completed               | /qnabot |

## User interaction

Users are able to start a conversation with a top level question. The document returned for this question then becomes their context. Future questions are scored in this context until a low scoring result is found, at which point other documents are consulted and the results are presented to the user.

The rough flow is as follows:

```
+-----------------------------+
|  Question:                  |-------> ? Per-question ?
|  What is x condition?       |         Middleware used to correct mispellings in
+------------+----------------+ <------ input using the Bing Spell Check API
             |
             |
             |
             v
+------------+----------------+
| Azure Search queried to find|
| relevant documents.         |
|                             |
| QnA Maker used to score     |
| question against top docs   |
+------------+----------------+
             |
             |
             v
+------------+----------------+
| Follow up question:         |
| How is it treated?          |
+----+-----------------------++
     ^                       |
     |                       |
     |                       v
     |             +---------+------------+
     |             | Current context used |
     |             | to score question    |
     |             +----------------------+
     |             |                      |
     |  IF high score                 IF low score
     |             |                      +
     |             v                      |
   +-+-------------+--+         +---------+---------------------------+
   | Answer presented.|         |  Azure Search queried to            |
   | Loop for further qs        |  find relevant docs.                |
   +------------------+         |                                     |
                                |  Top results and current context    |
                                |  scored in QnA maker.               |
                                |                                     |
                                |  User presented with top scoring    |
                                |  answers along with their context  |
                                |  and offered a choice.              |
                                |                                     |
                                |  Results fed back into QnA maker    |
                                |  for training the models.           |
                                +-------------------------------------+
```

## Outstanding work

<<<<<<< HEAD
* Create "Getting Started" and ARM templates for deployment.
* Greater use of NLP in question extraction and document processing.
* Complete testing of continuous process for processing document updates.
* Assistive review process, flagging question or answers which seem to be anomalous for human review.
* Integration with Ibex analytics dashboard to create an overview of document populatarity, hit rate, top unanswerable questions etc.
=======
* More sophisticated use of NLP for question extraction and document processing.
* Complete testing of continuous processing for document updates.
* Assistive review process: flagging apparently anomalous questions/answers for human review.
* Integration with Ibex analytics dashboard to create an overview of document popularity, hit rate, top unanswerable questions etc.
* Add script to bulk delete QnAs from QnA Maker
* Adapt QnA Maker scripts to run in Azure (perhaps as Azure Functions)
>>>>>>> 4111951b2c986c46dc5d03fa8a84e72f31e494e1

repository: lenepalu/QnA-Maker-Uber-Search

repo_name: lenepalu/QnA-Maker-Uber-Search


text:
# Digital Methods Whitepaper

## How to contribute to this guide

This guide is being written on Github using [Markdown](https://help.github.com/articles/markdown-basics/). To contribute, we recommend following the [GitHub Flow in the Browser](https://github.com/blog/1557-github-flow-in-the-browser) guide

repository: DSSatPitt/digital-methods-whitepaper

repo_name: DSSatPitt/digital-methods-whitepaper


text:
---
title: MB-200 notes
tags:
- Dynamics
- Certifications
---
Notes I've taken during the preparation of the [MB-200: Microsoft Power Platform + Dynamics 365 Core](https://docs.microsoft.com/en-us/learn/certifications/exams/mb-200?tab=tab-learning-paths) exam

# Training Material

|Duration|Topic
|---|---
|02:11|[Canvas Apps](https://docs.microsoft.com/en-ie/learn/paths/create-powerapps/)
|02:40|[Model driven apps](https://docs.microsoft.com/en-ie/learn/paths/create-app-models-business-processes/)
|05:15|[Implementing Customer Engagement](https://docs.microsoft.com/en-ie/learn/paths/implementing-customer-engagement-apps/)
|03:20|[Power Automate](https://docs.microsoft.com/en-ie/learn/paths/automate-process-power-automate/)
|06:22|[Power BI](https://docs.microsoft.com/en-ie/learn/paths/create-use-analytics-reports-power-bi/)
|19:48|Total

https://docs.microsoft.com/en-us/learn/certifications/exams/mb-200

# Power Apps

Power Apps Studio: To configure user interface (UI) elements.
Power Apps Admin Center: To define environment and data policies.
make.powerapps.com: To open existing apps, create, share apps, and create data connections and flows.

You can use many external data sources, including Twitter, Facebook, Microsoft SQL Server, and Salesforce. You can use also on-prem data using the data gateway.

When creating a new App from a data source, the Browse, Edit and Details screens are automatically created.

When a user selects a button or a control, the OnSelect event is triggered. Then you have to set the formula that you want to run.

You can customize all aspects of the app, including screen, layouts and formulas, when creating an app from data.

The gallery control allows to display and select all records from a data source.

Formula reference for Power Apps: https://docs.microsoft.com/en-ie/powerapps/maker/canvas-apps/formula-reference

People who have Co-owner permission also need a Power Apps P2 license to work directly with entities in Common Data Service.

If you want to work with Power Apps environments, you need a Power Apps Plan 2 license or the free Power Apps Plan 2 trial. Additionally, if you want to work with Dynamics 365 restricted entities, you must have a Power Apps for Dynamics 365 license. [Licensing overview for Power Platform](https://docs.microsoft.com/en-us/power-platform/admin/pricing-billing-skus)

Customer Survey is not created in your environment when you toggle "Include sample apps and data" to true.

You can't create a custom activity by using the Microsoft Power Apps portal. You must open Solution Explorer by using the Advanced button.

Things that you can do with Business Rules:
- Set field values.
- Clear field values.
- Set field requirement levels.
- Show or hide fields.
- Enable or disable fields.
- Validate data and show error messages.
- Create business recommendations based on business intelligence.

The below is not available on canvas apps:
- Show or hide fields
- Enable or disable fields
- Create business recommendations based on business intelligence.

You cannot set a lookup value when importing data from Excel, this must be done from Power Apps.

A tenant can have up to 75 non-Production instances and 50 Production instances.

When you place an instance in [Administration Mode](https://docs.microsoft.com/en-ie/power-platform/admin/sandbox-environments), only System Administrator or System Customizer can log in.

You cannot restore backups into a Production instance, the instance will have to be switched to Sandbox first, then you can proceed restoring from the backup, and then switch to Production again.

When you [copy an instance](https://docs.microsoft.com/en-ie/power-platform/admin/sandbox-environments), the target instance is placed in Administration mode and background operations are disabled.

## Updates

You can schedule, approve and reschedule updates before they start.
In order to approve or reschedule an update you must be a System Administrator.
When your update has started, you'll see Update in progress under Status. The reschedule option will no longer be available.

Microsoft Dynamics 365 Update Policy states - Customer Driven Updates (CDU) are no longer available. The major updates will be deployed similar to our Minor Service Update experience we are delivering today and won't require you to schedule downtime. And also Microsoft will deliver two major updates per year, in April and October, offering new capabilities and functionality. These updates will be backward compatible, so your apps and customizations will continue to work post-update. These details can be found [here](docs.microsoft.com/dynamics365/get-started/faq-update-policy)

## Storage

The tenant subscriptions include by default 10-GB database storage as long at least one instance of the tenant is on v8.2. Additional storage capacity is granted at no charge at the rate of 5 GB for every 20 full users. The cap on the amount of free storage that may be earned per tenant is subject to the technical limit of 30 TB.

[Old] Storage usage is displayed on the Microsoft Dynamics 365 Admin Center within the Service Health tab.

[Storage usage is displayed on the Admin Center > Analytics > Capacity](https://docs.microsoft.com/en-us/power-platform/admin/capacity-storage).

## Backups

All instances are backed up automatically and daily. These backups do not count against your storage limits and are retained for 3 days.

On-demand backups do not count against your storage limits and just like automatic backups are retained for 3 days.

You can only restore to Sandbox instances. To restore to a Production instance, first switch it to a Sandbox instance, restore to it, and then [switch it back to a Production instance](https://docs.microsoft.com/en-ie/power-platform/admin/switch-environment).

## Users

A non-interactive user account lets external applications or tools authenticate and access Dynamics 365 **without requiring a license**. For each instance of Dynamics 365 you can create up to five non-interactive user accounts.

There are three Active Directory account management models:
- Cloud Only
- Synchronized Identity
- Federated Identity

When you assign a user the **global administrator** or the **service administrator** role in the Microsoft Online Services environment, it automatically assigns the user the System Administrator security role in Dynamics.

When you create a user, the user will not have access to Dynamics apps until you assign at least one security role to this user.

Office 365 Roles that are relevant to Dynamics:
- Global Admin
- Billing Administrator
- User Management Administrator
- [Dynamics 365 Service Administrator](https://docs.microsoft.com/en-us/power-platform/admin/use-service-admin-role-manage-tenant)

You can assign [Delegated Administration](https://docs.microsoft.com/en-ie/microsoft-365/admin/misc/add-partner) permissions an external partner to give them access to setup and configure the environment for you.

[Use Powershell to create, configure, and manage users in bulk](https://docs.microsoft.com/en-ie/office365/enterprise/powershell/manage-office-365-with-office-365-powershell).

## User Profile

Some user profile information is maintained and managed in the Microsoft 365 admin center. After you create or update a user, these user profile fields are automatically updated and synchronized in your Customer Engagement instances. The Primary Email field does not automatically update and synchronize with Dynamics

# Portals

You can enable development or test portal to receive an early upgrade ahead of all customers, so you can test all core scenarios on your test portal before upgrades are rolled out to your live portal. Early upgrades are rolled out at least one week before the global rollout of any release.
In order to do so, click on the "Enable Portal for early upgrade" option when creating the portal.

During sign-up, the user has the option of creating a local account (providing a username and password) or selecting an external identity from a list of identity providers. If an external identity is selected, the user is required to sign in through the chosen identity provider to prove that they own the external account. In either case, the user is immediately registered and authenticated with the portal. A new contact record is created upon sign-up

# Mobile

Dynamics 365 requires the *Dynamics 365 for mobile* **permission** enabled to provide access to Dynamics 365 for phones and Dynamics 365 for tablets.

The privilege to access mobile apps is pre-configured for sales roles but not other roles within the organization. It needs to be added to other roles so non-sales users can connect to Dynamics 365 with the mobile apps.

Also, read permission is required on the following entities
- Custom Control
- Custom Control Default Config
- Custom Control Resource
- System Application Metadata
- System Form
- User Application Metadata
- View
- Model-driven App
- User Settings

You have also to enable Dashboards to made them available on mobile.

The form designer provides also options to hide attributes, sections and tabs from the mobile access.

https://docs.microsoft.com/en-ie/dynamics365/mobile-app/set-up-dynamics-365-for-phones-and-dynamics-365-for-tablets

[Offline Synchronization](https://docs.microsoft.com/en-ie/dynamics365/mobile-app/setup-mobile-offline-for-admin)

# Model Driven Apps

To share an app, you must have the Environment Admin or System Admin role.

System Customizers have full permission to customize the environment. But users who have this role can view records only for environment entities that they create. To learn more, see [Privileges required for customization](https://docs.microsoft.com/dynamics365/customer-engagement/customize/privileges-required-customization).

You can have up to 10 active business process flows per entity.

## To setup access to apps
* Go to Settings > My Apps.
* In the lower-right corner of the app tile you want to manage access for, select More options (...), and then select Manage Roles.
* Choose whether you want to give app access to all security roles or selected roles

https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/manage-access-apps-security-roles

## Solutions

There are managed and unmanaged solutions. A managed solution cannot be modified and can be uninstalled after it is imported. All the components of that solution are deleted by uninstalling the solution.

When you import an unmanaged solution, you add all the components of that solution into your environment. You can’t delete the components by uninstalling the solution.

When you import an unmanaged solution that contains components that you have already customized, your customizations will be overwritten by the customizations in the imported unmanaged solution. You can’t undo this.

https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/solutions-overview

## Search

There are three types of search:
- Relevance Search
- Full-text Quick Find (single-entity or multi-entity)
- Quick Find (single-entity or multi-entity)

Relevance Search uses the same default scoring concepts as Azure Search. Scoring refers to the computation of a search score for every item returned in search results

Data in the application begins syncing to the external search index immediately after you enable Relevance Search. Is recommended to configure the entities and entity fields participating in Relevance Search before enabling the search, to prevent sensitive data from being indexed in a service external to model-driven apps in Dynamics 365.

https://docs.microsoft.com/en-us/power-platform/admin/configure-relevance-search-organization

Categorized Search is the old version of the Relevance Search, and is available on-prem. Relevance search is available online only.

Categorized Search uses SQL text catalogs to work.

https://crmbook.powerobjects.com/basics/searching-and-navigation/searching-crm/#categorized_search

# Solution Patching and Versioning

* **Solution Segmentation** allows to export solutions with selected entity assets, such as entity fields, forms, and views, rather than entire entities with all the assets.

* A solution’s version has the following format: major.minor.build.revision.

* A patch must have a higher build or revision number than the parent solution. It can’t have a higher major or minor version. The display name can be different.

* A cloned solution must have the version number greater than or equal to the version number of the base solution.

* **Clone to patch** creates a patch of the main solution.

* **Clone to solution** creates a new version, that includes all the patches from the main solution. A cloned solution must have the version number greater than or equal to the version number of the base solution

* A patch represents an incremental minor update to the parent solution. A patch can add or update components and assets in the parent solution when installed on the target system, but it can’t delete any components or assets from the parent solution.

* A patch can have only one parent solution, but a parent solution can have one or more patches.

* A patch is created for unmanaged solution. You can’t create a patch for a managed solution.

* When you export a patch to a target system, you should export it as a managed patch. Don’t use unmanaged patches in production environments.

* The parent solution must be present in the target system to install a patch.

* You can delete or update a patch.

* If you delete a parent solution, all child patches are also deleted. The system gives you a warning message that you can’t undo the delete operation. The deletion is performed in a single transaction. If one of the patches or the parent solution fails to delete, the entire transaction is rolled back.

* After you have created the first patch for a parent solution, the solution becomes locked, and you can’t make any changes in this solution or export it. However, if you delete all of its child patches, the parent solution becomes unlocked.

* When you clone a base solution, all child patches are rolled up into the base solution and it becomes a new version. You can add, edit, or delete components and assets in the cloned solution.

* A cloned solution represents a replacement of the base solution when it’s installed on the target system as a managed solution. Typically, you use a cloned solution to ship a major update to the preceding solution.

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/create-patches-simplify-solution-updates

https://community.dynamics.com/365/f/dynamics-365-general-forum/348379/solution-version-number/932999

https://d365demystified.com/2019/01/05/using-clone-a-patch-clone-solution-in-d365-solutions/

https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/use-segmented-solutions-patches-simplify-updates

# Change Tracking

The change tracking feature in Common Data Service provides a way to keep the data synchronized in an efficient manner by detecting what data has changed since the data was initially extracted or last synchronized.

This option must be set at entity level

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/use-change-tracking-synchronize-data-external-systems

# Flow

In order to trigger a flow when a record changes, you need to enable the change tracking for the entity.

# Administration

## Users
In order to change a user's logon name, you have to do it thorough the Office 365 admin center
https://docs.microsoft.com/en-us/microsoft-365/admin/add-users/change-a-user-name-and-email-address?view=o365-worldwide

## Sessions

To configure the session timeout:
- In the Power Platform admin center, select an environment.
- Select Settings > Product > Privacy + Security.
- Set Session Expiration and Inactivity timeout.

https://docs.microsoft.com/en-us/power-platform/admin/user-session-management

In older versions, use System Settings > General Tab > Set Session Timeout

# Excel Export
The export to an Excel dynamics worksheet has a limit of 100.000 records, and is not available to all record types
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/basics/export-excel-dynamic-worksheet

When you export to a dynamic worksheet or PivotTable, a link is maintained between the Excel worksheet and Dynamics 365 (online). Every time a dynamic worksheet or PivotTable is refreshed, you’ll be authenticated with Dynamics 365 (online) using your credentials. You’ll be able to see the data that you have permissions to view.

# Marketing Lists
Two types of Marketing lists: Dynamic and Static.

You can add up to 120,000 members to a static marketing list in one Add operation. If you need to add more than 120,000 members to a static marketing list, split those members into multiple add operations.

https://docs.microsoft.com/en-us/dynamics365/sales-enterprise/create-marketing-list-using-app-marketing-sales

# One Note

Steps to integrate with One Note:
- Step 1: Turn on server-based SharePoint integration
- Step 2: Turn on OneNote integration

https://docs.microsoft.com/en-us/power-platform/admin/set-up-onenote-integration-in-dynamics-365

# OneDrive

## Requirements to integrate:

- A OneDrive for Business license for each use
- A SharePoint license for each user.
- Office 365 Enterprise E3 or later

## Enabling OneDrive

- Settings > Integration > Document management settings
- Enable OneDrive for Business to enable it, and then select OK
- Add permissions to the user. Edit a Security Role. Under Miscellaneous Privileges, toggle the OneDrive for Business privilege to the desired availability

https://docs.microsoft.com/en-us/power-platform/admin/enable-onedrive-for-business

# Dynamics 365 App for Outlook

The Dynamics 365 App for Outlook is the only client that can track from Outlook for MAC.

## To push the app to users
* Go to Settings > Dynamics 365 App for Outlook.
* Do one of the following:
    - To push the app to all eligible users, click Add App for All Eligible Users.
    - To push the app to certain users, select those users in the list, and then click Add App to Outlook.

Make sure to add users to the security role Dynamics 365 App for Outlook User as described in the Provide security role access section above.

## To have users install the app themselves
* Users click the Settings button Settings button, and then click Apps for Dynamics 365 apps.
* In the Apps for Dynamics 365 apps screen, under Dynamics 365 App for Outlook, users click Add app to Outlook.

https://docs.microsoft.com/en-us/dynamics365/outlook-app/deploy-dynamics-365-app-for-outlook

# Office 365 Groups

Users must have an Exchange Online mailbox set up to use Office 365 Groups. Exchange Online is already properly configured for organizations as a part of Office 365. You also need to enable server-based SharePoint integration to see documents in an Office 365 Group; you don't have to use SharePoint integration, only set up the connection to SharePoint Online. Server-based SharePoint integration is also required to enable the group OneNote notebook.

## Steps to integrate

* Create or choose an Office 365 Group.
* Select Connectors. Scroll down to Dynamics 365 Online, and then select Add.
* If you have access to more than one environment, choose which environment to connect to this Office 365 Group. If you only have access to one environment, this step will be skipped and you will advance to the next step.
* Choose the record you want to connect this Office 365 Group to, and then select Save.

[Deploy Office 365 Groups Dynamics 365 (online)](https://docs.microsoft.com/en-us/power-platform/admin/deploy-office-365-groups)

[Collaborate with your colleagues using Office 365 Groups](https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/basics/collaborate-with-colleagues-using-office-365-groups)

# Voice of the Customer

## How to install
- Go to the Dynamics 365 Administration Center, and then select the Applications tab.
- Select the application row titled Voice Of The Customer, and then select Manage.
- From the Dynamics 365 Instance drop-down list, select the instance where you want to install the solution.

https://docs.microsoft.com/en-us/dynamics365/voice-of-customer/install-solution
https://docs.microsoft.com/en-us/learn/paths/dyn365-voice-of-customer/

# Metadata Diagram Tool

There is a tool that will programmatically generate Office Visio metadata diagrams

Usage:

``` console
MetadataDiagramConsole.exe new_bankaccount new_safedepositbox
```

https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/use-metadata-generate-entity-diagrams

# Data Performance
[Data Performance](https://www.powerobjects.com/blog/2017/10/30/managing-your-data-performance-in-dynamics-365/) in Dynamics 365
Available in Settings>Administration>Data Performance
The **Optimization Impact** will show how the optimization is impacting the performance. *Negative* values improve the performance and *positives* degrades it.

# Dynamics 365 Diagnostic Tool
You can access it throug a URL (tools/diagnostics/diag.aspx)
It shows latency information, bandwidth, as well as benchmark test results.
https://community.dynamics.com/365/b/adrianbegovichblog/posts/dynamics-365-diagnostics-tool
https://docs.microsoft.com/en-us/power-platform/admin/verify-network-capacity-throughput-clients

# Organization Insights Tool

(Old way)
To enable it, do it through the Dynamics Marketplace. Then access it from the organization settings
https://www.powerobjects.com/blog/2018/03/12/how-install-view-organization-insights-dynamics-365/
This has been deprecated.

The new Organization Insights is available in Power Platform Admin Center, under the Analytics section.
It shows the active users, API calls, number of plugin executions, plugin errors, etc.
https://docs.microsoft.com/en-us/power-platform/admin/analytics-common-data-service

repository: crisfervil/blog

gha_language: CSS

repo_name: crisfervil/blog


text:
# Quick Reviews 07/30/2020

## System.Diagnostics.ActivitySource API Addition

**Approved** | [#runtime/40046](https://github.com/dotnet/runtime/issues/40046#issuecomment-666588567) | [Video](https://www.youtube.com/watch?v=7EBzsfHCQOM&t=0h0m0s)

* We should rename `w3cid` to `traceParent`
* We considered offering a span-based overload but right now the most common case for the use of the API starts with a header value which is currently only ever going to be a string. If the networking layer will give access in a span-based fashion we can add it.
* We should have a corresponding `Parse` method

```C#
namespace System.Diagnostics
{
    public readonly partial struct ActivityContext : IEquatable<ActivityContext>
    {
        public static ActivityContext Parse(string traceParent, string? traceState);
        public static bool TryParse(string traceParent, string? traceState, out ActivityContext context);
    }
}
```

## Mark existing Windows-specific APIs without a version number

**Approved** | [#runtime/40095](https://github.com/dotnet/runtime/issues/40095#issuecomment-666600842) | [Video](https://www.youtube.com/watch?v=7EBzsfHCQOM&t=0h32m1s)

* Looks good
* We should consider re-baselining when we bump the minimum Windows version, for similar benefits for net-new code.
* We should consider having an analyzer that flags checks for a higher version than what the guarded code actually needs.

```C#
[SupportedOSPlatform("windows")]
public void TheRegistry() { ... }

public void DoSomething()
{
    if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
        TheRegistry();
}
```
## Mark System.Security.Cryptography.OpenSsl as unsupported on Windows

**Approved** | [#runtime/40101](https://github.com/dotnet/runtime/issues/40101#issuecomment-666606594) | [Video](https://www.youtube.com/watch?v=7EBzsfHCQOM&t=0h52m4s)

* Looks good.
* It seems the direction is that Windows will require a store package. That's not expressible in an OS check. If that becomes the case we can remove the attribute, build a one-off analyzer, or generalize this into a new attribute.

**Assembly**: System.Security.Cryptography.OpenSsl

```C#
[assembly: UnsupportedOSPlatform("windows")]
```

## Provide an overload of float/double.ToString that allow precision greater than 99

**Approved** | [#runtime/30657](https://github.com/dotnet/runtime/issues/30657#issuecomment-666609015) | [Video](https://www.youtube.com/watch?v=7EBzsfHCQOM&t=1h0m23s)

* It was suggested to add support for custom cultures. New shape:

```C#
namespace System
{
    public struct Single
    {
        public string ToString(char format, int precision);
        public string ToString(char format, int precision, IFormatProvider? provider);
    }
    public struct Double
    {
        public string ToString(char format, int precision);
        public string ToString(char format, int precision, IFormatProvider? provider);
    }
}
```

repository: dotnet/apireviews

repo_name: dotnet/apireviews


text:
# CloudLib

CloudLib is a library for Android that simplifies file operations for file hosting services.

## Requirements

+ Android 4.3 and up

## Supported services

+ ownCloud
+ Nextcloud

## Used by

+ [CloudRun](https://github.com/Alkisum/CloudRun)
+ [CloudNotes](https://github.com/Alkisum/CloudNotes)

## Used libraries

+ [EventBus](https://github.com/greenrobot/EventBus)
+ [Nextcloud Android Library](https://github.com/nextcloud/android-library)

## License

Project licensed under the [MIT license](http://opensource.org/licenses/mit-license.php).

repository: Alkisum/CloudLib

repo_name: Alkisum/CloudLib


text:
# ESP32-CAM Simple Surveillance RC Robot #

## Demonstration
[![ESP32-CAM: Simple Surveillance RC Car](http://img.youtube.com/vi/xvkwcLCyFT0/0.jpg)](https://www.youtube.com/watch?v=xvkwcLCyFT0 "ESP32-CAM: Simple Surveillance RC Car")

## Dependencies

1. For ESP32-CAM module:
Download https://github.com/Links2004/arduinoWebSockets as zip file and add this library to your Arduino Libraries by Sketch/Include Library/Add Zip...

Download https://github.com/me-no-dev/ESPAsyncWebServer as zip file and add this library to your Arduino Libraries by Sketch/Include Library/Add Zip...

Download https://github.com/me-no-dev/AsyncTCP as zip file and add this library to your Arduino Libraries by Sketch/Include Library/Add Zip...

2. For Arduino module:

Install arduinoSTL by [Manage Libraries...]

## SPIFFS upload tool:
Download and extract in [your arduino ide folder]/tools.
https://github.com/me-no-dev/arduino-esp32fs-plugin/releases/

## How to upload the firmware:

1. ESP32-CAM module firmware(ESP32CamRobot): contains 2 parts

 - data: contains the GUI (html, icon), use SPIFFS upload tool to upload to the module

 - ESP32CamRobot sketch: normally upload by arduino IDE

2. Arduino Uno firmware (ESP32CamRobotMotors): normally upload by arduino IDE

## How to run:
Use Arduino IDE serial monitor tool to capture the serial data from ESP32-CAM module on starting up to get the camera IP address.

Use your webbrowser to connect to the that IP.

## LICENSE
The part contains my code is released under BSD 2-Clause License. Regarding other libraries used in this project, please follow the respective Licenses.


text:
# mamba, an experiment to make conda faster

[![Build Status](https://github.com/TheSnakePit/mamba/workflows/CI/badge.svg)](https://github.com/TheSnakePit/mamba/actions)
[![Join the Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/QuantStack/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Mamba is a reimplementation of the bits which are somewhat slow in conda. Mamba uses:

- parallel downloading of JSON files using multiprocessing, and reusing conda's caches
- libsolv for speedy dependency solving, a state of the art library used in the package manager of Fedora and others

At the same time, mamba re-uses a lot of conda's codebase to parse the command line and execute the transaction (installation & deinstallation of packages).

### Installation

***From `conda-forge`:***

```
conda install mamba -c conda-forge
```

***From Source:***

Make sure to have the following requirements in your conda environment:

- `conda install cmake compilers pybind11 libsolv libarchive libcurl nlohmann_json pip -c conda-forge`

If you build mamba in a different environment than base, you must also install conda in
that environment:

- `conda install conda -c conda-forge`

For a local (dev) build, run `pip install -e .`. This will build and install mamba
in the conda environment.

### Installing conda packages with `mamba`

Now you are ready to install packages with
```bash
mamba install xtensor-r -c conda-forge
```
for example.

### Additional features

Mamba comes with features on top of stock conda.
To efficiently query repositories and query package dependencies you can use `mamba repoquery`.

Here are some examples:

`mamba repoquery search xtensor` will show you all available xtensor packages. You can also specify more constraints on this search query, for example `mamba repoquery search "xtensor>=0.18"`

`mamba repoquery depends xtensor` will show you a tree view of the dependencies of xtensor.

```
$ mamba repoquery depends xtensor

xtensor == 0.21.5
  ├─ libgcc-ng [>=7.3.0]
  │ ├─ _libgcc_mutex [0.1 conda_forge]
  │ └─ _openmp_mutex [>=4.5]
  │   ├─ _libgcc_mutex already visited
  │   └─ libgomp [>=7.3.0]
  │     └─ _libgcc_mutex already visited
  ├─ libstdcxx-ng [>=7.3.0]
  └─ xtl [>=0.6.9,<0.7]
    ├─ libgcc-ng already visited
    └─ libstdcxx-ng already visited
```

And you can ask for the inverse, which packages depend on some other package (e.g. `ipython`) using `whoneeds`.

```
$ mamba repoquery whoneeds ipython

 Name            Version Build          Channel
──────────────────────────────────────────────────
 ipykernel       5.2.1   py37h43977f1_0 installed
 ipywidgets      7.5.1   py_0           installed
 jupyter_console 6.1.0   py_1           installed

```

With the `--tree` (or `-t`) flag, you can get the same information in a tree.

### Development installation

You first need to install the mamba dependencies:

```bash
conda install -c conda-forge python=3.7 pybind11 nlohmann_json cmake
```

For the C++ tests, you need Google Tests installed (e.g. `conda install gtest`).
To build the program using CMake, the following line needs to be used:

```bash
cmake .. \
  -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
  -DPYTHON_EXECUTABLE=$CONDA_PREFIX/bin/python3 \
  -DPYTHON_LIBRARIES=$CONDA_PREFIX/lib/libpython3.7m.so \
  -DENABLE_TESTS=ON
```

### Support us

For questions, you can also join us on [QuantStack Chat](https://gitter.im/QuantStack/Lobby) or on the [conda channel](https://gitter.im/conda/conda) (note that this project is not officially affiliated with `conda` or Anaconda Inc.).

repository: gilescope/mamba

repo_name: gilescope/mamba


text:
---
layout: default
gamename: blacksun
level: 4
---
level4 is an installation of Apache and PHP with an introduced heap
vulnerability.

The introduced vulnerability is as follows:

{% include showFile.html path="blacksun4.function.c" %}

Thanks to orix for the introduced code snippet

The document root is in /levels/level4/htdocs, you'll need to put your
php code there and call it via the webserver on port 55555.

**Note:** that if you're executing a shell, it can't be /bin/sh or
/bin/bash, oh, and the apache process can't access the /etc/pass
directory :P

### Binary information

| Stack smashing protection (SSP):            | Enabled         |
| Postition Independent Executable (PIE):     | Enabled         |
| Address space layout randomisation (ASLR):  | Enabled         |
| Non-executable pages:                       | None / disabled |
|--------------------------------------------:+:----------------|
| Location:                                   | <IP_ADDRESS>:55555 |

{% include showFile.html path="blacksun4.basic_functions.c" %}

repository: OverTheWireOrg/OverTheWire-website

branch_name: refs/heads/gh-pages

repo_name: OverTheWireOrg/OverTheWire-website


text:
So far we have learned some useful commands and can use them to produce nice graphic results.
But what is also might be useful is that each of those commands also has a short version. Using such short commands helps to make your programs more compact and save time during typing. On the negative side it makes your code more cryptic and hard to understand.
For example instead of `right` it's enought to write `rt` . In table below are shown full and short versions of commands that we already know.

| Full command | Short command |
| ------------ | ------------- |
| `forward`    | `fd`          |
| `back`       | `bk`          |
| `right`      | `rt`          |
| `left`       | `lt`          |
| `penup`      | `pu`          |
| `pendown`    | `pd`          |
| `setpensize` | `setwidth`    |
| `hideturtle` | `ht`          |
| `showturtle` | `st`          |

You can also use another technique to make your programs be more compact.
It's to have several commands in a sigle line of code. You dont need to use any special symbols, just separate your commands with whitespace. So the previous zig-zag example can be rewritten using short commands in a single line like this:

```
setwidth 5
setcolor 5
rt 45 fd 50 rt 90 fd 50 lt 90 fd 50
ht
```

<!--logo {"width":"200px", "height":"150px"}-->

```
pu setx -50 pd
setwidth 5
setcolor 5
rt 45 fd 50 rt 90 fd 50 lt 90 fd 50
ht
```

Now you can do your own experiments with short commands.

<!--solution-->

```
setwidth 5
setcolor 5
rt 45 fd 50 rt 90 fd 50 lt 90 fd 50
ht
```

repository: logolang/logo-playground

gha_language: HTML

repo_name: logolang/logo-playground


text:
---
title: "Using Digital Labs to Build Smarter Computing Cultures"

# Authors
# If you created a profile for a user (e.g. the default `admin` user), write the username (folder name) here
# and it will be replaced with their full name and linked to their profile.
authors:
- Kevin Brooks
- admin
- Matthew Warner

# Author notes (optional)
author_notes:
- "Equal contribution"
- "Equal contribution"
- "Equal contribution"

date: "2015-12-01T00:00:00Z"
isbn: "9780226176697"

# Schedule page publish date (NOT publication's date).
#publishDate: "2021-01-01T00:00:00Z"

# Publication type.
# Legend: 0 = Uncategorized; 1 = Conference paper; 2 = Journal article;
# 3 = Preprint / Working Paper; 4 = Report; 5 = Book; 6 = Book section;
# 7 = Thesis; 8 = Patent
publication_types: ["6"]

# Publication name and optional abbreviated publication name.
publication: "In *Rhetoric and Digital Humanities*"

# abstract: .

# Summary. An optional shortened abstract.
summary: This chapter reflects on the experience of a humanities-led computational literacy program and offers 6 strategies for similar programs.

tags: [computational literacy, code year, coding literacy]

# Display this page in the Featured widget?
featured: false

# Custom links (uncomment lines below)
links:
- name: Collection
  url: http://press.uchicago.edu/ucp/books/book/chicago/R/bo18991168.html
url_pdf: 'https://vtechworks.lib.vt.edu/bitstream/handle/10919/96778/brooks_lindgren_warner-2015-rdh-tackling_fundamental_problem.pdf?sequence=5'
url_code: ''
url_dataset: ''
url_poster: ''
url_project: ''
url_slides: ''
url_source: ''
url_video: ''

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
image:
  caption: 'Lindgren helps a child with a coding project during an open press fair about the after-school program.'
  focal_point: ""
  preview_only: false

# Associated Projects (optional).
#   Associate this publication with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `internal-project` references `content/project/internal-project/index.md`.
#   Otherwise, set `projects: []`.
#projects:
#- example

# Slides (optional).
#   Associate this publication with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides: "example"` references `content/slides/example/index.md`.
#   Otherwise, set `slides: ""`.
# slides: example
---

repository: lingeringcode/clndgrn

gha_language: TeX

repo_name: lingeringcode/clndgrn


text:
###########################
## PART 10: Simple Game ###
### --- CODEBREAKER --- ###
## --Nope--Close--Match--##
###########################

 It's time a simple game gather what I've learned.
 The game goes like this:
 1. The computer will think of 3 digit number that has no repeating digits.
 2. You will then guess a 3 digit number
 3. The computer will then give back clues, the possible clues are:

     * Close: You've guessed a correct number but in the wrong position
     * Match: You've guessed a correct number in the correct position
     * Nope: You haven't guess any of the numbers correctly

 4. Based on these clues you will guess again until you break the code with a
    perfect match, the game will report "CODE CRACKED"!
## Installation
    1. fork and clone this repo.
    2. In terminal cd `close-match-nope`.
    3. run `python game_cli.py`

## Contribution
    You are more than welcome to contribute either with raising an issue
    or via a pull request.

## Lincense
    under the MIT license.


text:
---
GENERATOR: 'Mozilla/4.75 \[en\] (Win98; U) \[Netscape\]'
Generator: Microsoft Word 98
title: PSET
---

> **PERTURB**

This command moves node coordinates in the following manner.

Three pairs random numbers between 0 and 1 are obtained. These pairs
refer to the x, y and z coordinates of the nodes respectively. The first
random number of each pair is multiplied by the factor given in
thecommand. The second random number is used to determine if the
calculated offset is to be added or subtracted from the coordinate. No
checking is done to see if elements are inverted by this perturbation.
It is assumed that the mesh is not yet connected.\

FORMAT:

**perturb/pset,get,psetnam**e/xfactor,yfactor,zfactor\

EXAMPLES

**perturb/**1,0,0/0.5,0,0   add offsets to only the xcoordinates of all
nodes\
**perturb/pset,get,mypset**/0.001,0.001,0.001  add small offsets to all
coordinates of the nodes in the **pset** named **mypset.**\

[](new_md/demos/pset/test/md/main_pset.md)