text:
# Usage

## Create an `NSDate` object
SwiftDate provides a number of helper functions to create `NSDate` objects. The absolute time that is created this way reflects the components in your current time zone and calendar.

```swift
// Create a date for XMas Day at midnight
let date1 = NSDate(year: 2015, month: 12, day: 25)

// Create a date at 14:00 on XMas Day
let date2 = NSDate(year: 2015, month: 12, day: 25, hour: 14)

// Create a date for the Monday in week 1 of 2016
// Mind that we assume a European locale setting on the device, so
// Monday is day 1 (in the USA Monday is day 2)
let date3 = NSDate(yearForWeekOfYear: 2016, weekOfYear: 1, weekday: 1)

// Create date from string
let date1 = "2015-01-05T22:10:55.200Z".toDate(DateFormat.ISO8601)
let date2 = "Fri, 09 Sep 2011 15:26:08 +0200".toDate(DateFormat.RSS)
let date3 = "09 Sep 2011 15:26:08 +0200".toDate(DateFormat.AltRSS)
let date4 = "22/01/2015".toDate(DateFormat.Custom("dd/MM/yyyy"))
```

Or if you want to state the time in a different region, then just add the `DateRegion` object. Mind that the region info is NOT incapsulated in `NSDate` objects. I.e. you get an absolute time that differs from the local time. That is, of course, when the specified date region is NOT the default region.

```
let newYork = DateRegion(timeZoneID: "EST")

// Create a date for XMas Day at midnight in New York
let date1 = NSDate(year: 2015, month: 12, day: 25, region: newYork)
let date2 = NSDate(year: 2015, month: 12, day: 25, timeZoneID: "EST")
```

## Create a `DateInRegion` object
Creation of `DateInRegion` objects is equivalent to that of `NSDate` objects:

```swift
// Create a local date for XMas Day at midnight
let date1 = `DateInRegion`(year: 2015, month: 12, day: 25)

// Create a local date at 14:00 on XMas Day
let date2 = `DateInRegion`(year: 2015, month: 12, day: 25, hour: 14)

// Create a date for the Monday in week 1 of 2016 in Rome
let rome = DateRegion(timeZoneID: "CET", localeID: "it_IT")
let date3 = DateInRegion(yearForWeekOfYear: 2016, weekOfYear: 1, weekday: 1, region: rome)
let date4 = DateInRegion(yearForWeekOfYear: 2016, weekOfYear: 1, weekday: 1, timeZone: TimeZoneNames.Europe.Rome, localeID: "it_IT")
let date5 = DateInRegion(yearForWeekOfYear: 2016, weekOfYear: 1, weekday: 1, timeZoneID: "CET", localeID: "it_IT")

// Create date from an `NSDate`
let date6 = nsdateObject.inRegion(rome)
```
So far `NSDate` and `DateInRegion` look pretty much equivalent. It becomes more interesting when we start to calculate with them. More on that later.

## Create a DateRegion
A date region can be created with the initialiser `DateRegion()`. By default it contains the data for the default device calendar, time zone and locale.

```
// Create a local region
let thisRegion = DateRegion()

// Create a local region with a Hebrew calendar
let thisRegion = DateRegion(calendarID: "hebrew")

// Create a region for Rome using Gregorian calendar and NSLocale.currentLocale (all init params are optional)
let romeRegion = DateRegion(calType: CalendarType.Gregorian, tzType: TimeZoneNames.Europe.Rome)

// Create a region for China using Buddhist calendar
let chinaRegion = DateRegion(calType: CalendarType.Buddhist, tzType: TimeZones.Asia.Shanghai, localeID: "zh_Hans_CN")
```

### Calendar & time zone identification helpers
SwiftDate represent Calendars and TimeZones with custom structures that reflect classic NSTimeZone and NSCalendar identifiers. Using `CalendarType` and `TimeZones` you can easily create objects without remembering identifiers. You can get instances of NSCalendar from CalendarType by calling the  `toCalendar()` method. In the same way, using `toTimeZone()` you can get an NSTimeZone instance from a `TimeZones` structure.

In addition, you can use the plain identifier string if you want.

```
// Create a region with a Gregorian calendar, all three lines will render the same calendar
let gregorian1 = DateRegion(calendarType: CalendarType.Gregorian)
let gregorian2 = DateRegion(calendarID: NSCalendarIdentifierGregorian)
let gregorian3 = DateRegion(calendar: NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian))

// Create a region with an Islamic Civil calendar, all three lines will render the same calendar
let islamic1 = DateRegion(calendarType: CalendarType.IslamicCivil)
let islamic2 = DateRegion(calendarID: NSCalendarIdentifierIslamicCivil)
let islamic3 = DateRegion(calendar: NSCalendar(calendarIdentifier: NSCalendarIdentifierIslamicCivil))

// Create a region with the time zone for Eastern Standard Time (New York time)
let newYork1 = DateRegion(timeZoneRegion: TimeZoneNames.America.New_York)
let newYork2 = DateRegion(timeZoneID: "EST")
let newYork3 = DateRegion(timeZoneID: "America/New_York")

// Create a region with the time zone for UTC (Universal Standard time)
let utc1 = DateRegion(timeZoneRegion: TimeZoneNames.UTC)
let utc2 = DateRegion(timeZoneID: "UTC")
let utc3 = DateRegion(timeZoneID: "etc/UTC")
```

Please note: time zone names are the official names from IANA. They can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)

### Chaining Time Units
Apart from using components in the regular initialisers, you can compose a time by chaining its components `nanoseconds, seconds, minutes, hours, days, weeks, months, year`

```swift
// Create an `NSDate` object for 20:10 on XMas Day for the local calendar and time zone
let date = (2015.years | 12.months | 25.days | 20.hours | 10.minutes)

// Convert this to a `DateInRegion` object for New York (will be 8h earlier in New York)
let dateinNewYork = date.inRegion(newYork)

// ...or Dubai (will be 2h later in Dubai)
let dateinDubai = date.inRegion(dubai)
```

### From a time interval from a specified date (fromNow/ago)
By creating a date with an interval from a specified date using `fromNow/ago`:

```swift
let date = 5.days.fromNow // an `NSDate` 5 days after the current date/time
let date = 4.hours.ago // an `NSDate` 4 hours before the current date/time
let date = (5.days + 2.hours - 15.minutes).fromNow // an `NSDate` 5d,2h,15m after the current date/time
let date = (6.days + 2.hours).fromDate(anotherDate) // an `NSDate` 6 days and 2 hours after a specified date
let date = (6.hours + 2.minutes).fromNow(region: inRome)
```

### By passing time units as init parameters
Via init parameters: all parameters are optional unless refDate (the reference date used to fill undefined/not passed components) and the region:

```swift
// First of all we create the region in which the date is expressed. Suppose we want to represent a datetime in Rome (GMT+1).
let region = DateRegion(calType: CalendarType.Gregorian, tzType: TimeZoneNames.Europe.Rome)

// Suppose anotherDate is: Nov 15, 2014 at 20:30:44
// Now we create the date by setting only year,month,day and hour (all other missing params will be taken from anotherDate).
let date = NSDate(refDate: anotherDate, year: 2015, month: 12, day: 25, hour: 22, region: region)
// ... Produce date is Dec 25 2015 at 22:30:44 in GMT+1
// (will be Dec 25, 2015 at 21:30:44 in UTC)
```

### Create Dates at start/end of a time unit
You can also create an `NSDate` at the start or end of a particular datetime unit expressed with `NSCalendarUnit`.

```swift
// Suppose we have anotherDate = Dec 13 2015 at 14:20:00 UTC.
// To get a `NSDate` at the start of the month (december) we can use:
let sMonth = anotherDate.startOf(.Month) // 2015-12-01 00:00:00 UTC

// The same behaviour can be obtained using endOf() method.
// In this example we get the last moment of the current hour from our date
let sMonth = anotherDate.endOf(.Hour) // 2015-12-01 14:59:59 UTC

// We can also express it in another timezone
// Suppose region = DateRegion(tzType: TimeZoneNames.Europe.Rome)
let sMonthInRome = anotherDate.startOf(.Month, inRegion: region) // 2015-11-30 23:00:00 UTC or 2015-12-01 00:00:00 GMT+1/Rome
```

## Inspect `DateInRegion` or `NSDate` components
All methods and properties which follows are the same for both of the classes but while in `NSDate` returns value in the default region and the DateRegion variant values are returned in the specified region

Suppose you have:

```swift
let inRome = ... // 2015-02-01 00:45:00 Europe/Rome (+1 from GMT)
let date = inRome.absoluteTime() ... // get the absolute time: '2015-01-31 23:45:00 UTC
```

Properties and functions available:

Property/function|Description|NSDate|DateInRegion
---|---|---|---
`era`|Returns the era number of the receiver|x|x
`year`|Returns the year number of the receiver|x|x
`yearForWeekOfYear`|Returns the year number for the weekOfYear of the receiver|x|x
`month`|Returns the month number (1...12) of the receiver|x|x
`monthName`|Returns the month name of the receiver|x|x
`monthDays`|Returns the number of days in the month (28...31) of the receiver|x|x
`weekOfYear`|Returns the week number in the year (1...53) of the receiver|x|x
`weekOfMonth`|Returns the week number in the month (0...5) of the receiver|x|x
`weekday`|Returns the day number in the week (1...7) of the receiver|x|x
`weekdayName`|Returns the weekday name of the receiver|x|x
`weekdayOrdinal`|Returns the ordinal weekday in this month (e.g. third Tuesday this month) (0...5) for the receiver|x|x
`day`|Returns the day number (0...31) in the month of the receiver|x|x
`hour`|Returns the hour (0...24) of the receiver|x|x
`minute`|Returns the minute (0...59) of the receiver|x|x
`seconds`|Returns the seconds (0...59) of the receiver|x|x
`nanosecond`|Returns the nanosecond (0...999999999) of the receiver|x|x
`firstDayOfWeek`|Returns the first day of the week of the receiver|x|x
`lastDayOfWeek`|Returns the last day of the week of the receiver|x|x
`leapMonth`|returns `true` if the receiver is in a leap month|x|x
`leapYear`|returns `true` if the receiver is in a leap year|x|x
`components`|return the NSDateComponents of a date|x|x
`calendar`|Returns the NSCalendar object of the receiver|.|x
`locale`|Returns the NSLocale object of the receiver|.|x
`timeZone`|Returns the NSTimeZone object of the receiver|.|x
`components(inRegion:)`|returns the components for a specific region|x|.
`thisWeekend()`|to return the start and end of the current weekend or `nil` if the receiver is not in a weekend|x|x
`nextWeekend()`|to return the start and end of the next weekend|x|x
`previousWeekend()`|to return the start and end of the previous weekend|x|x
`firstDayOfWeek()`|returns midnight on the first day of the week|x|x
`lastDayOfWeek()`|returns the end of the last day of the week|x|x
`inRegion()`|returns a `DateInRegion` object for the receiver|x|.
`absoluteTime`|Returns an `NSDate` object with the absolute time of the receiver|.|x

Class functions available:

Function|Description|NSDate|DateInRegion|DateRegion
---|---|---|---|---
`today()`|Returns today at midnight|x|.|x
`tomorrow()`|Returns tomorrow at midnight|x|.|x
`yesterday()`|Returns yesterday at midnight|x|.|x

All `NSDate` functions are evaluated against the current region by default. If you want a value for another region you can add the `inRegion:` parameter. E.g. `nsdate.nextWeekend(inRegion: china)` will return the start and end of the next weekend in China. Mind that the return values are `NSDate` objects. If you want `DateInRegion` return values then you can use `nsdate.inRegion(china).nextWeekend()`. This will create a `DateInRegion` object from the `nsdate` object and then evaluate the `nextWeekend` function.

The properties `monthName` and `weekdayName` return `String` objects against the current locale for `NSDate` and for the locale registered with the `DateRegion` for `DateInRegion`.

