text:
##Exercise 1.1

> Review the documentation for your compiler and determine what file naming convention it uses. Compile and run the main program from page 2.

### Windows

![windows](https://db.tt/XGeGsg7O)

### Linux

![Linux](https://db.tt/2xKWuztU)

##Exercise 1.2

> Exercise 1.2: Change the program to return -1. A return value of -1 is often treated as an indicator that the program failed. Recompile and rerun your program to see how your system treats a failure indicator from main.

###Windows

![windows](https://db.tt/DIJd9eZb)

###Linux

![linux](https://db.tt/lhzXhpCt)

**255**? why? please look at [this](http://www.tldp.org/LDP/abs/html/exitcodes.html)

##Exercise 1.3
> Write a program to print Hello, World on the standard output.

```cpp
#include <iostream>

int main()
{
  std::cout << "Hello, World" << std::endl;
  return 0;
}
```

##Exercise 1.4
> Our program used the addition operator, +, to add two numbers. Write a program that uses the multiplication operator, *, to print the product instead.

```cpp
#include <iostream>

int main()
{
  std::cout << "Enter two numbers:" << std::endl;
  int v1 = 0, v2 = 0;
  std::cin >> v1 >> v2;
  std::cout << "The product of " << v1 << " and " << v2
  << " is " << v1 * v2 << std::endl;
  return 0;
}
```

##Exercise 1.5

> We wrote the output in one large statement. Rewrite the program to use a separate statement to print each operand.

```cpp
#include <iostream>

int main()
{
  std::cout << "Enter two numbers:" << std::endl;
  int v1 = 0, v2 = 0;
  std::cin >> v1 >> v2;
  std::cout << "The product of ";
  std::cout << v1;
  std::cout << " and ";
  std::cout << v2;
  std::cout << " is ";
  std::cout << v1 * v2;
  std::cout << std::endl;
  return 0;
}
```

##Exercise 1.6
> Explain whether the following program fragment is legal.

It's illegal.

**[Error] expected primary-expression before '<<' token**

Fixed it: remove the spare semicolons.

```cpp
std::cout << "The sum of " << v1
          << " and " << v2
          << " is " << v1 + v2 << std::endl;
```

##Exercise 1.7

> Compile a program that has incorrectly nested comments.

Example:
```cpp
/*
* comment pairs /* */ cannot nest.
* ''cannot nest'' is considered source code,
* as is the rest of the program
*/
int main()
{
  return 0;
}
```

Compiled result(g++):

![result](https://db.tt/CqQKu8GQ)

##Exercise 1.8

> Indicate which, if any, of the following output statements are legal:
```cpp
std::cout << "/*";
std::cout << "*/";
std::cout << /* "*/" */;
std::cout << /* "*/" /* "/*" */;
```
> After you’ve predicted what will happen, test your answers by compiling a
program with each of these statements. Correct any errors you encounter.

Compiled result(g++):

![result](https://db.tt/mrL9hDCS)

Corrected? just added a quote:
```cpp
std::cout << "/*";
std::cout << "*/";
std::cout << /* "*/" */";
std::cout << /* "*/" /* "/*" */;
```

Output:

    /**/ */ /*

##[Exercise 1.9](ex1_9.cpp)
##[Exercise 1.10](ex1_10.cpp)
##[Exercise 1.11](ex1_11.cpp)

##Exercise 1.12
> What does the following for loop do? What is the final value
of sum?
```cpp
int sum = 0;
for (int i = -100; i <= 100; ++i)
sum += i;
```

the loop sums the numbers from -100 to 100. the final value of sum is zero.

##Exercise 1.13
> Rewrite the exercises from § 1.4.1 (p. 13) using for loops.

Ex1.9:
```cpp
#include <iostream>

int main()
{
  int sum = 0;
  for (int i=50; i<=100; ++i)
      sum += i;

  std::cout << "the sum is: " << sum << std::endl;

  return 0;
}
```

Ex1.10:
```cpp
#include <iostream>

int main()
{
  for (int i=10; i>=0; --i)
    std::cout << i << std::endl;

  return 0;
}
```

Ex1.11:
```cpp
#include <iostream>

int main()
{
  int val_small = 0, val_big = 0;
  std::cout << "please input two integers:";
  std::cin >> val_small >> val_big;

  if (val_small > val_big)
  {
    int tmp = val_small;
    val_small = val_big;
    val_big = tmp;
  }

  for (int i=val_small; i<=val_big; ++i)
    std::cout << i << std::endl;

  return 0;
}
```

##Exercise 1.14
> Compare and contrast the loops that used a for with those
using a while. Are there advantages or disadvantages to using either form?

If you need a pattern which is using a variable in a condition and incrementing that variable in the
body. You should use `for` loop. Else the `while` loop is more simple.

Want to know more? look at [this](http://stackoverflow.com/questions/1600282/guideline-while-vs-for)

##Exercise 1.15
> Write programs that contain the common errors discussed in
the box on page 16. Familiarize yourself with the messages the compiler
generates.

**JUST READ IT!**

##Exercise 1.16

> Write your own version of a program that prints the sum of a set of integers read from cin.

Many people confused about this exercise, such as [this](http://www.cplusplus.com/forum/beginner/104169/) and [this](http://stackoverflow.com/questions/17841424/how-to-write-this-while-loop-as-a-for-loop).

In my opinion, the exercise aim to write the program without "**END-OF-FILE**".

**BUT**, the [code](http://www.cplusplus.com/forum/beginner/104169/#msg561450) in first link is not correct.

The following are my own version:

```cpp
#include <iostream>

int main()
{
  int limit = 0, sum = 0, value = 0;
  std::cout << "How many integers would you like to enter?";
  std::cin >> limit;

  // assume we don't know what is EOF(End-Of-File).
  while (std::cin >> value && (--limit != 0))
    sum += value;

  std::cout << sum + value << std::endl;

  return 0;
}
```

Watch out for "sum + value" in the `cout` line.

##Exercise 1.17

> What happens in the program presented in this section if the input values are all equal? What if there are no duplicated values?

If the input values are all equal, it will print a line which shows the count of the number you input.

If there are no duplicated values, when different values input, a new line will be printed if you click `Enter`.

##Exercise 1.18

> Compile and run the program from this section giving it only equal values as input. Run it again giving it values in which no number is repeated.

![run](https://db.tt/F38zExnq)

##Exercise 1.19

> Revise the program you wrote for the exercises in § 1.4.1 (p. 13) that printed a range of numbers so that it handles input in which the first number is smaller than the second.

Yes, we should use `if` to judge which is bigger.

review this [code](https://github.com/pezy/Cpp-Primer/blob/master/ch01/ex1_11.cpp)

##Exercise 1.20

> http://www.informit.com/title/032174113 contains a copy of Sales_item.h in the Chapter 1 code directory. Copy that file to your working directory. Use it to write a program that reads a set of book sales transactions, writing each transaction to the standard output.

[Here](ex1_20.cpp) is the code.

**You need to enable C++11 support in your compiler.
With GCC and Clang, this can be done with the `-std=c++11` option.**

**(Never say it again.)**

How to test it? use the `book.txt` in `data` folder. And do it like this:

![run](https://db.tt/fm8iHtkF)

##Exercise 1.21
> Write a program that reads two Sales_item objects that have the same ISBN and produces their sum.

The program should check whether the objects have the same ISBN.(Have a look at 1.5.2, surprise!)

[Code](ex1_21.cpp)

##Exercise 1.22

> Write a program that reads several transactions for the same ISBN. Write the sum of all the transactions that were read.

Tips: this program will appear in the section 1.6.

[Here](ex1_22.cpp) is the code.

![run](https://db.tt/UlkuvpAS)

##Exercise 1.23
> Write a program that reads several transactions and counts
how many transactions occur for each ISBN.

Tip: please review the `1.4.4`.

[Here](ex1_23.cpp) is the code.

##Exercise 1.24
> Test the previous program by giving multiple transactions
representing multiple ISBNs. The records for each ISBN should be grouped
together.

You can use data/book.txt as the records.

![run](https://db.tt/EeDI7lvN)

##Exercise 1.25
> Using the Sales_item.h header from the Web site,
compile and execute the bookstore program presented in this section.

It is the same as Exercise 1.22.

![run](https://db.tt/C6OOPuzA)

repository: Ocxs/Cpp-Primer

repo_name: Ocxs/Cpp-Primer


text:
# In-band lifetimes

When writing a fn declaration, if a lifetime appears that is not already in
scope, it is taken to be a new binding, i.e. treated as a parameter to the
function.

So, in Rust 2015, you'd write:

```rust,ignore
fn two_args<'b>(arg1: &Foo, arg2: &'b Bar) -> &'b Baz
```

In Rust 2018, you'd write:

```rust,ignore
fn two_args(arg1: &Foo, arg2: &Bar) -> &'arg2 Baz
```

Here, `'arg2` was not defined. Rust sees that you have a parameter, `arg2`, that
should have a lifetime, and so the lifetime of that reference.

To put it in words, the former says:

> `two_args` is a function with one lifetime, `'b`. Its first parameter is a
> reference to a `Foo`, , and its second parameter is a reference to a `Bar`,
> bound by the lifetime `'b`, as its second argument. It returns a reference to
> a `Baz` bound by the lifetime `'b`.

And the latter says:

> `two_args` is a function. Its first parameter is a reference to a `Foo`,
> and its second parameter is a reference to a `Bar`. It returns a reference to
> a `Baz` with the same lifetime as the second parameter.

This says what it means, as opposed to implying it. Instead of defining a
lifetime, and then connecting things together, you say "this is the lifetime
of that."

## More details

More complicated signatures work too:

```rust,ignore
// before
fn two_lifetimes<'a, 'b: 'a>(arg1: &'a Foo, arg2: &'b Bar) -> &'a Quux<'b>

// after
fn two_lifetimes(arg1: &Foo, arg2: &Bar) -> &'arg1 Quux<'arg2>
```

Here, the `'b: 'a` is inferred, as it's the only possible way that `'arg1`
and `'arg2` could relate.

repository: aturon/edition-guide

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: aturon/edition-guide


text:
dashboard-cast
==============

Cast a series of URLs to a Chromecast, for example to display dashboards on a large monitor.  You can edit the list of URLs shown, their timings and their zoom level using your browser.

The Chromecast application is already published to Google, just visit http://dashboard-cast.charltones.com from Chrome to use it.

license: MIT

repository: charltones/dashboard-cast

repo_name: charltones/dashboard-cast


text:
---
title: Phase-Change Materials
summary: Materials whose structure is used for storage.
tags:
- PCM
date: "2016-04-27T00:00:00Z"

# Optional external URL for project (replaces project detail page).
external_link: ""

image:
  caption: Schematic of proposed iPCM switching  mechanism
  focal_point: Smart

#links:
#- icon: twitter
#  icon_pack: fab
#  name: Follow
#  url: https://twitter.com/georgecushen
#url_code: ""
#url_pdf: ""
#url_slides: ""
#url_video: ""

# Slides (optional).
#   Associate this project with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides = "example-slides"` references `content/slides/example-slides.md`.
#   Otherwise, set `slides = ""`.
slides: example
---

The idea of using structure for storage dates back to the 1960's with the seminal work of Stanford
Ovshinsky who proposed a four component chalcogenide alloy as a form of nonvolatile
electrical memory. The higher power requirements of the phase-change memory (PCM)
limited its application until the 1980's when the pioneering work at Matsushita lead to
the development of Ge-Sb-Te PCM alloys and its application to re-writeable optical discs.
This has now lead to optical disc storage capacities to exceed 50 GB. Moreover, the same
Ge-Sb-Te alloys are now employed in the form of storage-class memory (as epitomized by Intel's
Optane memory subsystems), a form of nonvolatile
electrical memory with latencies and write times within a factor of 10 of DRAM alleviating the
bottlenecks associated with the larger latency of the denser nonvolatile FLASH memory. Even
more recently a new variation of electrical memory called interfacial phase-change memory
(iPCM) has appeared which uses highly oriented superlattices of GeTe and Sb2Te3 to achieve more
than a factor of ten reduction in energy requirements by use of what is thought to be a crystalline-crystalline
transition. The figure above represents a possible atomic level model for the switching process
in iPCM devices.


text:
### Datashop Date-range Directive.

###### Usage:

```
This directive will appear as a HTML element with the following Attributes:
Example:
  <range-handler clock="12" mode="range" callback="dpcb" default-start-date="" default-end-date="" format="MMM dd, yyyy" timerange="timerange" timepicker="true"></range-handler>
```

###### Attributes:
```
1. mode - single or range.
2. callback - callback to be called on date submitDate.
3. format - format in which the date is to be displayed and returned.
4. default-start-date - if mode is range.
5. default-end-date - if mode is range.
6. timepicker - true if needed/ default is false.
7. clock - 12/24 hour time selection, if timepicker is set to true, default is 24.
8. default-date - if mode is single.
```
#### Working [Demo](https://onesh.github.io/datepicker.github.io/)


text:
# Grammar Generative Models for Music Notation Processing
Doctoral research project
EDITE Paris Doctoral School

### Context
Deep generative models have been successfully applied in many learning experiments with digital data, such as images or audio.
In the field of music, they can also be used to generate symbolic representations, in the context of problems such as automatic music generation or transcription [1-3]. A significant challenge for generating structured symbolic data in general is obtaining *well-formed results*.
This is especially true in the case of music. It is indeed widely accepted that musical notation represents, well beyond simple sequences of notes, a hierarchical organization of melodic and harmonic information, inducing non-local dependencies between musical objects [4]. A good representation of this information is essential for the interpretation and analysis of music pieces.

The authors of [5] study the case of structured symbolic data that can be represented by syntactic trees of a context-free grammar, and propose a treatment using a variational auto-encoder (VAE) which directly encodes and decodes these syntactical trees, for a given grammar, in order to obtain syntactically valid data - the encoding is a computational linear representation of the grammar (to produce a tree). This approach has given good results in the field of molecular synthesis.

### Objectives
The objective of this thesis is the study of the application of the latter approach to the case of musical notation.
We will rely for this on a tree model of musical notation that we develop as an intermediate representation for the treatment of problems such as musical transcription, the search for information in the databases of scores and the analysis of scores [6- 7].
Appropriate adaptations of this tree model, grammars generating such trees [6] and appropriate tree transformations [8] should be designed for the targeted application. A corpus of trees will be constituted from partitions in XML format and data augmentation techniques, and applied for model training.

The main intended application is the transcription of piano performances recorded in the symbolic MIDI format. We can use in this context large databases of piano scores in XML format and corresponding MIDI performances (whether recordings of real musicians on electronic keyboards or artificial performances). The problem of automatic generation can also be approached, for example by imitation (of other scores) or to produce a summary,
or from a description of the desired piece.

### Application
We welcome candidates with a master’s degree (or international equivalent) in computer science, who are curious about applied machine learning in music information retrieval. This project requires creative thinking and programming. Prior machine learning experience and knowledge in music notation is an important merit.
The thesis will take place at the Cedric laboratory of the CNAM, Paris, France.
Applications shall be made via https://myedb.edite-de-paris.fr
For more informations about the application process, please consult
https://www.edite-de-paris.fr/lancement-de-la-campagne-edite-2023
or contact<EMAIL_ADDRESS>
### References
[1] Jean-Pierre Briot, Gaëtan Hadjeres, and François Pachet.
Deep Learning Techniques for Music Generation.
Vol. 1 series Computational Synthesis and Creative Systems, Springer, 2020.

[2] Cheng-Zhi Anna Huang et al.
Music Transformer.
arXiv preprint arXiv:1809.04281 2018.

[3] Masahiro Suzuki.
Score Transformer: Generating Musical Score from Note-level Representation.
ACM Multimedia Asia. 2021.

[4] Stefan Koelsch, et al.
Processing of Hierarchical Syntactic Structure in Music.
Proceedings of the National Academy of Sciences 110.38, 2013.

[5] Matt J. Kusner, Brooks Paige, and José Miguel Hernández-Lobato.
Grammar Variational Autoencoder.
International conference on machine learning. PMLR, 2017.

[6] Francesco Foscarin et al.
A Parse-based Framework for Coupled Rhythm Quantization and Score Structuring.
7th International Conference on Mathematics and Computation in Music (MCM 2019).
see also <https://qparse.gitlabpages.inria.fr>

[7] Tiange Zhu et al.
A Framework for Content-Based Search in Large Music Collections.
Big Data and Cognitive Computing, 6 (1): 23, 2022.

[8] Florent Jacquemard, Pierre Donat-Bouillud, Jean Bresson.
A Structural Theory of Rhythm Notation Based on Tree Representations and Term Rewriting.
5th International Conference on Mathematics and Computation in Music (MCM) 2015.

branch_name: refs/heads/main


text:
External OAuth Authentication for CouchDB
=========================================

This is a rewrite of the couchdb-facebook authentication module in a more generic manner allowing other systems (e.g. Twitter) to be easily added. In addition the code is designed to utilise the _\_users_ database in a similar manner to the CouchDB 1.2 OAuth code allowing a single user to be authenticated in a number of different ways. Because of this change, this code is NOT COMPATIBLE with the couchdb-facebook code.

This version has been tested against CouchDB 1.2.x

This version supports authenticating users using:

- [Facebook API](http://developers.Facebook.com/docs/authentication/ )

- [Twitter API](https://dev.twitter.com/docs/auth/using-oauth/ )

It consists of a CouchDB httpd\_global\_handlers that responds to http GET requests and processes the appropriate login sequence. Once authenticated by the external system the handler requests an access code and retrieves profile information which is used to retrieve the CouchDB users document from the authentication_db. If there isn't a matching user record then one is created using the ID provided by the external system

An error during login will return HTTP 403 to the original caller.

This version also supports adding Facebook or Twitter login to existing CouchDB user accounts. If HTTP requests to CouchDB made during the external authentication redirection flow contain either an active CouchDB session cookie or the appropriate OAuth headers then the access token/secret received from Twitter or Facebook will be stored in the _user document related to the authenticated user.

Example Facebook Authentication Flow of Control
---------------------------

For our example we assume the app is hosted at my_site.com

1. The browser requests the link:
   https://www.facebook.com/dialog/oauth?client_id=249348058430770&scope=user_about_me&redirect_uri=http:%2F%2Fmy_site.com:5984%2F_fb
2. The user logs into Facebook (if not already logged in) and approves the app (if
not already approved). NOTE: If the user was already logged in and has already approved the app then
they will be redirected back without needing to type anything.
4. The browser arrives back at the _\_fb with a code that allows this module
to contact Facebook via the API and request an Access Code. No user interaction
required.
5. Once the Access Code is granted it allows the module to retrieve the users ID and other details from
Facebook. A couchDB username is created and the ID along with the access token is stored. Storing
the access token allows server components to access Facebook on the user's behalf.
6. When the couch session expires (the app will have to catch this) you simply
need to send the user to the URL in (1) again and, because they've already gone thru this
route, it should get you all the way back to _\_fb without any user
interaction needed.
7. The final act is to redirect the user to into the app, a location that is
a combination of _client\_app\_uri_ config directive and the _clientapptoken_
param to _\_fb_.

Example Twitter Authentication Flow of Control
---------------------------

For our example we assume the app is hosted at my_site.com

1. The browser requests the link:
   https://my_site.com:5984%2F_twitter
2. The user logs into Twitter (if not already logged in) and approves the app (if
not already approved). NOTE: If the user was already logged in and has already approved the app then
they will be redirected back without needing to type anything.
4. The browser arrives back at _\_twitter with a code that allows the module
to contact Twitter and request an Access Code.
5. When the Access Code is returned the user's Twitter screen name and ID are also returned. A couchDB username is created
and the ID along with the access token & secret are optionally stored. Storing
the access token and secret allows server components to access Twitter on the user's behalf.
6. The final act is to redirect the user to the url configured by the  _client\_app\_uri_ config entry

Build
--------------------

Use Build CouchDB: https://github.com/iriscouch/build-couchdb

    rake plugin='git://github.com/iriscouch/CouchDB-XO_Auth origin/master'

Installation
-------------------

Build CouchDB performed the installation already.

* Optionally create a [Facebook app](See http://developer.facebook.com)

* Optionally create a [Twitter app](See http://dev.twitter.com)

Facebook Configuration
--------------------
To add Facebook authentication the following entries are required in the xo_auth.ini file

          [httpd_global_handlers]
          _fb = {xo_auth_fb, handle_fb_req}

          [fb]
          client_id=1234567890
          store_access_token=true
          redirect_uri=http://my_awesome_app.com/_fb
          client_secret=1234567890ABCDEF123456789
          client_app_uri=http://my_awesome_app.com/home?

See the Futon configuration section, under the `fb` section.

**\_fb**
  This is the couch location for the code that redirects the user to Facebook.
  Pass in a param called _clientapptoken_ if you want something added to the
  client app redirect at the end of the auth process (for when control is
  returned to your app).

  NOTE: Facebook requires that your site is public. The 'Site URL' setting of
        the Facebook app needs to be set to your site.

**client\_id**
  The App ID of your Facebook app

**store\_access\_token**
  This defaults to false. Setting it to true means that the user's Access Token will be saved in
  the \_user database allowing server components to access the user's external account

**redirect\_uri**
  This is the location that Facebook will be told to return the user to when
  Facebook login is complete. This MUST start with the same location that you set
  for Site URL in the Facebook app

**client\_secret**
  DO NOT PUBLISH THIS! It is the _App Secret_ from your Facebook app.
  It is used behind the scenes to contact Facebook. If anyone gets hold
  of this they can pretend to be your app. Beware!

**client\_app\_uri**
  Once the Facebook and CouchDB login have completed this is the URL that the initial call
  will be redirected to. Any value passed to the initial _\_fb__ call param _clientapptoken_ will be
  appended to this URL.

Twitter Configuration
--------------------

To add Twitter authentication the following entries are required in the xo_auth.ini file

          [httpd_global_handlers]
          _twitter = {xo_auth_twitter, handle_twitter_req}

          [twitter]
          client_id=1234567890
          store_access_token=true
          redirect_uri=http://my_awesome_app.com/_twitter
          client_secret=1234567890ABCDEF123456789
          client_app_uri=http://my_awesome_app.com/home?

          [blowfish]
          key=D67051C4C560B93818091AC4C461375B
          ivec=BC7FB2B980470D69

**\_twitter**
  This is the CouchDB location for the code that handles Twitter Authentication.

**client\_id**
  The _Consumer Key_ of your Twitter app

**client\_secret**
  DO NOT PUBLISH THIS! It is the _Consumer Secret_ from your Twitter app.
  It is used behind the scenes to contact Twitter. If anyone gets hold
  of this they can pretend to be your app. Beware!

**store\_access\_token**
  This defaults to false. Setting it to true means that the user's Access Token & Secret will be saved in
  the \_user database allowing server components to access the user's external account

**redirect_uri**
  This is the same as the _Callback URL_ configured for the Twitter App

**client\_app\_uri**
  Once the Twitter and CouchDB login have completed this is the URL that the initial call
  will be redirected to.

**blowfish** The Twitter Authentication module uses Blowfish to encrypt a temporary cookie. Blowfish was chosen over AES
because the Erlang crypto module in Ubuntu 10.04 doesn't support AES. _key_ is an arbitaty value upto 56 bytes in length, but must also be a multiple of 8 bytes, _ivec_ is an arbitary 64 bit value (8 bytes)

Username control
----------------
          [xo_auth]
          illegal_username_prefixes=foo,bar
          illegal_username_prepend=prefix

This configuration provides limited control over the automatic username generation. If generated usernames start with any of the prefixes in *illegal_username_prefixes* then the generated username will be prefixed with *illegal_username_prepend*

Notes
---------------

The users ID on the external system and the access token are stored in the user document in the authentication database as follows:

    {
       "_id": "org.couchdb.user:michaelcollins14795",
       "_rev": "1-2eb00e9f166c13d63a6479144a3f565e",
       "salt": "421209aaee82b479d5799ca2a51d2ff4",
       "facebook": {
           "id": "555366654",
           "access_token": "AAABriRugmO4BAONugCLvNsaV3JN5OwZB5Aw85S5OEHLlYkC8taqFtVM0ZABSvrFZA0u3h1Jd0sGq3ybITF3wXkfMffppsEZD"
       },
       "name": "michaelcollins14795",
       "roles": [
       ],
       "type": "user"
    }

Adding a section to an existing user document that contains the *facebook* section with the ID and a blank access_token would allow that user to be authenticated via Facebook.

License
---------------

  CouchDB:XO\_Auth is licensed under: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/

  Copyright (c) 2012 Ocasta Labs Ltd.

  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.


text:
---
title: "Monitoring UI"
linkTitle: "Monitoring UI"
weight: 1
date: 2020-11-19
description: |
  Follow these simple steps to access the Prometheus and Grafana monitoring interfaces.
---

When you used Helm to install a `k8ssandra-cluster` instance in Kubernetes, one of the key features provided was a set of preconfigured Grafana dashboards. They visualize data collected about your environment by the Prometheus Operator, which is also packaged with K8ssandra. Use the Grafana dashboards to monitor your K8ssandra cluster's health and traffic metrics.

After you've met the prerequisites identified below, access the preconfigured Grafana dashboards. For example:

[http://grafana.localhost:8080/](http://grafana.localhost:8080/)

## Tools

* Web browser

## Prerequisites

1. Kubernetes cluster with the following elements deployed:
   * [K8ssandra Operators]({{< ref "getting-started#install-k8ssandra" >}})
   * [K8ssandra Cluster]({{< ref "getting-started#install-k8ssandra" >}})
   * [Ingress Controller]({{< ref "ingress" >}})
1. DNS name for the Grafana service, referred to as _GRAFANA DOMAIN_ below.
1. DNS name for the Prometheus service, referred to as _PROMETHEUS DOMAIN_
   below.

## Access Grafana Interface

Check that the pods configured by K8ssandra are running:

`kubectl get pods`
```
NAME                                                              READY   STATUS      RESTARTS   AGE
cass-operator-65956c4f6d-f25nl                                    1/1     Running     0          4h26m
grafana-deployment-8467d8bc9d-czsg5                               1/1     Running     0          4h13m
k8ssandra-cluster-a-grafana-operator-k8ssandra-5bcb746b8d-4nlhz   1/1     Running     0          4h22m
k8ssandra-cluster-a-reaper-k8ssandra-6cf5b87b8f-vxrwj             1/1     Running     0          4h5m
k8ssandra-cluster-a-reaper-k8ssandra-schema-pjmv8                 0/1     Completed   5          4h8m
k8ssandra-cluster-a-reaper-operator-k8ssandra-55dc486998-f4r46    1/1     Running     0          4h22m
k8ssandra-dc1-default-sts-0                                       2/2     Running     0          4h22m
k8ssandra-tools-kube-prome-operator-6d57f758dd-7zd92              1/1     Running     0          4h26m
prometheus-k8ssandra-cluster-a-prometheus-k8ssandra-0             2/2     Running     1          4h22m
```

Notice that the Grafana Operator is running, as well as other services such as Prometheus.

If you are running a local Kubernetes environment, you can access the Grafana dashboard with a URL such as:

[http://grafana.localhost:8080/](http://grafana.localhost:8080/)

### Grafana credentials

The default configured credentials for Grafana are:

```
grafana:
  adminUser: admin
  adminPassword: secret
```

Refer to:

https://github.com/k8ssandra/k8ssandra/blob/main/charts/k8ssandra-cluster/values.yaml

You can change the credentials in several ways:

* In the Grafana admin UI. See:

    [http://grafana.localhost:8080/profile/password](http://grafana.localhost:8080/profile/password)

* Or edit a **copy** of [values.yaml](https://github.com/k8ssandra/k8ssandra/blob/main/charts/k8ssandra-cluster/values.yaml); update the credentials; submit a `helm upgrade` command to the cluster. Example:

    `helm upgrade cluster-name k8ssandra/k8ssandra-cluster -f my-values.yaml`

* Or pass in a `--set grafana.adminPassword` flag. Example:

    `helm upgrade cluster-name k8ssandra/k8ssandra-cluster --set  grafana.adminPassword=NewpAssw0rd!`

### Navigating in Grafana

From the Grafana start page, [http://grafana.localhost:8080/](http://grafana.localhost:8080/) in local installs, click the Dashboards icon shown below and select the **Manage** pane:

![OK](grafana-dashboards-icon.png)

Grafana loads its dashboard options:

1. Enable the **Default** checkbox.
1. Click the checkbox for one of the dashboards that K8ssandra created when you installed the `k8ssandra-cluster` instance
1. To open the selected dashboard, click on its text link. In this example, you'd click on Cassandra Cluster Condensed:

![OK](grafana-dashboards-default-selected1.png)

Here's an example of the Cassandra Cluster Condensed dashboard in Grafana:

![OK](grafana-cass-cluster-condensed.png)

### What can I do in Grafana?

* Cluster health
* Traffic metrics

## Access Prometheus Interface

![Prometheus UI](prometheus-example.png)

Prometheus is available at the following address:

**http://PROMETHEUS_DOMAIN/**

For example:

[http://prometheus.localhost:8080/](http://prometheus.localhost:8080/)

### What can I do in Prometheus?

* Validate serves being scraped
* Confirm metrics collection

## Next

Access the [Repair Web interface]({{< ref "/docs/topics/accessing-services/repair/" >}}).


text:
---
layout: default
---

# 1997-08-20 - Re: The Real Bell Issue / Re: Bell, etc

## Header Data

From<EMAIL_ADDRESS>(Anonymous)

To<EMAIL_ADDRESS>Message Hash:<PHONE_NUMBER>948652d67e66093e5e65b9df3e8e51bb85c35c2d04cea108852e28

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-08-20 07:14:49 UTC

Raw Date: Wed, 20 Aug 1997 15:14:49 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Anonymous)
Date: Wed, 20 Aug 1997 15:14:49 +0800
To<EMAIL_ADDRESS>Subject: Re: The Real Bell Issue / Re: Bell, etc
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Duncan Frissell wrote:

> He could have been aggressive and fought instead of wimping out.  Lots of
> people have faced much more serious crimes and won.  It's not like Jim had
> anything better to do.

  The fact of the matter is, none of us know what Jim knows, and what
he knows is likely only what his government appointed schill has told
him. I recall Vin Suprynowicz mentioning a prominent attorney contacting
Bell's attorney in an effort to help, and receiving no reply.
  Neither do we know if Bell has merely decided that he should concede
the legal ground in order to be able to pursue the issue later, on
turf that suits him better.

> In such cases, an aggressive show of strength of character is best.  Weakness
> invites oppression.

  McVeigh's problem is not weakness, but lack of knowledge about the
legal system and the quality of his legal representation. Unfortunately,
I have no doubt that the government already has lawyers in place whose
job thus far has been to gain McVeigh's trust, so that they can screw
up his appeals, as well.

TruthMonger

{% endraw %}
```

## Thread

+ Return to [August 1997](/archive/1997/08)

+ Return to "[Adam Back <aba@dcs.ex.ac.uk>](/authors/adam_back_aba_at_dcs_ex_ac_uk_)"
+ Return to "[Bill Frantz <frantz@netcom.com>](/authors/bill_frantz_frantz_at_netcom_com_)"
+ Return to "[frissell@panix.com](/authors/frissell_at_panix_com)"
+ Return to "[Kent Crispin <kent@songbird.com>](/authors/kent_crispin_kent_at_songbird_com_)"
+ Return to "[Lucky Green <shamrock@netcom.com>](/authors/lucky_green_shamrock_at_netcom_com_)"
+ Return to<EMAIL_ADDRESS>(Anonymous)](/authors/nobody_at_replay_com_anonymous_)"
+ Return to "[Patrick Oonk <patrick@atro.pine.nl>](/authors/patrick_oonk_patrick_at_atro_pine_nl_)"
+ Return to "[Paul Pomes <ppomes@Qualcomm.com>](/authors/paul_pomes_ppomes_at_qualcomm_com_)"
+ Return to "[Ray Arachelian <sunder@brainlink.com>](/authors/ray_arachelian_sunder_at_brainlink_com_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"
+ Return to "[Vipul Ved Prakash <vipul@pobox.com>](/authors/vipul_ved_prakash_vipul_at_pobox_com_)"

+ 1997-08-20 (Wed, 20 Aug 1997 15:14:49 +0800) - Re: The Real Bell Issue / Re: Bell, etc -<EMAIL_ADDRESS>(Anonymous)_
  + 1997-08-20 (Thu, 21 Aug 1997 00:55:47 +0800) - [An end to "court appointed attorneys"](/archive/1997/08/bdc38f93113af6999bcbfe482d771be54571276dca07909df36c8d69360d05ac) - _Tim May<EMAIL_ADDRESS>    + 1997-08-20 (Thu, 21 Aug 1997 01:42:51 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/151f630aa4554bc29ac9385e09fcb82f0c38ceefa57a5303a4c247b7f973ea8a) - _Patrick Oonk<EMAIL_ADDRESS>    + 1997-08-20 (Thu, 21 Aug 1997 01:55:29 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/540849b9da3bc234c85bb06f3764c9e498c86490c855941604054913837e9127) - _Tim May<EMAIL_ADDRESS>      + 1997-08-20 (Thu, 21 Aug 1997 03:12:53 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/7f76788710a93360cf25df8435460d6126a2e52d8f635a8f7ed1a7349e0ea59a) - _Paul Pomes<EMAIL_ADDRESS>        + 1997-08-21 (Thu, 21 Aug 1997 10:49:25 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/34f03e76b92492db0748fc408ab2f496e68d2ab6dc17bee7a177f742d6559b05) -<EMAIL_ADDRESS>      + 1997-08-20 (Thu, 21 Aug 1997 03:21:33 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/963d8e7e29daffcb2d6d4f01551f1b350e8a36e74aabb649ca4eecda761e9784) - _Tim May<EMAIL_ADDRESS>        + 1997-08-20 (Thu, 21 Aug 1997 04:25:17 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/0f73b1ab686a0f3d192ec6bdf92c5bc27c8c4175c2e794801efbd460e1905285) - _Patrick Oonk<EMAIL_ADDRESS>        + 1997-08-21 (Thu, 21 Aug 1997 11:52:54 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/b2f8fa38a3df544ad9d69930f028efae876bb21b00f8624cdd86fb663dbc4e5f) - _Tim May<EMAIL_ADDRESS>        + 1997-08-21 (Thu, 21 Aug 1997 13:37:22 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/dfbc46a44c427ef08da736c2879f6a867041709e0ce8a4709d56164e7f643c57) - _Kent Crispin<EMAIL_ADDRESS>          + 1997-08-21 (Fri, 22 Aug 1997 00:07:01 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/ffdeda2ad87d23d60051831041c7653e060ff64e7aa9ac197bfe1a481d88338c) - _Ray Arachelian<EMAIL_ADDRESS>          + 1997-08-21 (Fri, 22 Aug 1997 03:40:53 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/7262b69e3c1a997155ffa0b9eb8254ca57edfc0f05f35097bd575e7a1378b4d0) - _Vipul Ved Prakash<EMAIL_ADDRESS>          + 1997-08-22 (Fri, 22 Aug 1997 11:24:35 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/477e0d1ebb26955b56f7ed566b08748763c1e459bd237a6fbddf16d368b53ea5) - _Kent Crispin<EMAIL_ADDRESS>          + 1997-08-22 (Fri, 22 Aug 1997 14:13:21 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/d38d9f4cb9c12a7b2ead0455092e80e57b4b65160fe0e4e13b4618ee412aeb87) - _Kent Crispin<EMAIL_ADDRESS>            + 1997-08-23 (Sat, 23 Aug 1997 08:53:16 +0800) - [lack of evolutionary pressures (was Re: An end to "court appointed attorneys")](/archive/1997/08/a2eee69fc6936606be63684edda6bc3c58035652b8ea631d791a895ea3a8d17d) - _Adam Back<EMAIL_ADDRESS>            + 1997-08-23 (Sat, 23 Aug 1997 14:01:51 +0800) - [Re: lack of evolutionary pressures (was Re: An end to "court appointed attorneys")](/archive/1997/08/24de81e4aa269e761f679c0d41d655b3de4768d9bfd202a2527dde3104751f75) - _Kent Crispin<EMAIL_ADDRESS>              + 1997-08-23 (Sat, 23 Aug 1997 18:23:26 +0800) - [Re: lack of evolutionary pressures (was Re: An end to "court appointed attorneys")](/archive/1997/08/4debfbe36cb0f5b7cde63f5ec6bd74363002364dc159efcca753eaf67d74ed85) - _Adam Back<EMAIL_ADDRESS>              + 1997-08-23 (Sat, 23 Aug 1997 20:38:12 +0800) - [Re: lack of evolutionary pressures (was Re: An end to "court appointed attorneys")](/archive/1997/08/10d1e46539839d55d26902ee2fdfe56868eb637b6bf7941a4e2b514441bc4e6a) - _Lucky Green<EMAIL_ADDRESS>              + 1997-08-23 (Sun, 24 Aug 1997 00:44:12 +0800) - [Re: lack of evolutionary pressures (was Re: An end to "courtappointed attorneys")](/archive/1997/08/78aca4075473eee439f66f8a0b07538aeee49512e1425165ae93d1b05c3143a6) - _Bill Frantz<EMAIL_ADDRESS>                + 1997-08-24 (Mon, 25 Aug 1997 03:16:50 +0800) - [Re: lack of evolutionary pressures (was Re: An end to "courtappointed attorneys")](/archive/1997/08/f1461ddff7cff3c79c6f15aff101daeca8918e28ef33ff98192726e38339e27a) - _Adam Back<EMAIL_ADDRESS>              + 1997-08-23 (Sun, 24 Aug 1997 01:18:18 +0800) - [Re: lack of evolutionary pressures](/archive/1997/08/d58a931cd0990e472c9b3bfd2d0bdb9a8b7d07c49aeee27d953f3070a8671719) - _Tim May<EMAIL_ADDRESS>                + 1997-08-24 (Mon, 25 Aug 1997 03:07:52 +0800) - [Re: lack of evolutionary pressures](/archive/1997/08/9c4232b7358a061de5c1f21c46593cd5d0a4f8ab34eb21a7f7c206f36f49849e) - _Adam Back<EMAIL_ADDRESS>                + 1997-08-25 (Mon, 25 Aug 1997 12:57:08 +0800) - [Re: lack of evolutionary pressures](/archive/1997/08/9d8a6f429b2b61731bfb477dd59b59d28cb68e9cb553e7033276d79ea5423fea) - _Bill Frantz<EMAIL_ADDRESS>              + 1997-08-24 (Sun, 24 Aug 1997 13:23:30 +0800) - [Re: lack of evolutionary pressures (was Re: An end to "court appointed attorneys")](/archive/1997/08/e0c07b2d21f660615893cd12c6ad298ce73e6ee9f892e0b5878316c64c2aacc0) - _Kent Crispin<EMAIL_ADDRESS>                + 1997-08-24 (Mon, 25 Aug 1997 03:17:42 +0800) - [Re: lack of evolutionary pressures (was Re: An end to "court appointed attorneys")](/archive/1997/08/d2ff32b4e8d692d9674db33c108029c357228e1024ba207bec1589d313ffe561) - _Adam Back<EMAIL_ADDRESS>            + 1997-08-23 (Sun, 24 Aug 1997 04:34:28 +0800) - [Re: An end to "court appointed attorneys"](/archive/1997/08/5a0c54a83a3e48c1b852e576349fc69bf452203f44fbe3270f16668ea2f5c5a4) - _Vipul Ved Prakash<EMAIL_ADDRESS>

gha_license_id: MIT


text:
---
layout: page
title: Roadmap
---

## Roadmap
The priorities associated with each area of development are in the process of being further defined as is the finite detail associated with each release to move PAR from its current version, 0.3 to a production version 1.0.

The roadmap breaks down into three distinct categories, each has one or more specific development areas:

1. Data model
2. Tools
3. Integration

### Data Model
The data model is the core component of PAR that describes the elements of preservation policies implemented using machine readable data structures. The data model describes attribute such as:
* Preservation actions that can be performed on digital content
* The tools that would be needed to perform the desired actions
* File formats
* Policy statements

The model has now matured sufficiently in terms of what can be done but further effort is needed to define what it could do and what it’s limitations might be. So key focus areas for model development include:

**Project team to define**
**PAR Team Define**

### Tools
Development encompassess:

**Sync tool** that will enable preservation actions to be copied between systems??:
* PAR Project team - what else / what needs to be developed, what are the key features?

**Registry browser** this will replace the existing prototype, key functions will include:
* PAR Project team - what needs to be developed, what are the key features?

**Register editing tool** this will enable users to update their own registry??
* PAR Project team - what needs to be developed, what are the key features?

**Client GUI tool**
* Function???
* PAR Project team - what needs to be developed, what are the key features?

**Empty registry**
* Function???

PAR Team - Are there any other generic / specific area of development that should be included in this high level roadmap???

### Integration
Development encompassess:

**API extensions** Further planned enhancements include:
* identity management
* PAR Project team - what else?

**Trusted source integration**
* Wikidp
* Other trusted sources / end points as identified

**Vendor DP systems**
* Integration of other vendor DP systems

repository: MartinSpeller/par

gha_language: Java

repo_name: MartinSpeller/par


text:
# Pattern Library System

#### About these Notes

The notes described here are mainly for my personal use. The goal is to keep a log of the steps taken to build the project and to share my experience with others that might have the same needs or interest.

***

## Executive Summary

One of the biggest challenges in any software design/development environment is how to maintain the level of consistency and collaboration between designers and developers.

A pattern library system is a central web repository where designers and developers can collaborate and gather design and front-end development assets.

## Key Assumptions

### AngularJS

I've chosen to use [AngularJS](http://angularjs.org/) to build this app, the main reason is that Angular does not rely on a database, as I'd like to keep the library as portable as possible.

The [Angular tutorial](http://docs.angularjs.org/tutorial) on how to build an Angular app seems to be a perfect foundation for this type of library system, which includes all elements I have envisioned:

- Grid Style
- Live Search
- Sorting
- Multiple photo assets
- Detail page

With these ingredients in place, the development process will be much shorter.

### Git on Mac/Linux
I'll be using my Mac as the dev environment. If you are on Windows, the [Angular tutorial](http://docs.angularjs.org/tutorial) has instructions for Windows.

***

## Getting Started
This tutorial relies on the use of Git versioning system for source code management. You don't need to know anything about Git to follow the tutorial.

If you are intersted on learning more about Git, make sure to checkout my [Git-101](https://github.com/mpaiva-tr/Modern-Web/blob/master/GIT-101.md) page.

### 1. Git
Make sure you have Git installed by using the following command line on your **Terminal** app:

	git --version

If you need to **install Git** enter the following:

	sudo port install git-core +svn +doc +bash_completion +gitweb

### 2. Node & Karma

You will need [Node.js](http://nodejs.org/) and Karma to run unit tests, so please verify that you have Node.js v0.8 or better installed and that the node executable is on your PATH by running the following command in a terminal window:

	node --version

Additionally install [Karma](http://karma-runner.github.io/) if you don't have it already:

	npm install -g karma

### 3. Cloning Angular's PhoneCat app

Clone the angular-phonecat repository located at Github by running the following command:

	git clone git://github.com/angular/angular-phonecat.git

This command creates the angular-phonecat directory in your current directory.

Change your current directory to angular-phonecat:

	cd angular-phonecat

The tutorial instructions assume you are running all commands from the angular-phonecat directory.

You will need an http server running on your system. Mac and Linux machines typically have Apache pre-installed, but If you don't already have one installed, you can use node to run scripts/web-server.js, a simple bundled http server.

repository: mpaiva-tr/UI-Components-Gallery

repo_name: mpaiva-tr/UI-Components-Gallery


text:
# ManiRESTo
Using [RESTful](http://en.wikipedia.org/wiki/Representational_state_transfer) resources in an easy to reason about manner.

Including the good bit's of [HATEOAS](http://en.wikipedia.org/wiki/HATEOAS), heuristically applied to every-day API development.

## Resources

* Are consistant
  * Same representation each request
  * Same representation for each verb
* Do not need to map to your underlying data model directly
  * Light representations to clarify meaning or intent

## Verbs
  * Common verbs are GET, PUT, DELETE, POST
  * Don't create new verbs
  * Don't RPC
    * Favor `GET path/to/resources` over `GET resource/index`
    * Favor `DELETE path/to/resource` over `GET path/to/resource/delete`
    * Favor `GET path/to/invoice/taxes` over `get path/to/invoice/calculate_taxes`

## Status Codes
  * Are often sufficient to convey meaning
  * Use over requiring loading another resource for details
    * Do not require user to use something else to find out that permission
    * [Might be a little mean](#enumerating-permissions)

## URIs

# Notes

## Enumerating Permissions
If a resource returns a 403 or 404 due to permissions, eg:

```
GET path/to/things/resource1 -> 403: Forbidden
GET path/to/things/resource2 -> 403: Forbidden
GET path/to/things/resource3 -> 400
```

Consider providing collection level permissions (as well as maintaining Status Codes):

```
GET path/to/things ->
  {
    'resource1': { 'status': 403, 'uri': 'path/to/things/resource1' },
    'resource2': { 'status': 403, 'uri': 'path/to/things/resource2' },
    'resource3': {
      'uri': 'path/to/things/resource3',
      'status': 400,
      'summary_field': 'I am a summary collection field'
    }
  }
```

# TODO
* Link rel. Obviously.

repository: bunniesandbeatings/maniresto

repo_name: bunniesandbeatings/maniresto


text:
Version 3.2 (xx.2015)
===========================
- have a config-home were logging/configs take place
- more simplification (just one cache implementation, no db)
- started writing tests - but now abandoned (I would need some non-copyright streams for this)
- captcha support
- removed/added animeloads
- tried different gui systems: qt,tk,gtk - all to complicated
- use gooey as gui system - it just starts from my argparse config
- commandline:
	- limit download speed
	- resume downloads when no arguments
	- interactive mode to select stream files
- use yapsy as plugin manager
	- could again remove some of my own code - yapsy seems ok
- use urlresolver api for getting flash-download url
	- this is a bigger change as it makes this tool a bit less fragile and
		I don't need to put so much time on developing these things anymore
- unified config-setting/loading, commandline and gui (via gooey)

Version 3 (16.05.2014)
===========================
- python3 compatibility
- removed broken streams and not used library
- some new streams and pages
- static code analyze with landscape.io
- test automation with travis-ci
- simplification and cleanup in all parts of the code
- removed many threads
- renaming tools to flashget and having everything more like other python projects
- the config file is now ini format and can be in the home directory
- have a setup.py for installing

Version 2 (30.12.2012)
===========================
- big cleanup: removed curses and other not used tools
- don't use my http-lib but requests
- use argparse

Version 2 (30.12.2011)
===========================
- stream_extract: implement putlocker
- improved cache interface
- added new caches (Leveldb, HypterTable, KyotoCacheComp (=Kyotocabinet with compression turned on))
- urlmanager will look if it received binary data and won't cache it
- http library improvements (header parsing, error handling)
- nicely close the program and join all threads
- own extension manager
- extension manager for pages and streams
- direct download of streams via commandline
- streams are objects now too
- support https

Version 2 (17.Nov 2011)
===========================
after so long time another version increment is needed
change in version numbering cause of simplicity

- allow disabling of curses interface
- improved http library with many bugfixes
- (re-)implement animeloads, eliteanimes, movie-loads, kinox.to
- extracting all data from sites and store it into a mysql database
- improved extract-interface
- allow multithreaded extract-all through specifying start and amount
- replaced my own cache implementation with kyotocabinet cause filesystem got too slow
- dropped idea of client-server style program

Version 1.1 (25.Jul 2009)
===========================
again no particular reason for this, i just think this version is stable (:

- generic xvid implementation + some supported pages for it
- my http-implementation
  - bugfix: correctly get the port from a link
  - bugfix: keywords (like content-length) in http-protcol aren't casesensitive
  - using a dns-cache
- added crypt-it container.. but currently they don't realy work.. you just can
  display the links inside a container
- first idea + some code about making this program in a client-server style
  to support later more guis (but currently doesn't work)
- many other smaller things, just use git cherry -v 7e46d271

Version 1
==============
there is no particular reason why exactly this revision got version 1, it's
just that i can add a version with the commandline-option

cause this is the first version, i will mostly list features here:
 - tools for easy adding new commandline options
 - own http-class which implements keep-alive and which is (compared to other python http-libs) very small
 - classes to handle the webpages, where flashfiles can be found. supported pages:
    + anime-loads, animekiwi, anime-junkies, youtube, kino.to
 - classes to handle the flv-streams, which can extract a direct-download link. supported streams:
    + veoh, eatlime, megavideo, hdweb, sevenload, youtube, imeem, hdshare, zeec, plain (direct dl-link is inside html)
 - class for logging + config-params to filter some logging stuff
    not very advanced yet
 - class for creating a gui in ncurses
    not very advanced yet + has some bugs with the scrolling in those logs
    but has already some nice features and is, i think, quite fast

repository: balrok/Flashget

repo_name: balrok/Flashget


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

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

## [Unreleased]

## [0.3] - 2020-05-04

### Added

- preview image files (35f4868)

## [0.2] - 2020-03-22

### Added
- code cells may be used to customize execution blocks (!4)
- motion-based code selection for execution (!5)

### Changed
- `<S-CR>` no longer takes a range and instead relies on automatic selection of
    the block of code based on the indent level (f11f8b4)
- if `jump_line_after_execute` is set the cursor will jump after the end of the
    executed block of code (457e307)

## [0.1] - 2020-02-23

### Added
- ensure cleaner shutdown through use of KernelManager (81240935)
- improve user configurability
- add vim documentation
- trigger `+` at the end of `DeuteriumExecute` (37297755)
- clear virtual text on all lines that are executed (8b87886e)
- unittests and Gitlab CI (!2)

### Changed
- split `DeuteriumSend` into an execute and internal send function (d248dbd)
- the above renames all `send`-related names (visible to the user) to `execute`
- longer outputs on stdout and stderr streams can be handled in either popup or
    preview windows (configured via `handler` settings) (!1)

## [0.0.1] - 2020-02-10

### Added
- initial version with basic functionality

[Unreleased]: https://gitlab.com/mrossinek/deuterium/-/compare/v0.3...master
[0.3]: https://gitlab.com/mrossinek/deuterium/-/tags/v0.3
[0.2]: https://gitlab.com/mrossinek/deuterium/-/tags/v0.2
[0.1]: https://gitlab.com/mrossinek/deuterium/-/tags/v0.1
[0.0.1]: https://gitlab.com/mrossinek/deuterium/-/tags/v0.0.1

repository: mrossinek/deuterium

repo_name: mrossinek/deuterium


text:
Laravel-4-Nexmo
===============

This is a Laravel4 package that helps you integrate Nexmo sms services into your site.
This is a work in progress so right now these are the function available:

1. Get Account Balance
2. Get Prices and Carriers
3. Send SMS

## Laravel 4.2 and below
You can install this package through Composer. Edit your composer.json file and add `christian-giupponi/nexmo` to the required:

    "require" : {
        "christian-giupponi/nexmo": "dev-master"
    }

ext, update Composer from the Terminal:

    composer update

Now you have to add the Service Provider so edit your app/config/app.php file and in the providers array add:

    'ChristianGiupponi\Nexmo\NexmoServiceProvider'

Now add the Facade in aliases array:

        'Nexmo'    => 'ChristianGiupponi\Nexmo\Facades\Nexmo',

You also need to pusblish the config file to add your own api and secret key that you can find on your Nexmo's dashboard:

    php artisan config:publish christian-giupponi/nexmo

And you're done. Now you can call nexmo package using

    Nexmo::getBalance();
    Nexmo::prices();
    Nexmo::sendSMS($from, $to, $text, $options);

## Results
All the function of this package will return a json result. It is made with 3 fiedls:

    1. code
    2. reason
    3. body

### 1. Code
This fields will return an http code status that is generated by the http request and represent the result of the api call, is not the code returned from Nexmo.
It is generated by the Guzzle client and you can check if the request is correct.

### 2. Reason
Like the above it is generated by Gruzzle and contains the result of the api request, not the response from Nexmo.
In this fild you can check if there are any errors, like malformed request.

### 3. Body
This is a Json result sent by Nexmo after we call its api

## Issue
If you find any issue please post it here on GitHub, fell free to fork and add any new api call that you need and then please make a pull request to keep this project updated.


text:
# Ying Huang | Portfolio

This is my portfolio website: https://welcomeying.github.io

### Skills and resources
* HTML
* CSS
* JavaScript
* jQuery
* Bootstrap
* Inspired by [Dinesh Pandiyan](https://github.com/flexdinesh/flexdinesh.github.io) and [Sean Murphy](http://seanmurphy.eu)

### License
MIT © Ying Huang


text:
# DezEsratP1 #

## About The Project ##

  Tuition Reimbursement Management System purpose  is to provide a system that encourages quality knowledge growth relevant to an individual’s expertise. Each employee is allowed to claim up to $1000.00 in tuition reimbursement per year and  have different standard reimbursement coverage. Employees can login and submit requests for the reimbursement. Employees must complete the Tuition Reimbursement form with required information .Benefits Coordinator will view all reimbursement requests and based on their history he will approve and deny requests.

  ### Technologies Used ###

  - Spring Tools Suite
  - Java
  - PostgreSQL
  - Servlet
  - HTML
  - CSS
  - JavaScript
  - AJAX
  - JASON
  - SESSION
  - Tomcat
  - DBeaver

## Getting Started ##

 1. Set up your database in Amazon RDS through the AWS website.
 2. In the database.properties file add (endpoint connection(url), the username, and the password)
 3. Establish the connection in DBeaver
 4. create a new schema and create new tables.
 5. Installed Apache Tomcat Version 9.0.
 6. Start the server.
 7. Run the DezEsratP1 project in Spring Tool Suite.
 8. Go to http://localhost:8080/DezEsratP1/login.html

## Features ##
 -  Can login as 3 different types of user (requester, BenCo, and DirectSuperivisor)
 -  Requester
    - Can create a new reimbursement request form
    - Can view all the status of all reimbursement forms asccociated with their user id
    - Can submit a final grade for any of their open reinmbursement forms ("open" as in not awarded or denied)
 - DirectSuperivor
    - Can view all the reimbursement request forms that have been submitted by any requester
    - Can approve or deny a reimbursement form
 - BenCo
    - Can view all the reimbursement request forms that have been approved by the DirectSupervisor
    - Can approve or deny a reimbursement form
 - Can logout and be sent back to the login page

## Contributers ##
Dezmanique Martin and Esrat Jahan


text:
# Data

The data are stored as a CSV and as a pickled pandas dataframe (Python 2.7). Each data file contains 5 columns:

`count` = number of CrowdFlower users who coded each tweet (min is 3, sometimes more users coded a tweet when judgments were determined to be unreliable by CF).

`hate_speech` = number of CF users who judged the tweet to be hate speech.

`offensive_language` = number of CF users who judged the tweet to be offensive.

`neither` = number of CF users who judged the tweet to be neither offensive nor non-offensive.

`class` = class label for majority of CF users.
  0 - hate speech
  1 - offensive  language
  2 - neither

gha_language: Jupyter Notebook


text:
---
layout: page
exclude: true
title: enum
---

You can **define an enum** by defining a set of `const`s that are annotated with the enum type and the `iota` keyword.
```go
package httpverbs

type HttpVerb int

const (
  GET HttpVerb = iota
  POST
  PUT
  DELETE
)
```

You should store your enum inside its own package because otherwise the `const` value will be available at the top level namespace of the file in which its defined.

You can **access the enum variants** on the package namespace *not* on the type.

You can **access the enum type** from the package namespace and use it for data structure storage types.
```go
package main

import("my-project/httpverbs")

func main() {
  // access the a variant of the variant
  x := httpverbs.GET

  // store variants of enum in a data structure
  y := [httpverbs.HttpVerb]{httpverbs.GET, httpverbs.DELETE}
}
```

You can **iterate through all variants of an enum** by adding a "terminating" enum value at the end of the list of enum definition and iterating through to that limit starting from a specific value.
```go
package httpverbs

type HttpVerb int

const (
  GET HttpVerb = iota
  POST
  PUT
  DELETE
  Terminator
)

for verb := HttpVerb(0); verb <
```

The example below iterates through each of the variants of the enum as integer values. This is then used to index a `map` that stores uses the `HttpVerb` type as its key.
```go
package main

import(
  "fmt"
  "my-project/httpverbs"
)

func main() {
  verbs := map[httpverbs.HttpVerb]string {
    httpverbs.GET: "GET",
    httpverbs.POST: "POST",
    httpverbs.PUT: "PUT",
    httpverbs.DELETE: "DELETE",
  }

  for verb := httpsverbs.HttpVerb(0); verb < httpsverbs.Terminator; verb++ {
    fmt.Println("%v\n", verbs[verb])
  }

  // output =>
  // GET
  // POST
  // PUT
  // DELETE
}
```

gha_language: HTML


text:
## Pollutant Control

It's your first day in Quality Control at Merry Milk Makers, and already there's been a catastrophe: a shipment of bad milk has been sent out. Unfortunately, you didn't discover this until the milk was already into your delivery system on its way to stores. You know which grocer that milk was destined for, but there may be multiple ways for the milk to get to that store.

The delivery system is made up of a several warehouses, with trucks running from warehouse to warehouse moving milk. While the milk will be found quickly, it is important that it does not make it to the grocer, so you must shut down enough trucks to ensure that it is impossible for the milk to get to the grocer in question. Every route costs a certain amount to shut down. Find the minimum amount that must be spent to ensure the milk does not reach its destination, along with a set of trucks to shut down that achieves this goal at that cost.

#### PROGRAM NAME: milk6

#### INPUT FORMAT

* Line 1:	Two space separated integers, N and M. N (2 <= N <= 32) is the number of warehouses that Merry Milk Makers has, and M (0 <= M <= 1000) is the number of trucks routes run. Warehouse 1 is actually the productional facility, while warehouse N is the grocer to which which the bad milk was destined.
* Line 2..M+1:	Truck routes: three space-separated integers, Si, Ei, and Ci. Si and Ei (1 <= Si,Ei <= N) correspond to the pickup warehouse and dropoff warehouse for the truck route. Ci (0 <= Ci <= 2,000,000) is the cost of shutting down the truck route.

#### SAMPLE INPUT (file milk6.in)
```
4 5
1 3 100
3 2 50
2 4 60
1 2 40
2 3 80
```

#### OUTPUT FORMAT

The first line of the output should be two integers, C and T. C is the minimum amount which must be spent in order to ensure the our milk never reaches its destination. T is the minimum number of truck routes that you plan to shut down in order to achive this goal. The next T lines sould contain a sorted list of the indexes of the truck routes that you suggest shutting down. If there are multiple sets of truck routes that achieve the goal at minimum cost, choose one that shuts down the minimum number of routes. If there are still multiple sets, choose the one whose initial routes have the smallest index.

#### SAMPLE OUTPUT (file milk6.out)
```
60 1
3
```


text:
---
metaTitle: "Linux - Managing Services"
description: "Diagnosing a problem with a service, Starting and Stopping Services, Getting the status of a service"
---

# Managing Services

## Diagnosing a problem with a service

On systems using systemd, such as Fedora => 15, Ubuntu (Server and Desktop) >= 15.04, and RHEL/CentOS >= 7:

`systemctl status [servicename]`

...where `[servicename]` is the service in question; for example, `systemctl status sshd`.

This will show basic status information and any recent errors logged.

You can see further errors with `journalctl`. For example,`journalctl -xe` will load the last 1000 logged into a pager (like `less`), jumping to the end. You can also use `journalctl -f`, which will follow log messages as they come in.

To see logs for a particular service, use the `-t` flag, like this:

```bash
journalctl -f -t sshd

```

Other handy options include `-p` for priority (`-p warnings` to see only warnings and above), `-b` for "since last boot", and `-S` for "since" — putting that together, we might do

```bash
journalctl -p err -S yesterday

```

to see all items logged as errors since yesterday.

If journalctl is not available, or if you are following application error logs which do not use the system journal, the `tail` command can be used to show the last few lines of a file. A useful flag for tail is `-f` (for "follow"), which causes tail continue showing data as it gets appended to the file. To see messages from most services on the system:

`tail -f /var/log/messages`

Or, if the service is privileged, and may log sensitive data:

`tail -f /var/log/secure`

Some services have their own log files, a good example is `auditd`, the linux auditing daemon, which has its logs stored in `/var/log/audit/`. If you do not see output from your service in `/var/log/messages` try looking for service specific logs in `/var/log/`

## Starting and Stopping Services

On systems that use the System-V style init scripts, such as RHEL/CentOS 6:

`service <service> start`

`service <service> stop`

On systems using systemd, such as Ubuntu (Server and Desktop) >= 15.04, and RHEL/CentOS >= 7:

`systemctl <service> dnsmasq`

`systemctl <service> dnsmasq`

## Getting the status of a service

On systems that use the System-V style init scripts, such as RHEL/CentOS 6:

`service <service> status`

On systems using systemd, such as Ubuntu (Server and Desktop) >= 15.04, and RHEL/CentOS >= 7.0:

`systemctl status <service>`

#### Remarks

Some systems with systemd, such as Ubuntu, still allow the use of the `service <name> [start|stop|status]` command, redirecting it to `systemctl [start|stop|status] <name>`.

repository: haifenghuang/generate

repo_name: haifenghuang/generate


text:
# asynctnt

[![Build](https://github.com/igorcoding/asynctnt/actions/workflows/actions.yaml/badge.svg?branch=master)](https://github.com/igorcoding/asynctnt/actions)
[![PyPI](https://img.shields.io/pypi/v/asynctnt.svg)](https://pypi.python.org/pypi/asynctnt)
[![Maintainability](https://api.codeclimate.com/v1/badges/6cec8adae280cda3e161/maintainability)](https://codeclimate.com/github/igorcoding/asynctnt/maintainability)

asynctnt is a high-performance [Tarantool](https://tarantool.org/) database
connector library for Python/asyncio. It was highly inspired by
[asyncpg](https://github.com/MagicStack/asyncpg) module.

asynctnt requires Python 3.6 or later and is supported for Tarantool
versions 1.6+.

## Installation
Use pip to install:
```bash
$ pip install asynctnt
```

## Documentation

Documentation is available [here](https://igorcoding.github.io/asynctnt).

## Key features

* Support for all the **basic requests** that Tarantool supports. This includes:
  `insert`, `select`, `update`, `upsert`, `call`, `eval`, `execute`.
* Full support for [SQL](https://www.tarantool.io/en/doc/latest/tutorials/sql_tutorial/),
  including [prepared statements](https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_sql/prepare/).
* Support for [interactive transaction](https://www.tarantool.io/en/doc/latest/book/box/atomic/txn_mode_mvcc/) via Tarantool streams.
* Support of `Decimal`, `UUID` and `datetime` types natively.
* Support for parsing [custom errors](https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_error/new/).
* **Schema fetching** on connection establishment, so you can use spaces and
  indexes names rather than their ids, and **auto refetching** if schema in
  Tarantool is changed
* **Auto reconnect**. If connection is lost for some reason - asynctnt will
  start automatic reconnection procedure (with authorization and schema
  fetching, of course).
* Ability to use **dicts for tuples** with field names as keys in DML requests
  (select, insert, replace, delete, update, upsert). This is possible only
  if space.format is specified in Tarantool. Field names can also be used
  in update operations instead of field numbers. Moreover, tuples are decoded
  into the special structures that can act either as `tuple`s or by `dict`s with
  the appropriate API.
* All requests support specification of `timeout` value, so if request is
  executed for too long, asyncio.TimeoutError is raised.

## Basic Usage

Tarantool config:

```lua
box.cfg {
    listen = '<IP_ADDRESS>:3301'
}

box.once('v1', function()
    box.schema.user.grant('guest', 'read,write,execute', 'universe')

    local s = box.schema.create_space('tester')
    s:create_index('primary')
    s:format({
        { name = 'id', type = 'unsigned' },
        { name = 'name', type = 'string' },
        { name = 'uuid', type = 'uuid' },
    })
end)
```

Python code:

```python
import uuid
import asyncio
import asynctnt

async def main():
    conn = asynctnt.Connection(host='<IP_ADDRESS>', port=3301)
    await conn.connect()

    for i in range(1, 11):
        await conn.insert('tester', [i, 'hello{}'.format(i), uuid.uuid4()])

    data = await conn.select('tester', [])
    tup = data[0]
    print('tuple:', tup)
    print(f'{tup[0]=}; {tup["id"]=}')
    print(f'{tup[1]=}; {tup["name"]=}')
    print(f'{tup[2]=}; {tup["uuid"]=}')

    await conn.disconnect()

asyncio.run(main())
```

Stdout:

*(note that you can simultaneously access fields either by indices
or by their names)*
```
tuple: <TarantoolTuple id=1 name='hello1' uuid=UUID('ebbad14c-f78c-42e8-bd12-bfcc564443a6')>
tup[0]=1; tup["id"]=1
tup[1]='hello1'; tup["name"]='hello1'
tup[2]=UUID('ebbad14c-f78c-42e8-bd12-bfcc564443a6'); tup["uuid"]=UUID('ebbad14c-f78c-42e8-bd12-bfcc564443a6')
```

## SQL

Tarantool 2.x brought out an SQL interface to the database. You can easily use it
in `asynctnt`

```lua
box.cfg {
    listen = '<IP_ADDRESS>:3301'
}

box.once('v1', function()
    box.schema.user.grant('guest', 'read,write,execute', 'universe')

    box.execute([[
        create table users (
            id int primary key,
            name text
        )
    ]])
end)
```

```python
import asyncio
import asynctnt

async def main():
    conn = asynctnt.Connection(host='<IP_ADDRESS>', port=3301)
    await conn.connect()

    await conn.execute("insert into users (id, name) values (?, ?)", [1, 'James Bond'])
    await conn.execute("insert into users (id, name) values (?, ?)", [2, 'Ethan Hunt'])
    data = await conn.execute('select * from users')

    for row in data:
        print(row)

    await conn.disconnect()

asyncio.run(main())
```

Stdout:
```
<TarantoolTuple ID=1 NAME='James Bond'>
<TarantoolTuple ID=2 NAME='Ethan Hunt'>
```

More about SQL features in asynctnt please refer to the [documentation](https://igorcoding.github.io/asynctnt/sql.html)

## Performance

Two performance tests were conducted:
1. `Seq` -- Sequentially calling 40k requests and measuring performance
2. `Parallel` -- Sending 200k in 300 parallel coroutines

On all the benchmarks below `wal_mode = none`.
Turning `uvloop` on has a massive effect on the performance, so it is recommended to use `asynctnt` with it

**Benchmark environment**
* MacBook Pro 2020
* CPU: 2 GHz Quad-Core Intel Core i5
* Memory: 16GB 3733 MHz LPDDR4X

Tarantool:
```lua
box.cfg{wal_mode = 'none'}
```

|           |  Seq (uvloop=off) | Seq (uvloop=on) | Parallel (uvloop=off) | Parallel (uvloop=on) |
|-----------|------------------:|----------------:|----------------------:|---------------------:|
| `ping`    |          12940.93 |        19980.82 |              88341.95 |            215756.24 |
| `call`    |          11586.38 |        18783.56 |              74651.40 |            137557.25 |
| `eval`    |          10631.19 |        17040.57 |              61077.84 |            121542.42 |
| `select`  |           9613.88 |        16718.97 |              61584.07 |            152526.21 |
| `insert`  |          10077.10 |        16989.06 |              65594.82 |            135491.25 |
| `update`  |          10832.16 |        16562.80 |              63003.31 |            121892.28 |
| `execute` |          10431.75 |        16967.85 |              58377.81 |             96891.61 |

## License
asynctnt is developed and distributed under the Apache 2.0 license.

## References
1. [Tarantool](https://tarantool.org) - in-memory database and application server.
2. [aiotarantool](https://github.com/shveenkov/aiotarantool) - alternative Python/asyncio connector
3. [asynctnt-queue](https://github.com/igorcoding/asynctnt-queue) - bindings on top of `asynctnt` for [tarantool-queue](https://github.com/tarantool/queue)

repository: igorcoding/asynctnt

gha_language: Python

repo_name: igorcoding/asynctnt


text:
---
title: Metalsmith 2.5 released
description: New metalsmith.env & metalsmith.debug methods. All methods now return promises, and a lot of outdated dependencies have been dropped.
pubdate: 2022-06-10
layout: default.njk
sitemap:
  lastmod: 2022-06-10
---

Metalsmith 2.5 is out!

[Github release](https://github.com/metalsmith/metalsmith/releases/tag/v2.5.0) |
[Github Roadmap 2.5 issue](https://github.com/metalsmith/metalsmith/issues/365) |
[NPM package](https://www.npmjs.com/package/metalsmith/v/2.5.0) | Node >= 12

## Highlights

* **New [`Metalsmith#debug`](/api/#Metalsmith+debug) method** available. The method returns a [debugger based on debug](https://github.com/debug-js/debug) with some differences/extra's:
  * debug can now be enabled/disabled directly through Metalsmith (`metalsmith.env('DEBUG', '*')`)
  * The debugger has 4 preinstantiated channels with preset colors that were tested for readability in light & dark color schemes: log (gray), info (cyan), warn (orange), error (red)
  * The debug output of `metalsmith.debug` debuggers can be centralized and output to a single build log file. Specify `metalsmith.env('DEBUG_LOG', 'path/to/your/build.log)` to do so. Note that when `DEBUG_LOG` is set, the logs will only be written to a file and will not appear in the CLI.
  ```js
    function myPlugin(files, metalsmith) {
      const debug = metalsmith.debug('metalsmith-myplugin')
      debug('A message')         // metalsmith-myplugin A message
      debug.warn('A warning')    // metalsmith-myplugin:warn A warning
      debug.error('An error')    // metalsmith-myplugin:error An error
    }
  ```

* **New [`Metalsmith#env`](/api/#Metalsmith+env) method** available:
  ```js
  // pass all Node env variables
  metalsmith.env(process.env)
  // get all env variables
  metalsmith.env()
  // get DEBUG env variable
  metalsmith.env('DEBUG')
  // set DEBUG env variable (chainable)
  metalsmith.env('DEBUG', '*')
  // set multiple env variables at once (chainable)
  // this does not clear previously set variables
  metalsmith.env({
    DEBUG: false,
    NODE_ENV: 'development'
  })
  ```
  The method mimicks native env (only accepts primitive values: string, boolean, number) and it is case-insensitive, so you can choose whether you prefer upper- or lowercase. However when running `metalsmith.env()` the env returned will contain uppercase keys.

  It is also available as a property in `metalsmith.json`.

  ```json
  {
    "env": {
      "DEBUG": true,
      "DEBUG_LOG": "metalsmith.log",
      "NAME": "$NODE_ENV"
    }
  }
  ```
  When running Metalsmith in CLI mode, strings starting with `$` dollar sign will be substituted for `process.env.<var_name>` so you can easily pass env vars.
  Furthermore `metalsmith.env('CLI')` will be automatically set to `true`. As you can see from the examples above, it is now possible to enable/disable debug logs through `metalsmith.env('DEBUG', true)`. Setting `DEBUG_LOG` will pipe the logs to a file instead of logging them in the console. Plugin authors are encouraged to use the single env var getter/ setter signatures.

  *Why a `.env` method when there already is a [metalsmith-env](https://github.com/kalamuna/metalsmith-env) plugin?*

  * It allows plugins to rely on a method that is always present to target default configs and logs according to popular env var conventions, e.g. `if (metalsmith.env('NODE_ENV') === 'development') debug('password: %s', pwd)`.
  * It makes unit testing environments easy, running `plugin(files, { env() { /* mocked env method */ }})`
  * [metalsmith-env](https://github.com/kalamuna/metalsmith-env) reads all env vars. The core `.env` method takes an approach similar to [Deno's](https://deno.land/manual/getting_started/permissions#environment-variables): explicit is better than implicit when it comes to env vars, to avoid leaking secrets and sensitive data.

* `Metalsmith#read`,`Metalsmith#readFile`,`Metalsmith#write`,`Metalsmith#writeFile`,`Metalsmith#process` and `Metalsmith#run` can now be `await`'ed:
    ```js
    try {
      const files = await metalsmith.read()
    } catch (err) {
      console.error(err)
    }
    ```

    If a callback is passed, `<method>` does not return a promise. Metalsmith users have to opt for one of the 2 build flows (callback or promise-based)

* **7.5% to 10% build speed increase** thanks to moving to promises and eliminating old dependencies.
  This is an approximative perf test (run on the metalsmith.io source, and only benchmarks speed of the core read - process - run - write - build methods):
  ```js
  const prom = (timings) => new Promise((resolve, reject) => {
    const start = Date.now()
    metalsmith
      .build((err) => {
        if (err) reject(err)
        resolve([ ...timings, Date.now() - start])
      })
  })

  let runs = 100
  let current = Promise.resolve([])
  do {
    current = current.then(prom)
  } while(runs--)
  current.then(timings => console.log(timings, timings.reduce((acc, curr, index) => {
    acc += curr
    if (index === runs - 1) acc = acc / runs
    return acc
  }, 0)))
  ```

## Full Release notes

### Added

- [#354] Added `Metalsmith#env` method. Supports passing `DEBUG` and `DEBUG_LOG` amongst others. Sets `CLI: true` when run from the metalsmith CLI. [`b42df8c`](https://github.com/metalsmith/metalsmith/commit/b42df8c), [`446c676`](https://github.com/metalsmith/metalsmith/commit/446c676), [`33d936b`](https://github.com/metalsmith/metalsmith/commit/33d936b), [`4c483a3`](https://github.com/metalsmith/metalsmith/commit/4c483a3)
- [#356] Added `Metalsmith#debug` method for creating plugin debuggers
- [#362] Upgraded all generator-based methods (`Metalsmith#read`,`Metalsmith#readFile`,`Metalsmith#write`,`Metalsmith#writeFile`, `Metalsmith#run` and `Metalsmith#process`) to dual callback-/ promise-based methods [`16a91c5`](https://github.com/metalsmith/metalsmith/commit/16a91c5), [`faf6ab6`](https://github.com/metalsmith/metalsmith/commit/faf6ab6), [`6cb6229`](https://github.com/metalsmith/metalsmith/commit/6cb6229)
- Added org migration notification to postinstall script to encourage users to upgrade [`3a11a24`](https://github.com/metalsmith/metalsmith/commit/3a11a24)

### Removed

- [#231] Dropped support for Node < 12 [`0a53007`](https://github.com/metalsmith/metalsmith/commit/0a53007)
- **Dependencies:**
  - `thunkify`: replaced with promise-based implementation [`faf6ab6`](https://github.com/metalsmith/metalsmith/commit/faf6ab6)
  - `unyield` replaced with promise-based implementation [`faf6ab6`](https://github.com/metalsmith/metalsmith/commit/faf6ab6)
  - `co-fs-extra`: replaced with native Node.js methods [`faf6ab6`](https://github.com/metalsmith/metalsmith/commit/faf6ab6)
  - `chalk`: not necessary for the few colors used by Metalsmith CLI [`1dae1cb`](https://github.com/metalsmith/metalsmith/commit/a1dae1cb)
  - `clone`: see [#247] [`a871af6`](https://github.com/metalsmith/metalsmith/commit/a871af6)

### Updated

- Restructured and updated `README.md` [`0da0c4d`](https://github.com/metalsmith/metalsmith/commit/0da0c4d)
- [#247] Calling `Metalsmith#metadata` no longer clones the object passed to it, overwriting the previous metadata, but merges it into existing metadata.

[#362]: https://github.com/metalsmith/metalsmith/issues/362
[#354]: https://github.com/metalsmith/metalsmith/issues/354
[#355]: https://github.com/metalsmith/metalsmith/issues/355
[#356]: https://github.com/metalsmith/metalsmith/issues/356
[#247]: https://github.com/metalsmith/metalsmith/issues/247

### Fixed

- [#355] Proper path resolution for edge-cases using CLI, running metalsmith from outside or subfolder of `metalsmith.directory()`[`5d75539`](https://github.com/metalsmith/metalsmith/commit/5d75539)

gha_language: JavaScript


text:
### [CVE-2011-0565](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0565)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Unspecified vulnerability in Adobe Reader and Acrobat 10.x before 10.0.1, 9.x before 9.4.2, and 8.x before 8.2.6 on Windows and Mac OS X allows attackers to cause a denial of service or possibly execute arbitrary code via unknown vectors, a different vulnerability than CVE-2011-0585.

### POC

#### Reference
- http://www.redhat.com/support/errata/RHSA-2011-0301.html

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

repo_name: trickest/cve


text:
# PembrokePSutilities

Common function for PembrokePS components

---

### Getting Started

Install from the PSGallery and Import the module

    Install-Module PembrokePSutilities
    Import-Module PembrokePSutilities

---

### What's next?

For more information

* [PembrokePSutilities.readthedocs.io](http://PembrokePSutilities.readthedocs.io)
* [github.com/jpsider/PembrokePSutilities](https://github.com/jpsider/PembrokePSutilities)

repository: jpsider/PembrokePSutilities

repo_name: jpsider/PembrokePSutilities


text:
#Hello World App
A Simple HelloWorld Application using Python that is containerized for sample/learning purposes of Docker, Kubernetes

## Steps to Use the Project for Learning Docker / Containerization
1. Download / Clone the Code into your Machine using the following command.

    ``` git clone https://github.com/noodlemind/helloworld-container-app.git```

2. Execute the Docker Build Command to Build and Tag the Image

    ```docker build -t my-registry/hello-world-app:1.0 . ```
   > Please note you are executing the command in the root folder of the project. If you are not inside the project,
   > use the ```cd helloworld-container-app``` command to navigate into the project.

3. *(Optional)* If you want to rename the Image, please use the following Syntax to rename the tag.

    ```docker tag my-registry/hello-world-app:1.0 new-registry/new-repository-image-name:version ```

4. Once the Image has been built, please push it to the desired registry.

    ```docker push my-registry/hello-world-app:1.0```
    > Please make sure you are logged in to docker using the command ```docker login``` before trying the push.

repository: noodlemind/helloworld-container-app

repo_name: noodlemind/helloworld-container-app


text:
## About The Package
The package aims to automate the process of updating time entries in harvest.
Although harvest provides APIs to do so, it requires superuser access. For
regular users, those APIs are not accessible. That is why I created this
package, just to make life easier.

## Dependencies

* [selenium](https://selenium-python.readthedocs.io/)
* [chrome-driver](https://chromedriver.chromium.org/): You should have this if you use chrome.

## Installation
```sh
pip install harvest-for-mightyhive
```
<!-- USAGE EXAMPLES -->
## Usage

Initialize a Harvest client:
```python
harvest = Harvest(username, password)
```

Populate the class variables and submit.
```python
harvest.date = date.today()
harvest.project = Project.INTERNAL
harvest.task = Task.MEETING
harvest.note = "Kick off meeting"
harvest.duration = "0:30"
harvest.submit()
```


text:
# minimal_fab
[![npm](https://img.shields.io/badge/npm-v1.2.2-green.svg)]()
[![license](https://img.shields.io/npm/l/express.svg)]()

An implementation of Floating Action Button by Google in plain css and javascript.

## Features

 - Fully customizable
 - Light weight
 - Doesn't require jquery or bootstrap
 - Includes a modal dialog to display messages and videos

## Installation
```shell
npm i minimal_fab
```

## Usage
```js
let fab = require('minimal_fab');
fab([
    { type: 'text', text: `Here is some text that I'd like to see in a modal dialog` },
    { type: 'video', link: 'https://www.youtube.com/embed/EfvsNZIW970' },
    { type: 'link', link: 'http://youtube.com', title: 'Go to Youtube' },
    { type: 'custom', callback: () => { console.log('I can do almost anything')} },
]);
```
You can view the demo at [acesmndr.github.io/minimal_fab](https://acesmndr.github.io/minimal_fab)
or dig into the demo source code at [Demo Sourcecode](https://github.com/Acesmndr/minimal_fab/tree/gh-pages)

## Webpack configuration
For usage with webpack it requires `style-loader` and `css-loader` packages and the `webpack.config.js` must be set accordingly.
```js
const path = require('path');
module.exports = {
  entry: './main.js',
    module: {
      loaders: [
        { test: /\.css$/, loader: "style-loader!css-loader" }
      ]
    },
  output: {
    path: path.resolve(__dirname, 'build'),
    filename: 'bundle.js'
  }
};
```

## Dependencies

Package | Version | Dev
--- |:---:|:---:
[sweetalert](https://sweetalert.js.org/) | ^2.0.8 | ✖
[font-awesome](http://fontawesome.io/) | * | ✖

** Font awesome needs to be loaded separately **

## Author

Aashish Manandhar<EMAIL_ADDRESS>http://github.com/acesmndr

## License

 - **MIT** : http://opensource.org/licenses/MIT

[![forthebadge](http://forthebadge.com/images/badges/uses-js.svg)](http://forthebadge.com)
[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com)


text:
---
repo: wq.db
date: 2015-09-01
---

# wq.db 0.8.2

This release of **wq.db** brings some enhancements to the "attachment" modules and a few minor bug fixes.

## Attachment Enhancements
- [locate](../wq.db/patterns.md)'s `Location` instances for located models can be loaded directly into the map for editing via a special `edit.geojson` URL.  This works well with the updated<EMAIL_ADDRESS>in [wq.app 0.8.1](./wq.app-0.8.1.md).  Note that as part of this enhancement, the `Location` model is no longer registered with the API by default (meaning `Location` instances will not be stored offline by default).
- [files](../wq.db/patterns.md)' `File` instances can be uploaded as "attachments" making files a bit more like the [patterns](../wq.db/patterns.md) modules (bc14412).  There is a little bit of customization necessary to get this to work - see the [Species Tracker source](https://github.com/powered-by-wq/species.wq.io/blob/v0.2.0/db/reports/serializers.py#L1-L15) for an example.
- `create_attachment()` and `update_attachment()` hooks to facilitate customized [patterns](../wq.db/patterns.md) model workflows (0edf702)

## Bug Fixes
- Fix [wq configuration object](../config.md) not listing parent models correctly (due to `get_all_related_objects()` change in Django 1.8 (20cd687))
- Ensure server-side [postsave](../wq.db/views.md) is triggered on `update()` (450ee3a)
- Fix for template vars in Python 2 + Django 1.8 (30e11d9)
- update `router_info` template variable name (b4b5daa) and include parent page identifier in list-by-parent-item context (ac92abd)

repository: wq/wq

repo_name: wq/wq


text:
## What is Blaze?

Blaze is a powerful library for creating user interfaces by writing reactive HTML templates.  Compared to using a combination of traditional templates and jQuery, Blaze eliminates the need for all the "update logic" in your app that listens for data changes and manipulates the DOM.  Instead, familiar template directives like ``{{#if}}`` and ``{{#each}}`` integrate with [Tracker's](https://github.com/meteor/meteor/tree/master/packages/tracker) "transparent reactivity" and [Minimongo's](https://meteor.com/mini-databases) database cursors so that the DOM updates automatically.

### Blaze has two major parts:

* A template compiler that compiles template files into JavaScript code that runs against the Blaze runtime library.  Moreover, Blaze provides a compiler toolchain (think LLVM) that can be used to support arbitrary template syntaxes.  The flagship template syntax is Spacebars, a variant of Handlebars, but a community alternative based on Jade is already in use by many apps.

* A reactive DOM engine that builds and manages the DOM at runtime, invoked via templates or directly from the app, which features reactively updating regions, lists, and attributes; event delegation; and many callbacks and hooks to aid the app developer.

## Quick Start

Blaze is a [Meteor](http://meteor.com/)-only package for now. Sooner we will have Blaze on npm so you can use it in your stack.

A new Meteor project has Blaze included.

## Get involved

We'd love for you to help us build Blaze. If you'd like to be a contributor,
check out our [Contributing guide](/Contributing.md).

Also, to stay up-to-date on all Blaze related news and the community you should
definitely [Join us on Slack](http://slack.blazejs.org).

See the current [Roadmap](https://github.com/meteor/blaze/milestones) and consider helping with any of the tasks on the roadmap.

## License

Blaze is available under the MIT license.

repository: gcacars/blaze

repo_name: gcacars/blaze


text:
![screenshot](./images/Node-Word-Guess.gif)

# Node-Word-Guess
This is the popular word guessing game "Hangman." This application is written in node.js.

To install it, please clone the repository and then run `npm install` to install the node module dependencies.

To run the application, in terminal or your favorite command line environment, change to the directory where the application is installed and invoke `node index.js` from the command line.

![screenshot](./images/difficultylevels.PNG)

The game allows the user to choose a difficulty level when attempting to guess a word. "Easy" corresponds to eight allowed guess attempts before the game is lost. Likewise, "Regular" allows up to five incorrect guesses before the user fails the challenge, whereas "Difficult" only provides three chances to guess wrongly.

Once the user chooses a difficulty level, a word is randomly selected from the wordList object in the wordlist.js file and the user is allowed to enter letters to try against the word. Before letters are correctly guessed, the letters are displayed masked.

![screenshot](./images/correct.PNG)

If the user guesses a letter that is in the mystery word, the letter is revealed in the mystery word. If the user guesses a letter which is not in the word, the game indicates this with a message, and decrements the number of guesses remaining.

![screenshot](./images/hint.PNG)

If you would like to see a hint, enter '!' instead of a letter, and a hint will appear.

The game is won if the user completes the hidden word before exhausting the remaining chances to guess. But if the user exhausts all chances to guess before completely revealing the hidden word, the game is lost.

At the end of every game, regardless of whether the user won or lost, the user will be asked to play again.

Another noteworthy feature is the ability for the user to customize the list of words and hints which the application uses. The file wordlist.js contains an object with two arrays of strings, wordsArray and hintsArray. The user can change the list if desired. However, it is important to recognize that each hint in the hintsArray corresponds to a word in the wordsArray at the same index, and vice versa. Therefore the arrays must be equal in length or else an error will result.

license: Unlicense

repository: golemheavy/Node-Word-Guess

gha_license_id: Unlicense

repo_name: golemheavy/Node-Word-Guess


text:
Wercker step Deploy Google Play [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/kagweb/wercker-step-deploy-googleplay/blob/master/LICENCE)
====

[![wercker status](https://app.wercker.com/status/e1c4b63dddce4ac791cb4c7bc9c1584b/m "wercker status")](https://app.wercker.com/project/bykey/e1c4b63dddce4ac791cb4c7bc9c1584b)

This is [wercker](http://wercker.com/) deploy step for upload Android app to Google Play.

## Usage

In the `wercker.yml` of your application use the following step definition:

```yaml
steps:
  - anectinc/deploy-googleplay:
      service_account_email: $SERVICE_ACCOUNT_EMAIL
      key_file: /PATH/TO/KEY
      package_name: PACKAGE_NAME
      app_file: /PATH/TO/APK
      track: TRACK
```

To use this step, you need to set $SERVICE_ACCOUNT_EMAIL, key_file, package_name and app_file.

## Author

[anectinc](https://github.com/anectinc)

repository: anectinc/wercker-step-deploy-googleplay

repo_name: anectinc/wercker-step-deploy-googleplay


text:
JSCOM
======================
A light-weight component framework that supports NodeJS development.
By using JSCOM, a software system is constructed as components bindings.
It facilitates introspection of a constructed system and its
meta-level properties at runtime, and allows this system to be reconfigured on the fly.

License: BSD

New Build command
--------------------
npm install
grunt [--test=on|(off)] [--docon|(off)]

Old Development Setup
--------------------
	* Environment prerequisite:
		Install Python, Java, and NodeJS. Require NodeJS 0.11 and above.
		Setup the Path environment variables for Python, Java, and NodeJS.

	* Required nodejs modules:
		cd jscom
		mocha:    npm install mocha
		istanbul: npm install istanbul
		should:   npm install should
		log4js:   npm install log4js
		smartdoc: npm install smartdoc
		unirest:  npm install unirest

	* Build project
		cd jscom
		Build and test:  build.py
		Build and debug: build.py -debug
		Build, test, and generate API document: build.py -docgen

	* Build outputs:
		Disted code:   jscom/dist
		Logs:          jscom/logs
		Test coverage: jscom/coverage/lcov-report/index.html

repository: shen-lin/jscom

repo_name: shen-lin/jscom


text:
Package jsonapi is simple JSON API implementation for GO. To read more about JSON API format please visit http://jsonapi.org/

Current implementation includes:

  - Marshalling
  - Unmarshalling
  - Links
  - Relations Links
  - Parsing URL Query in json api format
  - JSON API compatible errors
  - Validator

For more details please visit GoDoc https://godoc.org/github.com/vtg/jsonapi

#####Author

VTG - http://github.com/vtg

##### License

Released under the [MIT License](http://www.opensource.org/licenses/MIT).

[![GoDoc](https://godoc.org/github.com/vtg/jsonapi?status.png)](http://godoc.org/github.com/vtg/jsonapi)

repository: vtg/jsonapi

repo_name: vtg/jsonapi


text:
# CHANGELOG

## 2022-08-19

* The repository was archived.

## 1.0.1 - 2018-02-28

* Implemented `PHP Mess Detector` to detect inconsistencies in code styles.

* Implemented `PHP Code Beautifier and Fixer` to fixing errors automatically.

* Implemented `PHP Coding Standards Fixer` to organize PHP code automatically according to PSR standards.

* Implemented `PSR-4 autoloader standard` from all library files.

* Implemented `PSR-2 coding standard` from all library PHP files.

* Implemented `PHPCS` to ensure that PHP code complies with `PSR2` code standards.

* Implemented `Codacy` to automates code reviews and monitors code quality over time.

* Implemented `Codecov` to coverage reports.

## 1.0.0 - 2017-07-02

* Added `App\Modules\Request\Controller\Exception\RequestException` class.
* Added `App\Modules\Request\Controller\Exception\RequestException->__construct()` method.

* Added `App\Modules\Request\Controller\Launcher\Launcher` class.
* Added `App\Modules\Request\Controller\Launcher\Launcher->init()` method.
* Added `App\Modules\Request\Controller\Launcher\Launcher->getDatabaseId()` method.
* Added `App\Modules\Request\Controller\Launcher\Launcher->activation()` method.
* Added `App\Modules\Request\Controller\Launcher\Launcher->deactivation()` method.

* Added `App\Modules\Request\Controller\Request\Request` class.
* Added `App\Modules\Request\Controller\Request\Request->createTable()` method.
* Added `App\Modules\Request\Controller\Request\Request->dropTable()` method.
* Added `App\Modules\Request\Controller\Request\Request->insert()` method.

* Added `App\Modules\Request\Model\Request\Request` class.
* Added `App\Modules\Request\Model\Request\Request->__construct()` method.
* Added `App\Modules\Request\Model\Request\Request->createTable()` method.
* Added `App\Modules\Request\Model\Request\Request->dropTable()` method.
* Added `App\Modules\Request\Model\Request\Request->insert()` method.

* Added `config/namespaces.php` file.
* Added `config/server.php` file.
* Added `config/set-hooks.php` file.
* Added `config/tables.php` file.

* Added `request.php` file.

repository: eliasis-framework/http-request-logger

repo_name: eliasis-framework/http-request-logger


text:
Use the `{{action}}` helper to attach a handler in your view class to an event triggered on an element.

To attach an element's `click` event to the `edit()` handler in the current view:

```handlebars
<a href="#" {{action 'edit' on="click"}}>Edit</a>
```

Because the default event is `click`, this could be written more concisely as:

```handlebars
<a href="#" {{action 'edit'}}>Edit</a>
```

Although the view containing the `{{action}}` helper will be targeted by default, it is possible to target a different view:

```handlebars
<a href="#" {{action 'edit' target="parentView"}}>Edit</a>
```

The action handler can optionally accept a jQuery event object, which will be extended to include `view` and `context` properties. These properties can be useful when targeting a different view with your action. For instance:

```javascript
App.ListingView = Ember.View.extend({
  templateName: 'listing',

  edit: function(event) {
    event.view.set('isEditing', true);
  }
});
```

Any of the templates discussed above will produce an HTML element like this:

```html
<a href="#" data-ember-action="3">Edit</a>
```

Ember will delegate the event you specified to your target view's handler based upon the internally assigned `data-ember-action` id.

repository: ember-learn/guides-source

repo_name: ember-learn/guides-source