text:
## Contribution License Agreement

1. The code I am contributing is mine, and I have the right to license it.

2. By submitting a pull request for this project I am granting you a license to distribute said code under the MIT License for the project.

## How to contribute

Our code contriubtion guidelines closely follows the model of [GitHub pull-requests](https://help.github.com/articles/using-pull-requests/).  This repository follows the [git flow](http://nvie.com/posts/a-successful-git-branching-model/) workflow, which dictates a /master branch where releases are cut, and a /develop branch which serves as an integration branch for new code.
  * A [git extention](https://github.com/nvie/gitflow) has been developed to ease the use of the 'git flow' methodology, but requires manual installation by the user.  Refer to the projects wiki

## Pull-request guidelines
* target the **develop** branch for integration
* ensure code builds successfully.
* do not break existing test cases
* new functionality will only be merged with new unit tests
  * new unit tests should integrate within the existing [googletest framework](https://github.com/google/googletest/blob/master/googletest/docs/primer.md)
  * tests must have good code coverage
  * code must also have benchmark tests, and performance must approach the compute bound limit or memory bound limit.

## StyleGuide
This project follows the [CPP Core guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md), with few modifications or additions noted below.  All pull-requests should in good faith attempt to follow the guidelines stated therein, but we recognize that the content is lengthy.  Below we list our primary concerns when reviewing pull-requests.

### Interface
-  All public APIs are C89 compatible; all other library code should use c++14
  - Our minimum supported compiler is clang 3.6
-  Avoid CamelCase
  - This rule applies specifically to publicly visible APIs, but is also encouraged (not mandated) for internal code

### Philosophy
-  [P.2](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rp-Cplusplus): Write in ISO Standard C++14 (especially to support windows, linux and macos plaforms )
-  [P.5](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rp-compile-time): Prefer compile-time checking to run-time checking

### Implementation
-  [SF.1](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rs-file-suffix): Use a `.cpp` suffix for code files and an `.h` suffix for interface files if your project doesn't already follow another convention
  - We modify this rule:
    - `.h`: C header files
    - `.hpp`: C++ header files
-  [SF.5](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rs-consistency): A `.cpp` file must include the `.h` file(s) that defines its interface
-  [SF.7](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rs-using-directive): Don't put a `using`-directive in a header file
-  [SF.8](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rs-guards): Use `#include` guards for all `.h` files
-  [SF.21](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rs-unnamed): Don't use an unnamed (anonymous) `namespace` in a header
-  [SL.10](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rsl-arrays): Prefer using `std::array` or `std::vector` instead of a C array
-  [C.9](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rc-private): Minimize the exposure of class members
-  [F.3](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rf-single): Keep functions short and simple
-  [F.21](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rf-out-multi): To return multiple 'out' values, prefer returning a `std::tuple`
-  [R.1](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rr-raii): Manage resources automatically using RAII (this includes `std::unique_ptr` & `std::shared_ptr`)
-  [ES.11](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-auto): Use `auto` to avoid redundant repetition of type names
-  [ES.20](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-always): Always initialize an object
-  [ES.23](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-list): Prefer the `{}` initializer syntax
-  [CP.1](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#S-concurrency): Assume that your code will run as part of a multi-threaded program
-  [I.2](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Ri-global): Avoid global variables

## Format
C and C++ code is formatted using `clang-format`. Use the clang-format version for Clang 9, which is available in the `/opt/rocm` directory. Please do not use your system's built-in `clang-format`, as this is an older version that will result in different results.

To format a file, use:

```
/opt/rocm/llvm/bin/clang-format -style=file -i <path-to-source-file>
```

To format all files, run the following command in rocBLAS directory:

```
git ls-files -z *.cc *.cpp *.h *.hpp *.cl *.h.in *.hpp.in *.cpp.in | xargs -0 /opt/rocm/llvm/bin/clang-format  -style=file -i
```

For More extensive reformatting, such as removing redundant whitespace, run:
```
./.githooks/pre-commit --reformat

```

Also, githooks can be installed to format the code per-commit:

```
./.githooks/install
```

## Here are some guidelines for writing rocBLAS code:

1. With the [rocBLAS device memory allocation system](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/docs/Device_Memory_Allocation.pdf), rocBLAS kernels should not call `hipMalloc() ` or `hipFree()` in their own code, but should use the device memory manager.

    `hipMalloc()` and `hipFree()` are synchronizing operations which should be avoided as much as possible.

    The device memory allocation system provides:
    * A `device_malloc` method for temporarily using device memory which has either been allocated before, or which is allocated on demand.
    * A method to reuse device memory across rocBLAS calls, without allocating them and deallocating them at every call.
    * A method for users to query how much device memory is needed for a particular kernel call, in order for it to perform optimally.
    * A method for users to control how much device memory is allocated, or whether to leave it up to rocBLAS to allocate it on demand.

    **Extra pointers or size arguments for temporary storage should not be added to the end of public APIs, only private internal ones.** Instead, implementations of the public APIs should request and obtain device memory using the rocBLAS device memory manager. rocBLAS kernels in the public API must also detect and respond to *device memory size queries*.

    A kernel must allocate all of its device memory upfront, for use during the entirety of the kernel call. It must not allocate and deallocate device memory at different levels of kernel calls. This means that if a lower-level kernel needs device memory, it must be allocated by higher-level routines and passed down to the lower-level routines. When device memory can be shared between two or more operations, the maximum size needed by all them should be reported or allocated.

    Details are in the [Device Memory Allocation](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/docs/Device_Memory_Allocation.pdf) design document.
    Examples of how to use the device memory allocator are in [TRSV](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/library/src/blas2/rocblas_trsv.cpp) and [TRSM](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/library/src/blas3/rocblas_trsm.cpp).

2. Logging, argument error checking and device memory allocation should only occur at the top-level kernel routines. Therefore, if one rocBLAS routine calls another, the lower-level called routine(s) should not perform logging, argument checking, or device memory allocation. This can be accomplished in one of two ways:

    A. (Preferred.) Abstract out the computational part of the kernel into a separate template function (usually named `rocblas_<kernel>_template`, and call it from a higher-level template routine (usually named `rocblas_<kernel>_impl`) which does error-checking, device memory allocation, and logging, and which gets called by the C wrappers:

    ```c++
    template <...>
    rocblas_status rocblas_<kernel>_template(..., T* device_memory)
    {
        // Performs fast computation
        // No argument error checking
        // No logging
        // No device memory allocation -- any temporary device memory must be passed in through pointers
        // Can be called by other computational kernels
        // Called by rocblas_<kernel>_impl
        // Private internal API
    }

    template <...>
    rocblas_status rocblas_<kernel>_impl()
    {
        // Argument error checking
        // Logging
        // Responding to device memory size queries
        // Device memory allocation (through handle->device_malloc())
        // Temporarily switching to host pointer mode if scalar constants are used
        // Calls rocblas_<kernel>_template()
        // Private internal API
    }

    extern "C" rocblas_status rocblas_[hsdcz]<kernel>()
    {
        // C wrapper
        // Calls rocblas_<kernel>_impl()
        // Public API
    }
    ```
    B. Use a `bool` template argument to specify if the kernel template should perform full functionality or not. Pass device memory pointer(s) which will be used if full functionality is turned off:
    ```c++
    template <bool full_function, ...>
    rocblas_status rocblas_<kernel>_template(..., T* device_memory = nullptr)
    {
        if(full_function)
        {
            // Argument error checking
            // Logging
            // Responding to device memory size queries
            // Device memory allocation (memory pointer assumed already allocated otherwise)*
            // Temporarily switching to host pointer mode if scalar constants are used*
            return rocblas_<kernel>_template<false, ...>(...);
        }
        // Perform fast computation
        // Private internal API
    }
    ```
    *Device memory allocation, and temporarily switching pointer mode, might be difficult to enclose in an `if` statement with the RAII design, so the code might have to use recursion to call the non-fully-functional version of itself after setting these things up. That's why method A above is preferred, but for some huge functions like GEMM, method B might be more practical to implement, since it disrupts existing code less.

3. The pointer mode should be temporarily switched to host mode during kernels which pass constants to other kernels, so that host-side constants of `-1.0`, `0.0` and `1.0` can be passed to kernels like `GEMM`, without causing synchronizing host<->device memory copies. For example:
    ```c++
    // Temporarily switch to host pointer mode, saving current pointer mode, restored on return
    auto saved_pointer_mode = handle->push_pointer_mode(rocblas_pointer_mode_host);

    // Get alpha
    T alpha_h;
    if(saved_pointer_mode == rocblas_pointer_mode_host)
        alpha_h = *alpha;
    else
        RETURN_IF_HIP_ERROR(hipMemcpy(&alpha_h, alpha, sizeof(T), hipMemcpyDeviceToHost));
    ```
    `saved_pointer_mode` can be read to get the old pointer mode. If the old pointer mode was host pointer mode, then the host pointer is dereferenced to get the value of alpha. If the old pointer mode was device pointer mode, then the value of `alpha` is copied from the device to the host.

    After the above code switches to host pointer mode, constant values can be passed to `GEMM` or other kernels by always assuming host mode:
    ```c++
    static constexpr T negative_one = -1;
    static constexpr T zero = 0;
    static constexpr T one = 1;

    rocblas_gemm_template( handle, transA, transB, jb, n, jb, alpha, invA, BLOCK, B, ldb, &zero, X, m);
    ```
    When `saved_pointer_mode` is destroyed, the handle's pointer mode returns to the previous pointer mode.

4. When tests are added to `rocblas-test` and `rocblas-bench`, refer to [this guide](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/clients/gtest/README.md).

    The test framework is templated, and uses [SFINAE](https://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error) and `std::enable_if<...>` to enable and disable certain types for certain tests.

    YAML files are used to describe tests as combinations of arguments. [`rocblas_gentest.py`](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/clients/common/rocblas_gentest.py) is used to parse the YAML files and generate tests in the form of a binary file of [`Arguments`](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/clients/include/rocblas_arguments.hpp) records.

    The `rocblas-test` and `rocblas-bench` [type dispatch file](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/clients/include/type_dispatch.hpp) is central to all tests. Basically, rather than duplicate:
    ```c++
    if(type == rocblas_datatype_f16_r)
        func1<rocblas_half>(args);
    else if(type == rocblas_datatype_f32_r)
        func<float>(args);
    else if(type == rocblas_datatype_f64_r)
        func<double>(args);
    ```
    etc. everywhere, it's done only in one place, and a `template` template argument is passed to specify which action is actually taken. It's fairly abstract, but it is powerful. There are examples of using the type dispatch in [`clients/gtest/*_gtest.cpp`](https://github.com/ROCmSoftwarePlatform/rocBLAS/tree/develop/clients/gtest) and [`clients/benchmarks/client.cpp`](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/clients/benchmarks/client.cpp).

5. Code should not be copied-and pasted, but rather, templates, macros, [SFINAE](https://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error), [CRTP](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern), [lambdas](https://en.cppreference.com/w/cpp/language/lambda), etc. should be used to factor out differences in similar code.

    A code should be made more generalized, rather than copied and modified, unless it is a completely different kernel function, and the old code is just being used as a start.

    If a new function is similar to an existing function, then the existing function should be generalized, or the new function and existing function should be refactored and based on a third templated function or class, rather than duplicating code.

6. To differentiate between scalars located on either the host or device memory, a special function has been created, called `load_scalar()`.
If its argument is a pointer, it is dereferenced on the device. If the argument is a scalar, it is simply copied. This allows single HIP kernels to be written for both device and host memory:
    ```c++
    template <typename T, typename U>
    __global__ void axpy_kernel(rocblas_int n, U alpha_device_host, const T* x, rocblas_int incx, T* y, rocblas_int incy)
    {
        auto alpha = load_scalar(alpha_device_host);
        ptrdiff_t tid = hipBlockIdx_x * hipBlockDim_x + hipThreadIdx_x;

       // bound
       if(tid < n)
           y[tid * incy] += alpha * x[tid * incx];
    }
    ```
    Here, `alpha_device_host` can either be a pointer to device memory, or a numeric value passed directly to the kernel from the host. The `load_scalar()` function dereferences it if it's a pointer to device memory, and simply returns its argument if it's numerical. The kernel is called from the host in one of two ways depending on the pointer mode:
    ```c++
    if(handle->pointer_mode == rocblas_pointer_mode_device)
        hipLaunchKernelGGL(axpy_kernel, blocks, threads, 0, handle->get_stream(), n, alpha, x, incx, y, incy);
    else if(*alpha) // alpha is on host
        hipLaunchKernelGGL(axpy_kernel, blocks, threads, 0, handle->get_stream(), n, *alpha, x, incx, y, incy);
    ```
    When the pointer mode indicates `alpha` is on the host, the `alpha` pointer is dereferenced on the host and the numeric value it points to is passed to the kernel. When the pointer mode indicates `alpha` is on the device, the `alpha` pointer is passed to the kernel and dereferenced by the kernel on the device. This allows a single kernel to handle both cases, eliminating duplicate code.

7. If new arithmetic datatypes (like `rocblas_bfloat16`) are created, then unless they correspond *exactly* to a predefined system type, they should be wrapped into a `struct`, and not simply be a `typedef` to another type of the same size, so that their type is unique and can be differentiated from other types.

    Right now `rocblas_half` is `typedef`ed to `uint16_t`, which unfortunately prevents `rocblas_half` and `uint16_t` from being differentiable. If `rocblas_half` were simply a `struct` with a `uint16_t` member, then it would be a distinct type.

    It is legal to convert a pointer to a [standard-layout `class`/`struct`](https://en.cppreference.com/w/cpp/language/data_members#Standard_layout) to a pointer to its first element, and vice-versa, so the C API is unaffected by whether the type is enclosed in a `struct` or not.

8. [RAII](https://en.wikipedia.org/wiki/Resource_acquisition_is_initialization) classes should be used instead of explicit `new`/`delete`, `hipMalloc`/`hipFree`, `malloc`/`free`, etc. RAII classes are automatically exception-safe because their destructor gets called during unwinding. They only have to be declared once to construct them, and they are automatically destroyed when they go out of scope. This is better than having to match `new`/`delete` `malloc`/`free` calls in the code, especially when exceptions or early returns are possible.

    Even if an operation does not allocate and free memory, if it represents a change in state which must be undone when a function returns, then it belongs in an RAII class. For example, `handle->push_pointer_mode()` creates an RAII object which saves the pointer mode on construction, and restores it on destruction.

9. When writing function templates, place any non-type parameters before type parameters, i.e., leave the type parameters at the end. For example:

    ```c++
    template <rocblas_int NB, typename T> // T is at end
    static rocblas_status rocblas_trtri_batched_template(rocblas_handle handle,
                                                         rocblas_fill uplo,
                                                         rocblas_diagonal diag,
                                                         rocblas_int n,
                                                         const T* A,
                                                         rocblas_int lda,
                                                         rocblas_int bsa,
                                                         T* invA,
                                                         rocblas_int ldinvA,
                                                         rocblas_int bsinvA,
                                                         rocblas_int batch_count,
                                                         T* C_tmp)
    {
        if(!n || !batch_count)
            return rocblas_status_success;

         if(n <= NB)
             return rocblas_trtri_small_batched<NB>(  // T is automatically deduced
                 handle, uplo, diag, n, A, lda, bsa, invA, ldinvA, bsinvA, batch_count);
         else
             return rocblas_trtri_large_batched<NB>(  // T is automatically deduced
                 handle, uplo, diag, n, A, lda, bsa, invA, ldinvA, bsinvA, batch_count, C_tmp);
    }
    ```
    The reason for this, is that the type template arguments can be automatically deduced from the actual function arguments, so that you don't have to pass the types in calls to the function, as shown in the example above when calling `rocblas_trtri_small_batched` and `rocblas_trtri_large_batched`. They have a `typename T` parameter too, but it can be automatically deduced, so it doesn't need to be explicitly passed.

10. When writing functions like the above which are heavily dependent on block sizes, especially if they are in header files included by other files, template parameters for block sizes are strongly preferred to `#define` macros or `constexpr` variables. For `.cpp` files which are not included in other files, a `static constexpr` variable can be used. **Macros should never be used for constants.**

    Note: For constants inside of functions, `static constexpr` is preferred to just `constexpr`, so that the variables do not need to be initialized at runtime.

    Note: C++14 variable templates can sometimes be used to provide constants. For example:
    ```c++
    template <typename T>
    static constexpr T negative_one = -1;

    template <typename T>
    static constexpr T zero = 0;

    template <typename T>
    static constexpr T one = 1;
    ```

11. static duration variables which aren't constants should usually be made function-local `static` variables, rather than namespace or class static variables. This is to avoid the [static initialization order fiasco](https://isocpp.org/wiki/faq/ctors#static-init-order). For example:
    ```c++
    static auto& get_table()
    {
        // Placed inside function to avoid dependency on initialization order
        static std::unordered_map<std::string, size_t>* table = test_cleanup::allocate(&table);
        return *table;
    }

    ```
    This is sometimes called the *singleton* pattern. A `static` variable is made local to a function rather than a namespace or class, and it gets initialized the first time the function is called. A reference to the `static` variable is returned from the function, and the function is used everywhere access to the variable is needed. In the case of multithreaded programs, the C++11 and later standards guarantee that there won't be any race conditions. It is also [faster](https://www.modernescpp.com/index.php/thread-safe-initialization-of-a-singleton) to initialize function-local `static` variables than it is to explicitly call `std::call_once`. For example:

    ```c++
    void my_func()
    {
        static int dummy = (func_to_call_once(), 0);
    }
    ```
    This is much simpler and faster than explicitly calling `std::call_once`, since the compiler has special ways of optimizing `static` initialization. The first time `my_func()` is called, it will call `func_to_call_once()` once in a thread-safe way. After that, there is almost no overhead in later calls to `my_func()`.

12. Functions are preferred to macros. Functions or functors inside of `class` / `struct` templates can be used when partial template specializations are needed.

    When C preprocessor macros are needed (such as if they contain a `return` statement to return from the calling function), if the macro's definition contains more than one simple expression, then [it should be wrapped in a `do { } while(0)`](https://stackoverflow.com/questions/154136/why-use-apparently-meaningless-do-while-and-if-else-statements-in-macros), without a terminating semicolon. This is to allow them to be used inside `if` statements. For example:
    ```c++
    #define RETURN_ZERO_DEVICE_MEMORY_SIZE_IF_QUERIED(h) \
        do                                               \
        {                                                \
            if((h)->is_device_memory_size_query())       \
                return rocblas_status_size_unchanged;    \
        } while(0)
    ```
    The `do { } while(0)` allows the macro expansion to be a single statement which can be terminated with a semicolon, and which can be used anywhere a regular function call can be used.

13. For most template functions which are used in other compilation units, it is preferred that they be put in header files, rather than `.cpp` files, because putting them in `.cpp` files requires explicit instantiation of them for all possible arguments, and there are less opportunities for inlining and interprocedural optimization.

    The C++ standard explicitly says that unused templates can be omitted from the output, so including unused templates in a header file does not increase the size of the program, since only the used ones are in the final output.

    For template functions which are only used in one `.cpp` file, they can be placed in the `.cpp` file.

    Templates, like inline functions, are granted an exception to the one definition rule (ODR) as long as the sequence of tokens in each compilation unit is identical.

14. Functions and namespace-scope variables which are not a part of the public interface of rocBLAS, should either be marked static, be placed in an unnamed namespace, or be placed in `namespace rocblas`. For example:
    ```c++
    namespace
    {
        // Private internal implementation
    } // namespace

    extern "C"
    {
        // Public C interfaces
    } // extern "C"
    ```
    However, unnamed namespaces should not be used in header files. If it is absolutely necessary to mark a function or variable as private to a compilation unit but defined in a header file, it should be declared `static`, `constexpr` and/or `inline` (`constexpr` implies `static` for non-template variables and `inline` for functions).

    Even though rocBLAS goes into a shared library which exports a limited number of symbols, this is still a good idea, to decrease the chances of name collisions *inside* of rocBLAS.

15. `std::string` should only be used for strings which can grow, or which must be dynamically allocated as read-write strings. For simple static strings, strings returned from functions like `getenv()`, or strings which are initialized once and then used read-only, `const char*` should be used to refer to the string or pass it as an argument.

    `std::string` involves dynamic memory allocation and copying of temporaries, which can be slow. `std::string_view` is supposed to help alleviate that, but it's not available until C++17, and we're using C++14 now. `const char*` should be used for read-only views of strings, in the interest of efficiency.

16. For code brevity and readability, when converting to *numeric* types, uniform initialization or function-style casts are preferred to `static_cast<>()` or C-style casts. For example, `T{x}` or `T(x)` is preferred to `static_cast<T>(x)` or `(T)x`. `T{x}` differs from `T(x)` in that narrowing conversions, which reduce the precision of an integer or floating-point, are not allowed.

    When writing general containers or templates which can accept *arbitrary* types as parameters, not just *numeric* types, then the specific cast (`static_cast`, `const_cast`, `reinterpret_cast`) should be used, to avoid surprises.

    But when converting to *numeric* types, which have very well-understood behavior and are *side-effect free*, `type{x}` or `type(x)` are more compact and clearer than `static_cast<type>(x)`. For pointers, C-style casts are okay, such as `(T*)A`.

17. For BLAS2 functions and BLAS1 functions with two vectors, the `incx` and/or `incy` arguments can be negative, which means the vector is treated backwards from the end. A simple trick to handle this, is to adjust the pointer to the end of the vector if the increment is negative, as in:
    ```c++
    if(incx < 0)
        x -= ptrdiff_t(incx) * (n - 1);
    if(incy < 0)
        y -= ptrdiff_t(incy) * (n - 1);
    ```
    After that adjustment, the code does not need to treat negative increments any differently than positive ones.

    Note: Some blocked matrix-vector algorithms which call other BLAS kernels may not work if this simple transformation is used; see [TRSV](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/library/src/blas2/rocblas_trsv.cpp) for an example, and how it's handled there.

18. For reduction operations, the file [reduction.h](https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/library/src/blas1/reduction.h) has been created to systematize reductions and perform their device kernels in one place. This works for `amax`, `amin`, `asum`, `nrm2`, and (partially) `dot` and `gemv`. `rocblas_reduction_kernel` is a generalized kernel which takes 3 *functors* as template arguments:
    * One to *fetch* values (such as fetching a complex value and taking the sum of the squares of its real and imaginary parts before reducing it)
    * One to *reduce* values (such as to compute a sum or maximum)
    * One to *finalize* the reduction (such as taking the square root of a sum of squares)

    There is a `default_value()` function which returns the default value for a reduction. The default value is the value of the reduction when the size is 0, and reducing a value with the `default_value()` does not change the value of the reduction.

19. When [type punning](https://en.wikipedia.org/wiki/Type_punning) is needed, `union` should be used instead of pointer-casting, which violates *strict aliasing*. For example:
    ```c++
    // zero extend lower 16 bits of bfloat16 to convert to IEEE float
    explicit __host__ __device__ operator float() const
    {
        union
        {
            uint32_t int32;
            float    fp32;
        } u = {uint32_t(data) << 16};
        return u.fp32; // Legal in C, nonstandard extension in C++
    }
    ```
    This violates the strict aliasing rule of [C](https://en.cppreference.com/w/c/language/object#Strict_aliasing) and [C++](https://en.cppreference.com/w/cpp/language/reinterpret_cast#Type_aliasing):
    ```c++
    // zero extend lower 16 bits of bfloat16 to convert to IEEE float
    explicit __host__ __device__ operator float() const
    {
        uint32_t int32 = uint32_t(data) << 16;
        return *(float *) &int32; // Violates strict aliasing rule in both C and C++
    }
    ```
    The only 100% standard C++ way to do it, is to use `memcpy()`, but this should not be required as long as GCC or Clang are used:
    ```c++
    // zero extend lower 16 bits of bfloat16 to convert to IEEE float
    explicit __host__ __device__ operator float() const
    {
        uint32_t int32 = uint32_t(data) << 16;
        float fp32;
        static_assert(sizeof(int32) == sizeof(fp32), "Different sizes");
        memcpy(&fp32, &int32, sizeof(fp32));
        return fp32;
    }
    ```

20. `<type_traits>` classes which return Boolean values can be converted to `bool` in Boolean contexts. Hence many traits can be tested by simply creating an instance of them with `{}` initialization syntax and using it in a Boolean context:
    ```c++
    template<typename T, typename = typename std::enable_if<std::is_same<T, float>{} ||
                                                            std::is_same<T, double>{}>::type>
    void function(T x)
    {
    }
    ```
    Here, instances of the `std::is_same<...>` traits class are created with the `{}` syntax. The resulting temporary objects can be explicitly converted to `bool`, which is what occurs when an object appears in a conditional expression (`if`, `while`, `for`, `&&`, `||`, `!`, `? :`, etc.). This is a shorter syntax than using `std::is_same<...>::value`.

21. `rocblas_cout` and `rocblas_cerr` should be used instead of `std::cout`, `std::cerr`, `stdout` or `stderr`, and `rocblas_ostream` should be used instead of `std::ostream`, `std::ofstream` or `std::ostringstream`.

    In `rocblas-bench` and `rocblas-test`, `std::cout`, `std::cerr`, `printf`, `fprintf`, `stdout`, `stderr`, `puts()`, `fputs()`, and other symbols are "poisoned", to remind you to use `rocblas_cout`, `rocblas_cerr`, and `rocblas_ostream` instead.

    `rocblas_cout` and `rocblas_cerr` are instances of `rocblas_ostream` which output to standard output and standard error, but in a way that prevents interlacing of different threads' output.

    `rocblas_ostream` provides standardized thread-safe formatted output for rocBLAS datatypes. It can be constructed in 3 ways:
    - By default, in which case it behaves like a `std::ostringstream`
    - With a file descriptor number, in which case the file descriptor is `dup()`ed and the same file it points to is outputted to
    - With a string, in which case a new file is opened for writing, with file creation, truncation and appending enabled (`O_WRONLY | O_CREAT | O_TRUNC | O_APPEND | O_CLOEXEC`)

    `std::endl` or `std::flush` should be used at the end of an output sequence when an atomic flush of the output is needed (atomic meaning that multiple threads can be writing to the same file, but that their flushes will be atomic). Until then, the output will accumulate in the `rocblas_ostream` and will not be flushed until either `rocblas_ostream::flush()` is called, `std::endl` or `std::flush` is outputted, or the `rocblas_ostream` is destroyed.

    The `rocblas_ostream::yaml_on` and `rocblas_ostream::yaml_off` IO modifiers enable or disable YAML formatting, for when outputting abitrary types as YAML source code. For example, to output a `key: value` pair as YAML source code, you would use:

```
    os << key << ": " << rocblas_ostream::yaml_on << value << rocblas_ostream::yaml_off;
```
The `key` is outputted normally as a bare string, but the `value` uses YAML metacharacters and lexical syntax to output the value, so that when it's read in as YAML, it has the type and value of `value`.

22. C++ templates, including variadic templates, are preferred to macros or runtime interpreting of values, although it is understood that sometimes macros are necessary.

    For example, when creating a class which models zero or more rocBLAS kernel arguments, it is preferable to use:
```
    template<rocblas_argument... Args>
    class ArgumentModel
    {
public:
        void func()
        {
            for (auto arg: { Args... })
            {
                // do something with argument arg
            }
        }
    };

    ArgumentModel<e_A, e_B>{}.func();

```
   instead of:
```
    class ArgumentModel
    {
         std::vector<rocblas_argument> args;
public:
         ArgumentModel(const std::vector<rocblas_argument>& args)
         : args(args)
         {
         }

        void func()
        {
            for (auto arg: args)
            {
                // do something with argument arg
            }
        }

    };

    static ArgumentModel model({e_A, e_B});
    model.func();
```

    The former denotes the rocBLAS arguments as a list which is passed as a variadic template argument, and whose properties are known and can be optimized at compile-time, and which can be passed on as arguments to other templates, while the latter requires creating a dynamically-allocated runtime object which must be interpreted at runtime, such as by using `switch` statements on the arguments. The `switch` statement will need to list out and handle every possible argument, while the template solution simply passes the argument as another template argument, and hence can be resolved at compile-time.

23. Automatically-generated files should always go into `build/` directories, and should not go into source directories (even if marked `.gitignore`). The CMake philosophy is such that you can create any `build/` directory, run `cmake` from there, and then have a self-contained build environment which will not touch any files outside of it.

24. The `library/include` subdirectory of rocBLAS, to be distinguished from the `library/src/include` subdirectory, shall consist only of C-compatible header files for public rocBLAS APIs. It should not include internal APIs, even if they are used in other projects, e.g., rocSOLVER, and the headers must be compilable with a C compiler, and must use `.h` extensions.

25. Macro parameters should only be evaluated once when practical, and should be parenthesized if there is a chance of ambiguous precedence. They should be stored in a local temporary variable if needed more than once.

Macros which expand to code with local variables, should use double-underscore suffixes in the local variable names, to prevent their conflict with variables passed in macro parameters. However, if they are in a completely separate block scope than the macro parameter is expanded in, or if they are only passed to another macro/function, then they do not need to use trailing underscores.
```
        #define CHECK_DEVICE_ALLOCATION(ERROR)                   \
            do                                                   \
            {                                                    \
                /* Use error__ in case ERROR contains "error" */ \
                hipError_t error__ = (ERROR);                    \
                if(error__ != hipSuccess)                        \
                {                                                \
                    if(error__ == hipErrorOutOfMemory)           \
                        SUCCEED() << LIMITED_MEMORY_STRING;      \
                    else                                         \
                        FAIL() << hipGetErrorString(error__);    \
                    return;                                      \
                }                                                \
            } while(0)
```
The `ERROR` macro parameter is evaluated only once, and is stored in the temporary variable `error__`, for use multiple times later.

The `ERROR` macro parameter is parenthesized when initializing `error__`, to avoid ambiguous precedence, such as if ``ERROR`` contains a comma expression.

The `error__` variable name is used, to prevent it from conflicting with variables passed in the `ERROR` macro parameter, such as `error`.

26. Do not use variable-length arrays (VLA), which allocate on the stack, for arrays of unknown size.
```
    Ti* hostA[batch_count];
    Ti* hostB[batch_count];
    To* hostC[batch_count];
    To* hostD[batch_count];

    func(hostA, hostB, hostC, hostD);
```
Instead, allocate on the heap, using smart pointers to avoid memory leaks:
```
    auto hostA = std::make_unique<Ti*[]>(batch_count);
    auto hostB = std::make_unique<Ti*[]>(batch_count);
    auto hostC = std::make_unique<To*[]>(batch_count);
    auto hostD = std::make_unique<To*[]>(batch_count);

    func(&hostA[0], &hostB[0], &hostC[0], &hostD[0]);
```

27. Do not define unnamed (anonymous) namespaces in header files ([DCL59-CPP](https://wiki.sei.cmu.edu/confluence/display/cplusplus/DCL59-CPP.+Do+not+define+an+unnamed+namespace+in+a+header+file)).

If the reason for using an unnamed namespace in a header file is to prevent multiple definitions, keep in mind that the following are allowed to be defined in multiple compilation units, such as if they all come from the same header file, as long as they are defined with identical token sequences in each compilation unit:

 - `class`es
 - `typedef`s or type aliases
 - `enum`s
 - `template` functions
 - `inline` functions
 - `constexpr` functions (implies `inline`)
 - `inline` or `constexpr` variables or variable `template`s (only for C++17 or later, although some C++14 compilers treat `constexpr` variables as `inline`)

If functions defined in header files are declared `template`, then multiple instantiations with the same `template` arguments are automatically merged, something which cannot happen if the `template` functions are declared `static`, or appear in unnamed namespaces, in which case the instantiations are local to each compilation unit, and are not combined.

If a function defined in a header file at `namespace` scope (outside of a `class`) contains `static` _local variables_ which are expected to be singletons holding state throughout the entire library, then the function cannot be marked `static` or be part of an unnamed `namespace`, because then each compilation unit will have its own separate copy of that function and its local `static` variables. (`static` member functions of classes always have external linkage, and it is okay to define `static` `class` member functions in-place inside of header files, because all in-place `static` member function definitions, including their `static` local variables, will be automatically merged.)

Guidelines:

- Do not use unnamed `namespace`s inside of header files.

- Use either `template` or `inline` (or both) for functions defined outside of classes in header files.

- Do not declare namespace-scope (not `class`-scope) functions `static` inside of header files unless there is a very good reason, that the function does not have any non-`const` `static` local variables, and that it is acceptable that each compilation unit will have its own independent definition of the function and its `static` local variables. (`static` `class` member functions defined in header files are okay.)

- Use `static` for `constexpr` `template` variables until C++17, after which `constexpr` variables become `inline` variables, and thus can be defined in multiple compilation units. It is okay if the `constexpr` variables remain `static` in C++17; it just means there might be a little bit of redundancy between compilation units.

repository: yoichiyoshida/rocBLAS

repo_name: yoichiyoshida/rocBLAS


text:
I would like you to answer the following questions in a short answer
format using Markdown.

Turn all of the questions below into headers.
=============================================

If the questions are related, make the headers reflect this by subordinating them.
----------------------------------------------------------------------------------

1.  For questions that ask for a list, use the appropriate Markdown
    syntax to create either ordered or unordered lists.

2.  Use **bold** and *italic* text for emphasis in your responses.

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

GitHub Username: gma96 Team name: gitpub\
 Today's date: 10/12/16

What tools have you we worked with so far in this class?
========================================================

-   Github
-   Cloud 9
-   Markdown
-   CSS
-   HTML
-   Linux commands

Which have you found most potentially useful?
---------------------------------------------

Learning how to use *Github* seems to be the most potentially useful.
Learning *markdown, css, and html* ties into this as well.

Why?
----

I thought these tools were the most useful because in the future I might
run into jobs that might ask me to create or edit websites and these
skills and tools will help me get successfully complete those tasks.

What tools have been the most difficult to learn?
=================================================

Learning *linux commands* has been the most difficult to learn.

Why have they been particularly difficult to learn and use?
-----------------------------------------------------------

It's difficult because there are so many different commmands and its
hard to remember which ones do what. In addition to the many commands,
there are also flags that makes it even more complicated.

What tools would you like to learn more about?
==============================================

I'd like to work a little more with web design and customization because
there are many different possibilities that we haven't worked with yet

***When you are finished with the questions in file:***

1.  I want you to change the name of the file to your GitHub username.
2.  You will then work as a group to convert the file to HTML, DOCX, and
    ODT formats, per the instructions in class.
3.  Then I want you to add, commit, and push your changes.
4.  Finally, you will create a pull request in GitHub to get these files
    back into my original repository.

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# ntireader-www
## NTI Buddhist Text Reader

A text reader, including dictionary and tools, for analyzing and managing Buddhist texts in Chinese and Sanskrit. This is a non-profit, open source project. You can find the source code in https://github.com/alexamies/buddhist-dictionary

There are three parts to the project:

 1. The web user interface. This includes HTML, PHP, and JavaScript
    files.
 2. The data. This is the dictionary and text files. The data files are
    in UTF-8 tab delimited text. There is also a corpus directory, which
    contains the literature to build the vocabulary and word sense
    frequency from. These are Chinese and Sanksrit texts from the
    Buddhist canon and related collections. The corpus files include
    part-of-speech (POS) tagged documents and untagged documents.
 3. Command line tools. For building vocabulary. These are in Python.
    This includes a POS tagger and HTML annotation tool.

This docker image is the web user interface part which include the logic to create database and load data.

## Get it

sudo docker pull qizha/ntireader-www

## Run it

1.Launch database container
> sudo docker run --name db -P -e MYSQL_ROOT_PASSWORD=admin -d mysql

2.Retrieve the IP address with command

> docker inspect db|grep IP

3.Launch neireader-www container
> docker run --name ntireader--link db:db -d -e DB_HOST=<IP_ADDRESS> -e DB_USER=root -e DB_PASSWORD=admin -P qizha/ntireader-www:0.53

repository: qizha/ntireader-www

repo_name: qizha/ntireader-www


text:
---
title: Administration
subtitle: Settings
displayToc: true
---
The settings area is where the global configuration of SCM-Manager happens. Many SCM-Manager plugins that need some kind of configuration get an area in the settings. This makes it maximally configurable if required.

### General
#### Realm Description
The field "Realm Description" is used to set the authentication realm for logins with basic authentication.

#### Namespace Strategy
SCM-Manager groups repositories by namespaces. This grouping can be based on different strategies:

* Username: The username of the user that creates the repository is used.
* Current year: The current year is used.
* Repository type: The type (Git, HG, SVN) is used.
* Custom: The namespace can be freely set when creating the repository.

#### Login Info URL
The login screen of SCM-Manager shows helpful plugins and features. If you want to show your own information in the login screen, you can change the URL here.

#### Enable XSRF Protection
Activate this option to make attacks using cross site scripting (XSS / XSRF) on SCM-Manager more difficult. This feature is still in an experimental state.

#### Plugin-Settings
A plugin center can be used to conveniently manage plugins. If you want to use a plugin center that is not the default one, you only have to change this URL. If SCM-Manager is operated as part of a Cloudogu EcoSystem, the plugin center URL can be changed in the etcd.
If the default plugin center is used, the SCM-Manager may be connected to the cloudogu platform to receive special cloudogu platform-Plugins. Details can be found in the plugin-center documentation.
![Plugin center settings, not connected to the cloudogu platform](assets/administration-setings-not-connected.png)
An existing connection between a SCM-Manager and the cloudogu platform may be severed here.
![Plugin center settings, button sever connection to the cloudogu platform](assets/administration-settings-connected.png)

#### Anonymous Access
In SCM-Manager 2 the access for anonymous access is realized by using an "_anonymous" user. When the feature is activated, a new user with the name "_anonymous" is created. This user can be authorized just like any other user. This user is used for access to SCM-Manager without login credentials.
If the anonymous mode is protocol only you may access the SCM-Manager via the REST API and VCS protocols. With fully enabled anonymous access you can also use the webclient without credentials.

Example: If anonymous access is enabled and the "_anonymous" user has full access on a certain Git repository, everybody can access this repository via command line and the classic Git commands without any login credentials. Access via SSH is not supported at this time.

#### Release Feed Url
The url of the RSS Release Feed for SCM-Manager. This provides up-to-date version information. To disable this feature just leave the url blank.

#### User Converter
Internal users will automatically be converted to external on their first login using an external system. After conversion the users may only log in using the external system.

#### File Search
File paths can be searched inside repositories. For very big repositories, the search may lead to memory issues. In this case, the search function can be disabled here.

#### Fallback Mail Domain Name
This domain name will be used to create email addresses for users without one when needed. It will not be used to send mails nor will be accessed otherwise.

#### Emergency Contacts
The following users will be notified of administrative incidents (e.g. failed health checks).

#### Login Attempt Limit
It can be configured how many failed login attempts a user can have before the account gets disabled. The counter for failed login attempts is reset after a successful login. This feature can be deactivated by setting the value "-1".

#### Login Attempt Limit Timeout
If the deactivation of accounts after too many unsuccessful login attempts is activated. This timeout can be used to set for how long accounts will be disabled.

#### Base URL
The base URL represents the URL that a SCM-Manager instance is available at. The checkbox "Force Base URL" can be used to force redirects to the base URL. If activated, access to this application through different URLs are redirected to the base URL.

Example: The base URL is www.scm.manager.com/scm but there is a second URL www.scm-manager.io/scm. Both URLs point to the same SCM-Manager instance. If the redirect to the base URL is forced, access via www.scm-manager.io/scm is redirected directly to www.scm-manager.com/scm.

**Warning:** If the base URL is set to a faulty value and "Force Base URL" is activated, the SCM-Manager instance is no longer accessible.

#### Proxy Settings
If the SCM-Manager instance is behind a proxy server, the connection can be configured here.

![Administration-Configuration](assets/administration-settings-general.png)

### Mercurial
The global settings for the source code management tool "Mercurial", hg for short, can be configured here.

### Git
The global settings for the source code management tool "Git", can be configured here.

### Subversion
The global settings for the source code management tool "Subversion", svn for short, can be configured here.

license: MIT

repository: scm-manager/scm-manager

branch_name: refs/heads/develop

gha_language: Java

gha_license_id: MIT

repo_name: scm-manager/scm-manager


text:
# PrimeNGAdvancedGrowl

[![Travis build badge](https://img.shields.io/travis/kreuzerk/primeNG-advanced-growl.svg)](https://travis-ci.org/kreuzerk/primeNG-advanced-growl)
[![codecov](https://codecov.io/gh/kreuzerk/primeNG-advanced-growl/branch/master/graph/badge.svg)](https://codecov.io/gh/kreuzerk/primeNG-advanced-growl)
[![Greenkeeper badge](https://badges.greenkeeper.io/kreuzerk/primeNG-advanced-growl.svg)](https://greenkeeper.io/)
[![npm](https://img.shields.io/npm/dt/primeng-advanced-growl.svg)]()
[![angular6](https://img.shields.io/badge/angular%206%20ready-true-green.svg)]()
[![gitter](https://img.shields.io/gitter/room/primeNG-advanced-growl/nw.js.svg)]()

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [AdvGrowlModul](#advgrowlmodul)
  - [Demo and Blogposts](#demo-and-blogposts)
  - [What is missing on PrimeNG?](#what-is-missing-on-primeng)
  - [What is the AdvGrowlModule offering?](#what-is-the-advgrowlmodule-offering)
  - [How do you use PrimeNGAdvancedGrowl?](#how-do-you-use-primengadvancedgrowl)
    - [installation](#installation)
    - [Angular 6](#angular-6)
    - [AdvGrowlComponent](#advgrowlcomponent)
      - [Input](#input)
      - [Output](#output)
    - [Models](#models)
    - [AdvGrowlService](#advgrowlservice)
    - [Examples](#examples)
      - [Avoid creating success messages with same Summary](#avoid-creating-success-messages-with-same-summary)
      - [Passing additional properties to the message](#passing-additional-properties-to-the-message)
      - [Do not let error messages disappear automatically](#do-not-let-error-messages-disappear-automatically)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# AdvGrowlModul
The AdvGrowlModule is a wrapper around the growl module from PrimeNG. This wrapper was created
because PrimeNG is missing some features.

- If you have a feature request or noticed a bug please open an issue under: https://github.com/kreuzerk/primeNG-advanced-growl/issues
- If you have questions about the module or want to discuss new ideas or improvements please use our chat at: https://gitter.im/primeNG-advanced-growl/Lobby
- Contributions are welcome. Just fork the repo and create a Pull Request.

## Demo and Blogposts
- You can find a working demo of the growl module on the following link: https://primeng-advanced-growl.firebaseapp.com/
- A blogpost that explains how to make sure that your users do not miss error messages is availbale under: <https://medium.com/@kevinkreuzer/primeng-advanced-growl-make-sure-your-users-see-the-errors-6988f722fb8f>

## What is missing on PrimeNG?
- PrimeNG growl offers us to define a sticky property to remove the messages. When we set the lifetime
of the messages to 3 seconds all messages will be removed after the specified time. The problem comes
when a message gets created 2 seconds after the first message. This message will not be removed after
the specified 3 seconds. This message will be removed 1 seconds after creation. This is the point where
the 3 seconds from the first message have passed.

## What is the AdvGrowlModule offering?
- It allows you to choose a default lifetime for each message. Each message receives this lifetime when it is created. This feature differs from the original primeng growl module because the lifetime is unique for each message.
- It allows you to choose if you want to freeze all messages on hover. If you enable this feature and hover over a message all messages will internally stop their timer and wait until you leave the messages again. Each message will restart its timer with the remaining time.
- In addition to freezing all messages you also have the possibility to freeze only one message on hover.
- You can limit the number of messages that will be displayed on screen. Notice that all other messages that can not be displayed are cached and will be displayed as soon as another spot is available.
- You can optionally pas additional properties to each of your messages. You can then retrieve those properties by clicking on a message as an output event.
- The newest and one of the most powerful features was released in the 3.1.0-reindeer version. Additionally to the default lifetime you can now specify a new unique lifeTime for each message. This means you can say I want to create a info message with a lifetime of 2 seconds, a success message with a lifetime of 3 seconds and so on. This is also the feature we are going to use to make sure that our users do not miss error messages.

## How do you use PrimeNGAdvancedGrowl?
### installation
PrimeNGAdvancedGrowl is an node_module and therefore it is provided over npm. To install it node and npm
are required.
```
npm install --save primeng-advanced-growl
```

To have all the primeNG styles available you need to import the following stylesheets in your application:
```
"../node_modules/font-awesome/scss/font-awesome.scss",
"../node_modules/primeng/resources/primeng.css",
"../node_modules/primeng/resources/themes/omega/theme.scss"
```

To use the AdvGrowlService and the AdvGrowlComponent you need to import the AdvGrowlModul in your appliction.
```javascript
import {AdvGrowlModule} from 'primeng-advanced-growl';

@NgModule({
    declarations: [AppComponent],
    imports: [AdvGrowlModule]
})
...
```

### Angular 6
Please notice that only versions 4.x are Angular 6 compatible.

### AdvGrowlComponent
The AdvGrowlModule exports a component named AdvGrowlComponent. You need to include this component
once in your app.component.html. With the help of this component the advanced PrimeNG growl messages
can be displayed.
```html
<app-navbar></app-navbar>
<adv-growl></adv-growl>
<div class="container">
    <router-outlet></router-outlet>
</div>
```

The advanced growl messages component has the following in- and outputs.

#### Input
| Input        | Description                                                                                |
|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| style        | Inline styles that should be applied to the growl component of PrimeNG                                                                                |
| styleClass   | Style class for the growl component of PrimeNG                                                                                |
| life: number (default = 0) | A number that represents the lifetime of each growl message. If set to 3000 each message will be disappear after 3 seconds. If no life param is passed to the components the growl messages are sticky and do not disappear until you call clearMessages or click on the cancel x on a message |
|freezeMessagesOnHover: boolean (default: false)| This flag is only useful if you also pass a life time. When you pass this property to the component messages are freezed when you hover over them. Let's say you have for example 3 messages all with a lifetime of 3 seconds. When you hover after 2 seconds over the second message all messages on the screen are freezed and do not disappear. After you leave the messages each message will disappear after the specified lifetime. With the pauseOnlyHoveredMessage you can control if you want all messages or only the hoverd message to disappear|
|pauseOnlyHoveredMessage (default: false)| This flag indicates if only the hovered message should be paused. If set to true only the hoverd message will be paused. If set to false all messages will be paused on hover. Notice that this flag is only useful if you set a lifetime that is bigger than 0 and you set the freezeMessagesOnHover flag to true|
|messageSpots (default: 0 (unlimited))| This property gives you the possibility to limit the number of messages displayed on screen. This feature is very useful in combination with the life property. With this combination all messages that can currently not be displayed due to missing message spots will be cached. Those cached messages will appear as soon as a spot is available. Notice that a dynamic change of this property during runtime removes all currently displayed messages from screen|

#### Output

| Event | Description |
|-------|-------------|
| onClose: EventEmitter<AdvPrimeMessage>| Emits an event with the closed message. This message is from type AdvPrimeMessage. |
| onClick: EventEmitter<AdvPrimeMessage>| Emits an event with the message from the clicked element. This message is from type AdvPrimeMessage. |
|onMessagesChanges: EventEmitter<Array<AdvPrimeMessage>>|Each time a message is created or removed it emits an array of all messages shown on the screen.  The AdvGrowlService
can be accessed over dependency injection inside your component.

```javascript
import {AdvGrowlService} from 'primeng-advanced-growl';

@Component({
    selector: ...,
    templateUrl: ...
})
export class SampleComponent{

    constructor(private advGrowlService: AdvGrowlService){
    }
}
```

The AdvGrowlService provides the following methods to create messages. Each method expects
the message content and a message title. If you wish you can also add additional properties. Additional properties
are emitted when you click on a message. All of the methods below will use the lifetime you specified on the component via
the life input property.

- createSuccessMessage(messageContent: string, summary: string, additionalProperties?: any): AdvPrimeMessage
- createInfoMessage(messageContent: string, summary: string, additionalProperties?: any): AdvPrimeMessage
- createWarningMessage(messageContent: string, summary: string, additionalProperties?: any): AdvPrimeMessage
- createErrorMessage(messageContent: string, summary: string, additionalProperties?: any): AdvPrimeMessage

If you want to create messages that have another lifetime than the one you provided via the life input property you can
use the Timed message service methods. Those methods are similar to the methods above but they accept an additional
lifeTime property. This lifetime will then be used.

- createTimedSuccessMessage(messageContent: string, summary: string, lifeTime: number, additionalProperties?: any): void
- createTimedInfoMessage(messageContent: string, summary: string, lifeTime: number, additionalProperties?: any): void
- createTimedWarningMessage(messageContent: string, summary: string, lifeTime: number, additionalProperties?: any): void
- createTimedErrorMessage(messageContent: string, summary: string, lifeTime: number, additionalProperties?: any): void

To clear all messages you can call the **clearMessages()** method from the AdvGrowlService.

### Examples
Inside the test folder you can find different examples how to use the library. Below we listed some code samples for common use cases.

#### Avoid creating success messages with same Summary
If we want to avoid the creation of multiple messages with the same summary or type we could do the following inside our component.
```javascript
import {AdvPrimeMessage} from '../../lib/messages/adv-growl.model';

@Component({
    selector: 'sample-app',
    template: `<adv-growl [life]="2500"
                (onMessagesChanges)="onMessages($event)">
               </adv-growl>
               <button pButton type="button"
                    (click)="createNonDuplicatedSuccessMessage()"
                    class="ui-button-success"
                    label="Create success message if none on screen">
               </button>
               `
})
export class AppComponent {

    messages = [];

    constructor(private advMessagesService: AdvGrowlService) {
    }

    public createSuccessMessage(): void {
        this.advMessagesService.createSuccessMessage('Awesome success message content', 'Awesome success', {
          clickMessage: 'Awesome click'
        });
    }

    public onMessages(messages) {
        this.messages = messages;
    }

    public createNonDuplicatedSuccessMessage(): void {
        const index = this.messages.findIndex(message => message.summary === 'Awesome success');
        if (index < 0) {
            this.createSuccessMessage()
        }
    }
}
```

#### Passing additional properties to the message
If you want to pass some additional informations to your message you can do this by passing those as last
optional parameter to the success, warning, info or error method. When you click on your message the event
will then contain your additionalProperties.
```javascript
import {AdvPrimeMessage} from '../../lib/messages/adv-growl.model';

@Component({
    selector: 'sample-app',
    template: `<adv-growl [life]="2500"
                (onMessagesChanges)="onMessages($event)"
                (onClick)="logMessage($event)">
               </adv-growl>
               <button pButton type="button"
                    (click)="createSuccessMessageWithAdditionalInfos()"
                    class="ui-button-success"
                    label="Create success message with additional properties">
               </button>
               `
})
export class AppComponent {

    messages = [];

    constructor(private advMessagesService: AdvGrowlService) {
    }

    public createSuccessMessageWithAdditionalInfos(): void {
        this.advMessagesService.createSuccessMessage('Awesome success message content', 'Awesome success', {
          clickMessage: 'Awesome click'
        });
    }

    public logMessage(message: AdvPrimeMessage) {
        if (message.additionalProperties) {
            console.log(message.additionalProperties.clickMessage)
        } else {
            console.log('You clicked on message', message)
        }
    }
}
```

#### Do not let error messages disappear automatically
Letting messages disappear within the given time is a cool feature. But sometimes you do not want let messages disappear
automatically because you are then risking that the user misses the message. This is often the case with error messages.
Primeng-advanced-growl allows you to use the "timed" methods to specify the message for each created message.
This gives you a lot of power. With this API you can easily create all messages with a lifeTime of 0. Rember that 0 is equal
to sticky.
```javascript
import {AdvPrimeMessage} from '../../lib/messages/adv-growl.model';

@Component({
    selector: 'sample-app',
    template: `<adv-growl [life]="2500"
                (onMessagesChanges)="onMessages($event)"
                (onClick)="logMessage($event)">
               </adv-growl>
               <button pButton type="button"
                    (click)="createTimedErrorMessage()"
                    class="ui-button-success"
                    label="Create sticky error message">
               </button>
               `
})
export class AppComponent {

    messages = [];

    constructor(private advMessagesService: AdvGrowlService) {
    }

    public createTimedErrorMessage(): void {
        this.advMessagesService.createTimedErrorMessage('Click me or I will stay forever', 'Watch out', 0, {
          clickMessage: 'Awesome click'
        });
    }
}
```

repository: kreuzerk/primeNG-advanced-growl

gha_language: TypeScript

repo_name: kreuzerk/primeNG-advanced-growl


text:
# Lab 2 - Storage Classes and Lifecycle Management

## Introduction
This lab will take you through the process of viewing and setting storage classes on an object and setting up lifecycle policies.

<!--
## Storage Classes
Every object in Amazon S3 has a storage class associated with it. By default, objects are in the STANDARD class.  When using the S3 Management Console, when you list objects in the bucket, the console shows the storage class.
![Storage Classes](../images/3-ObjectStorageClass.png)

Amazon S3 offers the following storage classes:

Storage Class | Durability (designed for) | Min storage duration | Other Considerations
------------ | ------------- | ------------ | -------------
STANDARD | 99.999999999% | None | Frequently accessed data
INTELLIGENT_TIERING (NEW)| 99.999999999% | 30 days | Long-lived data with changing or unknown access patterns. < 128KB will not transition to IA
STANDARD_IA | 99.999999999% | 30 days | Long-lived, infrequently accessed data.  128KB Min.
ONEZONE_IA | 99.999999999% | 30 days | Stored in one AZ. Suitable for infrequently accessed data
GLACIER | 99.999999999% | 90 days | Objects must be restored before you can access them

 _Note: You cannot specify GLACIER as the storage class at the time that you create an object. You transition objects to the GLACIER storage class using lifecycle management._

 _Note: There is another storage class known as RRS (Reduced Redundancy Storage) but AWS recommends choosing one of the other storage classes._

Pricing for each storage class can be found on the [S3 Pricing Page](https://aws.amazon.com/s3/pricing/).

## Setting the Storage Class on an Object
Amazon S3 APIs support setting (or updating) the storage class of objects with the following methods:

* **When creating a new object** you can add the x-amz-storage-class request header to specify a storage class. If you don't add this header, Amazon S3 uses STANDARD, the default storage class.
* **Change the storage class of an existing object** by making a copy of the object using the PUT Object - Copy API.
* **Object Lifecycle Management**

-->

## S3 Storage Class Lab
1.  Note that the objects are using three different storage classes. The first three objects have **standard** for their object class.

3. Select the checkbox to the left of the first object _**file001.bin**_ to open up the object details view

    ![Storage Classes](../images/3-objectdetails.png)

4. Click on **Storage Class** to bring up the **Change Storage Class** window.

5. Click on the radio button for **Standard-IA** and click **save** then **change**

    ![Storage Classes](../images/2-changestorageclass.png)

6. Observe the updated storage class that is now visible on the object overview page in the **storage class** column.

<!--
### Setting the Storage Class on an Object via AWS CLI CP Command

While it's possible to set the storage class via the S3 console, this would be cumbersome to accomplish on many files.

If you were using the AWS CLI, the storage class can easily be set with the `storage-class` parameter like this: (you do not need to do this in your lab)
    `aws s3 cp file004.bin s3://stg209-student-1/lab2/ --storage-class STANDARD_IA`

One of the most common ways to move objects between storage classes is via the built-in lifecycle policies, which is covered next.

## Object Lifecycle Management via a Lifecycle Policy
You can use lifecycle policies to define actions you want Amazon S3 to take during an object's lifetime. For example, you could transition objects to another storage class, archive them, or delete them after a specified period of time.

A lifecycle configuration is a set of rules defining actions that Amazon S3 applies to a group of objects. There are two types of actions:
 * **Transition actions** Define when objects transition to another storage class. For example, you might choose to transition objects to the STANDARD_IA storage class 30 days after you created them, or archive objects to the GLACIER storage class one year after creating them.
 * **Expiration actions** Define when objects should expire and be automatically deleted.

A versioning-enabled bucket can have many versions of the same object, one current version and zero or more non-current (previous) versions. Using a lifecycle policy, you can define actions specific to current and non-current object versions.

-->

## S3 Lifecycle Rule Lab

1.  Navigate to the **Management** tab and select **Add lifecycle rule**

    ![S3 Management](../images/3b-management.png)

3. **Give the rule a name** and click **next**

    ![S3 Management](../images/3b-lifecycle-1.png)

4. Click the checkmarks for both **Current version** and **Previous version**

5. Next to "**for current versions of objects**" click the "**+ Add Transition**" link to to add a transition

6. Select **Transition to Standard-IA after**. It will automatically select "30" for **Days after creation**

7. Add additional transitions as shown in the graphic (you may need to scroll your browser to see dropdowns for previous versions)

    ![S3 Management](../images/3b-lifecycle-2.png)

8. Click **Next**

9. Select **Previous Versions**

    ![S3 Management](../images/3b-lifecycle-3.png)

10. Click **Next**

11. Review Settings and click **Save**

    ![S3 Management](../images/3b-lifecycle-4.png)

12. You should now see a summary of your lifecycle policy

    ![S3 Management](../images/3b-lifecycle-5.png)

## Lab Complete
Congratulations!  You have completed Lab 2.

## Navigation
[Lab 3](../lab3/README.md) |
[Back to Overview](../README.md)


text:
# TO DO OR TO DONT
### Author:
Catherine Looper
### Motivation

In this project, I built a React frontend Todo List application. This app uses local storage for persistance.

In this application, I configured webpack to compile JavaScript and SASS into a bundle and configured babel to transpile JSX and ES6 to ES5 JavaScript. I was able to create and render React components to the DOM, add event listeners to React components, and update React component state.

### Limitations

To use this app - it is assumed that the user has familiarity with the tech and frameworks listed below.

### Code Style

Standard JavaScript with ES6, SASS, CSS, HTML, React!

### How to use?

* Step 1. Fork and Clone the Repository.
* Step 2. `npm install`
* Step 3. `npm run watch` - the application should automatically open in your browser.
* Step 4. Use the input field to enter list items. Click enter or the button to add it to your list.
### License

MIT © Catherine Looper

repository: ccloops/todont

gha_language: JavaScript

repo_name: ccloops/todont


text:
![](http://i.imgur.com/WoA2pWw.png)

![](https://img.shields.io/github/issues/joshhartigan/iu-coreutils.svg) ![](https://img.shields.io/badge/license-BSD-yellow.svg) ![](https://img.shields.io/badge/language-C-blue.svg)

*"better as in simpler"*

These intend to follow a derivative of the original UNIX philosophy, which will
eventually be documented in this repository.

**[PROGRAMS](#programs)** / A list of the utilities with brief descriptions

**Installation**

You'll need **a C compiler** with support for the C99 or C11 standard; and the
**make** program. If you're on OS X, BSD, or Linux (or most POSIX systems) you
probably already have these, so don't worry yourself.

* To compile one of the single utilities by itself: `make utility` (obviously
  replace 'utility' with `ls` or `cat` or whatever)
* To compile all of the utilities: `make`.

If you want to be able to run the commands from anywhere, they'll need to be in
your `PATH` environment variable. Thing is, you probably already have a program
called `cat` and `ls`, etc. in your `PATH`. So, in order to override those
conflicting programs, and use the `iu` coreutils, place the folder that you
compiled the programs in to the *beginning* of your `PATH`, not the end.

**Header Files**

Until it gets larger, I will not be using header files for this project.
As said above, each utility gets its own C file, in which the `main` function
comes first. Above the `main` function will be written the signatures of the
functions that follow.
  Placing the `main` function first is important because an entry point to the
program should also be an entry point to the file.

**Compilers**

I am using Clang, not GCC. Clang seems to me like it is a leaner and more
lightweight compiler - speaking of which, I may switch to TCC in the future for
this project.
  When building the `iu` coreutils, it's up to you which compiler you use; I'm
not going to take charge of your life. Just make sure you've set it as your
`CC` variable.

#### Programs

`cat` - sequentially read specified files and output the contents (to stdout by
default).

`lnum` - prepend line numbers to the input. can be used as a filter (e.g.
`cat file.txt | lnum`), can be applied directly to files (`lnum file.txt`).
Chooses `stdin` by default, when run with no arguments.

`ls` - lists files in the directories specified. `-a` option includes hidden
files.

repository: mkilgore/iu-coreutils

repo_name: mkilgore/iu-coreutils


text:
    Elastic APM agent for PHP

This is an Agent written in PHP that implements the [Intake API v2] scheme to send tracking information to [Elastic APM].

## Why?

I couldn't find an [official APM Agent] for PHP.

I have searched for unofficial options but I have not found any with backwards compatibility of PHP version (>= 5.4).
I know [PHP 5.4] is very old (01 Mar 2012) but today there is still code working even with older versions.

I wanted to make it as easy as possible to develop new microservices and also to make it possible to help legacy code refactors be easier to accomplish.

I have based myself on the official [API reference of version 7.7].

## Installation

1) Install via [composer]

    ```shell script
    composer require zoilomora/elastic-apm-agent-php
    ```

## Usage

You can implement any **Reporter** to suit your communication infrastructure (sync, async, redis, amqp, etc...).

```php
<?php

class OwnerReporter implements \ZoiloMora\ElasticAPM\Reporter\Reporter
{
    /**
     * @param array $events
     *
     * @return void
     */
    public function report(array $events)
    {
        // TODO: Implement report() method.
    }
}
```

If you are using **Kubernetes**, it is recommended that you use the [official environment variables] to map **Nodes** and **Pods**.

## Examples

- [Configuration](docs/examples/configuration.md)
- [Metadata](docs/examples/metadata.md)
- [Transaction Context](docs/examples/transaction-context.md)
- [Agent Instantiate](docs/examples/agent-instantiate.md)
- [Basic Usage](docs/examples/basic-usage.md)
- [Distributed Tracing](docs/examples/distributed-tracing.md)

## Documentation used for development

- [Building an agent](https://github.com/elastic/apm/blob/master/docs/agents/agent-development.md)

## Credits
- [Zoilo Mora][link-author]
- [Verónica Expósito](https://www.linkedin.com/in/veronicaexpositocano/) (Logo)
- [All Contributors][link-contributors]

## License
Licensed under the [MIT license](http://opensource.org/licenses/MIT)

Read [LICENSE](LICENSE) for more information

[link-author]: https://github.com/zoilomora
[link-contributors]: https://github.com/zoilomora/elastic-apm-agent-php/contributors

[Intake API v2]: https://www.elastic.co/guide/en/apm/server/7.7/intake-api.html
[Elastic APM]: https://www.elastic.co/apm
[official APM Agent]: https://www.elastic.co/guide/en/apm/agent/index.html
[PHP 5.4]: https://www.php.net/ChangeLog-5.php#5.4.0
[API reference of version 7.7]: https://github.com/elastic/apm-server/tree/2ad1c15aa2d1c364b92d2fb8e45cfe7b5a0ff317/docs/spec
[composer]: https://getcomposer.org/
[official environment variables]: https://www.elastic.co/guide/en/apm/server/master/metadata-api.html#kubernetes-data

repository: goear/elastic-apm-agent-php

repo_name: goear/elastic-apm-agent-php


text:
# Lecture 11 - Microsoft 365 PnP
This sample extends the web part from Lectures 3 and 4 and 5 to use Microsoft 365 PnP resources:
1. [PnPJS](https://pnp.github.io/pnpjs/) library to work with SharePoint REST API
2. [PnP Reusable React Controls](https://sharepoint.github.io/sp-dev-fx-controls-react/) to render web part's title

repository: AJIXuMuK/sp-customization-toolset

repo_name: AJIXuMuK/sp-customization-toolset


text:
# MissedCallTurrent
Attack the destination phone number with missed calls

Based on the surveys on the Iranian app shops there exist similar application but this application should have extra features that does not exist including:
	- choosing several contacts and missedcalling to several people
	- making task for calling at specific times in the week or in the day and repeat it
	- The dialer activity is not shown on the front all the time
And some features that does not exist in the free app:
	- delayed misscalling
	- setting interval between calls
************************************************************************
TODO Next time on development:
- Thinking about the mechanism and design of the attack execution activity
- designing caller to use the mca and informs the executionActivity about the progress

repository: mrhsce/MissedCallTurrent

repo_name: mrhsce/MissedCallTurrent


text:
# Project Name

Password Locker

## Author's Name

Mazimpaka M.Rose

## Description

Application Password Locker will help us to manage our passwords and even generate new passwords for us ,when a person have many account but he don't remember all those passwords and even create new ones.

#### An applicatin allows to the user remembering password , 13 february 2019

#### By **Mazimpaka M.Rose**

### BDD

In this application,

User should create a password locker account with his details, a login username and password.

User should store existing account credentials.

User create new account credentials.

User have the option of putting in a password that he want to use for the new credential account.

User can delete a credentials account is no longer need.

## Technologie Used

Python

## Link site: https://github.com/mazimpakar/Account--list

## Support and contact details

<EMAIL_ADDRESS>phone number :0786950337
whtapp number :0786950337

### Copyright

copyright (c) 2019[Mazimpaka M.Rose]

### Licence

This software mazimpakar/Password Locker is licensed under the MIT License

repository: mazimpakar/Account--list

repo_name: mazimpakar/Account--list


text:
# What is HAProxy?

> HAProxy is a TCP proxy and a HTTP reverse proxy. It supports SSL termination and offloading, TCP and HTTP normalization, traffic regulation, caching and protection against DDoS attacks.

[Overview of HAProxy](http://www.haproxy.org/)

# TL;DR

```console
$ docker run --name haproxy bitnami/haproxy:latest
```

# Why use Bitnami Images?

* Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems.
* With Bitnami images the latest bug fixes and features are available as soon as possible.
* Bitnami containers, virtual machines and cloud images use the same components and configuration approach - making it easy to switch between formats based on your project needs.
* All our images are based on [minideb](https://github.com/bitnami/minideb) a minimalist Debian based container image which gives you a small base container image and the familiarity of a leading Linux distribution.
* All Bitnami images available in Docker Hub are signed with [Docker Content Trust (DCT)](https://docs.docker.com/engine/security/trust/content_trust/). You can use `DOCKER_CONTENT_TRUST=1` to verify the integrity of the images.
* Bitnami container images are released daily with the latest distribution packages available.

> This [CVE scan report](https://quay.io/repository/bitnami/haproxy?tab=tags) contains a security report with all open CVEs. To get the list of actionable security issues, find the "latest" tag, click the vulnerability report link under the corresponding "Security scan" field and then select the "Only show fixable" filter on the next page.

# Supported tags and respective `Dockerfile` links

Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/).

* [`2`, `2-debian-10`, `2.4.7`, `2.4.7-debian-10-r23`, `latest` (2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-haproxy/blob/2.4.7-debian-10-r23/2/debian-10/Dockerfile)

Subscribe to project updates by watching the [bitnami/haproxy GitHub repo](https://github.com/bitnami/bitnami-docker-haproxy).

# Get this image

The recommended way to get the Bitnami haproxy Docker Image is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/haproxy).

```console
$ docker pull bitnami/haproxy:latest
```

To use a specific version, you can pull a versioned tag. You can view the [list of available versions](https://hub.docker.com/r/bitnami/haproxy/tags/) in the Docker Hub Registry.

```console
$ docker pull bitnami/haproxy:[TAG]
```

If you wish, you can also build the image yourself.

```console
$ docker build -t bitnami/haproxy:latest 'https://github.com/bitnami/bitnami-docker-haproxy.git#master:2/debian-10'
```

# Why use a non-root container?

Non-root container images add an extra layer of security and are generally recommended for production environments. However, because they run as a non-root user, privileged tasks are typically off-limits. Learn more about non-root containers [in our docs](https://docs.bitnami.com/tutorials/work-with-non-root-containers/).

# Configuration

## Running commands

To run commands inside this container you can use `docker run`, for example to execute `haproxy --version` you can follow the example below:

```console
$ docker run --rm --name haproxy bitnami/haproxy:latest -- --version
```

In order for the container to work, you need to mount your custom `haproxy.cfg` file in `/bitnami/haproxy/conf/`. The following example runs HAProxy with a custom configuration file:

```console
$ docker run --rm --name haproxy -v /path/to/haproxy.cfg:/bitnami/haproxy/conf/haproxy.cfg bitnami/haproxy:latest
```

Using docker-compose:

```yaml
version: '2'
services:

  haproxy:
    image: haproxy
    volumes:
      - /path/to/haproxy.cfg:/bitnami/haproxy/conf/haproxy.cfg
```

Check the [official HAProxy documentation](http://cbonte.github.io/haproxy-dconv/2.5/configuration.html) to understand the possible configurations.

# Contributing

We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/bitnami-docker-haproxy/issues), or submit a [pull request](https://github.com/bitnami/bitnami-docker-haproxy/pulls) with your contribution.

# Issues

If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/bitnami-docker-haproxy/issues/new). For us to provide better support, be sure to include the following information in your issue:

- Host OS and version
- Docker version (`docker version`)
- Output of `docker info`
- Version of this container
- The command you used to run the container, and any relevant output you saw (masking any sensitive information)

# License

Copyright 2021 Bitnami

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

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

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

repository: scloud-swebz/bitnami-docker-haproxy

repo_name: scloud-swebz/bitnami-docker-haproxy


text:
# favicon-generator

Generates favicons covering all major browsers and devices in 2020. Uses
https://www.emergeinteractive.com/insights/detail/the-essentials-of-favicons/ as
inspiration.

Generates a set of PNG images, a JSON file `manifest.json` with proper `icon`
values, and an HTML file `favicon.html` with proper `<link>` and `<meta>` tags.
Add the contents of `favicon.html` file to the `<head>` tag of your site and the
`icon` property in `manifest.json` to `/manifest.json` of your site.

# Requirements

Install `imagemagick` (e.g., via Homebrew on macOS) and `imagemin` CLI along
with `pngquant` plugin (e.g., with Node.js)

Uses Imagemagick to create different favicon sizes using a root file (which
should be at least 512x512). After that compresses them with `pngquant`

# Usage

`generate-favicon.sh -i ORIGIN_FILENAME [-o OUTPUT_DIRECTORY]`

By default, `OUTPUT_DIRECTORY` is the directory in which `generate-favicon.sh`
is.

For example: `generate-favicon.sh -i My_Favicon.png -o favicons`

repository: tkalmi/favicon-generator

repo_name: tkalmi/favicon-generator


text:
#### Integrations
##### Microsoft Cloud App Security
- Added support for the *lookback* parameter in the ***fetch-incidents*** command to ensure fetching all incidents.
- Updated the Docker image to: *demisto/python3:<IP_ADDRESS>797*.

repository: demisto/content

gha_language: Python

repo_name: demisto/content


text:
Setup
========
* Setup Tasty
* Module skeleton
* Setup travis ci

PARSING
=========

Scheduler
------------

Commands:

* Subscribe
* Accept
* Decline
* Teardown
* Kill
* Shutdown
* Acknowledge
* AcknowledgeOperationStatus
* Message
* Request
* Suppress
* Revive

Events:
* Subscribed
* Offers
* Heartbeat
* Rescind
* Update
* Message
* Failure
* Error

Basic Scheduler

* Handler
* Subscrition and event  channel
* SendCommand

repository: oier/mesos-protos

repo_name: oier/mesos-protos


text:
# Virtual 3D Scanner

This script is designed to simulate real world 3D scanners (Kinect, PrimeSense, etc.) in virtual environments. With this tool, you can easily create RGB-D or point cloud datasets from synthetic models, such datasets could be useful in the field related to computer graphics and computer vision.

![fig](./example_obj/figure.png)

Given a 3D mesh, a set of customizable virtual cameras scan the model from different views, the RGB-D images and corresponding point clouds are then produced. The dimension of the output point cloud is N×7, which contains xyz coordinate, rgb color, and an instance index (if available).

The script is running on [Blender](https://www.blender.org) (tested on version 2.80, 2.90), the render core is from [bpycv](https://github.com/DIYer22/bpycv).

## Installation

- Python environment of Blender

    Windows:
    ```
    cd <path to blender>/2.90/python/bin
    python -m ensurepip
    python -m pip install -U pip setuptools wheel
    ```

    Linux:
    ```
    cd <path to blender>/2.90/python/bin
    ./python3.7m -m ensurepip
    ./python3.7m -m pip install -U pip setuptools wheel
    ```

- bpycv and other dependencies

    Windows:

    ```
    # Download openexr for windows from https://www.lfd.uci.edu/~gohlke/pythonlibs/#openexr
    python -m pip install OpenEXR-1.3.2-cp37-cp37m-win_amd64.whl
    python -m pip install opencv-python bpycv
    ```

    Linux:
    ```
    ./python3.7m -m pip install opencv-python openexr bpycv
    ```

- h5py (optional), save point cloud compactly

    Windows:

    ```
    python -m pip install h5py
    ```

    Linux:
    ```
    ./python3.7m -m pip install h5py
    ```

## Usage

### Single model scanning
Two different setups are provided: `scan_single_around.py` and `scan_single_random.py`. The former creates fixed cameras from six directions around the object, pursuing a complete coverage of the object; the latter creates random cameras in each frame, which simulate the real scanning situation.

Run the following command:
```
blender -b -P scan_single_xxx.py <model_dir> <output_dir> <model_id> <save_rgbd_image> <save_pc_per_view> <save_pc_complete> <pc_per_view_size> <pc_complete_size>
```

Example:
`blender -b -P scan_single_around.py ./example_obj/model.obj ./output plane 1 1 1 2048 16384`

### Batch models scanning
Run the following command:
```
python scan_batch_shapenet.py <num_process> <dataset_dir> <output_dir> <save_rgbd_image> <save_pc_per_view> <save_pc_complete> <pc_per_view_size> <pc_complete_size>
```

Example:
`python scan_batch_shapenet.py 8 F:/datasets/ShapeNetCore.v2 ./output 1 1 1 2048 16384`

Note: This script is tested on ShapeNetCore.v2 dataset. For other datasets, please modify the directory structure in `scan_batch_shapenet.py` accordingly.

### Arguments
- Single scan
  - model_dir: the full path to the target model
  - model_id: the unique name of the target model

- Batch scan
  - num_process: number of processors to be used, adjust according to your computer hardware
  - dataset_dir: the full path to the dataset root folder

- Common
  - output_dir: the output directory
  - save_rgbd_image: whether to save RGB-D and instance image (0 for false, 1 for true, same for below)
  - save_pc_per_view: whether to save the partial point cloud of each single view
  - save_pc_complete: whether to save the complete point cloud by combining all views
  - pc_per_view_size: the points number of the single view point cloud
  - pc_complete_size: the points number of the complete point cloud

## Customize
- Camera intrinsic:

    Modify `INTRINSIC` matrix in `scan_single_around.py` or `scan_single_random.py`

- Camera numbers:

    Modify `cam_locations` list in `scan_single_around.py` or `NUM_FRAMES` value in `scan_single_random.py`

- Lights:

    Modify `setup_blender()` function in `scan_single_around.py` or `scan_single_random.py`


text:
Einmal

    /ˈainmaːl/

    German: once

The minimalistic, secure and open-source two-factor authentication app.

## Features

- ♻ Cross-platform — available on Android & iOS (coming soon)
- 🔒 Encryption by default — your vault is never stored in plaintext
- 👱♂ Biometric unlock — decrypt your vault using biometrics
- 🚀 Import & export vault — back up your vault securely anywhere you like
- 🙈 Discreet mode — conceal your tokens in public
- 📸 Screenshot protection — immune to screen-capturing malware
- 🏴 AMOLED dark theme — because why would you have it any other way?

## Supported Algorithms

- ⏱ 6-digit time-based one-time password (TOTP) authentication [(RFC 6238)](https://tools.ietf.org/html/rfc6238)

## Security

- Encryption & message authentication: [NaCl's XSalsa20-Poly1305 (JavaScript port)](https://github.com/dchest/tweetnacl-js)
- Key derivation: [scrypt (Go implementation)](https://godoc.org/golang.org/x/crypto/scrypt)
- Entropy: [Java's SecureRandom](https://developer.android.com/reference/java/security/SecureRandom) | [Objective-C's SecRandomCopyBytes](https://developer.apple.com/documentation/security/1399291-secrandomcopybytes)

## Tech

- [React Native](https://reactnative.dev/) (mostly using [Expo](https://expo.io/))
  - To support both Android & iOS
- [Go Mobile](https://github.com/golang/go/wiki/Mobile)
  - To offload the blocking key derivation workload to the UI thread
  - To write once in Go and generate bindings for both Android & iOS
  - To utilize Go's outstanding crypto package

## Roadmap

- [x] Facilitate biometric unlock
- [ ] Facilitate manual key entry
- [ ] Facilitate web/CLI vault decryption (escape hatch)
- [ ] Offload encryption to Go
- [ ] Design light theme
- [ ] Produce iOS build
- [ ] Write tests

## Screenshots

## Feedback

Your feedback is most welcome! Please get in touch by email<EMAIL_ADDRESS>
## License

Creative Commons Zero v1.0 Universal

repository: ajunlonglive/einmal

repo_name: ajunlonglive/einmal


text:
## Onesignal-node

OneSignal is a high volume and reliable push notification service for websites and mobile applications. We support all major native and mobile platforms by providing dedicated SDKs for each platform, a RESTful server API, and an online dashboard for marketers to design and send push notifications.

### Technologies used:
* Node

### Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them

## Table of Contents
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Usage](#usage)
  * [For Web Push Notification](#for-web-push-notification)
  * [For Android Device Push Notification](#for-android-device-push-notification)

## Prerequisites

First, we need to create new project in OneSignal.

###### Step 1:

> Create accout and Login into onesignal (https://onesignal.com/) & create new project

![alt text](assert/create-project.png)

> Click “add your project” & get keys

![alt text](assert/get_key-value.png)

## Installation

### Create  a js file
```bush
    npm install onesignal-node --save
```
``` js
var OneSignal = require('onesignal-node');
```
Or

```bush
    <script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async></script>
```

## For Web Push Notification

- Download getSubcribe.html and sendPushNotification.js file

- Replace your appID in getSubcribe.html file (you will find appID from onesignal account)

- Open getSubcribe.html file and click on subscribe button

- After clicking on subscribe button your token will be stored in your onesignal account ( you can check in user tab )

- Open sendPushNotification.js file and change the following details :

``` js
        var headers = {
            "Content-Type": "application/json; charset=utf-8",
            "Authorization": "Basic (YOUR REST API KEY)" // Replace with yours Auth
          };

        var message = {
          app_id: "YOUR APP ID", // Replace with your app_id
          contents: {"en": "English Message"},            // change text ( Optional)
          included_segments: ["Active Users"]
        };
```
- Now, run sendPushNotification.js using this command
```
 $ node sendPushNotification.js
```

> You will get notification in web view.

![alt text](assert/notification-img.png)

## For Android Device Push Notification

- To get push notification in android device you need to install this oneSignalTesk.apk

- Open this app and click on subscribe button

- Now run sendPushNotification.js using command 'node sendPushNotification.js'

- Congratulation, you will get notification in your android app.

- For more detail you can visit http://androidbash.com/android-push-notification-service-using-onesignal/

    ( you can modify the apk : https://github.com/android-bash/OneSignal.git by changing project id and google server key.
      you have to create project in Firebase to get projectid and google server key )

> You will get notification in mobile.

![alt text](assert/notification-mobile12.jpeg)

## LICENSE!

Onesignal-node is [MIT-licensed](https://github.com/mindinventory/one-signal-push-notification-with-nodejs/blob/master/LICENSE)

## Let us know!
We’d be really happy if you sent us links to your projects where you use our component. Just send an email to<EMAIL_ADDRESS>And do let us know if you have any questions or suggestion regarding our work.


text:
eop
=========
A role to install Contrast Security TeamServer on different Operating Systems with built in SSL examples and setup.

Requirements
------------

None

Role Variables
--------------

Use the following variables to configure the paths to you artifacts and whether or not you want automated installation.

```
contrast_license: ~/Downloads/contrast.lic
contrast_installer_local: "~/Downloads/Contrast-<IP_ADDRESS>7.sh"
contrast_installer_s3: False
eop_version: 3.4.0
run_install: True
apache_reverse: False
nginx_reverse: False
do_ssl: False
ssl_dir: /opt/ssl
webgoat: False
```

Dependencies
------------

None

Example Playbook
----------------

This role is embedded directly into a playbook project within this repot.
More info can be found in `site.yml` and the repo `README`.

    - hosts: servers
      roles:
         - { role: eop, webgoat: True }

License
-------

MIT

Author Information
------------------
David Hafley

repository: Contrast-Security-OSS/eop-examples

gha_language: Shell

repo_name: Contrast-Security-OSS/eop-examples