text:
## Load a webmap configuration from a local definition

Use [this fork](https://github.com/jsomerville/Viewer) for enabling the implementer to define a webmap locally, rather than have the template retrieve the webmap definition from ArcGIS.com.

In the version, if the "itemInfo" property is present in the default.js (as discussed below), then that web map will be loaded. If the itemInfo property is not present, then the standard functionality of the template will apply (i.e. the webmap id included in default.js or in the URL query string will be retrieved from ArcGIS.com).

## To define locally
Create an "itemInfo" property in the defaults.js file as shown in [this commit](https://github.com/jsomerville/Viewer/commit/476da3aaade082109c87496233f324d5acbef72f).

* See the help page section
[Create a map using json](https://developers.arcgis.com/javascript/jshelp/intro_webmap.html) for more information on how to construct a webmap JSON object.

* Another option
for creating the webmap JSON object's "itemData" property (which defines the map's layers, popups, etc.) is to create a web map in the ArcGIS.com viewer, and then retrieve and copy the JSON object into the "itemData" sub-property of the default.js file.

  * Steps:

    1. Construct and Save a webmap in ArcGIS.com viewer. Also, share as Public (at least temporarily) if you do not want to worry about a token for the steps below.
    1. Get the webmap's unique id from the URL in the browser: http://`<your org>`.maps.arcgis.com/home/webmap/viewer.html?webmap=`<webmap id>`.
    1. Obtain the JSON object by entering the following in a browser: "http://`<your org>`.maps.arcgis.com/sharing/rest/content/items/`<webmap id>`/data?f=pjson
      1. Note: you can also retrieve the JSON object or URL by opening the dev tools for your browser and finding the Network request that retrieved the webmap's itemData object.
      1. If you did not share the webmap as Public, then this step will reject your request if you do not have a token parameter in the URL's query string.

    1. Enter this JSON object in the default.js file's `itemInfo.itemData` property- as shown in the commit linked above.
    1. The JSON object can be edited as needed in the default.js file, and the webmap can be deleted on ArcGIS Online.

repository: jsomerville/Viewer

repo_name: jsomerville/Viewer


text:
# floop.js

This is an example compiler for FlooP programs that can generate JavaScript or asm.js code.

## Install

You'll need node.js and npm first. Grab the source code from github and install dependencies:

    git clone git://github.com/zaach/floop.js.git
    cd floop.js
    npm install

You also need to download the source code for the modified LLJS to asm.js compiler:

    git clone git://github.com/zaach/LLJS.git

Add the `ljc` executable to your path, or export it in the `LJC_PATH` environmental variable:

    cd LLJS
    export LJC_PATH=`pwd`/bin/ljc

To use the command-line JavaScript shell with asm.js support, grab a jsshell binary from the [Firefox Nightly build directory](http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/). The Nightly Firefox builds also support asm.js.

## CLI
Use the `floopc` CLI to compile your FlooP programs.

    node ./bin/floopc [options] <file>

    Options:
      -b, --backend         Backend to use for code generation [asmjs, js, lljs]  [default: "asmjs"]
      -e, --exported-funcs  The functions to export (comma-delimited)
      -a, --ast             Print only an ast                                     [boolean]
      -p, --parse           Parse only                                            [boolean]
      -m, --module-name     Export the module with this name

## Usage

Generate an asm.js module of your FlooP program:

    cd floop.js
    ./bin/floopc examples/fibo.bloop -e FIBO -m fibo > fibo.js

Include this module in a webpage to run:

    <script src="fibo.js"></script>
    <script>
        // log the 8th fibonacci number
        console.log(fibo.FIBO(8));
    </script>

If you want the script to execute from the command-line, don't specify any functions to export and it will run the `MAIN` function defined in the FLooP module:

    ./bin/floopc examples/fibo.bloop > fibo-shell.js

Then run it from the command-line:

    $ node fibo-shell.js
    17711
    10

You should see any output you have printed from the module, followed by the number of miliseconds it took to execute the program (10 in this case).

If you use a `js` executable with asm.js support, you'll also get feedback on the correctness of the asm.js module after it goes through its checks:

    $ js fibo.js
    warning: Successfully compiled asm.js code
    17711
    1

Wow, just look at how fast that is.

## License

MIT

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# fBPMN Web-application

## Installing and running

You can launch the entire web-application, with two ways:
### 1. With docker-compose (recommended):
- 1.1. Make sure you have the command `docker-compose` and Docker is up and running.
- 1.2. From this directory, launch the command `docker-compose build`
- 1.3. After that you can launch `docker-compose up`. You can access to the web-app frontend in [http://localhost:3000](http://localhost:3000) and its API in [http://localhost:5000/api/doc](http://localhost:5000/api/doc)

### 2. With yarn (not recommended, requires installation of several javascript / python tools and libraries):
Go in the frontend directory for more informations

## Usage

The web application is divided into two parts: frontend and backend. You can find more information about the backend in the pdf document in the doc directory.
The frontend is made **with React, a JavaScript library.**
   ![Home](web-home.png)
- The nav-bar allows you to perform some actions through the application.
In the modeler part you can open, save, create, modify a BPMN model. On the right there is a property panel where you can enter metadata of the model such as its name or documentation.

**Before clicking on Verify, make sure you enter the options you want for verification in the verification Options menu.**

---
   ![VerificationOptions](verification-options.png)
- The first two groups of checkboxes are the properties and semantics that we have made available to you. By hovering your mouse over their names you will get a definition of the object.
You can also define your own definitions in TLA in the first textfield, they will be taken into account only when you write its name in the second textfield. At the bottom you can also set the constraints of the verification.

**Once the verification is launched, go to the verification section.**

---
   ![Verifications](verifications.png)

- The left part lists all the verifications you have made and indicates some information. You can also delete them by clicking on the trash icone
The middle part is an image of the model on which the verification was based.
The right part details the results of the verification by communication and property - you can sort this list by clicking on the column name.

**In each line is indicated a value, indicating if the property has been verified, true if it is the case, otherwise a link to the associated counter-example.**

---
   ![Counter-example](counter-example.png)

Here you can play with the counter example using ←/→/`Shift`←/`Shift`→ on your keyboard.

repository: pascalpoizat/fbpmn

repo_name: pascalpoizat/fbpmn


text:
# scRNAseq_cell_cluster_labeling

Description
================
This repository contains scripts to run and benchmark scRNA-seq cell cluster labeling methods and is a companion to our paper 'Evaluation of methods to assign cell type labels to cell clusters from single-cell RNA-sequencing data' (Diaz-Mejia JJ et al (2019) [Preprint at F1000Research https://doi.org/10.12688/f1000research.18490.1].

Scripts
================

**Main wrapper scripts**
---
| Script name |  Task(s) |
| ----------------------------------------------------------- |  ------------------------------------------------ |
| `subsamples_gene_classes_and_runs_enrichment_scripts.R`       |  Main wrapper to run and benchmark cell cluster labeling methods |

**Scripts to run cell type labeling methods**
---
| Script name |  Task(s) |
| -------------------------------------------------------------- |  ------------------------------------------------ |
| `obtains_CIBERSORT_for_MatrixColumns.pl`                       | Runs CIBERSORT using gene expression signatures and a matrix with average gene expressions per gene, per cell cluster  |
| `obtains_GSEA_for_MatrixColumns.pl`                            | Runs GSEA using gene expression signatures and a matrix with average gene expressions per cell cluster                   |
| `obtains_GSVA_for_MatrixColumns.R`                             | Runs GSVA using gene expression signatures and a matrix with average gene expressions per cell cluster                   |
| `obtains_METANEIGHBOR_for_MatrixColumns.R`                     | Runs MetaNeighborUS using gene expression signatures, a matrix with average gene expressions per cell cluster, and reference cell types. Note: modifications were made to the R library(metaneighbor) source code. Check `bin/r_programs/obtains_METANEIGHBOR_for_MatrixColumns.R` for details |
| `obtains_ORA_for_MatrixColumns.pl`                             | Runs ORA using gene expression signatures and a matrix with average gene expressions per cell cluster |

**Scripts to run ROC and PR curve analyses**
---
| Script name |  Task(s) |
| -------------------------------------------------------------- |  ------------------------------------------------ |
| `obtains_performance_plots_from_cluster_labelings.pl`             | Compiles results from cell type labeling methods and obtains ROC and PR curves plots and AUC's |
| `obtains_ROC_and_PR_curves_from_matrix_with_gold_standards.R`  | Obtains ROC and PR curve plots, ROC AUC and PR AUC values from a matrix of reference labels in column 2 and predictions in columns 3 to N |

**Scripts to subsample cell type gene expression signatures**
---
| Script name |  Task(s) |
| -------------------------------------------------------------- |  ------------------------------------------------ |
| `obtains_permuted_samples_from_gmt.R`                          | Subsamples genes from gene expression signatures in the form of gene sets |
| `propagates_permuted_gmt_files_to_profile.R`                   | Propagates subsampling from signatures in the form of gene sets to those in the form of gene expression profiles |

**Other scripts**
---
| Script name |  Task(s) |
| -------------------------------------------------------------- |  ------------------------------------------------ |
| `obtains_average_gene_expression_per_cluster.R`                | Obtains a matrix with average gene expressions per cell cluster from scRNA-seq data, and cell cluster assignments) |

How to run the scripts
================
* To see the `help` of R scripts run them like:

  `Rscript ~/path_to_script/script.R -h`

* To see the help of Perl scripts, make the files executable with

  `chmod +x script.pl` and run them like:

  `~/path_to_script/script.pl`

Dependencies
================
* Check each script code for dependencies and further documentation.

* To install all R packages use:

  `install.packages(c("optparse", "vioplot", "GSA", "data.table", "precrec", "ROCR", "Seurat", "dplyr", "Rserve", "e1071", "colorRamps", "stats"))`

  to install packages from CRAN.

  And:

  `install.packages("BiocManager")`

  `BiocManager::install(c("preprocessCore", "GSVA", "qvalue"))`

  to install packages from Bioconductor

  Used R version 3.5.1

* To install Perl script dependencies download `perl_modules` directory from this repository

  and add it to your `PERL5LIB` environment variable.

  Other Perl modules required are: `Date::Calc` which can be installed from CPAN

  Used Perl version 5

* The following Java scripts are needed:

  `CIBERSORT.jar` can be obtained from https://cibersort.stanford.edu/download.php

  `gsea-3.0.jar`  can be obtained from http://software.broadinstitute.org/gsea/downloads.jsp

  Used Java version 1.8.0_162

Input Datasets
================
* Three scRNA-seq datasets that can be used as inputs for these scrips, from liver cells (MacParland et al, 2018), peripheral blood mononuclear cells (PBMCs) (Zheng et al, 2017) and retinal neurons (Shekhar et al, 2016), were processed, curated and deposited into Zendo:
https://doi.org/10.5281/zenodo.2575050

Archived code at time of publication
================
Version 1.0 http://doi.org/10.5281/zenodo.2583161

Version 2.0 http://doi.org/10.5281/zenodo.3350461

Issues and feature requests
================
Please click here to report an 'New Issue' (i.e. report bugs or request features).
https://github.com/jdime/scRNAseq_cell_cluster_labeling/issues

Authors
================
Javier Diaz (https://github.com/jdime)

gha_license_id: MIT


text:
---
layout: post
blog-category: blog
title: Corona - 7
subtitle: The End
author: Aryaman Maithani
image: /img/covid-19.png
date: 2020-08-07 04:04:00 +05:30
tags: corona
---

4:04 AM

AAAAAAAAAAAAAAAAAAAAA, so I guess I just gave up on the blog.
Pretty much just putting this post to "officially" bring an end to this "Corona - n" posting.

Also, taking a moment to look back at this excerpt from Corona - 1:

> Also quite worried about how the rest of the semester is planned. Will the semester get extended? Who knows. Heck, it isn't even guaranteed that the college _will_ resume after 29th March. Sigh. This could go on for much longer. :(

_That aged well._

As for an update, we have our semester starting in three days. My sleep schedule isn't the best, as one may have observed.

Also, not very happy about the online semester. The library (and napping there) shall be missed. As shall the hangouts. I wonder how TA-ship would be like this semester.

## Future of the blog
I am not sure, there might be some random blogs, maybe not particularly focusing about my life but rather my thoughts.
To be honest, I don't usually have the energy to collect my thoughts and put it nicely enough. I had been planning on putting up a post on 28th June, marking one year of this website where I'd look back on the year. Sadly, no such thing happened which is a shame because this year had been better than expected in some ways.
_You,_ specifically, might have even contributed to it in some way.

# To the anonymous ones
To the two (2) of you who asked me to continue, thank you for your messages. I didn't really expect an audience to read this, these were _supposed to be into the void_. However, I am happy to know that you liked reading these.
No promises about any more, though.

To those who have no idea what I'm talking about, it's in reference to [this form]({{ site.anon-form }}){:target="_blank"}. (Which I read quickly but respond to slowly.) It's nice to receive messages here randomly. If you have something to say, do consider sending it.

Until next time, ciao for now.

gha_language: TeX

gha_license_id: NOASSERTION


text:
<!--- Note these guidelines are commented and will not show up in the actual pull, these are only here to help you -->

<!--- Feature branches pull requests
The title should be something along the lines of **Adding feature (feature) - v0.* **, or, if the feature is completely a bugfix, specify the bug issue number! **Fixing bug #0**
List and describe the feature(s) to be added, also the bugfixes and their issue number (#0).
Specify the release version they are meant to be added to, add a tag too.
-->

<!--- Release branches pull requests
The title should be **Release v0.* **
List and describe in the description all the features in the release.
List and describe any bugfixes that may be relevant to the release.
-->

<!--- Hotfix branches pull requests
The title should be **Hotfix v0.*.* **
List the issues solved in this hotfix, as well as their issue number (#0) and why it was important to fix them.
-->

repository: AngryFrogDev/Dungeon-Brawler

branch_name: refs/heads/develop

gha_language: C

repo_name: AngryFrogDev/Dungeon-Brawler


text:
# Changelog

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

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

## [Unreleased]

## [0.4.0] - 2018-12-28

### Added

* Create and destroy entities at runtime. Thanks to [mh84]! ([#40])
* `sync_components`, `read_components`, `sync_resources`, and `read_resources`
  macros have been added for registering many components/resources at once. ([#43])
* `sync_default_types` now registers `FlyControlTag`, `HideCursor`, `WindowFocus`, `UiText`, `UiButton`, `UiTransform`, `CameraOrtho`, `DestroyAtTime`, `DestroyInTime`, `MouseReactive`, and `Named`. ([#47])

### Removed

* The `type_set` macro and the related `SyncEditorBundle` methods have been
  removed. ([#43])
* `EditorSyncBundle::get_connection` has been made private. ([#43])

### Fixed

* Read-only components no longer require `Deserialize`. ([#38])

### Breaking Changes

### Upgraded to Amethyst 0.10 ([#46])

Updated to depend on version 0.10 of amethyst. If your project uses a previous
version of Amethyst, you'll need to upgrade to amethyst 0.10 in order to use
the latest version of amethyst-editor-sync.

### Changed API for Registering Components/Resources ([#43])

The `type_set` macro has been removed, `SyncEditorBundle` no longer directly
exposes a builder pattern. `sync_component` and the other registration
methods take the same parameters, but they no longer return `&mut Self` and
there are no variants that take a type set as a paramenter. Instead, we now
provide some helper macros for easily registering many types at once. We
recommend combining these with the [tap] crate to get a builder-like way of
chaining method calls to create the bundle.

For example, this setup logic:

```rust
let components = type_set![Ball, Paddle];
let resources = type_set![ScoreBoard];
let editor_sync_bundle = SyncEditorBundle::new()
    .sync_default_types()
    .sync_components(&components)
    .sync_resources(&resources);
```

Would now be written like this:

```rust
let editor_sync_bundle = SyncEditorBundle::new()
    .tap(SyncEditorBundle::sync_default_types)
    .tap(|bundle| sync_components!(bundle, Ball, Paddle))
    .tap(|bundle| sync_resources!(bundle, ScoreBoard));
```

If you prefer to not use [tap] (or method chaining in general), you may also
make your `SyncEditorBundle` mutable and modify it directly:

```rust
let mut bundle = SyncEditorBundle::new();
bundle.sync_default_types();
sync_components!(bundle, Ball, Paddle);
sync_resources!(bundle, ScoreBoard);
```

### Setting Up Log Output ([#43])

`EditorSyncBundle::get_connection` has been made private. Instead of calling
`get_connection` and passing the output to `EditorLogger::new`, you can pass
a reference to the bundle directly:

```rust
EditorLogger::new(&editor_sync_bundle).start();
```

[#38]: https://github.com/amethyst/amethyst-editor-sync/issues/38
[#40]: https://github.com/amethyst/amethyst-editor-sync/pull/40
[#43]: https://github.com/amethyst/amethyst-editor-sync/pull/43
[#46]: https://github.com/amethyst/amethyst-editor-sync/pull/46
[#47]: https://github.com/amethyst/amethyst-editor-sync/pull/47
[tap]: https://crates.io/crates/tap
[mh84]: https://github.com/mh84

## [0.3.0] - 2018-10-26

### Added

* `sync_components` and `sync_resources` methods in `SyncEditorBundle` to synchronize all types
  in a `TypeSet`. `TypeSets` can be created through the `type_set!` macro to reduce the verbosity
  of synchronizing many types. Thanks to [mvesterli] for putting this together! ([#19])
* `sync_default_types` method in `SyncEditorBundle` to easily synchronize some commonly used
  engine types. ([#20])
* :tada: Support for editing `Resource` values! :tada: ([#25])
* `read_resource` and `read_resources` methods in `SyncEditorBundle` to register resources that
  don't implement `DeserializeOwned`. ([#33])
* `read_component` and `read_components` methods in `SyncEditorBundle` to register components that
  don't implement `DeserializeOwned` ([#37])

### Breaking Changes

* `SyncEditorBundle` type format. If the type is explicitly given, it will need to be updated. ([#21])
* Resources registered via `SyncEditorBundle::sync_resource` must now be `DeserializeOwned` (as
  well as `Serialize`). This enables support for applying changes made in the editor. If you have
  a `Resource` that only implements `Serialize`, register it with `SyncEditorBundle::read_resource`
  instead. ([#25])
* Components registered via `SyncEditorBundle::sync_component` must now be `DeserializeOwned` (as
  well as `Serialize`). ([#37])
* `SyncResourceSystem` has been removed. If your code was directly registering the sync systems
  with your dispatcher, please update to using `SyncEditorBundle` instead. ([#25])

[#19]: https://github.com/amethyst/amethyst-editor-sync/issues/19
[#20]: https://github.com/amethyst/amethyst-editor-sync/issues/20
[#21]: https://github.com/amethyst/amethyst-editor-sync/pull/21
[#25]: https://github.com/amethyst/amethyst-editor-sync/pull/25
[#33]: https://github.com/amethyst/amethyst-editor-sync/pull/33
[#37]: https://github.com/amethyst/amethyst-editor-sync/pull/37
[mvesterli]: https://github.com/mvesterli

## [0.2.0] - 2018-10-14

### Fixed

* Panic if resource is missing. ([#14])
* Panic on Linux if no editor is running. ([#15])
* Panic if sync messages are too large. ([#17])

### Added

* `SyncEditorBundle::with_interval` to configure how frequently the full state is sent. ([#23])

### Breaking Changes

The state messages sent may now omit some or all of the data fields. Editors should be updated to
handle this case by not attempting to update their corresponding local data.

[#14]: https://github.com/amethyst/amethyst-editor-sync/pull/14
[#15]: https://github.com/amethyst/amethyst-editor-sync/issues/15
[#17]: https://github.com/amethyst/amethyst-editor-sync/pull/17
[#23]: https://github.com/amethyst/amethyst-editor-sync/pull/23

## [0.1.0] - 2018-10-04

### Added

* `SyncEditorBundle` with methods `sync_component` and `sync_resource` for setting up editor syncing. ([#8])
* `SerializableEntity` as a temporary solution for allowing components that contain `Entity` values to be serialized.
* Send log output with `EditorLogger`. ([#11])

[#8]: https://github.com/amethyst/amethyst-editor-sync/pull/8
[#11]: https://github.com/amethyst/amethyst-editor-sync/pull/11

[Unreleased]: https://github.com/amethyst/amethyst-editor-sync/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/amethyst/amethyst-editor-sync/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/amethyst/amethyst-editor-sync/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/amethyst/amethyst-editor-sync/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/amethyst/amethyst-editor-sync/compare/a1a7101...v0.1.0

repository: amethyst/editor-core

gha_language: Rust

repo_name: amethyst/editor-core


text:
# City Buildings

## Installation

Requires Node.js v12+ to run.

> First, fork or clone this project:
>
> `git clone https://github.com/lukaasc/city-buildings.git`

**Install the dependencies and start the server in development.**

```sh
cd city-buildings
npm install
npm run start
```

**building the code for production...**

```sh
cd city-buildings
npm install
npm run build
```

## License

MIT

repository: lukaasc/city-buildings

repo_name: lukaasc/city-buildings


text:
## Go-Funcs

Some utility shell script functions useful in the go development environment

## Installation

To use shell functions, download and exec the shell script.

```sh
$ go get github.com/sikang99/go-funcs
$ cd $GOPATH/src/github.com/sikang99/go-funcs
$ source ./go-funcs.sh # or include . <path>/go-funcs.sh in ~/.bashrc
```

### Usage

To see help message of usage after installation,

```sh
$ usage
usage: goto [.|..|root|path|stoney|wasm|webcam|http]
usage: goget [<option>] <package path>
usage: gopath <package name>
usage: gogl <search text>
usage: gover <go version>
```

To change a specific directory, use `goto`.

```sh
$ goto
usage: goto [.|..|root|path|stoney|wasm|webcam|http]

$ goto . # save the current directory
$ goto .. # return to the saved directory
```

To download go sources from open repos, use `goget` regardless of includng http scheme or .git tail.

```sh
$ goget
usage: goget [<option>] <package path>

$ goget https://github.com/sikang99/go-funcs.git
$ goget https;//github.com/sikang99/go-funcs -u
$ goget github.com/sikang99/go-funcs/... -u -v
$ goget -u github.com/sikang99/go-funcs/... -v
$ pwd
GOPATH/src/github.com/sikang99/go-funcs
```

To change to the directory that you check the go sources downloaded, use `gopath` as following.
`/vendor` and `/_` directories are excluded in search

```sh
$ gopath
usage: gopath <package name>

$ gopath go-funcs
GOPATH/src/github.com/sikang99/go-funcs

$ gopath github.com
GOPATH/src/github.com
```

To use `gogl`, install the package [sikang99/hub-search](https://github.com/sikang99/go-funcs).

```sh
$ goget https://github.com/sikang99/go-funcs
$ gogl
usage: gogl <search text>

$ gogl wasm
  sbinet/wasm
  tools to interact with WASM files
  2018-07-19T14:09:41Z  Go  162  65.25
  https://github.com/sbinet/wasm

  go-interpreter/wagon
  wagon, a WebAssembly-based Go interpreter, for Go.
  2018-08-04T08:55:25Z  Go  363  59.09
  https://github.com/go-interpreter/wagon

  ontio/ontology-wasm
  Ontology wasm is a VM for ontology block chain, it can also be used for other stand-alone environment not only for block chains.
  2018-07-30T08:13:26Z  Go  438  55.99
  https://github.com/ontio/ontology-wasm
...

$ gogl "github search"
...
```

To select a specific go version installed in your environment,
use `gover` with version number such as 1,9, 1.10, 1.11
Currently my case with two go versions is as following.
If your want to support more versions, plz edit the script.

```sh
$ tree -L 1 $GOROOT/..
$HOME/root/go/..
├── bak
├── go -> go1.11beta2
├── go1.9.7
├── go1.10.3
└── go1.11beta3
```

Let's try to use `gover`.

```sh
$ gover
usage: gover <go version>

$ gover 1.10 # or 1.9, 1.10.3, go1.10.3
go version go1.10.3 linux/amd64

$ gover 1.11
go version go1.11beta3 linux/amd64
```

### Reference

- [Advanced Bash-Scripting Guide](https://www.tldp.org/LDP/abs/html/index.html)

### LICENSE

MIT

repository: itmoss/go-funcs

repo_name: itmoss/go-funcs


text:
# Responses

Bocadillo passes the request and the response object to each view, much like
Falcon does.
To send a response, the idiomatic process is to mutate the `res` object directly.

## Sending content

Bocadillo has built-in support for common types of responses:

```python
res.text = 'My awesome post'  # text/plain
res.html = '<h1>My awesome post</h1>'  # text/html
res.media = {'title': 'My awesome post'}  # application/json
```

Setting a response type attribute automatically sets the
appropriate `Content-Type`, as depicted above.

::: tip
The `res.media` attribute serializes values based on the `media_type` configured on the API, which is `application/json` by default. Refer to [Media] for more information.
:::

If you need to send another content type, use `.content` and set
the `Content-Type` header yourself:

```python
res.content = 'h1 { color; gold; }'
res.headers['Content-Type'] = 'text/css'
```

## Status codes

You can set the numeric status code on the response using `res.status_code`:

```python{8}
from bocadillo import API

api = API()

@api.route("/jobs")
class Jobs:
    async def post(self, req, res):
        res.status_code = 201
```

::: tip
Bocadillo does not provide an enum of HTTP status codes. If you prefer to
use one, you'd be safe enough going for `HTTPStatus`, located in the standard
library's `http` module.

```python
from http import HTTPStatus
res.status_code = HTTPStatus.CREATED.value
```
:::

## Headers

You can access and modify a response's headers using `res.headers`, which is
a standard Python dictionary object:

```python
res.headers['Cache-Control'] = 'no-cache'
```

## Streaming

Similar to [request streaming](./requests.md#streaming), response content can be streamed to prevent loading a full (potentially large) response body in memory. An example use case may be sending results of a massive database query.

A stream response can be defined by decorating a no-argument [asynchronous generator function][async generators] with<EMAIL_ADDRESS>The generator returned by that function will be used to compose the full response. It should only yield **strings or bytes** (i.e. [media][Media] streaming is not supported).

```python{7,8,9,10}
from bocadillo import API

api = API()

@api.route("/range/{n}")
async def number_range(req, res, n):
    @res.stream
    async def large_response():
        for num in range(n):
            yield str(num)
```

::: warning
A stream response is not chunk-encoded by default, which means that clients will still receive the response in one piece. To send the response in chunks, follow the instructions described in [Chunked responses](#chunked-responses).
:::

::: tip
All attributes of the `Response` object — including [res.background](./background-tasks.md) but excluding [content attributes](#sending-content) — can be used along with a stream response.
:::

## Chunked responses

The HTTP/1.1 [Transfer-Encoding] header allows to send an HTTP response in chunks.

This is useful to send large responses, or when the response's total size cannot be known until processing is finished. Plus, it allows the client to process the results as soon as possible.

This is typically combined with [response streaming](#streaming).

```python
res.chunked = True
# equivalent to:
res.headers["transfer-encoding"] = "chunked"
```

[Transfer-Encoding]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding

[async generators]: https://www.python.org/dev/peps/pep-0525/#asynchronous-generators
[Media]: media.md

repository: schnitzelbub/bocadillo

repo_name: schnitzelbub/bocadillo


text:
Script Extension for HTML Webpack Plugin
========================================
[![npm version](https://badge.fury.io/js/script-ext-html-webpack-plugin.svg)](http://badge.fury.io/js/script-ext-html-webpack-plugin) [![Dependency Status](https://david-dm.org/numical/script-ext-html-webpack-plugin.svg)](https://david-dm.org/numical/script-ext-html-webpack-plugin) [![Build status](https://travis-ci.org/numical/script-ext-html-webpack-plugin.svg)](https://travis-ci.org/numical/script-ext-html-webpack-plugin) [![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?style=flat-square)](https://github.com/Flet/semistandard)

[![NPM](https://nodei.co/npm/script-ext-html-webpack-plugin.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/script-ext-html-webpack-plugin/)

Enhances [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin)
functionality with different deployment options for your scripts including:
- [`async`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#Attributes) attribute;
- [`defer`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#Attributes) attribute;
- [`type="module"`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#Attributes) attribute;
- inlining

This is an extension plugin for the [webpack](http://webpack.github.io) plugin [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) - a plugin that simplifies the creation of HTML files to serve your webpack bundles.

The raw [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) incorporates all
webpack-generated javascipt as synchronous`<script>` elements in the generated html.  This plugin allows you to add attributes to these elements or even to inline the code in the element.

Installation
------------
You must be running webpack on node 4+.

Install the plugin with npm:
```shell
$ npm install --save-dev script-ext-html-webpack-plugin
```

Note: you may see the following warning:
```shell```
npm WARN<EMAIL_ADDRESS>requires a peer of webpack ...  but none was installed.
```
This is fine - for testing, we dynamically download multiple version of webpack (via the [dynavers](https://github.com/numical/dynavers) module).

Basic Usage
-----------
Add the plugin to your webpack config as follows:

```javascript
plugins: [
  new HtmlWebpackPlugin(),
  new ScriptExtHtmlWebpackPlugin()
]
```
The above configuration will actually do nothing due to the configuration defaults. Some more useful scenarios:

All scripts set to `async`:
```javascript
plugins: [
  new HtmlWebpackPlugin(),
  new ScriptExtHtmlWebpackPlugin({
    defaultAttribute: 'async'
  })
]
```

All scripts set to `async` except 'first.js' which is sync:
```javascript
plugins: [
  new HtmlWebpackPlugin(),
  new ScriptExtHtmlWebpackPlugin({
    sync: ['first.js'],
    defaultAttribute: 'async'
  })
]
```

Configuration offers much more complex options:

Configuration
-------------
You must pass a hash of configuration options to the plugin to cause the addition of attributes:
- `inline`: array of `String`'s and/or `RegExp`'s defining scripts that should be inlined in the html (default: `[]`);
- `sync`: array of `String`'s and/or `RegExp`'s defining script names that should have no attribute (default: `[]`);
- `async`: array of `String`'s and/or `RegExp`'s defining script names that should have an `async` attribute (default: `[]`);
- `defer`: array of `String`'s and/or `RegExp`'s defining script names that should have a `defer` attribute (default: `[]`);
- `defaultAttribute`: `'sync' | 'async' | 'defer'` The default attribute to set - `'sync'` actually results in no attribute (default: `'sync'`);
- `module`: array of `String`'s and/or `RegExp`'s defining script names that should have a
`type="module"` attribute (default: `[]`).

In the arrays a `String` value matches if it is a substring of the script name.

In more complicated use cases it may prove difficult to ensure that the pattern matching for different attributes are mutually exclusive.  To prevent confusion, the plugin operates a simple precedence model:

1. if a script name matches a `RegEx` or `String` from the `inline` option, it will be inlined;

2. if a script name matches a `Regex` or `String` from the `sync` option, it will have no attribute, *unless* it matched condition 1;

3. if a script name matches a `Regex` or `String` from the `async` option, it will have the `async` attribute, *unless* it matched conditions 1 or 2;

4. if a script name matches a `Regex` or `String` from the `defer` option, it will have the `defer` attribute, *unless* it matched conditions 1, 2 or 3;

5. if a script name does not match any of the previous conditions, it will have the `defaultAttribute' attribute.

The `module` attribute is independent of conditions 2-5, but will be ignored if the script isinlined.

Some Examples:

All scripts with 'important' in their name are sync and all others set to `defer`:
```javascript
plugins: [
  new HtmlWebpackPlugin(),
  new ScriptExtHtmlWebpackPlugin({
    sync: ['important'],
    defaultAttribute: 'defer'
  })
]
```

Alternatively, using a regular expression:
```javascript
plugins: [
  new HtmlWebpackPlugin(),
  new ScriptExtHtmlWebpackPlugin({
    sync: [/important/],
    defaultAttribute: 'defer'
  })
]
```

All scripts with 'mod' in their name are async and type 'module', all others are sync (no explicit setting for this as it is the default):
```javascript
plugins: [
  new HtmlWebpackPlugin(),
  new ScriptExtHtmlWebpackPlugin({
    async: ['mod'],
    module: ['mod']
  })
]
```

Script 'startup.js' is inlined whilst all other scripts are async:
```javascript
plugins: [
  new HtmlWebpackPlugin(),
  new ScriptExtHtmlWebpackPlugin({
    inline: ['startup'],
    defaultAttribute: 'async'
  })
]
```

And so on, to craziness:
```javascript
plugins: [
  new HtmlWebpackPlugin(),
  new ScriptExtHtmlWebpackPlugin({
    inline: ['startup'],
    sync: [/imp(1|2){1,3}}/, 'initial'],
    defer: ['slow', /big.*andslow/],
    module: [/^((?!sync).)*/, 'mod']
    defaultAttribute: 'async'
  })
]
```

Any problems with real-world examples, just raise an issue.

Inlining
--------
Several notes and caveats apply:
* This feature is for `<script>`'s only. If you wish to inline css please see the sister plugin
[style-ext-html-webpack-plugin](https://github.com/numical/style-ext-html-webpack-plugin).
* Even the simplest script will be wrapped with webpack boilerplate; ensure you minify your javascript if you want your output html to be legible!
* Due to webpack [issue 367](https://github.com/webpack/webpack-dev-server/issues/367), inlined scripts will fail to run on `webpack-dev-server` if the `--inline` option is used.  To work around this either use [Iframe mode](https://webpack.github.io/docs/webpack-dev-server.html)  or  roll your 'webpack-dev-server' version back to v1.4.0.
* Hot replacement of inlined scripts will only work if caching is [switched off](https://github.com/ampedandwired/html-webpack-plugin#configuration) for html-webpack-plugin:
```javascript
plugins: [
    new HtmlWebpackPlugin({
      cache: false
    }),
    new ScriptExtHtmlWebpackPlugin({
      inline: ['myinlinedscript.js']
    })
]
```
* If webpack processing actually errors, first try adding the configuration option `removeInlinedAssets: false`.  This is a development flag intended to mitigate one risky aspect of the implementation.  Again, feedback on this would be much appreciated.
* An alternative approach, based on jade templates is illustrated in the [HtmlWebpackPlugin inline example](https://github.com/ampedandwired/html-webpack-plugin/tree/master/examples/inline).

Change History
--------------

v1.3.x
* added `type="text/javascript"` by default, in response to [Safari 9.1.1 bug](https://github.com/ampedandwired/html-webpack-plugin/issues/309)
* removed experimental status of inline option

v1.2.x
* added inline option

v1.1.x
* added `type="module"` option

v1.0.x
* initial release

repository: Saulgor/startuppi-web

repo_name: Saulgor/startuppi-web


text:
# bot-whatsapp
How to install the Whatsapp Bot easily using this script, this script can turn photos into strikers

1. Open Terminal / Git / CMD / Dll

2. Type the command below to install the bot script. git clone https://github.com/egirahmadi/bot-whatsapp

3. Enter the script directory by typing the command below.

   cd bot-whatsapp

4. Type the command below and wait a few minutes to install the module.

   npm install

5. When you have installed the module, you can type the command below.

   node index.js

6. If the bot runs successfully, a QR code will appear, all you have to do is scan the QR code on your WhatsApp application (Settings-WhatsApp Web).

7. If the QR code has been scanned, the bot is running, all you have to do is test it in your WhatsApp application on your cellphone by sending an image to the bot number with the caption #sticker (Example of the image below)

repository: egirahmadi/bot-whatsapp

branch_name: refs/heads/main

gha_language: JavaScript

repo_name: egirahmadi/bot-whatsapp


text:
---
layout: single
title: Playing with app inventor for android
date: 2010-12-21 00:01
categories: Development Tips
---
App inventor for android was just recently released for everyone to play with. I looked in to it hoping I could create a simple EveryDayFiction feed reader app but it doesn't seem to support Get RSS feed just yet.

So I created a simple sensor reading app that reads all the sensors on the phone and displays them raw to the users. (Note the sensors are all zero because its running in emulation)

The App inventor is a pretty simple programing IDE, it would work great for kits as its simple enough for them to understand and it gets stuff to the screen fast.

A few missing features that i was wishing for while building this app.

Html panel designer - I can do a lot with simple HTML much more then i could with their GUI designer.

RSS feeds - I really want to get content from 3rd party websites to build social web apps.

File IO - This might be a bit beyond the scope of this project but I want a away to save the results of this output to a text file for future review. I know they have the SQLiteDB but its not saved as plain text and needs a special application to actually view it.

Interesting idea, but I don't see to many people making killer apps with this software.

Download example

gha_language: SCSS


text:
# Graph API Custom Connector - Power Query SDK

#### Connecting Power BI to Microsoft Graph, a Step-by-Step Guide

***Please, be aware of [Lack of Support for Microsoft Graph in Power Query](https://docs.microsoft.com/en-us/power-query/connecting-to-graph "Lack of Support for Microsoft Graph in Power Query")***

Connecting Power BI to Microsoft Graph is a highly requested feature from the  Power BI community. To achieve this, I've developed a Custom Connector for Power BI using the Power Query SDK.

To exemplify the use of this Custom Connector, in this walkthrough I will show you how to get data from Microsoft Planner, however feel free to tie to any Graph API endpoint.

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

## Step I: Register an application in Azure AD.

In this example, we need to get data from Planner calling the following Graph API endpoint:

`GET /planner/plans/{plan-id}/tasks`

One of the following permissions (Delegated) is required to call this API:

`Group.Read.All, Group.ReadWrite.All`

For more details about this API, please refer to the [documentation](https://docs.microsoft.com/en-us/graph/api/plannerplan-list-tasks?view=graph-rest-1.0&tabs=http "documentation")

With that in mind, lets register our application:

1. Sign in to the [Azure portal](http://portal.azure.com "Azure portal") using either a work or school account or a personal Microsoft account. ()

1. If your account gives you access to more than one tenant, select your account in the top right corner, and set your portal session to the Azure AD tenant that you want.

1. In the left-hand navigation pane, select the Azure Active Directory service, and then select App registrations > New registration.

1. When the Register an application page appears, enter your application's registration information:

	**Name** - Enter a meaningful application name that will be displayed to users of the app.
	**Redirect URL** - Select the Web type, and then enter: `https://oauth.powerbi.com/views/oauthredirect.html` and `https://preview.powerbi.com/views/oauthredirect.html`
1. When finished, select **Register**.

1. In the left-hand navigation pane, select **Certificates & Secrets** and then select **New Client Secret**. Give a meaninful name and a duration. When done, select Add.

	After saving the client secret, the value of the client secret is displayed. Copy this value because you won't be able to retrieve the key later. Store the key value where you can retrieve it. From now, I'll refer to this key as `%ClientSecret%`

1. In the left-hand navigation pane, select **Overview** and then copy the **Application (client) ID** value. Store the client ID value where you can retrieve it. From now, I'll refer to this key as `%ClientID%`.In the left-hand navigation pane, select **API Permission -> +Add Permisson -> Microsoft Graph -> Delegated Permission** and then check `Group.Read.All` permission. When done, select **Add Permission**. After that you need to give the consent, so select **Grant Admin consent for 'your Company name'**

[![GIF 1](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF1.gif?raw=true "GIF 1")](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF1.gif?raw=true "GIF 1")

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

## Step II: Install the Custom Connector

1. Download this Github Repo: https://github.com/JoaoLucindo/DataConnectors and unzip the file.
1. Go to the folder `C:\..\DataConnectors-master\samples\Planner Connector - Gateway Refresh Support\Planner` and paste your %ClientSecret% and %ClientID% in the file `idsecret.json`.

`  {
    "client_id": "%ClientID%",
    "client_secret": "%ClientSecret%
	} `

When done, save the json file.
1. In the same folder, select all files (except for the file Planner.mez) and add to zip. When done, replace the file extension "**.zip**" for "**.mez**". If you are not able to see the file extension, please check out [this article](https://www.thewindowsclub.com/show-file-extensions-in-windows/ "this article")
1.Check to see if your computer already has a **[Documents]\Power BI Desktop\Custom Connectors** folder. If not, create this folder. After that, copy the recent created **.mez** file to the folder **[Documents]\Power BI Desktop\Custom Connectors**.
1.  You will also need to paste this same **.mez** file on the server on which the Enterprise Gateway is installed into the folder `C:\windows\ServiceProfiles\PBIEgwService\Documents\Power BI Desktop\Custom Connectors`. If your server doesn't have this folder, create the folder. [1]
1. You will also need to adjust your security settings as described in the [custom connector setup documentation.](https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-connector-extensibility#data-extension-security "custom connector setup documentation.")

[![GIF2](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF2.gif?raw=true "GIF2")](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF2.gif?raw=true "GIF2")

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

## Step III: Install the Power BI Gateway

1. Follow the steps as decribed in [this doc.](https://docs.microsoft.com/en-us/data-integration/gateway/service-gateway-install "this doc.")
1. Double check [1]:"Step II - 3"

[![GIF 3](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF3.gif?raw=true "GIF 3")](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF3.gif?raw=true "GIF 3")

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

## Step IV: Create the Power BI Report

1. Open your Power BI Desktop.
1. You will need to adjust your security settings as described in the [custom connector setup documentation](https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-connector-extensibility#data-extension-security "custom connector setup documentation").
1. Restart your Power BI Desktop
1.In the Home tab of Power BI Desktop, click on **Get Data**.
1.The Get Data window should appear at this point. Navigate to Online Services, then select **PlannerTasks.Content (Beta)** and hit Connect.
1.In the url field paste: `https://graph.microsoft.com/v1.0/planner/plans/{plan-id}/tasks`. Replace the place holder **{plan-id}** by your plan-id that can be found in the planner url. To find the PlanId, open the corresponding Plan in a browser and the last part of the URL contains the PlanId.
In this example, the final url will be like: `https://graph.microsoft.com/v1.0/planner/plans/AOvnbngXFUWDBanG51XCBGUAFOf7/tasks`
[![IMG1](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/IMG1.png?raw=true "IMG1")](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/IMG1.png?raw=true "IMG1")

1. When done, hit **OK**, signin with your organization account and finaly hit **Connect**
[![GIF421](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF421.gif?raw=true "GIF421")](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF421.gif?raw=true "GIF421")

1. Now you can transform and modify your data the way you want, and finally create your report.
1. When finish, hit **Publish** to publish your report to the Power BI Service. For more details, please refer to [this doc.](https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-upload-desktop-files "this doc.")

[![GIF422](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF422.gif?raw=true "GIF422")](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF422.gif?raw=true "GIF422")
------------

## Step V: Configure Schedule Refresh

1. Go to [https://admin.powerplatform.microsoft.com/ext/DataGateways](https://admin.powerplatform.microsoft.com/ext/DataGateways "https://admin.powerplatform.microsoft.com/ext/DataGateways")
1. Select your Data Gateway, and then click on **More options (...)**
1. Select **Settings**
1. In the bottom right hand corner, check both the box labeled **Allow user's cloud datasources to refresh through this gateway cluster** and **Allow user's custom data connectors to refresh through this gateway cluster.**
[![GIF5](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF5.gif?raw=true "GIF5")](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF5.gif?raw=true "GIF5")
1. Go to [https://app.powerbi.com/groups/me/gateways](https://app.powerbi.com/groups/me/gateways "https://app.powerbi.com/groups/me/gateways")
1. Select your Gateway and then hit **Add data sources to use the gateway**
1. Give a name for your new DataSource, Select **GraphAPIConnector** for Data Source Type, and then paste the same url that we've created in the **Step IV - 6**.
1. Select **Edit Credentials**, Signin and then click **Add**
[![GIF6](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF6.gif?raw=true "GIF6")](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF6.gif?raw=true "GIF6")
1. Go to the report that we just published to Power BI Service
1. In you bottom left-hand corner, In the navigation pane, under Datasets, select More options (...)
1. Make sure you're configuring the dataset with the same name as the report you just published.
1. Select **Schedule Refresh**.
1. Open the **Gateway connection** blade and change the **Use a data gateway** toggle switch to **On**
1. Finaly, maps the data source to the data source that you just added to the gateway and hit **Apply**
1. Now you can turn on the **Schedule Refresh** and configure the refresh frequency as you want and keep your report updated.
[![GIF7](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF7.gif?raw=true "GIF7")](https://github.com/JoaoLucindo/DataConnectors/blob/master/GIFs/GIF7.gif?raw=true "GIF7")
------------

# References

[1] [Use custom data connectors with the on-premises data gateway](https://docs.microsoft.com/en-us/power-bi/connect-data/service-gateway-custom-connectors#considerations-and-limitations "Use custom data connectors with the on-premises data gateway")

[2] [Considerations and limitations](https://docs.microsoft.com/en-us/power-bi/connect-data/service-gateway-custom-connectors#considerations-and-limitations "Considerations and limitations")

[3] [Create custom Power Query connectors](https://docs.microsoft.com/en-us/power-query/startingtodevelopcustomconnectors "Create custom Power Query connectors")

[4] [Getting Started with Data Connectors](https://github.com/Microsoft/DataConnectors "Getting Started with Data Connectors")

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

# Troubleshotting

[Troubleshoot gateways - Power BI](https://docs.microsoft.com/en-us/power-bi/connect-data/service-gateway-onprem-tshoot "Troubleshoot gateways - Power BI")

repository: luizzappa/DataConnectors

repo_name: luizzappa/DataConnectors


text:
# injectron-node

Injects CSS and JS files into closed source electron applications.

Injected JS will be evaluated; for injected CSS, a script will be injected that adds the CSS to the main stylesheet.

This script will launch the target app (with arguments if provided) then attempt injection into every discovered window/webview over a period of several seconds.

## Installation

To install dependencies

    npm install

## Usage

    node index.js --css custom.css --js custom.js path/to/electron/app args...

Multiple css and js files may be specified, just repeat the arguments, e.g.

    node index.js --css custom1.css --css custom2.css path/to/electron/app args...

## Advanced: patching scripts

You can also supply a specification of how to patch javascript files loaded by the app.
Note that this seems only to work for relatively small scripts.

Create a JS patch file with contents:

    ({
        shouldPatch: scriptUrl => /* return true iff script should be patched */,
        patch: scriptSource => /* return patched script contents as a string */
    })

The arguments `scriptUrl` and `scriptSource` are strings.

You can specify multiple patches. They will be tried sequentially for each script: the first patch that returns true from `shouldPatch` will be used to patch a particular script.

Usage:

    node index.js --jsPatch patch.js path/to/electron/app args...

Patches can of course be combined with ordinary CSS and JS injection.

repository: robeady/injectron-node

repo_name: robeady/injectron-node


text:
Atlas Generator
===============

The Atlas Generator is a [Godot][godot] plugin which takes [Texture][texture]
as input and outputs [AtlasTexture][atex]s according to the sizes given by the user.

For example; If the user inputs an image with sizes 128x128 and inputs 64x64 as Width and Height to the plugin
it would generate 4 [.atex][atex] files from each corner of the image.

Screenshot:
![Screenshot][screenshot]

Changelog
---------

- **Version 1.3 Planned features:**
  - A Grid, where you can select which sprites should be exported and which not
    - Select/Deselect all button
    - Selected sprites should be highlighted
  - Remove "Atlas Generator" -button when plugin is disabled.. Somehow
- **Version 1.2 Updates:**
  - Edited 'Width' and 'Height' SpinBoxes
    - Not editable if origin texture not selected
    - Max values from origin texture
  - Error Message now now shown in interface
  - Origin Texture field now also checks for file type
    - Both 'browse' buttons now correctly show supported file types
  - Misc. bug fixes
  - Known bugs:
    - PNG Images don't export for some reason
- **Version 1.1 Updates:**
  - Destination format can be selected

[godot]: http://godotengine.org/
[texture]: http://docs.godotengine.org/en/latest/classes/class_texture.html#class-texture
[atex]: http://docs.godotengine.org/en/latest/classes/class_atlastexture.html
[screenshot]: https://i.imgur.com/sSdKvTb.png

repository: resultant-gamedev/atlas-generator

repo_name: resultant-gamedev/atlas-generator


text:
---
layout: post
title: How to set up your own Network Intrusion Detection System (NIDS) with Snort - Part 3
meta-description: install snort, network ids, part 3 post
---

In the third part of this series on setting up a Network IDS, we are finally installing the brain of this setup - Snort!

[Part 3 - Installing Snort](/pages/snort/setup/3-installing-snort)

[< Previous: Part 1 - Overview](/2015/01/04/snort-setup-part1)

[< Previous: Part 2 - Mirroring Network Traffic](/2015/01/05/snort-setup-part2)


text:
# Binding Liberty TransactionManager to JNDI
The Liberty TransactionManager is not bound into JNDI, but it needs to be for the Geode transaction to commit successfully. See [Troubleshooting](README-Troubleshooting.md) for details on the exception that occurs because of this.

This doc describes how to bind an arbitrary object to JNDI:

<https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_dep_jndi_refentry.html>

Create a jar with an ObjectFactory like:

```
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.spi.ObjectFactory;
import javax.transaction.TransactionManager;
import java.lang.reflect.Method;
import java.util.Hashtable;

public class TransactionManagerObjectFactory implements ObjectFactory {
  @Override
  public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception {
    Class cl = Class.forName("com.ibm.tx.jta.TransactionManagerFactory");
    Method method = cl.getMethod("getTransactionManager", (Class[]) null);
    return (TransactionManager) method.invoke(null, (Object[]) null);
  }
}
```
Then add these elements in the `server.xml` file:

```
<library id="objectFactoryLib">
  <fileset dir="/path/to/lib" includes="objectfactory-0.0.1-SNAPSHOT.jar"/>
</library>

<jndiObjectFactory id="objectFactory" libraryRef="objectFactoryLib" className="example.jta.jndi.TransactionManagerObjectFactory" objectClassName="javax.transaction.TransactionManager"/>

<jndiReferenceEntry id="refEntry" jndiName="javax.transaction.TransactionManager" factoryRef="objectFactory"/>
```
When I ran the test with some added debugging in the JNDIInvoker, I saw:

```
[warn 2020/08/19 21:36:54.814 UTC <Default Executor-thread-6> tid=0x29] XXX JNDIInvoker.mapTransactions invoked
[warn 2020/08/19 21:36:54.823 UTC <Default Executor-thread-6> tid=0x29] XXX JNDIInvoker.doTransactionLookup jndiKey=javax.transaction.TransactionManager
[warn 2020/08/19 21:36:54.852 UTC <Default Executor-thread-6> tid=0x29] XXX JNDIInvoker.doTransactionLookup jndiKey=javax.transaction.TransactionManager; jndiObject=com.ibm.tx.jta.embeddable.impl.EmbeddableTranManagerSet@561526ec
```
Notes:

- no logging I added in the `TransactionManagerObjectFactory` showed up in the console.log
- I tried using one of the `java:` JNDI keys but none of them worked. I think maybe the key cannot be in the java namespace.
- there is an existing JIRA to modify JNDIInvoker to take an input TransactionManager: <https://issues.apache.org/jira/browse/GEODE-2302>

repository: boglesby/jta-websphere-liberty-base

repo_name: boglesby/jta-websphere-liberty-base


text:
# migrationrunner ![CI Status](https://github.com/mhogar/migrationrunner/actions/workflows/CI.yml/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/mhogar/migrationrunner/badge.svg)](https://coveralls.io/github/mhogar/migrationrunner) [![GoDoc](https://godoc.org/github.com/mhogar/migrationrunner?status.svg)](https://pkg.go.dev/github.com/mhogar/migrationrunner)

`migrationrunner` is a golang package for managing and running data migrations.

A "migration" is defined as a series of one-time operations that need to be performed to set up a data solution. For example, in the case of a SQL database, a migration may create tables and insert some initial data.

A "data solution" is defined as the specific data storage being used. This may be a SQL or NoSQL database, cloud solution, some ad-hoc in-memory DB, floppy disk, or whatever floats your boat.

## Usage

The runner is designed to work on an abstract level and is independent of the specific data solution being used. As long as the interfaces are implemented as specified, the migration algorithm ~~should~~ will work correctly.

View the [GoDocs](https://pkg.go.dev/github.com/mhogar/migrationrunner) for specific interface and usage details, but in general three types will be needed to be implemented:
- `Migration`: this represents a single migration and implements the actual logic for running your migration
- `MigrationRepository`: this interface simply fetches a slice of Migrations to be run by the runner
- `MigrationCRUD`: this interface acts as a wrapper for your data solution enabling the runner to act abstractly

Once the interfaces have been implemented to adhere to your needs, the `MigrationRunner` struct can be created. Basic usage example:
```go
func main() {
    crud := MyMigrationCRUD{} //your MigrationCRUD implementation
    repo := MyMigrationRepository{} //your MigrationRepository implementation

    runner := MigrationRunner{
        MigrationCRUD: crud,
        MigrationRepository: repo,
    }

    err := runner.MigrateUp()
    if err != nil {
        log.Fatal(err)
    }
}
```

repository: mhogar/migrationrunner

gha_language: Go

repo_name: mhogar/migrationrunner


text:
# munderDifflin
Utilize HTML, CSS, and JavaScript to create an easy to navigate and visually appealing informational website for a fictional office supply company called Munder Difflin

### Technologies
* HTML allows for the greatest reach for the largest audience
* CSS in order to create a site that is well-organized and conveys information to the user in an engaging way
* JavaScript modification of the DOM in order to create dynamic web content

### Notable Elements
* CTA (Call-to-action) button displays (dummy) form to submit contact information
* Dynamic "Back to Top" button activates when near bottom of the page. Otherwise, directs user to "Scroll down for info"

license: Unlicense

repository: Rich-Wu/munderDifflin

repo_name: Rich-Wu/munderDifflin


text:
# Query Service Low Level Design

## Contents
+ [About](#about)
+ [Classes](#classes)
+ [Resource Relationship](#resource-relationship)
  + [Asset](#asset)
  + [Offer](#offer)

## About
The query service enables the discovery of assets and their offers.

## Classes
+ assets
+ offers

## Resource Relationship

### Asset
An **asset** is searchable once it has been onboarded into a repository and the
index service has updated itself by getting these changes from the repository
service.

### Offer
An **asset** can have many **offers** assigned to it. Each offer will contain
a set of *rules* under which the **asset** can be used.

repository: openpermissions/query-srv

gha_language: Python

repo_name: openpermissions/query-srv


text:
# Overview
This repo is for the detailed examples when using ClusterAPI for OpenStack
# CAPO Project Home Page:
The Cluster API Provider OpenStack repo is here:
https://github.com/kubernetes-sigs/cluster-api-provider-openstack/tree/release-0.1

# Prepare the environment:
* command line tools: kubectl, kind, go, docker
* download the clusterctl source code, and compile the executable binary for clusterctl
* prepare the openstack environment, you need below things:
  ** uuid of network, security group for k8s cluster
  ** image name for k8s nodes creation
  ** the floating ip to ssh the k8s nodes
  ** cacert of OpenStack AuthURL if you are using https.
  ** uuid of project, user name, password, domain name, region name
* the client pc you are running the cli tools should have the remote access to the Nova Master Node(floating ip) you will be creating.

# step-by-step instructions:
## get the required command line tools installed
Docker: https://docs.docker.com/install/linux/docker-ce/ubuntu/
Kind: https://github.com/kubernetes-sigs/kind
Go: download from https://golang.org/dl/
    `tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz`
    `export PATH=$PATH:/usr/local/go/bin`
yq: a lightweight and portable command-line YAML processor, download from  https://github.com/mikefarah/yq/releases

## compile the clusterctl, notes: the command is a bit different for release-0.1
```
git clone https://github.com/kubernetes-sigs/cluster-api-provider-openstack $GOPATH/src/sigs.k8s.io/cluster-api-provider-openstack
cd $GOPATH/src/sigs.k8s.io/cluster-api-provider-openstack/
make clusterctl
```
Or you could compile the entire docker image:
```
export REGISTRY=your_repo_name #your docker hub repo name
export VERSION=your_version #the verion you want to make in repo
export DOCKER_USERNAME=your_docker_hub_user #upload with your name
export DOCKER_PASSWORD=your_docker_hub_password #upload with your credential
make upload-images
```
## prepare the openstack yaml files:
- cloud.yaml
Goto examples under source code `$GOPATH/src/sigs.k8s.io/cluster-api-provider-openstack/cmd/clusterctl/examples/openstack`
Create a file cloud.yaml, which needs the target openstack env info, example content as in yaml folder.
notes: cacert should point to the file of the cert of auth_url.

- generate yaml files for cluster api, it will output to ./out folder by default.
`./generate-yaml.sh ./clouds.yaml openstack ubuntu`

- modify the ./out/cluster.yaml file:
  update cluster.yaml for the desired k8s cluster.
  **please be noted that the pod cidr value MUST be the same as the CNI (calico or flannel) component value in their yaml files.**
  please refer to this file ./examples/openstack/provider-component/user-data/ubuntu/master-user-data.sh,
  this file will be run by cloud-init inside master node during the initialization.

- modify the ./out/yaml files with your openstack environment info:
```
sed -i 's/<Available Floating IP>/your_floating_ip/' examples/openstack/out/*.yaml
#Please be noted there are multiple floating ip need to update.

sed -i 's/<Kubernetes Network ID>/your_neutron_network_id/g' examples/openstack/out/*.yaml
sed -i 's/<Security Group ID>/your_neutron_secgroup_id/g' examples/openstack/out/*.yaml
sed -i 's/<Image Name>/your_image_NAME/g' examples/openstack/out/*.yaml
sed -i 's/<apiServerLoadBalancer or master IP>/your_master_node_floating_ip/g' examples/openstack/out/*.yaml
```
- create a keypair in openstack
  openstack keypair create --public-key ~/.ssh/openstack_tmp.pub cluster-api-provider-openstack

- creat the cluster:
```
    ./clusterctl create cluster --bootstrap-type kind --provider openstack \
    -c examples/openstack/out/cluster.yaml -m examples/openstack/out/machines.yaml \
    -p examples/openstack/out/provider-components.yaml
```
- during the bootstrap process, the cluster CRD/info will be moved from bootstrap into target cluster, and master node will create the rest worker nodes.
after a few minutes, you should be able to see your nova instances be created.
```
    # openstack server list
    +--------------------------------------+------------------------+--------+-------------------------------+--------+-----------+
    | ID                                   | Name                   | Status | Networks                      | Image  | Flavor    |
    +--------------------------------------+------------------------+--------+-------------------------------+--------+-----------+
    | b0a601ef-ee06-4737-9b11-93255942e841 | openstack-node-g7d7l   | ACTIVE | net10=<IP_ADDRESS>, <IP_ADDRESS>  | ubuntu | m1.medium |
    | e59e4174-09f6-473f-a3fd-caa1df277b46 | openstack-master-9kkv9 | ACTIVE | net10=<IP_ADDRESS>, <IP_ADDRESS>  | ubuntu | m1.medium |
    | 80d1d814-9ccf-4c98-9f8a-905c525ea975 | myvm                   | ACTIVE | net10=<IP_ADDRESS>, <IP_ADDRESS> | ubuntu | m1.small  |
    +--------------------------------------+------------------------+--------+-------------------------------+--------+-----------+
```

repository: euclidsun/ClusterAPI-Examples

repo_name: euclidsun/ClusterAPI-Examples


text:
# Airborne (MEAN version)

For **rails** implementation of this project [Avxplr](https://github.com/arrc/avxplr.com)

This was the first implementation of the avxplr app which was built on MEAN stack.

This **project is now dead** as I no longer want to continue building this app on nodejs.

![airborne](/public/images/airborne.png?raw=true "Aircraft editor")

repository: arrc/airborne

repo_name: arrc/airborne


text:
# Submit a pull request
Thank you for submitting a pull request. To speed up the review process, please
ensure that everything below is true:

1. This is not a duplicate of an [existing pull request][1].
2. No existing features have been broken without good reason.
3.  The code style [guidelines][2] have been followed.
5. Documentation has been updated to reflect your changes.
6. Tests have been added or updated to reflect your changes.
7. All tests pass.

Any questions should be directed to @jfjlaros.

---

Replace any ":question:" below with information about your pull request.

## Pull Request Details
Provide details about your pull request and what it adds, fixes, or changes.

:question:

## Breaking Changes
Describe what features are broken by this pull request and why, if any.

:question:

## Issues Fixed
Enter the issue numbers resolved by this pull request below, if any.

1. :question:

## Other Relevant Information
Provide any other important details below.

:question:

[1]: https://github.com/jfjlaros/simpleRPC/pulls
[2]: https://github.com/jfjlaros/simpleRPC/blob/master/docs/CONTRIBUTING.md#code-style

repository: jfjlaros/simpleRPC

repo_name: jfjlaros/simpleRPC


text:
---
layout: page
title: Plugin Views
permalink: /Plug-In Views/
---

<script src="/js/audio.js"></script>

<audio controls id="audioFloTools2.0PlugInViews" onPlaying="playing(this)" onPause="pauseing(this)" onEnded="ending(this)">
<source src="/media/Flo Tools Plug-In Views.m4a" type="audio/mp4">
Your browser does not support html5 audio.
</audio>

Flo Tools provides an alternative means of browsing parameters in the Plug-In window. The script relies on user-generated text files to provide Flo Tools with a template for navigating parameters along with the option to move the mouse pointer to specific coordinates within the Plug-In window.

When a plug-in is instantiated, if Flo Tools detects a matching plug-in view file, it will load the default view for the plug-in.

With the view loaded, pressing Control plus the arrow keys allows the user to navigate to the available parameters according to the formatting of the template file. If a parameter is mapped to specific coordinates, the mouse pointer will automatically move to those coordinates. Issuing a mouse click at that location will activate the item.

For example, for a control that includes an edit field, clicking the edit field makes it possible to simply enter a value rather than incrementing the parameter using VoiceOver. For toggle controls such as bypass or invert polarity, issuing a mouse click will change the state of the control. If the Flo Tools Plug-In Monitor is enabled, Flo Tools will automatically speak the changes as they are made.

## Getting Started with Plug-In Views:

Flo Tools provides a few plug-in views for the Dyn 3 compressor and the EQ 3  7-band EQ.

These plug-in view files  are located in ~/Library/Application Support/Flo Tools/Plug-In Views. To see how this feature works, do the following:

1. Instantiate the EQ 3 7-band EQ on a track. Notice that Flo Tools says, "Default View for EQ 3 7-Band."
2. Press Control+right arrow. Flo Tools says, "Input Level, 0.0 dB." Press Control+right arrow again and Flo Tools says, "Output Level, 0.0 db." Notice that pressing Control+right arrow again only repeats the previous message and there is nothing further to the right of "Output Level".
3. Now press Control+down arrow and Flo Tools says, "High Pass Freq, 20.0 Hz." Press Control+left arrow and Flo Tools says, "High-Pass Q, 1.0." Using Control plus the arrow keys, navigate around the plug-in parameters and notice that they are organized into columns and rows.
4. Navigate down to the Mid-Band Freq. Flo Tools says, "Mid-Band Freq, 1000.0 Hz."
5. With the Plug-In Monitor engaged (Option+/), press Control+Option+Shift+Space Bar to issue a mouse click.
6. Type, '3.5K" and press Return. Flo Tools says, "3.50 kHz, Mid-Band Freq."

Using the above steps, one can edit parameters directly by typing their values instead of using VoiceOver to increment or decrement. However, you can also increase or decrease a parameter’s value by pressing up or down arrows after you’ve clicked on the parameter’s text field.

## Creating Custom Views:

To create a custom plug-in view, do the following:

1. Instantiate a plug-in for which you’d like to create a custom view and make sure the Plug-In window is open.
2. Press Control+Option+Shift+m twice and  navigate to the Keyboard Maestro Engine menu extra.
3. Select "Display Template" from the Keyboard Maestro Engine menu. Flo Tools opens a dialog box with a text area populated with the name of the plug-in along with any visible parameters.
4. Press Command+a to select the text and copy it to the clipboard by pressing Command+c.
5. Open a new text document and paste the contents of the clipboard into the text file. The first line of the document will contain the exact name of the plug-in followed by the names of the parameters with coordinates formatted with braces, brackets and commas according to the JSON standard.
6. Select the first line of text in the document and press Command+x to cut it to the clipboard. Make sure to select only the text in the first line and not to also select the invisible carriage return by pressing Shift+down arrow. This will result in a space being appended to the filename.
7. Save the document and paste the name of the plug-in that was cut from the first line of the text into the name field in the Save dialog. Make sure to save the document as a plain text file. Any other format will not work.
8. Navigate back to Pro Tools. Flo Tools should say, "Default View for (and then the name of the plug-in)."

You’re now ready to add coordinate values into the text file that will instruct Flo Tools where to move the mouse pointer whenever you navigate that plug-in with Control plus the arrow keys.

For the following section you’ll most likely need sighted assistance to help position the mouse pointer over specific elements.

## Copying Screen Coordinates:

To obtain the screen coordinates for an element, do the following:

1. Position the mouse pointer directly over the element for which you’d like to create an entry.
2. Press Command+Option+Shift+c to copy the coordinates. Flo Tools speaks the mouse pointer coordinates in points from the top left corner of the window and copies the coordinates to the clipboard.
3. Navigate to the plug-in view text file and locate the name of the element for which you just copied coordinates. Notice that after each parameter name, there are two zeros separated by a comma.
4. Delete the two zeros along with the comma between them and paste the coordinates that were copied to the clipboard.
5. Save the document and navigate back to Pro Tools. If Flo Tools once again says, "Default view for," etc., you’ve successfully added the coordinates. If Flo Tools doesn’t indicate that the default view has been loaded, that probably means that you’ve inadvertently added an extra space or deleted an extra comma or something similar. Double-check your previous edit to the text file.

You can test each parameter in the Plug-In window as you go along by navigating with Control plus the left or right arrows, issuing a click and typing in a value then pressing Return.

##Plug-In Tabs:

Some plug-ins have multiple parts or tabs in their user interface to organize information. Plug-In views supports this organization system by allowing a user to create coordinates to access these tabs by clicking them.

To create views to accommodate multiple tabs, do the following:

1. If you haven’t already done so, create a default view text file. (Refer to the steps above).
2. Determine how many tabs there are in the plug-in and create that many copies of the document.
3. Edit the names of the text files so that they are exactly the same as the original file and then append each with a hyphen and then a number starting with 1, 2, 3, etc. up to a maximum of 9.
4. Starting with the document ending in -1, replace the word "default" in the first line with the name of the tab.
5. Also in the first line, replace the numbers "-1,-1" with the coordinates of the tab where you want Flo Tools to click in order to access that particular tab.
6. Follow the above steps for documents ending in -2, -3, etc. to create the  files with their view names and click coordinates and save them.

If you’ve created and saved the files properly, pressing Command+1, Command+2, etc. within the plug-in window should load the corresponding plug-in views and Flo Tools should speak the names you’ve assigned to the various views as they’re bing loaded.

Note: when creating views for plug-ins with multiple tabs, it’s a good idea to have the contents of the file ending in -1 to be a duplicate of the default file (the file with no hyphen and number). This is the view that flo Tools will always load by default and it helps to have that view be identical to the first tab to have a consistent starting point so that, every time that plug-in is loaded, the first tab will be active.

When creating and working with multiple views for a plug-in, it’s sometimes necessary to load the default view manually. Press Command+0 to load the default view. This corresponds to the file which has no number appended to it and simply contains the plug-in’s name.

For a more detailed walk-through of Plug-in Views in Flo Tools, please refer to the audio tutorial.

path: /plugin views.md

filename: plugin views.md


text:
I attended a webcast by Robert C. Martin on
[the intersection of agility, objects, and UML](http://webevents.broadcast.com/cmp/wcs/detail.asp?event_id=11483).
He was his usual perky self and a lot of his material was the usual stuff
about OO principles and dependency management.  He threw in some updated
additions, mentioning Model-Driven Architecture (MDA) and aspects.  I was at
work with some coworkers.  They expressed some skepticism about the feasibility
of fully automated acceptance tests and whether or not his approach to
documentation (or lack thereof) is realistic.  For my part, I was pleased with
the talk.  The tone was relaxed and the contents very informative.


text:
# PolyglotUnity

[]

A Unity3d plugin for Polyglot Localization, which is a project that translates games to many languages. This plugin makes it possible to automatically download the polyglot master spreadsheet and a custom game specific spreadsheet and parses it in a unity project.

https://docs.google.com/spreadsheets/d/17f0dQawb-s_Fd7DHgmVvJoEGDMH_yoSd8EYigrb0zmM/

## Unity Version

Works with Unity 4.x, 5.x, 2017.x and 2018.x

Tested with several Unity Versions
* Unity 5.4.4f1
* Unity 5.5.2f1
* Unity 5.6.0f3
* Unity 5.6.1f1
* Unity 2017.1.0b1
* Unity 2017.2.0f3
* Unity 2017.2.0p2
* Unity 2017.3.0b10
* Unity 2018.2.2f1
* Unity 2018.2.5f1
* Unity 2018.2.9f1
* Unity 2018.3
* Unity 2018.4
* Unity 2019.1
* Unity 2019.2
* Unity 2019.3

## Feedback

We would 😍 to hear your opinion about this library. Please file an issue if there's something you would like to see improved.

If you use this library and are happy with it consider sending out a tweet mentioning [@agens](https://twitter.com/agens). This library is made with love by [Skjalg S. Mæhre](https://github.com/Skjalgsm).

(http://agens.no/)

## First, you need to Configurate the Localization.
You do this by selecting the Configurate menu item from within Unity.
This will create the Localization asset for you if it is not set up yet and then select it.

![alt tag](https://raw.githubusercontent.com/agens-no/PolyglotUnity/master/meta/Configurate.png)

## Then you can specify the localization settings for the project.

![alt tag](https://raw.githubusercontent.com/agens-no/PolyglotUnity/master/meta/LocalizationAsset.png)

## Finally you can add Localized Text components to your Text objects

![alt tag](https://raw.githubusercontent.com/agens-no/PolyglotUnity/master/meta/LocalizedText.gif)

## Theres also a Language Dropdown script that automatically populates a Dropdown with the available languages
![alt tag](https://raw.githubusercontent.com/agens-no/PolyglotUnity/master/meta/LanguageDropdown.png)

## Create your own custom spreadsheet
Duplicate the polyglot master sheet and remove all the keys from line 7.
The importer parses everything line after the term "polyglot", "PolyMaster" or "BEGIN".

![alt tag](https://raw.githubusercontent.com/agens-no/PolyglotUnity/master/meta/CopySheet.png)

## Add Sheet and docs id to the Localization Configuration
![alt tag](https://raw.githubusercontent.com/agens-no/PolyglotUnity/master/meta/CustomSheet.png)

## Current Features
- Download latest polyglot master sheet as CSV or TSV
- Download a custom localization sheet as CSV or TSV
    - If you use the same keys as the master sheet your keys will override the master sheet.
- Import the downloaded file and parse it
    - The sheet is parsed every time you play the game so you can iterate fast.
    - Can also be set to downloaded and parsed every time you play the game (optional)
- Managing localizations
	- Specify any number of csv or tsv files to parse
	- Select language
	- Select fallback language if the localization key does not exist in the currently selected language
	- Invokes event when language is changed
- Script for localizing UGUI Text component, TextMesh component and TextMesh Pro UGUI component
	- Auto completes localization key
	- Updates text and alignment of text (hebrew and arabic is left to right).
	- Supports parameters for localized strings such as "No {0} Selected".
- Script for saving selected language
	- Saves to PlayerPrefs
- TextMesh Pro support
    - Make sure `TMP_PRESENT` is specified in Player Settings -> Scripting Define Symbols
    - [Additional info about dependencies](#additional-info-for-textmeshpro-integration)
- Arabic font type support
    - Download ArabicSupport.cs from https://github.com/Konash/arabic-support-unity
    - specify ARABSUPPORT_ENABLED in Player Settings -> Scripting Define Symbols

## Additional info for TextMeshPro integration

To use Polyglot with TextMeshPro from the Unity Package Manager (upm) you will need to add the dependency manually to the assembly definition files.

Versions tested:
* Unity 2018.1.3f1
* TextMeshPro 1.2.3 (from upm)

Open PolyglotScripts.asmdef and PolyglotEditor.asmdef in a text editor and manually add the dependency to Unity.TextMeshPro.

Your files should look like this:

PolyglotScripts.asmdef
```
{
    "name": "Polyglot.Scripts",
    "references": ["Unity.TextMeshPro"],
    "optionalUnityReferences": [],
    "includePlatforms": [],
    "excludePlatforms": [],
    "allowUnsafeCode": false
}
```
PolyglotEditor.asmdef
```
{
    "name": "Polyglot.Editor",
    "references": [
        "Polyglot.Scripts",
        "Unity.TextMeshPro"
    ],
    "includePlatforms": [
        "Editor"
    ],
    "excludePlatforms": []
}
```
This makes the scripts find the dependency of TextMeshPro.

repository: agens-no/PolyglotUnity

gha_language: C#

repo_name: agens-no/PolyglotUnity


text:
# OMDb
Demo app for React Native using the OMBD API. Focused on the Star Trek movies. OMDB API – https://www.omdbapi.com/

[![Build Status](https://travis-ci.org/MarshalPaterson/OMDb.svg?branch=master)](https://travis-ci.org/MarshalPaterson/OMDb) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# Solution Design
![Alt text](solution_design/design.png?raw=true "Design")
## Demo:
![Alt text](solution_design/omdb.mov.gif?raw=true "Demo")

# Running the application - yarn (moved on from npm)
```javascript
git clone https://github.com/MarshalPaterson/OMDb.git
yarn
yarn build
yarn start
yarn ios
yarn android
```

## Visual Studio Code launch settings
```javascript
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug iOS",
            "cwd": "${workspaceFolder}",
            "type": "reactnative",
            "request": "launch",
            "platform": "ios"
        },
        {
            "name": "Debug Android",
            "cwd": "${workspaceFolder}",
            "type": "reactnative",
            "request": "launch",
            "platform": "android"
        },
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "program": "${workspaceFolder}/start"
        }
    ]
}
```
# State Management and Store - Mobx Vs Redux Vs State and Props
Small application handled by State and Props. No Mobx and no Redux.

# Unit Tests
```javascript
yarn test
```
Unit tests have been setup and some have been added, though better covered is needed.

## Notes and TODO:
 * The code as reduced comments, this was a choice to allow (hopefully) code readability.
 * There is also Travis-CI integration.
 * Search on 'Title of Movie'.
 * Fix Unit Test fail.
 * Need to add an app icon.
 * More Unit Tests

# REACT NATIVE IS AWESOME!!!
### SWIFT AND KOTLIN IS ALSO AWESOME!!!

repository: MarshalPaterson/OMDb

gha_language: TypeScript

repo_name: MarshalPaterson/OMDb


text:
# jcu-test
JCU MonoRepo Test for React Components

# Styleguide development with LernaJS, React-Styleguidist & SASS

The following tools have been used to build this styleguide:
1. [LernaJS](https://lernajs.io/): For managing multiple packages in a single repository.
2. [React Styleguidist](https://react-styleguidist.js.org/): For documentation and development environment.
3. [SASS](https://sass-lang.com/): Styling for React UI Components
4. [Webpack](https://webpack.js.org/): For bundling packages as libraries

## Directory Structure
### /packages
This folder contains all the packages that constitute your styleguide.

#### /packages/pkg_name
Each package consists of the following directory structure.
```

pkg_name
  |-- src
    |-- index.js // Source File for the component
    |-- index.scss // SASS Source File
  |-- package.json // This will contain individual package information
  |-- README.md // Styleguidist documentation. [Link](https://react-styleguidist.js.org/docs/documenting.html#usage-examples-and-readme-files)
  |-- dist // This is generated by webpack build. The index.min.js here is the entry point for the package.

```

### /styleguide
This folder consists of the files required for configuring React-Styleguidist.

### /scss
Here you can place SASS modules required for theming and other commonly used styles.

### package.json
This is the primary file for managing dependencies for your project. Here we have our build & development scripts.

### lerna.json
Lerna Configuration Options

### webpack.lib.config.js
Each package is bundled using the webpack configuration in this file. If a "one file fits all" approach does not suit your use case, you can have webpack configs in each

### index.html & build/ (Optional)
These files can be added to the repo, if you wish to utilise Github for hosting your styleguide.

## Getting Started
1. Clone the repository
2. Run `yarn install` (Note: You can use npm too)
3. Next you will need to run `yarn install` inside each package.
4. Run `yarn run styleguide` in the root. This should start react-styleguidist in your local environment.

## Developing packages locally
Run the command `yarn run styleguide`. This will start react-styleguidist server for development on your local machine.

## Publishing the packages to NPM
Run the command `yarn run publish:npm`. The command executes the following steps sequentially,

1. `lerna bootstrap`: Install all package dependencies and link any cross-dependencies
2. `lerna exec --parallel yarn run build`: Build all react UI Components parallely. **Important:** Each package should have build command in their package.json. Check (JcuDateTime/package.json) This step ensures that all the packages have their built files placed in dist folders.
3. `lerna publish --skip-git --registry=https://registry.npmjs.org/`: This will prompt you for version upgrades. It will then publish the packages to NPM based on (package name)and your credentials.

**Note:** Once this step is done. You can commit and publish to github. Of course, you can also use lerna compeletly to manage your git workflow too.

## Building Styleguide for Hosting(On Github or any other hosting option)
Run `yarn run styleguide:build`. This will create an index.html file and a build directory that contains the react-styleguidist JS bundle. This can be commited repository when our server is ready to host styleguide.

repository: jcu/jcu-test

repo_name: jcu/jcu-test


text:
2 record page components in 1 repo !

General notes--there is no error handling at all yet.  If you're violating rules or making non-sense requests, you'll see it in the browser console (hopefully?), but not in the UI.

## PowerRelatedList

Creates a lightning component for displaying related records on a record detail page.

See AppBuilder/Design for the description of the options.

PowerRelatedList2 has been refactored to have a datatable subcomponent.  You pass it an array of records and a few variables, and you get a sortable datatable.

Query/Filtering is implemented at the PowerRelatedList2 level, not on the datatable itself.

## LightningFieldSection

Drag onto a record detail page.  Pick the fields that are editable, the column quantity you want, etc.

There's no save button--any change updates the database

Use the component in AppBuilder for more info

## Subcomponents for your hackery

* LightingDataTable: pass it an array of variables, and you'll get a styled, sortable datatable

* LightningFields: add quick-edit fields to anything with just attributes

repository: nategilliland/PowerRelatedList

repo_name: nategilliland/PowerRelatedList


text:
# gatsby-blog-starter-kit

[![Build Status](https://travis-ci.org/DSchau/gatsby-blog-starter-kit.svg?branch=master)](https://travis-ci.org/DSchau/gatsby-blog-starter-kit) [![Greenkeeper badge](https://badges.greenkeeper.io/DSchau/gatsby-blog-starter-kit.svg)](https://greenkeeper.io/)

Use this starter kit to jump start (or use as a reference) a great blog with [gatsby][gatsby]

![Blog example](https://dustinschau.com/drop/gatsby-blog-starter-kit.png)

## Features

1. Blog post listing with previews for each blog post
1. Navigation between posts with a previous/next post button
1. Tags and tag navigation
1. Responsive images via [gatsby-remark-images][gatsby-remark-images]

## Set up

1. Clone this repo
1. `yarn`
1. `yarn start`

[gatsby]: https://www.gatsbyjs.org/
[gatsby-remark-images]: https://www.gatsbyjs.org/docs/packages/gatsby-remark-images/

repository: nodox/gatsby-blog-starter-kit

gha_language: CSS

repo_name: nodox/gatsby-blog-starter-kit


text:
# Changelog
All notable changes to this project will be documented in this file.

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

## 1.2.0 - 2021-04-03

### Changed
- Compatibility with PHP8 and new kernel.

## 1.1.0 - 2020-10-27

### Changed
- Replaced service compiler with pass through compiler.

## 1.0.1 - 2020-10-09

### Fixed
- Added missing dependency for `ulrack/dbal-pdo`.

## 1.0.0 - 2020-10-09

### Added
- The initial implementation of the package.

# Versions
- [1.2.0 > Unreleased](https://github.com/ulrack/database-extension/compare/1.2.0...HEAD)
- [1.1.0 > 1.2.0](https://github.com/ulrack/database-extension/compare/1.1.0...1.2.0)
- [1.0.1 > 1.1.0](https://github.com/ulrack/database-extension/compare/1.0.1...1.1.0)
- [1.0.0 > 1.0.1](https://github.com/ulrack/database-extension/compare/1.0.0...1.0.1)

repository: ulrack/database-extension

repo_name: ulrack/database-extension


text:
# canevas-editor-ts

A simple MVC web application (simple drawing editor) developed with typescript 1.8.

```bash
npm install #to update the dependencies
gulp watch # to run the compiler in watch mode
#or
gulp webserver # to run a webserver with live reload in watch mode
```

You can then use [atom](atom.io) to edit the project?

## License

MIT

repository: miaomchen/drawwebvallillajs

repo_name: miaomchen/drawwebvallillajs


text:
---
title: Meteoric Announcement
author: Jeremy
tags: [research, science]
imagelink: MeteoricAnnouncement
permalink: /750
date: 2023-05-19
---

![A scientist holds their new paper and says, "I've spent over a year working on this paper, and now it's time to for it to shine in public!" At the same time, a large meteor with the label "Big Science Announcement" barrels towards the scientist.](https://res.cloudinary.com/dh3hm8pb7/image/upload/q_auto:best/v1535842782/Handwaving/Published/{{ page.imagelink }}.png){: .centre-image }

Well, at least you can say you put out some new science on a day that many people actually thought about science.


text:
# Virtual Pinball Stuff

* [One Of A Kind Virtual Pinball Machine Build](https://www.youtube.com/watch?v=0x4MEbPSIqw)
* [Pinscape Build Guide v2](http://mjrnet.org/pinscape/BuildGuideV2/BuildGuide.php)

## Way of the Wrench
* [Virtual Pinball Parts: What do you need?](https://www.youtube.com/watch?v=5Ftgomc1Wqs)
* [How to make a virtual pinball cabinet](https://www.youtube.com/watch?v=JCGUQQAC3vA)
* [Design and draw your virtual pinball cabinet](https://www.youtube.com/watch?v=APAG74I7g0M)

## Major Frenchy
* [Addressable LED (RGB)](https://www.youtube.com/watch?v=dWaGLqg5s50)
  * [Written Guide](https://majorfrenchy.ca/addressable-led/)
* [Gear Motor (Virtual Pinball)](https://www.youtube.com/watch?v=j6o5fRiqQGg)

## OTher
* [$100 Ultra Low Budget Mini Virtual Pinball! (Arnold J. Rimmer)](https://www.youtube.com/watch?v=jVHkaD42C18)

{% include_relative footer.md %}


text:
# Mulitple Aggregations for PivotTable.js

A JavaScript plugin for PivotTable.js. It renders multiple aggregations simultaneously with added configurations for rendering beautiful tables

Multifact-pivottable is a JavaScript plugin for [PivotTable.js](https://pivottable.js.org/examples/). It renders multiple aggregations simultaneously along with dynamic aggregations based on expressions

Multifact-pivottable is available under an MIT license from [NPM](https://www.npmjs.com/package/multifact-pivottable) and [Bower](http://bower.io/) under the name `multifact-pivottable`.

## Where can I see the demo?

You can see the live demo at [examples page](http://pranjalgoswami.in/multifact-pivottable/examples/index.html).

## How can I get started?

Right now I have not spent enough time to document the API, meanwhile, you can follow one of the example pages

## I have a question, how can I get in touch?

Please first check the [issues](https://github.com/pranjal-goswami/multifact-pivottable/issues) that are already raised and if you can't find what you're looking for there, then please [create a GitHub Issue](https://github.com/pranjal-goswami/multifact-pivottable/issues/new).

## Copyright & Licence (MIT License)

Multifact-pivottable.js is © 2010 Pranjal Goswami

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: pranjal-goswami/multifact-pivottable

repo_name: pranjal-goswami/multifact-pivottable


text:
---
title: std::unreachable - safe shooting yourself in the foot 🔫
date: 2022-08-25 11:01:00
tags: [advice]
categories: [Article]
---

They standardized [std::unreachable](https://en.cppreference.com/w/cpp/utility/unreachable)
in C++23. The function has a wacky description:
> invokes undefined behavior

(Prior to C++23 you can use `__builtin_unreachable` on Linux)

There are cases when it is absolutely known that the values of the argument in the given function
are a limited set, but we are still required to do something on "unreachable" values.

Let's suppose that the `magic_func` function accepts only values `1` or `3`:
```c++
int magic_func(int value) {
    switch (value) {
    case 1:
        return 100;
    case 3:
        return 500;
    default:
        /* ???????????? */
    }
}
```

You need to write useless code - what to do when the value is not equal to `1` or `3`. Usually two options are used:
```c++
    return 0; // returning a dummy value
    throw std::exception(); // throwing a dummy exception
```

Extra code generates extra instructions: [link to godbolt](https://godbolt.org/z/ncnsaMoeY).

The `unreachable` instruction has no semantics, and is needed to show the compiler that
this section of code is "unreachable". The compiler can somehow optimize this section of code.

`undefined behavior` means that anything the compiler wants can happen in this section of code.

In our case, if you write `unreachable` ([link to godbolt](https://godbolt.org/z/9qd5s7oeT)),
the compiler will optimize out an extra check and the code will become equivalent to this:
```c++
int magic_func(int value) {
    if (value == 1) {
        return 100;
    }
    return 500;
}
```