## Calculations with `DateInRegion`/`NSDate`
Add (`+`) and subtract (`-`) operators are supported both for `NSDate` and `DateInRegion`.

```swift
// With NSDate
let refDate = NSDate(timeIntervalSince1970:<PHONE_NUMBER>) // Sun, 15 Nov 2015 23:30:00 UTC
let newDate = refDate + 2.hours + 1.days // Mon, 17 Nov 2015 01:30:00 UTC

// With DateInRegion
let format = DateFormat.Custom("YYYY-mm-dd")
let regionRome = DateRegion(tzType: TimeZoneNames.Europe.Rome)
let initialDateInRegion = DateInRegion(fromString:"2012-01-01", format: format, region: regionRome) // 2012-01-01 00:00:00 CET
let newDateInRegion = initialDateInRegion + 1.days + 2.hours // 2012-01-02 02:00:00 CET
```

You can also use add() methods set to add components to your date. Both of them are available for plain `NSDate` and `DateInRegion`:
- `add(years:months:weeks:days:hours:minutes:seconds:nanoseconds:)` where all parameters are optional
- `add(components:)` you can pass an `NSDateComponents` to add

```swift
// Reference date is: Thu, 19 Nov 2015 19:00:00 UTC<PHONE_NUMBER> from 1970)
let refDate = NSDate(timeIntervalSince1970:<PHONE_NUMBER>)

// Remember: all parameters are optional; in this example we have ignored minutes and seconds
let newDate = refDate.add(years: 1, months: 2, days: 1, hours: 2)
// newdate is 2017-01-21 14:00:00 +0000

// This is equivalent to
let newDate2 = refDate + 1.years + 2.months + 1.days + 2.hours
```

Point of attention with date calculations is that `DateInRegion` objects have their own calendar encapsulated. Different calendars produce different results. E.g. adding an Islamic year has a different outcome than adding a Gregorian year because the Islamic calendar is lunar based as opposed to solar for the Gregorian calendar.

```swift
let islamicDate = DateInRegion(region: dubai) + 1.years // 9-Dec-2016 (in the gregorian calendar)
let gregorianDate = DateInRegion(region: chicago) + 1.years // 21-Dec-2016
```

## Comparisons
Date objects can be compared with the regular math comparison operators:
- `==` right hand side represents the same moment in time as the left hand side.
- `!=` right hand side is not at the same moment as the left hand side.
- `<` right hand side is earlier than the left hand side.
- `>` right hand side is later than the left hand side.
- `<=` right hand side is earlier than- or at the same moment as the left hand side.
- `>=` right hand side is later than- or at the same moment as the left hand side.

Other comparisons are in the functions:

Property/function|Description|NSDate|DateInRegion
---|---|---|---
`isInToday()`|returns `true` if the receiver is in today|x|x
`isInYesterday()`|returns `true` if the receiver is in yesterday|x|x
`isInTomorrow()`|returns `true` if the receiver is in tomorrow|x|x
`isInWeekend()`|returns `true` if the receiver is in a weekend|x|x
`isInSameDayAsDate()`|returns `true` if the receiver is in the days of the specified date|x|x
`isIn(unit:ofDate:)`|returns `true` if the receiver is within the unit of the specified date|x|x
`isBefore(unit:ofDate:)`|returns `true` if the receiver is before the unit of the specified date|x|x
`isAfter(unit:ofDate:)`|returns `true` if the receiver is before the unit of the specified date|x|x
`isLeapYear()`|returns `true` if the receiver is in a leap year|x|x
`isLeapMonth()`|returns `true` if the receiver is in a leap month|x|x

## Conversions

### Time zone conversions

`NSDate` is a moment in time. Conversion takes place in its representation. But conversion is pretty universal for both `NSDate` and `DateInRegion`:

```swift
let now1 = NSDate()
let now2 = DateInRegion()

let now1Here = now1.toString() // E.g. 21-Dec-15 12:00 CET
let now1InAnchorage = now1.inRegion(timeZoneID: TimeZones.America.Anchorage).toString() // E.g. 21-Dec-15 02:00 AKST
let now1InSydney = now1.inRegion(timeZoneID: "Pacific/Sydney").toString() // E.g. 21-Dec-15 22:00 AEDT
let now1InChina = now1.inRegion(timeZoneID: ""CST").toString() // E.g. 21-Dec-15 22:00 CST

let now2Here = now1.toString() // E.g. 21-Dec-15 12:00 CET
let now2InAnchorage = now1.inRegion(timeZoneID: TimeZones.America.Anchorage).toString() // E.g. 21-Dec-15 02:00 AKST
let now1InSydney = now1.inRegion(timeZoneID: "Pacific/Sydney").toString() // E.g. 21-Dec-15 22:00 AEDT
let now1InChina = now1.inRegion(timeZoneID: ""CST").toString() // E.g. 21-Dec-15 22:00 CST
```

### Calendar conversions

```swift
let now = NSDate()

let nowHere = now.toString() // E.g. 21-Dec-15 12:00 CET
let nowInHebrew = now.inRegion(calendarID: .Hebrew).toString() // "9 Tevet 5776, 12:00:00 PM"
let nowInBuddhist = now.inRegion(calendarID: .Buddhist).toString() // "Mo11 11, 2015, 12:00:00 PM"
```

### Locale conversions

```swift
let now = NSDate()

let nowHere = now.toString() // E.g. 21-Dec-15 12:00 CET
let nowInArabic = now.inRegion(localeID: "ar_AE").toString() // "21/12/2015، 12:00:00 م"
let nowInRussian = now.inRegion(localeID: "ru_RU").toString() // "21 дек. 2015 г., 12:00:00"
```

### Putting it all together

```
let date = NSDate(year: 2015, month: 12, day: 25, hour: 12)

let india = DateRegion(calendarID: NSCalendarIdentifierIndian, timeZoneID: "IST", localeID: "en_IN")
let dubai = DateRegion(calendarID: NSCalendarIdentifierIslamic, timeZoneID: "GST", localeID: "ar_AE")
let newZealand = DateRegion(calendarID: NSCalendarIdentifierGregorian, localeID: "en_NZ", timeZoneID: "Pacific/Auckland")
let israel = DateRegion(calendarID: NSCalendarIdentifierHebrew, timeZoneID: "Asia/Jerusalem", localeID: "he_IL")
let china = DateRegion(calendarID: NSCalendarIdentifierChinese, timeZoneID: "CST", localeID: "zn_Hans_CH")
let magadan = DateRegion(calendarID: NSCalendarIdentifierGregorian, timeZoneID: "Asia/Magadan", localeID: "ru_RU")
let thailand = DateRegion(calendarID: NSCalendarIdentifierBuddhist, timeZoneID: "Asia/Bangkok", localeID: "th_TH")
let japan = DateRegion(calendarID: NSCalendarIdentifierBuddhist, timeZoneID: "Asia/Tokyo", localeID: "ja_JP")
let unalaska = DateRegion(calendarID: NSCalendarIdentifierGregorian, timeZoneID: "AKST", localeID: "en_US")
let utc = DateRegion(calendarID: NSCalendarIdentifierGregorian, timeZoneID: "UTC", localeID: "en_US_POSIX")

let unalaskaDate = date.inRegion(unalaska)
let newYorkDate = date.inRegion(newYork)
let indiaDate = date.inRegion(india)
let dubaiDate = date.inRegion(dubai)
let israelDate = date.inRegion(israel)
let chinaDate = now.inRegion(china)
let newZealandDate = now.inRegion(newZealand)
let magadanDate = date.inRegion(magadan)
let japanDate = date.inRegion(japan)
let thailandDate = date.inRegion(thailand)
let utcDate = date.inRegion(utc)

unalaskaDate.toString() // "Dec 25, 2015, 2:00:00 AM"
newYorkDate.toString() // "Dec 25, 2015, 6:00:00 AM"
indiaDate.toString() // "04-Pausa-1937 Saka, 4:30:00 PM"
dubaiDate.toString() // "14 ربيع١، 1437 هـ، 3:00:00 م"
israelDate.toString() // "י״ג בטבת תשע״ו, 13:00:00"
chinaDate.toString() // "Mo11 15, 2015, 5:00:00 AM"
magadanDate.toString() // "25 дек. 2015 г., 21:00:00"
japanDate.toString() // "BE2558/12/25 20:00:00"
thailandDate.toString() // "25 ธ.ค. 2558 18:00:00"
newZealandDate.toString() "26/12/2015, 12:00:00 AM"
utcDate.toString() // "Dec 25, 2015, 11:00:00 AM"

```

