text:
## Open iTerm in Mac Keyboard

Source: https://gist.github.com/pdanford/158d74e2026f393e953ed43ff8168ec1

## Description

Based on info from http://peterdowns.com/posts/open-iterm-finder-service.html but with modified behavior and fixed to work with iTerm2 version 3 or later. It will not work with older versions of iTerm. The modified behavior is to open a new terminal window for each invocation instead of reusing an already open window. Update - The original author released a build script for the newer iTerm2 versions at https://github.com/peterldowns/iterm2-finder-tools that keeps the original behavior of reusing an open iTerm2 window.

## To open iTerm2 at selected folder with keyboard shortcut

1. Run Automator, select a new Service
2. Select Utilities -> Double click ‘Run AppleScript’
3. Service receives selected 'folders' in 'finder.app'
4. Paste script:

   ```
   on run {input, parameters}
       tell application "Finder" to set dir_path to quoted form of (POSIX path of (first item of (get selection as alias list) as alias))
       CD_to(dir_path)
   end run

   on CD_to(theDir)
       tell application "iTerm"
           activate
           set win to (create window with default profile)
           set sesh to (current session of win)
           tell sesh to write text "cd " & theDir & ";clear"
       end tell
   end CD_to
   ```

5. Save as 'Open iTerm at Folder'
6. Open Keyboard in System Preferences. Under Shortcuts -> Services -> Files and Folders check 'Open iTerm at Folder' (with desired keyboard shortcut - e.g. control-option-command-T, making sure it's not already in use by another app). Note that sometimes macOS doesn’t register the keyboard shortcut and may require an OS restart to get it working.
7. To prevent two windows from opening when you use the shortcut keys on a selected Finder folder when iTerm2 is not already running, set iTerm2 -> Preferences -> Startup to "Don't Open Any Windows"

## To make an Automator App that can reside on the Finder toolbar to open an iTerm2 window at the current directory

1. Run Automator, select new Application
2. Select Utilities -> Double click ‘Run AppleScript’
3. Paste script:

   ```
   on run {input, parameters}
       tell application "Finder"
           set dir_path to quoted form of (POSIX path of (folder of the front window as alias))
       end tell
       CD_to(dir_path)
   end run

   on CD_to(theDir)
       tell application "iTerm"
           activate
           set win to (create window with default profile)
           set sesh to (current session of win)
           tell sesh to write text "cd " & theDir & ";clear"
       end tell
   end CD_to
   ```

4. Save as 'iTermOpenScript.app' somewhere out of the way
5. Drag and drop the 'iTermOpenScript.app' onto the Finder toolbar while holding down the Option and Command keys to place the launch icon on Finder
6. To prevent two windows from opening when you click the launch icon when iTerm2 is not already running, set iTerm2 -> Preferences -> Startup to "Don't Open Any Windows"
7. If you want to replace the generic Automator icon, copy an image you want with \<Cmd\>\<C\>, then \<Cmd\>\<I\> on iTermOpenScript.app, select the application icon in the top left corner of the window and \<Cmd\>\<V\>.

pdanford - Jan 2017. MIT License, etc.

repository: idkjs/codenotes

repo_name: idkjs/codenotes


text:
# CHANGELOG

## v0.3.0

- Cloned variables must be in front of closure parameters.
- Enable all closure syntax.

## v0.2.0

- Allow `&var` & `&mut var` & `mut var` in closure params.
- Allow closure without params.

## v0.1.0

Initial release.

license: MIT

repository: DiscreteTom/clonesure

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: DiscreteTom/clonesure


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

### Description

The Jenkins 2.73.1 and earlier, 2.83 and earlier default form control for passwords and other secrets, <f:password/>, supports form validation (e.g. for API keys). The form validation AJAX requests were sent via GET, which could result in secrets being logged to a HTTP access log in non-default configurations of Jenkins, and made available to users with access to these log files. Form validation for <f:password/> is now always sent via POST, which is typically not logged.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon

repository: trickest/cve

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
# Polling Inbound Endpoint Properties

See the topics given below for the list of properties that can be configured for a Polling Inbound Endpoint artifact.

## JMS Inbound

Listed below are the properties used for [creating a JMS inbound endpiont](../../../develop/creating-artifacts/creating-an-inbound-endpoint.md).

### Required Properties

The following properties are required when [creating a JMS inbound endpiont](../../../develop/creating-artifacts/creating-an-inbound-endpoint.md).

    Property
    Description

java.naming.factory.initial

The JNDI initial context factory class. The class must implement the java.naming.spi.InitialContextFactory interface.

java.naming.provider.url

The URL of the JNDI provider.

transport.jms.ConnectionFactoryJNDIName

The JNDI name of the connection factory.

    interval

      The polling interval for the inbound endpoint to execute each cycle. This value is set in milliseconds.

    coordination

      This optional property is only applicable in a cluster environment. In a clustered environment, an inbound endpoint will only be executed in worker nodes. If set to true in a cluster setup, this will run the inbound only in a single worker node. Once the running worker is down, the inbound starts on another available worker in the cluster. By default, coordniation is enabled.

       sequential

     Whether the messages need to be polled and injected sequentially or not.

### Optional Properties

The following optional properties can be configured when [creating a JMS inbound endpiont](../../../develop/creating-artifacts/creating-an-inbound-endpoint.md).

Property Name

Description

            transport.jms.ConnectionFactoryType

            The type of the connection factory.

  Set to queue by default.

transport.jms.Destination/p>

The JNDI name of the destination.

            transport.jms.SessionAcknowledgement

The JMS session acknowledgment mode. You can use one of the following: AUTO_ACKNOWLEDGE , CLIENT_ACKNOWLEDGE , DUPS_OK_ACKNOWLEDGE , SESSION_TRANSACTED.

            transport.jms.CacheLevel

The JMS resource cache level. Possible values are as follows: 0(none), 1(connection), 2(session), 3(consumer).

 The default value is 0-none.

            Note:To subscribe to topics, set the value of transport.jms.CacheLevel to 3.

            transport.jms.UserName

The JMS connection username.

            transport.jms.Password

The JMS connection password.

            transport.jms.JMSSpecVersion

The JMS API version. The possible values are as follows: 1.0.2b, 1.1, 2.0.

 The default value is 1.1..

         transport.jms.SubscriptionDurable
         Whether the connection factory is subscription durable or not.

         transport.jms.DurableSubscriberClientID
         The ClientId parameter when using durable subscriptions. This property is required if the value specified as transport.jms.SubscriptionDurable is true.

            transport.jms.DurableSubscriberName

The name of the durable subscriber. This property is required if the value specified as transport.jms.SubscriptionDurable is true.

            transport.jms.MessageSelector

            Message selector implementation.

            transport.jms.ReceiveTimeout

         The time to wait for a JMS message during polling.

            Set this parameter value to a negative integer to wait indefinitely. Set it to zero to prevent waiting.

 The default value is 1.

         transport.jms.ContentType
         How the inbound listener should determine the content type of received messages. Priority is always given to the JMS message type. Possible values are any simple string value. In which case the transport listener assumes that the received messages always have the specified content type, or a set of rules. For more information, see http://axis.apache.org/axis2/java/transports/jms.html#Service_configuration.

         transport.jms.ContentTypeProperty
         Gets the content type from the message property.

         transport.jms.ReplyDestination
         The destination where the response generated by the back-end service is stored.

transport.jms.PubSubNoLocal

Whether messages should be published via the same connection that they were received.

            transport.jms.SharedSubscription

If set to true, messages will be forwarded to only one of the consumers and consumers will share the messages that are published to the topic.

pinnedServers

List of synapse server names separated by commas or spaces where this inbound endpoint should be deployed. If there is no pinned server list, the inbound endpoint configuration will be deployed in all server instances.

         transport.jms.ConcurrentConsumers
         Number of concurrent threads to be started to consume messages when polling.

 The default value is 1. You can change this to any positive integer. However, for topics the value must always be 1.

            transport.jms.retry.duration

The retry interval (in miliseconds) to reconnect to the JMS server.

         transport.jms.RetriesBeforeSuspension
         The number of consecutive mediation failures after which polling should be suspended. Specify any positive numerical value based on your requirement. Polling will be suspended when the mediation failure count reaches the specified value.

         transport.jms.PollingSuspensionPeriod
         The period of time that polling is to be suspended when the              transport.jms.RetriesBeforeSuspension parameter is set.

 Default value is 60000.

## Kafka Inbound

Listed below are the properties used for [creating an Kafka inbound endpiont](../../../develop/creating-artifacts/creating-an-inbound-endpoint.md).

### Required Properties

The following properties are required when [creating a Kafka inbound endpiont](../../../develop/creating-artifacts/creating-an-inbound-endpoint.md).

    Property
    Description

        zookeeper.connect

      The host and port of a ZooKeeper server (hostname:port).

            consumer.type

         The consumer configuration type. This can either be simple or highlevel.

          interval

         The polling interval for the inbound endpoint to poll the messages.

          coordination

         If set to true in a clustered setup, this will run the inbound only in a single worker node.

 The property is set to true by default.

           sequential

         The behaviour when executing the given sequence.

 The property is set to true by default. Set this property to false to use the Kafka inbound in a non-sequential mode as it allows better performance than the sequential mode.

            topics

         The category to feed the messages. A high-level kafka configuration can have more than one topic. You can specify multiple topic names as comma separated values.

           content.type

         The content of the message. The possible values are as follows: appllication/xml or application/json.

          group.id

If all the consumer instances have the same consumer group, this works as a traditional queue balancing the load over the consumers.

            topic.filter

         The name of the topic filter.

            filter.from.whitelist

         If this is set to true, messages are consumed from the whitelist(include).

            If this is set to false, messages are consumed from the blacklist(exclude).

    coordination

      This optional property is only applicable in a cluster environment. In a clustered environment, an inbound endpoint will only be executed in worker nodes. If set to true in a cluster setup, this will run the inbound only in a single worker node. Once the running worker is down, the inbound starts on another available worker in the cluster. By default, coordniation is enabled.

       sequential

     Whether the messages need to be polled and injected sequentially or not.

### Optional Properties

The following optional properties can be configured when [creating a Kafka inbound endpiont](../../../develop/creating-artifacts/creating-an-inbound-endpoint.md).

           Property Name

Description

          thread.count

         The number of threads. The default value is 1.

         consumer.id
         The id of the consumer. The default value is null.

         socket.timeout.ms
         The socket timeout for network requests. The default value is 30 * 1000.

         socket.receive.buffer.bytes
         The socket receive buffer for network requests. The default value is 64 * 1024.

         fetch.message.max.bytes
         The number of bytes of messages that the system should attempt to fetch for each topic-partition in each fetch request. The default values is 1024 * 1024.

         num.consumer.fetchers
         The number fetcher threads used to fetch data. The default value is 1.

         auto.commit.enable
         The committed offset to be used as the position from which the new consumer will begin when the process fails.

 The default value is true.

         auto.commit.interval.ms
         The frequency (in miliseconds) at which the consumer offsets are committed to zookeeper.

 The default value is 60 * 1000.

         queued.max.message.chunks
         The maximum number of message chunks buffered for consumption. Each chunk can go up to the value specified in fetch.message.max.bytes.

 The default value is 2.

         rebalance.max.retries
         The maximum number of retry attempts. The default value is 4.

         fetch.min.bytes
         The minimum amount of data the server should return for a fetch request. The default value is 1.

         fetch.wait.max.ms
         The maximum amount of time the server will stay blocked before responding to the fetch request when sufficient data is not available to immediately serve fetch.min.bytes.

 The default value is 100

         rebalance.backoff.ms
         The backoff time between retries during rebalance. The default value is 2000.

         refresh.leader.backoff.ms
         The backoff time to wait before trying to determine the leader of a partition that has just lost its leader.

 The default value is 200.

         auto.offset.reset

Set this to one of the following values based on what you need to do when there is no initial offset in ZooKeeper or if an offset is out of range.

smallest: Automatically reset the offset to the smallest offset.

largest: Automatically reset the offset to the largest offset.

anything else: Throw an exception to the consumer.

            The default values is largest.

         consumer.timeout.ms
         The timeout interval after which a timeout exception is to be thrown to the consumer if no message is available for consumption. It is a good practice to set this value lower than the interval of the Kafka inbound endpoint. The default value is 2000.

         exclude.internal.topics
         Set to true if messages from internal topics such as offsets should be exposed to the consumer. The default value is true.

         partition.assignment.strategy
         The partitions assignment strategy to be used when assigning partitions to consumer streams. Possible values are range and roundrobin.

 Default setting is range.

         client.id
         The user specified string sent in each request to help trace calls.

zookeeper.session.timeout.ms

         The ZooKeeper session timeout value in milliseconds. The default value is 6000.

         zookeeper.connection.timeout.ms
         The maximum time in milliseconds that the client should wait while establishing a connection to ZooKeeper.

 The default value is 6000.

zookeeper.sync.time.ms

         The time difference in milliseconds that a ZooKeeper follower can be behind a ZooKeeper leader. The default value is 2000.

         offsets.storage
         The offsets storage location. Possible values are zookeeper and kafka. Default setting is zookeeper.

         offsets.channel.backoff.ms
         The backoff period in milliseconds when reconnecting the offsets channel or retrying failed offset fetch/commit requests.

 Default value is 1000.

         offsets.channel.socket.timeout.ms
         The socket timeout in milliseconds when reading responses for offset fetch/commit requests.

 The default value is 10000.

         offsets.commit.max.retries
         The maximum retry attempts allowed. If a consumer metadata request fails for any reason, retry takes place but does not have an impact on this limit.

 Default value is 5.

         dual.commit.enabled
         If offsets.storage is set to kafka, the commit offsets can be dual to ZooKeeper. Set this to true if you need to perform migration from zookeeper-based offset storage to kafka-based offset storage. The default value is true.

            simple.topic

         The category to feed the messages.

            simple.brokers

         The specific Kafka broker name.

            simple.port

         The specific Kafka server port number.

            simple.partition

         The partition of the topic.

            simple.max.messages.to.read

The maximum number of messages to retrieve.

repository: shaniR/docs-ei

branch_name: refs/heads/master

repo_name: shaniR/docs-ei


text:
# ts-rpc-seed

[![pipeline status](https://git.flashbeep.cn/common/ts-rpc-seed/badges/release/pipeline.svg)](https://git.flashbeep.cn/common/ts-rpc-seed/commits/release)
[![coverage report](https://git.flashbeep.cn/common/ts-rpc-seed/badges/release/coverage.svg)](https://git.flashbeep.cn/common/ts-rpc-seed/commits/release)

> a typescript node rpc seed project.

## Build Setup

``` bash
# install dependencies
cnpm i

# compile in watch mode
npm run build

# debug with ts-node directly
vscode -> F5 -> tsnode

# test with a quick and dirty client
node dist/client.js
```

repository: rayngwf/ts-rpc-seed

repo_name: rayngwf/ts-rpc-seed


text:
# Markdown redactor
Application uses embedded mongo and h2 databases.
Because of that you can run this application without any configurations and other pre-installed applications

# Building and Running
Make sure that [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and [Maven 3](https://maven.apache.org/download.cgi) are installed

And run it as follow
```bash
mvn spring-boot:run
```

repository: AlexIvchenko/markdown-redactor

repo_name: AlexIvchenko/markdown-redactor


text:
# Walkers

*it's a long way to Tipperary*

## What's this?

Who knows? I thought that the path passing through the rightmost intersection of two moving circles could resemble a leg.\
I started experimenting with canvas and [PIXI.js](https://www.pixijs.com/), and after scribbling on sheets and sheets of paper and revising a lot of math, this thing came out.\
It's my second web-related project ever, written in Typescript when I was 18.

The feet's horizontal movement follows a triangle wave (imagine it scrolling vertically), the vertical movement is described by a sine wave (scrolling horizontally).

The marks on the ground represent a stored height value. At any point, the terrain height is calculated by interpolating the surrounding heights.

The hips follow a simple springy routine.

## [Try it](https://lucide.github.io/Walkers/)

## Features

* math scattered in every corner
* lots of legs
* PIXI library included for no reason

## Curator

* repo refactored to separate better between sources and compiled files
* unused files removed
* improved typescript handling. The types definition used here look like old style ambient declarations

repository: Lucide/Walkers

repo_name: Lucide/Walkers


text:
---
title: 5 Reasons Why Movider Is You Best SMS API for sending SMS to Thailand.
thumbnail: /blog/img/movider_sms_sea.png
date: 2019-10-15T11:03:56.556Z
description: >-
  Movider is the leader of SMS Gateway Providers, which connects directly to the
  local mobile operators in Thailand. Let's see the 5 reasons why Movider is
  your solution if you want to engage your customers in Southeast Asia.
---
Movider is the leader of SMS Gateway API Providers, which connects directly to the local mobile operators in Thailand. Let's see the 5 reasons why Movider is your solution if you want to engage your customers in Southeast Asia.

**1) Reliability**
\
Movider is the sub-brands of the original ThaiBulkSMS.com. The best SMS service provider in Thailand. We operate the SMS business for more than ten years. You can trust in our reliability.

**2) Easy-To-Use**
\
Movider SMS API is built by developers for developers. Our developer team understands what users need for SMS API.

**3) Scalability**
\
Whether you're big or small, Movider SMS Platform is the right one for you due to the scalability of your size of volume using.

**4) Great Customer Support**
\
Who'll be your backup when you need support? Yes, our support team is supreme and always be ready to take care of and solve the problems for you.

**5) Seamless System Integration**
\
Lastly, the Movider SMS platform can be easily integrated with your existing web or mobile applications, CRM system, loyalty programs, and other infrastructure.

If you need to send SMS & OTP across Southeast Asia & Thailand, try Movider SMS Gateway API Service. Movider Support Team is ready to support you. Visit ****[https://movider.co ](https://movider.co)

repository: movider/movider-blog

gha_language: JavaScript

repo_name: movider/movider-blog


text:
# @discord-message-components/markdown

A markdown parser for Discord messages.

**This is an adaption of [discord-markdown](https://github.com/brussell98/discord-markdown) by [brussell98](https://github.com/brussell98).**

## Using

```bash
yarn add @discord-message-components/markdown
npm i @discord-message-components/markdown
```

For browser use, import `dist/markdown.min.js`

```js
const { parser, htmlOutput, toHTML } = require('@discord-message-components/markdown')

console.log(toHTML('This **is** a __test__'))
// => This <strong>is</strong> a <u>test</u>
```

## Options

```js
const { toHTML } = require('@discord-message-components/markdown')
toHTML('This **is** a __test__', options)
```

`options` is an object with the following properties (all are optional):

* `embed`: Boolean (default: false), if it should parse embed contents (rules are slightly different)
* `escapeHTML`: Boolean (default: true), if it should escape HTML
* `discordOnly`: Boolean (default: false), if it should only parse the discord-specific stuff
* `discordCallback`: Object, callbacks used for discord parsing. Each receive an object with different properties, and are expected to return an HTML escaped string
  * `user`: (`id`: Number) User mentions "@someperson"
  * `channel`: (`id`: Number) Channel mentions "#somechannel"
  * `role`: (`id`: Number) Role mentions "@somerole"
  * `everyone`: () Everyone mention "@everyone"
  * `here`: () Here mention "@here"
* `cssModuleNames`: Object, maps CSS class names to CSS module class names

### Mention and Emoji Handling

Using the `discordCallback` option you can define custom functions to handle parsing mention and emoji content. You can use these to turn IDs into names.

Example:

```js
const { toHTML } = require('@discord-message-components/markdown')
toHTML('This is a mention for <@95286900801146880>', {
	discordCallback: {
		user: node => '@' + users[node.id],
	},
}) // -> This is a mention for @Brussell
```

## Customizing

It is possible to change the rules used by this package. Take a look at the code to see how to create your own modified rule set.

repository: Awoocado/discord-message-components

repo_name: Awoocado/discord-message-components


text:
{{{
  "title": "Mobile optimization",
  "tags": ["mobile", "CSS", "responsive"],
  "category": "technology",
  "date": "Thu, 10 May 2012 20:21:19 GMT",
  "color":"blue"
}}}

In this short post I'll talk about the process of optimizing my blog for mobile devices. I will point out some pitfalls that have to be considered and I will show solutions to some common problems.
<!--more-->
I don't have to tell you that many people use their mobile devices to browse the internet and you might also be well aware that it is very important leave a good impression no matter if your users using a smart phone or their favorite desktop browser.

Luckily the layout of my blog is very simple and therefore it worked quite well on mobile devices. I just noticed a few things that had to be improved. The thing that was bothering me most, was that my android device refused to show the page in a proper scale. Everything seemed to be so tiny and was unreadable until I zoomed in.

There is a meta attribute viewport that is supported by many mobile browsers. You can use it to tell the browser how big the viewport is and how the initial scale should be. But beware: This meta attribute is not yet a standard.

    <meta name="viewport" content="width=device-width, initial-scale=1">

**Size:**
You can either set the size of the viewport to a specific number of pixels (_width=600_ / _height=600_) or you can set it to the _device-width_ / _device-height_.

**Scale:**
You can set the _initial-scale_, the _minimum-scale_ and the _maximum-scale_ of the viewport. The _initial-scale_ property controls the zoom when the page is loaded. The _minimum-scale_ and the _maximum-scale_ control how the users will be able to zoom the page in and out.

Thanks to [@mactuxinger](http://twitter.com/#!/mactuxinger) who just pointed out to me that maximum-scale is a big NO-NO and should not be used because it reduces accessibility!

Another thing that bothered me was, that the comment boxes where huge on mobile devices and did not fit the content area. I used media queries to make them smaller if the page is viewed on a small screen.

    @media screen and (max-width: 600px) {
        #newcomment div h4 { position: relative; }
        #newcomment div input { margin-left: 0px; width: 100%; }
        #newcomment textarea { width: 100%; }
        #newcomment div.button input { width: 100%; }
        body { font-size: 90%; }
    }

The third and last thing that I changed for now is that I had problems with long words. They were not properly wrapped and sometimes pushed out of the screen. I used the following little CSS trick to tell the browser to wrap them.

    body {
        word-wrap: break-word;
        -moz-hyphens: auto;
        -ms-hyphens: auto;
        -webkit-hyphens: auto;
        hyphens: auto;
    }

If you have any other suggestions or find some more things that should be changed on mobile devices, please let me know in the comments below!


text:
# utl_referencing_a_variable_from_another_dataset_in_a_macro
Referencing a variable from another dataset in a macro.    Keywords: sas sql join merge big data analytics macros oracle teradata mysql sas communities stackoverflow statistics artificial inteligence AI Python R Java Javascript WPS Matlab SPSS Scala Perl C C# Excel MS Access JSON graphics maps NLP natural language processing machine learning igraph DOSUBL DOW loop stackoverflow SAS community.

    Referencing a variable from another dataset in a macro

    Print sashelp.class reports for each age in a control dataset

    github
    https://tinyurl.com/y7fd5bt3
    https://github.com/rogerjdeangelis/utl_referencing_a_variable_from_another_dataset_in_a_macro

    https://tinyurl.com/y7fz64kd
    https://communities.sas.com/t5/Base-SAS-Programming/referencing-a-variable-from-another-dataset-in-a-macro/m-p/470197

    INPUT  (macro and control dataset wit a list of ages)
    =====

     1, control datsset wil a list of ages
     2. sashelp.class
     3. prtx macro

     WORK.HAVE total obs=5

      Obs    AGE

       1      11
       2      12
       3      13
       4      14
       5      15

     %macro prtx(age);

        proc print data=sashelp.class(where=(age=&age));
        title "Report for age &age";

        run;quit;
     %mend prtx;

     SAMPLE OUTPUT

     Up to 40 obs from log total obs=5

     Obs    AGE    RC     STATUS

      1      11     0    Completed
      2      12     0    Completed
      3      13     0    Completed
      4      14     0    Completed
      5      15     0    Completed

     Report for age 11

     Obs     NAME     SEX    AGE    HEIGHT    WEIGHT

      11    Joyce      F      11     51.3      50.5
      18    Thomas     M      11     57.5      85.0

     ...

     Report for age 15

     Obs    NAME       SEX    AGE    HEIGHT    WEIGHT

       8    Janet       F      15     62.5      112.5
      14    Mary        F      15     66.5      112.0
      17    Ronald      M      15     67.0      133.0
      19    William     M      15     66.5      112.0

    PROCESS
    =======

      data log;

        set have;
        call symputx('age',age);

        rc=dosubl('
           %prtx(&age);
        ');

        if rc=0 then status="Completed";
        else status="Failed";

      run;quit;

    OUTPUT
    ======

     Up to 40 obs from log total obs=5

     Obs    AGE    RC     STATUS

      1      11     0    Completed
      2      12     0    Completed
      3      13     0    Completed
      4      14     0    Completed
      5      15     0    Completed

     Report for age 11

     Obs     NAME     SEX    AGE    HEIGHT    WEIGHT

      11    Joyce      F      11     51.3      50.5
      18    Thomas     M      11     57.5      85.0

     ...

     Report for age 15

     Obs    NAME       SEX    AGE    HEIGHT    WEIGHT

       8    Janet       F      15     62.5      112.5
      14    Mary        F      15     66.5      112.0
      17    Ronald      M      15     67.0      133.0
      19    William     M      15     66.5      112.0

    *                _              _       _
     _ __ ___   __ _| | _____    __| | __ _| |_ __ _
    | '_ ` _ \ / _` | |/ / _ \  / _` |/ _` | __/ _` |
    | | | | | | (_| |   <  __/ | (_| | (_| | || (_| |
    |_| |_| |_|\__,_|_|\_\___|  \__,_|\__,_|\__\__,_|

    ;

    data have;
     do age=11 to 15;
       output;
     end;
    run;quit;

     %macro prtx(age);

        proc print data=sashelp.class(where=(age=&age));
        title "Report for age &age";

        run;quit;
     %mend prtx;

    *          _       _   _
     ___  ___ | |_   _| |_(_) ___  _ __
    / __|/ _ \| | | | | __| |/ _ \| '_ \
    \__ \ (_) | | |_| | |_| | (_) | | | |
    |___/\___/|_|\__,_|\__|_|\___/|_| |_|

    ;

    see process


text:
# Lesson 10: Make Classes: advanced topics

**Udacity Full Stack Web Developer
Nanodegree program**

Part 01. Programming fundamentals and the web
[Programming foundations with
Python](https://www.udacity.com/course/programming-foundations-with-python--
ud036)

Brendon Smith

br3ndonland

## 01. Advanced Ideas in OOP

## 02. Class Variables

* Class variables can be
shared by all instances of the Class.
* The Google Style Guide recommends all
caps for class variable names, like `VALID_RATINGS`.
* PEP 8
[recommends](https://www.python.org/dev/peps/pep-0008/#class-names) CapWords for
class names.

*Instructor notes*:

Around 0:40 or so, Kunal said with regard to
the valid_ratings variable:

"...This is an array or a list..."

To avoid
confusion down the road: Arrays and lists are actually not the same thing in
Python. 99.9% of the time, you'll want to use lists. They're flexible, and good
for pretty much every purpose.

However, there is also an array.array class in
Python, which is essentially a thin wrapper on top of C arrays.

They're not
something you'll probably need to use, but read more here if interested:
http://www.wired.com/2011/08/python-notes-lists-vs-arrays/

## 03. Quiz: Using
Predefined Class Variables

We explored three of the built-in class variables:
`__doc__`, `__name__`, `__module__`.

```python
print(media.Movie.__doc__) #
documentation function
print(media.Movie.__name__) # prints the class function
name
print(media.Movie.__module__) # prints module name
```
```
This class
provides a way to store movie information.
Movie
media
```

```python
import webbrowser
webbrowser.__doc__
```

## 04. Inheritance

This is another major topic in object-oriented programming.
 A child inherits characteristics and genomic
material from their parents. Similarly, child classes can inherit information
from parent classes

## 05. Class Parent

We create a parent class, and
reference it in a child instance. While watching, I was thinking that the parent
class should be in a separate file. Kunal addressed this, and he just combined
them for ease of demonstration.

```python
# Udacity full-stack web developer
nanodegree
# 01. Programming fundamentals and the web
# Lesson 10. Make Classes:
Advanced Topics

class Parent():
    def __init__(self, last_name, eye_color):
print("Parent Constructor called.")
        self.last_name
self.eye_color

# Normally the child instance would be in a separate file.
#
Included here for ease of demonstration.
billy_cyrus = Parent("Cyrus", "blue")
print(billy_cyrus.last_name)

```

When I first ran this, I was getting
`AttributeError: 'Parent' object has no attribute 'last_name'`. I hadn't
finished defining parameters in the Parent Class.

```python
# Udacity full-
stack web developer nanodegree
# 01. Programming fundamentals and the web
#
Lesson 10. Make Classes: Advanced Topics

class Parent():
    def
__init__(self, last_name, eye_color):
        print("Parent Constructor
called.")
        self.last_name = last_name
        self.eye_color = eye_color
# Normally the child instance would be in a separate file.
# Included here for
ease of demonstration.
billy_cyrus = Parent("Cyrus", "blue")
print(billy_cyrus.last_name)

```

## 06. Quiz: What's the Output?

The code seems highly redundant.

*What will
the output be?*

```
Parent Constructor called
Child Constructor called
Cyrus
5
```

*output*:

```
Parent Constructor called.
Cyrus
Child Constructor called.
Parent Constructor called.
Cyrus
5
```
When computing the `miley_cyrus`
function, the Child Constructor is first called. The Child calls the Parent. The
output is then generated.

## 07. Transitioning to Class `Movie`
## 08. Updating the Design for Class
`Movie`

We revisit the code from our Class `Movie`. What if we wanted to add a
similar Class for TV shows? Movies and TV shows share some characteristics, like
the presence of a title and duration. We could create a parent function, `class
Video():`, and group `class Movie(Video):` and `class TvShow(Video):` as child
classes. Inheritance allows us to write code in an intuitive, human-readable
way.

## 10. Reusing methods

Kunal went back to the *inheritance.py* file, and
defined a new instance method inside `class Parent()` called `show_info`.
```python
    def show_info(self):
        print("Last Name - " +
self.last_name)
        print("Eye Color - " + self.eye_color)

```

He then
referenced it with `billy_cyrus.show_info()`.

## 11. Method Overriding

The `show_info()` method is present inside the `class
Parent():`. It can be created again inside the `class Child():`, and it will
override the parent function.

repository: alwaleedibrahim/udacity-fsnd

repo_name: alwaleedibrahim/udacity-fsnd


text:
## Create a Random Password Generator using Python

Hello world!

We all make use of passwords on a daily basis, to keep your account safe and prevent your password from being hacked we have to make our password is hard enough that nobody can guess.

Password generator is a Random Password generating program which generates a password mix of upper and lowercase letters, as well as numbers and symbols strong enough to provides great security.

In this Blog article, we will learn how to **Create a Random Password Generator.** We will see the implementation in Python.

[Check out the Repository for Ultimate Resource in python](https://github.com/ayushi7rawat/Ultimate-Python-Resource-Hub). Drop a star if you find it useful! Got anything to add? Open a PR on the same!

You can refer to my **YouTube video Tutorial** to see a working tutorial for better Understanding and a step by step Guide of the same.

%[https://www.youtube.com/watch?v=AjiGVu2xbx8]

## What will be covered in this Blog

```python
1. What is Password
2. Random and String Module
3. how to Create a Random Password Generator
```

Let's get started!

## What is Password:

A password, sometimes called a passcode, is a memorized secret, typically a string of characters, usually used to confirm the identity of a user, In other words is a string of characters used to verify the identity of a user during the authentication process.

If you wish to know more about it, you can refer to [Password Wikipedia Page](https://en.wikipedia.org/wiki/Password).

## Modules Used:

### Random Module:

Random module is used to perform the random generations. We are making use of `random.sample` module here. If you will observe in the output all characters will be unique. `random.sample()` never repeats characters. If you don’t want to repeat characters or digits in the random string, then use `random.sample()` but it is less secure because it will reduce the probability of combinations because we are not allowing repetitive letters and digits.

### String Module:

The [string module](https://www.pythonforbeginners.com/basics/strings) contains a number of useful constants, classes and a number of functions to process the standard python string.

1. **`string.ascii_letters`**: Concatenation of the ascii (upper and lowercase) letters
2. **`string.ascii_lowercase`**: All lower case letters
3. **`string.ascii_uppercase`**: All Upper case letters
4. **`string.digits`**: The string ‘0123456789’.
5. **`string.punctuation`**: String of ASCII characters which are considered punctuation characters in the C
   locale.

Now that you are familiar with password use cases and have acquired basic knowledge of `random` and `string` module, we can move forward to the coding section.

## Time to Code!

You can find all the code at my [GitHub Repository](https://github.com/ayushi7rawat/Youtube-Projects/tree/master/Random%20Password%20Generator). **Drop a star** if you find it useful.

![code.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1606623119249/Tf3BrIIEw.png)

In order to access the Python library, we need to import the package in our Python script.

```python
import random
import string
```

Once done, let's greet the user!

```python
print('hello, Welcome to Password generator!')
```

Next, let's ask the user for the length of the password.

```python
length = int(input('\nEnter the length of password: '))
```

Its time to define the data. We will make use of `string` module for the same.

````python
lower = string.ascii_lowercase
upper = string.ascii_uppercase
num = string.digits
symbols = string.punctuation
````

We have stored lowercase and uppercase letters along with numbers and symbols. Let's combine the data and store the data.

```python
all = lower + upper + num + symbols
```

Now that we have the data, let's make use of `random` module to finally generate the password.

```python
temp = random.sample(all,length)

password = "".join(temp)
```

We are passing in the the combined data along with the length of password, and joining them at the end.

Now that you have a clear understanding of the script, we can even reduce the number of lines of code by eliminating the storage of data. Let's have a look.

```python
all = string.ascii_letters + string.digits + string.punctuation
pass = "".join(random.sample(all,length))
```

Finally, let's print the password!

```python
print(password)
```

Let's have look at few sample outputs:

```
#SAMPLE O/P: (length = 16)

3Atza*qP#h-vJoK+
7c%A4gOt#M[}qr2
@JmFf"awbQ1Ts4dx
```

With these steps, we have successfully created a random password generator project using python. That's it!

Simple, isn't it? Hope this tutorial has helped. I would strongly recommend you to Check out the [YouTube video](https://www.youtube.com/watch?v=AjiGVu2xbx8) of the same and **don't forget to subscribe my Channel**.

You can play around with the Instaloader library and even explore more features. You can even make use of Python GUI using Tkinter.

You can find all the code at my [GitHub Repository](https://github.com/ayushi7rawat/Youtube-Projects/tree/master/Random%20Password%20Generator). **Drop a star** if you find it useful.

Thank you for reading, I would love to connect with you at [Twitter](https://twitter.com/ayushi7rawat) | [LinkedIn](https://www.linkedin.com/in/ayushi7rawat/).

Do share your valuable suggestions, I appreciate your honest feedback!

You should definitely check out my other Blogs:

- [Python 3.9: All You need to know](https://ayushirawat.com/python-39-all-you-need-to-know)
- [The Ultimate Python Resource hub](https://ayushirawat.com/the-ultimate-python-resource-hub)
- [GitHub CLI 1.0: All you need to know](https://ayushirawat.com/github-cli-10-all-you-need-to-know)
- [Become a Better Programmer](https://ayushirawat.com/become-a-better-programmer)
- [How to make your own Google Chrome Extension](https://ayushirawat.com/how-to-make-your-own-google-chrome-extension-1)
- [Create your own Audiobook from any pdf with Python](https://ayushirawat.com/create-your-own-audiobook-from-any-pdf-with-python)
- [You are Important & so is your Mental Health!](https://ayushirawat.com/you-are-important-and-so-is-your-mental-health)

## Resources:

- https://en.wikipedia.org/wiki/Password

See you in my next Blog article, Take care!!


text:
## RM2
Very basic application for recipes. Nothing interesting indeed.

University related project.

## Run on localhost
Install libs with composer

    cd RecipeManager2
    php composer.phar install

Edit app/config/parameters.yml

Create database and schema

    php app/console doctrine:database:create
    php app/console doctrine:schema:create

Load fixtures(optional)

    php app/console doctrine:fixtures:load

Run with PHP 5.4 internal server

    php app/console server:run


text:
# Plagueis
*"Did you ever hear the tragedy of Darth Plagueis The Wise?"*

Come one, Lorem Ipsum is outdated!

This package provides you with the famous sith legend of Darth Plaguies The Wise

## But I've never heard of it
I thought not. It’s not a story the Jedi would tell you.

## Is it possible to learn this power?
Not from an npm package

## Usage
You can use as a cli tool, maybe for copy-pasting purposes:
```
$ npm install -g plagueis
$ plagueis
```
It also supports different languages:
```
$ plagueis -en       #defaults to en
$ plagueis -it       #also --it and it works
```

Or you can import and use in your code:
```js
const plagueis = require('plagueis');
console.log(plagueis('it')); //Ti hanno mai raccontato...
```

## Contributing
You're welcome to contribute by adding more languages to the package! Just update [src/locals.json](https://github.com/roveroniandrea/npm-plagueis/blob/master/src/locals.json) and send a pull request.

*"These will make a fine addition to my collection"*

## Report bugs
In the very possible case you find a bug, just [open an issue](https://github.com/roveroniandrea/npm-plagueis/issues/new)

repository: roveroniandrea/npm-plagueis

repo_name: roveroniandrea/npm-plagueis


text:
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# Welcome to my Password Generator

Homework assignment to produce a random password generator using basic JavaScript (functions and loops). The password is based on user-selected criteria, specifically length and character types to be included. The app runs in the browser and dynamically updates the HTML and CSS via JavaScript.

When the Generate Password button is clicked, the user is prompted for their desired password length. If the user selects a value outside of the accepted length requirements (8-128 characters) or clicks cancel, the process ends and the user may choose to start again.

Once the desired length is established, the user is prompted to select the desired character types via confirm messages. The types are lowercase letters, uppercase letters, numbers, and special characters. At least one character type must be selected, or the questions start over.

Once the criteria has been established, the password is dynamically displayed in the text box in the user's browser.

The user is also provided a Copy to Clipboard button to aid in the subsequent use of the generated password. Clicking the button creates an alert to show the password copied to the clipboard

# Technology/skills
* HTML
* CSS
* JavaScript

# Screenshot
![Screenshot](https://github.com/markdcross/password-generator/blob/master/assets/Screenshot%202020-09-12%20090153.png)

# Contact
Please reach out to me with any questions or feedback via [GitHub](https://github.com/markdcross "Visit Mark's GitHub"), [LinkedIn](https://www.linkedin.com/in/markdcross/ "Visit Mark's LinkedIn"), or<EMAIL_ADDRESS>
# License
MIT License

Copyright (c) 2020 Mark Cross

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

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

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

repository: markdcross/password-generator

repo_name: markdcross/password-generator


text:
Title: Thoughts On Free Education
Date: 2016-09-03 20:10
Category: General
Tags: uni, education, politics
Slug: thoughts-on-free-education
Lang: en

![6 Percenters]({filename}/images/6-percent.png)

**Disclaimer:** I did my undergraduate studies at a private fee-levying
university in Sri Lanka.

The above disclaimer reflects my natural sympathies in this fight. It
was easy to support the private university cause, simply because:

1. Not everyone can get into state universities (in the academic year
2013, only 16.5% of eligible students were afforded placements according
to the UGC)

2. The rich-enough will look for uni placements abroad

3. The not-rich-enough-to-go-abroad (like me) would end up without any
means to get tertiary education (if not for private universities)

4. The [*anthare*][1] makes it hard not to hate them.

Simple argument, simple logical conclusion: allow private universities.

This was the entirety of my view on the argument, circa 2010 - 2014. At
the time I was also strongly libertarian.

Well, it's 2016. The world has changed, and my views have matured and
become more nuanced. <s>I have become a BernieBro</s>

It's increasingly clear that student debt is a problem that does not go
away, and that there are serious flaws with not only the financials, but
the entire structure and role of tertiary education institutions. Are
liberal arts worth teaching any longer? Is graduate employability and
salaries the only measure of success for a programme?

I digress.

My point is that I now think that tertiary education *should* be
considered a student right that should be provided for by the state, and
that it should be available to all eligible students.

* I am still 100% pro letting **all** eligible students get university
education, **not just 16.5%**. There would be no need for convoluted
z-score schemes and the *anthare* feeling all superior to people who
lost out on admission by a fraction of a percentage point.

* I am not naive enough to assume the government will foot the bill for
this 6-fold increase. A public-private partnership with scholarship
funds etc. will need to be set up.

* I am painfully aware, through my own experience and those of my peers,
of just how mercenary a vast number of private educational institutions
are.

* I am also aware how expensive education is, and that not everyone can
afford it. Poverty not standing in the way of opportunity, which is the
greatest triumph of our [Kannangara][2] system, should be defended at
all cost.

* There are also plenty of kids who *can* afford to pitch in and pay a
bit. They should be able to contribute and support their peers who
can't.

* Where applicable, student loans should have [25 - 30 year repayment
periods][3].

> Yet despite this widespread borrowing, there is no student debt
crisis in Sweden, because payments are spread out over 25 years. They
also start out low, rising slowly over time. [...] In Germany, students
pay their loans over 20 years; in England, it’s 30 years.
>
> This makes sense. A core principle of finance is that the length of
debt payments should align with the life of the asset. We pay for cars
over five years and homes over 30 years because homes last a lot longer
than cars. An education pays off over a lifetime, so it makes sense that
student loans should be paid off over a long term.

There is no need (nor is this an endorsement) to pre-emptively *ban* all
private universities, but a sufficient public option should exist for
all interested students (which I wager is most of them).

There are serious issues in the state university system right now (from
under-paid lecturers, to strikes, to lack of research output, to
[academic inbreeding][4]), and the GMOA's self-serving agenda (and using
medical students as pawns to further that agenda) invokes nothing but
disgust.

But the people of this country should, for once, look at the core issues
surrounding our tertiary education system and try to fix them at the
root, instead of palming it off to the private sector and forgetting
about it.

[1]: https://en.wikipedia.org/wiki/Inter_University_Students%27_Federation
[2]: https://en.wikipedia.org/wiki/C._W._W._Kannangara
[3]: http://www.nytimes.com/2016/07/10/upshot/america-can-fix-its-student-loan-crisis-just-ask-australia.html
[4]: https://en.wikipedia.org/wiki/Intellectual_inbreeding


text:
## 0.2.0

- Make token optional and allow specifying headers at least for enabling authentication via 'X-API-KEY' header
, because initially implemented in 0.1.0 bearer auth isn't working.

- Fix Query `build_search_term` and `build_exclude_term` to be compatible with Ruby < 2.4, analyzing value for 'Fixnum
' class.

- Fix the gem's name in gemspec to 'fulfil-io', as registered at RubyGems.

- Remove Rake version constraint from gemspec.

- Add Gemfile.lock to .gitignore and remove it from git-tree - it shouldn't be stored in git for a gem.

## 0.1.0

* Initial gem release

repository: mejuri-inc/fulfil

repo_name: mejuri-inc/fulfil


text:
---
layout: post
title: Re sub python
---

```python
import re
str = re.sub(regex, repl, str)
```

re.sub returns a copy of replaced str, so, remember to assign it back

path: /_posts/2020-01-27-Re sub python.md

filename: 2020-01-27-Re sub python.md


text:
# regart

[![Build Status](https://travis-ci.org/tiborsimon/regart.svg?branch=master)](https://travis-ci.org/tiborsimon/regart)
[![Coverage Status](https://coveralls.io/repos/github/tiborsimon/regart/badge.svg?branch=master)](https://coveralls.io/github/tiborsimon/regart?branch=master)

Register art generator for ASCII based visual register section descriptions.

repository: gitter-badger/regart

gha_language: Python

repo_name: gitter-badger/regart


text:
# Java Queue #
## Description ##
This repository includes a Java-based queue. It's realised through an interface

and a corresponding class. If you would like to see an example usage, make sure to

check out the TestQueue.java file.

version 1.0

## Run Tests ##
To run the very basic test, clone this repository, go inside of the folder and compile

the source code via

```bash
javac IQueue.java Queue.java TestQueue.java
```

After that you are able to run the very basic test via

```bash
java TestQueue
```

The provided test contains a String-Queue and an Integer-Queue. Hope it's an inspiration for you!

repository: DahlitzFlorian/java-queue

repo_name: DahlitzFlorian/java-queue


text:
# basic-scraper
Author: Morgan Nomura

## Description
Simple web scraper that gets data from Seattle & King County's Public Health site on restaurant ratings.

## Citations
https://code.tutsplus.com/tutorials/scraping-webpages-in-python-with-beautiful-soup-the-basics--cms-28211

repository: morganelle/basic-scraper

repo_name: morganelle/basic-scraper


text:
# SE20_HW2-3

This repo has been created for HW2 and HW3 of SE 2020. We implemented [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) in [Ruby](https://www.ruby-lang.org/en/), [Rust](https://www.rust-lang.org) and [Go](https://golang.org) with some minor bugs in it. The purpose of this repo is to rank different programming languages in the order of how easy (or hard) it is to debug the code.

## Conway's Game of Life Rules
GOL is in a 2D square grid, where each cell has two possible states: live or dead. We will be assigned 1 as live cell, and 0 as dead cell. Every cell interacts with its [8 neighboring cells](https://en.wikipedia.org/wiki/Moore_neighborhood) by the following rules:
- Any live cell with fewer than two live neighbours dies, as if by underpopulation.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

For more details refer to [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life).

## How to Run
You can run our code on [Repl.it](https://repl.it/github/pranav2595/SE20_HW2-3). Read the README.md on each of the directories for detailed instruction. Repl now supports importing repos from Github!

Rust link: https://repl.it/repls/PinkUniformDaemons#code/rust/rustwithbug/src/main.rs

Go link: https://repl.it/repls/RareSelfishDatabases#code/golang/game_error.go

Ruby link: https://repl.it/repls/DarkseagreenOptimalRobodoc#code/ruby/game_bugs.rb

Google Form: https://forms.gle/FL5dNicEEe5wx2zVA


text:
# User Acceptance Tests
## Can Install Package
1) Install script via RunMe.ps1
2) Open new Powershell Window
Result: See that Add-QuickUtility is now part of your Functions that can be "Found" with Tab

## Can Install Utility From RunMe.ps1

## Can Install Utility from CommandLine

## Can Install entire Utility Belt from RunMe.ps1

## Can Install entire Utility Belt from CommandLine

## Can Remove Package From RunMe.ps1

## Can Remove Package from Command Line

## Can Remove Entire Utility Belt from Command Line

## User is Prompted before removing Package from RunMe.ps1

## User is Prompted before removing Package from CommandLine

## Can Remove Package without Removing User Defined Functions

## Can Add Function

## Can Add Alias

## Can Add Tool without Tools Environment Variable

## Can Add Tool With Tools Environment Variable

## Can Set Environment Variable

## Can Edit Function

## Can Edit Alias

## Can Get List of Quick Commands

## Can Rename Quick Function

## Can Rename Quick Alias

repository: EdLichtman/QuickModuleCLI

gha_language: PowerShell

repo_name: EdLichtman/QuickModuleCLI


text:
# Creating Swagger (Reference documentation)
AutoRest is a tool for generating HTTP client libraries from Swagger files. This document explains the conventions
and extensions used by AutoRest in processing Swagger to produce client libraries. The Swagger specification can
be found at [Swagger RESTful API Documentation Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md).

This page is intended to serve as reference documentation. If you have any questions about a specific part of a Swagger file or how AutoRest uses it to generate code, this is the correct place.

1. [Swagger](#Swagger)
2. [Info Object](#InfoObject)
3. [Host](#Host)
4. [Schemes](#Schemes)
5. [Consumes / Produces](#ConsumesProduces)
6. [Paths](#Paths)
7. [Path Item](#PathItem)
  1. [Operation and OperationId](#OperationOperationId)
  2. [Parameters](#Parameters)
    1. [Path Parameters](#PathParameters)
    2. [Query Parameters](#QueryParameters)
    3. [Body Parameters](#BodyParameters)
    4. [Header Parameters](#HeaderParameters)
    5. [FormData Parameters](#FormDataParameters)
  3. [Responses](#Responses)
    1. [Default Response](#DefaultResponse)
    2. [Negative Responses](#NegativeResponses)
8. [Defining Model Types](#DefiningModel)
  1. [Model Inheritance](#ModelInheritance)
  2. [Polymorphic Response Models](#PolymorphicResponse)
9. [ResourceFlattening](#ResourceFlattening)
  1. [Conditions](#Conditions)
  2. [x-ms-azure-resource](#x-ms-azure-resource)
10. [Enums with x-ms-enum](#Enum-x-ms-enum)
  1. [Structure](#enum-structure)
  2. [Understanding modelAsString](#modelAsString)
11. [Paging with x-ms-pageable](#Paging-x-ms-pageable)
  1. [Structure](#paging-structure)
  2. [Pageable Operation](#pageOperation)
  3. [Pageable Model](#pageModel)
12. [URL Encoding](#UrlEncoding)
13. [Long Running operation](#longrunning)
14. [Global parameters](#globalParam)

## Swagger
In this document, references to the 'spec' or to the 'swagger' refer to an instance of a Swagger file. AutoRest
supports Swagger version 2.0. The version of Swagger being used must be included in the spec.

```json5
{
  "swagger": "2.0"
  ...
}
```

## Info Object
Each spec includes an "info object."
The **title** field is used as the name of the generated client.
```json5
"info": {
  "title": "MyClientName",
}
```

```csharp
var client = new MyClientName();
```
Override the title client name by passing the `-ClientName` to AutoRest.
>autorest.exe -ClientName MyClientName

The version field specifies the service version of the API described in the spec. This is used as the default
value for Azure clients where api-version is passed in the querystring.
```json5
"info": {
  "version": "2014-04-01-preview"
```

```
https://management.azure.com/...?api-version="2014-04-01-preview"
```
## Host
The host field specifies the baseURI. (everything after the protocol and before the path).
``` json
{
  "swagger": "2.0",
  "host": "management.azure.com"
}
```

## Schemes
The schemes field is an array of transfer protocols that can be used by individual operations. AutoRest supports
*http* and *https*. The generated client uses the first scheme from the array.
```json5
{
  "swagger": "2.0",
  "schemes": [
    "https",
    "http"
  ]
  . . .
}
```

## Consumes / Produces
The *consumes* and *produces* fields declare the mime-types supported by the API. The root-level definition can
be overridden by individual operations. AutoRest supports JSON payloads.
```json5
{
  "swagger": "2.0",
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ]
  . . .
}
```

## Paths
The paths object defines the relative paths of API endpoints (appended to the baseURI to invoke operations).
```json5
"swagger": "2.0",
"paths": {
  "/tenants": {
  ...
  },
  "/subscriptions": {
  ...
  }
}
```

```
https://management.azure.com/tenants?api-version=2014-04-01-preview
OR
https://management.azure.com/subscriptions?api-version=2014-04-01-preview
```
## Path Item
Each path item in the spec defines the operations available at that endpoint. The individual operations are
identified by the HTTP operation (sometimes referred to as HTTP verbs). AutoRest supports: **head**, **get**,
**put**, **post**, **delete** and **patch**.

```json5
{
  "swagger": "2.0",
  "paths": {
    "/stations": {
      "get": {
      ...
      },
      "put": {
      ...
```
### Operation and OperationId
Every operation must have a unique operationId. The operationId is used to determine the generated method name.
```json5
"paths": {
  "/users": {
    "get": {
      "operationId": "ListUsers"
    }
  }
```

```csharp
var client = new MyClientName();
var listResult = client.ListUsers();
IList<User> users = listResult.Value;
```
All of the operations specified become methods on the client. The client API model can easily become a long and
cumbersome list of methods. AutoRest allows grouping of operations by using a naming convention. Operation groups
are identified by splitting the operationId by underscore.
```json5
"paths": {
  "/{tenantId}/users": {
    "get": {
      "operationId": "Users_List",
      ...
```
instead of
```csharp
var listResult = client.ListUsers();
```
the method becomes part of an operation group interface

```csharp
var listResult = client.Users.List();
```
The operation group interface and the interface implementation is the "core" of the operation. Other signatures of
this API ultimately call the "core" implementation. This allows the operations to be easily mocked for testing without
needing to mock all signature variations. Other API signatures for the same operation are generated as extension methods.
For example, consider this `GetUserById` operation on the `SampleClient`.
```json5
"/users/{userId}": {
    "get": {
      "operationId": "Users_GetById"
...
```
The generated method signature is in the `IUsers`  interface
```csharp
public interface IUsers
{
    Task<HttpOperationResponse<User>> GetByIdWithOperationResponseAsync(string userId, CancellationToken cancellationToken = default(CancellationToken));
}
```
The core signature returns a generic HttpOperationResponse which includes the HttpRequest and HttpResponse objects as
well as the payload object. In addition to the "core" signature, there is a synchronous version and an async version
that returns the payload object without the request and response objects.
```csharp
public static partial class UsersExtensions
{
    public static User GetById(this IUser operations, string userId) {...}

    public static async Task<User> GetByIdAsync( this IUser operations, string userId, CancellationToken cancellationToken = default(CancellationToken)) {...}
}
```

### Parameters
Each operation defines the parameters that must be supplied. An operation may not require any parameters. A parameter
defines a name, description, schema, what request element it is `in` (AutoRest supports parameters in the **path**, **query**,
**header**, and **body** of the request) and whether or not is it `required`.

#### Path Parameters
The value of path parameters are replaced in the templated URL path at the position specified by the name. Parameters that
are `in` the `path` must have a `true` value for the `required` field. In this example, the `{userId}` in this operation
is populated with the value of userId provided in the client method.
```json5
"paths": {
  "/users/{userId}": {
    "get": {
      "operationId": "users_getById",
      "parameters": [
        {
          "name": "userId",
          "in": "path",
          "required": true,
          "type": "string",
          "description": "Id of the user."
        }
      ]
    }
  }
}
```
In the generated code, the path parameter is an argument of the method.
```csharp
string userId = "abcxyz";
var user = client.Users.GetById(userId);
```
>https://{host}/{basePath}/users/abcxyz

#### Query Parameters
Query parameters are appended to the request URI. They can be specified as required or optional.
```json5
"paths": {
  "/users/{userId}": {
    "get": {
      "operationId": "users_getUserById",
      "parameters": [
        {
          "name": "api-version",
          "in": "query",
          "required": true,
          "type": "string",
          "description": "Version of API to invoke."
        }
      ]
    }
  }
}
```
The user doesn't need to know where the parameter is placed. Doc comments surface the required/optional distinction.

#### Body Parameters
Body parameters include schema for the payload. In this example, the schema element is a `$ref` to the type details
in the `#/definitions` section of the spec. More on the `#/definitions` later.
```json5
"paths": {
  "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability": {
    "post": {
      "operationId": "StorageAccounts_CheckNameAvailability",
      "parameters": [
        {
          "name": "accountName",
          "in": "body",
          "required": true,
          "schema": {
            "$ref": "#/definitions/StorageAccountCheckNameAvailabilityParameters"
          }
        }
      ],
      ...
```

#### Header Parameters
Header parameters are sent as part of the HTTP request header.
In general, reserved headers (`Content-Length`, `Content-Type`, ...) should not be documented since their values are derivable (e.g. from the request body) and not really part of the protocol specified by the OpenAPI definition.
Rather, they are part of the REST standard that the protocol is supposed to adhere to anyway.

However, there are rare scenarios for making the `Content-Type` customizable as part of a request, e.g. in case of a binary/stream request body.
The media type of binary request bodies is not reliably derivable: Maybe the service endpoint accepts PNG, JPEG or BMP images, which is expressed in OpenAPI using
``` yaml
consumes:
  - image/png
  - image/jpeg
  - image/bmp
```
and give the request body type `file`.
Now, when a request is made, the protocol has to somehow communicate to the server which of the media types the body has.
Since there is a range of possibilities (and it's certainly not a protocol's job to parse and classify binary data), we suggest adding a `Content-Type` header parameter to the operation's definition.
Unless one provides an `enum` restriction for that parameter, [AutoRest](https://github.com/Azure/autorest) will automatically make the parameter an enum with values drawn from the `consumes` declaration.
This allows for deduplication and hence prevents potential bugs.
More information on how [AutoRest](https://github.com/Azure/autorest) treats a `Content-Type` header parameter can be found [here](https://github.com/Azure/autorest/tree/master/Samples/test/stream-with-content-type).

#### FormData Parameters
>Note: FormData parameters are not currently supported by AutoRest.

### Responses
Each operation defines the possible responses by HTTP status code:
```json5
"/users/{userId}": {
  "get": {
    "operationId": "users_getUserById",
    "responses": {
      "200": {
        "schema": {
          "$ref": "#/definitions/user"
        }
      }
    }
  }
}
```

#### Default Response
Swagger allows for specifying a `default` response. AutoRest treats the `default` response as defining an error
response status code unless `default` is the only status code defined. The reason for imposing this convention is
to produce higher quality API signatures. The return type of the generated API is determined by finding a common
base type of the success responses. In practice, if the default is considered as a potential success definition,
the common ancestor of success responses and error responses ends up being Object.

### Negative Responses
You can describe all the [possible HTTP Response status codes](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) in the responses section of an operation. AutoRest generated code will deserialize the response for all the described response status codes as per their definition in the swagger. If a response status code is not defined then generated code will align to the default response behavior as described above.
- If **a schema is provided** for the negative response codes then this will have an impact on the return type of the generated method.
  - For example: if a schema was provided for 200, and 400 was also described with a schema then,
    - the **return type** would be the Common Ancestor of both the schemas. In most cases there is nothing common between a positive and a negative response code. Hence the return type will be an `Object`. Note:This may not be very helpful to the customer
    - an exception **will NOT be thrown for 400** and the generated method will deserialize the response body as per the schema of "400".
    - any other negative response code will be treated as per the "default" response status code defined in the swagger for that operation.
- If **a schema is NOT provided** for the negative response codes then this will **NOT** have an impact on the return type of the generated method.
  - For example: if a schema was provided for 200 and 404 was described as one of the responses. However, 404 does not have a schema. In this scenario,
    - the **return type** of the generated method will be based upon the schema defined in "200".
    - an **exception will NOT be thrown** for 404 response status code
    - any other negative response code will be treated as per the "default" response status code defined in the swagger for that operation.
```json5
"/users/{userId}": {
  "get": {
    "operationId": "users_getUserById",
    "responses": {
      "200": {
       "description": "Provides User Information.",
        "schema": {
          "$ref": "#/definitions/user"
        }
      },
      "400": {
        "description": "Bad Request. ResponseBody will be deserialized as per the Error definition
                        mentioned in schema. Exception will not be thrown.",
        "schema": {
          "$ref": "#/definitions/Error"
        }
      },
      "404": {
        "description": "Resource Not Found, ResponseBody will be null as there is no schema definition.
                        Exception will not be thrown.",
      },
      "default": {
        "description": "Default Response. It will be deserialized as per the Error definition
                        specified in the schema. Exception will be thrown.",
        "schema": {
          "$ref": "#/definitions/Error"
        }
      }
    }
  }
}
```
### Custom Paths
Swagger 2.0 has a built-in limitation on paths. Only one operation can be mapped to a path and http method. There are some APIs, however, where multiple distinct operations are mapped to the same path and same http method. For example `GET /mypath/query-drive?op=file` and `GET /mypath/query-drive?op=folder` may return two different model types (stream in the first example and JSON model representing Folder in the second). Since Swagger does not treat query parameters as part of the path the above 2 operations may not co-exist in the standard "paths" element.

To overcome this limitation an "x-ms-paths" extension was introduced parallel to "paths". Urls under "x-ms-paths" are allowed to have query parameters for disambiguation, however they are removed during model parsing.

```json5
"paths":{
   "/pets": {
        "get": {
            "parameters": [
                {
                     "name": "name",
                     "required": true
                }
            ]
        }
   }
},
"x-ms-paths":{
   "/pets?color={color}": {
        "get": {}
   },
}

```

Please note, that the use of "x-ms-paths" should be minimized to the above scenarios. Since any metadata inside the extension is not part of the default swagger specification, it will not be available to non-AutoRest tools.

## Defining Model Types
The request body and response definitions become simple model types in the generated code. The models include
basic validation methods, but are generally stateless serialization definitions.

### Understanding the importance of "type" keyword while defining model types.
"Type-specific" keywords such as properties, items, minLength, etc. do not enforce a type on the schema. It works the other way around – when an instance is validated against a schema, these keywords only apply when the instance is of the corresponding type, otherwise they are ignored. Here's the relevant part of the [JSON Schema Validation](https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-4.1) spec:

> 4.1. Keywords and instance primitive types
Some validation keywords only apply to one or more primitive types. When the primitive type of the instance cannot be validated by a given keyword, validation for this keyword and instance SHOULD succeed.

For example, consider this schema:

```yaml
definitions:
  Something:
    properties:
      id:
        type: integer
    required: [id]
    minLength: 8
```
It's a valid schema, even though it combines object-specific keywords properties and required and string-specific keyword minLength. This schema means:
- If the instance is an object, it must have an integer property named id. For example, `{"id": 4}` and `{"id": -1, "foo": "bar"}` are valid, but `{}` and `{"id": "ACB123"}` are not.
- If the instance is a string, it must contain at least 8 characters. `"Hello, world!"` is valid, but `""` and `abc` are not.
- Any instances of other types are valid - `true`, `false`, `-1.234`, `[]`, `[1, 2, 3]`, `[1, "foo", true]`, etc.
(Except `null` - OpenAPI 2.0 does not have the `null` type and does not support `null` except in extension properties. OpenAPI 3.0 supports the `null` value for schemas with nullable: true.)

If there are tools that infer the `type` from other keywords (for example, handle schemas with no `type` but with `properties` as always objects), then these tools are not exactly following the OpenAPI Specification and JSON Schema.

> Bottom line: If a schema must always be an object, add `"type": "object"` explicitly. Otherwise you might get unexpected results.

**Credits** - Stack Overflow [link](https://stackoverflow.com/questions/47374980/schema-object-without-a-type-attribute-in-swagger-2-0).

### Model Inheritance
Swagger schema allows for specifying that one type is `allOf` other types, meaning that the entire specification of
the referenced schema applies is included in the new schema. By convention, if a schema has an 'allOf' that references
only one other schema, AutoRest treats this reference as an indication that the `allOf` schema represents a base
type being extended. In this example, the generated code would include a `Dog` model that inherits from the `Pet` model.

```json5
{
  "definitions": {
    "pet": {
      "description": "Defines the Pet model.",
      "properties": {
        "name": {
          "type": "string"
        },
      },
      "required": [
        "name"
      ]
    },
    "dog": {
      "description": "Defines the Dog model.",
      "required": [
        "breed"
      ],
      "properties": {
        "breed": {
          "type": "string"
        }
      },
      "allOf": [
        {
          "$ref": "#/definitions/pet"
        }
      ]
    }
  }
}
```

### Polymorphic Response Models
Besides using `allOf` to define inheritance, model definitions can indicate that the payload will include a `discriminator`
to disambiguate polymorphic payloads. The discriminator field allows the deserializer to resolve into an instance of a more
specific type. Suppose the Dog and Cat type are `allOf` Pet and an operation will return a Dog or a Cat. If the Pet definition
includes a `discriminator` then payloads can be Dog or Cat. A response can be defined as a Pet model and the API signature
will indicate Pet. At runtime, the returned object is an instance of the more specific type.
```json5
{
  "definitions": {
    "Pet": {
      "type": "object",
      "discriminator": "petType",
      "properties": {
        "name": {
          "type": "string"
        },
        "petType": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "petType"
      ]
    },
    "Cat": {
      "description": "A representation of a cat",
      "allOf": [
        {
          "$ref": "#/definitions/Pet"
        },
        {
          "type": "object",
          "properties": {
            "huntingSkill": {
              "type": "string",
              "description": "The measured skill for hunting",
              "default": "lazy",
              "enum": [
                "clueless",
                "lazy",
                "adventurous",
                "aggressive"
              ]
            }
          },
          "required": [
            "huntingSkill"
          ]
        }
      ]
    },
    "Dog": {
      "description": "A representation of a dog",
      "allOf": [
        {
          "$ref": "#/definitions/Pet"
        },
        {
          "type": "object",
          "properties": {
            "packSize": {
              "type": "integer",
              "format": "int32",
              "description": "the size of the pack the dog is from",
              "default": 0,
              "minimum": 0
            }
          },
          "required": [
            "packSize"
          ]
        }
      ]
    }
  }
}
```

## Defining Azure Resource Types with x-ms-azure-resource (Resource Flattening)
Azure Resource Manager brings a common pattern that is leveraged to provide a more consistent programming model for users.
Resource types all have a common set of Resource properties: id, name, location, tags...
In a resource payload, the common properties are at the top-level and the resource-specific properties are nested within
`properties`. The top-level outer properties are sometimes referred to as the 'ARM envelope' and the inner data as the 'Resource properties.'
```json5
{
    "id": "/subscriptions/{id}/resourceGroups/{group}/providers/{rpns}/{type}/{name}",
    "name": "Resource Name",
    "type": "Microsoft.ResourceProvider/type",
    "location": "North US",
    "properties": {
       "foo" : {
           "name" : "{fooA|fooB|fooC}",
           "capacity" : {number}
       },
       "bar": "flim"
    }
}
```
When the ARM payload shape is reflected directly into the client object model, the nesting of the Resource-specific
'properties' within the 'properties' object becomes cumbersome.
```csharp
var theResource = theClient.GetResourceById(resourceId);
theResource.Properties.Foo.Name = "fooB";
theResource.Properties.Foo.Capacity = 100;
theResource.Properties.Bar = "flam";
```
To provide a **better end-user experience**, types that are identified as ARM resources are **"flattened"** in the generated C# code.
The serialization and deserialization of Resource types hides the "properties" nesting from the user.
```csharp
var theResource = theClient.GetResourceById(resourceId);
theResource.Location = "North US";
theResource.Foo.Name = "fooB";
theResource.Foo.Capacity = 100;
```
### When will AutoRest flatten resources?
If any model or its parent is marked with an extension `"x-ms-azure-resource" : true`, then AutoRest will flatten the
Resource-specific properties by one level for that model.

### x-ms-azure-resource
In using Swagger to describe Azure Resource Manager operations, types are identified as Resources by declaring that a type
is "allOf" the common `Resource` type. That common `Resource` type includes the `x-ms-azure-resource` Swagger extension.
```json5
    "Resource": {
      "x-ms-azure-resource": true,
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true,
          "description": "Resource Id"
        },
        "type": {
          "type": "string",
          "readOnly": true,
          "description": "Resource Type"
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
            },
          "description": "Resource Tags"
        },
        "location": {
          "type": "string",
          "description": "Resource Location"
        },
        "name": {
          "type": "string",
          "readOnly": true,
          "description": "Resource Name"
        }
      }
    }
 ```
**Notice that the type definitions in Swagger schema use the word 'properties' to identify the 'properties' of the type. When
looking at an ARM Resource it also has 'properties', the 'properties' term is overloaded and it looks a bit odd.**

In practice, the Resource properties may be re-used in the Swagger spec and can be defined separately. If the schema of the
resource properties is included inline, AutoRest still needs to generate a type for the properties and does so by appending
`Properties` to the Resource name
```json5
"definitions": {
  "SomeResourceProperties": {
    "properties": {
      "bar": {
        "type": "string"
      }
    }
  },
  "SomeResource": {
    "properties": {
      "properties": {
        "$ref": "#/definitions/SomeResourceProperties"
      }
    },
    "allOf": [
      {
        "$ref": "Resource"
      }
    ]
  }
}
```
## Enums with x-ms-enum
Enum definitions in Swagger indicate that only a particular set of values may be used for a property or parameter. When
the property is represented on the wire as a string, it would be  a natural choice to represent the property type in C#
as an enum. However, not all enumeration values should necessarily be represented as C# enums - there are additional
considerations, such as how often expected values might change, since adding a new value to a C# enum is a breaking change
requiring an updated API version. Additionally, there is some metadata that is required to create a useful C# enum, such
as a descriptive name, which is not represented in swagger.  For this reason, enums are not automatically turned into
enum types in C# - instead they are rendered in the documentation comments for the property or parameter to indicate allowed
values.  To indicate that an enum will rarely change and that C# enum semantics are desired, use the `x-ms-enum` extension.

In C#, an enum type is generated and is declared as the type of the related request/response object. The enum is serialized
as the string expected by the REST API.
```json5
  "accountType": {
    "type": "string",
    "enum": [
      "Standard_LRS",
      "Standard_ZRS",
      "Standard_GRS",
      "Standard_RAGRS",
      "Premium_LRS"
    ],
    "x-ms-enum": {
      "name": "AccountType",
      "modelAsString": false
    }
  }
```

### x-ms-enum extension structure
```json5
{
  "x-ms-enum": {
    "name" : "Specify the name for the Enum."
    "modelAsString": "true/false."
  }
}
```
### modelAsString
- **true**
  - When set to `true` the `enum` will be modeled as a `string`. No validation will happen.
- **false**
  - When set to `false`, it will be modeled as an `enum` if that language supports enums. Validation will happen, irrespective of support of enums in that language.

## Paging with x-ms-pageable
The REST API guidelines define a common pattern for paging through lists of data. The operation response is modeled in
Swagger as the list of items and the `nextLink`. Tag the operation as `x-ms-pageable` and the generated code will include
methods for navigating between pages.

#### x-ms-pageable extension structure
```json5
{
  "x-ms-pageable" : {
    "nextLinkName": "Specify the name of the property that provides the nextLink.
                     If your model does not have the nextLink property then specify null.",
    "itemName": "Specify the name of the property that provides the collection
                 of pageable items. It is optional. Default value is 'value'.",
    "operationName": "Specify the name of the Next operation. It is optional. Default value is 'XXXNext' where XXX is the name of the operation."
  }
}
```
#### x-ms-pageable operation definition
```json5
"paths": {
  "/products": {
    "get": {
      "x-ms-pageable": {
        "nextLinkName": "nextLink"
      },
      "operationId": "products_list",
      "description": "A pageable list of Products.",
      "responses": {
        "200": {
          "schema": {
            "$ref": "#/definitions/ProductListResult"
          }
        }
      }
    }
  }
}
```
#### x-ms-pageable model definition
```json5
"ProductListResult": {
  "properties": {
    "value": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Product"
      }
    },
    "nextLink": {
      "type": "string"
    }
  }
}
```

## Control URL encoding with x-ms-skip-url-encoding
By default, `path` parameters will be URL-encoded automatically. This is a good default choice for user-provided values.
This is not a good choice when the parameter is provided from a source where the value is known to be URL-encoded.
The URL encoding is *NOT* an idempotent operation. For example, the percent character "%" is URL-encoded as "%25". If the
parameter is URL-encoded again, "%25" becomes "%2525". Mark parameters where the source is KNOWN to be URL-encoded to
prevent the automatic encoding behavior.
```json5
"parameters": [
  {
    "name": "databaseName",
    "in": "path",
    "type": "string",
    "required": true,
    "x-ms-skip-url-encoding": true
  }
]
```

## Enable Asynchronous Operations with x-ms-long-running-operation
Some requests like creating/deleting a resource cannot be carried out immediately. In such a situation, the server
sends a 201 (Created) or 202 (Accepted) and provides a link to monitor the status of the request. When such an operation
is marked with extension `"x-ms-long-running-operation": true,` in Swagger, the generated code will know how to fetch
the link to monitor the status. It will keep on polling at regular intervals till the request reaches one of the
terminal states`Succeeded|Failed|Canceled`.
```json5
"paths": {
  "/products/{name}": {
    "put": {
      "operationId": "products_create",
      "x-ms-long-running-operation": true,
      "description": "A pageable list of Products.",
      "parameters": [
        {
          "name": "name",
          "in": "path",
          "required": true,
          "type": "string",
          "description": "The name of the Product."
        },
        {
          "name": "parameters",
          "in": "body",
          "required": true,
          "schema": {
            "$ref": "#/definitions/ProductCreateParameters"
          },
          "description": "The parameters to provide for the created product."
        }
      ],
      "responses": {
        "200": {
          "schema": {
            "$ref": "#/definitions/Product"
          }
        },
        "202": {
          "description": ""
        }
      }
    }
  }
}
```

## Global parameters
Swagger allows for parameters to be defined separately from the operation where they are used. By convention, AutoRest
treats global parameter definitions as Client properties. For example, almost all Azure Resource Manager APIs require
`subscriptionId` and `api-version`. These are defined as global parameters and become properties of the client.
```json5
"parameters": [
  {
    "name": "subscriptionId",
    "type": "string"
  }
]
```

```csharp
var client = new MyClient();
client.SubscriptionId = "xyz-123";
```
By convention, when AutoRest sees that an operation defines a parameter as a reference to a global parameter, the generated
method does not expose the parameter. Instead, the parameter is populated with the value from the client property.

```json5
"paths": {
  "/subscriptions/{subscriptionId}/providers/MyProvider/SomeOperation": {
    "post": {
      "parameters": [{"$ref": "#/parameters/subscriptionId"}]
    }
  }
}
```
If an operation requires that a parameter is exposed as a method parameter, it is defined without referencing the global definition.
```json5
"paths": {
  "/subscriptions/{subscriptionId}/providers/MyProvider/SomeOperation": {
    "post": {
      "parameters": [
        {
          "name": "subscriptionId",
          "in": "path",
          "required": true,
          "type": "string",
        }
      ]
    }
  }
}
```

## x-ms-odata
>TODO: x-ms-odata

TODO: naming standards for operations Create, CreateOrUpdate, Update (respect etag), Get, List, Delete, Patch
TODO: patch => no validate
[Swagger-spec2.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md)

repository: microsoft/azure-rest-api-specs

repo_name: microsoft/azure-rest-api-specs


text:
Welcome to @kluntje/core 👋

Kluntje is a javascript object that brings webcomponents to the next level. Take a look and make webcomponents development a breeze.

## 🚀 Why Kluntje?

Kluntje is the right tool if you want to use webcompoent with the feeling of a modern javascript framework. It suits good to CMS project and works with every JS framework.

*  It has states
*  It has lifecycle hooks
*  It has state reactions
*  It is < 3Kb

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development purposes.

## Usage

Import the Kluntje core component in your js file and you can start using it:

```javascript
import { Component } from "@kluntje/Core";

class MyAmazingComponent extends Component {

}

customElements.define("my-amazing-component", MyAmazingComponent);
```

And use it in your HTML file:

```html
<my-amazing-component></my-amazing-component>
```

### How our component looks like

In the constructor there is an object where you can define:

*  ui: selector for dom elements with every CSS selector
*  events: an array of objects where you can define the event, the target and the handler function.
*  initialStates: an object where we can define the states of out component
*  reactions: an array of callbacks that we can call when a state updates.

#### Example

```javascript
import { Component } from "@kluntje/core";

class IncrementInput extends Component {
  constructor() {
    super({
      ui: {
        input: "input",
        button: ".handle-increment",
      },
      events: [
        {
          event: "click",
          target: "button",
          handler: "handleClick",
        },
      ],
      initialStates: {
        value: 0,
      },
      reactions: {
        value: ["handleIncrement"],
      },
    });
  }

  afterComponentRender() {
    this.ui.input.value = this.state.value;
  }

  handleClick() {
    this.setState({ value: this.state.value + 1});
  }

  handleIncrement({value}) {
    this.ui.input.value = value;
  }
}

customElements.define("increment-input", IncrementInput);
```

And our HTML will looks like:

```html
<increment-input>
    <input type="number" />
    <button class="handle-increment">Increment</button>
</increment-input>

```

## Contributing

Please read [CONTRIBUTING.md](https://) for details on our code of conduct, and the process for submitting pull requests to us.

👤 **Frederik Riewerts<EMAIL_ADDRESS>
## Show your support

Give a ⭐ if this project helped you!

## 📝 License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details

repository: mbehzad/kluntje

repo_name: mbehzad/kluntje


text:
# Node-RED nodes for Pimoroni Automation HAT/pHAT

[Pimoroni Automation HAT](https://raw.githubusercontent.com/shortbloke/node-red-contrib-automation-hat/master/images/Automation_HAT_1_of_3_1024x1024.jpg)

## Provides nodes

* Automation HAT:
  * Output Node: Sinking Outputs, Relays, Lights
  * Input Node: Buffered Inputs (binary), 12-bit ADC @ 0-24V (±2% accuracy) Inputs (ADC1-3 only)

### Unsupported features

* ADC4: 12-bit ADC @ 0-3.3V
* Other Pins exposed only break out section: SPI, TX (#14), RX (#15), #25 pins
* Controlling individual indicator lights on each input/output beyond the auto_lights capability.

## More Information

Check out [my blog post](https://www.martinrowan.co.uk/2018/09/node-red-support-for-pimoroni-automation-hat-phat/) for this new Node Package for some background and examples.

### Where to buy
* [Pimoroni Automation HAT](https://shop.pimoroni.com/products/automation-hat)
* [Pimoroni Automation pHAT](https://shop.pimoroni.com/products/automation-phat)

## Installation

### Dependency - Node and Node-Red

Details of how to install Node and Node-Red needed for this project on Raspberry Pi can be found [here](https://nodered.org/docs/hardware/raspberrypi). The script at the top of the page ensures you have the latest supported versions ready for this project.

### Dependency - Automation HAT Python Library

First you'll need the Python dependencies for Automation HAT, you can install these with our one-line installer, [as per these instructions](https://github.com/pimoroni/automation-hat)

``` bash
curl https://get.pimoroni.com/automationhat | bash
```

### Automation HAT Node-RED

#### Installation via NPM

``` bash
npm install node-red-contrib-automation-hat
```

#### Installation from latest source on GitHub

To install this node you should:

* Change to your users node-red nodes directory:

    ``` bash
    cd ~/.node-red/node_modules
    ```
    _Note: older node installation may use the location: `~/.node-red/nodes`):_
* Clone this repository:
    ``` bash
    git clone https://github.com/shortbloke/node-red-contrib-automation-hat
    ```

* Start Node-Red and you should see the new Automation HAT nodes within the Raspberry Pi section.

## To Do

In no particular order:

* Consider splitting input and outputs types into separate node files
* Add support for controlling light brightness via `write` command
* Add support for controlling each individual indicator light for each input and output

## References

This project is based on the [ExplorerHAT node implementation published by Pimoroni](https://github.com/pimoroni/node-red-nodes)


text:
# portscan
DarkCrew's Web site port scammer tool...

# install and usage
apt install git

git clone https://github.com/DarkCrewS/portscan

cd portscan

python3 portscan.py

# instagram
https://www.instagram.com/l4ncelotberke/

repository: DarkCrewS/portscan

repo_name: DarkCrewS/portscan


text:
---
component: Home
title: WatchToken | Create a Widget for your ERC20 Token
---

# WatchToken

Create a link to your ERC20 Token or an embeddable Widget for your Website. Add your Token to DApp browsers or MetaMask.

Enter your ERC20 Token details, create your Widget and share or embed in your Website.

## Install dependencies

```bash
npm install
```

## Run DEV server

```bash
npm run dev
```

## Build dist

```bash
npm run build
```

## Deploy to gh-pages branch

```bash
npm run deploy
```

## License

Code released under the [MIT License](./LICENSE).

repository: gabbyblk/watch-token

repo_name: gabbyblk/watch-token


text:
Python 2.7

- set ACCOUNTTYPE with one of ["service"  "subscribe"  "enterprise"] in config.properties
- set up your detail in config.properties
	- MsgTemplateId:  your template id of OPENTM207112010
	- ToTags: the tag you have allociated to your users
- usage
	- __Enterprise Account__ `python wxmsg.py <Your [orther messga]>`
	- __Service/Subscribe Account__  `python wxmsg.py <alarmurl> <severity> <alertType> <alertDate> <device> <monitorGroup> <Your [orther messga]>`

repository: snowyxx/WechatScripts

repo_name: snowyxx/WechatScripts


text:
RefFinder is a user-friendly web-based comprehensive tool developed  for evaluating and screening reference genes from extensive experimental datasets. It integrates the currently available major computational programs (geNorm, Normfinder, BestKeeper, and the comparative ¦¤Ct method) to compare and rank the tested candidate reference genes. Based on the rankings from each program, It assigns an appropriate weight to an individual gene and calculated the geometric mean of their weights for the overall final ranking. Please cite F Xie, P Xiao, D Chen, L Xu, B Zhang. 2012. miRDeepFinder: a miRNA analysis tool for deep sequencing of plant small RNAs. Plant molecular biology 80 (1), 75-84.

RefFinder is developed by PHP. Users can deploy it to a Php-based server (Apache + PHP) and run it.
If you have a server to host it. Please share your link to other people.

Thanks!

Step-by-step guide to run this locally on macOS:

1. Download and install Docker locally:
--> https://docs.docker.com/docker-for-mac/install/

2. Download this repository from the top right corner under "Clone or download"

3. Unpack the zip file.

4. It might be necessary to give the executable file `RefFinder.command` the proper permission for it to run. To do this, open the `Terminal`, navigate to the root of the unzipped files from step 3 and type in: `chmod u+x RefFinder.command`

5. Double-click `RefFinder.command`. Your default browser should open with RefFinder running. Enjoy!

NOTE:
After running `RefFinder.command` the server will be running in the background so there's no need to run this file again. Instead you can just navigate to http://localhost to have access to `RefFinder`. In order to manually close the server running in the background you can open a `Terminal` and enter the following commands:
1. `docker stop apache`
2. `docker stop php`

After you ran these commands, you have to run `RefFinder.command` again to use the software.

repository: anstaendig/RefFinder

repo_name: anstaendig/RefFinder


text:
---
title: "Monitor background jobs"
---

Starting with AppSignal gem version 8.0 or higher we monitor Sidekiq and Delayed Job. We've also added a few hooks to create your own background monitoring for other tools.

## Delayed Job

[Delayed Job](https://github.com/collectiveidea/delayed_job) is created by the excellent folks at Shopify and one of the most popular background processors for Ruby/Rails.

The AppSignal gem has a sidekiq plugin that detects Delayed Job and hooks into the standard Delayed Job callbacks. No further action is required.

## Procs as Jobs with `display_name`

Delayed Job allows any class that responds to `perform` to be queued and processed.

If you use Procs with a perform method and `display_name` that doesn't return the default 'ClassName#method_name' format, AppSignal treats each Job as a separate entity, creating many Incidents and notifications.

To counter this, define an `appsignal_name` method that returns the correct value, this way the Jobs will be grouped correctly.

An example:

```ruby
class StructJobWithName < Struct.new(:id)

  def perform
    return true
  end

  # This wil generate a new incident and graphs for each unique name.
  def display_name
    return "StructJobWithName-#{id}"
  end

  # This will group the jobs back to a single entity, allowing incidents
  # and graphs to work properly.
  def appsignal_name
    "StructJobWithName#perform"
  end

end
```

repository: andrew/appsignal-docs

gha_language: Ruby

repo_name: andrew/appsignal-docs