text:
# PyMessager
PyMessager is a project to demostrate the simple bot development on [Facebook Message Platform](https://medium.com/r/?url=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fmessenger-platform) using Python Flask and provide Python API to help you develop your bot on Facebook.

![Our startup](https://raw.githubusercontent.com/enginebai/PyMessager/master/art/dualcores.png)

A full tutorial to on [My<EMAIL_ADDRESS>and you can find more detail information to setup before coding and get starting the project.

## Before Coding
1. Prepare a facebook pages. (to create if you don't have one)
2. Start a developer application at [facebook to developer](https://developers.facebook.com).
3. Create a python project, and install the required packages and modules: [Flask](http://flask.pocoo.org), [Requests](http://docs.python-requests.org/en/master/).
4. Use [Let's Encrypt](https://letsencrypt.org/getting-started/) to apply SSL cerificiation for your domain name.

## Getting Started
There are three main steps:

1.Setup the Webhook.

```python
@app.route(API_ROOT + FB_WEBHOOK, methods=["GET"])
def fb_webhook():
    verification_code = 'I_AM_VERIFICIATION_CODE'
    verify_token = request.args.get('hub.verify_token')
    if verification_code == verify_token:
        return request.args.get('hub.challenge')
```

2.Receive the message.

```python
@app.route(API_ROOT + FB_WEBHOOK, methods=['POST'])
def fb_receive_message():
    message_entries = json.loads(request.data.decode('utf8'))['entry']
    for entry in message_entries:
        messagings = entry['messaging']
        for message in messagings:
            sender = message['sender']['id']
            if message.get('message'):
                text = message['message']['text']
                print("{} says {}".format(sender, text))
    return "Hi"
```

3.Start the server with https.

```python
if __name__ == '__main__':
    context = ('ssl/fullchain.pem', 'ssl/privkey.pem')
    app.run(host='<IP_ADDRESS>', debug=True, ssl_context=context)
```

## Usage
There are serveral types of message: text, image, button template or generic templates. API provides different enumerations and classes to generate the message template.

All you have to do is clone this project and import source code to your project.

> Next time I will make a setup module so that you can install via `pip`.

### Import
```python
from message import SendMessage
```

### Text
![](https://raw.githubusercontent.com/enginebai/PyMessager/master/art/text.png)

```python
SendMessage(recipient_id)
	.build_text_message("嗨，我是昌永，DualCores Studio共同創辦人和Developer")
	.send_message()
```

### Image
![](https://raw.githubusercontent.com/enginebai/PyMessager/master/art/image.png)

```python
SendMessage(recipient_id)
	.build_image_message("http://image-url.jpg")
	.send_message()
```

### Button Template
![](https://raw.githubusercontent.com/enginebai/PyMessager/master/art/button.png)

```python
SendMessage(sender).build_buttons_message("直接訂位或查看官方網站？", [
	ActionButton(ButtonType.POSTBACK,
					'直接訂位',
					payload=Payload.RESERVATION),
	ActionButton(ButtonType.WEB_URL,
					'官方網站',
					url="https://dual-cores.com")])
```
### Generic Template
![](https://raw.githubusercontent.com/enginebai/PyMessager/master/art/generic.png)

```python
message = SendMessage(recipient_id)
project_styletrip = GenericElement('Styletrip時代遊',
                                   '一站式的自動旅遊排程',
                                   HOST + PROJECT_DIR + 'styletrip/introduction.jpeg', [
                                       ActionButton(ButtonType.POSTBACK,
                                                    '詳細介紹',
                                                    payload=Payload.INTRODUCE.name)
                                   ])
project_movie_lol = GenericElement('Movie lol App',
                                   '電影資訊和評價App',
                                   HOST + PROJECT_DIR + 'movielol/introduction.jpeg', [
                                       ActionButton(ButtonType.WEB_URL,
                                                    'GitHub連結',
                                                    url='https://github.com/enginebai/Movie-lol-android')
                                   ])
message.build_generic_message([project_styletrip, project_movie_lol]).send_message()
```

## API
### SendMessage(recipient_id)
The class represents the message entity object which sent to the user. Provide the `recipient_id` which must be an id that was retrieved throught the Facebook message API and choose one message and fill the content.

#### `build_text_message(title_text)`
* `title_text`: The message content.

#### `build_image_message(image_url)`
* `image_url`: The image url show in message.

#### `build_buttons_message(title_text, button_list)`
* `title_text`: The message content.
* `button_list`: The list of `ActionButton`.

#### `build_generic_message(element_list)`
* `element_list`: The list of `GenericElement` objects.

#### `send_message()`
* **Make sure call this API after building a message.**

### ButtonType
The enum provide two value to specify the type of button.

* `WEB_URL`: Provide a link opened by browser.
* `POSTBACK`: Provide a call-to-action id, which is used to identify the data sent back to your server via webhook.

### ActionButton(button_type, title, url=None, payload=None)
The class defines the call-to-action button object used in Button Template.

* `button_type`: The type of button, value is `ButtonType.WEB_URL` or `ButtonType.POSTBACK`.
* `title`: The message content.
* `url`: the url opened in browser, required if `button_type == ButtonType.WEB_URL`.
* `payload`: the postback id, required if `button_type == ButtonType.POSTBACK`.

### GenericElement(title, subtitle, image_url, buttons)
The class defines one of bubble in one message.

* `title_text`: The message main title.
* `subtitle_text`: The message subtitle, leave empty string if no subtitle in your message.
* `button_list`: The list of `ActionButton`

## License

	The MIT License (MIT)

	Copyright © 2016 Engine Bai.

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

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

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


text:
# Wacom Device Kit - STU SDK Samples

The samples included here are primarily for Windows.

The Java samples are also used by Linux and additional build tools and scripts are included in the SDK installation.

## Overview

### HTML

Internet Explorer demo project (IE9 or above is required for canvas support).
Other browsers are not supported - please see the SigCaptX samples instead.
The HTML samples rely on the use of ActiveX which, for security reasons, is not supported on current browsers.
However the legacy Internet Explorer product is usually included in a Windows installation and can be used as a convenient platform to explore the SDK.

**DemoButtons**

    DemoButtons.html    - The sample demonstrates a signature capture application.
                          The demo displays a signature capture window with buttons on the PC and the tablet display:
                            OK     - accepts the signature
                            Clear  - clears the display
                            Cancel - cancels signature capture

                          The sample generates the tablet display image dynamically.
                          Encryption handlers are included.

**demoTandC**

    demoTandC.html    - The sample demonstrates a signature capture application from a colour STU such as the 530 or 540.
                          The demo displays a signature capture window with buttons on the PC and the tablet display:
                            OK     - accepts the signature
                            Clear  - clears the display
                            Cancel - cancels signature capture

                          The sample generates the tablet display from predefined images (PNG files).
                          Encryption handlers are included.

**SendToSTU**

    SendToSTU.html      - The sample demonstrates sending an image file to the STU display
    SendToSTU-Area.html - The sample demonstrates updating an area of the STU-530 display

### Java

Java demo projects

**DemoButtons**

    DemoButtons.java    - The sample demonstrates a signature capture application.
                          The demo displays a signature capture window with buttons on the PC and the tablet display:
                            OK     - accepts the signature
                            Clear  - clears the display
                            Cancel - cancels signature capture

    Run-DemoButtons.bat - The batch file can be used to build and run the demo with JDK 7
                          from a Dos command prompt

**DemoButtonsSerial**

    DemoButtonsSerial.java  - The sample demonstrates a signature capture application using a serial connection to the STU
                              The demo displays a signature capture window with buttons on the PC and the tablet display:
                                OK     - accepts the signature
                                Clear  - clears the display
                                Cancel - cancels signature capture

    Run-DemoButtonsSerial.bat - The batch file can be used to build and run the demo with JDK
                                 from a Dos command prompt

### csharp

MS Visual Studio C# demo projects
NB: before compiling the project check that Interop.wgssSTU.dll matches the installed SDK  version

**DemoButtons**

    DemoButtons.sln     - The sample demonstrates a signature capture application.
                          The demo displays a signature capture window with buttons on the PC and the tablet display:
                            OK     - accepts the signature
                            Clear  - clears the display
                            Cancel - cancels signature capture

**DemoButtons (save option)**

    DemoButtons.sln     - The sample includes code to save the signature

### delphi

Embarcadero demo project: Delphi 7

**DemoButtons**

    DemoButtons.dpr     - The sample demonstrates a signature capture application.
                          The demo displays a signature capture window with buttons on the PC and the tablet display:
                            OK     - accepts the signature
                            Clear  - clears the display
                            Cancel - cancels signature capture

**DemoButtons_serial**

    DemoButtons.dpr     - The sample demonstrates a signature capture application using a serial STU (e.g. 430V)
                          The demo displays a signature capture window with buttons on the PC and the tablet display:
                            OK     - accepts the signature
                            Clear  - clears the display
                            Cancel - cancels signature capture

---

license: MIT

repository: Prince-Kimchi/stu-sdk-samples

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Prince-Kimchi/stu-sdk-samples


text:
To avoid going crazy, I structure stuff into classes based (more or less) on layer. Each layer is quite decoupled from the other layers and can be thought about, debugged and tested separately.

I use inheritance to compose the controllers: for example, `Router` (which handles everything up to L3) inherits from `IPv4Routing` (provides the routing table only), `ArpLazy` (provides the ARP table only), and `L2SwitchLazy` (provides the MAC table only), plus `BaseController`.

All controllers inherit from `base_controller.BaseController` and may override its `init` and `recv_packet` methods.

The controllers often have tests named after them in `../test/`.

I use Twisted: see `../twisted-intro.md` for a quick run through the things you need to know to read the code.

repository: AnotherKamila/sdn-loadbalancer

repo_name: AnotherKamila/sdn-loadbalancer


text:
---
# Documentation: https://sourcethemes.com/academic/docs/managing-content/

title: "Why I Support the UCU Strike"
subtitle: ""
summary: "I don’t want to strike! It hurts my students, it hurts the University I love, and it hurts me financially; but sometimes we are left with no choice."
authors: [Simon Harper]
tags: []
categories: []
date: 2020-02-19T12:34:57Z
lastmod: 2020-02-19T12:34:57Z
featured: false
draft: false
reading_time: true  # Show estimated reading time?
share: true  # Show social sharing links?
profile: true  # Show author profile?
commentable: true  # Allow visitors to comment? Supported by the Page, Post, and Docs content types.
editable: false  # Allow visitors to edit the page? Supported by the Page, Post, and Docs content types.

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ""
  focal_point: "Smart"
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
---

I don't want to strike! It hurts my students, it hurts the University I love, and it hurts me financially[^1]; but sometimes we are left with no choice.

[^1]: My pay is deducted for every day I'm on Strike.

I'm striking for a fair pension and for fair and equal pay (for my younger colleagues). The great thing about working at a University is that you get to affect students lives by helping with their education, and you get the freedom to pursue research that you think is important.  The down side is that you don't get paid very well.

{{% alert note %}}I've third year students who graduate to a job with a salary much higher than mine, and I'm at a first class academic institution!

{{% /alert %}}

Part of my pay deal was a good pension and I've been relying on this to retire at 65 (in about 15 years) but over the last few years this has been eroded. First changes where made which in effect meant I lost £200,000 (yes £200k) from my pension overall, and then further changes mean that of I want to retire with this reduced pension I'll need to work until I'm 70.

This next round of pension changes will mean further reductions in benefits and higher costs in putting money into the scheme. **It can't go on unchallenged.**

{{% alert warning %}}

### How to Help

So if you're a Manchester Student please **[email Nancy & Patrick](mailto:president@manchester.ac.uk,patrick.hackett-REGISTRAR@manchester.ac.uk?BCC=campaigns@ucu.org.uk&Subject=Support%20for%20the%20Pension%20and%204%20fights%20strikes&body=I%20am%20a%20current%20student%20at%20the%20University%20of%20Manchester.%0A%0AI%20am%20writing%20in%20support%20of%20the%20academic%20and%20professional%20staff%20who%20are%20striking%20for%20their%20pensions%2C%20pay%2C%20equality%2C%20casualisation%2C%20and%20workload.%20Things%20have%20gotten%20to%20a%20dire%20state%20for%20employees%20of%20the%20university%20which%20are%20the%20heart%20of%20the%20value%20of%20any%20universities.%0A%0ASincerely%2C%0A)** to voice your concern, and if you are academic or academic related staff or are a PhD student [join the UCU](https://www.ucu.org.uk/) (it's free for students).

{{% /alert %}}

Also see [Bijan's](https://bparsia.wordpress.com/2020/02/19/why-i-support-the-feb-march-2019-ucu-strike/) and [Markel’s](http://www.markelvigo.info/strike) reasons for striking too.

---

**Why I Support the UCU Strike** by Simon Harper is licensed under a Creative Commons Attribution 4.0 International License, and was originally published at: [https://www.sharpic.eu/post/why-i-support-the-strike/](https://www.sharpic.eu/post/why-i-support-the-strike/).

repository: sharpic/academic-kickstart

repo_name: sharpic/academic-kickstart


text:
# AutoResponds

Opinionated response discovery for Laravel.

## About

Rather than specifically return views or objects from each of your controller methods, the `AutoResponds` trait
determines and automatically creates responses based on the route, controller, and desired response format. In most
cases, this means your controller methods become query-only.

Importantly, however, returns from controller methods are handled the same way they would be natively (mostly), so if
granular control is needed, you can have that too.

## Caveats

- you have to return the correct namespace in the `controllerRootNamespace()` function of your controller. We provide
the correct default, but you may have to change it, depending on your configuration. Laravel does not seem to provide
access to this parameter.
- this only works for controller-based routes.

## Installation

- Require the `silvertipsoftware/auto-responds` package in your `composer.json` and update your
dependencies:

```sh
$ composer require silvertipsoftware/auto-responds
```

- Add `use AutoResponds` in your base `Controller`, or anywhere you want it.

- If you're using a non-standard setup, implement `controllerRootNamespace()` in the same controller.

## View-Based Responses and Naming

By default, views are discovered based on the controller action being called, and prefixed by any intermediate
namespaces. For example, for HTML format, based on the default root controller namespace:

Controller Action...              | ...Maps to view
----------------------------------|----------------------------------
UsersController@show              | users.show
AccountsController@index          | accounts.index
Admin\InvitesController@new       | admin.invites.new

If you're using Javascript request/response (eg. UJS, or some other on-the-fly-js library):

Controller Action...              | ...Maps to view
----------------------------------|----------------------------------
UsersController@edit              | users.js.edit
AccountsController@update         | accounts.js.update
Admin\InvitesController@new       | admin.invites.js.new

## Using the Route Name

If you prefer, view names can be based off of the route name (defined using `'as'` in your routes file, for example).
To your base controller, add:

```php
    protected $useActionForViewName = false;
```

Now a route named `users.index` will map to a view called `users.index` (or `users.js.index` for the JS format).

## Overriding Detection

In some cases, you may want to use a specific view for a specific action. In that case, set the `viewNameForResponse`
property in your action. For example:

```php
    public function index($request) {
        if (!\Auth::user()) {
            $this->viewNameForResponse = 'need_to_login';
        }
    }
```

You may also return any standard response from Laravel, from strings, to views, to model instances. The `AutoResponds`
functionality is bypassed in these cases.

The exception is for Javascript formats, where a specific view response is
used. By default, `AutoResponds` looks for a view called `js_redirect`, and passes it the target location for the
redirect as a `redirectToUrl` variable. Typically, this just looks like:

```javascript
window.location.href = '{{ $redirectToUrl }}';
```

but you're free to do whatever you need to.

## Format-Specific Notes

### Javascript

Javascript responses are all automatically wrapped as a Immediately Invoked Function Expression (or Self Executing
Anonymous Function) to encapsulate variables, etc. Your js views do not need to include this.

### JSON

repository: SilvertipSoftware/auto-responds

branch_name: refs/heads/main

gha_license_id: MIT

repo_name: SilvertipSoftware/auto-responds


text:
# ExecuteSqlScriptByBatches
C# command line utility helps to execute large MS SQL script files.

Sometimes we can generate so big SQL you can't open it in Management Studio.
This utility helps you to execute the file line by line or batch by batch.

Parameters:
```
GlobalOption            Description
File* (-F)
FindGo (-Fi)            [Default='True']
BatchSize (-B)          [Default='0']
ConnectionString (-C)
ShowQuery (-S)          [Default='False']
```

By default the programm split a file by `GO` statements and doesn't split by another method.
Use `BatchSize` parameter, if a file doesn't contain `GO` statements.

Example:
```
ExecuteSqlScriptByBatches.exe -F test.sql -S True -C "Data Source=(local);Initial Catalog=test;Integrated Security = SSPI"
```

repository: VictorNS/ExecuteSqlScriptByBatches

repo_name: VictorNS/ExecuteSqlScriptByBatches


text:
# DownloadManager

Lightweight download manager that can be embedded in most .Net projects. It was created with the purpose of being used in Xamarin Apps to handle multiple downloads in an orderly fashion.

To run DownloadManager needs an implementation of IStorage to know where it can get output streams from. This is due to System.IO.File not being available in PCL.

## HttpService
HttpService has a constructor with an optional HttpClient so that it is possible to use ModernHttpClient on Xamarin.iOS and Xamarin.Android

## DownloadManager
The workhorse of the project.

##IDownloadManager
```C#
int NumberOfConcurrentDownloads { get; set; }
```
Sets the max number of downloads to run concurrently. You will most likely need to increase the DefaultConnectionLimit of ServicePointManager since it defaults to 2 to get any effect (`ServicePointManager.DefaultConnectionLimit = 10`)

```C#
int MaxRetryCount { get; set; }
```
The manager will try do to download any failed download multiple times before calling it quits. Defaults to 3
```C#
IDownload DownloadFile(string url, string assetFilename  = null);
```
Qeues a file and returns a `IDownload` object, if `assetfilename` is not entered it will create a file with guid as filename that can be read in the `IDownload` object
```C#
void CancelDownload(string url);
void CancelDownload(IDownload download);
```
Cancels the download, if it is in progress it will be aborted.

```C#
IObservable<int> DownloadProgress { get; }
```
An observable with count of the current queue downloads and the current downloads in progress
```C#
IObservable<IDownload> DownloadUpdated { get; }
```
Will be called when a download changes status

##IDownload
```C#
IObservable<double> Progress { get; }
```
Updates when the download is in progress, value from 0.0 to 1.0.
```C#
string Url { get; }
```
The url for the source of the download
```C#
string FileIdentifier { get; }
```
The filename entered or a random guid
```C#
DownloadStatus Status { get; }
```
The current status of the download
```C#
int ErrorCount { get; }
```
The numbers of failed attempts to download the file

repository: tboogh/DownloadManager

repo_name: tboogh/DownloadManager


text:
# creator
creator is a simple PHP dependency injection that works with typehints and Reflection classes

* [Installation](#installation)
* [Testing](#testing)
* [Basic Usage](#basic-usage)
* [PSR-11 Container Usage](#psr-11-container-usage)
* [Injected Instances](#injected-instances)
* [Invoke Closures / Callables](#invoke-closures--callables)
* [Factories](#factories)
* [Uninstantiable Classes](#uninstantiable-classes)
* [Registering Resources](#registering-resources)
* [Exceptions](#exceptions)

## Installation
via [composer](https://getcomposer.org/)
````bash
$ composer require tholabs/creator
````

## Testing
via [phpunit](https://phpunit.de/)
````bash
$ phpunit
````

## Basic Usage
### With class constant
````php
<?php
    $creator = new \Creator\Creator;
    $myInstance = $creator->create(MyClass::class);
````
### With recursive dependencies
assuming our `MyClass` looks like this:
````php
<?php
    class MyClass {
        function __construct(AnotherClass $anotherClass) {
            $this->anotherClass = $anotherClass;
        }
    }
````
Creator will walk up the dependency tree and resolve any class which has no known instance yet.

## PSR-11 Container usage
Creator supports the [PSR-11](https://www.php-fig.org/psr/psr-11/) `psr/container` standard.
```php
<?php

    $container = new Creator\Container(new Creator\Creator());
    $myInstance = $container->get(MyClass::class);
```

The `$container->has()` will return `true` if:
* a primitive resource with given `$identifier` has been registered using `$creator->registerPrimitiveResource()`
* a class resource with given `$identifier` has been registered using `$creator->registerClassResource()`
* a class resource factory for `$identifier` has been registered using `$creator->registerFactory()`
* `$identifier` is an interface or abstract class that can be fulfilled (because another instance implementing or inheriting has been registered earlier)

It will not return `true` if a given `$identifier` _might be_ instantiable.

## Injected Instances
Creator is able to use an independent resource registry for a single creation process.
````php
<?php
    $anotherClass = new AnotherClass();

    $creator = new Creator\Creator;
    $myClass = $creator->createInjected(MyClass::class)->with($anotherClass)->create();

    if ($myClass->anotherClass === $anotherClass) {
        echo 'We are the same!';
    }
````
Any other dependency of MyClass is being resolved the usual way (i.e. looked up via the ResourceRegistry and, if there is no instance yet, it's being created with the same injected resources.)
Creator collects dependency signatures and thus only re-creates instances that really require an injected dependency.

## Invoke Closures / Callables
Creator is able to resolve parameters of closures and callables (invokables). It supports closures and method-context array callables with the object at index 0 (using the class name at index 0 is currently not supported and will cause Creator to throw an `Unresolvable` exception).

Injecting instances is supported as well.
````php
<?php

    // Default invocation
    $creator->invoke(function(SimpleClass $simpleClass) {
        if ($simpleClass instanceof SimpleClass) {
            echo 'Everything works as expected.';
        }
    }

    // Injected invocation
    $simpleClassRoleModel = new SimpleClass();
    $creator->invokeInjected(function(SimpleClass $simpleClass) use($simpleClassRoleModel) {
        if ($simpleClass === $simpleClassRoleModel) {
            echo 'Injection is great';
        }
    })->with($simpleClassRoleModel)->invoke();
````

## Factories
If you have resources that can not be created without additional logic, but also should only be created once another component depends them, you can register a factory for this factory.
A factory can be a callable, an instance of `Creator\Interfaces\Factory` or a class string of a Factory (see [lazy bound factories](#lazy-bound-factories)) and can be registered for any class resource, i.e. interfaces, abstracts or normal classes.

### Global Factories
````php
<?php

    $simpleClass = new SimpleClass();
    $factory = function() use ($simpleClass) {
        return new ExtendedClass($simpleClass);
    };

    $creator->registerFactory($factory, ExtendedClass::class);

    $extendedClass = $creator->create(ExtendedClass::class);
    if ($extendedClass->getSimpleClass() === $simpleClass) {
        echo 'Factories are awesome!';
    }
````
This comes in especially handy for stuff like database connections where you only want to create a connection if a component really depends on it.

### Injected Factories
Of course, you can also register a factory as injection:
````php
<?php
    $simpleClass = new SimpleClass();
    $factory = function() use ($simpleClass) {
        return new ExtendedClass($simpleClass);
    };

    $extendedClass = $creator->createInjected(ExtendedClass:class)
        ->withFactory($factory, ExtendedClass::class)
        ->create();

    if ($extendedClass->getSimpleClass() === $simpleClass) {
        echo 'Factories are awesome!';
    }
````
Injected factories overrule globally registered factories and even globally registered resources. However, they do not overrule injected resources. (Creation order routine is: Injected Instance -> Injected Factory -> Global Instance -> Global Factory -> Create Instance)

### Self Factories
To avoid the need of a global factory, classes can also implement the `Creator\Interfaces\SelfFactory` interface.
All classes implementing this interface will not be built using their constructor; instead, they have to return a factory closure:

```php
class MyDependency implements Creator\Interfaces\SelfFactory {

    static function createSelf () : callable {
        return function(AnotherDependency $a) : MyDependency {
            return new static($a->getFoo());
        }
    }

    function __construct (Foo $foo) {
        $this->foo = $foo;
    }

}
```

It is worth nothing here that not returning an instance of the class will throw an `InvalidFactoryResult` [exception](#exceptions).

### Lazy Bound Factories
If you have factories that should not be created until they are required, you can register a lazy factory by using it's class name:

````php
<?php

    $creator->registerFactory(SimpleFactory::class, SimpleClass::class);

    // Creates a SimpleClass with SimpleFactory
    $simpleClass = $creator->create(SimpleClass::class);
````

All lazy bound factories are stored to and read from the ResourceRegistry that defined them:
````php
<?php

    class SimpleFactory implements Factory {

        function __construct(SimpleClass $simpleClass) {
            $this->simpleClass = $simpleClass;
        }

        function createInstance() {
            return $this->simpleClass;
        }

    }

    $creator->registerFactory(SimpleFactory::class, SimpleClass::class);

    $simpleClass = new SimpleClass();
    $simpleFactory = new SimpleFactory($simpleClass);

    $creator->registerClassResource($simpleFactory);

    $generatedSimpleClass = $creator->create(SimpleClass::class);
    if ($simpleClass === $generatedSimpleClass) {
        echo 'Congratulations, this example is completely useless and works!';
    }
````

### Factory Result Caching
All factory results are registered to their corresponding `ResourceRegistry`, i.e. a injected factory will store it's result to the injected registry and thereby make it's created resource available during this creation process only.
The only exception is a lazy bound factory with an injected dependency; in that case, the result of the factory is cached in the injection registry.

````php
<?php

    class ArbitraryFactory implements Factory {

        function __construct(SimpleClass $simpleClass) {
            $this->simpleClass = $simpleClass;
        }

        function createInstance() {
            return $this->simpleClass;
        }

    }

    $creator->registerFactory(ArbitraryFactory::class, ArbitraryClassWithSimpleClassDependency::class);

    $injectedArbitraryClass = $creator->createInjected(ArbitraryClassWithSimpleClassDependency::class)
        ->with(new SimpleClass())
        ->create();

    $anyArbitraryClass = $creator->create(ArbitraryClassWithSimpleClassDependency::class);
````
In the example above, the instances of `ArbitraryClassWithSimpleClassDependency` will not be the same. Creator detects that `SimpleClass` is a dependency of the registered factory and therefore create a new instance of `ArbitraryFactory` with the injected `SimpleClass`. This new factory instance is stored to the injected registry and will not affect other creations.

## Uninstantiable Classes
### Singletons
Singletons can be resolved if they implement the `Creator\Interfaces\Singleton` interface.

### Abstracts, Interfaces
If Creator stumbles upon an interface or an abstract class, it will try to look up the resource registry if any resource implements the interface / abstract class. First one is being served.

## Registering Resources
### Classes
If you want creator to use a certain instance of a class, you can register any object to Creator. It will then use this instance for any upcoming creation - a more "persistent" injection.
````php
<?php
    $a = new stdClass;
    $a->foo = 'bar';

    $creator = new Creator\Creator;
    $creator->registerClassResource($a);

    $instance = $creator->create('stdClass'); // you should not use hardcoded strings as class names; always prefer the class constant
    echo $instance->foo; // bar
````
The optional second parameter `$classResourceKey` of the method `registerClassResource` bypasses a get_class determination of the object. This might break code completion and type hinting, so use it wisely.
### Primitive (scalar) Resources
Creator supports registering scalar values by variable name.

````php
<?php

    class A {
        function __construct($foo) {
            echo $foo;
        }
    }

    $creator = new Creator\Creator;
    $creator->createInjected(A::class)
        ->with('bar', 'foo') // first value is the injection, second the resource key
        ->create();
````

In previous versions of Creator, there was a method to register primitive resources in the global registry.
This has been removed as it might cause unexpected behaviour and hinder future development.

However, if you *really* need it (but don't say nobody told you it's a bad idea), you can still achieve this by registering the scalar value to a `ResourceRegistry` and pass this registry while constructing your `Creator\Creator` instance. See the tests for example code.
#### Primitive resource specifics
- If an argument has a default value and Creator can not find a matching scalar value, it will use the default value.
- Registering an object with `Creation::with()` will always result in a class resource registration, i.e. registering `$creation->with($myInstance, 'foo');` will only register `$myInstance` as class foo, but never as primitive resource.

## Exceptions
All exceptions derive from `Creator\Exceptions\CreatorException`. Use this class in your catch block to catch *all* Creator-related exceptions.

Additionally, there are more specific exceptions:
* If Creator is unable to resolve a dependency, it will throw `Creator\Exceptions\Unresolvable`.
* If you are registering a factory which is not a `callable` or an instance of / a class name of a class that implements `Creator\Interfaces\Factory`, it will throw `Creator\Exceptions\InvalidFactory`.
* If a self-factory returns a class which is not an instance of self, it will throw `Creator\Exceptions\InvalidFactoryResult`.

repository: filecage/creator

gha_language: PHP

repo_name: filecage/creator


text:
# Elbtool

Register and deregister instance from an AWS ELB

# Requirements

* Instance must be a member of an IAM role with the proper permissions
* `aws-sdk`

# Usage

Originally this was intended to be used by automatic reboot scripts to deregister instances before shutting them down, but it can also be triggered manually.

Note that if you are **NOT** running on the EC2 instance you want to (de-)register, you will need to specify `--instance-id INSTANCE_ID`.

## To register an instance

```
$ elbtool --register LOAD_BALANCER_NAME
```

## To de-register an instance

```
$ elbtool --deregister LOAD_BALANCER_NAME
```

## Other important options

* `--register-timeout` -- Number of seconds to wait when registering an instance before giving up and returning an error. By default this is set to the health check `interval` times `healthy_threshold` (the number of times an instance must return a successful health check to be considered health) plus 15 seconds (for buffer)
* `--deregister-timeout` -- Number of seconds to wait when de-registering an instance before giving up and returning an error. If connection draining is enabled, this waits for `connection_draining` + 5 seconds. If not, it just waits 5 seconds (for buffer).

repository: evertrue/elbtool

repo_name: evertrue/elbtool


text:
---
title: "Technical Talk"
featuredImage: ./athena-tech-talk.jpg
category: "wie"
date: "2019-03-15"
venue: "S4 ECB"
slug: "wie-tech-talk-19"
tags:
    - wie
    - wie week
    - tech talk
---

A technical talk on the topic "Need for electrification in transportation section" was conducted on March 15th 2019 at 12 PM by IEEE WIE as a part of ATHENA 2.0. The session was handled by Prof. Rajesh of EEE department, GCEK. The talk was really motivational. It was open to all students and almost 30-35 students attended the talk. He mainly focused upon the re-emergence of electric vehicles as a preferred means of road transport. He discussed the current advancements and future research needs in the process of electrifying road, waterborne, air and rail transport.

After his talk, students were given a chance to ask doubts regarding the topic.

Vote of thanks was proposed by Sneha Kadangot of S4 CSE.

The program ended by around 2 PM.

**Event Coordinator**: Anjali Balakrishnan (S4 ECA)

repository: TheFirstMe/ieeesb

gha_language: JavaScript

repo_name: TheFirstMe/ieeesb


text:
# Contributing

## Reporting issues & Request features

To report any issues and/or request new features, create a new GitHub issue.

Please make sure that you create **one issue per topic** you're addressing, following the reporting template provided in the GitHub issues section.

 Create a branch from master with a descriptive, kebab-cased name
  to hold all your changes.

2. Modify the code and push your changes to your branch. Make sure that
  the triggered CI checks all pass.

3. Once the changes are ready to be reviewed, create a GitHub pull
  request.  With the pull request, provide a description of the
  changes and links to any relevant issues (in this repository or
  others).

4. Ensure that the triggered CI checks all pass.  These are triggered
  automatically with the results shown directly in the pull request.

5. Once the checks pass, assign the pull request to the repository
  coordinator (who may then assign it to someone else).

6. Interact with the reviewer to address any comments.

When the reviewer is happy with the pull request, he/she will "squash
& merge" the pull request and delete the corresponding branch.

 Fork this repository and clone it.

2. Checkout the branch you'll be modifying or adding to, and create
you own branch out of that. Make sure this new branch name is descriptibe
and kebab-cased.

3. Commit and push your changes to your fork.

4. Once the changes are ready to be reviewed, submit them upstream by
 creating a GitHub pull request.  With the pull request, provide a description of the
  changes and links to any relevant issues (in this repository or
  others).

5. Ensure that the triggered CI checks all pass.  These are triggered
  automatically with the results shown directly in the pull request.

6. Once the checks pass, assign the pull request to the repository
  coordinator (who may then assign it to someone else).

7. Interact with the reviewer to address any comments.

When the reviewer is happy with the pull request, he/she will "squash
& merge" the pull request.

repository: nuvlabox/management-api

gha_language: Python

repo_name: nuvlabox/management-api


text:
# Document layout

At the heart of Adama is a [focus on data](https://en.wikipedia.org/wiki/Data-centric_programming_language), which makes organizing your data for state management a critical component of building applications with this language.
In Adama, state is organized at the document level as a series of fields, which represent different aspects of the state that your application needs to manage.
By carefully laying out these fields, you can create a robust and efficient system for managing your application's state.
For example, the Adama code below outlines three fields that might be used in an application:

```adama
public string output;
private double balance;
int count;
```

These three fields will establish a persistent document in JSON:
```json
{"output":"","balance":0.0,"count":0}
```

The [*public* and *private*](./privacy-and-bubbles.md) modifiers control what users will see, and the omission of either results in *private* by default.
In this case, users will see:
```json
{"output":""}
````
when they [connect to the document](./static-policies-document-events.md#connected-and-disconnected).
Adama's strong privacy isolation guarantees ensure a clear separation between what users can see and what the system sees, creating a gap that protects sensitive data from unauthorized access.

The language has [many types](./types.md) to leverage along with a [more ways to expressive privacy rules](./privacy-and-bubbles.md).

Furthermore, state can be laid out with [records](./records.md), collected into [tables](./tables-linq.md), and computations exposed via [formulas](./formulas.md).

repository: mathgladiator/adama-lang

gha_language: Java

repo_name: mathgladiator/adama-lang


text:
---
title: "Youtube"
id: "youtube"
---
---

**Youtube** prefab ships with WaveMaker and it connects with Youtube to display a video on the web page.

1. Drag and drop the **Youtube** prefab onto the canvas on any of the pages of your application.
2. Set the **Height**, **Width** and **Youtube URL** properties of the **Youtube** prefab using the **Properties Panel**.
3. Save and **Run** the project. You will see that the video is now embedded on the page in a container with specified height and width.

[![](/learn/assets/prefab.png)](/learn/assets/prefab.png)

[![](/learn/assets/youtube_props.png)](/learn/assets/youtube_props.png)

repository: wavemaker/docs

repo_name: wavemaker/docs


text:
# Scripts for recruiting high schoolers to start Hack Clubs

This repository exists as a holding place for temporary scripts used to idenify high schoolers that might be interested in starting Hack Clubs.

Run the following command to get dropped into a shell:

    $ docker-compose run main

## License

This repository is licensed under the MIT license.

repository: hackclub/high-schooler-recruiting

repo_name: hackclub/high-schooler-recruiting


text:
EZOut [1.8]
===========

Easily Author Rich Format Files to Customize PowerShell Output
-----------

### Commands
---------------------------------
|     Verb|Noun                 |
|--------:|:--------------------|
|      Add|-FormatData          |
|         |-TypeData            |
|    Clear|-FormatData          |
|         |-TypeData            |
|ConvertTo|-PropertySet         |
|     Find|-FormatView          |
|      Get|-FormatFile          |
|         |-PropertySet         |
|   Import|-FormatView          |
|      Out|-FormatData          |
|         |-TypeData            |
|   Remove|-FormatData          |
|         |-TypeData            |
|    Write|-EZFormatFile        |
|         |-FormatControl       |
|         |-FormatCustomView    |
|         |-FormatListView      |
|         |-FormatTableView     |
|         |-FormatTreeView      |
|         |-FormatView          |
|         |-FormatViewExpression|
|         |-FormatWideView      |
|         |-PropertySet         |
|         |-TypeView            |
---------------------------------
### Installing EZOut

You can install EZOut from the PowerShell Gallery.  Simply:
~~~
Install-Module EZOut -AllowClobber -Scope CurrentUser
~~~
### Understanding PowerShell Formatting

Unlike many languages, PowerShell has a formatting engine built into the box.
You can define one or more "Views" that will change how PowerShell will display an object.
These views are stored in a .format.ps1xml file, and loaded in a module manifest with the setting 'FormatsToProcess:'
This is an example of a minimal module with just a format file:

~~~
@{
    ModuleVersion = 0.1
    FormatsToProcess = 'My.Format.ps1xml'
}
~~~

PowerShell formatting primarily supports three different types of views for any typename:
* A Table View
* A List View
* A Custom View

Table and List Views are fairly straightforward:  You select some properties to display, and you get a table.

Custom Views, as the name implies, are anything you'd like them to be.  Custom views can also be defined as a control, which can be referenced in other custom views.

You most likely see complex custom controls everyday:  The most complex formatter built into PowerShell is the formatter for Help.

Objects in PowerShell are formatted according to their .pstypenames property.  If you're creating a normal .NET object, this property will be the inheritance hierarchy of the class.  For instance:

~~~
# This will have three typenames:
# System.Management.Automation.CmdletInfo, System.Management.Automation.CommandInfo, and System.Object
# When you see the output of Get-Command, you're seeing the formatter for System.Management.CommandInfo
Get-Command Get-Command | Select-Object -ExpandProperty PSTypenames
~~~
You can switch out the typenames of any given object by manipulating the typenames property

~~~
$helpCommand = Get-Command Get-Help  # Get the command Get-Help
$helpCommand.pstypenames.clear()     # Clear it's typenames
$helpCommand                         # When we echo it now, it will be unformatted.

$helpCommand.pstypenames.add('System.Management.Automation.CommandInfo') # This adds the formatting back
~~~

You can also define a single typename when creating an object from a hashtable.
As the typename in this example implies, you can have a valid typename in PowerShell that could never exist as a real type in .NET.

~~~
[PSCustomObject]@{PSTypeName='http://My/TypeName/IsNot/A/Valid/.NET#Typename';N=1}
~~~

### Using EZOut

#### Using EZOut to build your formatting:

Switch to your module directory, then run:

~~~
Write-EZFormatFile | Set-Content .\MyModule.EzFormat.ps1 -Encoding UTF8 # Replace MyModule with the name of your module
~~~

This file will contain the scaffolding to write your formatters.  Whenever you run this file, MyModule.format.ps1xml and MyModule.types.ps1xml will be regenerated.

For a working example of this, check out EZOut's own [.ezformat.ps1](/EZOut.ezformat.ps1) file.

We can declare formatters directly in the .ezformat.ps1 file, or within a /Formatting or /Views directory, in a file named .(format|view).(ps1|xml)

In the examples below, we will be piping to Out-FormatData (to combine all of the formatting) and Add-FormatData (to register it in a temporary module).

##### Writing Table Views

Table views are the most commonly used view in PowerShell, and the default of Write-FormatView

~~~
Write-FormatView -TypeName APerson -Property FirstName, LastName, Age |
    Out-FormatData |
    Add-FormatData

[PSCustomObject]@{PSTypeName='APerson';FirstName='James';LastName='Brundage';Age=38}
~~~

We can specify a -Width for each column.  Using a negative number will make the column right-aligned:

~~~
Write-FormatView -TypeName APerson -Property FirstName, LastName, Age -Width -20, 30, 5 |
    Out-FormatData |
    Add-FormatData

[PSCustomObject]@{PSTypeName='APerson';FirstName='James';LastName='Brundage';Age=38}
~~~

We can also specify alignment using -AlignProperty, or use -FormatProperty to determine how a property is displayed, and even -HideHeader.

~~~
Write-FormatView -TypeName MenuItem -Property Name, Price -AlignProperty @{Name='Center';Price='Center'} -FormatProperty @{
    Price = '{0:c}'
} -Width 40, 40 -HideHeader |
    Out-FormatData |
    Add-FormatData

[PSCustomObject]@{PSTypeName='MenuItem';Name='Coffee';Price=2.99}
~~~

We can define a -VirtualProperty, which will display as a column but does not really exist.
Also, in most hosts, we can conditionally -ColorProperty or -ColorRow:
~~~
Write-FormatView -Property Number, IsEven, IsOdd -AutoSize -ColorRow {
    if ($_.N % 2) { "#ff0000"} else {"#0f0"}
} -VirtualProperty @{
    IsEven = { -not ($_.N % 2)}
    IsOdd = { ($_.N % 2) -as [bool] }
} -AliasProperty @{
    Number = 'N'
} -TypeName N |
    Out-FormatData|
    Add-FormatData

1..5 | Foreach-Object { [PSCustomObject]@{PSTypeName='N';N=$_} }
~~~
#### Using EZOut Interactively

As shown in the examples above, we can use EZOut to add formatting interactively, by piping to Add-FormatData.

~~~
Import-Module EZOut

Write-FormatView -TypeName 'System.Management.ManagementObject#root\cimv2\Win32_VideoController' -Property Name, Memory, Mode -Width 30,15,40 -VirtualProperty @{
        "Memory" = {
            "$($_.AdapterRAM / 1mb) mb"
        }
    } -RenamedProperty @{
        "Mode" = "VideoModeDescription"
    } |
        Out-FormatData |
        Add-FormatData

Get-WmiObject Win32_VideoController # Note, this example will only work on Windows, and not in PowerShell core
~~~

#### Using out-of-the-box formatting

EZOut ships with a few useful formatters that help improve your PowerShell experience, show you what you can do, and learn EZOut.

##### File Tree Formatter

Ever wanted to see a nice file tree in PowerShell?  With EZOut, it's a snap.  Just pipe a given directory or files into Format-Custom

~~~
Get-Module EZOut | Split-Path | Get-ChildItem  | Format-Custom
~~~
![File Tree Formatter](Assets/FileTreeFormatter.gif)
##### Colorized XML Formatter

Wish you could see more of any XML node you're working with?  EZOut ships with a colorized XML formatter! (colors are supported in PowerShell.exe and pwsh.exe, but not in the PowerShell ISE)
~~~
Get-Module EZOut |
    Select-Object -ExpandProperty ExportedFormatFiles  |
    Get-Item |
    Select-Xml //TypeName |
    Select-Object -ExpandProperty Node
~~~
![SelectXml Output](Assets/ColorizedXml2.gif)

This formatting works with all XML objects and elements, and makes compact XML easier to read.
~~~
[xml]"<xmlNode><childNode attribute='value'><grandChildNode>InnerText</grandChildNode></childNode></xmlNode>"
~~~
![ColorizedXml](Assets/ColorizedXml1.gif)
##### Rich Module Formatting

Want to see a bit more about a module?
EZOut ships with a rich PSModuleInfo formatter, which will display the module name, version, about topic, and a Markdown table of module commands:
~~~
Get-Module EZOut | Format-Custom
~~~

repository: itfranck-forks/EZOut

repo_name: itfranck-forks/EZOut


text:
# Activity Type Middleware

This middleware package is a Node.JS port of the [C# Activity Type middleware component](https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/develop/libraries/Bot.Builder.Community.Middleware.HandleActivityType) from the Bot Builder Community. It intercepts messages based on the activity type so that you can automatically handle certain types outside of the standard dialog flow.

## Installing

    npm install @botbuildercommunity/middleware-activity-type --save

## Usage

```typescript
import { HandleActivityType } from '@botbuildercommunity/middleware-activity-type';

adapter.use(new HandleActivityType(ActivityTypes.Message, async (context, next) => {
    await context.sendActivity('Hello, middleware!');
}));
```

gha_language: TypeScript


text:
---
title: Shopping Cart Item for RadListView
description: Custom implementation demonstrating how one can create a shopping cart item for RadListView.
type: how-to
page_title: Shopping Cart Item for RadListView
slug: listview-shopping-cart-item
position: 0
tags: listview, custom, item
ticketid: 0
res_type: kb
---

## Environment

        Product Version
        2018.1 220

        Product
        RadListView for WinForms

## Description

This article demonstrates how one can create a shopping cart item where the user can see the product detail and adjust the amount.

>caption Figure 1: Shopping Cart Item for RadListView
![shopping-cart-item001](images/shopping-cart-item001.png)

## Solution

You should inherit the __SimpleListViewVisualItem__ class and add the necessary elements. In this case you will add two buttons for adjusting the amount and three LightVisualElements for displaying the product details. You will need a single label to display the current amount as well. You will add the elements to StackLayoutElements which will allow you to create the layout.

The example is bound to a custom created business object which allows you to easily get the data and calculate the total amount.

A complete C# and VB code is available in our sdk-repository: [ShoppingCartItem](https://github.com/telerik/winforms-sdk/tree/master/ListView/ShoppingCartItem)

# See Also

* [ListView Custom Item]({%slug winforms/listview/custom-items%})
* [LightVisualElement]({%slug winforms/telerik-presentation-framework/primitives/lightvisualelement%})
* [StackLayoutElement]({%slug winforms/telerik-presentation-framework/layout/predefined-layout-panels/stacklayoutpanel%})

repository: telerik/winforms-docs

repo_name: telerik/winforms-docs


text:
# Analytics

AWS Amplify Analytics module helps developer collect analytic metrics.

* [Installation](#installation)
* [Configuration](#configuration)
* [Integration](#integration)
  - [1. Collect Session Data](#1-collect-session-data)
  - [2. Record Event](#2-record-event)
  - [3. Record Event with Attributes](#3-record-event-with-attributes)
  - [4. Record Event with Metrics](#4-record-event-with-metrics)

## Installation

For Web development, regardless of framework, `aws-amplify` provides core Auth APIs
```
npm install aws-amplify
```

On React app, we have provided some helpful components in `aws-amplify-react`
```
npm install aws-amplify-react
```

In React Native development, we package core APIs and components into one `aws-amplify-react-native`
```
npm install aws-amplify-react-native
```

## Configuration

```
import Amplify from 'aws-amplify';

Amplify.configure(
    Auth: {
        identityPoolId: 'XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab', //REQUIRED - Amazon Cognito Identity Pool ID
        region: 'XX-XXXX-X', // REQUIRED - Amazon Cognito Region
        userPoolId: 'XX-XXXX-X_abcd1234', //OPTIONAL - Amazon Cognito User Pool ID
        userPoolWebClientId: 'XX-XXXX-X_abcd1234', //OPTIONAL - Amazon Cognito Web Client ID
    },
    Analytics: {
        appId: 'XXXXXXXXXXabcdefghij1234567890ab', //OPTIONAL -  Amazon Pinpoint App ID
        region: 'XX-XXXX-X', //OPTIONAL -  Amazon service region
    });

```

In the above configuration you are required to pass in an Amazon Cognito Identity Pool ID so that the library can retrieve base credentials for a user even in an UnAuthenticated state. If you pass in properties in the Analytics section for Amazon Pinpoint the library will automatically track some base metrics for you without any effort on your part.

### Manual Setup
[Amazon Cognito Identity](http://docs.aws.amazon.com/cognito/latest/developerguide/getting-started-with-identity-pools.html)

[Amazon Pinpoint](http://docs.aws.amazon.com/pinpoint/latest/developerguide/getting-started.html)

### Automated Setup

AWS Mobile Hub streamlines the steps above for you. Simply click the button:

This will create a project that works with Analytics category fully functioning. After the project is created in the Mobile Hub console download aws-exports.js by clicking the **Hosting and Streaming** tile then **Download aws-exports.js**.

![Mobile Hub](mobile_hub_1.png)

Download aws-exports.js

Then copy the file to `/src` folder of the project
![Download](mobile_hub_2.png)

Now you can simply import the file and pass it as the configuration to the Amplify library:

Add these lines to your source.
```
import Amplify from 'aws-amplify';
import aws_exports from './aws-exports.js';

Amplify.configure(aws_exports);
```

After configuration, user session metrics are automatically collected and send to Amazon Pinpoint. To see these metrics click [here](https://console.aws.amazon.com/pinpoint/home/) or in your Mobile Hub project click the **Engage** tab on the left of the screen.

![Session](mobile_hub_3.png)

## Integration

### 1. Collect Session Data

Without additional code. Once correctly configured, Analytics module starts collect session data.

All you need to do is to configure Analytics module. See [configuration](#configuration)

### 2. Record Event

To record an event, call `record` method

```
import { Analytics } from 'aws-amplify';

Analytics.record('albumVisit');
```

### 3. Record Event with Attributes

`record` method let you add additional attributes to event. For example,

```
import { Analytics } from 'aws-amplify';

Analytics.record('albumVisit', { genre: '', artist: '' });
```

### 4. Record Event with Metrics

Metrics can be added to event too.

```
import { Analytics } from 'aws-amplify';

Analytics.record('albumVisit', {}, { minutesListened: 30 });
```

repository: gracesafe/aws-amplify

repo_name: gracesafe/aws-amplify


text:
# [Open Speech Platform - Server API](../api.md)

## GET /param/amplification

Gets all amplification profiles from the database

### Return type

JSON array of profiles

### Responses

Code | Meaning
--- | ---
200 | Profiles successfully retreived
500 | Database error.

### Examples

```
> curl --request GET http://localhost:5000/api/param/amplification

[{"id":1,"profileName":"Martin_profile1","bandNumber":6,"parameters":"{\"left\"...
```

```python
import json
import requests

URL = "http://localhost:5000/api/param/amplification"

response = requests.get(URL)
if response.status_code == 200:
    for profile in response.json():
        print(profile['id'], profile['profileName'], profile['bandNumber'])
else:
    print("Response Code:", response.status_code)

```

---


text:
---
title: Assignment for Technical Interview
---

| **Date**   | **Author**    | **Version** | **Comments**                                                   |
|------------|---------------|-------------|----------------------------------------------------------------|
| 2020-01-14 | Piotr W. Banas| 0.1         | Initial draft version                                          |

Table 1 - Version history

### Description

Notejam is a simple application provided in different languages and frameworks for the purpose of evaluating CI/CD solutions in accordance with provided requirements.

### Implementation

1. Ruby on Rails
    1. The app is deployed as an Azure App Service [https://notejamruby.azurewebsites.net/signin]

    2. Tests are invoked at push as a github workflow [https://github.com/piotrbanas/notejam/blob/master/.github/workflows/rubyTests.yml]

        (Defined in `.github/workflows/rubyTests.yml`)

    3. Build is defined in Azure Pipelines:
        ![](build.png)

    4. Release:
        ![](release.png)

    5. Alternatively, a deployment can be triggered from a local git repository:

        `git subtree push --prefix=rubyonrails/notejam azure master`

        This uses a Kudu deployment script: `.\rubyonrails\notejam\deploy.sh`

    6. Note: currently the app is not fully functional, as the Azure Web App doesn't support SQLite. The complete solution would use a proper database.

2. Python
    1. Tests defined in `.github\workflows\pythonapp.yml`

    2. Build and release defined as a Azure Multistage Pipeline: `\azure-pipelines.yml`

### Business Requirements

1. The Application must serve variable amount of traﬃc. Most users are active during business hours. During big events and conferences the traﬃc could be 4 times more than typical.
    1. The App Service can be configured with Auto Scaling (not available in my Free Tier Subscription)
2. The Customer takes guarantee to preserve your notes up to 3 years and recover it if needed.
    1. Automatic backup of the app and databases (not available in my Free Tier Subscription) can be configured with a desired retention (days).
3. The Customer ensures continuity in service in case of datacenter failures. The Service must be capable of being migrated to any regions supported by the cloud provider in case of emergency.
    1. The App Service can be cloned into a App Service Plan in another region. Both ASPs will be kept behind Azure Front Door. Databases can also be geo-replicated.
4. The Customer is planning to have more than 100 developers to work in this project who want to roll out multiple deployments a day without interruption / downtime. The Customer wants to provision separated environments to support their development process for development, testing, production in the near future.
    1. A properly configured branching policy and environments in a CI/CD pipeline will ensure this.
5. The Customer wants to see relevant metrics and logs from the infrastructure for quality assurance and security purposes.
    1. App Insights, Logs and Metrics can be enabled for the App Service.

repository: piotrbanas/notejam

gha_license_id: NOASSERTION

repo_name: piotrbanas/notejam


text:
# RAML Client Generator

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]

Template-driven generator of clients for APIs described by RAML.

## Installation

First, make sure [node](http://nodejs.org) has been installed. Then, we can install it using `npm`:

```
npm install raml-client-generator -g
```

## Usage

To generate an API client, point the command to your base RAML file and specify the output directory and language.

```
raml-to-client api.raml -o api-client -l javascript
```

## Supported Languages

* [JavaScript](https://github.com/mulesoft-labs/raml-javascript-generator) (`javascript`)
  * Node and browser support
  * Promises
  * Complete OAuth 2.0 Support
  * Multiple client instances
  * Automatic `README.md` and `package.json` generation
  * Multi-part form data

We're excited to see new languages soon! If you have a language you'd like to implement, check out the [implementation guide](IMPLEMENTATION.md).

## Testing

```sh
npm install
npm test # This *will* test every language.
```

## License

Apache 2.0

[npm-image]: https://img.shields.io/npm/v/raml-client-generator.svg?style=flat
[npm-url]: https://npmjs.org/package/raml-client-generator
[downloads-image]: https://img.shields.io/npm/dm/raml-client-generator.svg?style=flat
[downloads-url]: https://npmjs.org/package/raml-client-generator
[travis-image]: https://img.shields.io/travis/mulesoft/raml-client-generator.svg?style=flat
[travis-url]: https://travis-ci.org/mulesoft/raml-client-generator


text:
---
name: Feature request
about: |
If you have an idea for the project or something you think we could improve,
add, or support, you're in the right place.
---

Please thoroughly search the existing issues for relevant feature requests, and
use [GitHub's reaction feature][github-reactions] to add upvotes to pre-existing
requests.

## Feature description

> A written overview of the feature

## Use case(s)

> Any relevant use-cases that you see

[github-reactions]: https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/


text:
pyshopee v1.2.1
================================

[![PyPI](https://img.shields.io/badge/pypi-v1.2.2-blue.svg)](https://pypi.org/project/pyshopee/)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/JimCurryWang/python-shopee)
[![Depfu](https://img.shields.io/depfu/depfu/example-ruby.svg)](https://github.com/JimCurryWang/python-shopee)

Shopee Partners API - python implementation
---------------------------------------------
This is Python implementation for the [Shopee Partner REST API](https://partner.test.shopeemobile.com/docs/).

If you came here looking for the [Shopee seller center](https://seller.shopee.tw/),to purchase , then [go here](https://shopee.tw/).

_Source code_
    https://github.com/JimCurryWang/python-shopee/

_pypi_
    https://pypi.org/project/pyshopee

_Shopee Parter API Documentation_
    https://partner.test.shopeemobile.com/docs/

_Registration for Shopee Partner API usage_
    https://docs.google.com/forms/d/e/1FAIpQLSeCSsRHQSoQvZccOSHIl5DZAPIkSnS4ivN0Z6rp6N7JIoofvQ/viewform?c=0&w=1

Features
--------

- Implementation of Manage Orders, Manage Products and Manage Shop Accounts.
- Simple handling of authentication
- No need to generate timestamps yourself, the wrapper does it for you.
- Good Response exception handling.
- Item, Logistic, Order, Returns, Shop module functionality.
- New feature will keep maintaining !

Developer Note
--------------
- From Aug, 2018  ShopeePartnerAPI  will change the original apply mechanism.
Please replace with your valid parameter(shopid,partnerid,token etc.)before sumbitting the call.

- To get started, please check the [Developer Guide under Documentation](https://open.shopee.com/) - Overview - Developer Guide
on how to become a developer and utilize Shopee OpenAPI services.

- Apply Authority Route:
    Apply Developer Authority → Develper Authentication → Build New App's Token →
    Developing and Testing → Seller Authority

About testtools platform
------------------------
- The default parameters are dummies except the *PartnerID* and *Partner Key* dedicated to your APP.
  Please replace with your valid parameter(shopid etc.) before sumbitting the call.
- The testtools is based on PRODUCTION environment, please apply your PRODUCTION credential and parameters
  The "Request" and "Sign" tab aim to assist developer on verifying the authentication signature of API calls

Install
-------
1. pip install from pypi
```shell
$ pip install pyshopee
```
2. clone the repository to your local folder
```shell
$ cd python-shopee
```
```shell
$ python setup.py install
```

Quick Start
-----------

#### import pyshopee & get order by status
```python
import pyshopee

client = pyshopee.Client( shopid, partnerid, API_key )

# get_order_by_status
# UNPAID/READY_TO_SHIP/SHIPPED/COMPLETED/CANCELLED/ALL
resp = client.order.get_order_by_status(order_status="READY_TO_SHIP")
print(resp)
```
#### get order list

```python
# get_order_list
resp = client.order.get_order_list(create_time_from =<PHONE_NUMBER>, create_time_to=1512635703)
print(resp)
```
#### get order detail

```python
'''
ordersn_list , type: String[]
The set of order IDs. You can specify, at most, 50 OrderIDs in this call.
'''
# get_order_detail
ordersn_list = [ '1712071633982A7','1712071632981JW','171207163097YCJ']
resp = client.order.get_order_detail(ordersn_list = ordersn_list )
print(resp)
```

#### get order escrow detail
```python
'''
ordersn , type:String []
Shopee's unique identifier for an order.
'''
# get_order_escrow_detail
ordersn = '1712071633982A7'
resp = client.order.get_order_escrow_detail(ordersn = ordersn)
print(resp)
```

Advance Details for others functions
-------

```python
# usage
client.[type].[function name]
```

#### 1. client.category
    - get_categories(**kwargs)

    - get_attributes(**kwargs)
#### 2. client.logistic
    - get_logistics()
        - Use this call to get all supported Logistic Channel

    - get_address()
        - Use this call to get all required param for init logistic.

    - get_airway_bill(**kwargs)
         - Use this API to get airway bill for orders

    - get_branch(**kwargs)
         - Use this call to get all required param for init logistic.

    - get_logistic_message(**kwargs)
        - Use this call to get the logistics tracking information of an order.

    - get_order_logistic(**kwargs)
        - Use this call to fetch the logistics information of an order, these info can be used for waybill printing.

    - get_parameter_for_init(**kwargs)
        - Use this call to get all required param for init logistic.

    - get_time_slot(**kwargs)
        - Use this call to get all required param for init logistic.

    - get_tracking_no(**kwargs)
        - Use this API to get tracking number of orders

    - init(**kwargs)
        - Use this call to arrange Pickup or Dropoff. Should call shopee.logistics.GetParameterForInit to fetch all required param first.

    - set_logistic_status(**kwargs)
        - Set Logistic Status to PICKUP_DONE, this API only works for non-integrated logistic channels

    - set_tracking_no(**kwargs)
        - User this call to set tracking number for each order in batch.

#### 3. client.order
    - get_order_list(**kwargs)
        - GetOrdersList is the recommended call to use for order management.

    - get_order_detail(**kwargs):
        - Use this call to retrieve detailed information about one or more orders based on OrderIDs.

    - get_order_escrow_detail(**kwargs):
        - Use this call to retrieve detailed escrow information about one order based on OrderID.

    - get_order_by_status(**kwargs):
        - GetOrdersByStatus is the recommended call to use for order management.

    - cancel_order(**kwargs):
        - Use this call to cancel an order

    - accept_buyer_cancellation(**kwargs):
        - Use this call to accept buyer cancellation

    - reject_buyer_cancellation(**kwargs):
        - Use this call to reject buyer cancellation

#### 4. client.product
    - add(product_data)
        - Use this call to add a product item. Should get dependency by calling below API first

    - add_item_img(**kwargs)
        - Use this call to add product item images.

    - delete(**kwargs)
        - Use this call to delete a product item.

    - delete_item_img(**kwargs)
        - Use this call to delete a product item image.

    - get_item_detail(**kwargs)
        - Use this call to get detail of item

    - get_item_list(**kwargs)
        - Use this call to get a list of items

    - update(update_data)
        - Use this call to update a product item. Should get dependency by calling below API first

    - update_price(**kwargs)
        - Use this call to update item price

    - update_stock(**kwargs)
        - Use this call to update item stock

    - insert_item_img(**kwargs)
        - Use this call to add one item image in assigned position.

#### 5. client.rma
    - confirm_return(**kwargs)
        - Confirm return

    - dispute_return(**kwargs)
        - Dispute return

    - get_return_list(**kwargs)
        - Get return list

#### 6. client.shop
    - get_shop_info(**kwargs):
        - Use this call to get information of shop.
    - update_shop_info(**kwargs):
        - Use this call to update information of shop.
    - performance(**kwargs):
        - Shop performance includes the indexes from "My Performance" of Seller Center.

#### 7. client.variation
    - add(variation_data)
        - Use this call to add item variations

    - delete(**kwargs)
        - Use this call to delete item variation

    - update_price(**kwargs)
        - Use this call to update item variation price

    - update_stock(**kwargs)
        - Use this call to update item variation stock

Publish History
--------
- 20180214 ShopeePartnerAPI main function building.
- 20180714 Add new class method - shop
This class can get information or update information of shop ,and get shop performance includes the indexes from "My Performance" of Seller Center.

To Be Announce
--------
New API
- shopee.shop.Performance
Shop performance includes the indexes from "My Performance" of Seller Center.

- shopee.item.GetCategoriesByCountry
Use this api to get categories list filtered by country and cross border without using shopID. 3rd-party vendor should find it easier to store category without using a specific shopID.

- Optimized API
shopee.orders.GetOrderDetails
Added pay_time field in the return parameters for order payment time.

repository: ojixzzz/python-shopee

repo_name: ojixzzz/python-shopee


text:
---
layout: default
---

# 1992-10-26 - Re: entropy measures

## Header Data

From: Eric Hollander<EMAIL_ADDRESS>To: Eric Hughes<EMAIL_ADDRESS>Message Hash: b71072e5de22f0ee2513a7bc057b82b39ad7284a70bf4913906340f5c39b27b3

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1992-10-26 04:41:19 UTC

Raw Date: Sun, 25 Oct 92 21:41:19 PPE

## Raw message

```
{% raw  %}From: Eric Hollander<EMAIL_ADDRESS>Date: Sun, 25 Oct 92 21:41:19 PPE
To: Eric Hughes<EMAIL_ADDRESS>Subject: Re: entropy measures
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>uuencoding will have a slightly lower single-character entropy than
>the ASCII armor PGP uses because just about every line begins with the
>letter 'M'.  This will skew the distribution slightly.  But a better
>way of distinguishing uuencoding and ascii armor is to see that in
>falls in the same entropy class, and then just looking at the
>alphabetic subsets used.

It's not that simple.  The entropy of a byte is the number of bits needed to
represent it.  If what is uuencoded is extremely repetitive, the entropy
will be low, maybe even less than one.  On the other hand, if it were random
data, it would just be slightly lower than ascii armor.  Binaries are
somewhat repetitive, so they have somewhat less entropy than random data.
English has a lot of redundancy, so it has a low entropy.

e

{% endraw %}
```

## Thread

+ Return to [October 1992](/archive/1992/10)

+ Return to "[Eric Hollander <hh@soda.berkeley.edu>](/authors/eric_hollander_hh_at_soda_berkeley_edu_)"
+ Return to "[Eric Hughes <hughes@soda.berkeley.edu>](/authors/eric_hughes_hughes_at_soda_berkeley_edu_)"
+ Return to<EMAIL_ADDRESS>(The Omega)](/authors/omega_at_spica_bu_edu_the_omega_)"
+ Return to<EMAIL_ADDRESS>(E. Dean Tribble)](/authors/tribble_at_xanadu_com_e_dean_tribble_)"

+ 1992-10-22 (Thu, 22 Oct 92 09:25:56 PDT) - [BBS E-mail policy](/archive/1992/10/8a24672636a42d5225524b26c5cc78e1b0ba1b62a4c1e1fe1825463951a6b9e0) -<EMAIL_ADDRESS>(The Omega)_
  + 1992-10-23 (Thu, 22 Oct 92 23:02:09 PDT) - [BBS E-mail policy](/archive/1992/10/bc5b354247141e46df2c768591ee1dffd7fbc017a03b959da779cf82e2521133) - _Eric Hughes<EMAIL_ADDRESS>    + 1992-10-23 (Fri, 23 Oct 92 14:42:19 PDT) - [BBS E-mail policy Now see if this number is in one of the following ranges:](/archive/1992/10/298d86c630be7b06958a77a0e2a93e61224cded16c21ee64acb6bc0f39e9ecfd) -<EMAIL_ADDRESS>(E. Dean Tribble)_
      + 1992-10-24 (Fri, 23 Oct 92 23:20:44 PDT) - [entropy measures](/archive/1992/10/3c38d48ebe6788447fca198f92d44a9ffa68121b79032804da9a7944dc97d602) - _Eric Hughes<EMAIL_ADDRESS>        + 1992-10-26 (Sun, 25 Oct 92 21:41:19 PPE) - Re: entropy measures - _Eric Hollander<EMAIL_ADDRESS>    + 1992-10-26 (Sun, 25 Oct 92 21:29:49 PPE) - [Re: BBS E-mail policy](/archive/1992/10/fbe83ff79794f109159e298eb88fce410a7847d43b87f0d6426ef33b4884b280) - _Eric Hollander<EMAIL_ADDRESS>      + 1992-10-26 (Mon, 26 Oct 92 08:55:04 PPE) - [entropy](/archive/1992/10/9d4dcb1012b41fda6c8f80cb56a7f2aa2e3b85fc1658466140b482591f39088b) - _Eric Hughes<EMAIL_ADDRESS>


text:
# Recipe-For-Success

This app runs on top of the New York Times Cooking website. The website contains lots of great recipes with great information, but unfortunately small fonts and a busy page layout makes it hard to read while actually cooking. I saw this as an opportunity to make it better using a simple Google Chrome extension.

When the extension app is clicked, the page is transformed into an easy to read, user-friendly website that is actually usable while in the heat of the kitchen. Ingredients are transformed from sentences into a table consisting of:
 - quantity
 - measurement
 - actual ingredient
 - prep/other info (available on hover)

Links to Google search of ingredient can be found by clicking on the ingredient itself.

The instructions are made larger and easier to read, with the ingredients bolded, making it easy to pick out what is necessary in each step.

This is a work in progress and I am open to any and all contructive criticism that can be used to improve my project. Until then, enjoy!

Disclaimer: This app does not work perfectly for every single recipe yet, but I would eventually like it to! Also, it is exclusive to NYT Cooking right now, but ideally it could scale to be used on any well-written recipe website.


text:
# BRMS Runtime tutorial

## Using previous drools version (5.x)

In a classical drools project in previous version, the architecture was often like this : ![](../.gitbook/assets/Drools-global-env.jpg)

* an application A is going to call and use a drools service.
* a drools runtime that is built for the application using standard drools API. In many cases the runtime is using a stateless session.
* The drools runtime is loading the rule package from a rule repository that has an authoring tool to implement the rules. This last two features were implemented using what was called Guvnor.
* Deploying a new version of a package could be done by updating  the runtime remotely by calling the drools API features.

An alternative of this architecture is to implement the runtime directly in the application A.

## Architecture using 6.4 version and drools API

In the 6.x serie, the Guvnor tool was replaced by what was called workbench and now Business Central. We shall call it kie-wb. It is possible to take the same architecture using the drools API and the kie-wb. There are now two possibilities

* as the business central is a maven repository, rebuild the runtime (or application if the runtime is embedded) with the new package version.
* In the runtime dynamically add to the java classpath the new jar of the rules package each time there is a new version.

## using kie-server and kie-wb together

In the 6.x version, a new component was introduced called kie-server. It wraps all we described in previous step and is integrated with the workbench. The new architecture looks like the previous one :

![](../.gitbook/assets/kie-architecture.jpg)

* Each kie-server calls the kie-wb at startup and declares itself
* From the kie-wb, it is possible to create kie-container in the desired kie-server.
* This kie-container contains one maven artifact defined in the kie-wb for one version.
* All this is linked together using maven configuration and all related features but all is done for us. You just say you want this artifact in this version (it must be built before of course) and that is all.
* The kie-container exposes a basic rest service that has the same signature as the API we used in the drools tutorial : insert object, fire all rules etc..
* The application A calls the drools API remotely and does not have to take care of new rule version deployment.

Out of the box, the new drools tooling in version 6.4 offers us an authoring tool with a runtime ready to work\\/deploy a drools set of rules in a maven package.

Which is even better is that as well the authoring tool (kie-wb) or the execution server (kie-server) can be extended. You can see that at the end of the book.

For now on, we shall use the standard tooling and interface available out of the box.

repository: nheron/droolsonboarding

gha_language: Shell

repo_name: nheron/droolsonboarding


text:
# SmartEditor

## Editions
There are several editor components available. Please use the one which is appropriate to you.

### SmartPlainHtmlEditor
``` asp
<%@ Page ValidateRequest="false" EnableEventValidation="false" %>
<%@ Register TagPrefix="camm" TagName="WebManager" Src="~/system/cammWebManager.ascx" %>
<camm:WebManager id="cammWebManager" runat="server" />
<%@ Register TagPrefix="cammWebEdit" Namespace="CompuMaster.camm.SmartWebEditor.Controls"
      Assembly="cammWM.SmartEditor" %>
<html>
<body>
<form runat="server">
<cammWebEdit:SmartPlainHtmlEditor marketlookupmode="3" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}"
      AlternativeDataMarkets="1,10000" />
</form>
</body>
</html>
```

### SmartCommonMarkEditor
``` asp
<%@ Page ValidateRequest="false" EnableEventValidation="false" %>
<%@ Register TagPrefix="camm" TagName="WebManager" Src="~/system/cammWebManager.ascx" %>
<camm:WebManager id="cammWebManager" runat="server" />
<%@ Register TagPrefix="cammWebEdit" Namespace="CompuMaster.camm.SmartWebEditor.Controls"
      Assembly="cammWM.CommonMarkEditor" %>
<html>
<body>
<form runat="server">
<cammWebEdit:SmartCommonMarkEditor marketlookupmode="3" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}"
      AlternativeDataMarkets="1,10000" />
</form>
</body>
</html>
```

## Available MarketLookupModes
``` vb.net
        ''' <summary>
        '''     Contains informations about how to handle the viewonly mode in different market, langs
        ''' </summary>
        Public Enum MarketLookupModes As Integer
            ''' <summary>
            '''     Data is only available in an international version and this is valid for all languages/markets
            ''' </summary>
            ''' <remarks>
            '''     This value is the same as None, just the name is more explainable
            '''     If the lookup process fails, an HTTP error 404 will be returned to the browser.
            ''' </remarks>
            SingleMarket = 0
            ''' <summary>
            '''     Data is only available in an international version and this is valid for all languages/markets
            ''' </summary>
            ''' <remarks>
            '''     This value is the same as SingleMarket, just the name is more simplified
            '''     If the lookup process fails, an HTTP error 404 will be returned to the browser.
            ''' </remarks>
            None = 0
            ''' <summary>
            '''     Data is maintained for every market separately, the language markets (e. g. "English", "French", etc. are handled as a separate market)
            ''' </summary>
            ''' <remarks>
            '''     If the lookup process fails, an HTTP error 404 will be returned to the browser.
            ''' </remarks>
            Market = 1
            ''' <summary>
            '''     Data is maintained for every language/market separately; when there is no value for a market it will be searched for some compatible language data
            ''' </summary>
            ''' <remarks>
            '''     Example: When the visitor is in market "German/Austria" but there is only some content available for market "German", the German data will be used.
            '''     If the lookup process fails, an HTTP error 404 will be returned to the browser.
            ''' </remarks>
            Language = 2
            ''' <summary>
            '''     Data is maintained for every language/market separately; when there is no value for the current market, the sWCMS control tries to lookup a best matching content
            ''' </summary>
            ''' <remarks>
            '''     When the user requests a page in e. g. market 559 ("French/France"), there will be the following order for the lookup process:
            '''     <list>
            '''         <item>Current market, in ex. ID 559 / French/France</item>
            '''         <item>Current language of market, in ex. ID 3 / French</item>
            '''         <item>Until customized by propert AlternativeDataMarkets: English universal, ID 1</item>
            '''         <item>Until customized by propert AlternativeDataMarkets: Worldwide market, ID 10000</item>
            '''         <item>International, ID 0</item>
            '''     </list>
            '''     If the lookup process fails, an HTTP error 404 will be returned to the browser.
            ''' </remarks>
            BestMatchingLanguage = 3
        End Enum
```

So, for a single text for every UI language/market, you might want to use:
``` asp
<cammWebEdit:SmartCommonMarkEditor marketlookupmode="0" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}" />
```

## Additional samples

### Display a custom note for editors when editing the content
``` asp
<cammWebEdit:SmartCommonMarkEditor marketlookupmode="0" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}"
      NoteForEditor="EDITOR-NOTE: Please always update markets English and Spanish and Russian" />
```

### Sizing of edit textbox using style attributes
``` asp
<cammWebEdit:SmartCommonMarkEditor marketlookupmode="0" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}"
      CssWidth="100%" CssHeight="280px" />
```
### Sizing of edit textbox using HTML textbox columns/rows attributes
``` asp
<cammWebEdit:SmartCommonMarkEditor marketlookupmode="0" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}"
      Columns=80 Rows=25 />
```

### Accessing the content from a specified server ID
By default, the address (e. g.) "/content.aspx" provides different content on different servers. So, the intranet and the extranet are able to show independent content.
In some cases, you might want to override this behaviour and you want to show on the same URL the same content in the extranet as well as in the intranet. In this case, you would setup this property on the extranet server's scripts to show the content of the intranet server.
``` asp
<cammWebEdit:SmartCommonMarkEditor marketlookupmode="0" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}"
      ContentOfServerID="2" />
```

Alternatively, you can assign the ContentOfServerID value by web.config settings for whole directories
``` xml
<configuration>
	<appSettings>
		<add key="WebManager.WebManager.WebEditor.ContentOfServerID" value="2" />
	</appSettings>
</configuration>
```

### Accessing the content for a specified server DocumentID
An identifier of the current document, by default its URL
``` asp
<cammWebEdit:SmartCommonMarkEditor marketlookupmode="0" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}"
      DocumentID="HttpServerError404DefaultMessage" />
```

### Enabling upload feature for images and documents
Requires a deployed cammWM.SmartEditorUpload at root web application at /sysdata/modules/smarteditor
```asp
<cammWebEdit:SmartCommonMarkEditor marketlookupmode="0" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}"
      Images="~/images" Docs="~/docs"
      >{enter here...}</cammWebEdit:SmartCommonMarkEditor>
```

### Customize upload form URLs to further reduce potenial risks of vulnerabilities/hacks
Requires a deployed cammWM.SmartEditorUpload
```asp
<cammWebEdit:SmartCommonMarkEditor marketlookupmode="0" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}"
      Images="~/images" Docs="~/docs"
      ImagesUploadFormUrl="~/smarteditor/imagesupload.aspx" DocumentsUploadFormUrl="~/smarteditor/docsupload.aspx"
      >{enter here...}</cammWebEdit:SmartCommonMarkEditor>
```

### Customize upload file extensions and size limits
Requires a deployed cammWM.SmartEditorUpload
```asp
<cammWebEdit:SmartCommonMarkEditor marketlookupmode="0" runat="server" id="MainEditor"
      SecurityObjectEditMode="{Security Object for Editors}"
      Images="~/images" Docs="~/docs"
      ImagesAllowedFileExtensions=".jpg,.gif"
      ImagesUploadSizeMax="10485760"
      DocumentsAllowedFileExtensions=".pdf,.txt,.doc,.docx,.rtf,.xls,.xlsx,.ppt,.pptx"
      DocumentsUploadSizeMax="10485760"
      >{enter here...}</cammWebEdit:SmartCommonMarkEditor>
```

repository: CompuMasterGmbH/cammIntegrationPortal

gha_language: Visual Basic

repo_name: CompuMasterGmbH/cammIntegrationPortal


text:
# \<paper-calendar\>

Calendar of events

## Development

First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve your element locally. You can use also the Dockerfile to create a development-ready environment.

## Dependencies

Tho use this component in your webpage, you need to include in your page the following dependencies:

* [Moment.js](https://momentjs.com/) (^2.20.1);
* [Moment Timezone](http://momentjs.com/timezone/) (^0.5.14).

## Viewing Your Element

```
$ polymer serve
```

## Running Tests

```
$ polymer test
```

Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.

## Live reloading

You can use the browsersync to live reload the demo pages.

```
$ make serve
```

repository: Heavo/paper-calendar

repo_name: Heavo/paper-calendar


text:
## Name
**Fridge Objects Dataset**

## Description
Fridge Objects is a toy dataset which consists of 134 images with 4 classes of beverage container {can, carton, milk bottle, water bottle} pictures taken on different backgrounds.

## Annotations Examples
![image](images/fridge_annotations.png)

## Usage
 Example showing how to use this dataset

## How to load this dataset
```python
# Imports
from icevision.all import *
import icedata

# Load the Fridge Objects dataset
path = icedata.fridge.load_data()
```

## How to parse this dataset
```python
# Get the class_map, a utility that maps from number IDs to classs names
class_map = icedata.fridge.class_map()

# Randomly split our data into train/valid
data_splitter = RandomSplitter([0.8, 0.2])

# Fridge parser: provided out-of-the-box
parser = icedata.fridge.parser(data_dir=path, class_map=class_map)
train_records, valid_records = parser.parse(data_splitter)

# shows images with corresponding labels and boxes
show_records(train_records[:6], ncols=3, class_map=class_map, show=True)
```

## How to load the pretrained weights of this dataset
```python
class_map = icedata.fridge.class_map()
model = icedata.fridge.trained_models.faster_rcnn_resnet50_fpn()
```

## Dataset folders
![image](images/fridge_folders.png)

## Annotations sample
```xml
<annotation>
	<folder>images</folder>
	<filename>2.jpg</filename>
	<path>../images/2.jpg</path>
	<source>
		<database>Unknown</database>
	</source>
	<size>
		<width>499</width>
		<height>666</height>
		<depth>3</depth>
	</size>
	<segmented>0</segmented>
	<object>
		<name>milk_bottle</name>
		<pose>Unspecified</pose>
		<truncated>0</truncated>
		<difficult>0</difficult>
		<bndbox>
			<xmin>247</xmin>
			<ymin>192</ymin>
			<xmax>355</xmax>
			<ymax>493</ymax>
		</bndbox>
	</object>
</annotation>
```

## License
Unknown

## Relevant Publications
Unknown

repository: yrodriguezmd/icedata

repo_name: yrodriguezmd/icedata


text:
# Contributing to Tekton Triggers

Welcome to the Tekton Triggers project! Thanks for considering contributing to
our project and we hope you'll enjoy it :D

**All contributors must comply with
[the code of conduct](./code-of-conduct.md).**

To get started developing, see our [DEVELOPMENT.md](./DEVELOPMENT.md).

In [the community repo](https://github.com/tektoncd/community) you'll find info
on:

- [Contacting other contributors](https://github.com/tektoncd/community/blob/master/contact.md)
- [Development standards](https://github.com/tektoncd/community/blob/master/standards.md)
  around
  [principles](https://github.com/tektoncd/community/blob/master/standards.md#principles),
  [commit messages](https://github.com/tektoncd/community/blob/master/standards.md#commit-messages)
  and
  [code](https://github.com/tektoncd/community/blob/master/standards.md#coding-standards)
- [Processes](https://github.com/tektoncd/community/blob/master/process.md) like
  [finding something to work on](https://github.com/tektoncd/community/blob/master/process.md#finding-something-to-work-on),
  [proposing features](https://github.com/tektoncd/community/blob/master/process.md#proposing-features),
  [reviews](https://github.com/tektoncd/community/blob/master/process.md#reviews)
  and
  [becoming an OWNER](https://github.com/tektoncd/community/blob/master/process.md#owners)

You can find details on our automation infrastructure in
[the plumbing repo](https://github.com/tektoncd/plumbing).

For more Triggers specific guidelines, see:

- [The Tekton Triggers ZenHub project](#zenhub-project)

See also
[the Tekton Pipelines roadmap](http://github.com/tektoncd/pipeline/blob/master/roadmap-2019.md)

## ZenHub project

You can see project details (including a burndown, issues in epics, etc.) on
[our ZenHub board](https://app.zenhub.com/workspaces/triggers-5d0ebce343e42a09a0a4a826).

To see this board, you must:

- Ask [an OWNER](OWNERS) via
  [slack](https://github.com/tektoncd/community/blob/master/contact.md#slack)
  for an invitation
- Add [the ZenHub browser extension](https://www.zenhub.com/extension) to see
  new info via GitHub (or just use zenhub.com directly)

repository: tektoncd/triggers

gha_language: Go

repo_name: tektoncd/triggers


text:
---
layout: default
---

# 1997-12-30 - Re: thomas.html (fwd)

## Header Data

From: David Miller<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: d9832ce40b96543def272c0e4f36e61ab8ee6d72495f4936b34598168700cc5c

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-12-30 04:19:29 UTC

Raw Date: Tue, 30 Dec 1997 12:19:29 +0800

## Raw message

```
{% raw  %}From: David Miller<EMAIL_ADDRESS>Date: Tue, 30 Dec 1997 12:19:29 +0800
To<EMAIL_ADDRESS>Subject: Re: thomas.html (fwd)
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Jim Choate wrote:

>     Court TV Library
>
>   Justice Thomas on 'Heroes and Victims'
>
>     Legal Times
>
>    Clarence Thomas may keep a lower profile than many of his colleagues
>    on the Supreme Court bench. But when he does speak out, he almost
>    always makes an impact.

As a sometimes member of our braindead society, let me thank you for
reminding
me of the long-term positive implications of the Anita Hill Trials on
the
future of our Country.  In regards to the "pubic hair in my coke"
travisty
that we all experienced, let me say this:

	Sometimes things have to get worse in order to get better.

  From what I've seen, my hat is off to Judge Clarence Thomas.

>    It should surprise no one that our culture now has far less difficulty
>    recognizing celebrities than it does those who achieve success as a
>    result of personal effort and character traits that we traditionally
>    would consider heroic. Denigrating heroic virtue -- in other words,
>    chalking heroism up to circumstance -- fits quite well with the notion
>    that we must all be the same and that there can be no significant
>    differences in our achievement, social standing, or wealth.

Which reminds me of another Troutmanism:

     "Dave -- We used to have heroes, people who were known for being
heroic.

--David Miller

middle  rival
devil rim lad

Windows '95 -- a dirty, two-bit operating system.

{% endraw %}
```

## Thread

+ Return to [December 1997](/archive/1997/12)

+ Return to "[David Miller <dm0@avana.net>](/authors/david_miller_dm0_at_avana_net_)"
+ Return to "[Jim Choate <ravage@ssz.com>](/authors/jim_choate_ravage_at_ssz_com_)"

+ 1997-12-30 (Tue, 30 Dec 1997 10:30:36 +0800) - [thomas.html (fwd)](/archive/1997/12/df86644ed0ea669d964794d7f9a36f97f13784b011fe980239ff2a7b6410eb10) - _Jim Choate<EMAIL_ADDRESS>  + 1997-12-30 (Tue, 30 Dec 1997 12:19:29 +0800) - Re: thomas.html (fwd) - _David Miller<EMAIL_ADDRESS>


text:
# Code of Conduct

By contributing to and participating in the development of indieweb-endpoints-ruby, you acknowledge that you have read and agree to the [IndieWeb Code of Conduct](https://indieweb.org/code-of-conduct).

repository: indieweb/indieweb-endpoints-ruby

gha_language: Ruby

repo_name: indieweb/indieweb-endpoints-ruby