text:
# [DHashToken protocol](https://dhashtoken.org) - staking value for utility

While DHashToken 0.9 is available as-is for anyone to use, we caution that this is early stage software and under heavy ongoing development and improvement. Please report bugs and suggested improvements.

Watch demo video of milestone 1 (will take you to [https://youtu.be/5q_Y89gGs3Q](https://youtu.be/5q_Y89gGs3Q))

## About DHash Token

DHash Token [“DHT”] is an EIP20 token and DHashToken is a protocol to support token economies in mainstream consumer applications. The business and technical challenge we set out to solve is to enable mainstream consumer applications to benefit from deploying their own branded crypto-backed token economies, in a scalable and cryptographically auditable manner, without needing to mint and maintain their own publicly-tradeable EIP20 tokens.

The DHashToken protocol enables the creation of utility tokens on a utility blockchain while the value of those tokens is backed by staked crypto-assets on a value blockchain.

The DHashToken Protocol establishes a bridge between two differently purposed blockchains.  A value blockchain, which is required in order to hold cryptographically secured valuable assets; and a utility blockchain, which has utility tokens in favor of which the assets are held on the value blockchain.

## DHashToken Protocol

To mint utility tokens on a utility chain out of value staked on a value chain, or to redeem value on the value chain by redeeming ownership of utility tokens on the utility chain, the protocol needs to atomically act on two blockchains.  DHashToken Protocol requires a two-phased commit for either action.

`DHashToken-protocol` provides the smart contracts that implement the DHashToken protocol which enables staking and redeeming utility tokens. For more details see the technical white paper on [DHashtoken.org/documents](https://DHashtoken.org/documents).

![](docs/protocol.png)

## Roadmap
Milestone 1 : The first DHashToken Release (July 2016)

Milestone 2 : DHashToken Release 15 million, Member exchange offline  (May 2017)

Milestone 3 : DHashToken Come to China, ( November 2017)

Milestone 4 : DHashToken Platform v1.0 (Q1 2018)

Milestone 5 : Public Launch of Initial Member Companies (Q2 2018)

Milestone 6 : 10 Founding Member Companies (Q3-Q4 2018)

Milestone 7 : Consolidation of DHashToken as open platform (2019)

repository: DHashToken/DHashToken-protocol

repo_name: DHashToken/DHashToken-protocol


text:
# Capillary Action

  This project aims to visualize the trajectories of various water molecules when the capillary action is observed. It also intends to visualize how the liquid-solid as well as the liquid-liquid contact in the interface changes over time. A deeper understanding of the properties of liquid-liquid and liquid-solid molecule contact can aid in the construction of surfaces which sustain liquid-liquid contact but obstruct liquid-solid contact. This, in turn, would lead to progress in the field of research on non-stick surfaces.

Path to dataset: https://1drv.ms/f/s!Ai5HtuHa525Igpc2M0w2G4-cAfmjWA
This path contains:
 - The Original dataset.
 - Python app which converts the Original dataset to a JSON file (Code is provided in the repo).
 - A "ReadMe" file containing instructions to use the app.

The final website is deployed at: https://smaith2.people.uic.edu/capillary_action

Youtube Link also available at: https://youtu.be/3GZYSolkPx4

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Pleo Mobile Challenge
This app is developed as a mobile development challenge by the company Pleo. It's developed in React Native but includes a native camera picker element from native iOS Swift.

# Screenshots
![](./Screenshots/loading.png) ![](./Screenshots/home.png) ![](./Screenshots/details.png)

## How long did it take?
It took about 18 hours of work. That includes prototyping the design and implementation.

## Which part was the hardest to implement?
The hardest part was the bridge between React Native and Swift as the documentation available on this topic is not sufficient.

## What functionalities are you most proud of?
Picking up the image from native iOS code and sending it to react native for use using Event Emitter is the best part.

## Functional requirements
- User can list expenses
- User can add a comment on an expense
- User can filter on expenses (client side filters)
- User can add a receipt image on an expense

## Extra Functionality
- Implementation with state management library Redux
- Used Redux-Thunk Middleware
- Native iOS swift camera module for uploading receipt images

## Libraries Included 👇
- Redux
- React Navigation
- Redux Thunk

gha_language: TypeScript

gha_license_id: MIT


text:
---
title: 'Zap2it article: “Babylon 5 turns 20” – JMS interview'
author: Ranger 3ndymion
type: post
date: 2014-01-31T21:37:57+00:00
categories:
  - Uncategorized

---
TV news and listings website “Zap2It”, a fresh and lively guide for millions of Americans who love TV and movies, has interviewed creator JMS on the anniversary of 20 years of Babylon 5.

The interview reflects on the shows’ lasting legacy, including how open JMS was about the process of creating Babylon 5 and the constant dialog that was going on between fans and himself during the shows run. “my thought at the time was that viewers can’t get what they want without understanding the process.”

[Read the interview »][1]

First reported on Twitter (as far as we know) by Jay Fulber Harvey ([@jayfulberharvey][2]). Thanks for the find, Jay!

 [1]: http://blog.zap2it.com/frominsidethebox/2014/01/babylon-5-turns-20-creator-j-michael-straczynski-reflects-on-the-shows-legacy.html
 [2]: https://twitter.com/jayfublerharvey


text:
Notice: too apply patch run

# Apply

```

patch -p1 <device/samsung/msm7x27a-common/patch/patch.diff

```

# Revert

```

patch -p1 -R <device/samsung/msm7x27a-common/patch/patch.diff

```


text:
desalination-ZH
===============

An educational website on the state of desalination technology in Singapore. (Chinese content)

Brief History
=====

Back in the days when Flash was still the craze, I built this website as part of my research project for Chinese class. Apart from a few broken external links in the swf file (caused by stricter security settings in modern browsers), the website is in surprisingly good shape.

* `src` directory contains the source fla, psd, and various resources pulled off the internet.
* `dist` diretory contains the distributable files for the entire site.

repository: sweatybridge/desalination-ZH

repo_name: sweatybridge/desalination-ZH


text:
## [5.0.6] - 2023-07-18
### Changed
- `token` configuration option was renamed to `apiKey` to maintain common convention.
- `@reportportal/client-javascript` bumped to version `5.0.12`.
- Readme file updated.

## [5.0.5] - 2023-03-16
### Added
- `RP_DESCRIPTION` & `RP.MODE` env variables support. Thanks to [Jonathan Carvalheiro](https://github.com/Jonathan-Carvalheiro)
### Fixed
- Log messages in RP shown without ANSI characters

## [5.0.4] - 2022-05-30
### Added
- Possibility to provide endpoint url via `RP_ENDPOINT` environment variable
- New [option](./README.md#loglaunchlink-flag) `logLaunchLink` to print launch url in console
### Fixed
- The duration of tests and suites is now displayed correctly
- The reporter will now wait for a report on all tests
- Security vulnerabilities
- Tests without describe block causes error [#82](https://github.com/reportportal/agent-js-jest/issues/82)
### Changed
- Package size reduced

## [5.0.3] - 2021-06-23
### Fixed
- Nested describe blocks are not visible in report
### Updated
- `@reportportal/client-javascript` version to the latest
### Added
- `restClientConfig` configuration property support (more details in [client-javascript](https://github.com/reportportal/client-javascript))

## [5.0.2] - 2021-02-09
### Added
- Debug flag, launch mode configuration properties
### Fixed
- Doesn't start a suite if test has no describe
- Vulnerable dependencies (lodash)

## [5.0.1] - 2020-06-12
### Changed
- Packages publishing workflow improved

## [5.0.0] - 2020-06-11
### Added
- Full compatibility with ReportPortal version 5.* (see [reportportal releases](https://github.com/reportportal/reportportal/releases))
### Deprecated
- Previous package version (`@reportportal/reportportal-agent-jest`) will no longer supported by reportportal.io

repository: reportportal/agent-js-jest

branch_name: refs/heads/develop

gha_language: JavaScript

repo_name: reportportal/agent-js-jest


text:
---
layout: post
title: "Drupal GraphQL with Contenta, Angular and Apollo Part 2 - Queries"
description: "Using Apollo Angular to query entities from Contenta and GraphQL."
thumb_image: "posts/net.jpg"
tags: [web, angular, javascript, drupal]
---

{% include image.html path="posts/queries.jpg" path-detail="posts/queries.jpg" alt="queries" %}

This is the continuation of a series of blog posts explaining how to use [Contenta](http://www.contentacms.org/) and [GraphQL](http://graphql.org/) with [Angular](https://angular.io/).

In the [previous post](/posts/drupal-graphql-with-angular-and-apollo-part1) we learned how to configure Authentication, and now we will see how to use that authentication to query and mutate data in our GraphQL backend using [Apollo Angular](https://github.com/apollographql/apollo-angular).

## Full code samples

The code samples can be found in Github. It includes all the frontend code and also the code for the custom mutations to be used with Drupal GraphQL.

[Frontend code](https://github.com/joaogarin/drupal-graphql-with-angular-and-apollo)
[Custom GraphQL mutation module](https://github.com/joaogarin/graphql_custom_mutations)

## Install Apollo Angular

The first step is to install Apollo Angular. Following the [Instructions on the official docs site](https://www.apollographql.com/docs/angular/) we start by installing it via npm :

{% highlight bash %}
npm install apollo-angular apollo-angular-link-http apollo-client apollo-cache-inmemory graphql-tag graphql --save
{% endhighlight %}

Next we import the ApolloModule into our app's root module (app.module.ts) and configure the Apollo Client. The Client is what we will be using to call queries, mutations and so on to our graphql backend. Because we will be setting up our client to use authentication we need to configure Apollo Client with a specific link (Apollo Link) that will append the token we receive from Drupal (see previous authentication blog post) to all of the requests being made. You can find more information about Authentication in the [official documentation for Apollo Angular](https://www.apollographql.com/docs/angular/recipes/authentication.html)

{% highlight javascript %}
import { Apollo, ApolloModule } from 'apollo-angular';
import { HttpLink, HttpLinkModule } from 'apollo-angular-link-http';
import { setContext } from 'apollo-link-context';
import { InMemoryCache } from 'apollo-cache-inmemory';

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    OAuthModule.forRoot(),
    ApolloModule,
    HttpLinkModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {
  constructor(apollo: Apollo,
    httpLink: HttpLink) {
    const http = httpLink.create({ uri: `${environment.contenta_url}${environment.graphql}`});

    const auth = setContext((_, { headers }) => {
      // get the authentication token from local storage if it exists
      const token = localStorage.getItem('token');

      if (!token) {
        return {};
      } else {
        return {
          headers: new HttpHeaders().append('Authorization', `Bearer ${token}`).append('Content-Type', 'application/json')
        };
      }
    });

    apollo.create({
      link: auth.concat(http),
      cache: new InMemoryCache(),
    });
  }
}
{% endhighlight %}

There are a couple of things going on here, let's break this down into pieces :

We configure our http link by providing our backend api URL (contenta graphql endpoint). We then create a authentication context that will append our token to each http request going out with the HTTP header "Authorization" bearer and proving our token (previously saved in localStorage).

### Saving our token

In our previous blog post we had a little snippet to kickstart our authentication, we need to adapt this to save our token in localStorage so that it is available for us here. In our app.component.ts change the method "configureWithNewConfigApi" to :

{% highlight javascript %}
private configureWithNewConfigApi() {
  this.oauthService.configure(authConfig);
  this.oauthService.setStorage(sessionStorage);
  this.oauthService.tryLogin().then(_ => {
    // save the token in localstorage
    localStorage.setItem('token', this.oauthService.getAccessToken());
    this.authenticated = this.oauthService.hasValidAccessToken();
  });
}
{% endhighlight %}

We also need to make sure to dispose it when we logout, so adapt the logout() method with :

{% highlight javascript %}
public logoff() {
  this.oauthService.logOut();
  localStorage.removeItem('token');
  this.authenticated = false;
  // reset the store after that
  this.apollo.getClient().resetStore();
}
{% endhighlight %}

ok! At this point Apollo is fully configured, we can start making queries. Also notice that by doing it this way we need to make sure that the roles that we are using (see previous blog post about Authentication) have the needed access rights to read / write or whatever you need to do to the correct entities.

## Querying

Querying with Apollo is extremely easy, I suggest getting started by playing with the GraphiQL playground and experiment with queries structure / syntax first in order to make sure the queries work there before doing it on the frontend.

For this example I will assume a content type called "Client" exists in the Drupal installation (just setup a content type with name Client, machine name should be client). Also this content type should have some fields created :

-  email
-  telephone

### Querying a list of clients

Before I do any frontend work (like mentioned above) I tested my query in GraphiQL Playground, that's good because it provides autocomplete for fields that are available in any entity, relationships etc..Once that's done I can move to the frontend app.

{% include image.html path="posts/graphiql.png" path-detail="posts/graphiql.png" alt="graphiql" %}

Now that the query works in GraphiQl the first step we can do to start working with clients in the frontend is creating a model for Clients. Inside src/app/ create a folder "models" with a file called client.model.ts :

{% highlight javascript %}
export interface Client {
    entityId: number,
    entityLabel: string;
    email: string;
    telephone: string;
}
{% endhighlight %}

Now in the app.component.ts (our root component for simplicity sake) let's do a simple query to fetch clients. Our query will return an observable of our response (a list of clients) we can then pipe this in our template using the `async` pipe.

{% highlight javascript %}
...

import { Observable } from 'rxjs/observable';

import { Apollo } from 'apollo-angular';
import gql from 'graphql-tag';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'app';
  authenticated = false;
  clients: Observable<Client[]>;

  query = gql`{
  nodeQuery(limit: 5, offset: 0, filter: {type: "Client"}) {
    entities {
      entityId,
      entityLabel,
      entityUrl {
        path
      },
      entityPublished
      ... on NodeClient {
        telephone,
        email
      }
    }
  }
}`;

  ...

  constructor(private oauthService: OAuthService, public apollo: Apollo) {
    this.configureWithNewConfigApi();
  }

  ...

  runQuery() {
    // Sample query
    this.clients = this.apollo .query({ query: this.query}).map(q => {
      return q.data['nodeQuery']['entities'];
    });
  }
  ...
}

{% endhighlight %}

In our template we append a little button to run the Query :

{% highlight html %}
...
<button (click)="runQuery()">query</button>
...
}
{% endhighlight %}

We query our data using Apollo Client and wrapping our graphql in graphql-tag. The query is exactly the same we used in the GraphiQL playground. We map the response and get the entities out of the data received and assign it to our observable of type `clients: Observable<Client[]>;`.

In our template we then can easily list these out :

{% highlight html %}
...

      Name: {{client.entityLabel}}

      Email: {{client.email}}

      Telephone: {{client.telephone}}

...
}
{% endhighlight %}

## All together now

The full app.module.ts with authentication and apollo client and link configured looks like this :

{% highlight javascript %}
import { environment } from './../environments/environment';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpHeaders } from '@angular/common/http';
import { AppComponent } from './app.component';
import { OAuthModule } from 'angular-oauth2-oidc';

import { Apollo, ApolloModule } from 'apollo-angular';
import { HttpLink, HttpLinkModule } from 'apollo-angular-link-http';
import { setContext } from 'apollo-link-context';
import { InMemoryCache } from 'apollo-cache-inmemory';

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    OAuthModule.forRoot(),
    ApolloModule,
    HttpLinkModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {
  constructor(apollo: Apollo,
    httpLink: HttpLink) {
    const http = httpLink.create({ uri: `${environment.contenta_url}${environment.graphql}` //?XDEBUG_SESSION_START=PHPSTORM
   });

    const auth = setContext((_, { headers }) => {
      // get the authentication token from local storage if it exists
      const token = localStorage.getItem('token');

      if (!token) {
        return {};
      } else {
        return {
          headers: new HttpHeaders().append('Authorization', `Bearer ${token}`).append('Content-Type', 'application/json')
        };
      }
    });

    apollo.create({
      link: auth.concat(http),
      cache: new InMemoryCache(),
    });
  }
}
{% endhighlight %}

Our root app.component.ts where we have our query for clients :

{% highlight javascript %}
import { Client } from './models/Client';
import { Component } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
import { JwksValidationHandler } from 'angular-oauth2-oidc';
import { authConfig } from './auth.config';

import { Observable } from 'rxjs/observable';

import { Apollo } from 'apollo-angular';
import gql from 'graphql-tag';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'app';
  authenticated = false;
  clients: Observable<Client[]>;

  query = gql`{
  nodeQuery(limit: 5, offset: 0, filter: {type: "Client"}) {
    entities {
      entityId,
      entityLabel,
      entityUrl {
        path
      },
      entityPublished
      ... on NodeClient {
        telephone,
        email
      }
    }
  }
}`;

  constructor(private oauthService: OAuthService, public apollo: Apollo) {
    this.configureWithNewConfigApi();
  }

  runQuery() {
    // Sample query
    this.clients = this.apollo .query({ query: this.query}).map(q => {
      return q.data['nodeQuery']['entities'];
    });
  }

  private configureWithNewConfigApi() {
    this.oauthService.configure(authConfig);
    this.oauthService.setStorage(sessionStorage);
    this.oauthService.tryLogin().then(_ => {
      // save the token in localstorage
      localStorage.setItem('token', this.oauthService.getAccessToken());
      this.authenticated = this.oauthService.hasValidAccessToken();
    });
  }

  public login() {
    this.oauthService.initImplicitFlow();
  }

  public logoff() {
    this.oauthService.logOut();
    localStorage.removeItem('token');
    this.authenticated = false;
    // reset the store after that
    this.apollo.getClient().resetStore();
  }
}
{% endhighlight %}

and our template for this component where we render the full list of clients we get from graphql :

{% highlight html %}

  Hello Contenta Graphql

Status : Authenticated

    <button *ngIf="authenticated" class="btn btn-default" (click)="logoff()">
      Logout
    </button>

<ng-template #unauth>

Status : Anonymous

    <button *ngIf="!authenticated" class="btn btn-default" (click)="login()">
      Login
    </button>

</ng-template>

  Clients

<button (click)="runQuery()">query</button>

      Name: {{client.entityLabel}}

      Email: {{client.email}}

      Telephone: {{client.telephone}}

{% endhighlight %}

That's it!  You can find all the things you can do with queries including creating fragments for shared parts of queries across multiple places of you app and other more advanced query features in the [Official documentation site](https://www.apollographql.com/docs/angular/).

In the [next post](/posts/drupal-graphql-with-angular-and-apollo-part3) we will see how we can do mutations using the [Drupal GraphQL module](https://github.com/drupal-graphql/graphql) and Apollo.

repository: joaogarin/joaogarinblog

repo_name: joaogarin/joaogarinblog


text:
This resume was last updated in December 2020.

### Preview

![Resume Screenshot](/resume_SB.jpg)

### License

Format is MIT but all the data is owned by Saurav Bose.

### Acknowledgements
* [@sb2nov](https://github.com/sb2nov/) for the initial LaTeX code.
* Many others contributors listed [here](https://github.com/sb2nov/resume/graphs/contributors)

repository: sauravbose/resume

repo_name: sauravbose/resume


text:
## Creating Context

In this article, you'll see a lot of `context` use: in this case this is a `PnPContext` which was obtained via the `PnPContextFactory` as explained in the [overview article](../readme.md) and show below:

```csharp
using (var context = await pnpContextFactory.CreateAsync("SiteToWorkWith"))
{
    // See next chapter on how to use the PnPContext for doing Microsoft 365 admin operations
}
```

## PnP.Core.Admin dependency

The functionality shown in this article depends on the [PnP.Core.Admin nuget package](https://www.nuget.org/packages/PnP.Core.Admin). Once the PnP.Core.Admin nuget package has been installed you can get to the Microsoft 365 admin features via using the `GetMicrosoft365Admin` extension method:

```csharp
using (var context = await pnpContextFactory.CreateAsync("SiteToWorkWith"))
{
    // Use the GetMicrosoft365Admin extension method on any PnPContext
    // to tap into the Microsoft 365 admin features
    var isMultiGeo = await context.GetMicrosoft365Admin().IsMultiGeoTenantAsync();
}
```

repository: pnp/pnpcore

branch_name: refs/heads/dev

gha_language: C#

repo_name: pnp/pnpcore


text:
# v1.5.5

### Bug Fixes

- Prevent flushing custom iptable rules frequently ([#474](https://github.com/Azure/aad-pod-identity/pull/474))

# v1.5.4

### Features

- Add block-instance-metadata flag ([#396](https://github.com/Azure/aad-pod-identity/pull/396))
- Add metrics ([#429](https://github.com/Azure/aad-pod-identity/pull/429))
- Adding support for whitelisting of user-defined managed identities ([#431](https://github.com/Azure/aad-pod-identity/pull/431))

### Bug Fixes

- Fix glog flag parse error in nmi ([#435](https://github.com/Azure/aad-pod-identity/pull/435))

### Other Improvements

- Add application/json header for all return paths ([#424](https://github.com/Azure/aad-pod-identity/pull/424))
- Update golang used to build binaries ([#426](https://github.com/Azure/aad-pod-identity/pull/426))
- Reduce log verbosity for debug log ([#433](https://github.com/Azure/aad-pod-identity/pull/433))
- Move to latest Alpine 3.10.4 ([#446](https://github.com/Azure/aad-pod-identity/pull/446))
- Validate resource param exists in request ([#450](https://github.com/Azure/aad-pod-identity/pull/450))

# v1.5.3

### Bug Fixes

- Fix concurrent map read and map write while updating stats ([#344](https://github.com/Azure/aad-pod-identity/pull/344))
- Fix list calls to use local cache inorder to reduce api server load ([#358](https://github.com/Azure/aad-pod-identity/pull/358))
- Clean up assigned identities if node not found ([#367](https://github.com/Azure/aad-pod-identity/pull/367))
- Fixes to identity operations on VMSS ([#379](https://github.com/Azure/aad-pod-identity/pull/379))
- Fix namespaced multiple binding/identity handling and verbose logs ([#388](https://github.com/Azure/aad-pod-identity/pull/388))
- Fix panic issues while identity ids is nil ([#403](https://github.com/Azure/aad-pod-identity/pull/403))

### Other Improvements

- Set Content-Type on token response ([#341](https://github.com/Azure/aad-pod-identity/pull/341))
- Redact client id in NMI logs ([#343](https://github.com/Azure/aad-pod-identity/pull/343))
- Add user agent to kube-api calls ([#353](https://github.com/Azure/aad-pod-identity/pull/353))
- Add resource and request limits ([#372](https://github.com/Azure/aad-pod-identity/pull/372))
- Add user agent to ARM calls ([#387](https://github.com/Azure/aad-pod-identity/pull/387))
- Scale and performance improvements ([#408](https://github.com/Azure/aad-pod-identity/pull/408))
- Remove unused GET in CreateOrUpdate ([#411](https://github.com/Azure/aad-pod-identity/pull/411))
- Remove deprecated API Version usages ([#416](https://github.com/Azure/aad-pod-identity/pull/416))

# v1.5.2

### Bug Fixes

- Fix the token backward compat in host based token fetching ([#337](https://github.com/Azure/aad-pod-identity/pull/337))

# v1.5.1

### Bug Fixes

- Append NMI version to the `User-Agent` for adal only once ([#333](https://github.com/Azure/aad-pod-identity/pull/333))

### Other Improvements

- Change 'updateStrategy' for nmi DaemonSet to `RollingUpdate` ([#334](https://github.com/Azure/aad-pod-identity/pull/334))

# v1.5

### Features

- Support aad-pod-identity in init containers ([#191](https://github.com/Azure/aad-pod-identity/pull/191))
- Cleanup iptable chain and rule on uninstall ([#211](https://github.com/Azure/aad-pod-identity/pull/211))
- Remove dependency on azure.json ([#221](https://github.com/Azure/aad-pod-identity/pull/221))
- Add states for AzureAssignedIdentity and improve performance ([#219](https://github.com/Azure/aad-pod-identity/pull/219))
- System MSI cluster support ([#265](https://github.com/Azure/aad-pod-identity/pull/265))
- Leader election in MIC ([#277](https://github.com/Azure/aad-pod-identity/pull/277))
- Liveness probe for MIC and NMI ([#309](https://github.com/Azure/aad-pod-identity/pull/309))
- Application Exception ([#310](https://github.com/Azure/aad-pod-identity/pull/310))

### Bug Fixes

- Fix AzureIdentity with service principal ([#197](https://github.com/Azure/aad-pod-identity/pull/197))
- Determine resource manager endpoint based on cloud name ([#226](https://github.com/Azure/aad-pod-identity/pull/226))
- Fix incorrect resource endpoint with sp ([#251](https://github.com/Azure/aad-pod-identity/pull/251))
- Fix vmss identity deletion for ID in use ([#203](https://github.com/Azure/aad-pod-identity/pull/203))
- Fix removal of user assigned identity from nodes with system assigned ([#259](https://github.com/Azure/aad-pod-identity/pull/259))
- Handle case sensitive id check ([#271](https://github.com/Azure/aad-pod-identity/pull/271))
- Fix assigned id deletion when no identity exists ([#320](https://github.com/Azure/aad-pod-identity/pull/320))

### Other Improvements

- Use go modules ([#179](https://github.com/Azure/aad-pod-identity/pull/179))
- Log binary versions of MIC and NMI in logs ([#216](https://github.com/Azure/aad-pod-identity/pull/216))
- List CRDs via cache and avoid extra work on pod update ([#232](https://github.com/Azure/aad-pod-identity/pull/232))
- Reduce identity assignment times ([#199](https://github.com/Azure/aad-pod-identity/pull/199))
- NMI retries and ticker for periodic sync reconcile ([#272](https://github.com/Azure/aad-pod-identity/pull/272))
- Update error status code based on state ([#292](https://github.com/Azure/aad-pod-identity/pull/292))
- Process identity assignment/removal for nodes in parallel ([#305](https://github.com/Azure/aad-pod-identity/pull/305))
- Update base alpine image to 3.10.1 ([#324](https://github.com/Azure/aad-pod-identity/pull/324))

repository: daniel-oh/aad-pod-identity

repo_name: daniel-oh/aad-pod-identity


text:
---
layout: default
title: "Emit"
order: 4
---
# Emit

An `emit` is a method of broadcasting an event to the rest of the system which can be listened to by a [listener][listen]. They're synonymous with a distributed version of Node's `EventEmitter`, with the added benefit that they also buffer events for listeners currently offline; emissions never receive responses and so are persisted, meaning a service that has missed X emissions can start up and will be able to process the backlog.

This makes emissions a very good fit for things that should happen following an event. For instance, sending a welcome email when a user is created, or running image processing after an image is uploaded.

{% highlight js %}
// set up an emission to let the system know
// a user has been created
const emitUserCreated = remit.emit('user.created')

// use it again and again!
emitUserCreated({ id: 123, name: 'Jane' })
emitUserCreated({ id: 456, name: 'John' })
{% endhighlight %}

### Create and send an emission

`remit.emit(event[, options])` returns a new emitter that will emit data to any interested [listeners][listen], dictated by `event`. The best practice for emissions is to create them once and reuse them. Creation returns a function which, when run, returns a promise that's either resolved or rejected depending on whether the emission successfully sent.

{% highlight.js %}
// create an emission
const emitUserCreated = remit.request('user.created')

// send the emission
try {
  await emitUserCreated({ id: 123, name: 'Jane' })
} catch (e) {
  // emitting returned an error for some reason
}

// the `send()` function is the same as running the emitter directly
await emitUserCreated.send({ id: 456, name: 'John' })
{% endhighlight %}

The data sent can be anything that plays nicely with [JSON.stringify][json-stringify]. If `data` is not defined, `null` is sent (`undefined` cannot be parsed into JSON).

If `options` are defined after `data` when _emitting_, the options only apply to that single emission and have no effect on the emitter as a whole.

### Set options

`emit.options(options)` allows you to set the current options for the emission. This can be done at any point in an `emit`ter's life but will not affect emissions that have already been sent.

{% highlight js %}
const emitUserCreated = remit
  .emit('user.created')
  .options({

  })

// can also set on creation; `event` is required
const emitPostCreated = remit.emit({
  event: 'post.created',

})
{% endhighlight %}

Available options:

| Option | Type | Required | Default | Description |
| ------------------------------------------------ |
| `event` | _string_ | yes | | Only required if _creating_ an emitter with an options block. |
| `priority` | _integer_ | | `0` | Can be an integer between `0` and `10`. Higher priority emissions will go to the front of queues before lower priority emissions. |
| `delay` | _integer_/_string_/_Date_ | | | Delay an emission for a minimum amount of time. Either an _integer_ (milliseconds), a [zeit/ms](https://npm.im/ms) _string_, or a _Date_. See Delaying/scheduling below for more information. |

Returns a reference to the `emit`ter so that calls can be chained.

### Delaying/scheduling

You can delay emissions for an amount of time. They'll be held in a separate messaging queue until they're released, being pushed as normal to the relevant listeners as if had just been emitted.

This is a good alternative to methods like `cron`.

You can provide either an _integer_ (milliseconds), a [zeit/ms](https://npm.im/ms) _string_, or a _Date_.

### Add listeners

`emit.on` can be used to register listeners for events specific to a created emitter. See the [Events][events] page for more information on the events emitted.

Returns a reference to the `emit`ter so that calls can be chained.

### Wait for an emitter to be ready

No setup is needed to set up an emitter, but as a future-proofing measure you can still use an `emit.ready()` promise to check that it's ready to go.

{% highlight js %}
const emitUserCreated = await remit
  .emit('user.created')
  .ready()

// ready to emit
{% endhighlight %}

Returns a reference to the `emit`ter so that calls can be chained.

repository: jpwilliams/remit

repo_name: jpwilliams/remit


text:
# Download

## Getting the latest artifact from Gitalb

<https://docs.gitlab.com/ee/user/project/pipelines/job_artifacts.html#downloading-the-latest-artifacts>

To download a single file from the artifacts use the following URL:

https://example.com/<namespace>/<project>/-/jobs/artifacts/<ref>/raw/<path_to_file>?job=<job_name>

To download the file coverage/index.html from the same artifacts use the following URL:

https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/artifacts/master/raw/coverage/index.html?job=coverage

I've tried to create a Grav plugin (`gitlab-get-job-artifact`) to browse the Gitlab API but it was not necessary.

- Grav's GPM is using its own library based on curl to make get requests:

  ```php
  use Grav\Common\GPM\Response;

  $body = Response::get('https://getgrav.org/notifications.json?' . time());
  ```

  It's probably worth to use it, too.

- All calls to the Gitlab API seem to need authentication, even for public information like the list of jobs.

repository: impagina/htdocs-grav-pages

gha_language: PHP

repo_name: impagina/htdocs-grav-pages


text:
---
title: Unity
weight: 140
getting_started: true
---

Get started using Resonance Audio in Unity. This guide shows you how to:

*  Set up Unity for development with Resonance Audio.
*  Explore how Resonance Audio components render realistic spatial audio in a
   demo scene.
*  Add Resonance Audio components to your scenes.
*  [Upgrade projects](#upgrading-existing-projects-from-google-vr-audio-components) with Google VR SDK audio components to Resonance Audio.

## Set up your development environment

Software requirements:

*   Install [Unity 2017.1](//unity3d.com/get-unity/download){: .external} or
    newer.

*   Download the latest `ResonanceAudioForUnity_*.unitypackage` from the
    [releases](//github.com/resonance-audio/resonance-audio-unity-sdk/releases){: .external}
    page.

    The download includes a demo scene that you will explore in this guide.

## Create a new Unity project and import the SDK
1.  Open Unity and create a new **3D** project.

1.  Select **Assets** > **Import Package** > **Custom Package**.

1.  Select the `ResonanceAudioForUnity_*.unitypackage` file that you downloaded.

1.  In the **Importing Package** dialog, click **Import**.
    Accept any [API upgrades](//docs.unity3d.com/Manual/APIUpdater.html){: .external} if prompted.

## Configure your Unity project to use Resonance Audio

1.  Use **Edit** > **Project Settings** > **Audio** to open the AudioManager
    settings.

1.  Select **Resonance Audio** as the **Spatializer Plugin**.

1.  Select **Resonance Audio** as the **Ambisonic Decoder Plugin**.

## Try out the Resonance Audio demo
The Unity software package includes a simple demo scene in which you look for
a cube that moves around the scene when you click on it.

1.  In the Unity **Project** window, go to **Assets** > **ResonanceAudio** >
    **Demos** > **Scenes** and double-click `ResonanceAudioDemo`.

1.  Make sure to wear headphones to experience the spatialized audio. Click
    **Play** in the Unity Editor. You should hear the cube sound played back in
    the scene.

1.  Interact with the scene using your mouse:

    *  Left-click in the **Game** view and move the mouse to look around the
       scene. Listen to the audio clip from different directions.
    *  In the Game view, left click on the cube to "teleport" it around the scene.

## Resonance Audio components
The Resonance Audio SDK for Unity includes the following components for rendering
spatial audio.

      Component / Prefab name
      Description

    ResonanceAudioListener

Enhances Unity's AudioListener features by introducing additional optional parameters,
   such as global gain and source occlusion masks.

Includes an Ambisonic soundfield recorder component that allows baking
           spatial audio sources in the scene into an Ambisonic soundfield.

   Requires a Unity AudioListener in the same game object.

    ResonanceAudioSource

Enhances Unity's AudioSource features by introducing additional optional parameters
       such as directivity patterns, occlusion, and rendering quality.

  Requires a Unity AudioSource in the same game object.

    ResonanceAudioSoundfield

Represents full 360° spatial audio by encoding sound waves on a
         virtual sphere around a listener.

      ResonanceAudioRoom

Simulates room effects for a particular space by introducing dynamic
         early reflections and late reverberation.

Uses the Transform properties of the attached game object and applies
   room effects accordingly.

The corresponding room effects are enabled whenever the AudioListener is
   inside the specified boundaries of the room model.

       ResonanceAudioReverbProbe

Offers an advanced option for
finer modeling of spaces and more nuanced reverb effects.

Learn more about adding these components to your projects in the
[Developer Guide for Resonance Audio for Unity]({{ site.baseurl }}/develop/unity/developer-guide).

## Upgrading existing projects from Google VR audio components
Upgrade existing projects from Google VR audio components to Resonance Audio
(Requires [Unity 2017.1](//unity3d.com/get-unity/download){: .external} or
later).

The new Resonance Audio SDK components have similar functionality and
configuration properties to those in the Google VR SDK.

Upgrading to Resonance Audio requires updating the Unity project's audio
settings, replacing the Google VR SDK audio components with corresponding
Resonance Audio components, and then copying component properties accordingly.

### Update the project audio settings and replace Google VR components
1.  Use **Edit** > **Project Settings** > **Audio** to open the AudioManager
    settings.

1.  Select **Resonance Audio** as the **Spatializer Plugin**.

1.  Select **Resonance Audio** as the **Ambisonic Decoder Plugin**.

### `GvrAudioListener`

1.  Add a new `ResonanceAudioListener` component attached to the Main Camera.

1.  Copy the `GvrAudioListener` settings, such as the global gain and occlusion
    mask, to the newly created `ResonanceAudioListener`.
    Note that the global quality option is now replaced by a real-time source
    based rendering quality setting in `ResonanceAudioSource` component.

    Additionally, a runtime setting to enable the stereo speaker mode option
    has been added. This option allows all sources to be rendered with
    stereo panning.

1.  Remove the `GvrAudioListener` component from the game object.

1.  For additional details, review [Add an audio listener to your scene]({{ site.baseurl }}/develop/unity/developer-guide#add-an-audio-listener-to-your-scene) in the Developer Guide for Resonance Audio for Unity for more details.

### `GvrAudioSource`

1.  Add a new `ResonanceAudioSource` component to the game object that contains
    the `GvrAudioSource` component you want to replace.

    Unity automatically adds a standard **AudioSource** component to the game
    object if one does not already exist.

1.  Copy the `GvrAudioSource` properties:

    *  Copy the standard audio source properties, such as mute or volume, to the
       `AudioSource` component.

    *  Copy values specific to spatial audio, such as directivity,
       to the `ResonanceAudioSource`.

    *  Note that the `GvrAudioSource`'s **Enable HRTF** option is now replaced by
       source based rendering **Quality** in Resonance Audio.

1.  Remove the `GvrAudioSource` component from the game object.

1.  For additional details, review [Add a sound source to your scene]({{ site.baseurl }}/develop/unity/developer-guide#add-a-sound-source-to-your-scene)
    in the Developer Guide for Resonance Audio for Unity.

### `GvrAudioSoundfield`
Resonance Audio uses the same `ResonanceAudioSource` component for sound sources
and Ambisonic soundfields.

Note that with the introduction of Ambisonic decoder plugins in Unity,
it is no longer necessary to provide separate stereo tracks as audio clips.

1.  Add a new `ResonanceAudioSource` component to the game object that contains
    the `GvrAudioSoundfield` component you want to replace.

    Unity automatically adds a standard **AudioSource** component to the game
    object if one does not already exist.

1.  Copy the `GvrAudioSoundfield` properties to the newly created `AudioSource`
    and `ResonanceAudioSource` components.

1.  Remove the `GvrAudioSoundfield` component from the game object.

1.  For additional details, review [Add an Ambisonic soundfield to your scene]({{ site.baseurl }}/develop/unity/developer-guide#add-an-ambisonic-soundfield-to-your-scene) in the Developer Guide for
    Resonance Audio for Unity.

### `GvrAudioRoom`

1.  Add a new `ResonanceAudioRoom` component to the game object that contains
    the `GvrAudioRoom` component you want to replace.

1.  Copy the `GvrAudioRoom` properties to the newly created `ResonanceAudioRoom`
    component.

1.  Remove the `GvrAudioRoom` component from the game object.

1.  For additional details, review [Add an audio room to your scene]({{ site.baseurl }}/develop/unity/developer-guide#add-an-audio-room-to-your-scene)
    in the Developer Guide for Resonance Audio for Unity.

### Delete Google VR audio assets and libraries

1.  Delete the Google VR audio libraries:

        Assets/GoogleVR/Plugins/Android/libs/armeabi-v7a/libaudioplugingvrunity.so
        Assets/GoogleVR/Plugins/Android/libs/x86/libaudioplugingvrunity.so
        Assets/GoogleVR/Plugins/iOS/libaudioplugingvrunity.a
        Assets/GoogleVR/Plugins/x86/audioplugingvrunity.dll
        Assets/GoogleVR/Plugins/x86_64/audioplugingvrunity.bundle
        Assets/GoogleVR/Plugins/x86_64/audioplugingvrunity.dll
        Assets/GoogleVR/Plugins/x86_64/libaudioplugingvrunity.so

1.  Delete the Google VR audio Objective-C (iOS) assets:

        Assets/GoogleVR/Plugins/iOS/GvrAudioAppController.h
        Assets/GoogleVR/Plugins/iOS/GvrAudioAppController.mm

1.  Delete the Google VR audio mixer asset:

        Assets/GoogleVR/Legacy/Resources/GvrAudioMixer.mixer

1.  Verify that your **scenes** do not make use of any Google VR audio
    components.

    For each scene in your project, try each of the following searches in the
    Hierarchy view's search field:

    ```t:GvrAudioListener```

    ```t:GvrAudioRoom```

    ```t:GvrAudioSoundfield```

    ```t:GvrAudioSource```

1.  Verify that your **prefabs** do not make use of any Google VR audio
    components:

    * Use `t:prefab` in the Project view's search field to identify all prefabs
      in your project

    * Examine each prefab to ensure it doesn't make use of any Google VR audio
      components.

1.  Verify that your **scripts** do not make use of any Google VR audio
    components.

1.  (Optional) Delete unused Google VR audio prefabs:

        Assets/GoogleVR/Legacy/prefabs/Audio/GvrAudioRoom.prefab
        Assets/GoogleVR/Legacy/prefabs/Audio/GvrAudioSoundfield.prefab
        Assets/GoogleVR/Legacy/prefabs/Audio/GvrAudioSource.prefab

1.  (Optional) Delete unused Google VR audio scripts:

        Assets/GoogleVR/Legacy/Editor/Audio/GvrAudioListenerEditor.cs
        Assets/GoogleVR/Legacy/Editor/Audio/GvrAudioRoomEditor.cs
        Assets/GoogleVR/Legacy/Editor/Audio/GvrAudioSoundfieldEditor.cs
        Assets/GoogleVR/Legacy/Editor/Audio/GvrAudioSourceEditor.cs
        Assets/GoogleVR/Legacy/Scripts/Audio/GvrAudio.cs
        Assets/GoogleVR/Legacy/Scripts/Audio/GvrAudioListener.cs
        Assets/GoogleVR/Legacy/Scripts/Audio/GvrAudioRoom.cs
        Assets/GoogleVR/Legacy/Scripts/Audio/GvrAudioSoundfield.cs
        Assets/GoogleVR/Legacy/Scripts/Audio/GvrAudioSource.cs

## Next steps

*  See the [Resonance Audio for Unity Developer Guide]({{ site.baseurl }}/develop/unity/developer-guide) to
   learn about using Resonance Audio Room Effects and Reverb Probes for realistic
   environmental audio.

*  Get [design tips for working with Resonance Audio]({{ site.baseurl }}/develop/design-tips).

*  See the [Resonance Audio SDK for Unity API Reference]({{ site.baseurl }}/reference/unity) for complete details
   on components and scripts in the SDK.

repository: resonance-audio/resonance-audio

repo_name: resonance-audio/resonance-audio


text:
---
title: "The Complete Guide to User Authentication with the Amplify Framework"
link: "https://dev.to/dabit3/the-complete-guide-to-user-authentication-with-the-amplify-framework-2inh"
author: "Nader Dabit"
tags: ["amplify", "auth", "react"]
---

In this post, you'll learn how to add authentication to your application using both OAuth with Facebook and Google as well as username & password login.

repository: CSS-Tricks/serverless

gha_language: Astro

repo_name: CSS-Tricks/serverless


text:
---
layout: post
title: Singular.jl 0.5.1 released
author: TagBot
---

Today [Singular.jl 0.5.1](https://github.com/oscar-system/Singular.jl/releases/tag/v0.5.1) has
been released.

[Diff since v0.5.0](https://github.com/oscar-system/Singular.jl/compare/v0.5.0...v0.5.1)

**Closed issues:**
- Initializing a `n_transExt` with an `fmpz` broken in Julia 1.3 (#395)

**Merged pull requests:**
- functionality depending on next libsingular-julia version (#385) (@tthsqe12)
- add some needed gc protection (#399) (@tthsqe12)
- Add downstream (Oscar) testing (#401) (@thofma)
- saturation: also return number of iterations (#402) (@hannes14)
- Import and export constant_coefficient, add test. (#404) (@wbhart)
- CI: test with Julia 1.6 (#406) (@fingolfin)

repository: oscar-system/oscar-website

branch_name: refs/heads/gh-pages

gha_language: Jupyter Notebook

repo_name: oscar-system/oscar-website


text:
# FAQ
---

## Installation

### Where do I download the software?

ZecWallet is available to download from the [Zcash Foundation GitHub repository](https://github.com/ZcashFoundation/zecwallet). The [releases page](https://github.com/ZcashFoundation/zecwallet/releases) lists the latest available downloads for each platform.

The Android application, which is still in beta, may be downloaded [from here](https://github.com/adityapk00/zqwandroid/releases).

### Which version should I download?

See the [installation](/installation/#download-and-install) section for more details specific for your platform.

### How do I verify the download file?

Starting from v0.5.10 all [ZecWallet releases](https://github.com/ZcashFoundation/zecwallet/releases) are signed. You may download the detached signatures on the [releases page](https://github.com/ZcashFoundation/zecwallet/releases) and verify that the software was signed with the published [public key](https://raw.githubusercontent.com/ZcashFoundation/zecwallet/master/public_key.asc). In addition, each release contains SHA256 checksums that may additionally be verified. For more information, see the [Verifying the download](/installation/#verifying-the-download) section of the [Installation guide](/installation/).

## Blockchain

### Is ZecWallet a light client?

No, ZecWallet requires a full `zcashd` node to operate. A [light client protocol](https://z.cash/blog/zcash-reference-wallet-light-client-protocol/) is currently in development that would substantially reduce the storage and bandwidth requirements for a light wallet. Currently, to use shielded transactions, you need to run a full node.

### How large is the blockchain?

Currently, the blockchain data directory is around 22GB (Feb 2019) and will continue to grow over time.

### Can I change the location of the data directory?

If you are starting ZecWallet for the first time, then you can choose the **Advanced Config** option and select the desired location of your data directory, which may, for example, be on a separate disk.

![Choose data directory](images/choose-data-dir.png)

If you have an existing data directory you would like to move, you can achieve this through the following steps, with ZecWallet closed:

* Create the new directory.
* Move everything in your [existing data directory](/faq/#where-is-the-default-data-directory-on-each-platform) to the new location with the exception of `zcash.conf` which must remain in the original data directory location.
* Update [`zcash.conf`](/using-zecwallet/#customising-zcashconf) to add the line `datadir=/your/new/path` specifying the path to the newly created folder.
* Restart ZecWallet.

### Can I move the params directory?

No, unlike the data directory there is no configurable option to specify the params directory and `zcashd` expects the params directory to be in the following locations:

* Windows: `%HOMEPATH%\AppData\Roaming\ZcashParams`
* macOS: `~/Library/Application Support/ZcashParams`
* Linux: `~/.zcash-params`

The folder should contain the following files and all are (currently) required for `zcashd` to function.

```
3.5M sapling-output.params
46M  sapling-spend.params
692M sprout-groth16.params
869M sprout-proving.key
1.5K sprout-verifying.key
```

As a workaround, you can use any filesystem operations for your OS, e.g. creating a symlink of the directory, but these are unsupported.

## Transactions

### Can I use funds with zero confirmations?

No, Zcash requires that you have at least 1 confirmation before sending. Trying to spend unconfirmed funds will [result in an error](/troubleshooting/#not-enough-balance-when-sending-transactions).

### Can I use a custom fee?

Yes, though it is advised to use the default 0.0001 fee to prevent your transactions from being distinguishable, you may override this behaviour in the app [**Options**](/using-zecwallet/#zeqwallet-options).

### What's the difference between Transparent, Sprout and Sapling addresses?

Transparent addresses start with a **t** prefix and are transparent like Bitcoin and offer no privacy properties. Sprout addresses have a **zc** prefix and are the first generation of shielded addresses. Sprout addresses have been superseded by Sapling addresses which have a **zs** prefix. While Sprout addresses may still be used, it is recommended to use Sapling addresses due to the [performance improvements](/faq/#how-long-does-a-sapling-transaction-take) and updated system parameters. To move funds between Sprout and Sapling addresses see the [turnstile migration documentation](/turnstile-migration/). For more detailed information on the types of addresses in Zcash [see this page](https://zcash.readthedocs.io/en/latest/rtd_pages/addresses.html).

Note that on testnet, transparent addresses have a prefix **tm**, Sprout have a **zt** prefix and Sapling **ztestsapling**.

### How long does a Sapling transaction take?

Sapling greatly reduced the time taken to perform shielded proofs down to just a few seconds though this value does depend on hardware and the number of shielded inputs/outputs. Sending from a transparent address to a Sapling one is typically completed in under 0.5 seconds. Legacy Sprout transactions take in the order of 70-90 seconds but this is also dependent on hardware and the number of JoinSplits. For more information see [this post](https://z.cash/blog/reducing-shielded-proving-time-in-sapling/).

## zcashd node

### Where is the default data directory on each platform?

By default, the location of the data directory, which stores the wallet, `zcash.conf` and all blockchain data, is found in the following locations. It is possible to [move this data directory](/faq/#can-i-change-the-location-of-the-data-directory).

* Windows: `%HOMEPATH%\AppData\Roaming\Zcash`
* macOS: `~/Library/Application Support/Zcash`
* Linux: `~/.zcash`

### Where is `zcash.conf` located?

`zcash.conf` is located in the [default data directory](/faq/#where-is-the-default-data-directory-on-each-platform) and will be in this location even if the `datadir` parameter has been set to a custom value.

### Can I use ZecWallet with an external node?

Yes, see [this section](/using-zecwallet/#connecting-to-an-external-zcashd) for how to connect to an external `zcashd`.

### How do I find the version of zcashd that I am running?

To find the version of `zcashd` you are running simply hover over the blockchain data in the lower right-hand corner and a popup will appear with the `zcashd` version string:

![zcashd version](images/zcashd-version.png)

### Does ZecWallet work on testnet?

Yes, ZecWallet will work on testnet. To do so add the following lines to your [zcash.conf](using-zecwallet/#customising-zcashconf) file, replacing the existing values if present:

``` bash
addnode=testnet.z.cash
testnet=1
```

### Does ZecWallet support payment disclosure?

Not yet. While [payment disclosure](https://z.cash/blog/viewing-keys-selective-disclosure/) works on Sprout addresses, `zcashd` has not yet been updated to support Sapling. There is [a plan to support this](https://github.com/ZcashFoundation/zecwallet/issues/47) once implemented by `zcashd`.

### Does ZecWallet support viewing keys?

Not yet, as `zcashd` doesn’t currently support Sapling viewing keys and will be implemented in ZecWallet once supported.

### How do I use the zcash-cli command?

You may interact with the [Zcash Payment API](https://zcash.readthedocs.io/en/latest/rtd_pages/payment_api.html) via RPC calls using the Zcash command line interface. You may wish to do this to enable advanced functionality or to debug issues outside of the ZecWallet interface. See [this page](https://zcash.readthedocs.io/en/latest/rtd_pages/payment_api.html) for an overview of the Zcash RPC commands available. To use, follow the instructions for [using the `zcash-cli stop` command](/troubleshooting/#via-an-external-zcashd) simply replacing `stop` with the command you wish to run. For example, to query the detail of a completed shielded transaction on a Mac you would run:

`/Applications/zecwallet.app/Contents/MacOS/zcash-cli z_getoperationresult`

## Wallet

### Is the wallet encrypted?

No, wallet encryption is [currently disabled](https://github.com/zcash/zcash/blob/master/doc/security-warnings.md#wallet-encryption) by `zcashd`. You should use full-disk encryption (or encryption of your home directory) to protect your `wallet.dat` file at rest, and should assume (even unprivileged) users who are running on your OS can read your `wallet.dat` file.

### Why does my change go to a new address?

Like Bitcoin, when using transparent addresses, change from a transaction goes to a new transparent address. ZecWallet allows you to set an option to automatically send this change to a Sapling address via the application [**Options**](/using-zecwallet/#zecwallet-options). As the 'feature' was added in Bitcoin as a measure to preserve privacy and prevent trivial linking of transactions on the blockchain, shielded (z) addresses do not have this property and any change is returned to the sending (z) address by default.

### Will ZecWallet remember my outgoing shielded sends?

Yes, by default ZecWallet will store shielded sends locally as `zcashd` does not provide this information. You can override this behaviour via the [**Options**](/using-zecwallet/#zeqwallet-options) setting and you can remove any stored transactions at any time by choosing the **Clear History** button (note that these will not be later recoverable if you delete them).

### How do I read a memo?

If there is a [memo](/using-zecwallet/#encrypted-memo-field) attached to a transaction then it will be visible by a message icon in the transaction listing. Simply right-click the transaction and choose **View Memo** to read its encrypted contents.

![Memo](images/memo.png)

### Can I use ZecWallet with a hardware wallet?

No, this is currently not supported.

### Can I remove an address from the wallet?

No, addresses cannot be removed from the wallet. It is advised that you [export the private keys](/using-zecwallet/#export-a-single-private-key) for addresses you are interested in and then delete the `wallet.dat` file. You can then [import the private keys](/using-zecwallet/#importing-private-keys) you require in a fresh, empty wallet.

### Seed phrases

#### Can I import private keys from a recovery phrase / BIP39 Mnemonic?

No, ZecWallet cannot import private keys from a recovery phrase directly. To do so you will need to extract your private keys from the recovery phrase. You can use a tool such as [https://iancoleman.io/bip39/](https://iancoleman.io/bip39/) entering the BIP39 Mnemonic (your recovery phrase) and choosing Zcash as the coin.

Once you have entered these values look for the section entitled **Derived Addresses** which will list all the derived addresses and private keys for those addresses. You will need to [import the private keys](using-zecwallet/#importing-private-keys) for any transparent addresses where you have funds, remembering that [change in transparent addresses goes to a new address](/faq/#why-does-my-change-go-to-a-new-address).

!!! danger "Be very careful with your recovery seed"
    Access to your recovery seed allows anyone to steal all of your Zcash. Though the tool listed above runs locally in your browser and is fully open source, you can always [save the HTML](https://iancoleman.io/bip39/) file and run on an airgapped offline device for extra security.

#### Can I export a BIP39 seed phrase?

No, this is not supported.

#### Can I export the Sapling HD seed?

Sapling does [implement an HD wallet](https://z.cash/blog/sapling-in-hd/) however at present the only way to extract this is to perform the `z_exportwallet` command via `zcashd` and is unsupported in ZecWallet due to needing to write to an export directory. To extract the Sapling HD seed you need to run `zcash-cli z_exportwallet` after specifying an `exportdir` in `zcash.conf`. See [these instructions](/troubleshooting/#via-an-external-zcashd) for more details on working with the Zcash RPC CLI.

#### Can I import the Sapling HD seed?

Not at present, however, this feature will be added when supported by `zcashd`.

### Can I mine with ZecWallet?

No, ZecWallet is a wallet and full node. While you can configure `zcashd` to run the built-in CPU miner, this isn't practical to run on mainnet and you need alternative hardware and software to run. See [this page](https://www.zcashcommunity.com/mining/) for more information on mining.

## WinZEC

### How do I upgrade from WinZEC / zcash4mac / zcash4win?

WinZEC and its predecessor zcash4win (and zcash4mac) have now been deprecated. You can simply install ZecWallet and it'll use the existing data directory and wallet from any previous installation and operate as normal.

### Can I import the WinZEC address book?

Yes, in the [Address Book](/using-zecwallet/#address-book) click to **Import Address Book** and browse to the location of the WinZEC address book file. By default this will be `%HOMEPATH%\AppData\Local\ZcashSwingWalletUI\addressBook.csv` where `%/HOMEPATH%` is typically `C:\Users\username\` and you may need to enable viewing hidden files to browse to the `AppData` folder location.

![Import address book](images/import-address-book.png)

## In what languages is ZecWallet available?

Currently, it is available in French, Spanish, Portuguese and Italian. If you want to help by translating see the [Translating ZecWallet](/translations/) page.

## Why are there references to both zec-qt-wallet as well as ZecWallet?

The original wallet was named **zec-qt-wallet** and was renamed in March 2019 to **ZecWallet** so any references to the wallet before that date will use the zec-qt-wallet name. The previous name of zec-qt-wallet may remain in places where updating would cause issues with signing releases and upgrades.

repository: garethtdavies/zqw-docs

repo_name: garethtdavies/zqw-docs


text:
# Quick Switch URL

Quick Switch URL is a Chrome extension in which you can store website links in pair, and then quickly switch between the link pair with shortcut keys. You can also use *regex* to match and replace website link. Quick Switch URL has built-in regex rules for switching between the English and Chinese version of [PingCAP's official documentation website](https://docs.pingcap.com/tidb/stable).

## Shortcut Keys

Mac: ctrl + s

Windows: alt + s

## How to download

If you wang to give this extension a try, you can download it either from this [link](https://chrome.google.com/webstore/detail/quickswitch/knjplddkmcgipbanhljlbkphpmkhgkfd?hl=zh-CN&authuser=0) or from this GitHub repo.

## How to contribute

If you have any suggestion for this extension or want to optimize its feature, welcome! Open an issue to describe your idea and I will try my best to get it done. 💪🏻

All working code is in the [`code`](/code) file.

repository: CharLotteiu/quick-switch-url

branch_name: refs/heads/main

repo_name: CharLotteiu/quick-switch-url


text:
# 4CDragon
四海遊龍網站開發專案

Features ToDo:
1. Create responsive Website with HTML5+CSS, targets: PC/Mac, tablet, and mobile phone.
2. Create menu.
3. Popup Cookie warning, which disappear 15 seconds automatically.
4. Create shopping cart connected with MongoD

Website Plan
1. Common elements for every page.
   1. Corp. image as page header and link back to index.html.
   2. navigation menu - top of page and sticky.
   3. Put contact inforamtion in footer.
2. Draw Website layout sketch
3. Brainstorm contents for website
   1. On-line menu.
   2. Shopping Cart.
   3. Get user's geolocation and locate to nearest store.
   4. Customer service: Q&A, on-line chatting, help user to make phone call.
   5. Corp. information: "about us", recruit, franchinee.
   6. Website search.
   7. On-line special & flash offer
4. Group your website content and draw sitemap.

Memo:
1. 開發考量, 先從 Desktop 版開始, 再來開發 Mobile 及 Phone.

History:
1. 2021/6/29 19:50 Release 1.0


text:
# 404 Discord Emoji Log Bot

> Cloned from [@peterthehan/discord-emoji-log-bot](https://github.com/peterthehan/discord-emoji-log-bot)

## TODO
- find a way to run commands?
- when running commands, output the emoji logs that are being recorded (instead of to the Google Sheet, output to terminal or as a message to the server)


text:
---
title: "Introducing rhymer"
author: 'www.noahlandesberg.com'
date: '2017-12-23'
slug: introducing-rhymer
link: https://noahlandesberg.com/post/introducing-rhymer/
categories:
- bloglink
tags:
  - rstats
  - noahlandesbergcom
---

For example, I’ve been enjoying rewriting nursery rhymes: The package includes additional functions to find other related words, including: And of course, much thanks[... <i class="fas fa-external-link-alt"></i>](https://noahlandesberg.com/post/introducing-rhymer/)

repository: mkearney/data-scribers

repo_name: mkearney/data-scribers


text:
# The plot_linear_distribution executable

## Synopsis
```console
Synopsis: plot_linear_distribution [ -sgn | -abs ] <distribution> { <distribution> }
```

Plots a linear distribution.

The plot is output to file in Latex format. It will be given an appropriate name and written to the plots directory. If this directory does not exist, it will be created. If the plot already exists, an error will be reported.

### Mandatory command line arguments
Entries \<distribution\> where
- \<distribution\> is the path to the distribution

### Optional command line arguments
Flags specifying the plot appearance (defaults to -sgn):
- -sgn draw a plot in the signed logarithm of the argument
- -abs draw a plot in the absolute value of the logarithm of the argument

## Compiling the plot
To compile the source for the plot, you may use pdflatex as exemplified below:
```console
$ ./plot_linear_distribution distributions/linear-distribution-det-dim-2048-d-m-2048-s-30.txt
Importing the distribution from "distributions/linear-distribution-det-dim-2048-d-m-2048-s-30.txt"...
Writing the plot to "plots/plot-linear-distribution-d-m-2048-s-30.tex"...
Done.
$ cd plots
$ pdflatex plot-linear-distribution-d-m-2048-s-30.tex

(..)
```
You may of course also use other versions of Latex such as xelatex. Note that the Latex source requires Tikz.

### Interpreting the plot
When solving discrete logarithm problems, the plot generated is in the signed logarithm of the argument alpha_d:

![](./images/plot-linear-distribution-d-m-2048-s-30.png)

When solving order-finding problems, the plot generated is in the signed logarithm of the argument alpha_r:

![](./images/plot-linear-distribution-r-m-2048-s-30.png)

repository: yekutielyehuda/qunundrum

repo_name: yekutielyehuda/qunundrum


text:
# Arch KDE / .dotfiles

> User-specific application configuration is traditionally stored in so called dotfiles (files whose filename starts with a dot). It is common practice to track dotfiles with a version control system such as Git to keep track of changes and synchronize dotfiles across various hosts.

this.repo was created to sync my dotfiles

![Screenshot](https://raw.githubusercontent.com/dionweb/Dotfiles/master/.github/Dot1.png)

![Screenshot](https://raw.githubusercontent.com/dionweb/Dotfiles/master/.github/Dot2.png)

# Table of Contents

-  [Install dotfiles to another system](#install-dotfiles-to-another-system)
-  [Theming](#theming)
   -  [Terminal customization](#terminal-customization)
      -  [Git prompt](#git-prompt)
      -  [Nano and syntax highlighting](#nano-and-syntax-highlighting)
   -  [Theme and icons](#theme-and-icons)
      -  [Install theme and icons](#install-theme-and-icons)
   -  [Fonts](#fonts)
      -  [Install fonts](#install-fonts)
-  [List of installed packages](#list-of-installed-packages)

## Install dotfiles to another system

```
# Dotfiles init
wget -O - https://raw.githubusercontent.com/dionweb/Shell-scripts/master/Dotfiles.sh | bash
```

## Theming

### Terminal customization

#### Git prompt

The [Git](https://archlinux.org/packages/extra/x86_64/git/) package comes with a prompt script.

Full example on .bashrc file [here](https://github.com/dionweb/Dotfiles/blob/master/.bashrc). (_#Sources, #Git prompt shell variables, #Prompt_)

```
sudo pacman -S git
```

#### Nano and syntax highlighting

Install [nano](https://archlinux.org/packages/core/x86_64/nano/) and [nano-syntax-highlighting](https://archlinux.org/packages/community/any/nano-syntax-highlighting/)

Nano configuration file can be found [here](https://github.com/dionweb/Dotfiles/blob/master/.config/nano/nanorc)

```
sudo pacman -S nano nano-syntax-highlighting
```

### Theme and icons

| Name         | Description                                                                   | Package                                                                |
| ------------ | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| Breeze       | Artwork, styles and assets for the Breeze visual style for the Plasma Desktop | [breeze](https://archlinux.org/packages/extra/x86_64/breeze/)          |
| Breeze gtk   | Breeze widget theme for GTK 2 and 3                                           | [breeze-gtk](https://archlinux.org/packages/extra/any/breeze-gtk/)     |
| Breeze icons | Breeze icon themes                                                            | [breeze-icons](https://archlinux.org/packages/extra/any/breeze-icons/) |

#### Install theme and icons

```
sudo pacman -S --needed breeze breeze-gtk breeze-icons
```

### Fonts

| Name       | Description                                                                                | Package                                                                        |
| ---------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Fira Code  | Monospaced font with programming ligatures                                                  | [ttf-fira-code](https://archlinux.org/packages/community/any/ttf-fira-code/)   |
| Hack       | A hand groomed and optically balanced typeface based on Bitstream Vera Mono.                | [ttf-hack](https://archlinux.org/packages/extra/any/ttf-hack/)                 |
| IBM Plex   | IBM Plex Mono, Sans, and Serif                                                              | [ttf-ibm-plex](https://archlinux.org/packages/community/any/ttf-ibm-plex/)     |
| Liberation | Font family which aims at metric compatibility with Arial, Times New Roman, and Courier New | [ttf-liberation](https://archlinux.org/packages/community/any/ttf-liberation/) |
| Noto       | Google Noto TTF fonts                                                                       | [noto-fonts](https://archlinux.org/packages/extra/any/noto-fonts/)             |
| Noto Emoji | Google Noto emoji fonts                                                                     | [noto-fonts-emoji](https://archlinux.org/packages/extra/any/noto-fonts-emoji/) |

#### Install fonts

```
sudo pacman -S --needed ttf-fira-code ttf-hack ttf-ibm-plex ttf-liberation noto-fonts noto-fonts-emoji
```

## List of installed packages

Keeping a list of all the explicitly installed packages can be useful, to backup a system for example or speed up installation on a new system.

To install them run the command bellow

```
sudo pacman -S --needed - < ~/.github/pkglist.txt
# OR
curl https://raw.githubusercontent.com/dionweb/Dotfiles/master/.github/pkglist.txt > pkglist.txt && sudo pacman -S --needed - < pkglist.txt && rm pkglist.txt

# pacman -Qqem > foreignpkglist.txt
# pacman -Qqen > pkglist.txt
```

## License

MIT License

Copyright (c) 2021 DionWeb

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

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

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: dionweb/Dotfiles

gha_language: Shell

repo_name: dionweb/Dotfiles


text:
---
layout: post
title: "Friday Links #386"
---

### Programming

- [AllcountJS - Rapid application development framework](https://allcountjs.com/)
- [ng-notify by matowens](https://matowens.github.io/ng-notify/?utm_source=Angular-js.in+weekly+newsletter&utm_campaign=c10a50d5bc-RSS_EMAIL_CAMPAIGN&utm_medium=email&utm_term=0_4df9c745fe-c10a50d5bc-105423245#demo)
- [Paying the tab for .NET Native – pedrolamas.com](https://www.pedrolamas.com/2015/12/08/paying-the-tab-for-dotnet-native/)
- [A story about currying](http://krasimirtsonev.com/blog/article/a-story-about-currying-bind)
- [The Traveling Salesman with Simulated Annealing, R, and Shiny - Todd W. Schneider](http://toddwschneider.com/posts/traveling-salesman-with-simulated-annealing-r-and-shiny/)
- [Humanizr/Humanizer](https://github.com/Humanizr/Humanizer)
- [Introducing Lokka — A Simple JavaScript Client for GraphQL — KADIRA VOICE — Medium](https://voice.kadira.io/introducing-lokka-a-simple-javascript-client-for-graphql-e0802695648c#.uelz5pqfg)
- [Create a Desktop App with Angular 2 and Electron](https://auth0.com/blog/2015/12/15/create-a-desktop-app-with-angular-2-and-electron/)
- [trivago/parallel-webpack](https://github.com/trivago/parallel-webpack)
- [Speeding up webpack performance with parallel builds - trivago techblog](http://tech.trivago.com/2015/12/15/parallel-webpack/)
- [Getting Started with Redux - Course by @dan\_abramov @eggheadio](https://egghead.io/series/getting-started-with-redux?utm_content=bufferadd41&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer)
- [Shem - Daily Javascript](http://daily-javascript.com/articles/shem/)
- [Angular 2 Beta | AngularJS](http://angularjs.blogspot.com/2015/12/angular-2-beta.html)
- [NCrunch Blog | Performance Performance Performance!](http://blog.ncrunch.net/post/Performance-Performance-Performance!.aspx)
- [The Era of Portable .Net - Telerik Developer Network](http://developer.telerik.com/featured/the-era-of-portable-net/)
- [Introducing React Refetch](https://engineering.heroku.com/blogs/2015-12-16-react-refetch/)
- [DataGrip 1.0 (formerly 0xDBE): A new IDE for DBs and SQL | JetBrains DataGrip Blog](http://blog.jetbrains.com/datagrip/2015/12/16/datagrip-1-0-formerly-0xdbe-a-new-ide-for-dbs-and-sql/)
- [Grav - A Modern Flat-File CMS | Grav](http://getgrav.org/)
- [Hands-On with Microsoft HoloLens: Third Time's the Charm - Thurrott.com](https://www.thurrott.com/mobile/63086/hands-on-with-microsoft-hololens-third-times-the-charm)
- [Introducing Background Sync | Web Updates - Google Developers](https://developers.google.com/web/updates/2015/12/background-sync)
- [Compiling to WebAssembly: It’s Happening! ★ Mozilla Hacks – the Web developer blog](https://hacks.mozilla.org/2015/12/compiling-to-webassembly-its-happening/)
- [A-Frame – Building Blocks for the VR Web](https://aframe.io/)
- [Bootstrap Themes](http://themes.getbootstrap.com/)
- [C\# 6 Feature Review: Expression-Bodied Function Members | Jimmy Bogard's Blog](https://lostechies.com/jimmybogard/2015/12/17/c-6-feature-review-expression-bodied-function-members/)
- [tabatkins/railroad-diagrams](https://github.com/tabatkins/railroad-diagrams)
- [mo · js - Motion Graphics For The Web](http://mojs.io/)
- [canvid.js - tiny library for playing video on canvas elements](https://gka.github.io/canvid/)
- [bitcodin Video Encoding Service for Adaptive Streaming](https://www.bitcodin.com/)
- [OpenSeadragon - high-resolution zoomable images, implemented in pure JavaScript, for desktop and mobile](https://openseadragon.github.io/)
- [kdzwinel/betwixt - analyze web traffic outside the browser using familiar Chrome DevTools](https://github.com/kdzwinel/betwixt)
- [xto6 - Transpile your codes to next-generation JavaScript](http://xto6.js.org/#features)
- [Anycode riot-mini-form](https://any-code.github.io/mini-form.html)
- [Opbeat](https://opbeat.com/)

### Applications

- [This is the Flight Game Where You Never Have to Land | Popular Science](http://www.popsci.com/this-is-flight-game-where-you-never-have-to-land)
- [AquaSnap Window Manager: dock, snap, tile, organize](http://www.nurgo-software.com/products/aquasnap)
- [VLC comes to ChromeOS - SlashGear](http://www.slashgear.com/vlc-comes-to-chromeos-18419177/)

### Science and Technology

- [New glass coating could lead to omnidirectional solar panels](http://www.gizmag.com/glass-coating-omnidirectional-solar-panels/40956/)

### On the Web

- [Could Queen Nefertiti's Tomb Reveal Secrets From Egypt's Shadowy Past?](http://news.nationalgeographic.com/2015/12/151218-nefertiti-tomb-mystery-egypt/?utm_source=Twitter&utm_medium=Social&utm_content=link_tw20151218news-nefertiti&utm_campaign=Content&sf17388541=1)

### Stuff I Just Like

- [Picture of the Week: Mechanical Calculator](http://www.sciencefriday.com/articles/peek-inside-a-mechanical-calculator/)
- ['Bench Bull:' The Jack of All Bench Jigs, Part 1 - Popular Woodworking Magazine](http://www.popularwoodworking.com/woodworking-blogs/editors-blog/bench-bull-the-jack-of-all-bench-jigs-part-1)

#agile surgery. This made me laugh. pic.twitter.com/dctQT3tRKU
— Angus Norton (@NortonAngus) December 13, 2015

gha_language: HTML


text:
# copypath plugin

Copies the path of given directory or file to the system clipboard.

To use it, add `copypath` to the plugins array in your zshrc file:

```zsh
plugins=(... copypath)
```

## Usage

- `copypath`: copies the absolute path of the current directory.

- `copypath <file_or_directory>`: copies the absolute path of the given file.

repository: ohmyzsh/ohmyzsh

repo_name: ohmyzsh/ohmyzsh


text:
# [yusak.netlify.com](https://yusak.netlify.com)

	My personal blog. Forked from Gatsby V2 Tutorial Starter.

	View the demo at gatsby-tutorial-starter.netlify.com.

	Read the full step by step guide: Guide to Build a Gatsby Site with Perfect Pagespeed Scores.

## Features

- Gatsby v2
- Emotion for styling
- Code syntax highlighting
- Tags
- SEO
  - Sitemap generation
  - Schema.org JSON-LD for Google Rich Snippets
  - Twitter Tags
  - OpenGraph Tags for Facebook/Google+/Pinterest
  - robots.txt
- Typography.js
- Typefaces for faster font loading
- Offline Support
- Manifest Support
- Gatsby Image
  - Responsive images
  - Traced SVG Loading with Lazy-Loading
  - WebP Support
- Development tools
  - ESLint for linting
  - Prettier for code style
  - CircleCI support
  - Google Lighthouse Optimization

# Lighthouse Audit

# Usage

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/justinformentin/gatsby-v2-tutorial-starter)

```bash
Download project
# With `gatsby-cli`
gatsby new my-site https://github.com/justinformentin/gatsby-v2-tutorial-starter

OR

# Cloning
git clone my-site https://github.com/justinformentin/gatsby-v2-tutorial-starter.git
cd my-site

THEN

# Install dependencies
npm i

# Start dev server
gatsby develop

# Build for production
gatsby build

# Format with Prettier
npm format

```

## Folder structure
```bash
├──.circleci # Circleci integration
├── config # Theme and site metadata
├── content # Post markdown and images
├── src
│   ├── components
│   ├── layouts
│   ├── pages
│   ├── style
│   └── templates # For Post and Tag page generation
├── static # Images for logo and favicon, and robots.txt
├── gatsby-config.js # Plugin loading and configuration
└── gatsby-node.js # Generate posts/tags and modify webpack
```

repository: yusakman/my-personal-blog

repo_name: yusakman/my-personal-blog


text:
---
title: "Deep equality check vs just rerender"
date: "2020-08-09T09:00:00.009Z"
category: ["javascript", "react", "chrome", "performance", "optimization"]
---

# Let's see what we can do
So if you were coming from my previous post, you should know that we discussed a lot about the caveats in preventing a re-render in React, or just letting it happen.

In this post, we aim to discover at which point it would be beneficial for you to just letting your component re-render.


text:
# View basic information about an access key {#task_187540 .task}

This topic describes how to view basic information about an access key, such as the access key ID, access key status, the latest time when the access key was used, and the date and time when the access key was created.

1.  Log on to the [RAM console](https://partners-intl.console.aliyun.com/#/ram).
2.  Choose **Identities** \> **Users**.
3.  In the **User Logon Name/Display Name** column, click the username of the target RAM user.
4.  In the **User AccessKeys** section, view the access key information.

    **Note:** The access key secret is displayed only once when you first create it.

url: https://raw.githubusercontent.com/ahao888/ram/95cecaf678bcc172df9ae01665c9cd0d997041ed/intl.en-US/User Guide/Security settings/Access keys/View basic information about an access key.md


text:
# Daerah Indonesia with jQuery Select2 for Code Igniter
chained dropdown using jQuery - select2 for Indonesian region selection

This is a simple region selector using jQuery - select2 for Indonesian provinces, regencies and districts.
I'm using database from https://github.com/cahyadsn/daerah/blob/master/db_daerah.sql

repository: ediharyono/basic

repo_name: ediharyono/basic


text:
# Hash Master
The competitor is presented with a hash (`293366475`) that they must 'reverse'. They are given the following hashing algorithm:

```python
def hash_it(string):
    q = 0
    z = 127
    for i in [int(byte) for byte in bytearray(string, "utf-8")]:
        q += i
        z *= i
    return (((q << 3)+1)*z) % (2**32 - 1)
```

The flag is anything that hashes to `293366475`, and `aaaaab` will do the trick.


text:
---
layout: post
title: "Unit Testing Events with Anonymous Delegates in .NET 2.0"
comments: false
date: 2005-05-29 23:52:00
updated: 2008-07-06 14:23:15
categories:
 - Code
tags:
 - tdd
 - agile development
subtext-id: 15956d88-19f6-40fc-b30f-5f631a2fe91a
alias: /blog/post/Unit-Testing-Events-with-Anonymous-Delegates-in-NET-20.aspx
---

There has been a lot of discussion [comparing anonymous delegates to closures and blocks in Ruby](http://pluralsight.com/blogs/dbox/archive/2005/04/27/7780.aspx),
so I'm not going to get into that whole thing...

What I want to talk about for a minute is how cool it is to use anonymous delegates to
test that events on your classes fire as expected.

Suppose, for example, that you have a class like this:

``` csharp
public class MyContainerContainer
{
	public event EventHandler<ItemAddedEventArgs> ItemAdded;
	public void Add( object item )
	{
		// Store it in an internal list or something, then
		// fire the event
		if( ItemAdded != null )
			ItemAdded( this, new ItemAddedEventArgs(item) );
	}
}
```

Now before anonymous delegates, you would have had to introduce a private method in your test fixture to attach to
the ItemAdded event. And as shown here, you probably would have had to introduce a private field to pass data
between the event handler method and the test method. (Sure, you could have created a mock class to hold the state
and the event handler, but that would have been even more code to read/parse/grok.)

``` csharp
[TestFixture]
public class ContainerMonitorFixture
{
	private object addedItem = null;
	[Test]
	public void AddFiresAddedEventWithCorrectArgs()
	{
		MyContainer container = new MyContainer();
		container.ItemAdded +=
			new EventHandler<ItemAddedEventArgs>(this.ItemAdded);
		object item = new object();
		container.Add( item );
		Assert.AreSame( item, this.addedItem );
	}
	private void ItemAdded( object sender, ItemAddedEventArgs e )
	{
		addedItem = e.AddedItem;
	}
}
```

With anonymous delegates, you can now write very clear, very clean tests like this:

``` csharp
[TestFixture]
public class ContainerMonitorFixture
{
	[Test]
	public void AddFiresAddedEventWithCorrectArgs()
	{
		object expected = new object();
		object actual = null;
		MyContainer container = new MyContainer();
		container.ItemAdded += delegate( object sender, ItemAddedEvent args e )
		{
			actual = e.AddedItem;
		}
		container.Add( expected );
		Assert.AreSame( expected, actual );
	}
}
```

There are a couple of cool things in this code:

* The delegate can modify variables in the test method, outside the event handler itself
* The entire test's **_meaning_** is clearly stated within the test--you don't have to
  look in some other method or class to see what's happening
* Because the entire test is self encapsulated, it is easier to move/copy/change should
  you need to do any refactoring to either the class under test or the test fixture itself.

Enjoy!


text:
This little Crypto Tool is for command-line (presently).  It allows you to quickly take a peek at your wallet and orders (open and close).

I got tired of always keying 2FA to login and check things out as well as doing the Math to determine USD value of balances.

Since I also like to place SELL orders with a LIMIT, I like to know how far away an order is from potentially filling.

That's the start of this little tool, which I expect will grow in features over time.

Presently, this tool is wired only to Bittrex and Coinbase for most commands.  You must have both configured to
use this tool without errors.

CAUTION:  THERE MAY BE BUGS!  Report bugs in the issue tracker or send me a PR with the bug already fixed!

## What New!
* April 2018:
  * Added support for tracking Ethereum addresses and all ERC20 tokens held in that address.

* March 2018:
  * Added support for staking wallets commonly listed on Cryptoid such as BitBean Cash.
  * Increased number of exchanges to find ticker data for Yaml Wallets.
  * USDT correctly displays BTC worth now.

* December 2017:
  * balances now supported for Coinbase, GDAX, Bittrex, and Binance.

* January 2018:
  * YAML Wallets -- declare coins and quantity held via your exchanges.yml file.

## To Install

To install this tool, clone the repository from github:

~~~
git clone git@github.com:mwlang/crypto.git
~~~

Change to the crypto folder and install necessary gems (the Ruby language is required and assumed already installed!)

~~~
cd crypto
bundle install
~~~
NOTE:  The "bittrex API ruby gem" has bugs.  I've forked and fixed those bugs and submitted PR.

Set your API keys for Bittrex and Coinbase (the only supported exchanges at the moment) by changing to crypto folder and copy config/exchanges.yml.example to config/exchanges.yml and add your API key and API Secret to the file.  You'll need both to successfully use this tool to see BTC and USD.  Errors will likely occur without the file and keys in place.

~~~YAML
defaults:
  small_balance: 2.0
bittrex:
  api_key: d1d433126b129f2805218888888
  api_secret:<PHONE_NUMBER>94902804664fd88888888
coinbase:
  api_key: CdQbcdePEmm6HfWa
  api_secret: cmkWiSwAjDqaPix58ASBCDPFEEPiM6AmL
gdax:
  api_passphrase: 3naiz23vq7fb
  api_key: 2930a03cd65a14d3bea7d5beb55922b
  api_secret: +sBHp944s18bufRlSRFTiktIqwkVfvUvcevRbzHktXf0UPfIT3hLMQESuwouFaMFZO70+JOw==
binance:
  api_key: V8ldzlNLA5G0tlGYarRdU2sDjRnLjbF1QpIHgL62MjD7mOH12
  api_secret: gkFkZ4Zpt8XJocxL8MP1qulLVK5hgDZ4a9m1yAs5RROIbFKynk8YA
exodus:
  addresses:
    eth: "0x364b111FEF8A471111113726D73819085bED111a"
  coins:
    etc: 99.99958
    btc: 0.04935028
~~~

NOTE:  You must have at least bittrex and coinbase configured to avoid errors.  Accepting PR's to remove this limitation!

For the YAML Wallets, you can add an entry for virtually any coin you have for whatever storage device or exchange out there.  If you name your entry by one of the exchanges supported via [Coin Gecko's cryptoexchange gem](https://github.com/coingecko/cryptoexchange), then prices will be pulled from the exchange directly for the coins listed.  Otherwise, the logic falls back to looking up prices on Bittrex and Binance (if configured).  In leu of retrieving your full wallet contents from the exchange, you'll simply declare the coins and the quantity you hold in your exchanges.yml file and only the exchange rates are pulled from the exchanges.  An example:

~~~YAML
defaults:
  small_balance: 2.0
bittrex:
  api_key: d1d433126b129f2805218888888
  api_secret:<PHONE_NUMBER>94902804664fd88888888
binance:
  api_key: V8ldzlNLA5G0tlGYarRdU2sDjRnLjbF1QpIHgL62MjD7mOH12
  api_secret: gkFkZ4Zpt8XJocxL8MP1qulLVK5hgDZ4a9m1yAs5RROIbFKynk8YA
cobinhood:
  coins:
    cob: 90.226246224
kucoin:
  small_balance: 5.0
  coins:
    bnty: 34.6729
exodus:
  coins:
    bat: 100.0
    btc: 0.26860
    bcc: 2.0626588
    eth: 0.28465467
~~~

Coins listed on Cryptoid, which are typically kept in PoS staking wallets are now supported.  To set up cryptoid:

~~~YAML
cryptoid:
  addresses:
    bitb: 2Jo3AHmW2SxvHCxqc7AMm4w2jgFDgRFG
~~~

Now you can see your staking coins effortlessly:

ERC20 tokens can now be tracked with Ethereum addresses.  The tokens are found on the block explorer and estimated worth displayed.

Example using Exodus wallet and ETH address together:
~~~
exodus:
  addresses:
    eth: "0x364b111FEF8A471111113726D73819085bED111a"
  coins:
    etc: 99.99958
    btc: 0.04935028
~~~

~~~
>> rake wallets[cryptoid]
+----------+--------------+--------------+---------+-------------+--------------+
| CRYPTOID | Quantity     | Available    | Pending | USD         | BTC          |
+----------+--------------+--------------+---------+-------------+--------------+
| BITB     |<PHONE_NUMBER>0 |<PHONE_NUMBER>0 |         | $   7288.12 |   0.67950214 |
+----------+--------------+--------------+---------+-------------+--------------+
|          |              | CRYPTOID     | TOTAL   | $   7288.12 |   0.67950214 |
+----------+--------------+--------------+---------+-------------+--------------+
|          |              | OVERALL      | TOTAL   | $   7288.12 |   0.67950214 |
+----------+--------------+--------------+---------+-------------+--------------+
~~~

NOTE: "BITB" recently changed to "BEAN", but Bittrex still holds "BITB" in it's API calls.  To workaround, we add
Bittrex's symbol to the YAML file.  Cryptoid will provide redirect to "BEAN" API URL when supplied "BITB" and
we automatically visit the redirect.  In this way, we get our cake and can eat it too. (for now!)

## Usage

To see all commands available:

~~~
>> rake -T
rake closed_orders # Shows closed order history
rake open_orders   # Shows open orders
rake rates         # Retrieves current rates
rake run           # runs full stack orders, wallets, etc
rake wallets       # Lists wallets with a balance
~~~

### Aliases

Several commands have short aliases for them:

* oo => open_orders
* co => closed_orders
* r => rates
* w => wallets

~~~
>> rake w
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| Exchange | Symbol | Quantity     | Available    | Pending      | USD         | BTC          |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| coinbase | BCH    |   0.21900365 |              |              | $     563.2 |   0.03773433 |
| coinbase | ETH    |   0.25346310 |              |              | $    188.32 |   0.01261739 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| coinbase |        |              |              | TOTAL        | $    751.52 |   0.05035172 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| bittrex  | BTC    |   0.00000018 |   0.00000018 |   0.00000000 | $       0.0 |   0.00000000 |
| bittrex  | BTG    |   0.00084696 |   0.00084696 |   0.00000000 | $      0.22 |   0.00001465 |
| bittrex  | RCN    | 1250.0000000 | 1250.0000000 |   0.00000000 | $    534.14 |   0.03578750 |
| bittrex  | VOX    |<PHONE_NUMBER>4 |   0.00000000 |   0.00000000 | $    499.03 |   0.03343529 |
| bittrex  | XRP    |  44.18959189 |  44.18959189 |   0.00000000 | $      61.0 |   0.00408710 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| bittrex  |        |              |              | TOTAL        | $   1094.39 |   0.07332454 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| binance  | BTC    |   0.00000204 |   0.00000204 |   0.00000000 | $      0.03 |   0.00000000 |
| binance  | GAS    |   0.00590000 |   0.00590000 |   0.00000000 | $      0.17 |   0.00001133 |
| binance  | BCC    |   0.00079616 |   0.00079616 |   0.00000000 | $      2.04 |   0.00013640 |
| binance  | OMG    |   0.00964320 |   0.00964320 |   0.00000000 | $      0.15 |   0.00001004 |
| binance  | XVG    |   0.74900000 |   0.74900000 |   0.00000000 | $      0.13 |   0.00000843 |
| binance  | ZEC    |   0.00007450 |   0.00007450 |   0.00000000 | $      0.04 |   0.00000247 |
| binance  | SBTC   |   0.00395635 |   0.00395635 |   0.00000000 | $       0.0 |   0.00000000 |
| binance  | BCX    |  39.56350000 |  39.56350000 |   0.00000000 | $       0.0 |   0.00000000 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| binance  |        |              |              | TOTAL        | $      2.56 |   0.00016867 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| OVERALL  |        |              |              | TOTAL        | $   1848.47 |   0.12384493 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
~~~

To see Coinbase rates:
~~~
>> rake rates
+----------+-------------+
| Exchange | Rate        |
+----------+-------------+
| BTC/USD  | $  10638.30 |
| ETH/USD  | $    812.20 |
| LTC/USD  | $    196.30 |
| BCH/USD  | $   1185.31 |
+----------+-------------+
~~~

See the balance on every non-zero balance wallet.
~~~
>> rake wallets
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| Exchange | Symbol | Quantity     | Available    | Pending      | USD         | BTC          |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| coinbase | BCH    |   0.21900365 |              |              | $     563.2 |   0.03773433 |
| coinbase | ETH    |   0.25346310 |              |              | $    188.32 |   0.01261739 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| coinbase |        |              |              | TOTAL        | $    751.52 |   0.05035172 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| bittrex  | BTC    |   0.00000018 |   0.00000018 |   0.00000000 | $       0.0 |   0.00000000 |
| bittrex  | BTG    |   0.00084696 |   0.00084696 |   0.00000000 | $      0.22 |   0.00001465 |
| bittrex  | RCN    | 1250.0000000 | 1250.0000000 |   0.00000000 | $    534.14 |   0.03578750 |
| bittrex  | VOX    |<PHONE_NUMBER>4 |   0.00000000 |   0.00000000 | $    499.03 |   0.03343529 |
| bittrex  | XRP    |  44.18959189 |  44.18959189 |   0.00000000 | $      61.0 |   0.00408710 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| bittrex  |        |              |              | TOTAL        | $   1094.39 |   0.07332454 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| binance  | BTC    |   0.00000204 |   0.00000204 |   0.00000000 | $      0.03 |   0.00000000 |
| binance  | GAS    |   0.00590000 |   0.00590000 |   0.00000000 | $      0.17 |   0.00001133 |
| binance  | BCC    |   0.00079616 |   0.00079616 |   0.00000000 | $      2.04 |   0.00013640 |
| binance  | OMG    |   0.00964320 |   0.00964320 |   0.00000000 | $      0.15 |   0.00001004 |
| binance  | XVG    |   0.74900000 |   0.74900000 |   0.00000000 | $      0.13 |   0.00000843 |
| binance  | ZEC    |   0.00007450 |   0.00007450 |   0.00000000 | $      0.04 |   0.00000247 |
| binance  | SBTC   |   0.00395635 |   0.00395635 |   0.00000000 | $       0.0 |   0.00000000 |
| binance  | BCX    |  39.56350000 |  39.56350000 |   0.00000000 | $       0.0 |   0.00000000 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| binance  |        |              |              | TOTAL        | $      2.56 |   0.00016867 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
| OVERALL  |        |              |              | TOTAL        | $   1848.47 |   0.12384493 |
+----------+--------+--------------+--------------+--------------+-------------+--------------+
~~~

See the orders that are currently open.

The difference between Ask and Current is expressed as a percentage in the Gap column so you can see how close you are to a SELL order potentially filling.

~~~
>> rake open_orders
+-------+--------+-------------+----------+-----------+--------------+--------------+--------+
| Order | Symbol | Cost        | Quantity | Remaining | Ask          | Current      | Gap    |
+-------+--------+-------------+----------+-----------+--------------+--------------+--------+
| SELL  | OMG    | $   3710.11 |   227.23 |   227.23  |   0.00380425 |   0.00208500 | 45.19% |
| SELL  | MTL    | $    331.86 |    31.44 |    31.44  |   0.00245900 |   0.00189600 | 22.90% |
| SELL  | XRP    | $   1184.55 |  5000.00 |  5000.00  |   0.00005520 |   0.00004714 | 14.60% |
| SELL  | PAY    | $   2098.09 |   388.12 |   388.12  |   0.00125956 |   0.00053079 | 57.86% |
| SELL  | DOGE   | $    321.89 | 250000.0 | 250000.0  |   0.00000030 |   0.00000024 | 20.00% |
|                                             . . .                                          |
+-------+--------+-------------+----------+-----------+--------------+--------------+--------+
~~~

See the last 30 days of orders that have closed
~~~
>> rake closed_orders
+-------+---------+-------------+----------+-----------+--------------+--------------+--------------+--------------------+
| Order | Symbol  | Cost        | Quantity | Remaining | Limit        | Total        | Commission   | Executed           |
+-------+---------+-------------+----------+-----------+--------------+--------------+--------------+--------------------+
| SELL  | ETH     | $    543.27 |     1.88 |     0.00  |   0.06804991 |   0.12821286 |   0.00032053 | Wed 10/04 02:16 AM |
| BUY   | ETH-NEO | $   2221.07 |    67.67 |     0.00  |   0.11199993 |   7.57860809 |   0.01891429 | Sun 10/01 07:25 AM |
| BUY   | QTUM    | $    709.03 |    69.79 |     0.00  |   0.00239774 |   0.16733218 |   0.00041774 | Sat 09/30 05:28 AM |
| BUY   | QTUM    | $    584.92 |    58.00 |     0.00  |   0.00238001 |   0.13804058 |   0.00034510 | Sat 09/30 05:23 AM |
| SELL  | QTUM    | $     34.34 |    22.51 |     0.00  |   0.00036000 |   0.00810397 |   0.00013499 | Fri 09/29 19:36 PM | |                                                    . . .                                                               |
+-------+---------+-------------+----------+-----------+--------------+--------------+--------------|--------------------+
~~~

Get USD amount for given BTC amount and vice versa

~~~
>> rake usdbtc[24.3196]
BTC:        0.00420729
USD: $     24.32

>> rake btcusd[0.0640625]
BTC:        0.06406250
USD: $    374.63
~~~