text:
# certs

![checks](https://github.com/broadinstitute/puppet-certs/workflows/checks/badge.svg?branch=main)
[![Puppet Forge](https://img.shields.io/puppetforge/dt/broadinstitute/certs.svg)](https://forge.puppetlabs.com/broadinstitute/certs)
[![Puppet Forge](https://img.shields.io/puppetforge/v/broadinstitute/certs.svg)](https://forge.puppetlabs.com/broadinstitute/certs)
[![Puppet Forge](https://img.shields.io/puppetforge/f/broadinstitute/certs.svg)](https://forge.puppetlabs.com/broadinstitute/certs)
[![License (Apache 2.0)](https://img.shields.io/badge/license-Apache-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Table of Contents

* [Notice] (#notice)
* [Overview](#overview)
* [Module Description](#module-description)
* [Setup](#setup)
  * [Setup requirements](#setup-requirements)
* [Usage](#usage)
  * [Installation](#installation)
  * [Examples](#examples)
* [Reference](#reference)
* [Limitations - OS compatibility, etc.](#limitations)
* [Contributors](#contributors)

## Notice

**This module has been renamed to `puppet-certificates` due to naming conflicts and as such is being deprecated. You can find a fork of this module at [puppet-certificates](https://github.com/broadinstitute/puppet-certificates).**

## Overview

Configures SSL certificates and keys.

## Module Description

This module provides SSL certificate files required by Apache or other services via the certs::site define.
It can be used in conjunction with puppetlabs/apache's apache::vhost definitions to provide the ssl_cert and ssl_key files or any other service requiring SSL certificates.

It can also be used independent of any Puppet-defined service that requires the files to exist on a managed node.

## Setup

### Setup Requirements

The certificate files must come from an external store. Recommended stores are a site-specific (and private) module containing SSL files or a network-accessible filesystem, such as NFS, that the managed node can access.
Once a file store is determined, include at least one certs::site define and specify the file store location as the `source_path`.

By default, this module will place certificates and keys in their relative locations and restart the specified service, provided it is defined in the catalog.

* **RedHat**
  * certificates directory: `/etc/pki/tls/certs`
  * keys directory: `/etc/pki/tls/private`
  * service: `httpd`

* **Debian & Suse**
  * certificates directory: `/etc/ssl/certs`
  * keys directory: `/etc/ssl/private`
  * service: `apache2`

* **FreeBSD**
  * certificates directory: `/usr/local/etc/apache24`
  * keys directory: `/usr/local/etc/apache24`
  * service: `apache24`

* **Gentoo**
  * certificates directory: `/etc/ssl/apache2`
  * keys directory: `/etc/ssl/apache2`
  * service: `apache2`

## Usage

No trailing slashes should be provided for any paths.

## Installation

**Puppet Forge:**

``` sh
puppet module install broadinstitute-certs
```

**Puppetfile:**

``` sh
mod 'broadinstitute/certs'
```

## Examples

### Puppet Manifest

`manifest.pp`

```puppet
  include certs
  $domain = 'www.example.com'
  certs::site { $domain:
    source_path    => 'puppet:///site_certificates',
    ca_cert        => true,
    ca_name        => 'caname',
    ca_source_path => 'puppet:///ca_certs',
  }
```

### With Hiera

`node.yaml`

```yaml
  classes:
    - certs
  certs::sites:
    'www.example.com':
      source_path: 'puppet:///site_certificates'
      ca_cert: true
      ca_name: 'caname'
      ca_source_path: 'puppet:///ca_certs'
```

### Resource Chaining with Apache Module

`manifest.pp`

```puppet
  Certs::Site<| |> -> Apache::Vhost<| |>
```

### Global Defaults

You can also reset some of the settings in params.pp globally via the **certs** base class which will be inherited by all **certs::site** defines used that are later defined.  In this example, we can reset the default certificate and key paths for all instantiated sites so that we don't have to manually set the custom path in each site:

```puppet
  $domain1 = 'www.example.com'
  $domain2 = 'foo.example.com'

  class { 'certs':
    cert_path => '/path/to/certs',
    key_path  => '/path/to/keys',
  }

  certs::site { $domain1:
    source_path    => 'puppet:///site_certificates',
    ca_cert        => true,
    ca_name        => 'caname',
    ca_source_path => 'puppet:///ca_certs',
  }

  certs::site { $domain2:
    source_path    => 'puppet:///site_certificates',
    ca_cert        => true,
    ca_name        => 'caname',
    ca_source_path => 'puppet:///ca_certs',
  }
```

## Reference

[REFERENCE.md](REFERENCE.md) (generated with Puppet Strings)

## Limitations

This module is CI tested against [open source Puppet](https://docs.puppetlabs.com/puppet) on:

* CentOS 6, 7, 8
* RHEL 6, 7, 8

This module also provides functions for other distributions and operating systems, such as FreeBSD and Gentoo, but is not formally tested on them and are subject to regressions.

## Contributors

Riccardo Calixte ([@rcalixte](https://github.com/rcalixte))

Andrew Teixeira ([@coreone](https://github.com/coreone))

[More contributors.](https://github.com/broadinstitute/puppet-certs/graphs/contributors)

repository: broadinstitute/puppet-certs

gha_language: Ruby

repo_name: broadinstitute/puppet-certs


text:
---
path: /blog/jharkhand-state
date: 2020-08-14T11:32:28.667Z
title: Jharkhand govt launches new state emblem
identifier: blog
thumbnail: https://res.cloudinary.com/dilipcloudforcms/image/upload/c_fit,h_320,w_320/v1597404867/logo_jharkhand_zmn9kh.jpg
---
<!--StartFragment-->

Jharkhand **Chief Minister Hemant Soren l**aunched the new state emblem at a ceremony at the Aryabhatt Hall in Ranchi, saying that the emblem will represent the state in from "all aspects".

State Governor Draupadi Murmu and other Cabinet ministers were also present on the occasion.

The new logo is primarily in green and has the national emblem at the centre with *“Satyameva Jayate”* etched below. The Ashoka emblem, representing cooperative federalism, is enclosed in concentric circles depicting the state’s culture and its abundant natural resources.

The new logo is primarily in green and circular, while the old one was square-shaped. The circle resembles a wheel. The logo represents and its rings represent the urge for development, art, culture, customs, traditions, values, religion, the lush greenery in the state and last but not the least the abundance of minerals in the state.

##### The new logo has the national emblem at the centre with 'Satyameva Jayate' etched below. The Ashoka emblem is enclosed in concentric circles depicting the state’s culture and its abundant natural resources.

Red colour used in the logo represents the strength of the state to struggle and pave its own way out of adversities.

Palash flowers, also known as flame of the forest, reflecting the natural beauty of Jharkhand, are also included in the new emblem.

Elephants, being the state animal, have been also been included and represent calmness. Labours and group dance, in the emblem, represent culture and the strength of social bonding.

ADVERTISEMENT

ALSO READ | [Mississippi set to remove Confederate emblem from its flag](https://www.indiatoday.in/world/story/mississippi-set-to-remove-confederate-emblem-from-its-flag-1694850-2020-06-28)

ALSO READ | [Maharashtra: Two booked for misusing national emblem](https://www.indiatoday.in/crime/story/maharashtra-two-booked-misusing-national-emblem-1572533-2019-07-23)

ALSO READ | [Centre to check if Supreme Court is violating state emblem rules](https://www.indiatoday.in/mail-today/story/centre-to-check-if-supreme-court-is-violating-state-emblem-rules-1248503-2018-06-02)

<!--EndFragment-->

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Fall2020 Projects

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity)
[![GitHub contributors](https://img.shields.io/github/contributors/Naereen/StrapDown.js.svg)](https://github.com/SmartMobilityAlgorithms/Fall2020-Projects/contributors)
[![GitHub issues](https://img.shields.io/github/issues/Naereen/StrapDown.js.svg)](https://github.com/SmartMobilityAlgorithms/Fall2020-Projects/issues)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/SmartMobilityAlgorithms/Fall2020-Projects/pulls)
[![Gitter](https://badges.gitter.im/SmartMobilityAlgorithms/community.svg)](https://gitter.im/SmartMobilityAlgorithms/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/SmartMobilityAlgorithms/Swarm-Intelligence-based-Algorithms/master)

This repo contains the project presented in Fall 2020 session.

---
## Project List
- Multi-criteria Optimal Routing :hourglass:
- Route Planning For Cyclists :hourglass:
- Emergency Dispatch and Routing :hourglass:
- School Bus Routing Problem :hourglass:
- Trip Itinerary Planning :hourglass:
- Bio Inspired Optimization Framework for Ride Matching Problem :hourglass:
- Smart Parking Planning :hourglass:
- Optimizing charging scheduling of high use electric vehicles for greenhouse gas reduction :hourglass:

branch_name: refs/heads/main


text:
# Vagrant

Vagrant is a tool for building and distributing development environments. It works with various virtualized platforms such as VirtualBox, Hyper-V, VMware, Docker or in the cloud via AWS or OpenStack.

Vagrant uses base images known as boxes to clone and launch virtual machines. Publically avavilable boxes can be found on the Vagrant Cloud catalog.
https://vagrantcloud.com/boxes/search

# Getting started

```bash
# Make a directory
mkdir vagrant_centos7
cd vagrant_centos7
# Running the init command with a box choosen from the catalog will create a single Vagrant box
vagrant init centos/7
# To launch the box run the up command
vagrant up
# To connect to the box
vagrant ssh
```

## Help

```bash
vagrant list-commands
vagrant --help
vagrant <COMMAND> -h
```

## Box

```bash
vagrant box list
```

```bash
# To use a different provider
vagrant up --provider=hyperv
```

```bash
vagrant box add centos/7
```

```bash
vagrant halt
```

```bash
vagrant suspend
```

```bash
vagrant destory
```

license: MIT

repository: Bhrath/cheat-sheets

repo_name: Bhrath/cheat-sheets


text:
# Etcd registry structure

The configuration and execution of the Cloudogu EcoSystem (CES) relies on an [etcd](https://coreos.com/etcd/) registry. It holds key-value pairs which can be listed by using the `etcdctl ls` command. The key-value pairs are altered by the CES tools and dogus and should not be changed manually unless you know exactly what you are doing!

## Registry structure details

### /docker

This path is used by docker to store operational characteristics. The keys stored here should never be changed manually.

### /config

This path holds configuration of all installed dogus and global configuration.

#### /config/_global

This path holds configuration that is used by multiple tools in the CES, e.g. the FQDN, Domain, CES admin group, the default dogu and certificates.

Some of the key paths are:

- /config/_global/key_provider
- /config/_global/fqdn
- /config/_global/domain
- /config/_global/certificate
- /config/_global/admin_group
- /config/_global/default_dogu

#### /config/DOGUNAME

In paths like "/config/jenkins", the dogu-specific configuration is stored.

One key that is always present is "/config/DOGUNAME/public.pem" which holds the public key to encrypt data that should only be readable by the dogu itself.

The amount of other configuration keys varies widely among the dogus. Most of their purpose is described in the correlating dogu.json.

If manual alteration of the dogu configuration keys is needed, a comfortable way to do so is via the `cesapp edit-config DOGUNAME` command.

### /dogu

This path holds technical information about the dogus. In keys like "/dogu/sonar/6.7.6-1" the information of the dogu.json is saved in JSON format.

There keys stored here are automatically created when a dogu is installed and should never be changed manually.

### /state

The keys stored here (e.g. "/state/jenkins") hold information about the execution state of the dogus. Their values are set from within the dogus via the `doguctl state` command. They are part of a health check which can be declared by setting "Type": "state" inside the "HealthChecks" object of a dogu.json.

The state keys are utilized when a health check is performed on a dogu via the `cesapp healthy DOGUNAME` command. If the corresponding "/state/DOGUNAME" key holds the string "ready", the health check succeeds.

### /services

repository: mwasyou/ecosystem

repo_name: mwasyou/ecosystem


text:
---
name: "\U0001F5FA Add new language"
about: Create a localization request
title: ''
labels: ''
assignees: ''

---

<!-- Note that leaving sections blank will make it difficult for us to troubleshoot and we may have to close the issue. -->

**Missing language**
<!--
     Please tell which language is missing.
     Please join https://crowdin.com/project/photobooth and request as translator for your language.
-->

**Additional context**
<!-- Add any other context here. -->

branch_name: refs/heads/dev

gha_license_id: MIT


text:
# Skinny Framework

Skinny is a full-stack web app framework, which is built on [Scalatra](http://scalatra.org) and additional components are integrated.

To put it simply, Skinny framework's concept is **Scala on Rails**. Skinny is highly inspired by [Ruby on Rails](http://rubyonrails.org/) and it is optimized for sustainable productivity for ordinary Servlet-based app development.

**[Notice]** Still in alpha stage. Architecture and API compatibility won't be kept until 1.0 release.

### Why Skinny?

What does the name of `Skinny` actually mean?

#### Application should be skinny

All the parts of web application - controllers, models, views, routings and other settings - should be skinny. If you use Skinny framework, you don't need to have non-essential code anymore. For instance, when you create a simple registration form, all you need to do is just defining parameters and validation rules and creating view tempaltes in an efficient way (ssp, scaml, jade, FreeMarker, Thymeleaf or something else) in most cases.

#### Framework should be skinny

Even if you need to investigate Skinny's inside, don't worry. Skinny keeps itself skinny, too. I believe that if the framework is well-designed, eventually the implemetation is skinny.

#### "su-ki-ni" in Japanese means "as you like it"

A sound-alike word **"好きに (su-ki-ni)"** in Japanese means **"as you like it"**. This is only half kidding but it also represents Skinny's concept. Skinny framework should provide flexible APIs to empower developers as much as possible and shouldn't bother them.

## How to use

Actually, application which is built with Skinny framework is a Scalatra application. After preparing Scalatra application, just add the following dependency to your `project/Build.scala`.

```scala
libraryDependencies += "com.gitub.seratch" %% "skinny-framework" % "[0.1,)"
```

If you need only Skinny-ORM or Skinny-Validator, you can use only what you need. Even if you're a Play framework 2.x user, these components are available for you as well.

```scala
libraryDependencies += Seq(
  "com.gitub.seratch" %% "skinny-orm"       % "[0.1,)"
  "com.gitub.seratch" %% "skinny-validator" % "[0.1,)"
)
```

## Components

### Routing & Controller & Validator

Skinny's routing mechanism and controller layer on MVC architecture is a **rich Scalatra**. Skinny's extension provides you much simpler syntax. Of course, if you'd like to use Scalatra's API directly, Skinny never bother you.

`SkinnyController` is a class which extends `ScalatraBase` and integrates some additional components.

```scala
// src/main/scala/controller/MembersController.scala

class MembersController extends SkinnyController {
  protectFromForgery()

  beforeAction(only = Seq('index, 'new)) { set("countries", Country.findAll()) }

  def index = {
    // set 'members' in the request scope, then you can use it in views
    set("members" -> Member.findAll())
    render("/members/index")
  }

  def newOne = render("/members/new")

  def createForm = validation(
    paramKey("name") is required & minLength(2),
    paramKey("countryId") is numeric
  )

  def createFormParams = params.permit(
    "groupId" -> ParamType.Int , "countryId" -> ParamType.Long)

  def create = if (createForm.validate()) {
    Member.createWithAttributes(createFormParams)
    redirect("/members")
  } else {
    render("/members/new")
  }
}

// src/main/scala/ScalatraBootstrap.scala

class ScalatraBootstrap exnteds SkinnyLifeCycle {
  override def initSkinnyApp(ctx: ServletContext) {

    ctx.mount(new MembersController with Routes {
      get("/members/?")(index).as('index)
      get("/members/new")(newOne).as('new)
      post("/members/?")(create).as('create)
    }, "/*")
  }
}
```

Skinny-Validator is newly created one which is based on [InputValidator](https://github.com/seratch/inputvalidator) and much improved. Rules are so simple that you can easily add original validation rules. Furthermore, you can use this validator with any other frameworks.

```scala
import skinny.validator._

def createForm = validation(
  paramKey("name") is required & minLength(2) & alphabetOnly,
  paramKey("countryId") is numeric
)

object alphabetOnly extends ValidationRule {
  def name = "alphabetOnly"
  def isValid(v: Any) = v == null || v.toString.matches("^[a-zA-Z]*$")
}
```

You can use `SkinnyResource` which is similar to `ActiveResource`, too. That's a pretty DRY way.

```scala
object CompaniesController extends SkinnyResource {
  protectFromForgery()

  override def skinnyCRUDMapper = Company
  override def resourcesName = "companies"
  override def resourceName = "company"

  override def createForm = validation(paramKey("name") is required & maxLegnth(64), paramKey("registrationCode" is numeric)
  override def createFormStrongParameters = Seq("name" -> ParamType.String, "registrationCode" -> ParamType.Int)

  override def updateForm = validation(paramKey("name") is required & maxLegnth(64))
  override def updateFormStrongParameters = Seq("name" -> ParamType.String)
}
```

Company object should extend `SkinnyCRUDMapper` and you should prepare some view templates under `src/main/webapp/WEB-INF/views/members`.

### ORM

Skinny provides you Skinny-ORM as the default O/R mapper, which is built with [ScalikeJDBC](https://github.com/seratch/scalikejdbc).

Skinny-ORM is simple but much powerful. Your first model class and companion are here.

```scala
case class Member(id: Long, name: String, createdAt: DateTime)

object Member extends SkinnyCRUDMapper[Member] {

  // only define ResultSet extractor at minimum
  override def extract(rs: WrappedResultSet, n: ResultName[Member]): Member = new Member(
    id = rs.long(n.id),
    name = rs.string(n.name),
    createdAt = rs.dateTime(n.createdAt)
  )
}
```

That's all! Now you can use the following APIs.

```scala
Member.withAlias { m =>

  // find by primary key
  val member: Option[Member] = Member.findById(123)
  val members: List[Member] = Member.findByIds(123, 234, 345)

  // find many
  val members: List[Member] = Member.findAll()
  val groupMembers = Member.findAllBy(sqls.eq(m.groupName, "Scala Users Group"))

  // count
  val allCount: Long = Member.countAll()
  val count = Member.countBy(sqls.isNotNull(m.deletedAt).and.eq(m.countryId, 123))

  // create with stong parameters
  val params = Map("name" -> "Bob")
  val id = Member.createWithAttributes(params.permit("name" -> ParamType.String))

  // create with named values
  Member.createWithNamedValues(column => Seq(
    column.id -> 123,
    column.name -> "Chris",
    column.createdAt -> DateTime.now
  ))

  // update
  Member.updateById(123).withAttributes(params.permit("name" -> ParamType.String))

  // delete
  Member.deleteById(234)
}
```

If you need to join other tables, just add `belongsTo`, `hasOne` or `hasMany` (`hasManyThrough`) to the companion.

**Notice:** Unfortunately, Skinny-ORM doesn't resolve nested associations in version 0.1.x.

```scala
class Member(id: Long, name: String, companyId: Long, company: Option[Company] = None, skills: Seq[Skill] = Nil)
object Member extends SkinnyCRUDMapper[Member] {

  belongsTo[Company](Company, (m, c) => m.copy(company = Some(c))).byDefault

  val skills = hasManyThrough[Skill](
    MemberSkill, Skill, (m, skills) => m.copy(skills = skills))
}

Member.findById(123) // without skills
Member.joins(Member.skills).findById(123) // with skills
```

If you need to add methods, just write methods that use ScalikeJDBC' APIs directly.

```scala
object Member extends SkinnyCRUDMapper[Member] {
  val m = defaultAlias
  def findByGroupId(groupId: Long)(implicit s: DBSession = autoSession): List[Member] = {
    withSQL { select.from(Member as m).where.eq(m.groupId, groupId) }
      .map(apply(m)).list.apply()
  }
}
```

`timetamps` from `ActiveRecord` is available as the `TimestampsFeature` trait.

```scala
class Member(id: Long, name: String, createdAt: DateTime, updatedAt: Option[DateTime] = None)
object Member extends SkinnyCRUDMapper[Member] with TimestampsFeature[Member]
/* -- expects following table by default
create table meber(
  id bigint auto_increment primary key not null,
  name varchar(128) not null,
  created_at timestamp not null,
  updated_at timestamp
);
*/
```

Furthermore, Soft delete support is available out of the box.

```scala
object Member extends SkinnyCRUDMapper[Member] with SoftDeleteWithTimestamp[Meber]
/* -- expects following table by default
create table meber(
  id bigint auto_increment primary key not null,
  name varchar(128) not null,
  deleted_at timestamp
);
*/
```

### View Templates

Skinny framework basically follows Scalatra's ScalateSupport, but Skinny has an additional convention.

Templates' path should be `{path}.{format}.{extension}`. Expeted {format} are `html`, `json`, `js` and `xml`.

The following ssp is `src/main/webapp/WEB-INF/views/members/index.html.ssp`.

```scala
<%@val members: Seq[model.Member] %>
<h3>Members</h3>
<hr/>

<table class="table table-bordered">
<thead>
  <tr>
    <th>ID</th>
    <th>Name</th>
    <th></th>
  </tr>
</thead>
<tbody>
  #for (member <- members)
  <tr>
    <td>${member.id}</td>
    <td>${member.name}</td>
    <td>
      <a href="/members/${member.id}/edit" class="btn btn-info">Edit</a>
      <a data-method="delete" data-confirm="Are you sure?" href="/members/${member.id}" class="btn btn-danger">Delete</a>
    </td>
  </tr>
  #end
</tbody>
</table>
```

Your controller code will be like this:

```scala
class MembersController extends SkinnyFilter {
  def index = {
    set("members", Member.findAll())
    render("/members/index")
  }
}
```

If you need to customize view templates, override the settings.

```scala
class MembersController extends SkinnyServlet {
  override val scalateExtension = "scaml"
}
```

```scala
-@val members: Seq[model.Member]
%h3 Members
%hr

%table(class="table table-bordered")
%thead
 %tr
  %th ID
  %th Name
  %th
%tbody
 -for(member <- members)
  %tr
   %td #{member.id}
   %td #{member.name}
   %td
    %a(href={"/members/"+member.id+"/edit"} class="btn btn-info") Edit
    %a(data-method="delete" data-confirm="Are you sure?" href={"/members/"+member.id} class="btn btn-danger") Delete
```

#### TODO

These are major tasks that Skinny should fix.

 - View helper
 - Scaffold generator
 - More tests
 - Supporting CoffeeScript and etc
 - Documentation
 - Environment
 - Cool logo

Your feedback or pull requests are always welcome.

## License

(The MIT License)

Copyright (c) 2013 Kazuhiro Sera @seratch

repository: libin/skinny-framework

repo_name: libin/skinny-framework


text:
---
name: Bug Report
about: Please follow this template if you are reporting a bug, or your issue may be closed without further notice.
title: [Bug] Bug summary
labels: ''
assignees: ''

---

> Make sure you go through the [Hexo docs](https://hexo.io), [Icarus user manual](https://ppoffice.github.io/hexo-theme-icarus/tags/Icarus-User-Guide/), and [GitHub issues](https://github.com/ppoffice/hexo-theme-icarus/issues) to see if the bug you are reporting has been already addressed by others.

**Describe the bug**
A clear and concise description of what the bug is.

**System and Environment**
The version and configuration of Hexo and Icarus.

- Hexo, OS, and node version (use `hexo version` command to view these information)
- Site configuration file `_config.yml`
- Theme configuration file `_config.icarus.yml` or `themes/icarus/_config.yml`
- Any additional theme configuration files (post front-matter, `_config.post.yml`, or `_config.page.yml`)
- Browser and version (e.g., Firefox 70.0, Chrome Android 80.0)

**To Reproduce**
Steps to reproduce the behavior, such as:

1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. '...' error appears

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

repository: ppoffice/hexo-theme-icarus

gha_language: JavaScript

repo_name: ppoffice/hexo-theme-icarus


text:
---
layout: default
---

# 1995-07-23 - RE: Netscape the Big Win(dows)

## Header Data

From<EMAIL_ADDRESS>(Robert Hettinga)

To<EMAIL_ADDRESS>Message Hash: e0cda44b645f1fc86d3bba19c7a907f93aa550b42b0450185f06f50fc1100bee

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1995-07-23 22:36:17 UTC

Raw Date: Sun, 23 Jul 95 15:36:17 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Robert Hettinga)
Date: Sun, 23 Jul 95 15:36:17 PDT
To<EMAIL_ADDRESS>Subject: RE: Netscape the Big Win(dows)
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

At 12:32 PM 7/21/95, Timothy C.  May wrote:
>
>No, I don't use any of the "-works" apps, and I think the success of the
>Web speaks for itself... This is not a view I have just come to, as my
>recent message shows.

Agreed.  My posting seemed to get stuck in the response queue to the
original post, and came out a little "dated", I guess...

>
>And I'm not wedded to "Netscape" per se, though that particular environment
>has the current momentum.  I've also used Mosaic and MacWeb to do much the
>same things, but find Netscape smoother.

I agree.  By far the best web-browser out there is Netscape.  They don't
call it Mozilla for nothing.

>
>Out of curiosity, the phrase "grown out of Netscape," aside from the
>implied barb, means what?  Just what am I missing and what do I need to
>"grow out of"?

No.  That seems to be my unintentional verbal style on the net, a little
prickly around the edges.  My actual barbs are so over the top that you'll
never misunderstand them for their subtlety.

What I mean is, that after you've used Netscape, a web client, to read news
for a while, you'll start to think about more specialized applications like
Newswatcher, for instance.

The reason that Netscape has either built-in news reading or mail reading
functions is feature creep.  My hypothesis is that feature creep is brought
about by some combination of venture capitalists, securities analysts, and
"real marketing people", all of which Andreasson at Netscape has in spades,
now, all with their chins on his shoulder saying, "That's nice, what else
will it do?".  In-line gifs or jpegs (or mpegs or whatever) are integral to
the function of seeing what's on the web.  So are in-line FTC, Gopher, etc.
I think.  My opinion about e-mail and news are that they're pretty
orthogonal to the functionality of a web-browser.  Kind of like building
wheels on a boat.

>If, perchance, this is just what of those throwaway barbs, implying I move
>from fad to fad (as Fraering's post implied), you should know that I stuck
>with tin/elm/emacs/Eudora for more than 3 years, as nothing obviously
>better--and worth the learning curve to switch to--had come along.  (In the
>Mac domain I used other programs, none of them "-works" packages.)

  ;-).  I just have several
friends who recently moved to a TCP net feed and thought they only needed
Netscape.  That is, until they used Eudora, and/or Newswatcher (preferably
in it's "value added" editions), and switched to them instead for their
respective purposes.

>But, I'll tell you what, I *will* tell you about it in 6 months, whether or
>not I've grown out of Netscape!

Of that we can rest assured.  :-).

Cheers,
Bob Hettinga

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMBLOsPgyLN8bw6ZVAQEzbAP/eosm6SNC1TdvduCWlPVO9WDbqlAcQtvj
jL+jsy0QjEgMNwsGQGCQBAHMXxtOJC2GPC+lGVfGZcTDFljvgzhBJc2/QWI0mQcK
Jz/vdYGfxhkBSlW0Xm+zcilmyYgvMr/KeIeJUcExYyVSSWpof7fuSG6jkfVmTWZ5
JDSHHd922U4=
=ipGf
-----END PGP SIGNATURE-----

-----------------
Robert Hettinga<EMAIL_ADDRESS>Shipwright Development Corporation, 44 Farquhar Street, Boston, MA 02131
USA<PHONE_NUMBER>
"Reality is not optional." --Thomas Sowell
>>>>Phree Phil: Email<EMAIL_ADDRESS>http://www.netresponse.com/zldf <<<<<

{% endraw %}
```

## Thread

+ Return to [July 1995](/archive/1995/07)

+ Return to<EMAIL_ADDRESS>(Robert Hettinga)](/authors/rah_at_shipwright_com_robert_hettinga_)"

+ 1995-07-23 (Sun, 23 Jul 95 15:36:17 PDT) - RE: Netscape the Big Win(dows) -<EMAIL_ADDRESS>(Robert Hettinga)_


text:
---
title: "Tutorial: Generating Docker credentials using a service"
layout: page
weight: 45
tags:
  - docker
  - tutorial
  - push
  - registry
categories:
  - docker
---

* include a table of contents
{:toc}

## Overview

Codeship supports using private registries for pulling and pushing images by allowing static dockercfg credentials to be encrypted as part of your codebase. Due to an increasing number of container registry vendors using different methods to generate Docker temporary credentials, we have added support for custom dockercfg credential generation. By using a custom service within your list of Codeship services, you can integrate with a standard dockercfg generation container for your desired provider. Codeship will provide a basic set of images supporting common providers, however you will also be able to use custom images to integrate with custom registries.

## Using a service to generate Docker credentials

Taking advantage of this feature is fairly simple. First off, add a service using the image for your desired registry provider to your `codeship-services.yml` file. You can add any links, environment variables or volumes you need, just like with a regular service.

```
# codeship-services.yml
app:
  build:
    dockerfile_path: ./Dockerfile
    image: myservice.com/myuser/myapp
myservice_generator:
  image: codeship/myservice-dockercfg-generator
  encrypted_env: creds.encrypted
```

To use this generator service, simply reference it using the `dockercfg_service` field in lieu of an `encryped_dockercfg` in your steps or services file.

```
# codeship-steps.yml
- type: push
  service: app
  registry: myservice.com
  image_name:  myservice.com/myuser/myapp
  dockercfg_service: myservice_generator
```

Codeship will run the service to generate a dockercfg as needed. Under the hood, Codeship will launch a container with the specified image, mount a volume and request a dockercfg be written to a temporary file on that volume. As soon as the dockercfg is read, it is deleted from the filesystem. The container logs from this generator service will be visible on the command line and in the Codeship interface.

Keep in mind that different generator images may have different requirements. If your generator image, for example, performs a `docker login`, you may need to set `add_docker: true` in order to use it. Be sure to read the documentation for your specific provider when implementing these generator services.

## Creating your own dockercfg generator image

The majority of container registries use standard, static credentials, and even using a custom authentication proxy, most of the time you can generate a compatible static dockercfg and encrypt it for use within your pipeline. Should you need to use dynamic credentials, or some other method of securely retrieving static credentials during the CI/CD process, you'll need to use a generator service. Luckily creating your own image is simple, the only requirement is that the image writes the dockercfg to a path provided via a `CMD` argument.

```
$ docker run -it -v /tmp/:/opt/data mygenerator /opt/data/dockercfg
$ cat /tmp/dockercfg # read generated dockercfg
```

The container must be provided with any credentials or configuration needs to generate a dockercfg via environment variables. When the image is being used in a build, this information is provided via the service definition in the `codeship-services.yml` file. Codeship will run the container any time it needs to generate the dockercfg, however the cost of this can be mitigated by locally caching credentials using a host volume mount defined in the service definition. The container image would be responsible for managing this cached folder, and checking the presence and validitity of credentials in the cache before returning them.

## Integrations

Here is a list of the standard dockercfg generators we support. If you don't see your desired provider on this list, please reach out to support, or create it yourself.

* [AWS ECR](https://github.com/codeship-library/aws-ecr-dockercfg-generator)
* [Google GCR](https://github.com/codeship-library/gcr-dockercfg-generator)

As always, feel free to contact [support<EMAIL_ADDRESS>if you have any questions.

gha_language: CSS


text:
# GIT-PR-TEMPLATE [![GIT-PR-TEMPLATE](https://img.shields.io/badge/git--pr--template-success-green.svg)]()

> this is a simple but useful template for your project or group, which will help you regulate group habit

# Usage

### In gitlab. [See the gitlab offical documents](https://docs.gitlab.com/ce/user/project/description_templates.html)

choose `./template` files you wang to use and copy them in your project root path and make folder named `./gitlab`, and it will be done success when you push a pr or issue. by the way, you can make as many as teamplates in your project. For Example:

![MR](/attachments/mr.png)

![MR](/attachments/preview-mr.png)

### In github. [See the github offical documents](https://help.github.com/articles/creating-a-pull-request-template-for-your-repository/)

copy `./template` files to your project's root path and make folder which named `./github`. becarefully, the files has not named in offical. You must named according to these:

For PR: `PULL_REQUEST_TEMPLATE.md`
For ISSUE: `ISSUE_TEMPLATE.md`

# Contributing back

Give you ideas to make more useful templates, waiting for you~

# License

[Apache License](/LICENSE)


text:
# Analyze time stamps {#analyze_time_stamps}

SDK provides a script for timestamp analysis stamp_analytics.py . Tool details are visible in tools/README.md .

Reference run commands on Linux:

```
$ python tools/analytics/stamp_analytics.py -i dataset -c tools/config/mynteye/mynteye_config.yaml
```

Reference to results on Linux:

```
$ python tools/analytics/stamp_analytics.py -i dataset -c tools/config/mynteye/mynteye_config.yaml
stamp analytics ...
  input: dataset
  outdir: dataset
open dataset ...
save to binary files ...
  binimg: dataset/stamp_analytics_img.bin
  binimu: dataset/stamp_analytics_imu.bin
  img: 1007, imu: 20040

rate (Hz)
  img: 25, imu: 500
sample period (s)
  img: 0.04, imu: 0.002

diff count
  imgs: 1007, imus: 20040
  imgs_t_diff: 1006, imus_t_diff: 20039

diff where (factor=0.1)
  imgs where diff > 0.04*1.1 (0)
  imgs where diff < 0.04*0.9 (0)
  imus where diff > 0.002*1.1 (0)
  imus where diff < 0.002*0.9 (0)

image timestamp duplicates: 0

save figure to:
  dataset/stamp_analytics.png
stamp analytics done
```

The analysis result graph will be saved in the dataset directory. as follow:

![stamp analytics](stamp_analytics.png)

\latexonly
\includegraphics[width=0.3
\textwidth,keepaspectratio]{../static/images/stamp_analytics.png}
\endlatexonly

In addition, the script specific options can be executed -h to understand:

```
$ python tools/analytics/stamp_analytics.py -h
```

Copyright 2018. MYNTEYE


text:
---
title: Streams Implementation Details
---

# Orleans Streams Implementation Details

This section provides a high level overview of Orleans Stream implementation.
It describes concepts and details that are not visible on the application level.
If you only plan to use streams, you do not have to read this section.

*Terminology*:

We refer by the word "queue" to any durable storage technology that can ingest stream events and allows either to pull events or provides a push-based mechanism to consume events.
Usually, to provide scalability, those technologies provide sharded/partitioned queues.
For example, Azure Queues allow to create multiple queues, Event Hubs have multiple hubs, Kafka topics, ...

## Persistent Streams

All Orleans Persistent Stream Providers share a common implementation [**`PersistentStreamProvider`**](https://github.com/dotnet/orleans/blob/main/src/Orleans.Streaming/PersistentStreams/PersistentStreamProvider.cs).
This generic stream provider needs be configured with a technology specific [**`IQueueAdapterFactory`**](https://github.com/dotnet/orleans/blob/main/src/Orleans.Streaming/QueueAdapters/IQueueAdapterFactory.cs).

For instance, for testing purposes we have queue adapters that generate their own test data rather than reading the data from a queue.
The code below shows how we configure a persistent stream provider to use our custom (generator) queue adapter.
It does this by configuring the persistent stream provider with a factory function used to create the adapter.

``` csharp
hostBuilder.AddPersistentStreams(StreamProviderName, GeneratorAdapterFactory.Create);
```

When a stream producer generates a new stream item and calls `stream.OnNext()`, the Orleans Streaming Runtime invokes the appropriate method on the `IQueueAdapter` of that stream provider which enqueues the item directly onto the appropriate queue.

### Pulling Agents

At the heart of the Persistent Stream Provider are the pulling agents.
Pulling agents pull events from a set of durable queues and deliver them to the application code in grains that consumes them.
One can think of the pulling agents as a distributed "micro-service" -- a partitioned, highly available, and elastic distributed component.
The pulling agents run inside the same silos that host application grains and are fully managed by the Orleans Streaming Runtime.

### StreamQueueMapper and StreamQueueBalancer

Pulling agents are parameterized with `IStreamQueueMapper` and `IStreamQueueBalancer`.
[**`IStreamQueueMapper`**](https://github.com/dotnet/orleans/blob/main/src/Orleans.Streaming/QueueAdapters/IStreamQueueMapper.cs)
provides a list of all queues and is also responsible for mapping streams to queues.
That way, the producer side of the Persistent Stream Provider knows into which queue to enqueue the message.

[**`IStreamQueueBalancer`**](https://github.com/dotnet/orleans/blob/main/src/Orleans.Streaming/PersistentStreams/IStreamQueueBalancer.cs)
expresses the way queues are balanced across Orleans silos and agents.
The goal is to assign queues to agents in a balanced way, to prevent bottlenecks and support elasticity.
When a new silo is added to the Orleans cluster, queues are automatically rebalanced across the old and new silos.
StreamQueueBalancer allows customizing that process. Orleans has a number of built-in StreamQueueBalancers, to support different balancing scenarios (large and small number of queues) and different environments (Azure, on prem, static).

Using the test generator example from above, the code below shows how one could configure the queue mapper and queue balancer.

``` csharp
hostBuilder
  .AddPersistentStreams(StreamProviderName, GeneratorAdapterFactory.Create,
    providerConfigurator=>providerConfigurator
      .Configure<HashRingStreamQueueMapperOptions>(ob=>ob.Configure(
        options=>{ options.TotalQueueCount = 8; }))
      .UseDynamicClusterConfigDeploymentBalancer()
);
```

The above code configures the GeneratorAdapter to use a queue mapper with 8 queues, and balances the queues across the cluster using the `DynamicClusterConfigDeploymentBalancer`.

### Pulling Protocol

Every silo runs a set of pulling agents, every agent is pulling from one queue. Pulling agents themselves are implemented by an internal runtime component, called **SystemTarget**.
SystemTargets are essentially runtime grains, are subject to single threaded concurrency, can use regular grain messaging, and are as lightweight as grains.
In contrast to grains, SystemTargets are not virtual: they are explicitly created (by the runtime) and are not location transparent.
By implementing pulling agents as SystemTargets, the Orleans Streaming Runtime can rely on built-in Orleans features and can scale to a very large number of queues, since creating a new pulling agent is as cheap as creating a new grain.

Every pulling agent runs a periodic timer that pulls from the queue (by invoking [**`IQueueAdapterReceiver`**](https://github.com/dotnet/orleans/blob/main/src/Orleans.Streaming/QueueAdapters/IQueueAdapterReceiver.cs)) `GetQueueMessagesAsync()` method. The returned messages are put in the internal per-agent data structure called `IQueueCache`.
Every message is inspected to find out its destination stream.
The agent uses the Pub Sub to find out the list of stream consumers that subscribed to this stream. Once the consumer list is retrieved, the agent stores it locally (in its pub-sub cache) so it does not need to consult with Pub Sub on every message.
The agent also subscribes to the pub-sub to receive notification of any new consumers that subscribe to that stream.
This handshake between the agent and the pub-sub guarantees **strong streaming subscription semantics**: *once the consumer has subscribed to the stream it will see all events that were generated after it has subscribed*. In addition, using `StreamSequenceToken` allows it to subscribe in the past.

### Queue Cache

[**`IQueueCache`**](https://github.com/dotnet/orleans/blob/main/src/Orleans.Streaming/QueueAdapters/IQueueCache.cs) is an internal per-agent data structure that allows to decoupling dequeuing new events from the queue and delivering them to consumers.
It also allows to decoupling delivery to different streams and to different consumers.

Imagine a situation where one stream has 3 stream consumers and one of them is slow.
If care is not taken, it is possible that this slow consumer will impact the agent's progress, slowing the consumption of other consumers of that stream, and even slowing the dequeuing and delivery of events for other streams.
To prevent that and allow maximum parallelism in the agent, we use `IQueueCache`.

`IQueueCache` buffers stream events and provides a way for the agent to deliver events to each consumer at its own pace.
The per-consumer delivery is implemented by the internal component called `IQueueCacheCursor`, which tracks per-consumer progress.
That way, each consumer receives events at its own pace: fast consumers receive events as quickly as they are dequeued from the queue, while slow consumers receive them later on.
Once the message is delivered to all consumers, it can be deleted from the cache.

### Backpressure

Backpressure in the Orleans Streaming Runtime applies in two places: **bringing stream events from the queue to the agent** and **delivering the events from the agent to stream consumers**.

The latter is provided by the built-in Orleans message delivery mechanism. Every stream event is delivered from the agent to consumers via the standard Orleans grain messaging, one at a time.
That is, the agents sends one event (or a limited size batch of events) to each individual stream consumer and awaits this call.
The next event will not start being delivered until the Task for the previous event was resolved or broken. That way we naturally limit the per-consumer delivery rate to one message at a time.

With regard to bringing stream events from the queue to the agent, Orleans Streaming provides a new special Backpressure mechanism.
Since the agent decouples dequeuing of events from the queue and delivering them to consumers, it is possible that a single slow consumer will fall behind so much that the `IQueueCache` will fill up.
To prevent `IQueueCache` from growing indefinitely, we limit its size (the size limit is configurable). However, the agent never throws away undelivered events.
Instead, when the cache starts to fill up, the agents slow the rate of dequeuing events from the queue. That way, we can "ride out" the slow delivery periods by adjusting the rate at which we consume from the queue ("backpressure") and get back into fast consumption rate later on. To detect the "slow delivery" valleys the `IQueueCache` uses an internal data structure of cache buckets that tracks the progress of delivery of events to individual stream consumers. This results in a very responsive and self-adjusting system.


text:
# fuzzy-c-means

![GitHub](https://img.shields.io/github/license/omadson/fuzzy-c-means.svg)
[![PyPI](https://img.shields.io/pypi/v/fuzzy-c-means.svg)](http://pypi.org/project/fuzzy-c-means/)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/omadson/fuzzy-c-means.svg)](https://github.com/omadson/fuzzy-c-means/pulse)
[![GitHub last commit](https://img.shields.io/github/last-commit/omadson/fuzzy-c-means.svg)](https://github.com/omadson/fuzzy-c-means/commit/master)
[![Downloads](https://pepy.tech/badge/fuzzy-c-means)](https://pepy.tech/project/fuzzy-c-means)

`fuzzy-c-means` is a Python module implementing the [Fuzzy C-means][1] clustering algorithm.

## instalation
the `fuzzy-c-means` package is available in [PyPI](https://pypi.org/project/fuzzy-c-means/). to install, simply type the following command:
```
pip install fuzzy-c-means
```

## basic usage
simple example of use the `fuzzy-c-means` to cluster a dataset in tree groups:
```Python
from fcmeans import FCM
from sklearn.datasets import make_blobs
from matplotlib import pyplot as plt
from seaborn import scatterplot as scatter

# create artifitial dataset
n_samples = 50000
n_bins = 3  # use 3 bins for calibration_curve as we have 3 clusters here
centers = [(-5, -5), (0, 0), (5, 5)]

X,_ = make_blobs(n_samples=n_samples, n_features=2, cluster_std=1.0,
                  centers=centers, shuffle=False, random_state=42)

# fit the fuzzy-c-means
fcm = FCM(n_clusters=3)
fcm.fit(X)

# outputs
fcm_centers = fcm.centers
fcm_labels  = fcm.u.argmax(axis=1)

# plot result
%matplotlib inline
f, axes = plt.subplots(1, 2, figsize=(11,5))
scatter(X[:,0], X[:,1], ax=axes[0])
scatter(X[:,0], X[:,1], ax=axes[1], hue=fcm_labels)
scatter(fcm_centers[:,0], fcm_centers[:,1], ax=axes[1],marker="s",s=200)
plt.show()
```

## how to cite fuzzy-c-means package
if you use `fuzzy-c-means` package in your paper, please cite it in your publication.
```
@misc{fuzzy-c-means,
    author       = "Madson Luiz Dantas Dias",
    year         = "2019",
    title        = "fuzzy-c-means: An implementation of Fuzzy $C$-means clustering algorithm.",
    url          = "https://github.com/omadson/fuzzy-c-means",
    institution  = "Federal University of Cear\'{a}, Department of Computer Science"
}
```

### citations
 - [Gene-Based Clustering Algorithms: Comparison Between Denclue, Fuzzy-C, and BIRCH](https://doi.org/10.1177/1177932220909851)

## contributing

this project is open for contributions. here are some of the ways for you to contribute:
 - bug reports/fix
 - features requests
 - use-case demonstrations

to make a contribution, just fork this repository, push the changes in your fork, open up an issue, and make a pull request!

## contributors
 - [Madson Dias](https://github.com/omadson)
 - [Dirk Nachbar](https://github.com/dirknbr)
 - [Alberth Florêncio](https://github.com/zealberth)

[1]: https://doi.org/10.1016/0098-3004(84)90020-7
[2]: http://scikit-learn.org/

repository: arsider/fuzzy-c-means

repo_name: arsider/fuzzy-c-means


text:
Elegant Number Button

A simple Android library to implement a number counter with increment and decrement buttons.

## Screens

## Download

Grab the latest version on gradle using

```groovy
compile 'com.cepheuen.elegant-number-button:lib:1.0.2'
```
or on maven

```maven
<dependency>
  <groupId>com.cepheuen.elegant-number-button</groupId>
  <artifactId>lib</artifactId>
  <version>1.0.2</version>
  <type>pom</type>
</dependency>

```

## Usage

For Working implementation of this library check ElegantNumberButtonSample App
 * Just include the view as you do with any android widget.
 * Implement it in your java code as anyother widget.
 * To get the number simply call `getNumber()` method on the button object.
 * To get the number from the button as soon as the button is clicked add a `setOnClickListener` to the view.

    ```java
    ElegantNumberButton button = (ElegantNumberButton) findViewById(R.id.button);
    button.setOnClickListener(new ElegantNumberButton.OnClickListener() {
            @Override
            public void onClick(View view) {
                String num = button.getNumber();
            }
        });
    ```
 * Or use a valueChangeListener to listen for changes in value.

    ```java
    elegantNumberButton.setOnValueChangeListener(new ElegantNumberButton.OnValueChangeListener() {
            @Override
            public void onValueChange(ElegantNumberButton view, int oldValue, int newValue) {
                Log.d(TAG, String.format("oldValue: %d   newValue: %d", oldValue, newValue));
            }
        });
     ```

## Customization

`backgroundColor` : Set button Background color

`initialNumber`: Set initial number for the button.

`finalNumber` : Set final number range for button.

`textColor`: Modify the text color of the button.

`textSize`: Change text size of the button.

`backgroundDrawable`: Add drawable background for the button.

## Methods

`setNumber(Integer number)`: Update the number of the widget.

`setRange(Integer startNumber, Integer finalNumber)` : Set the operational range for the widget

`setOnValueChangeListener(OnValueChangedListener listener)`: listen for changes in the value

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3.  Push to the branch: `git push origin my-new-feature`
5. Submit a pull request

## Changelog

### Version 1.0.2

* Added ValueChangeListener to listen for changes in values

### Version 1.0.1

* Added Range for the widget
* Changed attribute from initialText to initialNumber

### Version 1.0

* Initial Release

## Author

* Ashik Vetrivelu -<EMAIL_ADDRESS>
## License

Copyright 2016 Ashik Vetrivelu

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

repository: oguzayan/ElegantNumberButton

repo_name: oguzayan/ElegantNumberButton


text:
# history-api-fallback

## Introduction

Single Page Applications (SPA) typically only utilise one index file that is
accessible by web browsers: usually `index.html`. Navigation in the application
is then commonly handled using JavaScript with the help of the
[HTML5 History API](http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-history-interface).
This results in issues when the user hits the refresh button or is directly
accessing a page other than the landing page, e.g. `/help` or `/help/online`
as the web server bypasses the index file to locate the file at this location.
As your application is a SPA, the web server will fail trying to retrieve the file and return a *404 - Not Found*
message to the user.

This tiny servlet filter addresses some of the issues. Specifically, it will change
the requested location to the index you specify (default being `index.html`)
whenever there is a request which fulfils the following criteria:

 1. The request is a GET request
 2. which accepts `text/html` and is not `application/json`
 3. is not a direct file request, i.e. the requested path does not contain a `.` (DOT) character

This project borrows heavily from the
[connect-history-api-fallback](https://github.com/bripkens/connect-history-api-fallback) project.

repository: lookfirst/history-api-fallback

gha_language: Java

repo_name: lookfirst/history-api-fallback


text:
---
layout: default
---

# 1998-01-02 - Meganet's Unbreakable Virtual Matrix Encryption Takes the Market by Storm; Finally in 1998 Absolute Security...

## Header Data

From<EMAIL_ADDRESS>(Igor Chudov @ home)

To<EMAIL_ADDRESS>Message Hash: c42483d96851e2e7172e85a69e051873645a58a8c5c72cc09b15db61bb455ba6

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1998-01-02 14:40:03 UTC

Raw Date: Fri, 2 Jan 1998 22:40:03 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Igor Chudov @ home)
Date: Fri, 2 Jan 1998 22:40:03 +0800
To<EMAIL_ADDRESS>Subject: Meganet's Unbreakable Virtual Matrix Encryption Takes the Market by Storm; Finally in 1998 Absolute Security...
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text

CNN Custom News:

          Repeat/Meganet's Unbreakable Virtual Matrix Encryption Takes
          the Market by Storm; Finally in 1998 Absolute Security...

          LA Times 02-JAN-98 LOS ANGELES--(BUSINESS WIRE)--Dec. 31,
          1997--Finally Meganet's highly acclaimed unbreakable encryption,
          Virtual Matrix Encryption (VME) is for sale. Meganet, a San
          Fernando Valley software development company, is proud to
          announce the release of a full line of encryption products.

          VME 98 is available in six (6) levels of front-end applications
          in three (3) flavors: DOS, Win 16 (Windows 3.x), and Win
          32 (Windows 95 & NT). The VME 98 Standard Edition, VME
          98 Professional Edition, VME 98 Enterprise Edition, VME 98
          Custom Client Edition, VME 98 Custom Server Edition, & VME 98
          Batch Server Edition provide unprecedented security, options,
          and flexibility. The pricing ranges from $100.00 for a single
          retail license to over $1,000,000.00 for the most sophisticated
          VME 98 Batch Server Edition.

          In addition, three (3) SDK's (Software Developer Kits) are
          ready to assist software developers in easily integrating
          VME 98 into their existing and future products. The three (3)
          SDK's include an 8bit DOS Engine, 16bit Windows DLL (Win 3.x)
          and 32bit Windows DLL (Win 95 & NT).

          The possibilities are endless with the array of VME 98
          products. Now any application including but not limited
          to Internet commerce, Government communications, banking
          transactions, corporate secrets and personal computer data
          can be guaranteed complete impenetrability.

          Yes, the VME 98 is the same product that was posted on the
          Internet with a $1 million reward for anyone that could break
          a VME encrypted file. Over fifty five thousand (55,000) tried
          with zero (0) success.

          Yes, the VME 98 is the same product that challenged Microsoft,
          IBM, AT&T, Dell, Hewlett-Packard, Intel, America Online,
          Netscape, etc. to break a VME encrypted file. All the great
          computer minds in this country have had an opportunity to
          dispel the bold claims of unbreakable encryption, yet none have.

          Meganet is pleased to offer the same standard of excellence
          with all of the VME 98 packages.

          Additional information about this exciting new technology can
          be found at www.meganet.com

{% endraw %}
```

## Thread

+ Return to [January 1998](/archive/1998/01)

+ Return to<EMAIL_ADDRESS>(Igor Chudov @ home)](/authors/ichudov_at_algebra_com_igor_chudov__at__home_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"

+ 1998-01-02 (Fri, 2 Jan 1998 22:40:03 +0800) - Meganet's Unbreakable Virtual Matrix Encryption Takes the Market by Storm; Finally in 1998 Absolute Security... -<EMAIL_ADDRESS>(Igor Chudov @ home)_
  + 1998-01-02 (Sat, 3 Jan 1998 03:39:14 +0800) - [Re: Meganet's Unbreakable Virtual Matrix Encryption Takes theMarket by Storm; Finally in 1998 Absolute Security...](/archive/1998/01/ecc411f00aba2526998de9a22d9a0289aaef2c3e63946897e430bd8d91ee21b2) - _Tim May<EMAIL_ADDRESS>


text:
# Database

Holds Class Mentors' database static data and rules tests.

## Running tests

```
npm run test:rules
```

## Tests Fixtures

Most fixture data should be defined in "test/fixtures.json", with its data used
to set the default firebase data for a test.

Your tests should reset the firebase before running, using
`test/utils.js#setFirebaseData(somePatchToBaseData)`. e.g:
```js
const utils = require('./utils.js');

describe('events', function() {

  beforeEach(function() {
    utils.setFirebaseData();
  });

});
```

To retrieve fixture data, you can use `test/utils.js#fixtures(somePath)`; e.g.:
```js
const utils = require('./utils.js');

describe('auth', function() {
  let chris;

  beforeEach(function() {
    chris = utils.fixtures('auth/users/google:chris');

    // set the database with chris not registered
    utils.setFirebaseData({
      auth: {
        publicIds: {chris: undefined},
        usedPublicIds: {chris: undefined},
        users: {'google:chris': undefined}
      }
    });
  });

  it('should let a user register', function() {
    // todo
  })

});
```

Returned values cannot be corrupted by a previous test and will always reflect
the data set in "tests/fixtures.json".

You can use `test/utils.js#auth` to authenticate with one of the fixture
registered users:

- `auth.admin` (admin);
- `auth.chris` alias for `auth.admin`;
- `auth.alice` (premium, can create event and has an "alice-event" event setup);
- `auth.bob` (participant of "alice-event" event);
- `auth.emma` (only registered - to test non-participant access to event).

They can used with targaryen tests:
```js
expect(utils.auth.chris).can.read.path('classMentors/events');
```

Thoses object cannot be corrupted by previous tests.

repository: shiquan-lim/classmentors

repo_name: shiquan-lim/classmentors


text:
# Threespot WordPress Sandbox

[![CircleCI](https://circleci.com/gh/Threespot/threespot-wp-sandbox.svg?style=shield)](https://circleci.com/gh/Threespot/threespot-wp-sandbox)
[![Dashboard threespot-wp-sandbox](https://img.shields.io/badge/dashboard-threespot_wp_sandbox-yellow.svg)](https://dashboard.pantheon.io/sites/08dda8d9-dc1e-4281-8dfa-8091d868d503#dev/code)
[![Dev Site threespot-wp-sandbox](https://img.shields.io/badge/site-threespot_wp_sandbox-blue.svg)](http://dev-threespot-wp-sandbox.pantheonsite.io/)
[![WordPress Core](https://img.shields.io/badge/WordPress-5.3.1-blue.svg)](https://wordpress.org/download/)

# About

This is a repository to try out custom plugins, custom Gutenberg blocks, etc. Get wild, but not too wild.

# Child Theme

The `twentytwenty-child` directory is a child theme based off the WP Twentytwenty. Use this to test simple custimizations.

# Hosting

This site is hosted on Pantheon on the Basic plan ([details](https://pantheon.io/plans/basic-pricing)). It's running on WordPress 5 on PHP 7.1. Redis cache is not available to sites on the Basic plan.

# Local Development

In order to more easily recreate the production environment locally, [Lando](https://docs.devwithlando.io) is used for local development. We also use Pantheon’s CLI, Terminus, to sync files and databases.

### Prerequisites

1. Install git
   - [Windows installer](https://gitforwindows.org)
   - macOS
     - Check if already installed with `$ git --version`
     - If not already installed, you will be prompted to install it.
1. Install Lando ([Windows](https://docs.devwithlando.io/installation/windows.html), [macOS](https://docs.devwithlando.io/installation/macos.html))
1. Install [Terminus](https://pantheon.io/docs/terminus/install/), Pantheon’s CLI tool
1. Install Composer
   - [Windows instructions](https://getcomposer.org/doc/00-intro.md#installation-windows)
   - macOS
     - Install [Homebrew](https://brew.sh)
     - Run `$ brew install composer`
1. Install NodeJS 8.x ([Windows](https://nodejs.org/dist/latest-v8.x/node-v8.16.0-x64.msi), [macOS](https://nodejs.org/dist/latest-v8.x/node-v8.16.0.pkg))
   - Note: We recommend [asdf](https://github.com/asdf-vm/asdf) for managing multiple versions of Node
1. Install Yarn ([Windows](https://yarnpkg.com/en/docs/install#windows-stable), [macOS](https://yarnpkg.com/en/docs/install#mac-stable))

   - Note: Yarn is a faster alternative to `npm install`

   ### Add ENV File

Create a `.env` file.
Update it so that it looks something like the following:

```
DB_NAME=wordpress
DB_USER=wordpress
DB_PASSWORD=wordpress

# Optional variables
DB_HOST=database
# DB_PREFIX=wp_

WP_ENV=development
WP_HOME=http://APP_NAME.lndo.site
WP_SITEURL=${WP_HOME}/wp

# Generate your keys here: https://roots.io/salts.html
AUTH_KEY='generateme'
SECURE_AUTH_KEY='generateme'
LOGGED_IN_KEY='generateme'
NONCE_KEY='generateme'
AUTH_SALT='generateme'
SECURE_AUTH_SALT='generateme'
LOGGED_IN_SALT='generateme'
NONCE_SALT='generateme'

#plugin keys
ACF_PRO_KEY=`pluginkey`

```

### Starting local server

1. Clone this repo

   `$ git clone git@github.com:Threespot/threespot-wp-sandbox.git`

1. Open `threespot-wp-sandbox` folder in the terminal and install Composer dependencies

   `$ composer install`

1. Start the local server

   `$ lando start`

   1. If everything was successful, you should see something like this:

      ```
      Your app has started up correctly.
      Here are some vitals:

       NAME                  threespot-wp-sandbox
       LOCATION              /Users/yourUserName/Sites/threespot-wp-sandbox
       SERVICES              appserver_nginx, appserver, database, cache, edge, edge_ssl, index
       APPSERVER_NGINX URLS  https://localhost:32774
                             http://localhost:32775
       EDGE URLS             http://localhost:32776
                             https://threespot-wp-sandbox.lndo.site/:8000
                             https://threespot-wp-sandbox.lndo.site/
       EDGE_SSL URLS         https://localhost:32777
      ```

1. Clone the database and files from Pantheon

   `$ lando pull`

   1. Use the arrow keys to select “none” for the code, since we pulled the code from GitHub:
      ```
      ? Pull code from?
        live
        dev
        test
      ❯ none
      ```
   1. Select “live” for the database:
      ```
      ? Pull database from?
      ❯ live
        dev
        test
        none
      ```
   1. Select “live” for the files (NOTE: ALDF has ~4,000 images, so if this takes too long you can select “none” to skip this but you will not see any images locally)
      ```
      ? Pull files from?
      ❯ live
        dev
        test
        none
      ```

1. You should now be able to view the site at https://threespot-wp-sandbox.lndo.site/

   1. Your browser may warn you that the site is not secure, this is expected. Click though the warning message to proceed.

      ![browser-warning](https://user-images.githubusercontent.com/864716/56390671-8c97fd00-61fa-11e9-8127-39c190486f5b.png)

1. You should be able to login to the admin at https://threespot-wp-sandbox.lndo.site/wp/wp-admin/

#### Troubleshooting

If the site fails to load, try the following:

- Restart the server

  `$ lando restart`

- Rebuild the app

  `$ lando rebuild`

- Destroy and recreate the app

  `$ lando destroy && lando start`

- Check current version of Lando to see if there’s an [update available](https://github.com/lando/lando/releases)

  `$ lando version`

### Starting Webpack with live reload

If you plan to make CSS or JS updates, you must run Webpack to recompile and inject the CSS and JS.

1. In a new terminal window, navigate to the `threespot-wp-sandbox` project folder again
1. Navigate to the theme folder

   `$ cd /web/wp-content/themes/threespot-wp-sandbox`

1. Install npm dependencies using Yarn

   `$ yarn install`

1. Start Webpack

   `$ yarn start`

   1. You should see the following:
      ```
      [HTML Injector] Running...
      [Browsersync] Proxying: https://threespot-wp-sandbox.lndo.site
      [Browsersync] Access URLs:
       -----------------------------------
             Local: https://localhost:3000
          External: https://<IP_ADDRESS>:3000
       -----------------------------------
                UI: http://localhost:3001
       UI External: http://localhost:3001
       -----------------------------------
      [Browsersync] Watching files...
      ```

1. You should now be able to view the site locally at https://localhost:3000
1. To stop the server, press Control + C

#### Troubleshooting

1. If the server won’t start or gets caught in an endless loop, try stopping and restarting it.
1. If the server starts but the site doesn’t appear at https://localhost:3000, check that `devUrl` in [`config.json`](https://github.com/Threespot/threespot-wp-sandbox/blob/76b6d3addc5802ea9ef61f5901128a4ea2d318e0/web/wp-content/themes/threespot-wp-sandbox/resources/assets/config.json#L8) matches the URL generated by Lando (e.g. https://threespot-wp-sandbox.lndo.site)

## Updating Dependencies

To update WordPress or any free plugins to the latest version, run `$ composer update` and push the updated `composer.lock` file to GitHub. To update any paid plugins, you will need to manually update the files and commit.

To update the Node dependencies, run `$ yarn upgrade-interactive` from the theme folder (`threespot-wp-sandbox/web/wp-content/themes/threespot-wp-sandbox`) and select the packages to update. Once installed, push the updated `yarn.lock` file to GitHub.

It is technically possible to install plugins via the WordPress admin with Pantheon ([docs](https://pantheon.io/docs/guides/wordpress-git/plugins/)) but this isn’t recommended since it makes it difficult for multiple developers to stay in sync.

## Deployment

Every time code is pushed to GitHub, [CircleCI](https://circleci.com/gh/Threespot/threespot-wp-sandbox) will build and deploy the files to Pantheon’s [dev environment](https://dashboard.pantheon.io/sites/c0626448-2830-4bf7-852c-575f3150a227#dev/code). You can tell CircleCI not run by adding `[skip ci]` to the commit message.

Once code has been deployed to the dev environment, you can switch to the “Test” tab and click the “Deploy Code from Development to Test Environment” button to deploy to http://test-threespot-wp-sandbox.pantheonsite.io.

![pantheon-deploy](https://user-images.githubusercontent.com/864716/56390569-55295080-61fa-11e9-9c35-94d5a8ee500d.png)

After the updates have been tested, you can deploy to the live site by following the same process on the “Live” tab.

# Tech Stack

### Back End

- [Bedrock](https://roots.io/bedrock/) framework
  - Places core WordPress code in a separate folder (required for Pantheon)
  - Composer integration
  - Environment variable support
  - Supports autoloading regular and must-use plugins
- [Sage](https://roots.io/sage/) theme framework ([docs](https://roots.io/sage/docs/theme-configuration-and-setup/)) with [Soil](https://roots.io/plugins/soil/) plugin
  - Supports [Laravel’s Blade](https://laravel.com/docs/5.5/blade) templating engine
  - Supports controllers ([docs](https://github.com/soberwp/controller)) to keep views DRY
  - Includes [Webpack](https://webpack.js.org) for processing front-end assets ([config](https://github.com/Threespot/aldf-wp/blob/master/web/wp-content/themes/aldf/resources/assets/build/webpack.config.js))
    - Sass linting, compilation, browser prefixing, and minification
    - JavaScript linting, transpilation (i.e. converting ES6 to ES5), bundling, and minification
    - Image compression ([config](https://github.com/Threespot/aldf-wp/blob/master/web/wp-content/themes/aldf/resources/assets/build/webpack.config.optimize.js))
    - Live reload with [BrowserSync](https://www.browsersync.io)
- Community support for both frameworks can be found at https://discourse.roots.io

#### CSS

- Threespot’s [CSS reset](https://github.com/Threespot/frontline-css-reset)
- Threespot’s [Sass library](https://github.com/Threespot/frontline-sass) ([docs](https://threespot.github.io/frontline-sass/documentation/))
  - Most often used functions and mixins:
    - [`fs-rem`](https://threespot.github.io/frontline-sass/documentation/#main-function-fs-rem)—Helper function converts pixels to rems
    - [`fs-color`](https://threespot.github.io/frontline-sass/documentation/#main-function-fs-color)—Helper for retrieving a color from the [`$fs-colors`](https://threespot.github.io/frontline-sass/documentation/#main-variable-fs-colors) map
    - [`fs-min-width`](https://threespot.github.io/frontline-sass/documentation/#main-mixin-fs-min-width)/[`fs-max-width`](https://threespot.github.io/frontline-sass/documentation/#main-mixin-fs-max-width)—Media query helpers to convert fixed pixels to rems
    - [`fs-media`](https://threespot.github.io/frontline-sass/documentation/#main-mixin-fs-media)—Media query helper that supports any condition, and multiple conditions
    - [`fs-scale`](https://threespot.github.io/frontline-sass/documentation/#main-mixin-fs-scale)—Allows for smoothly scaling values from one viewport width to another
    - [`fs-attention`](https://threespot.github.io/frontline-sass/documentation/#selectors-mixin-fs-attention)—Helper mixin adds `:hover`, `:focus`, and `:active` states
    - [`fs-svg`](https://threespot.github.io/frontline-sass/documentation/#main-function-fs-svg)—Function to export URL-escaped inline SVG for use in `background-image` (SVGs are stored in [`$fs-svg-icons`](https://threespot.github.io/frontline-sass/documentation/#main-variable-fs-svg-icons) map)
- [SUIT](http://suitcss.github.io/) CSS class naming convention, e.g. `.ComponentName-child--variation`

#### JavaScript

- [Modernizr](https://modernizr.com/download/?-cssgrid_cssgridlegacy-objectfit-setclasses) used for [CSS grid](https://caniuse.com/#feat=css-grid) and [object-fit](https://caniuse.com/#feat=object-fit&search=object-fit) feature detection
- External JS dependencies are listed in the `dependencies` section of [`package.json`](https://github.com/Threespot/aldf-wp/blob/master/web/wp-content/themes/aldf/package.json#L68):

  View dependencies

  - [@threespot/expand-toggle](https://www.npmjs.com/package/@threespot/expand-toggle)
  - [@threespot/fluid-iframe](https://www.npmjs.com/package/@threespot/fluid-iframe)
  - [@threespot/fluid-svg-polyfill](https://www.npmjs.com/package/@threespot/fluid-svg-polyfill)
  - [@threespot/freeze-scroll](https://www.npmjs.com/package/@threespot/freeze-scroll)
  - [@threespot/mailto](https://www.npmjs.com/package/@threespot/mailto)
  - [@threespot/object-fit-image](https://www.npmjs.com/package/@threespot/object-fit-image)
  - [@threespot/unorphanize](https://www.npmjs.com/package/@threespot/unorphanize)
  - [console-polyfill](https://www.npmjs.com/package/console-polyfill)
  - [flickity-fullscreen](https://www.npmjs.com/package/flickity-fullscreen)
  - [fontfaceobserver](https://www.npmjs.com/package/fontfaceobserver)
  - [lodash](https://www.npmjs.com/package/lodash)
  - [mdn-polyfills](https://www.npmjs.com/package/mdn-polyfills)
  - [picturefill ](https://www.npmjs.com/package/picturefill)
  - [what-input](https://www.npmjs.com/package/what-input)

    - Custom JS modules can be found in the [`/resources/assets/scripts`](https://github.com/Threespot/threespot-wp-sandbox/tree/master/web/wp-content/themes/threespot-wp-sandbox/resources/assets/scripts) folder

- The site JS is split into three files:

  - [`critical.js`](https://github.com/Threespot/threespot-wp-sandbox/blob/master/web/wp-content/themes/threespot-wp-sandbox/resources/assets/scripts/critical.js)—Contains code that needs to run before content is displayed in the browser to prevent a [FOUC](https://en.wikipedia.org/wiki/Flash_of_unstyled_content) (e.g. check is JS is enabled, check if fonts have previously loaded)
    - NOTE: This code must be manually minified and copied to [`critical-js.blade.php`](https://github.com/Threespot/threespot-wp-sandbox/blob/master/web/wp-content/themes/threespot-wp-sandbox/resources/views/partials/critical-js.blade.php) (easier than setting up a custom build script since this code won’t change often)
  - [`main.js`](https://github.com/Threespot/threespot-wp-sandbox/blob/master/web/wp-content/themes/threespot-wp-sandbox/resources/assets/scripts/main.js)—Contains all other site JS, with the exception of image galleries; loaded at the bottom the `<body>` tag

repository: Threespot/threespot-wp-sandbox

gha_language: PHP

repo_name: Threespot/threespot-wp-sandbox


text:
Scala-test-prop  Scala Test Case Generator And Exector
=====================================================================================================
[![Build Status](https://travis-ci.org/KnewHow/ScalaProp.svg?branch=master)](https://travis-ci.org/KnewHow/ScalaProp)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4a39a5203267439ebe30d4d060cb2bfa)](https://www.codacy.com/app/KnewHow/ScalaProp?utm_source=github.com&utm_medium=referral&utm_content=KnewHow/ScalaProp&utm_campaign=Badge_Grade)

Scala-tes-prop provides test cases generator then run test function with them. Finally it will println test result information and return a boolean value to tell you test result which can be asserted by scala test.

## Generator
Generator is basic component in scala-test-prop, which can generate test cases you want. For example, if you want to get a range integer, you see following code:
```Scala
import prop.gen.Gen

// return a Gen[Int] with integer range in (1,10), but the range exclusive 10
Gen.choose(1, 10)
```
It also can generate other generator, such as `Gen.odd(10,100)`, `Gen.listOf(10, Gen.choose(10,100))`. The first function will return random odd integer from 10 to 100, but inclusive 100. The second function will return a list with 10 size whose
elements range is between 10 and 100 but exclusive 100. You can find more in [Object Gen](https://github.com/KnewHow/ScalaProp/blob/master/src/main/scala/prop/Gen.scala)

## Executor
Now, you have knew how to obtain a generator, but how to run testing function with them? The Executor match to `Gen` is `Prop`. `Prop` is running parameters to testing result container. You can do `&&` or `||` with two `Prop`, the implement you can refer: https://github.com/KnewHow/ScalaProp/blob/master/src/main/scala/prop/Prop.scala

You can call `Prop.test(n,rng)` to get test result. The first parameter is how many test cases will be taken to test. The second parameter is random number generator. You can get it by `RNG.get`. We have provided some default value to make you use it eaisily.

If you want to test a sorted function, you can generate a `Gen[List[A]]` first, then test it by `Prop`, you can refer following code:
```Scala
package test.prop.gen
import org.scalatest.FlatSpec
import prop.gen._

class ListOfFixedSizeSpec extends FlatSpec {
  "test listOf with fixed size" should "success" in {
    // Generate list with 20 size whose element is between 10 and 100
    val g = Gen.listOfN(20, Gen.choose(10, 100))
    val p = Prop.forAll(g) { r =>
      // Writing what you want to test, make sure it last result is boolean.
      val s = r.sorted
      val h = s.headOption
      h.map(rs => !r.exists(_ < rs)).getOrElse(true)
    }
    // In default, test function will run checked function with 10 test cases.
    assert(p.test())
  }
}
```
Because test function return a boolean value, if the value is true, representing the all test cases passed, you can combine it with scala-test assert. At same time, `Prop.test` also println some test information in console. If all test cases passed, it will print `[info] OK, 10 testcases passed`, otherwise will print `[error] test case failure, case by...,But success n times`.

you can also generate a list with random size by `Gen.listOfN(Gen.choose(10, 20), Gen.choose(10, 100))`.

## Incremental Testing
Sometimes, once or twice testing don't test whether a bug in checked function. We may want a test way, which can increase the test cases gradually until run enough times we assigned. `SProp` is born in time!

For example, If you want to test a sorted function and want to test it 20 times with test cases increasing gradually. You can choose `SProp`, you can refer following code:
```Scala
package test.prop.sgen

import org.scalatest.FlatSpec
import prop.gen._

class SPropFixedStepSpec extends FlatSpec {
  "test SProp with sorted function by fixed step increasing" should "success" in {
    // geneate a list with random size whose element is random
    val g = Gen.listOfN(Gen.choose(100, 200), Gen.choose(300, 400))
    // conver Gen into SGen, it is very simply
    val sg = g.unsized
    // similar with Prop.forAll, just return a boolean result
    val p = SProp.forAll(sg) { r =>
      val s = r.sorted
      val h = s.headOption
      h.map(rs => !r.exists(_ < rs)).getOrElse(true)
    }
    // run the checked function
    assert(
      p.test(
        // the minimal test cases will be run first
        minTestCase = 10,
        // the step the test cases will increase by
        step = 1,
        // how many time the function will be run
        testTimes = 20,
        // whether use random step
        randomStep = false
      ))
  }
}
```

The function will take 10 test cases first, then increase test cases by step 1 unitl it run 20 times. In this way, it will reduce testing fortuity.

But sometimes, fixed step could be stiff, So we also prepare a random step between 1 and n which you assigned. You just need
assign `randomStep=true`, we will genereate random step between 1 and `n`

We has give some default parameters to `test` function, So you can not pass any parameters to `test` function.

## Bugs
The `Gen` is so easy and elegant, but it has some bugs:
If you want to test `Gen.listOfN` with a big size list, it will throw `stack overflow`. The tempoary  solution is you can increase stack size by jvm prameters with `-Xss500M`. You can write it in a file named `.jvmopts` in sbt project root directory.

I will try to fix it in the future!
## How to Get
You can add following code in your build.sbt file to get it:
```Scala
// https://mvnrepository.com/artifact/com.github.knewhow/scalaprop
libraryDependencies += "com.github.knewhow" %% "scalaprop" % "1.0"
```

repository: KnewHow/ScalaProp

gha_language: Scala

repo_name: KnewHow/ScalaProp


text:
# tainthighlight README

Highlight lines tainted from LLVM dtf pass. Needs a `.taint` file, generated from dft pass on the source

## Features

* `Highlight Tainted`: highlight source code lines which are tainted
* `Parse Taint File`: taint files are parsed automatically, but run this command while opening one for force it, if is missed

repository: mydevgh/constantine

repo_name: mydevgh/constantine


text:
# TcSo Rust
This is the Rust version of the Try catch stack overflow. You can use it in your projects. Please don't forget to make improvements and submit a new pull request.

There's also a version using a [global catch handler](https://github.com/panicbit/panic_search_rs).

## How to use with cargo

```toml
[dependencies.tcso]
git = "https://github.com/gautamkrishnar/tcso/"
```

## How to use in your crate

```rust
extern crate tcso;

use tcso::try;

fn main() {
    try(|| {
        None::<i32>.unwrap();
    });
}
```

## Credits
Developed by: [panicbit](https://github.com/panicbit/)

## Contributors
* {your-name-here}

repository: gautamkrishnar/tcso

repo_name: gautamkrishnar/tcso


text:
# RoboPeak/DFRobot 2.8" USB TFT Driver

This is an unmodified compiled, packaged, easy-to-install distribution of the official RoboPeak Mini Display Display driver. It's intended to run on Raspbian Jessie or Wheezy on the Raspberry Pi, and has been compiled for various different kernel versions.

You can find the original source code, and raise issues at https://github.com/robopeak/rpusbdisp

Before installing, make sure you're up to date:

```bash
sudo apt-get update
sudo apt-get upgrade
sudo reboot
```

## Installing

```bash
git clone http://github.com/pimoroni/rp_usbdisplay
cd rp_usbdisplay
./install.sh
```

Unless you're okay with starting it up manually ( `sudo modprobe rp_usbdisplay` ) You'll also have to make sure that rp_usbdisplay starts automatically by editing `/etc/modules` and adding the line:

```bash
rp_usbdisplay
```

## Manually

Clone this repo.

Where `<kernel_version>` is the version of your kernel returned by `uname -a`

Copy `drivers/<kernel_version>/rp_usbdisplay.ko` to `/lib/modules/<kernel_version>/kernel/drivers/video/`
Copy `drivers/<kernel_version>-v7+/rp_usbdisplay.ko` to `/lib/modules/<kernel_version>-v7+/kernel/drivers/video/`

Run `sudo depmod`

Then `modprobe rp_usbdisplay`

Your USB display is now installed and should appear as `/dev/fb1`

The display should go black. Test with: `cat /dev/urandom > /dev/fb1`

## Boot X Desktop On USB Display

Although you'll get little use out of your desktop on the USB display, we've included the configuration file which will get it running. See [/extra](/extra) for more information.


text:
# DDVersion [![Build Status](https://travis-ci.org/Dids/DDVersion.svg?branch=master)](https://travis-ci.org/Dids/DDVersion)

DDVersion is a simple, universal Objective-C iOS library for quickly getting the mobile device type and name.

While DDVersion was inspired by [sebyddd](https://github.com/sebyddd)'s [SDiPhoneVersion](https://github.com/sebyddd/SDiPhoneVersion), it doesn't include support for device size or device enumeration. Not yet at least.

This library supports all iOS devices, both new and old.

DDVersion is part of the DD-projects (check them out, they're cool!):

- DDDevice - Combines all DD-project in to one neat library (Coming Soon)
- [DDVersion](https://github.com/Dids/DDVersion.git) - Easily get the device name and type
- [DDCarrier](https://github.com/Dids/DDCarrier.git) - Easily get the current carrier name
- DDSize - Easily find out the device resolution (Coming Soon)
- [DDNavText](https://github.com/Dids/DDNavText.git) - Additional text for UINavigationBar title

More DD-projects are under development and will be added once completed.

## Usage
```objective-c
// Get the device type as a string (eg. "iPhone6,1" or "i386")
[DDVersion deviceType];

// Get the device name as a string (eg. "iPhone 5S (GSM)" or "Simulator")
[DDVersion deviceName];
```

## Demo

To run the example project, simply open up `DDVersionDemo.xcodeproj` and hit Build & Run.

## Requirements

## Installation using CocoaPods (RECOMMENDED)

DDVersion is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "DDVersion"
```

## Manual Installation

Simply copy `DDVersion.h` and `DDVersion.m` to your project and import `DDversion.h` like so:

```objective-c
#import "DDVersion.h"
```

Using the CocoaPod installation method is recommended over the manual installation, as this way your copy of DDVersion is always up to date.

## Author

Pauli 'Dids' Jokela<EMAIL_ADDRESS>and Didstopia, http://didstopia.com

Some of the original code (and major inspiration!) comes from [sebyddd](https://github.com/sebyddd)'s [SDiPhoneVersion](https://github.com/sebyddd/SDiPhoneVersion).

## License

DDVersion is available under the MIT license. See the LICENSE file for more info.

repository: Dids/DDVersion

gha_language: Objective-C

repo_name: Dids/DDVersion


text:
---
title: Buy It
tags: [ html, css]
date: 2020-01-21T05:25:44.226Z
path: blog/buyit
cover: ./ecommerce-img.png
excerpt: This is an Ecommerce Website concept that I designed using html and css.
---
## Objective

In this project, I designed the home page of an ecommerce website as well as page of a sample product. I also did this project to practice my HTML and CSS skills.

## Process

First, I gather the images and icons that I will use throughout the web project. Then, I begin working on the nav and search bar at the top of the site followed by the carousel of images. Scrolling down, I created a Sales and New Arrivals section since ecommerce sites such as Amazon, WayFair, Overstock, etc contain simliar field.

Lastly, I decided to work on developing a page for one of the displayed products. In this case, I worked on the Women's T-Shirts product where I included fields such as Pricing, Rating, Availability, Condition, Brand, Quantity, and Description. Once I added these important fields found in almost every ecommerce site, I styled the page with css. Check out the finished product [`here`](https://antonio98s.github.io/ecommerce-site/product.html)

## Results

The entire process led to a complete main page for the BuyIt ecommerce site. Something that I would like fix in the future is the position of the search bar and align it with the categories located on the nav bar. Check it out [`here`](https://antonio98s.github.io/ecommerce-site/)


text:
# Chat-Room

[Chat on Slack](https://join.slack.com/t/coding-ninjasgroup/shared_invite/enQtODM2OTgxODE3ODYyLTE4MGE0ZDNhMTczYTc5NjAwYjNmZWEwNGM1N2JhNjU0MWJkOTBmYjc3ZmQ3MTgwM2EwNWYzNTIwMjMxZmEyOGQ)

### Introduction
We would using React as Frontend and Express as Backend with Socket.io for live updating of Chat-App.

### Installing depencencies and running the app
You should have `node` installed in your system.
* Fork the repository

* Clone the repository
  `git clone https://github.com/<username>/Chat-Room.git`
  where \< username \> is your username

* Install create-react-app
  `npm install -g create-react-app`

* `cd Chat-Room`

* `npm install`

* `npm start`

#

### Contributions

* Contributors are welcome and please comment on the issue before working on it.
* Feel free to open new issues if you encounter bugs or want to suggest some enhancement in the app

Slack Channel : [Coding-Ninjas](https://join.slack.com/t/coding-ninjasgroup/shared_invite/enQtODM2OTgxODE3ODYyLTE4MGE0ZDNhMTczYTc5NjAwYjNmZWEwNGM1N2JhNjU0MWJkOTBmYjc3ZmQ3MTgwM2EwNWYzNTIwMjMxZmEyOGQ)

## How to update your local master branch
* First of all add upstream remote. You can add upstream like
```bash
git remote add upstream https://github.com/govind2006/titiksha-19.git
```
* Now fetch the updated master branch
```bash
git fetch upstream
```
* Now merge fetch code to your local branch master
```bash
git merge upstream/master
```

repository: PradyumanAgrawal/Chat-Room

repo_name: PradyumanAgrawal/Chat-Room


text:
# dedup.scala #

A quick script to find duplicate image/video files.

It works by comparing file size and sha256 hashes. Will only work on
Unixy systems as it heavily relies on system commands.

The script expects 2 directories. The first is used to find all
duplicates the second to limit the duplicates to that directory.

The output is quite rough. First there's the list of all duplicate files in parentheses, one group at a time. After that comes a list of all duplicate files in the second directory given on the command line. I may improve on the output when the need arises. For now it does what I need.

Oh, and the script needs a scala runtime...


text:
# base16-ocean-dark-syntax-theme

Base16 ocean dark syntax theme for Atom editor.

Adjusted and tested for Java, Sass, Less, JavaScript, CoffeeScript, Markdown.

Also change the color of git status and bracket matcher to match theme.

## Screenshots

- Java

    ![java screenshot](https://raw.github.com/anson0370/base16-ocean-dark-syntax-theme/master/screenshots/java-highlight.png)

- CoffeeScript

    ![coffee screenshot](https://raw.github.com/anson0370/base16-ocean-dark-syntax-theme/master/screenshots/coffee-highlight.png)

- Scss

    ![scss screenshot](https://raw.github.com/anson0370/base16-ocean-dark-syntax-theme/master/screenshots/sass-highlight.png)


text:
---
layout: documentation
current_menu: enterprise-support
---

# Support

Basic support is provided through [Gitter](https://gitter.im/PHP-DI/PHP-DI) and [StackOverflow using the `php-di` tag](https://stackoverflow.com/questions/tagged/php-di).

## Enterprise support

If you want to support the project and benefit from enterprise support and service please send me a line at `matthieu at mnapoli.fr`.


text:
# valueShark

DEVELOPERS:
Chase Tucker, Jerica Mitchel, Tyler Lawson and Amy Evans

OUR APP:
We are developing an app that allows value stock inverstors to search for a particular stock, see a table of best valued stocks, and add them to their portofio.

PROBLEM DOMAIN:
Right now there isn't any tool available for an investor to easily find and sort the best valued stocks out there, without knowing specifically what they are looking for.

DEPENDENCIES:
    "cookie": "^0.4.0",
    "cookie-parser": "^1.4.4",
    "cors": "^2.8.5",
    "dotenv": "^8.2.0",
    "ejs": "^2.7.4",
    "express": "^4.17.1",
    "express-session": "^1.17.0",
    "node-schedule": "^1.3.2",
    "nodemon": "^1.19.4",
    "pg": "^7.14.0",
    "request": "^2.88.0",
    "superagent": "^5.1.0",
    "xhr2": "^0.2.0"

APIS:
MorningStar API
Yahoo Finance API

USER INSTRUCTIONS
The user would need to enter their login name, and it would either create a new ID for them, or pull up their existing user portfolio.  At this time, they can enter in a ticker symbol and get information on a particular stock, and choose to see more about it, or enter it to their portfolio to follow.

API ENDPOINTS
https://rapidapi.com/apidojo/api/yahoo-finance1?endpoint=apiendpoint_aeccfc9c-66eb-4f4a-abf5-c14d952e09f6

    Name: Amazon.com, Inc.
    Symbol:  AMZN
    Price:  1,742.57
    P/E:  77.21
    PEG:  1.67
    Profit Margin:  4.27%
    Market Cap:  863.96B
    PB:  15.26

<!-- stores the user name from login and assigns them a unigue userID -->
CREATE TABLE users (
name VARCHAR(255),
id varchar(255) primary key
);

<!-- Allows the user to save stocks they own, with shares owned and average cost per share owned -->
CREATE TABLE portfolios (
  id varchar(255) primary key,
  shares FLOAT,
  av_cost FLOAT,
  ticker varchar(255)
);
<!-- Creates a database that had a storage of NASDAQ listed companies, their ticker smybol, company name, a description of their company,what industry they are in, and the company url-->
CREATE TABLE companies (
id serial primary key,
ticker varchar(255),
name text,
description text,
industry text,
url text,
data_id int
);

<!-- Creates a database with additional company data, including their P/E, PEG, PB, Profit Margin and Market Cap-->
CREATE TABLE company_data (
  ticker varchar(255) primary key,
  price varchar(255),
  pe float,
  pb float,
  peg float,
  profit_margin varchar(255),
  market_cap varchar(255)
);

repository: tuckerc/valueShark

repo_name: tuckerc/valueShark


text:
---
toc: true
title: " SQL Query Output to CSV Format in Oracle SQLPLUS (Any Tables)"
description: "I will show you how to write CSV file like query outout using SQLPLUS"
categories: [Oracle]
tags: [SQLPLUS,CSV]
redirect_from:
  - /2019/02/18/
---

> I will show you how to write CSV file like query outout using SQLPLUS.

### Background

1. Basic PL/SQL Knowledge Requried
2. Basic SQL Knowledge Required
3. In general, users use sql developer IDE to extract query output into CSV Format File.
   But that does not mean it will generate data automatically. User have to conduct export step every time he/she needs it.
   So I tried to make dynamic csv format generator program, and this is the result.

 CNT LOOP
        DBMS_SQL.DEFINE_COLUMN(CUR, I, V_VARCHAR, 32767);
    END LOOP;
    RES := DBMS_SQL.EXECUTE(CUR);
	WHILE DBMS_SQL.FETCH_ROWS(CUR)>0
    LOOP
		FOR I IN 1 .. CNT LOOP
			DBMS_SQL.COLUMN_VALUE(CUR, I, V_VARCHAR);
			IF (I > 1) THEN
				DBMS_OUTPUT.PUT('&!'||V_VARCHAR);
			ELSIF (I = CNT OR I = 1) THEN
				DBMS_OUTPUT.PUT(V_VARCHAR);
			END IF;
		END LOOP;
		DBMS_OUTPUT.PUT('$');
		DBMS_OUTPUT.NEW_LINE;
    END LOOP;
	DBMS_SQL.CLOSE_CURSOR (CUR);
END;
/

```

### Explanation & Obstacles

1. The program should be able to handle columns types based on given user query
2. So far, this is the simplest one that I can make using PL/SQL Block
3. DBMS_SQL uses OPEN_CURSOR for target SQL Query, PARSE for run the Query, and DESCRIBE_COLUMNS for Column Meta Information.
   DEFINE_COLUMN is used to set each column's value into variable,
   COLUMN_VALUE is used to assign the real column data into the pre-defined variable.
4. By using DEFINE_COLUMN and COLUMN_VALUE, we can avoid hard-coded delimeter appending SQL every time we need it.
5. The first and last column print only the value, and the rest will print delemeter along with the value. So it becomes CSV format output.
6. The DELIMETER value is '&' in this example.
7. In this example, the SQL query is hard coded, but this part can be dynamic using shell script(bash). See below
8. However, when you check out the results, you would be disappointed by the mess. There are so many new empty lines.
9. After that, I tried to solve this issue and the following code display the result in a way I expected.
10. The point is I used ">" command after EOF so that the result can be saved as a file. In that way I was able to print the query
    result properly without line breaks.
11. FORMAT WRAPPED preserve whitespace of query result. Ex) ' &!aa&1'
12. This example assume that Each end of line is terminated by $ and each Field data is seperated by &!
13. Beaware that PGA size should be enough to load data before write into a file.

### PL/SQL Block in bash

1. This bash script assumes that user will pass two parameters. [ $1 $2 accordingly.. Ex) test.sh "test" "select * from test"]
2. First parameter is table name. Second parameter is SQL query.
3. Now it will generate csv file using given table name in current folder. "./${table}.csv Ex) ./test.csv"
4. That's it.

```md

#/bin/bash
SOURCE_DB="TEST"
S_USER="TEST"
S_PWD="test"

query=$2

for table in $1
do
OUTPUT=$(sqlplus -S $S_USER/$S_PWD@$SOURCE_DB << EOF > "./${table}.csv"
SET SERVEROUTPUT ON SIZE UNLIMITED
SET FEEDBACK OFF
SET LINESIZE 20000
SET PAGESIZE 0
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS';
ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF';
DECLARE
    CUR NUMBER;
    RES NUMBER;
    CNT INTEGER;
    DESC_TAB    DBMS_SQL.DESC_TAB;
    V_VARCHAR VARCHAR2(32767);
    V_DATE DATE;
    V_TIMESTAMP TIMESTAMP;
    V_NUMBER NUMBER;
    COL_TYPE_NM VARCHAR2(300);
BEGIN
    DBMS_OUTPUT.ENABLE (BUFFER_SIZE => NULL);
    CUR := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(CUR, '${query}', DBMS_SQL.NATIVE);
    DBMS_SQL.DESCRIBE_COLUMNS (CUR, CNT, DESC_TAB);
    FOR I IN 1 .. CNT LOOP
        DBMS_SQL.DEFINE_COLUMN(CUR, I, V_VARCHAR, 32767);
    END LOOP;
    RES := DBMS_SQL.EXECUTE(CUR);
	WHILE DBMS_SQL.FETCH_ROWS(CUR)>0
    LOOP
		FOR I IN 1 .. CNT LOOP
			DBMS_SQL.COLUMN_VALUE(CUR, I, V_VARCHAR);
			IF (I > 1) THEN
				DBMS_OUTPUT.PUT('&!'||V_VARCHAR);
			ELSIF (I = CNT OR I = 1) THEN
				DBMS_OUTPUT.PUT(V_VARCHAR);
			END IF;
		END LOOP;
		DBMS_OUTPUT.PUT('$');
		DBMS_OUTPUT.NEW_LINE;
    END LOOP;
	DBMS_SQL.CLOSE_CURSOR (CUR);
END;
/
EOF
)

echo "SELECT ${table} DATA FINISHED"
done

```

Hope you Like it. Thanks

[^1]: This is a footnote.

[kramdown]: https://kramdown.gettalong.org/
[My Blog]: https://marindie.github.io


text:
---
layout: post
title: "Large amounts of unpublished WGS data"
date: 2017-2-09
author: Dan Gates
editor: Jinliang Yang
categories: [Genomics]
tags: [WGS]
comments: true
archive: false
---

A large WGS dataset from SRA

### 1.Unpublished WGS datasets in the SRA

#### Data summary:
- **Study description**: WGS on different Maize inbreds by JGI, unpublished.
- **Genotypic Data**: WGS
- **Sample Size**: at least 34 available WGS runs on different inbreds