text:
# Deep Learning practice - CNNs
 - We want to use an easy way to introduce the popular technologies of computer vision for people who are interested in this field.
 - These programs are basically modified from the exams in "Convolutional Neural Networks" on Coursera. If you want a comprehensive explanation or any tutorial videos, I recommended you enroll in the course on Coursera.
 - If you need more information you could go to my website or leave message to me.
     - [BrilliantCode.net](https://www.brilliantcode.net/)

## Programs
### Basic concepts
#### Step by step build components of CNNs.
  - Descriptions:
    - We used Numpy to build each component of CNNs including convolutional layer, pooling layer, padding, strides and their backpropagations.
  - Related files:
    - 01.The components of CNNs.ipynb
  - Related tutorial:
      - [CNN #1 Kernel, Stride, Padding](https://www.brilliantcode.net/1584/convolutional-neural-networks-1-convolution-layer-stride-padding-kernel/)
      - [CNN #2 池化層(Pooling layer)](https://www.brilliantcode.net/1586/convolutional-neural-networks-2-pooling-layer/)
      - [CNN #3 計算參數量](https://www.brilliantcode.net/1646/convolutional-neural-networks-3-calculate-number-of-parameters/)
      - [CNN #4 卷積核的Back propagation](https://www.brilliantcode.net/1670/convolutional-neural-networks-4-backpropagation-in-kernels-of-cnns/)
      - [CNN #5 特徵圖&偏差值的導數](https://www.brilliantcode.net/1748/convolutional-neural-networks-5-backpropagation-in-feature-maps-biases-of-cnns/)
      - [CNN #6 Pooling in Backward pass](https://www.brilliantcode.net/1781/convolutional-neural-networks-6-backpropagation-in-pooling-layers-of-cnns/)

### Keras
#### Classify MNIST dataset using linear regression model
   - Descriptions:
     - We used MNIST dataset to train a linear model. (**02.keras_MNIST_linear.py**)
     - And we saved the settings and weights of this model as "**02.MNIST_cnn_model_linear.config**" and "**02.MNIST_cnn_model_linear.weights**", respectively.
     - In addition, you could run **02.MNIST_using_linear.py** to test this model through the images that I paint by mouse. (These images painted by mouse were put in folder "**02-04.images**".)
   - Related files:
     - 02.keras_MNIST_linear.py
     - 02.MNIST_using_linear.py
     - 02.MNIST_model_linear.config
     - 02.MNIST_model_linear.weights
     - 02-04.numbers_groundtruth.json
     - 02-04.images/*

#### Classify MNIST dataset using LeNet-5 model
  - Descriptions:
    - We used MNIST dataset to train a LeNet-5 model. (**03.keras_MNIST_LeNet5.py**)
    - And we saved the settings and weights of this model as "**03.MNIST_cnn_model_LeNet5.config**" and "**03.MNIST_cnn_model_LeNet5.weights**", respectively.
    - In addition, you could run **03.MNIST_cnn_using_LeNet5.py** to test this model through the images that I paint by mouse. (These images painted by mouse were put in folder "**02-04.images**".)
  - Related files:
    - 03.keras_MNIST_LeNet5.py
    - 03.MNIST_cnn_using_LeNet5.py
    - 03.MNIST_cnn_model_LeNet5.config
    - 03.MNIST_cnn_model_LeNet5.weights
    - 02-04.numbers_groundtruth.json
    - 02-04.images/*

#### Classify MNIST dataset using VGG-16 model
  - Descriptions:
    - We used MNIST dataset to train a VGG-16 model *which was modified the numbers of the filter in the final dence layer*. (**04.keras_MNIST_VGG16.py**)
    - And we saved the settings and weights of this model as "**04.MNIST_cnn_model_VGG16.config**" and "**04.MNIST_cnn_model_VGG16.weights**", respectively.
    - In addition, you could run **04.MNIST_cnn_using_VGG16.py** to test this model through the images that I paint by mouse. (These images painted by mouse were put in folder "**02-04.images**".)
    - Due to the shape of the input layer of VGG-16 is 224x224, so we designed a program for resizing images, and the reized images were saved as **04.MNIST_shape224.npz**. (Run **04.resize_images.py** for resizing images.)
  - Related files:
    - 04.keras_MNIST_VGG16.py
    - 04.MNIST_cnn_using_VGG16.py
    - 04.resize_images.py
    - 04.MNIST_shape224.npz
    - 04.MNIST_cnn_model_VGG16.config
    - 04.MNIST_cnn_model_VGG16.weights
    - 02-04.numbers_groundtruth.json
    - 02-04.images/*

#### Classify MNIST dataset using LeNet-5 model on the Kaggle competition
  - Descriptions:
    - We built a CNNs model based on LeNet-5, and trained it through the MNIST dataset from Kaggle.
    - First of all, we wrote a program (**05.keras_Kaggle_MNIST_preprocess.py**) to preprocess the MNIST dataset from Kaggle and saved as a npz file called "**05.Kaggle_digit-recognizer.npz**".
    - After then, use the program "**05.keras_Kaggle_MNIST_train_LeNet5.py**" to train this model. And this program saved the trained model configuration and weights as "**05.MNIST_cnn_model_Kaggle_LeNet5.config**" and "**05.MNIST_cnn_model_Kaggle_LeNet5.weights**", respectively.
    - Finally, we ran the program (**05.keras_Kaggle_MNIST_test_LeNet5.py**) to predict the test dataset for submission.
    - **In this model**, we replaced the original activation function (Sigmoid) of LeNet-5 with **ReLU**, and we added **2 dropout layers** into the fully connected layers. And the training **epoch** increased to 100. Everything else in LeNet-5 had no changes.
    - And the prediction accuracy of this model is 98.528%.
    - It seems not very high accuracy. As you can see the architecture of this model is quite simple, so I thought the results seem to be acceptable.
  - Related files:
    - 05.keras_Kaggle_MNIST_preprocess.py
    - 05.keras_Kaggle_MNIST_test_LeNet5.py
    - 05.keras_Kaggle_MNIST_train_LeNet5.py
    - 05.Kaggle_MNIST_test.csv
    - 05.Kaggle_MNIST_train.csv
    - 05.Kaggle_digit-recognizer.npz
    - 05.Kaggle_prediction_for_submission.csv
    - 05.MNIST_cnn_model_Kaggle_LeNet5.config
    - 05.MNIST_cnn_model_Kaggle_LeNet5.weights
  - Related links:
    - [Digit recognizer - Kaggle](https://www.kaggle.com/c/digit-recognizer)

#### Classify CIFAR-10 dataset using the model conbined with ResNet and traditional CNNs on the Kaggle competition
  - Descriptions:
    - We built this model mainly is using the traditional CNNs to extract features from images, and used the **convolutional block of ResNet** to connect two traditional convolutional layers which have different number of kernels.
    - The dataset provided by this competition was not really good to use, because it presented as 50,000 PNG for training dataset and 300,000 PNG for testing dataset. As the preprocessing phase, we spent a lot of time to uncompress these images and we met a disaster that PyCharm tried to pre-load the folder full of a bunch of images. Fortunately, we had already preprocessed these images and saved them as npz files.(**06.Kaggle_CIFAR-10_train.npz**, **06.Kaggle_CIFAR-10_test.npz**) If you want to try this competition, just load these npz file by Numpy.
    - The testing prediction accuracy is 86.63%.
  - Related files:
    - 06.CIFAR-10_CombinedNet.config
    - 06.CIFAR-10_CombinedNet.weights
    - 06.Kaggle_CIFAR-10_test.npz
    - 06.Kaggle_CIFAR-10_train.npz
    - 06.Kaggle_CIFAR-10_trainLabels.csv
    - 06.Kaggle_submission.csv
    - 06.keras_Kaggle_CIFAR10_test.py
    - 06.keras_Kaggle_CIFAR10_train.py
    - 06.preprocess_Kaggle_CIFAR-10.py
  - Related links:
    - [CIFAR-10 - Object Recognition in Images - Kaggle](https://www.kaggle.com/c/cifar-10/)

#### Classify Kannada-MNIST dataset using CNNs
  - Descriptions:
    - We built this model basically mimics the architecture of the VGG16, but the most different design is this model only has 10 CONV layers.
    - We didn't provide the datasets in this repository. So, if you want to run this model, you have to download the datasets from Kaggle.
    - The testing prediction accuracy is 97.88%.
  - Related files:
    - 07.Keras_Kaggle_Kannada-MNIST.ipynb
  - Related links:
    - [A simple model with 10-layer CNNs](https://www.kaggle.com/polunwang/a-simple-model-with-10-layer-cnns)
    - [MNIST like datatset for Kannada handwritten digits - Kaggle](https://www.kaggle.com/c/Kannada-MNIST)

## How to use?
 - Just fork to your own GitHub or download this repository directly. And run the programs you interested.

## References
 - "Convolutional Neural Networks" on Coursera.
 - [Keras Documentation](https://keras.io/)


text:
# TF-Hub Object Detection

This repository is created to reproduce experiments on object detection with powerful tool TF-Hub, which includes hundreds of pre-trained models (https://tfhub.dev).

The notebook containes two examples of pre-trained models used for object detection:

* FasterRCNN+InceptionResNet V2 (with high accuracy);
* ssd+mobilenet V2 (less accuracy, but small and fast);

Object recognition is tested on few paintings of Vincent van Gogh. Source of the images: https://commons.wikimedia.org/wiki

This notebook is based on Tensorflow Tutorial, which is available at the following link: https://www.tensorflow.org/hub/tutorials/object_detection

Copyright 2018 The TensorFlow Hub Authors.

Licensed under the Apache License, Version 2.0 (the "License");

repository: Artsplendr/TF-Hub-Object-Detection

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Artsplendr/TF-Hub-Object-Detection


text:
# Wp Functions Snippets

## Plugin url : https://atom.io/packages/wp-functions-snippets

| Prefix|description
|---------|------------------------------------------------------|
| `hidea`  | Hide WordPress Update Nag to All But Admins         |
| `tt`     | Create Proper WordPress Titles.                     |
| `cwdw`   | Create Custom WordPress Dashboard Widget.           |
| `rdw`    | Remove All Dashboard Widgets.                       |
| `inm`    | Include Navigation Menus.                           |
| `icll`   | Insert Custom Login Logo.                           |
| `maft`   | Modify Admin Footer Text.                           |
| `esas`   | Enqueue Styles and Scripts.                         |
| `egf`    | Enqueue Google Fonts.                               |
| `mel`    | Modify Excerpt Length.                              |
| `crml`   | Change Read More Link.                              |
| `cme`    | Change Read More Link.                              |
| `dem`    | Disable Emoji Mess.                                 |
| `rc`     | Remove Comments.                                    |
| `cmgl`   | Change Media Gallery URL.                           |
| `rt`     | Retrieve Thumbnail.                                 |
| `acfa`   | Add Categories for Attachments.                     |
| `acetp`  | Add Custom Excerpt to Pages.                        |
| `cgs`    | Create a Global String.                             |
| `sfı`    | Support Featured Images.                            |
| `ssf`    | Support Search Form.                                |
| `epfs`   | Excluding pages from search.                        |
| `dx`     | Disable xmlrpc.php.                                 |
| `ehip`   | Escape HTML in Posts.                               |
| `ccgs`   | Create Custom Global Settings.                      |
| `rwab`   | Remove WordPress Admin Bar.                         |
| `ogmt`   | Add Open Graph Meta Tags.                           |
| `cpt`    | Add Custom Post Type.                               |
| `ipgft`  | Implement Preconnect to Google Fonts in Themes.     |
| `tctpl`  | Add Thumbnail Column to Post Listing.               |
| `lcfp`   | Add Lead Class to First Paragraph.                  |
| `ecptfs` | Exclude Custom Post Type from Search.               |
| `rqsfsr` | Remove Query String from Static Resources.          |
| `mj`     | Modify jQuery.                                      |
| `djra`   | Disable JSON Rest API.                              |
| `spt`    | Switch post type.                                   |
| `pl`     | PHP Logger.                                         |
| `assbt`  | Always show second bar in TinyMCE.                  |
| `ramıdur`| Remove Admin Menu Items Depending on User Role.     |
| `ramıdoea`|Remove Admin Menu Items Depending on Email Address  |
| `ramı`   | Reorder Admin Menu Items.                           |
| `themedoc`| Wordpress Themes info Style.css.                   |

license: MIT

repository: Alicannklc/wp-functions-snippets

repo_name: Alicannklc/wp-functions-snippets


text:
Ricart-Agrawala
===============
Developers : Kaltirimidou Efi

Language(s) : Java

Date: 2015, Jan

Usage : Assignment for course "Concurrency Programming & Software Security", Computer Science Department, Aristotle University of Thessaloniki

Development Tools : Java IDE NetBeans, OS Linux

Description :

The assignment was to create an program that creates efficient communication between processes implemented
as Java applications and implements the algorithm Ricart - Agrawala for distributed mutual exclusion.

repository: mgdx/Ricart-Agrawala

repo_name: mgdx/Ricart-Agrawala


text:
## Laravel MTM Momo API Integration

[![Total Downloads](https://poser.pugx.org/bmatovu/laravel-mtn-momo/downloads)](https://packagist.org/packages/bmatovu/laravel-mtn-momo)
[![Latest Stable Version](https://poser.pugx.org/bmatovu/laravel-mtn-momo/v/stable)](https://packagist.org/packages/bmatovu/laravel-mtn-momo)
[![License](https://poser.pugx.org/bmatovu/laravel-mtn-momo/license)](https://packagist.org/packages/bmatovu/laravel-mtn-momo)
[![Build Status](https://travis-ci.org/mtvbrianking/laravel-mtn-momo.svg?branch=master)](https://travis-ci.org/mtvbrianking/laravel-mtn-momo)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mtvbrianking/laravel-mtn-momo/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mtvbrianking/laravel-mtn-momo/?branch=master)
[![StyleCI](https://github.styleci.io/repos/175959117/shield?branch=master)](https://github.styleci.io/repos/175959117)

### Introduction

This package offers everything you need to integrate the [MTN MOMO API](https://momodeveloper.mtn.com) in your Laravel application. It provides a wrapper around the core MTN Momo API services, leaving you to worry about other parts of your application.

### [Installation](https://packagist.org/packages/bmatovu/laravel-mtn-momo)

To get started, install the package via the Composer package manager:

```
composer require bmatovu/laravel-mtn-momo
```

Next, for Laravel 5.3, 5.4; you need register the package service provider in the providers array of your `config/app.php` configuration file. For later Laravel versions, this package is auto-discoverable.

```php
'providers' => array(
    // ...
   Bmatovu\MtnMomo\MtnMomoServiceProvider::class,
),
```

**Configuration customization**

If you wish to customize the default configurations, you  may export the default configuration using

`php artisan vendor:publish --provider="Bmatovu\MtnMomo\MtnMomoServiceProvider" --tag="config"`

### Database Migration

The package service provider registers its own database migrations with the framework, so you should migrate your database after installation. The migration will create a tokens tables your application needs to store access tokens from MTN MOMO API.

```
php artisan migrate
```

### Prerequisites

You will need the following to get started with you integration...

1. Create a [**developer account**](https://momodeveloper.mtn.com/signup) with MTN MOMO.
2. Subscribe to a [**product/service**](https://momodeveloper.mtn.com/products) that you wish to consume.

### Bootstrapping

Now you need to run the `mtn-momo:init` command. This command will create the necessary settings in you're `.env` file as you walkthrough the steps. These settings are needed for authentication and communication with the MTN MOMO API.

```
php artisan mtn-momo:init
```

![screenshot](screenshot.png)

The package is equipped with [more Artisan commands](#more-artisan-commands) that will ease your work.

### Usage

```php
use Bmatovu\MtnMomo\Products\Collection;

$collection = new Collection();

// Request a user to pay
$collection->transact('EXT_REF_ID', '07XXXXXXXX', 100);
```

**Exception handling**

```php
use Bmatovu\MtnMomo\Products\Collection;
use Bmatovu\MtnMomo\Exceptions\CollectionRequestException;

try {
    $collection = new Collection();

    // Request a user to pay
    $collection->transact('EXT_REF_ID', '07XXXXXXXX', 100);
} catch(CollectionRequestException $e) {
    do {
        printf("\n\r%s:%d %s (%d) [%s]\n\r",
            $e->getFile(), $e->getLine(), $e->getMessage(), $e->getCode(), get_class($e));
    } while($e = $e->getPrevious());
}
```

**Logging**

Often you might need to log your API requests for debugging purposes. You can adding logging via [Guzzle middleware](http://docs.guzzlephp.org/en/stable/handlers-and-middleware.html#middleware);

```php
use Monolog\Logger;
use GuzzleHttp\Middleware;
use GuzzleHttp\MessageFormatter;
use Monolog\Handler\StreamHandler;+

$logger = new Logger('Logger');
$streamHandler = new StreamHandler(storage_path('logs/mtn-mono.log'));
$logger->pushHandler($streamHandler);
$format = "\r\n[Request] {request} \r\n[Response] {response} \r\n[Error] {error}.";
$messageFormatter = new MessageFormatter($format);
$logMiddleware = Middleware::log($logger, $messageFormatter);

$collection = new Collection();

$collection->push($logMiddleware);

// Request a user to pay
$collection->transact('EXT_REF_ID', '07XXXXXXXX', 100);
```

**Dive in**: [Source code documentation](https://mtvbrianking.github.io/laravel-mtn-momo)

### More Artisan commands

- Register client APP ID.

`php artisan mtn-momo:register-id`

- Validate client APP ID.

`php artisan mtn-momo:validate-id`

- Request client APP secret.

`php artisan mtn-momo:request-secret`

<hr/>

I Need help!
---
Feel free to [open an issue](https://github.com/mtvbrianking/laravel-mtn-momo/issues/new). Please be as specific as possible if you want to get help.

Reporting bugs
--
If you've stumbled across a bug, please help us by leaving as much information about the bug as possible, e.g.
- Steps to reproduce
- Expected result
- Actual result

This will help us to fix the bug as quickly as possible, and if you wish to fix it yourself feel free to [fork the package](https://github.com/mtvbrianking/laravel-mtn-momo) and submit a pull request!

repository: hamzamugabo/laravel-mtn-momo

gha_language: PHP

gha_license_id: MIT

repo_name: hamzamugabo/laravel-mtn-momo


text:
# Calendar Link

![.NET Core](https://github.com/MikhailMasny/calendar-link-app/workflows/.NET%20Core/badge.svg)

A web-application developed on the .NET 3.1 (LTS). The main idea of a web application is to develop a quickly generate a google calendar link. This repository can also serve as a template for creating the application with the account and some basic functionality.

## Getting Started

The developed web application is WebAPI. When you start, you need to follow the link: `/swagger` in order to start using it. By clicking on the link: `/api/Calendar`, you can enter the necessary data and get the generated link for google calendar.

## Application settings

For the correct functioning of web application, it is necessary to update the [appsettnigs.json](https://github.com/MikhailMasny/calendar-link-app/blob/master/src/Masny.WebApi/appsettings.json) file in the root directory of the web project, filled in according to the template below.

```
{
  "AppSettings": {
    "Secret": "your-secret",
    "EmailFrom": "",
    "SmtpHost": "your.smtp.host",
    "SmtpPort": 123,
    "SmtpUser"<EMAIL_ADDRESS>    "SmtpPass": "your-pass"
  },
  "ConnectionStrings": {
    "WebApiDatabase": "your-database"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*"
}
```

## Built with
- [ASP.NET Core 3.1](https://docs.microsoft.com/en-us/aspnet/core/);
- [Monolithic architecture](https://docs.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/common-web-application-architectures);
- [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/);

## Author
[Mikhail M.](https://mikhailmasny.github.io/) - Software Engineer;

## License
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/MikhailMasny/calendar-link-app/blob/master/LICENSE) file for details.

repository: MikhailMasny/calendar-link-app

repo_name: MikhailMasny/calendar-link-app


text:
# Building Your First baseweb App

The following walkthrough starts from literally nothing and shows every step to get to the standard demo app, as can be found in [https://github.com/christophevg/baseweb-demo](https://github.com/christophevg/baseweb-demo).

> Well, nothing is maybe too little. I assume you have access to a computer with a command line, python and ideally some virtual environment manager. Oh, and in all honesty, you might also want a browser ;-)

## Setup an environment

This is optional, still very much advised: prepare a suitable execution environment, with your favorite virtual environment runner - mine is PyEnv:

```console
% mkdir my-app
% cd my-app
% pyenv virtualenv my-app
% pyenv local my-app
```

## Getting baseweb

```console
% pip install baseweb
```

This is enough to install baseweb. Now to run your first baseweb app, you will need a webserver, like `gunicorn` with `eventlet` support:

```bash
% pip install https://github.com/benoitc/gunicorn/archive/ff58e0c6da83d5520916bc4cc109a529258d76e1.zip#egg=gunicorn==20.1.0
% pip install eventlet==0.33.2
```

(There's an issue requiring these specific versions: [https://stackoverflow.com/questions/67409452/gunicorn-importerror-cannot-import-name-already-handled-from-eventlet-wsgi](https://stackoverflow.com/questions/67409452/gunicorn-importerror-cannot-import-name-already-handled-from-eventlet-wsgi))

All set. Let's meet baseweb...

## Hello baseweb

You can simply run baseweb from your app folder:

```console
% gunicorn -k eventlet -w 1 baseweb.web:server
[2020-06-27 12:40:24 +0200] [68179] [INFO] Starting gunicorn 20.1.0
[2020-06-27 12:40:24 +0200] [68179] [INFO] Listening at: http://<IP_ADDRESS>:8000 (68179)
[2020-06-27 12:40:24 +0200] [68179] [INFO] Using worker: eventlet
[2020-06-27 12:40:24 +0200] [68182] [INFO] Booting worker with pid: 68182
```

And visit [http://localhost:8000](http://localhost:8000)...

![Hello baseweb](hello-baseweb-1.png)

Notice that baseweb has take the name of your app folder and uses that as the name for the application. That is in fact a fall-back in case the name isn't provided as an enrionment variable. Try starting baseweb using the following command:

```bash
% APP_NAME=hello gunicorn -k eventlet -w 1 baseweb.web:server
```

![Hello baseweb](hello-baseweb-2.png)

## Hello myapp

Although there is already a lot in your current browser window to talk about, running baseweb in this 'naked' form, results in pretty much an empty frame. Let's build our actual app on top of "baseweb as a Python module".

Create a file, `hello.py`:

```python
import os

from baseweb.web       import server
from baseweb.interface import register_component

register_component("hello.js", os.path.dirname(__file__))
```

And also create a Javascript file, `hello.js`:

```javascript
var Hello = {
  template : `
<div>
  <h1>Hello baseweb</h1>
</div>
`
};

router.addRoutes([
  { path: '/', component: Hello },
])
```

Now run your own baseweb app:

```bash
% gunicorn -k eventlet -w 1 hello:server
```

![Hello myapp](hello-myapp-1.png)

So what did you just do? You created a Vue.js component (`Hello`), registered it with baseweb, which hosts it in its, previously empty, Vuetify-enabled frame, and shows it when the 'route' points to the 'root'.

> There is a lot to discover and do with Vue.js. Baseweb leverages this enormous amount of power by wrapping a lot of the boilerplate in a way that it can be structured from Python. From there on, its mostly Vue.js magic for you to explore ;-)

## Hello <insert your name here>

Now, extend your `hello.py` with

```python
# set up a REST resource to handle hello requests from the UI

from flask import request
from flask_restful import Resource

from baseweb.rest import api

class Hello(Resource):
  def get(self):
    name = request.args["name"]
    return "Hello {0}".format(name)

api.add_resource(Hello, "/api/hello")
```

and update your `hello.js` to look like this:

```javascript
var Hello = {
  template : `
<div>
  <h1>Hello baseweb</h1>
  <vue-form-generator ref="vfg" :schema="schema" :model="model"></vue-form-generator>
  <v-btn @click="send_get()" class="primary">say hello</v-btn>
</div>
`,
  methods: {
    send_get: function() {
      $.get( "/api/hello", { "name" : this.model.name }, function( response ) {
        app.$notify({
          group: "notifications",
          title: "Response...",
          text:  response,
          type:  "success",
          duration: 10000
        });
      });
    }
  },
  data: function() {
    return {
      model: {
        name: ""
      },
      schema: {
        fields: [
          {
            type: "input",
            inputType: "text",
            label: "Name",
            model: "name",
            placeholder: "Your name",
            validator: VueFormGenerator.validators.string
          }
        ]
      }
    }
  }
};

router.addRoutes([
  { path: '/', component: Hello },
])
```

Run it again and now enter your name and this the button...

![Hello myapp](hello-myapp-2.png)

And there you have it, your first baseweb app: 66 lines of code provide you with a modern UI experience, generated forms, basic IO,...

## And There is More Where That Came From...

Replacing/adding post behaviour is rather straightforward given the get behaviour example.

Besides the more classic IO, baseweb als includes ready-to-use socket IO. Add the following snippets to your code files to see it in action:

```python
# set up socketio event handlers to handle hello events from the UI

from baseweb.socketio import socketio

@socketio.on("hello")
def on_hello(name):
  return "Hello {0} from socketio!".format(name)
```

```javascript
  // in your component's HTML template
  template : `
    ...
    <v-btn @click="send_socketio()" class="primary">say hello socket</v-btn>
  `

  // next to send_get
  send_socketio: function() {
    socket.emit("hello", this.model.name, function(response) {
      app.$notify({
        group: "notifications",
        title: "Response...",
        text:  response,
        type:  "success",
        duration: 10000
      });
    });
```

## At the End of This Tour...

... you are ready to take a look at the [baseweb demo app](https://github.com/christophevg/baseweb-demo), and see that, given some additional nuts and bolts, you basically have compiled the entire demo app yourself.

Make sure to look into [adding security](adding-security.md) in the mix and watch this documentation for more examples in the future or consider [contributing](contributing.md) in any way.

repository: christophevg/baseweb

gha_language: JavaScript

repo_name: christophevg/baseweb


text:
# Lab 1: Introduction to ARM Programming

In this lab, learn how to work with an ARM processor and the basics of ARM assemblyby programming some common routines.

## Working with the DE1-SoC Computer System
For this course, we will be working with the DE1-SoC Computer System,
which is composed of anARM Cortex-A9 processor and peripheral components located on the FPGA on your DE1-SoC board.
The IDE we will be using is the Intel FPGA Monitor Program 16.1.
In this part of the lab, you will learn how to program the Computer System in ARM assembly.

## Some programming challenges
### 1) Fast standard deviation computation
Suppose that you would like to use the ARM processor to compute the standard deviation of a signal.
The formula for the standard deviation is [here](https://www.mathsisfun.com/data/standard-deviation-formulas.html).

Unfortunately, implementing this formula requires multi-plication, division, and square root operations,
which are not available as instructions on all proces-sors and are slow to emulate using other instructions.
The standard deviation can be approximately computed in a more hardware-friendly way using the so-called “range rule”, where xmax and xmin are the maximum value and minimum value of the signal, respectively.

Write an ARM assembly program which computes the standard deviation of a signal, using the range rule.
The program should accept input values - more specifically, the number of samples inthe signal and their values
- using a similar approach as shown in Part 1.  Save your code in a filenamed ‘stddev.s’

(Hint:you can reuse your code from Part 1 to compute the maximum value.
Then, you can makea simple modification to this code to get code which computes the minimum.
Also, remember that dividing by a power of 2 can be implemented using shift instructions.)

### 2) Centering an array
It is often necessary to ensure that a signal is “centered” (that is, its average is 0).
For example,DC signals can damage a loudspeaker, so it is important to center an audio signal to remove DCcomponents before sending the signal to the speaker.
You can center a signal by calculating the average value of the signal and subtracting the aver-age from every sample of the signal.
Write an ARM assembly program to center a signal.
In this example, store the resulting centered signal ‘in place’ - i.e. in the same memory location that theinput signal is passed in.

The program should be able to accept the signal length as an input param-eter.
In order to simplify calculations, work with the assumption that only signal lengths thatare powers of two can be passed to the program.
Save your code in a file named ‘center.s

### 3) Sorting
Write an ARM assembly program which sorts an array in ascending order.
You could use the simple bubble sort algorithm:
You could also implement a more sophisticated sorting algorithm.
Store the resulting sorted array‘in place’. The program should be able to accept the array length as an input parameter.
Save yourcode in a file named ‘sort.s

repository: violetwei/Computer-Organization

path: /Lab 1/README.md

repo_name: violetwei/Computer-Organization


text:
# homelab-kubernetes

Ansible project for building out a simple Kubernetes cluster from scratch.

# Usage

Note: The server that is executing the playbooks needs to be within the
environment. These playbooks are not designed to handle floating IPs.

* Set up your AWS environment (1x dev box, 3x masters, 3x nodes)
  * AMI: CentOS 7 - x86-64 with HVM (although any other RHEL/CentOS/Fedora
  based distribution should work)
* ```git clone https://github.com/digaxfr/homelab-kubernetes.git```
* Configure ```homelab-kubernetes/hosts```
* ```ansible-playbook -i hosts deploy.yml```

# Progression

Note that these topics are high-level topics. They do not represent the actual
ansible roles.

| Topic         | Status       |
|---------------|--------------|
| aws bootstrap | Not started  |
| etcd          | Ansible done |
| flannel       | Ansible done |
| calico        | Not started  |
| docker        | Ansible done |
| kubernetes    | Manual notes |
| ipv6          | Manual notes |

## Container Networking

While I have work experience with Calico, I have decided to start off with
flannel first because it is simple for this project and something new to learn.
After the initial set of playbooks are complete, I will look to implement a
Calico based solution.

# License

MIT

repository: digaxfr/homelab-kubernetes

repo_name: digaxfr/homelab-kubernetes


text:
---
layout:     post
title:      OC_Runtime_system
subtitle:    read this document to gain an understanding of how the Objective-C runtime system works and how you can take advantage of it
date:       2017-02-04
author:
header-img: img/post-bg-ios9-web.jpg
catalog: true
tags:
    - Runtime
---

# [前言](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008048?language=objc)

#### runtime
>* Objective-C 是一门基于运行时的编程语言，
>```
>1)这意味着所有方法、变量、类之间的link，都会推迟到应用实际运行的最后一刻才会建立。
> 2)Foundation 框架实现了基于运行时的一个特性：
键值编码 (key-value-coding, KVC) 以及键值观察 (key-value observing, KVO)。
KVC 和 KVO 允许我们将 UI 和数据进行绑定。这也是 Rx 以及其他响应式框架实现的基础。
ps:而且MVVM的实现又可以借助“V-VM”第三方绑定框架进行实现
>```

>* 对象在 runtime.h 当中是这样定义的
><script src="https://gist.github.com/zhangkn/f5ed829af985c625e1cc054494643f57.js"></script>
>
>* [Objective-C 运行时以及 Swift 的动态性](https://segmentfault.com/a/1190000012362645)

#### runtime code

>* [runtime源码:它是完全开源的，并且开源了很长一段时间了](https://opensource.apple.com/source/objc4/objc4-208/runtime/)
>```
>https://opensource.apple.com/source/objc4/objc4-208/
>```
>
>* [ a git archive of all of the source code from http://opensource.apple.com/tarballs/ ](https://github.com/zhangkn/opensource.apple.com)
>
>* [github.com opensource-apple/objc4](https://github.com/opensource-apple/objc4/tree/master/runtime)
>
>* [github.com opensource-apple](https://github.com/opensource-apple)

# Who Should Read This Document

The document is intended for readers who might be interested in learning about the Objective-C runtime.

# Organization of This Document

>* [Runtime Versions and Platforms](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html#//apple_ref/doc/uid/TP40008048-CH106-SW1)
>* [Interacting with the Runtime](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtInteracting.html#//apple_ref/doc/uid/TP40008048-CH103-SW1)
>* [Messaging](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtHowMessagingWorks.html#//apple_ref/doc/uid/TP40008048-CH104-SW1)
>* [Dynamic Method Resolution](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtDynamicResolution.html#//apple_ref/doc/uid/TP40008048-CH102-SW1)
>* [Message Forwarding](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtForwarding.html#//apple_ref/doc/uid/TP40008048-CH105-SW1)
>* [Type Encodings](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html#//apple_ref/doc/uid/TP40008048-CH100-SW1)
>* [Declared Properties](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW1)

# I、 Runtime Versions and Platforms

#### Legacy and Modern Versions

>* In the legacy runtime
>```
>In the legacy runtime, if you change the layout of instance variables in a class, you must recompile classes that inherit from it
>```

>* In the modern runtime
>```
>In the modern runtime, if you change the layout of instance variables in a class, you do not have to recompile classes that inherit from it.
>```

# II、Interacting with the Runtime

>* Objective-C programs interact with the runtime system at three distinct levels
>```
> 1) through Objective-C source code;
> 2) through methods defined in the NSObject class of the Foundation framework;
> 3) and through direct calls to runtime functions.
>```

#### 0、Objective-C Source Code

For the most part, the runtime system works automatically and behind the scenes. You use it just by writing and compiling Objective-C source code.

#### 1、NSObject Methods: 「内省 (introspection)」机制：判别这个类能执行何种操作

>* `NSProxy`
```
@class NSMethodSignature, NSInvocation;
NS_ASSUME_NONNULL_BEGIN
NS_ROOT_CLASS
@interface NSProxy <NSObject> {
    Class	isa;
}
```

>* isKindOfClass:和isMemberOfClass:则检查对象是否在指定的类继承体系中
>```
>which test an object’s position in the inheritance hierarchy
>```
>* `respondsToSelector:`检查对象能否响应指定的消息；
>```
> which indicates whether an object can accept a particular message
>```
>* `conformsToProtocol:`检查对象是否实现了指定协议类的方法；
>```
>which indicates whether an object claims to implement the methods defined in a specific protocol
>```
>*`methodForSelector:`则返回指定方法实现的地址
>```
>which provides the address of a method’s implementation. Methods like these give an object the ability to introspect about itself.
>```

#### 3、Runtime Functions

The runtime system is a dynamic shared library with a public interface consisting of a set of functions and data structures in the header files located within the directory /usr/include/objc.

>* /usr/include/objc
>```
>devzkndeMacBook-Pro:bin devzkn$ cd  /usr/include/objc
devzkndeMacBook-Pro:objc devzkn$ tree -L 2
.
├── List.h
├── NSObjCRuntime.h
├── NSObject.h
├── Object.h
├── ObjectiveC.apinotes
├── Protocol.h
├── hashtable.h
├── hashtable2.h
├── message.h
├── module.modulemap
├── objc-api.h
├── objc-auto.h
├── objc-class.h
├── objc-exception.h
├── objc-load.h
├── objc-runtime.h
├── objc-sync.h
├── objc.h
└── runtime.h
>```

>* Objective-C runtime library support functions are implemented in the shared library found at /usr/lib/libobjc.A.dylib.
>
>* All of these functions are documented in [Objective-C Runtime Reference](https://developer.apple.com/documentation/objectivec/objective_c_runtime).

# III、[Messaging](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtHowMessagingWorks.html#//apple_ref/doc/uid/TP40008048-CH104-SW1)

 how the message expressions are converted into [objc_msgSend](https://developer.apple.com/documentation/objectivec/1456712-objc_msgsend) function calls, and how you can refer to methods by name？

#### 3.1、The objc_msgSend Function

>* [`objc_msgSend `](https://developer.apple.com/documentation/objectivec/1456712-objc_msgsend)
>
```
Sends a message with a simple return value to an instance of a class.
objc_msgSend(id _Nullable self, SEL _Nonnull op, ...)
1) self : A pointer that points to the instance of the class that is to receive the message.
2) op : The selector of the method that handles the message.
3) ... :A variable argument list containing the arguments to the method.
```

>* Note: `isa` variable
>```
> the isa pointer is required for an object to work with the Objective-C runtime system. An object needs to be “equivalent” to a struct objc_object (defined in objc/objc.h) in whatever fields the structure defines.
>```

>* Messaging Framework
>![](https://ws2.sinaimg.cn/large/006tNc79gy1fqxyuh7ri6g30980f4aa3.gif)
>```
>1) When a message is sent to an object, the messaging function follows the object’s isa pointer to the class structure where it looks up the method selector in the dispatch table.
>If it can’t find the selector there, objc_msgSend follows the pointer to the superclass and tries to find the selector in its dispatch table. Successive failures cause objc_msgSend to climb the class hierarchy until it reaches the NSObject class. Once it locates the selector, the function calls the method entered in the table and passes it the receiving object’s data structure.
>```
>
>
#### 3.2、Using Hidden Arguments

They’re inserted into the implementation when the code is compiled.

>* When objc_msgSend finds the procedure that implements a method, it calls the procedure and passes it all the arguments in the message. It also passes the procedure two hidden arguments:
>```
>1) The receiving object
>2) The selector for the method
>```

>*  A method refers to the receiving object as self, and to its own selector as _cmd. In the example below, _cmd refers to the selector for the strange method and self to the object that receives a strange message.
>```
>strange
{
    id  target = getTheReceiver();
    SEL method = getTheMethod();
    if ( target == self || method == _cmd )
        return nil;
    return [target performSelector:method];
}
self is the more useful of the two arguments. It is, in fact, the way the receiving object’s instance variables are made available to the method definition.
>```

#### 3.3 Getting a Method Address

>* The example below shows how the procedure that implements the setFilled: method might be called:
><script src="https://gist.github.com/zhangkn/9b57c2fd678df8897bb654a2da3cdf90.js"></script>
>
>

# IV、[Dynamic Method Resolution](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtDynamicResolution.html#//apple_ref/doc/uid/TP40008048-CH102-SW1)

 how you can provide an implementation of a method dynamically?

#### 4.1 Dynamic Method Resolution

>* For example, the Objective-C declared properties feature includes the @dynamic directive:
>```
>@dynamic propertyName;
>//which tells the compiler that the methods associated with the property will be provided dynamically.
>```

>* [Adds a new method to a class with a given name and implementation.](https://developer.apple.com/documentation/objectivec/1418901-class_addmethod)
><script src="https://gist.github.com/zhangkn/eb415d8dd908d5b73a292334cadaa18a.js"></script>

>*  dynamically add `dynamicMethodIMP ` to a class as a method  using `resolveInstanceMethod`
><script src="https://gist.github.com/zhangkn/9a8464db30e597d9ebb5291070b403f1.js"></script>

>* If` respondsToSelector:` or `instancesRespondToSelector: `is invoked, the dynamic method resolver is given the opportunity to provide an `IMP` for the selector first. If you implement `resolveInstanceMethod:` but want particular selectors to actually be forwarded via the forwarding mechanism, you return NO for those selectors.
>```
>动态方法解析会在消息转发机制浸入前执行。如果 respondsToSelector: 或 instancesRespondToSelector: 方法被执行，动态方法解析器将会被首先给予一个提供该方法选择器对应的 IMP 的机会。如果你想让该方法选择器被传送到转发机制，那么就让resolveInstanceMethod: 返回 NO
>```

>* [ Objective-C Runtime Programming Guide](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008048) > [Type Encodings](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html#//apple_ref/doc/uid/TP40008048-CH100)
>* [resolveClassMethod](https://developer.apple.com/documentation/objectivec/nsobject/1418889-resolveclassmethod?language=objc)
>* [resolveInstanceMethod](https://developer.apple.com/documentation/objectivec/nsobject/1418500-resolveinstancemethod?language=objc)
>

#### 4.2 Dynamic Loading

Although there is a runtime function that performs dynamic loading of Objective-C modules in Mach-O files (`objc_loadModules`, defined in `objc/objc-load.h`), Cocoa’s NSBundle class provides a significantly more convenient interface for dynamic loading—one that’s object-oriented and integrated with related services.

>* See the [`NSBundle`](https://developer.apple.com/documentation/foundation/bundle) class specification in the Foundation framework reference for information on the NSBundle class and its use.
>* See OS X ABI `Mach-O File Format Reference` for information on Mach-O files.
>

# V 、 Message Forwarding

before announcing the error, the runtime system gives the receiving object a second chance to handle the message.

#### 5.0 重定向

>* 在消息转发机制执行前，Runtime 系统会再给我们一次偷梁换柱的机会:即通过重载`- (id)forwardingTargetForSelector:(SEL)aSelector` 方法替换消息的接受者为其他对象：
><script src="https://gist.github.com/zhangkn/a6c1dfc780cafe966d7e0167c0967ae6.js"></script>
>

#### 5.1 Forwarding

>* If you send a message to an object that does not handle that message,
>```
>before announcing an error the runtime sends the object a `forwardInvocation:` message with an `NSInvocation` object as its sole argument—the `NSInvocation` object encapsulates the original message and the arguments that were passed with it.
>```
>* You can implement a forwardInvocation: method to give a default response to the message, or to avoid the error in some other way.
>```
> As its name implies, forwardInvocation: is commonly used to forward the message to another object.
>```
```

>* 1) simply passes the message on to an instance of the other class
><script src="https://gist.github.com/zhangkn/ae30c1e9069b76dbba25cf4b4808dde7.js"></script>
>
>

>* 2) The second chance offered by a forwardInvocation: message provides a less ad hoc solution to this problem, and one that’s dynamic rather than static.
>```
当动态方法解析不作处理返回NO时，消息转发机制会被触发。在这时`forwardInvocation:`方法会被执行
```
><script src="https://gist.github.com/zhangkn/bc3cfae0f03d5ebaceb2f7f67dcbf6bf.js"></script>
>

#### 5.2 Forwarding and Multiple Inheritance(转发和多继承)

>* 转发和继承相似，可以用于为Objc编程添加一些多继承的效果。就像下图那样，一个对象把消息转发出去，就好似它把另一个对象中的方法借过来或是“继承”过来一样。
>![](https://ws1.sinaimg.cn/large/006tNc79gy1fqy5qfrb8ag30ag06pq2t.gif)

>* In this illustration, an instance of the Warrior class forwards a negotiate message to an instance of the Diplomat class. The Warrior will appear to negotiate like a Diplomat. It will seem to respond to the negotiate message, and for all practical purposes it does respond (although it’s really a Diplomat that’s doing the work).
>```
>图中 `Warrior` 和 `Diplomat` 没有继承关系，但是 `Warrior` 将`negotiate` 消息转发给了 `Diplomat` 后，就好似 `Diplomat` 是 `Warrior` 的超类一样。
>```

#### 替代者对象(Surrogate Objects)

>* Forwarding not only mimics multiple inheritance, it also makes it possible to develop lightweight objects that represent or “cover” more substantial objects. The surrogate stands in for the other object and funnels messages to it.

#### Forwarding and Inheritance

>* an object is able to forward a message to its surrogate, you would implement methodSignatureForSelector:
><script src="https://gist.github.com/zhangkn/5f4daeb208f39ad959e369c0806e9e72.js"></script>

# VI 、Declared Properties

#### Property Type and Functions

>* The Property structure defines an opaque handle to a property descriptor.
>```
>typedef struct objc_property *Property;
>```
>
>* You can use the functions class_copyPropertyList and protocol_copyPropertyList to retrieve an array of the properties associated with a class (including loaded categories) and a protocol respectively:
>```
>objc_property_t *class_copyPropertyList(Class cls, unsigned int *outCount)
objc_property_t *protocol_copyPropertyList(Protocol *proto, unsigned int *outCount)
>```
>
>* print a list of all the properties associated with a class using the following code:
><script src="https://gist.github.com/zhangkn/55bd9540b5a8e907b6dd128a7bceaecc.js"></script>
>
>

# VII、Objective-C Associated Objects

```
 void objc_setAssociatedObject ( id object, const void *key, id value, objc_AssociationPolicy policy );
 id objc_getAssociatedObject ( id object, const void *key );
 void objc_removeAssociatedObjects ( id object );
```

这些方法以键值对的形式动态地向对象添加、获取或删除关联值。其中关联政策是一组枚举常量：

```
enum {
   OBJC_ASSOCIATION_ASSIGN  = 0,
   OBJC_ASSOCIATION_RETAIN_NONATOMIC  = 1,
   OBJC_ASSOCIATION_COPY_NONATOMIC  = 3,
   OBJC_ASSOCIATION_RETAIN  = 01401,
   OBJC_ASSOCIATION_COPY  = 01403
};
```

>* 例子： 动态添加属性的例子:关联对象
><script src="https://gist.github.com/zhangkn/e427935b259e86a7f9058a0dc57fc489.js"></script>
>

# VIII、Method Swizzling

>* 友盟统计模块的例子，使用Swizzle
><script src="https://gist.github.com/zhangkn/aa1e1704963fbd4b7e6cd1dcf4ab07e5.js"></script>

# IX、Class-Definition Data Structures

>* /usr/include/objc

>* include/objc/objc.h
 ```
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/objc/objc.h
 ```

#### SEL

Selectors generated by the compiler are automatically mapped by the runtime when the class is loaded.
You can add new selectors at runtime and retrieve existing selectors using the function `sel_registerName`

>* SEL /// An opaque type that represents a method selector.
><script src="https://gist.github.com/zhangkn/38f514da906eb6559956a54300021601.js"></script>

>* Discussion
>```
>When using selectors, you must use the value returned from sel_registerName or the Objective-C compiler directive @selector(). You cannot simply cast a C string to SEL.
>```

#### objc_method_list

>* Contains an array of method definitions.
>```
>struct objc_method_list {
    struct objc_method_list *obsolete;
    int
method_count;
    struct objc_method
method_list[1];
};
>```

#### objc_method_description

>* Defines an Objective-C method.
>```
>struct objc_method_description {
    SEL name;
    char *
types;
};
>```

####  isa

The isa pointer, as the name suggests, points to the object's class which maintains a dispatch table. This dispatch table essentially contains pointers to the methods the class implements, among other data.

>* Note: `isa` variable
>```
> the isa pointer is required for an object to work with the Objective-C runtime system. An object needs to be “equivalent” to a struct objc_object (defined in objc/objc.h) in whatever fields the structure defines.
>```

>* [Key-Value Observing Implementation Details:Automatic key-value observing is implemented using a technique called isa-swizzling](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/KeyValueObserving/Articles/KVOImplementation.html#//apple_ref/doc/uid/20002307-BAJEAIEE)
>```
>You should never rely on the isa pointer to determine class membership. Instead, you should use the class method to determine the class of an object instance.
>1) When an observer is registered for an attribute of an object the isa pointer of the observed object is modified, pointing to an intermediate class rather than at the true class. As a result the value of the isa pointer does not necessarily reflect the actual class of the instance.
>```

#### objc_class

>* objc_class
><script src="https://gist.github.com/zhangkn/e427935b259e86a7f9058a0dc57fc489.js"></script>
>* class-diagram
>![](https://ws1.sinaimg.cn/large/006tNc79ly1fqy2tsj6pxj30px0r5wfl.jpg)

#### objc_object

>* /// Represents an instance of a class.
><script src="https://gist.github.com/zhangkn/4ff01a8c94c7f64641bc4c9f3db7aa0f.js"></script>

#### id

>* /// A pointer to an instance of a class.
```
typedef struct objc_object *id;
```

#### [Class](https://developer.apple.com/documentation/objectivec/1418956-nsobject/1571949-class)

>* /// An opaque type that represents an Objective-C class.
```
typedef struct objc_class *Class;
```

#### Method

>* /// An opaque type that represents a method in a class definition.
```
typedef struct objc_method *Method;
```

#### objc_method

><script src="https://gist.github.com/zhangkn/d4b4ae2de21f2d27eb313c1b3fa74266.js"></script>

#### Ivar

>* /// An opaque type that represents an instance variable.
```
typedef struct objc_ivar *Ivar;
```

####  objc_ivar

>* <script src="https://gist.github.com/zhangkn/2f39d245b51afa3d1aea48cfde2b3778.js"></script>

>* 可以根据实例查找其在类中的名字，也就是“反射”：
><script src="https://gist.github.com/zhangkn/3e6ec52fccb777bc11e6704e13a70b92.js"></script>
>
>

#### IMP

>* /// A pointer to the function of a method implementation.
><script src="https://gist.github.com/zhangkn/e7a221ee55f1e7dec07ef9445883c949.js"></script>
>

#### [Cache](https://developer.apple.com/documentation/objectivec/objective_c_runtime/objc_cache?language=objc)

>* objc_cache
```
typedef struct objc_cache *Cache
```

#### objc_cache

Performance optimization for method calls. Contains pointers to recently used methods.

>* objc_cache
><script src="https://gist.github.com/zhangkn/50501ed1f84eb847cfcdf1ee5cf4fb6a.js"></script>

#### Category

>* An opaque type that represents a category.
>```
>typedef struct objc_category *Category;
>```

#### objc_protocol_list

>* Represents a list of formal protocols.
>```
>struct objc_protocol_list {
    struct objc_protocol_list *next;//A pointer to another objc_protocol_list data structure.
    long
count;//The number of protocols in this list.
    Protocol * _Nullable
list[1];//An array of pointers to
Class
 data structures that represent protocols.
};
>```

#### objc_property_attribute_t

>* Defines a property attribute.
>

#### [objc4/runtime/Messengers.subproj/objc-msg-arm.s](https://github.com/opensource-apple/objc4/blob/master/runtime/Messengers.subproj/objc-msg-arm.s)

这个文件是汇编写成的.

#### objc_property_t

>* objc_property_t
```
typedef struct objc_property *Property;
typedef struct objc_property *objc_property_t;///// An opaque type that represents an Objective-C declared property.
```

#### objc_super

>* Specifies the superclass of an instance.
><script src="https://gist.github.com/zhangkn/be110239ba7d76aeb2960fb91ff21d5e.js"></script>

# X、Objective-C Runtime Reference

>* Objective-C runtime library support functions are implemented in the shared library found at /usr/lib/libobjc.A.dylib.

#### Topics

###### 10.1 Working with Classes

>* class_getName
>```
>Returns the name of a class.
>```

###### 10.2 Adding Classes

>* objc_allocateClassPair
>```
>Creates a new class and metaclass.
>```
```

###### 10.3 Instantiating Classes

>* class_createInstance
>```
Creates an instance of a class, allocating memory for the class in the default malloc memory zone.
```

###### 10.4 Working with Instances

>* object_getClassName
>```
>object_getClassName
Returns the class name of a given object.
>```

###### 10.5 Obtaining Class Definitions

>* objc_getClassList
>```
>objc_getClassList
Obtains the list of registered class definitions.
>```

###### 10.6 Working with Instance Variables

>* ivar_getOffset
>```
>ivar_getOffset
Returns the offset of an instance variable.
>```

###### 10.6 Associative References

>* [AssociatedObject,常用来新增属性](https://kunnan.github.io/2017/02/04/Objective-C_Runtime_system/#viiobjective-c-associated-objects)
>```
1) objc_setAssociatedObject
Sets an associated value for a given object using a given key and association policy.
2) objc_getAssociatedObject
Returns the value associated with a given object for a given key.
3) objc_removeAssociatedObjects
Removes all associations for a given object.
>```

###### 10.7  Sending Messages

When it encounters a method invocation, the compiler might generate a call to any of several functions to perform the actual message dispatch, depending on the receiver, the return value, and the arguments. You can use these functions to dynamically invoke methods from your own plain C code, or to use argument forms not permitted by NSObject’s perform... methods. These functions are declared in /usr/include/objc/objc-runtime.h.

>* `objc_msgSend` sends a message with a simple return value to an instance of a class.

>* `objc_msgSend_stret` sends a message with a data-structure return value to an instance of a class.

>* `objc_msgSendSuper` sends a message with a simple return value to the superclass of an instance of a class.

>* `objc_msgSendSuper_stret` sends a message with a data-structure return value to the superclass of an instance of a class.

###### [10.8 Working with Methods](https://kunnan.github.io/2017/02/04/Objective-C_Runtime_system/#viiimethod-swizzling)

[常用来method-swizzling](https://kunnan.github.io/2017/02/04/Objective-C_Runtime_system/#viiimethod-swizzling)

>* method_getImplementation
>```
>method_getImplementation
Returns the implementation of a method.
>```

###### 10.9 Working with Libraries

>* class_getImageName
>```
>class_getImageName
Returns the name of the dynamic library a class originated from.
>```
>

###### 10.10 Working with Selectors

>* [sel_registerName](https://developer.apple.com/documentation/objectivec/1418557-sel_registername?language=objc)
>```
Registers a method with the Objective-C runtime system, maps the method name to a selector, and returns the selector value.
>```

###### 10.11 Working with Protocols

>* objc_getProtocol
>```
>objc_getProtocol
Returns a specified protocol.
>```

###### 10.12 Working with Properties

>* property_getAttributes
>```
>property_getAttributes
Returns the attribute string of a property.
>```

###### 10.13 Using Objective-C Language Features

>* imp_getBlock
>```
>imp_getBlock
Returns the block associated with an IMP that was created using
imp_implementationWithBlock
>```

###### 10.14 [Class-Definition Data Structures](https://kunnan.github.io/2017/02/04/Objective-C_Runtime_system/#ixclass-definition-data-structures)

>* [Class](https://developer.apple.com/documentation/objectivec/class?language=objc)
>```
>Class
An opaque type that represents an Objective-C class.
>```

###### 10.15 Instance Data Types

>* These are the data types that represent objects, classes, and superclasses.

>* `id` pointer to an instance of a class.

>* `id` represents an instance of a class.

>* `objc_super` specifies the superclass of an instance.

###### 10.16 Associative References
>* ` objc_AssociationPolicy ` Type to specify the behavior of an association.

# XI、See Also

>* [Objective-C 运行时以及 Swift 的动态性](https://segmentfault.com/a/1190000012362645)
>

>* [Objective-C Runtime Reference ](https://developer.apple.com/documentation/objectivec/objective_c_runtime)
>```
>describes the data structures and functions of the Objective-C runtime support library. Your programs can use these interfaces to interact with the Objective-C runtime system. For example, you can add classes or methods, or obtain a list of all class definitions for loaded classes.
>```
>

>* [Objective-C Runtime  Reference ](http://yulingtianxia.com/blog/2014/11/05/objective-c-runtime/)
>* [Objective-C Runtime Programming Guide](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008048)
>* [Objective-C Runtime源码](https://opensource.apple.com/source/objc4/)
>*  [Objective-C runtime之运行时的基本特点](http://blog.csdn.net/wzzvictory/article/details/8615569)
>* [Understanding the Objective-C Runtime](http://cocoasamurai.blogspot.jp/2010/01/understanding-objective-c-runtime.html)
>

gha_language: HTML


text:
## Commentaries

Again, Binary Tree or searching in a Binary was not taught in lecture. However, you can think of each unique path (whether left or right of a node), to be a linked list (hey this was taught!!).

This sit in lab was testing our use of generics and data structures (in particular a "modified" version of a linked list).

In the comparison of generics, you can either choose to do casting/parsing (`Integer.parseInt()`) or use a generic `E extends Comparable<E>` (as in my code). This means to say that my generic type must be a type Comparable, and it must be able to compare with another object of type E.

The advantage of having a Comparable generic is that you get to use the `.compareTo()` method. Sweetly, `Integer` type is actually a `Comparable` type too, which you can use to compare two elements.

`findMin` and `findMax` just requires you to traverse left or right respectively all the way until the very last node. This will work out nicely if your `insert()` method does it right.


text:
[![PyPI version](https://badge.fury.io/py/dco-org-check.svg)](https://badge.fury.io/py/dco-org-check)

# DCO org check

Script to check a GitHub org for commits without a DCO signoff that should have one.

Loads config file ( defaults to dco_org_check.yaml, or specify at the command line after -c ) for credentials

## Config file options ( set argument is the default if not specified )

```yaml
# GitHub access token ( required )
token:
# Github org name ( required )
org:
# name of csvfile
csvfile: dco_issues.csv
# list of directory names where previous commit signoffs are in the repo
dco_signoffs_directories:
  - dco-signoffs
# set to 1 if you want to have the script create the previous commits signoff files
create_prior_commits_file: 1
# directory where to store the prior commits files
create_prior_commits_dir: dco-signoffs
# list of repos to ignore when scanning
ignore_repos:
  - repo1
  - repo2
  - ...
# list of repos to only look at when scanning
only_repos:
  - repo1
  - repo2
  - ...
```

## Useful tools to make doing DCO signoffs easier

There are a number of great tools out there to manage DCO signoffs for developers to make it much easier to do signoffs.

- DCO command line tool, which let's you do a single signoff for an entire repo ( https://github.com/coderanger/dco )
- GitHub UI integrations for adding the signoff automatically ( https://github.com/scottrigby/dco-gh-ui )
  - Chrome - https://chrome.google.com/webstore/detail/dco-github-ui/onhgmjhnaeipfgacbglaphlmllkpoijo
  - Firefox - https://addons.mozilla.org/en-US/firefox/addon/scott-rigby/?src=search

SPDX-License-Identifier: Apache-2.0

repository: swinslow/dco-org-check

repo_name: swinslow/dco-org-check


text:
# About this repository 🗣

![](https://img.shields.io/github/license/Leomhl/nuvigator_examples)

This repository was created thinking create a example for each different feature of [Nuvigator](https://github.com/nubank/nuvigator), a framework to manage routes on [Flutter](https://github.com/flutter/flutter) framework.

Please, help us to improve this repository.
Together we're better! :)

Não manja de inglês? Leia o [README](https://github.com/Leomhl/nuvigator_examples/blob/master/README_PT.md) em português!

## Sub repositories

![](https://img.shields.io/badge/-dart-blue?style=flat-square&logo=dart)
![](https://img.shields.io/badge/-flutter-blue?style=flat-square&logo=flutter)
![](https://img.shields.io/badge/-Nuvigator-purple?style=flat-square&logo=Nuvigator)

We organize the repository in some projects, are they:

* **Simple implementation**
	* The simple implementation It consists in the most [basic example](https://github.com/nubank/nuvigator#quick-start) suggested on documentation of [Nuvigator](https://github.com/nubank/nuvigator).
* **Simple nuroute implementation**
	* The simple nuroute implementation It consists in the most [basic complete example](https://github.com/nubank/nuvigator#quick-start) suggested on documentation of [Nuvigator](https://github.com/nubank/nuvigator). Basically this is a personalization of the route using instances of `NuRoute` and `Nurouter`.
* **Simple route parameters implementation**
	* The simple implementation of passing parameters by route consists of the multiple ways of passing parameters between application screens that nuvigator provides.
* **Nested nuvigators**
	* The nested nuvigators (nested nuvigators) implementation details how to create multiple streams in the application and link them together so that a modular design can have its navigation flow concentrated in each module but communicating with the entire application.

## Plugins 📟

Below we list the plugins used in the projects.

- [Nuvigator](https://github.com/nubank/nuvigator)

gha_language: Dart


text:
Mastermind
==========

**How to play**

Download the repo on the command line type: ruby board.rb

type "s" when ready to begin the game

The player thinks of a pattern and the computer will attempt to get the correct answer.

The game will ask you to think of a pattern it can be any sequence of 4 colors, the available colors are:
R = Red,
B = Blue,
G = Green,
P = Purple,
Y = Yellow,
O = Orange

write it down so you can compare with the computer guesses.

The computer will guess and ask how many were correct and how many were close to correct (correct color, wrong position)

To learn more about the game:
http://en.wikipedia.org/wiki/Mastermind_(board_game)#Gameplay_and_rules

**Running tests**

To run the tests run bundle install to get an updated version of RSpec and type rspec on the command line to receive feedback from the tests.

repository: erolg/Mastermind

repo_name: erolg/Mastermind


text:
Naming Convention
=================
Prefixes Designate Scope
------------------------
Most of my own confusion when reading unfamiliar C++ is determining from which scope a name is drawn.

We've got parameters, local and instance variables, and class, file and namespace statics to
distinguish. ZooLib uses name prefixes to make distinct the scope in which a name is defined.

- `f` instance variables. (f is an abbreviation of 'field', cf MacApp/Taligent/Object Pascal).
	They're almost always private.
- `p` private functions and methods.
- `s` static variables and functions. These are class or namespace static, and
	are publicly accessible.
- `sp` static private variables and functions. If file static then obviously they're not
	publicly visible. If class static, then they're marked protected if intended for use by
	subclasses, private if only for use by the class itself.
- `i` input parameter. This is the most common type of parameter and probably conforms most
	closely to the classic definition of a parameter. Its value at entry will very likely
	affect what the function does. Its value in the calling scope will not be changed by the
	function's execution. If the function cannot operate without its value, then it's a compulsory
	parameter and is passed by value or const reference. If the parameter is optional it's passed
	by const pointer, so the caller can pass nullptr indicating that no value is available.
- `o` output parameter. Output parameters let a function return multiple values. Its value on
	entry will not affect the function's execution and the function takes full responsibility for
	giving it an appropriate value before returning. If the parameter is compulsory it is passed
	by non-const reference. If optional, by non-const pointer.
- `io` input/output parameter. An input/output parameter's value at entry may affect the function's
	execution and should thus have a sensible value. Its value in the calling scope may be changed
	by the function's execution. If compulsory, pass by non-const reference. If optional by
	non-const pointer, just as with output parameters.
- `e` enumeration value. Enumerations tend to be class public, so we don't encode the scope
	itself, just that it is an enumeration value.
- `E` enumeration type

Names
-----
Types are nouns or noun phrases; functions are verbs or verb phrases.

Names that are phrases are CamelCased, each word in the phrase has its first letter upper cased.
If there is a prefix, the prefix is lower cased and the 'meat' starts with an upper case letter,
the remainder being CamelCased.

For non-class types I'll often use a `_t` suffix, and for template types/classes/functions
a `_T` suffix.

Classes and method names have an upper case initial letter.

Local variables have a lower case initial letter. I often use a the prefix, but the goal is just
to make it read well.

Pretty much everything else has a scope prefix.

Compound Names
--------------
This may be the most controversial stylistic decision, but I've found it helpful.

Much of ZooLib consists of abstract interfaces and a suite of concrete implementations. In such
situations the base is named with a noun or noun phrase (CamelCased of course). Concrete
implementations are named with the base name, an underscore, and a distinguishing noun or noun
phrase. This approach keeps hierarchies together when their members are sorted lexicographically.
It also provides a strong hint of a type's likely compatibility – if you see an XxxYyy_Zzz it can
generally be passed to a function expecting an XxxYyy.

For types that are related but not type-compatible I use reverse English order noun phrases, so
XxxYyy and XxxZzz are probably part of an Xxx package.

The goal is not to be rigidly prescriptive, but to make several hundreds of names somewhat
predictable and intelligible.

extension: markdown


text:
# Golang dice

This is a simple library for rolling RPG-style dice. The following formats are supported:

* Standard: `xdy[[k|d][h|l]z][+/-c]` - rolls and sums x y-sided dice, keeping or dropping the lowest or highest z dice and optionally adding or subtracting c. Example: 4d6kh3+4
* Versus: `xdy[e|r]vt` - rolls x y-sided dice, counting the number that roll t or greater.
* EotE: `xc [xc ...]` - rolls x dice of color c (b, blk, g, p, r, w, y) and returns the aggregate result.

Adding an `e` to the Versus rolls above makes dice 'explode' - Dice are rerolled and have the
rolled value added to their total when they roll a y. Adding an `r` makes dice rolling a y add another die
to the pool instead.

## Original code
https://github.com/justinian/dice

## Installation

The usual `go get github.com/justinian/dice`.

## Usage

The main entrypoint to the library is the `dice.Roll` function:

```go
func Roll(desc string) (fmt.Stringer, error)
```

The `desc` argument takes any string that matches the formats above and rolls
correctly. The result is returned as a `RollResult` (which is a `fmt.Stringer`
for simple printing, but also contains different information based on the type
of roll). See the individual roll styles for their result structures.

repository: mrbentarikau/pagst

gha_language: Go

repo_name: mrbentarikau/pagst


text:
Port Overlays
===

This directory contains the custom port overlays we're using for building depdencies. We're using overlays because some of our dependencies are quite old and getting working combinations from modern vcpkg was proving untenable. Overtime as our dependency versions are modernized, most if not all of the overlay ports will likely be removed.

Updating a Port
---

The easiest way to update a port is to find the version of the port in the `microsoft/vcpkg` repository and extract it using a tool. So, for instance if we wanted to update our curl dependency from 7.80.0 to 7.84.0, we would look in the `path/to/microsoft/vcpkg/versions/c-/curl.json` file and find the tree-ish listed for 7.84.0. One thing to pay attention to here is that there can be multiple port versions for a given dependency version. So we want to pick the higest port version for the dependency at the version we are upgrading. In our hypothetical curl case that I may have just done, this gives us a treeish value of:

   `588fa4742c417db9d7c0f89e652b618296388d1e`

Once we have the tree-ish, we just need to be able to extract all of the files and store them in our overlay ports directory. The easiest approach for this is to use something like [this script](https://gist.github.com/mhl/498447/b245d48f2a22301415a30ca8a68241f96e0b3861) to do just that. If you put that script on your path (and remember to `chmod +x path/to/extract-tree-from-git.py`) you can follow these simple steps for updating the port:

```bash
$ rm ports/curl/*
$ cd path/to/microsoft/vcpkg
$ extract-tree-from-git.py 588fa4742c417db9d7c0f89e652b618296388d1e path/to/tiledb/ports/curl/
$ cd path/to/tiledb
$ git add ports
$ git commit
```

repository: TileDB-Inc/TileDB

branch_name: refs/heads/dev

repo_name: TileDB-Inc/TileDB


text:
# Indy Configurations

In the Blockchain Automation Framework project, ansible is used to automate the certificate generation, putting them in vault and generate value files, which are then pushed to the repository for deployment, using GitOps. This is achieved using Ansible playbooks.
Ansible playbooks contains a series of roles and tasks which run in sequential order to achieve the automation.

```
/hyperledger-indy
|-- charts
|   |-- indy-auth-job
|   |-- indy-cli
|   |-- indy-domain-genesis
|   |-- indy-domain-genesis
|   |-- indy-key-mgmt
|   |-- indy-ledger-txn
|   |-- indy-node
|   |-- indy-pool-genesis
|-- images
|-- configuration
|   |-- roles/
|   |-- samples/
|   |-- playbook(s)
|   |-- cleanup.yaml
|-- releases
|   |-- dev/
|-- scripts
|   |-- indy_nym_txn
|   |-- setup indy cluster
```

For Hyperledger-Indy, the ansible roles and playbooks are located at `/platforms/hyperledger-indy/configuration/`
Some of the common roles and playbooks between Hyperledger-Indy, Hyperledger-Fabric and R3-Corda are located at
`/platforms/shared/configuration/`

--------

## Roles for setting up Indy Network

Roles in ansible are a combination of logically inter-related tasks.

To deploy the indy network, run the deploy-network.yaml in `blockchain-automation-framework\platforms\hyperledger-indy\configuration\`
The roles included in the file are as follows.

## **check/auth_job**

* This role checks all auth jobs completing.
* Check if Indy  auth job pod for trustee is completed
* Check if Indy  auth job pod for stewards is completed
* Check if Indy  auth job pod for endorser is completed
* Check if Indy  auth job pod for baf-ac is completed

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/check/auth_job/README.md) for detailed information.

## **check/crypto**

* This role is checking if all crypto jobs are completed and all crypto data are in Vault.
* Check if Indy Key management pod for trustee is completed
* Check if Indy Key management pod for stewards is completed
* Check if Indy Key management pod for endorser is completed
* Check trustee in vault
* Check stewards in vault
* Check endorser in vault

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/check/crypto/README.md) for detailed information.

## **check/k8_component**

* This role is used for waiting to kubernetes component.
* Wait for {{ component_type }} {{ component_name }}
* Wait for {{ component_type }} {{ component_name }}
* Wait for {{ component_type }} {{ component_name }}
* Get a ServiceAccount token for {{ component_name }}
* Store Token

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/check/k8_component/README.md) for detailed information.

## **check/validation**

* This role checks for validation of network.yaml
* Check Validation
* Print error and end playbook if genesis steward count limit fails
* Print error and end playbook if total trustee count limit fails

## **clean/flux**

* Delete Helm release
* Wait for deleting of Helm release flux-{{ network.env.type }}

## **clean/gitops**

* Delete release files
* Git push

## **clean/k8s_resourses**

* Remove all Helm releases of organization {{ organization }}
* Get all existing Cluster Role Bindings of organization {{ organization }}
* Remove an existing Cluster Role Binding of {{ organization }}
* Remove an existing Namespace {{ organization_ns }}
* Remove an existing Storage Class of {{ organization }}

## **clean/vault**

* Remove Indy Crypto of {{ organization }}
* Remove Policies of trustees
* Remove Policies of stewards
* Remove Policies of endorsers

## **create/helm_component/auth_job**
#### This role create the job value file for creating Vault auth methods

* Ensures {{ release_dir }}/{{ component_type }}/{{ component_name }} dir exists
* Get the kubernetes server url
* Trustee vault policy and role generating
* Stewards vault policy and role generating
* Endorser vault policy and role generating
* baf-ac vault policy and role generating

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/helm_component/auth_job/README.md) for detailed information.

## **create/helm_component/crypto**
#### This role create the job value file for creating Hyperledger Indy Crypto

* Ensures {{ release_dir }}/{{ component_type }}/{{ component_name }} dir exists
* Trustee crypto generating
* Stewards crypto generating
* Endorser crypto generating

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/helm_component/crypto/README.md) for detailed information.

## **create/helm_component/domain_genesis**
#### This role create the config map value file for storing domain genesis for Indy cluster.

* Ensures {{ release_dir }}/{{ component_type }}/{{ component_name }} dir exists
* Generate domain genesis for organization
* create value file for {{ component_name }} {{ component_type }}

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/helm_component/domain_genesis/README.md) for detailed information.

## **create/helm_component/ledger_txn**
#### This role create the job value file for Indy NYM ledger transactions

* Ensures {{ release_dir }}/{{ component_type }}/{{ component_name }} dir exists
* Create HelmRelease file
* Get identity data from vault
* create value file for {{ new_component_name }} {{ component_type }}

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/helm_component/ledger_txn/Readme.md) for detailed information.

## **create/helm_component/node**
#### This role creates value file for Helm Release of stewards.

* Ensures {{ release_dir }}/{{ component_name }} dir exists
* create value file for {{ component_name }} {{ component_type }}

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/helm_component/node/README.md) for detailed information.

## **create/helm_component/pool_genesis**

* Ensures {{ release_dir }}/{{ component_type }}/{{ component_name }} dir exists
* Generate pool genesis for organization
* create value file for {{ component_name }} {{ component_type }}

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/helm_component/pool_genesis/README.md) for detailed information.

## **create/imagepullsecret**
#### This role creates secret in Kubernetes for pull docker images from repository.

* Check for ImagePullSecret for {{ organization }}
* Create the docker pull registry secret for {{ component_ns }}

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/imagepullsecret/README.md) for detailed information.

## **create/k8_component**
#### This role create value file for kubernetes component by inserted type.

* Ensures {{ component_type_name }} dir exists
* create {{ component_type }} file for {{ component_type_name }}

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/k8_component/README.md) for detailed information.

## **create/namespace**

* Check namespace is created
* Create namespaces
* Git Push

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/namespace/README.md) for detailed information.

## **create/serviceaccount/by_identities**

* Check if service account for {{ component_name }} exists
* Create service account for {{ component_name }}
* Check cluster role binding for {{ component_name }}
* Get component_name to var
* Get organization and admin string to var
* Create cluster role binding for {{ component_name }}
* Create admin cluster role binding for {{ component_name }}

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/serviceaccount/by_identities/README.md) for detailed information.

## **create/serviceaccount/main**

* Create service account for trustees [{{ organization }}]
* Create service account for stewards [{{ organization }}]
* Create service account for endorsers [{{ organization }}]
* Create service account for organization [{{ organization }}]
* Create service account for read only public crypto [{{ organization }}]
* Push the created deployment files to repository
* Waiting for trustees accounts and cluster binding roles
* Waiting for stewards accounts and cluster binding roles
* Waiting for endorsers accounts and cluster binding roles
* Waiting for organization accounts and cluster binding roles
* Waiting for organization read only account and cluster binding role

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/serviceaccount/main/README.md) for detailed information.

## **create/serviceaccount/waiting**

* Wait for creation for service account
* Wait for creation for cluster role binding

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/serviceaccount/waiting/README.md) for detailed information.

## **create/storageclass**

* Check if storageclass exists
* Create storageclass
* Push the created deployment files to repository
* Wait for Storageclass creation for {{ component_name }}

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/create/storageclass/README.md) for detailed information.

## **setup/auth_job**

* Wait for namespace creation for stewards
* Create auth_job of stewards, trustee and endorser
* Push the created deployment files to repository
* Check if auth job finished correctly

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/setup/auth_job/README.md) for detailed information.

## **setup/crypto**

* Wait for namespace creation for stewards
* Create image pull secret for stewards
* Create crypto of stewards, trustee and endorser
* Push the created deployment files to repository
* Check Vault for Indy crypto

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/setup/crypto/README.md) for detailed information.

## **setup/domain_genesis**

* Create domain genesis
* Push the created deployment files to repository
* Wait until domain genesis configmap are created

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/setup/domain_genesis/README.md) for detailed information.

## **setup/endorsers**

* Wait for namespace creation
* Create image pull secret for identities
* Create Deployment files for Identities
* Select Admin Identity for Organisation {{ component_name }}
* Calling Helm Release Development Role...
* Push the created deployment files to repository

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/setup/endorsers/README.md) for detailed information.

## **setup/node**

* Wait for namespace creation for stewards
* Create image pull secret for stewards
* Create steward deployment file
* Push the created deployment files to repository
* Wait until steward pods are running

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/setup/node/README.md) for detailed information.

## **setup/pool_genesis**

* Create pool genesis
* Push the created deployment files to repository
* Wait until pool genesis configmap are created

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/setup/pool_genesis/README.md) for detailed information.

## **setup/vault_kubernetes**

* Check namespace is created
* Ensures build dir exists
* Check if Kubernetes-auth already created for Organization
* Enable and configure Kubernetes-auth for Organization
* Get Kubernetes cert files for organizations
* Write reviewer token for Organizations
* Check if policy exists
* Create policy for Access Control
* Write Policy to Vault
* Create Vault auth role

Follow [Readme](https://github.com/hyperledger-labs/blockchain-automation-framework/tree/master/platforms/hyperledger-indy/configuration/roles/setup/vault_kubernetes/README.md) for detailed information.


text:
# Kml Models to Czml Models conversion

Experiment in converting Kml geometry Models to Czml Models.

Note this App does not convert kml COLLADA to czml glTF models, only the kml model documents.

To convert the actual COLLADA (.dae) models or OBJ models to glTF use the [Cesium Converter Tool](https://cesiumjs.org/convertmodel.html)

## Building

Require Java 8.

The easiest way to compile and package the application from source is to use [SBT](http://www.scala-sbt.org/).
To assemble the application and all its dependencies into a single jar file type:

    sbt assembly

This will produce "kml2czml_2.11-1.0.jar" in the "./target/scala-2.11" directory.

For convenience a **kml2czml_2.11-1.0.jar** is included in the "distrib" directory.

## Usage

Use as follows:

    java -jar kml2czml_2.11-1.0.jar kml_file.kml czml_file.czml

Where "kml_file.kml" is the kml file containing the kml models descriptions, and
"czml_file.czml" is the czml output file that will contain the equivalent czml models in a czml packet.

For example, converting the kml file "Sydney-oz.kml" produces the file "Sydney-oz.czml".

The following rules are used in the conversion:

    The kml id value is transferred to the czml id value,
    if there is no id a random (UUID) string is generated.

    The kml Scale.x component is used to set the czml scale value,
    if there is no scale a value of 1 is used.

    The kml model Orientation is converted to czml unitQuaternion orientation,
    if there is no orientation a identity unitQuaternion is used.

    The kml Location is used for the czml position,
    if there is no position a position of zero is used.

    The kml reference to the 3D model,
    for example "geometry/theModel.dae" becomes "geometry/theModel.gltf" for the czml gltf,
    if there is no reference an empty string is used.


text:
# slack-butler
Notify informations via Slack :bowtie:

<img src="https://raw.githubusercontent.com/Slowhand0309/slack-butler/master/icon/icon.png" width="200" height="200" />

****

## Notification

Butler notifies Slack of the following contents:

- :calendar: Today event in Google Calendar

- :heavy_check_mark: Task in Trello

- :sun_with_face: Today's weather

- :fork_and_knife: Suggest for today's dinner menu

- :left_right_arrow: Translate using google translation

## Licence

[MIT](https://opensource.org/licenses/MIT)

## Author

[slowhand0309](https://github.com/Slowhand0309)


text:
---
layout: post
title: "SiriusCon 2020: Sirius to the Web with Obeo Cloud Platform"
subtitle: "Here we go again"
date: 2020-06-10 10:00:00
author: "Mélanie Bats"
header-img: "img/siriuscon2020/post-bg.jpg"
tags: [planet]
---

_TLDR; On June 18th connect to @SiriusCon Live 2020 to watch a demo of the Obeo Cloud Platform._

![Here we go again](/img/siriuscon2020/announcement.png "Here we go again")

“Mamma mia, does it show again

My my, just how much I've missed you?“

[Mamma Mia](https://youtu.be/unfzfe8f9NI)

On the 18th of June, I will have the pleasure of presenting the Obeo Cloud Platform, with my co-speaker [Stéphane Bégaudeau](https://twitter.com/sbegaudeau), at [SiriusCon Live 2020](https://www.siriuscon.org/).
During SiriusCon 2020, we will not only demonstrate OCP, but also make a big announcement about its future. So, attend SiriusCon and be in for a huge surprise!

After such a long time, it is great to be able to connect with the [Eclipse Sirius](http://eclipse.org/sirius) community.

If you have to create a graphical modeling workbench for your own DSL, then you know how powerful Sirius is to help you design your own modeler based on EMF. In just a few hours, you get a modeling studio dedicated to your [own domain](https://www.eclipse.org/sirius/gallery.html).
The main issue faced by our customers arises when they need to distribute the bundle to their end users. A truly effective deployment is difficult to come by. Many struggle to either deploy or maintain their solution. And their team are feeling the pinch.

To solve these challenges, I am excited to demonstrate the Obeo Cloud Platform (OCP), the Cloud-based solution developed by Obeo for deploying modeling tools to the web. With OCP Modeler, modeling tools developed with Sirius can be installed on a Cloud server and are rendered in a web browser. Our purpose is to carry the spirit of Sirius.
What our users typically love in Sirius is:

- the ability to define your modeling workbench in a configuration file,
- no code generation involved as everything is interpreted at runtime,
- flexible even for complex models.

So we kept all those principles and now allow you to easily define workbenches running in the cloud.
We rebuilt the Sirius runtime from the ground up, for the long haul.

I've been talking about it for a long time now! And we’re really proud to show that OCP is available and working today, so our talk will be purely a live demo: no slides (almost), no bullet points, not feature lists. Just us, showing the capabilities of this modeling environment!

![OCP Modeler](/img/siriuscon2020/ocp.png "OCP Modeler")

We will give you as well an overview of the context, the roadmap and how OCP Modeler positions with Sirius.

Referring to ABBA’s words, take a chance on OCP!

“Honey I'm still free

Take a chance on me

Gonna do my very best, baby can't you see

Gotta put me to the test, take a chance on me“

[Take a chance on me](https://youtu.be/-crgQGdpZR0)

In the meantime, as a preparation, [you can dance, you can djibe](https://youtu.be/xFrGuyw1V8s) and most importantly you have to [register](https://bit.ly/Register_SiriusCon2020). And no, even if I am a big #ABBAFan the surprise is not that I will do my talk in a fancy glittering costume… neither Stéphane even if it could be very memorable :).

![Dancing](/img/siriuscon2020/dancing.jpg "Dancing")


text:
## Version history

 * 1.0.4 WebGL 2 support. Fix WebGL shader warnings.
 * 1.0.3 Add RenderPass.blit(). Add depth/stencil as Texture type and add support for depth attachment in Framebuffer.
 * 1.0.2 Add Phong shader. Improve light (PBR and Blinn-Phong).
 * 1.0.1 Improve specular highlight for Blinn-Phong. Add attenuation to PBR.
 * 1.0.0 Physically based rendering. Profiler renamed to Inspector. Added shader specialization constants. Trimmed sprites.
 * 0.9.23 Add support for geometry and tesselation shaders. Fix MSVC compile error.
 * 0.9.22 OpenVR support (experimental). Queue draw calls (to better support simultaneous renderpasses). Make max scenelight count depends on Renderer::maxSceneLights. Optimize and clarify sprite batch order.
 * 0.9.21 Improved .obj importer.
 * 0.9.20 Add Camera.screenPointToRay().
 * 0.9.19 Improve sprite rendering (multiple sprite atlases supported within a sprite batch). Enforce framerate with Vsync. Improve png support. Fix color issue with multiple draw lines.
 * 0.9.18 Add VSync support (default behavior). Update ImGUI to 0.52 and fix Inspector preview. Flip sprite anchor point on SpriteAtlasImport (TexturePacker compatible).
 * 0.9.17 Fix compile issue on Linux
 * 0.9.16 Framerate issue on Windows 10
 * 0.9.15 Fix issue with mesh binding
 * 0.9.14 Improve custom mesh layout
 * 0.9.13 Improve sprite rendering. Fix scissor test.
 * 0.9.12 Fix sprite pivot point
 * 0.9.11 Improved sprite-atlas support + documentation
 * 0.9.10 Improved Linux support
 * 0.9.9 Minor Bugfixes
 * 0.9.8 Update ImGUI and GLM
 * 0.9.7 Add Mesh preview and Shader preview in inspector
 * 0.9.6 Offset in shaders for calculating depth values
 * 0.9.5 Profiling
 * 0.9.4 High DPI, Fullscreen mode, mouse cursor visibility and mouse lock.
 * 0.9.3 Log.
 * 0.9.2 Sprite rendering.
 * 0.9.1 Multiple materials per draw call and multiple index-sets. ModelImporter (Obj).
 * 0.9.0 Framebuffer objects. RenderPass::readPixels(). Simplified Camera projection. RenderPass::create() (More consistent use of builder pattern)
 * 0.8.0 Resource memory management using shared_ptr. Materials created by Shader.createMaterial().
 * 0.7.1 sRGB. Improve MSVC improvement. Improve builder pattern.
 * 0.7.0 Add SDLRenderer. Custom mesh attributes. Simplify Camera::setPerspectiveProjection.
 * 0.6.0 Add Material and RenderPass. Improve ImGUI integration.
 * 0.5.3 Rename namespace and folders from SRE to sre
 * 0.5.2 Add mesh bounds
 * 0.5.1 Clean up documentation and minor API updates.
 * 0.5.0 Rename SimpleRenderEngine class to Renderer. Add cube map support.
 * 0.4.1 Add RenderStats
 * 0.4.0 Merged Mesh and ParticleMesh into the Mesh class
 * 0.3.1 Creation of Light, Sphere(Mesh), Cube(Mesh) and Quad(Mesh) using Builder pattern.
 * 0.3.0 Creation of Texture, Mesh and Shader using Builder pattern.
 * 0.2.9 Fixed issues with specular highlight
 * 0.2.8 Added Emscripten support
 * 0.2.7 Add more mesh topologies (line strip, triangle strip and triangle fans). Add Debug::drawLineStrip().
 * 0.2.6 Fix point-light attenuation
 * 0.2.5 Set Camera default viewport
 * 0.2.4 Restructured include folder and CMake build. Fix particle bug.
 * 0.2.2 ParticleMesh Support for OpenGL 3.1
 * 0.2.1 Make particle size depend on viewport. Move internal headers into impl.
 * 0.2 Move specularity from Light to a normal shader uniform (since logically it belongs to material instead of the light source)
   - Add ParticleMesh
   - Add support for imgui
   - Remove simple text rendering
   - Refactoring Shader: verify uniform names and types.
 * 0.1 Initial version

repository: mortennobel/SimpleRenderEngineProject

repo_name: mortennobel/SimpleRenderEngineProject


text:
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->

Apache Cordova for Windows
===

[![Build status](https://ci.appveyor.com/api/projects/status/19h1fq0lyvwtei05/branch/master)](https://ci.appveyor.com/project/Humbedooh/cordova-windows/branch/master)

Includes Windows universal app template to build [Apache Cordova](http://cordova.apache.org) applications that target Windows 8.0, Windows 8.1 and Windows Phone 8.1. An Apache Cordova based applications is, at the core, an application written with web technology: HTML, CSS and JavaScript.

[Apache Cordova](http://cordova.apache.org) is a project of [The Apache Software Foundation (ASF)](http://apache.org)

Requires
---

**To build for all platforms** (Windows 8.0, Windows 8.1 and Windows Phone 8.1)

  Windows 8.1 along with [Visual Studio 2013 Express](http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-8).

**To build for Windows 8.0 only**

   Windows 8.0 or 8.1 along with [Visual Studio 2012 Express](http://www.visualstudio.com/downloads).

BUGS?
-----

- File them at the [Apache Cordova Issue Tracker](https://issues.apache.org/jira/browse/CB)

Further Reading
---

- [Windows Platform Guide](http://cordova.apache.org/docs/en/edge/guide_platforms_win8_index.md.html#Windows%208%20Platform%20Guide)
- [Apache Cordova Documentation](http://docs.cordova.io)

repository: literunner/cordova-windows

repo_name: literunner/cordova-windows


text:
#### [« Previous: Main](../README.md) —  [Next: 1.0 - Writing to the Console »](Part1-HelloWorld/1.0-WritingToTheConsole/README.md)

--------

# Introduction

These tutorials utilize [RLTK](https://github.com/sarkahn/rltk_unity), a framework for making Roguelikes in Unity. RLKT should have automatically been included as a package when you downloaded this project - you should see it in your packages folder.

Each chapter of these tutorials is mostly self-contained aside from a couple of common utilities used throughout (found in the Common folder). In the folder for each chapter will find a readme. The readmes will generally *not* be a step-by-step guide, but rather an overview of how the different pieces of the chapter fit together to achieve the result. The goal of these tutorials is not to teach you how to code or how Unity's ECS system actually works - the goal is to create a game.

This tutorial is not intended for someone who is a complete beginner to Unity or someone with little to no programming experience. Before proceeding you should have some familiarity with Unity and be prepared to dig through some source code to figure out how things work.

Unless you have an MD reader I would generally recommend just reading the readmes on [github](https://github.com/sarkahn/rltk_unity_roguelike/blob/master/Assets/Introduction.md), since your browser should display MD files properly.

----------------------

These tutorials will always be free and the code will always be open source. With that being said I put quite a lot of work into them. If you find them useful, please consider donating. Any amount you can spare would really help me out a great deal - thank you!

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y54CX7AXFKQXG)

---------------------

#### [« Previous: Main](../README.md) —  [Next: 1.0 - Writing to the Console »](Part1-HelloWorld/1.0-WritingToTheConsole/README.md)

gha_license_id: NOASSERTION