text:
register admin endpoint (`/_synapse/admin/v1/register`) when the `mac` field was not provided. The endpoint now properly returns a 400 error. Contributed by @edwargix. ([\#8837](https://github.com/matrix-org/synapse/issues/8837))
- Fix a long-standing bug on Synapse instances supporting Single-Sign-On, where users would be prompted to enter their password to confirm certain actions, even though they have not set a password. ([\#8858](https://github.com/matrix-org/synapse/issues/8858))
- Fix a longstanding bug where a 500 error would be returned if the `Content-Length` header was not provided to the upload media resource. ([\#8862](https://github.com/matrix-org/synapse/issues/8862))
- Add additional validation to pusher URLs to be compliant with the specification. ([\#8865](https://github.com/matrix-org/synapse/issues/8865))
- Fix the error code that is returned when a user tries to register on a homeserver on which new-user registration has been disabled. ([\#8867](https://github.com/matrix-org/synapse/issues/8867))
- Fix a bug where `PUT /_synapse/admin/v2/users/<user_id>` failed to create a new user when `avatar_url` is specified. Bug introduced in Synapse v1.9.0. ([\#8872](https://github.com/matrix-org/synapse/issues/8872))
- Fix a 500 error when attempting to preview an empty HTML file. ([\#8883](https://github.com/matrix-org/synapse/issues/8883))
- Fix occasional deadlock when handling SIGHUP. ([\#8918](https://github.com/matrix-org/synapse/issues/8918))
- Fix login API to not ratelimit application services that have ratelimiting disabled. ([\#8920](https://github.com/matrix-org/synapse/issues/8920))
- Fix bug where we ratelimited auto joining of rooms on registration (using `auto_join_rooms` config). ([\#8921](https://github.com/matrix-org/synapse/issues/8921))
- Fix a bug where deactivated users appeared in the user directory when their profile information was updated. ([\#8933](https://github.com/matrix-org/synapse/issues/8933), [\#8964](https://github.com/matrix-org/synapse/issues/8964))
- Fix bug introduced in Synapse v1.24.0 which would cause an exception on startup if both `enabled` and `localdb_enabled` were set to `False` in the `password_config` setting of the configuration file. ([\#8937](https://github.com/matrix-org/synapse/issues/8937))
- Fix a bug where 500 errors would be returned if the `m.room_history_visibility` event had invalid content. ([\#8945](https://github.com/matrix-org/synapse/issues/8945))
- Fix a bug causing common English words to not be considered for a user directory search. ([\#8959](https://github.com/matrix-org/synapse/issues/8959))
- Fix bug where application services couldn't register new ghost users if the server had reached its MAU limit. ([\#8962](https://github.com/matrix-org/synapse/issues/8962))
- Fix a long-standing bug where a `m.image` event without a `url` would cause errors on push. ([\#8965](https://github.com/matrix-org/synapse/issues/8965))
- Fix a small bug in v2 state resolution algorithm, which could also cause performance issues for rooms with large numbers of power levels. ([\#8971](https://github.com/matrix-org/synapse/issues/8971))
- Add validation to the `sendToDevice` API to raise a missing parameters error instead of a 500 error. ([\#8975](https://github.com/matrix-org/synapse/issues/8975))
- Add validation of group IDs to raise a 400 error instead of a 500 eror. ([\#8977](https://github.com/matrix-org/synapse/issues/8977))

Improved Documentation
----------------------

- Fix the "Event persist rate" section of the included grafana dashboard by adding missing prometheus rules. ([\#8802](https://github.com/matrix-org/synapse/issues/8802))
- Combine related media admin API docs. ([\#8839](https://github.com/matrix-org/synapse/issues/8839))
- Fix an error in the documentation for the SAML username mapping provider. ([\#8873](https://github.com/matrix-org/synapse/issues/8873))
- Clarify comments around template directories in `sample_config.yaml`. ([\#8891](https://github.com/matrix-org/synapse/issues/8891))
- Move instructions for database setup, adjusted heading levels and improved syntax highlighting in [INSTALL.md](../INSTALL.md). Contributed by @fossterer. ([\#8987](https://github.com/matrix-org/synapse/issues/8987))
- Update the example value of `group_creation_prefix` in the sample configuration. ([\#8992](https://github.com/matrix-org/synapse/issues/8992))
- Link the Synapse developer room to the development section in the docs. ([\#9002](https://github.com/matrix-org/synapse/issues/9002))

Deprecations and Removals
-------------------------

- Deprecate Shutdown Room and Purge Room Admin APIs. ([\#8829](https://github.com/matrix-org/synapse/issues/8829))

Internal Changes
----------------

- Properly store the mapping of external ID to Matrix ID for CAS users. ([\#8856](https://github.com/matrix-org/synapse/issues/8856), [\#8958](https://github.com/matrix-org/synapse/issues/8958))
- Remove some unnecessary stubbing from unit tests. ([\#8861](https://github.com/matrix-org/synapse/issues/8861))
- Remove unused `FakeResponse` class from unit tests. ([\#8864](https://github.com/matrix-org/synapse/issues/8864))
- Pass `room_id` to `get_auth_chain_difference`. ([\#8879](https://github.com/matrix-org/synapse/issues/8879))
- Add type hints to push module. ([\#8880](https://github.com/matrix-org/synapse/issues/8880), [\#8882](https://github.com/matrix-org/synapse/issues/8882), [\#8901](https://github.com/matrix-org/synapse/issues/8901), [\#8940](https://github.com/matrix-org/synapse/issues/8940), [\#8943](https://github.com/matrix-org/synapse/issues/8943), [\#9020](https://github.com/matrix-org/synapse/issues/9020))
- Simplify logic for handling user-interactive-auth via single-sign-on servers. ([\#8881](https://github.com/matrix-org/synapse/issues/8881))
- Skip the SAML tests if the requirements (`pysaml2` and `xmlsec1`) aren't available. ([\#8905](https://github.com/matrix-org/synapse/issues/8905))
- Fix multiarch docker image builds. ([\#8906](https://github.com/matrix-org/synapse/issues/8906))
- Don't publish `latest` docker image until all archs are built. ([\#8909](https://github.com/matrix-org/synapse/issues/8909))
- Various clean-ups to the structured logging and logging context code. ([\#8916](https://github.com/matrix-org/synapse/issues/8916), [\#8935](https://github.com/matrix-org/synapse/issues/8935))
- Automatically drop stale forward-extremities under some specific conditions. ([\#8929](https://github.com/matrix-org/synapse/issues/8929))
- Refactor test utilities for injecting HTTP requests. ([\#8946](https://github.com/matrix-org/synapse/issues/8946))
- Add a maximum size of 50 kilobytes to .well-known lookups. ([\#8950](https://github.com/matrix-org/synapse/issues/8950))
- Fix bug in `generate_log_config` script which made it write empty files. ([\#8952](https://github.com/matrix-org/synapse/issues/8952))
- Clean up tox.ini file; disable coverage checking for non-test runs. ([\#8963](https://github.com/matrix-org/synapse/issues/8963))
- Add type hints to the admin and room list handlers. ([\#8973](https://github.com/matrix-org/synapse/issues/8973))
- Add type hints to the receipts and user directory handlers. ([\#8976](https://github.com/matrix-org/synapse/issues/8976))
- Drop the unused `local_invites` table. ([\#8979](https://github.com/matrix-org/synapse/issues/8979))
- Add type hints to the base storage code. ([\#8980](https://github.com/matrix-org/synapse/issues/8980))
- Support using PyJWT v2.0.0 in the test suite. ([\#8986](https://github.com/matrix-org/synapse/issues/8986))
- Fix `tests.federation.transport.RoomDirectoryFederationTests` and ensure it runs in CI. ([\#8998](https://github.com/matrix-org/synapse/issues/8998))
- Add type hints to the crypto module. ([\#8999](https://github.com/matrix-org/synapse/issues/8999))

**Changelogs for older versions can be found [here](CHANGES-2020.md).**

repository: matrix-org/synapse

branch_name: refs/heads/develop

gha_language: Python

repo_name: matrix-org/synapse


text:
---
title: "Capabilities"
permalink: /manifesto/capabilities/
excerpt: "AEM stands for Experience"
modified: 2016-11-03T10:01:43-04:00
author<EMAIL_ADDRESS>redirect_from:
  - /manifesto/principles
---

{% include toc_sticky.html %}

AEM stands for Experience, its the primary differentiating factor that separate it from other products.

Please note that images depicted in this section are from AEM6.

## Tags

[Tags](https://docs.adobe.com/docs/en/cq/current/wcm/tag_admin.html) must be used to classify content within CMS. Tags structured in namespaces provide a flexible and extendable layer when designing [metadata](https://docs.adobe.com/docs/en/aem/6-0/administer/content/assets/metadata.html) for assets and content. The OOB components associated with Tags provide simple and effective authoring experience and should be used to drive Authoring Experience where Lists and Arbitrary Structures are required on dialogs. Management of Tags in AEM allows ability for the Business users to extend their content experience without needing to update code.

![image alt text](/assets/images/manifesto/capabilities-tags.png)

## Digital Asset Management

The term [Assets](https://dev.day.com/docs/en/aem/6-0/administer/content/assets.html) in AEM also know as DAM in short refers to the Digital Asset Management capability. Its primary use is to share and distribute assets within an organisation. As DAM is integrated into AEM platform the images from DAM can seamlessly used in the Authoring experience.

![image alt text](/assets/images/manifesto/capabilities-dam.png)

### Asset Metadata

Asset Metadata is additional data for the image, it enriches user experience as the information for the image is stored with the image and can be reused by component in places where its appropriate. For example a metadata description field if entered would appear in an Image component to convey additional information to the viewer.

![image alt text](/assets/images/manifesto/capabilities-dam-metadata.png)

### Asset Renditions

Asset renditions allow you to generate using a workflow or manually upload renditions for an asset.

![image alt text](/assets/images/manifesto/capabilities-dam-renditions.png)

### Asset Share

[Asset Share Commons](https://adobe-marketing-cloud.github.io/asset-share-commons/) is an alternative way of presenting DAM library to consumers. It is best used when delivering DAM access to 3rd Party and External customers.

![image alt text](/assets/images/manifesto/capabilities-dam-share.png)

## Experience Manager Dashboard

Project dashboard should be used to tailor the presentation for authors. Each Outport should have a Tile (Project) created that will contain relevant information and links to relevant areas that they frequently use.

![image alt text](/assets/images/manifesto/capabilities-ui.png)

### Projects Dashboard

Project dashboard should be used to tailor the presentation for authors. Each Outport should have a Tile (Project) created that will contain relevant information.

![image alt text](/assets/images/manifesto/capabilities-projects.png)

### Projects - Experiences

Links to relevant areas for Content Authors while they are working on a campaign project. A calendar view allows author to see when projects are due.

![image alt text](/assets/images/manifesto/capabilities-projects-experience.png)

## Authoring Experience

### Page Editor

Desktop and Mobile authoring interface for Pages.

![image alt text](/assets/images/manifesto/capabilities-sites-editor.png)

branch_name: refs/heads/master

extension: md

gha_language: HTML

license_type: permissive


text:
# HEvents: An Event Sourcing Library for Haskell

The goal of this library is to make it easy to develop and deploy production grade (micro-)services based on *event sourced* model.
Each such service should be easily constructed and include the following:

* A underlying *business model* expressed as a pure data structures to which can be sent *Commands* and applied *Events*,
* Atomic application of some commands to underlying model,
    * Possibly with wrapping it in remote request,
* Storage of generated events in append-only data source with choice of underlying storage medium:
    * In memory list of events,
    * Local file,
    * Remote server,
* Call to other services as a client,
* Error handling in a consistent way,
* Web interface to the service,
* Logging,
* Metrics and monitoring,
* Testing,
* Packaging,
* ...

The overarching principle is to expose each feature as a mini-DSL and compose them using extensible-effects approach.

license: MIT

repository: capital-match/hevents

repo_name: capital-match/hevents


text:
---
layout: post
# 'status' is the main flag of where the post will appear.
# status is 'draft' or 'publish'
status: publish
title: BulletSim Notes
author:
  display_name: Misterblue
  login: Misterblue
  email<EMAIL_ADDRESS>  url: http://misterblue.com
author_login: Misterblue
author_email<EMAIL_ADDRESS>author_url: http://misterblue.com
date: 2016-10-20 11:22:20   # SET DATE
# categories: OpenSimulator, Basil, Fun and Weird, Programming, LookingGlass, Travel
#      Thoughts, Life, Meta, Family, Photography
categories:
- OpenSimulator
# 'comments: true' is needed for Disqus. 'static-comments' is legacy, imbedded comments.
comments: true
# static-comments:
# - id: 100   # unused number
#   author: AUTHOR-HANDLE
#   author_email: AUTHOR-EMAIL
#   author_url:
#   date: 2004-10-09 09:22:40  # SET DATE
#   content: COMENT TEXT
# - id: 101
#   author: Misterblue
#   author_email<EMAIL_ADDRESS>#   author_url: http://www.misterblue.com
#   date: 2004-10-10 07:23:13
#   content: >-
#     COMMENT TEXT
# http://www.emoji-cheat-sheet.com/
#  Faces: :smiley: :blush: :sleeping: :confounded: :innocent: :sunglasses: :sleepy:
---
A while back I sent an email describing some of the features of BulletSim --
the physics engine I did for [OpenSimulator]. This is useful information so
it should be on the web somewhere:

The C# part of BulletSim can be in addin-modules -- it doesn't need to be'in core'
but needs to be built with core so it can be an addin module.

There is a separate OpenSimulator source tree... opensim-libs at
"git://opensimulator.org/git/opensim-libs" that has a bunch of the non-core parts of
OpenSimulator (http server, old and ancient other tries at he physics engine, ...).
The C++ portion of BulletSim is in 'opensim-libs/trunk/unmanaged/BulletSim' and
there are the instructions for fetching the Bullet sources, patching same,
and then building with the interface to the C# code).
The C++ wrapper mostly deals with passing the structures back and forth between
the C# and C++ code (pinned memory for the position updates and collisions,
copying meshes in arrays of floats, ...)

The BulletSim design is around making a simulation step be only one transition
between C# and C++.
So, under normal running conditions, there is only one transition per simulation
step and the data (position updates and collisions) are passed in pinned memory
so there is no copy.
98% of the C# code deals with doing and adapting Bullet to what OpenSimulator
required (link sets (ugh!), ...). The C# -> C++ interface for BulletSim is rather
large... physics engines seem to have lots of calls for all their features
Bullet, for instance, has what seems like zillions of methods of changing
constraint parameters I made those appear in the interface to C#.
If I had it to do over again, I'd probably go more with a functional design
where there is a "call a named function with parameter blob" design so the C#/C++
interface was smaller and new function could be added without changing the
binding of the DLL then use some fancy reflection to build the binding on both sides

The .NET C#/C++ binding is pretty good except that ints and booleans change
size between 32 and 64bits... if you look at the BulletSim interface you'll
see I use floats and arrays of floats everywhere because they are always 32 bit.

I recently played with building "BulletThrift"... a version of BulletSim that
uses Thrift to call a remote process physics engine (experiment in distributed physics).
It didn't get finished mainly because the existing interface to the C++ module
is so large.
BulletSim actually has a HAL to access the physics engine and there are two
physics engines: the C++ Bullet and a C# port of Bullet.
The latter was last used by Nebadon to run OpenSimulator on a Raspberry PI.
But this also means it is easy to add a link to a remote Bullet.
That's where I was going to add BulletThrift that would call across the network
to a remote Bullet server.
My main reason for doing this was to be able to run Bullet in a pure C++ environment
where debugging wouldn't be complicated by the managed/unmanaged environment.

If you distributed the physics engine, operationally, I'd expect you'd see some of
the things that happen when running BulletSim on its own thread like jitter caused
when there is a 'beat' between the physics simulation time and the simulator heartbeat.
BulletSim running on its own thread means that the physics engine is called on
its own thread and  the passing back of collisions and position updates happens
when the simulator heartbeat thread calls into the physics engine.

[OpenSimulator]: http://opensimulator.org/


text:
### tuktu.processors.sample.DropProcessor
Drops some data packets (or datums) before sending through.

  * **id** *(type: string)* `[Required]`

  * **result** *(type: string)* `[Required]`

  * **config** *(type: object)* `[Required]`

    * **amount** *(type: int)* `[Required]`
    - The amount of data packets (or datums) to drop.

    * **datums** *(type: boolean)* `[Optional, default = false]`
    - If set to true, the drop is done on datums inside a DP, if set to false, it is performed on DPs.


text:
NOTE: In this tutorial, I tried to be lenient in grading, especially in the **a ** and **e ** sections

### **Rubric**

|           | a    | b    | c    | d    | e    | f    |
| --------- | ---- | ---- | ---- | ---- | ---- | ---- |
| Points    | 2    | 1    | 1    | 2    | 3    | 1    |
| Total =10 |      |      |      |      |      |      |

### **Answers**

a:  In eukaryotic DNA, the sequence is **ATG**; in RNA it is **AUG**. So both answers are accepted although the best answer for this question is **ATG**

b:  **chrX:49,258,505**

#name	cdsStart	cdsEnd	exonCount

ENST00000376227.4	49235636	49250261	17

**ENST00000376207.9**	49251333	**49258505**	12

ENST00000376199.7	49251333	49258505	11

ENST00000651307.1	49251724	49258505	10

ENST00000455775.7	49251333	49258505	11

ENST00000518685.6	49251333	49258505	10

ENST00000376197.1	49251333	49259240	10

ENST00000557224.6	49251333	49258505	10

ENST00000652559.1	49256788	49258505	5

ENST00000650877.1	49258342	49258505	4

ENST00000651462.1	49262865	49262865	3

c: AGGACCCG

d:

- 3 first: gtg
- 3 last: cag

e: Yes. There is only ONE SNP in the coding region:

- **ID**: rs2232367
- **Position:** [chrX:49256855](https://genome.ucsc.edu/cgi-bin/hgTracks?hgsid=945089791_zFU0ffPM8Ty6CGXkkxLFmbhd060N&db=hg38&position=chrX%3A49256855-49256855)
- **Class**: single

f: NO!

if you have selected other isoforms, it is also accepted to report **all these** as well (NOT one or part of them) :

- rs2232368
- rs58119150
- rs11465471
- rs782189417
- rs201474125

Since these are in the intronic region, they do not have impact on amino acid sequence

path: /Tutorial 6/Solution.md


text:
The game idea is based on logic gates like AND, OR, NOT, and XOR.

<!--## [CLICK HERE to Play using WebGL technology](http://angsila.cs.buu.ac.th/~57160041/games/Light%20the%20Ball/)-->
## You can now [play on Kongregate](http://www.kongregate.com/games/off99555/light-the-ball)!
[Read Detailed How-to-play here](HOW_TO_PLAY.txt)

## Disclaimer
The game is far from finished. This is the only prototype version which has only
6 levels of randomness.


text:
# Wallet
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/polarbit/bluelabs-wallet)

## Implementation Notes
- a REST api is provided with minimal endpoints (echo)
- I made use of a sql database (postgres) to achieve consistency
- consistency is achieved by optimistic concurrency and unique keys (via sql database)
- idempotency is achieved by "fingerprint" value (api returns http conflict 409 in case of retry)
- implemented a cli style app (cobra)
- unit tests are written for service package
- integration tests are written for api and db packages

## How to Run
- You need go:1.17, docker and docker-compose
- First run the database server     `$ docker-compose up -d`
- Create the database and tables    `$ go run . db --initdb`
- Run unit tests                    `$ go test ./... -v`
- Run integration tests             `$ go test ./... -v -tags integration`
- Run the api                       `$ go run . api`
- Repository can also be opened and run on GitPod (free, but login required).

## Enpoints

##### Create Wallet
- `POST /wallets`
- *externalid* value should be unique, enables idempotency
- *labels* is a string dictionary to attach metadata
- response json includes *id* (int)
- request:
```json
{
    "externalId" : "userid-123",
    "labels" : {
        "somekey" : "somevalue"
    }
}
```

##### Get Wallet
- `GET  /wallets/:id`
- response:
```json
{
    "id": 9180,
    "labels" : {
        "somekey" : "somevalue"
    },
    "externalId" : "userid-123",
    "created" : "2021-09-07T01:42:00"
}
```

##### Add Transaction
- `POST  /wallets/:id/transactions`
- *amount* may be negative or positive (should be <= -1.0 or >=1.0)
- *fingerprint* should be unique, enables idempotency
- *labels* is a string dictionary to attach metadata
- request1:
```json
{
    "amount" : 10.0,
    "fingerprint" : "TX123A001",
    "labels" : {
        "couponId" : "10004871",
        "reason": "prize"
    },
    "description" : "won ticket #10004870"
}
```
- request2:
```json
{
    "amount" : -5.0,
    "fingerprint" : "job-0018254",
    "labels" : {
        "paypal_referenceid" : "PP00CX098",
        "reason": "withdraw",
        "withdraw_target" : "paypal",
        "withdraw_jobid" : "job-0018254"
    },
    "description" : "won ticket #10004870"
}
```

##### Get Latest Transaction
- `GET  /wallets/:id/transactions/latest`
- returs latest transaction of the requested wallet
- *refno:* a transaction sequence number per wallet, strengthens consistency
- response:
```json
{
    "id" : "{uuid}",
    "refno" : 2,
    "amount" : 10.0,
    "fingerprint" : "TX123A001",
    "labels" : {
        "couponId" : "10004871",
    },
    "description" : "won ticket #10004870",
    "created" : "{timestamp}",
    "oldbalance" : 25.0,
    "newbalance" : 35.0
}
```

##### Get Balance
- `GET  /wallets/:id/balance`
- returs current balance of the requested wallet
- only return a float value; not a json object
```json
35.0
```

## Other Notes

#### Run tests
```bash
$ go test ./...  -v
$ go test ./...  -v -tags integration
# if integration tests run; unit tests will not run (using build tags)
# Integration tests use same database with api : walletdb.
# You can use different database for integration tests
$ DB_DATABASE="postgresql://postgres:1234@localhost/testdb" go test ./... -v -tags integration
```

#### Create and Drop database
```bash
go run . db --initdb
go run . db --dropdb
```

#### Environment Variables
```bash
$ DB_DATABASE="postgresql://postgres:1234@localhost/testdb"
$ LOGLEVEL=info
```

### Refactor TODO
- In api integrationt tests, only happy path is implemented. Implement the rest.
- Use pgx connection pooling in repository
- Run validations also at wallet service (validations only run at api handlers at the moment)

### Missing & Possible Features
- Void a recent transaction
- Get wallet by external id
- Get transaction by fingerprint
- Search wallets by label
- Search transactions by label
- List transactions by wallet
- Publish external events (WalletCreated, TransactionCreated, BalanceChanged, TransactionVoid)
- Technical:
  - enable api authentication
  - enable OpenAPI/Swagger definitions and discovery
  - enable healtcheck and metrics endpoints (may include custom metrics)
  - implement tracing for critical endpoints

## Design Question: Withdraw Money to Paypal Account
I designed and sketched a timeline flow. You can find at places below:
- Design Url: https://excalidraw.com/#json=4622116301307904,MA0O2YePaZ-fPR8wce1xzw
- Also the file named *"withdraw-money-design.svg"* in the repository:

repository: polarbit/bluelabs-wallet

repo_name: polarbit/bluelabs-wallet


text:
# GTM DevTools Sidebar Panes
Google Chrome extension which displays Google Tag Manager sidebar panes in Chrome Developer Tools.

![GTM DevTools Sidebar Panes
Google Chrome extension which](images/tile-728-280.png)

## Usage
This extension will add sidebar panes to the elements panel of Chrome Developer Tools.

### GTM Macros pane
You can use this extension to debug or check the macros inside the Google Tag Manager object of the current page. The GTM Macros pane shows all available macros including the latest event tracking data when available:

![GTM Macros pane](images/gtm-macros-pane.png)

### GTM Datalayer pane
The GTM Datalayer pane gives easy access to the objects inside the dataLayer (when available inside the DOM):

![GTM Datalayer pane](images/gtm-datalayer-pane.png)

### GTM Event Listeners pane
The GTM Event Listeners pane gives easy access to registered GTM auto-events (Click Listener, Link Click Listener, Form Submit Listener) inside the debugDL object. To use this pane you have to install and use the [GTM Sonar Chrome extension][5] by Simo Ahava.

![GTM Event Listeners pane](images/gtm-event-listeners-pane.png)

Panes will be updated by clicking DOM elements inside the elements panel or by switching between sidebar panes.

## Install
Download and install this extension from the [Chrome Web Store][1].

## Issues
Have a bug? Please create an [issue][2] here on GitHub!

## Contributing
Want to contribute? Great! Just fork the project, make your changes and open a [pull request][3].

## Changelog
### 0.2 (May 26, 2014):
 * Added GTM Event Listeners pane.
 * Panes will also be updated by switching between sidebar panes.

### 0.1 (May 12, 2014):
 * Initial release.

## License
Licensed under the MIT license.

Copyright (c) 2014 [Sander Heilbron][4]

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.

[1]: https://chrome.google.com/webstore/detail/gtm-devtools-sidebar-pane/nlpchkkljkimifenglmblhnklbngejfh
[2]: https://github.com/sanderheilbron/gtm-devtools-sidebar-panes/issues
[3]: https://github.com/sanderheilbron/gtm-devtools-sidebar-panes/pulls
[4]: http://www.sanderheilbron.nl
[5]: https://chrome.google.com/webstore/detail/gtm-sonar/iiihoahkpncaheicjfemhjkkfamcahcd


text:
## Python QML Integration

In this sample code, UI is designed in QML and integrated with python project
using PySide2. When user click on the button, humidity and temperature is read
from SHT3x kernel space driver (assuming it is already set with address 0x44)
and shown to the user on GUI.

It contains a docker file to create an image out of it that is compatible
with armhf architecture.  For building the image:
```
docker build --pull . -t <image name:tag>
```
Image built with this docker file is based on Qt Wayland container. Before
running it, Weston container is needed to be run in the device which will be the graphics
server.  Now temperature and
humidity can be read by clicking on the button.

license: Unlicense

repository: toradex/torizon-samples

branch_name: refs/heads/bookworm

gha_language: C#

gha_license_id: Unlicense

repo_name: toradex/torizon-samples


text:
---
title: "Detect, Investigate, Diagnose: Configuring Care in the Context of AIDS
  and Ebola Epidemics"
permalink: programmes/lectures/detect-investigate-diagnose/
cata: spillover
catb: documenting
thumb: /static/img/M_EXHIBIT_QUA_ATNVIS_1.jpg
cover: /static/img/sn_adiabenton.png
date: 2021-05-22T13:00:00.000Z
description: >-
  COVID-19 has transformed the ways in which social, cultural, political, and
  economic factors influence the way a people and the state respond to health
  crises. The politics of healthcare are complex and differ from country to
  country, population to population. The histories and anthropologies of
  epidemics have become increasingly urgent to study, so that we may better
  prepare ourselves for the future.

  Drawing on ethnographic and historical research on HIV/AIDS care and support and the 2014-16 epidemic of Ebola in Sierra Leone, Benton will address some political-economic factors underpinning epidemic response, as well as the means by which state and non-state actors configure care during an epidemic.
link: ""
reclink: https://youtu.be/FfsvbzWi0Qk
expertname: Adia Benton
expertbio: "Adia Benton is an associate professor of Anthropology and African
  Studies at Northwestern University, where she is affiliated with the Science
  in Human Culture Program. She is the author of the award-winning book, HIV
  Exceptionalism: Development through Disease in Sierra Leone, and is currently
  writing a book about the West African Ebola outbreak. More broadly, she
  studies the political, economic and historical factors shaping how care is
  provided in complex humanitarian emergencies and in longer-term development
  projects—like those for health."
expertpic: /static/img/pl_adia_portrait.png
readinglist:
  - quadreadlink: https://www.lrb.co.uk/the-paper/v37/n10/paul-farmer/the-caregivers-disease
    quadreadtxt: " The Caregivers' Disease"
    quadreadvis: /static/img/L_PL_QUA_READVIS_1.jpg
  - quadreadlink: http://somatosphere.net/2020/writing-life-mbullo-benton-interview.html/
    quadreadtxt: "Writing Life: An Interview With Adia Benton"
    quadreadvis: /static/img/L_PL_QUA_READVIS_2.jpg
  - quadreadlink: https://theconversation.com/five-ways-coronavirus-is-deepening-global-inequality-144621
    quadreadtxt: Five Ways Coronavirus Is Deepening Global Inequality
    quadreadvis: /static/img/L_PL_QUA_READVIS_3.jpg
listeninglist:
  - quadlistlink: https://open.spotify.com/episode/1WLYepdVNjkbP3H5I0etuv
    quadlisttxt: Ebola in West Africa with Adia Benton
    quadlistvis: /static/img/L_PL_QUA_LISTVIS_1.jpg
  - quadlistlink: https://open.spotify.com/episode/73CGr2bTBnkKfTFHRBbqEG
    quadlisttxt: Conversations in Anthropology
    quadlistvis: /static/img/L_PL_QUA_LISTVIS_2.jpg
  - quadlistlink: https://open.spotify.com/episode/72r64GdFJBftk7kt2Tu1hB
    quadlisttxt: Ebola Outbreaks in West Africa
    quadlistvis: /static/img/L_PL_QUA_LISTVIS_3.jpg
watchinglist:
  - quadwatchlink: https://www.pbs.org/wgbh/frontline/film/outbreak/
    quadwatchtxt: Outbreak
    quadwatchvis: /static/img/L_PL_QUA_WATCHVIS_1.jpg
  - quadwatchlink: https://www.youtube.com/watch?v=GKZ9xJnpe0U
    quadwatchtxt: "Perspectives on the Pandemic: An Anthropologists View"
    quadwatchvis: /static/img/L_PL_QUA_WATCHVIS_2.jpg
eventlist:
  - quadeventlink: https://nowtransmitting.com/programmes/films/a-human-question/
    quadeventtxt: A Human Question | Film Discussion
    quadeventvis: /static/img/fs_jayashree_thumbnail.png
  - quadeventtxt: "Control, Consensus, Chaos: The Global Response to the Pandemic |
      Lecture by Sheila Jasanoff"
    quadeventvis: /static/img/pl_sheila.jpg
    quadeventlink: https://nowtransmitting.com/programmes/lectures/control-consensus-chaos/
relatedlist:
  - quadrelatedtxt: Controlling the Plague in British India by Christos Lynteris
    quadrelatedlink: https://nowtransmitting.com/exhibits/plague-british-india/
    quadrelatedvis: /static/img/C_EXHIBIT_QUA_EXPVIS_1.jpg
---

repository: rndexe/nowtransmitting

repo_name: rndexe/nowtransmitting


text:
# Validator Monitoring

Prometheus, Grafana, and Alert Manager are a good stack to monitor the validator node performance. A comprehensive step-by-step setup process is [documented in an official wiki](https://wiki.polkadot.network/docs/en/maintain-guides-how-to-monitor-your-node).

A fellow validator uses the same monitoring stack and publish a [Medium blogpost](https://medium.com/bld-nodes/monitoring-substrate-node-polkadot-kusama-parachains-validator-guide-922734ea4cdb). It is quite similar to the official guide, but does a better job in explaining the conceptual framework and how different pieces fit together.

I also recommend a log monitoring system to gain more visibility into the node performance. Logs are especially helpful when you go trouble-shooting. I use Promtail to collect logs on validator server and Loki to receive these logs and feed into Grafana on the monitoring server.

repository: polkachu/validator-resources

gha_license_id: MIT

repo_name: polkachu/validator-resources


text:
# Turku neural parser pipeline
A neural parsing pipeline for segmentation, morphological tagging, dependency parsing and lemmatization with pre-trained models for more than 50 languages. Accuracies for all languages, see TurkuNLP at http://universaldependencies.org/conll18/results.html.

## Finnish neural dependency parser

A new take on the trusty old Finnish-dep-parser. The current pipeline is fully neural and has a substantially better accuracy in all layers of annotation. These are the current numbers, measured using the CoNLL18 ST evaluation script on Finnish-TDT UD ver 2.2 data. This is the "fi_tdt" model distributed with the parser

```
Metric     | Precision |    Recall |  F1 Score | AligndAcc
-----------+-----------+-----------+-----------+-----------
Tokens     |     99.74 |     99.63 |     99.69 |
Sentences  |     88.55 |     85.02 |     86.75 |
Words      |     99.74 |     99.63 |     99.69 |
UPOS       |     96.63 |     96.52 |     96.57 |     96.88
XPOS       |     97.66 |     97.55 |     97.61 |     97.92
UFeats     |     95.47 |     95.36 |     95.41 |     95.71
AllTags    |     94.03 |     93.92 |     93.97 |     94.27
Lemmas     |     95.30 |     95.19 |     95.24 |     95.54
UAS        |     89.04 |     88.94 |     88.99 |     89.27
LAS        |     86.53 |     86.43 |     86.48 |     86.75
CLAS       |     85.24 |     85.21 |     85.22 |     85.46
MLAS       |     79.86 |     79.83 |     79.85 |     80.07
BLEX       |     81.07 |     81.04 |     81.05 |     81.27
```

Without lemmatization, the throughput of the parser is on the order of 250 sentences a second on a GPU. Lemmatization is currently a major bottleneck and needs special treatment when the data sizes are massive.

# Installation

## Download the code

Clone the parser as well as all of its submodules as follows:

    git clone https://github.com/TurkuNLP/Turku-neural-parser-pipeline.git
    cd Turku-neural-parser-pipeline
    git submodule update --init --recursive

## Setup Python environment

We highly recommend that you make a virtual environment for the parser:

    python3 -m venv venv-parser-neural
    source venv-parser-neural/bin/activate

Then you need to install the necessary libraries:

    pip3 install -r requirements-gpu.txt

or

    pip3 install -r requirements-cpu.txt

## Install pytorch

In case pytorch would not install correctly through pip, you may need to install PyTorch by selecting the appropriate options from https://pytorch.org/. For a typical
GPU install you would select something like "Linux - pip - 3.5 - CUDA 9.1" matching the version of your python and CUDA.
If you run on CPU and have no CUDA, then select None.

1. Run the `commands which pytorch.org gives`
2. Run yet `pip3 install torchtext` when (1) is ready and you're done

## Download the models

All models are available [here](http://bionlp-www.utu.fi/dep-parser-models) and you can use the following utility script to fetch the model you need:

    python3 fetch_models.py fi_tdt

# Running the parser

The parser has these properties:

* a long start-up cost when it's loading the models (see the server mode to prevent model reloading)
* very fast when parsing large documents because of the mini-batch style of computing
* efficient use of GPU, about 5x faster than the previous Finnish-dep-parser (which could not use GPU for anything)
* transparent passing through metadata

## Metadata in input

In the input data, all lines which start with `###C:` are treated as metadata and will be passed through the pipeline unmodified, and attached in the conllu output to the following sentence. This is an easy way to pass metadata through the pipeline. Note that since the conllu format attaches metadata to sentences, the last line of a file cannot be the `###C:` comment. It is fine to have several comment lines one after another.

## Pipelines

Various pipelines can be built out of the components of the parser and these are generally defined in model_directory/pipelines.yaml. You can also list what you have like so:

    python3 full_pipeline_stream.py --conf models_fi_tdt/pipelines.yaml list

For Finnish these are:

* `parse_plaintext` read plain text, tokenize, split into sentences, tag, parse, lemmatize
* `parse_sentlines` read text one sentence per line, tokenize, tag, parse, lemmatize
* `parse_wslines` read whitespace tokenized text one sentence per line, tag, parse, lemmatize
* `parse_conllu` read conllu, wipe existing values from all columns, tag, parse, lemmatize
* `parse_conllu_nolemmas` read conllu, wipe existing values from all columns, tag, parse
* `tokenize` read plain text, tokenize, split into sentences

Other pipelines (which skip some of these steps etc) can be built easily by mimicking the existing pipelines in the `pipelines.yaml` (also see below). If you wish to run conllu input without wipe_mod (which wipes existing values from all columns), note that lemmatizer modules are designed to pass existing lemma values through unchanged and lemmatize only words with empty lemma field (`_`).

## Stream mode

In the stream mode `full_pipeline_stream.py`, the parser reads from stdin, outputs to stdout. You need to give it the file with pipelines and you need to tell it which pipeline to run (parse_plaintext is the default). So you can run the parser as:

    cat myfile.txt | python3 full_pipeline_stream.py --conf models_fi_tdt/pipelines.yaml --pipeline parse_plaintext > myfile.conllu

## Server mode

Docs TODO

# pipelines.yaml file

For those who wish to hack the pipelines.yaml file. You can add `extraoptions` to enforce some parameters applied as if you gave them on the command line. This is curently only used to enforce batching on empty lines in pipelines that parse conllu, making sure the input is not cut in the middle of the line. As you can probably figure out, the pipeline simply specifies which modules are launched and their parameters, new steps to the pipeline are easy to add by mimicking the `*_mod.py` files.

# Referencies

Main reference for the pipeline:
```
@inproceedings{udst:turkunlp,
author = {Jenna Kanerva and Filip Ginter and Niko Miekka and Akseli Leino and Tapio Salakoski},
title = {Turku Neural Parser Pipeline: An End-to-End System for the CoNLL 2018 Shared Task},
booktitle = {Proceedings of the CoNLL 2018 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies},
publisher = "Association for Computational Linguistics",
location = "Brussels, Belgium",
year={2018}
}
```

Other references TODO

repository: josalmi/Turku-neural-parser-pipeline

repo_name: josalmi/Turku-neural-parser-pipeline


text:
---
title: CausalML - Analysing AB Test Results
date: 2020-05-10
tags: [testing, machine learning, causality]
excerpt: "Establish treatment effect of a test in the presence of confounders using CausalML."
classes: wide
---

## Introduction
In this blog I'll take you through the analysis of A/B test results using CausalML package. It is an easy and powerful package for causal inference that takes into account propensity matching, conditional probabilities and much more. Here, I'll use a dataset with ingrained bias to show how you can still estimate the treatment effect without extensive pre-processing and exploratory analysis. You can download the data [here](https://github.com/AntonsRuberts/datascience_marketing/tree/master/data) and get full code in my [github repo](https://github.com/AntonsRuberts/datascience_marketing/blob/master/CausalML_Analysing_AB_Test.ipynb). Thanks to this [repo](https://github.com/kimusu2008/SPSS_Example1) for initial data.

## Experiments in Marketing
Experiments are a staple of causal reasoning and are widely used in many disciplines. In digital marketing, A/B test refers to the experiment design that splits the user base into two groups - control and treatment. Treatment group gets exposed to a new feature/design/offer/etc. while the control group's experience stays the same. The behaviours of two groups are monitored and compared with regards to a specific metric (e.g. conversion rate). If the treatment group has a statistically better performance, then the experiment is considered a success and the feature gets rolled out to the entire user base.

Let's imagine a scenario: we want to know whether serving a website with localised translations is better than our current version of one-size-fits-all approach. We decide to run an A/B test and track the conversions of two groups. We will analyse the data that we've gathered so far to see the effect of our proposed change.

## Data Preprocessing
This dataset is split into two tables, which we'll need to join. Also, most of the variables need to be transformed to serve as inputs into the ML model of choice (here it's LightGBM). To get the data ready, we'll do the following pre-processing steps:

1. Get seasonal variables from date
2. Join two dataset
3. Drop Spain because it has no localised translation
3. Transform categorical into numerical

```python
#Imports
#Data processing
import pandas as pd
import numpy as np

#Uplift Modelling
from lightgbm import LGBMClassifier
from sklearn.model_selection import cross_val_score
from causalml.inference.meta import BaseXClassifier
from sklearn.linear_model import LinearRegression

#Visualisations
import seaborn as sns
import matplotlib.pyplot as plt

main = pd.read_csv('./data/test_table.csv')
users = pd.read_csv('./data/user_table.csv')

#PREPROCESSING
#Adding seasonal variables
main['date'] = pd.to_datetime(main.date, format = '%Y-%m-%d')
main['month'] = main['date'].apply(lambda x: x.month)
main['day_month'] = main['date'].apply(lambda x: x.day)
#Dropping date column
main = main.drop('date', axis=1)

#Joining user data
main = main.merge(users, how='inner')

#Drop Spain country
main = main.loc[main['country'] != 'Spain', :]

#Transforming to numerical
main['ads_channel'] = main['ads_channel'].fillna('direct')
categorical = ['source', 'device', 'browser_language', 'ads_channel', 'browser', 'sex', 'country']
for c in categorical:
    main[c] = LabelEncoder().fit_transform(main[c])
    main[c] = main[c].astype('category')
```

Here's how the resulting data should look like:

## Initial Analysis
Columns in the dataframe above are:
* Test - 1 if a person is part of a test group, 0 if a user is part of control group
* Conversion - our outcome variable
* Everything else is context for a particular conversion (potential confounders)

If the experiment was properly set-up, we'd be able to directly compare the conversion rates of two groups, and conclude if the experiment was a success.

```python
sns.set_style("whitegrid")
sns.barplot(x = ['Control', 'Treatment'], y = main.groupby('test')['conversion'].mean().values)
plt.title('Conversion Rate')
plt.show()
print(f'Difference between Control and Treatment {np.round(main.groupby("test")["conversion"].mean()[1] - main.groupby("test")["conversion"].mean()[0], 5)}')
```

From this it follows that the conversion rate is smaller by 0.4% in treatment group. However, upon taking a closer look at the data, you might begin to notice some irrelugarities. For example, by grouping the data by Country and Test columns you'll see that countries with indices 0 and 14 have much more Treatment observations than Control. This might be an indication of **selection bias**, so we can't compare two means directly. Luckily, CausalML helps us to identify this type of inconsistencies and gives us a more unbiased result.

## CausalML - X Learner
[CausalML](https://causalml.readthedocs.io/en/latest/index.html) is a Python package that provides access to a suite of algorithms dedicated to uplift modelling and causal inference. It has a range of meta-learner algorithms (meaning that they can take any ML model as base) that estimate Average Treatment Effect (ATE) and Conditional Average Treatment Effect (CATE). In this blog I'll focus on estimating ATE because this is what the A/B Testing is all about, but I'll definitely cover the CATE estimation later. CausalML so far has 4 meta-algorithms - S-Learner, T-Learner, X-Learner, R-Learner. Here I'll be using X-Learner because it is one of the most recent developments in causal inference, and because it excels with imbalanced data (like in our case). The algorithm works in 3 stages:
1. Train 2 ML models - the first is for users who have converted, and the second one is for users who haven't
2. Based on the difference between the observed outcome and predicted outcome (using the reverse outcome models) train another 2 ML models
3. Run the observations through the final two models and get a weighted average of CATE using the propensity scores as weights

I know that I've skimmed through the methodology part, but the [official documentation](https://causalml.readthedocs.io/en/latest/methodology.html#meta-learner-algorithms) and the actual paper by [Künzel et al. (2019)](https://arxiv.org/abs/1706.03461) explain the methodology quite nicely, so make sure to read it.

## CausalML - Data Prep
There are a few steps prior to modelling with CausalML:

1. Separate variables into Treatment, Outcome, and Confounders
2. Get Propensity Scores

```python
#Treatment
treatment = main['test']
treatment = np.array(['treatment' if val==1 else 'control' for val in treatment])
pd.Series(treatment).value_counts()

#Outcome
y = main['conversion']
y.value_counts()

#Confounders
X = main.drop(['user_id', 'conversion', 'test'], axis=1)
```
*Note: propensity scoring can be done automatically in the package (by not providing the propensity scores) but I thought that it would be nice to cover to understand the algorithms a bit better.*

Propensity model is build by treating the Treatment variable as dependent, and Confounders as independent variables. If we achieve a model with AUC score larger than 0.5 (random guessing), we can say that we have some sort of a sampling bias.

```python
#Propensity Model
prop_model = LGBMClassifier(colsample_bytree=0.8, subsample = 0.8, n_estimators=300)
print(cross_val_score(prop_model, X, treatment, cv=5, scoring='roc_auc').mean())
#model achieves AUC of 0.57, which makes it useful in evaluating the test outcome

#Fitting the model
prop_model.fit(X, treatment)

#Getting propensity scores
prop_scores = prop_model.predict_proba(X)

```
## X-Learner ATE Estimation
Now that the data is ready and propensity scores are estimated, the actual ATE estimation takes only a few seconds. Key things to remember here:
1. Choose the right class of meta-learner depending on your task - **Regressor** or **Classifier**
2. **learner** parameter has to be consistent with your meta-learner class
3. If you use Classifier meta-learner, you also need to provide **efffect learners** which are **regressors**

```python
#Fitting the X-meta learner
learner_x = BaseXClassifier(learner = LGBMClassifier(colsample_bytree=0.8, num_leaves=50, n_estimators=200
                            control_effect_learner=LinearRegression(),
                            treatment_effect_learner=LinearRegression(),
                             control_name='control')

#Getting the average treatment effect with upper and lower bounds
ate_x, ate_x_lb, ate_x_ub = learner_x.estimate_ate(X=X, treatment=treatment, y=y, p = prop_scores[:, 1])
print(ate_x, ate_x_lb, ate_x_ub)
```
The output should be that the average effect of our change is about 0.0. This means that there is **no clear effect** of our experiment on the propensity to convert which is in contrast to our previous conclusion.

## Summary
Overall, our initial conclusion that the change has negative effect was wrong. We were able to get a more unbiased estimate of treatment effect using X meta-learner from CausalML package. Let me know your thoughts and if you want me to cover any other topics in testing and causal inference.


text:
SimpleXLSX
==========

I have created this project for just adding composer support.
It's a fork from following project: https://github.com/shuchkin/simplexlsx.

However, Sergey Shuchkin added composer support to his project too.
I highly RECOMMEND to use official project: https://github.com/shuchkin/simplexlsx.

repository: Jakeroid/simplexlsx

repo_name: Jakeroid/simplexlsx


text:
---
layout: post
title:  " Functions in the C"
description: "The C language is similar to most modern programming languages in that it enables the use of functions"
excerpt: " Functions in the C programming Language "
tags: Language
categories: Programming
permalink: /:categories/:title/
comments: false
published: true
lang: tr
date:   2021-10-27 13:52:00
---

#### Functions in the C programming

The C language is similar to most modern programming languages in that it enables the use of functions, self-contained "modules" of code that take input, perform calculations, and produce output. C functions must be TYPED (the return type and the type of all specified parameters). As always, a function is a module of code that receives information (referring to that information with local symbolic names called parameters), performs certain calculations, and (usually) returns new information based on the parameter information.

![function](/images/function.jpg "C'de fonksiyon işlevi"){:height="100%" width="100%"}

In order for a function to "see" (use) another function, the "prototype" of the function must be seen in the file before it can be used. If a function uses another function that is verbatim written about it in the file, then this is automatically true. If the function uses a function that is "below" in a file, the prototype should appear at the top of the file ... see prototypes below.

In C all functions must be written in order to return a certain type of information and to receive certain types of data (parameters). This information is communicated to the compiler via a function prototype.

Here is the syntax for the function declaration or Prototype:

	RETURN_TYPE
	name_of_function (PARAMETER_TYPE name_of_param,PARAMETER_TYPE name_of_param);

	// here are some examples of prototypes used at the top of a file:
	float sqrt( float x );

	float average( int grades[], int length );

A prototype can appear at the beginning of a C source file to describe what the function returns and what it needs (return type and parameter list). followed by a semicolon. The function prototype is also used at the beginning of the code for the function. Therefore, the prototype can appear twice in a source code file in C. NO semicolon is used when the prototype appears with the code.

In C, the "main" function is treated like all functions, it has a return type (and in some cases it accepts input via parameters). The only difference is that the main function is "called" by the operating system when the user runs the program. Therefore, the main function is always the first code that is executed when a program is started.

```c
	int    // the main function will usually returns a 0 if successful
	main() // this is the name, in this case: main
	{
	// this is the body of the function (lots of code can go here)
	}

	double
	// this is the return type
	max( double param1, double param2)
	// this is the name, followed by the parameters
	{
	if (param1 > param2)
		{
	return param1;
	// Notice: that param1 is of type double and the return
	// type is also of type double
		}
	else
		{
	return param2;
		}
	}

	void
	// This is the return type
	// (void means no value is computed and returned by the function!)
	print_happy_birthday( int age )
	{
	printf("Congratulations on your %d th Birthday\n", age);
	return;  // you can "terminate" a void function by using return.
	// HERE it is REDUNDANT because the function is over anyway.
	}

```

Each C function must specify the type of data generated. For example, the above function max returns a value of type "double". The line "return X;" must be found, where X is a value or a variable that contains a value of the specified type.

When a code snippet calls or calls a function, it does so using the following syntax:

	variable = function-name (args, ...);

The function name must exactly match the function name in the function prototype. Arguments are a list of values (or variables that contain values) that are "passed" to the function. The number of arguments "passed" to a function must exactly match the number of parameters required for the function. The type of each argument must exactly match the type of each parameter. The type of the return variable must exactly match the return type of the function. The "variable" in the example above must be of a type that matches the return type of the function. The line "return X" is somewhere within the function.The value of X is then copied into the "variable".

A parameter is the symbolic name of the "data" that goes into a function. There are two ways to pass parameters in C:

pass by value, pass by reference. Passing by value Passing by value means that the data is copied and saved via the parameter name. Any change to the parameter has NO effect on the data in the calling function. Original data in the calling function. Therefore, every change to the parameter is ALSO MADE TO THE ORIGINAL variable. There are two ways to pass a reference parameter:

### ARRAYS

Arrays are always passed as a C reference. Any change to the parameter that contains the array changes the value of the original array. The ampersand symbol used in the function "prototyp.

function (& **parameter_name**) To convert a normal parameter into a passed parameter reference, we use the notation "& param". The ampersand (&) is the syntax used to tell C that any change in the parameter also modifies the original variable that contained the data.

Pass by Value Example:
In C, the default is to pass by value. For example:

```c

	#include <stdio.h>
	//
        // C function using pass by value. (Notice no &)
        //
        void
        doit( int x )
        {
             x = 5;
        }

        //
        // Test function for passing by value (i.e., making a copy)
        //
        int
        main()
        {
          int z = 27;
          doit( z );
          printf("z is now %d\n", z);

          return 0;
        }

```

share code: https://onlinegdb.com/skXfZNv6b

Output:

```bash

z is now 27
```

Pass by Reference Example:
I suggest that you use a C++ compiler such as g++ which allows the following pass by reference syntax (a much more modern style). The Syntax is to use the '&' in front of the parameter name in the function declaration. The calling code and usage inside the function are the same as before. For example:

```c
        //
        // C++ using Reference Parameter!
        //
        void
        doit( int & x )
        {
             x = 5;
        }

        //
        // Test code for passing by a variable by reference
        //
        int
        main()
        {
          int z = 27;
          doit( z );
          printf("z is now %d\n", z);

          return 0;
        }
```

```bash
   11 | void doit( int &x )
      |                ^
main.c: In function ‘main’:
main.c:20:11: warning: implicit declaration of function ‘doit’ [-Wimplicit-function-declaration]
   20 |           doit( z );
      |

```
REFERENCES:

1. https://www.cs.utah.edu/~germain/PPS/Topics/C_Language/c_functions.html


text:
[![Build Status](https://travis-ci.com/seanmalloy/vm-image-builds.svg?branch=master)](https://travis-ci.com/seanmalloy/vm-image-builds)

## Virtual Machine Image Builds
Automation for building virtual machine images.

* Hashicorp Packer used for image creation
* Ansible is used for image customization
* Test Kitchen and Inspec used for testing

## Directory Layout
```
images
|__ base-centos7
|   |__ build.json
|   |
|   |__ .kitchen.yml
|   |
|   |__ playbooks
|   |   |
|   |   |__ main.yml
|   |
|   |__ test
|       |
|       |__ TBD
|
|__ jenkins-centos7
    |__ build.json
    |
    |__ .kitchen.yml
    |
    |__ playbooks
    |   |
    |   |__ main.yml
    |
    |__ test
        |
        |__ TBD
```

## Credentials
### Google Cloud
1. GCE Instance With Service Account

Run from a GCE instace with a service
account that has the required GCP permissions
to run packer. This is the preferred option.

2. Environment Variable

Set the environment variable `GOOGLE_APPLICATION_CREDENTIALS`
to the path to a GCP service account credentials file and
export the variable.

repository: seanmalloy/vm-image-builds

gha_language: Shell

repo_name: seanmalloy/vm-image-builds


text:
---
title: User guide
description: A lightweight alternative to jQuery
lang: en-US
---

## What is Lightquery

Lightquery is a library that tends to follow the mindset, patterns and philosophy behind jQuery
and propose a lighter alternative to it.

Just like jQuery it is mainly designed around DOM manipulations but also gives a lot of tools for other aspects of JavaScript.

## Why Lightquery?

### The name

The name is, let's be honest, not that original and has been used many many times. This library tends to be the one
that is truly lighter than jQuery : as light as a feather on your workflow.

### The use

You should consider using Lightquery (over jQuery) because it tends to be lighter, easier to use and has several sets of
protection which can be really handy when trying to understand what goes wrong in your code.

## How to use?

* Via npm/yarn : `npm i -S light_query`
* Via a CDN (e.g. [via jsdelivr](https://www.jsdelivr.com/package/npm/light_query))
* Downloading it from [github](https://github.com/Voltra/lightquery/releases) and including it in the DOM

repository: Voltra/lightquery

gha_language: JavaScript

repo_name: Voltra/lightquery


text:
In `switch` statement, execution starts at the `case` label that matches the value on which the selection is performed and continues until the next `break` or the end of the switch. If none of the `case` labels match, then the `default` clause is executed, if it is present.

Technically, the final `break` is not required because flow falls out of the switch statement. But using a `break` is recommended so that modifying the code is easier and less error prone.

```
Great
```

repository: important-basic-things/java-general

repo_name: important-basic-things/java-general


text:
# EndpointBase

Shared functionality for SpreeCommerce Hub Endpoints.

## Installation

Add this line to your application's Gemfile:

    gem 'endpoint_base'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install endpoint_base

## Usage

### Sinatra

#### Gemfile

```ruby
gem 'sinatra'
gem 'tilt', '~> 1.4.1'
gem 'tilt-jbuilder', require: 'sinatra/jbuilder'
# ...
gem 'endpoint_base'
```

#### Endpoint

```ruby
require "sinatra"
require "endpoint_base"

class SampleEndpoint < EndpointBase::Sinatra::Base
  # optional security check, value supplied is compared against HTTP_X_HUB_TOKEN header
  # which is included in all requests sent by the hub, header is unique per integration.
  #
  # to opt of out security check, do not include this line
  endpoint_key 'abc123'

  post '/sample' do
    # Return an order object.
    add_object :order, { id: 1, email<EMAIL_ADDRESS>}

    # Create or update the parameter sample.new.
    add_parameter 'sample.new', '...'

    # Return a customized key and value.
    add_value 'my_customized_key', { ... }

    #return the relevant HTTP status code, and set the notification summary.
    result 200, 'The order was imported correctly'
  end

  post '/fail' do
    #return the relevant HTTP status code, and set the notification summary.
    result 500, 'The order failed to imported'
  end
end

```

### Rails

#### Gemfile

```ruby
gem 'rails'
# ...
gem 'endpoint_base'
```

#### Endpoint

```ruby
class SampleController < ApplicationController
  include EndpointBase::Concerns::All
  skip_before_filter :verify_authenticity_token

  # optional security check, value supplied is compared against HTTP_X_HUB_TOKEN header
  # which is included in all requests sent by the hub, header is unique per integration.
  #
  # to opt of out security check, do not include this line
  endpoint_key 'abc123'

  def sample
    # Return an order object.
    add_object :order, { id: 1, email<EMAIL_ADDRESS>}

    # Create or update the parameter sample.new.
    add_parameter 'sample.new', '...'

    # Return a customized key and value.
    add_value 'my_customized_key', { ... }

    #return the relevant HTTP status code, and set the notification summary.
    result 200, 'The order was imported correctly'
  end

  def fail
    #return the relevant HTTP status code, and set the notification summary.
    result 500, 'The order failed to imported'
  end
end

```

### Testing

##### spec_helper.rb

```ruby
# ...
require 'spree/testing_support/controllers'

# ...

RSpec.configure do |config|
  config.include Rack::Test::Methods
  config.include Spree::TestingSupport::Controllers
end
```

`Spree:TestingSupport::Controllers` enables you to use `json_response` and `auth` in your Endpoint tests. It also sets `ENV['ENDPOINT_KEY'] ||= '123'`.

```ruby
require 'spec_helper'

describe SampleEndpoint do
  let(:request) { { request_id: '1234567',
                    order: {},
                    parameters: []  } }

  describe '/sample' do
    it 'notifies a new sample' do
      post '/sample', request.to_json, auth

      expect(last_response).to be_ok

      expect(json_response['summary']).to eq "Order was successfully imported"
    end
  end
end
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

gha_language: Ruby


text:
## :enabled

### Summary

The `:enabled` CSS [pseudo-class][0] represents any enabled element. An element is enabled if it can be activated (e.g. selected, clicked on or accept text input) or accept focus. The element also has an disabled state, in which it can't be activated or accept focus.

### Example

The following will make the text color a medium green shade when enabled, and a gray shade when disabled. This allows for feedback to the user of which elements are interactable or not.

The following HTML...

        <form action="url_of_form">
          First field (enabled): <input type="text"  value="Lorem">

          Second field (disabled): <input type="text"  value="Ipsum" disabled="disabled">

          <input type="submit" value="Submit" />
        </form>

...used with this CSS...

        input:enabled {
          color: #22AA22;
        }
        input:disabled {
          color: #D9D9D9;
        }

...will result in:
Note that the color of the text on the button is also green, as the button is enabled too.

[0]: https://developer.mozilla.org/en/CSS/Pseudo-classes "Pseudo-classes"


text:
node-blog
--
Simple blog built on Node.js + Express + Handlebars + MongoDB.
The purpose of this project was to get more familiar with Express and to provide a simple, customizable blogging platform for my website.
Markdown parsing supported.

Install
--
1. mkdir blog_dir
2. cd blog_dir
3. git clone https://github.com/AnthonyCalandra/node-blog.git
4. Using your favorite editor, configure relevant settings in config.js.
5. npm install
6. node node-blog.js
7. Do the things.

Planned
--
In no particular order:

1. Multiple users.
2. Comments.
3. WYSIWYG editor.

Demo
--
You can find a (heavily) customized version of the blog in use at http://anthony-calandra.com/posts.

License
--
MIT

Anthony Calandra - 2015

repository: AnthonyCalandra/node-blog

repo_name: AnthonyCalandra/node-blog


text:
## Louisville

### Police shoot rubber bullets at reporter | May 30th

A policeman advances on, and fires pepper rounds at, a reporter on live tv in the middle of a calm environment. The officer faced "administrative reassignment" but has not been named, fired, arrested or charged.

id: ky-louisville-2

**Links**
* [Video](https://www.reddit.com/r/PublicFreakout/comments/gt69qe/police_start_shooting_press_with_some_kinda/)
* [Same video, different source](https://twitter.com/greg_doucette/status/1266557059606163456)
* [Victim's response](https://twitter.com/KaitlinRustWAVE/status/1268218653104693248)

### Young woman shot in the head by a rubber bullet | May 30th

A young woman was injured by a rubber bullet she took to the head.

id: ky-louisville-4

**Links**

* [Video](https://twitter.com/shannynsharyse/status/1267015577266249728)
* [Photo of Victim](https://twitter.com/shannynsharyse/status/1266631722239766528)

### Police smashing water bottles | May 31st

Police arrived in a truck and both smashed and stole milk and water that protesters were freely distributing. When questioned about this, Mayor Fischer initially said that LMPD had found flammable liquids and chemicals among the materials. This was later walked back.

id: ky-louisville-1

**Links**
* [Video evidence](https://twitter.com/nataliealund/status/1266877181164089349)
* [89.3 WFPL reporting the mayor's response](https://twitter.com/WFPLNews/status/1266923468102262784)

### Police shoot at cars in traffic from overpass | May 31st

Several police officers shoot from an overpass at cars stuck in traffic. Bystander reports at least one car window broken.

id: ky-louisville-5

**Links**

* [Video](https://twitter.com/Itz5500Gillz/status/1267454024288292867)

### Louisville police swarm and beat a man screaming on the ground | Believed to be June 1st

A man was using a leafblower to clear teargas from the protest area. Police claimed, without evidence, that the leafblower was "filled with bleach" to injure police.

id: ky-louisville-3

**Links**

* [Video and reddit thread](https://reddit.com/r/PublicFreakout/comments/gutezm/multiple_kentucky_state_police_troopers_tackled/)

### Restaurant owner shot and killed | June 1st

During protests, shots were fired by an unknown shooter. Police returned fire, shooting and killing a resaurant owner. Their bodycams were switched off at the time, and as a result the Lousiville chief of police has resigned. Louisville metro police has released a CCTV video which they claim shows McAtee firing a gun, but no gun is visible in the video.

id: ky-louisville-6

**Links**

* [Information on the shooting](https://edition.cnn.com/2020/06/02/us/david-mcatee-louisville-what-we-know-trnd/index.html)
* [Chief of police resigns](https://edition.cnn.com/2020/06/01/us/louisville-protests-man-shot-dead/index.html)
* [Police-released CCTV footage of the incident](https://youtu.be/wDg9fev67lw)
* [Video taken nearby during the shooting](https://mobile.twitter.com/chadloder/status/1267555717751296000)
* [New York Times video showing four videos synchronized to show the full sequence of events](https://www.nytimes.com/video/us/100000007175316/the-david-mcatee-shooting-did-aggressive-policing-lead-to-a-fatal-outcome.html)

### Protestors in St. Matthews shot with pepper rounds | June 3rd

Police fired pepper rounds unprovoked at a group of protestors marching prior to curfew in St. Matthews

id: ky-louisville-7

**Links**

* [Video taken from across the street](https://www.reddit.com/r/Louisville/comments/gw5joa/peaceful_protesters_marching_in_st_mathews_get/)

repository: Isabellarossi/police-brutality

repo_name: Isabellarossi/police-brutality


text:
# Fex

Small wrapper around Savon for using FedEx Web Services. It will expose you to
all the nitty gritty details from the FedEx API.

Disadvantages:

* The FedEx API is big and complex
* It's not easy to get started

Advantages:

* You can do everything that is allowed by the API.
* The code is really close to the documentation by FedEx.

It's up to you to decide which approach to take. If you don't do many special
things, a gem like `fedex`, might be a better alternative, because it hides
most of the complexity. If you find yourself needing a bit more control, you
can take this gem.

Note: This gem is not complete. It contains the ship service, address
validation and rate service. The other services FedEx supplies are a somewhat
different. It shouldn't be too difficult to support them, but I haven't gotten
around to it.

## Installation

Add this line to your application's Gemfile:

    gem 'fex'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install fex

## Usage

Create a client with your credentials:

``` ruby
client = Fex.client(

  # required:

  credentials: {
    key:             "xxx",
    password:        "xxx",
    account_number:  "xxx",
    meter_number:    "xxx",
  },

  # optional:
  mode: "test", # or "production"

  # see Savon for more information about these
  client: {
    logger:        Rails.logger,
    log_level:     "info",
    log:           true,
    raise_errors:  true
  }
)
```

Create a service:

``` ruby
service = client.service(:ship)

# see what operations are available:
service.operations # => [ :process_shipment, .... ]
```

Perform a request:

``` ruby
response = service.call(

  # the operation as mentioned earlier
  :process_shipment,

  # the attributes (after the Version tag)
  requested_shipment: {
    ship_timestamp:  Time.now.utc.iso8601(2),
    dropoff_type:    "REGULAR_PICKUP",
    service_type:    "PRIORITY_OVERNIGHT",
    packaging_type:  "YOUR_PACKAGING",
    # etc ...
  }
)
```

The response has everything Savon offers, plus some methods specific to FedEx.

``` ruby
# From Savon:
response.success?
response.soap_fault?
all_the_things = response.body
severity = response.xpath("//Notifications/Severity").inner_text
severity = response.css("Severity").inner_text

# From Fex:
response.severity
response.code
response.message
response.image # only for shipments with labels
```

For examples on how to use this gem, visit the `spec/integration` directory.

## Running gem specs

To run the specs on this project, you can create a file called
`spec/support/credentials.yml`, and fill it with your own test keys.

``` yaml
production:
  :key: "xxx"
  :password: "xxx"
  :account_number: "xxx"
  :meter_number: "xxx"

test:
  :key: "xxx"
  :password: "xxx"
  :account_number: "xxx"
  :meter_number: "xxx"
```

You can specify production and/or test. The production keys are used for the
address validation service, because that doesn't work for me on test.

To use the keys in an integration spec, add `:production_environment` or
`:test_environment` as group metadata keys, and the methods `credentials` and
`mode` are made available for you:

``` ruby
describe "FedEx rate service", :test_environment do

  it "should do something" do
    client = Fex.client(credentials: credentials, mode: mode)
    # etc ...
  end

end
```

If you don't specify keys, these specs will be skipped.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

repository: jameswilliamiii/fex

repo_name: jameswilliamiii/fex


text:
# cached-fetch
Cache fetched request in the browser.

## Usage

The `cached fetch` funtion APIs is same as `fetch` function, but with differences below.

It will cache calls in the browser and clear after a while. The default expiry time is 120 seconds.

```
cachedFetch('/data.json')
  .then(res => res.json())
  .then(json => console.log(json));
```

Passing a number of seconds as the second argument to customize expiry time individually.

```
cachedFetch('/data.json', 30 * 60) // clean up after 30 minutes
  ...
```

Another way is Adding a `seconds` key to the options object.

```
cachedFetch('/data.json', { seconds: 30 * 60 })
  ...
```

## License

MIT@A2ZH

repository: theJian/cached-fetch

repo_name: theJian/cached-fetch


text:
# Domain Events
>Something happened that domain experts care about.

A domain event is a full-fledged part of the domain model,
a representation of something that happened in the domain.

### Individuating events:
Consider a few key phrases to listen for when domain experts talk:
* "When..."
* "If that happens..."
* "Inform me if..." and "Notify me if..."
* "An occurrence of..."

**Use domain events to explicitly implement side effects of changes within your domain,
namely across multiple aggregates**.

repository: glippi/knowledge

repo_name: glippi/knowledge


text:
# Forbid the use number `39`

The use of the number `39` is a bad omen. The number 39 has somehow become lodged in the Afghan popular imagination as a sign of pimping and prostitution, but it has widely been claimed to have been associated with a pimp, allegedly living in the western city of Herat, who was nicknamed "39" after the registration plate of his expensive car and the number of his apartment. The number is said to translate into morda-gow, literally meaning "dead cow" but a well-known slang term for a pimp.

Use a different amount.

### Fail

```js
const a = 39;

```

```js
const myVariable539 = (a) => a*2;

```

### Pass

```js
const a = 7;
```

repository: gurov/eslint-plugin-superstition

repo_name: gurov/eslint-plugin-superstition


text:
---
layout: default
---

# 1996-12-01 - Re: The Rise and Fall of Cypherpunks  WAS [Re: the Dennings]

## Header Data

From: Stephen Boursy<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: e1d4804413909b4db09e5e541593a28194dec4d768d42956fb904701c7c705e5

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-12-01 02:01:45 UTC

Raw Date: Sat, 30 Nov 1996 18:01:45 -0800 (PST)

## Raw message

```
{% raw  %}From: Stephen Boursy<EMAIL_ADDRESS>Date: Sat, 30 Nov 1996 18:01:45 -0800 (PST)
To<EMAIL_ADDRESS>Subject: Re: The Rise and Fall of Cypherpunks  WAS [Re: the Dennings]
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

aga wrote:
>
>>
>> Ridicule is what John Gilmore and EFF deserve, and more.

  That's to good for them--complete contempt is more called
for.

> Well, if it does not apply to Boursy, then you are still going
> to get a royal ass-kicking. The EFF and Gilmore are too connected
> to UUNET and the cabal to have any credibility on this usenet any
> m.

  The EFF is a corporate whore with no interest whatsoever in the
rights of individual users--they will side with the business owners
every time.  And not to forget they signed off on the Exon Ammendment
much to the contempt of the ACLU.

                         Steve

{% endraw %}
```

## Thread

+ Return to [November 1996](/archive/1996/11)
+ Return to [December 1996](/archive/1996/12)

+ Return to "[aga <aga@dhp.com>](/authors/aga_aga_at_dhp_com_)"
+ Return to "[attila@primenet.com](/authors/attila_at_primenet_com)"
+ Return to "[Dale Thorn <dthorn@gte.net>](/authors/dale_thorn_dthorn_at_gte_net_)"
+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to "["Kathleen M. Ellis" <tgkelli@tiger.towson.edu>](/authors/kathleen_m_ellis_tgkelli_at_tiger_towson_edu_)"
+ Return to<EMAIL_ADDRESS>(Huge Cajones Remailer)](/authors/nobody_at_huge_cajones_com_huge_cajones_remailer_)"
+ Return to "[Stephen Boursy <boursy@earthlink.net>](/authors/stephen_boursy_boursy_at_earthlink_net_)"
+ Return to "[Tim Scanlon <tfs@adsl-122.cais.com>](/authors/tim_scanlon_tfs_at_adsl122_cais_com_)"

+ 1996-11-27 (Wed, 27 Nov 1996 07:52:25 -0800 (PST)) - [Re: Dorthy Denning is a boot-licking fasicist!!!](/archive/1996/11/569550e6b5626b0cf403d114a4ef03176c6f3e84d37d5ab81c9610101cedf226) -<EMAIL_ADDRESS>(Huge Cajones Remailer)_
  + 1996-11-28 (Thu, 28 Nov 1996 03:46:04 -0800 (PST)) - [Re: Dorthy Denning is a boot-licking fasicist!!!](/archive/1996/11/6bd6a3bdf884ed002ec6c0f7b22e89159cba8b916ce613a6fbc6df113f6044b4) - _aga<EMAIL_ADDRESS>    + 1996-11-28 (Thu, 28 Nov 1996 10:45:20 -0800 (PST)) - [Re: Dorthy Denning is a boot-licking fasicist!!!](/archive/1996/11/8671b604ce608f2413584adf6bc89994ca08a043f27aa58620587b441eaa7406) - _"Kathleen M. Ellis"<EMAIL_ADDRESS>      + 1996-11-28 (Thu, 28 Nov 1996 13:26:53 -0800 (PST)) - [KUDOS to Kathleen: [Re: Dorthy Denning is a boot-licking fasicist!!!]](/archive/1996/11/6e6f3c3d6603163a0da3c3bafe0673974571986f53c650f9d73afe0b2863a7dd) -<EMAIL_ADDRESS>        + 1996-11-30 (Fri, 29 Nov 1996 20:37:33 -0800 (PST)) - [Re: KUDOS to Kathleen: [Re: Dorthy Denning is a boot-licking fasicist!!!]](/archive/1996/11/17307297ffb06a292c53294484457a18bea1a1bf58f4924ddb286bc4c1b82377) - _Tim Scanlon<EMAIL_ADDRESS>          + 1996-11-30 (Sat, 30 Nov 1996 00:28:54 -0800 (PST)) - [The Rise and Fall of Cypherpunks  WAS [Re: the Dennings]](/archive/1996/11/f600cabab6a3fc18842c4d26d43504269e4cbe5d4019babbdca833d387050d79) -<EMAIL_ADDRESS>            + 1996-11-30 (Sat, 30 Nov 1996 08:41:03 -0800 (PST)) - [Re: The Rise and Fall of Cypherpunks  WAS [Re: the Dennings]](/archive/1996/11/6329592d177d8bc9b2775570882f0fb655efcdd4665b59902bd69d575391f714) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_
              + 1996-11-30 (Sat, 30 Nov 1996 12:03:39 -0800 (PST)) - [Re: The Rise and Fall of Cypherpunks  WAS [Re: the Dennings]](/archive/1996/11/402c920bf3aa0f4336b21c86627bb769984a089d8fadecbc5a666fc3a841a751) - _aga<EMAIL_ADDRESS>                + 1996-12-01 (Sat, 30 Nov 1996 18:01:45 -0800 (PST)) - Re: The Rise and Fall of Cypherpunks  WAS [Re: the Dennings] - _Stephen Boursy<EMAIL_ADDRESS>            + 1996-11-30 (Sat, 30 Nov 1996 09:58:37 -0800 (PST)) - [Re: The Rise and Fall of Cypherpunks  WAS [Re: the Dennings]](/archive/1996/11/9b526164cbb7365fd0cdd9a4c9c17dbb5272408d645ec510e4463094d4e157da) - _Dale Thorn<EMAIL_ADDRESS>


text:
# Windows Installer Script

For Windows 64-bit environments, an installer script is available. The
script deploys and configures:

- Splunk OpenTelemetry Connector for Windows
- [Fluentd (via the TD Agent)](https://www.fluentd.org/)

Currently, the following Windows versions are supported and requires PowerShell
3.0 or newer:

- Windows Server 2012 64-bit
- Windows Server 2016 64-bit
- Windows Server 2019 64-bit

## Getting Started

Run the below PowerShell command on your host. Replace these variables:

- `SPLUNK_REALM`: Which realm to send the data to (for example: `us0`)
- `SPLUNK_ACCESS_TOKEN`: Access token to authenticate requests

```powershell
& {Set-ExecutionPolicy Bypass -Scope Process -Force; $script = ((New-Object System.Net.WebClient).DownloadString('https://dl.signalfx.com/splunk-otel-collector.ps1')); $params = @{access_token = "SPLUNK_ACCESS_TOKEN"; realm = "SPLUNK_REALM"}; Invoke-Command -ScriptBlock ([scriptblock]::Create(". {$script} $(&{$args} @params)"))}
```

You can view the [source](../../internal/buildscripts/packaging/installer/install.ps1)
for more details and available options.

## Advanced Configuration

### Additional Script Options

One additional parameter that may need to changed is `-memory` in order to
configure the memory allocation.

> By default, this variable is set to `512`. If you have allocated more memory
> to the Collector then you must increase this setting.

Replace the `SPLUNK_MEMORY_TOTAL_MIB` variable with the desired value.

```powershell
& {Set-ExecutionPolicy Bypass -Scope Process -Force; $script = ((New-Object System.Net.WebClient).DownloadString('https://dl.signalfx.com/splunk-otel-collector.ps1')); $params = @{access_token = "SPLUNK_ACCESS_TOKEN"; realm = "SPLUNK_REALM"; memory = "SPLUNK_MEMORY_TOTAL_MIB"}; Invoke-Command -ScriptBlock ([scriptblock]::Create(". {$script} $(&{$args} @params)"))}
```

### Collector Configuration

The Collector comes with a default configuration which can be found at
`\ProgramData\Splunk\OpenTelemetry Collector\agent_config.yaml`. This configuration
can be modified as needed. Possible configuration options can be found in the
`receivers`, `processors`, `exporters`, and `extensions` folders of either:

- [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector)
- [OpenTelemetry Collector Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib)

Based on the specified installation parameters, the following environment
variables will be saved to the
`HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment` registry
key and passed to the Collector service:

- `SPLUNK_ACCESS_TOKEN`: The Splunk access token to authenticate requests
- `SPLUNK_API_URL`: The Splunk API URL, e.g. `https://api.us0.signalfx.com`
- `SPLUNK_BUNDLE_DIR`: The location of your Smart Agent bundle for monitor functionality, e.g. `C:\Program Files\Splunk\OpenTelemetry Collector\agent-bundle`
- `SPLUNK_CONFIG`: The path to the collector config file, e.g. `C:\ProgramData\Splunk\OpenTelemetry Collector\agent_config.yaml`
- `SPLUNK_HEC_TOKEN`: The Splunk HEC authentication token
- `SPLUNK_HEC_URL`: The Splunk HEC endpoint URL, e.g. `https://ingest.us0.signalfx.com/v1/log`
- `SPLUNK_INGEST_URL`: The Splunk ingest URL, e.g. `https://ingest.us0.signalfx.com`
- `SPLUNK_MEMORY_TOTAL_MIB`: Total memory in MiB allocated to the collector, e.g. `512`
- `SPLUNK_REALM`: The Splunk realm to send the data to, e.g. `us0`
- `SPLUNK_TRACE_URL`: The Splunk trace endpoint URL, e.g. `https://ingest.us0.signalfx.com/v2/trace`

To modify these values, run `regdit` and browse to the path, or run the
following PowerShell command (replace `ENV_VAR` and `VALUE` for the desired
environment variable and value):

```powershell
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" -name "ENV_VAR" -value "VALUE"
```

After modifying the configuration file or registry key, apply the changes by
restarting the system or running the following PowerShell commands:

```powershell
Stop-Service splunk-otel-collector
Start-Service splunk-otel-collector
```

### Fluentd Configuration

By default, the fluentd service will be installed and configured to forward log
events with the `@SPLUNK` label to the collector (see below for how to add
custom fluentd log sources), and the collector will send these events to the
HEC ingest endpoint determined by the `-realm SPLUNK_REALM` option, e.g.
`https://ingest.SPLUNK_REALM.signalfx.com/v1/log`.

To configure the collector to send log events to a custom HEC endpoint URL, you
can specify the following parameters for the installer script:

- `-hec_url URL`
- `-hec_token TOKEN`

The main fluentd configuration file will be installed to
`\opt\td-agent\etc\td-agent\td-agent.conf`. Custom fluentd source config files
can be added to the `\opt\td-agent\etc\td-agent\conf.d` directory after
installation. Please note:

- All files in this directory ending `.conf` extension will automatically be
  included by Fluentd.
- By default, Fluentd will be configured to collect from the Windows Event Log.
  See `\opt\td-agent\etc\td-agent\conf.d\eventlog.conf` for the default
  configuration.

After any configuration modification, apply the changes by restarting the
system or running the following PowerShell commands:

```powershell
Stop-Service fluentdwinsvc
Start-Service fluentdwinsvc
```

repository: splunk/splunk-otel-collector

branch_name: refs/heads/main

repo_name: splunk/splunk-otel-collector


text:
# selective/archive-bomb-scanner

ZIP and PNG bomb scanner for PHP.

[![Latest Version on Packagist](https://img.shields.io/github/release/selective-php/archive-bomb-scanner.svg?style=flat-square)](https://packagist.org/packages/selective/archive-bomb-scanner)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://github.com/selective-php/archive-bomb-scanner/workflows/build/badge.svg)](https://github.com/selective-php/archive-bomb-scanner/actions)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/selective-php/archive-bomb-scanner.svg?style=flat-square)](https://scrutinizer-ci.com/g/selective-php/archive-bomb-scanner/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/quality/g/selective-php/archive-bomb-scanner.svg?style=flat-square)](https://scrutinizer-ci.com/g/selective-php/archive-bomb-scanner/?branch=master)
[![Total Downloads](https://img.shields.io/packagist/dt/selective/archive-bomb-scanner.svg?style=flat-square)](https://packagist.org/packages/selective/archive-bomb-scanner/stats)

## Features

* Detection of ZIP archive bombs
* Detection of RAR archive bombs
* Detection of PNG bombs
* No dependencies
* Very fast

## Requirements

* PHP 8.0+

## Installation

```
composer require selective/archive-bomb-scanner
```

## Usage

### Scan ZIP file

```php
use Selective\ArchiveBomb\Scanner\BombScanner;
use Selective\ArchiveBomb\Engine\ZipBombEngine;
use SplFileObject;

$file = new SplFileObject('42.zip');

$scanner = new BombScanner();
$scanner->addEngine(new ZipBombEngine());

$scannerResult = $scanner->scanFile($file);

if ($scannerResult->isBomb()) {
    echo 'Archive bomb detected!';
} else {
    echo 'File is clean';
}
```

### Scan in-memory ZIP file

```php
use Selective\ArchiveBomb\BombScanner;
use Selective\ArchiveBomb\Engine\ZipBombEngine;
use SplTempFileObject;

$file = new SplTempFileObject();

$file->fwrite('my file content');

$scanner = new BombScanner();
$scanner->addEngine(new ZipBombEngine());

$isBomb = $detector->scanFile($file)->isBomb(); // true or false
```

### Scan RAR file

```php
use Selective\ArchiveBomb\Scanner\BombScanner;
use Selective\ArchiveBomb\Engine\RarBombEngine;
use SplFileObject;

$file = new SplFileObject('10GB.rar');

$scanner = new BombScanner();
$scanner->addEngine(new RarBombEngine());

$scannerResult = $scanner->scanFile($file);

if ($scannerResult->isBomb()) {
    echo 'Archive bomb detected!';
} else {
    echo 'File is clean';
}
```

### Scan PNG file

```php
use Selective\ArchiveBomb\Scanner\BombScanner;
use Selective\ArchiveBomb\Engine\PngBombEngine;
use SplFileObject;

$file = new SplFileObject('example.png');

$scanner = new BombScanner();
$scanner->addEngine(new PngBombEngine());

$scannerResult = $scanner->scanFile($file);

if ($scannerResult->isBomb()) {
    echo 'PNG bomb detected!';
} else {
    echo 'File is clean';
}
```

## License

MIT

repository: selective-php/archive-bomb-scanner

gha_language: PHP

repo_name: selective-php/archive-bomb-scanner


text:
---
layout: post
title:      "Note Taker App Frontend"
date:       2021-02-28 23:04:07 -0500
permalink:  note_taker_app_frontend
---

I began building the frontend of my application to ensure that my seed data is being passed in to the frontend.

I'm going to be using react.js to build my frontend functionality. I want to build a collapsible form that will allow a user to enter in the category for their note, the subject, and the note itself.

I implemented create-react-app note-taker-app-frontend in the terminal and cd into my folder and began coding.

I began importing in react and react-dom and building my components. I also started building my store using provider when I ran into npm installer issues. Provider.js can't be found. Tried deleting the package-lock.json and node_modules and re-running npm install, but began receiving a different error.

```
Module not found: Can't resolve 'react' in '/root/code/labs/Projects/javascript/practice/note_taker_app_main/note_taker_app_frontend/node_modules/react-redux/es/components'
^C
```

Troubleshooting these issue is fun because it gives me a chance to use my troubleshooting skills. I'm receiving the Maximum call stack size exceeded when running npm install. Currently, using stack over flow and google as a resource. Going to tear my code apart piece by piece until I find a solution.

![Imgur](https://i.imgur.com/czNiWGI.png)

extension: markdown


text:
# Linting

We use several linters and type checkers for various reasons. The different linters and tools are explained in this document. Note that we are doing type checking BUT NOT using Typescript. This allows us to include typing files to support Typescript users and ensures our code will not fail when included in a Typescript environment. This allows us to eliminate the need for Angular wrappers.

## Tooling

- [Actions](https://github.com/infor-design/enterprise-wc/actions) The github actions on your PR will report errors which will be verifiable on the command line running `npm run lint && npm run test`

## Markdown (Remark) Linter

We are using a package called [remark](https://github.com/remarkjs/remark/tree/main/packages/remark-cli)

We validate the files by running `npm run lint` or `npm run mdlint`. This covers some common mistakes in the .md files we document. The rules can be set in the `.remarkrc` file.

## EsLint Linter

We are using the core [eslinter for Javascript](https://eslint.org/) all settings can be set within the `.eslintrc.js` file in the root. If using Atom the package [linter-eslint](https://atom.io/packages/linter-eslint) should be installed. The web pack config in the demo app will also report errors in the Google Chrome console while testing.

## Style Linter

We are using [style lint](https://github.com/stylelint/stylelint) for checking the rules in scss files. All settings can be set within the `.stylelintignore` file in the root. If using Atom the package [linter-stylelint](https://atom.io/packages/linter-stylelint) should be installed. The web pack config in the demo app will also report errors in the Google Chrome console while testing.

## HtmlHint Linter

We are using [HtmlHint lint](https://github.com/htmlhint/HTMLHint) for checking simple rules around valid HTML. All settings can be set within the `.htmlhintrc` file in the root. If using Atom the package [linter-htmlhint](https://atom.io/packages/linter-htmlhint) should be installed.

## Typescript Type Checking

We are using [the typescript tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html) command for checking simple rules around Typescript and typings to support Typescript users. Note that in this project we chose to not use Typescript but we make the code type safe using comments and/or proper Javascript. All settings regarding typing can be set within the `tsconfig.json` file in the root of this project.

If using the Atom editor the package [atom-typescript](https://atom.io/packages/atom-typescript) should be installed to see errors in the editor. Within the atom-typescript plugin make sure to check the "Enable Atom-Typescript for JavaScript Files" to see errors in Atom.

In addition we had to disabled a couple warnings it complains about regarding our import statements (in Atom only). To set this in the atom-typescript plugin go to the setting  "Ignore Diagnostics" add the following: 6138, 6133.

Occasionally due to a bug in Atom not showing errors when a JS file is open. Click `JavaScript` on the bottom footer and set it to `TypesScript` to toggle the visibility of type errors.

In addition to the types in the d.ts file which should be the external facing types. You can use tsdoc to guide ts into the types. Have a look at [jsdoc-supported-types](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html).


text:
This is just an example to show how a Kafka Streams Application can use a JCache (JSR107) cache, like Blazing Cache, and limit the usage of external services

In order to test this demo, you have to setup a simple kafka broker
see http://docs.confluent.io/3.0.0/streams/quickstart.html

Create an input Kafka topic named 'input' and write this content (this is like a web server access log):

25-10-2016 <IP_ADDRESS> GET/foo.html

25-10-2016 <IP_ADDRESS> GET/foo.html

25-10-2016 <IP_ADDRESS> GET/foo.html

25-10-2016 <IP_ADDRESS> GET/foo.html

25-10-2016 <IP_ADDRESS> GET/bar.html

25-10-2016 <IP_ADDRESS> GET/foo.html

25-10-2016 <IP_ADDRESS> GET/foo.html

25-10-2016 <IP_ADDRESS> GET/foo.html

you can use the kafka-console-producer script inside standard Kafka distribution.

You will see the output on the 'output' topic, you can use the kafka-console-consumer application to see the content of it

This simple Kafka Stream Application adds to each line another element which represents the geo location of the IP address.

As calls to GeoLocation services can be very slow and time-consuming the use o a cache will speed up the execution of the application and reduce the overall usage of resources.

BlazingCache and ZooKeeper

As BlazingCache in 'clustered' mode uses ZooKeeper service to discover cache server services you can start a BlazingCache server in "clustered" mode over the same ZooKeeper ensemble which supports Kafka and Kafka Streams.

Look at DemoDistributedCache file and see BlazingCache documentation https://blazingcache.readme.io/docs/getting-started

repository: nicoloboschi/kafkastreamsblazingcache

repo_name: nicoloboschi/kafkastreamsblazingcache


text:
# [Custom Sinks] (@id custom_sinks)

You can create custom sinks, which can be passed to [`sink`](@ref) or
[`sink!`](@ref) by defining two methods: [`SignalOperators.initsink`](@ref)
and [`SignalOperators.sink_helper!`](@ref). The first method is called when a
call to `sink` is made (e.g. `sink(MyCustomSink)`). The second method is
called inside `sink!` and provides the core operation to write blocks of
frames to the sink. There is already a method of `sink_helper!` defined for
`AbstractArray` objects, so you likely do not need to implement it if your
custom sink is an `AbtractArray`.

You may also want to implement a constructor of the sink type that takes a
single argument `x` of type `SignalOperators.AbstractSignal`. This should
generally just call `sink(x,CustomSink)`.

!!! note

    Implementing `initsink` is not strictly necessary. If you do not implement
    `initsink` you will only be able to write to the sink using `sink!`.

gha_language: Julia

gha_license_id: NOASSERTION


text:
[ovCordova](http://www.percussion.com/)
==========

### Cordova plugins for AngularJS

ovCordova is a set of AngularJS wrappers for Cordova plugins.  Available plugins are listed below.

## Installation

Install manually, or from bower:

```bash
$ bower install git://github.com/arpercussion/ov-cordova.git
```

## Plugins `(3+)`

- [Device Motion](https://github.com/apache/cordova-plugin-device-motion)
- [Device Orientation](https://github.com/apache/cordova-plugin-device-orientation)
- [Geolocation](https://github.com/apache/cordova-plugin-geolocation)

repository: obscuredvision/ov-cordova

repo_name: obscuredvision/ov-cordova