text:
---
author: rcartaino
comments: true
date: 2010-06-16 19:42:53+00:00
layout: post
redirect_from: /2010/06/area-51-we-come-in-peace
hero:
slug: area-51-we-come-in-peace
title: 'Area 51: We Come in Peace'
wordpress_id: 3611
tags:
- company
- Area51
- stackexchange
- community
---

[![](http://blog.stackoverflow.com/wp-content/uploads/Area-51-Banner1.png)](http://area51.stackexchange.com)

You guys remember when the Interweb was full of information you couldn't vote on? And blog posts you couldn't fix when they were wrong? Early humans used message forums that were sinister, scary places just teeming with "threads" and "conversations" that intermingled willy-nilly and -- I swear on my children I am not making this up -- the best information WASN'T automatically sorted to the top. Ha!, imagine. The very _thought_ that we once tolerated an Internet where anyone couldn't just start a world-class Q&A site on virtually any subject sends shivers down my spine. I mean, really, that's so 2009.

The modern Internet isn't the closed, read-only place it was back in April. We have [Area 51](http://area51.stackexchange.com).

**Area 51 **is the new staging area for the Stack Exchange Network where users can create Stack Overflow-like sites on every imaginable topic. It's the answer to everyone who has come to us and asked **"can we use your engine to build a Q&A site about {topic}?"**

![](/images/wordpress/screen1.png)

After a short-lived, paid hosting model, Stack Exchange sites are now created for free through a democratic, community-driven process. If you want to create a Q&A community, propose it! If your idea gets sufficient support from a group of dedicated users, then it gets created. It’s that simple.

The early results are inspiring. Thousands of people are already giving voice to hundreds of proposals, even before Area 51 was widely announced.  Who knew that programmers liked to talk about something besides programming and unicorns?

![](/images/wordpress/art-vote.png)

If you've got a great idea for a site, [visit Area 51](http://area51.stackexchange.com/). We've got [7.5 million people](http://www.quantcast.com/p-c1rF4kxgLUzNc) visiting us each month, so we've got the audience. We've raised enough money to make Stack Exchange absolutely free, so all we need is ideas. Or better yet, **browse through our proposals to help get the site ideas you love off to a strong start.**

Area 51 is still in beta testing so please read the [FAQ](http://area51.stackexchange.com/faq) and post any problems or suggestions to [meta.stackoverflow.com](http://meta.stackoverflow.com/).

Z@rpqf says, "Build awesome sites!"

    Z@rpqf
    Head Alien in Charge
    Area 51
    http://area51.stackexchange.com

![](/images/wordpress/faq-header1.png)

If you've got a great idea for a site, visit Area 51. We've got 6.7 million people visiting us   each month, so we've got the audience. We've raised enough money to make   Stack Exchange absolutely free, so all we need is ideas. Browse through our   proposals to help get the site ideas you love off to a strong start.

repository: rcartaino/stack-blog

extension: markdown

repo_name: rcartaino/stack-blog


text:
# File viewer for sd cards

## Features:
- Multi-platform
- No dynamic memory allocation
- File system based on FatFS.
- Display based on STM32_ADAFRUIT_LCD BSP functions.
- Short and long file name support

## Functions offer:
- Displaying directory contents: files and subdirectories
- Displaying path
- Displaying size of file
- Directory scrolling: up and down
- Directory scrolling by page: forward and backward
- Unwrapping file names, if it's too long

## Photos:
- Hardware: Ili9486 TFT-LCD display, STM32F446RE Nucleo Board
    #### Short file name
  ![](img/IMG_20211029_172232.jpg)
    #### Long file name
  ![](img/IMG_20211029_172021.jpg)

  File Viewer also works on lower size ILI9341 display.
    #### Short file name
  ![](img/IMG_20211030_132259.jpg)
    #### Long file name
  ![](img/IMG_20211030_132929.jpg)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Plceholder for thebe related docs

## Codemirror setup

The following is available in the thebe options object:

```typescript
{
  codeMirrorConfig?: {
    theme?: string;         (default: 'default')
    readOnly?: boolean;     (default: false)
    mode?: string;          (default: 'python')
    autoRefresh?: boolean;  (default: true)
    lineNumbers?: boolean;  (default: true)
    styleActiveLine?: boolean;  (default: true)
    matchBrackets?: boolean;  (default: true)
  };
}
```

`mode` and `readOnly` will also be read from code cells on the page, and the values provided on those cells will **override** those set in the options object

### modes

thebe is preloaded with the python mode and will try to load additional modes on the setting. Should this fail or to preload a mode on your page, load directly to a script tag using CDN e.g. for rust here<EMAIL_ADDRESS>
### preloaded themes

Only a few themes are bundled with thebe:

- default
- abcdef
- darcula
- idea

To load additional themes, make the css available on you page and set the `theme` field to the correct theme name in the `CodeMirror` options object.

Find the [full list of themes](https://codemirror.net/5/demo/theme.html) here and CDN based resources for loading them for example, for twilight here<EMAIL_ADDRESS>

repository: executablebooks/thebe

branch_name: refs/heads/main

gha_language: Jupyter Notebook

repo_name: executablebooks/thebe


text:
# Arch Linux Yellow Dark

Styles the archlinux.org website for the Arch Linux distribution with a dark yellow color scheme.

[![Install directly with Stylus](https://img.shields.io/badge/Install%20directly%20with-Stylus-00adad.svg)](https://raw.githubusercontent.com/davidlemlerm/ArchLinux-Yellow-Dark/master/ArchLinux-Yellow-Dark.user.css)

## Screenshots

### Home

![Home](Screenshots/Home.png)

### Packages

![Packages](Screenshots/Packages.png)

### Forms

![Forms](Screenshots/Forms.png)

### Wiki

![Wiki](Screenshots/Wiki.png)

### Bugs

![Bugs](Screenshots/Bugs.png)

### Security

![Security](Screenshots/Security.png)

### AUR

![AUR](Screenshots/AUR.png)

### Download

![Download](Screenshots/Download.png)

## Note about branches

The master branch contains a simple stylesheet that is the main theme for now.  A version 2 release can be found in branch `2`.  This stylesheet is more complex, and is currently not complete or ready for production, however, it styles elements in a more granular way, and is more customized to the Arch Linux website.

## Additional note

This theme is not official or related to the Arch Linux project.  It is simply a community made theme to style the Arch Linux website.

repository: davidlemlerm/ArchLinux-Yellow-Dark

repo_name: davidlemlerm/ArchLinux-Yellow-Dark


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Encode and decode using LSB.
- Share save encoded images (as png files).
- Share encoded images with app to decode them.
- Initial Release.

repository: Bhumiraj/stegappasaurus

repo_name: Bhumiraj/stegappasaurus


text:
# xwing-vassal-dialgen

A script that uses [Puppeteer](https://github.com/GoogleChrome/puppeteer), [xwing-data](https://github.com/guidokessels/xwing-data) and [dialgen](http://xwvassal.info/dialgen/dialgen) to generate dial images for X-Wing: The Miniatures Game ships for use with Vassal.

## Usage
1. Clone repository: `git clone https://github.com/guidokessels/xwing-vassal-dialgen.git`
1. Install dependencies: `yarn` or `npm install`
1. Run scripts: `yarn start` or `npm start`
1. Images can be found in the `images/dials/` folder

## License
[MIT](http://guidokessels.mit-license.org/)

---

Star Wars, X-Wing: The Miniatures Game and all related properties are owned by Fantasy Flight Games, Lucasfilm Ltd., and/or Disney.

repository: guidokessels/xwing-vassal-dialgen

repo_name: guidokessels/xwing-vassal-dialgen


text:
# bash-funk - Spice up your Bash!

[![Build Status](https://github.com/vegardit/bash-funk/workflows/Build/badge.svg "GitHub Actions")](https://github.com/vegardit/bash-funk/actions?query=workflow%3ABuild)
[![License](https://img.shields.io/github/license/vegardit/bash-funk.svg?label=license)](#license)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)

1. [What is it?](#what-is-it)
1. [Installation](#install)
    1. [Using git](#install-with-git)
    1. [Using subversion](#install-with-svn)
    1. [Using curl](#install-with-curl)
    1. [Using wget](#install-with-wget)
    1. [Portable on Windows](#install-win-portable)
1. [Usage](#usage)
   1. [Customization](#customization)
   1. [Directory-scoped Environment Variables and Aliases](#bash_funk_dir_rc)
   1. [Efficiently navigating the filesystem](#efficient_fs_navigation)
   1. [Using bash-funk modules separately](#using_modules_separately)
1. [Updating](#update)
1. [License](#license)

## What is it?

bash-funk is a collection of useful commands for Bash 3.2 or higher.

See the markdown files of the different [Bash modules](docs) for detailed information about the provided commands:
  * [ansi](docs/ansi.md) - ANSI colored text output
  * [aws](docs/aws.md) - query information about Amazon WebServices (AWS)
  * [compression](docs/compression.md) - file compression
  * [crypto](docs/crypto.md) - encryption and checksums
  * [docker](docs/docker.md) - Docker and Docker Swarm management
  * [filesystem](docs/filesystem.md) - filesystem navigation and file operations
  * [git](docs/git.md) - working with GIT repositories
  * [math](docs/math.md) - mathematical operations
  * [memory](docs/memory.md) - query RAM information
  * [misc](docs/misc.md) - useful commands that did not yet made it into a separate module
  * [network](docs/network.md) - query network information
  * [openssl](docs/openssl.md) - generate certificates and CAs with OpenSSL
  * [os](docs/os.md) - query presence of commands and installed software packages
  * [performance](docs/performance.md) - test CPU, disk and network performance
  * [processes](docs/processes.md) - query process information or kill processes by parent PID or used TCP ports
  * [random](docs/random.md) - generate random strings
  * [ssh](docs/ssh.md) - SSH key management operations
  * [strings](docs/strings.md) - String manipulations

An adaptive bash prompt is provided too:

![console](docs/img/console.png)

All bash-funk commands have a descriptive online help:

![function_help](docs/img/function_help.png)

The command [-help](docs/misc.md#-help) shows a list of all available commands

![help](docs/img/help.png)

## Installation

### Using Git

Execute:
```bash
git clone https://github.com/vegardit/bash-funk --branch main --single-branch ~/bash-funk
```

### Using Subversion

Execute:
```bash
svn checkout https://github.com/vegardit/bash-funk/trunk ~/bash-funk
```

### Using Curl

Execute:
```bash
mkdir ~/bash-funk && \
cd ~/bash-funk && \
curl -#L https://github.com/vegardit/bash-funk/tarball/main | tar -xzv --strip-components 1
```

### Using wget

Execute:
```bash
mkdir ~/bash-funk && \
cd ~/bash-funk && \
wget -qO- --show-progress https://github.com/vegardit/bash-funk/tarball/main | tar -xzv --strip-components 1
```

### Portable on Windows

For your convenience we created a simple bootstrap Windows batch file that sets up a portable [Cygwin](http://cygwin.org) installation pre-configured with bash-funk.

For more details see https://github.com/vegardit/cygwin-portable-installer#install.

## Usage

Once bash-funk is installed, it can be used by sourcing the `bash-funk.sh` script which will then load all modules.

```bash
$ source ~/bash-funk/bash-funk.sh
```

All bash-funk commands are prefixed with a `-` by default and support the `--help` option.

Bash completion for options is supported by all commands too, simply type a dash (-) and hit the [TAB] key twice.

### Customization

The following environment variables can be set in `~/.bash_funk_rc` to customize bash-funk's behavior. This file will be sourced automatically.

- `BASH_FUNK_PREFIX` - if specified, the names of all bash-funk commands will be prefixed with this value. Must only contain alphanumeric characters `a-z`, `A-Z`, `0-9`) and underscore `_`.
- `BASH_FUNK_DIRS_COLOR` - ANSI color code to be used by the bash prompt to highlight directories, default is `94` which will be transformed to `\e[94m`
- `BASH_FUNK_NO_EXPORT_FUNCTIONS` - if set to any value bash-funk commands are not exported to sub-shells, thus will not be available in your own shell scripts.
- `BASH_FUNK_NO_TWEAK_BASH` - if set to any value bash-funk will not automatically invoke the [-tweak-bash](docs/misc.md#-tweak-bash) command when loading.
- `BASH_FUNK_NO_PROMPT` - if set to any value bash-funk will not install it's Bash prompt function.
- `BASH_FUNK_PROMPT_PREFIX` - text that shall be shown at the beginning of the Bash prompt, e.g. a stage identifier (DEV/TEST/PROD)
- `BASH_FUNK_PROMPT_DATE` - prompt escape sequence for the date section, default is `\t`, which displays current time. See http://tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html
- `BASH_FUNK_PROMPT_NO_JOBS` - if set to any value the Bash prompt will not display the number of shell jobs.
- `BASH_FUNK_PROMPT_NO_SCREENS` - if set to any value the Bash prompt will not display the number of detached screens
- `BASH_FUNK_PROMPT_NO_TTY` - if set to any value the Bash prompt will not display the current tty.
- `BASH_FUNK_PROMPT_NO_KUBECTL` - if set to any value the Bash prompt will not display [kubectl](https://kubernetes.io/docs/reference/kubectl/)'s current context
- `BASH_FUNK_PROMPT_NO_GIT` - if set to any value the Bash prompt will not display GIT branch and modification information.
- `BASH_FUNK_PROMPT_NO_SVN` - if set to any value the Bash prompt will not display SVN branch and modification information.

### Directory-scoped Environment Variables and Aliases

When changing into a directory, the bash-funk Bash prompt can automatically evaluate `.bash_funk_dir_rc` files found in the current directory or it's parent directories
to set context-relevant environment variables.

*This feature is disabled by default.* To enable it, define the variable `BASH_FUNK_PROMPT_DIRENV_AUTHORIZED_DIRS` in `~/.bash_funk_rc` as an Bash array containing fully qualified paths to trusted directories.
Only `.bash_funk_dir_rc` files found in these directories will be evaluated for security reasons. The entries in `BASH_FUNK_PROMPT_DIRENV_AUTHORIZED_DIRS` may also expressed as a variant of [glob patterns](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html),
where `*` will match one directory level and `**` any directory level.

The `.bash_funk_dir_rc` are executed in a sub-shell, whose output is captured and parsed. All lines matching the pattern `export <VARNAME>=<VALUE>` or `alias <VARNAME>=<VALUE>` will then be executed via `eval` in the context of the current shell.

If multiple files named `.bash_funk_dir_rc` are found in the directory hierarchy (from the current directory up to `/`), they will be all evaluated starting with the file at the highest level (i.e. /).

Here is an example setup:

1. A file at `/opt/projects/.bash_funk_dir_rc` containing:
    ```bash
    #!/usr/bin/env bash
    echo "export JAVA_VERSION=1.8"
    echo "export MAVEN_VERSION=3.5"
    ```
1. A file at `/opt/projects/project1/.bash_funk_dir_rc` containing:
    ```bash
    #!/usr/bin/env bash

    # override JAVA_VERSION=1.8 from /opt/projects/.bash_funk_dir_rc
    echo "export JAVA_VERSION=9"
    ```
1. `BASH_FUNK_PROMPT_DIRENV_TRUSTED_DIRS` in `~/.bash_funk_rc`, either explicit:
    ```bash
    BASH_FUNK_PROMPT_DIRENV_TRUSTED_DIRS=(
      "/opt/projects"
      "/opt/projects/project1"
      "/opt/projects/project2"
    )
    ```
    or with single-level pattern matching
    ```bash
    BASH_FUNK_PROMPT_DIRENV_TRUSTED_DIRS=(
      "/opt/projects/*"
    )
    ```
    or with multi-level pattern matching
    ```bash
    BASH_FUNK_PROMPT_DIRENV_TRUSTED_DIRS=(
      "/opt/**"
    )
    ```
1. If you now `cd` into `/opt/projects/project1/` the environment variables `JAVA_VERSION=9` and `MAVEN_VERSION=3.5` are present.
1. If you go one level up to `/opt/projects/`, `JAVA_VERSION=1.8` will be set.
1. If you go one level up to `/opt`, the environment variables `JAVA_VERSION` and `MAVEN_VERSION` will be unset.
1. If you comment out the first entry in `BASH_FUNK_PROMPT_DIRENV_TRUSTED_DIRS` in `~/.bash_funk_rc`:
    ```bash
    BASH_FUNK_PROMPT_DIRENV_TRUSTED_DIRS=(
      #"/opt/projects"
      "/opt/projects/project1"
      "/opt/projects/project2"
    )
    ```
    and again `cd` into `/opt/projects/project1/` only the environment variables `JAVA_VERSION=9` will be present
    as the `/opt/projects/.bash_funk_dir_rc` is not evaluated anymore.

### Efficiently navigating the filesystem

1. Navigating **up** the directory tree

   1. Navigating to the parent directory:

      [me@local /opt/projects/project1/src/main/java/com/acme] $ ..
      [me@local /opt/projects/project1/src/main/java/com] $

   1. Navigating to the parent's parent directory:

      [me@local /opt/projects/project1/src/main/java/com/acme] $ ...
      [me@local /opt/projects/project1/src/main/java] $

   1. Navigating up n-levels:

      [me@local /opt/projects/project1/src/main/java/com/acme] $ .. 5
      [me@local /opt/projects/project1] $

   1. Navigating up to a directory with a given name:

      [me@local /opt/projects/project1/src/main/java/com/acme] $ .. project1
      [me@local /opt/projects/project1] $

   **Note:** `..` is an alias for the command -cd-up which you also can use, e.g. `-cd-up 5`

1. Navigating **down** the directory tree to a directory with a given name:

   [me@local /opt/projects/project1] $ ++ acme
   [me@local /opt/projects/project1/src/main/java/com/acme] $

   **Note:**  `++` is an alias for -cd-down which you also can use, e.g. `-cd-down acme`

1. Navigating **back** in the directory history

   1. Navigate back to the last visited directory:

      [me@local /var/log/project1/mod1] $ cd /opt/projects/project1
      [me@local /opt/projects/project1] $ -
      [me@local /var/log/project1/mod1] $

   1. Navigate back to a directory with a given name:

      [me@local /var/log/project1/mod1] $ cd /opt/projects/project1
      [me@local /opt/projects/project1] $ cd /opt/projects/project2
      [me@local /opt/projects/project2] $ cd /var/log/project2/mod2
      [me@local /var/log/project2/mod2] $ -- mod1
      [me@local /var/log/project1/mod1] $

   1. Navigate back to the n-last visited directory:

      [me@local /var/log/project1/mod1] $ cd /opt/projects/project1
      [me@local /opt/projects/project1] $ cd /opt/projects/project2
      [me@local /opt/projects/project2] $ cd /var/log/project2/mod2
      [me@local /var/log/project2/mod2] $ -- 3
      [me@local /var/log/project1/mod1] $

   **Note:** `--` is an alias for -cd-hist which you also can use, e.g. `-cd-hist mod1`

### Using bash-funk modules separately

All bash-funk modules are self-containing. This means, if you are only interested in the commands provided by one module, you can also directly source that particular module located in the `modules` folder and do not use the `bash-funk.sh` loader script.

## Updating

Once loaded, you can easily update your bash-funk installation to the latest code base by using the [-update](docs/misc.md#-update) command:

```bash
-update -yr
```

or:

```bash
-update --yes --reload
```

## License

All files are released under the [Apache License 2.0](LICENSE.txt).

Individual files contain the following tag instead of the full license text:
```
SPDX-License-Identifier: Apache-2.0
```

This enables machine processing of license information based on the SPDX License Identifiers that are available here: https://spdx.org/licenses/.

repository: vegardit/bash-funk

gha_language: Shell

repo_name: vegardit/bash-funk


text:
# About

Lists are an example of generic classes. You will also see `HashSet<T>` and `Dictionary<T>` in early exercises.

More [advanced generic techniques][generics] are discussed in (TODO cross-ref-tba) including creating your own generics.

If you need a list of different types then you can use `List<Object>` but you will need to [down cast][casting] elements that you access in from the list.

You should also be aware of `System.Collections.List` which you may encounter in legacy code. To all intents and purposes this behaves like `List<Object>`.

[generics]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/
[casting]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/casting-and-type-conversions

repository: alexisnovas/csharp-exercises

repo_name: alexisnovas/csharp-exercises


text:
---
layout: post102
title:  Interoperability
categories: XAP102
parent: document-overview.html
weight: 300
---

{% summary %}{% endsummary %}

{%comment%}
{% summary %}Interoperability between POJO and Document space entries{% endsummary %}

# Overview
{%endcomment%}

XAP offers interoperability between documents and POJOs via the space - it is possible to write POJOs and read them back as documents, and vice versa. This is usually useful in scenarios requiring reading and/or manipulating POJO objects without loading the concrete java classes.

![document_arch2.jpg](/attachment_files/document_arch2.jpg)

{% tip %}
In previous releases the `ExternalEntry` class was used to achieve this functionality. Starting with 8.0, the `SpaceDocument` class should be used to accomplish these needs in a simpler and safer manner, whereas `ExternalEntry` has been deprecated and should no longer be used.
{%endtip%}

# Requirements

When working with documents, the user is in charge of creating and registering the space type descriptor manually before interacting with the document types. When working with POJOs, the system implicitly generates a space type descriptor for the POJO's class using annotations or `gs.xml` files when the class is used for the first time. In order to inter-operate, the same type descriptor should be used for both POJOs and documents.

If the POJO's class is in the application's classpath, or the POJO is already registered in the space, there's no need to register it again - the application will retrieve it automatically when it's used for the first time. For example:

{% highlight java %}
// Create a document template using the POJO class name:
SpaceDocument template = new SpaceDocument(MyPojo.class.getName());
// Count all entries matching the template:
int count = gigaSpace.count(template);
{% endhighlight %}

If the POJO's class is not available in the classpath or in the data grid, the application will throw an exception indicating that there is no type descriptor registered for the specified type. In that case, it is possible to manually create a matching type descriptor using the `SpaceTypeDescriptorBuilder` and register it in the space. However, that's not recommended since it essentially requires you to duplicate all the POJO settings and maintain them if the POJO changes.

# Query Result Type

When no interoperability is involved this is a trivial matter - Querying a POJO type returns POJOs, querying a document type returns documents.

When we want to mix and match, we need semantics to determine to query result type - POJO or document.

## Template Query

Template query result types are determined by the template class - if the template is an instance of a `SpaceDocument`, the results will be documents, otherwise they will be POJOs.

For example:

{% highlight java %}
// Read all product entries as POJOs:
Product[] objects = gigaSpace.readMultiple(new Product(), Integer.MAX_VALUE);
// Read all product entries as Documents:
SpaceDocument[] documents = gigaSpace.readMultiple(
    new SpaceDocument(Product.class.getName()), Integer.MAX_VALUE);
{% endhighlight %}

#### SQL Query

The `SQLQuery` class has been enhanced with a `QueryResultType` parameter. The following options are available:

- `OBJECT` - Return java Object(s) (POJO).
- `DOCUMENT` - Return space document(s).
- `DEFAULT` - If the type is registered with a concrete java class, return an Object. Otherwise, return a document. This is the default behavior.

For example:

{% highlight java %}
// Read a POJO using an SQL query - same as always:
Product pojo = gigaSpace.read(
    new SQLQuery<Product>(Product.class, "name='Dynamite'"));

// Read a document using an SQLQuery when there's no
// compatible POJO - no need to specify query result type:
SpaceDocument document = gigaSpace.read(
    new SQLQuery<SpaceDocument>("Product", "name='Dynamite'"));

// Read a documnet using an SQLQuery when there is a
// compatible POJO - explicitly specify query result type:
SpaceDocument document = gigaSpace.read(
    new SQLQuery<SpaceDocument>(Product.class.getName(),
        "name='Dynamite'", QueryResultType.DOCUMENT));
{% endhighlight %}

This strategy both preserves backwards compatibility and simplifies non-interoperability scenarios, which are more common than interoperability scenarios.

#### ID Based Query

In order to support ID queries for documents, the `IdQuery` class has been introduced, which encapsulates the type, id, routing and a `QueryResultType`. New `GigaSpace` signatures have been added for `readById`, `readIfExistsById`, `takeById`, `takeIfExistsById`. The result type is determined by the `QueryResultType`, similar to `SQLQuery`.

For example:

{% highlight java %}
// Read a POJO by id - same as always:
Product pojo = gigaSpace.readById(new IdQuery<Product>(Product.class, 7));

// Read a document by id when there's no
// compatible POJO - no need to specify query result type:
SpaceDocument document = gigaSpace.readById(
    new IdQuery<SpaceDocument>("Product", 7));

// Read a document by id when there is
// a compatible POJO - explicitly specify query result type:
SpaceDocument document = gigaSpace.readById(
    new IdQuery<SpaceDocument>(Product.class.getName(), 7,
        QueryResultType.DOCUMENT));
{% endhighlight %}

Respectively, to support multiple ids queries, `IdsQuery` was also introduced, with new signatures for `readByIds` and `takeByIds`. For example:

{% highlight java %}
Object[] ids = new Object[] {7, 8, 9};
// Read POJOs by ids - same as always:
Product[] pojos = gigaSpace.readByIds(
    new IdsQuery<Product>(Product.class, ids)).getResultsArray();

// Read documents by ids when there's no
// compatible POJO - no need to specify query result type:
SpaceDocument[] documents = gigaSpace.readByIds(
    new IdsQuery<SpaceDocument>("Product", ids)).getResultsArray();

// Read documents by ids when there is a
//  compatible POJO - explicitly specify query result type:
SpaceDocument[] documents = gigaSpace.readByIds(
    new IdsQuery<SpaceDocument>(Product.class.getName(),
        ids, QueryResultType.DOCUMENT)).getResultsArray();
{% endhighlight %}

{% info %}
The original `readById` (and related methods) signatures are not suited for document types, since they require a concrete java class. They always return POJO(s).
{%endinfo%}

# Dynamic Properties

{%comment%}
![new-in-801-banner.png](/attachment_files/new-in-801-banner.png)
{%endcomment%}

When a type descriptor is created from a POJO class, the type descriptor builder checks if the POJO class supports [Dynamic Properties](./dynamic-properties.html) (new in 8.0.1). If it doesn't, the type descriptor will also not support dynamic properties. If a space document will be created using the same type with a property that is not defined in the POJO and written to the space, an exception will be thrown indicating the property is not defined in the type and the type does not support dynamic properties.

It is possible to manually create a `SpaceTypeDescriptor` of the POJO using the `SpaceTypeDescriptorBuilder` and enable dynamic properties. Note, however, that in that case if client A writes a document with a dynamic property and client B reads it as a POJO, the dynamic property will be ignored, and if client B will proceed to update the entry the dynamic property will be deleted from the space.

# Deep Interoperability

{%comment%}
![new-in-801-banner.png](/attachment_files/new-in-801-banner.png)
{%endcomment%}

If the POJO contains properties which are POJO themselves, the space will implicitly convert these properties to space documents as needed.
For example:

{% highlight java %}
// Create a POJO entry with a POJO property and write it to space:
Person personPojo = new Person()
    .setName("smith")
    .setAddress(new Address()
        .setCity("New York")
        .setStreet("Main"));
gigaSpace.write(personPojo);
// Read POJO entry as a document:
SpaceDocument template = new SpaceDocument(Person.class.getName())
    .setProperty("name", "smith");
SpaceDocument personDoc = gigaSpace.read(template);
// Get address document from person document:
SpaceDocument addressDoc = personDoc.getProperty("address");
{% endhighlight %}

This works the other way around as well - if a space document is created with a nested space document property, it will be converted to a POJO with a nested POJO property when read as a POJO.

If you prefer to disable this implicit conversion and preserve the nested POJO instance within document entries, use the `@SpaceProperty` annotation and set `documentSupport` to `COPY`:

{% highlight java %}
public class Person {
    ...
    @SpaceProperty(documentSupport = SpaceDocumentSupport.COPY)
    public Address getAddress() {...}
    public Person setAddress(Address address) {...}
    ...
}
{% endhighlight %}

In that case the result would be:

{% highlight java %}
// Write POJO entry same as before
...
// Read POJO entry as a document:
SpaceDocument template = new SpaceDocument(Person.class.getName())
    .setProperty("name", "smith");
SpaceDocument personDoc = gigaSpace.read(template);
// Get address POJO from person document:
Address addressPojo = personDoc.getProperty("address");
{% endhighlight %}

The `SpaceDocumentSupport` can be one of the following:

- `CONVERT` -- Value is converted to/from space document, according to the operation's context.
- `COPY` -- Value reference is copied as-is - no conversion is performed.
- `DEFAULT` -- Behavior will be determined automatically according to the object's class.

This behavior applies to arrays and collections as well (for example, if `Person` would have `List<Address> getAddresses()`, it would be converted to a list of address documents).

{% note %}
This feature is new 8.0.1. In previous releases, there's no implicit conversion of nested properties.
{%endnote%}

# Local View / Cache

[Local View](./local-view.html) and [Local Cache](./local-cache.html) supports both POJOs and Documents. Unlike an embedded space, the entry is stored in the cache as a user object (either POJO or document), which speeds up query performance since the result entries do not have to be transformed.

When working with POJOs only or Documents only, this is not an issue. However, when working in a mixed POJO-document environment it is important to understand how the objects are stored in cache to assure optimal performance.

Local view is defined by one or more views, which are essentially SQL queries, so the query result type discussed above actually determines if the objects are stored locally as POJOs or documents.

Local cache stores its object locally according to the master space: If a POJO entry was written to the master space, it will be kept in the local cache as a POJO as well, and if a document entry is written to the master it will be kept as document in the local cache. If a user asks the local cache for a document result but the entry is stored as a POJO it will be converted, and vice versa.

# Space Filters and Space Replication Filters

Space Filters are supported for space documents. If the space type descriptor that is registered in the space contains the POJO class, the entry will be passed to the filter as a POJO. Otherwise, it will be passed to the filter as a document.

repository: mjedynak/gigaspaces-wiki-jekyll

repo_name: mjedynak/gigaspaces-wiki-jekyll


text:
# language-pack-en-us
The English language strings shipped by Delver. Useful as a starting point for a translation.

## Usage
The translation table is stored as a [JSON](http://en.wikipedia.org/wiki/JSON) object in the [strings.dat](./data/strings.dat) file. Each entry has the form:

```json
"items.ExampleItem.stringIdentifier": {
    "class":"com.interrupt.dungeoneer.game.LocalizedString",
    "localizedName":"Translate this property",
    "comment":"This property is not used by the game. It is meant to help give context for the translator."
}
```

### String Identifier
> DO NOT CHANGE

The string identifier used by the Delver engine to determine which string to show. In the above example the string identifier is _"items.ExampleItem.stringIdentifier"_.  If you change this value, the engine will not be able to find the translated string and will fallback to the English text.

### class
> DO NOT CHANGE

The class property is used by the Delver engine to transform this text into a usable translation object. If you change this value, the engine will fail the entire translation file and English will be shown.

### localizedName
The localizedName property is the string that the Delver engine will show. In the above example the value for the localizedName is _"Translate this property"_. This is the resouce that needs translation.

### comment
The comment property is not used by the Delver engine, but is meant to serve to provide context for the translator. In the example above the value for the comment is _"This property is not used by the game. It is meant to help give context for the translator."_. This property can be left blank, which is indicated by two double quotes ("").

```json
"Iron sword":{
    "class":"com.interrupt.dungeoneer.game.LocalizedString",
    "localizedName":"Espada de hierro",
    "form":"feminine singular",
    "comment":""
},
"entities.Item.itemConditionBroken":{
    "class":"com.interrupt.dungeoneer.game.LocalizedString",
    "localizedName":"rota",
    "forms":{
        "feminine singular":"rota",
        "feminine plural":"rotas",
        "masculine singular":"roto",
        "masculine plural":"rotos"
    },
    "comment":""
},
```

### form
The form property is used to describe the gender and count of a noun. This will be used to find a matching adjective. The form property will be only honored on items. In the above example the form is "feminine singular". Do note that this property is just a string and can be whatever you like.

### forms
The forms property is an object that maps a form to a translated string. The above example will map "feminine singular" to "rota." If an appropriate mapping cannot be found, the localizedName property will be used.

## Troubleshooting
### Valid JSON
It is recommended to use a [JSON validator](http://www.google.com/#q=json+validator) to ensure that you have well formed JSON. If your JSON is not well formed the Delver engine may not load your content, and potentially could crash.

### Additional LocalizedString Properties
While adding additional JSON properties is still valid JSON, it will cause the Delver engine to crash. If you want to leave translation notes please feel free to use the comment property.

repository: Interrupt/delver-example-mods

repo_name: Interrupt/delver-example-mods


text:
# WiFi Connect package

This package connects to a wifi network at boot, using `wpa_supplicant`.

## How to use

The wifi connection will be made automatically at boot, but there are a few
configuration options picked up from files in the boot partition. Change these
files to describe your own set of wifi networks and your wifi adapter.

  * `wpa_supplicant.conf`: is a standard `wpa_supplicant` configuration file,
    listing all of the networks that the board should connect to.
    See below for an example config file.

  * `wifi.ko`: is an optional driver file. This lets you easily inject wifi
    drivers that are not in the mainline kernel.

## Example `wpa_supplicant.conf` file

Here is an example config file that describes two different networks:

```
network={
    # Network name
    ssid="MyHomeNetwork"

    # Password in plain text using quotes
    psk="AndItsPlaintextPassword"

    # A unique ID for this entry
    id_str="home"
}

network={
    # Second network name
    ssid="ConferenceWiFi"

    # Password obfuscated with wpa_passphrase command
    psk=d1d140ae3d73f946bfb117479b8967a5a5b541f712c0f40ba8049f34ce43e89c

    # A unique ID
    id_str="demonight"
}
```

repository: yunqu/PYNQ

repo_name: yunqu/PYNQ


text:
---
layout: page
title: Lecture 5
sidebar_link: true
description: Blockchain Applications
---

    we explore the current use cases of blockchain that’s happening around the world and what the future of blockchain might look like

Slides
Watch

## Homework
*
Blockchains: how can they be used? (Use cases for Blockchains)

*
Chainlink: What is the Blockchain Oracle Problem

*
CNBC News: JPMorgan creates new unit for blockchain projects, says the technology is close to making money

*
Bitcoin Is Helping Undocumented Immigrants Send Money Home - Global remittance industry

*
IBM and Twiga Foods Introduce Blockchain-Based MicroFinancing for Food Kiosk Owners in Kenya

## Blockchain for Social Impact
*
New America-The Blueprint for Blockchain and Social Innovation

*
Stanford x RippleWorks - BLOCKCHAIN FOR SOCIAL IMPACT- MOVING BEYOND THE HYPE

*
UPenn Wharton-How the Blockchain Brings Social Benefits to Emerging Economies

*
Cognition Foundry uses blockchain for social good

*
Building Blocks – Blockchain for Zero Hunger


text:
---
title: The great German seaplane DO-X
tags:
  - Aug 1931
---

The great German seaplane DO-X arrives in Miami. [Photo]

Newspapers: **The Miami News (weekly), Miami News-Metropolis, Miami Daily News or The Miami News**

Page: **1**, Section: **N/A**


text:
# Fix adapter-react dependencies

Up until version 1.6.14 of `@iobroker/adapter-react` one had to manually add dependencies to the package.json file. This is now obsolete.

You may update your `devDependencies` in `package.json` as follows:

-   explicitly set `@iobroker/adapter-react` to version `1.6.15`
-   remove any indirect dependencies if you are not using them:
    -   `@material-ui/icons`
    -   `react-icons`
    -   `@sentry/browser`

Your `package.json` should now look similar to:

-   [this](./../../test/baselines/adapter_JS_React/package.json) for JavaScript
-   [this](./../../test/baselines/adapter_TS_React/package.json) for TypeScript

After these modifications, call `npm install` in your adapter root directory.

repository: ioBroker/create-adapter

gha_language: TypeScript

gha_license_id: MIT

repo_name: ioBroker/create-adapter


text:
---
layout: page
title: Publication
---

I can also be found from [Google Scholar](https://scholar.google.com/citations?user=KL1d5KsAAAAJ&hl=ko).

### Journal Papers

#### Domestic

- **Lee, B.-H.**, & Chung, S. (2020). To what degree does perceived message effectiveness reflect actual message effect? Perceived vs. actual message effect in persuasive campaigns. *Korean Journal of Journalism and Communication Studies, 64*(6), 319–352.

### Conference Papers

#### International

- Chung, S., **Lee, B.-H.**, & Ryu, H.-S. (2020, May). *A Comprehensive examination about perceived message effectiveness: The relationship between various measures of perceived effectiveness and actual attitude change*. Paper presented at the annual meeting of the International Communication Association, Gold Coast, Queensland, Australia. (Information Systems Division)

- Chung, S., Ryu, H.-S., Kim, J. E., & **Lee, B.-H.** (2019, May). *A cognitive model of media effect perception: The effect of media message strength, target’s level of knowledge and attitudes toward messages*. Paper presented at the annual meeting of the International Communication Association, Washington, D.C., USA. (Information Systems Division)

repository: Ethan-leee/HyeonBio

repo_name: Ethan-leee/HyeonBio


text:
sails-hook-validation
=====================

[![Build Status](https://travis-ci.org/lykmapipo/sails-hook-validation.svg?branch=master)](https://travis-ci.org/lykmapipo/sails-hook-validation)

[![Tips](https://img.shields.io/gratipay/lykmapipo.svg)](https://gratipay.com/lykmapipo/)

[![Support via Gratipay](https://cdn.rawgit.com/gratipay/gratipay-badge/2.3.0/dist/gratipay.svg)](https://gratipay.com/lykmapipo/)

Custom validation error messages for sails model. Its works with `callback`, `deferred` and `promise` style `model API` provided with sails.

*Note: This requires Sails v0.11.0+.  If v0.11.0+ isn't published to NPM yet, you'll need to install it via Github.*

## Installation
```sh
$ npm install --save sails-hook-validation
```

## Usage
Add `validationMessages` static property in your sails model
```js
//this is example
module.exports = {
    attributes: {
        username: {
            type: 'string',
            required: true
        },
        email: {
            type: 'email',
            required: true
        }
    },
    //model validation messages definitions
    validationMessages: { //hand for i18n & l10n
        email: {
            required: 'Email is required',
            email: 'Provide valid email address',
            unique: 'Email address is already taken'
        },
        username: {
            required: 'Username is required'
        }
    }
};
```
Now you can call model static
- `create()`
- `createEach()`
- `findOrCreate()`
- `findOrCreateEach()`
- `update()`
- and other static model method that invoke `Model.validate()`.

If there is any *validation or database errors* `sails-hook-validation` will put your custom errors message in `error.Errors` of the error object returned by those methods in your `callback` or `promise catch`.

### create()
```js
//anywhere in your codes if
//you invoke
 User
    .create({}, function(error, user) {
        //you will expect the following
        //error to exist on error.Errors based on
        //your custom validation messages

        expect(error.Errors.email).to.exist;

        expect(error.Errors.email[0].message)
            .to.equal(User.validationMessages.email.email);

        expect(error.Errors.email[1].message)
            .to.equal(User.validationMessages.email.required);

        expect(error.Errors.username).to.exist;
        expect(error.Errors.username[0].message)
            .to.equal(User.validationMessages.username.required);

        done();
    });
```

### createEach()
```js
User
    .createEach([{
        email: faker.internet.email(),
        username: faker.internet.userName()
    }, {
        email: 'otherExistingModelEmail',
        username: username
    }])
    .catch(function(error) {
        //you will expect the following
        //error to exist on error.Errors based on
        //your custom validation messages

        expect(error.Errors.email).to.exist;

        expect(error.Errors.email[0].message)
            .to.equal(User.validationMessages.email.unique);

        done();
    });
```

### findOrCreate()
```js
User
    .findOrCreate({
        email: faker.internet.email()
    }, {
        email: 'otherExistingModelEmail',
        username: username
    })
    .exec(function(error, user) {
        //you will expect the following
        //error to exist on error.Errors based on
        //your custom validation messages

        expect(error.Errors.email).to.exist;

        expect(error.Errors.email[0].message)
            .to.equal(User.validationMessages.email.unique);

        done();
    });
```

### findOrCreateEach()
```js
User
    .findOrCreateEach(
        [{
            email: faker.internet.email()
        }], [{
            email: 'otheExistingModelEmail',
            username: username
        }]
    )
    .catch(function(error) {
        //you will expect the following
        //error to exist on error.Errors based on
        //your custom validation messages

        expect(error.Errors.email).to.exist;

        expect(error.Errors.email[0].message)
            .to.equal(User.validationMessages.email.unique);

        done();
    });
```

### update()
```js
User
    .update({
        email: 'modelEmail'
    }, {
        email: 'otherExistingModelEmail'
    }, function(error, user) {
        //you will expect the following
        //error to exist on error.Errors based on
        //your custom validation messages

        expect(error.Errors.email).to.exist;

        expect(error.Errors.email[0].message)
            .to.equal(User.validationMessages.email.unique);

        done();
    });
```

*Note:*
- *`sails-hook-validation` work by patch model static `validate()`, `create()`, `createEach()`, `findOrCreate()`, `findOrCreateEach()` and `update()`.*
- *To have custom error messages at model instance level consider using [sails-model-new](https://github.com/lykmapipo/sails-model-new).*
- *`sails-hook-validation` opt to use `error.Errors` and not to re-create or remove any properties of error object so as to remain with sails legacy options*

## Testing

* Clone this repository

* Install all development dependencies

```sh
$ npm install
```
* Then run test

```sh
$ npm test
```

## Contribute

Fork this repo and push in your ideas.
Do not forget to add a bit of test(s) of what value you adding.

## Licence

Copyright (c) 2015 lykmapipo

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: nanarcode/urlshortenerSailsJS

repo_name: nanarcode/urlshortenerSailsJS


text:
[![license](https://img.shields.io/badge/license-MIT-success)](https://github.com/pdrm83/Py2Opt/blob/master/LICENSE.md)
[![doc](https://img.shields.io/badge/docs-Medium-blue)](https://towardsdatascience.com/how-to-solve-the-traveling-salesman-problem-a-comparative-analysis-39056a916c9f)

# 2-Opt Search Algorithm
In optimization, 2-opt is a simple local search algorithm with a special swapping mechanism that suits well to solve the
traveling salesman problem. This algorithm is sensitive to the initial point of search, i.e., its final results get
changed by different initial points. 2-opt runs very fast such that a tsp with 120 cities can be solved in less than
5 sec on the intel core i7. To get a more reliable result, you should run the 2-opt with different randomized initial
points for enough number of times. One more thing, the travelling salesman problem has many applications in real world
such as logistic planning or DNA sequencing. So, having a fast and simple method to solve the TSP is valuable. For more
detailed description, you can read this article: [How to Solve the Traveling Salesman Problem — A Comparative Analysis](https://towardsdatascience.com/how-to-solve-the-traveling-salesman-problem-a-comparative-analysis-39056a916c9f)

## Install
The module requires the following libraries:

* numpy
* random2

Then, it can be installed using pip:
```python
pip install py2opt
```

## Usage
To use this module, you must have a distance matrix `dist_mat` showing the pair distance among all nodes. Then, the
first thing to do is create an instance of the `RouteFinder` class. When you call the `solve` method, you will get the
`best_route` and `best_distance` of this problem. Check out the example below.

```python
from py2opt.routefinder import RouteFinder

cities_names = ['A', 'B', 'C', 'D']
dist_mat = [[0, 29, 15, 35], [29, 0, 57, 42], [15, 57, 0, 61], [35, 42, 61, 0]]
route_finder = RouteFinder(dist_mat, cities_names, iterations=5)
best_distance, best_route = route_finder.solve()

print(best_distance)
114
print(best_route)
['A', 'C', 'B', 'D']
```
The solver finds out the optimum order (re: minimum total distance traveled) in which the nodes must be visited along
with the total distance traveled. Note that the 2-opt algorithm doesn't guarantee the global optimum similar to other
heuristic search algorithms. So, the results can vary in each iteration.

And that's pretty much it!


text:
---
layout: post
title: "Installing Java JDK 17 LTS on debian distros"
date: 2021-11-13 14:00:00 -0300
categories: tutorial linux java
---
This tutorial we will learn how to install JDK on linux systems based on debian.

## Java 17 LTS Global

```bash
# Download JDK on Oracle Website
apt install ./jdk-17.deb

# Manage bins with update-alternatives
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-17/bin/java 100
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-17/bin/javac 100
update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-17/bin/jar 100

# Add JAVA_HOME to PATH
vim /etc/profile.d/java17.sh
## export JAVA_HOME=/usr/lib/jvm/jdk-17
## export PATH=$PATH:$JAVA_HOME/bin
```

## OpenJDK 11 LTS Global

```bash
# Install JDK 11 LTS
apt install openjdk-11-jdk

# Manage bin with update-alternatives
update-alternatives --config java

vim /etc/profile.d/jdk-11.sh
## export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
```

gha_language: CSS


text:
# NSIS INetC plug-in

The [INetC (Internet client) plug-in][1] is a [NSIS][2] plugin downloading and uploading files. It is based on the
[InetLoad plug-in][4]. The network implementation uses `MS WinInet API`, and supports the `HTTP`, `HTTPS` and `FTP` protocols.

[NSIS (Nullsoft Scriptable Install System)][2] is a professional open source system to create Windows installers.
It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.

This is a modified version of `<IP_ADDRESS>`. Since I couldn't find a source repository, I've created a Git repository and
committed the downloaded source files. These changes would otherwise have been submitted as a pull request or patch.
As I couldn't find a specific license for [INetC plug-in][1] I understand it as if it is licensed with the `zLib License`
as stated in the [NSIS license][3].

The changes in this version is that a fourth download dialog has been created (`/MODERNPOPUP`). I found the
existing `/POPUP` dialog to be visually outdated and with a strange organization of the download information.
No functionality related to the download itself has been changed.

Nadahar

  [1]: http://nsis.sourceforge.net/Inetc_plug-in
  [2]: http://nsis.sourceforge.net/Main_Page
  [3]: http://nsis.sourceforge.net/License
  [4]: http://nsis.sourceforge.net/InetLoad_plug-in

license: Zlib

gha_license_id: Zlib


text:
# Psc-Package Nix

Another Psc-Package Nix tool that uses Nix to solve transitive dependencies, and provides a utility to generate Nix files from them.

See `test/`.

Thanks to puck on freenode for showing me a core undocumented feature in Nix that makes this implementation work smoothly.

## Notes

Read about how this project works here https://github.com/justinwoo/my-blog-posts/blob/master/posts/2020-05-31-working-with-purescript-package-sets-with-just-nix.md

repository: justinwoo/psc-package-nix

repo_name: justinwoo/psc-package-nix


text:
## Is S3 bucket hosting a static website

Identifies if a S3 Bucket is associated with a website.

### Sample Input:
```json
{
  "bucketName": "foobar",
  "region": "us-east-1"
}
```

### Sample Output:
```json
{
  "bucketWebsiteUrl": "foobar-content.s3-website-us-east-1.amazonaws.com"
}
```

repository: Ctfbuster/dassana

repo_name: Ctfbuster/dassana


text:
---
layout: default
title: Visit Detail
nav_order: 5
parent: Optum EHR
description: "Mapping the Visit_Detail table from the Optum Panther Encounter and CareArea tables"

---

# CDM Table name: VISIT_DETAIL

VISIT_DETAIL records will be created from both the Encounter and the CareArea tables. Each VISIT_DETAIL record will be associated with a VISIT_OCCURRENCE_ID. Please refer to the visit logic for how that was done.

## Reading from OPTUM_EHR.Encounter

Starting with the Encounter table, de-duplicate records by ptid, encid, interaction_type, interaction_date, and interaction_time. After de-duplication each record should create a record in VISIT_DETAIL.

To find a provider associated with a VISIT_DETAIL record, join to the encounter_provider table on encounter.encid = encounter_provider.encid. If more than one provider is associated to a record, the provider with provider_role of 'ATTENDING' should be prioritized. If there is more than one provider with the provider_role of 'ATTENDING', pick one. If no provider has the role of 'ATTENDING' then sort by provider_role and choose the first.

| Destination Field | Source Field | Logic | Comment |
|-|-|-|-|
| visit_detail_id | Autogenerate | Use the above logic to define VISIT_DETAIL records. |  |
| person_id | ptid |   |   |
| visit_detail_concept_id | interaction_type | | Use the [SOURCE_TO_STANDARD](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) query with the filter:
 Where SOURCE_VOCABULARY_ID = 'JNJ_OPTUM_EHR_VISIT' |
| visit_detail_start_date | Interaction_date |   |   |
| visit_detail_start_datetime | Interaction_time | Combine interaction_date and interaction_time into a datetime value |   |
| visit_detail_end_date | Interaction_date  |   |   |
| visit_detail_end_datetime |  Interaction_time | Combine interaction_date and interaction_time into a datetime value  |   |
| visit_detail_type_concept_id |   | 32827 | EHR encounter |
| provider_id | encounter_provider.provid|  | Use the logic detailed above to choose a provider for the VISIT_DETAIL record. |
| care_site_id |   |   |   |
| visit_detail_source_value | interaction_type |   |   |
| visit_detail_source_concept_id | 0 | |   |
| admitting_source_concept_id | 0 | |  |
| admitting_source_value |  |   |  |
| discharge_to_concept_id | 0 | |  |
| discharge_to_source_value ||   |  |
| preceding_visit_detail_id | Visit_detail_id | If the row_number() for the   current row > 1, look up the previous visit_detail_id cooresponding to the   parent visitid. |   |
| visit_detail_parent_id | NULL |   |   |
| visit_occurrence_id | encid | Each encounter will be associated with a visit. Use the encid to lookup the corresponding VISIT_OCCURRENCE_ID |   |

## Reading from OPTUM_EHR.CareArea

First remove any records where CareArea.carearea is 'OTHER CARE AREA' or 'UNKNOWN CARE AREA'. Then, de-duplicate records by ptid, encid, carearea, carearea_date, and carearea_time. After de-duplication each record should create a record in VISIT_DETAIL.

To find a provider associated with a VISIT_DETAIL record, join to the encounter_provider table on carearea.encid = encounter_provider.encid. If more than one provider is associated to a record, the provider with provider_role of 'ATTENDING' should be prioritized. If there is more than one provider with the provider_role of 'ATTENDING', pick one. If no provider has the role of 'ATTENDING' then sort by provider_role and choose the first.

| Destination Field | Source Field | Logic | Comment |
|-|-|-|-|
| visit_detail_id | Autogenerate | Use the above logic to define VISIT_DETAIL records from the CareArea table. |  |
| person_id | ptid |   |   |
| visit_detail_concept_id | carearea | | Use the [SOURCE_TO_STANDARD](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) query with the filter:
 Where SOURCE_VOCABULARY_ID = 'JNJ_OPTUM_EHR_VISIT'
 and Target_standard_concept = 'S'
and target_invalid_reason is NULL |
| visit_detail_start_date | carearea_date |   |   |
| visit_detail_start_datetime | carearea_time | Combine carearea_date and carearea_time into a datetime value |   |
| visit_detail_end_date | carearea_date  |   |   |
| visit_detail_end_datetime |  carearea_time | Combine carearea_date and carearea_time into a datetime value  |   |
| visit_detail_type_concept_id |   | 32828 | EHR episode record |
| provider_id | encounter_provider.provid|  | Use the logic detailed above to choose a provider for the VISIT_DETAIL record. |
| care_site_id |   |   |   |
| visit_detail_source_value | carearea |   |   |
| visit_detail_source_concept_id | carearea | |Use the [SOURCE_TO_SOURCE](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_SOURCE.sql) with the filter:
 Where SOURCE_VOCABULARY_ID = 'JNJ_OPTUM_EHR_VISIT'|
| admitting_source_concept_id | 0 | |  |
| admitting_source_value |  |   |  |
| discharge_to_concept_id | 0 | |  |
| discharge_to_source_value ||   |  |
| preceding_visit_detail_id | Visit_detail_id | If the row_number() for the   current row > 1, look up the previous visit_detail_id cooresponding to the   parent visitid. |   |
| visit_detail_parent_id | NULL |   |   |
| visit_occurrence_id | encid | Each encounter will be associated with a visit. Use the encid to lookup the corresponding VISIT_OCCURRENCE_ID |   |

## Change Log
- All de-duped encounters now create VISIT_DETAIL records
- Records from CareArea now create VISIT_DETAIL records

repository: bubdm/ETL-LambdaBuilder

repo_name: bubdm/ETL-LambdaBuilder


text:
# TaskWork
Nowadays, there are many ways one can make money by completing various kinds of tasks, such as: plumbing, cable customer support and even bigger ones like Outsourcing. With the advance in economy over the years, the simple task trading system, without any payment method, is becoming unused, because the need to have money for anything is a reality, which means that, for any service you may need, there’s a need to pay for it. Our goal is to bring back those old habits, with a simple Android app developed using the Native Architecture of the Android device and with a cloud-based database and server, without taking out the modern part of the deal, which is the possibility to still get payed to do a task.
https://taskwork.en.aptoide.com/.
This projet was originally created by RJoão Pedro Dores e João Pedro Batista in 2017

# CREDITS #
The TaskWork team, based at OSIKMCN, includes:
Fernando Teodósio - Project Lead.
Hugo Rodrigues - Community Manager.
João Pedro Dores - Developer.
João Pedro Batista - Developer.

# LICENSE #
TaskWork is open-source software released under the The MIT License (MIT).

repository: GAGICRC/TaskWork

repo_name: GAGICRC/TaskWork


text:
# UserMembershipData

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**destinyMemberships** | [**\Bungie\Model\GroupsV2\GroupUserInfoCard[]**](GroupUserInfoCard.md) | this allows you to see destiny memberships that are visible and linked to this account (regardless of whether or not they have characters on the world server) | [optional]
**primaryMembershipId** | **int** | If this property is populated, it will have the membership ID of the account considered to be \"primary\" in this user's cross save relationship.   If null, this user has no cross save relationship, nor primary account. | [optional]
**bungieNetUser** | [**\Bungie\Model\User\GeneralUser**](GeneralUser.md) |  | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

repository: Yogarine/bungie-sdk-php

repo_name: Yogarine/bungie-sdk-php


text:
---
title: Create an S3 bucket
order: 6
draft: true
---

- Next we'll create an S3 bucket to hold the actual files for your site
- Navigate to S3 using the Services pane
- Click the "Create bucket" button

![Arrow pointing to "Create bucket" button](./create-bucket.png)

- Set the "Bucket name" to the domain name (domain.com) and then click the "Next" button

![Screenshot of "bucket name" settings](./name-and-region.png)

- On the "Configure options" screen, we'll leave the settings to the defaults and click "Next"
- On the "Set permissions" screen, validate that "Block all public access" is checked and then click "Next"

![Screenshot of "permissions" settings](./permissions.png)

- On the "Review" screen, click "Create bucket"
- You should see your bucket listed on the main "S3 buckets" screen

![Screenshot of "markchandler.codes" bucket listing](./bucket-listing.png)


text:
`````
Component / Data Display

# Tooltip

A simple text popup tip.
`````

*Auto translate by google.*

## Basic attributes

### Component definition

When the mouse is hovered or the keyboard is focused on a UI element (such as a button, icon, etc.), a simple text prompt pops up around the element to display the auxiliary information of the element.

### Component composition

1. **Bubble box (required)**: A container that carries text, so that text can be displayed more clearly. It is recommended to bring an arrow, which points to the target element.
2. **Text (required)**: Simple descriptive text as auxiliary information for the target element. It is recommended that there be no more than 4 lines and no more than 20 Chinese characters per line.

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/0252b9200f204b96b4bdb34d095b0da8~tplv-uwbnlip3yd-image.image)

### Component type

| Type | Description |
| ----- | ---------------------------------- |
| Function guide class | Used to explain the function, meaning or status of a UI element, such as: the description of the icon function. |
| Expand the information category | Further expansion and definition of existing information or elements, such as: explanation of the meaning of words in paragraphs. |

1. Function guide class:

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/55e2e22c16fd4c1eb8d94e8a3677c436~tplv-uwbnlip3yd-image.image)

2. Expand the information category:

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/bd0f8eac557a42dd808cb12a6a1f352e~tplv-uwbnlip3yd-image.image)

### Component size

1. The text is recommended to be 14px, and the size can be increased or decreased as needed (not less than 12px is recommended), and a uniform size is recommended for the same business;
2. The bubble box has appropriate margins on the basis of the content. It is recommended that the left and right margins be 12px, and the minimum height of a single line is 30px (mini size, try for small scenes or digital information), and the default is 38px. The upper and lower margins are the same, and the left and right margins are the same. A uniform size is recommended for the same business.

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/d4cebfab562c4638a0c36a1530e204b0~tplv-uwbnlip3yd-image.image)

## When to use

1. **Show brief helpful information**: When the user does not understand a UI element or wants to get more information, the text bubble can display more related helpful information;

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/90e8043247f640e192e87f0901729c15~tplv-uwbnlip3yd-image.image)

2. **Enhance the sense of certainty of the interaction**: When the user interacts with the interface, the text bubble can help the user to enhance the sense of certainty of the effect of the interacted elements;

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/06e60a9b2c734238994f171f3b6f3bc0~tplv-uwbnlip3yd-image.image)

3. **When the page location is limited**: When the page location is limited, some UI elements need to appear in a simplified form (such as a separate icon), combined with text bubbles can help reduce complex information on the page.

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/ce015efc13ef49e6b115f8acf9a9abe6~tplv-uwbnlip3yd-image.image)

## When not to use

1. **Display important information related to the task:** Don't put the important information needed to complete the task in the text bubble, the important information should not be hidden, and should always be displayed directly on the page;

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3718b1720c934dda823cdf7ed0a2968f~tplv-uwbnlip3yd-image.image)

2. **Show repetitive or redundant information**: When the meaning of the target element is obvious, there is no need to use text bubbles. Do not display information that overlaps with the target element in the text bubble;

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/7a78551a908e4286907eb09e535b4cae~tplv-uwbnlip3yd-image.image)

3. **Display complex information**: The content in the text bubble should be simple and straightforward, the overall text should not be too long, and complex information such as pictures should not be displayed. When you need to display complex information, you can consider using a dialog box (Modal) component;

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/4319978f68718a3c18daf38c0a2e31c2.png~tplv-uwbnlip3yd-webp.webp)

4. **Display interactive information**: The text bubble should not carry interactive operation information. When you need to show the operation, you can consider using a bubble card (Popover).

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3a5cd045ad2a4e6793e08d5c9e472758~tplv-uwbnlip3yd-image.image)

## Layout

1. The text bubble supports 12 different directions, namely: top left, top, top right, bottom left, bottom, bottom right, top left, left, bottom left, top right, right, bottom right;
2. Determine the position of the text bubble according to the line of sight flow and page layout restrictions to prevent the text bubble from obstructing relevant information and interrupting the workflow. It is recommended to adopt a unified layout within the same business;

![](https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/5d6da46eb3c94ef390caa745a47a4e9c~tplv-uwbnlip3yd-image.image)

## Copywriting Guide

1. **Concise:** The text description should be as short as possible;
2. **Direct**: directly describe the information without adding decorative words;

## Interactive behavior

1. When the mouse is hovered or the keyboard is focused on the target element, the text bubble will appear immediately;
2. When the mouse or keyboard moves out of the target element, the text bubble disappears immediately.

## Associated Components

[Popover](/react/components/popover)

[Modal](/react/components/modal)


text:
# Changelog

> This package is deprecated.  Please use the [Apollo Server Plugin API](https://www.apollographql.com/docs/apollo-server/integrations/plugins/) (specified on the `plugins` property, rather than `extensions`), which provides the same functionality (and more).

### 0.1.0-beta
- *Backwards-incompatible change*: `fooDidStart` handlers (where foo is `request`, `parsing`, `validation`, and `execution`) now return their end handler; the `fooDidEnd` handlers no longer exist.  The end handlers now take errors.  There is a new `willSendResponse` handler.  The `fooDidStart` handlers take extra options (eg, the `ExecutionArgs` for `executionDidStart`).
- *Backwards-incompatible change*: Previously, the `GraphQLExtensionStack` constructor took either `GraphQLExtension` objects or their constructors. Now you may only pass in `GraphQLExtension` objects.

### 0.0.10
- Fix lifecycle method invocations on extensions

license: MIT,Unlicense

repository: diegopacheco/scala-playground

detected_licenses: MIT Unlicense

gha_language: Scala

gha_license_id: Unlicense

repo_name: diegopacheco/scala-playground


text:
# sluger/provenance-visualization-presentation

A repository hosting my Master's defense presentation. The presentation is built with the [reveal.js](https://github.com/hakimel/reveal.js) presentation framework.

Show the presentation hosted as GitHub page at **[https://sluger.github.io/provenance-visualization-presentation](https://sluger.github.io/provenance-visualization-presentation)**


text:
# Card-matching

### Review

Random the position of images whenever you open. Chose 2 cards with the same flipped status to get 10 point. When all cards are opened before the remaining time, you will win. If not, you will lose.

### Play

Open the index.html to run the game.


text:
AndroidIntro
============

Code and presentation for Android Intro talk.

Credits:
========

- *UI WIndow* graphics used for 9-patch demo by StumpyStrust: http://opengameart.org/content/ui-window

repository: ick-seshoka/AndroidIntro

repo_name: ick-seshoka/AndroidIntro


text:
### 26 - VS CODE CONFUSION

The JSDoc has to be commented out as well as the function to which it belongs otherwise the Vs Code will get confused.

---

Issue Type: Bug

so i dev like

```js
/**
 * Create a promise for a test function.
 * @param {function} fn function to execute
 * @return {Promise} A promise to execute function.
 */
// async function createTestPromise(fn) {
//   const res = await fn()
//   return res
// }
```

and then i dev more like
```js
/**
 * Asynchronously runs the test.
 * @returns {string}
 */
const run = (options) => {
  return 'ok'
}
```

but what i see is that the function returns `Promise.<any>` in the doc

![screen shot 2018-10-26 at 05 54 05](https://user-images.githubusercontent.com/21156791/47542016-1ae29480-d8e4-11e8-9133-4a3e7236929a.png)

and this is because the source code was commented out but before it there was jsdoc. Is this my fault?

VS Code version: Code - Insiders 1.28.0-insider (431ef9da3cf88a7e164f9d33bf62695e07c6c2a9, 2018-10-03T12:36:03.286Z)
OS version: Darwin x64 15.6.0

System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM)2 Duo CPU     P7350  @ 2.00GHz (2 x 2000)|
|GPU Status|2d_canvas: unavailable_software
checker_imaging: disabled_off
flash_3d: unavailable_software
flash_stage3d: unavailable_software
flash_stage3d_baseline: unavailable_software
gpu_compositing: unavailable_software
multiple_raster_threads: disabled_off
native_gpu_memory_buffers: unavailable_software
rasterization: unavailable_software
video_decode: unavailable_software
video_encode: unavailable_software
webgl: unavailable_off
webgl2: unavailable_off|
|Load (avg)|19, 13, 9|
|Memory (System)|8.00GB (0.32GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|

Extensions (3)

Extension|Author (truncated)|Version
---|---|---
vscode-eslint|dba|1.6.1
code-spell-checker|str|1.6.10
vscode-wakatime|Wak|1.2.3

%~%

repository: artdecocode/daily-log

repo_name: artdecocode/daily-log


text:
# Problem Statement

The aim of the exercise is to implement k-NN from scratch.
The basic implementation is done for understanding.

# Objective

To understand how kNN works internally.

# Task

- Extend the algorithm for Distance-weighted kNN classification using appropriate dataset.
- Extend the algorithm for regression using appropriate dataset.
- Extend the algorithm with appropriate dataset.
- Implementing KD trees to understand information retrieval. Visit [this](https://www.analyticsvidhya.com/blog/2017/11/information-retrieval-using-kdtree/) site for dataset and references.

# k-NN Algorithm

K-nearest neighbors (KNN) algorithm is a type of supervised ML algorithm which can be used for both classification as well as regression predictive problems.
The following two properties would define KNN
well −
- Lazy learning algorithm − KNN is a lazy learning algorithm because it does not have a specialized training phase and uses all the data for training while classification.
- Non-parametric learning algorithm − KNN is also a non-parametric learning algorithm because it doesn’t assume anything about the underlying data.

K-nearest neighbors (KNN) algorithm uses ‘feature similarity’ to predict the values of new datapoints which further means that the new data point will be assigned a value based on how closely it matches the points in the training set.

1. Load the data
2. Initialize K to your chosen number of neighbors
3. For each example in the data
   - Calculate the distance between the query example and the current example from the data.
   - Add the distance and the index of the example to an ordered collection
4. Sort the ordered collection of distances and indices from smallest to largest (in ascending order) by the distances
5. Pick the first K entries from the sorted collection 6. Get the labels of the selected K entries
6. If regression, return the mean of the K labels
7. If classification, return the mode of the K labels

Here is a template notebook to get you started:

`knn_starter_exercise.ipynb`

[![Open in colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/gimseng/99-ML-Learning-Projects/blob/master/010/exercise/knn_starter_exercise.ipynb)
[![View in nbviewer](https://github.com/jupyter/design/blob/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.jupyter.org/github/gimseng/99-ML-Learning-Projects/blob/master/010/exercise/knn_starter_exercise.ipynb)

### References
- https://www.tutorialspoint.com/machine_learning_with_python/machine_learning_with_python_knn_algorithm_finding_nearest_neighbors.htm


text:
Components may also expose an `init` function which returns an
initial state.

To demonstrate multiple components, we'll build an application with two
counters using the counter component we built in the previous section,
[A basic counter](/components.html#a-basic-counter).

We'll start as we did before by defining a type for application state. In this
case, we have two counts to keep track of:

```purescript
type State =
  { topCount :: Counter.State
  , bottomCount :: Counter.State }
```

Next we'll describe our set of actions:

```purescript
data Action
  = Top (Counter.Action)
  | Bottom (Counter.Action)
  | Reset
```

We don't need to know anything about the action types for child components or
their particular constructors, we just need to route them to the appropriate
update function:

```purescript
update :: Action -> State -> State
update (Top action) state =
  state { topCount = Counter.update action state.topCount }

update (Bottom action) state =
  state { bottomCount = Counter.update action state.bottomCount }

update Reset state = state { topCount = 0, bottomCount = 0 }
```

As you can see, the internals of components are completely opaque to their
parents, while at the same time allowing parent components to respond to
child actions.

Finally, we create a view function that combines both counters along with a
reset button. `map` is used to forward child `Html` actions to their parent
action by mapping over `Html` that sends actions of type `a` to return `Html`
that sends actions of type `b`: `(a -> b) -> Html a -> Html b`.

```purescript
view :: State -> Html Action
view state =
  div
    []
    [ map Top $ Counter.view state.topCount
    , map Bottom $ Counter.view state.bottomCount
    , button [ onClick (const Reset) ] [ text "Reset" ]
    ]
```

That's it! Composing components in this manner is straightfoward, modular, and
infinitely nestable. Each layer of components only needs to know about its
immediate children one layer below, and child components don't need to know
anything about their parents.

Despite the simplicity of this approach, one drawback is that parent
components must delegate communication between child components. A child has
no way of directly handling actions of another child without going through its
parent. In practice, this may add a small amount of "glue" code, *but it's a
small price to pay for straightfoward and modular components.*

repository: silky/purescript-pux

repo_name: silky/purescript-pux


text:
---
layout: post
title: Four Lessons That Allowed Me To Land Any Job
date: 2014-05-27 09:35
author: Kevin Olega
comments: true
categories: [Lessons, Practical Strategies]
---
A change of attitude is all you need to get your dream job.

I don’t mean just a call center job.

I mean any job that you want.

> For things to change, I need to change. - Jim Rohn

Getting the skills needed to achieve your goals becomes more effortless after I changed my attitude.

Your attitude is influenced by what you believe about yourself.

What you believe about yourself is influenced by the words you use.

There is no easy way to change your attitude.

Most of my attitude change is a result of my exposure to other people’s beliefs and attitudes.

I copy what I find helpful from people who I admire and have the exact results that I want for myself.

I study how successful people respond to different situations.

I make an effort to understand why the attitude works.

I also aspire to adopt some helpful beliefs into my daily practice eventually.

## LESSON 1:

My situation does not determine my final outcome.

The final outcome is a result of how well I handle my situation.

Some people are born with gifts and have poor results.

Some people start from nothing and gain the life they want.

How you behave, and the strategies that you follow will determine the end results.

The chef determines the end product.

There's always something that I can do to improve a bad situation.

There's also something I can do to make a good situation worse.

How I play the elements that I'm given is an important factor that determines the outcome.

Your situation or circumstances is not for your to decide.

What you can decide is what you choose to do with the situation that's given to you.

## LESSON 2.

I am a problem solver.

Companies pay me to solve their problems.

I get paid by providing extra hands, eyes, and brains.

The company wouldn't need to hire me for anything if there were no problems.

My usefulness is determined by my ability to solve problems.

I see difficulty as an opportunity that I can take advantage of to help myself and others.

## LESSON 3.

My confidence and skill level determine the size of challenges that I can overcome.

I can be happy.

I can make money.

I can reach higher levels.

Success requires skills.

I will be successful if I work on my skills hard enough.

Top performers are never sad about their jobs.

My confidence influences my skill level.

If I believe I can, I can.

The only way to find out is by trying.

Even if I fail, I can learn to do better.

If I have no faith in myself, I cannot move forward.

I believe I am God’s masterpiece.

I should act like one.

## LESSON 4.

Break down big problems into tiny parts.

Complex problems feel impossible.

Little problems are easy.

Organize complex problems and large challenges into tiny easy-to-do tasks.

There’s no other way.

If I want a job, I need to learn the skills involved.

To learn the skills involved, I start with one of the skills.

To learn a skill, I need to study, imitate, and practice the steps until I can do it right.

After I learn to do it right, I keep practicing until it’s so automatic I can’t do it wrong.

This process works for martial arts.

This process works for cooking.

This process works for learning a language.

This process works for any game I’ve played.

This process works for finding a job.

I know this because, at one point, I was once just like you.

I had no idea what I was doing.

I just knew I had to do it, so I did what I had to do.

I learned from wherever I can.

I practiced on a bus.

I practiced with strangers.

I practiced on the interviewer.

I felt so embarrassed.

I also felt that if I didn’t make something out of myself, I’d stay hopeless by leaving my fate to chance.

As I learned steps, I learned skills.

As I learned skills, my confidence increased naturally.

As my confidence increased, I performed well at anything that I did.

As I performed better, my pay got better.

My life got better.

Everything else got better.

I write about my experience to show you what I did.

I know that you can do the same.,

> If I can’t slay the beast of despair with my massive sword of confidence, I’ll paper cut it to death one positive affirmation at a time. --Sekou Andrews

See this video to know what I mean.<iframe src="//www.youtube.com/embed/ehnl0cd-rcw" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>

repository: kevinolega/callcentertrainingtips

repo_name: kevinolega/callcentertrainingtips


text:
# Twitter bot

This bot automatically add posts to the favourites list

## Setup

- For the first you need to create [twitter app](https://apps.twitter.com/app/new)
- Next you need to fill `config.js` file with your credentials

## How it works

Simply send post request on http://localhost:3000/tweets/favorites/create with the next parameters list

```
{
    q: '#twitter',
    count: '10',
    result_type: 'recent',
    lang: 'en'
}
```

`q` is the search query

`count` the number of tweets

`result_type: recent` returns only recent tweets

`lang: en` returns only English tweets

repository: athlonUA/twitter-bot

repo_name: athlonUA/twitter-bot


text:
# Bysx-CMS
Yii 是一个 高性能 的，适用于开发 WEB 2.0 应用的 PHP 框架。
Yii 自带了 丰富的功能，包括 MVC，DAO/ActiveRecord，I18N/L10N，缓存，身份验证和基于角色的访问控制，脚手架，测试等，可显著缩短开发时间。长期更新、开发、维护等工作，只为Yii2.0而生。

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

1、下载Bysx-CMS源码  [点击此处下载](https://codeload.github.com/baiyishaoxia/Bysx-CMS/zip/master)

2、解压到目录，导入数据库等操作

3、配置web服务器(参见下面)

4、浏览器打开输入刚配置的域名地址访问即可

5、完成

* 配置web服务器(Apache)

```apache
  <VirtualHost *:80>
    ServerName www.BysxCms.com
    DocumentRoot D:/php/Bysx-CMS
    <Directory  "D:/php/Bysx-CMS/">
      Options +Indexes +Includes +FollowSymLinks +MultiViews
      AllowOverride All
      Require local
    </Directory>
  </VirtualHost>
```
* 配置web服务器(Nginx)

```nginx
server {
    server_name  localhost;
    root   /path/php/Bysx-CMS;
    index  index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;
    location ~ /api/(?!index.php).*$ {
       rewrite /api/(.*) /api/index.php?r=$1 last;
    }
    location ~ \.php$ {
        fastcgi_pass   <IP_ADDRESS>:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}
```
# 帮助
1、使用演示站点 演示站点前台 [进入Bysx-CMS](http://webapp.afu666.xyz)

2、联系方式 QQ群: 173335823

3、微信

![image](https://github.com/baiyishaoxia/personal-space/raw/option/screenshots/20180527012147.jpg)

repository: baiyishaoxia/Bysx-CMS

repo_name: baiyishaoxia/Bysx-CMS


text:
# Rubik's Revenge Solution

This is a problem in bookkeeping and proper modelling than anything else. Since you shouldn't expect the algorithm to be computationally expensive, it's wise to choose the simplest, most intuitive class design for the Rubik's cube.

I chose to do this using a class that represents the entire cube, and gave that six member fields representing each face of the cube. A face is just a 3x3 matrix of colors, which can be represented using an `enum` in C++.

There are two relevant operations that need to be performed on the cube.

The first operation is a clockwise rotation of the front face on the cube.  The front face colors are shifted 90 degrees to the right.
2. Each other face besides the front and back ones lose three colors to the face in the clockwise direction and gain three colors from the face in the counter clockwise direction.

and that's it. Note that the back face is totally unchanged -- this would be a good unit test to write if you take the test driven development route.

The second operation is turning the entire cube to the left. If you define a face's color matrix as the way the face looks if you're seeing it straight on, then it's easy to break down what happens in a turning operation:

1. The front, left, right, and back faces just swap with each other. What was originally the right face is now the front face, what was the back face is now the right face, and so on.
2. The top face is rotated clockwise.
3. The bottom face is rotated counter clockwise.

Since this operation doesn't change the **relative** positioning of each face and color, this actually doesn't count as a move.

Everytime you perform these two operations, you tick up a counter for number of moves just once, and check if the cube is solved. Simply continuing until this process is complete gives us the final answer: it takes 1260 moves to return the cube to the solved position! Assuming a generous constant time of 1 second per move, this would have taken us 21 minutes to do! You can see the full implementation [here](https://github.com/whoshuu/weekly-noodler/tree/master/solutions/rubiks-revenge/rubiks-revenge.cpp).

Bonus: A 4x4x4 cube would have taken the same number of moves to complete the algorithm. In fact, such a cube is exactly identical to a 3x3x3 cube as long as the middle is never twisted.

license: Unlicense

repository: whoshuu/weekly-noodler

repo_name: whoshuu/weekly-noodler


text:
# NN2ST
Two-Sample Test with Nearest Neighbors Density Ratio Estimation

NN2ST is a Python code to perform Two-Sample (a.k.a. Homogeneity) test of two data samples
using the method of density ratio estimation with Nearest Neighbors.

## Get Started

The source code is fully contained in the file NN2ST.py.

To run the code, simply type 'python NN2ST.py' from command line.

The default data are synthethic random samples generated from 2-dimensional gaussians.

The code can be easily adapted to input data of any dimension from external files.

## Citation

If you use this package, or parts of it, please cite the original paper http://arxiv.org/abs/1807.06038


text:
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

# Password Manager app.
A simple password manager where archive your passwords.

![Info Tech Blog](/client/public/passman.gif)

#### Stack
- Backend: Nodejs
- Frontend: Reactjs
- Database: Mongodb(cloud)

### Usage
Rename file env.env inside the root directory, to .env, replace MONGO_URI field, with your db connection string, replace JWT(jsonwebtoken) with your secret key(can be a simple string), set the token expire (default one day), set the cookie expire (default one day):

```
MONGO_URI=
JWT_SECRET=your-secret-key
JWT_EXP=1d
JWT_COOKIE_EXP=1
```

Inside the client (react) folder rename env.env to .env, insert your secret registration key (can be a simple string):
```
REACT_APP_SIGNUP_SECRET=your-secret-key
```

### `npm run build`
If you edit the client files, redo the build for production,
after `npm run build` place the content of the `build` folder inside the `public` folder in the project root.

The build is minified and the filenames include the hashes.<br />

### `npm i`
Install dependencies.

### Version
`1.3.0`

### License MIT

#### author @lexpaper ❤

repository: alexpaper/password-manager

repo_name: alexpaper/password-manager


text:
# XMinerClient
![](https://img.shields.io/badge/swift-5.0-green.svg)
![](https://img.shields.io/badge/ios-12.0-orange.svg)
![](https://img.shields.io/badge/platform-ios-gray.svg)

Monero miner for iOS

# Some statistics tested on iPhone 6s:

Average speed: 14 H/s (all iPhone avaliable cores)

Average temp increase per 10 minutes: 0.8 degrees Celsius

Stable average tem: 39.2 degress Celsius

# HOW TO:

Simple run it in simulator/iOS device from xCode project.
Everything is seted up.

You might want to change the adress destination of pool/port/wallet and etc...
Here are they in ViewController:

```swift
startMining(address: String, url: String?, port: String?, worker: String?)
```

The implementation is looks like:
```swift
 func startMining(address: String, url: String?, port: String?, worker: String?) {
        if !isMining! {
            if !(url?.isEmpty)! && !(port?.isEmpty)! {
                miner = Miner(host: url!, port: Int(port!)!, destinationAddress: address, clientIdentifier: worker!)
            }else{
                miner = Miner(destinationAddress: address)
            }
            miner?.delegate = self
            do {
                try miner?.start(threadLimit: Int(threadsSlider.value))
                isMining = true
            }catch {
                print(error)
            }
            interraction(false)
        }else{
            isMining = false
            miner?.stop()
            interraction(true)
        }
    }
```
Yes, a lot of variables are dangerously unwrapped, had no time to make some beauty in code. Soryy for that.. :(

# Feel free to contribute any you want to change!

repository: onlinekid/XMinerClient

repo_name: onlinekid/XMinerClient


text:
# Data Science Repository

A collection of high-quality, original data visualizations and analyses.

## Requirements

[Python 3.9.1 or later (64-bit)](https://www.python.org/downloads/)

[Tableau](https://www.tableau.com/)

## Tested Environment

The repository was tested in the following setup:

* Visual Studio Code v1.52.1
* Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523
* Electron: 9.3.5
* Chrome: 83.0.4103.122
* Node.js: 12.14.1
* V8: <IP_ADDRESS>-electron.0
* Operating System: Windows 11 (64-bit)
* Memory: 1981 MB
* Cores: 8

## Contributing

Contributions are welcome through pull requests. For significant changes, please open an issue to discuss the proposed change before submitting a pull request. Please make sure to update the tests accordingly.

## License
This repository is licensed under the [MIT](https://choosealicense.com/licenses/mit/) License.


text:
# Outside-Addon

Outside Addon

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
![Downloads](https://img.shields.io/github/downloads/BedrockMinersTeam/Outside-Addon/total)
[![GitHub Issues](https://img.shields.io/github/issues/BedrockMinersTeam/Outside-Addon.svg)](https://github.com/BedrockMinersTeam/Outside-Addon/issues)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)

---

Outside Addon Is An Addon for Minecraft Bedrock Edition Made By : Bedrock Miners Team

The Addon Is Based On The Create Mod for Minecraft Java Edition And Tries To Implement As Many Features As Possible

## Table of Contents

- [About](#about)
- [Download](#download)
- [Credits](#credits)

##
About

This Is The Website For Outside Addon, If You Want To Download It Visit Here

##
Download

1. Go To This Github Repository And Donwload The **.mcaddon File** From The Latest Release

2. Now Open The **.mcaddon File** And It Will Automatically Open Up Your Minecraft And Import The Addon

3. One It Finishes You Can Apply It In Any World

##
Credits

These Are All The People Who Made It Possible To Make Outside Addon

- Binary Bytes : Special Thanks To Binary Bytes For This Website
- Strong Miner : Addon Creator
- KekeMods : Addon Creator
- derpyboi69 : Addon Creator
- Tubs : Addon Creator
- K1N6mc : Addon Tester
- Nottorrider : Showcase Map Builder
- Sir Chaton : Item Texturer
- TheMidFord : Block Texturer


text:
---
Title: Consistency in User Interfaces
Subtitle: Or, one part of why Git has such a learning curve.
Date: 2016-07-15 10:37
Tags: git, software development
Category: tech
---

People sometimes ask what I mean when I say Git's UI is maddeningly inconsistent. Here's a concrete example: what are the commands to list tags, branches, and stashes?

- `git tag --list`
- `git branch --list`
- `git stash list`

Follow that up by noticing the difference in meaning for the `-v` flag between the commands:

- `git branch -v`: *verbose* mode: list the hash with an abbreviated commit summary
- `git tag -v`: *verify* a tag against its GPG signature
- `git stash list -v`: no-op, completely ignored

This is *disastrously* bad user interface design, and there is literally no reason for it except that the developers of Git, led by Linus Torvalds, don't care about designing for end users. They hack in whatever commands seem to make the most sense right here and right now, and call it good---and then imply or directly state that anyone who has a problem with it is stupid or lazy.

 Imagine if the buttons on you car's media dashboard (a plastic one where the labels stay the same) did different things depending on whether you were in *Drive* or *Reverse*.

Good user interface design is no less applicable to a command-line utility than to a pretty iOS app. Don't let Linus Torvalds or anyone else tell you otherwise.

gha_language: Rust


text:
## Overview

The [McAfee Active Response](https://www.mcafee.com/enterprise/en-us/products/active-response.html)
(MAR) DXL Node-RED client package enables the development of flows in
[Node-RED](https://nodered.org/) which perform MAR searches via the
[Data Exchange Layer](http://www.mcafee.com/us/solutions/data-exchange-layer.aspx)
(DXL) fabric.

## Installation

* {@tutorial installation}

## Configuration

* [Client Configuration](https://opendxl.github.io/node-red-contrib-dxl/jsdoc/tutorial-configuration.html)

## Samples

* {@tutorial samples}

repository: opendxl/node-red-contrib-dxl-mar-client

gha_language: JavaScript

repo_name: opendxl/node-red-contrib-dxl-mar-client


text:
# DuetMonitor
ESP8266 and OLED based monitor for Duet / RepRap based 3D printers

Intended to run on an "all in one board" like https://www.aliexpress.com/item/32819513410.html
If the link goes dead, the board has an ESP8266, a 0.96 Oled based on SSD1306 or SSH1106 controller, a 18650 single cell battery (with charger on board, micro usb)

Should be easy to adapt to other Oled boards.

repository: jaysuk/DuetMonitor

repo_name: jaysuk/DuetMonitor


text:
# Running it
1. Requirements:
    1. docker and docker-compose
    2. nodejs and nodemon
2. From the root of the project, run: docker-compose up -d -> To start the Web Server and the Redis Server.
3. From the root of the project run:
    1. nodemon js/redis-server/redis-server.js -> To start the redis service
4. In your browser, go to: localhost:8008.
5. There you go!
    1. First start listening to the API and running the Redis Server, on the left.
    2. Then connect to Diffusion on the right
    3. You'll see both charts being updated. Check the size of the data received by the charts and realize how much data you can save with Diffusion!

repository: diffusion-playground/redis-integration

repo_name: diffusion-playground/redis-integration