text:
# snet-daemon

[![CircleCI](https://circleci.com/gh/singnet/snet-daemon.svg?style=svg)](https://circleci.com/gh/singnet/snet-daemon)
[![Coverage Status](https://coveralls.io/repos/github/singnet/snet-daemon/badge.svg)](https://coveralls.io/github/singnet/snet-daemon)

SingularityNET Daemon
The daemon is the adapter with which an otherwise SingularityNET-unaware service implementation can be exposed to the SingularityNET platform. It is designed to be deployed as a sidecar proxy alongside the service on a given host.
The daemon abstracts the blockchain components away from the clients.
The SNET Daemon interacts with the Multi Party Escrow to facilitate authorization and payment for services and acts as a passthrough for making API calls to the service.The daemon is the endpoint a client will submit requests to, and they are then passed to the service after validation by the daemon.

## Channel Claim command
Gets the latest channel state of the Channel updated in ETCD by the daemons of the same group and then increments the nonce of the channel.
It then sends and ON-Chain transaction to claim funds.The daemons continue their work independently without any confirmation from the treasurer on the blockchain.

## Development

These instructions are intended to facilitate the development and testing of SingularityNET Daemon. Users interested in
deploying SingularityNET services using SingularityNET Daemon should install the appropriate binary as
[released](#release).

### Prerequisites

* [Go 1.15+](https://golang.org/dl/)
* [Node 8+ w/npm](https://nodejs.org/en/download/)

### Dependencies

* install [Protoc 3.0+](https://askubuntu.com/questions/1072683/how-can-i-install-protoc-on-ubuntu-16-04)

* If you want to cross-compile you will also need Docker

### Installing

* Clone the git repository to the following path $GOPATH/src/github.com/singnet/
```bash
$ git clone git@github.com:singnet/snet-daemon.git
$ cd snet-daemon
```

* Install development/test dependencies
```bash
$ ./scripts/install
```

* Build snet-daemon (on Linux amd64 platform), see below section if you want to cross compile instead.
Please note using ldflags, the latest tagged version , sha1 revision and the build time are set as part of the build.
You need to pass the version as shown in the example below
```bash
$ ./scripts/build linux amd64 <version>
```

* Generate default config file  snet-daemon (on Linux amd64 platform)
```bash
$ ./build/snetd-linux-amd64 init
```
**** Please update the registry address in daemon config based on the test network used

#### Cross-compiling

If you want to build snetd for platforms other than the one you are on, run `./scripts/build-xgo` instead of `./scripts/build`.

You can edit the script to choose a specific platform, but by default it will build for Linux, OSX, and Windows (amd64 for all, except Linux which will also build for arm6)

Please note using ldflags the latest tagged version (passed as the first parameter to the script) , sha1 revision and the build time are set as part of the build.

```bash
$ ./scripts/build-xgo <version>
```

#### Run Deamon
```bash
$ ../build/snetd-linux-amd64
```

### Signatures in Daemon
[Payment](/escrow/README.md).
[Configuration](/configuration_service/README.md).

### Main commands

* Start ```snet-daemon```
```bash
$ ./snetd-linux-amd64
```

* Claim funds from the channel

  Refer to the link below on an end to end [Example of MPE](https://github.com/singnet/wiki/blob/master/multiPartyEscrowContract/MPE_fronttoback_example1.md)

  At the moment treasurer server is a part of snet-daemon command line interface.

```bash
$ ./snetd-linux-amd64 claim --channel-id 0

```

* Full list of commands, use --help to get more information.
```bash
$ ./build/snetd-linux-amd64 --help
Usage:
  snetd [flags]
  snetd [command]

Available Commands:
  channel     Manage operations on payment channels
  freecall    Manage operations on free call users
  help        Help about any command
  init        Write default configuration to file
  list        List channels, claims in progress, etc
  serve       Is the default option which starts the Daemon.
  version     List the current version of the Daemon.

Flags:
  -c, --config string   config file (default "snetd.config.json")
  -h, --help            help for snetd

Use "snetd [command] --help" for more information about a command.
```

* Unit Testing
```bash
$ ./scripts/test
```

### Configuration

Configuration file is a main source of the configuration. Some properties
can be set via environment variables or command line parameters see [table
below](#environment-variables-and-cli-parameters). Use `--config`
parameter with any command to set configuration file name.  By default daemon
use configuration file in JSON format `snetd.config.json` but other formats are
also supported via [Viper](https://github.com/spf13/viper). Use `snet init`
command to save configuration file with default values. Following
configuration properties can be set using configuration file.

#### Main properties

These properties you should usually change before starting daemon for the first
time.
* **blockchain_network_selected**  (required)
  Name of the network to be used for Daemon possible values are one of (kovan,ropsten,main,local or rinkeby).
  Daemon will automatically read the Registry address associated with this network For local network ( you can also specify the registry address manually),see the blockchain_network_config.json

* **daemon_end_point** (required;) -
Defines the ip and the port on which the daemon listens to.
format is :`<host>:<port>`.

* **ethereum_json_rpc_endpoint** (optional, default: `"http://<IP_ADDRESS>:8545"`) -
endpoint to which daemon sends ethereum JSON-RPC requests;
Based on the network selected blockchain_network_selected the end point is auto determined
Example `"https://kovan.infura.io"` for kovan testnet.

* **ipfs_end_point** (optional; default `"http://localhost:5002/"`) -
endpoint of IPFS instance to get [service configuration
metadata][service-configuration-metadata]

* **organization_id** (required) -
Id of the organization to search for [service configuration
metadata][service-configuration-metadata].

* **service_id** (required) -
Id of the service to search for [service configuration
metadata][service-configuration-metadata].

* **passthrough_enabled** (optional; default: `true`) -
when passthrough is disabled, daemon echoes requests back as responses; `false`
reserved mostly for testing purposes.

* **passthrough_endpoint** (required if `service_type` != `executable`) -
endpoint to which requests should be proxied for handling by service.
This config is mandatory when `passthrough_enabled` is set to true.
and needs to be a valid url

* **executable_path** (required if `service_type` == `executable`) -
path to executable to expose as a service.

#### Other properties

This options are less frequently needed.

* **allowed_users_flag** (optional;default:`false`) - You may need to protect the service provider 's service in test environment from being called by anyone, only Authorized users can make calls , when this flag is defined in the config, you can enforce this behaviour.You cannot set this flag to true
  in mainnet.
  This config is applicable only when you have the value to true.
  In which case it becomes mandatory to define the configuration `allowed_users`,

* **allowed_user_addresses** (optional;) - List of selected user addresses who can make requests to Daemon
  Is Applicable only when you have `allowed_users_flag set` to true.

* **authentication_address** (required if `You need to update Daemon configurations remotely`)
Contains the Authentication address that will be used to validate all requests to update Daemon configuration remotely
through a user interface ( Operator UI)

* **auto_ssl_domain** (optional; default: `""`) -
domain name for which the daemon should automatically acquire SSL certs from [Let's Encrypt](https://letsencrypt.org/).

* **auto_ssl_cache_dir** (optional; only applies if `auto_ssl_domain` is set; default: `".certs"`) -
directory in which to cache the SSL certs issued by Let's Encrypt

* **blockchain_enabled** (optional; default: `true`) -
enables or disables blockchain features of daemon; `false` reserved mostly for testing purposes

* **burst_size** (optional; default: Infinite) -
see [rate limiting configuration](./ratelimit/README.md)

* **daemon_group_name** (optional ,default: `"default_group"`) -
This parameter defines the group the daemon belongs to .
The group helps determine the recipient address for payments.
[service configuration
metadata][service-configuration-metadata].

* **log** (optional) -
see [logger configuration](./logger/README.md)

* **max_message_size_in_mb** (optional; default: `4`) -
The default value set is to 4 (units are in MB ), this is used to configure the max size in MB of the message received by the Daemon.
In case of Large messages , it is recommended to use streaming than setting a very high value on this configuration.
It is not recommended to set the value more than 4GB
`Please make sure your grpc version > 1.25`

* **metering_enabled** (optional,default: `false`) -
This is used to define if metering needs to be enabled or not .You will need to define a valid ` metering_end_point`
when this flag is enabled

* **metering_end_point** (optional;only applies if `metering_enabled` is set to true) -
Needs to be a vaild url where the request and response stats are published as part of Metering

* **ssl_cert** (optional; default: `""`) -
path to certificate to use for SSL.

* **ssl_key** (optional; only applies if `ssl_cert` is set; default: `""`) -
path to key to use for SSL.

* **payment_channel_storage_type** (optional; default `"etcd"`) -
see [etcd storage type](./etcddb#etcd-storage-type)

* **payment_channel_storage_client** (optional) -
see [etcd client configuration](./etcddb#etcd-client-configuration)

* **payment_channel_storage_server** (optional) -
see [etcd server configuration](./etcddb#etcd-server-configuration)

* **pvt_key_for_metering** (optional;only applies if `metering_enabled` is set to true)
This is used for authentication between daemon and the metering service in the context publishing stats , Even the latest Channel Status is published , this way the offline channel state balance can also be tracked.
Daemon will send a signature signed by this private key , metering service will already have the public key corresponding
to this Daemon ,metering service will ensure that the signer it receives matches the public key configured at its end.
This is mandatory only when metering is enabled.

* **rate_limit_per_minute** (optional; default: `Infinity`) -
see [rate limiting configuration](./ratelimit/README.md)

* **registry_address_key** (Optional) -
Ethereum address of the Registry contract instance.This is auto determined if not specified based on the blockchain_network_selected
If a value is specified , it will be used and no attempt will be made to auto determine the registry address.

* **alerts_email** (optional; default: `""`) - It must be a valid email. if it is empty, then it is considered as alerts disabled. see [daemon alerts/notifications configuration](./metrics/README.md)

* **notification_svc_end_point** (optional; default: `""`) - It must be a valid URL. if it is empty, then it is considered as alerts disabled. see [daemon alerts/notifications configuration](./metrics/README.md)

* **service_heartbeat_type** (optional; default: `grpc`) - possible type configurations are ```none | grpc | http```. If it is left empty, then it is considered as none type. see [daemon heartbeats configuration](./metrics/README.md)

* **heartbeat_svc_end_point** (optional; default: `""`) - It must be a valid URL. if it is empty, then service state always assumed as SERVING, and same will be wrapped in Daemon Heartbeat. see [daemon heartbeats configuration](./metrics/README.md)

* **ipfs_timeout** (optional; default: `30`) - All IPFS read/writes timeout if the operations doesnt complete in 30 sec or set duration in this config entry.

* **is_curation_in_progress** (optional; default: `false`) - You may need to protect the service provider 's service in test environment from being called by anyone, only Authorized users can make calls , when this flag is set to true, you can enforce this behaviour.Also see `curation_address_for_validation`

* **token_expiry_in_minutes** (optional; default: `1440` minutes ~24hrs) - This is the default expiry time for a JWT token issued.

* **token_secret_key** (optional;) - This is the secret key used to sign a JWT token , please do add this in your configuration to make your tokens a lot more secure.

#### Environment variables and CLI parameters

|config file key|environment variable name|flag|
|---|---|---|
|`auto_ssl_domain`|`SNET_AUTO_SSL_DOMAIN`|`--auto-ssl-domain`|
|`auto_ssl_cache_dir`|`SNET_AUTO_SSL_CACHE_DIR`|`--auto-ssl-cache`|
|`blockchain_enabled`|`SNET_BLOCKCHAIN_ENABLED`|`--blockchain`, `-b`|
|`config_path`|`SNET_CONFIG_PATH`|`--config`, `-c`|
|`ethereum_json_rpc_endpoint`|`SNET_ETHEREUM_JSON_RPC_ENDPOINT`|`--ethereum-endpoint`|
|`hdwallet_index`|`SNET_HDWALLET_INDEX`|`--wallet-index`|
|`hdwallet_mnemonic`|`SNET_HDWALLET_MNEMONIC`|`--mnemonic`|
|`passthrough_enabled`|`SNET_PASSTHROUGH_ENABLED`|`--passthrough`|
|`ssl_cert`|`SNET_SSL_CERT`|`--ssl-cert`|
|`ssl_key`|`SNET_SSL_KEY`|`--ssl-key`|

[service-configuration-metadata]: https://github.com/singnet/wiki/blob/master/multiPartyEscrowContract/MPEServiceMetadata.md

## Release

Precompiled binaries are published with each [release](https://github.com/singnet/snet-daemon/releases).

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the
[tags on this repository](https://github.com/singnet/snet-daemon/tags).

## License

This project is licensed under the MIT License - see the
[LICENSE](https://github.com/singnet/snet-daemon/blob/master/LICENSE) file for details.

repository: singnet/snet-daemon

gha_language: Go

repo_name: singnet/snet-daemon


text:
---
title: Release Notes for Cloud Manager 2022.5.0 in Adobe Experience Manager as a Cloud Service
description: These are the release notes for Cloud Manager 2022.5.0 in AEM as a Cloud Service.
feature: Release Information
exl-id: d6853333-0b8c-4863-ad4c-98d8a76ec4f5
---
# Release Notes for Cloud Manager 2022.5.0 in Adobe Experience Manager as a Cloud Service {#release-notes}

This page documents the release notes for Cloud Manager 2022.5.0 in AEM as a Cloud Service.

>[!NOTE]
>
>See [this page](/help/release-notes/release-notes-cloud/release-notes-current.md) for the current release notes for Adobe Experience Manager as a Cloud Service.

## Release Date {#release-date}

The release date for Cloud Manager release 2022.5.0 in AEM as a Cloud Service is May 5, 2022. The next release is planned for June 9, 2022.

## What's New {#what-is-new}

* Environments page has a column to display AEM Version of environment.
* Pipeline execution will now display UI top level errors on the execution screen.
* Re-execute Production Deploy Step via Cloud Manager UI.
* Reuse build images for re-execute production deploy step.
* New API to enable self-service deletion of network infrastructure.

## Bug Fixes {#bug-fixes}

* The "Download Logs" button from the UI Test step logs was not downloading the logs.
* Some executions were stuck in the context of commit trigger and cancelling approval step.

license: MIT

branch_name: refs/heads/main

extension: md

gha_language: SCSS

gha_license_id: MIT

license_type: permissive


text:
![AMPlified Search](https://img.skitch.com/20111123-q9jkpxbeermhddk1juusw7j6p2.png "AMPlified Search")
#AMPlified Search for Google

The AMPS extension is a prototype extension for Google Chrome that amplifies search results containing learning resources by adding standards alignment data and usage information found in the Learning Registry.

Installing the binary form is the quickest way to try out the extension.  Please note that this is a prototype. The services backing this plugin may become temporarily unavailable or cease to exist in the future. However, we will make every effort to maintain them as long as we can.  If for some reason we must terminate support, the control box will indicate that the plugin has expired, and you should uninstall it at that point.

###SCREENSHOTS

Standards alignment with search results

Pop-up controls to select what gets inlined.

Paradata with search results

###INSTALLATION

####Binary Install

This is what most people just wanting to try this out will want to use.  Those wanting to peek under the hood should install *Developing your own flavor*. If you just want to install the most current release [click here to install](https://raw.github.com/jimklo/AMPS-Chrome/master/dist/amps_v1_2.crx "Packed AMPS extension").

####Developing your own flavor

Follow step 4 of [Create and load an extension](http://code.google.com/chrome/extensions/getstarted.html#load) to load the "chrome" folder as an unpacked extension.

###DEVELOP

The AMPS extension is backed by additional CouchDB map/reduce views for a [v0.23.3](https://github.com/LearningRegistry/LearningRegistry/commits/0.23.3) [Learning Registry](https://github.com/LearningRegistry/LearningRegistry) node.

The views are located in the [couchdb](https://github.com/jimklo/AMPS-Chrome/tree/master/couchdb) folder within the git project. The plugin code itself is located in the [chrome](https://github.com/jimklo/AMPS-Chrome/tree/master/chrome) folder.

###DEPENDENCIES

The AMPS extension utilizes the following Open Source Javascript libraries/frameworks:

* [jQuery](http://jquery.com/) v1.6.4 [MIT License](https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt)

* [Mustache Logic-less templates](http://mustache.github.com/) [mustache.js](https://github.com/janl/mustache.js)  [MIT License](https://github.com/janl/mustache.js/blob/master/LICENSE)

* [crypto-js](http://code.google.com/p/crypto-js/) v2.5.2 [New BSD License](http://www.opensource.org/licenses/bsd-license.php)

* [Lawnchair](http://westcoastlogic.com/lawnchair/) 0.6.1 [MIT License](http://westcoastlogic.com/lawnchair/license/)

* Icons from the [Open Icon Library](http://openiconlibrary.sourceforge.net/) [Various Licenses](http://openiconlibrary.sourceforge.net/LICENSES.html)

###LICENSE

Copyright 2011 SRI International

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

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

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

This project has been funded at least or in part with Federal funds from the U.S. Department of Education under Contract Number ED-04-CO-0040/0010. The content of this publication does not necessarily reflect the views or policies of the U.S. Department of Education nor does mention of trade names, commercial products, or organizations imply endorsement by the U.S. Government.

repository: jimklo/AMPS-Chrome

branch_name: refs/heads/master

gha_language: JavaScript

repo_name: jimklo/AMPS-Chrome


text:
---
status: accepted
date: 2023-08-10
deciders: '@confused-Techie, @Daeraxa, @savetheclocktower, @mauricioszabo'
---
# Remove original AutoUpdate Functionality

## Context and Problem Statement

To provide users with some form of autoupdate functionality, many thought we could
adopt the original method used by the Atom team, and de-facto method within Electron
applications, Squirrel. While Squirrel is great for AutoUpdating, it has some big
issues, mainly it requires that every platform has signed binaries, which can be
prohibitively expensive. Additionally, it only supports Windows and macOS.

## Decision Drivers

* Users need a way to fulfill AutoUpdate functionality

## Considered Options

* Sign Windows and macOS (Already do) binaries, and setup Squirrel.
* Remove AutoUpdate totally.
* Use core package to assist in update installation.

## Decision Outcome

Chosen option: "Use core package to assist in update installation", to allow similar
behavior, we opted to create a core package that could help alert users of updates
to Pulsar being available, while technically not actually preforming any installation.
This new core package was added to Pulsar in [`pulsar-edit/pulsar#656`](https://github.com/pulsar-edit/pulsar/pull/656).
This package alerts and assists in users installing new updates to Pulsar, while no
longer relying on any form of AutoUpdate functionality from Squirrel.

This means, that we can now remove all Squirrel and AutoUpdate functionality that's
built right into Pulsar, hopefully cutting down on startup time.

<!-- This is an optional element. Feel free to remove. -->
### Consequences

* Good, because this allows a semblence of AutoUpdate functionality without ever having to hit our own backend.
* Good, because it allows users to be more in control, and automatically notified of new versions.
* Good, because it sections off the logic to a package that can be disabled or replaced as needed.
* Bad, because it does not actually preform any autoupdates.

## Pros and Cons of the Options

### Sign Windows and macOS binaries, and setup Squirrel

This would return things to the status quo, of Atom AutoUpdate functionality.

* Good, because users would know what to expect.
* Good, because it would provide AutoUpdates to Windows and macOS users.
* Bad, because it would be prohibitively expensive, and would fail to work if we ever
didn't have the funds for expensive binary signing costs.
* Bad, because this would leave Linux users with still zero support for AutoUpdates.
* Bad, because it would add additional complexity into our CI for signing Windows binaries.

### Remove AutoUpdates totally

This is essentially, what we have been doing since we took over Atom. Provided zero methodology
for users to preform autoupdates within Pulsar.

* Good, because it requires zero effort on our end.
* Good, because there are no signing costs.
* Bad, because it provides users no method to easily update.
* Bad, because users would be misinformed about Atom's ability to autoupdate being lost.
* Bad, because autoupdates of some kind is an expected and standard feature in any modern application.

## More Information

This decision is not one taken lightly, and could still stir some controversy on best implementations.

There was also additional concerns about not deleting the code used for Squirrel's AutoUpdate functionality
in case we ever did want to return to that behavior, since it already works perfectly, if properly setup.

For that reason, instead of keeping the code within the repo, below will be details about where the code that comprises
of the Squirrel AutoUpdate logic will be kept within Git, so that it can always be retrieved if ever needed.

* Last Commit Before Removal: `bf60fbe6fc267b737a70d5d39c03cad1629ea128`
* PR Where it was Removed: [`pulsar-edit/pulsar#668`](https://github.com/pulsar-edit/pulsar/pull/668)

repository: pulsar-edit/pulsar

gha_license_id: NOASSERTION

repo_name: pulsar-edit/pulsar


text:
---
title:  inSpect
date:  17/05/2022
---

#### inSpect

How do the following verses relate to the primary passage?

`Matthew 7:7`

`1 John 2:17`

`1 John 5:14, 15`

`Romans 5:15`

`1 Peter 5:8`

`Proverbs 3:34`

What other verses come to mind in connection with James 4:1–10?

` `

repository: Adventech/sabbath-school-lessons

branch_name: refs/heads/stage

repo_name: Adventech/sabbath-school-lessons


text:
# YapilyApi.EventSubscriptionResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**eventTypeId** | **String** | Unique identifier of the event type (for which notifications will be sent) |
**applicationId** | **String** | Application related to event subscription. |
**created** | **String** | Creation date of event subscription. |
**notification** | [**Notification**](Notification.md) |  |

repository: yapily/yapily-sdk-nodejs

repo_name: yapily/yapily-sdk-nodejs


text:
# 2D_to_3D
This is a tutorial shows how to create a 3D cube from a 2D bitmap image.

Several mathematical transformations such as translation, rotation, and scaling were implemented.

The principal motivation of this mini project is to learn how a mega project like OpenGL works,

what can be done to do everything from scratch without any third party library

to have something like OpenGL that supports textures, vertices, etc.

At the end of the tutorial, user grasps the idea behind graphical scenes, projection, rendering, and all this stuff

and can start thinking about the optimization of the code, like what I did myself by using SSE and AVX (SIMD).

I deliberately, did not include the optimizations part to make it easier to follow.


text:
Features and Specs
==================================

Specs
----------------------
- LWMA difficulty algorithm https://github.com/zawy12/difficulty-algorithms/issues/3
- Lbk3 POW algorithm - we fork on Block 100 000
- vNodes
- Tor integration
- Blocktime: 2 minutes
- Blocksize: 2 MB
- Coin Maturity: 50
- Maximum Supply: 35 million

Linux Build Instructions and Notes
==================================

Dependencies
----------------------
1.  Update packages

        sudo apt-get update

2.  Install required packagages

        sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils libboost-all-dev

3.  Install Berkeley DB 4.8

        sudo apt-get install software-properties-common
        sudo add-apt-repository ppa:bitcoin/bitcoin
        sudo apt-get update
        sudo apt-get install libdb4.8-dev libdb4.8++-dev

4.  Install QT 5

        sudo apt-get install libminiupnpc-dev libzmq3-dev
        sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev

Build
----------------------
1.  Clone the source:

        git clone https://github.com/verticalcoin/verticalcoin

2.  Build Verticalcoin-core:

    Configure and build the headless verticalcoin binaries as well as the GUI (if Qt is found).

    You can disable the GUI build by passing `--without-gui` to configure.

        ./autogen.sh
        ./configure
        make

3.  It is recommended to build and run the unit tests:

        make check

vNode Setup
=====================================
See (VNODE.md) for instructions.

Mining
=====================================
We have a build in CPU miner. "setgenerate true 1" will activate it for 1 CPU. GPU mining on Windows is possible with ccminer https://github.com/tpruvot/ccminer/releases

Mac OS X Build Instructions and Notes
=====================================
See (doc/build-osx.md) for instructions on building on Mac OS X.

Windows (64/32 bit) Build Instructions and Notes
=====================================
See (doc/build-windows.md) for instructions on building on Windows 64/32 bit.

Docker Image to build Verticalcoin (Linux/Windows)
=====================================
https://github.com/verticalcoin/verticalcoin-docker/

repository: verticalcoin/verticalcoin

gha_language: C

repo_name: verticalcoin/verticalcoin


text:
# Medical Insurance claiming DApp (for ConsenSys)
Problem statement:
1) Patient logs in, uploads medical/lab test bills and submits it for insurance. Notifications are sent to hospital and lab admin.
2) Hospital admin logs in, verifies and approves the bills. This approval is stored on the smart contract
3) Lab admin approves the lab test bills. This approval is also stored on the smart contract
4) Once both of them approve, notification are sent to insurance admin.
5) Insurance admin can check for approvals of hospital and lab after which he will calculate the claim amount and do the claim.

 `HealthCare.sol` contract maintains the logic for this DApp.
  The web pages found in the `Web-client` folder are used to communicate with the deployed smart contract and also allow logging in for each specific user


text:
# Demo Spring Boot Docker
A Demo to show off Spring boot in a docker image
______
## Technologies used:

Spring boot - The spring framework's attempt to make a easy to use template with opinionated technologies. - [Spring Boot.](https://projects.spring.io/spring-boot/)

![Docker Logo][logo_docker]

Docker - A containerisation platform for all operating systems. - [Docker](https://www.docker.com/)

--------
## How to:

Start off with a normal spring boot project [Starter](http://start.spring.io/).
I chose maven with spring boot web starter.
Then used Spotify's [Docker-maven-plugin](https://github.com/spotify/docker-maven-plugin) and added all my Information into the POM as per the guide.

 ```Bash
 mvn clean package docker:build # to build the image

 docker images                          # to see that its in your docker images
 docker run  -p 8080:8080 [image_name]  # to see it run use -d to make it run in the background
 docker ps                              # to see running containers (use -a to see the stopped ones too)
 docker stop [container_name]           # to stop your container
 docker rm [container_name]             # to remove that container
 docker rmi [image_name]                # to remove the image

 #Extras:
 docker attach [container_name]         # connects your terminal to the std_out of the container
 docker exec -it [container_name] sh    # gives you bash access to your container
 ```
 More info at [Docker commands Page](https://docs.docker.com/engine/reference/commandline/)

 Navigate to the index page using http://localhost:8080

--------
[logo_docker]: https://upload.wikimedia.org/wikipedia/commons/7/79/Docker_%28container_engine%29_logo.png "Docker wooololololo"
Docker logo By dotCloud, Inc. [Apache License 2.0], via Wikimedia Commons

gha_language: Java


text:
---
id: XJvKMQfKVMD1Rm4o
title: Release Notes (version 0.53)
desc: ''
updated:<PHONE_NUMBER>935
created:<PHONE_NUMBER>164
---

Dendron 0.53 has sprouted  🌱

### Highlights

- graph performance is much better for large graphs
- better layouts and indicators for graphs
- bug fixes for hash tags and navigating xvault links
- Better performance in block autocomplete
- general stability improvements
- full test coverage for all operating systems

### Docs

Our documentation changes a lot week by week. Below is a highlight of some updates from the past week.

- For Dendron Developers: Considerations when writing tests that will work on Windows: [[dendron.dev.qa.windows]]

### Ongoing

We're hiring at Dendron!
- [[Senior Full Stack Engineer|dendron.jobs.senior-full-stack-engineer]]
- [[Head of Growth|dendron.jobs.head-of-growth]]
- [[Head of Content|dendron.jobs.head-of-content]]

Work is going on for last weeks CROP ([Create Index Note](https://github.com/dendronhq/dendron/issues/603)).
Because this is a more involved feature, we've created an [[RFC|dendron.rfc.18-add-note-indexes]] to discuss the implementation details. Please leave any feedback in [this github discussion](https://github.com/dendronhq/dendron/discussions/1076)

### Community

#### Office Hours

You can find notes from our latest office hours [[here|community.office-hours.2021.08.01]]

#### Thank You's

A big **thanks** to the following gardeners that brought up issues, contributions, and fixes to this release :man_farmer: :woman_farmer:
You can see an overview of all roles [[here|community.roles]]

Docs:
- [SethCurry](https://github.com/SethCurry)
  - +taxonomist
  - [Fixing misspelled nodejs.org](https://github.com/dendronhq/dendron-site/pull/153)

Issues:
- [aleksey-rowan](https://github.com/aleksey-rowan) @aleksey#5276
  - [copy note ref command ignores noXVaultWikiLink setting](https://github.com/dendronhq/dendron/issues/1072)
  - [Note timestamps are not expanded in vaults located outside of the dendron.yml config file's folder](https://github.com/dendronhq/dendron/issues/1050)
  - [Link hover preview doesn't work following a code block with a backtick (`) in it](https://github.com/dendronhq/dendron/issues/1058)
- [MaDDmin](https://github.com/MaDDmin)
  - [Notes created with 'doctor' from # tags, include punctuation chars that follow them in the name area.create type.bug](https://github.com/dendronhq/dendron/issues/1048)
- [ScriptAutomate](https://github.com/ScriptAutomate) @icanteven#0264
  - `+bugcatcher`
  - [cli vault creation is added to dendron.yml but not dendron.code-workspace](https://github.com/dendronhq/dendron/issues/1070)
- [funnym0nk3y](https://github.com/funnym0nk3y)
  - [Sometimes minutes from keystroke to reaction](https://github.com/dendronhq/dendron/issues/1068)
- [micharris42](https://github.com/micharris42)
  - [Option to Label Daily Journal as Journal](https://github.com/dendronhq/dendron/issues/1040)
  - [Dendron Uses Custom NanoID Length?](https://github.com/dendronhq/dendron/issues/1048)
- [fdaguin](https://github.com/fdaguin)
  - `+bugcatcher`
  - [Find backlink candidates using basename](https://github.com/dendronhq/dendron/issues/1059)

### Changelog
![[dendron.release.changelog#053:#052]]

repository: bdefore/dendron-site

repo_name: bdefore/dendron-site


text:
---
title: 'What I read today: nomenclature and synonymy'
date: 2012-01-18
categories:
  - what I read today
tags:
  - nomenclature
  - scientific names of organisms
---

Today was a much simpler affair that yesterday's 'on homology', and as
such is somewhat shorter.

**Day Two: 18 Jan 2012**

MATTHEWS, S. C. 1973. Notes on open nomenclature and on synonymy lists.
*Palaeontology*, **16**, 713–719.

  - Reviews Richter's (1948) nomenclature proposals.
  - These were the additions and placement of characters such as '?',
    'aff.' and 'cf.' in the scientific names of organisms.
  - He also instigated the use of detailed, critical synonymy lists with
    the characters used to represent the status of each.

Much of this paper is purposed as a translation and implementation of
Richter's nomenclature.  The examples used are simple, clear and
concise.  Altogether it is a very useful paper for detailing the use of
this handy system.

gha_language: HTML


text:
# (Proposed/DRAFT) Recovery (COVID-19 focused) certificate minimal data set vocabulary
This specification describes the linked data vocabulary for asserting Verifiable Credentials related to citizen covid-19 recovery (interoperable) certificate. The specification
is based on standard reference ontologies such as Schema.org, FHIR R4 resource model etc.

# Related projects

The terms and definitions used in this vocab were in part inspired by the recent publication from the [EU on the eHealth Networks guidelines on
COVID-19 citizen recovery interoperable certificate - minimum dataset](https://ec.europa.eu/health/sites/health/files/preparedness_response/docs/covid-19_rat_common-list_en.pdf). This specification is designed to facilitate mapping of jurisdictional requirements, especially as it
relates to different FHIR Profiles especially WHO IPS (International Patient Summary).

# Generating example Verifiable Credentials

To regenerate the sample W3C Verifiable Credentials that are using the defined vocabulary run `npm i && npm run generateExamples`


text:
---
title:  "Hijacking NTLM-powered Mobile Apps (Part 2 - Relaying with Metasploit)"
date:   2018-10-01 12:00:00
published: true
layout: post
excerpt: "Working on hacking a mobile app that uses NTLM to authenticate to a back-end web service? Make sure to check out Part 1 first. In this blog, we'll assume we could not crack the password and instead need to relay the Challenge/Response to interact with the API."
---

Working on hacking a mobile app that uses NTLM to authenticate to a back-end web service? Make sure to check out [Part 1 - Cracking with Responder](/2018/ntlm-mobile-app-crack/) first. In this blog, we'll assume we could not crack the password and instead need to relay the Challenge/Response to interact with the API.

*Please note: This is an information security blog.

## The setup

If you're reading this, I'm assuming you already read through part 1 and could not crack the password to clear-text. At this point, you should have the following steps completed:
- Validated you are indeed up against a 401 NTLM situation
- Fake certificate .pem file ready to go
- Your device has installed and trusted the fake CA that signed the client certificate
- You control the DNS for the device and have pointed your target domain to your computer

Having trouble figuring out the target domain and the target URL for the API? You should be able to see the first communication attempt from the mobile device inside Burp's "HTTP History" tab if you are proxied.

If you can't use Burp for some reason, try [my Python tool httpspy](https://github.com/initstring/pentest/blob/master/web-tools/httpspy.py) that listens for HTTP/HTTPS traffic and prints all details to the console. You would run it like this, assuming you followed Part 1 and used my certificate cloning tool as well:

```
sudo ./httpspy.py --cert ./clonessl-output/client.pem wlan0
```

Click around in the app and try to get it to speak with the web service. If everything is configured correctly, you should see some inbound traffic. I like to use httpspy as a sanity check to ensure my TLS certificate is working and trusted, DNS is routing properly, etc.

The screenshot below shows an example of a simulated mobile app speaking to httpspy. Note the lack of an Authorization header - this would likely be the same for an app that speaks to an NTLM protected web service. The header isn't sent until it is requested.

![1](/images/post-ntlm/httpspy1.png)

## The first relay
Rich Lundeen has contributed an amazing Metasploit module called [http_ntlmrelay](https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/server/http_ntlmrelay.rb). We will use this to intercept inbound traffic like you saw above and initiate valid Challenge/Response conversations with the web service. This allows us to conduct any GET/POST requests we like, regardless of what the mobile app developer intended.

The commands below assume the following:
- Our mobile device is trying to communicate with https://mobileapi.com/webservice.asmx
- Mobileapi.com resolves to the actual public IP address of <IP_ADDRESS> (it doesn't, don't use that)
- Our computer has an IP address of <IP_ADDRESS> that is reachable by the mobile device
- You have added a DNS entry for mobileapi.com that points to <IP_ADDRESS> (as described in the previous blog post)
- You've caught the UserAgent for your mobile app and put it in place of 'VulnerableMobileApp' below

```
sudo msfconsole # we need root to bind to ports 80/443

use auxiliary/server/http_ntlmrelay
set RHOST <IP_ADDRESS>
set RPORT 443
set RSSL true
set RURIPATH /webservice.asmx
set SRVHOST <IP_ADDRESS>
set SRVPORT 443
set SSL true
set SSLCERT /opt/pentest/web-tools/clonessl-output/client.pem
set URIPATH /webservice.asmx
set VHOST mobileapi.com
set UserAgent VulnerableMobileApp
set VERBOSE true
```

The VERBOSE option is important. This will output our HTTP/S replies to the console, as opposed to just storing in the msfdb (which you might not even have set up).

Now, type `run` and hit enter. The next time you initiate a request from your mobile app, you should see some action on the console. Metasploit is going to relay a GET request to /webservice.asmx with a valid NTLM handshake. You can play around with that `RURIPATH` parameter to get other URLS, looking for something like a .wsdl file.

# Relaying POST actions

To really interact with the API, you probably need to do more than just GET requests. If you were lucky enough to find the API definitions, you might have enough to construct a valid POST request.  You can use tab-tab to autocomplete the job number in msf. You'll have to kill and run every time you change the contents of that `/tmp/post` file, as it is loaded into memory at `run`.

When I observed my mobile app in httpspy, I saw the following header set: `Content-Type: text/xml`. I happened to be working with a SOAP API. The metasploit module won't automatically detect XML in your `/tmp/post` file and set the proper content type. If you check the advanced options of the module, you'll see there is a setting for a `HTTP_HEADERFILE`. This is meant for you to add your own headers. BUT IT DIDN'T WORK FOR ME. That option is not well documented, so perhaps I was doing it wrong.

Instead, I had to make the following change to the `/opt/metasploit-framework/modules/auxiliary/server/http_ntlmrelay.rb` file on my computer:

```
# Original file:
266:     theaders = ('Authorization: NTLM ' << hash << "\r\n" <<
267: "Connection: Keep-Alive\r\n" )

# My changes:
266:    theaders = ('Authorization: NTLM ' << hash << "\r\n" <<
267:          "Connection: Keep-Alive\r\nContent-Type: text/xml\r\n\r\n" )
```

For debugging purposes, I also like to add the following lines which will give you details on the incoming request you are attempting to relay:

```
# Original file:
300:  resp = ser_sock.send_recv(r, opts[:timeout] ? opts[:timeout] : timeout, true)

# My changes:
300:     resp = ser_sock.send_recv(r, opts[:timeout] ? opts[:timeout] : timeout, true)
301:     print_good("DEBUG:")
302:     print_good(opts.inspect)
```

Good luck and happy hacking!

extension: markdown


text:
# Time-Series-Prediction-Transformer-Kalman

Using the Transformer architecture for time-series forecasting and Kalman filter for the model modification.

Transformer architecture is so useful when it comes to seq2seq models that we can easily using Transformer for time-series forecasting. However, models are always not generalizing enough especially for stocks data.

Kalman filter can be applied to linear-model modification. The **Unscented Kalman Filter (UKF)** can be used for nonlinear estimation. Therefore, I believe we can apply UKF to nonlinear-model such as transformer or other deep learning models.

Anyone who interesting in this project or Quant, please feel free to contact me. I'm looking forward to working with you.


text:
# Bitcoin
Free web page for generating bitcoin payment poster. Works client-side.
Generates a page with Public Bitcoin Address + Bitcoin logo + qr code.

Try it online : https://setchkin.github.io/Bitcoin/

I have inspired by https://github.com/georgjaehnig/wifi-qr-poster to do this.

repository: setchkin/Bitcoin

repo_name: setchkin/Bitcoin


text:
## Multithreaded Socket Authentication

### Usage

In Linux system, you need to first install openssl, which is used for AES-256 encryption.

```
sudo apt-get install openssl-lib cmake
```

In the project folder, perform the following commands

```
mkdir build
cd build
cmake ..
make
```

and it will automatically find the openssl include directory and libraries. If not found, you can also compile the server and client source file manually (on OS X):

```
gcc client.c -I/usr/local/Cellar/openssl/1.0.2l/include/ -L/usr/local/Cellar/openssl/1.0.2l/lib/ -lssl -lcrypto -o client

gcc server.c -o server -lpthread -I/usr/local/Cellar/openssl/1.0.2l/include/ -L/usr/local/Cellar/openssl/1.0.2l/lib/ -lssl -lcrypto
```

After all, you will have the `server` and `client` program.

##### Generate symmetric key

The encryption algorithm here we use is AES-256 which requires a 256 bits long key and a 128 bits long initial vector (iv). In my project, I use the the system random number to generate the key and iv.

```
Key:	62668e4cfe963684ed1a9f9c4fc3d5128d1495c2fc4dea3cbddd0c6fb3399a04
IV:		2b1e923005fdc2526d5cd2f5599670e9
```

Numbers generated by the rand and random APIs are not cryptographically secure. In OS X, given the same initial seed value, both functions reproducibly generate a consistent sequence of values each time you run them, and neither generates an equally distributed set of possible values.

In OS X, we get cryptographically secure pseudorandom numbers by reading bytes from the `/dev/random` device file. Each byte from this file is a cryptographically random value from 0-255. By concatenating these bytes, you can generate a random number of an arbitrary size.

For Linux, the only difference is that the random bytes are read from `/dev/urandom`.

To generate a symmetric key, use `-g` option for the client program

```
./client -g
```

##### Experiment

```
./server (terminal 1)
./client (terminal 2)
```

The sample output would be like

```
[SOCKET] Socket created
[SOCKET] Connected
Current local time and date:
	Sun Nov  5 03:02:16 2017

Plain Text:
	<IP_ADDRESS>

Hash Value:
	82423d5ccf434cf05dd926d622fb19b7

Generate Signature:
	1c8f54100f1b353e
	18b210f222743beb
	03ddaa700ef66254
	1df16c8df8b64271
	25f69b2d18a86ae8
	5a51ffd458ffabb0
	4f82e2fe7f00
package:
<PHONE_NUMBER>6e204e
	6f76202035203033
	3a30323a31362032
	3031370a3132372e
	302e302e31303033
	36d31c8f54100f1b
	353e18b210f22274
	3beb03ddaa700ef6
	62541df16c8df8b6
	427125f69b2d18a8
	6ae85a51ffd458ff
	abb04f82e2fe7f30
	30333000

[SOCKET] Socket Send 100 Bytes
Plain Text Received:
	True
```

```
[SOCKET] Socket created
[SOCKET] Bind Done
[SOCKET] Waiting for incoming connections...
[SOCKET] Connection accepted
[PTHREAD] Handler assigned
=====================================
Plaintext Length: 34
Plaintext:
	Sun Nov  5 03:02:16 2017
<IP_ADDRESS>

Signature Length: 54
Ciphertext Signature:
	1c8f54100f1b353e
	18b210f222743beb
	03ddaa700ef66254
	1df16c8df8b64271
	25f69b2d18a86ae8
	5a51ffd458ffabb0
	4f82e2fe7f00
Hash Value:
	82423d5ccf434cf05dd926d622fb19b7

Hash Value From Plain Text:
	82423d5ccf434cf05dd926d622fb19b7

Hash Value Match

[SOCKET] Client disconnected
```


text:
# Read: 10 - Readings: Stacks & Queues

*Today Topic will be a about*
- Stacks
- Queues

<br>

![PythonMoudels](images/Stacks&Queues.png)

## Stacks

> What Is Stacks?

![PythonMoudels](images/stacl.jpg)

*A `Stack` is the most elemental of the data structures in computer science.*

*A `stack` is an abstract data structure that follows the "last-in-first-out" or LIFO model. Some real world examples are the "click to go back" to the previous web page, and text editor's undo feature.*

There are 3 basic operations on a stack:
1. `Push`: Insert a data item on the stack.
2. `Pop`: Remove an item from the top of the stack.
3. `Peek`: Read the value of an item from the top of the stack WITHOUT removing it.

**you can implement a stack using an array or a linked list.**

**For Example**
```
class StackX {
    private int maxSize;
    private long[] stackArray;
    private int top;

    public StackX(int s) {                // constructor
        maxSize = s;                      // set the array size
        stackArray = new long[maxSize];   // create an array
        top = -1;                         // no items yet
    }

    public void push(long j) {        // put items on top of the stack
        stackArray[++top] = j;        // increment top when item inserted
    }
    public long pop() {               // take item from the top of the stack
        return stackArray[top--];     // access item, then decrement top
    }
    public long peek() {              // peek at the top of the stack
        return stackArray[top];
    }
    public boolean isEmpty() {        // true if the stack is empty
        return (top == -1);
    }
    public boolean isFull() {         // true if the stack is full
        return (top == maxSize -1);
    }
```

**Stack Applications**
- reversing data; e.g. reversing a string
- parsing: breaks the data into independent pieces for further provessing; e.g. Check the delimiter matching [,{,(,),},].

## Queue

> What Is Queue?

![PythonMoudels](images/Queue.png)

*A `queue` is an abstract data structure that follows `"first-in-first-out"` or `FIFO` model. Some real world examples include printing a file (and there's a file in queue), process scheduler, a waiting line.*

Basic operations on a queue:
1. `Enque/Add/Put`: Insert a data item on the back or rear of the queue.
2. `Deque/Delete/Get`: Remove an item from the front of the queue.
3. `Peek`: Read the value of an item from the front of the queue without removing it.

**For Example**

```
class Queue {
    private int maxSize;
    private long[] queArray;
    private int front;
    private int back;
    private int nItems;

    public Queue(int s) {                    // Constructor
        maxSize = s;
        quaArray = new long[maxSize];
        front = 0;
        back = -1;
        nItems = 0;
    }

    public void insert(long j) {            // Put an item at the back of the queue
        if(back == maxSize -1) back = -1;   // Deal with wraparound
        queArray[++back] = j;               // Increment back and insert the item
        nItems++;                           // One more item
    }
    public long remove() {                  // Take item from the front of the queue
        long temp = queArray[front++];      // Get the item and increment front
        if(front == maxSize) front = 0;     // Deal with wraparound
        nItems--;                           // One less item
        return temp;
    }
    public long peekFront() {
        return queArray[front];
    }

```

For More Info and Resource
[Resource](https://dev.to/rinsama77/data-structure-stack-and-queue-4ecd)

## Contact Info :
**Please Feel Free To Contact Me When You Need help ^_^**
* [www.facebook.com/aghyadalbalkhi](www.facebook.com/aghyadalbalkhi)
* Email<EMAIL_ADDRESS>


text:
---
title: Fortran-glmnet-in-python
categories: students
header-img: images/post/dino4.jpeg
---

Purpose: To compile the original Fortran code of GLMNET to use it in Python which contains the Poisson link function that many people and me use in the lab.

Requirements:

- `git`
- `f2py` (translator from fortran to python)
- `gfortran` (fortrain compiler)
- `scikit-learn` (for the example)

**clone repository from github**

```bash
$ git clone https://github.com/dwf/glmnet-python
```

**change directory and compile**

```bash
$ cd glmnet-python
$ python setup.py build
```

**compile fortran code**

```bash
$ cd glmnet/
$ f2py -c --fcompiler=gnu95 --f77flags='-fdefault-real-8' --f90flags='-fdefault-real-8' glmnet.pyf glmnet.f
```

**test code by going to root of project**

```bash
cd ..
```

**and in IPython run this example to see if it works**

```python
from glmnet import ElasticNet
from cv import CVGlmNet
from sklearn.datasets.samples_generator import make_regression

enet = ElasticNet(alpha=.1)
enet_cv = CVGlmNet(enet, n_folds=10, n_jobs=10)
X, y = make_regression(n_samples=100, n_features=10, n_informative=10, random_state=0, noise=35)
enet_cv.fit(X, y)
plot
enet_cv.plot_oof_devs()
```


text:
# Packet protocol manager

Read first: Documentation

## Features

* Written in ANSI C99, compatible with ``size_t`` for size data types
* Platform independent, no architecture specific code
* Uses *LwRB* library for data read/write operations
* Optimized for embedded systems, allows high optimization for data transfer
* Configurable settings for packet structure and variable data length
* Allows multiple notes in network with `from` and `to` addresses
* Separate optional field for *command* data type
* Variable data length to support theoretically unlimited packet length
* CRC check to handle data transmission errors
* User friendly MIT license

## Contribute

Fresh contributions are always welcome. Simple instructions to proceed::

1. Fork Github repository
2. Respect [C style & coding rules](https://github.com/MaJerle/c-code-style) used by the library
3. Create a pull request to develop branch with new features or bug fixes

Alternatively you may:

1. Report a bug
2. Ask for a feature request

repository: xiaoshzx/lwpkt

repo_name: xiaoshzx/lwpkt


text:
# ClearCommand

## Main

- clean the DB records

### Help

```
Usage:
  clean [options]
  clear

Options:
      --all           clean the whole config and DB records!
```
#### Params info

```
--all clean the whole config and DB records (only DB records by default)
```

![clear](http://assest.dowte.com/imgs/pass-cli/clear-all.jpg)

repository: fwhat/password

repo_name: fwhat/password


text:
# Graft

**Proposition:** my view should be viewable as plain HTML without a server while
I'm designing/styling it, and data should be bound on top of it as easily as
possible.

**Solution:** graft.

**Props to/superheavy inspiration from:** [Lift][].

**Also see:** A very similar library from the folks at [nodejitsu][], [weld][].

**Built on:** The awesomeness of [jsdom][] (also from the folks at nodejitsu).

[lift]: http://liftweb.net/
[nodejitsu]: http://nodejitsu.com/
[weld]: https://github.com/hij1nx/weld
[jsdom]: https://github.com/tmpvar/jsdom

## Usage

There are several possible usages:

    $('li.template')
      .graft('.author', authorName) // sets .author elements' text to authorName
      .graft('.author',
        $('a')
          .text(authorName)
          .href('link-to-author')) // sets .author elements' html to resulting anchor element
      .graft('.author',
        function($elt) {
          $elt.text(item.creatorName);
        }) // passes the selected elements in for mutation
      .graft('.author',
        {
          '.name': authorName,
          '.link': $('a').text(authorName).href('link-to-author')
        }) // does a graft on each of these sub-elements
      .graft(
        {
          '.author': authorName,
          '.link': $('').text(authorName).attr('href', 'link-to-author')
        }) // as above, but searches the top-level object instead of a sub-object

If the graft call is invoked on an element with class 'template', it
will clone that element and remove the template class, add the resulting
element to the same container, and then return the new resulting element. If,
on the other hand, the graft call is invoked on an element without that class,
it will operate directly on the element and return it.

## Collections

For collections of items, we take a similar tack. It would suck to have to use
a double-function for each collection (one for iteration and one for graft), so
we do some goodness:

    $('ul')
      .graft('li.template',
        authors.map(function(author) {
          return {
            '.author': author.name,
            '.link': $('a').text(author.name).href(linkFor(author)),
          }
        })

The mechanism is straightforward: if you pass an array as the second parameter,
each object in the array is passed to graft in turn, each with a new clone of
the matched element(s). Then, these elements are gathred up and put into the
DOM instead of the matched element. This means you provide an array of
functions, if you prefer, or an object, as above, or a string, etc.

The goodness is good, no?

## Easily Setting Attributes

Graft adds just a little bit of bam-bam-bam to selectors:

    $('li.template')
      .graft({
        '.author': author.name,
        '.link[href]': linkFor(author)
      })

This lets us set the href with zero effort. The downside is, the above selector
also means `elements with class link that have an attribute href'. I've found
that is fairly rarely used, but if you still want to use it, just put a space
at the end of the selector:

    $('li.template')
      .graft({
        '.author': author.name,
        '.link[href] ': function($elt) { /* do stuff with the link */ }
      })

We're not *quite* done yet, however. There is also a dash of goodness for
adding to an attribute (particularly handy for classes):

    $('li.template')
      .graft({
        '.author': author.name,
        '.link[class+]': author.category
      })

## CoffeeScript

Graft is written in CoffeeScript (though a compiled JS version is included)
because CoffeeScript is kind of gorgeous. It also benefits from CoffeeScript's
prettiness in use. For example:

    $('ul')
      .graft 'li.template', authors.map (author) ->
          '.author, .link': author.name,
          '.link[class+]': author.category
          '.about-me':
            '.avatar[src]': avatarFor(author),
            '.description': author.description

## Node.js

For node.js, the module exports a function that lets you just pass in HTML or
the name of a file containing HTML and run with it. We can use it as follows:

    var graft = require('graft').graft;
    graft('
My HTML

magic
',
      {
        'p a[href]': 'http://google.com',
        'div': 'unicorns!'
      },
      function(errors, grafted) {
        response.send(grafted, { 'Content-Type': 'text/html' }, 200);
      });

If you need access to the jQuery object (for example, because you want to
create some elements to graft in), graft exposes an easier method for doing
that, withjQuery:

    var graft = require('graft').graft,
        withjQuery = graft.withjQuery;

    withjQuery('
My HTML

magic
', function(errors, $) {
      $('body')
        .graft({
          'p a[href]': 'http://google.com',
          'div': $('
').text('unicorns!')
        })
    });

This lets you use jQuery directly when your use case requires it. You will then
have to manually convert the jQuery results back to HTML:

    var graft = require('graft').graft,
        withjQuery = graft.withjQuery;

    withjQuery('
My HTML

magic
', function(errors, $) {
      $('body')
        .graft({
          'p a[href]': 'http://google.com',
          'div': $('
').text('unicorns!')
        });

      response.send("" + $('html').html() + "", { 'Content-Type': 'text/html' }, 200);
    });

Graft exposes an htmlize function for this purpose, which is passed in as a third parameter:

    var graft = require('graft').graft,
        withjQuery = graft.withjQuery;

    withjQuery('
My HTML

magic
', function(errors, $, htmlize) {
      $('body')
        .graft({
          'p a[href]': 'http://google.com',
          'div': $('
').text('unicorns!')
        });

      response.send(htmlize(), { 'Content-Type': 'text/html' }, 200);
    });

repository: Shadowfiend/graft

repo_name: Shadowfiend/graft


text:
## Dual-task Consistency
Code for this paper: Semi-supervised Medical Image Segmentation through Dual-task Consistency ([AAAI2021](https://ojs.aaai.org/index.php/AAAI/article/view/17066))

	@inproceedings{luo2021semi,
	  title={Semi-supervised Medical Image Segmentation through Dual-task Consistency},
	  author={Luo, Xiangde and Chen, Jieneng and Song, Tao and Wang, Guotai},
	  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
	  volume={35},
	  number={10},
	  pages={8801--8809},
	  year={2021}
	}

## Requirements
Some important required packages include:
* [Pytorch][torch_link] version >=0.4.1.
* TensorBoardX
* Python == 3.6
* Some basic python packages such as Numpy, Scikit-image, SimpleITK, Scipy ......

Follow official guidance to install [Pytorch][torch_link].

[torch_link]:https://pytorch.org/

# Usage

1. Clone the repo:
```
git clone https://github.com/HiLab-git/DTC.git
cd DTC
```
2. Put the data in [data/2018LA_Seg_Training Set](https://github.com/Luoxd1996/DTC/tree/master/data/2018LA_Seg_Training%20Set).

3. Train the model
```
cd code
python train_la_dtc.py
```

4. Test the model
```
python test_LA.py
```
Our pre-trained models are saved in the model dir [DTC_model](https://github.com/Luoxd1996/DTC/tree/master/model) (both 8 labeled images and 16 labeled images), and the pretrained SASSNet and UAMT model can be download from [SASSNet_model](https://github.com/kleinzcy/SASSnet/tree/master/model) and [UA-MT_model](https://github.com/yulequan/UA-MT/tree/master/model). The other comparison method can be found in [SSL4MIS](https://github.com/HiLab-git/SSL4MIS)

## Results on the Left Atrium dataset (SOTA).
* The training set consists of 16 labeled scans and 64 unlabeled scans and the testing set includes 20 scans.

|Methods|DICE (%) | Jaccard (%) | ASD (voxel) | 95HD (voxel)|Reference|Released Date|
|---|---|---|---|---|---|---|
|[UAMT](https://arxiv.org/pdf/1907.07034.pdf)|88.88|80.21|2.26|7.32|MICCAI2019|2019-10|
|[SASSNet](https://arxiv.org/pdf/2007.10732.pdf)|89.54|81.24|2.20|8.24|MICCAI2020|2020-07|
| [DTC](https://ojs.aaai.org/index.php/AAAI/article/view/17066)|89.42|80.98|2.10|7.32|AAAI2021|2020-09|
|[LG-ER-MT](https://link.springer.com/chapter/10.1007/978-3-030-59710-8_55)|89.62|81.31| 2.06| 7.16|MICCAI2020|2020-10|
|[DUWM](https://link.springer.com/chapter/10.1007%2F978-3-030-59710-8_53)|89.65| 81.35| 2.03| 7.04|MICCAI2020|2020-10|
|[MC-Net](https://arxiv.org/pdf/2103.02911.pdf)|90.34| 82.48| 1.77| 6.00|Arxiv|2021-03|

* The training set consists of 8 labeled scans and 72 unlabeled scans and the testing set includes 20 scans.

|Methods|DICE (%) | Jaccard (%) | ASD (voxel) | 95HD (voxel)|Reference|Released Date|
|---|---|---|---|---|---|---|
|[UAMT](https://arxiv.org/pdf/1907.07034.pdf)|84.25|73.48|3.36|13.84|MICCAI2019|2019-10|
|[SASSNet](https://arxiv.org/pdf/2007.10732.pdf)|87.32|77.72|2.55|9.62|MICCAI2020|2020-07|
| [DTC*](https://ojs.aaai.org/index.php/AAAI/article/view/17066)|87.51|78.17|2.36|8.23|AAAI2021|2020-09|
|[LG-ER-MT](https://link.springer.com/chapter/10.1007/978-3-030-59710-8_55)|85.54|75.12|3.77|13.29|MICCAI2020|2020-10|
|[DUWM](https://link.springer.com/chapter/10.1007%2F978-3-030-59710-8_53)|85.91|75.75|3.31|12.67|MICCAI2020|2020-10|
|[MC-Net](https://arxiv.org/pdf/2103.02911.pdf)|87.71|78.31|2.18| 9.36|Arxiv|2021-03|
* Note that, * denotes the results from [MC-Net](https://arxiv.org/pdf/2103.02911.pdf) and the model has been openly available (provided by Dr. YiCheng), thanks for [Dr. Yicheng](https://ycwu1997.github.io/eli/).

## Acknowledgement
* This code is adapted from [UA-MT](https://github.com/yulequan/UA-MT), [SASSNet](https://github.com/kleinzcy/SASSnet), [SegWithDistMap](https://github.com/JunMa11/SegWithDistMap).
* We thank Dr. Lequan Yu, M.S. Shuailin Li and Dr. Jun Ma for their elegant and efficient code base.
* More semi-supervised learning approaches for medical image segmentation have been summarized in [SSL4MIS](https://github.com/Luoxd1996/awesome-semi-supervised-learning-for-medical-image-segmentation).


text:
# Santa Project Generator

This Console App has been develloped to generate anominously and randomly a Secret Santa based on a list of participants. After pairing participants together, it will send an email explaining who is the person that will recieve the gift, how much to put in the gift (maximum) and the due date.

## Getting Started

To develop and test this app, just fork the project. Once you've cloned it on your machine, fill the SecretSanta.json file with informations needed to run the app.

### Prerequisites

This application has been developp using .Net Core 2.0.

### Installing

#### SecretSanta.json file

To run properly this app needs the SecretSanta.json file filled with some mandatory informations. This file is structured as follow :

```
{
  "configuration" : {...},
  "participants" : [{...}]
}
```

##### configuration info

The configuration object is self-explainatory and will contains any informations regarding the general functioning of the app. It will contains values of **maximum amount** to spend and **due date**,

```
{
  "configuration" : {
    "MaxAmount" : 10,
    "DeliveryDate" : "2018, January the 10th",
    "EmailSettings" : {}
    }
}
```

but also settings needed to send e-mails, all fields are mandatory :

```
"EmailSettings" : {
            "SmtpServer" : "",
            "EmailUserName" : "",
            "EmailPassword" : "",
            "EmailAddress" :"",
            "EmailSubject" : "",
            "EmailBody" : "whatever you want to say in the email."
        }
```

The e-mail body is the core of the message and can be html + embeded css code to add some style at the email.

##### participants list

A participant is defined by 5 fields, **FirstName**, **LastName** and **EmailAddress** that are **mandatory** and need to be unique and 2 optionals fields, **Team** and **ExcludedNominees**.

```
{
  "FirstName" : "John",
  "LastName" : "Doe" ,
  "Team" : "Red",
  "EmailAddress"<EMAIL_ADDRESS>  "ExcludedNominees" : [{...}]
  }
```

**ExcludedNominee** is a list of people with which the participant can't be associated and has the following structure :

```
ExcludedNominees : [{FirstName = "People1", LastName = "People1"},
                    {FirstName = "People12", LastName = "People2"}]
```

## Running the tests

:warning: In order to run test you need to change some part of the code in *SecretSantaPaticipantsAssociation.cs* at line 83 :

```
if (participant.FirstName != currentParticipant.FirstName &&
    participant.LastName != currentParticipant.LastName   &&
    participant.EmailAddress != currentParticipant.EmailAddress &&
    participant.Team != currentParticipant.Team)
```
should be replace by
```
if (participant.FirstName != currentParticipant.FirstName &&
    participant.LastName != currentParticipant.LastName)
```
To allow to have the same email address for all participants.

### Expected output

```
**************************************************************
Retrieving SecretSanta.json file
          Deserializing configuration properties
          Deserializing participants list

          Shuffling and association gifter/gifted :
                  1/3 participant(s) associated
                  2/3 participant(s) associated
                  3/3 participant(s) associated

          Sending emails :
                  email 1/3
                  email 2/3
                  email 3/3
Secret Santa Shuffle Emailing terminated
**************************************************************
```

## Deployment

Add additional notes about how to deploy this on a live system

## Authors

* **Chollet Alexis** - *Initial work* - [achollet](https://github.com/achollet)

## License

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

## Acknowledgments

* A Job interview at Serensia : it was the subject of the technical test.

repository: achollet/SecretSantaGenerator

gha_language: C#

repo_name: achollet/SecretSantaGenerator


text:
Write out some of your awesome attributes, and use emphasis (like bold or italics) to identify keywords, programming languages, or skills.

Programming languages:
**python**
**c++**
**java**

Sports:
_Football_
_Table tennis_

repository: AmoghDhaliwal/markdown-portfolio

repo_name: AmoghDhaliwal/markdown-portfolio


text:
---
layout: info
title: NorCal Fire Evacuations
permalink: /info/evacuations
description: Napa County, Sonoma County, Mendocino County, and Solano County Evacuations.
image:
---

# Evacuations

Information presented here is for convenience only – subcribe to updates from or check with your local officials for most up-to-date, accurate information.

## Sonoma County
[Sonoma County Evacuation Map](https://sfgov.maps.arcgis.com/apps/InformationLookup/index.html?appid=2fda90d67ffb4b8bb3f7d595cadf2e0f)

## All Counties

As of 10/14/2017 9:05pm

[Sonoma County Fires - CalFire Incident Report](http://cdfdata.fire.ca.gov/pub/cdf/images/incidentfile1867_2853.pdf)

[Atlas Fire - CalFire Incident Report](http://cdfdata.fire.ca.gov/admin8327985/cdf/images/incidentfile1866_2838.pdf)

[Redwood Valley - CalFire Incident Report](http://cdfdata.fire.ca.gov/admin8327985/cdf/images/incidentfile1867_2840.pdf)

license: Unlicense

repository: JusticeforEachOther/norcalfires

gha_language: CSS

repo_name: JusticeforEachOther/norcalfires


text:
# bitcoinfs

FUSE interface for blockchain file storage

mount a local folder with files from public bitcoinSV blockchain. Not User or password required

Requires python3 with the fusepy and requests libraries.
bitcoin-cli is required to use the file upload scripts

# Installation

* Using pip and local python enviroment. Recomended
```
pip install virtualenv
```
```
virtualenv -p python3 envname
```
```
source envname/bin/activate
```
```
pip3 install fusepy
```
```
pip3 install requests
```

* In Ubuntu Linux 18.04:

```
apt-get install python3-fusepy python3-requests
```

* In OSX:

Not tested due to no available machine, but it should work with MacFUSE installed through your favorite package manager and the fusepy and requests libraries

* In Windows:

Not supported.

# Usage
To mount from BitcoinsSV trasnsaccion ID in mnt existing folder

```
./bitcoinfs.py mnt/ txid
```

As long bitcoinfs.py is runnig files can be accessed in mnt/.

# Use Cases

* 1 Loading bitcoinfs.conf from the blockchain

```
./bitcoinfs.py test/ 663274c2e741484d2c2d2901cab0372ea978da7b608f7e9c3e41a2bc8e99f440
```

* 2 Mounting Riemann Paper and four strand DNA olygo assembler sequence, Pubmed ID [30285239](https://www.ncbi.nlm.nih.gov/pubmed/30285239)

```
./bitcoinfs.py test/ 3fa7bea2b9d2ab16d7ecea074e9b2277272b9e707d42f4d52d69b9f5272025c6
```
# ARTEFACTS

* Mount Human Proteome [UP000005640](https://www.uniprot.org/proteomes/UP000005640)
One protein product by gene (not including protein isoforms)

```
./bitcoinfs.py proteome/ 6081be231d65ec6323a74f2a876dc6e5007c1d3360d15570f49b9c5cafc9f0b7
```


text:
2020-09-10_19:55:50

# Modules

Modules are used to group C++ code.
Each module should have a particular purpose and responsibility.
A module bundle type declarations and implementations.
A module is a collection of C++ files that are compiled together with the same compiler flags.
One or more modules are linked together as part of a Target into a dynamically linked library.
The C++ files are stored in a directory for the module along with a `<ModuleName>.Build.cs` file.
The `Build.cs` file describe how the module is to be compiled.

The engine is built up from a large collection of modules.
Projects and plugins can also contain modules.

A module is **declared** in the owning project's or plugin's `.upoject` or `.uplugin` file.
The `Modules` attribute is an array that contains `Module` elements.
A `Module` element contains at least `Name`, `Type`, and `LoadingPhase`.
`Name` can be any string.
`Type` is one of `Runtime`, `Developer(Tool?)`, or `Editor`. There are a few more.
`LoadingPhase` is one of `Default`, ...?
Can also have `WhitelistPlatforms` and `BlacklistPlatforms`.
```
{
    "Name": "MyModule",
    "Type": "Editor",
    "LoadingPhase": "PostEngineInit"
},
```

[[2020-09-15_21:10:32]] [Module types](./Module%20types.md)

A module consists of a private part and public part.
The private part can only be used by the module itself.
The public part can be used by other modules as well.
The public part is a collection of header files, containing interfaces and exported types.
The private part can contain both header and source files, containing function implementations and module initialization.
Module initialization is done by `MyModule.cpp`, which contains a class inheriting from `IModuleInterface` and the `IMPLEMENT_MODULE` macro.
A module has a `.Build.cs` file that describe the module to the Unreal Build Tool.
A module using functionality provided by another module is called a dependency.
The public part is stored in the `<ModuleName>/Public` directory.
The private part is stored in the `<ModuleName>/Private` directory.
For simple modules this is exactly the `.h`/`.cpp` separation.
But modules may place source files differently.

Classes defined within a module's public header files should be decorated with the module's `*_API` macro.
This exports the class from the module so that it can be used by other modules.
For example: `class MYMODULE_API UMyClass : public UObject`.
The definition for the macro is automatically created by the engine.

Example module file system organization, for a module named `MyModule`:
```
MyModule
├── MyModule.Build.cs
├── Private
│   └── MyModule.cpp
└── Public
    └── MyModule.h
```

Each module must have exactly one `*.Build.cs` file.
It should contain a C# class that define how the module is to be compiled.
At build time Unreal Build Tool searches the project directory tree for `*.Build.cs` files.

[[2020-09-18_08:51:49]] [Build.cs](./Build.cs.md)

Each module must have exactly one `<MODULE_NAME>.(cpp|h)` file.
This is where the module itself is declared for the C++ runtime.
Contains a single class (usually) that implements `IModuleInterface`.
Has two virtual methods:
- `StartupModule`
    Called when the editor or game is starting, really when the module is loaded into memory. Do initialization here.
- `ShutdownModule`
    Called when the editor or game is shutting down, really when the module is unloaded from memory.

`MyModule.h`:
```cpp
#pragma once

#include "CoreMinimal.h"
#include "Modules/ModuleInterface.h"
#include "Modules/ModuleManager.h"

class FMyModule : public IModuleInterface
{
public:
    virtual void StartupModule() override;
    virtual void ShutdownModule() override;
};
```

`MyModule.cpp`:
```cpp
#include "MyModule.h"

#include "Modules/ModuleManager.h"
#include "Modules/ModuleInterface.h"

IMPLEMENT_GAME_MODULE(FMyModule, MyModule);

#define LOCTEXT_NAMESPACE "FMyModule"

void FMyModule::StartupModule()
{
}

void FMyModule::ShutdownModule()
{
}

#undef LOCTEXT_NAMESPACE
```

[[2020-09-10_19:42:18]] [Code projects](./Code%20projects.md)
[[2020-09-15_17:27:33]] [Plugins](./Plugins.md)
[[2020-09-15_21:10:32]] [Module types](./Module%20types.md)
[[2020-09-18_08:51:49]] [Build.cs](./Build.cs.md)
[[2021-02-19_21:30:15]] [Modules Build.cs and Target.cs](./Modules%20Build.cs%20and%20Target.cs.md)
[[2021-02-19_18:50:48]] [Creating a new module](./Creating%20a%20new%20module.md)

repository: ibbles/LearningUnrealEngine

gha_language: Shell

repo_name: ibbles/LearningUnrealEngine


text:
# dva  [中文查看](./README_zh-CN.md)

[![NPM version](https://img.shields.io/npm/v/dva.svg?style=flat)](https://npmjs.org/package/dva)
[![Build Status](https://img.shields.io/travis/dvajs/dva.svg?style=flat)](https://travis-ci.org/dvajs/dva)
[![Coverage Status](https://img.shields.io/coveralls/dvajs/dva.svg?style=flat)](https://coveralls.io/r/dvajs/dva)
[![NPM downloads](http://img.shields.io/npm/dm/dva.svg?style=flat)](https://npmjs.org/package/dva)
[![Dependencies](https://david-dm.org/dvajs/dva/status.svg)](https://david-dm.org/dvajs/dva)
[![Join the chat at https://gitter.im/dvajs/Lobby](https://img.shields.io/gitter/room/dvajs/Lobby.svg?style=flat)](https://gitter.im/dvajs/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)

* [Why dva and what's dva](https://github.com/dvajs/dva/issues/1)
* [支付宝前端应用架构的发展和选择](https://www.github.com/sorrycc/blog/issues/6)

## Demos

* [Count](https://stackblitz.com/edit/dva-example-count): Simple count example
* [User Dashboard](https://github.com/dvajs/dva/tree/master/examples/user-dashboard): User management dashboard
* [HackerNews](https://github.com/dvajs/dva-hackernews): ([Demo](https://dvajs.github.io/dva-hackernews/)): HackerNews Clone
* [antd-admin](https://github.com/zuiidea/antd-admin): ([Demo](http://antd-admin.zuiidea.com/)): Admin dashboard based on antd and dva
* [github-stars](https://github.com/sorrycc/github-stars): ([Demo](http://sorrycc.github.io/github-stars/#/?_k=rmj86f))，Github Star management tool
* [react-native-dva-starter](https://github.com/nihgwu/react-native-dva-starter): A React Native starter powered by dva and react-navigation
* [dva-example-nextjs](https://github.com/dvajs/dva/tree/master/examples/with-nextjs): Integrate dva with next.js
* [Account System](https://github.com/yvanwangl/AccountSystem.git): A small inventory management system

## Quick Start

- [Getting Started](https://github.com/dvajs/dva/blob/master/docs/GettingStarted.md)
- [12 步 30 分钟，完成用户管理的 CURD 应用 (react+dva+antd)](https://github.com/sorrycc/blog/issues/18)
=======
* [Alipay front application architecture development and selection](https://www.github.com/sorrycc/blog/issues/6)

* [Count](https://stackblitz.com/edit/dva-example-count):Simple counter
* [User Dashboard](https://github.com/dvajs/dva/tree/master/packages/dva-example-user-dashboard): User management
* [HackerNews](https://github.com/dvajs/dva-hackernews):  ([Demo](https://dvajs.github.io/dva-hackernews/))，HackerNews Clone
* [antd-admin](https://github.com/zuiidea/antd-admin): ([Demo](http://antd-admin.zuiidea.com/))，Background management application based on antd and DVA
* [github-stars](https://github.com/sorrycc/github-stars): ([Demo](http://sorrycc.github.io/github-stars/#/?_k=rmj86f))，Github Star management application
* [react-native-dva-starter](https://github.com/nihgwu/react-native-dva-starter): React Native example that integrates DVA and react-navigation typical application scenarios
* [dva-example-nextjs](https://github.com/dvajs/dva/tree/master/packages/dva-example-nextjs): Integrate with next.js
* [Account System](https://github.com/yvanwangl/AccountSystem.git): Small inventory management system

## New Features
* **Full support for all rxjs functions**
* **The epics type is added to the model to store rxjs data**
* add fetch Model
* [rxjs demo](https://github.com/fangkyi03/dva/tree/master/packages/dva-example) Simple rxjs-demo demonstration

fetch Model Usage method
Compatible with existing DVA can be used directly for migration
```
import * as request from './utils/request'
import * as netaApi from './utils/netaApi';
```
```js
// 1. Initialize
const app = dva({
    fetchConfig:{
            // Here fill out your packaged request file
            // get post delete...  after that, method will read your exposed name directly.
            netTool:request,
            // URL transfer mode
            // 1.If netApi is empty     url:'/book'
            // 2.If netApi is not empty The name of the function that needs to be passed out by the netApi url:'book'
            netApi:netaApi,
            // Global network start processing
            // Each person has different processing specifications for network requests.
            // Here you can directly write your corresponding processing logic. true is ok false is non conformity goto onNetError function
            onGLNetStart:({retData})=>{
                debugger
                // Do not do redundant operations besides logical judgment here
                if (retData.error_code == 0){
                    return retData.result
                }else {
                    return false
                }
            },
            //Global error handling
            onGLNetError:({retData})=>{
              // if the data is here, the data will continue to merge, but because the data is wrong,
              // the wrong network request is not merged into model, nor does it refresh data.
              // avoid the problem of re refreshing the page due to interface errors.
              // you can also intercept the onError of a single request in the fetch/sendData of each interface.
              // the error onError will be recorded in the fetch model. You can directly replay through fetch.isNetError (interface name).
            },
            // The above network error is just a mistake that does not conform to the conditions of netStart, and the other is a direct catch thrown out of the more serious.
            onGLNetCatch:()=>{

            },
            // Unified single network end event
            // Even if the previous network request has entered onNetError, it will continue to perform.
            // Unless your network request has directly thrown an exception.
            onGLNetFinall:()=>{

            },
            // Extended attributes
            // If you want to send a single data to all events, you can put it here.
            //Here you will be unified in all fetch functions.
            extendAttr:()=>({a:'1'}),
            // Global parameters
            // Here you can send the corresponding model data globally to make your fetch request cleaner.
            // For example, you don't need to pass a token and other data when you need get or post each time.
            GLParams:()=>({}),
            // Global network request delay processing default 10 seconds
            GLTimeOut:10000,
            // Global timeout request
            // onGLTimeOut
    }
});
```
fetchModel Usage method
```js
    this.props.dispatch({type: 'fetch/sendData',payload:[
      {
        // The name of the model to be modified needs to be consistent with the name of the namespace field in model.
        target: 'example',
        // The name of the URL address to be requested has two ways of writing
        // If netApi is introduced into fetchConfig in DVA initialization, the name here needs to be consistent with the name of the function exposed by netApi.
        // Otherwise, it's equal to passing the URL directly.
        url: 'movie',

        // You need to pass the past parameters
        // params:{}, object

        // Delay time of a single network request
        // timeOut: number
        // priority timeout > fetchConfig > default 10 seconds

        // tranData:function
        // ts:The interface for converting the network to the later data
        // In this way, the data returned by the network request can be converted to format.
        // tranData:(data)=>({list:data.list})

        // tranUrl : false | true
        // If your URL is {specId}/id like this, as long as tranUrl is true
        // It will automatically help you find the corresponding specId from params.

        // method this parameter will bind to the netTool in fetchConfig.
        // For example, method:'get'is actually reading the get function in netTool for network request.
        // You can customize the name here, as long as you expose it in netTool.
        // isOnlyNet : bool
        // Is it just a network request without refreshing the page by default false?
        // If you just want to make a network request, set it to true.

        // onError : function
        // If you compare the error management with the single interface, you can do it here.
        // It does not block global error management. It can still be received.
        // The condition of error management is that fetchConfig.onNetStart does not conform to custom requirements before entering here.

        // onCallBack ：function
        // tranData It is used to do data conversion, if you want to perform some operations in the case of normal data acquisition.
        // For example, this.setState can be carried out here. If there is a mistake in the network, it will not come here.

        // because this payload is an array structure, your multiple network requests will be merged and will only be refreshed at the end.
        // not because you have multiple network requests, which will cause many refreshes.
        // secondly, if you want to cancel this request after launching a network request, you only need to resend one.
        // this.props.dispatch ({type:'CANCEL_FETCH'}) can cancel all network requests of that queue.
        // you can also judge the current state in fetchConfig.onNetStart only need to return to false.
        // for example, when the current token does not meet the requirements, give up all requests until token meets the requirements.
        // it will go to the corresponding onError without data merging, and will not cause the page to be refreshed again.
      }
    ]})
```
The purpose of developing this is mainly to solve some unnecessary troubles existing in the request during DVA.

1. if your current token fails to intercept all requests after the network.
It only needs to be processed in fetchConfig.onNetStart, so you can give up all requests as long as you return to false.

2. if you want to give up the current queue's network request after the network request.
You can use this.props.dispatch ({type:'CANCEL_FETCH'}) to discard network requests.

3. if you need to manage global network errors or single network errors,
The whole world can be processed in fetchConfig.onGLError or single onError.

4. global network exception handling
Because it's the same relationship with the same try catch, if you throw an exception in onError and make a description, you will be directly intercepted in the onGLCatch and you can directly know which interface is wrong.

5. global loading status processing if you want to get the current network request state when you are making a network request.
Only connect ({fetch}) = > ({... Fetch}) can be used
Fetch.isShow is the state of the network default by true representing the need to display loading.

6. when we enter the corresponding network life cycle, we usually perform certain operations, such as playing a toast.
At this time, if every file is introduced, it will be very annoying and troublesome.
FetchConfig.extendAttr this property, as long as you return to all the network lifecycle of an object, will directly merge the contents of the object so that you do not need to introduce it over and over again.

7. GLParams global params delivery, if part of our params can be shared and need to be brought to each interface.
You can use this property directly

8. GLTimeOut global network state setting is set to 10 seconds in default fetchModel. You can make global settings here.
However, the timeout of a single network request is higher than the global one.

9. if you want to change the state of state corresponding to model, you do not need to write reduce directly.
This.props.dispatch ({type:'xxx/generalState'}, payload:{xxx})
Every model loaded by this version of DVA will be added to this reduce.

10. rich network request lifecycle
When the onGLNetStart network request is called
OnGLNetError network request return data does not meet onGLNetStart requirements.
The onGLNetCatch network request encountered an exception.
OnGLNetFinall will be executed at any time unless an exception is encountered by a network request.
ExtendAttr extended attributes
GLParams extended params
GLTimeOut global network delay

11. if there is a mistake in the current network request, you can use fetch.isNetError to judge.
If you want to replay the wrong network request, you can use fetch.isNetErrorData directly.
To replay the corresponding network request

12. the trouble of simplifying the network request operation and avoiding mass network requests need to write a lot of code so that you can pay more attention to the data results of the network request.

view example [https://github.com/fangkyi03/dva/tree/master/packages/dva-example]

## Installl
> npm i --save<EMAIL_ADDRESS>## Instructions
* **Compatible DVA projects want to experience all the functions of rxjs in the current project with only the need to add epics nodes in the model file and modify the original DVA to dvajs**
* **The introduction of this package will bring about a larger volume, perhaps 60K or so.**

## Quick Start

[12 steps and 30 minutes to complete user managed CURD application. (react+dva+antd)](https://github.com/sorrycc/blog/issues/18)
>>>>>>> master

## FAQ

### The reason for the naming ?

> D.Va It has a powerful machine armor, which has two fully automatic close range fusion guns, a propeller that can make the machine leap to an enemy or an obstacle, and a defense matrix that can resist a long distance attack from the front.

—— Come from [Overwatch](http://ow.blizzard.cn/heroes/dva) 。

### Can it be used in the production environment?

Yes, it can be used

### Do you support IE8?

I won't support it

## Next step

The following can help you better understand and use DVA：

* Understanding DVA [8 concepts](https://github.com/dvajs/dva/blob/master/docs/Concepts_zh-CN.md) And how they're strung together
* Mastering DVA [ all API](https://github.com/dvajs/dva/blob/master/docs/API_zh-CN.md)
* Look at the [dva knowledge map](https://github.com/dvajs/dva-knowledgemap) all the basic knowledge, such as ES6, React, DVA, and so on
* Look at [more FAQ](https://github.com/dvajs/dva/issues?q=is%3Aissue+is%3Aclosed+label%3Afaq)Look at what other people usually have.
* If you create projects based on dva-cli, you'd better know him.[collocation method](https://github.com/sorrycc/roadhog#配置)

## Community（中文）

> 之前在 dvaantdpro 1、2 群的请勿重复加入。

扫码加微信群。(群满 100 人后，可加 `sorryccpro` 备注 `dva` 邀请加入）

## License

[MIT](https://tldrlegal.com/license/mit-license)

repository: Wupeirong/dvajs

repo_name: Wupeirong/dvajs