text:
# Overview

The [lisp-rs](https://github.com/vishpat/lisp-rs) project implements an interpreter, in Rust, for a small subset of [Scheme](https://en.wikipedia.org/wiki/Scheme_(programming_language)), a Lisp dialect. The main goal of this document is to make sure the reader understands the inner details of how the interpreter was implemented.

The project was inspired by Peter Norvig's article [**(How to Write a (Lisp) Interpreter (in Python))**](http://www.norvig.com/lispy.html) and the book [**Writing An Interpreter In Go**](https://interpreterbook.com). This document serves as a commentary on the [code](https://github.com/vishpat/lisp-rs/tree/0.0.1) that implements the interpreter. Rust's rich programming constructs such as enum, pattern matching, and error handling make it easy and a joy to implement this bare-bone interpreter.

## Prerequisites
To make the most out of this project, it is expected that the user is aware of the following Computer Science concepts

- [Lists](https://en.wikipedia.org/wiki/List_(abstract_data_type))
- [Recursion](https://en.wikipedia.org/wiki/Recursion_(computer_science))

Rust is a non-trivial language, however, to implement the Lisp interpreter, the reader needs to have moderate experience with the language. Knowing the following four concepts should be enough for the user to understand the whole project

- [Enums and Pattern Matching](https://doc.rust-lang.org/book/ch06-00-enums.html)
- [Smart Pointers](https://doc.rust-lang.org/book/ch15-00-smart-pointers.html)
- [Error handling](https://doc.rust-lang.org/book/ch09-00-error-handling.html)

## Lisp Dialect

In order to keep the interpreter simple and its implementation easy to understand, the number of features supported by it has been limited on purpose. Following are the data types and statements that will be supported by the interpreter.

### Data types
- integer
- boolean

### Statements
- variable definition and assignment
- if-else
- function definition using lambdas
- function calls

### Keywords

- define
- if-else
- lambda

### Examples

Following are some of the sample programs that you will be able to run using the interpreter

```lisp
    (
        (define factorial (lambda (n) (if (< n 1) 1 (* n (factorial (- n 1))))))
        (factorial 5)
    )
```

```lisp
    (
        (define pix 314)
        (define r 10)
        (define sqr (lambda (r) (* r r)))
        (define area (lambda (r) (* pix (sqr r))))
        (area r)
    )
```

## Interpreter

The interpreter will be implemented from scratch and without the help of any tools such as [nom](https://docs.rs/nom/latest/nom/) or [pest](https://pest.rs/). The interpreter implementation is broken down into four parts

- [Lexer](./lexer.md) ~ 20 lines of code
- [Parser](./parser.md) ~ 60 lines of code
- [Evaluator](./evaluator.md) ~ 170 lines of code
- [REPL](./repl.md) ~ 30 lines of code

The best way to understand the implementation of the interpreter is to check out the code and walk through it while reading this document.

```
git clone https://github.com/vishpat/lisp-rs
git checkout 0.0.1
```

Once you thoroughly understand the implementation, you will be equipped to add new features to it, such as support for new data types like strings, floating-point numbers, lists, or functional programming constructs such as map, filter, reduce functions, etc.

### REPL

To run the interpreter and get its REPL (Read-Eval-Print-Loop)

```
cargo run
```

repository: vishpat/lisp-rs

repo_name: vishpat/lisp-rs


text:
# Crisper
> Split inline scripts from an HTML file for CSP compliance

## Usage

Command line usage:

    cat index.html | crisper -h build.html -j build.js
    crisper --source index.html --html build.html --js build.js

Library usage:

    var output = crisper(htmlString, jsOutputFileName);
    fs.writeFile(htmlOutputFileName, output.html, 'utf-8', ...);
    fs.writeFile(jsOutputFileName, output.js, 'utf-8', ...);

## Usage with Vulcanize

When using [vulcanize](https://github.com/Polymer/vulcanize), crisper can handle
the html string output directly and write the CSP seperated files on the command
line

    vulcanize index.html --inline-script | crisper --html build.html --js
    build.js

Or programmatically

    vulcanize.process('index.html', function(err, html) {
      if (err) {
        return cb(err);
      } else {
        var out = crisper.split(html, jsFilename)
        cb(null, out.html, out.js);
      }
    });

## Build Tools

- [gulp-crisper](https://npmjs.com/package/gulp-crisper)
- *No grunt plugin yet, will you write it?*
- *No broccoli plugin yet, will you write it?*

repository: richrliu/Website

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: richrliu/Website


text:
# Electron Clipboard Extended
>Electron clipboard extended with event handler for Text and Image change

```bash
npm install electron-clipboard-extended
```

This library has all methods of electron's clipboard api with added functionalities for listening to changes in clipboard. As of now only Text and Image changes are captured.

## Usage

```javascript
const clipboard = require('electron-clipboard-extended')

clipboard
.on('text-changed', () => {
    let currentText = clipboard.readText()
})
.once('text-changed', () => {
    console.log('TRIGGERED ONLY ONCE')
})
.on('image-changed', () => {
    let currentIMage = clipboard.readImage()
})
.startWatching();

clipboard.off('text-changed');

clipboard.stopWatching();

```

## Methods

All methods of electron's clipboard api plus the methods listed below

### startWatching()
Returns clipboard - Chainable method, Only after startWatching is called changes to clipboard will be watched.

### stopWatching()
Returns clipboard - Chainable method, Changes to clipboard will not be watched after calling this

### on(event, listener), once(event, listener)
* `event` String - Can be either `text-changed` or `image-changed`
* `listener` Function - Callback function

Returns clipboard - Chainable method

### off(event[, listener])
* `event` String - Can be either `text-changed` or `image-changed`
* `listener` Function (optional) - If `listener` is not passed all listeners of the event will be removed

Returns clipboard - Chainable method

license: MIT

gha_license_id: MIT


text:
Linux FAQs with Answers--How to set a static MAC address on VMware ESXi virtual machine
================================================================================
> **Question**: I want to assign a static MAC address to a virtual machine (VM) on VMware ESXi. However, when I attempt to start a VM with a static MAC address, the VM fails to start and throws an error "00:0c:29:1f:4a:ab is not an allowed static Ethernet address. It conflicts with VMware reserved MACs". How can I set a static MAC address on VMware ESXi VMs?

When you create a VM on VMware ESXi, each network interface of the VM is assigned a dynamically generated MAC address. If you want to change this default behavior and assign a static MAC address to your VM, here is how to do it.

![](https://farm6.staticflickr.com/5592/14726591627_64c1dc67ce_z.jpg)

As you can see above, VMware's vSphere GUI client already has a menu for setting a static MAC address for a VM. However, this GUI-based method only allows you to choose a static MAC address from **00:50:56:xx:xx:xx**, which is VMware-reserved MAC address range. If you attempt to set any arbitrary MAC address outside this MAC range, you will fail to launch the VM, and get the following error.

![](https://farm6.staticflickr.com/5591/14890165456_a82ded21b9_z.jpg)

Then what if I want to assign any arbitrary MAC address to a VM?

Fortunately, there is a workaround to this limitation. The solution is, instead of using vSphere GUI client, editing .vmx file of your VM directly, after logging in to the ESXi host.

First, turn off the VM to which you want to assign a static MAC address.

[Enable SSH access to your ESXi host][1] if you haven't done it already. Then log in to the ESXi host via SSH.

Move to the directory where your VM's .vmx file is located:

    # cd vmfs/volumes/datastore1/[name-of-vm]

Open .vmx file with a text editor, and add the following fields. Replace the MAC address field with your own.

    ethernet0.addressType = "static"
    ethernet0.checkMACAddress = "false"
    ethernet0.address = "00:0c:29:1f:4b:ac"

Now you should be able to launch a VM with the static MAC address you defined in .vmx file.

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

via: http://ask.xmodulo.com/static-mac-address-vmware-esxi-virtual-machine.html

译者：[译者ID](https://github.com/译者ID)
校对：[校对者ID](https://github.com/校对者ID)

本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译，[Linux中国](http://linux.cn/) 荣誉推出

[1]:http://ask.xmodulo.com/enable-ssh-remote-access-vmware-esxi5.html

url: https://raw.githubusercontent.com/B-robur/TranslateProject/2744ca2e676669f2134b1709ee3a824b0a053a88/sources/tech/20140818 Linux FAQs with Answers--How to set a static MAC address on VMware ESXi virtual machine.md

repository: B-robur/TranslateProject

repo_name: B-robur/TranslateProject


text:
# GIT-WC

This is a simple extension to GIT that reports the word count
difference between any two commits.  It accepts any standard range
arguments, such as HEAD^..HEAD or <path>..<path>, and tells you how
many words you added since your last commit, minus how many words you
have removed.

Without any arguments, it tells you the difference between your
working tree and the last commit.

I write stories as well as code, I use Markdown as my writing
environment of choice, I commit to a GIT repository regurlarly, and
this is a simple and straightforward way of tracking my daily
contributions.

The LICENSE is standard MIT style.  See the LICENSE file for details.

repository: elfsternberg/git-wc

repo_name: elfsternberg/git-wc


text:
# Generate your own OData client
There are many scenarios where you have either your own OData service or want to integrate with another SAP OData service, that is not part of the SAP S/4HANA services, like SAP SuccessFactors. For those cases you can generate your own OData client as described in the following.

## Download EDMX file
Download the service specification file for the [Employee Central Time Off service](https://api.sap.com/api/ECTimeOff/overview) from the SAP Business API Hub and put it into the [generator-input directory](../generator-input/).

In this directory you will also find the [service mapping file](../generator-input/service-mapping.json), that contains some extra configuration for the generated service(s), like the directory name and service path for the service.

## Run the generation
In your [package.json](../package.json) you have already installed the `@sap/cloud-sdk-generator` dependency. Let's use it to run the generation. Pass the [generator-config.json](../generator-config.json), where we specify input and output directories along with some other options for the generation.
```sh
npx generate-odata-client -c generator-config.json
```
Once this is completed you should find some generated code, your OData client, in the [src/generated/ec-time-off-service directory](../src/generated/ec-time-off-service). We will use this code to request additional appointments from SAP SuccessFactors.

## Next step: [Create a request with your own OData client](06-use-odata-client.md)

repository: steven-g/cloud-sdk-team-calendar

branch_name: refs/heads/main

repo_name: steven-g/cloud-sdk-team-calendar


text:
# Go Data

Go Data is a pluggable framework for data access

## Overview

Data access is at the core of most applications. In many instances we want a simplified CRUD experience.
In a lot of those cases we don't even want to have to write the CRUD aspect. At times we may have a more
low level requirement for graph, doocument or other types of data model. Go Data looks to solve these problems
in a single place with a pluggable architecture.

Go Data takes on the Go Micro approach and will include code generation for CRUD in future.

Note: WIP. Much of this will break and change.

## TODO

- [ ] explore the concept of a Model interface
- [ ] individual packages for data models {kv, sql, graph, document}
- [ ] top level interfaces like CRUD and Stream
- [ ] implementations of each package
- [ ] realtime data interface?
- [ ] timeseries interface?
- [ ] search interface? e.g elasticsearch, lucene


text:
---
layout: project
title: mewsician
---

## mewsician

###### [website][mwin] -- [hardware][mchip] -- [source][msian]

###### michael lee / [jingyi li][jing] / [sarah sterman][ster] / jeremy warner

Mewsician is a musical friend designed to help children grow an intrinsic
appreciation of music and the encourage social aspect of playing music, rather
than simply particpating to assuage their parents' demands.

 © {{ site.time | date: '%Y' }} / {{ site.author.name }} /
[email][mail]

[msian]:https://github.com/radiolarian/mewsician
[mchip]:https://github.com/jeremywrnr/mewsichip
<EMAIL_ADDRESS>[jing]:http://jingyi.me
[ster]:https://people.eecs.berkeley.edu/~ssterman/
[mwin]:http://mewsician.win

gha_language: JavaScript


text:
# Changelog

## 0.2.3

- Accept notebook node as argument to testbook
- Added support for specifying kernel with `kernel_name` kwarg

## 0.2.2

- Added support for passing notebook as file-like object or path as str

## 0.2.1

- Added support for `allow_errors`

## 0.2.0

- Changed to new package name `testbook`
- Supports for patch and patch_dict
- Slices now supported for execute patterns
- Raises TestbookRuntimeError for all exceptions that occur during cell execution

## 0.1.3

- Added warning about package name change

## 0.1.2

- Updated docs link in setup.py

## 0.1.1

- Unpin dependencies

## 0.1.0

- Initial release with basic features


text:
---
layout: default
---

# 1993-02-26 - Re:  more ideas on anonymity

## Header Data

From: George A. Gleason<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: c78f3f6e6bc342962a19f3b4684304a27c40bddbe0e5d41aed57a41ff9096889

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-02-26 09:38:21 UTC

Raw Date: Fri, 26 Feb 93 01:38:21 PST

## Raw message

```
{% raw  %}From: George A. Gleason<EMAIL_ADDRESS>Date: Fri, 26 Feb 93 01:38:21 PST
To<EMAIL_ADDRESS>Subject: Re:  more ideas on anonymity
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Re your posting on categories of offenses and so on.  Agreed strongly that
sites should post banners stating the policies they adhere to.  I'd suggest
the following division of offenses:

1) Anything involving physical violence, threats of violence, incitement to
violence.  (this includes acts such as rape, pedophelia etc., since these
acts involve power as much as anything and can be seen as primarily violent
acts)  (this also includes things like Nazi propaganda where there is a
historic precedent or strong undertone that violent acts are encouraged)

2) Other (not violent) crimes against persons or property.

3) Antisocial or questionable actions such as victimless crime, propagation
of lies (for instance a faked Challenger transcript), violation of Net
rules.

Obviously these have descending levels of severity by most reasonable
standards.  I would not in any way make sysops or admins responsible for
postings which may be illegal in their country of origin: both for pragmatic
reasons (no one can possibly be held to know the laws in all the other
participating countries) and for ethical reasons (stalinist coup in Russia;
fascist consolidation in ex-Yugoslavia, now you have to play cop against
dissidents from both; no thanks!).

I believe unpopular opinions ought to be protected as long as they don't
encourage illegal or violent actions.  The test case for this is racism or
some equivalent.  If someone wants to argue a case that their race is the
Master Race or whatnot, I can't see squelching them for making opinion-noise
unless they're also e.g. advocating violence.  Once we get in the
opinion-censoring biz, it's a steep slippery slope.  OTOH, we also shouldn't
be an arm of LE, and hence the idea that discussing victimless crimes ought
to be a very bottom-of-the-list kind of thing.

-gg

{% endraw %}
```

## Thread

+ Return to [February 1993](/archive/1993/02)

+ Return to "[Eric Hughes <hughes@soda.berkeley.edu>](/authors/eric_hughes_hughes_at_soda_berkeley_edu_)"
+ Return to "[George A. Gleason <gg@well.sf.ca.us>](/authors/george_a_gleason_gg_at_well_sf_ca_us_)"
+ Return to "[gnu (John Gilmore)](/authors/gnu_john_gilmore_)"
+ Return to "[Jay Prime Positive <jpp@markv.com>](/authors/jay_prime_positive_jpp_at_markv_com_)"
+ Return to<EMAIL_ADDRESS>(Bob Stratton)](/authors/strat_at_intercon_com_bob_stratton_)"
+ Return to "[Theodore Ts'o <tytso@Athena.MIT.EDU>](/authors/theodore_tso_tytso_at_athena_mit_edu_)"

+ 1993-02-26 (Fri, 26 Feb 93 01:38:21 PST) - Re:  more ideas on anonymity - _George A. Gleason<EMAIL_ADDRESS>  + 1993-02-26 (Fri, 26 Feb 93 03:01:57 PST) - [Re: more ideas on anonymity](/archive/1993/02/febb74ea29f34b4d09f0aa28b8078d776863b637badbc8f6a7b4c795bbae34d4) - _gnu (John Gilmore)_
    + 1993-02-27 (Fri, 26 Feb 93 16:05:42 PST) - [Re: more ideas on anonymity](/archive/1993/02/0a3e5ce7d8e1690d37625ea7914fc28cade511b338aee909a47a8de600b3dad8) - _Theodore Ts'o<EMAIL_ADDRESS>      + 1993-02-27 (Sat, 27 Feb 93 01:01:40 PST) - [more ideas on anonymity](/archive/1993/02/ab946f933281f765b82f131a8fa1fca2ff6fdadb9b9e346b57f5b8473c5570cf) - _Jay Prime Positive<EMAIL_ADDRESS>        + 1993-02-27 (Sat, 27 Feb 93 12:11:00 PST) - [more ideas on anonymity](/archive/1993/02/70667aa0c88b020d2e287b1ba4a97c0fd57805b47cf75429f014fe84d81b86f9) - _Eric Hughes<EMAIL_ADDRESS>          + 1993-02-27 (Sat, 27 Feb 93 12:40:04 PST) - [more ideas on anonymity](/archive/1993/02/ea77e178e92eb0743fd619886fcaf39d0a95c77e0711e1f8b89dab7b6185aa63) -<EMAIL_ADDRESS>(Bob Stratton)_


text:
# Status Report for June 2nd, 2021

## Team Report

### Last Week Goals

- Finish writing tests
- Improve search functionality
- Improve chat window
- Allow users to add profile information
- Enhance styling

### Progress & Issues

- Continued writting tests, ran into issues of tests running on an infinite loop
  and going over the free limit od reads for our Firebase Database
- Improved and restyled the search functionality
- Improved styling on chat window and added sending a file other and minor
  functionalities
- Created profile screen in which users can add and edit their personal
  information

### Future Goals

- Work on the reflection for the project and do additional work on the project
  so it is production ready.

## Contribution of Members

### Chris Yuen

#### Last Week Goals

- Add further functionality and polish to search functionality and prepare for
  final release.

#### Progress & Issues

- Removed remaining restrictions on search and added a few minor features for
  additional flexibility.

#### Future Goals

- Complete reflections for class and do additional work on the project (if any)

### Hritik Aggarwal

#### Last Week Goals

- Shift to puppeteer for testing; write more filler tests; get design finalizes;
  fix some issues to finalize the project

#### Progress & Issues

- Finished adding tests; added a new search feature to follow the design
  aspects; added more css designs to create a better UX; added sorting
  functionality for search score

#### Future Goals

- Work on reflection for the project; wrap up the class; keep working on this
  project and make it production ready

### Ilya Kuksenko

#### Last Week Goals

- Finish end-to-end testing
- Relocate ‘Leave Group’ button to chat screen.

#### Progress & Issues

- Relocated ‘Leave Group’ button to chat screen.
- Added a feature to allow users to send files inside of chat.
- Integrated the tests to ‘almost’ work with Github Actions

#### Future Goals

- Work on reflection of the project
- Wrap up the class

### Pedro Pires

#### Last Week Goals

- Work on chat feature to make it better looking

#### Progress & Issues

- Worked on chat css as well as some more minor functionalities to chat. No
  blockers or any issues.

#### Future Goals

- Work on the reflection for the project. Continue working on the project if
  there is anything I can do to help

### Thorne Garvin

#### Last Week Goals

- Add feature so user can create profile information

#### Progress & Issues

- Worked on adding more tests

#### Future Goals

- Work on the reflection for the project

path: /status-reports/Report 06-02-21.md


text:
# V1TagImportPolicy

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**insecure** | **bool** | Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import. | [optional]
**scheduled** | **bool** | Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported | [optional]

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

gha_language: Python


text:
> [Go to French version](/fr/Lois/Lois%20du%20Canada/2015/ch.%2015.md)

# Main Point of Contact with the Government of Canada in case of Death Act

**S.C. 2015, c. 15**

Assented to on 18 June 2015

----------

**Preamble**

Whereas the Department of Employment and Social Development offers Canadians a point of access to a wide range of government services and programs either in person, by phone, by Internet or by mail;

And whereas it is desirable to improve services to Canadians by providing those Canadians who have recently lost a loved one with a point of contact for the Government of Canada in respect of matters relating to the death of that person that pertain to the use of that person’s social insurance number;

Now, therefore, Her Majesty, by and with the advice and consent of the Senate and House of Commons of Canada, enacts as follows:

## Short Title

**Short title**

**1** This Act may be cited as the Main Point of Contact with the Government of Canada in case of Death Act.

## Mandate

**Main point of contact**

**2**

- **(1)** The Minister of Employment and Social Development must implement measures necessary to establish the Department of Employment and Social Development as the main point of contact with the Government of Canada in respect of matters relating to the death of a Canadian citizen or resident that pertain to the use of that person’s social insurance number, so that no person is required to communicate directly with all persons to whom information about that deceased citizen or resident may be made available under subsection 28.2(5) or subsection 35(1) of the [Department of Employment and Social Development Act](/en/Acts/Statutes%20of%20Canada/2005/c.%2034.md).

**Information about deceased citizen or resident — Commission**

- **(2)** On receiving notification of the death of a Canadian citizen or resident, the Canada Employment Insurance Commission must, if it may make information relating to that deceased citizen or resident available to any persons under subsection 28.2(5) of the [Department of Employment and Social Development Act](/en/Acts/Statutes%20of%20Canada/2005/c.%2034.md), do so, subject to the conditions that would apply if the Commission were to make that information available under that subsection.

**Information about deceased citizen or resident — Minister**

- **(3)** On receiving notification of the death of a Canadian citizen or resident, the Minister of Employment and Social Development must, if the Minister may make information relating to the deceased citizen or resident that pertains to the use of their social insurance number available to a minister or public officer of a prescribed federal institution, under subsection 35(1) of the [Department of Employment and Social Development Act](/en/Acts/Statutes%20of%20Canada/2005/c.%2034.md), do so, subject to the conditions referred to in that subsection.

**Deeming provision**

- **(4)** For the purpose of subsections 28.2(6) or 35(2) of the [Department of Employment and Social Development Act](/en/Acts/Statutes%20of%20Canada/2005/c.%2034.md), the information made available to any person under subsection (2) or (3), is deemed to have been obtained, respectively, under subsection 28.2(5) or 35(1) of that Act.

## Regulations

**Regulations**

**3** The Governor in Council may make regulations for carrying out the purposes and provisions of this Act.

## Annual Report

**Annual report**

**4**

- **(1)** The Minister of Employment and Social Development must, after the end of every fiscal year, report on the implementation of the measures referred to in section 2 during that fiscal year.

**Tabling in Parliament**

- **(2)** The Minister must cause the information relating to the implementation of the measures to be laid before each House of Parliament during the fiscal year after the fiscal year to which the information relates.

repository: TravisMadill/CanadianLaws

path: /en/Acts/Statutes of Canada/2015/c. 15.md

repo_name: TravisMadill/CanadianLaws


text:
---
permalink: /Contact/
title: "Contact"
excerpt: "Contact CybercrimeTech"
modified: 2017-01-18T19:55:22+09:00
---

If you have any questions about digital crime and investigation topics, comments on articles or are interested in research collaboration, please email Dr. Joshua I. James at: [joshua+2017@cybercrimetech.com](joshua+2017@cybercrimetech.com).

PGP: [0x7B9D7C266DF5FCB3](http://pgp.mit.edu/pks/lookup?search=0x7B9D7C266DF5FCB3)

* [Digital Forenisc Investigation Research Laboratory (DFIRE)](http://digitalfire.ucd.ie)
* [Legal Informatics and Forensic Science Institute](https://cis.hallym.ac.kr)
* [ResearchGate](http://www.researchgate.net/profile/Joshua_James2)
* [Google Scholar](http://scholar.google.com/citations?&user=qDls2CDoIsoC)

Alternatively, see the sidebar for social networks we are on.

repository: jijames/cybercrimetech

repo_name: jijames/cybercrimetech


text:
# Classic-API-Postman-Collection

## Overview
This collection is provided to assist Jamf Pro users of the Classic API. It provides a quick method to interact with all non-deprecated endpoints.

This article describes the recommended Postman configuration and setup process to import the collection, configure variables to connect it to your Jamf Pro environment and begin testing API calls and interacting with your Jamf Pro environment via the Classic API.

The following expectations were used when designing this collection:
* All POST operations include a pre-populated request body.
  - This request body may not include all fields supported by the body of the given object, however it will include those required to successfully create the object.
  - Pull requests or issue submissions are encouraged to enhance or update this data.
* All GET operations include at least one example response.
  - Endpoints that have conditional inputs in the form of parameters or request bodies should include multiple examples (e.g. `computercommmands` and `mobiledevicecommands`).
* All query parameters that have a defined list of acceptable values denote the allowed values in the description of the parameter.

## Import the Collection
Use the following options to import the collection into Postman:
* For Jamf Pro version 10.34.0 and earlier: Click the [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/3f5cc9fc4978cdae78fc) button to automatically import the collection into your Postman app.
* For Jamf Pro Version 10.35.0 and later: Click the [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/12cbc6c93dfcabf14e41?action=collection%2Fimport) button to automatically import the collection into your Postman app.
* In Postman, click File >> Import.
  - Download the JSON included in this repo and select the .json file.

## Define Environment Variables
This collection utilizes the following variables which should be defined within the environment variables. Using variables at the collection level is not currently supported by the script that performs that authorization token requests. Follow Postman's documentation to [Manage Environments](https://learning.getpostman.com/docs/postman/environments_and_globals/manage_environments).

## 10.34.0 and earlier
| Variable     | Description                                     | Example                   |
|--------------|-------------------------------------------------|---------------------------|
| url          | Hostname and port of the Jamf Pro environment   | company.jamfcloud.com:443 |
| username     | Username to authenticate to Jamf Pro with       | administrator             |
| password     | Password of the user authenticating to Jamf Pro | pa$$word                  |

## 10.35.0 and later
| Variable     | Description                                               | Example                           |
|--------------|-----------------------------------------------------------|-----------------------------------|
| url          | Protocol, hostname and port of the Jamf Pro environment   | https://company.jamfcloud.com:443 |
| username     | Username to authenticate to Jamf Pro with                 | administrator                     |
| password     | Password of the user authenticating to Jamf Pro           | pa$$word                          |

This version of the collection utilizes scripts to manage the Bearer Token, which is a new authentication method supported in version 10.35.0 and later of Jamf Pro. Tokens will be requested as necessary, so no interaction with authentication endpoint should be necessary. For more information on authentication changes to the Classic API, see the [Jamf Developer Portal](https://developer.jamf.com/jamf-pro/docs/classic-api-authentication-changes).

## Getting Started
After the collection has been imported and valid values have been defined for the variables, all calls should be supported with minimal input required. Additional data will be required either in the form of a parameter value and/or a request body.

repository: jamf/Classic-API-Postman-Collection

repo_name: jamf/Classic-API-Postman-Collection


text:
Summary PojoSR usage instructions
=======

## Introduction

There are two ways to use pojosr:
 * As a service registry
 * As a OSGi "light" framework

## As a Service registry

You can get a service registry like this:
```java
ServiceLoader<PojoServiceRegistryFactory> loader = ServiceLoader.load(PojoServiceRegistryFactory.class);

PojoServiceRegistry registry = loader.iterator().next().newPojoServiceRegistry(new HashMap());
```
the interface looks like:
```java
public interface PojoServiceRegistry {
	public BundleContext getBundleContext();

	public void addServiceListener(ServiceListener listener, String filter)
			throws InvalidSyntaxException;

	public void addServiceListener(ServiceListener listener);

	public void removeServiceListener(ServiceListener listener);

	public ServiceRegistration registerService(String[] clazzes,
			Object service, @SuppressWarnings("rawtypes") Dictionary properties);

	public ServiceRegistration registerService(String clazz, Object service,
			@SuppressWarnings("rawtypes") Dictionary properties);

	public ServiceReference[] getServiceReferences(String clazz, String filter)
			throws InvalidSyntaxException;

	public ServiceReference getServiceReference(String clazz);

	public Object getService(ServiceReference reference);

	public boolean ungetService(ServiceReference reference);
}
```
## As a OSGi "light" framework

Either use the PojoServiceRegistry with bundles form the classpath installed and started by using the provided classpathscanner like this (or standalone):

```java
Map config = new HashMap();
config.put(PojoServiceRegistryFactory.BUNDLE_DESCRIPTORS, new ClasspathScanner().scanForBundles());

ServiceLoader<PojoServiceRegistryFactory> loader = ServiceLoader.load(PojoServiceRegistryFactory.class);

PojoServiceRegistry registry = loader.iterator().next().newPojoServiceRegistry(config);
```

## Standalone

A main method is provided as well e.g. the following gives us a working gogo shell by just putting the gogo bundles on the classpath and running the framework,

```
java -cp target/de.kalpatec.pojosr.framework-0.1.0-SNAPSHOT.jar:org.apache.felix.gogo.runtime-0.8.0.jar:org.apache.felix.gogo.shell-0.8.0.jar:org.apache.felix.gogo.command-0.8.0.jar de.kalpatec.pojosr.framework.PojoSR
..
Starting: org.apache.felix.gogo.runtime
Starting: org.apache.felix.gogo.shell
Starting: org.apache.felix.gogo.command
g! lb
START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    1|System Bundle (0.0.1)
    1|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar!/ (0.0.0)
    2|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaRuntimeSupport.framework/Versions/A/Resources/Java/JavaRuntimeSupport.jar!/ (0.0.0)
    3|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/ui.jar!/ (0.0.0)
    4|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/laf.jar!/ (0.0.0)
    5|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsse.jar!/ (0.0.0)
    6|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jce.jar!/ (0.0.0)
    7|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/charsets.jar!/ (0.0.0)
    8|Active     |    1|jar:file:/Library/Java/Extensions/RXTXcomm.jar!/ (0.0.0)
    9|Active     |    1|jar:file:/System/Library/Java/Extensions/AppleScriptEngine.jar!/ (0.0.0)
   10|Active     |    1|jar:file:/System/Library/Java/Extensions/CoreAudio.jar!/ (0.0.0)
   11|Active     |    1|jar:file:/System/Library/Java/Extensions/dns_sd.jar!/ (0.0.0)
   12|Active     |    1|jar:file:/System/Library/Java/Extensions/j3daudio.jar!/ (0.0.0)
   13|Active     |    1|jar:file:/System/Library/Java/Extensions/j3dcore.jar!/ (0.0.0)
   14|Active     |    1|jar:file:/System/Library/Java/Extensions/j3dutils.jar!/ (0.0.0)
   15|Active     |    1|jar:file:/System/Library/Java/Extensions/jai_codec.jar!/ (0.0.0)
   16|Active     |    1|jar:file:/System/Library/Java/Extensions/jai_core.jar!/ (0.0.0)
   17|Active     |    1|jar:file:/System/Library/Java/Extensions/mlibwrapper_jai.jar!/ (0.0.0)
   18|Active     |    1|jar:file:/System/Library/Java/Extensions/MRJToolkit.jar!/ (0.0.0)
   19|Active     |    1|jar:file:/System/Library/Java/Extensions/QTJava.zip!/ (0.0.0)
   20|Active     |    1|jar:file:/System/Library/Java/Extensions/vecmath.jar!/ (0.0.0)
   21|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/apple_provider.jar!/ (0.0.0)
   22|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/dnsns.jar!/ (0.0.0)
   23|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/js-engine.jar!/ (0.0.0)
   24|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/js.jar!/ (0.0.0)
   25|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/localedata.jar!/ (0.0.0)
   26|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunjce_provider.jar!/ (0.0.0)
   27|Active     |    1|jar:file:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunpkcs11.jar!/ (0.0.0)
   28|Active     |    1|Apache Felix Gogo Runtime (0.8.0)
   29|Active     |    1|Apache Felix Gogo Shell (0.8.0)
   30|Active     |    1|Apache Felix Gogo Command (0.8.0)
g!
```

## GAE and other "no user thread" frameworks

The GAE doesn't allow threads so there is a property to deliver all events synchronous:

-Dde.kalpatec.pojosr.framework.events.sync=true

## Services

There is a PackageAdmin and a StartLevel service but they don't do anything (just published because quite some interesting bundles have dependencies on them).

repository: janblok/pojosr

repo_name: janblok/pojosr


text:
# Components
## MainPage
A description of the shop and a carousel of images.

## Contact
A form to send a message (email) to the shop manager and some information regarding the shop:

- GMaps position.
- Address.
- Phone number.
- Contact email.
- Timetable.

## ItemsList
A list of categorized items (products) of the shop. Both the items and their categories can be managed from the admin zone.

## Register
To register a new user.

## Login
Login page.

## Admin zone
### Item
Here you can manage the items. In the top of the page there are some filters to help you out while working with the items.

### Category
Here you can manage the categories.
Be aware that the menu of the page is dynamically created using the categories that you manage here. Also, their hierarchy is constrained to 3 levels.

### Supplier
Here you can manage the suppliers. They are only used to filter the Items on the admin zone.

### Home images
Here you can manage the images displayed on the MainPage carousel.

repository: mverdaguer/shop-catalogue

repo_name: mverdaguer/shop-catalogue


text:
[![](https://travis-ci.org/jekyll/jekyll-assets.png?branch=master)][travis]
[![](https://coveralls.io/repos/jekyll/jekyll-assets/badge.png?branch=master)][coveralls]
[![](https://codeclimate.com/github/jekyll/jekyll-assets/badges/gpa.svg)][code-climate] [![](https://gemnasium.com/jekyll/jekyll-assets.svg)][gemnasium]

[gemnasium]: https://gemnasium.com/jekyll/jekyll-assets
[code-climate]: https://codeclimate.com/github/jekyll/jekyll-assets
[coveralls]: https://coveralls.io/r/jekyll/jekyll-assets
[travis]: https://travis-ci.org/jekyll/jekyll-assets

# Jekyll 3 Assets

Jekyll 3 assets is an asset pipeline using Sprockets 3 to build especially
for Jekyll 3.  It utilizes new features of both Sprockets and Jekyll to achieve
a clean and extensible assets platform for Jekyll.

## Using Jekyll Assets with Jekyll

When you are using a Gemfile and bundler you need to do nothing special to get
Jekyll Assets to work, it will automatically load itself and work with Jekyll
when you bundle install and run Jekyll through bundle exec. However, when you
have globally installed Gems (`gem install jekyll-assets`) then in your
`_config.yml` do:

```yaml
gems:
  - jekyll-assets
```

## Configuration

```yaml
assets:
  compress:
    css: false | true | default - development: false, production: true
     js: false | true | default - development: false, production: true
  cache: false | directory | default: .asset-cache
  cdn: https://cdn.example.com
  skip_baseurl_with_cdn: false
   skip_prefix_with_cdn: false
  prefix: "/assets"
  assets:
    - "*.png"
    - "bundle.css"
  digest: true
  sources:
    - "_assets/folder"
```

### Digesting

* Disable digesting by default in development.
* Digest by default in production

### Compression

* Requires sass and uglify.
* Disable compression by default in development.
* Enable by default in production.

***You can force digesting with `digest: true` in your `_config.yml`***

## ERB Support

ERB Support is removed in favor of trying to get this included on Github Pages
eventually (if I can.) Having ERB presents a security risk to Github because it
would allow you to use Ruby in ways they don't want you to.

## Tags

* image, img
* javascript, js
* stylesheet, css, style
* asset, asset_source
* asset_path

### Tag Example:

```liquid
{% img src magick:2x alt:'This is my alt' %}
{% img src magick:2x alt:'This is my alt' sprockets:accept:image/gif %}
```

### What do the colons mean? Proxies/Tags

* `argument` is a boolean HTML argument.
* `key:value` is an HTML key="value" if no proxy exists.
* `proxy:key:value` will set a proxy key with the given value.
* `proxy:key` is a boolean argument if the proxy and key exists.
* `unknown:key:value` will raise `DoubleColonError`, escape it.
* `proxy:unknown:value` will raise a `UnknownProxyError`.

Lets say we have `sprockets` proxies and sprockets allows you to proxy accept,
if you send `{% img src sprockets:accept:image/gif }` then Sprockets find_asset
will get `{ :accept => "image/gif" }` but if you try to proxy "unknown" on
sprockets we will raise a Proxy error.  For more information then look at
`parser_spec.rb` in the spec folder because it literally lays out the ground
rules for our tags as a specification.

### Current Proxies:

* `sprockets:accept:<value>`
* `sprockets:write_to:<value>`

## Filters

There is a full suite of filters, actually, any tag and any proxy can be a
filter by way of filter arguments, take the following example:

```liquid
{{ src | img : "magick:2x magick:quality:92" }}
```

## Hooks

* `:env => [:init]`

You can register and trigger hooks like so:

```ruby
Jekyll::Assets::Hook.register :env, :init do
  # Your Work
end
```

## Addons

* CSS Auto Prefixer - add "autoprefixer-rails" to your Gemfile.
* ES6 Transpiler (through Babel) - add "sprockets-es6" to your Gemfile.
* Image Magick - add "mini_magick"  to your Gemfile, only works with `img`, `image`.
* Bootstrap - add "bootstrap-sass" to your Gemfile and "@import 'bootstrap'"
* Compass - add "compass-core" to your Gemfile and "@import 'compass'"
* Font Awesome - add "font-awesome-sass" to your Gemfile.

***Please note that some of these (if not all) have trouble with Rhino --
`therubyrhino` so you would probably be best to just use Node.js or io.js at
that point rather than trying to fight it.***

### Image Magick Proxy arguments:

* `magick:resize:<value>`
* `magick:format:<value>`
* `magick:quality:<value>`
* `magick:rotate:<value>`
* `magick:crop:<value>`
* `magick:flip:<value>`
* `magick:half`
* `magick:2x`
* `magick:4x`

## Plugins where did they go?

They're dead, in the way that they were, use Hooks, they require less
patching and give more flexibility to us because we can trigger them every
time we have a new environment not just occasionally.

repository: armstrjare/jekyll-assets

repo_name: armstrjare/jekyll-assets


text:
# Quicluster
*Python based implementation of modified Kruskal's algorithm for finding clusters or forest of trees from graph with potential limitations on total tree arc weight and total node weights in clusters*

## Background
In Operations Research, while solving problems on large graphs long compute times may call for level of aggregation or creating subproblems in terms of clusters of nodes or set of minimum spanning trees. Several techniques are available to create such clusters however they may take significant time themselves or require specifying number of clusters. The motivation for this algorithm comes from limitations on the size of cluster, max weight of all nodes in cluster (if nodes have different weight) and max MST weight of arcs in cluster.

Simple example can be delivery routing where there is typically max capacity of vehicle and max drive time for drivers from DOT regulations. Such limitations may require several tours to be created for all deliveries. In such example, customers can be considered as nodes with their package size as node weight. All OD combinations can be considered as arcs with drive time as arc weight. The algorithm, with inputs for package weights and some MST estimate equivalent to max drive time, could then generate clusters of customers and corresponding minimum spanning tree. This minimum spanning tree could further be used as input to another routing heuristic to solve TSP.

## How it works
Create graph object by calling
```python
from graph import Graph

# v is list of vertices/nodes
# nodeweight is dictionary with node, weight as key, value
graph = Graph(v, nodeweights)
```

Add graph edges
```python
# for edge between (u,v) with weight w
graph.addEdge(u, v, w)
```

Create clusters with max total weight of nodes in cluster and max total weight of arcs in corresponding MST
```python
clusters = graph.getClusters(maxtreearcswt, maxtreenodeswt)
```

Output format
```python
# SAMPLE OUTPUT

{
	5: {
		'arcs':[(4, 5, 1), (5, 7, 1), (5, 8, 1)],
		'treearcweight': 3,
		'treenodeweight': 19,
	},
	3: {
		'arcs':[(2, 3, 2)],
		'treearcweight': 2,
		'treenodeweight': 14,
	},
	9: {
		'arcs':[(1, 9, 4)],
		'treearcweight': 4,
		'treenodeweight': 8,
	},
	6: {
		'arcs':[],
		'treearcweight': 0,
		'treenodeweight': 8,
	}
}

# Here 5, 3, 9, 6 are representative nodes of their corresponding clusters
# Cluster 6 is a single node cluster with no tree
```

## Running time
Using disjoint set forest implementation with union by rank and path compression, the running time for this algortihm is no worse than *O(ElgV)*.


text:
# Words & Definitions

##### _An app that takes a user's word and allows the user to add and store multiple definitions for the word. Created July 8, 2016._

#### By **Stephanie Gurung**

## Description

_This application will store words that the user inputs. For each word, the user can save multiple definitions, each complete with part of speech, a definition, and an example sentence._

## Setup/Installation Requirements

* Clone repository onto your computer.
* Run bundle install in your project directory to ensure all gems are installed.
* Run ruby app.rb in your project directory to start Sinatra
* Open a browser of your choice to localhost:4567
* You can also check out the page here: <https://sgurung-words-definitions.herokuapp.com/>

## Technologies Used

* HTML
* CSS
* Bootstrap
* Ruby
* Sinatra
* Tested with Capybara & Rspec

## License
_This software is licensed under the MIT license._

Copyright (c) 2016 **Stephanie Gurung**


text:
# git-harvest

a github hook build in sinatra for tracking time in harvest

## to use

add the following post url with you harvest credentials to your github repo...

    http://git-harvest.example.com/<company>/<email>/<project_id>/<task_id>

add the following flag in  you r git commits when wanting to add time to your harvest account..

    git commit -m "fixed that ie rendering bug -t 0.5"

The MIT License
-------------------------------------------------------------
Copyright (c) 2009, Brock Whitten, Rob Ellis

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: andreazaupa/git-harvest

repo_name: andreazaupa/git-harvest


text:
# destr

> A faster, secure and convenient alternative for [`JSON.parse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse):

[![npm version][npm-v-src]][npm-v-href]
[![npm downloads][npm-d-src]][npm-d-href]
[![bundle phobia][bundlephobia-src]][bundlephobia-href]

## Usage

### Node.js

Install using npm or yarn:

```bash
npm i destr
# or
yarn add destr
```

Import into your Node.js project:

```js
// CommonJS
const destr = require('destr')

// ESM
import destr from 'destr'
```

### Deno

```js
import destr from 'https://deno.land/x/destr/src/index.ts'

console.log(destr('{ "deno": "yay" }'))
```

## Why?

**Fast fallback to input if is not string:**

```js
// Uncaught SyntaxError: Unexpected token u in JSON at position 0
JSON.parse()

// undefined
destr()
```

**Fast lookup for known string values:**

```js
// Uncaught SyntaxError: Unexpected token T in JSON at position 0
JSON.parse('TRUE')

// true
destr('TRUE')
```

**Fallback to original value if parse fails (empty or any plain string):**

```js
// Uncaught SyntaxError: Unexpected token s in JSON at position 0
JSON.parse('salam')

// "salam"
destr('salam')
```

**Avoid prototype pollution:**

```js
const input = '{ "user": { "__proto__": { "isAdmin": true } } }'

// { user: { __proto__: { isAdmin: true } } }
JSON.parse(input)

// { user: {} }
destr(input)
```

### Strict Mode

If `{ strict: true }` passed as second argument, `destr` will throw an error if the input is not a valid JSON string or parsing fails. (non string values and built-ins will be still returned as-is)

```js
// Returns "[foo"
destr('[foo')

// Throws an error
destr('[foo', { strict: true })
```

## Benchmarks

Locally try with `pnpm benchmark`. Below are esults on Node.js 18.11.0 with MBA M2.

**Note** `destr` is sometimes little bit slower than `JSON.parse` when parsing a valid JSON string mainly because of transform to avoid [prototype pollution](https://learn.snyk.io/lessons/prototype-pollution/javascript/) which can lead to serious security issues if not being sanitized. In the other words, `destr` is better when input is not always a json string or from untrusted source like request body.

```
=== Non-string fallback ==
JSON.parse x 10,323,718 ops/sec ±0.45% (96 runs sampled)
destr x 1,057,268,114 ops/sec ±1.71% (90 runs sampled)
destr (strict) x 977,215,995 ops/sec ±1.43% (97 runs sampled)
sjson:
@hapi/bourne x 10,151,985 ops/sec ±0.76% (96 runs sampled)
Fastest is destr

=== Known values ==
JSON.parse x 16,359,358 ops/sec ±0.90% (92 runs sampled)
destr x 107,849,085 ops/sec ±0.34% (97 runs sampled)
destr (strict) x 107,891,427 ops/sec ±0.34% (99 runs sampled)
sjson x 14,216,957 ops/sec ±0.98% (89 runs sampled)
@hapi/bourne x 15,209,152 ops/sec ±1.08% (88 runs sampled)
Fastest is destr (strict),destr

=== Plain string ==
JSON.parse (try-catch) x 211,560 ops/sec ±0.84% (92 runs sampled)
destr x 60,315,113 ops/sec ±0.46% (98 runs sampled)
destr (strict):
sjson (try-catch) x 186,492 ops/sec ±0.70% (97 runs sampled)
@hapi/bourne:
Fastest is destr

=== standard object ==
JSON.parse x 492,180 ops/sec ±0.98% (98 runs sampled)
destr x 356,819 ops/sec ±0.40% (98 runs sampled)
destr (strict) x 412,955 ops/sec ±0.88% (94 runs sampled)
sjson x 437,376 ops/sec ±0.42% (102 runs sampled)
@hapi/bourne x 457,020 ops/sec ±0.81% (99 runs sampled)
Fastest is JSON.parse

=== invalid syntax ==
JSON.parse (try-catch) x 493,739 ops/sec ±0.51% (98 runs sampled)
destr x 405,848 ops/sec ±0.56% (100 runs sampled)
destr (strict) x 409,514 ops/sec ±0.57% (101 runs sampled)
sjson (try-catch) x 435,406 ops/sec ±0.41% (100 runs sampled)
@hapi/bourne x 467,163 ops/sec ±0.42% (99 runs sampled)
Fastest is JSON.parse (try-catch)
```

## License

MIT. Made with 💖

<!-- Refs -->
[npm-v-src]: https://img.shields.io/npm/v/destr?style=flat-square
[npm-v-href]: https://npmjs.com/package/destr

[npm-d-src]: https://img.shields.io/npm/dm/destr?style=flat-square
[npm-d-href]: https://npmjs.com/package/destr

[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/destr/ci/master?style=flat-square
[github-actions-href]: https://github.com/unjs/destr/actions?query=workflow%3Aci

[bundlephobia-src]: https://img.shields.io/bundlephobia/min/destr?style=flat-square
[bundlephobia-href]: https://bundlephobia.com/result?p=destr

repository: ampm-jbnu/ampm-site

repo_name: ampm-jbnu/ampm-site


text:
# Contribution to angular-es

## File organization

-`origin`: manage the `angular/angular` repository as a submodule
-`aio-x`: manage the translation source file `xxx.en.md`, the translation file` .md` and other files to overwrite `origin`.

### aio directory structure

Basically the Markdown file in the `content` directory is translated.
If necessary, edit the source code of the application as well.

https://github.com/angular/angular/tree/master/aio

```
origin/year /
├── README.md
├── content# A document resource file written in Markdown or HTML. Mainly translate files here
│ ├── cli document resource #CLI
│ ├── examples# Source code of the sample code
│ ├── guide# Guide document resource
│ ├── images# Image in documentation
│ ├── marketing# Resources to present Angular, such as links and event information
│ ├── home# Introduction Tutorial resources
│ ├── navigation.json# Site navigation management files
│ └── tutorial# Tour de los Heroes Tutorial resources
├── application source code src# angular.io
...

```

## Translation process flow

Before you start translating, make sure no one is trying to translate the same file.
[Translation check] (https://github.com/angular/angular-en/labels/type%3A%20Translation%20Checkout) If you look at the tag topic, you can see the area where we are currently working on the translation.
If you want to make a new translation, [Create problem] (https://github.com/angular/angular-es/issues/new/choose) and fill in the information according to Templates.

## Minor fixes

For minor fixes to already translated documentation, create a pull request with the `Edit` function on GitHub.

![edit-on-github](./docs/edit-on-github.png)
## Add translation

To translate an untranslated document again, copy the source file as `xxx.en.md` from` origin` to `aio-x` and create a translation for that source as` xxx.md`. ..
Submit a pull request to add the two files.

### Local preparation

#### 1. Cloning the repository

```
$ git clone git@github.com:angular-es/AngularComunities.git

```

#### 2. Source repository sync

This repository uses a submodule to integrate with the source repository.

```
$ git submodule sync
$ git submodule update --init

```

#### 3. First compilation

When the compilation is complete, the documentation site will be displayed in the `.tmp/aio/dist` directory.
You can check the created site by setting up a development server with your favorite tool.

```
$ ./build.sh

```
#### 3.2x
If you use windows use this command in powershell it can be executed from windows server 2008 > , it has been tested on windows 8 and 10.

```
$./build-win.ps1 or .\build.sh
```

**Note**
-If you have problems with windows, check if your system is compatible with robocopy & Get-Content.
-The construction time is very long, so please wait while you make coffee.
-On MacOS, the operating system file descriptor can be used during the build process.
  In that case, you need to increase the maximum number check this:
https://github.com/meteor/meteor/issues/8057#issuecomment-261011063

```
$ echo kern.maxfiles = 65536 | sudo tee -a /etc/sysctl.conf
$ echo kern.maxfilesperproc = 65536 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -w kern.maxfiles = 65536
$ sudo sysctl -w kern.maxfilesperproc = 65536
$ ulimit -n 65536

```

#### Working with differential builds

After doing a local compilation once, you can rewrite the file directly to the `.tmp/aio` directory and work seamlessly with a differential compilation.
As long as the `yarn serve-and-sync` command is running, it can automatically rebuild when there are changes to the files in` .tmp/aio`.
However, the work in the `.tmp` directory is not managed by Git, so be sure to reflect it in the` aio-x` directory after the job.

```
$ cd .tmp/aio
$ yarn serve-and-sync
# starts the sever on localhost:4200

```

### Creating a translation request

Before you start translating, make sure no one is trying to translate the same file.
[Translation Check](https://github.com/yourname/reponame/labels/type%3A%20Translation%20Checkout) If you look at the tag topic, you can see the area where we are currently working on the translation.
If you want to make a new translation, [Create a issue](https://github.com/angular/angular/issues/new/choose) and fill in the information according to Templates.

### Create a translation pull request

Push the changes to the repository where angular/angular-es forked and send a pull request to the source of the fork.
Pull requests will be reviewed and merged if all is ok

## Translation guidelines

Follow the guidelines below for Spanish translation.

### Save the source text as a `.en.md` file

To manage the difference from the original text after updating the source, save the original text at the time of translation as a `xxx.en.md` file.
For a new translation, copy the English file `xxx.md` into the file` xxx.en.md` and edit the source file of the copy `xxx.md`.

### Align line break position with original text

If possible, make sure the original and translated lines have the same number of lines, and cooperate to make it easy to check for differences when updating.

### Follow textlint

Basic unification of notation fluctuations can be automatically corrected using textlint.
If textlint encounters an error, it is caught in CI and the pull request cannot be merged.

### Keep original nuances

Since the documentation is a technical document, maintaining readability, keep the nuances of the original text as much as possible and keep translations to a minimum.

Until you get used to it, it is recommended to proceed by correcting specific Angular terms based on machine translations like Google Translate.

### About 'Hanging Links Found': Add Anchor

When you compile, you may get the following error:

```
warn: Dangling Links Found in "guide/deployment.json":
 -guide/browser-support#polyfills
warn: Dangling Links Found in "guide/deprecations.json":
 -guide/releases#deprecation-practices,
 -guide/component-styles#deprecated-deep - y-ng-deep
warn: Dangling Links Found in "guide/glossary.json":
 -guide/workspace-config # project-tool-configuration-options,
 -guide/workspace-config # project-tool-configuration-options
warn: Dangling Links Found in "api/common/NgForOf.json":
 -guide/template-syntax # template-reference-variables - var-
error: Error: 6 unmatched links
```

This error is a relative link in the documentation warning that the link cannot be found.
In the first example above, although the `guide/implementation` is linked to` guide/browser-support#polyfills`, the `guide/browser-support` page says `#polyfills`. Warning that the holder does not exist.

This error often occurs when you translate a header that begins with `#`.
You must add an anchor in the translation to resolve the link reference. Add a form directive `{@a xxxxxx}` to the translated header as follows.

```md

## Polyfill {@a polyfills}

```

repository: alvarocamillont/angular-pt-br

repo_name: alvarocamillont/angular-pt-br


text:
---
layout: post
title: "Daily Journal"
date: 2014-05-28 15:42
comments: true
categories:
flashcards:
  - front: "Message Endpoint"
    back: "code custom to application and messaging system's API"
  - front: "Magnet"
    back: "a url hashed by the content of the file it points to"
  - front: "btih"
    back: "BitTorrent Info Hash; SHA1 of the bitorrent metadata"
  - front: "When do CPs get overridden?"
    back: "When they're get only (CP fns have <= 1 arity)"
  - front: "Why is Ember.computed.reads in the docs"
    back: "Because defeaturify doesn't run before the API docs are generated (maybe that'll change?)"
  - front: "Difference b/w computed.defaultTo and the CP severing behavior"
    back: "defaultTo isn't a binding; it only retrieves the target defaultValue when the cur value is null"
  - front: "Coneheads antagonist"
    back: "Michael McKean"
  - front: "Thread.current[:a] = 5"
    back: "Store a=5 in Fiber-local var."
  - front: "IEEE"
    back: "Institute of Electrical and Electronics Engineers; not-for-profit corporation, specified telephony, networking; produces 30% of world's literature on EE and CS"
  - front: "IEEE 802"
    back: "Family of standards dealing with LAN and metro area networks"
  - front: "WLAN standard"
    back: "IEEE 802.11; media access control (MAC) and physical layer (PHY)"
  - front: "IEEE 1003"
    back: "POSIX"
  - front: "POSIX"
    back: "Portable Operating System Interface (1988): family of standards specified by IEEE for maintaining compat b/w operating systems. POSIX defines API, command line shells and utilities, e.g. awk, echo, ed, threading lib"
  - front: "Holder of UNIX trademark"
    back: "Open Group"
  - front: "Linux and POSIX"
    back: "TODO"
  - front: "What is Linux?"
    back: "It's just a kernel; Linux distros are Linux kernel + lots of other utilities, mostly from GNU"
  - front: "Solaris"
    back: "Unix operating system originally by Sun, now by Oracle"
  - front: "What does it mean for an OS to be considered a 'Unix OS'"
    back: ""
  - front: "A free UNIX OS"
    back: "OpenSolaris"
  - front: "The X in OS X"
    back: "Signifies relationship to uniX"
  - front: "Logivision POS / LPOS users"
    back: "Union Market, Gourmet Garage"
  - front: "ruby: break x"
    back: "force the method that yielded me to return x"
  - front: "RSS (memory)"
    back: "Resident set size: portion of process's memory that is held in RAM, as opposed to swap or filesystem"
  - front: "Enumereable Lazy"
    back: "Ruby 2.0's ability to lazy eval what might be an infinite sequence; not eval'd until something like `to_a` called"
  - front: "Why couldn't Ruby pre 2.0 use OS COW semantics while forking?"
    back: "Because setting FL_MARK was rightfully interpreted as a write; bitmap marking got around this"
---

### Rubymotion

The next version will support Android. Ruby on Android. By PHH.

http://blog.rubymotion.com/post/87048665656/rubymotion-3-0-sneak-peek-android-support

### Magnet Link

[Wikipedia](http://en.wikipedia.org/wiki/Magnet_uri)

e.g. for all my illegal torrent downloads

    magnet:?xt=urn:btih:7O4OWESOQIXMYWY6U36MXWRICAUDB2OU&dn=Louie.S04E05.HDTV.x264-LOL&tr=udp://tracker.openbittorrent.com:80&tr=udp://tracker.publicbt.com:80&tr=udp://tracker.istole.it:80&tr=udp://open.demonii.com:80&tr=udp://tracker.coppersurfer.tk:80

- "de facto" standard; no official spec
- The scheme is "magnet", even though there's not "magnent" protocol in
  the way "http" is a scheme that refers to the Hyper Text Transfer
  Protocol.
- URI has target file's contents built into hash; anyone with the file
  can generate the URL without needing to refer to a central authority.
  This makes search results guaranteed; the server either has the thing
  you're looking for or it doesn't, and if you'd, say, like to continue
  downloading the latest episode of Louie from a source, you could
  search by content hash rather than by "Louie S04E07" which might yield
  a bunch of different encodings and other things you don't actually
  want.
- magnet URIs have no [hierarchical part](http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax),
  but rather immediately begin with a query param.
- `xt` query param refers to "exact topic"; this is followed by the hash
  type, such as sha1, or in the example above, "btih", which is a SHA1
  hash of a BitTorrent Info Hash (TODO: write about bittorrent meta)
- `dn` = display name, e.g. `Louie.S04E05.HDTV.x264-LOL`
- `tr` = tracker url for bittorrent downloads; note in the above sample
  magnet URL `tr` appears multiple types; wiki suggests appending an
  incrementing `.N` to query param keys, but I guess that's not a
  requirement.

> The Pirate Bay migrated from .torrent files to magnet URI in February 2012. This migration made the storage footprint of The Pirate Bay exceptionally small. A user demonstrated that the total size of The Pirate Bay magnets would be approximately 90MB of compressed data.[2]

### STOMP

[Wikipedia](http://en.wikipedia.org/wiki/Streaming_Text_Oriented_Messaging_Protocol)

Streaming Text Oriented Messaging Protocol: protocol designed for
working with Message-Oriented Middleware (MOM). It's language-agnostic,
so you could have a Ruby STOMP client talking to a Java STOMP server,
etc.

Go figure the Ruby Server that I found depends on EventMachine. How
could it not? I should probably figure out how servers queue up
requests. Is that the job of Thin/Mongrel/Unicorn?

### Ember overwriting get-only computed properties

Best explained in a [JSBin](http://emberjs.jsbin.com/ucanam/5139/edit).

Setting a computed property that is get-only (which is determined
by the fact that the supplied function has an arity of <= 1) will
overwrite that CP with whatever static value you're setting it to.

Relevant
[Ember](https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/computed.js#L490-L492)
[links](https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/computed.js#L1224-L1228)

### Defeaturify doesn't get run before Ember API docs get generated

This is probably the least timeless thing I could write about.

### Drop permissions in a server setting

It's an OS requirement that running a server on port 80 requires root
permissions, which means you need to be logged in as root or running
sudo to start up a server on port 80, but it can be risky to leave a
server running with full permissions, so it's common practice to _drop
permissions_ after the server has been start up.

I stumbled upon this concept while reading
[WEBrick code](https://github.com/ruby/ruby/blob/trunk/lib/webrick.rb#L14-L15):

    # WEBrick also includes tools for daemonizing a process and starting a process
    # at a higher privilege level and dropping permissions.

### Michael McKean

![Michael McKean](http://f.cl.ly/items/0x23191Z3K1J0M0Z1e3D/coneheads03.jpg)

A total hateable 90s "that guy".

### Ruby Fiber-local variables

`Thread#[]` is [a thing](http://www.ruby-doc.org/core-2.1.1/Thread.html#method-i-5B-5D)

It's an accessor for fiber-local variables. What does that mean? It
means even though you're saying `Thread.current[:a]`, which looks as if
you're grabbing `a` as tied to the current thread, it'll actually be
grabbing `a` from the currently active Fiber within that Thread, which
is a little misleading (and obviously wasn't a problem before Fibers
were a thing in 1.9.2).

Example:

    Thread.new {
      Thread.current[:a] = "lol"
      Fiber.new {
        puts "in new fiber: #{Thread.current[:a]}"
      }.resume
      puts "in original fiber: #{Thread.current[:a]}"
    }.join

This prints

    in new fiber:
    in original fiber: lol

### Thread#join

I knew this but I'm forgetful.

The following program prints "DONE" and exits:

    Thread.new {
      sleep 1
      puts "OMG"
    }
    puts "DONE"

The following program waits a second, prints "OMG", prints "DONE" and quits:

    Thread.new {
      sleep 1
      puts "OMG"
    }.join
    puts "DONE"

`Thread#join` pauses the current thread until the `.join`d thread
completes. Dur.

### Rack Request Store

[GitHub](https://github.com/steveklabnik/request_store)

Apparently `Thread.current` is already well known as common storage
place for global state for whichever thread you're on (which is safer
than sharing/clobbering some truly global var shared b/w threads). The
problem is that servers don't agree on Thread re-use:

    def index
      Thread.current[:counter] ||= 0
      Thread.current[:counter] += 1
      render :text => Thread.current[:counter]
    end

> If we ran this on MRI with Webrick, you'd get 1 as output, every time. But if you run it with Thin, you get 1, then 2, then 3...

Presumably that's because WEBrick spawns a new thread for every request
while Thin reuses threads. (TODO: confirm this?)

So anyway, Rack RequestStore is a thread-local storage mechanism that
gets cleared at the beginning of every web request. The functioning code
is literally no more than:

    module RequestStore
      def self.store
        Thread.current[:request_store] ||= {}
      end

      def self.clear!
        Thread.current[:request_store] = {}
      end
    end

and

    module RequestStore
      class Middleware
        def initialize(app)
          @app = app
        end

        def call(env)
          RequestStore.clear!
          @app.call(env)
        end
      end
    end

and then you'd write in your app code:

    def index
      RequestStore.store[:foo] ||= 0
      RequestStore.store[:foo] += 1
      render :text => RequestStore.store[:foo]
    end

so you still have to use `||=` to initialize values but you have the
guarantee that a previous value doesn't stick around.

### Deadlock detected

    1.9.3p484 :004 > Thread.current.join
    fatal: deadlock detected

Dur.

### POSIX: Portable Operating System Interface

I had no idea what this was. It always "the thing that has something to
do with linux/unix and has opinions about utilities that you might find
both on linux and Mac OS".

It's a family of standards specified by the IEEE, specifically IEEE
1003. Linux, UNIX, and Mac OS X are POSIX-compliant, I believe, but what
does that mean?

[good SO question](http://stackoverflow.com/questions/1780599/i-never-really-understood-what-is-posix)

[Readable POSIX Standard](http://pubs.opengroup.org/onlinepubs/9699919799/)

The C programming language was standardized by POSIX, also BSD variant
exists.

### Difference b/w linux and unix

[Source](http://www.cyberciti.biz/faq/what-is-the-difference-between-linux-and-unix/)

UNIX is a copyrighted name; most UNIX system sare commercial in nature.
Open Group holds UNIX trademark.

Linux is a UNIX clone created by Linus Torvalds and aims for POSIX
compliance.

Linux is just a kernel; everything else that goes into a Linux distro is
GUI systems and GNU utilities, filled in by third parties, whereas with
a UNIX OS, everything comes from a single source/vendor so it's
considered a "complete operating system".

Linux is free, redistributable under GNU licenses. Most UNIX-like
systems not free, w OpenSolaris as exception. But some Linux systems
are accompanied by Linux support, consultancy, bug fixing, and training
for additional fees, e.g. Redhat.

Some UNIX OS's

- HP-UX
- IBM AIX
- Sun Solaris
- Mac OS X (the X emphasizes relation w UNIX)
- IRIX

Some Linux Distributions

- Redhat Enterprise Linux
- Fedora Linux
- Debian Linux
- Suse Enterprise Linux
- Ubuntu Linux

Commonalities b/w Unix and Linux

- GUI, file, windows manager
- Shells (ksh, csh, bash)
- Various office apps (open office)
- Development tools (perl, php, python, GNU C/C++ compilers)
- POSIX interface (wat? i guess this means both are POSIX compliant)

[Unix History graphic](http://en.wikipedia.org/wiki/File:Unix_history.svg)

### IEEE: Institute of Electrical and Electronics Engineers

A professional association with corp office in NYC, dedicated to
technical advancement and excellence. Known for their conferences,
educational activities, and in particular their standards development.

How do they make money? Let's look at their
[annual report](http://sites.ieee.org/annualreport/files/2013/10/IEEE-2012-Annual-Report-Full.pdf).

Members pay dues. Full year membership is $187. They have 429,000
members. Membership bolsters your tech career, I guess.

So how do they make money off of standards? Someone approaches them and
says "hey you usually do a good job on this stuff; we'll pay you to help
out on these standards?"

[what a nice resource](http://standards.ieee.org/develop/process.html)

> The development of a new standard is typically triggered by a formal request, submitted to an SDO (Standards Development Organization) by a Sponsoring Body (individual or entity, such as an industry society) for review and evaluation. The SDO mandates, oversees, and helps facilitate the process for standards development. The Sponsor for the standards project assumes responsibility for the respective area of standards development, including the organization of the standards development team and its activities.

[then there's this](http://standards.ieee.org/develop/projstart.html)

- An idea or concept needs to be standardized
- Sponsorship organization comes along to coalesce the ideas of
  individuals and to financially back the standardization process.

What are some of their most "popular" standards? These are based on the
Wikipedia search autocomplete of "IEEE ":

- IEEE 802.11: MAC (media access control) and physical layer (PHY) specs
  for implementing wireless LAN (WLAN) in certain frequency bands. IEEE
  802 is the
- IEEE 802.11g-2003 et al: enhancements to the original spec, expanding
  to other frequencies.
- IEEE 1394: FireWire
- IEEE 1003: POSIX

"IEEE 802" refers to the family of standards dealing with LAN. Different
suffixes refer to different standards (rather than versions of
standards).

Also, when an amendment comes out, e.g. 802.11g-2003, it is
revoked when fully incorporated into the main standard, but
manufacturers will still refer to the amendment code as a means to
concisely advertise a product's capability:

> While each amendment is officially revoked when it is incorporated in the latest version of the standard, the corporate world tends to market to the revisions because they concisely denote capabilities of their products. As a result, in the market place, each revision tends to become its own standard.

### Pass a return value to "break" in Ruby

![twitter convo](http://f.cl.ly/items/0Q311t0Y1R2v1O29081u/Image%202014-05-29%20at%2011.51.58%20AM.png)

    [1,2,3].map { |i| break "shit" } # => "shit"

More generally:

    def foo
      yield
      "shit"
    end

    foo { break "naw" } # => "naw"

`break x` means "force the method that yielded me to return x".

### Ruby Garbage Collection

Phrasing from [this article](http://samsaffron.com/archive/2014/04/08/ruby-2-1-garbage-collection-ready-for-production)

Ruby 2.0: collect GC every 8MB; too small for most Rails apps
Ruby 2.1: Revised to have defaults make sense for both script and web apps

Specifically, expand GC limit every time limit hit, with ceilings.

But there was a 2.1 bug fixed in 2.1.1. In addition, there's still a
"memory doubling" issue under 2.1.1 due to the generational GC added to
2.1.

The gist of generational GC is that:

- Oftentimes, an allocated piece of memory is transient; it's used once
  and immediately its consumer lets go of it, and it can be released
  back to the system
- Objects that survive a first sweep are statistically likely to
  maintain in use for a long time, so it doesn't make sense to
  constantly sweep these objects in every GC pass.
- So separate garbage collection into two generations, old and new.
  New-gen allocations get moved to old-gen if they survive the first
  sweep, and old-gen sweeps (major GC events) happen way less
  frequently.

This apparently made Ruby 2.1 10x faster on average. But according to
this article, the 2.1 algo was too simplistic for web apps since web
apps perform lots of "medium" allocations (allocations that survive a
first sweep but can thereafter very quickly be swept up), e.g. most
(all?) allocations will take place during a web request, so if a GC hits
in the middle of a request, a lot of new-gen allocations will be moved
to old-gen, even though much of the new-genners could be cleaned up at
the end of the request.

Bad side effects:

- Major GC events run more often (triggered by oldgen growth)
- Oldgen grows beyond what we need (saturated by medium-gen)

.NET and Java use 3 generations, gen0 survivors go to gen1, then gen1 to
gen2, where they remain.

The planned (and I guess implemented at this point) refactor is to
requires that objects will have to survive 2 minor GCs to be promoted to
oldgen, therefore, if no more than 1 minor GC runs during a request,
heaps will stay at optimal sizes. Slated for 2.2 release (not yet
released).

BTW, RSS refers to "resident set size", the portion of a process's
memory that is held in RAM, as in 'in residence'. If it weren't in
residence, it might be in swap or in filesystem.

So the Ruby algo is called `RGenGC`.

### Bitmap marking

[source](http://patshaughnessy.net/2012/3/23/why-you-should-be-excited-about-garbage-collection-in-ruby-2-0)

In MRI, lots data stored as metadata + RValue, e.g. "abc" stored as an
RString which is flags + "abc" stored on an RValue heap with lots of
other strings.

    [a,b,c,s,o,m,e,o,t,h,e,r,s,t,r,i,n,g]

Fun fact: your ruby code itself is converted into RValue structures as
it is parsed and converted into byte code.

GC is run when we're out of RValue storage, loop over references an set
`FL_MARK` to mark the obj. Then leftover unmarked freeable objs are
collected into a singly-linked list, which will then be used for future
RValue allocs. If a heap (collection of RValue pointers) can't free up
any more space, and additional heap is alloc'd.

#### Copy-on-Write optimization

(brought to you by POSIX, right? or BSD? TODO: nail this down)

Linux/UNIX/UNIX-like systems have COW (copy on write). Semantically, a
fork of a process means copying all of memory from starting process. But
a full copy doesn't actually need to happen until one of the proces
writes.

Presumably this same thing happens if it's the parent process that
writes to COW data, right? How does that work? Are they both considered
child processes? TODO!!!

But before bitmap sweeping, COW didn't work for Ruby, because Ruby's GC
involves writing to `FL_MARK` to mark a piece of data as referenced by
some other thing, and this sets off the OS's copy-on-write behavior;
writing to `FL_MARK` looks like any other kind of memory write and the
OS doesn't know the difference.

(note: [Ruby Enterprise Edition](http://www.rubyenterpriseedition.com/)
fixed this, if you're interested)

The MRI fix came with replacing `FL_MARK` with a bitmap of marked
values. It's not a 2D bit map, it just means bits mapped to RValue
heap array elements. Obviously the bitmaps themselves are heavily
modified so they'll definitely be fully copied, but they're small so no
biggie.

Heaps now must be "aligned" with their maps, so we can't just use boring
ol malloc, but rather `posix_memalign` to alloc something that
presumably doesn't align with a word.

### Enumerable Lazy

This is in 2.0. You don't want to use it all the time for performance
reasons (the construction of all the intermediate blocks outweighs the
cost of evaluating some array you might not entirely consume), but it
allows you to do things like:

    require 'prime'
    Prime.lazy.select {|x| x % 4 == 3 }.take(10).to_a

[Read more](http://railsware.com/blog/2012/03/13/ruby-2-0-enumerablelazy/)

repository: machty/alexmatchneer-blog

extension: markdown

repo_name: machty/alexmatchneer-blog


text:
# Scale
A moderation and fun discord bot

### Contributing
If you want to contribute to this repository, do so, but please follow these guidelines to get merged:

- Complete description of changes (breaking changes, additions, deletions)
- If you're adding commands, keep the coding style (object oriented)

### Opening issues
If you got an issue or want to report something else, open an issue. It should contain:
- Description of problem
- Screenshots or relevant links

### Security problems
If you found a security problem, please open an issue with a description, i will fix it as fast as possible.

repository: ItsBites/Scale

repo_name: ItsBites/Scale


text:
---
layout: post
title:  "Learning Audio 101"
date:  Wed, 01 Jul 2020 13:16:58 -0700
tags:
  - audio
  - RCA
  - phono
  - karaoke
  - schiit
  - mixer
  - yamaha
  - speakers
---

I was looking for a new mini-hobby, and found an idea staring me in
the face: my [audio-technica ATR-2100 USB microphone](https://www.audio-technica.com/cms/wired_mics/b8dd84773f83092c/index.html). I've been using
it as a mic for work and gaming, but I felt like I wasn't really
getting the most out of it through its USB connection, which I also
used to run my headphones, a budget-level Sennheiser HD 419. It was
time to upgrade.

I quickly decided on the [Massdrop Sennheiser
HD6XX](https://drop.com/buy/massdrop-sennheiser-hd6xx), which has
received good reviews and lists for around $220. When you get a nice
pair of headphones, apparently it's not enough to plug them directly
into your computer, you want an external soundcard called a
[DAC](https://en.wikipedia.org/wiki/Digital-to-analog_converter). Then
you don't just plug it into that directly, you get a [pre-amp](https://en.wikipedia.org/wiki/Preamplifier) designed
for headphones.

For the DAC and headphone pre-amp, I decided on a [Schiit
Modi](https://www.schiit.com/products/modi-1) and the [Schiit Magni
3+](https://www.schiit.com/products/magni-1). I think the good thing
about these is the Modi should work with any software, and the Magni
doesn't have any software dependency so I should be able to take it
with me. They're fairly modular so I could upgrade the pieces
individually.

Back to the mic--I wanted to try out the XLR connection, but my
motherboard doesn't have an XLR connection obviously. This type of mic
needs [phantom power](https://en.wikipedia.org/wiki/Phantom_power) to
work. The XLR cable will send a [balanced mono output
signal](https://en.wikipedia.org/wiki/Balanced_audio) to a [Focusrite
scarlett
2i2](https://focusrite.com/en/usb-audio-interface/scarlett/scarlett-2i2)
I purchased. I
think this is probably overkill for gaming/office VoIP stuff, but I
may dabble with other things at a later date (digital piano, etc.) and
I wanted to keep my options open. I
think I've made the mistake too many times of buying something
entry-level and then having to upgrade, so I decided
to start mid-level here.

Then I decided I wanted to setup a place for karaoke. I had connected a
newly built gaming computer to a TV downstairs for VR, but there was only a
simple HDMI connection there for regular TV tasks. I bought a [Yamaha
MG10XU](https://usa.yamaha.com/products/proaudio/mixers/mg_series_xu_model/index.html)
for connecting a couple of microphones (with XLR cables) and the line
out on my PC. The output from the mixer will feed into some [JBL
Studio 530](https://www.jbl.com) speakers I bought. They were on
sale--a pair for $300. The speakers will be powered by a "Kinter K2020A+
Limited Edition Original Tripath TA2020-020 Class-T Hi-Fi Audio Mini
Amplifier with 12V 5A Power Supply Black" that you can find online for
like $40. If the karaoke isn't a hit, I'll be able to use
everything somewhere else. Whereas if I just bought a karaoke box, I'd
have a big paper weight. I haven't got everything yet, but that's the
tentative plan.

While on this journey, I spent more time than I originally expected
trying to figure out all the new terms and connectors. (I think I
enjoy the learning and spending money part part of hobbies more than
the hobby itself...)  There are a bunch of different connector types:
XLR, RCA, 3.5mm, 6.35mm or 1/4" TRS or TS, speaker wire, etc. Within
those, you have terms like balanced vs unbalanced, power amp vs
pre-amp, RCA vs TRS vs TS, monitor vs speaker. I probably should have
spent more time on Wikipedia learning the concepts than searching for
terms on the internet:

  - [Interfaces/Connectors](https://en.wikipedia.org/wiki/Audio_and_video_interfaces_and_connectors)
  - [Phone connector](https://en.wikipedia.org/wiki/Phone_connector_(audio))
  - [RCA connector](https://en.wikipedia.org/wiki/RCA_connector)

Once I get everything, maybe I'll post a follow up if there are
learnings with talking about.

gha_language: Ruby


text:
# FHIR API Reference Flex Connector

## Introduction

Kinvey's native API format is JSON over HTTP.  Many healthcare APIs, use the FHIR standard for transmitting health-related data.
This project is a reference Flex Connector for connecting to FHIR-based APIs.

## Installation

To use this connector, clone this GitHub repository, and install the associated dependencies:

```npm install```

The DLC can either be deployed to the FlexService Runtime, or run locally.  To run locally, you must have node.js
v6.x or greater.  Execute:

```node .```

## Dependencies

This Flex Connector uses the following dependencies, in addition to the `kinvey-flex-sdk`:

* *async:* The async.js module is used managing concurrency in transforming data
* *soap:* A library for consuming SOAP APIs
* *fhir-json-client:* Used for connecting to FHIR APIs and returning the results as JSON

## Testing

This reference connector contains sample automated tests, both unit and integration.  To run the tests, execute:

```npm test```

## Overview

The Flex Connector implements three methods associated with the Kinvey FlexData API:

* onGetAll
* onGetById
* onGetCount

The service objects and handlers are defined in the `index.js` file.  The handlers are loaded seperately from `lib/handlers`.  This separation is done for two purposes:
 a) to increase modularity and reusability of code
 b) to facilitate unit testing

```
// Initiate the Flex SDK Service
sdk.service((err, flex) => {
  if (err) {
    console.log('Error initializing the Flex SDK, exiting.');
    throw err;
  }

    const data = flex.data;                               // gets the FlexData object from the service

    // Define Service Objects
    const patient = data.serviceObject('Patient');
    const medication = data.serviceObject('Medication');
    const appointment = data.serviceObject('Appointment');

    // wire up the events that we want to process
    patient.onGetById(handlers.getPatientById);
    patient.onGetByQuery(handlers.getPatientByQuery);
    patient.onInsert(handlers.createEntity);
    patient.onUpdate(handlers.updateEntity);

    medication.onGetById(handlers.getMedicationById);
    medication.onGetByQuery(handlers.getMedicationByQuery);
    medication.onInsert(handlers.createEntity);
    medication.onUpdate(handlers.updateEntity);

    appointment.onGetById(handlers.getAppointmentById);
    appointment.onGetByQuery(handlers.getAppointmentByQuery);
    appointment.onInsert(handlers.createEntity);
    appointment.onUpdate(handlers.updateEntity);
});
```

The handlers then perform two steps for every request:
1) Make a request to `lib/fhir-client` for processing the FHIR call and converting the response to JSON
2) Remove the context root and transform the result into valid Kinvey entities `transformers.js`

For example, for `onGetById`, the handler makes a call to the `fhir-client`:

```fhir.read(resource, id, (err, result) => {```

The FHIR Client calls the API, gets the result, and converts the result to JSON:

```
function _parseResponse(err, response, item, callback) {
  if (err != null) {
    return callback(err);
  } else if (response != null && response.statusCode > 299) {
    return callback(response)
  } else {
    return callback(err, item);
  }
}

exports.read = function read(resource, item, callback) {
  client.read(resource, item, (err, response, item) => {
    _parseResponse(err, response, item, callback);
  });
};
```

Finally, the transformer is called to return the result:

```
function transformEntity(entity, modules) {
  if (typeof entity !== 'object') {
    return new Error('The entity must be an object.');
  }

  if (Array.isArray(entity)) {
    return new Error('Arrays are not permitted.  Only a single entity may be supplied.');
  }

  if (entity.id == null) {
    return new Error('No id field (_id) present in the resulting entity');
  }

  if (modules == null || modules.kinveyEntity == null || modules.kinveyEntity.entity == null) {
    return new Error('A valid modules object must be supplied');
  }

  const mappedEntity = modules.kinveyEntity.entity(entity);

  mappedEntity._id = entity.id;
  return mappedEntity;
}
```

After transforming, we complete the flex request and return the results to the request pipeline for further processing:

```
return complete().setBody(result).ok().next();
```

repository: Kinvey/fhir-flex-reference

repo_name: Kinvey/fhir-flex-reference


text:
Title: Episode 12: From Crawling to Baby Steps
Date: 2014-02-11 13:56:48
Category: Riskblog
Tags: Aggregated_Blogs
Slug: episode-12:-from-crawling-to-baby-steps-jay-jacobs-2014-02-11-13:56:48
Author: Jay Jacobs

>[Episode 12: From Crawling to Baby Steps](http://riskscience.net/2014/02/11/episode-12-from-crawling-to-baby-steps/) originally posted at [The Risk Science Podcast](http://riskscience.net) and syndicated at [SIRA](http://societyinforisk.org)
***
The whole crew is together again to continue the discussion from Episode 11 about the early stages of a risk management program.  We also pull in a question from a listener about setting capacity, appetite and limits.   Chris introduces us to the “Advanced Measurement Approach” at <http://www.fdic.gov/regulations/laws/publiccomments/basel/oprisk.pdf>

<http://risksciencepodcast.files.wordpress.com/2014/02/episode-12_-from-crawling-to-baby-steps.m4a>

[Episode 12: From Crawling to Baby Steps](http://risksciencepodcast.files.wordpress.com/2014/02/episode-12_-from-crawling-to-baby-steps.m4a)

[![img](/images/blank.png)](#) ![img](http://pixel.wp.com/b.gif?host=riskscience.net&blog=49067683&post=108&subd=risksciencepodcast&ref=&feed=1)

repository: societyinforisk/blog

repo_name: societyinforisk/blog


text:
# Basic example showing distributed tracing across Spring Boot apps
This is an example app where two Spring Boot (Java) services collaborate on an http request. Notably, timing of these requests are recorded into [Zipkin](http://zipkin.io/), a distributed tracing system. This allows you to see the how long the whole operation took, as well how much time was spent in each service.

Here's an example of what it looks like
<img width="972" alt="zipkin screen shot" src="https://cloud.githubusercontent.com/assets/64215/16300537/ff858dd6-3972-11e6-8e4c-4f7f4a6c707a.png">

This example was initially made for a [Distributed Tracing Webinar on June 30th, 2016](https://spring.io/blog/2016/05/24/webinar-understanding-microservice-latency-an-introduction-to-distributed-tracing-and-zipkin). There's probably room to enroll if it hasn't completed, yet, and you are interested in the general topic.

# Implementation Overview

Web requests are served by [Spring MVC](https://spring.io/guides/gs/rest-service/) controllers, and tracing is automatically performed for you by [Spring Cloud Sleuth](https://cloud.spring.io/spring-cloud-sleuth/).

This example intentionally avoids advanced topics like async and load balancing, eventhough Spring Cloud Sleuth supports that, too. Once you get familiar with things, you can play with more interesting [Spring Cloud](http://projects.spring.io/spring-cloud/) components.

# Running the example
This example has two services: frontend and backend. They both report trace data to zipkin. To setup the demo, you need to start Frontend, Backend and Zipkin.

Once the services are started, open http://localhost:8081/
* This will call the backend (http://localhost:9000/api) and show the result, which defaults to a formatted date.

Next, you can view traces that went through the backend via http://localhost:9411/?serviceName=backend
* This is a locally run zipkin service which keeps traces in memory

## Starting the Services
In a separate tab or window, start each of [sleuth.webmvc.Frontend](/src/main/java/sleuth/webmvc/Frontend.java) and [sleuth.webmvc.Backend](/src/main/java/sleuth/webmvc/Backend.java):
```bash
$ ./mvnw compile exec:java -Dexec.mainClass=sleuth.webmvc.Frontend
$ ./mvnw compile exec:java -Dexec.mainClass=sleuth.webmvc.Backend
```

Next, run [Zipkin](http://zipkin.io/), which stores and queries traces reported by the above services.

```bash
wget -O zipkin.jar 'https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec'
java -jar zipkin.jar
```

repository: hendisantika/sleuth-webmvc-example

repo_name: hendisantika/sleuth-webmvc-example


text:
# SOUL token generation event audit
This repository contains reports of the Phantasma token generation event, which can be found in the folder output.
The reports are provided in `.csv` format, that can be imported into Excel, Google Docs or other programs.

[phantasma_transactions.csv](output/phantasma_transactions.csv) contains a list of all transactions sent to the SOUL scripthash address, ordered by main net block inclusion.

[phantasma_totals.csv](output/phantasma_totals.csv) contains a list of the full addresses that participated in the TGE, and the amount of tokens each one received along with amount of NEO received and NEO that will be refunded. The entries in this file are ordered by amount of NEO sent.

## Generating the reports yourself
We also provide the C# program used to generate this reports, so you can run itself yourself and confirm the result.

This program requires [Neo.Lux library](https://github.com/CityOfZion/neo-lux) to extract data from the NEO main net.

It is also necessary to run [neo-cli](https://github.com/neo-project/neo-cli/) to act as a local full node, and make sure that is fully synced to the main net before you start the report generation.

repository: phantasma-io/PhantasmaAudit

repo_name: phantasma-io/PhantasmaAudit


text:
## :computer: Week `1` Programming Assignment 3

:white_check_mark: **Exercise 1.3)**

***Consider First `n` even numbers starting from zero(0). Complete the code segment to calculate sum of all the numbers divisible by `3` from 0 to n. Print the sum.***

```java
import java.util.Scanner;
public class Exercise1_3
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        /********************/
        for (int i=0; i<=2*n; i+=2)
        {
            if (i % 3 == 0)
                sum += i;
        }
        System.out.print(sum);
        /********************/
	}
}
```
▸ **Explanation:** We need to iterate over the range [0,2\*n] to cover all the first `n` _even_ numbers. Keep adding all those numbers which are divisible by 3 to the `sum`.

▶ **Alternative Approaches**:

 **✱** As even numbers which are multiple of 3 are multiples of 6. So, we will only iterate over the multiples of 6 which are less than equal to `2*n` and keep adding the numbers to the sum.
```java
for (int i=0; i<=2*n; i+=6)
{
    sum += i;
}
```
 **✱** Using the formula.
```java
int countOfMultiplesOf6 = (2 * n) / 6;
sum = 6 * (countOfMultiplesOf6 * (countOfMultiplesOf6 + 1)) / 2;
```

---
:heavy_plus_sign: **If you any _doubts/questions_ related to this course or any _quiz/assignment_,

   please use the Discussion Section.
I'll try to help at the earliest!!** :smiley:

license: Unlicense


text:
# No longer maintained

To achieve the same result you should use the built-in [components and slots](https://laravel.com/docs/5.5/blade#components-and-slots)

Partials made easy for blade. Heavily inspired by @crhayes/blade-partials

repository: MASNathan/blade-partials

repo_name: MASNathan/blade-partials


text:
---
title: REST
group: Plugins
order: 6
---
- [Installation](#installation)
- [POST Method](#POST-method)
- [GET Method](#GET-method)
- [How to make a custom contract?](#how-to-make-a-custom-contract)

Use REST plugin to connect q-grid with back-end directly.

   Installation

Add angular component inside of q-grid component, after that q-grid will start using sorting, filtering and pagination from the rest service.

```typescript
@Component({
   selector: 'my-component',
   template: `
      <q-grid>
         <q-grid-rest [url]="myServiceUrl" method="GET"></q-grid-rest>
      </q-grid>
   `
})
export class MyComponent {
   myServiceUrl = 'http://localhost:4000/exampleData'
}
```

   POST Method

Next body is produced for filtering, sorting and pagination.

```javascript
{
    filter: 'lastName=in:Doe,Jones;firstName=in:John,Harry',
    order: '+firstName,-lastName',
    skip: 100,
    take: 50
}
```

   GET Method

Next url is produced for filtering, sorting and pagination.

`?filter=lastName=in:Doe,Jones;firstName=in:John,Harry&order=+firstName,-lastName&skip=100&take=50`

   How to make a custom contract?

Override `serialize` method to change request output.

```typescript
@Component({
   selector: 'my-component',
   template: `
     <q-grid [model]="gridModel">
       <q-grid-rest [url]="myServiceUrl" method="POST"></q-grid-rest>
     </q-grid>
   `
})
export class MyComponent implements AfterViewInit {
   gridModel = this.qgrid.model();
   myServiceUrl = 'http://localhost:4000/exampleData'

   constructor(private qgrid: Grid) {}

   ngAfterViewInit() {
      this.gridModel.rest({
        serialize: () => {
            const pagination = model.pagination();
            const sort = model.sort();
            const filter = model.filter();

            return {
               filter: filter.by,
               order: sort.by.map(s => {
                  const key = Object.keys(s)[0];
                  const value = s[key];
                  return (value === 'asc' ? '+' : '-') + key;
               }),
               skip: pagination.current * paginationState.size,
               take: pagination.size
            };
      });
   }
}
```

   Suggested Links

* [How to propagate list of items to the column filter from the server?](/feature/filtering.html#How-to-propagate-list-of-items-to-the-column-filter-from-the-server)

branch_name: refs/heads/dev

gha_language: SCSS


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [@firebase/functions](./functions.md)

## functions package

## Functions

|  Function | Description |
|  --- | --- |
|  [getFunctions(app, region)](./functions.getfunctions.md) | Returns a Functions instance for the given app. |
|  [httpsCallable(functionsInstance, name, options)](./functions.httpscallable.md) | Returns a reference to the callable https trigger with the given name. |
|  [useFunctionsEmulator(functionsInstance, origin)](./functions.usefunctionsemulator.md) | Changes this instance to point to a Cloud Functions emulator running locally. See https://firebase.google.com/docs/functions/local-emulator |

gha_language: TypeScript


text:
# Contributing

What rules you need to follow to contribute to this project in order to
make everyone happy.

### First issues
Actually every issue is pretty much good as first issue, since the
code still looks very easy and clean. You can take a look at
[issues](https://github.com/shikaan/titef/issues) or at
[projects](https://github.com/shikaan/titef/projects) if you don't
know where to start.

### Pull Request
Every Pull Request should be made filling the precompiled form, which
is supposed to guide the contributor to explain clearly what has been
done,cwhy it has been done and what's left. Suggestions to edit the
[Pull Request Template](./PULL_REQUEST_TEMPLATE.md) are always welcome.

Along with this evey pull request should be linted and tested.

Testing can de dodgy: how can you test something which is supposed to
test? So I didn't put any real bottleneck: every Pull Request will be
evaluated on its own.

### Bug Report
Golden rule: do not only explain what you were doing, but also explain
how you were doing it. Any screen shot, link, gif, log or whatever is
greatly appreciated!

Also, check if any bug has already been reported and give it a `+1`:
this way we'll understand what we need to focus on. Bugs with higher
scores will be addressed earlier.

### Feature request
There's a lot to be done! If you come up with any idea please let us
know, but please - again - check if such feature has already been
requested. If that's the case, give it a `+1`: feature with higher
score will be addressed earlier.

repository: shikaan/titef

repo_name: shikaan/titef