text:
# 1 Rules Overview

## Categories

- [Big Category](#big-category) (1)

## Big Category

### SomeRector

Some change

- class: `Symplify\RuleDocGenerator\Tests\DirectoryToMarkdownPrinter\Fixture\Rector\Standard\SomeRector`

```diff
-before
+after
```

repository: sean-ww/symplify

repo_name: sean-ww/symplify


text:
# Smart Dustbin
IoT based garbage monitoring system using NodeMCU, Ultrasonic HC-SR04 Sensor & Thingspeak. <br/>
I've written a **[blog post](https://ozgecinko.medium.com/ak%C4%B1ll%C4%B1-%C3%A7%C3%B6p-iot-projesi-%C3%B6zge-%C3%A7inko-b59d548dff7a)** about Smart Dustbin.

### Circuit Diagram
![homePage](https://i.hizliresim.com/BqDXyd.jpg)

## Setup
### Project Clone
```
git clone https://github.com/ozgecinko/SmartDustbin_IoT.git
```

### References
- [IoT Based Garbage Monitoring System](https://electronics-project-hub.com/iot-based-garbage-monitoring-system)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
## Credits

Built with [Laravel](https://laravel.com/) and the Sv443 [JokeAPI](https://github.com/Sv443/JokeAPI)

## License

Licensed under the [MIT license](https://opensource.org/licenses/MIT).

## Deploy

[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/jonathanbossenger/devdadjokes/tree/main)

repository: jonathanbossenger/devdadjokes

branch_name: refs/heads/main

gha_language: PHP

repo_name: jonathanbossenger/devdadjokes


text:
---
layout: default
---

# 1996-10-18 - Re: Anonymous Auth Certificates [was: Re: Blinded Identities]

## Header Data

From: Hal Finney<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 9b0b72f3c4468595eda23c06e1d3ab0cebbfae2de7aa0ac93f328988ed6577a7

Message ID: \<199610181520.IAA05554@crypt\>

Reply To: _N/A_

UTC Datetime: 1996-10-18 15:21:12 UTC

Raw Date: Fri, 18 Oct 1996 08:21:12 -0700 (PDT)

## Raw message

```
{% raw  %}From: Hal Finney<EMAIL_ADDRESS>Date: Fri, 18 Oct 1996 08:21:12 -0700 (PDT)
To<EMAIL_ADDRESS>Subject: Re: Anonymous Auth Certificates [was: Re: Blinded Identities]
Message-ID: <199610181520.IAA05554@crypt>
MIME-Version: 1.0
Content-Type: text/plain

From<EMAIL_ADDRESS>(Steve Schear)
> It seems that one crux of the problem revolves around the CA and its method
> of certificate issuance.  A CA which uses biometric data to
> reduce/eliminate the chance that an applicant could get several, unrelated,
> certificates issued would provide a basis for negative authentication
> (similar to a negative credit file).

Yes, biometric data is another way of preventing multiple credentials.
However it will not work well in electronic form.  What you'd need would
be a network of stations to take fingerprints and give credentials,
("is a person" credentials) which would then be used for getting access
to other services where you're supposed to only use them once (voting
for example).  This requires a fairly elaborate infrastructure and social
commitment to this solution to the problem.

Somehow too it is hard to see how to sell a system as a privacy enhancement
when its first step is to take fingerprints of the whole country.  "But
we're not saving your names, honest!"  I don't know if it would fly.

Tim May argues that alternative solutions which are more local will be
better.  In the case of the abuse situation, maybe you could just have
people put down a deposit of $100 or so.  Then they get an anonymous
credential which they can use for access.  If they abuse their access,
their credential gets disabled.  As long as their abuse is worth less
than the deposit you'll be OK.  And at any point they can turn in their
valid credential and get their money back.  No identities are needed at
any point in the scheme.

> A one-way function performed, by the client, on their certificate from this
> CA would yield a token which unambiguously binds it to a valid certificate
> of the CA (and therefore uniquely identifies them) w/o revealing the
> certificate itself.

Actually I think you need to use a blinding protocol when you acquire
the certificate, rather than trying to run a one-way function on the
unblinded cert.  The output of a one-way function looks random and
meaningless unless you supply the input.  And if the input identifies
the user then you've lost the anonymity.

Hal

{% endraw %}
```

## Thread

+ Return to [October 1996](/archive/1996/10)

+ Return to "[Hal Finney <hal@rain.org>](/authors/hal_finney_hal_at_rain_org_)"
+ Return to "["Timothy C. May" <tcmay@got.net>](/authors/timothy_c_may_tcmay_at_got_net_)"

+ 1996-10-18 (Fri, 18 Oct 1996 08:21:12 -0700 (PDT)) - Re: Anonymous Auth Certificates [was: Re: Blinded Identities] - _Hal Finney<EMAIL_ADDRESS>  + 1996-10-18 (Fri, 18 Oct 1996 10:23:17 -0700 (PDT)) - [Identity is Just Another Credential...](/archive/1996/10/0e498e553ec597bbc37d0f804cedf1523f0efc9537503dc47e674c84c79b763d) - _"Timothy C. May"<EMAIL_ADDRESS>  + 1996-10-18 (Fri, 18 Oct 1996 12:31:20 -0700 (PDT)) - [Re: Identity is Just Another Credential...](/archive/1996/10/32af5966573ebc6aa4f2615958ff01e333ac278d1dd3d4e2eba5ad45079c096e) - _"Timothy C. May"<EMAIL_ADDRESS>

gha_license_id: MIT


text:
# TextGrid-SyllableTier-Injector
This library takes an English Forced Aligned textgrid and adds a Syllable tier beased on the phones present in it.

## Project Scope
Speach to Text Forced Aligner tools like [Montreal Forced Aligner](https://github.com/MontrealCorpusTools/Montreal-Forced-Aligner) generates output as a [TextGrid](http://www.fon.hum.uva.nl/praat/manual/TextGrid_file_formats.html) file which can be viewed using [Pratt](http://projects.chass.utoronto.ca/ngn/pdf/TextGrid_creation_Praat.pdf).

Generally Forced Aligned TextGrid contains information about phones. However, for prosidic analysis of speech corpus **syllable** information in the forced align TextGrid becaomes very useful.

This library allows users to add an extra tier in Forced Aligned textgrid that contains Syllable information. The library currently works for english.

## Getting Started

Clone the project and refer [how_to_use.py](how_to_use.py) for sample code of how to use.

You can also use the following code for the same.

```
# Sample python script to demonstrate how to use the Text Grid Syllable Tier Injector Tool
from textGridSyllableTierInjector import insertSyllableTierInTextGrid

insertSyllableTierInTextGrid('<Input Forced Aligned TextGrid file name>','<Output TextGrid file name>')

```

### Prerequisites

This library depends on the following libraries

- [tqdm](https://pypi.org/project/tqdm/)
- [TextGrid](https://github.com/kylebgorman/textgrid)

### Installing

Intall tqdm -
```
pip install tqdm
```
Intall TextGrid

```
pip install textgrid
```

End with an example of getting some data out of the system or using it for a little demo

## Running the script

Execute the how to use python file.

```
python how_to_use.py
```

## Authors

**Arundhati Sengupta** - *Initial work* - [Othergreengrasses](https://github.com/Othergreengrasses)

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

## Ackowledgements
[CMU Dict](https://webdocs.cs.ualberta.ca/~kondrak/cmudict.html) - Susan Bartlett, Grzegorz Kondrak and Colin Cherry. On the Syllabification of Phonemes. NAACL-HLT 2009
[TextGrid](https://github.com/kylebgorman/textgrid) - Kyle Gorman

gha_language: Python


text:
# API Platform ActivityPub

⚠ This project is highly experimental, it isn't suitable for production yet ⚠

API Platform ActivityPub is a bundle for [the API Platform framework](https://api-platform.com) and
[Symfony](https://symfony.com) providing support for [the ActivityPub protocol](https://www.w3.org/TR/activitypub/) and
for [the ActivityStreams vocabulary](https://www.w3.org/TR/activitystreams-core/).

> The ActivityPub protocol is a decentralized social networking protocol.
> It provides a client to server API for creating, updating and deleting content, as well as a federated server to
> server API for delivering notifications and content.

API Platform ActivityPub allows to easily add support for ActivityPub to new or existing API Platform projects,
while still being able to benefit from all API Platform features (yes, including [Mercure](https://mercure.rocks),
[Vulcain](https://vulcain.rocks) and GraphQL!)

## Install

## Install API Platform or Symfony

If it's not already done!

### Install the Bundle

    composer require api-platform/activity-pub

### Generate the ActivityPub Entities

Install [API Platform Schema Generator](https://api-platform.com/docs/schema-generator/):

    composer require --dev api-platform/schema-generator

Alternatively, you can download the PHAR version.

⚠ Currently, [this development version](https://github.com/api-platform/schema-generator/pull/204) must be used to generate the schema

Then generate the entities:

    ../schema-generator/bin/schema generate src vendor/api-platform/activity-pub/build/schema.yaml

If you want to tweak the generated files, copy and adapt the provided configuration file.
The generation is a one time operation, then you can edit the entities to fit your need and remove `api-platform/schema-generator`.

### Configure Doctrine, API Platform and Symfony

See the test configuration in [`tests/app/index.php`](tests/app/index.php)

## TODO

### Spec

* [ ] MUST (security): [Filter inbox and outbox according to current permissions](https://www.w3.org/TR/activitypub/#delivery)
* [ ] MUST (security): [Don't disclose BTO/BCC to other users](https://www.w3.org/TR/activitystreams-vocabulary/#audienceTargeting)
* [ ] MUST: [Support other activities with side effects than `Create`](https://www.w3.org/TR/activitypub/#server-to-server-interactions)
* [ ] MUST: [Handle the case when recipients are collections](https://www.w3.org/TR/activitypub/#delivery)
* [ ] MAY: [Liked Collection](https://www.w3.org/TR/activitypub/#liked)
* [ ] MAY: [Likes Collection](https://www.w3.org/TR/activitypub/#likes)
* [ ] MAY: [Shares Collection](https://www.w3.org/TR/activitypub/#shares)
* [ ] MAY: [Shared Inbox Delivery](https://www.w3.org/TR/activitypub/#shared-inbox-delivery)

### Other / Related

* [ ] MUST (security): [Add support for HTTP signatures](https://tools.ietf.org/html/draft-ietf-httpbis-message-signatures)
* [ ] [Add support for WebFinger](https://tools.ietf.org/html/rfc7033)

### Code

* [ ] See the TODOs in the source code
* [ ] Open source (and / or rewrite) the tests
* [ ] Add interfaces for `final` classes
* [ ] Create a Symfony recipe
* [ ] Add support for MySQL and other DBMS (currently only Postgres is supported because of [this custom DQL function](src/Doctrine/JsonbAtGreater.php))

# Credits

Created by [Kévin Dunglas](https://dunglas.fr). Sponsored by [Les-Tilleuls.coop](https://les-tilleuls.coop).

repository: ernestwisniewski/activity-pub

repo_name: ernestwisniewski/activity-pub


text:
docker-py3cx
====

base from python:3.5.6

### 1. prepare oracle instantclient

download instantclient zip file from [oracle](https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html?ssSourceSiteId=otncn).

unzip instantclient.zip to `instantclient` directory .

The `instantclient` looks like this.
```text
.
├── adrci
├── BASIC_README
├── genezi
├── libclntsh.so.11.1
├── libnnz11.so
├── libocci.so.11.1
├── libociei.so
├── libocijdbc11.so
├── ojdbc5.jar
├── ojdbc6.jar
├── uidrvci
└── xstreams.jar
```

### 2. run docker container for test

```bash

docker run -it --rm -v $(pwd)/instantclient:/data/instantclient bonashen/py3cx bash

```

### 3. build custom image

Dockerfile looks like this.

```Dockerfile

FROM bonashen/py3cx

MAINTAINER yourname<EMAIL_ADDRESS>
COPY instantclient /data/instantclient

# copy python app code
COPY app /app

CMD ["python3"]

```

build custom image

```bash

docker build -t yourname/custom .

```


text:
# Deploying a Load Balance Sandwich with FTD Firewall
This folder includes an ARM template called ftd.sandwitch.json to deploy a load-balanced set of FTD firewall into an existing network. Using this template, you can protect north-south, east-west and outbound traffic.

There is also a sample parameters file ftd.sandwich.parameters.json that can be modified as needed, and then used with this template.

## Use cases
The ARM template covers three use cases:
* Multiple FTD firewalls in a single AZ (load balanced sandwich)
* Multiple FTD firewalls (load balanced sandwich)
* Standalone FTD firewalls (with load balancers for extensibility)

## Key features of this template
The ARM template ftd.json has the following features
* You can deploy the FTD firewalls into a resource group that already has resources in it.
* You specify:
  - The number of FTD firewalls in the sandwich

  - The number of availability zones to spread the FTD firewalls across. You can enter 0 for the number of zones to avoid zone assignment.
* You must specify the frontend private IP address of the internal load balancer (ILB).
* All private IP addresses on the FTD firewalls are configured dynamically.
* The management and outside data interfaces are assigned distinct NSGs.
* The NSGs and VNet, along with four subnets, must already exist.
* The template only creates and associates public IP addresses for the management interface of each FTD firewall.
* Both IP forwarding and accelerated networking are enabled, but only on the data interfaces.

## Availability Zones
One of the parameters in the template specifies the number of Availability Zones.  The firewall instances will be distributed among the Availability Zones using round-robin.
For example, if you select 2 for the number of Availability Zones and 5 for the number of firewalls:
* Availability Zone 1 will contain firewall instances 1, 3 and 5.
* Availability Zone 2 will contain firewall instances 2 and 4.

Note that some regions only support two Availability Zones, and some regions do not have Availability Zones.
If you do not want to use availability zones, set the number of Availability Zones to 0.

## A note on software versions and instance types.
Software versions and supported instance types frequently change. To avoid the need to edit the template, two parameters were created:
* Software Version Other
* VM Size Other

These parameters can be used to override the drop-down lists for Software Display Version and VM Size.

To override a parameter, select Other from the drop-down list. You can run the Azure CLI command:

az vm image list --all --publisher cisco --offer cisco-ftdv -o table

to see the current available versions.

Be sure to check Cisco documentation for supported sizes. Be aware that not all regions support the same sizes.

## Resources created by the template
This template creates the following resources. Here the number N represents the number of FTD firewalls
* Two load balancers
  - A public load balancer with TCP port 22 probe and two sample load-balancing rules: HTTP and HTTPS
  - An internal load balancer with TCP port 22 probe and one HA Port load-balancing rule to load balance all ports and protocols
* N+1 public IP addresses
  - One for the public load balancer
  - One for the management interface of each FTD firewall
* 4N network interfaces: four for each firewall
* N storage accounts: one for each firewall
* N disks: one for each firewall
* N FTD firewall virtual machines

## Sample deployment

In this deployment the service VNet is the hub of a hub-and-spoke datacenter topology. Only one spoke is shown in the figure. Each spoke uses VNet peering to communicate to the service VNet. An Azure route table must be deployed to handle north-south return traffic, as well as east-west and outbound traffic. This route table must be associated with every subnet in the spoke. The following is a typical route table:

Here the inside internal load balancer has frontend IP address <IP_ADDRESS> and the route table is associated with three subnets in the spoke. The spoke VNet CIDR is <IP_ADDRESS>/16. Note that you need two routes: the default route for north-south and outbound traffic (and inter-spoke traffic, if other spokes exist), and an additional route for intra-spoke east-west traffic within the spoke VNet.  Without the additional route the intra-spoke east-west traffic will bypass the FTD firewall do to effective (implicit) Azure routing.

The routing table above is for a single spoke.  If there are additional spokes or on-premise traffic that needs inspection, additional routes must be added.

## Prerequisites
Here are the Azure prerequisites for deploying this resource.
* A VNet with four subnets. This VNet may be in any resource group.  The subnets correspond to the four interfaces on the FTD firewall:
  - (Nic0) Management: used for SSH access and FMC access to the FTD firewall
  - (Nic1) Diagnostic: typically not used, but can be used for SNMP or Syslog
  - (Nic2) Outside: used as the ingress and egress the Internet
  - (Nic3) Inside: used for access to and from internal servers
* An NSG to allow inbound access to the management interface from the FMC on TCP port 8305 and SSH access from the appropriate IP addresses
* An NSG to allow inbound access to the outside interface for the ports and protocols you wish to expose.

This folder includes ARM templates for two sample NSGs.
* An NSG to allow TCP port 8305 and SSH inbound access. This can be associated to the management interface when deploying the template. You should limit the source IP addresses in this NSG for security reasons.
* An NSG to allow HTTP and HTTPS inbound access. This can be associated to the outbound interface when deploying the template. You should modify this list of services as is appropriate for the targets of the north-south traffic

## Workflow
1. Create or select a VNet with at least four subnet.
2. Create or select an NSG to control management access to the FTD firewall.
3. Create or select an NSG to control north-south access to the FTD firewall.
4. (optional) Create a parameters file.
5. Deploy the ARM template.

## Important information about SSH key (no password) access
The following is important information if you configure SSH Key authentication for SSH access.
Because on limitation to Azure Linux deployment:
* The .ssh directory is placed in the alternative user's home directory (altUser), but not the admin user's home directory.
* Modifications are made to /etc/ssh/sshd_config that disable password authentication, so the admin user has no way to SSH to the FTD firewall.
To address these issues:
A. Log into the FTD via SSH as the alternative user, using the private key corresponding to the public key entered into the template.
B. Type su - admin. When prompted, enter the admin password for the FTD firewall.
C. Type expert, and enter the admin password when prompted.
D. Type sudo -i, and enter the admin password when prompted.
E. Enter the following commands:
    cp -R /home/*/.ssh/ /home/admin/
     chown -R admin /home/admin/.ssh
     chgrp -R admin /home/admin/.ssh

You should not exit the FTD firewall until you have confirmed SSH admin access using the SSH key.
To revert to password authentication, the line:
PasswordAuthentication no
added near the end of /etc/ssh/sshd_config, should be removed and ssHd should be restarted:
  /etc/rc.d/init.d/sshd restart


text:
# angular-satellite
An angular publish / subscribe library that promotes event channels as duck-typed methods

  Provides a high level api for managing angular publish / subscribe events in a mor uniform way. It makes use of the global
  $rootScope object (single point of entry for any controller, service, directive in a single angular application) to abstract event
  subscriptions under duck-typed methods. That way we keep our event namepsaces clean and uniform.

 For example

 ## Without Angular Satellite
```javascript
       //content of myController.js
       function myController($scope, $rootScope) {
           var clean = function () { ...do some cleanup }
           $scope.exit = function () {
               $rootScope.$broadcast('exit:button:click', clean)
           };
       }

       //content of  myDirective.js
       function myDirective() {
           return {
               restrict: 'A',
               link: function () {
                   $rootScope.on('exit:button:click', function ($event, cleanUp) {
                       cleanUp() //do some cleanup
                   })
               }
           }
       }
```

 ##With Angular Satellite
 ```javascript
       //content of myController.js
       function myController($scope, Satellite) {
           Satellite.setupTransponder('popup', 'exit');
           var clean = function () {//...do some cleanup}
           $scope.exit = function () {
               Satellite.popup.transmit.exit(clean)
           }
       }

       //content of  myDirective.js
       function myDirective(Satellite) {
           return {
               restrict: 'A',
               link: function () {
                   Satellite.popup.receive.exit(function (cleanUp) {
                       cleanUp() //do some cleanup
                   })
               }
           }
       }
```

  See more examples at ../tests/satellite.html

repository: gdmerm/angular-satellite

repo_name: gdmerm/angular-satellite


text:
# ethereum-oracle
This project intends to create a trustable oracle for the ethereum blockchain on ropsten.

### Requirements:
- [yarn](https://yarnpkg.com) or [npm](https://www.npmjs.com/)
- [truffle](https://www.trufflesuite.com/truffle)
- [ganache-cli](https://github.com/trufflesuite/ganache-cli)

### How to Run the project:
- go in the folder "off chain oracle"
- open this folder in terminal
- create a .secret file in this folder and enter mnemonic in it
- run command: npm install
- run command: npm run develop

### Basic Information About Project:
- On chain = Blockchain
- Off chain = Outside of blockchain i.e normal internet
- See the Smart Contract on Ethereum Network: https://ropsten.etherscan.io/address/0x482c0d79dd8d2fc0ff72985acf28d6d2c522560e#code

### Versions of softwares:
- Truffle v5.1.60 (core: 5.1.60)
- Solidity v0.5.16 (solc-js)
- Node v14.15.3
- Npm v6.14.9
- Web3.js v1.2.9

## Contact Me:
-<EMAIL_ADDRESS>- +923014440289 Whatsapp / Call / SMS
- Blockchain Developer

license: Unlicense


text:
---
layout: default
---

# 1996-10-09 - Re: Government Denial of Service Attacks

## Header Data

From: Julian Assange<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Duncan Frissell)

Message Hash: 8834f9700b9927cc7ad0409d9eeddaa21603f1cb6493aa07b0b383504d423a38

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-10-09 06:57:08 UTC

Raw Date: Wed, 9 Oct 1996 14:57:08 +0800

## Raw message

```
{% raw  %}From: Julian Assange<EMAIL_ADDRESS>Date: Wed, 9 Oct 1996 14:57:08 +0800
To<EMAIL_ADDRESS>(Duncan Frissell)
Subject: Re: Government Denial of Service Attacks
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text

> "During Fiscal 1996, the Government of the United States collected more
> taxes from the American people than any government had ever collected
> before in the history of mankind.  During Fiscal 1997, the Government of
> the United States plans to collect more taxes from the American people than
> any government has ever collected before in the history of mankind.  And
> still it's not enough."
>

I will not coment on the correctness of the U.S government's funding
allocations, however the above statement is clearly designed to be
deceptive. Given the GDP of the U.S as a whole during fiscal 1996 was
greater than that of any other country at any other time, including the
U.S in previous years (the U.S like most other countries has postive
growth), of course the absolute value of taxes collected will be larger.

--
"Of all tyrannies a tyranny sincerely  exercised for the good of its victims
 may be the most  oppressive.  It may be better to live under  robber barons
 than  under  omnipotent  moral busybodies,  The robber baron's  cruelty may
 sometimes sleep,  his cupidity may at some point be satiated; but those who
 torment us for own good  will torment us  without end,  for they do so with
 the approval of their own conscience."    -   C.S. Lewis, _God in the Dock_
+---------------------+--------------------+----------------------------------+
|Julian Assange RSO   | PO Box 2031 BARKER | Secret Analytic Guy Union        |
<EMAIL_ADDRESS> | VIC 3122 AUSTRALIA | finger for PGP key hash ID =     |
<EMAIL_ADDRESS>| FAX +61-3-98199066 | 0619737CCC143F6DEA73E27378933690 |
+---------------------+--------------------+----------------------------------+

{% endraw %}
```

## Thread

+ Return to [October 1996](/archive/1996/10)

+ Return to "[Duncan Frissell <frissell@panix.com>](/authors/duncan_frissell_frissell_at_panix_com_)"
+ Return to "[Julian Assange <proff@suburbia.net>](/authors/julian_assange_proff_at_suburbia_net_)"
+ Return to "["Vladimir Z. Nuri" <vznuri@netcom.com>](/authors/vladimir_z_nuri_vznuri_at_netcom_com_)"

+ 1996-10-09 (Wed, 9 Oct 1996 09:27:20 +0800) - [Government Denial of Service Attacks](/archive/1996/10/21ecd6cb1e5e5d0c7d8195b4ec989f34fc6c3f1f6a88873c442ba2673e70a269) - _Duncan Frissell<EMAIL_ADDRESS>  + 1996-10-09 (Wed, 9 Oct 1996 14:57:08 +0800) - Re: Government Denial of Service Attacks - _Julian Assange<EMAIL_ADDRESS>  + 1996-10-09 (Wed, 9 Oct 1996 11:54:10 -0700 (PDT)) - [Re: Government Denial of Service Attacks](/archive/1996/10/e4bda557ae7a0ede617e79a14431da09e311b046565ff7333f22c3761128c6e5) - _"Vladimir Z. Nuri"<EMAIL_ADDRESS>


text:
+++
description = "Less than a year: a brief outline of Speckle's journey so far."
date = "2017-12-29T13:08:41+01:00"
title = "Speckle's 2017 Roundup"
showtoc = "false"
comments = "true"
headerimg = "img/blog/speckleserver.png"
author = "Dimitrie Stefanescu"
twitter = "idid"
+++
## Intro

The domain name for Speckle.Works was registered around March 2016. This means the end of 2017 catches us approximatively 9 months into speckle's life. As some of you may know, this is not _really_ accurate - this incarnation of speckle is built on lessons learned in the three previous ones: [speckle.xyz](http://speckle.xyz), [beta speckle](http://beta.speckle.xyz) and [speckle streams](http://streams.speckle.xyz), with the first going back to late 2015.

Below is a roundup of the last few months. This is not, by all means, an exhaustive list! There's many rumblings and churns, most of it geared towards a better user space and some technical debt elimination (coupled with, obviously, introduction of new technical debt).

## Rhino Plugin

There has been a lot of work going towards the Rhino Plugin (5 & 6), which now needs some final polish before release. Code is shared, and in theory it should be workable on Rhino for Mac with minimal changes.

Furthermore, since the UI is a completely separate layer based on VueJS (yes, in .NET! running in a browser!), bits and pieces could be used to jumpstart development for other CAD platforms - kudos to Luis for having the courage to embark us on this road!

So far, it looks good and it feels good: we hope this will entice people in the future to share and parcel their data. Some of us don't scale well on Grasshoppers.

## Code Consolidation

A big and invisible update: The .NET Rhino and Grasshopper plugin have been consolidated into one monorepo with the help of [@Will Pearson](https://twitter.com/pearswj) and [@Luis Fraguada](https://twitter.com/luisfraguada). They have also set up a CI build system which makes development much more *consistent* and will hopefully lead to a proper release cycle and plugin packaging.

Furthermore, as a guarantee to Speckle's openness, all code repositories have moved under a [github organisation](https://github.com/speckleworks) that is open to membership if you have something to contribute. Just ask!

## (Building) Information Modeling

In response to industry feedback (sounds so formal - let's call them solid chats with peeps doing _real stuff_!), Speckle Core has gotten a really sweet update to support Abstract Objects of any type and nature (within reason),  thus paving the way for a truly schema agnostic future that does not compromise on transparency or flexibility. You can [read more about it here](/blog/schemasandstandards).

Furthermore, [Paul](https://twitter.com/paul_dotnet) is looking into bringing the data richness agenda into main stream Rhino, to lower the bars for efficient intelligent design data communication. Expect news soon, right @paul_dotnet? No pressure.

## Speckle Core

Speckle Core (.NET) has steadily improved - and will most probably continue to do so. It's now more modular and accessible, and it's a good low level foundation for building plugins, to the extent you can do them straight away in [c# scripting nodes in grasshopper](/doc/specklehacks/)!

One thing that didn't make it on this list: _proper  namespacing_. But you know, naming things is hard.

## Blender!

Just before holidays, we've seen Blender added to the future of Speckle: [Tom Svilans](https://twitter.com/spilans) has published an initial sketch of a [Speckle client](https://github.com/tsvilans/bpy_speckle)! I have no idea how it works, having never taken Blender beyond sub-d-ing a cube around, but this is definitively exciting!

## Community: 120+ people!

The Slack group has grown from its meager beginnings when Luis set it up for me and him to coordinate better to a behemoth of **120+ people**. Thank the fortunes not everyone's talking at the same time!

Keep on ignoring the warnings that we need to start paying - we'll get there, and we will hopefully find a way to circumvent and keep on spamming each other with amazing emojis.

## Speckle 003

Speckle also got its first (now outdated) version release - [003](/blog/specklerelease3/), that  introduced many goodies, like a more powerful API, queries, diffing, a new stream viewer ui with sliders, etc.

## Going forward

What has been proven so far is that it's possible: we can have an open source design communication platform that is owned by its users. It's a lot of work!

repository: speckleworks/speckleworks-website

gha_language: CSS

repo_name: speckleworks/speckleworks-website


text:
# book_app

**Author**: Adrienne Easton and Richard von Hagel
**Version**: 1.0.0

## Overview
<!-- Provide a high level overview of what this application is and why you are building it, beyond the fact that it's an assignment for a Code 301 class. (i.e. What's your problem domain?) -->

## Getting Started
<!-- What are the steps that a user must take in order to build this app on their own machine and get it running? -->

## Architecture
<!-- Provide a detailed description of the application design. What technologies (languages, libraries, etc) you're using, and any other relevant design information. -->

## Change Log
Number and name of feature: 11.1 Scaffolding a site for EJS templating.

Estimate of time needed to complete: _____

Start time: _____

Finish time: _____

Actual time needed to complete: _____

01-01-2001 4:59pm - Application now has a fully-functional express server, with GET and POST routes for the book resource.

Number and name of feature: 11.2 Create form in index.ejs file.

Estimate of time needed to complete: _____

Start time: _____

Finish time: _____

Actual time needed to complete: _____

01-01-2001 4:59pm - Application now has a fully-functional express server, with GET and POST routes for the book resource.

Number and name of feature: 11.3 Display book search reslults for browsing.

Estimate of time needed to complete: _____

Start time: _____

Finish time: _____

Actual time needed to complete: _____

01-01-2001 4:59pm - Application now has a fully-functional express server, with GET and POST routes for the book resource.

Number and name of feature: 11.4 Create error handler.

Estimate of time needed to complete: 30 mins

Start time: 1:15pm

Finish time: 1:55pm

Actual time needed to complete: 40 mins

05-11-2001 1:55pm - Application now has a fully-functional error handler.

Number and name of feature: 11.5 Initial styling to make site easier to use.

Estimate of time needed to complete: _____

Start time: _____

Finish time: _____

Actual time needed to complete: _____

01-01-2001 4:59pm - Application now has a fully-functional express server, with GET and POST routes for the book resource.

Number and name of feature: 11.6 Completely style the site according to wireframe specifications.

Estimate of time needed to complete: _____

Start time: _____

Finish time: _____

Actual time needed to complete: _____

01-01-2001 4:59pm - Application now has a fully-functional express server, with GET and POST routes for the book resource.

Number and name of feature: ________________________________

Estimate of time needed to complete: _____

Start time: _____

Finish time: _____

Actual time needed to complete: _____

01-01-2001 4:59pm - Application now has a fully-functional express server, with GET and POST routes for the book resource.
## Credits and Collaborations
<!-- Give credit (and a link) to other people or resources that helped you build this application. -->

-->

gha_language: HTML


text:
# Whats new in this fork?
* Parsing YAML file instead of JSON
* Fixed duplicit imports when a required sub-model is used multiple times
* Generating dummy constructors instead of plain objects
* Using Handlebars instead of Mustache
* After all, I disabled the service generator alltogether as
  we have to handle way too many special cases on our own.

# Installing
Just install it using
`npm i -g kub1x/angular2-swagger-apiclient-generator`
and use it with:
`npm run cleangen && npm run apigen`
where (in `package.json` file):
```
"cleangen": "npm run rimraf -- src/app/apigen",
"apigen": "a2apigen -s swagger.yaml -o src/app/apigen"
```

# ORIGINAL DOCUMENTATION: angular2-swagger-apiclient-generator
Angular 2 API client generator from swagger json

# Description
This package generates a angular2 typescript class from a swagger v2.0 specification file. The code is generated using mustache templates.

# How to get it working

## Installation
1. `npm install angular2-swagger-client-generator`

or

1. get it from github `git clone https://github.com/nvdnkpr/angular2-swagger-client-generator`
1. `cd angular2-swagger-client-generator`
1. `npm install`
1. `npm run build`

## Usage

From commandline run:
```
a2apigen -s [yopur/path/to/swagger.json]
```

or
```
a2apigen -u [url/of/your/swagger.json]
```

## Example usage:

This command will generate API client described in swagger.json file to ./out folder
```
a2apigen -s .\tests\apis\swagger.json -o ./out
```

or from repository directory run:
```
node ./src/main -s .\tests\apis\swagger.json -o ./out
```

##Note:
This project was inspired by:

[swagger-js-codegen](https://github.com/wcandillon/swagger-js-codegen) project


text:
---
title: How to use information from HttpContext in Custom Report Resolver
description: How to copy the needed information from HttpContext to UserIdentity.Context
type: how-to
page_title: Pass HttpContext items to reporting engine
slug: how-to-pass-information-from-httpcontext-to-reporting-engine
position:
tags:
ticketid: 1173333
res_type: kb
---

## Environment

		Product Version
		12.1 18.620 - <IP_ADDRESS>

		Product
		Progress® Telerik® Reporting

		.NET Framework
		.NET 4+

## Important Note
From [R1 2019 SP1 (<IP_ADDRESS>)](https://www.telerik.com/support/whats-new/reporting/release-history/progress-telerik-reporting-r1-2019-sp1-13-0-19-222) the _HttpContext_ may be accessed directly in the Custom Report Resolver.

## Description
Starting with [R1 2018 SP3 <IP_ADDRESS>6](https://www.telerik.com/support/whats-new/reporting/release-history/telerik-reporting-r1-2018-sp3-12-0-18-416) version, _System.Web.HttpContext.Current_ is no longer available in the report rendering thread.

Removing _HttpContext.Current_ in the report rendering thread was a necessary change. Its purpose was to allow the rendering engine to use a dedicated rendering thread queue with configurable count, which should significantly improve product's performance.

## Solution
To access the current user context, you can use the [Telerik.Reporting.Processing.UserIdentity.Current](/api/telerik.reporting.processing.useridentity#collapsible-Telerik_Reporting_Processing_UserIdentity_Current) static property. It is also possible to use the new [UserIdentity ]({%slug telerikreporting/designing-reports/connecting-to-data/expressions/expressions-reference/global-objects%}#useridentity)object in the expression context as a global object: _=UserIdentity_.

With the changes introduced in [Telerik Reporting <IP_ADDRESS>0](https://www.telerik.com/support/whats-new/reporting/release-history/progress-telerik-reporting-r2-2018-sp1-12-1-18-620) it is possible to use the [UserIdentity.Context](/api/telerik.reporting.processing.useridentity#collapsible-Telerik_Reporting_Processing_UserIdentity_Context) property to store user objects (for example from the _HttpContext_).
**UserIdentity.Context** can be filled up with the needed values in the _ReportsController_ by overriding the **GetUserIdentity()** method. Here is a sample code :

```CSharp
// include in the ReportsController class

protected override UserIdentity GetUserIdentity()
{
    var identity = base.GetUserIdentity();
    identity.Context = new System.Collections.Concurrent.ConcurrentDictionary<string, object>();
    identity.Context["UrlReferrer"] = System.Web.HttpContext.Current.Request.UrlReferrer;

    // Any other available information can be stored in the identity.Context in the same way

    return identity;
}
```

The __UserIdentity.Current.Context\["UrlRefferer"\]__ should then be used (instead of _HttpContext.Current.Request.UrlReferrer_) to access the corresponding property/information.
For example, you can access the _UrlRefferer_ as :

```CSharp
// can be included in the Resolve() method of the Custom Report Resolver
Uri urlReferrer = (Uri)UserIdentity.Current.Context["UrlRefferer"];
```

## Note
By default accessing a user’s session from a web API is not possible. Attempting to call __HttpContext.Current.Session__ will always return __Null__.
For more information and a workaround check [Enabling session state in Web API](https://www.wiliam.com.au/wiliam-blog/enabling-session-state-in-web-api) blog post.

Specific solutions for MVC, Web Forms and .NET Core projects can be found in [Accessing Session Using ASP.NET Web API](https://stackoverflow.com/questions/9594229/accessing-session-using-asp-net-web-api) Stackoverflow thread.

repository: telerik/reporting-docs

gha_language: JavaScript

repo_name: telerik/reporting-docs


text:
# TikzCDs.jl

![Tests](https://github.com/JuliaTeX/TikzCDs.jl/workflows/Tests/badge.svg)
[![codecov](https://codecov.io/gh/JuliaTeX/TikzCDs.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaTeX/TikzCDs.jl)

A wrapper around [TikzPictures.jl](https://github.com/JuliaTeX/TikzPictures.jl)
for easier drawing of commutative diagrams using
[`tikz-cd`](https://www.ctan.org/pkg/tikz-cd)

### Dependencies

In order to use this library, `lualatex` must be installed.
You must also have `dvisvgm` installed.

On Ubuntu, you can get these, if not already present, by running:

```
$ sudo apt-get install texlive-latex-base texlive-binaries texlive-luatex
```

## Example

```julia
tp = TikzCD(L"""
A \arrow{rd} \arrow{r} & B \\
                       & C
""", options="scale=0.25")
```

For more usage details, check out the
[TikzPictures.jl repository](https://github.com/JuliaTeX/TikzPictures.jl).

## Quiver Support

You can use [Quiver](q.uiver.app) to draw your diagrams and then render them with TikzCD by taking the body of the tikzcd from the exported tex file.
The `QuiverCD` function will append the quiver.sty file to your TikzCD diagram.

```julia
using TikzCDs: Styles
triangle = L"""        A &&& Q \\
               \\
               &&& P
               \arrow["h", from=1-4, to=3-4]
               \arrow["f", from=1-1, to=1-4]
               \arrow["g"', from=1-1, to=3-4]
            """
tridiagram = TikzCD(triangle, preamble=Styles.Quiver)
```

gha_language: Julia


text:
Installation
============

You just need Python and `pip`:

    :::bash
    pip install d

You can use `easy_install` if you really want:

    :::bash
    easy_install d

`d` uses Markdown, Pygments, and Pyquery to do some of the heavy lifting.

repository: honza/d

extension: markdown

repo_name: honza/d


text:
# PiggieCoin [PIG]

Piggiecoin is a new coin based on Litecoin. You can mine it with your CPU or with your graphics card.

##Specifications

Scrypt Proof of Work

30 Seconds Block Targets, 3 Hour Diff Readjustments

Special reward system: Random block ultra high rewards

1-50,000: 0-10,000,000 PiggieCoin Reward

50,001 — 100,000: 0-5,000,000 PiggieCoin Reward

100,001 — 150,000: 0-2,500,000 PiggieCoin Reward

150,001 — 200,000: 0-1,250,000 PiggieCoin Reward

200,001 — 250,000: 0-625,000 PiggieCoin Reward

250,001 — 300,000: 0-312,500 PiggieCoin Reward

300,000+: 100,000 Reward (flat)

## How to build

    sudo apt-get install build-essential \
                         libssl-dev \
                         libdb5.1++-dev \
                         libboost-all-dev \
                         libqrencode-dev \
                         libminiupnpc-dev

    cd src/
    make -f makefile.unix USE_UPNP=1 USE_IPV6=1 USE_QRCODE=1

### Ports
RPC 28888
P2P 28889

## License
Piggiecoin is released under the terms of the MIT license. See [COPYING](COPYING)
for more information or see http://opensource.org/licenses/MIT.

repository: piggiecoin/piggiecoin

repo_name: piggiecoin/piggiecoin


text:
---
title: "Neither Grasshopper nor Ant: learning from DIY coding and from gaming [WIP]"
authors: [Ioanna Iacovides and Thomas R.G. Green]
abstract: "‘DIY’ coding for fun and gaming have more in common than seems to have been noticed, both notationally (no abstractions, no juxtaposability, etc) and in the user experiences (challenge, breakdowns, breakthroughs). We argue that some familiar claims about end-user programming, such as a need for domain-specific languages, do not apply to DIY coding, and that lightweight optional features such as ‘abstraction by accretion’ could help both DIY coders and gamers when the project grew too big."
publishedAt: ppig-2021
year: 2021
url_pdf: /files/2021-PPIG-32nd-iacovides.pdf
---


text:
# Email Templates

## Getting Started
We.Publish can render html templates for sending emails. We.Publish uses [Email-Templates](https://email-templates.js.org/#/) and the template engine [pug](https://pugjs.org).

## Email Types
* LoginLink - Mail to users with a link that automatically authenticates the user
* PasswordReset - Same as LoginLink
* NewMemberSubscription - Mail to new users after they subscribed
* RenewedMemberSubscription - Mail to users after they renewed their subscription
* MemberSubscriptionOffSessionBefore - Mail to users a week before credit card will be charged
* MemberSubscriptionOnSessionBefore - Mail to users a week before their payment is due
* MemberSubscriptionOnSessionAfter - Mail to user after the payment is due

## Templates
When creating an instance of `WepublishServer` you can pass an object called `mailContextOptions`. It has the following properties:
* `defaultFromAddress`: Default From address of the emails
* `defaultReplyToAddress`: Default Reply-to address of the emails
* `mailTemplateMaps`: List of email templates

`mailTemplateMaps` expects an array with template objects. The objects have the following structure:
```typescript
interface MailTemplateMap {
  type: SendMailType
  subject?: string
  fromAddress?: string
  replyToAddress?: string
  local: boolean
  localTemplate?: string
  remoteTemplate?: string
}
```

When creating templates you need to decide if you want to render the templates yourself or if the mail provider is handling/hosting the templates.

### Remote Templates
If the mail provider (mailgun / mailchimp) is handling the template you only need to set `type`, `subject`, `remoteTemplate` and `local`. The object could look like:
```javascript
const mailTemplate = {
  type: SendMailType.LoginLink,
  subject: 'New Login Link',
  remoteTemplate: 'loginLinkTemplate',
  local: false
}
```

### Local Templates
If We.Publish should render the templates you need to set a few more options.
```javascript
const mailTemplate = {
  type: SendMailType.LoginLink,
  localTemplate: 'loginLink', // Path to local template realtive from where you started the API.
  local: true
}
```

repository: wepublish/wepublish

gha_language: TypeScript

repo_name: wepublish/wepublish


text:
# Makeblock Library v3.25

Arduino Library for Makeblock Electronic Modules

# Copyright notice

In makeblock's library, some of the modules are derived from other open source projects, and also part of some code is inspired by the algorithms of other individuals or organizations. We will retain the copyright of the original open source code.

Before I released version 3.0.0, I didn't review the source of some old code in the makeblock library. This made me make some obvious mistakes. Fortunately, some of our users pointed out the mistakes we made.

So I reviewed our code in 2018/05/16, and correct some copyright information.

These modules is derived from other open source projects:

- MeRGBLed
- MeHumitureSensor
- Me7SegmentDisplay
- MeOneWire
- MeStepper

and these modules is inspired by some projects:

- MeUSBHost

As an open source library, we respect all contributors to the open source community and thank you very much for everyone's supervision.

If you have a discussion about licensing issues, please contact me<EMAIL_ADDRESS>-- Mark Yan)

### How to use:

1. Download the source from the git https://codeload.github.com/Makeblock-official/Makeblock-Libraries/zip/master

2. In the Arduino IDE: "Sketch-> Include Library-> Add .ZIP Library-> select the downloaded file-> Open"

3. Click "File-> Examples". Here are some test programs in "MakeBlockDrive->"

4. Depending on the type of board you're using, you need to modify the header file to match.
   For example, if you're using a mCore. You should change `#include <MeOrion.h>` to `#include <MeMCore.h>`
   Corresponding boards and there header file are:

   Orion <-------->  MeOrion.h

   BaseBoard <---->  MeBaseBoard.h

   mCore <-------->  MeMCore.h

   Shield <------->  MeShield.h

   Auriga <------->  MeAuriga.h

   MegaPi <------->  MeMegaPi.h

### Revision of history:

|Author      |       Time      |   Version    |    Descr     |
|:--------   |      :-----:    |   :----:     |    :-----    |
|Mark Yan    |     2015/07/24  |   3.0.0      |    Rebuild the old lib.|
|Rafael Lee  |     2015/09/02  |   3.1.0      |    Added some comments and macros.|
|Lawrence    |     2015/09/09  |   3.2.0      |    Include some Arduino's official headfiles which path specified.|
|Mark Yan    |     2015/11/02  |   3.2.1      |    fix bug on MACOS.|
|Mark Yan    |     2016/01/21  |   3.2.2      |    fix some library bugs.|
|Mark Yan    |     2016/05/17  |   3.2.3      |    add support for MegaPi and Auriga Board.|
|Mark Yan    |     2016/07/27  |   3.2.4      |    fix some JIRA issue, add PID motion for Megapi/Auriga on board encoder motor.|
|Mark Yan    |     2018/05/16  |   3.2.5      |    Correct copyright information.|

### Learn more from Makeblock official website: www.makeblock.com

repository: darckoune/lrobot

repo_name: darckoune/lrobot


text:
# NSPRTVideoPlayer
![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg)
[![SPM](https://img.shields.io/badge/spm-compatible-brightgreen.svg?style=flat)](https://github.com/nsprt/NSPRTVideoPlayer)
<img src="https://img.shields.io/badge/License-MIT-blue.svg" />

A beautiful video player created for use with SPM.

Playing         |  Paused
:-------------------------:|:-------------------------:
![](Assets/playing.jpg)  |  ![](Assets/paused.jpg)

## Requirements

- iOS 12.0+

## Installation

### Xcode Projects

Using Xcode, select `File` -> `Swift Packages` -> `Add Package Dependency` and enter https://github.com/NSPRT/NSPRTVideoPlayer.

### Install via the Swift Package Manager

Add the following to your Package.swift
```swift
    .Package(url: "https://github.com/nsprt/NSPRTVideoPlayer.git", majorVersion: 1)
```

Then simply `import NSPRTVideoPlayer` wherever you’d like to use it.

## Getting Started

Create an instance of `NSPRTVideoPlayerView` with an initial `CGRect`, initialize a `NSPRTPlayerItem` with your video URL, and set the item in the `NSPRTVideoPlayerView`:
```swift
let playerView = NSPRTVideoPlayerView(frame: CGRect(x: 0, y: 0, width: self.bounds.width, height: self.bounds.width * (9/16)))
let item = NSPRTPlayerItem(url: url)
playerView?.set(item: item)
```

Create an instance of `NSPRTVideoPlayerControls` and pass that to our `NSPRTVideoPlayerView` with the `use(controls: NSPRTVideoPlayerControls)` function:
```swift
let controls = NSPRTVideoPlayerControls()
playerView.use(controls: controls)
```

## Adding to View
The best way to add our player view is to have it nested in a subview, that way if a user enters full screen and exits fullscreen `NSPRTVideoPlayerView` automatically resizes back to its original placement:
```swift
let subView = UIView()
self.addSubview(subView)
subView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
    subView.topAnchor.constraint(equalTo: topAnchor),
    subView.widthAnchor.constraint(equalTo: widthAnchor),
    subView.heightAnchor.constraint(equalToConstant: bounds.width * (9/16)), // 16:9 Aspect Ratio
    subView.centerXAnchor.constraint(equalTo: centerXAnchor)
    ])

subView.addSubview(playerView)
playerView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
    playerView.topAnchor.constraint(equalTo: subView.topAnchor),
    playerView.rightAnchor.constraint(equalTo: subView.rightAnchor),
    playerView.bottomAnchor.constraint(equalTo: subView.bottomAnchor),
    playerView.leftAnchor.constraint(equalTo: subView.leftAnchor)
    ])
```

## Creator
NSPRT -<EMAIL_ADDRESS>
## License
NSPRTVideoPlayer is available under the MIT license.

repository: nsprt/NSPRTVideoPlayer

repo_name: nsprt/NSPRTVideoPlayer


text:
# Survey Data Exchange to and from Respondent Account Services

Collection Instruments are uploaded from the ONS estate to a RabbitMQ
queue for consumption by RAS. To facilitate this the excel files are
base64 encoded and then wrapped in a JWT. This JWT is encrypted and
signed before being placed on the queue.

Once the Collection Instruments have been completed by the respondent
RAS re-encodes them and wraps them in a signed and encrypted JWT to be
transferred back into the ONS estate.

## Schema Definition

| **Property** | **Definition**                                           |
| ------------ | -------------------------------------------------------- |
| **tx_id**    | See: [JWT Profile][jwt_profile]                          |
| **file**     | The contents of the Collection Instrument base64 encoded |
| **filename** | The name of the collection instrument file               |
| **case_id**  | The case UUID                                            |

[jwt_profile]: jwt_profile.md "JWT Profile Definition"

repository: ONSdigital/ons-schema-definitions

repo_name: ONSdigital/ons-schema-definitions


text:
Gg — Basic types and tools for computer graphics in OCaml
=========================================================
%%VERSION%%

Gg provides basic types for computer graphics. It defines types and
functions for floats, vectors, points, sizes, matrices, quaternions,
axis-aligned boxes, colors, color spaces, and raster data.

On top of this the Gg_kit library provides a few more tools and
algorithms for working with geometry and graphics.

Gg and Gg_kit have no dependencies. Gg is distributed under the ISC
license. Gg_kit is distributed under the ISC license and some color
schemes are distributed under the Apache 2.0 and CC0 licenses.

Home page: <http://erratique.ch/software/gg>

# Installation

Gg can be installed with `opam`:

    opam install gg

If you don't use `opam` consult the [`opam`](opam) file for build
instructions and a complete specification of the dependencies.

# Documentation

The documentation can be consulted [online] or via `odig doc gg`.

Questions are welcome but better asked on the [OCaml forum] than on
the issue tracker.

A few basic sample programs can be found in the [`test`](test/)
directory.

[online]: https://erratique.ch/software/gg
[OCaml forum]: https://discuss.ocaml.org/

repository: dbuenzli/gg

gha_language: OCaml

gha_license_id: NOASSERTION

repo_name: dbuenzli/gg


text:
# robot-agent
Robot agent to connect robot with cloud

# Getting started
## Download
    git clone https://github.com/joez/robot-agent.git
    cd robot-agent

## Install
    npm install

## Run
    NODE_ENV=production node app.js

## Debug
You may change the configuration file `config/env/development.js`, then run with logs:

    DEBUG=robot-agent:* node app.js

repository: joez/robot-agent

repo_name: joez/robot-agent


text:
# Swift API client for Uploadcare

![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fuploadcare%2Fuploadcare-swift%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/uploadcare/uploadcare-swift)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fuploadcare%2Fuploadcare-swift%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/uploadcare/uploadcare-swift)
[![Build and test](https://github.com/uploadcare/uploadcare-swift/actions/workflows/test.yml/badge.svg)](https://github.com/uploadcare/uploadcare-swift/actions/workflows/test.yml)

Uploadcare Swift API client for iOS, iPadOS, tvOS and macOS handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.

Check out our [Demo App](/Demo).

* [Installation](#installation)
* [Initialization](#initialization)
* [Using Upload API](#using-upload-api)
* [Using REST API](#using-rest-api)
* [Demo app](#demo-app)
* [Useful links](#useful-links)

## Installation

### Swift Package Manager

To use a stable version, add a dependency to your `Package.swift` file:

```swift
dependencies: [
    .package(url: "https://github.com/uploadcare/uploadcare-swift.git", .branch("master"))
]
```

If you want to try the current dev version, change the dependency to:

```swift
dependencies: [
    .package(url: "https://github.com/uploadcare/uploadcare-swift.git", branch("develop"))
]
```

To add from Xcode select File -> Swift Packages -> Add Package Dependency and enter the repository URL:
```
https://github.com/uploadcare/uploadcare-swift
```

Or you can add it in Xcode to the packages list using that URL: https://github.com/uploadcare/uploadcare-swift (select master branch).

### Carthage

To use a stable version, add a dependency to your Cartfile:

```
github "uploadcare/uploadcare-swift"
```

To use the current dev version:

```
github "uploadcare/uploadcare-swift" "develop"
```

### Cocoapods

To use a stable version, add a dependency to your Podfile:

```
pod 'Uploadcare', git: 'https://github.com/uploadcare/uploadcare-swift'
```

To use current dev version:

```
pod 'Uploadcare', git: 'https://github.com/uploadcare/uploadcare-swift', :branch => 'develop'
```

## Initialization

Create your project in [Uploadcare dashboard](https://uploadcare.com/dashboard/?utm_source=github&utm_medium=referral&utm_campaign=uploadcare-swift) and copy its API keys from there.

Upload API requires only a public key, while REST API requires both public and secret keys:

```swift
final class MyClass {
    private var uploadcare: Uploadcare

    init() {
        self.uploadcare = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY")

        // Secret key is optional if you want to use Upload API only.
        // REST API requires both public and secret keys:
        self.uploadcare = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY", secretKey: "YOUR_SECRET_KEY")
    }
}
```

You can create more Uploadcare objects if you need to work with multiple projects in your Uploadcare account:

```swift
final class MyClass {
    private let project1: Uploadcare
    private let project2: Uploadcare

    init() {
        // A project to use Upload API only
        self.project1 = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY_1")

        // A project to use both REST API and Upload API
        self.project2 = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY_2", secretKey: "YOUR_SECRET_KEY_2")
    }
}
```

Keep in mind that since Uploadcare is not a singleton. You should store a strong reference (as an instance variable, for example) to your Uploadcare object or it will get deallocated.

## Using Upload API

Check the [Upload API documentation](https://github.com/uploadcare/uploadcare-swift/blob/master/Documentation/Upload%20API.md) to see all available methods. Each method has an implementation with a `Result` completion handler and has an alternative `async` implementation to use with Swift concurrency.

Example of uploads:

```swift
guard let url = URL(string: "https://source.unsplash.com/featured") else { return }
guard let data = try? Data(contentsOf: url) else { return }

// You can create an UploadedFile object to operate with it
var fileForUploading1 = uploadcare.file(fromData: data)
fileForUploading2.metadata = ["myKey": "myValue"]
try await fileForUploading1.upload(withName: "random_file_name.jpg", store: .store)

// Or you can just upload data and provide a filename

var fileForUploading2 = uploadcare.file(withContentsOf: url)!
let file = try await uploadcare.uploadFile(data, withName: "random_file_name.jpg", store: .doNotStore) { progress in
    print("upload progress: \(progress * 100)%")
}

// Same method with a completion callback that returns a task that can be paused or canceled:
let task = uploadcare.uploadFile(data, withName: "random_file_name.jpg", store: .store, metadata: ["someKey": "someMetaValue"]) { progress in
    print("upload progress: \(progress * 100)%")
} _: { result in
    switch result {
    case .failure(let error):
        print(error.detail)
    case .success(let file):
        print(file)
    }
}
// Cancel uploading if needed
task.cancel()

// task will confirm UploadTaskable protocol if file size is less than 100 mb, and UploadTaskResumable if file size is >= 100mb
// You can pause or resume uploading of file with size >= 100mb if needed
(task as? UploadTaskResumable)?.pause()
(task as? UploadTaskResumable)?.resume()
```

It is possible to perform uploads in the background. But implementation is platform-specific. This lib doesn't provide a default implementation. You can find an example for the iOS in our Demo app. See [FilesListStore.swift](https://github.com/uploadcare/uploadcare-swift/blob/1e6341edcdcb887589a4e798b746c525c9023b4e/Demo/Demo/Modules/FilesListStore.swift).

## Using REST API

Refer to the [REST API documentation](https://github.com/uploadcare/uploadcare-swift/blob/master/Documentation/REST%20API.md) for all methods. Each method has an implementation with a `Result` completion handler and has an alternative `async` implementation to use with Swift concurrency.

Example of getting list of files:

```swift
// Make a list of files object
lazy var filesList = uploadcare.listOfFiles()

func someFilesListMethod() {
    // Make a query object
    let query = PaginationQuery()
        .stored(true)
        .ordering(.dateTimeUploadedDESC)
        .limit(5)

    // Get file list
    let list = try await filesList.get(withQuery: query)

    // Same method with a completion callback.
    filesList.get(withQuery: query) { result in
        switch result {
        case .failure(let error):
            print(error)
        case .success(let list):
            print(list)
        }
    }
}
```

Get next page:

```swift
// Check if the next page is available
guard filesList.next != nil else { return }

// Async:
let next = try await filesList.nextPage()

// With a completion callback:
filesList.nextPage { result in
    switch result {
    case .failure(let error):
        print(error)
    case .success(let list):
        print(list)
    }
}
```

Get previous page:

```swift
// Check if the previous page is available
guard filesList.previous != nil else { return }

// Async:
let previous = try await filesList.previousPage()

// With a completion callback:
filesList.previousPage { result in
    switch result {
    case .failure(let error):
        print(error)
    case .success(let list):
        print(list)
    }
}
```

## Demo app

Check the [demo app](https://github.com/uploadcare/uploadcare-swift/tree/master/Demo) for usage examples:
* List of files
* List of groups
* File info
* File upload (both direct and multipart, including upload in background)
* Multiple file upload
* Pause and continue multipart uploading
* Project info

## Useful links

[Swift Upload API client documentation](https://github.com/uploadcare/uploadcare-swift/blob/master/Documentation/Upload%20API.md)
[Swift REST API client documentation](https://github.com/uploadcare/uploadcare-swift/blob/master/Documentation/REST%20API.md)
[Uploadcare documentation](https://uploadcare.com/docs/?utm_source=github&utm_medium=referral&utm_campaign=uploadcare-swift)
[Upload API reference](https://uploadcare.com/api-refs/upload-api/?utm_source=github&utm_medium=referral&utm_campaign=uploadcare-swift)
[REST API reference](https://uploadcare.com/api-refs/rest-api/v0.7.0/?utm_source=github&utm_medium=referral&utm_campaign=uploadcare-swift)
[Contributing guide](https://github.com/uploadcare/.github/blob/master/CONTRIBUTING.md)
[Security policy](https://github.com/uploadcare/uploadcare-swift/security/policy)
[Support](https://github.com/uploadcare/.github/blob/master/SUPPORT.md)

repository: uploadcare/uploadcare-swift

gha_language: Swift

repo_name: uploadcare/uploadcare-swift


text:
+++
title = "0.8 to 0.9"
weight = 4
template = "docs-section.html"
insert_anchor_links = "right"
aliases = ["learn/book/migration-guides/0.8-0.9"]
[extra]
long_title = "Migration Guide: 0.8 to 0.9"
+++

Before migrating make sure to run rustup update

Bevy relies heavily on improvements in the Rust language and compiler. As a result, the Minimum Supported Rust Version (MSRV) is "the latest stable release" of Rust.

### [Make `Resource` trait opt-in, requiring `#[derive(Resource)]` V2](https://github.com/bevyengine/bevy/pull/5577)

Add `#[derive(Resource)]` to all types you are using as a resource.

If you are using a third party type as a resource, wrap it in a tuple struct to bypass orphan rules. Consider deriving `Deref` and `DerefMut` to improve ergonomics.

`ClearColor` no longer implements `Component`. Using `ClearColor` as a component in 0.8 did nothing.
Use the `ClearColorConfig` in the `Camera3d` and `Camera2d` components instead.

### [Plugins own their settings. Rework PluginGroup trait.](https://github.com/bevyengine/bevy/pull/6336)

The `WindowDescriptor` settings have been moved from a resource to `WindowPlugin::window`:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(WindowDescriptor {
    width: 400.0,
    ..default()
  })
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(WindowPlugin {
  window: WindowDescriptor {
    width: 400.0,
    ..default()
  },
  ..default()
}))
```

The `AssetServerSettings` resource has been removed in favor of direct `AssetPlugin` configuration:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(AssetServerSettings {
    watch_for_changes: true,
    ..default()
  })
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(AssetPlugin {
  watch_for_changes: true,
  ..default()
}))
```

`add_plugins_with` has been replaced by `add_plugins` in combination with the builder pattern:

```rust
// Old (Bevy 0.8)
app.add_plugins_with(DefaultPlugins, |group| group.disable::<AssetPlugin>());

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.build().disable::<AssetPlugin>());
```

`PluginGroupBuilder` and the `PluginGroup` trait have also been reworked.

```rust
// Old (Bevy 0.8)
impl PluginGroup for HelloWorldPlugins {
    fn build(&mut self, group: &mut PluginGroupBuilder) {
        group.add(PrintHelloPlugin).add(PrintWorldPlugin);
    }
}

// New (Bevy 0.9)
impl PluginGroup for HelloWorldPlugins {
    fn build(self) -> PluginGroupBuilder {
        PluginGroupBuilder::start::<Self>()
            .add(PrintHelloPlugin)
            .add(PrintWorldPlugin)
    }
}

```

### [Use plugin setup for resource only used at setup time](https://github.com/bevyengine/bevy/pull/6360)

The `LogSettings` settings have been moved from a resource to `LogPlugin` configuration:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(LogSettings {
    level: Level::DEBUG,
    filter: "wgpu=error,bevy_render=info,bevy_ecs=trace".to_string(),
  })
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(LogPlugin {
    level: Level::DEBUG,
    filter: "wgpu=error,bevy_render=info,bevy_ecs=trace".to_string(),
}))
```

The `ImageSettings` settings have been moved from a resource to `ImagePlugin` configuration:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(ImageSettings::default_nearest())
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest()))
```

The `DefaultTaskPoolOptions` settings have been moved from a resource to `CorePlugin::task_pool_options`:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(DefaultTaskPoolOptions::with_num_threads(4))
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(CorePlugin {
  task_pool_options: TaskPoolOptions::with_num_threads(4),
}))
```

### [Remove `AssetServer::watch_for_changes()`](https://github.com/bevyengine/bevy/pull/5968)

`AssetServer::watch_for_changes()` was removed.
Instead, set it directly on the `AssetPlugin`.

```rust
app
  .add_plugin(DefaultPlugins.set(AssetPlugin {
    watch_for_changes: true,
    ..default()
  }))
```

### [Spawn now takes a Bundle](https://github.com/bevyengine/bevy/pull/6054)

```rust
// Old (0.8):
commands
  .spawn()
  .insert_bundle((A, B, C));
// New (0.9)
commands.spawn((A, B, C));

// Old (0.8):
commands.spawn_bundle((A, B, C));
// New (0.9)
commands.spawn((A, B, C));

// Old (0.8):
let entity = commands.spawn().id();
// New (0.9)
let entity = commands.spawn_empty().id();

// Old (0.8)
let entity = world.spawn().id();
// New (0.9)
let entity = world.spawn_empty().id();
```

### [Accept Bundles for insert and remove. Deprecate `insert`/`remove_bundle`](https://github.com/bevyengine/bevy/pull/6039)

Replace `insert_bundle` with `insert`:

```rust
// Old (0.8)
commands.spawn().insert_bundle(SomeBundle::default());
// New (0.9)
commands.spawn_empty().insert(SomeBundle::default());
```

Replace `remove_bundle` with `remove`:

```rust
// Old (0.8)
commands.entity(some_entity).remove_bundle::<SomeBundle>();
// New (0.9)
commands.entity(some_entity).remove::<SomeBundle>();
```

Replace `remove_bundle_intersection` with `remove_intersection`:

```rust
// Old (0.8)
world.entity_mut(some_entity).remove_bundle_intersection::<SomeBundle>();
// New (0.9)
world.entity_mut(some_entity).remove_intersection::<SomeBundle>();
```

Consider consolidating as many operations as possible to improve ergonomics and cut down on archetype moves:

```rust
// Old (0.8)
commands.spawn()
  .insert_bundle(SomeBundle::default())
  .insert(SomeComponent);

// New (0.9) - Option 1
commands.spawn_empty().insert((
  SomeBundle::default(),
  SomeComponent,
))

// New (0.9) - Option 2
commands.spawn((
  SomeBundle::default(),
  SomeComponent,
))
```

### [Implement `Bundle` for `Component`. Use `Bundle` tuples for insertion](https://github.com/bevyengine/bevy/pull/2975)

The `#[bundle]` attribute is no longer required when deriving `Bundle` for nested bundles.

```rust
#[derive(Bundle)]
struct PlayerBundle {
    #[bundle] // Remove this line
    sprite_bundle: SpriteBundle,
    collider: Collider,
}
```

### [Replace the `bool` argument of `Timer` with `TimerMode`](https://github.com/bevyengine/bevy/pull/6247)

* Replace `Timer::new(duration, false)` with `Timer::new(duration, TimerMode::Once)`.
* Replace `Timer::new(duration, true)` with `Timer::new(duration, TimerMode::Repeating)`.
* Replace `Timer::from_seconds(seconds, false)` with `Timer::from_seconds(seconds, TimerMode::Once)`.
* Replace `Timer::from_seconds(seconds, true)` with `Timer::from_seconds(seconds, TimerMode::Repeating)`.
* Change `timer.repeating()` to `timer.mode() == TimerMode::Repeating`.

### [Add global time scaling](https://github.com/bevyengine/bevy/pull/5752)

Some `Time` methods were renamed for consistency.

The values returned by most methods are now scaled by a value optionally set with `set_relative_speed`. Most systems should continue to use these scaled values. If you need unscaled time, use the new methods prefixed with `raw_`.

```rust
// Old (Bevy 0.8)
let dur: Duration = time.time_since_startup();
let secs: f32 = time.time_since_startup().as_secs_f32();
let secs: f64 = time.seconds_since_startup();

// New (Bevy 0.9)
let dur: Duration = time.elapsed();
let secs: f32 = time.elapsed_seconds();
let secs: f64 = time.elapsed_seconds_f64();
```

### [Change UI coordinate system to have origin at top left corner](https://github.com/bevyengine/bevy/pull/6000)

All flex layout should be inverted (ColumnReverse => Column, FlexStart => FlexEnd, WrapReverse => Wrap)
System where dealing with cursor position should be changed to account for cursor position being based on the top left instead of bottom left

### [Rename `UiColor`  to `BackgroundColor`](https://github.com/bevyengine/bevy/pull/6087)

`UiColor` has been renamed to `BackgroundColor`. This change affects `NodeBundle`, `ButtonBundle` and `ImageBundle`. In addition, the corresponding field on `ExtractedUiNode` has been renamed to `background_color` for consistency.

### [Make the default background color of `NodeBundle` transparent](https://github.com/bevyengine/bevy/pull/6211)

If you want a `NodeBundle` with a white background color, you must explicitly specify it:

```rust
// Old (Bevy 0.8)
let node = NodeBundle {
    ..default()
}

// New (Bevy 0.9)
let node = NodeBundle {
    background_color: Color::WHITE.into(),
    ..default()
}
```

### [Clarify `bevy::ui::Node` field and documentation](https://github.com/bevyengine/bevy/pull/5995)

All references to the old `size` name has been changed, to access `bevy::ui::Node` `size` field use `calculated_size`

### [Remove `Size` and `UiRect` generics](https://github.com/bevyengine/bevy/pull/5404)

The generic `T` of `Size` and `UiRect` got removed and instead they both now always use `Val`. If you used a `Size<f32>` consider replacing it with a `Vec2` which is way more powerful.

### [Remove `margins.rs`](https://github.com/bevyengine/bevy/pull/4284)

The `Margins` type got removed. To migrate you just have to change every occurrence of `Margins` to `UiRect`.

### [Move `Size` to `bevy_ui`](https://github.com/bevyengine/bevy/pull/4285)

The `Size` type got moved from `bevy::math` to `bevy::ui`. To migrate you just have to import `bevy::ui::Size` instead of `bevy::math::Math` or use the `bevy::prelude` instead.

### [Move `Rect` to `bevy_ui` and rename it to `UiRect`](https://github.com/bevyengine/bevy/pull/4276)

The `Rect` type got renamed to `UiRect`. To migrate you just have to change every occurrence of `Rect` to `UiRect`.

### [Move `sprite::Rect` into `bevy_math`](https://github.com/bevyengine/bevy/pull/5686)

The `bevy::sprite::Rect` type moved to the math utility crate as
`bevy::math::Rect`. You should change your imports from `use bevy::sprite::Rect` to `use bevy::math::Rect`.

### [Exclusive Systems Now Implement `System`. Flexible Exclusive System Params](https://github.com/bevyengine/bevy/pull/6083)

Calling `.exclusive_system()` is no longer required (or supported) for converting exclusive system functions to exclusive systems:

```rust
// Old (0.8)
app.add_system(some_exclusive_system.exclusive_system());
// New (0.9)
app.add_system(some_exclusive_system);
```

Converting “normal” parallel systems to exclusive systems is done by calling the exclusive ordering apis:

```rust
// Old (0.8)
app.add_system(some_system.exclusive_system().at_end());
// New (0.9)
app.add_system(some_system.at_end());
```

Query state in exclusive systems can now be cached via ExclusiveSystemParams, which should be preferred for clarity and performance reasons:

```rust
// Old (0.8)
fn some_system(world: &mut World) {
  let mut transforms = world.query::<&Transform>();
  for transform in transforms.iter(world) {
  }
}
// New (0.9)
fn some_system(world: &mut World, transforms: &mut QueryState<&Transform>) {
  for transform in transforms.iter(world) {
  }
}
```

The `IntoExclusiveSystem` trait was removed. Use `IntoSystem` instead.

The `ExclusiveSystemDescriptorCoercion` trait was removed. You can delete any imports of it.

### [Merge TextureAtlas::from_grid_with_padding into TextureAtlas::from_grid through option arguments](https://github.com/bevyengine/bevy/pull/6057)

`TextureAtlas::from_grid_with_padding` was merged into `from_grid` which takes two additional parameters for padding and an offset.

```rust
// 0.8
TextureAtlas::from_grid(texture_handle, Vec2::new(24.0, 24.0), 7, 1);
// 0.9
TextureAtlas::from_grid(texture_handle, Vec2::new(24.0, 24.0), 7, 1, None, None)

// 0.8
TextureAtlas::from_grid_with_padding(texture_handle, Vec2::new(24.0, 24.0), 7, 1, Vec2::new(4.0, 4.0));
// 0.9
TextureAtlas::from_grid(texture_handle, Vec2::new(24.0, 24.0), 7, 1, Some(Vec2::new(4.0, 4.0)), None)
```

### [Rename `play` to `start` and add new `play` method that won't overwrite the existing animation if it's already playing](https://github.com/bevyengine/bevy/pull/6350)

If you were using `play` to restart an animation that was already playing, that functionality has been moved to `start`. Now, `play` won’t have any effect if the requested animation is already playing.

### [Change `gamepad.rs` tuples to normal structs](https://github.com/bevyengine/bevy/pull/4519)

The `Gamepad`, `GamepadButton`, `GamepadAxis`, `GamepadEvent` and `GamepadEventRaw` types are now normal structs instead of tuple structs and have a `new()` function. To migrate change every instantiation to use the `new()` function instead and use the appropriate field names instead of `.0` and `.1`.

### [Add getters and setters for `InputAxis` and `ButtonSettings`](https://github.com/bevyengine/bevy/pull/6088)

`AxisSettings` now has a `new()`, which may return an `AxisSettingsError`.
`AxisSettings` fields made private; now must be accessed through getters and setters.  There’s a dead zone, from `.deadzone_upperbound()` to `.deadzone_lowerbound()`, and a live zone, from `.deadzone_upperbound()` to `.livezone_upperbound()` and from `.deadzone_lowerbound()` to `.livezone_lowerbound()`.
`AxisSettings` setters no longer panic.
`ButtonSettings` fields made private; now must be accessed through getters and setters.
`ButtonSettings` now has a `new()`, which may return a `ButtonSettingsError`.

### [Add GamepadInfo, expose gamepad names](https://github.com/bevyengine/bevy/pull/6342)

* Pattern matches on `GamepadEventType::Connected` will need to be updated, as the form of the variant has changed.
* Code that requires `GamepadEvent`, `GamepadEventRaw` or `GamepadEventType` to be `Copy` will need to be updated.

### [`Gamepad` type is `Copy`; do not require / return references to it in `Gamepads` API](https://github.com/bevyengine/bevy/pull/5296)

* `Gamepads::iter` now returns an iterator of `Gamepad`. rather than an iterator of `&Gamepad`.
* `Gamepads::contains` now accepts a `Gamepad`, rather than a `&Gamepad`.

### [Update `wgpu` to 0.14.0, `naga` to `0.10.0`, `winit` to 0.27.4, `raw-window-handle` to 0.5.0, `ndk` to 0.7](https://github.com/bevyengine/bevy/pull/6218)

Adjust usage of `bevy_window::WindowDescriptor`’s `cursor_locked` to `cursor_grab_mode`, and adjust its type from `bool` to `bevy_window::CursorGrabMode`.

### [Support monitor selection for all window modes.](https://github.com/bevyengine/bevy/pull/5878)

`MonitorSelection` was moved out of `WindowPosition::Centered`, into `WindowDescriptor`.
`MonitorSelection::Number` was renamed to `MonitorSelection::Index`.

```rust
// Before
.insert_resource(WindowDescriptor {
    position: WindowPosition::Centered(MonitorSelection::Number(1)),
    ..default()
})
// After
.add_plugins(DefaultPlugins.set(WindowPlugin {
    window: WindowDescriptor {
        monitor: MonitorSelection::Index(1),
        position: WindowPosition::Centered,
        ..default()
    },
    ..default()
}))
```

`Window::set_position` now takes a `MonitorSelection` as argument.

```rust
window.set_position(MonitorSelection::Current, position);
```

### [Rename system chaining to system piping](https://github.com/bevyengine/bevy/pull/6230)

The `.chain(handler_system)` method on systems is now `.pipe(handler_system)`.
The `IntoChainSystem` trait is now `IntoPipeSystem`, and the `ChainSystem` struct is now `PipeSystem`.

### [Add associated constant `IDENTITY` to `Transform` and friends.](https://github.com/bevyengine/bevy/pull/5340)

The method `identity()` on `Transform`, `GlobalTransform` and `TransformBundle` has been removed.
Use the associated constant `IDENTITY` instead.

### [Rename `Transform::mul_vec3` to `transform_point` and improve docs](https://github.com/bevyengine/bevy/pull/6132)

`Transform::mul_vec3` has been renamed to `transform_point`.

### [Remove `Transform::apply_non_uniform_scale`](https://github.com/bevyengine/bevy/pull/6133)

`Transform::apply_non_uniform_scale` has been removed.
It can be replaced with the following snippet:

```rust
transform.scale *= scale_factor;
```

### [Remove `face_toward.rs`](https://github.com/bevyengine/bevy/pull/4277)

The `FaceToward` trait got removed. To migrate you just have to change every occurrence of `Mat4::face_toward` to `Mat4::look_at_rh`.

### [Replace `WorldQueryGats` trait with actual gats](https://github.com/bevyengine/bevy/pull/6319)

Replace usage of `WorldQueryGats` assoc types with the actual gats on `WorldQuery` trait

### [Add a method for accessing the width of a `Table`](https://github.com/bevyengine/bevy/pull/6249)

Any use of `Table::len` should now be `Table::entity_count`. Any use of `Table::capacity` should now be `Table::entity_capacity`.

### [Make `Handle::<T>` field id private, and replace with a getter](https://github.com/bevyengine/bevy/pull/6176)

If you were accessing the value `handle.id`, you can now do so with `handle.id()`

### [Add `TimeUpdateStrategy` resource for manual `Time` updating](https://github.com/bevyengine/bevy/pull/6159)

Changes the value reported by `time.delta()` on startup.

Before it would be `[0, 0, correct]` and this PR changes it to be `[0, "approximately the time between the time_system and present_frame", correct]`.

### [Add methods for silencing system-order ambiguity warnings](https://github.com/bevyengine/bevy/pull/6158)

Ambiguity sets have been replaced with a simpler API.

```rust
// These systems technically conflict, but we don't care which order they run in.
fn jump_on_click(mouse: Res<Input<MouseButton>>, mut transforms: Query<&mut Transform>) { ... }
fn jump_on_spacebar(keys: Res<Input<KeyCode>>, mut transforms: Query<&mut Transform>) { ... }

// Old (Bevy 0.8)
#[derive(AmbiguitySetLabel)]
struct JumpSystems;

app
  .add_system(jump_on_click.in_ambiguity_set(JumpSystems))
  .add_system(jump_on_spacebar.in_ambiguity_set(JumpSystems));

// New (Bevy 0.9)
app
  .add_system(jump_on_click.ambiguous_with(jump_on_spacebar))
  .add_system(jump_on_spacebar);

```

### [Remove unused DepthCalculation enum](https://github.com/bevyengine/bevy/pull/5684)

Remove references to `bevy_render::camera::DepthCalculation`, such as `use bevy_render::camera::DepthCalculation`. Remove `depth_calculation` fields from Projections.

### [Make `raw_window_handle` field in `Window` and `ExtractedWindow` an `Option`.](https://github.com/bevyengine/bevy/pull/6114)

`Window::raw_window_handle()` now returns `Option<RawWindowHandleWrapper>`.

### [Fix inconsistent children removal behavior](https://github.com/bevyengine/bevy/pull/6017)

* Queries with `Changed<Children>` will no longer match entities that had all of their children removed using `remove_children`.
* `RemovedComponents<Children>` will now contain entities that had all of their children removed using `remove_children`.

### [``Entity``'s “ID” should be named “index” instead](https://github.com/bevyengine/bevy/pull/6107)

The `Entity::id()` method was renamed to `Entity::index()`.

### [Remove `ExactSizeIterator` from `QueryCombinationIter`](https://github.com/bevyengine/bevy/pull/5895)

`len` is no longer implemented for `QueryCombinationIter`. You can get the same value with `size_hint().0`, but be aware that values exceeding `usize::MAX` will be returned as `usize::MAX`.

### [`Query` filter types must be `ReadOnlyWorldQuery`](https://github.com/bevyengine/bevy/pull/6008)

Query filter (`F`) generics are now bound by `ReadOnlyWorldQuery`, rather than `WorldQuery`. If for some reason you were requesting `Query<&A, &mut B>`, please use `Query<&A, With<B>>` instead.

### [Add `pop` method for `List` trait.](https://github.com/bevyengine/bevy/pull/5797)

Any custom type that implements the `List` trait will now need to implement the `pop` method.

### [Remove an outdated workaround for `impl Trait`](https://github.com/bevyengine/bevy/pull/5659)

The methods `Schedule::get_stage` and `get_stage_mut` now accept `impl StageLabel` instead of `&dyn StageLabel`.

### [Add a change detection bypass and manual control over change ticks](https://github.com/bevyengine/bevy/pull/5635)

Add the `Inner` associated type and new methods to any type that you’ve implemented `DetectChanges` for.

### [Make internal struct `ShaderData` non-`pub`](https://github.com/bevyengine/bevy/pull/5609)

Removed `ShaderData` from the public API, which was only ever used internally. No public function was using it so there should be no need for any migration action.

### [Make `Children` constructor `pub(crate)`.](https://github.com/bevyengine/bevy/pull/5532)

`Children::with()` is now renamed `Children::from_entities()` and is now `pub(crate)`

### [Rename Handle::as_weak() to cast_weak()](https://github.com/bevyengine/bevy/pull/5321)

* Rename `Handle::as_weak` uses to `Handle::cast_weak`

The method now properly sets the associated type uuid if the handle is a direct reference (e.g. not a reference to an `AssetPath`), so adjust you code accordingly if you relied on the previous behavior.

### [Remove `Sync` bound from `Local`](https://github.com/bevyengine/bevy/pull/5483)

Any code relying on `Local<T>` having `T: Resource` may have to be changed, but this is unlikely.

### [Add `FromWorld` bound to `T` in `Local<T>`](https://github.com/bevyengine/bevy/pull/5481)

It might be possible for references to `Local`s without `T: FromWorld` to exist, but these should be exceedingly rare and probably dead code. In the event that one of these is encountered, the easiest solutions are to delete the code or wrap the inner `T` in an `Option` to allow it to be default constructed to `None`.

This may also have other smaller implications (such as `Debug` representation), but serialization is probably the most prominent.

### [Swap out `num_cpus` for `std::thread::available_parallelism`](https://github.com/bevyengine/bevy/pull/4970)

`bevy_tasks::logical_core_count` and `bevy_tasks::physical_core_count` have been removed. `logical_core_count` has been replaced with `bevy_tasks::available_parallelism`, which works identically. If `bevy_tasks::physical_core_count` is required, the `num_cpus` crate can be used directly, as these two were just aliases for `num_cpus` APIs.

### [Changed diagnostics from seconds to milliseconds](https://github.com/bevyengine/bevy/pull/5554)

Diagnostics values are now in milliseconds. If you need seconds, simply divide it by 1000.0;

### [Add Exponential Moving Average into diagnostics](https://github.com/bevyengine/bevy/pull/4992)

`LogDiagnosticsPlugin` now records the smoothed value rather than the raw value.

* For diagnostics recorded less often than every 0.1 seconds, this change to defaults will have no visible effect.
* For discrete diagnostics where this smoothing is not desirable, set a smoothing factor of 0 to disable smoothing.
* The average of the recent history is still shown when available.

### [Nested spawns on scope](https://github.com/bevyengine/bevy/pull/4466)

If you were using explicit lifetimes and Passing Scope you’ll need to specify two lifetimes now.

```rust
// 0.8
fn scoped_function<'scope>(scope: &mut Scope<'scope, ()>) {}

// 0.9
fn scoped_function<'scope>(scope: &Scope<'_, 'scope, ()>) {}
```

`scope.spawn_local` changed to `scope.spawn_on_scope` this should cover cases where you needed to run tasks on the local thread, but does not cover spawning Nonsend Futures. Spawning of NonSend futures on scope is no longer supported.

### [Extract Resources into their own dedicated storage](https://github.com/bevyengine/bevy/pull/4809)

Resources have been moved to `Resources` under `Storages` in `World`. All code dependent on `Archetype::unique_components(_mut)` should access it via `world.storages().resources()` instead.

All APIs accessing the raw data of individual resources (mutable _and_ read-only) have been removed as these APIs allowed for unsound unsafe code. All usages of these APIs should be changed to use `World::{get, insert, remove}_resource`.

### [Clean up Fetch code](https://github.com/bevyengine/bevy/pull/4800)

Changed: `Fetch::table_fetch` and `Fetch::archetype_fetch` have been merged into a single `Fetch::fetch` function.

### [Rename `ElementState` to `ButtonState`](https://github.com/bevyengine/bevy/pull/4314)

The `ElementState` type received a rename and is now called `ButtonState`. To migrate you just have to change every occurrence of `ElementState` to `ButtonState`.

### [Fix incorrect and unnecessary normal-mapping code](https://github.com/bevyengine/bevy/pull/5766)

`prepare_normal` from the `bevy_pbr::pbr_functions` shader import has been reworked.

Before:

```wgsl
    pbr_input.world_normal = in.world_normal;

    pbr_input.N = prepare_normal(
        pbr_input.material.flags,
        in.world_normal,
#ifdef VERTEX_TANGENTS
#ifdef STANDARDMATERIAL_NORMAL_MAP
        in.world_tangent,
#endif
#endif
        in.uv,
        in.is_front,
    );
```

After:

```wgsl
    pbr_input.world_normal = prepare_world_normal(
        in.world_normal,
        (material.flags & STANDARD_MATERIAL_FLAGS_DOUBLE_SIDED_BIT) != 0u,
        in.is_front,
    );

    pbr_input.N = apply_normal_mapping(
        pbr_input.material.flags,
        pbr_input.world_normal,
#ifdef VERTEX_TANGENTS
#ifdef STANDARDMATERIAL_NORMAL_MAP
        in.world_tangent,
#endif
#endif
        in.uv,
    );
```

### Scene serialization format improvements from [#6354](https://github.com/bevyengine/bevy/pull/6354), [#6345](https://github.com/bevyengine/bevy/pull/6345), and [#5723](https://github.com/bevyengine/bevy/pull/5723)

* The root of the scene is now a struct rather than a list
* Components are now a map keyed by type name rather than a list
* Type information is now omitted when possible, making scenes much more compact

Scenes serialized with Bevy 0.8 will need to be recreated, but it is possible to hand-edit scenes to match the new format.

Here's an example scene in the old and new format:

```javascript
// Old (Bevy 0.8)
[
  (
    entity: 0,
    components: [
      {
        "type": "bevy_transform::components::transform::Transform",
        "struct": {
          "translation": {
            "type": "glam::vec3::Vec3",
            "value": (0.0, 0.0, 0.0),
          },
          "rotation": {
            "type": "glam::quat::Quat",
            "value": (0.0, 0.0, 0.0, 1.0),
          },
          "scale": {
            "type": "glam::vec3::Vec3",
            "value": (1.0, 1.0, 1.0),
          },
        },
      },
      {
        "type": "scene::ComponentB",
        "struct": {
          "value": {
            "type": "alloc::string::String",
            "value": "hello",
          },
        },
      },
      {
        "type": "scene::ComponentA",
        "struct": {
          "x": {
            "type": "f32",
            "value": 1.0,
          },
          "y": {
            "type": "f32",
            "value": 2.0,
          },
        },
      },
    ],
  ),
  (
    entity: 1,
    components: [
      {
        "type": "scene::ComponentA",
        "struct": {
          "x": {
            "type": "f32",
            "value": 3.0,
          },
          "y": {
            "type": "f32",
            "value": 4.0,
          },
        },
      },
    ],
  ),
]

// New (Bevy 0.9)
(
  entities: {
    0: (
      components: {
        "bevy_transform::components::transform::Transform": (
          translation: (
            x: 0.0,
            y: 0.0,
            z: 0.0
          ),
          rotation: (0.0, 0.0, 0.0, 1.0),
          scale: (
            x: 1.0,
            y: 1.0,
            z: 1.0
          ),
        ),
        "scene::ComponentB": (
          value: "hello",
        ),
        "scene::ComponentA": (
          x: 1.0,
          y: 2.0,
        ),
      },
    ),
    1: (
      components: {
        "scene::ComponentA": (
          x: 3.0,
          y: 4.0,
        ),
      },
    ),
  }
)
```

### [Derive `Reflect` + `FromReflect` for input types](https://github.com/bevyengine/bevy/pull/6232)

* `Input<T>` now implements `Reflect` via `#[reflect]` instead of `#[reflect_value]`. This means it now exposes its private fields via the `Reflect` trait rather than being treated as a value type. For code that relies on the `Input<T>` struct being treated as a value type by reflection, it is still possible to wrap the `Input<T>` type with a wrapper struct and apply `#[reflect_value]` to it.
* As a reminder, private fields exposed via reflection are not subject to any stability guarantees.

### [Relax bounds on `Option<T>`](https://github.com/bevyengine/bevy/pull/5658)

If using `Option<T>` with Bevy’s reflection API, `T` now needs to implement `FromReflect` rather than just `Clone`. This can be achieved easily by simply deriving `FromReflect`:

```rust

// OLD
#[derive(Reflect, Clone)]
struct Foo;

let reflected: Box<dyn Reflect> = Box::new(Some(Foo));

// NEW
#[derive(Reflect, FromReflect)]
struct Foo;

let reflected: Box<dyn Reflect> = Box::new(Some(Foo));
```

Note: You can still derive `Clone`, but it’s not required in order to compile.

### [Remove `ReflectMut` in favor of `Mut<dyn Reflect>`](https://github.com/bevyengine/bevy/pull/5630)

* relax `T: ?Sized` bound in `Mut<T>`
* replace all instances of `ReflectMut` with `Mut<dyn Reflect>`

### [remove blanket `Serialize + Deserialize` requirement for `Reflect` on generic types](https://github.com/bevyengine/bevy/pull/5197)

`.register_type` for generic types like `Option<T>`, `Vec<T>`, `HashMap<K, V>` will no longer insert `ReflectSerialize` and `ReflectDeserialize` type data. Instead you need to register it separately for concrete generic types like so:

```rust
  .register_type::<Option<String>>()
  .register_type_data::<Option<String>, ReflectSerialize>()
  .register_type_data::<Option<String>, ReflectDeserialize>()
```

### [Utility methods for Val](https://github.com/bevyengine/bevy/pull/6134)

It is no longer possible to use the `+`, `+=`, `-`, or `-=` operators with `Val` or `Size`.

Use the new `try_add` and `try_sub` methods instead and perform operations on `Size`'s `height` and `width` fields separately.

### [Allow passing glam vector types as vertex attributes](https://github.com/bevyengine/bevy/pull/6442)

Implementations of `From<Vec<[u16; 4]>>` and `From<Vec<[u8; 4]>>` for `VertexAttributeValues` have been removed.
I you're passing either `Vec<[u16; 4]>` or `Vec<[u8; 4]>` into `Mesh::insert_attribute` it will now require wrapping it with right the `VertexAttributeValues` enum variant.

repository: bevyengine/bevy-website

gha_language: Rust

repo_name: bevyengine/bevy-website


text:
Given a string s, find the length of the longest substring without repeating characters.

Example 1:

Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3.
Example 2:

Input: s = "bbbbb"
Output: 1
Explanation: The answer is "b", with the length of 1.

Constraints:

0 <= s.length <= 5 * 104
s consists of English letters, digits, symbols and spaces.

path: /LeetCode/Medium/Longest Substring Without repeating characters/README.md


text:
Vanilla Component Essentials
============================

[![npm version](https://badge.fury.io/js/vce.svg)](https://www.npmjs.com/package/vce)

A simple component framework for vanilla js

- extremely lightweight without any external dependencies

    ~2k after gzip
    ~200 LOC

- sub-component
- custom event

### Roadmap

- [ ] test
- [ ] documentations
- [x] todomvc

### Browser Compatibility

> sad to continue considering these things even in 2017

should work in any "real" browser out-of-box

include polyfill for ms browsers should be enough

below features are covered by <https://polyfill.io/>

+ Promise
+ Symbol
+ Element.prototype.closest
+ Node.prototype.contains

and another few (greetings, dear dear IE)

+ Proxy<EMAIL_ADDRESS>
### Why?

### QuickStart

license: ISC

repository: mcfog/vce

repo_name: mcfog/vce


text:
# Elasticsearch Nodejs Prototypes

Playing around with Elasticsearch through nodejs

## Usage

[Install Elasticsearch](https://www.elastic.co/downloads/elasticsearch) locally (v.5 or greater), running on the default port (http://localhost:9200)

```shell
npm install
```

Most of the .js files are intended to be run as standalone. For example:

```shell
node --use_strict info
node --use_strict .\bulk-populate.js
```

Queries to paste into kibana are in kibana.queries.sh

## Notes

Start off roughly following:
[Getting started with Elasticsearch and Node.js](https://www.compose.com/articles/getting-started-with-elasticsearch-and-node/)

repository: hombredequeso/es-node-proto

repo_name: hombredequeso/es-node-proto