## From `DateInRegion`/`NSDate` to strings
Convert a date into a string is pretty easy too. Both `NSDate` and `DateInRegion` supports the following methods. SwiftDate use a per-thread cached `NSDateFormatter` in order to avoid multiple allocations at each call (NSDateFormatter instances are very expensive to create! However you don't need to be worried about that, is transparent to you!)

Formatting methods are:
- `.toString(format:)` Print date with specified format (see below to get a table of symbols you can use to represent each component)
- `.toISO8601String()` Print an ISO8601 formatted string
- `.toString(style:,dateStyle:,timeStyle:)` Print a string with a common style for date/time (see `NSDateFormatterStyle`) or specify a style for date and another for time.
- `.toShortString(date:time)` Print a short representation of the both date and time (or only one of them according to parameters)
- `.toMediumString(date:time:)` Print a medium representation of the both date and time (or only one of them according to parameters)
- `.toLongString(date:time:)` Print a long representation of the both date and time (or only one of them according to parameters)

Some examples:

```swift
// Create a `NSDate` (UTC) from string and transform it into `DateInRegion`
let date = "2015-01-05T22:10:55.000Z".toDate(DateFormat.ISO8601)!.inRegion(romeRegion)
// The same behaviour can be also accomplished using `DateInRegion`(fromString:format:region)
let date = `DateInRegion`("2015-01-05T22:10:55.000Z",DateFormat,ISO8601,romeRegion)

// We can print the date (it also works with plain `NSDate` too!)
// Just some examples:
print("\(date.toISO8601String())") // to UTC ISO8601: "2015-01-05T22:10:55.000Z"
print("\(date.toMediumString())") // to E/Rome: "Jan 5, 2015, 11:10:55 PM"
print(date.toString(DateFormat.Custom("YYYY-MM-dd HH 'at' HH:mm"))) // to E/Rome: "2015-01-05 23 at 23:10"
```

### From `DateInRegion`/`NSDate` to relative strings
- `.toRelativeString(fromDate:abbreviated:maxUnits:)`

A relative representation of the date (e.g. "2 hours ago", "1 day ago"...) can be obtained by using:

```swift
let string = date.toRelativeString(abbreviated: false, maxUnits:2)
```

This example tell to SwiftDate to return a relative representation of the date by comparing it to the current date (nil in fromDate means `NSDate`()) without using an abbreviated form (use "seconds" not "secs", or "years" not "ys") and with a max number of units of 2 (this is used to get the approximation units to print, ie "2 hours, 30 minutes" are 2 units, "2 hours, 30 minutes, 5 seconds" are 3 units).

You can also translate components by localizing `SwiftDate.localizable` file (we accept pull requests for them)

## Best practices
- As a rule of the thumb you should use `NSDate` when working with the default calendar, time zone and locale of the device.
- When you work with dates in a calendar, time zone and/or locale that differs from the default one, you should use `DateInRegion`. E.g. when you want to work with a second time zone in an app, or when you want to display a date in a different calendar.
- Use `DateRegion` objects to group calendar, time zone and/or locale together. E.g. when you have an app that co-ordinates meetings with another office on the other end of the world.

gha_language: Swift


text:
# Polytech-Transposition-Cryptography-Application

[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.txt)

This application was carried out along the ISI module, taught at Polytech Lyon.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: default
---

# 1993-11-29 - Secure Clear

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 041965175ad11b35476827b83196cd229c88ae807dfbdb1c3078e89eec601a6d

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-11-29 04:29:40 UTC

Raw Date: Sun, 28 Nov 93 20:29:40 PST

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Sun, 28 Nov 93 20:29:40 PST
To<EMAIL_ADDRESS>Subject: Secure Clear
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

         wisej<EMAIL_ADDRESS>asked:

>                        (M) MOTOROLA

>        Motorola and Secure Clear are trademarks of Motorola, Inc. (c) 1993
>        Motorola, Inc.

>Comments?

        Don't have one, but know two who do. Scramble, as I understand
   the meaning of the word, they don't.

        Last I knew, "Secure Clear" is simple frequency inversion, and can
   be defeated by:
                   a $15 kit added to a scanner, or;
                   tuning the freq on a single sideband receiver.

        I've even heard of individuals who had trained themselves, or
   been trained, to understand the freq inverted signal.

        Check out Cincinnati Microwave's spread spectrum frequency
   phones. I don't know if they use frequency hopping or direct sequence,
   but they may be secure against all but military and LEA types... and
   the really determined and accomplished hardware hacker.

{% endraw %}
```

## Thread

+ Return to [November 1993](/archive/1993/11)

+ Return to "[XXCLARK@indst.indstate.edu](/authors/xxclark_at_indst_indstate_edu)"

+ 1993-11-29 (Sun, 28 Nov 93 20:29:40 PST) - Secure Clear -<EMAIL_ADDRESS>

gha_license_id: MIT


text:
<!-- BEGIN_TF_DOCS -->
# Minimal L3Out example with static route
To run this example you need to execute:
```bash
$ terraform init
$ terraform plan
$ terraform apply
```
Note that this example will create resources. Resources can be destroyed with `terraform destroy`.
```hcl
module "aci_l3out" {
  source  = "qzx/l3out/aci"
  version = "1.0.0"

  name        = "example-l3out"
  tenant_name = "example"
  vrf         = "example"
  l3_domain   = "example-l3out-domain"

  paths = {
    primary = {
      name                = "eth1/2"
      pod_id              = 1
      nodes               = [101]
      is_vpc              = false
      vlan_id             = 301
      mtu                 = 1500
      interconnect_subnet = "<IP_ADDRESS>/30"
    }
  }

  static_routes = ["<IP_ADDRESS>/0"]
}
```
<!-- END_TF_DOCS -->

branch_name: refs/heads/main


text:
DISCONTINUATION OF PROJECT.

This project will no longer be maintained by Intel.

This project has been identified as having known security escapes.

Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.

Intel no longer accepts patches to this project.
# DISCONTINUATION OF PROJECT

**This project will no longer be maintained by Intel.  Intel will not provide or guarantee development of or support for this project, including but not limited to, maintenance, bug fixes, new releases or updates.  Patches to this project are no longer accepted by Intel. If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the community, please create your own fork of the project.**

[![Build Status](https://api.travis-ci.org/intelsdi-x/snap-plugin-collector-mongodb.svg)](https://travis-ci.org/intelsdi-x/snap-plugin-collector-mongodb )
[![Go Report Card](http://goreportcard.com/badge/intelsdi-x/snap-plugin-collector-mongodb)](http://goreportcard.com/report/intelsdi-x/snap-plugin-collector-mongodb)

# Snap collector plugin - mongodb

This plugin collects metrics from MongoDB database.

It's used in the [Snap framework](http://github.com/intelsdi-x/snap).

1. [Getting Started](#getting-started)
  * [System Requirements](#system-requirements)
  * [Operating systems](#operating-systems)
  * [Installation](#installation)
  * [Configuration and Usage](#configuration-and-usage)
2. [Documentation](#documentation)
  * [Global Config](#global-config)
  * [Collected Metrics](#collected-metrics)
  * [Examples](#examples)
  * [Roadmap](#roadmap)
3. [Community Support](#community-support)
4. [Contributing](#contributing)
5. [License](#license-and-authors)
6. [Acknowledgements](#acknowledgements)

## Getting Started
### System Requirements
* [golang 1.7+](https://golang.org/dl/)  - needed only for building
* [mongodb 3.2.x](https://mongodb.com/)
### Operating systems
All OSs currently supported by Snap:
* Linux/amd64
* Darwin/amd64

### Installation

#### Download the plugin binary:

You can get the pre-built binaries for your OS and architecture from the plugin's [GitHub Releases](https://github.com/intelsdi-x/snap-plugin-collector-mongodb/releasess) page. Download the plugin from the latest release and load it into `snapteld` (`/opt/snap/plugins` is the default location for Snap packages).

#### To build the plugin binary:

Fork https://github.com/intelsdi-x/snap-plugin-collector-mongodb
Clone repo into `$GOPATH/src/github.com/intelsdi-x/`:

```
$ git clone https://github.com/<yourGithubID>/snap-plugin-collector-mongodb.git
```

Build the Snap mongodb plugin by running make within the cloned repo:
```
$ make
```
This builds the plugin in `./build/`

### Configuration and Usage
* Set up the [Snap framework](https://github.com/intelsdi-x/snap/blob/master/README.md#getting-started).
* Configure connection strings to MongoDB service which includes username , password , hostname (default "localhost:27017").

* Load the plugin and create a task, see example in [Examples](#examples).

## Documentation

This collector gathers metrics from mongodb server status command.

### Global config
Global configuration files are described in [Snap's documentation](https://github.com/intelsdi-x/snap/blob/master/docs/SNAPTELD_CONFIGURATION.md). You have to add `"mongodb"` section with following entries:

 - `"uri"` -  it's hostname and port pair in format `"hostname:port"`,  as default set to `"localhost:27017"`.
 - `"username"` - username if authentification is enabled
 - `"password"` - password if authentification is enabled

See exemplary Global configuration files in [examplary config files] (examples/configs/).

### Collected Metrics

List of collected metrics is described in [METRICS.md](METRICS.md).

### Examples

Example of running Snap mongodb collector and writing data to file.

Ensure [snap daemon is running](https://github.com/intelsdi-x/snap#running-snap):
* initd: `service snap-telemetry start`
* systemd: `systemctl start snap-telemetry`
* command line: `snapteld -l 1 -t 0 &`

Download and load Snap plugins:
```
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-collector-mongodb/latest/linux/x86_64/snap-plugin-collector-mongodb
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-file/latest/linux/x86_64/snap-plugin-publisher-file
$ chmod 755 snap-plugin-*
$ snaptel plugin load snap-plugin-collector-mongodb
$ snaptel plugin load snap-plugin-publisher-file

Create a task manifest file  (exemplary files in [examples/tasks/] (examples/tasks/)):
```yaml
---
max-failures: 10
schedule:
  interval: 1s
  type: simple
version: 1
workflow:
  collect:
    config:
      /intel/mongodb:
        uri: "localhost:27017"
        username: ""
        password: ""
    metrics:
      /intel/mongodb/opscounters/command: {}
      /intel/mongodb/opscounters/delete: {}
      /intel/mongodb/opscounters/getmore: {}
      /intel/mongodb/opscounters/insert: {}
      /intel/mongodb/opscounters/query: {}
      /intel/mongodb/opscounters/update: {}
      /intel/mongodb/tmalloc/aggressive_memory_decommit: {}
      /intel/mongodb/tmalloc/central_cache_free_bytes: {}
      /intel/mongodb/tmalloc/current_allocated_bytes: {}
      /intel/mongodb/tmalloc/current_total_thread_cache_bytes: {}
      /intel/mongodb/tmalloc/heap_size: {}
      /intel/mongodb/tmalloc/max_total_thread_cache_bytes: {}
      /intel/mongodb/tmalloc/pageheap_free_bytes: {}
      /intel/mongodb/tmalloc/pageheap_unmapped_bytes: {}
      /intel/mongodb/tmalloc/thread_cache_free_bytes: {}
      /intel/mongodb/tmalloc/total_free_bytes: {}
      /intel/mongodb/tmalloc/transfer_cache_free_bytes: {}
    publish:
      -
        config:
          file: /tmp/mongodb_metrics
        plugin_name: file

```
Download an [example task file](https://github.com/intelsdi-x/snap-plugin-collector-mongodb/blob/master/examples/tasks/) and load it:
```
$ curl -sfLO https://raw.githubusercontent.com/intelsdi-x/snap-plugin-collector-mongodb/master/examples/tasks/mongodb-file.yaml
$ snaptel task create -t mongodb-file.json
Using task manifest to create task
Task created
ID: 480323af-15b0-4af8-a526-eb2ca6d8ae67
Name: Task-480323af-15b0-4af8-a526-eb2ca6d8ae67
State: Running
```

See realtime output from `snaptel task watch <task_id>` (CTRL+C to exit)
```
$ snaptel task watch 480323af-15b0-4af8-a526-eb2ca6d8ae67
```

This data is published to a file `/tmp/mongodb_metrics` per task specification

Stop task:
```
$ snaptel task stop 480323af-15b0-4af8-a526-eb2ca6d8ae67
Task stopped:
ID: 480323af-15b0-4af8-a526-eb2ca6d8ae67
```

### Roadmap
There isn't a current roadmap for this plugin, but it is in active development. As we launch this plugin, we do not have any outstanding requirements for the next release.

If you have a feature request, please add it as an [issue](https://github.com/intelsdi-x/snap-plugin-collector-mongodb/issues/new) and/or submit a [pull request](https://github.com/intelsdi-x/snap-plugin-collector-mongodb/pulls).

## Community Support
This repository is one of **many** plugins in **Snap**, a powerful telemetry framework. See the full project at http://github.com/intelsdi-x/snap.

To reach out to other users, head to the [main framework](https://github.com/intelsdi-x/snap#community-support) or visit [Slack](http://slack.snap-telemetry.io).

## Contributing
We love contributions!

There's more than one way to give back, from examples to blogs to code updates. See our recommended process in [CONTRIBUTING.md](CONTRIBUTING.md).

## License
Snap, along with this plugin, is an Open Source software released under the Apache 2.0 [License](LICENSE).

## Acknowledgements
* Author: [@Marcin Spoczynski](https://github.com/sandlbn/)

This software has been contributed by MIKELANGELO, a Horizon 2020 project co-funded by the European Union. https://www.mikelangelo-project.eu/
## Thank You
And **thank you!** Your contribution, through code and participation, is incredibly important to us.

gha_language: Go


text:
# Overview

There are two Scala examples for recommender models, including wide and deep(WND) model and Neural network-based Collaborative Filtering(NCF) model.
The system ([Recommendation systems: Principles, methods and evaluation](http://www.sciencedirect.com/science/article/pii/S1110866515000341)) normally prompts the user through the system interface to provide ratings for items in order to construct and improve his model. The accuracy of recommendation depends on the quantity of ratings provided by the user.

In these two examples, we demostrate how to use BigDL to build neural network recommendation system with explict/implicit feedback, we also provide 3 unique APIs to predict user item pairs, and recommend items(users) for users(items).

## Data:
   The dataset we used for both WND and NCF is ([movielens-1M](https://grouplens.org/datasets/movielens/1m/)). Ratings.dat contains 1 million ratings from 6000 users on 4000 movies, 5 levels of rating are considered as 5 classes. Users.dat includes UserID, gender, age, occupation and zip-code. movies.dat includes movieID, title and genres. Please refer to ([readme](http://files.grouplens.org/datasets/movielens/ml-1m-README.txt)) for more details.
   Before you run the example, download the data ([movielens-1M](https://grouplens.org/datasets/movielens/1m/)), unzip it and put into ./data/ml-1m/.

## Wide and deep
   WND Learning Model, proposed by ([Google, 2016](https://arxiv.org/pdf/1606.07792.pdf)), is a DNN-Linear mixed model. WND combines the strength of memorization and generalization. It's useful for generic large-scale regression and classification problems with sparse input features(e.g., categorical features with a large number of possible feature values). It has been used for Google App Store for their app recommendation.
### Run the wide and deep example
    Command to run the example in Spark local mode:
```
    spark-submit \
    --master local[physcial_core_number] \
    --driver-memory 10g --executor-memory 20g \
    --class com.intel.analytics.zoo.examples.recommendation.WideAndDeepExample \
    ./dist/lib/analytics-zoo-bigdl_BIGDL_VERSION-spark_SPARK_VERSION-ZOO_VERSION-jar-with-dependencies.jar \
    --inputDir ./data/ml-1m \

```

    Command to run the example in Spark yarn mode:
```
    spark-submit \
    --master yarn \
    --deploy-mode client \
    --executor-cores 8 \
    --num-executors 4 \
    --driver-memory 10g \
    --executor-memory 150g \
    --class com.intel.analytics.zoo.examples.recommendation.WideAndDeepExample \
    ./dist/lib/analytics-zoo-bigdl_BIGDL_VERSION-spark_SPARK_VERSION-ZOO_VERSION-jar-with-dependencies.jar \
    --inputDir hdfs://xxx

```

## Neural network-based Collaborative Filtering
   NCF([He, 2015](https://www.comp.nus.edu.sg/~xiangnan/papers/ncf.pdf)) leverages a multi-layer perceptrons to learn the user–item interaction function, at the mean time, NCF can express and generalize matrix factorization under its framework. includeMF(Boolean) is provided for users to build a NCF with or without matrix factorization.

* Nerual Collaborative filtering ([He, 2015](https://www.comp.nus.edu.sg/~xiangnan/papers/ncf.pdf))
* Wide and deep Learning Model ([Google, 2016](https://arxiv.org/pdf/1606.07792.pdf))


text:
# Editing the CWL Website

Instructions for editing specific pages and site components.

* [Navigation Menus](#navigation-menus)
  * [Editing the Nav Menus](#editing-the-nav-menus)
  * [Left Nav Menus](#left-nav-menus)
* [Links & Redirects](#links-and-redirects)
* [Short Pages](#short-pages)
* [Specific Pages](#specific-pages)
  * [Homepage](#homepage)
  * [About Page - Timeline](#about-page---timeline)
  * [Code of Conduct Syncing](#code-of-conduct-syncing)
  * [User Gallery](#user-gallery)
* [Foreign Languages](#foreign-languages)
* [Tables](#tables)
* [Developer Notes](#developer-notes)
  * [Dependencies](#dependencies)
  * [Bootstrap](#bootstrap)
  * [Code of Conduct Regeneration](#code-of-conduct-regeneration)
  * [Hypothes.is Annotation Config](#hypothesis-annotation-config)
  * [Plugins](#plugins)
  * [Video Player](#video-player)

## Navigation Menus

There are two nav menu templates currently available:

* `_includes/top_nav.html` - the main site nav
  * Data: `_data/navigation.yml`
  * Styles: `_sass/partials/_nav.scss`
* `_includes/left_nav.html` - left nav on an individual page
  * Data: `_data/navigation.yml` by default
    * Can also pull data from a page-specific file, e.g. `gallery.html` previously used `_data/user-gallery.yml` for its left nav
  * Styles: `_sass/partials/_left-nav.scss`

### Editing the Nav Menus

**Top Nav:**

Simply edit the data in `_data/navigation.yml`

**Left Nav:**

The Left Nav data may be found in either `_data/navigation.yml` or a page-specific file like `_data/user-gallery.yml` (no longer used by the left nav)

**Left Nav Structure:**
The Left Nav should always have `nav_header` as the first item. This is the title displayed at the top of the nav menu:

```yaml
left_nav:
  - nav_header: Shortcuts
  - title: Cross-Domain
    url: "#cross-domain"
    submenu:
      - title: The [Netherlands] National Plan Open Science
        url: "#"
      - title: University of Manchester, eScience Lab
        url: "#"
```

### Left Nav Menus

To add a left nav menu to a page:

1. Add a `left_nav_slug` value and `class: has-left-nav` to the page's front matter
2. Optionally specify a `nav_data` variable in the include, e.g. `{% include left_nav.html nav_data=path_to_nav_data_here %}`

Example using `left_nav_slug`:

```html
---
layout: page
permalink: /link-name/
title: Some Page
left_nav_slug: user_gallery_left
class: page-class-name has-left-nav
---

<!-- The include below will automatically set the menu to site.data.navigation[user_gallery_left] -->
{% include left_nav.html %}
```

**Note:** Any page with a left nav must specify a page-specific class, before `has-left-nav` (e.g. `class: user-gallery has-left-nav`). Otherwise, the page will generate `<body class="body-has-left-nav">` instead of `<body class="body-page-class-name has-left-nav">`, and the proper styles won't be applied.

Example using page-specific file, instead of `left_nav_slug`:

```html
---
layout: page
permalink: /gallery/
title: CWL Users Gallery
class: user-gallery has-left-nav
---

<!-- The include below would get the data from _data/user-gallery.yml -->
{% assign nav_data = site.data.user-gallery.left_nav %}
{% include left_nav.html nav_data=site.data.user-gallery.left_nav %}
```

## Links & Redirects

Prefer trailing slashes e.g. `/community/` over `/community`

## Short Pages

Any page with minimal content should add `class: page-short` to the front matter, so that the footer stays at the bottom of the screen. If adding a page-specific class, keep `page-short` at the beginning, e.g. `class: page-short body-page-class`, or write it as `class: page-class body-page-short`.

Example:

```yaml
---
layout: page
permalink: /donate/
title: Donate
class: page-short body-donate
# can also be class: donate body-page-short
---
```

The first version will generate `<body class="body-page-short">`, and the second will generate `<body class="body-donate body-page-short">`

## Specific Pages

### Homepage

**Relevant Files:**

* `index.md` - main file that imports the other files
* `_includes/home/intro.html` - contains the intro paragraph and imports the video player
* `_includes/home/features.html` - template for the "Features" boxes section. Relies on `_data/home.yml`
* `_includes/home/users-mini-gallery.html` - the bottom gallery of logos. Relies on data in `_data/user-gallery.html`
* `_includes/home/video-player.html` - template code for the video player ([Plyr](https://plyr.io/)). See [Video Player](#video-player) section for more info.

#### Features Boxes

These can be edited via in `_data/home.yml`. The general structure looks like this:

```yaml
features:
  - title: INTEROPERABILITY AND PORTABILITY
    icon: noun_Interoperability_181229.svg
    icon-alt: Interoperability icon - a triangle composed of arrows, with a triangle, square, and circle as the 3 points
    text: Portable and interoperable across a [variety of software and deployment environments](/implementations/)
```

Image files must be located in `assets/img/` (e.g. `assets/img/noun_Interoperability_181229.svg`).

#### Mini Gallery

**Relevant Files:**

* `_includes/home/mini-gallery.html` - Generates the mini gallery. Relies on data from `_data/user-gallery.yml`
* `_sass/partials/home/_mini-gallery.scss` - Contains the data for the Left Nav, and the Users Gallery list
* `_data/user-gallery.yml` - contains the data used by the mini gallery.

For general info on `_data/user-gallery.yml`, see the [user-gallery.yml](#user-gallery.yml) section, under [Users Gallery](#user-gallery).

**Duplicate Logos:**

In order to prevent a duplicate logo from being displayed, add `duplicate_logo: true` to the logo's section in `_data/user-gallery.yml`

**Logo Tweaking:**
The mini-gallery data is in `_data/user-gallery.yml`. Some logos may need individual adjustment, for optimal display. This can be accomplished by adding an `image_id: name-here` property to the respective image. The image's styles can then be modified in `_sass/partials/home/_mini-gallery.scss`.

### About Page - Timeline

**Relevant files:**

* `timeline.md` - main file for the page. Imports `_includes/timeline.html`
* `_includes/timeline.html` - timeline template file. Relies on `_data/timeline.yml` and `_sass/partials/timeline.scss`
* `_data/timeline.yml` - data for the timeline events
* `_sass/partials/timeline.scss` - timeline styles

To edit the events displayed, use `_data/timeline.yml`. The general structure is:

```yaml
timeline_events:
  - year: 2014
    event: "Initial Draft created <span class='no-bold'>at Bioinformatics Open Source Conference CodeFest</span>"
  - year: 2015
    event: "CWL “draft-2” version<br>
      Commercial vendor (SBG) releases product <span class='no-bold'>in December</span>"
```

### Code of Conduct Syncing

Relevant files:

* `code-of-conduct.md` - Code of Conduct page
* `_plugins/coc-generator.rb` - Regenerates the Code of Conduct
* [CWL Repo - Code of Conduct](https://github.com/common-workflow-language/common-workflow-language/blob/main/CODE_OF_CONDUCT.md)

The Code of Conduct page is setup to automatically pull the content from the [CWL Repo's Code of Conduct](https://github.com/common-workflow-language/common-workflow-language/blob/main/CODE_OF_CONDUCT.md). After the CWL repo file has been updated, run `bundle exec jekyll serve` to automatically rebuild `code-of-conduct.md`. Then commit and push the updated Code of Conduct, via `git push origin main`.

### User Gallery

**Relevant Files:**

* `gallery.html` - the User Gallery page itself.
* `_data/user-gallery.yml` - Data for the Users Gallery list
* `_data/navigation.yml` - Data for the Left Nav
* `_includes/user-gallery.html` - Generates the list of users from `_data/user-gallery.yml`
* `_includes/left_nav.html` - Generates the left nav menu from `_data/user-gallery.yml`

#### Left Nav Menu

The User's Gallery generates the left nav from the `user_gallery_left` section of `_data/navigation.yml`. See [Editing the Nav Menus](#editing-the-nav-menus) and [Nav Menus - Left Nav Menus](#left-nav-menus) sections above more specifics about left nav menus.

#### user-gallery.yml

Contains the gallery section data. The gallery data should follow this format:

```yaml
gallery:
  - section:
    title: Cross-Domain
    adopters:
      - name: The [Netherlands] National Plan Open Science
        url: https://www.openscience.nl/files/openscience/2019-02/nationalplanopenscience_en.pdf#page=16
        description: "description here"
        image: /assets/img/logo_openscience.svg
        image_id: netherlands
      - name: University of Manchester, eScience Lab
        url: https://esciencelab.org.uk/activities/cwl/
        description: null
```

**Note:** empty descriptions can either be left out, or should be specified as `null`.

The subsections will look like this (the ... represents the previous code section):

```yaml
gallery:
  ...
  - section:
    subsection:
      - sub_title: US National Institutes of Health (NIH)
        description: null
      - name: RAPT
        url: https://ncbiinsights.ncbi.nlm.nih.gov/2020/11/24/read-assembly-and-annotation-pipeline-tool-rapt-is-available-for-use-and-testing/
      - name: NCI Cancer Genomics Cloud
        link_text: NCI Cancer Genomics Cloud
        url: https://www.cancergenomicscloud.org/
        description: “Within the 15 months since the launch of the CGC, over 1,900 researchers have registered on the platform, representing 150 institutions across 30 countries. In total, CGC users have deployed more than 5,000 tools or workflows and performed 80,000 executions, representing over 97 years of total computation. There is significant collaboration among users, with an average of seven members per project on the platform.”
```

**Urls:** the `link_text` field is optional. If unspecified, the link will be the same as the url - e.g. <https://ncbiinsights.ncbi.nlm.nih.gov/2020/11/24/read-assembly-and-annotation-pipeline-tool-rap> vs [NCI Cancer Genomics Cloud](https://www.cancergenomicscloud.org/). `m_link` can be specified in place of `url` and `link text`, if you'd prefer to enter in in a markdown format

**Multiline strings:** Some entries use the `>` operator for multiline strings. The `>` will treat all lines after it as a single string, until the next `- name:` field. Example:

```yaml
  ...
  other: >
    <ul>
    <li><a href='https://elixir-europe.org/communities/marine-metagenomics'>Marine Metagenomics Community</a><br></li>
    <li>2018 Implementation Study: <a href='https://elixir-europe.org/about-us/implementation-studies/cwl-2018'>Enabling the reuse, extension, scaling, and reproducibility of scientific workflows</a><br></li>
    <li>2018 Implementation Study: <a href='https://elixir-europe.org/about-us/implementation-studies/compatible-cloud-2018'>Compatible Cloud Analysis Platform</a><br></li>
    <li>ELIXIR Cloud <a href='https://github.com/elixir-cloud-aai/cwl-WES'>CWL-WES</a><br></li>
    </ul>
- name: Wellcome Trust Sanger Institute
  link_text: Human Genetics Informatics
  url: https://github.com/wtsi-hgi/arvados-pipelines/tree/master/cwl

```

Quotes: items with double quotes in them should be wrapped in single quotes, otherwise Jekyll will balk at you

```yml
- '<a href="https://www.sanger.ac.uk/science/groups/cellular-genetics-informatics">Cellular Genetics Informatics, Cellular Genetics</a>'
```

Items containing special characters (colons, brackets, etc) may need to be wrapped in double quotes.

## Foreign Languages

Text in foreign language should be entered in HTML and include the `lang` and `hreflang` attributes. Subtitles should include the `srclang` code Here's a list of [common language subtags](https://en.wikipedia.org/wiki/IETF_language_tag#List_of_subtags) You can also search via [the Language Subtag Lookup](https://r12a.github.io/app-subtags/) or check whether a tag is valid (e.g. `en-us` is valid, while `en_us` is not).

Example usage:

```html

<!-- Japanese includes hreflang attribute, since the
linked content is in Japanese -->
<a href="https://github.com/pitagora-galaxy/cwl/wiki/CWL-Start-Guide-JP" lang="ja" hreflang="ja">

<!-- Russian link doesn't have hreflang, since the linked
website auto-translates the content, based on the user's
region -->
<a href="https://stepik.org/course/1612/syllabus" lang="ru">

<!-- Chinese subtitles example -->
<track src="{{ "/assets/video/subtitles/chinese_simplified.vtt" | relative_url }}" label="Chinese (Simplified)" kind="subtitles" srclang="zh-Hans">

<!-- These can be mixed in with Markdown code -->
* A series of <a href="https://stepik.org/lesson/35918/step/1?unit=15070"lang="ru" hreflang="ru"> is available
in Russian as part of the <a href="https://stepik.org/course/1612/syllabus" lang="ru">Управление вычислениями</a
> (Computation Management) free online course.
```

Currently the site has some Japanese & Russian links. The corresponding codes are `ja` and `ru`.

## Tables

For any markdown tables, prepend the following classes: `.table`, `.table-striped`, `.cols-2` or `.cols-3`:

2 Column Table Example:

```markdown
{: .table .table-striped .cols-2 }
|Name|Details|
|--- |--- |
|[Bio-compute objects](https://osf.io/h59uh/)|"a step towards evaluation and validation of bio-medical scientific computations", CWL and researchobject.org participants are cooperating with this effort|
```
For 3 column table, change `.cols-2` to `.cols-3`. i.e. `{: .table .table-striped .cols-2 }`

## Developer Notes

### Dependencies

* Bootstrap 5.1.3
  * Site styles are built on top of Bootstrap 5.1.3
  * Nav menu relies on `/assets/js/bootstrap.min.js`
* jQuery 3.5.1
  * Mobile Nav relies on this in `/assets/js/navCloseFix.js`, due to a bug where it wasn't closing properly
  * Back to the Top button relies on this

### Bootstrap

The site uses [Bootstrap 5](https://getbootstrap.com/docs/5.0/getting-started/introduction/) (specifically v5.0.0-beta3) for the base styles, and the nav menus.

Relevant folders & files:

* `_sass/bootstrap` contains the bootstrap SCSS code
* `assets/js/bootstrap.min.js` contains the JS code

The styles are loaded as the first import in `style.scss`. The JS code is loaded in `footer-scripts.html`

#### Media Query Grid Breakpoints

Bootstrap grid breakpoints are originally found in ``_sass/bootstrap/_variables.scss`, and can be overridden in `_sass/partials/_variables.scss`

The following breakpoints and max-widths are used for responsive design:

```scss
$grid-breakpoints: (
  xs: 0,
  xxs: 425px,
  sm: 576px,
  md: 768px,
  lg: 992px,
  lg-2: 1024px,
  xl: 1200px,
  xl-13: 1330px,
  xxl: 1400px
) !default;

$container-max-widths: (
  sm: 540px,
  md: 720px,
  lg: 960px,
  xl: 1140px,
  xxl: 1320px
) !default;
```

Breakpoints can be used in SCSS files as follows:

```scss
// becomes @media (min-width: 425px)
@include media-breakpoint-up(xxs) {
  .timeline {
    margin: 0 0 1rem;
  }
}
```

Media Queries for a specific element or component are usually grouped together:

```scss
// Adjusting for the .post-content padding
.timeline {
  left: -2px;
  margin: 0 0 1.5rem;
  position: relative;
  width: calc(100% + 4px);
}

// min-width: 425px
@include media-breakpoint-up(xxs) {
  .timeline {
    margin: 0 0 1rem;
  }
}

// min-width: 576px
@include media-breakpoint-up(sm) {
  .timeline {
    position: static;
    width: initial;
    left: initial;
  }
}

// min-width: 768px
@include media-breakpoint-up(md) {
  .timeline {
    margin: 0 0 1.5rem;
  }
}

// min-width: 992px
@include media-breakpoint-up(lg) {
  .timeline {
    margin: 1.5rem;
  }
}
```

### Code of Conduct Regeneration

`code-of-conduct.md` is automatically synced with <https://github.com/common-workflow-language/common-workflow-language/blob/main/CODE_OF_CONDUCT.md> via `_plugins/coc-generator.rb`. To pull the new content, after the remote file's been updated, run `bundle exec jekyll serve` locally, and push the changes.

### Hypothes.is Annotation Config

The following config options are available for hypothes.is (see [https://h.readthedocs.io/projects/client/en/latest/publishers/config/](https://h.readthedocs.io/projects/client/en/latest/publishers/config/) for more detail):

```
openSidebar
showHighlights
theme
enableExperimentalNewNoteButton
usernameUrl
services
apiUrl
authority
grantToken
allowLeavingGroups
enableShareLinks
groups
icon
onLoginRequest
onLogoutRequest
onSignupRequest
onProfileRequest
onHelpRequest
branding
accentColor
appBackgroundColor
ctaBackgroundColor
ctaTextColor
selectionFontFamily
annotationFontFamily
onLayoutChange
expanded
height
width
externalContainerSelector
focus
requestConfigFromFrame
assetRoot
sidebarAppUrl
```

### Plugins

* `_plugins/coc-generator.rb` - regenerates the Code of Conduct page, after it's been updated on the main [CWL Repo - Code of Conduct](https://github.com/common-workflow-language/common-workflow-language/blob/main/CODE_OF_CONDUCT.md)
* `_plugins/jekyll-autolink_email.rb` - renders email addresses as clickable links, e.g<EMAIL_ADDRESS>becomes `<a href="mailto:name<EMAIL_ADDRESS>

### Video Player

The video player is [Plyr](https://plyr.io/), and the GitHub repo for it is [sampotts/plyr](https://github.com/sampotts/plyr). It works by extending the normal HTML5 `<video>` or `<audio>` tags (see [Initializing the Video Player](initializing-the-video-player) section).

Relevant Folders & Files:

* `assets/plyr/` - contains the core JS and CSS files for the video player
  * `assets/plyr/plyr.css` - core CSS styles
  * `assets/plyr/plyr.min.js` - minified core JS code
* `_sass/partials/home/_video.scss` - custom styles for the video player

#### Initializing the Video Player

Plyr works by extending the normal HTML5 `<video>` or `<audio>` tags, which looks something like this:

```html
<div class="youtube-container" width="560" height="315">
  <div class="youtube-container" width="560" height="315">
    <video id="player" class="cwl-intro-video" controls poster="{{ "/assets/img/intro_video_poster.png" | relative_url }}">
      <source src="{{ "/assets/video/cwl-intro-video.mp4" | relative_url }}" type="video/mp4">

      <track src="{{ "/assets/video/subtitles/chinese_simplified.vtt" | relative_url }}" label="Chinese (Simplified)" kind="subtitles" srclang="zh-Hans">
      <!-- Additional subtitles here -->

      <!-- Fallback for older browsers -->
      Your browser does not support the video tag.
    </video>
  </div>
</div>
```

In order to display the Plyr video player, add the following below the normal HTML 5 code:

```html
<script src="{{ "assets/plyr/plyr.min.js" | relative_url }}"></script>
<script>
  const player = new Plyr('#player', {
    controls: [
      'play-large',
      'play',
      'mute',
      'volume',
      'progress',
      'current-time',
      'duration',
      // 'restart',
      'fullscreen',
      'captions',
      'settings'
    ],
    title: 'Common Workflow Language explained in 64 seconds',
    options: ['captions', 'quality', 'speed', 'loop'],
  });
</script>
```

Note: the element in `const player = new Plyr('#player)` must match the id of the `<video>` tag on the page (in this case `<video id="player" class="...">`)

#### Customizing the Video Player

**Javascript:**

The video player can be passed a variety of options during initialization. These affect the player controls, video title, options for captions, speed, quality, etc. For a full list, see <https://github.com/sampotts/plyr#options>

**CSS Styles:**

The default CSS styles for the video player are customized via `_sass/partials/home/_video.scss`

repository: common-workflow-language/cwl-website

gha_language: JavaScript

repo_name: common-workflow-language/cwl-website


text:
---
layout: default
title: Teaching the Game
parent: Appendices
nav_order: 36
---

# Teaching the Game

Since you’ve read this book it’s likely at some point you’ll be teaching the
game to others, either experienced roleplayers or those new to the hobby.
Throughout the design process we’ve had many chances to play with lots of
different gamers from different backgrounds and there are a few things we’ve
found work well for teaching the game.

## Pitch It

Before you play you’ll likely be explaining the game to your new players
\(don’t just spring it on them, that’s not cool\). We call that the pitch:
it’s explaining why you want to play Dungeon World and why you think they’ll
like it.

First and most importantly: put it in your own words. We can’t give you a
script because the best way to get people excited about the game is to share
your honest excitement. There are, however, some things you might want to
touch on.

With first-time roleplayers it’s best to focus on what roleplaying means in
Dungeon World. Tell them what they’ll be doing \(portraying a character\) and
what you’ll be doing \(portraying the world around them\). Mention the general
conceit \(adventurers and adventure\). It’s usually a good idea to mention the
role of the rules too, how they’re there to drive the action forward in
interesting ways.

With folks who’ve played RPGs before, especially those who’ve played other
fantasy adventure games, you can focus more on what makes Dungeon World
different from other similar games. Ease-of-play, the way the rules just step
in at the right times, and the fast pace are all things that experienced
roleplayers often appreciate.

No matter the audience, don’t just pitch Dungeon World, pitch the game you’re
going to run. If this is going to be a trip into the city sewers, tell them
that right up front.  The interaction between you, the players, and the rules
will create all kinds of interesting secrets later on; your pitch should
honestly portray the game you intend to run.

## Present the Classes

Once everybody’s on board for a game of Dungeon World and you’ve sat down to
play start by presenting the character sheets. Give a short description of
each, making sure to mention what each does and their place in the world. You
can also read out the descriptions for each class, those all include something
about both what the class does and how that fits into the big picture.

If anybody has questions about the rules, answer them, but for now focus on
describing what the classes do in plain terms. If someone asks about the
fighter it’s more useful to tell them that the fighter has a signature weapon
that’s one of a kind then to go into detail about how the signature weapon
move works.

## Create Characters

Go through the character creation rules step by step. The process of creating
a character is also a great introduction to the basic concepts: the players
will encounter stats, moves, HP, and damage all in an order that makes sense.
Don’t bother trying to frontload the rules explanations. There aren’t really
any wrong choices.

Each player will encounter the rules that are important to their class. The
fighter, for example, will see moves about weapon ranges and piercing and ask
about them, explain them as needed. If the fighter player doesn’t ask you what
piercing is, don’t worry about it. They’re happy to choose based on the
fiction, which is all the stats and tags reflect anyway.

If your players are particularly worried about making their characters “right”
just give them the option of changing them later. Trying to cover every rule
and give them all the context now will just slow the game down. In particular,
don’t go over the basic moves in detail yet. Leave them out so that the
players can read them and ask questions, but don’t waste time by explaining
each. They’ll come up as needed.

As the players introduce their characters and start setting bonds move from
answering questions to asking them. Ask about why they chose what they did and
what that means for their character. Ask about details established by their
bonds. Let their choices establish the world around them. Take special note of
anything that you think you might be able to make moves with \(like an
estranged teacher or a simmering war\).

### Start Play

Start play by concretely describing the world around them. Keep it brief and
evocative, use plenty of details, and end with something that demands action.
Then ask them what they do.

Ending with something that demands action is important. Don’t presume that new
players will already know what they want to do. Giving them something to react
to right away means you get straight to playing.

Especially for new players make sure that the action they’re thrown into is
something they have the tools to deal with. A fight is a good choice, as is a
tense negotiation \(which can easily become a fight\). Keep it simple and let
the complexity build.

Even in a fight keep to simple monsters: things that bleed, don’t have too
much armor, and don’t have piercing. Give them a chance to get used to their
armor and dealing damage before you start using the exceptions to those rules,
like piercing and ignoring armor. Of course if the fiction dictates ignoring
armor or piercing or a certain monster, use it, but don’t lead with those.

For new players make liberal use of your Show Signs of an Approaching Threat
move. New players, or those used to a different type of fantasy adventure, may
have different assumptions about what’s lethal and when they’re in danger, so
make sure to show them danger clearly. Once they’ve started to pick up on
what’s dangerous you can give them a little less warning.

If you’re GMing for the first time focus on a few moves: Show Signs of an
Approaching Threat, Deal Damage, Put Someone in a Spot. Only look at your
moves sheet if you’re pretty sure none of those three apply. Eventually you’ll
build up familiarity with the whole range of GM moves and using them will seem
like second nature.

### Continuing Play

After an hour or two of play the players will likely have everything down. As
a first time GM you may take a bit longer to pick up all your moves, maybe a
session or two. Just roll with it.

If you find yourself struggling in the first session consider it a pilot, like
the first episode of a TV show. Feel free to start over or retroactively
change things. If a player decides that the thief just isn’t what they thought
it was let them switch classes \(either remaking the same character or
introducing someone new\). If your first adventure wasn’t working too well
scrap it and start something new.

While Dungeon World works great for one-shots the longer cycles of levels and
bonds don’t really kick in for a bit. If your first one or two sessions go
well consider scheduling out enough time for 5–10 more.

repository: elstiko/Dungeon-World

repo_name: elstiko/Dungeon-World


text:
### [CVE-2018-12454](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12454)
![](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 _addguess function of a simplelottery smart contract implementation for 1000 Guess, an Ethereum gambling game, generates a random value with publicly readable variables such as the current block information and a private variable (which can be read with a getStorageAt call). Therefore, it allows attackers to always win and get rewards.

### POC

#### Reference
-<EMAIL_ADDRESS>
#### Github
- https://github.com/ARPSyndicate/cvemon
- https://github.com/lnick2023/nicenice
- https://github.com/qazbnm456/awesome-cve-poc
- https://github.com/xbl3/awesome-cve-poc_qazbnm456

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# Learning C#

## Websites

- The [official C# documentation](https://docs.microsoft.com/en-us/dotnet/articles/csharp/) has great content on a wide variety of subjects, including [tutorials](https://docs.microsoft.com/en-us/dotnet/articles/csharp/tutorials/index) and a [tour of the language](https://docs.microsoft.com/en-us/dotnet/articles/csharp/tour-of-csharp/index).
- [Learn C#](http://www.learncs.org/) is an interactive, in-browser tutorial that introduces you to the core concepts of programming in C#.

## Videos

- [C# 101](https://www.youtube.com/playlist?list=PLdo4fOcmZ0oVxKLQCHpiUWun7vlJJvUiN) The concepts and syntax of the C# programming language with live coding demos.
- [.NET Core 101](https://www.youtube.com/playlist?list=PLdo4fOcmZ0oWoazjhXQzBKMrFuArxpW80) Ins and outs of "What is .NET" and how to publish your very first application.
- [Programming in C# Jump Start](https://channel9.msdn.com/Series/Programming-in-C-Jump-Start) is a nice step-by-step introduction to programming in C#.
- [C# Fundamentals for Absolute Beginners](https://mva.microsoft.com/en-US/training-courses/c-fundamentals-for-absolute-beginners-16169?l=Lvld4EQIC_2706218949) is a great way to get to know C#.
- [PluralSight](https://www.pluralsight.com/) has several [great](https://www.pluralsight.com/courses/csharp-6-from-scratch) [introduction](https://www.pluralsight.com/courses/c-sharp-fundamentals-with-visual-studio-2015) [courses](http://www.pluralsight.com/courses/csharp-best-practices-improving-basics). The downside: PluralSight is a paid service, but you can request a [free trial](https://www.pluralsight.com/pricing).

## Books

- [C# 6.0 in a Nutshell](https://www.amazon.com/C-6-0-Nutshell-Definitive-Reference/dp/1491927062/)
- [C# 5.0 Unleashed](https://www.amazon.com/C-5-0-Unleashed-Bart-Smet/dp/0672336901/)
- [C# in Depth](https://www.amazon.com/dp/161729134X/)

repository: exercism/csharp

gha_language: C#

repo_name: exercism/csharp


text:
# Changelog

Documents the changes to GEW dispersion script.

## 1.1 (2020-09-05)

- Added `chebdif.m`: No more need to install DMSUITE explicitly.
- Adapted `README.md`

## 1.0.1 (2020-08-19)

- Added DOI of project and DOI of latest release to `README.md`

## 1.0 (2020-08-19)

- Initial release:
  - Code: `plate_SCM.m`
  - Documentation: `README.md`
  - License (ISC): `LICENSE.txt`
  - Citation style: `CITATION.cff`

license: ISC

gha_language: MATLAB

gha_license_id: ISC


text:
#  Berry Forms [![Build Status](https://travis-ci.org/tsimeunovic/BerryForms.svg?branch=master)](https://travis-ci.org/tsimeunovic/BerryForms)

### Turn your Raspberry Pi into personal xRM server

## About

Berry Forms is lightweight personal xRM application written using MEAN technologies and [Typescript](http://www.typescriptlang.org/). It aims to run on any device that can run MongoDB and Node.js (like Raspberry Pi). Client is a small responsive website (up to 190kb on first load with gzip) that uses simple rest api to retrieve and persist data.

## Features

First public GitHub release contains just few basic features to make Berry Forms usable for personal usage. Manual setup and/or basic troubleshooting skills are required. User can:

- Define schema for custom entities

- Create new records

- Filter records

- Write plugins that can react to certain application events

Other than that application has built-in support for different languages. It contains 7 types of fields (Boolean, Date, List, Select, Text, Textarea, Relationship) out of the box and can be easily extended to support more.

## What's upcoming

Features that I would like to add in future:

- Multi user application with different roles and permissions
- Settings page
- And a lot more ...

## How to install

- Make sure you have installed nodejs and mongodb
- Clone repository or otherwise download source codes
- Install dependencies by running 'npm install' and 'bower install'
- Run 'grunt compile' or navigate to dist folder
- Run 'node BerryForms.js'
- Navigate to 'http://localhost:8080/'
- Login using default 'admin', 'admin' credentials

In case you are running arch linux (and have already installed nodejs, mongodb and git), just run:

```bash
wget -qO- http://git.io/AYCe | bash
```

It will get the latest version and setup node daemon. Same command can be used to upgrade application later.

## How to contribute

Feel free to contribute by writing the code, sharing ideas or submitting bugs/issues.

repository: yogevizhak/BerryForms

repo_name: yogevizhak/BerryForms


text:
# Reset Git Branch

Reset a specific branch to another. Useful if you need a specific branch to be reset to say master at given intervals. NOTE: this action performs a _reset_ on the repository and is **destructive** - you will lose any changes made to the branch being reset. Be sure this is what you want to do before running.

## Usage

Example Workflow using a schedule.

```yaml
name: Rest Dev Branch to Master at 1am each day
on:
  schedule:
    - cron: "0 1 * * *"
jobs:
  reset:
    name: Runner
    runs-on: ubuntu-latest
    steps:
      - name: Reset dev branch to master
        uses: nicksnell/action-reset-repo@master
        with:
          reset_branch: dev
```

## Inputs

| name | value | default | description |
| ---- | ----- | ------- | ----------- |
| github_token | string | | Token for the repo. Can be passed in using `${{ secrets.GITHUB_TOKEN }}`. |
| base_branch | string | 'master' | Branch to be used to reset too |
| reset_branch | string | - | Determines the branch to be reset |

## License

The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE).

repository: nicksnell/action-reset-repo

gha_language: Shell

repo_name: nicksnell/action-reset-repo


text:
# Stacks and Queues
## Stack
- **LIFO** (Last-in first-out)
  - The most recent item added must be removed first
- Can be implemented using a linked list
Methods:
- `pop()` - Remove the top item & return it
- `push()` - Add item to top
- `peek()` - Return top item
- `isEmpty()` - Return true if the stack is empty
Time complexity:
- No constant-time index access
- Constant-time adds & removes
**Can often be used to implement a recursive algorithm iteratively**
## Queue
- **FIFO** (First-in first-out)
  - Items are removed in the same order that they are added
- Can be implemented using a linked list
- Often used when implementing a breath-first search
Methods:
- `add()` - Add an item to the end of the queue
- `remove()` - Remove the first item in the queue
- `peek()` - Return top item
- `isEmpty()` - Return true if the stack is empty

repository: hegelocampus/notes

repo_name: hegelocampus/notes


text:
---
title: Social Event
subtitle:
  Join us at the EuroPython 2023 social event on Thursday evening! Let's eat, chat and laugh!
social_card: ep2023-social-event-sc.png
---

There are nice venues, there are interesting venues, and then there are venues with stories to tell—like [Sacre Coeur](https://www.sacrecoeur.cz/en), the home of our social event, a 200-year-old deconsecrated former church. Join us on the evening of July 20th for a gathering filled with food, conversations, and live folk music!
<MapSocial></MapSocial>

<address>
Holečkova 31

150 00 Praha 5-Smíchov

Czechia

</address>

## Social Event Ticket ##
**Please note: The social event is not included in the conference ticket!**

Tickets for the social event will be available in our ticket shop soon! Remember, these tickets will be limited, so mark the date on your calendar and make sure to secure yours as soon as they're available.

## Social Event Summary ##

- **Where**: [Sacre Coeur](https://www.sacrecoeur.cz/en)
- **When**: Thursday 20 July, starting at 19:00
- **Price**: To be announced
- Schedule:
    - 19:00: Event starts - chat, laugh & enjoy food
    - 20:30–21:30: Live folk Music by [Hazafele](https://www.facebook.com/profile.php?id=100053175145125)
    - 22:00–23:30: Social continues
    - 23:30: Closing

### Live Folk Music ###

The band [Hazafele](https://www.facebook.com/profile.php?id=100053175145125) (meaning 'On the Way Home' in Hungarian) was formed in 2017 and has been primarily dedicated to Gipsy and Hungarian folklore from the very beginning. Its founders were Šimon Jakubíček (double bass) and David Golas (guitar), they were later joined by Michal Grossmann (violin) and Marek Šnorich (accordion). The band's main goal is to introduce listeners to folk music, which they don't usually encounter in their everyday lives. Additionally, they also perform well-known melodies

### Food Selection
#### Buffet

- Mini burger with pulled pork, BBQ, fried onion, spinach (Gluten Free)

- Chicken tortilla with vegetables (Gluten Free)

- Burrito (Gluten Free)

- Cheese variations (Vegetarian, Gluten Free)

- Mexican avocado quacamole, cracker (Vegetarian/Vegan, Gluten Free)

- Hummus, whole grain bread (Vegetarian, Vegan)

- Caprese kaiserka (Vegetarian, Gluten Free)

- Baked pumpkin salad, pomegranate, spinach and argula (Vegetarian, Vegan, Gluten Free)

- Crudités vegetables (Vegetarian, Vegan, Gluten Free)

- Fruit

#### BAR

You will get one free drink. Then you are welcome to buy more drinks at the bar.

- Homemade lemon lemonade 0,4 l / 50 CZK
- Homemade elderflower lemonade 0,4 l / 50 CZK

- Draft Beer 0,4 l / 55 CZK

- Pinot Gris semi-dry WW Argentina 0,2 l / 100 CZK
- Blue Portugal dry RW Hungary 0,2 l / 100 CZK

- Aperol Spritz 140 CZK
- Gin & Tonic 140 CZK
- Cuba Libre 140 CZK
- Skinny Bitch 140 CZK

---
**Big THANK YOU to our...**

repository: The-Compiler/website

repo_name: The-Compiler/website


text:
# XcodeTemplatesMapper
CommandLine tool to map plist files to other formats allowing better analysis and improves readability

*The inspiration and main application of the tool is mapping the definition of xcode project templates (TemplateInfo.plist files) to analyze how they are built.*

### Maps to:

- [x] markdown
	- [x] Xcode project template descriptions (`TemplateInfo.plist` -> **`<output>/Template Name.md`**)
		- [x] link to original TemplateInfo.plist
		- [x] link to template directory
		- [x] links to descriptions, directories and plists of all ancestors

		> Examples:  [Core Data Cocoa Touch App.md](Output/Core%20Data%20Cocoa%20Touch%20App.md), [Cocoa Touch App Base.md](Output/Cocoa%20Touch%20App%20Base.md), [**Single View App.md**](Output/Single%20View%20App.md)

	- [x] Xcode project template combined description (`TemplateInfo.plist` -> **`<output>/Template Name Combined.md`**)
		Selected template info combined with its ancestors. Contains all definitions, options, etc. merged in to one file.
		> Example: [**Single View App Combined.md**](Output/Single%20View%20App%20Combined.md)

	- [ ] Other cases

- [x] Mindmap (freemind format) - visualize inheritance of plists:
	- [x] Xcode template inheritance mind maps
		- [x] FreeMind format (`TemplateInfo.plist` -> **`<output>/Template Name Inheritance Map.mm`**)
		- [x] [XMind](https://www.xmind.net) format (`TemplateInfo.plist` -> **`<output>/Template Name Inheritance Map.xmind`**)
			xmind mind map contains links to descriptions for every template

		![Xmind](Docs/inherit_thumbnail.png)

	- [x] Xcode tempate full map
		- [x] [XMind](https://www.xmind.net) format (`TemplateInfo.plist` -> **`<output>/Template Name Full Map.xmind`**)

		![Xmind](Docs/full_thumbnail.png)

	- [x] Xcode template inheritance flat map
		- [x] [XMind](https://www.xmind.net) format (`TemplateInfo.plist` -> **`<output>/Template Name Flat Map.xmind`**)

		![Xmind](Docs/flat_thumbnail.png)

	- [ ] Other cases

### Arguments
- `--output <dir>`

	Allows to provide custom output dir, default is the script directory

- `--xcode-proj-template <template_identifier>|<template name>`

	Makes the tool generate markdown files describing:

	- template defined using its identifier (TemplateInfo.plist:Identifier) or its name
	- all ancestors of the template
	- template combined with its ancestors

	and mind map file to visualise:

	- whole tree of selected template
	- inheritance tree of selected template (simplified with only templates names)
	- inheritance flat map of selected template

	**If this argument is not defined there will be descriptions generated for every known template, but without mind maps.**

	Check argumetnts of scheme `XcodeTemplateAncestorsMapping` for example

- `--skip-merging-combined-options`

	Allows to skip merging options in combined describtion (*Template Name Combined.md*).

	By default (without the argument):
	- Options are merged with other options with the same value for key `Identifier`.
	- Options without `Identifier` key are merged all together.

	Merged options are more readable.

	Merging however can be skipped which cause that all definitons from deferent templates (like ancestors) are added separately to the options list and ordered in order of inheritance, so there can be more then one option with the same id but deferent settings. This however allows to make sure that merging did not destroy anything but by cost of readability.

---

There are several schemes in xcode project, which are providing example of using arguments of the script in section `Run/Arguments` of the scheme settings

If tool is run from xcode with arguments provided in the scheme settings all files generated by sheme `XcodeTemplateAncestorsMapping` or `XcodeAllTemplatesMapping` can be found in the directory `Output` located in project directory

---
### Running on Xcode 10.2 and macOS < 10.14.4

To fire this code on Xcode 10.2 and macOS < 10.14.4 you need to install *Swift 5 Runtime Support for Command Line Tools*,
you can download it from [developer.apple.com](https://developer.apple.com/download/more/)

### Tool Apps
On these I test and view generated files:

- [MacDown](MacDown) - markdown editor
- [XMind](https://www.xmind.net) - mind map editor. I use [XMind 8](https://www.xmind.net/xmind8-pro/), in [ZMind ZEN](https://www.xmind.net/zen/) links in generated mind map might not work.

	XMind is paid app, XMind 8 is expensive but available among other interesting apps through [Setapp](https://setapp.com) for reasonable price

repository: kodelit/XcodeTemplatesMapper

repo_name: kodelit/XcodeTemplatesMapper


text:
# Hopsworks CLI

A command-line client, written in Java, that uses the Hopsworks REST API for Job execution and file uploading.

## Maven dependency

    <dependency>
      <groupId>io.hops</groupId>
      <artifactId>hopsworks-cli</artifactId>
      <version>2.2.1</version>
    </dependency>

## Maven deployment

The repository used is on Archiva `https://archiva.hops.works/` and published using `mvn deploy`. Credentials for the archiva repository need to be added in the `settings.xml` file for maven.

    <servers>
        <server>
          <id>repository</id>
          <username>user</username>
          <password>pass</password>
        </server>
      </servers>

## Configuration

You can either edit the conf/hops.properties file or set environment variables:
HOPSWORKS_USER
HOPSWORKS_PASSWORD
HOPSWORKS_ENDPOINT=http://<hostname>:<port>/hopsworks
HOPSWORKS_PROJECT=projectname

## Command-line Utility

For help on using the command-line utility:
./hops-cli --help

## Usage as a Library

The output library is a shaded jar file. You can include it

## Running a job with hopsworks-cli

You need to follow a number of steps to run a job. First, you need to get the projectId from the project name, then copy your .jar or .py file into the project, then create a Job configuration and create the Job (if it doesn't already exist) in Hopsworks, then run the job, and finally download the job logs.

1. ProjectService.   @Path("/getProjectInfo/{projectName}")
 name -> project_id
Use ProjectService REST API

2. Copy filename to the  <endpoint>/hopsworks-api/api/<id>/dataset/upload/<filename>
Use DatasetService REST API

3. Run Job with JobServer REST API
Return application_attempt_id and jobId

4. Download Logs with application_attempt_id

# Acknowledgement

This work was developed as part of the Streamline EU Project and it builds on earlier work done in the Aegis project: https://github.com/aegisbigdata/hopsworks-data-connector
https://www.aegis-bigdata.eu/

repository: logicalclocks/hopsworks-cli

gha_language: Java

repo_name: logicalclocks/hopsworks-cli


text:
#Sample Collection information
```
Contain information about sample collected on basis of which data is gathered. e.g. year, season etc.
count(*): 108
```
```
scid	int(11)	NO	PRI		auto_increment
scdata	varchar(255)	YES
```
```
1	1908-1912
2	1916
3	1917
4	1918
5	1921
6	1922
7	1934
8	1953
9	1966
10	1984
```

repository: Stephanzf/EssOilDB

repo_name: Stephanzf/EssOilDB


text:
# mongo-restore
Simple module for populate data to mongo collection from js/json

## Useful things
It's very important to write code faster and not spend a lot of time for create and manage any fixture for checking if you code work well...
This simple module get you simple and fast method for populating your mongo db collection on the fly.

## Install

I sure, it is normal to use dev dependency for that:

```bash
npm install mongo-restore -D
```

## Usage

Create some directory in you project. Place any files with data there. Run **mongo-restore** just tell him there is it have to looking for you fixtures and how you test base is called:
``` dir
|-project
|--tests
|---fixtures
|----myTestCollection.js  //  (file inners: module.exports = {a: 1, b: 2})
|----myTestColl2.json     // You also can use json type
```

``` javascript
const restore = require('mongo-restore');
// using with promises
restore({path: '/tests/fixtures', dropDb: true})
  .then(res => console.log('test db restored'))
  .catch(err => console.error(err))

// using callback
restore({path: '/tests/fixtures', dropDb: true}, (err, res) => {
  if (err) console.error(err); return;
  console.log('test db restored')
})

```
This code remove all data from mongo test db and create two collections with same names as you fixture files are called (First one: myTextCollection; second one: myTextColl2)

repository: yiooxir/mongo-restore

repo_name: yiooxir/mongo-restore


text:
![nbbib.lib.unb.ca screenshot](https://github.com/unb-libraries/nbbib.lib.unb.ca/raw/prod/.dockworker/screenshot.png "nbbib.lib.unb.ca screenshot")
# [nbbib.lib.unb.ca](https://nbbib.lib.unb.ca/) : Lean Instance Repository
[![Build Status](https://github.com/unb-libraries/nbbib.lib.unb.ca/actions/workflows/deployment-workflow.yaml/badge.svg?branch=prod)](https://github.com/unb-libraries/nbbib.lib.unb.ca/actions/workflows/deployment-workflow.yaml)
[![GitHub license](https://img.shields.io/github/license/unb-libraries/nbbib.lib.unb.ca)](https://github.com/unb-libraries/nbbib.lib.unb.ca/blob/prod/LICENSE)
![GitHub repo size](https://img.shields.io/github/repo-size/unb-libraries/nbbib.lib.unb.ca?label=lean%20repo%20size)

This repository contains the assets used to test, build, and deploy the [nbbib.lib.unb.ca](https://nbbib.lib.unb.ca) Drupal application. This repository extends the [unb-libraries/docker-drupal](https://github.com/unb-libraries/docker-drupal) base image, which deploys nginx and php-fpm in the service container.

## Deploy this Application Yourself!
Local deployment, development and testing of nbbib.lib.unb.ca is easy, as we leverage [dockworker](https://github.com/unb-libraries/dockworker), our unified framework of [Robo](https://robo.li/) commands that streamline local development of our application on Linux or OSX.

### Step 1: Install Dockworker's Dependencies
In your local development environment, a minimal number of 'one time' dependencies are required to deploy applications with dockworker. Some or all of these may already be installed in your environment; see the list of dependencies and installation instructions [here](https://github.com/unb-libraries/dockworker/blob/4.x/docs/prerequisites.md).

### Step 2: Deploy
With all dependencies installed, you are ready to deploy any of our applications locally and and begin development:

```
composer install
vendor/bin/dockworker deploy
```

And that's it! The application will build and deploy in your local environment.

If you work with unb-libraries applications often, you may also consider [installing a dockworker alias](https://gist.github.com/JacobSanford/1448fece856be371060d0f16ccb1b194), which avoids referencing vendor/bin for each dockworker command.

## Other useful commands
Run ```vendor/bin/dockworker``` to list available dockworker commands for this application.

## Author / Contributors
This application was created at [![UNB Libraries](https://github.com/unb-libraries/assets/raw/master/unblibbadge.png "UNB Libraries")](https://lib.unb.ca) by the following humans:

## License
- As part of our 'open' ethos, UNB Libraries licenses its applications and workflows to be freely available to all whenever possible.
- Consequently, the contents of this repository [unb-libraries/nbbib.lib.unb.ca] are licensed under the [MIT License](http://opensource.org/licenses/mit-license.html). This license explicitly excludes:
   - Any website content, which remains the exclusive property of its author(s).
   - The UNB logo and any of the associated suite of visual identity assets, which remains the exclusive property of the University of New Brunswick.

branch_name: refs/heads/dev

gha_language: PHP


text:
# Contributing

Thank you for your interest in contributing to Grafana Live SDK! We welcome all people who want to contribute in a healthy and constructive manner within our community. To help us create a safe and positive community experience for all, we require all participants to adhere to the [Code of Conduct](CODE_OF_CONDUCT.md).

This document is a guide to help you through the process of contributing to Grafana Live SDK.

## Become a contributor

You can contribute to Grafana Live SDK in several ways. Here are some examples:

- Contribute to the Grafana Live SDK codebase.
- Report bugs and enhancements.

For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/).

### Report bugs

Report a bug by submitting a [bug report](https://github.com/grafana/grafana-live-sdk/issues/new?labels=bug&template=1-bug_report.md). Make sure that you provide as much information as possible on how to reproduce the bug.

Before submitting a new issue, try to make sure someone hasn't already reported the problem. Look through the [existing issues](https://github.com/grafana/grafana-live-sdk/issues) for similar issues.

#### Security issues

If you believe you've found a security vulnerability, please read our [security policy](https://github.com/grafana/grafana-live-sdk/security/policy) for more details.

### Suggest enhancements

If you have an idea of how to improve Grafana Live SDK, submit an [enhancement request](https://github.com/grafana/grafana-live-sdk/issues/new?labels=enhancement&template=2-enhancement_request.md).

## Where do I go from here?

- Set up your [development environment](contribute/developer-guide.md).

repository: grafana/grafana-live-sdk

repo_name: grafana/grafana-live-sdk


text:
# protoc-gen-apache-dubbo-es

The code generator for Dubbo, a simple library to work with servers and clients
in ECMAScript with the type-safety of TypeScript. It generates code that is compatible with
browsers and Node.js.

Learn more about Dubbo at [github.com/apache/dubbo-js](https://github.com/apache/dubbo-js).

## Installation

`protoc-gen-apache-dubbo-es` is a code generator plugin for Protocol Buffer compilers,
like [buf](https://github.com/bufbuild/buf) and [protoc](https://github.com/protocolbuffers/protobuf/releases).
It generates clients as well as server definitions from your Protocol Buffer schema, and works in tandem with
[@bufbuild/protoc-gen-es](https://www.npmjs.com/package/@bufbuild/protoc-gen-es),
the code generator plugin for all Protocol Buffer base types. The code these two
plugins generate requires the runtime libraries [apache-dubbo](https://www.npmjs.com/package/apache-dubbo),
and [@bufbuild/protobuf](https://www.npmjs.com/package/@bufbuild/protobuf).

To install `buf`, the plugins and their runtime libraries, run:

```shell
npm install --save-dev @bufbuild/buf @bufbuild/protoc-gen-es protoc-gen-apache-dubbo-es
npm install apache-dubbo @bufbuild/protobuf
```

If you want to call Dubbo or gRPC-web services from a web browsers, make sure to install
[apache-dubbo-web](https://www.npmjs.com/package/apache-dubbo-web). If you want servers too,
install [apache-dubbo-node](https://www.npmjs.com/package/apache-dubbo-node),
[apache-dubbo-fastify](https://www.npmjs.com/package/apache-dubbo-fastify), or
[apache-dubbo-express](https://www.npmjs.com/package/apache-dubbo-express)

We use peer dependencies to ensure that code generator and runtime library are
compatible with each other. Note that npm installs them automatically, but yarn
and pnpm do not.

## Generating code

### With buf

Add a new configuration file `buf.gen.yaml`:

```yaml
# buf.gen.yaml defines a local generation template.
# For details, see https://docs.buf.build/configuration/v1/buf-gen-yaml
version: v1
plugins:
  # This will invoke protoc-gen-es and write output to src/gen
  - plugin: es
    out: src/gen
    opt: target=ts
  # This will invoke protoc-gen-apache-dubbo-es
  - plugin: apache-dubbo-es
    out: src/gen
    opt:
      # Add more plugin options here
      - target=ts
```

To generate code for all protobuf files within your project, simply run:

```bash
npx buf generate
```

Note that `buf` can generate from various [inputs](https://docs.buf.build/reference/inputs),
not just local protobuf files. For example, `npx buf generate buf.build/bufbuild/eliza`
generates code for the module [bufbuild/eliza](https://buf.build/bufbuild/eliza) on the Buf Schema
Registry.

### With protoc

```bash
PATH=$PATH:$(pwd)/node_modules/.bin \
  protoc -I . \
  --es_out src/gen \
  --es_opt target=ts \
  --connect-es_out src/gen \
  --connect-es_opt target=ts \
  a.proto b.proto c.proto
```

Note that we are adding `node_modules/.bin` to the `$PATH`, so that the protocol
buffer compiler can find them. This happens automatically with npm scripts.

Since yarn v2 and above does not use a `node_modules` directory, you need to
change the variable a bit:

```bash
PATH=$(dirname $(yarn bin protoc-gen-es)):$(dirname $(yarn bin protoc-gen-apache-dubbo-es)):$PATH
```

## Plugin options

### `target`

This option controls whether the plugin generates JavaScript, TypeScript,
or TypeScript declaration files.

Possible values:

- `target=js` - generates a `_dubbo.js` file for every `.proto` input file.
- `target=ts` - generates a `_dubbo.ts` file for every `.proto` input file.
- `target=dts` - generates a `_dubbo.d.ts` file for every `.proto` input file.

Multiple values can be given by separating them with `+`, for example
`target=js+dts`.

By default, we generate JavaScript and TypeScript declaration files, which
produces the smallest code size and is the most compatible with various
bundler configurations. If you prefer to generate TypeScript, use `target=ts`.

### `import_extension=.js`

By default, [protoc-gen-apache-dubbo-es](https://www.npmjs.com/package/protoc-gen-apache-dubbo-es)
(and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin))
uses a `.js` file extensions in import paths, even in TypeScript files.

This is unintuitive, but necessary for [ECMAScript modules in Node.js](https://www.typescriptlang.org/docs/handbook/esm-node.html).
Unfortunately, not all bundlers and tools have caught up yet, and Deno
requires `.ts`. With this plugin option, you can replace `.js` extensions
in import paths with the given value. For example, set

- `import_extension=none` to remove the `.js` extension
- `import_extension=.ts` to replace the `.js` extension with `.ts`

### `keep_empty_files=true`

By default, [protoc-gen-apache-dubbo-es](https://www.npmjs.com/package/protoc-gen-apache-dubbo-es)
(and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin))
omit empty files from the plugin output. This option disables pruning of
empty files, to allow for smooth interoperation with Bazel and similar
tooling that requires all output files to be declared ahead of time.
Unless you use Bazel, it is very unlikely that you need this option.

## Example generated code

`eliza.proto`

```protobuf
syntax = "proto3";

package buf.connect.demo.eliza.v1;

// ElizaService provides a way to talk to the ELIZA, which is a port of
// the DOCTOR script for Joseph Weizenbaum's original ELIZA program.
// Created in the mid-1960s at the MIT Artificial Intelligence Laboratory,
// ELIZA demonstrates the superficiality of human-computer communication.
// DOCTOR simulates a psychotherapist, and is commonly found as an Easter
// egg in emacs distributions.
service ElizaService {
  // Say is a unary request demo. This method should allow for a one sentence
  // response given a one sentence request.
  rpc Say(SayRequest) returns (SayResponse) {}
}

// SayRequest describes the sentence said to the ELIZA program.
message SayRequest {
  string sentence = 1;
}

// SayResponse describes the sentence responded by the ELIZA program.
message SayResponse {
  string sentence = 1;
}
```

`eliza_dubbo.ts`

```ts
/**
 * ElizaService provides a way to talk to the ELIZA, which is a port of
 * the DOCTOR script for Joseph Weizenbaum's original ELIZA program.
 * Created in the mid-1960s at the MIT Artificial Intelligence Laboratory,
 * ELIZA demonstrates the superficiality of human-computer communication.
 * DOCTOR simulates a psychotherapist, and is commonly found as an Easter
 * egg in emacs distributions.
 *
 * @generated from service buf.connect.demo.eliza.v1.ElizaService
 */
export const ElizaService = {
  typeName: 'buf.connect.demo.eliza.v1.ElizaService',
  methods: {
    /**
     * Say is a unary request demo. This method should allow for a one sentence
     * response given a one sentence request.
     *
     * @generated from rpc buf.connect.demo.eliza.v1.ElizaService.Say
     */
    say: {
      name: 'Say',
      I: SayRequest,
      O: SayResponse,
      kind: MethodKind.Unary
    }
  }
} as const
```

repository: apache/dubbo-js

gha_language: TypeScript

repo_name: apache/dubbo-js


text:
# kanban-django
This project is an attempt to make a one page kanban board app using Django Rest Framework and React. Tools used in this project include node, npm, webpack, django-webpack-loader, and babel.

This project is incomplete and is currently broken. My react app can acquire api data via a GET request but does not have a working form to POST to the api.
## Installation
0. Prologue: This project uses [python3](https://www.python.org/) and [nodejs](https://nodejs.org/en/). Please make sure these tools are available.
1. Clone this git repository: `git clone https://github.com/gcrowder/kanban-django.git`.

2. Install the Python dependencies: `pip install -r requirements.txt`

3. Install the JavaScript dependencies: From within the kanban directory (which should have a package.json file) run `npm install`.

4. Create a database and update kanban/settings.py with the new database settings. I used a postgresql database but any django supported database will do. I put both my SECRET_KEY and my database settings in a secrets.py file.

5. Run the django server: `python manage.py runserver`

6. Navigate to [http://<IP_ADDRESS>:8000](http://<IP_ADDRESS>:8000).

repository: gcrowder/kanban-django

repo_name: gcrowder/kanban-django


text:
---
date: 2013-04-16
update: 2014-11-20
author: Ortuna
email<EMAIL_ADDRESS>title: 3rd Party Plugins
permalink: /guides/3rd-party-plugins/
---

Padrino is a modular framework. As such, you can leverage other libraries such as Sinatra libraries which
complement Padrino quite well.

## Rendering JSON with sinatra-contrib

First you must reference [sinatra-contrib](https://github.com/sinatra/sinatra-contrib) in your Gemfile:

```ruby
#Gemfile
source :rubygems

# Server requirements
# gem 'thin' # or mongrel
# gem 'trinidad', :platform => 'jruby'

# Project requirements
gem 'rake'
gem 'sinatra-flash', :require => 'sinatra/flash'

# Component requirements
gem 'haml'

# Test requirements

# Padrino Stable Gem
gem 'padrino', :path => '~/Desktop/code/padrino-framework'

# Or Padrino Edge
# gem 'padrino', :git => 'git://github.com/padrino/padrino-framework.git'

# Or Individual Gems
# %w(core gen helpers cache mailer admin).each do |g|
#   gem 'padrino-' + g, '0.10.7'
# end

gem 'sinatra-contrib'
```

You may use the #json method after you have registered the sinatra helper:

```ruby
class MyJsonApp < Padrino::Application
  register Padrino::Rendering
  register Padrino::Mailer
  register Padrino::Helpers

  helpers Sinatra::JSON

  enable :sessions
  get '/' do
    hash = {foo: 'bar'}
    json hash
  end
end
```

repository: wikimatze/padrinorb-website

repo_name: wikimatze/padrinorb-website