text:
# E205: Function is never called

This error occurs when you declare a private (default behavior) function, but
never call it:

```
fn foo() {  }

echo(1);
```

If you declare the function as public with the `pub` modifier, the function will
be exported and available to modules importing this module, so the compiler
assumes it will be used and doesn't raise en **E205**.

Note that this is typically raised as a warning to help you find dead code, and
not a fatal error.

repository: logan-montellimard-braga/hogwash

repo_name: logan-montellimard-braga/hogwash


text:
---
title: Create and Manage Push Messages
layout: page
categories: ["How To"]
---
# Create and Manage Push Messages

This *How To* will explore the steps to Create and Manage Push Messages in the Stellar platform.

The steps involved in Creating and Managing Push Messages are:

1. [Create a New Push Message](#new)
2. [Publishing a Push Message](#publish)
3. [Finding a Push Message](#find)
4. [Organising a Push Message](#organise)
5. [Use-Cases for Push Message](#use)

## How to Create a New Push Message
### Step 1 - Create New Push Message
* Click on the **Communications** tab located at the top panel of the page. This will navigate you to the Communications page
* Click on the **Messages** tab on the left panel to navigate to the Messages page
* To create a new push message, enter a display name for the desired message and select 'Push Notification' before clicking on the *Create* button

### Step 2 - Provide Basic Metadata
* Key in the relevant fields under the pop-up dialogue box of 'Edit Message'
* *Display Name* will be the effective name of the message. *Description* would ideally describe what the message is used for and its properties. *Message Type* determines the nature of the message being offered to members. *Text* will determine the desired message to be pushed out to members. *Target Type* describes the engagement type that comes along with the Push Message. The Message would contain either a challenge, offer, or a reward that would be pushed to members.
* The Tags, Categories, and Tracking Code fields are useful for more advanced features
* Click on *Save* to finalise the message creation and click on *Delete* to remove the push message

### Step 3 - Manage Targeting of Push Message
* Once the message has been created, click on the individual push message post to navigate to its settings
* Manage the intended audience under the *Recepients* tab
* You can choose to send the message only to selected members, selected segments, or to all members
* Key in a member name or choose a segment and click on the call to action button on the right of the text field to confirm your selection

### Step 4 - Manage Eligibility
Manage who is eligible for a Push Message by including and excluding locations under the **Locations** tab

## Publishing a Push Message
* When a push message is created, its status is set to *draft* mode by default
* To publish a push message, first click on the desired message posting to navigate to the message settings page
* Confirm the members/segments that are targeted by looking at the bottom panel
* Click on the send button on the top right hand panel of the screen

## Finding a Push Message
* Search for a Push Message based on a tag or date created by keying in the relevant fields respectively
* Labels, Names, Assignees' Names, Assignees' Public Names, or Tag Names could be searched via the relevant field
* Further categorisation of the search results could be done by changing the *Status*, and *Date* fields

**Hint: Tags will simplify searching and make things more easily sorted.*

## Organising a Push Message
* A push message can be organised by first accessing the message's settings page
* Click on the message post and subsequently on the edit button to edit the message settings
* Organise the message by filling in the *Internal Name*, *Message Type*, *Tag List*, *Image* and *Tracking Code* fields respectively. This will allow you to easily search and monitor a push message in the future

## Use-cases for Push Messages
Push Messages could be used as a form of communication with members. Use this feature to create messages, target members or segments and send them any curated content as desired.

license: MIT

repository: christinegp/docs

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: christinegp/docs


text:
---
layout: post
title: August 16th - Extreme Love...hopes and believes the best.
categories: [Verse of the Day]
alias: [/VerseOfTheDay/2010/08/16/]
---

_Romans 8:36-37
As it is written, For thy sake we are killed all the day long; we
are accounted as sheep for the slaughter. Nay, in all these things we
are more than conquerors through him that loved us._

You may be at a point in your life where it doesn't look like you
are making any personal progress. You might have had your faith tried
lately, or you just might be discouraged with all the present evil in
this world. Re-read our verse. Because of Jesus' loving sacrifice,
you can be more than a conqueror. In other words, you are enabled,
through HOPE, to see yourself on the other side having already
overcome the battles of this life. God's EXTREME LOVE has brought you
HOPE today!

 --

Jesus Every Day is a ministry of Rodgers Baptist Church in Garland, Texas.

extension: markdown

gha_language: JavaScript


text:
![Woah console woah!!!](https://cdn.discordapp.com/attachments/377316629220032523/529091513104465920/unknown.png)

# Console
A command line parser for use in Unity.

## Requirements
- .NET Framework 4.5

## Features
- Text suggestions
- Auto finds commands
- Command categories for organization
- Parameter support
- Support for instance method commands
- Support for methods, fields and properties
- Code generation to minimize reflection at startup

## Installing
To install for use in Unity, copy everything from this repository to `<YourNewUnityProject>/Packages/Popcron.Console` folder.

If using 2018.3.x, you can add a new entry to the manifest.json file in your Packages folder:
```json
"com.popcron.console": "https://github.com/popcron/console.git"
```
After that, call `Console.Open = false;` in any Start method.

NB: If you are referencing Console with Package manager you will have to create assembly definition for your code and reference it in settings (see FAQ). Otherwise Console will see only its assembly.

## Calling commands
```cs
string command = "help";
object result = await Parser.Run(command);
```

or just `help` from the console window.

## Instance commands
Command methods that are declared as static can be executed from any context. Instance methods however cannot be called in the same way. These commands require an object that owns the method. The parser class provides methods that allow you to register and unregister objects with a unique ID, which can allow instance commands to be called on an object.

```cs
using UnityEngine;
using Popcron.Console;

public class PlayerAmmo : MonoBehaviour
{
    [Command("ammo")]
    public int ammo = 100;

    //when the object gets created, register it
    private void OnEnable()
    {
        Parser.Register(this, "player");
    }

    //when the object gets destroyed, unregister it
    private void OnDisable()
    {
        Parser.Unregister(this);
    }
}
```

To call this command from the console, you call the method exactly as its writen, with the addition of the `@id` prefix.
`@player ammo 100`

## Examples
To create a simple command, add a `Command` attribute to your method.

```cs
using Popcron.Console;

public class Commands
{
    [Command("add")]
    public static int Add(int a, int b)
    {
        return a + b;
    }
}
```
`add 2 3` will return `5`

    Setting up categories

Categories arent necessary, but they allow you to categorize commands into a list which can be retrieved using `Parser.Categories`. To add categories, add a `Category` attribute to the class itself. This is primarely useful when listing all of the commands using `help`.
```cs
using Popcron.Console;

[Category("Default commands")]
public class Commands
{
    [Command("add")]
    public static int Add(int a, int b)
    {
        return a + b;
    }
}
```

    Command aliases

Commands can have multiple aliases. To give a command another calling name, add the `Alias` attribute
```cs
using Popcron.Console;

[Category("Default commands")]
public class Commands
{
    [Alias("+")]
    [Command("add")]
    public static int Add(int a, int b)
    {
        return a + b;
    }
}
```
`+ 2 3` will return `5`

`add 7 -2` will return `5`

## Supported types
- string
- char
- bool
- byte and sbyte
- short and ushort
- int and uint
- long and ulong
- float
- double
- object
- Type
- DateTime

You can also add your own type converters by inheriting from the abstract `Converter` class.

## Built in commands
- `info` Prints the system information (OS, Device, CPU and GPU, RAM)
- `clear` Clears the console
- `owners` Prints all registered owners, along with their instance methods, properties and fields
- `converters` Lists all registered converters
- `help` Prints all commands found as static methods, properties and fields
- `echo` Dumb echo command
- `scene` Prints out the entire scene hierarchy

## FAQ
- **How do I add this to my unity project?**
Add `"com.popcron.console": "https://github.com/popcron/console.git"` to your `manifest.json` file in the packages folder.
- **It doesn't show up.**
Press ~.
- **I pressed it, it still doesn't show up!**
Invoke the `Console.Initialize()` method, or any of the static methods/properties once in the game.
- **How do I change the key to open the console?**
Change the `Console.Key` property.
- **I'm not using the built-in input system, does it work with the new one?**
Yes, if the new InputSystem is available, it will use that instead of the old one.
- **I want to use the original system console that's included.**
If you want to reference the "original console", you can do so by referencing the namespace: `System.Console.WriteLine("wee")`.
- **Can I use properties as commands?**
Yes.
- **Can I use fields as commands?**
Yes.
- **Static only?**
No you can use instance members too, as long as you register and unregister the instance owner of the command. More info above.
- **How do I categorize a command?**
Add a `Category` attribute to the class type.
- **How do I make my own converter?**
Create a new class, and inherit from the `Converter` class.
- **It's not detecting commands in my custom assembly!**
Go to ProjectSettings/Console and add your custom assembly to the list of assemblies.

repository: popcron/console

branch_name: refs/heads/main

gha_language: C#

gha_license_id: MIT

repo_name: popcron/console


text:
---
path: "/docs/catalog/requirements-and-installation"
updated: "2019-07-03"
title: "Requierments and Installation"
description: "Requierments and Installation"
author: "Varsha"
category: "subscriptions and memberships"
---

### Requirements

1. PHP 5.4+
2. J2Store 3.2.20 or above
3. Joomla 3.4.x or above

### Installation

1. Download Subscription and Memberships package from our site and install it using Joomla installer.
2. After installing the app, go to J2Store > Apps and enable Subscription Products app.
3. Once enabled, open the app and configure the basic settings of the app.


text:
# Direct uplink
## Supported version
5.0.0-beta +

## What is direct uplink?
In default, SkyWalking agent uses naming service to find all collector addresses. Then connect to gRPC services.

In **direct updalink**, mean no naming service available or don't work well, set the gRPC addresses in agent directly.
The agent uses theses addresses to connect gRPC services.

## Why need this?
Agent uplink data through the following network
1. VPCs in Cloud
1. Internet
1. Different subnet.
1. IPs and Ports proxy

## Set the agent config
1. Remove `collector.servers` config item.
2. You can find the following settings in `agent.config`
```
# Collector agent_gRPC/grpc service addresses.
# Secondary address setting, only effect when "collector.servers" is empty.
# By using this, no discovery mechanism provided. The agent only uses these addresses to uplink data.
# Recommend to use this only when collector cluster IPs are unreachable from agent side. Such as:
#   1. Agent and collector cluster are in different VPC in Cloud.
#   2. Agent uplinks data to collector cluster through Internet.
# collector.direct_servers=www.skywalking.service.io
```

3. Set `collector.direct_servers` to a domain name, IP:PORTs, with split by comma(,).

repository: szsuyuji/incubator-skywalking

gha_language: Java

repo_name: szsuyuji/incubator-skywalking


text:
[![StackStorm](https://github.com/stackstorm/st2/raw/master/stackstorm_logo.png)](https://www.stackstorm.com)

**StackStorm** is a platform for integration and automation across services and tools, taking actions in response to events. Learn more at [www.stackstorm.com](http://www.stackstorm.com/product).

[![Build Status](https://github.com/StackStorm/st2/actions/workflows/ci.yaml/badge.svg)](https://github.com/StackStorm/st2/actions/workflows/ci.yaml)
[![Packages Build Status](https://circleci.com/gh/StackStorm/st2/tree/master.svg?style=shield)](https://circleci.com/gh/StackStorm/st2)
[![Codecov](https://codecov.io/github/StackStorm/st2/badge.svg?branch=master&service=github)](https://codecov.io/github/StackStorm/st2?branch=master)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1833/badge)](https://bestpractices.coreinfrastructure.org/projects/1833)
![Python 3.6,3.8](https://img.shields.io/badge/python-3.6,%203.8-blue)
[![Apache Licensed](https://img.shields.io/github/license/StackStorm/st2)](LICENSE)
[![Join our community Slack](https://img.shields.io/badge/slack-stackstorm-success.svg?logo=slack)](https://stackstorm.com/community-signup)
[![deb/rpm packages](https://img.shields.io/badge/deb/rpm-Packagecloud-%236366f1)](https://packagecloud.io/StackStorm/)
[![Code Search](https://img.shields.io/badge/code%20search-Sourcegraph-%2300B4F2?logo=sourcegraph)](https://sourcegraph.com/stackstorm)
[![GitHub Discussions](https://img.shields.io/github/discussions/stackstorm/st2)](https://github.com/StackStorm/st2/discussions)
[![Twitter Follow](https://img.shields.io/twitter/follow/StackStorm?style=social)](https://twitter.com/StackStorm/)

---

## TL;DR

* Install Get yourself a clean 64-bit Linux box that fits the [system requirements](https://docs.stackstorm.com/install/system_requirements.html). Run the installer script:

   ```bash
   curl -sSL https://stackstorm.com/packages/install.sh | bash -s -- --user=st2admin --password=Ch@ngeMe
   ```
* Read the docs: [https://docs.stackstorm.com/index.html](https://docs.stackstorm.com/install/index.html)
* Questions? Check out [forum.stackstorm.com](https://forum.stackstorm.com/)
* Or join our [Slack community](https://stackstorm.com/community-signup)

## StackStorm Overview

[![StackStorm 5 min Intro Video](https://cloud.githubusercontent.com/assets/1294734/10356016/16278d0a-6d27-11e5-987d-c8a7629a69ed.png)](https://www.youtube.com/watch?v=pzZws3ftDtA)

### About

StackStorm is a platform for integration and automation across services and tools. It ties together your existing infrastructure and application environment so you can more easily automate that environment -- with a particular focus on taking actions in response to events.

StackStorm helps automate common operational patterns. Some examples are:

* **Facilitated Troubleshooting** - triggering on system failures captured by Nagios, Sensu, New Relic and other monitoring, running a series of diagnostic checks on physical nodes, OpenStack or Amazon instances, and application components, and posting results to a shared communication context, like Slack or JIRA.
* **Automated remediation** - identifying and verifying hardware failure on OpenStack compute node, properly evacuating instances and emailing VM about potential downtime, but if anything goes wrong - freezing the workflow and calling PagerDuty to wake up a human.
* **Continuous deployment** - build and test with Jenkins, provision a new AWS cluster, turn on some traffic with the load balancer, and roll-forth or roll-back based on NewRelic app performance data.

StackStorm helps you compose these and other operational patterns as rules and workflows or actions; and these rules and workflows - the content within the StackStorm platform - are stored *as code* which means they support the same approach to collaboration that you use today for code development and can be shared with the broader open source community via [StackStorm Exchange](https://exchange.stackstorm.org).

### Who is using StackStorm?

See the list of known StackStorm [ADOPTERS.md](/ADOPTERS.md) and [Thought Leaders](https://stackstorm.com/stackstorm-thought-leaders/).

### How it works

#### StackStorm architecture

![StackStorm architecture diagram](https://user-images.githubusercontent.com/597113/92291633-6b5aae00-eece-11ea-912e-3bf977aa3cea.png)

StackStorm plugs into the environment via an extensible set of adapters: sensors and actions.

* **Sensors** are Python plugins for inbound integration that watch for events from external systems and fire a StackStorm trigger when an event happens.

* **Triggers** are StackStorm representations of external events. There are generic triggers (e.g., timers, webhooks) and integration triggers (e.g., Sensu alert, JIRA issue updated). A new trigger type can be defined by writing a sensor plugin.

* **Actions** are StackStorm outbound integrations. There are generic actions (SSH, HTTP request), integrations (OpenStack, Docker, Puppet), or custom actions. Actions are either Python plugins, or any scripts, consumed into StackStorm by adding a few lines of metadata. Actions can be invoked directly by user via CLI, API, or the web UI, or used and called as part of automations - rules and workflows.

* **Rules** map triggers to actions (or to workflows), applying matching criterias and map trigger payload data to action inputs.

* **Workflows** stitch actions together into "uber-actions", defining the order, transition conditions, and passing context data from one action to the next. Most automations are multi-step (eg: more than one action). Workflows, just like "atomic" actions, are available in the action library, and can be invoked manually or triggered by rules.

* **Packs** are the units of content deployment. They simplify the management and sharing of StackStorm pluggable content by grouping integrations (triggers and actions) and automations (rules and workflows). A growing number of packs is available on the StackStorm Exchange. Users can create their own packs,  share them on GitHub, or submit them to the StackStorm Exchange organization.

* **Audit trail** is the historical list of action executions, manual or automated, and is recorded and stored with full details of triggering context and execution results. It is also captured in audit logs for integrating with external logging and analytical tools: LogStash, Splunk, statsd, or syslog.

StackStorm is a service with modular architecture. It is comprised of loosely coupled microservice components that communicate over a message bus, and scales horizontally to deliver automation at scale. StackStorm has a full REST API, CLI client, and web UI for admins and users to operate it locally or remotely, as well as Python client bindings for developer convenience.

StackStorm is an established project and remains actively developed by a broad community.

## Documentation

Additional documentation, including installation procedures, action/rule/workflow authoring, and how to setup and use triggers/sensors can be found at [https://docs.stackstorm.com](https://docs.stackstorm.com).

## Hacking / Contributing

To set up a development environment and run StackStorm from sources, follow [these instructions](https://docs.stackstorm.com/development/sources.html).

For information on how to contribute, our style guide, coding conventions and more,
please visit the [Development section](https://docs.stackstorm.com/development/index.html)
in our documentation.

## Security

If you believe you found a security issue or a vulnerability, please send a description of it to
our private mailing list at info [at] stackstorm [dot] com.

Once you've submitted an issue, you should receive an acknowledgment from one our of team members
in 48 hours or less. If further action is necessary, you may receive additional follow-up emails.

For more information, please refer to https://docs.stackstorm.com/latest/security.html

## Copyright, License, and Contributor Agreement

Copyright 2020 The StackStorm Authors.
Copyright 2019 Extreme Networks, Inc.
Copyright 2014-2018 StackStorm, Inc.

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

[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)

By contributing you agree that these contributions are your own (or approved by your employer) and you grant a full, complete, irrevocable copyright license to all users and developers of the project, present and future, pursuant to the license of the project.

gha_language: Python


text:
---
hide_title: true
title: Browser support
---

# Browser support

Remirror aims to be compatible with all browsers released since **2017**.

If you are using remirror with a project like [`next.js`](https://nextjs.org/) or [`gatsby`](https://www.gatsbyjs.org/) you will also need to add the following browserlist configuration.

To use this configuration in your own project you can add the following to your `package.json` file. Tools like `babel` and `postcss` are aware of this configuration.

```json
{
  "browserslist": ["since 2017"]
}
```

You can also use a `.browserlistrc` file.

```markup
since 2017
```

The main reason for this configuration is to support class syntax properly. Projects like `next.js` automatically compile your code down to `es5` which causes problems when extending classes. If you don't plan on creating your own extensions or framework, you can ignore this requirement.

repository: remirror/remirror

gha_language: TypeScript

repo_name: remirror/remirror


text:
# Overview

This repo contains code for the "TensorFlow for poets 2" series of codelabs.

# Usage

1. Clone the repository using:
```
git clone https://github.com/therohitramesh/flower-recog.git
```
2. Run the script specifying an image.
```
python -m scripts.label_image [--image IMAGE] \ [--graph GRAPH]
```

## For example to run the script for a daisy flower:

![daisy](https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/img/3021186b83bc90c2.png)

Run this is in the terminal: `python -m scripts.label_image     --graph=tf_files/retrained_graph.pb
     --image=tf_files/flower_photos/roses/2414954629_3708a1a04d.jpg`

# How can you use it to train other categories?

In theory, all you need to do is run the tool, specifying a particular set of sub-folders. Each sub-folder is named after one of your categories and contains only images from that category.

If you complete this step and pass the root folder of the subdirectories as the argument for the --image_dir parameter, the script should train the images that you've provided, just like it did for the flowers.

The classification script uses the folder names as label names, and the images inside each folder should be pictures that correspond to that label.

# Note
The `scripts` directory contains helpers for the codelab. Some of these come from the main TensorFlow repository, and are included here so you can use them without also downloading the main TensorFlow repo (they are not part of the TensorFlow `pip` installation).

repository: therohitramesh/flower-recog

repo_name: therohitramesh/flower-recog


text:
python-for-datascience
======================

Tutorial on Data Science with python tools

This tutorial goes through some of the methods,packages available for data wrangling, visualization, analysis and prediction.

# Contents
* **Background**
* **Why use python?**
* **About this tutorial**
* **Aquiring data**
* **Observing aquired data**
  * Some conclutions
  * Joining data
* **Data Pre-Processing**
  * Dealing with redudancies
  * Dealing with missing values
* **Data Visualization**
* **Machine Learning Algorithms**
  * Unsupervised
  * Supervised
* **Links to learn more**

The IPython Notebook can be [viewed here](yet to add the link).

Go to [instructions](Link that connects to instructions to install required packages) to install necessary packages.

repository: AkiraKaneshiro/Python-for-data-science

repo_name: AkiraKaneshiro/Python-for-data-science


text:
---
date: 2022-10-22T19:16:53.638Z
author: Jonathan Beliën, Joost Schouppe
title: OpenStreetMap Belgium annual report 2021
excerpt: OpenStreetMap Belgium just released their annual report for 2021
tags:
  - openstreetmap
---
**OpenStreetMap Belgium just released their annual report for 2021.**

* A few successful projects: EqualStreetNames, Road Completion, MapComplete, ...
* A few (online) meetups
* New corporate members
* New partnerships

You can find all the details and more information on OpenStreetMap Belgium website: <https://openstreetmap.be/en/2022/10/22/annual-report-2021.html>

repository: openknowledgebe/website

repo_name: openknowledgebe/website


text:
## PHP Laravel Mongo Basic API

This repo is an attempt to create a basic REST for MongoDB using laravel PHP

## Getting Started
*This is a bare-minimum getting started. You can/should do things like installing MongoDB as a service etc.*

* Install MongoDB [Windows Install](https://www.mongodb.com/download-center#community) The Windows 2008R version works for Windows 10.
* Install MongoDB PHP Drivers - Download [Windows DLL](https://pecl.php.net/package/mongodb) and copy to PHP ext folder and include file under extensions section of php.ini. See php documentation.
* Install laravel
```Shell
composer create-project laravel/laravel lamongo "5.1.*" -vvv
```
* Install laravel mongodb provider
```Shell
composer require jenssegers/mongodb -vvv
```
And add the service provider in config/app.php:
```PHP
Jenssegers\Mongodb\MongodbServiceProvider::class,
```
* Start MongoDB server. In console cd to MongoDB install folder and run "mongod.exe". You can also add the install folder to PATH, this will allow you to start mongod from any location. Folder also has the Mongo client "mongo.exe" which you can use to test/troubleshoot db.
* Start Laravel server. php artisan serve
* See route file for REST end points and methods. eg POST jsong to <server>:<port>/<collection-name>/ to create new object in collection (new collection will be created if collection does not exist).
That should be it. You *may* need to create that database in MongoDB server

repository: mhuxain/lamongo

repo_name: mhuxain/lamongo


text:
# WoCClassifier

This ruby gem provides the scripts we use to classify and extract build
activity data from the World of Code dataset.

## Installation

Add this line to your application's Gemfile:

    gem 'WoC_classifier'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install WoC_classifier

## Usage

Add this line to your Ruby application:

    require 'WoC_classifier'

and you will have access to our set of extractors/classifiers. For example,
to extract all adoption data, use the AdoptionExtractor as follows:

    myextractor = WoCClassifier::AdoptionExtractor.new("mylistfile.txt")
    myextractor.extract_all

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

[![Code Climate](https://codeclimate.com/github/smcintosh/WoC_classifier.png)](https://codeclimate.com/github/smcintosh/WoC_classifier)


text:
# Zoho easy tokens
Generate grant, refresh and access tokens in Zoho

### Instructions

####  Download the code
```console
git clone https://github.com/joseanfernandez/zoho-easy-tokens.git
```

####  Install dependencies
```console
cd zoho-easy-tokens
npm install
```

#### Modify config.js

You need your:
* clientId
* clientSecret
* redirectUri

Go to [developer console](https://accounts.zoho.com/signin?servicename=AaaServer&serviceurl=%2Fdeveloperconsole)

Register your application.

Copy this data in your config.js and change the scope if it is necesary.

#### How to use it
```console
npm start
```

##### Get grant token

[http://localhost:3005/url/for/grant/token](http://localhost:3005/url/for/grant/token)

You will get redirected to the "redirectUri" that you specified during registration of the app.
Note down the "code={grant_token}" parameter.
This is a short-lived token (valid only for a minute) and will be used to generate the access token and refresh token.

##### Get refresh and access tokens
[http://localhost:3005/get/tokens/{YOUR_GRANT_TOKEN}](http://localhost:3005/get/tokens/{YOUR_GRANT_TOKEN})

A copy of this tokens will be save in tokens.log file.

repository: joseanfernandez/zoho-easy-tokens

repo_name: joseanfernandez/zoho-easy-tokens


text:
# Folder structure

This folder serves three independent theme (css) related concepts

## 1) Overriding the default theme

Yoroi uses [React-Polymorph](https://github.com/input-output-hk/react-polymorph/) to separate the theming (style/css) of a component from its UI logic and its skin (markup).

React-Polymorph comes with a default theme for each component (called the `simple` theme) but we want to allow ourselves to easily extend/modify it as needed. To do this, we :

A) Have a folder called `simple` which imports the default themes (css) and provides us the ability to override what we need.
B) Rebundle this modified `simple` theme into a new theme called `yoroiTheme`.
C) Use the `ThemeProvider` to automatically override the default theme on all React-Polymorph componenets at the top-level of our `App`.

## 2) Store prebuild themes

We want to allow users to switch the look of Yoroi during runtime based on a set of prebuilt themes which are defined in the `prebuilt` folder.

To add a new extension point for theming, create a new row in all the `prebuilt` files then you can refer back to it using `var(--theme-your-theme-extension-point-here);` inside `scss` files.

## 3) Store shared themes

Some themes are shared across multiple components and so we store them in a shared location called `mixins`

repository: crchemist-ip/yoroi-frontend

branch_name: refs/heads/develop

repo_name: crchemist-ip/yoroi-frontend


text:
Probit development tree

Probit is a PoS-based cryptocurrency.

Development process
===========================

Developers work in their own trees, then submit pull requests when
they think their feature or bug fix is ready.

The patch will be accepted if there is broad consensus that it is a
good thing.  Developers should expect to rework and resubmit patches
if they don't match the project's coding conventions (see coding.txt)
or are controversial.

The master branch is regularly built and tested, but is not guaranteed
to be completely stable. Tags are regularly created to indicate new
stable release versions of Probit.

Feature branches are created when there are major new features being
worked on by several people.

From time to time a pull request will become outdated. If this occurs, and
the pull is no longer automatically mergeable; a comment on the pull will
be used to issue a warning of closure. The pull will be closed 15 days
after the warning if action is not taken by the author. Pull requests closed
in this manner will have their corresponding issue labeled 'stagnant'.

Issues with no commits will be given a similar warning, and closed after
15 days from their last activity. Issues closed in this manner will be
labeled 'stale'.

Exchanger And Coin Details
===========================
https://probitex.com/trade/index/market/pbt_btc.html

Algorithm	Scrypt(pow+pos)
Coin name	Probit
Coin symbol	PBT
Address letter	P
RPC port	41620
Last PoW block	block 88888
Min. stake age	8 hours
Max. stake age	Unlimited
Coinbase maturity	10 blocks
P2P port	41619
Block reward	100 coins
Coin supply	101200000 coins
Premine amount	13200000 coins
PoS percentage	10% per year
Target spacing	60 seconds
Target timespan	1 block
Transaction confirmations	3 blocks
https://probitex.com
admin@probitexchanger.com

repository: probitex/ProbitCoin

repo_name: probitex/ProbitCoin


text:
# ReanalysisUnifier
Produces a unified set of consistent netCDF files for several atmospheric reanalyses.

All of the major atmospheric reanalyses use vastly different data representation methods and output formats. This causes headaches for someone who would potentially want to compare them or use them to get evidence of climate phenomena. This project attempts to come up with a very restricted subset of data that can be consistently accessed across several datasets. To that end, only the following data fields will be included.

In the case of multiple forecasts, only the "best guess" is included. All fields are deaccumulated if necessary.
  - Air Temperature
  - Specific Humidity
  - Geopotential
  - Winds (U, V, omega)
  - Latent Heat Flux, Sensible Heat Flux
  - Surface Pressure, Pressure at Mean Sea Level
  - Topography
  - Shortwave and Longwave Radiation, with or without Clear Sky
  - Gridded precipitation in precipitation datasets

Spatial Resolution:
  Highest resolution of original data available on a regular (non-gaussian) grid.
Temporal Resolution:
  For now, only monthly data (one data point per month) is supported
Vertical Resolution:
  Model data is only for pressure levels, or single level for fluxes

Datasets that are slated for inclusion.
  - GPCP
  - GPCC
  - ERA-Interim Monthly
  - CFSR, CFSv2
  - MERRA
  - MERRA-2

For now, no data will be made available, only code where you can download and generate the unified files yourself.

# Usage

The code (or procedure) used to fetch each dataset is in it's respective folder. Generally you can run the fetch script, but sometimes, following the instructions will be required. Or copy that fetch script to a more appropriate folder and symlink the data back to the directory. For example, I copy the `merra_monthly/*` to a directory `~/scratch/data/merra_monthly`. I download the files, and symlink it to `merra_monthly` here by `ln -sf ~/scratch/data/merra_monthly/*nc merra_monthly/`.

Because managing the files is such a nightmare, I create a mongodb database with all of the metadata from the netCDF files present in the directory. This is accomplished by starting `mongod` in a local directory (search google for more info). The file `db_create.py` indexes the metadata in the netCDF files and puts it into the mongodb instance. This is something that is queried for later steps.

The `assemble.py` code takes in the input data and produces single value per month files for many fields. This is done by querying the mongodb database using regular expressions defined in `assemble.py`, forming a list of files that match, and then intelligently either copying the data over to a new file or time averaging to monthly resolution and then copying to a new file. The `postprocess.py` fixes some sign inconsistencies between reanalyses to make all the reanalyses consistent in terms of heat flux sign conventions. The `derived_vars.py` file calculates non-obvious quantities like cloud forcing or column MSE source.  They should be instantiated in this order:

```bash
  #this is bash semi-pseudocode

  # fetch all your data, link them using symlinks, somewhere in the current
  # directory. for example, all my era-interim data is in the erai_monthly dir
  # linked as follows.
  #
  # cd erai_monthly
  # ln -sf ${HOME}/scratch/ERA-Interim/monthly_4X_daily_mean/*.nc .
  # cd ..

  #in mongodb directory (delete old database)
  nice -n19 mongod --dbpath `pwd`

  python db_create.py
  seq 0 120 | xargs -P8 -n1 python assemble.py
  #kill mongod daemon now

  python postprocess.py
  ncl -x create_vort_div.ncl
  python derived_vars.py cfsr erai merra merra2
  echo cfsr erai merra merra2 | xargs -P4 -n1 python create_sfn_velpot.py
```

repository: r-shekhar/ReanalysisUnifier

repo_name: r-shekhar/ReanalysisUnifier


text:
# go-tcp-balancer

A small TCP load balancer written in Go based on:

https://github.com/lumanetworks/go-tcp-proxy

## Note

This load balancer is NOT made for balancing many connections (for instance
hundreds or thousands a second) but is meant for relatively few connections
like SSH connections which create a lot of load (because the users start
tasks).

Where I worked, this program was used for "all purpose" compute servers to run
MATLAB jobs or run some compiled C code.
It is in use at a University to distribute clients to the server with the
lowest load.

# Setup
If you move this project to some other location in the file system you must
update the init scripts so they start properly.

The PWD of the process needs to be in the same dir as the PHP script!

# Load balance strategies
The load balancer knows two strategies to forward clients.

## By lowest load
For this to work you need `nrpe` client installed.
`nrpe` is the client used by nagios.

The load balancer then runs the nrpe command `check_load` which must be
configured like this in `nrpe.cfg`:

    command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20

This will return the one minute load and forward the client to the server that
still has the most load free.

Ie, given:

* 24 core machine and load 15
* 12 core machine and load 8

the algorithm would still choose the 24 core machine even though it has a
higher load.
This is because the server has still more resources available than the 12 core
server.

RAM is not taken into account but it would not be difficult to do so.

## Round robin
If no server has load information then round robin strategy kicks in.

# upstart scripts
Upstart scripts are in `scripts` subdirectory.

## MIT License

Copyright © 2014 Andre Rauh<EMAIL_ADDRESS>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: vadim-shadrin/go-tcp-balance

repo_name: vadim-shadrin/go-tcp-balance


text:
Create a function that takes in two arrays and determines whether there exists a flush.

*   The first array represents the 5 cards dealt on the table.
*   The second array represents the 2 cards in your hand.

Notation: card number and suit (abbreviated as S = Spades, H = Hearts, D = Diamonds, C = Clubs) separated by an underscore.

### Examples ###
    checkFlush(["A_S", "J_H", "7_D", "8_D", "10_D"], ["J_D", "3_D"]) ➞ true // diamond flush

    checkFlush(["10_S", "7_S", "9_H", "4_S", "3_S"], ["K_S", "Q_S"]) ➞ true // spade flush

    checkFlush(["3_S", "10_H", "10_D", "10_C", "10_S"], ["3_S", "4_D"]) ➞ false

### Notes ###
Hint: If there aren't at least 3 cards of the same suit on the table, there is zero chance of there being a flush.


text:
Yii 2 Advanced Project Template

Yii 2 Advanced Project Template is a skeleton [Yii 2](http://www.yiiframework.com/) application best for
developing complex Web applications with multiple tiers.

The template includes three tiers: front end, back end, and console, each of which
is a separate Yii application.

The template is designed to work in a team development environment. It supports
deploying the application in different environments.

Documentation is at [docs/guide/README.md](docs/guide/README.md).

[![Latest Stable Version](https://img.shields.io/packagist/v/yiisoft/yii2-app-advanced.svg)](https://packagist.org/packages/yiisoft/yii2-app-advanced)
[![Total Downloads](https://img.shields.io/packagist/dt/yiisoft/yii2-app-advanced.svg)](https://packagist.org/packages/yiisoft/yii2-app-advanced)
[![Build Status](https://travis-ci.org/yiisoft/yii2-app-advanced.svg?branch=master)](https://travis-ci.org/yiisoft/yii2-app-advanced)

DIRECTORY STRUCTURE
-------------------

```
common
    config/              contains shared configurations
    mail/                contains view files for e-mails
    models/              contains model classes used in both backend and frontend
    tests/               contains tests for common classes
console
    config/              contains console configurations
    controllers/         contains console controllers (commands)
    migrations/          contains database migrations
    models/              contains console-specific model classes
    runtime/             contains files generated during runtime
backend
    assets/              contains application assets such as JavaScript and CSS
    config/              contains backend configurations
    controllers/         contains Web controller classes
    models/              contains backend-specific model classes
    runtime/             contains files generated during runtime
    tests/               contains tests for backend application
    views/               contains view files for the Web application
    web/                 contains the entry script and Web resources
frontend
    assets/              contains application assets such as JavaScript and CSS
    config/              contains frontend configurations
    controllers/         contains Web controller classes
    models/              contains frontend-specific model classes
    runtime/             contains files generated during runtime
    tests/               contains tests for frontend application
    views/               contains view files for the Web application
    web/                 contains the entry script and Web resources
    widgets/             contains frontend widgets
vendor/                  contains dependent 3rd-party packages
environments/            contains environment-based overrides
```

Xem thêm các dự án viết bằng yii framework
-----

[Kho hàng US - Dịch vụ đặt hàng Mỹ số 1 Việt Nam](https://www.khohangus.com)

[Mỹ phẩm cao cấp Hàn Quốc Amaranth - Sorabee - Bello Vita](https://www.amaranth.com.vn)

[Chia sẻ kinh nghiệm lập trình php - vps - hosting](https://www.truongbui.com)

[Chia sẻ coupon khuyến mãi từ các trang thương mại điện tử hàng đầu tại Việt Nam và trên toàn thế giới](https://www.phutchot.com)

[EMZ - Mua gì cũng có](https://www.emz.vn)

[Thao Chip Shop, Chuyên bán buôn, bán lẻ đồ ngủ nữ](https://thaochip.com)


text:
# MySql Framework
[![Build Status](https://travis-ci.org/afdabro/mysql-framework.svg?branch=master)](https://travis-ci.org/afdabro/mysql-framework)
[![Coverage Status](https://coveralls.io/repos/github/afdabro/mysql-framework/badge.svg?branch=master)](https://coveralls.io/github/afdabro/mysql-framework?branch=master)

Simplify [MySQL pure js client](https://github.com/mysqljs/mysql) code complexity and reduce code duplication with the MySQL framework.

## Installation
 `npm install mysql-framework`

## Usage

### SQL Command Worker

Example usage:
```javascript
'use strict';
const sqlFramework = require('mysql-framework');

/*
Example connection options
See the following reference for available options:
https://github.com/mysqljs/mysql#connection-options
*/
const connectionOptions = {
    host: 'localhost',
    user: 'idea',
    password: 'idea1234',
    database: 'idea_db',
};

// Connection manager handles opening and closing one time use connections.
const sqlConnectionManager = sqlFramework.createSqlConnectionManager(
    connectionOptions);

// Example list of SQL command statements to execute:
const commandList = [
    'INSERT INTO idea_db.job (name) values ("foo");',
    'INSERT INTO idea_db.job (name) values ("bar");',
];

sqlFramework.executeCommandsAsync(sqlConnectionManager, commandList)
.then((results) => {
    // Returns an array of Command Results
    console.log('Command results: ', results);
})
.catch(
   (reason) => {
        console.log('Handle rejected promise ('+reason+') here.');
});
```

### SQL Query Worker

Example usage:
```javascript
'use strict';
const sqlFramework = require('mysql-framework');

/*
Example connection options
See the following reference for available options:
https://github.com/mysqljs/mysql#connection-options
*/
const connectionOptions = {
    host: 'localhost',
    user: 'idea',
    password: 'idea1234',
    database: 'idea_db',
};

// Connection manager handles opening and closing one time use connections.
const sqlConnectionManager = sqlFramework.createSqlConnectionManager(
    connectionOptions);

// Query SQL database
sqlFramework.queryAsync(
    sqlConnectionManager, 'SELECT * FROM idea_db.job;')
.then((result) => {
    console.log('The query result is: ', result);
})
.catch(
   (reason) => {
        console.log('Handle rejected promise ('+reason+') here.');
});
```

repository: afdabro/mysql-framework

repo_name: afdabro/mysql-framework


text:
## Purpose
This fork is a port to ESP32 (2WD robot). Wish me luck! :)
This repository should be created in microros_ws/firmware/freertos_apps/apps

## Installation
All software mentioned in this guide must be installed on the robot computer.

### 1. ROS2 and linorobot2 installation
It is assumed that you already have ROS2 and linorobot2 package installed. If you haven't, go to [linorobot2](https://github.com/linorobot/linorobot2) package for installation guide.

### 2. Install PlatformIO
Download and install platformio. [Platformio](https://platformio.org/) allows you to develop, configure, and upload the firmware without the Arduino IDE. This means that you can upload the firmware remotely which is ideal on headless setup especially when all components have already been fixed.

    python3 -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)"

Add platformio to your $PATH:

    echo "PATH=\"\$PATH:\$HOME/.platformio/penv/bin\"" >> $HOME/.bashrc
    source $HOME/.bashrc

### 3. UDEV Rule
Download the udev rules from Teensy's website:

    wget https://www.pjrc.com/teensy/00-teensy.rules

and copy the file to /etc/udev/rules.d :

    sudo cp 00-teensy.rules /etc/udev/rules.d/

### 4. Install Screen Terminal

    sudo apt install screen

## Building the robot

### 1. Robot orientation
Robot Orientation:

-------------FRONT-------------

WHEEL1 WHEEL2 (2WD)

WHEEL3 WHEEL4 (4WD)

--------------BACK--------------

If you're building a 2 wheel drive robot, assign `MOTOR1` and `MOTOR2` to the left and right motors respectively.

For mecanum robots, follow the wheels' orientation below.

![mecanum_wheels_orientation](docs/mecanum_wheels_orientation.png)

### 2. Motor Drivers

Supported Motor Drivers:

- **GENERIC_2_IN_MOTOR_DRIVER** - Motor drivers that have EN (pwm) pin, and 2 direction pins (usually DIRA, DIRB pins). Example: L298 Breakout boards.

- **GENERIC_1_IN_MOTOR_DRIVER** - Motor drivers that have EN (pwm) pin, and 1 direction pin (usual DIR pin). These drivers usually have logic gates included to lessen the pins required in controlling the driver. Example: Pololu MC33926 Motor Driver Shield.

- **BTS7960_MOTOR_DRIVER** - BTS7960 motor driver.

- **ESC_MOTOR_DRIVER** - Bi-directional (forward/reverse) electronic speed controllers.

The motor drivers are configurable from the config file explained in the later part of this document.

### 3. Inertial Measurement Unit (IMU)

Supported IMUs:

- **GY-85**
- **MPU6050**
- **MPU9150**
- **MPU9250**

### 4. Connection Diagram
Below are connection diagrams you can follow for each supported motor driver and IMU. For simplicity, only one motor connection is provided but the same diagram can be used to connect the rest of the motors. You are free to decide which microcontroller pin to use just ensure that the following are met:

- Reserve SCL0 and SDA0 (pins 18 and 19 on Teensy boards) for IMU.

- When connecting the motor driver's EN/PWM pin, ensure that the microcontroller pin used is PWM enabled. You can check out PJRC's [pinout page](https://www.pjrc.com/teensy/pinout.html) for more info.

Alternatively, you can also use the pre-defined pin assignments in lino_base_config.h. Teensy 3.x and 4.x have different mapping of PWM pins, read the notes beside each pin assignment in [lino_base_config.h](https://github.com/linorobot/linorobot2_hardware/blob/master/config/lino_base_config.h#L112) carefully to avoid connecting your driver's PWM pin to a non PWM pin on Teensy.

All diagrams below are based on Teensy 4.0 microcontroller and GY85 IMU. Click the images for higher resolution.

#### 4.1 GENERIC 2 IN

![generic_2_in_connection](docs/generic_2_in_connection.png)

#### 4.2 GENERIC 1 IN

![generic_1_in_connection](docs/generic_1_in_connection.png)

#### 4.3 BTS7960

![bts7960_connection](docs/bts7960_connection.png)

#### 4.4 IMU

![imu_connection](docs/imu_connection.png)

Take note of the IMU's correct orientation when mounted on the robot. Ensure that the IMU's axes are facing the correct direction:

- **X** - Front
- **Y** - Left
- **Z** - Up

#### 4.5 System Diagram
Reference designs you can follow in building your robot.

A minimal setup with a 5V powered robot computer.
![minimal_setup](docs/minimal_setup.png)

A more advanced setup with a 19V powered computer and USB hub connected to sensors.
![advanced_setup](docs/advanced_setup.png)

For bigger robots, you can add an emergency switch in between the motor drivers' power supply and motor drivers.

## Setting up the firmware
### 1. Robot Settings
Go to the config folder and open lino_base_config.h. Uncomment the base, motor driver and IMU you want to use for your robot. For example:

    #define LINO_BASE DIFFERENTIAL_DRIVE
    #define USE_GENERIC_2_IN_MOTOR_DRIVER
    #define USE_GY85_IMU

Constants' Meaning:

*ROBOT TYPE (LINO_BASE)*
- **DIFFERENTIAL_DRIVE** - 2 wheel drive or tracked robots w/ 2 motors.

- **SKID_STEER** - 4 wheel drive robots.

- **MECANUM** - 4 wheel drive robots using mecanum wheels.

*MOTOR DRIVERS*
- **USE_GENERIC_2_IN_MOTOR_DRIVER** - Motor drivers that have EN (pwm) pin, and 2 direction pins (usually DIRA, DIRB pins).

- **USE_GENERIC_1_IN_MOTOR_DRIVER** - Motor drivers that have EN (pwm) pin, and 1 direction pin (usual DIR pin). These drivers usually have logic gates included to lessen the pins required in controlling the driver.

- **USE_BTS7960_MOTOR_DRIVER** - BTS7960 motor driver.

- **USE_ESC_MOTOR_DRIVER** - Bi-directional (forward/reverse) electronic speed controllers.

*INERTIAL MEASUREMENT UNIT (IMU)*
- **USE_GY85_IMU** - GY-85 IMUs.

- **USE_MPU6050_IMU** - MPU6060 IMUs.

- **USE_MPU9150_IMU** - MPU9150 IMUs.

- **USE_MPU9250_IMU** - MPU9250 IMUs.

Next, fill in the robot settings accordingly:

    #define K_P 0.6
    #define K_I 0.8
    #define K_D 0.5

    #define MOTOR_MAX_RPM 100
    #define MAX_RPM_RATIO 0.85
    #define MOTOR_OPERATING_VOLTAGE 24
    #define MOTOR_POWER_MAX_VOLTAGE 12
    #define MOTOR_POWER_MEASURED_VOLTAGE 11.7

    #define COUNTS_PER_REV1 2200
    #define COUNTS_PER_REV2 2200
    #define COUNTS_PER_REV3 2200
    #define COUNTS_PER_REV4 2200

    #define WHEEL_DIAMETER 0.09
    #define LR_WHEELS_DISTANCE 0.2

    #define PWM_BITS 10
    #define PWM_FREQUENCY 20000

Constants' Meaning:

- **K_P, K_I, K_D** - [PID](https://en.wikipedia.org/wiki/PID_controller) constants used to translate the robot's target velocity to motor speed. These values would likely work on your build, change these only if you experience jittery motions from the robot or you'd want to fine-tune it further.

- **MOTOR_MAX_RPM** - Motor's maximum number of rotations it can do in a minute specified by the manufacturer.

- **MAX_RPM_RATIO** - Percentage of the motor's maximum RPM that the robot is allowed to move. This parameter ensures that the user-defined velocity will not be more than or equal the motor's max RPM, allowing the PID to have ample space to add/subtract RPM values to reach the target velocity. For instance, if your motor's maximum velocity is 0.5 m/s with `MAX_RPM_RATIO` set to 0.85, and you asked the robot to move at 0.5 m/s, the robot's maximum velocity will be capped at 0.425 m/s (0.85 * 0.5m/s). You can set this parameter to 1.0 if your wheels can spin way more than your operational speed.

    Wheel velocity can be computed as:  MAX_WHEEL_VELOCITY = (`MOTOR_MAX_RPM` / 60.0) * PI * `WHEEL_DIAMETER`

- **MOTOR_OPERATING_VOLTAGE** - Motor's operating voltage specified by the manufacturer (usually 5V/6V, 12V, 24V, 48V). This parameter is used to calculate the motor encoder's `COUNTS_PER_REV` constant during calibration and actual maximum RPM of the motors. For instance, a robot with `MOTOR_OPERATING_VOLTAGE` of 24V with a `MOTOR_POWER_MAX_VOLTAGE` of 12V, will only have half of the manufacturer's specified maximum RPM ((`MOTOR_POWER_MAX_VOLTAGE` / `MOTOR_OPERATING_VOLTAGE`) * `MOTOR_MAX_RPM`).

- **MOTOR_POWER_MAX_VOLTAGE** - Maximum voltage of the motor's power source. This parameter is used to calculate the actual maximum RPM of the motors.

- **MOTOR_POWER_MEASURED_VOLTAGE** - Measured voltage of the motor's power source. If you don't have a multimeter, it's best to fully charge your battery and set this parameter to your motor's operating voltage (`MOTOR_OPERATING_VOLTAGE`). This parameter is used to calculate the motor encoder's `COUNTS_PER_REV` constant. You can ignore this if you're using the manufacturer's specified counts per rev.

- **COUNTS_PER_REVX** - The total number of pulses the encoder has to read to be considered as one revolution. You can either use the manufacturer's specification or the calibrated value in the next step. If you're planning to use the calibrated value, ensure that you have defined the correct values for `MOTOR_OPERATING_VOLTAGE` and `MOTOR_POWER_MEASURED_VOLTAGE`.

- **WHEEL_DIAMETER** - Diameter of the wheels in meters.

- **LR_WHEELS_DISTANCE** - The distance between the center of left and right wheels in meters.

- **PWM_BITS** - Number of bits in generating the PWM signal. You can use the default value if you're unsure what to put here. More info [here](https://www.pjrc.com/teensy/td_pulse.html).

- **PWM_FREQUENCY** - Frequency of the PWM signals used to control the motor drivers. You can use the default value if you're unsure what to put here. More info [here](https://www.pjrc.com/teensy/td_pulse.html).

### 2. Hardware Pin Assignments
Remember to only modify the pin assignments under the motor driver constant that you are using ie. `#ifdef USE_GENERIC_2_IN_MOTOR_DRIVER`. You can check out PJRC's [pinout page](https://www.pjrc.com/teensy/pinout.html) for each board's pin layout.

The pin assignments found in lino_base_config.h are based on Linorobot's PCB board. You can wire up your electronic components based on the default pin assignments but you're also free to modify it depending on your setup. Just ensure that you're connecting MOTORX_PWM pins to a PWM enabled pin on the microcontroller and reserve SCL and SDA pins for the IMU, and pin 13 (built-in LED) for debugging.

    // INVERT ENCODER COUNTS
    #define MOTOR1_ENCODER_INV false
    #define MOTOR2_ENCODER_INV false
    #define MOTOR3_ENCODER_INV false
    #define MOTOR4_ENCODER_INV false

    // INVERT MOTOR DIRECTIONS
    #define MOTOR1_INV false
    #define MOTOR2_INV false
    #define MOTOR3_INV false
    #define MOTOR4_INV false

    // ENCODER PINS
    #define MOTOR1_ENCODER_A 14
    #define MOTOR1_ENCODER_B 15

    #define MOTOR2_ENCODER_A 11
    #define MOTOR2_ENCODER_B 12

    #define MOTOR3_ENCODER_A 17
    #define MOTOR3_ENCODER_B 16

    #define MOTOR4_ENCODER_A 9
    #define MOTOR4_ENCODER_B 10

    // MOTOR PINS
    #ifdef USE_GENERIC_2_IN_MOTOR_DRIVER
        #define MOTOR1_PWM 21 //Pin no 21 is not a PWM pin on Teensy 4.x, you can swap it with pin no 1 instead.
        #define MOTOR1_IN_A 20
        #define MOTOR1_IN_B 1

        #define MOTOR2_PWM 5
        #define MOTOR2_IN_A 6
        #define MOTOR2_IN_B 8

        #define MOTOR3_PWM 22
        #define MOTOR3_IN_A 23
        #define MOTOR3_IN_B 0

        #define MOTOR4_PWM 4
        #define MOTOR4_IN_A 3
        #define MOTOR4_IN_B 2

        #define PWM_MAX pow(2, PWM_BITS) - 1
        #define PWM_MIN -PWM_MAX
    #endif

Constants' Meaning:

- **MOTORX_ENCODER_A** - Microcontroller pin that is connected to the first read pin of the motor encoder. This pin is usually labelled as A pin on the motor encoder board.

- **MOTORX_ENCODER_B** - Microcontroller pin that is connected to the second read pin of the motor encoder. This pin is usually labelled as B pin on the motor encoder board.

- **MOTORX_ENCODER_INV** - Flag used to change the sign of the encoder value. More on that later.

- **MOTORX_PWM** - Microcontroller pin that is connected to the PWM pin of the motor driver. This pin is usually labelled as EN or ENABLE pin on the motor driver board.

- **MOTORX_IN_A** - Microcontroller pin that is connected to one of the motor driver's direction pins. This pin is usually labelled as DIRA or DIR1 pin on the motor driver board. On BTS7960 driver, this is one of the two PWM pins connected to the driver (RPWM/LPWM).

- **MOTORX_IN_B** - Microcontroller pin that is connected to one of the motor driver's direction pins. This pin is usually labelled as DIRB or DIR2 pin on the motor driver board. On BTS7960 driver, this is one of the two PWM pins connected to the driver (RPWM/LPWM).

- **MOTORX_INV** - Flag used to invert the direction of the motor. More on that later.

## Calibration
Before proceeding, **ensure that your robot is elevated and the wheels aren't touching the ground**.
5.1
### 1. Motor Check
Go to calibration folder and upload the firmware:

    cd linorobot2_hardware/calibration
    pio run --target upload -e <your_teensy_board>

Available Teensy boards:
- teensy31
- teensy35
- teensy36
- teensy40
- teensy41

Some Linux machines might encounter a problem related to libusb. If so, install libusb-dev:

    sudo apt install libusb-dev

Start spinning the motors by running:

    screen /dev/ttyACM0

On the terminal type `spin` and press the enter key.

The wheels will spin one by one for 10 seconds from Motor1 to Motor4. Check if each wheel's direction is spinning **forward** and take note of the motors that are spinning in the opposite direction. Set MOTORX_INV constant in [lino_base_config.h](https://github.com/linorobot/linorobot2_hardware/blob/master/config/lino_base_config.h#L71-L74) to `true` to invert the motor's direction. Reupload the calibration firmware once you're done. Press `Ctrl` + `a` + `d` to exit the screen terminal.

    cd linorobot2_hardware/calibration
    pio run --target upload -e <your_teensy_board>

### 2. Encoder Check

Open your terminal and run:

    screen /dev/ttyACM0

Type `sample` and press the enter key. Verify if all the wheels are spinning **forward**. Redo the previous step if there are motors still spinning in the opposite direction.

You'll see a summary of the total encoder readings and counts per revolution after the motors have been sampled. If you see any negative number in the MOTOR ENCODER READINGS section, invert the encoder pin by setting `MOTORX_ENCODER_INV` in [lino_base_config.h](https://github.com/linorobot/linorobot2_hardware/blob/master/config/lino_base_config.h#L65-L68) to `true`. Reupload the calibration firmware to check if the encoder pins have been reconfigured properly:

    cd linorobot2_hardware/calibration
    pio run --target upload -e <your_teensy_board>
    screen /dev/ttyACM0

Type `sample` and press the enter key. Verify if all encoder values are now **positive**. Redo this step if you missed out any.

### 3. Counts Per Revolution

On the previous instruction where you check the encoder reads for each motor, you'll see that there's also COUNTS PER REVOLUTION values printed on the screen. If you have defined `MOTOR_OPERATING_VOLTAGE` and `MOTOR_POWER_MEASURED_VOLTAGE`, you can assign these values to `COUNTS_PER_REVX` constants in [lino_base_config.h](https://github.com/linorobot/linorobot2_hardware/blob/master/config/lino_base_config.h#L55-L58) to have a more accurate model of the encoder.

## Upload the firmware
Ensure that the robot pass all the requirements before uploading the firmware:

- Defined the correct motor rpm.
- Motors' IDs are correct.
- Motors spin in the right direction.
- Encoders' signs are correct.
- Defined the correct encoder's COUNTS_PER_REV.
- Defined the correct robot type.
- Defined the correct motor driver.
- Defined the correct IMU.
- Defined the correct wheel diameter.
- Defined the correct distance between wheels.

Run:

    cd linorobot2_hardware/firmware
    pio run --target upload -e <your_teensy_board>

## Testing the robot

### 1. Run the micro-ROS agent.

This will allow the robot to receive Twist messages to control the robot, and publish odometry and IMU data straight from the microcontroller. Compared to Linorobot's ROS1 version, the odometry and IMU data published from the microcontroller use standard ROS2 messages and do not require any relay nodes to reconstruct the data to complete [sensor_msgs/Imu](http://docs.ros.org/en/noetic/api/sensor_msgs/html/msg/Imu.html) and [nav_msgs/Odometry](http://docs.ros.org/en/noetic/api/nav_msgs/html/msg/Odometry.html) messages.

Run the agent:

    ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0

### 2. Drive around

Run teleop_twist_keyboard package and follow the instructions on the terminal on how to drive the robot:

    ros2 run teleop_twist_keyboard teleop_twist_keyboard

### 3. Check the topics

Check if the odom and IMU data are published:

    ros2 topic list

Now you should see the following topics:

    /cmd_vel
    /imu/data
    /odom/unfiltered
    /parameter_events
    /rosout

Echo odometry data:

    ros2 topic echo /odom/unfiltered

Echo IMU data:

    ros2 topic echo /imu/data

## URDF
Once the hardware is done, you can go back to [linorobot2](https://github.com/linorobot/linorobot2#urdf) package and start defining the robot's URDF.

## Troubleshooting Guide

### 1. One of my motor isn't spinning.
- Check if the motors are powered.
- Check if you have bad wiring.
- Check if you have misconfigured the motor's pin assignment in lino_base_config.h.
- Check if you uncommented the correct motor driver (ie. `USE_GENERIC_2_IN_MOTOR_DRIVER`)
- Check if you assigned the motor driver pins under the correct motor driver constant. For instance, if you uncommented `USE_GENERIC_2_IN_MOTOR_DRIVER`, all the pins you assigned must be inside the `ifdef USE_GENERIC_2_IN_MOTOR_DRIVER` macro.

### 2. Wrong wheel is spinning during calibration process
- Check if the motor drivers have been connected to the correct microcontroller pin.
- Check if you have misconfigured the motor's pin assignment in lino_base_config.h.

### 3 One of my encoders has no reading (0 value).
- Check if the encoders are powered.
- Check if you have bad wiring.
- Check if you have misconfigured the encoder's pin assignment in lino_base_config.h.

### 4. Nothing's printing when I run the screen app.
- Check if you're passing the correct serial port. Run:

        ls /dev/ttyACM*

    and ensure that the available serial port matches the port you're passing to the screen app.

- Check if you forgot to [copy the udev rule](https://github.com/linorobot/linorobot2_hardware#3-udev-rule):

        ls /etc/udev/rules.d/00-teensy.rules

    Remember to restart your computer if you just copied the udev rule.

### 5. The firmware was uploaded but nothing's happening.
- Check if you're assigning the correct Teensy board when uploading the firmware. If you're unsure which Teensy board you're using, take a look at the label on the biggest chip found in your Teensy board and compare it with the boards shown on PJRC's [website](https://www.pjrc.com/teensy/).


text:
# Example of [kubeflow](http://kubeflow.org) pipeline builder

## Example Project

Demo project based uppon [Tacotron-pytorch](https://github.com/soobinseo/Tacotron-pytorch) by @soobinseo

## Modifications of original project.

* ML code slitly midified, in order to make it working without issues and be more copatible with cuda (if present)
* Few values of the `hyperparametes` moved out into pipeline parameters
* Speech syntez moved out to webapp, but failing by itself (see [Issue #6](https://github.com/soobinseo/Tacotron-pytorch/issues/6))
* Sound transformation changed in regards of changed API of `librosa`

## Build

```bash
# build with all possible options
./build.sh --owner="butuzov"
           --version=1.1
           --push
           --withtests
```

* `--owner` options for docker hub user
* `--version` to set a version of pipeline and docker images
* `--push`  push to docker registry
* `--withtests` run simple tests on hosts enviropment with maped volumes and params. test for `webapp` should be terminated manually.


text:
# This is the repository of Shreyash's blog.

## ❓ Why is this created?

**To host the code for his blog.**

## 🙄 Who's he?

**I just told, his name is 'Shreyash'.**

## 🤨 Who are you then?

**It's funny you ask. I'm Shreyash.**

## 😄 Okay. So, how was this created?

**Good. We're making progress. This was created using [Gatsby's blog starter.](https://www.gatsbyjs.com/docs/gatsby-starters/)**

## 😎 That's cool. How can I follow Shreyash?

**You can follow Shreyash on [Instagram here.](https://instagram.com/shreyashkarnik)**


text:
# Developer Guide

To start FellowMap locally, you can follow these steps:
1. Clone the repository
1. Create a github personal access token by following the [docs here](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). This github token will be required for fetching and organizing public information about fellows.
1. Get an open cage API key by [signing up here](https://opencagedata.com/). This API key is used for geocoding (translating names of places to coordinates and vice versa)
1. Create a `.env` file with the following contents and fill in your token and API key that you received from step 2 and 3.
```
GITHUB_TOKEN=
OPEN_CAGE_API_KEY=
```
5. We're good to go! Run the following commands to start your development server.
```
yarn install
yarn start
```

repository: YashKumarVerma/MLH-Fellow-Map

repo_name: YashKumarVerma/MLH-Fellow-Map


text:
---
layout: base
---

{% include aboutnav.html %}

## ROSEdu.org

rosedu.org is an open-source project hosted on [GitHub](https://github.com/rosedu/site) under a [CC-BY-SA](http://creativecommons.org/licenses/by-sa/3.0/) or [GNU FDL 1.3](http://www.gnu.org/copyleft/fdl.html) licence and maintained by a group of enthusiast developers. You can contact us at<EMAIL_ADDRESS>

## Tehnologies used

### Jekyll

Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server.

Website: [http://jekyllrb.com/](http://jekyllrb.com/)

Licence: [MIT](http://en.wikipedia.org/wiki/MIT_License)

### liteAccordion

liteAccordion is a horizontal accordion plugin for jQuery.

Website: [http://nicolahibbert.com/demo/liteAccordion/](http://nicolahibbert.com/demo/liteAccordion/)

Licence: [MIT](http://en.wikipedia.org/wiki/MIT_License)

## Site team

* Alex Eftimie
* Camelia Groza
* Flavius Anton
* Marius Coțofană

repository: rosedu/site

gha_license_id: NOASSERTION

repo_name: rosedu/site


text:
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.1.0]
- Add support for hashes in grub settings

## [1.0.1]
- fix quoting for strings with spaces vs non spaced values

## [1.0.0]
- Rename and move cookbook under _bloomberg-cookbooks_ organization.
- Update cookbook to use Chef 12 resource DSL.
- Updates integration tests to use InSpec and Policyfiles.

[Unreleased]: https://github.com/bloomberg-cookbooks/grub/compare/v1.1.0...HEAD
[1.0.0]: https://github.com/bloomberg-cookbooks/grub/tree/v1.0.0


text:
---

This work is licensed under the Creative Commons CC0 License

---

# Dumping MASL project only produces prj file
### xtUML Project Implementation Note

### 1. Abstract

This note describes the fix for a user-reported issue with MASL-export.

### 2. Document References

2.1 [BridgePoint DEI #9932](https://support.onefact.net/issues/9932) Headline issue.
2.2 [BridgePoint DEI #9612](https://support.onefact.net/issues/9612) Headline SR.

### 3. Background

A user reports:
```
When I dump a MASL project from inside the tool it only dumps out the ".prj" file
and it does not dump of any of the masl terminator service files.

This is different behavior from what is observed in the round trip.

Does the round-trip use a different method for dumping out?
```

Furthermore, the user reports that the issue happens when the MASL project is
imported via the BridgePoint command-line import tool.  However, performing project
import via the GUI and then exporting the MASL project produces the desired `.tr` files.

### 4. Requirements

4.1 `Export MASL Project` shall produce `.tr` files for port activities.

### 5. Analysis

5.1  The first step of investigation was to open the workspace created during the MASL
round trip process of SAC & SAC_PROC.
5.1.1  We note that the component reference that should be assigned to the SAC domain is
not assigned.  The other two component references (INI and SOA) are unassigned too, but this
is expected since they do not exist.
5.1.2  Obviously, if the SAC component reference is unassigned then there are no connected ports
between the project and domain and thus no way any terminator service action language would exist
or be output via the export process.

5.2  The author used a modified version of the "BridgePoint CLI Import (OSX)" launch
configuration to do a `SAC_PROC` project import into an existing workspace that already
had a `SAC` domain imported.  The modified program agruments for the launch are:
```
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog
-pluginCustomization ${workspace_loc}/org.xtuml.bp.pkg/plugin_customization.ini
-file /Users/kbrown/tmp/SAC_PROC/SAC_PROC.xtuml -targetProject p1 -deleteExisting -allowIPRs
```

5.2.1  This allowed the author to set breakpoints and perform inspection of the model data
at various points in the import process.
<IP_ADDRESS>  We uncovered the fact that during the import the SAC domain is found and the component
reference is assigned properly.
<IP_ADDRESS>  However, upon exit and re-open of the workspace the Component Reference is no longer
assigned to the SAC domain.
<IP_ADDRESS>  This meant that the in-memory model data was being set up as expected but the changes
were not being persisted.

5.3  The `masl_round_trip` tool uses the BridgePoint CLI "Launch" mode which avoids starting up
and shutting down many instances of eclipse and instead starts a single instance which can
perform many actions.  This is the reason `masl_round_trip` was succeeding, because it was running
the pre-build step on the correct in-memory data.

### 6. Work Required

6.1  `ImportHelper.resolveMASLProject()`
6.1.1  At the beginning of this function, the flow starts a transaction by calling
`TransactionManager.startTransactionsOnSelectedModelRoots(...)`.  As the function name suggests, the
transaction uses model roots that are part of the selection.  Via step debugging, we see that in the
current flow there are no model elements in the selection, thus, no transaction is created.  The code is
modified to add the `SystemModel_c` instance to the selection before making the call so that a transaction
is created.

6.2  Change the CLI `ImportExecutor` to call `<SystemModel_c>.persistSelfAndChildren()` after the
project or file is imported.  This will force persist the in-memory data before the application exits.

### 7. Implementation Comments

7.1  During the CLI application shutdown process eclipse may throw exceptions like:
```
org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: Invalid thread access
```
We researched a solution for this issue but turned up nothing.  We also attempted to catch and hide
the error, but again without success.  The problem is happening in eclipse code that is outside of BridgePoint
control.  We are calling the proper function `IWorkbench.close()` to exit the application.  No solution
to making this error go away was found.

7.2  Removed obsolete and unused function `migrateSLDTs` from `ImportHelper.java`.  The function
has no implementation and is not called from anywhere.

7.3  It is not clear why the resolution and assignment of component references inside the (now properly
constructed) transaction in `ImportHelper` does not cause a persist of the in-memory data to occur. It could
be that there is a race condition between persistence launched by a listener and the application shutdown
is happening.  Whatever the cause, it is clear that making sure the CLI Import persists everything before
shutting down by making a direct invocation is a clear fix for this issue.

### 8. Unit Test

8.1 Run the full `masl_round_trip` suite and verify success.
* cd ~/git/models/masl/test
* edit `regression_test` to point at the correct BridgePoint installation on the `BPINSTALL=...` line
* ./regression_test -o /tmp/regout < all_tests
* __R__ The file diffs should all show 0

8.2 Run `masl_round_trip` on SAC_OOA and SAC_PROC and verify the `.tr` files are output for SAC_PROC.
* cd ~/git/models/masl/test
* create a new file `sac_test` that only contains the text `../SAC/SAC_OOA ../SAC/SAC_PROC`
* ./regression_test -o /tmp/regout < sac_test
* __R__ The MASLFormatter may throw errors, but there are `.tr` files under /tmp/regout/1/SAC_PROC

8.3 Verify UI export
* Open the `/tmp/importwork` workspace created previously in 8.2
* Open the p1 project in Navigator and delete the `masl/` folder if it exists
* In Model Explorer, expand p1/SAC_PROC and note that one component reference is assigned to SAC
* Run `Export MASL Project`
* __R__ Verify `.tr` files are created under the `SAC_PROC/masl/` tree

### 9. User Documentation

None.

### 10. Code Changes

Fork/Repository: keithbrown/bridgepoint
Branch: 9932_masl_prj_export

doc-bridgepoint/notes/9932_prj_export_int.md
src/org.xtuml.bp.cli/src/org/xtuml/bp/cli/BPCLIWorkbenchAdvisor.java
src/org.xtuml.bp.cli/src/org/xtuml/bp/cli/ImportExecutor.java
src/org.xtuml.bp.io.core/src/org/xtuml/bp/io/core/ImportHelper.java

### End

gha_language: HTML


text:
---
description: 'Actions Required for v.1.12.0'
sidebar_custom_props:
  iconName: 'server-stack-solid'
---

# v1.12.0

Version 1.12.0 of Medusa comes with database changes that require you run the migrations command and a minor breaking change to the `PriceSelectionStrategy`.

## Overview

This release contains migrations that introduce a range of new database indexes that will improve performance of your setup.

Additionally, it brings minor breaking changes to the `PriceSelectionStrategy`. The method `calculateVariantPrice` now supports bulk calculating variant prices.

Specifically, the following signature has changed:

```ts
// Before
class MyStrategy extends
  AbstractPriceSelectionStrategy {
  // ...
  calculateVariantPrice(
    variantId: string,
    context: PriceSelectionContext
  ): Promise<PriceSelectionResult> {
    // ...
  }
}
```

```ts
// Now
class MyStrategy extends
  AbstractPriceSelectionStrategy {
  // ...
  calculateVariantPrice(data: {
    variantId: string;
    quantity?: number;
   }[],
   context: PriceSelectionContext
  ): Promise<Map<string, PriceSelectionResult>> {
    // ...
  }
}
```

Finally, a clean up of our `@medusajs/utils` have also led to potential breaking changes. The clean-up resulted in the following:

- The packages `class-validator` and `class-transformer` have been removed from `@medusajs/utils`.

- The `TransactionBaseService` has been removed from `@medusajs/utils`. This class should be imported from `@medusajs/medusa`.

- The utilities `build-query`, `db-aware-column`, `base-entity`, and `soft-deletable-entity` have been removed from `@medusajs/medusa`. These should be imported from @medusajs/medusa.

---

## How to Update

Run the following command in the root directory of your Medusa Backend:

```bash npm2yarn
npm install<EMAIL_ADDRESS>```

To avoid unexpected issues with dependencies, it is also recommended to update all other Medusa plugins or packages you have installed.

---

## Actions Required

### Run Migrations

After updating your Medusa server and before running it, run the following command to run the latest migrations:

```bash
npx medusa migrations run
```

### Change PriceSelectionStrategy method

If you've created a custom price selection strategy, or have using the `PriceSelectionStrategy`'s `calculateVariantPrice` method in your custom code, make sure to update its definition or usage based on the new signature:

```ts
class MyStrategy extends
  AbstractPriceSelectionStrategy {
  // ...
  calculateVariantPrice(data: {
    variantId: string;
    quantity?: number;
   }[],
   context: PriceSelectionContext
  ): Promise<Map<string, PriceSelectionResult>> {
    // ...
  }
}
```

You can learn more in the [Price Selection Strategy](../../modules/price-lists/price-selection-strategy.md#calculatevariantprice-method) documentation.

repository: medusajs/medusa

repo_name: medusajs/medusa


text:
# CKEditor for ProcessWire

[CKEditor](http://ckeditor.com/) is a web text editor like TinyMCE.
This module can be used anywhere TinyMCE can be used in ProcessWire.

CKEditor has a nice *inline* mode that is desirable in the page editor
when you may have lots of rich text inputs. The reason for this is
that the page editor loads a lot faster. Some people also prefer
CKEditor for other reasons.

This module is tested and confirmed compatible with both repeaters and
multi-language support.

1. Go to **Setup > Fields** and locate a textarea field that you want
   to use CKEditor (or create a new textarea field).

2. When editing the settings for a textarea field, click the **Details** tab.
   Change the **Inputfield Type** to **CKEditor** and save.

3. While still editing the field settings, click to the **Input** tab for
   CKEditor-specific settings you may optionally configure.

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

### Inline Mode vs. Regular Mode

When configuring your CKEditor fields, you may notice the option of either Regular
Mode or Inline Mode.

#### When you should use inline mode

The Inline Mode is new to CKEditor 4.x and is preferable if
you need to have several instances of CKEditor on the same page at once. Inline
mode editors are not initialized until hovered, making the initial page load time
faster (at least versus several Regular Mode editors). Another benefit of inline
mode is that the editor interface and buttons are not visible until the field is
focused, which some may prefer visually. Another aspect of inline mode worth
noting is that the editor area is always as tall as the content it contains...
this may be good or bad, depending on your preferences. We recommend using
inline mode in these instances:

- Multi-language textarea fields
- Textarea fields in repeaters
- Any instance where you have multiple (3+) CKEditor textarea fields
  in the same page editor.

#### When you should use regular mode

If you only have one or two instances of CKEditor on a page, you may prefer to
use Regular Mode because it has been around longer and tends to be more reliable.
Regular Mode runs in a separate frame, making it more isolated and thus less prone
to any other CSS or Javascript interference. Regular mode editors are also more
obviously rich text editors, as their interface and buttons are always visible.
We recommend using Regular Mode in these instances:

- Page editors with only 1-2 CKEditor textarea fields (like `body` and `sidebar`).
- When you do not want CKEditor to consume too much vertical real estate on the editor page.
- When you want the greatest amount of compatibility with other CKEditor plugins.

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

## Advanced Tips

This section contains contextual instructions that are linked to from
within the module. These cover specific needs during field configuration
and you do not need to read this section in order to use CKEditor.

### Custom Editor JS Styles Set

**This is an option that appears in your CKEditor field settings when editing
a textarea field in the ProcessWire field editor. Use this option if you
want to have a *Styles* dropdown that contains your own custom styles that
users can choose from your editor.**

#### Instructions

1. Edit your CKEditor field in **Setup > Fields**, and click to the **Input** tab.

2. In the **CKEditor Toolbar** field, enter `Styles` somewhere. Here is an example
   of what my first toolbar line looks like:
   `Format, Styles, Bold, Italic, -, RemoveFormat`

3. Open the **Custom Editor JS Styles Set** field, and type or paste in:
   `mystyles:/site/modules/InputfieldCKEditor/mystyles.js`

   - ProcessWire's default profile comes with a
     [ready-to-go mystyles.js](https://github.com/processwire/processwire/blob/master/site-default/modules/InputfieldCKEditor/mystyles.js)
     in the exact location mentioned above. Feel free to use this.

   - The term **mystyles** is just something we made up, and you
     may use whatever keyword you like, but note you will have to use that same
     keyword in the file itself. In our example below, you will see where we
     used the term **mystyles** again. If you want to keep things simple, then
     just stick with using mystyles.

   - If you don't have a mystyles.js file in /site/modules/InputfieldCKEditor/,
     then you can copy the one in /wire/modules/Inputfield/InputfieldCKEditor/
     to /site/modules/InputfieldCKEditor/mystyles.js.

4. Edit and modify the mystyles.js file to suit your particular
   needs. Save and you are done.

When editing a page that uses your CKEditor field, you should now see a
**Styles** dropdown with the styles you specified in your `mystyles.js` file.
Note that you may not initially see all styles in the dropdown, as they may
be contextual. For instance, you will not see the styles related to images in the
example above unless you are focused on an `img` element in your editor.

You may wish to combine your settings here with a custom editor CSS file
covered in the section below.

[Read more about the CKEditor styles set option](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-stylesSet).

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

### Custom Editor CSS File

**This option enables you to modify the way that text and other elements
appear in your editor. This covers how they look in the administrative
environment only, and has nothing to do with the front-end of your site.
Typically you would use this option if you wanted to modify the default
look-and-feel in the editor to something that is more stylistically
similar to the front-end of your site.**

Example editor CSS files can be found here:

- **Regular Mode:** /site/modules/InputfieldCKEditor/contents.css
- **Inline Mode:** /site/modules/InputfieldCKEditor/contents-inline.css

You can use this files directory, or you can copy them somewhere else.
However, since they are located in your /site/ directory, they won't
get overwritten during upgrades. For the same reason, it's also possible
that you don't have those files in the location mentioned above. If
that's the case, you can copy the versions in /wire/modules/Inputfield/InputfieldCKEditor/
instead, and I recommend putting them in /site/modules/InputfieldCKEditor/.

*There is also a Sass (SCSS) file called `contents-inline.scss` which you
may prefer to use as your starting point if using Sass. Just remember to
compile it to a contents-inline.css file when done. The Sass file is located
here: /wire/modules/Inputfield/InputfieldCKEditor/contents-inline.scss*

As you can see above, you will be using a different CSS file depending
on whether you need to modify the styles in a regular editor, or an
inline-mode editor.

1. Modify the file(s) mentioned above and style the elements as you wish,
   or you may return to this step later. If using more than one CKEditor
   inline editor in your page, please see the important note below these
   instructions.

3. Edit your textarea field that uses CKEditor in **Setup > Fields > your_field**.
   Go to the **Input** tab and see the **Custom Editor CSS File** option. Type
   or paste in the location of the file you copied in step 1 (relative
   to web root). Example: `/site/modules/InputfieldCKEditor/contents.css`. Save.

4. Your editor should now be using your new `contents.css` or
   `contents-inline.css` file rather than the defaults. Note that sometimes it
   can be difficult to see the results of your new file immediately,
   especially in regular mode, due to browser caching. If you run into trouble,
   quit your browser and re-open (or use Incognito mode).

#### Important Note About Inline Mode (contents-inline.css)

If using more than one CKEditor inline mode editor on your page, and
not using the same `contents-inline.css` file on all of them, then you
will end up having them compete with each other or fall back to the
default `contents-inline.css`. In order to avoid this, you would need
to make your CSS selectors more specific to the field they apply to.

Lets say that you had a field named `body`. You could target it specifically
in your `contents-inline.css` (or whatever you named the file), by replacing
this CSS selector...
```
.InputfieldForm .InputfieldCKEditorInline
```
...with this CSS selector:
```
.InputfieldForm .Inputfield_body .InputfieldCKEditorInline
```
Note the `.Inputfield_body` part, as `body` is the name of the field
in ProcessWire.

If you will use the same `contents-inline.css` file for all of your
inline fields, then just make sure it is specified with the settings for
each of your CKEditor inline textarea fields, otherwise you may end up
reverting back to the default `contents-inline.css`.

repository: joyofpw/chileanbirds-api

gha_language: PHP

repo_name: joyofpw/chileanbirds-api


text:
# Sharding

Sharding your bot with `discordx`.

## Purpose

Sharding is the process of splitting your main discord process into multiple shards to help with the load when your bot is in 2,500+ guilds. discord.**js** has recommended to start making updates for sharding at around 2,000 guilds.

[Discord.js Sharding Guide](https://discordjs.guide/sharding/#when-to-shard)

When you hit that milestone and need to begin the sharding process this guide will serve as a starting document to help you get set up.

## Before you start

- ✅ Get your bot into 2,000 guilds
- ✅ Ensure your bot compiles down to javascript with `tsc`

### What if my bot is in less than 2,000 servers?

discord.**js** has stated

"_Sharding is only necessary at 2,500 guilds—at that point, Discord will not allow your bot to login without sharding. With that in mind, you should consider this when your bot is around 2,000 guilds, which should be enough time to get this working. Contrary to popular belief, sharding itself is very simple. It can be complex depending on your bot's needs, however. If your bot is in a total of 2,000 or more servers, then please continue with this guide. Otherwise, it may be a good idea to wait until then._"

However if you are curious you may continue to read this doc! But don't worry about sharding until 2,000 guilds. Focus on building a quality bot as sharding adds more complexity.

### What if my bot does not compile with tsc?

If your bot does not compile with `tsc` but runs with `ts-node` you will **not** be able to shard with the discord.**js** sharding managers.

I found success with using this `tsconfig.json`

```json
{
  "compilerOptions": {
    "module": "ESNext",
    "target": "ESNext",
    "strict": true,
    "noImplicitAny": true,
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "forceConsistentCasingInFileNames": true,
    "moduleResolution": "Node",
    "outDir": "./src/build"
  },
  "exclude": ["node_modules"],
  "indent": [true, "spaces", 2]
}
```

If you are receiving errors that complain about imports. Try using the following import where the compiler complains about the import.

```diff
- import fs from 'fs';
+ import fs = require("fs");
```

## I'm Ready

Did you really read the previous section? If not go back and read it.

Okay so now that you are ready let's talk about the set up.

```diff
Bot
├───environments/
├───src/
    ├───app/
        ├───abstract/
        ├───commands/
        ├───const/
        ├───decorators/
        ├───guards/
        ├───handlers/
        ├───models/
        ├───services/
+       ├───entry.bot.ts
+       └───shard.bot.ts

```

I recommend renaming your main entry file where you call `client.login(TOKEN);` to `entry.bot.ts` you can rename it to whatever you'd like just make sure you know that file is where the bot starts. Next you'll need to make a new `shard.bot.ts` file. Again you can name it whatever as long as you know this file is where we will handle sharding.

You don't need to change anything in the `entry.bot.ts` file. The magic will be in the `shard.bot.ts` file.

:::tip
Read the [discord.js sharding docs](https://discordjs.guide/sharding/).
:::

You will make a new class in the `shard.bot.ts` file. I have named my class ShardBot

```typescript
export class ShardBot {}
```

Inside this class I have defined a `static start` method that gets called outside of the ShardBot class.

```typescript
export class ShardBot {
  static start(): void {}
}

ShardBot.start();
```

Now that we have the main bits of the Sharding class we need to use the discord.**js** `ShardingManager` to spawn a shard.

```typescript
import { ShardingManager } from "discord.js";
import { environment } from "../../environments/environment";

export class ShardBot {
  static start(): void {
    const manager = new ShardingManager("./src/build/src/app/entry.bot.js", {
      token: environment.DISCORD_TOKEN,
    });

    manager.on("shardCreate", (shard) => {
      console.log(`Launched shard ${shard.id}`);
    });

    manager.spawn();
  }
}
ShardBot.start();
```

The main thing to note here is that the path in the Instantiation of the `ShardingManager` has the path to the `entry.bot.js` file and not the `.ts` file. The sharding manager requires the bot file to be a `.js` file. This is why you need to ensure you can compile your bot with `tsc`.

The path in there may also be different for your bot so make sure you have the correct path!

## Running

Now that your bot compiles and has the shard file we can run the bot with the sharding class.

`node build/app/shard.bot.js`

will start the shard here.

:::warning
Make sure you provide the correct path to the shard file when running with node.
:::

Once it starts up you should see

```
Launched shard 0
```

in the console.

## That's it

Congrats! Your bot is now using the sharding managers. You can still run the entry file instead of the shard file if you don't want to use sharding until it is needed.


text:
## :bell: Details

This project was based on a hackaton theme to solve an information security problem. With this we created a validation prior to the payment process to identify the person who is buying the product with facial recognition. The pitch of the business you can see here

[youtube]: https://www.youtube.com/watch?v=8ivHBElRf5g&feature=youtu.be

Using Laravel we can use the Inversion of Control and Dependency Injection patterns that facilitate maintenance and code writing following standards.

  Technologies   |
  License

![App Screenshot](https://website.app2u.co/images/screens/screenshot_home.png)

## :computer: Technologies
This project was developed with the following technologies:

- [Laravel](https://laravel.com/)
- [Package aws-sdk-php](https://github.com/aws/aws-sdk-php)
- [VS Code][vscode] with [EditorConfig][vceditconfig]

## :memo: License

This project is under the MIT license. See the [LICENSE](https://github.com/frf/token-recognition-laravel-hackaton/blob/master/LICENSE) for more information.

---

Made with ♥ by Fabio Farias :wave: [Get in touch!](https://linkedin.com/in/fabiorochafarias/)

[vscode]: https://code.visualstudio.com/
[vceditconfig]: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
[vceslint]: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
[icons]: https://gist.github.com/rxaviers/7360908

repository: frf/token-recognition-laravel-hackaton

repo_name: frf/token-recognition-laravel-hackaton