text:
# Sortable Drag & Drop Media · ![version](https://img.shields.io/badge/version-1.0.1-green.svg) [![our umbraco](https://img.shields.io/badge/our-umbraco-orange.svg)](https://our.umbraco.org/projects/backoffice-extensions/sortable-drag-drop-media/)

Sortable Drag & Drop Media is a custom Umbraco media grid list view that permits sorting of media items by dragging and dropping the media items inside the grid view. This provides editors with a quicker way to sort or reorganize their media items.

## Installation & Set Up

Install the selected release through the Umbraco package installer or [download and install locally from Our](https://our.umbraco.org/projects/backoffice-extensions/sortable-drag-drop-media/).

You can get instructions on setting up the Sortable Drag & Drop Media grid view [here](https://github.com/Offroadcode/Sortable-Drag-and-Drop-Media/wiki/Installation-Guide).

## How To Use

Use mostly like you would with the default Umbraco media grid list view, dragging media items onto the draggable media folder or clicking on "or click here to choose files" to add via the directory tool.

When you have more than one media item visible, you can drag media items over another media item to have the two swap their order in the list!

---

## Install Dependencies

If you wish to edit or build this code base, you can follow the following instructions.

*Requires Node.js to be installed and in your system path. Go [here](https://docs.npmjs.com/getting-started/installing-node) for instructions to install node if needed.*

    npm install -g grunt-cli && npm install -g grunt
    npm install

## Build

### Umbraco Package

If you want to build the package file (into the `/pkg/` folder) into a package zip to load with Umbraco's package installer, use:

    grunt umbraco

or

    npm run package

### Distribution

You can build this project into a releasable distribution in the `/src/dist/` folder with either of the following commands:

    grunt

or

    npm run build

These files can be dropped into an Umbraco 7 site, or you can build directly to a site using:

    grunt --target="D:\inetpub\mysite"

You can also watch for changes using:

    grunt watch

or:

    grunt watch --target="D:\inetpub\mysite"


text:
TV challenge developed with Symfony2 using the MySql database and twitter bootstrap for some grey action
==========

1/ Initially you will need to set up your parameters.yml for the database connection in app/config , to your local database.

2/ create database called listings

3/ in composer use the command 'php app/console doctrine:schema:update --force' to create tables

4/ use this sample data to populate your database

INSERT INTO `Channels` (`id`, `channel_number`, `channel_name`, `region`, `package`) VALUES
(1, 1, 'Films', '', '2'),
(2, 2, 'Nature', '', '1'),
(3, 3, 'Extreme Tourism', '', '3'),
(4, 4, 'News', '', '1'),
(5, 5, 'Sport', '', '3');

INSERT INTO `Packages` (`id`, `package_name`) VALUES
(1, 'L'),
(2, 'M'),
(3, 'S');

INSERT INTO `Region` (`id`, `region_name`) VALUES
(1, 'North'),
(2, 'South'),
(3, 'East'),
(4, 'West');

INSERT INTO `RegionChannelName` (`id`, `region_id`, `channel_id`, `channel_name`) VALUES
(1, 1, 1, 'Films'),
(2, 1, 2, 'Nature'),
(3, 1, 3, 'Extreme Tourism'),
(4, 1, 4, 'News In The North'),
(5, 1, 5, 'Sport'),
(6, 2, 1, 'Films'),
(7, 2, 2, 'Nature'),
(8, 2, 3, 'Extreme Tourism'),
(9, 2, 4, 'News In The South'),
(10, 2, 5, 'Sport'),
(11, 3, 1, 'Films'),
(12, 3, 2, 'Nature'),
(13, 3, 3, 'Extreme Tourism'),
(14, 3, 4, 'News In The East'),
(15, 3, 5, 'Sport'),
(16, 4, 1, 'Films'),
(17, 4, 2, 'Nature'),
(18, 4, 3, 'Extreme Tourism'),
(19, 4, 4, 'News In The West'),
(20, 4, 5, 'Sport');

5/ To view the start page go to http://<IP_ADDRESS>/TVGuide/web/app_dev.php/listings locally

Things needed
-----------------------------------------------------------

The region is currently hardcoded but in the future would need to add another menu, to post the region id from a drop down menu.

An API needs to be created from the current data output.

license: MIT

repository: coderidge/tvchallenge

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: coderidge/tvchallenge


text:
If the schedule provided for the update of an existing recurring charge would result
      in no further occurrences of scheduled payments, the Gateway returns a update_results_in_no_occurrences
      error and rejects the request. In this case, the Merchant can cancel the recurring charge instead
      to prevent any further attempts to collect payments.

Level

error

HTTP Status Code

422

Example

{
      ...
      "messages": [
          {
              "code": "update_results_in_no_occurrences",
              "level": "error",
              "facility": "gateway"
          }
      ]
  }

repository: jeff-matthews/jekyll-dev-docs

gha_language: JavaScript

repo_name: jeff-matthews/jekyll-dev-docs


text:
# st7735-lcd-rs

This is a Rust library for displays using the ST7735 driver with embedded_graphics, embedded_hal, and no_std, no_alloc support. Documentation is available [here](https://docs.rs/st7735-lcd).

![ferris-demo](https://i.imgur.com/T1086fn.jpg)

gha_license_id: MIT


text:
# ngx-doc-viewer

This component can be used to show several different document types in an Angular app.

Documents that are publicly available can be shown in an iframe using the google or office document viewer.

Pdf files and word document that are not publicly available can be shown using the mammoth viewer or pdf viewer by passing an objectUrl.

View demo

Changes

### Install the NPM Module

```sh
npm install ngx-doc-viewer --save
```

### Usage

#### 1. Import `NgxDocViewerModule`

```ts
@NgModule({
  imports: [NgxDocViewerModule],
})
export class AppModule {}
```

#### 2. Add DocViewer to component:

```html
<ngx-doc-viewer
  [url]="doc"
  viewer="google"
  style="width:100%;height:50vh;"
></ngx-doc-viewer>
```

To

#### API:

Input:

- url: document url.
- viewer: google (default), office, mammoth, pdf or url
- viewerUrl: only for viewer: 'url'; location of the document renderer. Only use this option for other viewers then google or office.
- queryParams, e.g. to set language. for google: hl=[lang] e.g. hl=nl
- disableContent: 'none' | 'all' | 'popout' | 'popout-hide' = 'none':
  - none: no overlay
  - all: adds an overlay to the whole iframe, which makes nothing in the document clickable/selectable
  - popout: adds an overlay over googles popout button or office popout and menu which disables just this button/menu but keeps giving the possibility to select text. The popout button is still visible (for google during a few seconds) but not clickable.
  - popout-hide: see popup, instead of an transparent overlay a white one. This really hides the button but you'll see a white block while loading for the google viewer.
 - overrideLocalhost: documents from the assets folder are not publicly available and therefor won't show in an external viewer (google, office). If the site is already published to public server, then pass that url and if will replace localhost by the other url. Like: overrideLocalhost="https://angular-doc-viewer.firebaseapp.com/"

There are some issues loading document in the google viewer. See: https://stackoverflow.com/questions/40414039/google-docs-viewer-returning-204-responses-no-longer-working-alternatives. If loading pdf's and Word documents, seems to work now with this hack let me know via a Github issue.

- googleCheckContentLoaded = true | If true it will check by interval if the content is loaded.
- googleCheckInterval = 3000 | The interval in milliseconds that is checked whether the iframe is loaded.
- googleMaxChecks = 5 | max number of retries
Output:

- loaded: google only, notifies when iframe is loaded. Can be used to show progress while loading

### File type support

#### office viewer

.ppt, .pptx, .doc, .docx, .xls and .xlsx

#### google viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 15 different file types, listed below:

- Text files (.TXT)
- Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
- Microsoft Word (.DOC and .DOCX)
- Microsoft Excel (.XLS and .XLSX)
- Microsoft PowerPoint (.PPT and .PPTX)
- Adobe Portable Document Format (.PDF)
- Apple Pages (.PAGES)
- Adobe Illustrator (.AI)
- Adobe Photoshop (.PSD)
- Tagged Image File Format (.TIFF)
- Autodesk AutoCad (.DXF)
- Scalable Vector Graphics (.SVG)
- PostScript (.EPS, .PS)
- TrueType (.TTF)
- XML Paper Specification (.XPS)
- Archive file types (.ZIP and .RAR)

Source

#### url

For another external document viewers that should be loaded in an iframe.

For Google Drive

```html
<ngx-doc-viewer
  [url]="'https://drive.google.com/file/d/0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh/preview'"
  viewer="url"
  style="width:100%;height:50vh;"
>
</ngx-doc-viewer>
```

For the Google Viewer or any other viewer where there is a base url and a parameter for the documentUrl:

```html
<ngx-doc-viewer
  [viewerUrl]="https://docs.google.com/gview?url=%URL%&embedded=true"
  [url]="https://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.doc"
  viewer="url"
  style="width:100%;height:50vh;"
>
</ngx-doc-viewer>
```

### pdf

.pdf

NOTE: PDF's are shown in the embed tag. Browser support is not guaranteed. If you need to be sure the pdf renders on all browsers you better use PDF.js

### mammoth

.docx

To use mammoth, also add:

```sh
npm install mammoth --save
```

and make sure mammoth.browser.min.js is loaded. For the angular/cli you would add the following in angular.json:

```json
    "scripts": [
        "node_modules/mammoth/mammoth.browser.min.js"
    ]
```

## My other packages

- ngx-event-handler: advance event handling like click-outside with serval options: [npm](https://www.npmjs.com/package/ngx-event-handler) | [github](https://github.com/Marcelh1983/angular-event-handler) | [demo](https://stackblitz.com/edit/ngx-event-handler)
- ngx-edit-inline: basic inline edit component: [npm](https://www.npmjs.com/package/ngx-edit-inline) | [github](https://github.com/Marcelh1983/angular-inline-edit) | [demo](https://ngx-edit-inline.firebaseapp.com/)

repository: Angelotas/document-viewer

branch_name: refs/heads/main

repo_name: Angelotas/document-viewer


text:
---
layout: post
title:  "C# Asynchronous Tcp Server"
date:   2012-09-01 20:02:05 +0300
categories: networking
thumbnail: /imgs/thumbnails/asynctcplistener.bmp
---

This is the model of an **Asynchronous TCP server**, that can have multiple clients connected, each one on it's own **thread** - all of this is done using a relatively short and easy-to-remember code.

If you don't have basic knowledge of how a Tcp server works, it is highly recommended to read first: [how to make a simple tcp server](http://www.codingvision.net/networking/c-simple-tcp-server/ "C# simple tcp server").

## The code

As always, the code first and after, the comments:
* functions used for sending/receiving data are not included - you should know these, from the basic server stuff.

{% highlight csharp linenos %}using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;

using System.Threading;

namespace ServerTest
{
    class Program
    {

        static void Main(string[] args)
        {
            Program main = new Program();
            main.server_start();  //starting the server

            Console.ReadLine();
        }

        TcpListener server = new TcpListener(IPAddress.Any, 9999);

        private void server_start()
        {
            server.Start();
            accept_connection();  //accepts incoming connections
        }

        private void accept_connection()
        {
            server.BeginAcceptTcpClient(handle_connection, server);  //this is called asynchronously and will run in a different thread
        }

        private void handle_connection(IAsyncResult result)  //the parameter is a delegate, used to communicate between threads
        {
            accept_connection();  //once again, checking for any other incoming connections
            TcpClient client = server.EndAcceptTcpClient(result);  //creates the TcpClient

            NetworkStream ns = client.GetStream();

            /* here you can add the code to send/receive data */

        }

    }
}{% endhighlight %}

## Comments

This is the server, containing almost anything required to work properly.

Now, to understand how it works, take a look at the methods below:

{% highlight csharp linenos %}        private void server_start()
        {
            ...
            accept_connection();
        }

        private void accept_connection()
        {
            server.BeginAcceptTcpClient(handle_connection, server);
        }

        private void handle_connection(IAsyncResult result)
        {
            accept_connection();
            TcpClient client = server.EndAcceptTcpClient(result);
            ...
        }

{% endhighlight %}

- first, the program calls the function **accept_connection()** - used to accept a client's connection to the server. This function will invoke through **BeginAcceptTcpClient** another function called **handle_connection()** which will run on a **different thread** chosen from the **threadpool** - so you don't have to manually create/release threads.

- when **handle_connection()** is called, it also receives an **IAsyncResult** argument - this argument maintains the connection between the 2 threads. This method will then call again **accept_connection()** - so the program will constantly change the threads.

- if the connection is closed, the thread used is released automatically and can later be used for a new client; however this threadpool is limited.

## In the end...

This is basically everything you _might_ need to know about the **asynchronous tcp servers** - without involving any unnecessary code. If there are any questions, feel free to leave a comment :)

extension: markdown


text:
# `@reflet/cron` 🌠

> [!WARNING]
> This package is outdated. It will be updated again when the cron package reaches v3.

The **best** decorators for [node-cron](https://github.com/kelektiv/node-cron). Have a look at [Reflet's philosophy](../README.MD#Philosophy-).

* [Getting started](#getting-started)
* [Basic Job](#basic-job)
* [Extra properties](#extra-properties)
* [Common options](#common-options)
* [Errors and retries](#errors-and-retries)
* [Overlaps](#overlaps)
* [Options flexibility](#options-flexibility)
* [Current job access](#current-job-access)
* [Dynamic jobs](#dynamic-jobs)
* [Pure dependency injection](#pure-dependency-injection)

## Getting started

1.
    Make sure you have decorators enabled. (click for details)

    * Enable them in your TypeScript compiler options.

        ```json
        "experimentalDecorators": true,
        ```

    * Install `reflect-metadata` shim.

        ```sh
        npm i reflect-metadata
        ```

    * Import the shim in your program before everything else.

        ```ts
        import 'reflect-metadata'
        ```

2. Install the package along with peer dependencies.

    ```sh
    npm i @reflet/cron cron
    npm i -D @types/cron
    ```

3. Create cron jobs.

    ```ts
    // jobs.ts
    import { Cron, Expression } from '@reflet/cron'

    @Cron.TimeZone('Europe/Paris')
    export class Jobs {
      @Cron(Expression.EVERY_SECOND)
      async logMessage() {
        console.log('You will see this message every second');
      }

      @Cron(Expression.EVERY_DAY_AT_MIDNIGHT)
      async sendEmailToAdmin() {
        await emailClient.send({ to<EMAIL_ADDRESS>content: 'This is fine' })
      }
    }
    ```

4. Initialize and start cron jobs.

	```ts
	// main.ts
	import { initCronJobs } from '@reflet/cron'
	import { Jobs } from './jobs.ts'

	const jobs = initCronJobs(Jobs)
	jobs.startAll()
	```

## Basic Job

> 🔦 `@Cron(time)`

> 🔦 `initCronJobs(class)`

> 💫 Related node-cron constructor: [`CronJob`](https://github.com/kelektiv/node-cron#usage-basic-cron-usage)

```ts
import { Cron, initCronJobs } from '@reflet/cron'

class Jobs {
  @Cron('*/1 * * * *')
  logFoo() {
    console.log('foo')
  }
}

const jobs = initCronJobs(Jobs) // returns a Map of your jobs, with the method names as keys.

// You can start jobs individually
jobs.get('logFoo').start()

// Or all at once
jobs.startAll()

// Same with stop
jobs.stopAll()
```

💡 Use `Expression` enum to avoid using cron syntax:

```ts
import { Cron, Expression } from '@reflet/cron'

class Jobs {
  @Cron(Expression.EVERY_MINUTE)
  logFoo() {
    console.log('foo')
  }
}
```

### Init encapsulation

Wrap `initCronJobs` into a static method to encapsulate initialization as well:

```ts
import { initCronJobs, Cron } from '@reflet/cron'

class Jobs {
  static init(...deps: ConstructorParameters<typeof Jobs>) {
    return initCronJobs(new Jobs(...deps))
  }

  @Cron(Expression.EVERY_MINUTE)
  logFoo() {
    console.log('foo')
  }
}

const jobs = Jobs.init()
```

💡 As a convenience, you can inherit from the abstract class `Initializer` which already have the `init` static method:

```ts
import { Initializer } from '@reflet/cron'

// You must pass the child class as type parameter to properly infer its constructor parameters.
class Jobs extends Initializer<typeof Jobs> {
  @Cron(Expression.EVERY_MINUTE)
  logFoo() {
    console.log('foo')
  }
}

const jobs = Jobs.init()
```

## Extra properties

Compared to [node-cron](https://github.com/kelektiv/node-cron), Reflet adds 2 properties to jobs' instances:
* `firing`: readonly `boolean` that helps us determine if the job is **actually** being executed. Because the original node-cron `running` property defines whether the job has been started or stopped. _This property is used by the [PreventOverlap](#overlaps) decorator._
* `name`: `string` in the following format: `class.method`, to help distinguish jobs.

## Common options

> 🔦<EMAIL_ADDRESS><EMAIL_ADDRESS>`@Cron.OnComplete(fn)`, `@Cron.TimeZone(tz)`, `@Cron.UtcOffset(offset)`<EMAIL_ADDRESS>> 💫 Related node-cron parameters: [`start, runOnInit, onComplete, timezone, utcOffset, unrefTimeout`](https://github.com/kelektiv/node-cron#api)

*<EMAIL_ADDRESS>Starts the job after init (does not immediately fire its function). _Can be used with or without invokation._
*<EMAIL_ADDRESS>Fire the job's function on init. _Can be used with or without invokation._
* `@Cron.OnComplete(fn)`: A function that will fire when the job is stopped with `job.stop()`.
* `@Cron.TimeZone(tz)`: Specify the timezone for the execution. _Type is narrowed to an union of all available timezones._
* `@Cron.UtcOffset(offset)`: Specify the offset of the timezone instead of the timezone directly. _Type is narrowed to an union of all available offsets (plus `number`)._

Please refer to the **[node-cron repository](https://github.com/kelektiv/node-cron#api)** for more details.

```ts
import { Cron, Expression } from '@reflet/cron'

class Jobs {
  @Cron.Start
  @Cron.RunOnInit
  @Cron.TimeZone('Europe/Paris')
  @Cron(Expression.EVERY_SECOND)
  doSomething() {}

  @Cron.Start()
  @Cron.RunOnInit()
  @Cron.UtcOffset('+01:00')
  @Cron.OnComplete(() => {})
  @Cron(Expression.EVERY_SECOND)
  doSomethingElse() {}
}
```

## Errors and retries

Errors happening in a cron job are automatically logged to `stderr` instead of crashing the server.

### Catch

> 🔦 `@Cron.Catch(errorHandler)`

This decorator allows you to do something else than logging with your errors.

```ts
import { Cron, Expression } from '@reflet/cron'

class Jobs {
  @Cron.Catch(async (err) => {
    console.error(err)
    await db.insert(err)
  })
  @Cron(Expression.EVERY_SECOND)
  doSomething() {}
}
```

### Retry

> 🔦 `@Cron.Retry(options)`

If your job throw an error, you can retry it with a specify number of `attempts`, and specify backoff behavior.

* `attempts`: Number of retry attempts.
* `delay`: Delay between retry attemps in milliseconds.
* `delayFactor`: Increases each time the previous delay by a multiplicative factor.
* `delayMax`: Caps the maximum delay in milliseconds.
* `condition`: Filter function with the error as parameter (so you can retry on specific errors only).

```ts
import { Cron, Expression } from '@reflet/cron'

class Jobs {
  @Cron.Retry({ attempts: 3, delay: 100, delayFactor: 2, delayMax: 1000 })
  @Cron(Expression.EVERY_HOUR)
  doSomething() {}
}
```

If all the attempts failed, then the error is logged to `stderr` (or handled by `Cron.Catch`).

## Overlaps

> 🔦<EMAIL_ADDRESS>
Prevents the job from firing if the previous occurence is not finished. Useful for potentially long jobs firing every second.
_Can be used with or without invokation._

```ts
import { Cron, Expression } from '@reflet/cron'

class Jobs {
  @Cron.PreventOverlap
  @Cron(Expression.EVERY_SECOND)
  doSomething() {}
}
```

### Distributed overlaps

> 🔦<EMAIL_ADDRESS>
If your application hosting your cron jobs is running amongst multiple instances, you want to make sure a single job is firing once.
With the help of Redis and the **[node-redlock](https://github.com/mike-marcacci/node-redlock)** package, you can achieve cron locks easily.

You obviously need to install a Redis server, a nodejs Redis client, and `node-redlock`.

```ts
import * as redis from 'redis'
import * as Redlock from 'redlock'
import { Cron, Expression } from '@reflet/cron'

const redisClient = redis.createClient()

@Cron.PreventOverlap.RedisLock((job) => {
  const redlock = new Redlock([redisClient], { retryCount: 0 })
  return redlock.lock(`lock:${job.name}`, 1000)
  // use each job's name as a unique resource ("Jobs.doSomething" in this case).
})
class Jobs {
  @Cron(Expression.EVERY_MINUTE)
  doSomething() {}
}
```

Reflet will handle the unlocking, once the job is over.
If<EMAIL_ADDRESS>is also applied, the lock will be reacquired on retries with the original `ttl` and the eventual retry delay.

🗣 By default, redlock `retryCount` is set to `10`, the [documentation](https://github.com/mike-marcacci/node-redlock#how-do-i-check-if-something-is-locked) recommends to set `retryCount` to `0` for most tasks (especially for high frequency jobs).

In that regard, if you want to have a look at failed locks, you can simply `.catch` your lock promise:

```ts
return redlock.lock(`lock:${job.name}`, 1000).catch(console.warn)
```

Go to [node-redlock documentation](https://github.com/mike-marcacci/node-redlock#configuration) for more details.

## Options flexibility

### Single decorator

> 🔦 `@Cron.Options(allOptions)`

If you prefer, you can use<EMAIL_ADDRESS>to group all your options in a single decorator:

```ts
import { Cron } from '@reflet/cron'

class Jobs {
  @Cron.Options({
    start: true,
    runOnInit: true,
    retry: { attempts: 3, delay: 200 },
    catchError: async (err) => {
      await db.insert(err)
    }
  })
  @Cron('* * * * *')
  doSomething() {}
}
```

### Share and override

Attach any option decorator to the class to share it with all jobs. You can override it by reattaching it to the method.

Boolean option decorators<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>can be turned to false with their special sub decorator<EMAIL_ADDRESS>_(can be used with or without invokation)_

```ts
@Cron.Start
@Cron.PreventOverlap
@Cron.Retry({ maxRetries: 3, delay: 200 })
class Jobs {
  @Cron(Expression.EVERY_SECOND)
  doSomething() {}

  @Cron.Start.Dont
  @Cron(Expression.EVERY_SECOND)
  doSomethingElse() {}
}
```

## Current job access

> 🔦 `@CurrentJob`

You might need to access the current job instance from its own `onTick` function, for example to simply stop it.
_Can be used with or without invokation._

```ts
import { Cron, Expression, CurrentJob } from '@reflet/cron'

class Jobs {
  @Cron(Expression.EVERY_SECOND)
  doSomething(@CurrentJob job: Job) {
    job.stop()
  }
}
```

## Dynamic jobs

You can add dynamic cron jobs like so:

```ts
import { Cron, Expression, initCronJobs } from '@reflet/cron'

@Cron.Start
class Jobs {
  @Cron(Expression.EVERY_SECOND)
  doSomething() {}
}

const jobs = initCronJobs(Jobs)

jobs.set('doSomethingElse', {
  cronTime: Expression.EVERY_HOUR,
  onTick() {
    console.log("I'm a dynamic job")
  },
  runOnInit: true,
  preventOverlap: true
})
```

Dynamic jobs inherit shared class options.

## Pure dependency injection

If you want to go full OOP and your job classes has constructor dependencies, Reflet will enforce passing them as instances (along with their dependencies) instead of classes.

```ts
import { Cron, Expression, initCronJobs } from '@reflet/cron'

class Service {
  user = 'Jeremy'
}

class Jobs {
  static init(...deps: ConstructorParameters<typeof Jobs>) {
    return initCronJobs(new Jobs(...deps))
  }

  constructor(private service: Service) {}

  @Cron(Expression.EVERY_10_MINUTES)
  doSomething() {
    console.log(this.service.user)
  }
}

const jobs = Jobs.init(new Service())
```

repository: jeremyben/reflet

gha_language: TypeScript

repo_name: jeremyben/reflet


text:
play-mockws
===========

Play MockWS is a mock WS client for Play Framework.

If:
- you write an application in Scala with the [Play Framework](https://playframework.com/)
- the application makes HTTP calls to external web services with the [WS client](https://www.playframework.com/documentation/2.3.x/ScalaWS)
- you want to test your implementation

then you can use `play-mockws` to simulate HTTP requests to external web services in your tests.

## Example

```scala
// simulation of a GET request to http://dns/url
val ws = MockWS {
  case (GET, "http://dns/url") => Action { Ok("http response") }
}

await(ws.url("http://dns/url").get()).body == "http response"
```

The simulation of the HTTP response for the WS call is simply implemented with a standard Play [Action](https://www.playframework.com/documentation/2.3.x/ScalaActions).

An example how to structure an implementation to test it with MockWS can be found [here](src/test/scala/mockws/Example.scala).

Other examples can be found in the [tests](src/test/scala/mockws/MockWSTest.scala).

## Usage

Add MockWS as test dependency in the `build.sbt`:
```scala
libraryDependencies += "de.leanovate.play-mockws" %% "play-mockws" % "0.10" % "test"
```
The last version can be found on [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22de.leanovate.play-mockws%22)

And use it:
```scala
import mockws.MockWS

val ws = MockWS { ... }
```

## Compatibility Matrix

MockWS is actually only compatible with Play 2.3.x., with Scala 2.10 or 2.11.

## Developer info

Travis: [![Build Status](https://travis-ci.org/leanovate/play-mockws.png?branch=master)](https://travis-ci.org/leanovate/play-mockws)

repository: Ticketfly/play-mockws

repo_name: Ticketfly/play-mockws


text:
---
title: "system"
description: "The system command description and usage"
keywords: "system"
---

# system

```markdown
Usage:  docker system COMMAND

Manage Docker

Options:
      --help   Print usage

Commands:
  df          Show docker disk usage
  events      Get real time events from the server
  info        Display system-wide information
  prune       Remove unused data

Run 'docker system COMMAND --help' for more information on a command.
```

## Description

Manage Docker.

repository: tonistiigi/docker-cli

gha_language: Go

repo_name: tonistiigi/docker-cli


text:
[](https://aicl0ud.github.io/)

## Aesop fable application

**Project description:** An online media player which can serve you a story of Aesop fable for free. This project using Kotlin, exoplayer, material design, and Firebase. For a release apk avaiable on github repository, you can click [here](https://github.com/Aicl0ud/Aesop_Official/files/6714762/Aesop-Official.zip) to download.

## Design and interface

### 1. Icon

### 2. Splash screen

### 3. Main page

### 4. Media player

### 5. Aesop fable library

For more details see [GitHub Aesop Official](https://github.com/Aicl0ud/Aesop_Official).


text:
---
abstract: Recent universal-hashing based approaches to sampling and counting crucially
  depend on the runtime performance of SAT~solvers on formulas expressed as the conjunction
  of both CNF constraints and variable-width XOR constraintsints (known as CNF-XOR
  formulas). In this paper, we present the first study of the runtime behavior of
  SAT~solvers equipped with XOR-reasoning techniques on random CNF-XOR formulas. We
  empirically demonstrate that a state-of-the-art SAT~solver scales exponentially
  on random CNF-XOR formulas across a wide range of XOR-clause densities, peaking
  around the empirical phase-transition location. On the theoretical front, we prove
  that the solution space of a random CNF-XOR formula `shatters' at all nonzero XOR-clause
  densities into well-separated components, similar to the behavior seen in random
  CNF formulas known to be difficult for many SAT-solving algorithms.
authors:
- Jeffrey Dudek
- Kuldeep S. Meel
- Moshe Y. Vardi
date: 2017-08-01 00:00:00
highlight: true
image_preview: ''
math: true
publication: In *Proceedings of International Joint Conference on Artificial Intelligence
  (IJCAI)*
publication_types:
- '1'
selected: true
title: 'The Hard Problems Are Almost Everywhere For Random CNF-XOR Formulas  '
url_pdf: https://www.cs.toronto.edu/~meel/Papers/ijcai17.pdf
url_slides: files/slides/ijcai16_presentation.pdf
---

repository: meelgroup/meelgroup-website

gha_language: TeX

repo_name: meelgroup/meelgroup-website


text:
As a workaround to FOLIO-573, when any schema file refers to an additional schema file,
then the filename of the second referenced schema must be exactly the same as the
"key" name in the RAML "schemas" section, which is being used in the $ref of the parent schema.
For each such schema, please git add and commit a symbolic link to facilitate this.

repository: elrickvm/mod-users

repo_name: elrickvm/mod-users


text:
# WMImplant Command_Exec
## Technique ID
T0000_wmimplant

## Description
A PowerShell based tool that leverages WMI to both perform actions against targeted machines, but also as the C2 channel for issuing commands and receiving results. The **command_exec** command is part of the **Lateral Movement Facilitation Commands** section which allows an adversary to run command lines remotely with compromised credentials.

## Hypothesis
Adversaries might be executing WMImplant in my environment in order to facilitate lateral movement by running commands remotely with compromised credentials.

## Attack Simulation

| Script  | Short Description | Author |
|---------|---------|---------|
| \[TBD\](TBD)| TBD | \[TBD\](TBD) |

## Recommended Data Sources

| ATT&CK Data Source | Event Log |
|---------|---------|
|Process Monitoring|Sysmon|
|Process Monitoring|WinEvent|

## Specific Events
| Source | EventID | EventField | Details | Reference |
|--------|---------|-------|--------|-----------|
| Sysmon | 1 | ParentImage | wmiprvse.exe | [Cyb3rWard0g](https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_26.html) |
| Sysmon | 1 | Image OR ParentImage | powershell.exe (Could be renamed) | [Cyb3rWard0g](https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_26.html) |
| Sysmon | 1 | ParentCommandLine OR CommandLine | 'Get-C\`hildItem', 'Get-C\`ommand', 'DI\`R', 'L\`S', 'Child\`Item', 'Inv\`oke-Ex\`pression', 'IE\`X', 'G\`CI', env:, 'Co\`mmand' | [Cyb3rWard0g](https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_26.html) |
| Sysmon | 12, 13 | TargetObject | Pattern: \\Environment\\[a-zA-Z0-9]{5} | [Cyb3rWard0g](https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_26.html) |
| Sysmon | 13 | Details | 'Win32_OSRecoveryConfiguration', 'DebugFilePath' | [Cyb3rWard0g](https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_26.html) |
| Sysmon | 17, 18 | PipeName | \<Anonymous Pipes\> | [Cyb3rWard0g](https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_26.html) |

## Recommended Configuration(s)
| Title | Description | Reference|
|---------|---------|---------|
| WMImplant | Sysmon Configuration | [T0000\_wmimplant.xml](https://github.com/Cyb3rWard0g/ThreatHunter-Playbook/blob/master/attack_matrix/windows/sysmon_configs/T0000_wmimplant.xml)

## Data Analytics

| Analytic Type  | Analytic Logic | Analytic Data Object |
|--------|---------|---------|
| Situational Awareness |  process WHERE parent\_process\_name == "wmiprvse.exe" AND pipe\_name == "Anonymous Pipes" AND event WHERE event\_id == "17" OR event\_id == "18" AND count =>2 | [process](https://github.com/Cyb3rWard0g/OSSEM/blob/master/detection_data_model/data_objects/process.md)|

## Hunter Notes
* Wmiprvse.exe as a ParentImage and PowerShell as an Image is most likely WMI via powershell (Take in consideration that powershell can be renamed so focus on the context around the process)
* ParentCommandile or CommandLine with the strings provided above is a clear indicator of basic/default WMImplant obfuscation
* Environment registry keys created with a 5 Character random alphanumeric name by wmiprvse.exe
* Values with strings 'Win32_OSRecoveryConfiguration' or 'DebugFilePath' set to the weird keys created by wmiprvse.exe
* 2 \<Anonymous Pipes\> when WMImplant executes commands remotely to a compromised box.
* Remember this is considering the default execution of the tool. Adversaries could change the number of characters in the Environment Variable and avoid using the ObfuscatedEnvVar parameter. If this happens, you could stack the values of the Enviroment variables and if variables are not used, you could baseline the use of WMI executing PowerShell in your organization.

## Hunting Techniques Recommended

- [x] Grouping
- [x] Searching
- [ ] Clustering
- [ ] Stack Counting
- [ ] Scatter Plots
- [ ] Box Plots
- [ ] Isolation Forests

repository: codegrande/ThreatHunter-Playbook

repo_name: codegrande/ThreatHunter-Playbook


text:
[![Build Status](https://travis-ci.org/ssplatt/the_dw.svg?branch=master)](https://travis-ci.org/ssplatt/the_dw)
[![Maintainability](https://api.codeclimate.com/v1/badges/49f3420fb0229eca6039/maintainability)](https://codeclimate.com/github/ssplatt/the_dw/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/49f3420fb0229eca6039/test_coverage)](https://codeclimate.com/github/ssplatt/the_dw/test_coverage)

# The Danny Woodhead
A fantasy football game.

Alpha running at https://blooming-river-84075.herokuapp.com/

## Getting started

To get started with the app, clone the repo and then install the needed gems:

```
$ bundle install --without production
```

Next, migrate the database:

```
$ rails db:migrate
```

Finally, run the test suite to verify that everything is working correctly:

```
$ rails test
```

If the test suite passes, you'll be ready to run the app in a local server:

```
$ rails server
```

## Contributing

To contribute to the project, please follow the [Github Flow](https://guides.github.com/introduction/flow/) style.

  1. Fork the repository to your own space.
  2. Create a branch to work on.
  3. When finished, commit your code and push the branch to your fork on Github.
  4. Open a pull request (PR) against the main project.
  5. The pull request will be reviewed and discussed.
  6. WHen deemed appropriate, the code will be merged and deployed.

gha_language: Ruby


text:
1928\. Minimum Cost to Reach Destination in Time

Hard

There is a country of `n` cities numbered from `0` to `n - 1` where **all the cities are connected** by bi-directional roads. The roads are represented as a 2D integer array `edges` where edges[i] = [xi, yi, timei] denotes a road between cities xi and yi that takes timei minutes to travel. There may be multiple roads of differing travel times connecting the same two cities, but no road connects a city to itself.

Each time you pass through a city, you must pay a passing fee. This is represented as a **0-indexed** integer array `passingFees` of length `n` where `passingFees[j]` is the amount of dollars you must pay when you pass through city `j`.

In the beginning, you are at city `0` and want to reach city `n - 1` in `maxTime` **minutes or less**. The **cost** of your journey is the **summation of passing fees** for each city that you passed through at some moment of your journey (**including** the source and destination cities).

**Example 1:**

![](https://assets.leetcode.com/uploads/2021/06/04/leetgraph1-1.png)

**Input:** maxTime = 30, edges = [[0,1,10],[1,2,10],[2,5,10],[0,3,1],[3,4,10],[4,5,15]], passingFees = [5,1,2,20,20,3]

**Output:** 11

**Explanation:** The path to take is 0 -> 1 -> 2 -> 5, which takes 30 minutes and has $11 worth of passing fees.

**Example 2:**

**![](https://assets.leetcode.com/uploads/2021/06/04/copy-of-leetgraph1-1.png)**

**Input:** maxTime = 29, edges = [[0,1,10],[1,2,10],[2,5,10],[0,3,1],[3,4,10],[4,5,15]], passingFees = [5,1,2,20,20,3]

**Output:** 48

**Explanation:** The path to take is 0 -> 3 -> 4 -> 5, which takes 26 minutes and has $48 worth of passing fees. You cannot take path 0 -> 1 -> 2 -> 5 since it would take too long.

**Example 3:**

**Input:** maxTime = 25, edges = [[0,1,10],[1,2,10],[2,5,10],[0,3,1],[3,4,10],[4,5,15]], passingFees = [5,1,2,20,20,3]

**Output:** -1

**Explanation:** There is no way to reach city 5 from city 0 within 25 minutes.

**Constraints:**

*   `1 <= maxTime <= 1000`
*   `n == passingFees.length`
*   `2 <= n <= 1000`
*   `n - 1 <= edges.length <= 1000`
*   0 <= xi, yi <= n - 1
*   1 <= timei <= 1000
*   `1 <= passingFees[j] <= 1000`
*   The graph may contain multiple edges between two nodes.
*   The graph does not contain self loops.

repository: javadev/LeetCode-in-Java

gha_language: Java

repo_name: javadev/LeetCode-in-Java


text:
# letJovanje
A summer vacation blog.

This site was made for my first PHP course in the summer of 2018.
Here I started learning PHP, MySQL, PDO, CRUD, Bootstrap, sessions, pagination, layout and partial system.
I also learnt how to make an admin panel, functional contact form, poll, registration, login and blog related functionalities.
I had special attention for the UX, and I used a ton of AJAX.
I didn't finish the update feature, as I was occupied with many other subjects at that moment.

[Documentation (Serbian)](https://github.com/jovan-rankovic/letJovanje/blob/master/letjovanje_dokumentacija.pdf)

[Live demo](http://letjovanje.dx.am/)

repository: jovan-rankovic/letJovanje

repo_name: jovan-rankovic/letJovanje


text:
Smogon-Stats-Site
====================

[![Build Status](https://travis-ci.org/asanrom/Smogon-Stats-Sitet.svg)](https://travis-ci.org/asanrom/Smogon-Stats-Site)
[![Dependency Status](https://david-dm.org/asanrom/Smogon-Stats-Site.svg)](https://david-dm.org/asanrom/Smogon-Stats-Site)
[![devDependency Status](https://david-dm.org/asanrom/Smogon-Stats-Site/dev-status.svg)](https://david-dm.org/asanrom/Smogon-Stats-Site?type=dev)

Smogon-Stats-Site, a mobile-responsive website that shows [Pokemon Showdown!](https://pokemonshowdown.com/) usage stats, provided by [Smogon University](https://www.smogon.com/stats/).

**WARNING:** This application is currently on beta. There may be some bugs. If you are using this application and find any bugs, please report then to [Issues](https://github.com/asanrom/Smogon-Stats-Site/issues).

Features
------------

 - **Usage stats**: You can visualize Smogon usage stats, including formats lists, ranking pages and trending pages for Pokemon, moves, items, abilities and leads. You can also visualize metagame stats and Pokemon usage data details.
 - **Automatic crawling**: Automatically crawls and downloads usage stats from Smogon website. It has a control panel you can use to select which months you want to download.
 - **Multi-Process**: You can use multiple workers to to take advantage of multiple processors.
 - **Mobile responsive**: Interface based on Material Design.
 - **API**: It includes an API to get the stats in XML or JSON.

See some screenshots.

Installation (By cloning the repository)
------------

This application requires [node.js](http://nodejs.org/) to run. Install version **8.11.0** or newer (recommended to install the lastest stable version to avoid bugs).

Clone this repository. It requires you have [Git](https://git-scm.com/) installed. Open a terminal or console, type the following and press ENTER:
```
git clone https://github.com/asanrom/Smogon-Stats-Site.git
```

If you have an old version and want to update it, ppen a terminal or console, use `cd` to reach the directory of the application, type the following command and press ENTER:
```
git pull https://github.com/asanrom/Smogon-Stats-Site.git
```

Use `cd` to reach the directory of the application and run the following command to install dependencies:
```
npm install
```

To build the application, run the following command:
```
npm run build
```

Configuration
------------

After installation, run the following command to create the configuration file and set the control panel credentials:
```
npm run quickstart
```

To configure the application, edit the configuration file ``config.json``. The meaning of the parameters are explained in the following table.

Parameter | Description
--- | ---
`debug` | Set to `true` for debug mode. Set to `false` to production mode. Debug mode prints all log messages to the console.
`portHTTP` | Listening port for the HTTP server.
`portHTTPS` | Listening port for the HTTPS server.
`bindAddress` | Bind address for both servers.
`certificate` | Path to the SSL certificate file. Required for HTTPS.
`privateKey` | Path to the SSL private key file. Required for HTTPS.
`redirectSecure` | Set to `true` to force clients to use HTTPS.
`numWorkers` | Number of processes. Set to the number of processors of your machine for max performance.
`logsPath` | Path to store the log files.
`smogonStatsURL` |  URL to Smogon Usage Stats.
`storageMode` | Storage mode. You can store the stats in your local filesystem or use a database. Available modes: `json` (JSON files, local filesystem), `zip` (ZIP compressed files, local filesystem), `mongo` (MongoDB Database).
`storagePath` | Storage path. For `json` and `zip` modes.
`mongoURL` | MongoDB database URL.
`mongoOptions` | MongoDB connection additional options.

In order to select the months you want to download, access the control panel, at ``[yoursite.example]/admin``.

Lanching the application
------------

In order to launch the application, run the following command:
```
npm start
```

You can stop the application using the web control panel, at ``[yoursite.example]/admin``.

Lisense
------------

[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://opensource.org/licenses/MIT)

The MIT License (MIT)

Copyright (c) 2018 Agustin San Roman

For some parts of the code taken from Pokemon Showdown:
Copyright (c) 2018 Guangcong Luo and other Pokemon Showdown contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: asanrom/Smogon-Stats-Site

repo_name: asanrom/Smogon-Stats-Site


text:
# Learn Forge

### To view tutorials, please visit [learnforge.autodesk.io](http://learnforge.autodesk.io).

This repository is for creating the tutorials.

***********

### Adding a new language

**View Models sample** (2-legged)

Create a project in the programming language that supports the UI described on [Viewer](viewer/readme.md) front-end. In summary, the back should implement:

 - GET **/api/forge/oauth/token**: return a valid **viewables:read** access token in the form of `{'access_token':value, 'expires_in':value}`
 - POST **/api/forge/oss/buckets**: create a new bucket, receive input in the form of `{'bucketKey': 'theKey'}` and return 200.
 - GET **/api/forge/oss/buckets**: return all buckets or objects in form of list of nodes:

```json
[
  {
   "id": "bucketKey | objectNameAsURNBase64",
   "text": "bucketKey | objectName",
   "type": "bucket | object",
   "children": "true | false"
  }
]
```
It receives a querystring with `id`: if **#** return all buckets, if a **bucketKey** all objects for the bucket.

 - POST **/api/forge/oss/objects**: receive a file with key `fileToUpload` and `bucketKey` as a `multipart/form-data`. For simplicity, non-resumable.
 - POST **/api/forge/modelderivative/jobs**: translate the file, receive input in the form of `{'bucketKey': 'theKey', 'objectName': 'theName'}`

For reference, when adding a new language, replicate all `net.md` for the new language. The **Viewer** section should be the same for all languages.

**View Hub Models sample** (3-legged)

 - GET **/api/forge/datamanagement** receives `#` to return list of hubs, or `href` of projects/folders/items to return topfolders, folder contents or versions (respectively). The response should be an array with:
 ```json
[
  {
   "id": "href id of the hub/project/folder/item or base64 urn for versions (Viewable)",
   "text": "name",
   "type": "hubs/projects/folders/items/versions",
   "children": "false for versions, true for others"
  }
]
```
 - GET **/api/forge/callback/oauth** as the OAuth callback, receives `code` from Autodesk and redirect to `/`
 - GET **/api/forge/oauth/url** return the sign-in URL (text) so the UI can redirect
 - GET **/api/forge/oauth/signout** to finish current session and redirect to `/`
 - GET **/api/forge/oauth/token** return a valid **viewables:read** access token in the form of `{'access_token':value, 'expires_in':value}`
 - GET **/api/forge/user/profile** returns the user information in the form of `{'name':'user name', 'picture': 'http://profilepictureurl'}`

 For reference, when adding a new language, replicate all `nodejs.md`/`net.md` for the new language. The **Viewer** section should be the same for all languages.

### Creating a project

`FORK` from `/autodesk-forge/learn.forge.viewmodels` (or `viewhubmodels`) and rename: `learn.forge.TUTORIAL.LANGUAGE`, for example: `learn.forge.viewmodels.net` or `learn.forge.viewmodels.nodejs`. According to each language standards, move files to appropriate folders.

When sample is ready, create a **pull request** for the branch of the language (e.g. `net`, `node.js`).

### Variables

Use convention:

- PORT: 3000
- FORGE\_CLIENT\_ID
- FROGE\_CLIENT\_SECRET
- FORGE\_CALLBACK\_URL: default `http://localhost:3000/api/forge/callback/oauth`

> This is importat so developers can reuse this with other samples on **Autodesk-Forge** Github.

### Animated GIFs

Whenwhere applicable, use animaged GIF to demonstrate a complex setup. Good results with [EZGIF](https://ezgif.com/video-to-gif) in 5FPS (smaller).

### Readme

Tutorial project should be ready to use and include a readme with instructions to setup & run.

# Running locally

Install `docsify`:

```bash
npm i docsify-cli -g
```

Clone this project.

Now serve the `/docs` folder:

```bash
docsify serve ./docs
```

Open `http://localhost:3000`

# I18n

In order to add a new localization to the project, follow these steps:

1. Create a new folder under _docs_, and name it based on the corresponding
[language code](http://www.lingoes.net/en/translator/langcode.htm), for example, _zh-CN_
2. Add all the localized content to the new folder; the file naming and folder structure
of the new content should copy the structure of the _docs_ folder itself, for example:

```
docs/
    account/
        README.md
    datamanagement/
    ...
    zh-CN/
        account/
            README.md
        datamanagement/
        ...
```

3. Use the _update-locale-links_ script to prefix all links in the markdown with the corresponding
language code; for example, the following command will go through all files under _docs/zh-CN_,
and replace links like `[Viewer](viewer/2legged/)` (note that Docsify considers this to be an
_absolute_ path!) with `[Viewer](/zh-CN/viewer/2legged/)`:

```bash
# from within the project's root folder
./update-locale-links zh-CN
```

4. Update the `alias` property in _docs/index.html_ to make sure that localized pages
use the corresponding localized sidebar; map `/<lang-code>/.*_sidebar.md`
to `/<lang-code>/_sidebar.md`, for example, like so:

```diff
    // ...
    alias: {
+         '/zh-CN/.*_sidebar.md': '/zh-CN/_sidebar.md',
        '/.*/_sidebar.md': '/_sidebar.md'
    },
    // ...
```

5. Add a link to the new localized content to _docs/_navbar.md_; for example:

```diff
* [EN](/)
+ * [ZH-CN](/zh-CN/)
```

# License

This sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT). Please see the [LICENSE](LICENSE) file for full details.

gha_language: Shell


text:
# The application CRUD using VueJS and Laravel 5.3

The single page application CRUD using VueJS and Laravel 5.3 be created by haidangdevhaui.Using ES6 in javascript.

How to use?

Step 1.Run command "npm install".

Step 2.Run command "composer update".

Step 3.Run command "php artisan serve" or enable Apache.

Step 4.Run command "npm run dev" (for development).

Open browser http://localhost:8000/public

## Official Documentation

Documentation for Laravel can be found on the [Laravel website](http://laravel.com/docs) and Vue can be found on the [VueJS website](http://vuejs.org/guide).

## Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at<EMAIL_ADDRESS>All security vulnerabilities will be promptly addressed.

## License

The Laravel framework and VueJS are open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

repository: haidangdevhaui/laravue

repo_name: haidangdevhaui/laravue


text:
# Chaotic IFS Fractal
This is a Chaotic Fractal generator based upon the work done by Michael Barnsley et alia
and is implemented in Numpy. A chaotic fractal is a fractal for which the points are generated by selecting from
a collection of vector functions with weighted probabilities.

## Dependancies
+ matplotlib.pyplt, numpy, pylab, scipy.stats, tqdm, pprint, random, math, sys, time, pylab (optional)

## Predefined Transformations: ```constants.py```
+ ```bfern```: barnsley fern as researched by michael barnsley
+ ```rose```: a conch shell like spiraling rose - a neat constant set found...
+ ```koch```: Koch curve (approximate)
+ ```natgalaxy```: A galaxy like spiral ascending
+ ```triangle```: A serinpenski triangle
+ ```goldenDragon```: the golden dragon spiral based off of the golden ratio
+ ```btree```: A Symetric Binary tree with no stems scale 0.7 rotation 9 deg
+ ```branch```: golden dragon rotated by the angles of the triangle conecting the golden dragon's attractors
+ ```penta```: a slice of a branched pentagonal fractal which is a fractal itself
+ ```spentagon```:Serenpenski Pentagon
+ ```scarpet```: Serenpenski Carpet
+ ```pythagorean```: Pythagorean tree note a special d constant is associated with it in the constants.py file
+ ``` sfcurve```: A space filling curve
+ ``` durer```: Durer pentagon ...
+ ```antisnow```: Koch Anti-Snowflake
## Features
+ Terminal Interface for configuring a Chaotic Iterated Function System: ```python ChaoticIFSFractal2.0.py```
+ Predefined transformations as listed above that can be selected in the terminal interface
+ Point Quantity customization

## Sample Screenshots:
+ **Note!** Point Quantity based upon calculated point quantity and does not include additional points added withine a threshold of each point so that the data is more dense and displays better ...

+ Here is a screenshot of the Golden Dragon Fractal: (1Mil Points)
![Golden Dragon Fractal](https://raw.githubusercontent.com/Michael-Naguib/Chaotic-IFS-Fractal/master/screenshots/gd1.PNG "Golden Dragon")
![Golden Dragon Fractal 2](https://raw.githubusercontent.com/Michael-Naguib/Chaotic-IFS-Fractal/master/screenshots/gd2.PNG "Golden Dragon 2")
+ Here is a screenshot of the Barnsley Fern (bfern) Fractal: (1Mil Points)
![Barnsley Fern Fractal](https://raw.githubusercontent.com/Michael-Naguib/Chaotic-IFS-Fractal/master/screenshots/bf1.PNG "Barnsley Fern")
+ Here is a screenshot of the Nat Galaxy Fractal: (3Mil Points)
![Nat Galaxy Fractal](https://raw.githubusercontent.com/Michael-Naguib/Chaotic-IFS-Fractal/master/screenshots/ng1.PNG "Nat Galaxy")
![Nat Galaxy Fractal 2 ](https://raw.githubusercontent.com/Michael-Naguib/Chaotic-IFS-Fractal/master/screenshots/ng2.PNG "Nat Galaxy 2")
+ Here is a screenshot of the Rose Fractal: (1.2Mil Points)
![Rose Fractal](https://raw.githubusercontent.com/Michael-Naguib/Chaotic-IFS-Fractal/master/screenshots/r1.PNG "Rose")

## Documentation: ```ChaoticIFSFractal2.0.py```,```ChaoticIFSBuilder.py```,```IteratedFunctionSystem.py```
- A lot of the code used here was based on the chaotic fractal code... this is more just an storage than anything else...
- more modular code for rapid testing was the key...
### class ```IFS```: (essentially a static class: collection of functions useful for iterated function systems)
#### method (static)```run(self,vector_func,max_points=50000,stop_func=lambda __,_: False,initial_point=np.array([1,1]),status=True)```
- generates a sequence of points and returns the x and y values as a tuple containing np arrays for x and y respectivly ex. (np.array([1]),np.array([2]))
- ```vector_func```: takes a np array of two nums and returns a new array
- ```stop_func```: is passed number of points computed and the most recent point and should return true to stop or false to contine
- ```max_points```: is the maximum number of points to compute
- ```initial_point```: is the starting poin defaults to value stated above
- ```status```: logs a progress bar indicating how close it is to finishing...
#### method (static) ```affine(self,x_vect,theta=0,stretch= np.array([[1,1],[1,1]]) ,shift=np.array([0,0]))```
- Preforms an affine transformation on a row vector name x_vect
- ```x_vect```: the input vector as a numpy array ex. x_vect = np.array([0,42])
- ```theta```: the angle to rotate the input vector by... NOTE: the stretch array can influence rotation too
- ```stretch```: a matrix to stretch the x_vect by
- ```shift```: is added to the x_vect to shift it...
#### method (static) ```chaoticAffineGenerator(constants)```:
- function takes a set of constants as described below and builds a new probabilistic function that selects based on the groups of constants
- returns that new function so it can be used throught other programs (curried function...)
- ```constants```: is essentially a list of functions in the form:
```
[
    [
    np.array([[a,b],[c,d]]),    #stretch x and y using this matrix
    np.array([h,k]),            #add this to the vector (shift x and y)
    t,                          #rotate the vector by this angle
    p,                          #probability as a fraction that this function is selected
    ]
    ... etc ...
    another set of constants
]
```
#### ```plot(points_tuple,x_name="x",y_name="y",title="Graph")```:
- takes input values and plots them as a scatter plot...
- ```points_tuple```: where the first item is a np array corresponding to x values and the seccond item the y values
- ```x_name```: the name of the x axis
- ```y_name```: the name of the y axis
- ```title```: the name title of the graph
#### method (static) ```quickAffine(self,x_vect,stretch= np.array([[1,1],[1,1]]) ,shift=np.array([0,0]))```
- Preforms an affine transformation on a row vector name x_vect BUT does not explicitly calculate rotation... faster
- ```x_vect```: the input vector as a numpy array ex. x_vect = np.array([0,42])
- ```stretch```: a matrix to stretch the x_vect by
- ```shift```: is added to the x_vect to shift it...
#### method (static) ```chaoticQuickAffineGenerator(constants)```:
- function takes a set of constants as described below and builds a new probabilistic function that selects based on the groups of constants
- returns that new function so it can be used throught other programs (curried function...)...
- gains a speed boost by not calculating rotation by theta...
- ```constants```: is essentially a list of functions .... see ```chaoticAffineGenerator``` constants argument

repository: Michael-Naguib/Chaotic-IFS-Fractal

repo_name: Michael-Naguib/Chaotic-IFS-Fractal


text:
# HTML connector

This connector makes it possible to publish HTML files to a Fluid Topics tenant from
a local machine or anything that can run Python 3. It automatically creates a Table
of Contents based on the content of the HTML file. The result should
be available in Fluid Topics as soon as the content is processed.

# Example

For an HTML file `lorem.html`:

![HTML to import](doc/static/lorem_html.png "HTML to import")

And with a Fluid Topics tenant up and running at "my.fluidtopics.tenant.url".
It is necessary to have a working local Python environment and to have
installed the HTML connector (see "Installing").

```bash
# Send "lorem.html" to the FT tenant
html2ft lorem.html --url my.fluidtopics.tenant.url --login<EMAIL_ADDRESS>--password mypassword
```

The publishing run is visible in the Knowledge Hub:

![Content processing](doc/static/lorem_content_processing.png "Content processing")

And the document is published to Fluid Topics with an automatically generated Table of Contents:

![lorem in Fluid topics](doc/static/lorem_ft.png "Lorem in Fluid Topics")

# Installing

## Client

It is necessary to have a working local Python 3 environment.

For example, if running MacOs, it is necessary to install pip3 with `brew install pip3`.

```bash
pip3 install antidot-html-connector
```

## FT Server

Add the external source with the ID = `HTMLConnector`. Please
make it known [here](https://jira.antidot.net/browse/FT-4795)
if you want to not have to do that.

# Usage

## Using as a binary

The `html2ft` binary will publish the HTML document to your Fluid Topics
tenant and create its Table of Contents automatically.

```
html2ft path/to/file.html --url my.fluidtopics.tenant.url --login<EMAIL_ADDRESS>```

It is possible to add the `--verbose` or `--password myStr0ngP@ssword` options.

## Using as a library

### Sending directly to FT

To send data directly to Fluid Topics:

```python
from antidot.connector.html import publish_html

publish_html("path/to/file.html", "my.fluidtopics.tenant.url"<EMAIL_ADDRESS>"myStr0ngP@ssword")
```

It is also possible to use a Client object from the `fluidtopics` package:

```python
from fluidtopics.connector import RemoteClient
from antidot.connector.html import publish_html_with_client

client = RemoteClient("my.fluidtopics.tenant.url"<EMAIL_ADDRESS>"myStr0ngP@ssword", "mySourceID")
publish_html_with_client("path/to/file.html", client=client)
```

### Getting intermediary publication objects

To get publications from the HTML file:

```python
from antidot.connector.html import html_to_fluid_api

publication = html_to_fluid_api("path/to/file.html", "Publication title")
```

When using the function that returns publications, it is possible to use a decorator
for the connection:

```python
from datetime import datetime

from fluidtopics.connector import LoginAuthentication, Metadata, Publication, RemoteClient
from antidot.connector.generic.decorators import ClientAuthentication, LoginAndPasswordAuthentication
from antidot.connector.html import html_to_fluid_api

url = "my.fluidtopics.tenant.url"
login =<EMAIL_ADDRESS>password = "myStr0ngP@ssword"
source_id = "MySourceId"

@ClientAuthentication(RemoteClient(url, LoginAuthentication(login, password)), source_id)
def html_to_fluid_api_ftml_plugin(html_path) -> list[Publication]:
    metadatas = [
        Metadata.last_edition(datetime.now().strftime("%Y-%m-%d")),
        Metadata.string("uploader", ["ClientAuthentication"]),
        Metadata.string("use_ftml", ["Yes"]),
    ]
    return html_to_fluid_api(html_path=html_path, metadatas=metadatas, use_ftml=True)

@LoginAndPasswordAuthentication(url, login, password, source_id)
def html_to_fluid_api_plugin(html_path) -> list[Publication]:
    metadatas = [
        Metadata.last_edition(datetime.now().strftime("%Y-%m-%d")),
        Metadata.string("uploader", ["LoginAndPasswordAuthentication"]),
        Metadata.string("use_ftml", ["No"]),
    ]
    return html_to_fluid_api(html_path=html_path, metadatas=metadatas, use_ftml=False)
```

## Optional arguments

### Rendering the cover page

A render_cover_page option is available.

```python
from fluidtopics.connector import RemoteClient

from antidot.connector.html import html_to_fluid_api, publish_html, publish_html_with_client

publish_html(
    "path/to/file.html",
    "my.fluidtopics.tenant.url",
<EMAIL_ADDRESS>    "myStr0ngP@ssword",
    use_ftml=True
)
publish_html_with_client(
    "path/to/file.html",
    RemoteClient("my.fluidtopics.tenant.url"<EMAIL_ADDRESS>"myStr0ngP@ssword", "mySourceID"),
    use_ftml=True,
)
publication = html_to_fluid_api("path/to/file.html", "My title", use_ftml=True)
```

For the binary, it's `--render-cover-page`.

### Adding metadata

It is also possible to add metadata to the publication by providing a
list of metadata with the metadatas parameter:

```python
from datetime import datetime

from fluidtopics.connector import Metadata, RemoteClient

from antidot.connector.html import html_to_fluid_api, publish_html, publish_html_with_client

use_ftml = True
metadatas = [
    Metadata.string("splitting_algorithm", ["ftml" if use_ftml else "default"]),
    Metadata.last_edition(datetime.now().strftime("%Y-%m-%d")),
]
publish_html(
    "path/to/file.html",
    "my.fluidtopics.tenant.url",
<EMAIL_ADDRESS>    "myStr0ngP@ssword",
    use_ftml=use_ftml,
    metadatas=metadatas,
)
publish_html_with_client(
    "path/to/file.html",
    RemoteClient("my.fluidtopics.tenant.url"<EMAIL_ADDRESS>"myStr0ngP@ssword", "mySourceID"),
    metadatas,
    use_ftml,
)
publication = html_to_fluid_api("path/to/file.html", "Publication title", use_ftml=True, metadatas=metadatas)

```

### Optional FTML splitting algorithm

To publish FTML, it is also necessary to install the FTML connector:

```bash
pip3 install antidot-fluidtopics-ftml-connector -i https://pypi.mrs.antidot.net/antidot/stable/
```

Once the connector is installed, the binary with the `--use-ftml` option is available.

To add the `use_ftml` parameter:

```python
from antidot.connector.html import publish_html, publish_html_with_client, html_to_fluid_api
from fluidtopics.connector import RemoteClient

url = "my.fluidtopics.tenant.url"
login =<EMAIL_ADDRESS>password = "myStr0ngP@ssword"
source_id = "MySourceId"
html_path = "path/to/file.html"
title = "My Title"

publish_html(html_path, url, login, password, use_ftml=True)
publish_html_with_client(html_path, RemoteClient(url, login, password, source_id), use_ftml=True)
publication = html_to_fluid_api(html_path, title, use_ftml=True)
```

# Development

[![coverage report](https://scm.mrs.antidot.net/copro/html-connector/badges/master/coverage.svg)](https://scm.mrs.antidot.net/copro/html-connector/commits/master)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

```bash
python3 -m venv venv
source venv/bin/activate
# Use
pip3 install -e .
html2ft -h
# Test
pip3 install -e ".[test]"
python3 -m pytest . --cov=antidot --cov-report html --verbose -vv
xdg-open htmlcov/index.html
```

repository: antidot/html-connector

repo_name: antidot/html-connector


text:
# Validate FAA N-Numbers

A simple library to validate an FAA N-Number.

# Valid N-Numbers

Source (https://www.faa.gov/licenses_certificates/aircraft_certification/aircraft_registry/forming_nnumber/)

How to Properly Form an N-Number

N-Numbers consist of a series of alphanumeric characters. U.S. registration
numbers may not exceed five characters in addition to the standard U.S.
registration prefix letter N. These characters may be:

- One to five numbers (N12345)
- One to four numbers followed by one letter (N1234Z)
- One to three numbers followed by two letters (N123AZ)

To avoid confusion with the numbers one and zero, the letters I and O are not to be used.

Other Requirements

- An N-Number may not begin with zero. You must precede the first zero in an
  N-Number with any number 1 through 9. For example, N01Z is not valid. \*
  Registration numbers N1 through N99 are strictly reserved for FAA internal use.
- The FAA no longer issues numbers beginning with NC, NX, NR, or NL. On some
  older aircraft, these numbers may be displayed in accordance with FAR Part
  45.22.

repository: jcowgar/n-number

repo_name: jcowgar/n-number


text:
# imagetohex
Converts an image into raw hex data for use with [my List Movies project on Scratch](https://scratch.mit.edu/projects/168707761/#player).
## Instructions
1. Find an image editor. The one I use is [Piskel](www.piskelapp.com), but any other pixel art program will do the trick.
2. Make an animation that is 16 pixels wide and 9 pixels high. When you are done, export it as a spritesheet in PNG or JPG. **Note: The spritesheet MUST be 1 column wide. The image wil NOT work unless this condition is met.**
3. Run the executable in this repository. A window will pop up with a text box and two buttons saying "Load..." and "Generate".
4. Load your spritesheet by pressing the "Load..." button and navigating to it.
5. Click "Generate". A bunch of hex data will pop up in the text box. You're done!
## Disclaimer
The icon (Scratch Cat) used in the executable and provided in this repository DOES NOT belong to me. It is property of MIT and the Lifelong Kindergarten Group.

repository: SixBeeps/imagetohex

repo_name: SixBeeps/imagetohex


text:
# employee-management-tool

## About This Tool

This is a command line tool allowing management of business hierarchy using a MySQL database. Users are able to view, add, and update departments, roles, and employees. Output is displayed and formatted in an easy-to-read table.

### Installation & Operation

1. Run `npm i` in your working directory after cloning this repository to install the necessary dependencies.

2. Begin a MySQL server instance and change the settings in `\employee-controls.js` to reflect your database settings and password.

3. If you do not already have an established database, please run `\db\schema.sql` and `\db\seed.sql` in your preferred MySQL interface to initialize and seed the database for demonstration functionality.

4. Run `node employee-controls.js` in your working directory to initialize the tool.

## Technical

### DB Organization

Database is split into three tables with associated foreign keys. See schema below for a visual representation. Queries are made aynchronously and independently to the MySQL Database.

NOTE: No joins are required to implement basic functionality as described in `\instructions\instructions.md`. I probably still should have used some. Whoops.

### DB Schema

![Database Schema](https://github.com/magiama9/fuzzy-cuyahoga/blob/master/Assets/schema.png)

### Node Dependencies

* Inquirer --- Used for prompting the user and accepting input

* MySQL --- Used to connect to a MySQL database via Node

* Console.Table --- Replaces default Node console.table functionality for improved display of table content


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

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

<!-- ## [Unreleased] -->
## [5.0.0] - 2022-04-25
### BREAKING CHANGES
- Dropped Node.js 12 support.

### Added
- Node.js 18 support.

## [4.0.1] - 2021-11-08
### No changes
- Version bump.

## [4.0.0] - 2021-11-08
### BREAKING CHANGES
- Dropped Node.js 10 support.

### Added
- Node.js 14 support.
- Node.js 16 support.

## [3.0.1] - 2020-04-17
### Fixed
- Security vulnerability in devDependencies.

## [3.0.0] - 2019-12-26
### BREAKING CHANGES
- Dropped Node.js 8 support.
- Dropped Node.js 11 support.

## [2.0.0] - 2019-06-07
### BREAKING CHANGES
- Dropped Node.js 6 support.

### Added
- Node.js 12 support.

## [1.0.1] - 2019-03-14
### Fixed
- Incorrect docstring.

## [1.0.0] - 2019-03-14
### Added
- Initial version of the package.
- Setup for this project.

[Unreleased]: https://github.com/Ionaru/format-number/compare/5.0.0...HEAD
[5.0.0]: https://github.com/Ionaru/format-number/compare/4.0.1...5.0.0
[4.0.1]: https://github.com/Ionaru/format-number/compare/4.0.0...4.0.1
[4.0.0]: https://github.com/Ionaru/format-number/compare/3.0.1...4.0.0
[3.0.1]: https://github.com/Ionaru/format-number/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/Ionaru/format-number/compare/2.0.0...3.0.0
[2.0.0]: https://github.com/Ionaru/format-number/compare/1.0.1...2.0.0
[1.0.1]: https://github.com/Ionaru/format-number/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/Ionaru/format-number/compare/8a86e89...1.0.0

repository: Ionaru/format-number

repo_name: Ionaru/format-number


text:
---
layout: bt_wiki
title: Prerequisites
category: Installation
draft: false
weight: 100

---
Cloudify has dependencies that require C-Extension compilation on your machine.
This is only relevant when installing from PyPI or from source. The premade packages and the script (depending on the flags you provide it with) already take care of these.

# Windows

For Windows it's suggested to use [Unofficial Windows Binaries for Python](http://www.lfd.uci.edu/~gohlke/pythonlibs)
and install the following packages:

1. PyCrypto
2. PyYAML (by default, if no compiler is found, PyYAML's installation will fall-through to a non-compiled version.)

# Linux

* Under Ubuntu/Debian, you'll need to install the `python-dev` and `gcc` packages.
* Under CentOS/RHEL, you'll need to install the `python-devel` and `gcc` packages.

# OS X

You will need Apple's developers tools that are installed with Xcode.


text:
## Sashimi plots

RNA-Seq densities along the exons were plotted using the `sashimi_plot` function included in the MISO package (misopy 0.5.4). In the sashimi plot, introns are scaled down by a factor of 15 and exons are scaled down by a factor of 5 (settings/sashimi_plot_settings.txt). RNA-Seq read densities across exons are scaled by the number of mapped reads in the sample and are measured in RPKM units. Slight modifications were made to “plot_gene.py” and “plot_settings.py” within the sashimi_plot directory of the MISO package to highlight the RNA-Seq density plot. The updated sashimi_plot directory is provided.

* MISO (misopy-0.5.4.tar.gz) was installed using the command `pip install misopy`.

* The documentation for `sashimi_plot` is at https://miso.readthedocs.io/en/fastmiso/sashimi.html.

* The GFF annotation file for the exon20-21 region of UNC13A is provided in the gff directory. The indexed GFF files are in `gff/indexed`

* The command for making the plot: `sashimi_plot --plot-event "chr19:17642845:17642960:-@chr19:17642414:17642591:-@chr19:17641393:17641556:-" event_data/indexed/ settings/sashimi_plot_settings.txt --output-dir coverage_plot`


text:
# catloader
Shows pictures from Wikimedia.

## Usage
```
python catloader.py [Some Category]
```
where the optional parameter `[Some Category]` is `Cats` by default and selects the category of pictures to show.

## Requirements
Python 3, Gtk 3.

## Notice
I do not know why I wrote/like this program. It exists here, because it makes me smile :).

There was a similar program as an old demo for (CL)S.

If you are a language designer, this might be a nice benchmark to check for "realism" of your language.

repository: JanBessai/catloader

repo_name: JanBessai/catloader


text:
> [Go to French version](/fr/Règlements/Codification%20des%20règlements%20du%20Canada/901-1000/C.R.C.,%20ch.%20985.md)

# Annuities Payable to Survivors and Children of Judges Regulations

**C.R.C., c. 985**

Enabling authorities:
- [JUDGES ACT](/en/Acts/Revised%20Statutes%20of%20Canada/J/J-1.md)

----------

**1** [Repealed, SOR/2003-276, s. 2]

## Interpretation

**2**

- **(1)** In these Regulations,

***Act*** means the [Judges Act](/en/Acts/Revised%20Statutes%20of%20Canada/J/J-1.md); (*loi*)

***Minister*** means the Minister of Justice of Canada. (*ministre*)

- **(2)** For the purposes of the Act, ***full time attendance at a school or university*** as applied to a child of a judge means full time attendance at a school, college, university or other educational institution that provides training or instruction of an educational, professional, vocational or technical nature and a child of a judge is considered to be or to have been in full time attendance at a school or university substantially without interruption
	- **(a)** during an absence by reason of a scholastic vacation
		- **(i)** if immediately after that vacation the child begins or resumes full time attendance at a school or university in the next ensuing academic year,
		- **(ii)** where the child cannot comply with subparagraph (i) by reason of illness or any other physical, mental or emotional condition, if the child begins or resumes full time attendance at a school or university at any time during the academic year immediately following that vacation, or
		- **(iii)** where the child cannot comply with subparagraph (ii), if the child begins or resumes such full time attendance in the academic year immediately following that mentioned in subparagraph (i); and
	- **(b)** during an absence occurring in an academic year by reason of illness or any other physical, mental or emotional condition, if immediately after that absence the child begins or resumes full time attendance at a school or university in that academic year or in the next ensuing academic year.

- **(3)** Where the absence by reason of illness of a child of a judge commences after the child has begun an academic year and where, by reason of that illness or any other physical, mental or emotional condition, it is not possible for the child to resume full time attendance at a school or university, the child is, despite paragraph (2)(b), considered to have been in full time attendance, substantially without interruption, at a school or university until the end of that academic year.

- **(4)** Where the death of a child of a judge occurred while the child was absent from school or university by reason of illness or any other physical, mental or emotional condition, the child is, despite subsection (2), considered to have been in full time attendance, substantially without interruption, at a school or university
	- **(a)** until the child’s death, where it occurred during the academic year in which the absence commenced; or
	- **(b)** until the end of the academic year in which the child’s absence commenced, where the death occurred after the end of that academic year.

- **(5)** Where a child of a judge ceases to be a child as defined in paragraph 47(1)(b) of the Act, while the child is absent during an academic year by reason of illness or any other physical, mental or emotional condition or during a scholastic vacation, the child is, despite subsection (2), considered to have been in full time attendance at a school or university substantially without interruption until the child ceased to be a child if, immediately after that absence,
	- **(a)** in the case of an absence by reason of illness or any other physical, mental or emotional condition the child begins or resumes such full time attendance at a school or university in that academic year or in the next ensuing academic year; and
	- **(b)** in the case of an absence by reason of scholastic vacation, the child begins or resumes such full time attendance at a school or university in the academic year immediately following that vacation.
> SOR/2003-276, s. 3.

## General

**3**

- **(1)** On the payment of an annuity under the Act to the survivor or child of a judge or a retired judge, application in writing may be made by or on behalf of the survivor or child to the Minister for payment out of the Consolidated Revenue Fund of the whole or any part of the portion of any estate, legacy, succession or inheritance duties or taxes (in this section referred to as “death duties”) payable by the survivor or child that is attributable to the annuity.

- **(2)** The Minister of Finance may, at the request of the Minister, in accordance with an application made under subsection (1), direct that death duties be paid out of the Consolidated Revenue Fund for the survivor or child in respect of the annuity, but the maximum amount that may be so paid out for the survivor or child is the amount equal to the proportion of the death duties payable by the survivor or child in consequence of the death of the judge or retired judge that
	- **(a)** the value of the annuity paid to the survivor or child
is of
	- **(b)** the value of the property in respect of which death duties are payable by the survivor or child in consequence of the death of the judge or retired judge.

- **(3)** The value of the property referred to in paragraph (2)(b) is the value used for the purpose of the final determination of the death duties payable by the survivor or child in respect of that property.

- **(4)** Where the Minister of Finance makes a direction in accordance with subsection (2), the annuity payments to the survivor or child shall be reduced either for a term requested by or on behalf of the survivor or child in the application made under subsection (1) or, if no such request is made, during the entire period for which the annuity is payable, by one-twelfth of the amount calculated by dividing the amount of the death duties to be paid for the survivor or child out of the Consolidated Revenue Fund by the value of an annuity of $1 per annum payable monthly for the term requested in the application made under subsection (1) or, if no such request is made, for a period for which the annuity is payable to a person of the age of the survivor or child at the date of payment of the death duties out of the Consolidated Revenue Fund, calculated
	- **(a)** in the case of an annuity payable to the survivor, in accordance with the table entitled “a(f) Ultimate Table” appearing in the “Mortality of Annuitants 1900-1920” published on behalf of the Institute of Actuaries and the Faculty of Actuaries in Scotland, 1924, together with interest at the rate of 4% per annum; and
	- **(b)** in the case of an annuity payable to a child, at an interest rate of 4% per annum, and the child’s life expectancy shall not be taken into account.
> SOR/2003-276, s. 4; SOR/2019-103, s. 1.

**4** [Repealed, SOR/2003-276, s. 4]

url: https://raw.githubusercontent.com/TravisMadill/CanadianLaws/776186d75e6e345dc5a0f1cd9243028efa9ac34c/en/Regulations/Consolidated Regulations of Canada/901-1000/C.R.C., c. 985.md

repository: TravisMadill/CanadianLaws

repo_name: TravisMadill/CanadianLaws


text:
---
title: Syntax Highlighting for Pymol Scripts
author: Ben Barad
layout: post
group: news
---

![Screenshots of pymol script before and after syntax highlighting](/static/img/news/Combined_screenshots.png "Before &after pymol syntax highliging"){: .img-fluid}

We write lots of pymol scripts here in the Fraser lab, and to this end I have written a language grammar to allow highlighting of the pymol syntax in `.pml` files in [Sublime Text](https://www.sublimetext.com/) (and any other editor that uses textmate style grammars). It should work with just about any basic syntax that you throw at it, though more capability (for things like for loops) will be added as time goes on.

It is publically available for installation through [Package Control](https://sublime.wbond.net/packages/Pymol%20Language), which will automatically update with new releases. You can also get it from [Github](https://github.com/bbarad/pymol_syntax), which will have the most up to date changes between releases (including potential new bugs).

_For the curious, I wrote a longer article discussing the details of making the language grammar, and where it currently stands, on [my personal website](http://benjaminbarad.com/2014/08/26/Pymol-highlighting/)._

gha_language: HTML


text:
---
section: issue
title: UC-One Trio Issues
date: 2021-07-12T14:34:14.262Z
status: resolved
pinned: ""
current_severity: ok
max_severity: down
duration: ""
resolved_on: 2021-07-12T14:34:14.291Z
affected:
  - UltraVoIP - UC-One/Webex
twitterFeed: ""
enableComments: true
---

**UPDATE** 15, 2021 | 20:49 GMT+01:00
We've been monitoring the status of UC-One Trio for over 24 hours now and are happy that the problem is resolved. The maintenance performed to increase the specification of some servers looks to have been the resolution to the problem. This incident has made us aware of some additional metrics which we'd like to monitor to ensure we are as proactive as possible going forward. Apologies for any inconvenience caused.

**UPDATE** 13, 2021 | 11:05 GMT+01:00
The maintenance work which was scheduled yesterday evening to address this issue was completed successfully.
We have not seen any instances of the problem this morning and are continuing to monitor.
We'll mark this incident as resolved once we've monitored the situation for 24 hours.

**ISSUE DETAILS**

We are still seeing intermittent issues affecting UC-One Trio. Users may be disconnected from the application and then be unable to log back in temporarily.

We believe the issue is due to resource constraints on a specific set of servers and are scheduling in emergency maintenance this evening to rectify the issue.

We'll continue to monitor the situation and provide a further update tomorrow morning. Apologies for the inconvenience this may be causing.


text:
# Mangle

### What

Mangle is a simple console-based program, designed to make it extremely easy for me to capture
*what I'm currently doing*, as opposed to *what I need to do.*

Mangle grew out of a significant frustration with ticketing systems and to-do
programs; a lack of the state of Right Now.

Mangle uses Postgres as the backing store; I didn't want to rewrite sorting
and querying technology just to write a tool.

Mangle is currently a single line.

### Usage

Mangle is used entirely from the shell. I generally use zshell, but anything
should work.

First, alias mangle to something easily used:

	$ alias am="python ~/src/mangle/mangle.py"

Now,

	$ am doing "getting mangle onto github"
	$ am doing\?
	1: 2013-03-02 18:31:32.659763+13:00	getting mangle onto github
	$ am \?
	1: 2013-03-02 18:31:32.659763+13:00	getting mangle onto github

capturing a task that I'm currently doing.

Next, I can log against an open "doing", via:

	$ am did "wrote the readme"
	$ am did\?
	section: doing
	2013-03-02 18:38:37.653799+13:00:	wrote the readme

The grammar isn't great, obviously.

Having multiple things in the doing queue also works:

	$ am doing "argue on twitter"
	$ am \?
	1: 2013-03-02 18:47:02.112402+13:00	argue on twitter
	2: 2013-03-02 18:31:32.659763+13:00	Writing mangle readme

Oh look, the ordering changed!

### Automatic Moving

So, Mangle intends to push things around automatically. Whatever you've last added, or last edited, is what gets used as
the #1 slot in "doing".

This is because it is the mostly recently done thing, and new things should be the top of the list.

To address not the first, you do:

$ am did "talked about automatic moving" for 2

And it'll work as Expected.

## why

### isn't it in PyPI?

Haven't gotten there yet.

### does it use Postgres?

Because I wanted it to be simple to query and work with the data later.

### use the shell?

Because I always have shells open; because it's the simplest way to just type some text, hit <Enter>, and save it out.
The fewer pieces that get into my way, the more likely I am do actually use it.

## Bugs

Report 'em! There's probably heaps!

 It's opinionated by design. It's going to be more so.

repository: aurynn/mangle

repo_name: aurynn/mangle


text:
## 记录哈佛公开课 《Justice》 ##

---
### chapter 5 Hired Guns ###

---
### chapter 6 Mind Your Motive ###

**Why we have a categorical duty to resprct the dignity of persons and not to use prople as means merely even for good ends.**

It's our rational capacity that makes us distinctive,that make us special,that sets us apart form and above mere animal existance. It mkes us something more than just pyhsical creatures with appetites.

We ofen think of freedom as simply consisting in doing what we want or in the absence  of obstacles to getting what we want.

When we like animals,seek after pleasure or the satisfaction of our desires or the avoidance of  pain,when we do that we aren't really acting freely.

We're really acting as the slaves of those appetites and impulses.I didn't choose this particular hunger or that particular appetite,and so when I act to satisfy it,I'm just acting according to natural necessity.

**freedom is the opposite of necessity.**

You're obeying a prompting that you yourself haven't chosen or created.

**To act freely is to act autonmously,and to act autonomously is to act according to a law that I give myself not according to the physical laws of nature or the laws of cause and effect **

**To act freely is not to choose the best means to a given end; it's to choose the end itself for its own sake.**

Resprecting human dignity means regarding persons not just means but also as ends in themselves.And this is why it's wrong to use people for the sake of other peoples' well-being or happiness.


text:
# Unit Tests

Unit tests of the implementation.

The tests use [xUnit.net](https://xunit.github.io/).
To run them from the command-line use:

```
dotnet test
```

gha_language: C#


text:
---
title: "People"
date: 2020-03-15T14:22:51+01:00
description: "Learn about great people who influenced the making
of Roadmapper"
weight: 20
---

There are a few people we find absolutely influential for the creation of [Roadmapper](https://github.com/peteraba/roadmapper):

 - [Bryan Lunduke](https://lunduke.com/pages/about/) for teaching the world about data privacy and open source software. His recurring take on why [Linux sucks](https://www.youtube.com/playlist?list=PLgkr4-AWobWGhF7VnxjHmKkIgGnrOV0BL) is also great fun.

license: ISC

repository: peteraba/roadmapper-doc

repo_name: peteraba/roadmapper-doc


text:
# CanRunAds

Description: CanRunAds is a simple repository/script to display a quick and easy method of preventing ad blockers. The simple script allows the webmaster to perform different functions and actions on their website depending on if the user has an adblocker or not.

## Project Setup

_How do I, as a developer, implement this script on my website?_

1. Load the script as you would loading an external javascript file.
2. Use javascript (if CanRunAds()) to perform actions based on adblocker status

## Example

You can view the your_file.html for an example of implementation.

## License

_The license for this project is [MIT](LICENSE.md)_.

## Project Page

You can view the Project Page from this repository, [here](http://matthewgross.github.io/CanRunAds).

## Example

Please see [your_file.html](your_file.html) for an example.

repository: mpge/CanRunAds

repo_name: mpge/CanRunAds


text:
# FSi Admin Bundle

FSi Admin Bundle is a complete solution that provides mechanisms to generate an admin panel for any Symfony2 (and 3) based application.

> **Important** - the bundle is not integrated with Symfony's security component. By default the path /admin is not protected
> and you need to secure it on your own. It's recommended to use [FSiAdminSecurityBundle](https://github.com/fsi-open/admin-security-bundle)

Build Status:
[![Build Status](https://travis-ci.org/fsi-open/admin-bundle.svg?branch=master)](https://travis-ci.org/fsi-open/admin-bundle) - Master
[![Build Status](https://travis-ci.org/fsi-open/admin-bundle.svg?branch=3.1)](https://travis-ci.org/fsi-open/admin-bundle) - 3.1
[![Build Status](https://travis-ci.org/fsi-open/admin-bundle.svg?branch=3.0)](https://travis-ci.org/fsi-open/admin-bundle) - 3.0
[![Build Status](https://travis-ci.org/fsi-open/admin-bundle.svg?branch=2.1)](https://travis-ci.org/fsi-open/admin-bundle) - 2.1
[![Build Status](https://travis-ci.org/fsi-open/admin-bundle.svg?branch=2.0)](https://travis-ci.org/fsi-open/admin-bundle) - 2.0
[![Build Status](https://travis-ci.org/fsi-open/admin-bundle.svg?branch=1.0)](https://travis-ci.org/fsi-open/admin-bundle) - 1.0

[![Latest Stable Version](https://poser.pugx.org/fsi/admin-bundle/v/stable.png)](https://packagist.org/packages/fsi/admin-bundle)

Code quality:
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/82a9e680-cff7-460b-973c-67a2fc7adac0/mini.png)](https://insight.sensiolabs.com/projects/82a9e680-cff7-460b-973c-67a2fc7adac0)

Documentation:

- [For master](Resources/doc/index.md)
- [For version 3.1](https://github.com/fsi-open/admin-bundle/blob/3.1/README.md)
- [For version 2.0](https://github.com/fsi-open/admin-bundle/blob/2.0/README.md)
- [For version 1.0](https://github.com/fsi-open/admin-bundle/blob/1.0/README.md)

# Features

- Column types: text, number, money, date, datetime, boolean, action
- Extension system that allows you to create your own custom column types
- Sorting, ordering, filtering, pagination, batch actions, custom actions
- Doctrine ORM\ODM support, with possibility to create data sets from query builder
- Manually positioning entities on lists (based on https://github.com/gedmo/doctrine-extensions)
- Manipulating tree structures like lists (based on https://github.com/gedmo/doctrine-extensions)
- Inline editing at list level
- Fully integrated with Symfony's Form component
- Fully integrated with FSi's ResourceRepositoryBundle
- Fully translatable
- Every single part can be easily overwritten
- Customizable through a powerful event system
- [Bootstrap 3](http://getbootstrap.com/) design (easy to change and adapt to your needs)
- ... and many, many more ;)

# Architecture

FSi AdminBundle, unlike other open source tools for generating admin panels, is built on top of
components designed to do only one thing at once. That's why our AdminBundle is flexible and fully extendable.

Below is a full list of components, tools and bundles used during the creation of FSiAdminBundle:

- [Symfony form component](https://github.com/symfony/form)
- [FSi Open datagrid](https://github.com/fsi-open/datagrid-bundle)
- [FSi Open datasource](https://github.com/fsi-open/datasource-bundle)
- [FSi Open resource repository](https://github.com/fsi-open/resource-repository-bundle)
- [FSi Open dataindexer](https://github.com/fsi-open/data-indexer)
- [KnpLabs menu](https://github.com/KnpLabs/KnpMenuBundle)
- [PHPSpec](https://github.com/phpspec)
- [Behat](https://github.com/behat)
- [Behat - Page Object Extension](https://github.com/sensiolabs/BehatPageObjectExtension)

# Tests

Because a few tests require Javascript in order to pass, it's recommended to use the Vagrant virtual machine.
All you need to do is go to the `vagrant` folder in the project and start the pre-configured VM there:

```
$ cd vagrant
$ vagrant up
```

Then log into the VM and run Behat/PHPSpec suites from the project's root directory:

```
$ cd /var/www/admin-bundle/
$ bin/behat
$ bin/phpspec
```

repository: fsi-open/admin-bundle

gha_language: PHP

repo_name: fsi-open/admin-bundle


text:
# Curated Lists

Curated lists for a variety of awesome things.

----

- [Freelancing Resources](lists/freelancing.md): Web services that give developers opportunities to do some freelance work for money.
- [Freelancing fees comparison](lists/freelancing_fees.md): Fee structure for freelancers on various marketplaces.
- [Programming Resources](lists/programming.md): Resources helpful for programmers generally.
- [WebDev Resources](lists/web.md): Resources for web development.
- [Python Resources](lists/python.md): Resources for python programming.
- [PHP Resources](lists/php.md): Resources for php programming.
- [Java Resources](lists/java.md): Resources for java programming.
- [Android Resources](lists/android.md): Resources for android programming.
- [Free Programming Books](lists/books.md): List of free online programming books.

----

repository: me-am-i/CuratedLists

repo_name: me-am-i/CuratedLists


text:
---
layout: post
title:  "Tales of China"
date:   2016-05-12 22:01:43 +0530
categories: Stories
author: "Space Ipsum"
---

A Chinese tale tells of some men sent to harm a young girl who, upon seeing her beauty, become her protectors rather than her violators. That's how I felt seeing the Earth for the first time. I could not help but love and cherish her.

Many say exploration is part of our destiny, but it’s actually our duty to future generations and their quest to ensure the survival of the human species.

As we got further and further away, it [the Earth] diminished in size. Finally it shrank to the size of a marble, the most beautiful you can imagine. That beautiful, warm, living object looked so fragile, so delicate, that if you touched it with a finger it would crumble and fall apart. Seeing this has to change a man.

Astronomy compels the soul to look upward, and leads us from this world to another.

The sky is the limit only for those who aren't afraid to fly!

repository: selfReferentialName/safarnama

repo_name: selfReferentialName/safarnama


text:
---
layout: post
title: How to modularize an iOS app
categories:
- programming
status: publish
type: post
published: true
---
This is the first post of a serie which will try to make you through the process of modularizing an existing iOS app.

We will be using (of course?) Cocoapods. A great introduction is the blog post Using CocoaPods to modularize a Big iOS App by Anthony Roldan at Hubspost's blog.

Here's some questions we will try to address through this serie:

How coupled are the existing classes ? (aka how big is the spaghetti plate ?)

Should we think by screen or by layer ? Both ? Neither ?

How big the toolbox (utility classes commons to many screens) should be ?

How do you begin ? Taking a big dive and go for the most important screen or begin at the suburbs of your app (I guess we can all answer to that one right now... but maybe not)

How do you do that in an app being shipped every 4 to 6 weeks ? Of course you will need heavy testing to prevent any major crash but how can you minimize the burden on the other developers' productivity ?

Won't having a pod for each screen/layer/brick slow down the pace of development ?

The first "real" post will try to answer the first two questions :)


text:
# 019: Catalogue Management With Organization Delegation

Authors: @Macroz, @aatkin, @jaakkocsc

## Background

REMS catalogue management is a shared responsibility of all owners and organization owners.

E.g. in [ADR 009](https://github.com/CSCfi/rems/blob/master/docs/architecture/009-review-and-form-model.md) decision it was outlined that:

> 7. mixed organization catalogue items
>     - catalogue item can be mixed organization, i.e. workflow, form and resource can be from different organizations
>     - the owner and organization owner can create any combination
>     - workflow decides which organization handlers do the processing
>     - to match this, also a resource can refer to a license from another organization
>     - owners and organization owners can see all forms, resources and workflows but organization owner can only edit the ones that are in their organization

This approach is in line with the idea that the handler is a superuser, that can do a lot of things themselves.
The organization owner can do the combinations as they need to, for the catalogue.

However, there is a new user need https://github.com/CSCfi/rems/issues/2967.

## Considerations

- It is clear that an organization owner can edit everything in their own organization.
- It is also clear that there will be only one Catalogue for each REMS instance, so shared management is needed.
- It would be useful to see other organization items, for example to copy or imitate them. If privacy is desired, it is possible to create a new REMS instance for that organization.
- We can have the owner do the catalogue completely, but that would reduce the benefits of the delegated ownership.
- We can have the owner do the shared catalogue items and organizations owners only do catalogue items from within their organization. This however creates a need to copy forms and licenses, where there could be a shared one. If there are many copies, synchonizing changes becomes extra work.
- Consider the name of the attribute `:sharing` or something better. Or `:organization/sharing` etc. Or should it be `:organization/sharing {:sharing/type :public}` which would be the most future-proof. Let's do the latter, which is most future-proof.

## Proposed solution
1. Add to form, workflow, resource and license an attribute `:sharing`, where the value can be `:public` (open for all) or `:private` (only for this organization)
2. Modify create catalogue item component and API to only accept everything from the owner, and mixed organization items where the sharing value is public or it is from your owned organization.
3. Make sure the dropdowns in create catalogue item by default show only the items you can actually use (e.g. public).
4. It should be possible to edit this attribute after an item is created. If an item is public and it is made private, then existing items shall work still and be in the catalogue.

NB: Migration should keep everything as is and the default for new items shall be private, so that sharing is an explicit choice.

## Open questions
- Decide which tasks to do first, and which ones are left for later.

## Decision
Let's implement the proposed solution, but split into tasks, so we can leave some of the tasks for follow-up, and proceed with a minimal set for the current need.

repository: CSCfi/rems

gha_language: Clojure

repo_name: CSCfi/rems