text:
FORMAT: 1A
HOST: http://www.dadadida.com

# Dadadida Listener Portal REST API
This is the REST API documentation for the listener portion of Dadadida.  Contains endpoints, parameters, responses and other information for integration.

# Group Listener Information
Resources derived from the Listener class of the **Dadadida Listener UI API**

## Account Creation [/listener]
To create an account, the following is necessary.

    - firstName: required, string, example: "Ted"
    - lastName: required, string, example: "Blitzer"
    - email: required, string, example<EMAIL_ADDRESS>    - password: required, string, example: "sweetfries"
    - birthday: required, string, "04/22/1983"
    - sex: required, string, example: "male"
    - agreedToTerms: required, boolean, example: true

+ Model (application/json)

    + Body

            {
                "firstName": "Ted",
                "lastName": "Blitzer",
                "email"<EMAIL_ADDRESS>                "password": "sweetfries",
                "birthday": "04/22/1983",
                "sex": "male",
                "agreedToTerms": true
            }

### Create a Listener [POST]

+ Request (application/json)

    [Account Creation][]

+ Response 201 (application/json)

        {
            "id": 1,
            "message": "Listener account created successfully."
        }

+ Response 400 (application/json)

        {
            "message": "There was an error in the creation of the account."
        }

## Single User Account Info [/listener/{id}]
This is the basic information for the listener. The listener object contains the following parameters:

    - id: automatically generated by the backend (ignore in documentation for POSTs)
    - profileImage: optional, base-64 data string
    - firstName: required, string, example: "Ted"
    - lastName: required, string, example: "Blitzer"
    - email: required, string, example<EMAIL_ADDRESS>    - password: required, string, example: "sweetfries"
    - birthday: required, string, example: "04/22/1983"
    - sex: required, string, example: "male"
    - city: optional, string, example: "Nashville"
    - state: optional, string, example: "TN"
    - country: optional, string, example: "United States"
    - activityStatus: required, string, example: "Public"
    - shares: required, array, example: [ "Facebook", "Twitter" ]
    - followers: required, number, example: 50
    - points: required, number, example: 204
    - totalSpent: required, string, example: "$405.00"
    - agreedToTerms: required, boolean, example: "true"
    - accountType: required, string, example: "premium"

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "id": 1,
                "profileImage": "base-64 string",
                "firstName": "Ted",
                "lastName": "Blitzer",
                "email"<EMAIL_ADDRESS>                "password": "sweetfries",
                "birthday": "04/22/1983",
                "sex": "male",
                "city": "Nashville",
                "state": "TN",
                "country": "United States",
                "activityStatus": "public",
                "shares": [ "Facebook", "Twitter" ],
                "followers": 50,
                "points": 204,
                "totalSpent": "$405.00",
                "agreedToTerms": true,
                "accountType": "premium"
            }

### Retrieve a Listener's data [GET]

+ Request (application/json)

        {
            "id": 1
        }

+ Response 200 (application/json)

    [Single User Account Info][]

### Edit a Listener [PUT]

+ Response 200 (application/json)

        {
            "id": 1,
            "message": "Listener updated successfully."
        }

### Delete a Listener [DELETE]

+ Request (application/json)

        {
            "id": 1
        }

+ Response 200 (application/json)

        {
            "id": 1,
            "message": "Listener deleted successfully."
        }

## Listener Notifications [/listener/{id}/notifications]
The listener's notification settings. Notification settings contain the following parameters:

    - followed: required, boolean
    - subscribedTo: required, boolean
    - reviewed: required, boolean
    - shared: required, boolean
    - facebookFriend: required, boolean
    - artistsReleases: required, string, example: "weekly"

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "followed": true,
                "subscribedTo": true,
                "reviewed": true,
                "shared": false,
                "facebookFriend": false,
                "artistReleases": "daily"
            }

### Retrieve notifications [GET]

+ Response 200 (application/json)

    [Listener Notifications][]

### Edit notifications [PUT]

+ Response 200 (application/json)

        {
            "message": "User notifications updated successfully".
        }

## Listener History [/listener/{id}/history]
The listener's history.  Contains the following parameters:

    - action: required, string, example: "edited"
    - item: required, string, example: "profile picture"
    - preposition: required, string, example: "to"
    - result: required, string, example: "David Savage"
    - date: required, Unix time stamp, example:<PHONE_NUMBER>

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "action": "edited",
                "item": "location",
                "preposition": "to",
                "result": "Nashville, TN, USA",
                "date":<PHONE_NUMBER>
            }

### Retrieve history [GET]

+ Response 200 (application/json)

    [Listener History][]

## Listener Purchases [/listener/{id}/purchases]
The listener's purchase history and account balance information.

    - details: required, string, example: "Purchased credits"
    - credits: required, number, example: 50.00
    - debits: required, number, example: 5.50
    - balance: required, number, example: 44.50
    - date: required, Unix time stamp:<PHONE_NUMBER>

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "details": "Purchased song",
                "credits": 45.00,
                "debits": 5.50,
                "balance": 44.50,
                "date":<PHONE_NUMBER>
            }

### Retrieve purchases [GET]

+ Response 200 (application/json)

    [Listener Purchases][]

## Listener Social Setup [/listener/{id}/social]
Social portion of the listener profile.

    - friends: array of objects
        - name: required, string, example: "Ted Blitzer"
        - profileImage: required, base-64 string
        - followers: required, number, example: 20
    - suggested: array of objects
        - artists: array of objects
            - name: required, string, example: "The Sword Swallowers"
            - profileImage: required, base-64 string
            - followers: required, number, example: 20
        - friends: array of objects
            - name: required, string, example: "Ted Blitzer"
            - profileImage: required, base-64 string
            - followers: required, number, example: 20
    - artists: object
        - fanned: array of objects
            - name: required, string, example: "The Sword Swallowers"
            - profileImage: required, base-64 string
            - followers: required, number, example: 52
        - topArtists: array of objects
            - name: required, string, example: "The Sword Swallowers"
            - profileImage: required, base-64 string
            - followers: required, number, example: 52
        - recentlyPlayed: array of objects
            - name: required, string, example: "The Sword Swallowers"
            - profileImage: required, base-64 string
            - followers: required, number, example: 52
    - following: array of objects
        - name: required, string, example: "Ted Blitzer"
        - profileImage: required, base-64 string
        - followers: required, number, example: 20

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "friends": [
                    {
                        "name": "Ted Blitzer",
                        "profileImage": "base-64 string",
                        "followers": 50
                    }
                ],
                "suggested": {
                    "artists": [
                        {
                            "name": "Kid Rock",
                            "profileImage": "base-64 string",
                            "followers": 17000
                        }
                    ],
                    "friends": [
                        {
                            "name": "Ted Blitzer",
                            "profileImage": "base-64 string",
                            "followers": 52
                        }
                    ]
                },
                "artists": {
                    "fanned": [
                        {
                            "name": "Kid Rock",
                            "profileImage": "base-64 string",
                            "followers": 17000
                        }
                    ],
                    "topArtists": [
                        {
                            "name": "The Sword Swallowers",
                            "profileImage": "base-64 string",
                            "followers": 52
                        }
                    ],
                    "recentlyPlayed": [
                        {
                            "name": "Luke Bryan",
                            "profileImage": "base-64 string",
                            "followers": 52
                        }
                    ]
                },
                "following": [
                    {
                        "name": "Ted Blitzer",
                        "profileImage": "base-64 string",
                        "followers": 50
                    }
                ]
            }

### Retrieve Social [GET]

+ Response 200 (application/json)

    [Listener Social Setup][]

### Edit Social [PUT]

+ Response 200 (application/json)

        {
            "message": "Followers updated successfully."
        }

## Listener Payment Options [/listener/{id}/payment]
Listener payment information contains the following:

    - cardType: required, string, example: "Visa"
    - cardNumber: required, number, example:<PHONE_NUMBER>123456
    - securityCode: required, number, example: 567

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "cardType": "Visa",
                "cardNumber":<PHONE_NUMBER>123456,
                "securityCode": 562
            }

### Retrieve Payment [GET]

+ Response 200 (application/json)

    [Listener Payment Options][]

### Edit payment [PUT]

+ Response 200 (application/json)

        {
            "message": "Payment information updated."
        }

## Listener Share Inbox [/listener/{id}/inbox]
The listener can see all the items that have been shared with them (songs, stations, etc.).

    - from: required, string, example: "Ted Blitzer"
    - profileImage: required, base-64 string
    - share: object item that is shared
        - title: required, string, example: "Top 100 Rock"
        - type: required, string, example: "station"
        - link: required, string, example: "song-url.html"
        - date: required, Unix time stamp, example:<PHONE_NUMBER>,
        - image: required, base-64 string
        - measures: array of objects
            - languages: required, array, example: [ 1, 2, 3 ]
            - genres: required, array, example: [ 1, 2, 3 ]
            - subGenres: required, array, example: [ 1, 2, 3 ]
            - moods: required, array, example: [ 1, 2, 3 ]
            - instruments: required, array, example: [ 1, 2, 3 ]
            - similar: required, array, example: [ 1, 2, 3 ]
        - message: required, string, example: "Check this out!"

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "from": "Ted Blitzer",
                "profileImage": "base-64 string",
                "share": {
                    "title": "Top 100 Rock",
                    "type": "station",
                    "link": "stations/top-100-rock.html",
                    "date":<PHONE_NUMBER>,
                    "image": "base-64 string",
                    "measures": {
                        "languages": [ 1, 3, 5 ],
                        "genres": [ 1, 6, 12, 14 ],
                        "subGenres": [ 2, 4, 9 ],
                        "moods": [ 1, 3 ],
                        "instruments": [ 6, 7, 9 ],
                        "similar": [ 1, 12, 119 ]
                    },
                    "message": "Check this out!"
                }
            }

### Retrieve share inbox [GET]
Returns an array of items.

+ Response 200 (application/json)

    + Body

            [
                {
                    "from": "Ted Blitzer",
                    "profileImage": "base-64 string",
                    "share": {
                        "title": "Top 100 Rock",
                        "type": "station",
                        "link": "stations/top-100-rock.html",
                        "date":<PHONE_NUMBER>,
                        "image": "base-64 string",
                        "measures": {
                            "languages": [ 1, 3, 5 ],
                            "genres": [ 1, 6, 12, 14 ],
                            "subGenres": [ 2, 4, 9 ],
                            "moods": [ 1, 3 ],
                            "instruments": [ 6, 7, 9 ],
                            "similar": [ 1, 12, 119 ]
                        },
                        "message": "Check this out!"
                    }
                },
                {
                    "from": "Ted Blitzer",
                    "profileImage": "base-64 string",
                    "share": {
                        "title": "Top 100 Rock",
                        "type": "station",
                        "link": "stations/top-100-rock.html",
                        "date":<PHONE_NUMBER>,
                        "image": "base-64 string",
                        "measures": {
                            "languages": [ 1, 3, 5 ],
                            "genres": [ 1, 6, 12, 14 ],
                            "subGenres": [ 2, 4, 9 ],
                            "moods": [ 1, 3 ],
                            "instruments": [ 6, 7, 9 ],
                            "similar": [ 1, 12, 119 ]
                        },
                        "message": "Check this out!"
                    }
                }
            ]

# Group Stations
Information pertaining to stations created and listened to by the user.

## Retrieving Station Lists and Creating New Stations [/listener/{id}/stations]
Stations that the listener has created. Stations contain the following attributes:

    - id: automatically generated by the backend (ignore in documentation for POSTs)
    - name: required, string, example: "Morning Pop Wakeup"
    - languages: required, array, example: [ 1, 2, 3 ]
    - genres: required, array, example: [ 1, 2, 3 ]
    - subGenres: required, array, example: [ 1, 2, 3 ]
    - moods: required, array, example: [ 1, 2, 3 ]
    - instruments: required, array, example: [ 1, 2, 3 ]
    - similar: required, array, example: [ 1, 2, 3 ]
    - stationImage: required, base-64 string

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "id": 1,
                "name": "Morning Pop Wakeup Rush",
                "languages": [ 1, 3, 5 ],
                "genres": [ 1, 6, 12, 14 ],
                "subGenres": [ 2, 4, 9 ],
                "moods": [ 1, 3 ],
                "instruments": [ 6, 7, 9 ],
                "similar": [ 1, 12, 119 ],
                "stationImage": "base-64 string"
            }

### Retrieve all stations [GET]
Returns an array of stations.

+ Response 200 (application/json)

    + Body

            [
                {
                    "id": 1,
                    "name": "Morning Pop Wakeup Rush",
                    "languages": [ 1, 3, 5 ],
                    "genres": [ 1, 6, 12, 14 ],
                    "subGenres": [ 2, 4, 9 ],
                    "moods": [ 1, 3 ],
                    "instruments": [ 6, 7, 9 ],
                    "similar": [ 1, 12, 119 ],
                    "stationImage": "base-64 string"
                },
                {
                    "id": 2,
                    "name": "Morning Pop Wakeup Rush",
                    "languages": [ 1, 3, 5 ],
                    "genres": [ 1, 6, 12, 14 ],
                    "subGenres": [ 2, 4, 9 ],
                    "moods": [ 1, 3 ],
                    "instruments": [ 6, 7, 9 ],
                    "similar": [ 1, 12, 119 ],
                    "stationImage": "base-64 string"
                }
            ]

### Create a station [POST]

+ Request (application/json)

    [Retrieving Station Lists and Creating New Stations][]

+ Response 201 (application/json)

        {
            "id": 1,
            "message": "Station created successfully."
        }

## Shared Stations [/listener/{id}/stations/shared]
Stations that have been shared with the listener. Shared stations are similar to regular stations but contain the following attributes:

    - id: automatically generated by the backend (ignore in documentation for POSTs)
    - name: required, string, example: "Morning Pop Wakeup"
    - languages: required, array, example: [ 1, 2, 3 ]
    - genres: required, array, example: [ 1, 2, 3 ]
    - subGenres: required, array, example: [ 1, 2, 3 ]
    - moods: required, array, example: [ 1, 2, 3 ]
    - instruments: required, array, example: [ 1, 2, 3 ]
    - similar: required, array, example: [ 1, 2, 3 ],
    - stationImage: required, base-64 string
    - sharedBy: object
        - name: required, string, example: "Ted Blitzer"
        - friendId: required, number, example: 1

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "id": 1,
                "name": "Morning Pop Wakeup Rush",
                "languages": [ 1, 3, 5 ],
                "genres": [ 1, 6, 12, 14 ],
                "subGenres": [ 2, 4, 9 ],
                "moods": [ 1, 3 ],
                "instruments": [ 6, 7, 9 ],
                "similar": [ 1, 12, 119 ],
                "stationImage": "base-64 string",
                "sharedBy": {
                    "name": "Ted Blitzer",
                    "friendId": 1
                }
            }

### Retrieve all shared stations [GET]
Returns an array of shared stations.

+ Response 200 (application/json)

    + Body

            [
                {
                    "id": 1,
                    "name": "Morning Pop Wakeup Rush",
                    "languages": [ 1, 3, 5 ],
                    "genres": [ 1, 6, 12, 14 ],
                    "subGenres": [ 2, 4, 9 ],
                    "moods": [ 1, 3 ],
                    "instruments": [ 6, 7, 9 ],
                    "similar": [ 1, 12, 119 ],
                    "stationImage": "base-64 string",
                    "sharedBy": {
                        "name": "Ted Blitzer",
                        "friendId": 1
                    }
                },
                {
                    "id": 2,
                    "name": "Morning Pop Wakeup Rush",
                    "languages": [ 1, 3, 5 ],
                    "genres": [ 1, 6, 12, 14 ],
                    "subGenres": [ 2, 4, 9 ],
                    "moods": [ 1, 3 ],
                    "instruments": [ 6, 7, 9 ],
                    "similar": [ 1, 12, 119 ],
                    "stationImage": "base-64 string",
                    "sharedBy": {
                        "name": "Ted Blitzer",
                        "friendId": 1
                    }
                }
            ]

## Single Stations Actions [/listener/{listener_id}/stations/{station_id}]
Single station objects.

+ Parameters
    + listener_id (required, number, `1`) ... Numeric `id` of the listener.
    + station_id (required, number, `1`) ... Numeric `id` of the station.

### Retrieve a station [GET]

+ Response 200 (application/json)

    [Retrieving Station Lists and Creating New Stations][]

### Edit a station [PUT]

+ Response 200 (application/json)

        {
            "id": 1,
            "message": "Station updated successfully."
        }

### Delete a station [DELETE]

+ Response 200 (application/json)

        {
            "id": 1,
            "message": "Station was deleted successfully."
        }

## Sponsored Stations [/sponsored]
This is a list of stations that are sponsored on Dadadida. Sponsored stations contain virtually the same attributes as regular stations, but have an extra parameter attached.

    - id: automatically generated by the backend (ignore in documentation for POSTs)
    - name: required, string, example: "Morning Pop Wakeup"
    - languages: required, array, example: [ 1, 2, 3 ]
    - genres: required, array, example: [ 1, 2, 3 ]
    - subGenres: required, array, example: [ 1, 2, 3 ]
    - moods: required, array, example: [ 1, 2, 3 ]
    - instruments: required, array, example: [ 1, 2, 3 ]
    - similar: required, array, example: [ 1, 2, 3 ]
    - stationImage: required, base-64 string
    - sponsoredBy: required, string, example: "Coca-Cola"

+ Model (application/json)

    + Body

            {
                "id": 1,
                "name": "Morning Pop Wakeup Rush",
                "languages": [ 1, 3, 5 ],
                "genres": [ 1, 6, 12, 14 ],
                "subGenres": [ 2, 4, 9 ],
                "moods": [ 1, 3 ],
                "instruments": [ 6, 7, 9 ],
                "similar": [ 1, 12, 119 ],
                "stationImage": "base-64 string",
                "sponsoredBy": "Coca-Cola"
            }

### Retrieve all sponsored stations [GET]
Returns an array of stations.

+ Response 200 (application/json)

    + Body

            [
                {
                    "id": 1,
                    "name": "Morning Pop Wakeup Rush",
                    "languages": [ 1, 3, 5 ],
                    "genres": [ 1, 6, 12, 14 ],
                    "subGenres": [ 2, 4, 9 ],
                    "moods": [ 1, 3 ],
                    "instruments": [ 6, 7, 9 ],
                    "similar": [ 1, 12, 119 ],
                    "stationImage": "base-64 string",
                    "sponsoredBy": "Coca-Cola"
                },
                {
                    "id": 2,
                    "name": "Morning Pop Wakeup Rush",
                    "languages": [ 1, 3, 5 ],
                    "genres": [ 1, 6, 12, 14 ],
                    "subGenres": [ 2, 4, 9 ],
                    "moods": [ 1, 3 ],
                    "instruments": [ 6, 7, 9 ],
                    "similar": [ 1, 12, 119 ],
                    "stationImage": "base-64 string",
                    "sponsoredBy": "Coca-Cola"
                }
            ]

## Single Sponsored Station [/sponsored/{id}]
Single sponsored station object.

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the station.

### Retrieve sponsored station [GET]

+ Response 200 (application/json)

    [Sponsored Stations][]

## Featured Stations [/featured]
This is a list of stations that are featured on Dadadida. Featured stations are identical to regular station models.

### Retrieve all sponsored stations [GET]
Returns an array of stations.

+ Response 200 (application/json)

    + Body

            [
                {
                    "id": 1,
                    "name": "Morning Pop Wakeup Rush",
                    "languages": [ 1, 3, 5 ],
                    "genres": [ 1, 6, 12, 14 ],
                    "subGenres": [ 2, 4, 9 ],
                    "moods": [ 1, 3 ],
                    "instruments": [ 6, 7, 9 ],
                    "similar": [ 1, 12, 119 ]
                },
                {
                    "id": 2,
                    "name": "Morning Pop Wakeup Rush",
                    "languages": [ 1, 3, 5 ],
                    "genres": [ 1, 6, 12, 14 ],
                    "subGenres": [ 2, 4, 9 ],
                    "moods": [ 1, 3 ],
                    "instruments": [ 6, 7, 9 ],
                    "similar": [ 1, 12, 119 ]
                }
            ]

## Single Featured Station [/featured/{id}]
Single featured station object.

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the station.

### Retrieve featured station [GET]

+ Response 200 (application/json)

    [Retrieving Station Lists and Creating New Stations][]

## My Friends Are Listening To [/listener/{id}/stations/friends]
Stations that have been shared with the listener. Shared stations are similar to regular stations but contain the following attributes.

    - id: automatically generated by the backend (ignore in documentation for POSTs)
    - name: required, string, example: "Morning Pop Wakeup"
    - languages: required, array, example: [ 1, 2, 3 ]
    - genres: required, array, example: [ 1, 2, 3 ]
    - subGenres: required, array, example: [ 1, 2, 3 ]
    - moods: required, array, example: [ 1, 2, 3 ]
    - instruments: required, array, example: [ 1, 2, 3 ]
    - similar: required, array, example: [ 1, 2, 3 ],
    - fromFriend: object
        - name: required, string, example: "Ted Blitzer"
        - friendId: required, number, example: 1

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "id": 1,
                "name": "Morning Pop Wakeup Rush",
                "languages": [ 1, 3, 5 ],
                "genres": [ 1, 6, 12, 14 ],
                "subGenres": [ 2, 4, 9 ],
                "moods": [ 1, 3 ],
                "instruments": [ 6, 7, 9 ],
                "similar": [ 1, 12, 119 ],
                "fromFriend": {
                    "name": "Ted Blitzer",
                    "friendId": 1
                }
            }

### Retrieve all shared stations from friends [GET]
Returns an array of shared stations.

+ Response 200 (application/json)

    + Body

            [
                {
                    "id": 1,
                    "name": "Morning Pop Wakeup Rush",
                    "languages": [ 1, 3, 5 ],
                    "genres": [ 1, 6, 12, 14 ],
                    "subGenres": [ 2, 4, 9 ],
                    "moods": [ 1, 3 ],
                    "instruments": [ 6, 7, 9 ],
                    "similar": [ 1, 12, 119 ],
                    "fromFriend": {
                        "name": "Ted Blitzer",
                        "friendId": 1
                    }
                },
                {
                    "id": 2,
                    "name": "Morning Pop Wakeup Rush",
                    "languages": [ 1, 3, 5 ],
                    "genres": [ 1, 6, 12, 14 ],
                    "subGenres": [ 2, 4, 9 ],
                    "moods": [ 1, 3 ],
                    "instruments": [ 6, 7, 9 ],
                    "similar": [ 1, 12, 119 ],
                    "fromFriend": {
                        "name": "Ted Blitzer",
                        "friendId": 1
                    }
                }
            ]

# Group Playlists
Playlists are created by listeners and comprised of songs that the user has downloaded or are free.

## User Playlists [/listener/{id}/playlists]
Returns the user's playlists.  Playlists contain the following information.

    - id: automatically generated by the backend (ignore in documentation for POSTs)
    - name: required, string, example: "Workout Music"
    - coverImage: required, base-64 string
    - playlistUrl: required, string, example: "/play/playlists/1"

+ Parameters
    + id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "name": "Workout Music",
                "coverImage": "base-64 string",
                "playlistUrl": "play/playlists/1"
            }

### Retrieve playlists [GET]
Returns an array of objects.

+ Response 200 (application/json)

    + Body

            [
                {
                    "id": 1,
                    "name": "Workout Music",
                    "coverImage": "base-64 string",
                    "playlistUrl": "play/playlists/1"
                },
                {
                    "id": 2
                    "name": "Workout Music",
                    "coverImage": "base-64 string",
                    "playlistUrl": "play/playlists/2"
                }
            ]

### Create a playlist [POST]

+ Request (application/json)

    [User Playlists][]

+ Response 201 (application/json)

        {
            "id": 1,
            "message": "Playlist created successfully."
        }

## Single Playlist [/listener/{listener_id}/playlists/{playlist_id}]
This is the single playlist object.  It contains the following information:

    - id: automatically generated by the backend (ignore in documentation for POSTs)
    - name: required, string, example: "Workout Music"
    - coverImage: required, base-64 string
    - songs: array of song objects
        - songId: required, number, example: 1
        - title: required, string, example: "Milk Cow Blues"
        - artist: object
            - name: required, string, example: "The Sword Swallowers"
            - artistId: required, number, example: 1
        - description: required, object comprised of strings of tag names
            - language: string
            - genre: string
            - subGenre: string
            - mood: string
            - instruments: string
            - similar: string
        - length: required, string, example: "4:02"
        - order: required, number, example: 1
        - songUrl: required, string, example: "play/songs/1"

+ Parameters
    + listener_id (required, number, `1`) ... Numeric `id` of the listener.
    + playlist_id (required, number, `1`) ... Numeric `id` of the playlist.

+ Model (application/json)

    + Body

            {
                "id": 1,
                "name": "Workout Music",
                "coverImage": "base-64 string",
                "songs": [
                    {
                        "songId": 1,
                        "title": "Milk Cow Blues",
                        "artist": {
                            "name": "The Sword Swallowers",
                            "artistId": 1
                        },
                        "description": {
                            "language": "English",
                            "genre": "Pop",
                            "subGenre": "Top 40",
                            "mood": "Happy",
                            "instruments": "Guitar",
                            "similar": "The Pied Pipers"
                        },
                        "length": "4:02",
                        "order": 1,
                        "songUrl": "play/songs/1"
                    },
                    {
                        "songId": 2,
                        "title": "Milk Cow Blues",
                        "artist": {
                            "name": "The Sword Swallowers",
                            "artistId": 1
                        },
                        "description": {
                            "language": "English",
                            "genre": "Pop",
                            "subGenre": "Top 40",
                            "mood": "Happy",
                            "instruments": "Guitar",
                            "similar": "The Pied Pipers"
                        },
                        "length": "4:02",
                        "order": 2,
                        "songUrl": "play/songs/2"
                    }
                ]
            }

### Retrieve a playlist [GET]

+ Response 200 (application/json)

    [Single Playlist][]

### Delete a playlist [DELETE]

+ Response 200 (application/json)

        {
            "id": 1,
            "message": "Playlist was deleted successfully."
        }

### Modify a playlist [PUT]
Send `id` with the request and then parameter to be updated; in the example below it is the name.

+ Request (application/json)

        {
            "id": 1,
            "name": "Playlist name"
        }

+ Response 200 (application/json)

        {
            "id": 1,
            "message": "Playlist was updated successfully."
        }

# Group Downloads
This is the list of all songs the user has downloaded, either paid or free.

## Downloads List [/listener/{listener_id}/downloads]
Downloads list contains the following attributes:

    - songs: required, array of objects
        - songId: required, number, matches up to song object id
        - dateAdded: required, Unix time stamp:<PHONE_NUMBER>

+ Parameters
    + listener_id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "songs": [
                    {
                        "songId": 1,
                        "dateAdded":<PHONE_NUMBER>
                    },
                    {
                        "songId": 2,
                        "dateAdded":<PHONE_NUMBER>
                    },
                    {
                        "songId": 3,
                        "dateAdded":<PHONE_NUMBER>
                    }
                ]
            }

### Retrieve downloads list [GET]

+ Response 200 (application/json)

    [Downloads List][]

### Update downloads list [PUT]
Since all you can really do is delete a song, we're just sending an updated array of songs here.

+ Request (application/json)

        {
            "songs": [
                {
                    "songId": 1,
                    "dateAdded":<PHONE_NUMBER>
                },
                {
                    "songId": 2,
                    "dateAdded":<PHONE_NUMBER>
                }
            ]
        }

+ Response 200 (application/json)

        {
            "message": "Downloads list updated successfully."
        }

# Group History
History of nearly everything a listener has done in relation to songs and stations.

## Station History [/listener/{listener_id}/history]
The history list contains all of the following:

    - stations: array of station objects
        - stationId: required, number, example: 1
        - name: required, string, example: "Morning Pop Wakeup"
        - dateListened: required, Unix time stamp:<PHONE_NUMBER>
        - songs: required, array of song objects
            songId: required, number, example: 1
            action: required, string, example: "thumbs up"

+ Parameters
    + listener_id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "stations": [
                    {
                        "stationId": 1,
                        "name": "Morning Pop Wakeup",
                        "dateListened": 139608762,
                        "songs": [
                            {
                                "songId": 1,
                                "action": "thumbs up"
                            },
                            {
                                "songId": 2,
                                "action": "thumbs down"
                            },
                            {
                                "songId": 3,
                                "action": "skipped"
                            }
                        ]
                    },
                    {
                        "stationId": 2,
                        "name": "Rock Songs",
                        "dateListened": 139608762,
                        "songs": [
                            {
                                "songId": 1,
                                "action": "thumbs up"
                            },
                            {
                                "songId": 2,
                                "action": "thumbs down"
                            },
                            {
                                "songId": 3,
                                "action": "skipped"
                            }
                        ]
                    }
                ]
            }

### Fetch History [GET]

+ Response 200 (application/json)

    [Station History][]

# Group Stats
Stats for different music details that a user can see and filter.

## Listener Stats [/listener/{listener_id}/stats?filtertype={filter_type}&filter={filter}]
Stats contains artists, songs, downloads, and genres.

    - artists: array of artist objects
        - weekly: array of objects
            - artistId: required, number, example: 1
            - downloads: required, number, example: 4402
            - rating: required, number, example: 4
        - monthly: array of objects
            - artistId: required, number, example: 1
            - downloads: required, number, example: 4402
            - rating: required, number, example: 4
    - songs: array of song objects
        - weekly: array of objects
            - songId: required, number, example: 1
            - popularity: required, number (percentage), example: 89
        - monthly: array of objects
            - songId: required, number, example: 1
            - popularity: required, number (percentage), example: 89
    - genres: array of genre objects
        - weekly: array of objects
            - genre: required, string, example: "Rock"
            - popularity: required, number (percentage), example: 30
        - monthly: array of objects
            - genre: required, string, exampe: "Rock"
            - popularity: required, number (percentage), example: 30
    - downloads: array of song objects
        - weekly: array of objects
            - songId: required, number, example: 1
            - downloads: required, number, example: 4260
        - monthly: array of objects
            - songId: required, number, example: 1
            - downloads: required, number, example: 4260

+ Parameters
    + listener_id (required, number, `1`) ... Numeric `id` of the listener.
    + filter_type (required, string, `monthly`) ... String of the type of filter to apply.
    + filter (required, string, `pop`) ... String for which the results will be filtered by.

+ Model (application/json)

    + Body

            {
                "artists": {
                    "weekly": [
                        {
                            "artistId": 1,
                            "downloads": 4602,
                            "rating": 4
                        },
                        {
                            "artistId": 2,
                            "downloads": 4602,
                            "rating": 4
                        }
                    ],
                    "monthly": [
                        {
                            "artistId": 1,
                            "downloads": 4602,
                            "rating": 4
                        },
                        {
                            "artistId": 2,
                            "downloads": 4602,
                            "rating": 4
                        }
                    ]
                },
                "songs": {
                    "weekly": [
                        {
                            "songId": 1,
                            "popularity": 89
                        },
                        {
                            "songId": 2,
                            "popularity": 89
                        }
                    ],
                    "monthly": [
                        {
                            "songId": 1,
                            "popularity": 89
                        },
                        {
                            "songId": 2,
                            "popularity": 89
                        }
                    ]
                },
                "genres": {
                    "weekly": [
                        {
                            "genre": "Pop",
                            "popularity": 89
                        },
                        {
                            "genre": "Rock",
                            "popularity": 89
                        }
                    ],
                    "monthly": [
                        {
                            "genre": "Pop",
                            "popularity": 89
                        },
                        {
                            "genre": "Rock",
                            "popularity": 89
                        }
                    ]
                },
                "downloads": {
                    "weekly": [
                        {
                            "songId": 1,
                            "popularity": 89
                        },
                        {
                            "songId": 2,
                            "popularity": 89
                        }
                    ],
                    "monthly": [
                        {
                            "songId": 1,
                            "popularity": 89
                        },
                        {
                            "songId": 2,
                            "popularity": 89
                        }
                    ]
                }
            }

### Fetch Stats [GET]

+ Response 200 (application/json)

    [Listener Stats][]

# Group Sharing
Song actions

## Sharing Actions [/listener/{listener_id}/share?type={item}]
Items for the listener to share have the following properties.

    - itemId: required, number, example: 1
    - senderId: required, number, example: 1
    - message: required, string, example: "Hey, check this out!"
    - destinationId: required, number, example: 2

+ Parameters
    + listener_id (required, number, `1`) ... Numeric `id` of the listener.
    + item (required, string, `song`) ... Type of item we're sharing.

+ Model (application/json)

    + Body

            {
                "itemId": 1,
                "senderId": 1,
                "message": "Hey, check this out!",
                "destinationId": 2
            }

### Share an item [POST]

+ Request (application/json)

    [Sharing Actions][]

+ Response 200 (application/json)

        {
            "message": "Item shared successfully!"
        }

# Group Music Player
The music player portion of the listener portal.

## Listener Music Player [/listener/{listener_id}/player]
The listener music player will return objects with the following properties.

    - songs: array of objects
        - id: required, number, example: 1
        - name: required, string, example: "Milk Cow Blues"
        - artist: required, string, example: "The Sword Swallowers"
        - collection: string, example: "Best Of"
        - length: required, string, example: "4:02"
        - profilePicture: base-64 string
        - rating: required, number, example: 44
        - tagIds: required, array, example: [ 1, 2, 3 ]

+ Parameters
    + listener_id (required, number, `1`) ... Numeric `id` of the listener.

+ Model (application/json)

    + Body

            {
                "songs": [
                    {
                        "id": 1,
                        "name": "Milk Cow Blues",
                        "artist": "The Sword Swallowers",
                        "collection": "Best Of",
                        "length": "4:02",
                        "profilePicture": "base-64 string",
                        "rating": 44,
                        "tagIds": [ 1, 2, 3 ]
                    },
                    {
                        "id": 2,
                        "name": "Milk Cow Blues",
                        "artist": "The Sword Swallowers",
                        "collection": "Best Of",
                        "length": "4:02",
                        "profilePicture": "base-64 string",
                        "rating": 44,
                        "tagIds": [ 1, 2, 3 ]
                    },
                    {
                        "id": 3,
                        "name": "Milk Cow Blues",
                        "artist": "The Sword Swallowers",
                        "collection": "Best Of",
                        "length": "4:02",
                        "profilePicture": "base-64 string",
                        "rating": 44,
                        "tagIds": [ 1, 2, 3 ]
                    }
                ]
            }

### Open the player [GET]

+ Response 200 (application/json)

    [Listener Music Player][]

### Rate/skip/flag a song [PUT]
The actions can either be 'thumbs up', 'thumbs down', 'skipped', 'flag/abusive', or 'flag/explicit'.

+ Request (application/json)

        {
            "songId": 1,
            "action": "thumbs up"
        }

+ Response 200 (application/json)

        {
            "message": "Song was up-rated successfully!"
        }

repository: deansredhalo/supernaw

repo_name: deansredhalo/supernaw


text:
---
layout: post
title:      "My First CLI Ruby Gem go_hiking!"
date:       2020-06-25 19:17:27 -0400
permalink:  my_first_cli_ruby_gem_go_hiking
---

   I finished my very first Flatiron School project. It is hard to describe how satisfying that is.
   This project was to create a Command Line Interface (CLI) Ruby Gem. Only month and a half ago did I just learn what variable is and now I am about to create a Ruby Gem that will allow users to access some data. Sounds intimidating, right?? Well… It is.

 **So what is a CLI?**  CLI (Command Line Interface) is a program on our computer that allows us to create and delete files, run programs, and navigate through folders and files.

   **And what is a Ruby gem?** The software package is called a “gem” which contains a packaged Ruby application or library. Gems can be used to extend or modify functionality in Ruby applications.

   **How did I create Ruby gem?**

 The hardest part was to start. Up to this moment, all of the labs would come with specs, README.md, tests to pass, the environment would be set up and I needed to focus on nothing but code. Now, it had to be created from scratch.
     Before I decided what my gem’s functionality will be, I knew I wanted to use an API vs.  Web Scraping to get data I will use for this project. It seems to me that APIs are more common practice nowadays and  most companies offer APIs that will contain data that programmers will use in their applications. That is why I chose that route.

 Deciding on a theme was kind of easy. I live in Colorado, the state that offers an amazing outdoors’s life. My goal was to offer users (mainly Denver visitors) a way to quickly decide on a hike trail they want to go on.
    This website (http://www.hikingproject.com) has a nice list of great hikes. To get an API from them, I had to sign up and I received my API key that I used to get needed data.

 To create a gem, I needed to type bundle gem go_hiking in my terminal. This command pre-populated a basic directory with:

* Bin
* Lib
* .gitignore
* go_hiking.gemspec
* Gemfile
* License.txt
* Rakefile
* README.md

Pre-populated directories saved me some headaches.

 Bin directory has a console file that is very important for the program. I created a separate file `run` that I will use for running my code. This file is as simple as in the picture below, but every line is crucial for evoking the app.

```
#!/usr/bin/env ruby

require_relative "../lib/environment"

puts "Hello!"

GoHiking::CLI.new.start

```

  The first line `#!/usr/bin/env` ruby is called `shebang`. This line provides the shell with the absolute path to the Ruby interpreter. If I was writing my code in a different language, I would just use its name instead of `ruby` in this line of code. Having this code, my users only need to type `bin/run` in terminal and they will evoke the app.
   Lib directory was installed with go_hiking folder which contains a version.rb file. As its name says this file shows the version of my gem. Also, go_hiking.rb file was created. I renamed it to environment.rb. This file handles all of the 'requiring'.

```
require_relative './go_hiking/version.rb'
require "pry"
require "httparty"

require_relative "./api_manager"
require_relative "./hike"
require_relative "./cli"

module GoHiking
  class Error < StandardError; end
  # Your code goes here...
end

```

   Lib folder will be responsible for holding the other files I created when building classes. For this app, I thought it would be enough to have only 3 different files:

* 	api_manager.rb – This file contains class ApiManager which will be getting data from HikingProject API.
* 	cli.rb – This file contains class CLI that is my controller class. I have `#start` method that will evoke other methods which will help me to show the list of trails when users use a command `bin/run` in their terminal.
* 	hike.rb – This file contains class Hike, which is the model class. Methods in this class are responsible for instantiating and creating new Hike objects. Each object will have attributes such as name, location, summary, difficulty, URL, hike_length.

    I created the ApiManager class first because I wanted to have real data from the beginning. It is easier for me to debug if I see the real results. I have been using `binding.pry` in labs  before, but to be honest, working on this project I finally understand how helpful `pry` gem is.

 I initially started a class method and used `puts “Hello!”`  as my code.  `puts` can be as helpful as `binding.pry`.
When I ran `bin/run`, I got an error. Permission denied, it said. I froze. The fear of breaking the app was so scary. Right then I learned about executable files and what it means. The first thing I did was to run `ls –lah` command which listed files and if it didn’t end with ‘x’ than that file was not executable. To change that I needed to run `chmod +x <file name>` and voila! My program output “Hello!”

 All of my files were linked properly and I was able to get to actual coding.

   **What did I learn working on this project?**
* 	I learned how to create a gem, link files necessary for running the program.
* 	I feel comfortable using gem `pry` properly.
* 	I found out about gem `HTTParty`, which can be used to query web services and examine the resulting output. By default it will output the response as a pretty-printed Ruby object. This can also be overridden to output formatted XML or JSON.
*  `Heredoc` was useful in two of my methods. A heredoc is a way to define a multiline string, while maintaining the original indentation and formatting. I started with the symbol <<-, then a word that represents the name for this heredoc, the heredoc contents, then I closed the heredoc with that same word on its own line.

```
def display_instructions
        puts <<-INST

Choose a trail by number or type "exit" to exit the program!

        INST
    end

```

I won’t write much about the actual coding process. I feel it is covered very well through the Flatiron curriculum. All the other aspects of this project were more stressful and I wanted to focus on them.

All in all, working on this project was proof that I chose the right  carrier path. I am aware of having a long run before calling myself a full stack programmer. But hey, I created a code that works!

You can check my gem here:   https://github.com/ValentinaPanic/go_hiking

branch_name: refs/heads/master

extension: markdown

license_type: permissive


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [react-native-windows](./react-native-windows.md) > [IHandledKeyboardEvent](./react-native-windows.ihandledkeyboardevent.md) > [ctrlKey](./react-native-windows.ihandledkeyboardevent.ctrlkey.md)

## IHandledKeyboardEvent.ctrlKey property

<b>Signature:</b>

```typescript
ctrlKey?: boolean;
```

license: MIT

extension: md

gha_license_id: MIT


text:
[@bigcommerce/checkout-sdk](../README.md) > [AmazonPayShippingInitializeOptions](../interfaces/amazonpayshippinginitializeoptions.md)

# AmazonPayShippingInitializeOptions

A set of options that are required to initialize the shipping step of checkout in order to support Amazon Pay.

When Amazon Pay is initialized, a widget will be inserted into the DOM. The widget has a list of shipping addresses for the customer to choose from.

## Hierarchy

**AmazonPayShippingInitializeOptions**

## Index

### Properties

* [container](amazonpayshippinginitializeoptions.md#container)

### Methods

* [onAddressSelect](amazonpayshippinginitializeoptions.md#onaddressselect)
* [onError](amazonpayshippinginitializeoptions.md#onerror)
* [onReady](amazonpayshippinginitializeoptions.md#onready)

---

## Properties

###  container

**● container**: *`string`*

The ID of a container which the address widget should insert into.

___

## Methods

### `<Optional>` onAddressSelect

▸ **onAddressSelect**(reference: *[AmazonPayOrderReference](amazonpayorderreference.md)*): `void`

A callback that gets called when the customer selects an address option.

**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| reference | [AmazonPayOrderReference](amazonpayorderreference.md) |  The order reference provided by Amazon. |

**Returns:** `void`

___

### `<Optional>` onError

▸ **onError**(error: * [AmazonPayWidgetError](amazonpaywidgeterror.md) | [StandardError](../classes/standarderror.md)*): `void`

A callback that gets called if unable to initialize the widget or select one of the address options provided by the widget.

**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| error |  [AmazonPayWidgetError](amazonpaywidgeterror.md) | [StandardError](../classes/standarderror.md)|  The error object describing the failure of the initialization. |

**Returns:** `void`

___

### `<Optional>` onReady

▸ **onReady**(reference: *[AmazonPayOrderReference](amazonpayorderreference.md)*): `void`

A callback that gets called when the widget is loaded and ready to be interacted with.

**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| reference | [AmazonPayOrderReference](amazonpayorderreference.md) |  The order reference provided by Amazon. |

**Returns:** `void`

___

gha_language: TypeScript


text:
# datadr: Divide and Recombine in R

[![Build Status](https://travis-ci.org/tesseradata/datadr.svg?branch=master)](https://travis-ci.org/tesseradata/datadr)

datadr is an R package that leverages [RHIPE](https://github.com/tesseradata/RHIPE) to provide a simple interface to division and recombination (D&R) methods for large complex data.

To get started, see the package documentation and function reference located [here](http://tesseradata.github.com/datadr).

Visualization tools based on D&R can be found [here](https://github.com/tesseradata/trelliscope).

## Installation

This package will not be submitted to CRAN until it has matured.

To install this package from github, do the following from the R console:

```s
library(devtools)
install_github("datadr", "tesseradata")
```

## License

This software is currently under the BSD license.  Please read the [license](https://github.com/tesseradata/datadr/blob/master/LICENSE.md) document.

## Acknowledgement

datadr development is sponsored by the DARPA XDATA program.

repository: migariane/datadr

repo_name: migariane/datadr


text:
# sudo-make-me-a-sandwitch
Click and type less. Make your day to day tasks automated.
Inspired by [hacker-scripts](https://github.com/NARKOZ/hacker-scripts).

![Make-me-a-sandwich; sudo !!](images/sandwich.png)

[1. trending-repos](trending-repos.py)
----
This script opens top today's trending github repos in your browser if you have not
previously visited them.

[2. color-palette](color-palette.py)
----
This script generates a color palette containing the colors which are most used
in a picture.

![cp1.jpg](images/cp1.jpg)
![cp2.jpg](images/cp2.jpg)

gha_language: Python


text:
---
layout: default
---

# 1994-04-20 - Re: anti-clipper autobomber

## Header Data

From<EMAIL_ADDRESS>(Arsen Ray Arachelian)

To<EMAIL_ADDRESS>(Llywelyn)

Message Hash: 01caf9995876c342c099485904b7d52e54e7a5cd91b0d48629254a21a21de5c0

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1994-04-20 06:51:54 UTC

Raw Date: Tue, 19 Apr 94 23:51:54 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Arsen Ray Arachelian)
Date: Tue, 19 Apr 94 23:51:54 PDT
To<EMAIL_ADDRESS>(Llywelyn)
Subject: Re: anti-clipper autobomber
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text

Ouch! I'm sorry I asked.  I won't bother finding out anything else about
Serdar, thanks. :-)  I don't have any time to waste on megalomaniacs.  Can
someone convince him to "share" his software?  If not, we can write our own.

:-)

{% endraw %}
```

## Thread

+ Return to [April 1994](/archive/1994/04)

+ Return to<EMAIL_ADDRESS>(Arsen Ray Arachelian)](/authors/rarachel_at_prism_poly_edu_arsen_ray_arachelian_)"

+ _Unknown thread root_
  + 1994-04-20 (Tue, 19 Apr 94 23:51:54 PDT) - Re: anti-clipper autobomber -<EMAIL_ADDRESS>(Arsen Ray Arachelian)_


text:
---
layout: post
title: "[CC150v4] 14.1 Java Private Constructor "
comments: true
categories:
- CC150v4
- Java OOP

---

### Question

> In terms of inheritance, what is the effect of keeping a constructor private?

### Solution

[If the programmer](http://www.javapractices.com/topic/TopicAction.do?Id=40) does not provide a constructor for a class, __the system will always provide a default, public no-argument constructor__.

To disable this default constructor, simply add a private no-argument constructor to the class.

Two categories of usage:

1. Object construction is entirely forbidden
	1. class offers only static members (sometimes called __[utility class](http://stackoverflow.com/a/17342889)__)
1. Object construction is private only
	1. a class needs to prevent the caller from creating objects, like Singleton

branch_name: refs/heads/source

gha_language: HTML


text:
# request

![](https://miro.medium.com/max/1200/1*5KglaZoNp4fNpNHUao5u5w.jpeg)

HTTP client for haskell, inpired by [requests](https://requests.readthedocs.io/) and [http-dispatch](https://github.com/owainlewis/http-dispatch).

## Installation

This pacakge is published on [hackage](http://hackage.haskell.org/package/request) with the same name `request`, you can install it with cabal or stack or nix as any other hackage packages.

## Usage

You can try this in haskell REPL once you have `request` installed:

```haskell
import Network.HTTP.Request

resp <- get "https://api.leancloud.cn/1.1/date"
print $ requestStatus resp
```

## Core API

Request's API has three core concepts: `Request` record type, `Response` record type, `send` function.

### Request

`Request` is all about the information you will send to the target URL.

```haskell
data Request = Request
  { requestMethod  :: Method
  , requestUrl     :: String
  , requestHeaders :: Headers
  , requestBody    :: Maybe Data.ByteString.ByteString
  } deriving (Show)
```

### send

Once you have constructed your own `Request` record, you can call the `send` function to send it to the server. The `send` function's type is:

```haskell
send :: Request -> IO Response
```

### Response

`Response` is what you got from the server URL.

```haskell
data Response = Response
  { responseStatus  :: Int
  , responseHeaders :: Headers
  , responseBody    :: Data.ByteString.ByteString
  } deriving (Show)
```

### Example

```haskell
:set -XOverloadedStrings

import Network.HTTP.Request

-- Construct a Request record.
let req = Request GET "https://api.leancloud.cn/1.1/date" [] Nothing
-- Send it.
res <- send req
-- access the fields on Response.
print $ requestStatus resp
```

## Shortcuts

As you expected, there are some shortcuts for the most used scenarios.

```haskell
get :: String -> IO Response
get url =
  send $ Request GET url [] Nothing

delete :: String -> IO Response
delete url =
  send $ Request DELETE url [] Nothing

post :: (String, Maybe Data.ByteString.ByteString) -> IO Response
post (url, body) =
  send $ Request POST url [] body

put :: (String, Maybe Data.ByteString.ByteString) -> IO Response
put (url, body) =
  send $ Request PUT url [] body
```

These shortcuts' definitions are simple and direct. You are encouraged to add your own if the built-in does not match your use cases, like add custom headers in every request.

## API Documents

See the hackage page: http://hackage.haskell.org/package/request/docs/Network-HTTP-Request.html

## About the Project

Request is © 2020-2021 by [aisk](https://github.com/aisk).

### License

Request is distributed by a [BSD license](https://github.com/aisk/request/tree/master/LICENSE).

repository: naatscs/request

repo_name: naatscs/request


text:
# pacer
Test code for Pacer protocol

# Ports

This test code uses UDP port 8463

# sendtest

This sends a packet once per second to the given IP address.   It can broadcast.

                Version: 0  Message Type: 0  Timecode hint: 0
                Sender ID: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                Timeline ID: 1234  Sequence: 13
                Timeline Status: Running (2)
                REC<PHONE_NUMBER>:804952/1000000
                REF<PHONE_NUMBER>:803828/1000000 (REC-REF: 0:1124)
                OFF 0:0/0
                TIM 13:0/1000

repository: benpeoples/pacer

branch_name: refs/heads/main

repo_name: benpeoples/pacer


text:
##Installation
####Preparing the Go Environment

This demo is written in [Go](http://golang.org)

For complete install instructions go to [Install Go](http://golang.org/doc/install)

#####Installing Go (the shorter version)
I have tested these instructions on a Mac, your mileage may vary on other platforms but the steps will be similar.

On Mac it is very likely you will need Xcode and its 'Command Line Tools' counterpart. I am not certain since all of my machines already have it installed.

You will also need [git](http://git-scm.com) and [Mercurial](http://mercurial.selenic.com) as Go simply uses on whatever version control system the package maintainer uses and both git and mercurial are used by the packages the demo needs.

1) Download go for your platform from here https://golang.org/dl/
	I downloaded this: https://storage.googleapis.com/golang/go1.4.2.darwin-amd64-osx10.8.tar.gz

2) Extract the files (in my case the command is)

```
$ sudo tar -C /usr/local -xzf go1.4.2.darwin-amd64-osx10.8.tar.gz
```
3) Add the binary path to your bash profile by opening `.bash_profile` and adding the line

```
export PATH=$PATH:/usr/local/go/bin
```
4) Either log out and back in **or** `source` your `.bash_profile`

5) Create your `go` workspace (this can be anywhere for me it is directly under my home directory)

```
$ mkdir go_workspace
```

6) Set the `$GOPATH` environment variable based on the workspace directory you created in step 5. Open your .bash_profile again and add the line

```
export GOPATH=$HOME/go_workspace
export PATH=$PATH:$HOME/go_workspace/bin
```
7) Either log out and back in **or** `source` your `.bash_profile`

####Getting the Demo's Dependencies and Source
8) Now to install the packages we need to run the demo. These will be installed into your `$GOPATH`

```
$ go get github.com/blevesearch/segment
$ go get github.com/PuerkitoBio/goquery
$ go get code.google.com/p/go-sqlite/go1/sqlite3
```

9) Now grab the source for the demo

```
$ cd ~/go_workspace/src/github.com/
$ mkdir olivetreebible
$ olivetreebible
$ git clone https://github.com/OliveTreeBible/bt15demo.git
```

####Building and Running the Demo
10) Go into the project directory and build and run it

```
$ cd bt15demo/
$ go install
```

This compiled the source code to a binary and installed it to `$GOPATH/bin` and since we added that path to the `$PATH` shell variable in step 6 we can now simply run the app like this:

```
bt15demo
```

You will see output that looks something like

```
...
Of Marian's history 402 If to the Flowers of your young hearts Instructions dews are given Oh be earnest as our Marian was To find the road to Heaven 402 If to the Flowers of your young hearts Instructions dews are given Oh be earnest as our Marian was To find the road to Heaven
====> 55 words ad4079a72f481c8c0dd83e1311da6c8dd08cf8439b91972758fa26c70ec7cc74

FOOTNOTES 1 Bedford jail in which Bunyan was twelve years a prisoner 2 Tophet here means hell 3 Idle one 4 An old word meaning money or riches 5 This word means pleasant or delightful 6 Perspective glass is an old name for a telescope or spy glass 7 An atheist is one who does not believe that there is a God 8 That is of the body and blood of Christ 9 An instrument of music used in the time of John Bunyan somewhat like a very small piano 10 An old English coin bearing the figure of an angel 11 The word let here means hindrance
====> 108 words debf61244bc38adc724d1cc4a9c2035e82573f7f2ffbe1b312135d9c4898743d
...
```

##SUCCESS!


text:
### Create a cluster and obtain kubeconfig file

Provider used for testing: Digitalocean

### Create Namespace for ERPNext Feature Board

```shell
kubectl create ns efb
```

### Install Kubernetes ingress-nginx

Refer https://kubernetes.github.io/ingress-nginx/

```shell
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.46.0/deploy/static/provider/cloud/deploy.yaml
```

### Install cert-manager

Refer https://cert-manager.io/docs/installation/kubernetes/#option-2-install-crds-as-part-of-the-helm-release

```shell
helm install \
	cert-manager jetstack/cert-manager \
	--namespace cert-manager \
	--version v1.3.1 \
	--set installCRDs=true
```

Edit cluster-issuer.yaml as per your configuration and create cluster-issuer

```shell
kubectl apply -f cluster-issuer.yaml
```

Edit certificate.yaml as per your wildcard domain and create certificate

```shell
kubectl apply -f certificate.yaml
```

### Install MariaDB, Redis, NFS

Install all of these services, same as in development environment, just change the `storageClass` as per your cloud provider. Storage will be required for NFS and MariaDB. No need for persistence for Redis.

### Create Docker Registry

Change the `docker-registry.yaml` as per your configuration and install. Remember to change the secrets and auth data.

```shell
kubectl apply -f docker-registry.yaml
```

### Install ERPNext Feature Board

Change the `efb/values.yaml`, change the registry from `registry.example.com` to your private registry setup in previous step. Also change values for `createSite` and `ingress` as per your configuration.

Install the helm chart with `values.yaml`

```shell
helm install efb -n efb frappe/erpnext -f efb/efb-values.yaml
```

Add additional RBAC for efb to operate cluster.

```shell
kubectl apply -f rbac.yaml
```

### Site Config Keys

Enter the erpnext-python pod and add the following to `site_config.json`

- `container_registry`: Set it to the private registry
- `db_root_password`: Set it to MariaDB superuser password
- `domain_name`: Set it to the base domain name of the review platform.
- `wildcard_tls_secret`: Set it to the secret name where wildcard certificate is stored by cert-manager


text:
# Cluster: src

This folder contains:
* the `dev` folder, which contains all crystals currently in development
* the `main` folder, which contains all crystals to be loaded by default
* `bot.rb`, the main program which loads all the dependencies and crystals as desired
* `crystal_template.erb`, an ERB template used to generate new crystals through the Rake `:generate` task

Ensure that the bundler gem is installed!

repository: hecksalmonids/cluster

repo_name: hecksalmonids/cluster


text:
---
uid: community-remove-tenants
---

# Remove a tenant from a community

Use this procedure to remove a tenant from a community. This action might be necessary if a business relationship changes or if the tenant's organization experiences a security breach.

## Prerequisites

[!include[prereq-administrative-tenant](includes/prereq-administrative-tenant.md)]

## To remove a tenant from a community

To remove a tenant from a community:

1. In the left pane, select **Data Management** > **Communities**.

1. Select the community you want to modify and choose **Community Details**.

1. On the `Community Details` page, select the **Tenants** tab.

1. Select the tenant you want to remove from the community.

1. On the `Tenant Details` pane, select **Remove Tenant**. When prompted for confirmation, select **Remove Tenant** again.

[!include[leave community](../_includes/leave-community.md)]

repository: osisoft/OCS-Docs

gha_language: JavaScript

repo_name: osisoft/OCS-Docs


text:
# @atlaskit/atlassian-navigation

## 0.8.4

### Patch Changes

- [patch][6c94b91976](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6c94b91976):

  Fixes avatar skeleton size.- [patch][64aefb016d](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/64aefb016d):

  Fixes overflow menu popup placement.

## 0.8.3

### Patch Changes

- [patch][666ecab6c9](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/666ecab6c9):

  Improve styles for Atlassian Navigation when SSRd

## 0.8.2

### Patch Changes

- [patch][9af7977678](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/9af7977678):

  Fixing visual tweaks for top nav and menu spacing

## 0.8.1

### Patch Changes

- [patch][65e4e8a5ec](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/65e4e8a5ec):

  Removing left margin for ProductHome when there's no Switcher before it.

## 0.8.0

### Minor Changes

- [minor][df31cc4fb4](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/df31cc4fb4):

  Changed the ProductHome theme to remove all the button styles. Instead us the PrimaryButton styles.

### Patch Changes

- Updated dependencies [308708081a](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/308708081a):
  -<EMAIL_ADDRESS>
## 0.7.1

### Patch Changes

- [patch][72ceb0c548](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/72ceb0c548):

  Fixes Skeleton for atlassian navigation, which had broken earlier due to the ProductHome re-write

## 0.7.0

### Minor Changes

- [minor][63b9f324df](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/63b9f324df):

  Change the way ProductHome is rendered

## 0.6.7

### Patch Changes

- [patch][38a300c7e0](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/38a300c7e0):

  Misc UI changes- Updated dependencies [d0415ae306](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/d0415ae306):

  -<EMAIL_ADDRESS>
## 0.6.6

### Patch Changes

- [patch][c86f02bcb3](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/c86f02bcb3):

  Added selected state to more menu

## 0.6.5

### Patch Changes

- [patch][e419c3c01f](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/e419c3c01f):

  Update color of skeleton in atlassian-navigation

## 0.6.4

### Patch Changes

- [patch][1ef7f6bba9](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/1ef7f6bba9):

  Fixed nav height

## 0.6.3

### Patch Changes

- [patch][8e8366be2c](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/8e8366be2c):

      Update IconButton types from string to React.ReactNode.

## 0.6.2

### Patch Changes

- [patch][02d05ff668](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/02d05ff668):

  - Fix types for the tooltip prop to allow React components.
  - Introduce `buttonTooltip` and `iconButtonTooltip` to configure tooltip for create button.

## 0.6.1

### Patch Changes

- [patch][042a5d87ea](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/042a5d87ea):

  Reduced unnecessary deps for navigation, and added temp \_itemTheme export to style dropdown-menu items

## 0.6.0

### Minor Changes

- [minor][355e7ca2ea](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/355e7ca2ea):

  Breaking changes from previous version:

  - Rename siteName to siteTitle to match what it is called in the products
  - Rename isSelected prop to isHighlighted to avoid confusion with the CSS states of the button, which is also exposed as a prop to Button

  Other visual changes:

  - Primary buttons in the nav with dropdowns stay highlighted when the drop down is open.
  - Fix active state in FF
  - Gradients for Atlassian products works correctly

## 0.5.1

### Patch Changes

- [patch][5eb3d1fc75](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/5eb3d1fc75):

  Removed spinner from the notifications package (handled by the iframe content instead)

## 0.5.0

### Minor Changes

- [minor][48640192dc](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/48640192dc):

  Adds support for white nav. Repositions how the components are displayed. Changes to the theming API to support white nav. Add support for showing site name

## 0.4.9

- Updated dependencies [6e0bcc75ac](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6e0bcc75ac):
  -<EMAIL_ADDRESS>
## 0.4.8

### Patch Changes

- [patch][35d2229b2a](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/35d2229b2a):

  Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.

## 0.4.7

### Patch Changes

- [patch][a2d0043716](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/a2d0043716):

  Updated version of analytics-next to fix potential incompatibilities with TS 3.6

## 0.4.6

### Patch Changes

- [patch][fcfd4db9c0](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/fcfd4db9c0):

  Fixing focus styles for IconButtons

## 0.4.5

### Patch Changes

- [patch][fda9024074](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/fda9024074):

  Add a fully instrumented example of atlassian-navigation using @atlaskit/analytics-next

## 0.4.4

### Patch Changes

- [patch][c24724add6](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/c24724add6):

  Update entry points and exports

## 0.4.3

### Patch Changes

- [patch][6a82fd06ab](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a82fd06ab):

  Render tooltip only when supplied, and fix button focus background color

## 0.4.2

### Patch Changes

- [patch][c810632671](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/c810632671):

  Update theme generation

## 0.4.1

### Patch Changes

- [patch][f7eb0a4886](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/f7eb0a4886):

  Ensuring new horizontal nav allows for scrollbar width. Using 'vw' units prevents this.

## 0.4.0

### Minor Changes

- [minor][c5939cb73d](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/c5939cb73d):

  Integrate popup component

## 0.3.2

### Patch Changes

- [patch][9a59c6e93b](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/9a59c6e93b):

  Fix badge and primary items container styles

## 0.3.1

### Patch Changes

- [patch][197aa4ed2c](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/197aa4ed2c):

  Use context hooks in favour of emotion-theming

## 0.3.0

### Minor Changes

- [minor][382273ee49](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/382273ee49):

  Add more behaviour

## 0.2.2

### Patch Changes

- [patch][13f8980fb2](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/13f8980fb2):

  Use emotion object style

## 0.2.1

- Updated dependencies [8d0f37c23e](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/8d0f37c23e):
  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>
## 0.2.0

### Minor Changes

- [minor][187b3147bd](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/187b3147bd):

  Add theming support

## 0.1.3

- Updated dependencies [6410edd029](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6410edd029):
  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>
## 0.1.2

### Patch Changes

- [patch][8e692b02f5](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/8e692b02f5):

  Add `AppNavigationSkeleton` as a named export.

## 0.1.1

### Patch Changes

- [patch][f0980913df](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/f0980913df):

  Add missing dependencies to package.json

repository: darshgun/atlaskit

repo_name: darshgun/atlaskit


text:
---
title: How do I reset my password?
importance: 3
---

### How do I reset the password for my Koding account?
To reset your password, head over to [Account Settings](https://koding.com/Account/Profile). The password change
field is located at the bottom of the Profile tab.

Once you input the new password, the system will prompt you for the current password before making the change. Once
your password is verified, the password will be changed and you will also receive an email notification letting you
know that your password has been updated.

### How do I reset my password if I login using GitHub / Twitter / Facebook / Google+ etc.?
If you are logging into Koding using Twitter, Github, Facebook, Google+, etc. then you were not required to set up
a password when you first created your account. In a sitution such as this, follow the steps below to set up your
password:
1. Log out from koding.com
2. Head over to the [password recovery](https://koding.com/Recover) page
3. Enter your email address and the system will send you an email with the link to reset/set your password

> type:tip
> Even if you set up a password using the steps above, you can still log in using GitHub, Twitter, Facebook,
> Google+, etc. or you can use the new password to log in. Both will work.

repository: WebDevelopmentStudioWebAristan/kdlearn

gha_language: CSS

repo_name: WebDevelopmentStudioWebAristan/kdlearn


text:
## Prerequisites
sqlite3
python2.7 (or 3 with corrections to default packages)

Run `pip install -r requirements.txt` to get dependencies.

Tested in OSX and arm linux (debian wheezy)

## How to run

```
python setup.py develop

# Set up the database
python quippy_wat/scripts/initializedb.py development.ini

pserve development.ini

# go to http://localhost:6543/quips
```

The root level of the url is not used.

repository: denmojo/potential-dollop

repo_name: denmojo/potential-dollop


text:
Openstack *swift* client API with ES7 async/await design.

[![Build Status](https://github.com/131/swift/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/131/swift/actions/workflows/test.yml)
[![NPM Version](https://img.shields.io/npm/v/swift.svg?style=flat)](https://www.npmjs.org/package/swift)
[![Coverage Status](https://img.shields.io/coveralls/131/swift.svg?style=flat)](https://coveralls.io/r/131/swift?branch=master)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
[![Code style](https://img.shields.io/badge/code%2fstyle-ivs-green.svg)](https://www.npmjs.com/package/eslint-plugin-ivs)

# Installation

```bash
$ npm install swift
```

# API/services (auth3)
Auth3 API will login to your openstack and use a X-Auth-Token in all operations.
Make sure to renew (setInterval) the auth token periodicaly.

## credentials
```js
"use strict";

module.exports = {
    authUrl : "https://auth.cloud.ovh.net/v3", // default
    username : "OpenstackUsername", // required
    password : "OpenstackPassword", // required
    tenantId : "OpenstackProjectId", // one of tenantId or tenantName is required
    tenantName : "OpenstackProjectName", // one of tenantId or tenantName is required
    region: "WAW", // default "GRA3"
};

```

## object-store
```js
"use strict";

const fs      = require('fs');
const Context = require('swift/context');
const storage = require('swift/storage');

const pipe    = require('nyks/stream/pipe');
const creds   = require('./credentials');

class foo {
  async run(){
    // init token

    let container = 'mediaprivate';

    var ctx = await Context.build(creds);

    var files = await storage.toggleMode(ctx, container, ".r:*,.rlistings");
    var headers = await storage.showContainer(ctx, container);

    var remote = await storage.putFile(ctx, 'boucs.jpg', container, 'bouc.jpg');
    var local = fs.createWriteStream('tmp.jpg');

    var remote = storage.download(ctx, container, 'bouc.jpg');

    await pipe(remote, local);

    var remote = await storage.deleteFile(ctx, container, 'bouc.jpg');

    var files = await storage.getFileList(ctx, container);
    console.log({files, remote});
  }
}

module.exports = foo;
```

# API/services (meta-temp-url-key)
Using a container meta-temp key, you can upload, retrieve or delete specific files in your container.
On a CAS designed container, this should be considered as a best practice against a full container access.

## object-store
```js
"use strict";

const fs      = require('fs');
const Context = require('swift/context');
const storage = require('swift/storage');

const pipe    = require('nyks/stream/pipe');
const creds   = {
 "containers" : {

    "mediaprivate" : {
        "endpoint"     : "https://someopenstackswifthost/v1/AUTH_PROJECTID/mediaprivate",
        "temp-url-key" : "somesecret",
    }
 }

};

class foo {
  async run(){

    let container = 'mediaprivate';

    // does not init token, as no username is provided
    var ctx = await Context.build(creds);

    //please note that container level API won't work
    //var files = await storage.toggleMode(ctx, container, ".r:*,.rlistings");
    //var headers = await storage.showContainer(ctx, container);

    var remote = await storage.putFile(ctx, 'boucs.jpg', container, 'bouc.jpg');
    var local = fs.createWriteStream('tmp.jpg');

      //download through tempURL
    var remote = storage.download(ctx, container, 'bouc.jpg');

    await pipe(remote, local);

    var remote = await storage.deleteFile(ctx, container, 'bouc.jpg');

    var files = await storage.getFileList(ctx, container);
    console.log({files, remote});
  }
}

module.exports = foo;
```

# Credits
* [131](https://github.com/131)

gha_license_id: NOASSERTION


text:
---
title: Events
page_title: Events - RadWebCam
description: RadWebCam offers several events indicating errors and taking snapshots.
slug: webcam-events
tags: webcam
published: True
position: 4
---

# Events

**RadWebCam** exposes the following events, specific for the control:

## SnapshotTaken

The **SnapshotTaken** event fires when the "Take snapshot" button is pressed or when you call the **TakeSnapshot** method of **RadWebCam**.

The purpose of the event is to notify you that a snapshot has been taken and you need to take action, like saving it to a file.

The event arguments are of type **SnapshotTakenEventArgs** which exposes a **Snapshot** property (of type **Image**).

{{source=..\SamplesCS\WebCam\WebCamGettingStarted.cs region=Snapshot}}
{{source=..\SamplesVB\WebCam\WebCamGettingStarted.vb region=Snapshot}}

````C#

        private void RadWebCam1_SnapshotTaken(object sender, SnapshotTakenEventArgs e)
        {
            Image snapshot = e.Snapshot;
            // here you save the source to a file, in memory, or to show it in the UI
        }

````
````VB.NET

    Private Sub RadWebCam1_SnapshotTaken(ByVal sender As Object, ByVal e As SnapshotTakenEventArgs)
        Dim snapshot As System.Drawing.Image = e.Snapshot
    End Sub

````

{{endregion}}

## CameraError

The **CameraError** event fires when one of the expected camera errors appears.

The event can be used to notify you about the corresponding error, or to replace the error message shown in the control.

The event arguments are of type **CameraErrorEventArgs** and they expose an **Error** property that contains information about the error. The **Error** property is of type **ErrorInfo** which gives you access to the message and state of the error via the **Message** and **ErrorState** properties.

{{source=..\SamplesCS\WebCam\WebCamGettingStarted.cs region=Errors}}
{{source=..\SamplesVB\WebCam\WebCamGettingStarted.vb region=Errors}}

````C#

        private void RadWebCam1_CameraError(object sender, CameraErrorEventArgs e)
        {
            if (e.Error.ErrorState == CameraErrorState.NoCamera)
            {
                e.Error.Message = "Cannot detect a camera device.";
            }
        }

````
````VB.NET

    Private Sub RadWebCam1_CameraError(ByVal sender As Object, ByVal e As CameraErrorEventArgs)
        If e.[Error].ErrorState = CameraErrorState.NoCamera Then
            e.[Error].Message = "Cannot detect a camera device."
        End If
    End Sub

````

{{endregion}}

>caption Customized error message

![WinForms RadWebcam Customized error message](images/webcam-events001.png)

## See Also
* [Structure]({%slug webcam-structure%})
* [Design Time]({%slug webcam-design-time%})
* [Overview]({%slug webcam-overview%})

repository: telerik/winforms-docs

repo_name: telerik/winforms-docs


text:
* Tests require `bash` and [`expect`](http://expect.sourceforge.net/) to run.

* Tests cover package *creation*, but do not exercise the Makefile tasks
  once a package has been created - that would require a lot more effort.

* For testing package creation, a *static* settings file that uses feature
  defaults is currently used, which means that off-by-default features such as
  enabling man-page creation (setting `vMAN_ON`) are not exercised.


text:
Single node training: use `cifar_experiment.py`. For example:
```
python cifar_experiment.py with model=LeNet optimizer=SGD lr_decay=True weight_decay=True
```

Distributed training: we use Ray for CIFAR10 experiments. Instructions are in the README of the
`../learning_transforms` directory.

We modify [fastAI code](https://github.com/fastai/imagenet-fast/tree/master/imagenet_nv) for the ImageNet experiments. To run:
```
python -m multiproc imagenet_experiment.py --lr 0.4 --epochs 45 --small [DIR FOR IMAGENET DATA]
```

repository: bytesnake/butterfly

repo_name: bytesnake/butterfly


text:
# Cross-Domain AJAX for IE8 and IE9

This fork updates the `XDomainRequest` transport to do a little bit extra.

The request will:
- Send non-GET or POST methods by converting them into a POST and adding the true method in the "_method" parameter
- Copy custom headers (ones starting with X-) as parameters
- Append parameters to the URL for GET requests


text:
# Performance Testing with JMeter 3
This is the code repository for [Performance Testing with JMeter 3](https://www.packtpub.com/web-development/performance-testing-jmeter-3-third-edition?utm_source=github&utm_medium=repository&utm_campaign=9781787285774), published by [Packt](https://www.packtpub.com/). It contains all the supporting project files necessary to work through the book from start to finish.
## About the Book
A 100% pure Java application designed to load and test measure performance for web application, jMeter extends to improve the functioning of various other static and dynamic resources. If you want to use JMeter for performance testing your software products, this book is a great starting point. You’ll get a great grounding in all the fundamentals and gain a wealth of new skills along the way.
### Instructions and Navigations
All of the codes are organized as per the chapters, each folder has the codes related to that chapter or appendix.
For example:  PerformanceTestingwithJMeter 3_Code\Chapter03

The code will look like the following:
```
{ (parameters) ->returnType in
   // block of code goes here
}
```

Following is the software-hardware list:

| Chapter       | Software required                                 | OS required
| ------------- | -------------                                     | -------------
| 01-08         | JMeter 3.2 or higher and JRE 1.8 or higher        | Windows XP (and up) or Any Unix or Linux based system
| 05            | Grafana 4 or higher and InfluxDB 1.2.4 or higher
| 06            | Vagrant 1.9 or higher and VirtualBox 5.1 or higher

## Related Products

* [JMeter 3.0 Advanced [Video]](https://www.packtpub.com/networking-and-servers/jmeter-30-advanced-video?utm_source=github&utm_medium=repository&utm_campaign=9781787289673)

* [Learning JMeter 3.0 [Video]](https://www.packtpub.com/web-development/learning-jmeter-30-video?utm_source=github&utm_medium=repository&utm_campaign=9781787281486)

* [JMeter Cookbook](https://www.packtpub.com/application-development/jmeter-cookbook?utm_source=github&utm_medium=repository&utm_campaign=9781783988280)

### Download a free PDF

 If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

 https://packt.link/free-ebook/9781787285774


text:
[![Input Screenshot](/images/InputScreen.png)]

  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nelio/some)

  As a developer, I am trying to create a project that Write a README File.

  To install necessary dependencies run install.

  The Table of Contents is no.

  This program will be used to no.

  License # not yet.

  The contributers on this project were none.

  To test the program test.

  <img src="https://avatars2.githubusercontent.com/u/53241737?v=4" alt="avatar" style="border-radius: 16px" width="30" />

  If you have any questions about the repo, open an issue or contact [MissElyn](https://api.github.com/users/MissElyn) directly at null.


text:
# Unicode Character

## Description
Declare a character variable and assign it with the symbol that has Unicode code `42` (decimal) using the `\u00XX` syntax, and then print it.

_Hint: first, use the Windows Calculator to find the hexadecimal representation of `42`. The output should be `*`._

path: /C# Fundamentals/DataTypesAndVariables/04. Unicode Character/README.md


text:
ember-mocha
==============================================================================

[![Latest NPM release][npm-badge]][npm-badge-url]
[![TravisCI Build Status][travis-badge]][travis-badge-url]

[npm-badge]: https://img.shields.io/npm/v/ember-mocha.svg
[npm-badge-url]: https://www.npmjs.com/package/ember-mocha
[travis-badge]: https://img.shields.io/travis/emberjs/ember-mocha/master.svg
[travis-badge-url]: https://travis-ci.org/emberjs/ember-mocha

ember-mocha simplifies unit testing of Ember applications with
[Mocha](https://mochajs.org/) by providing Mocha-specific wrappers around the
helpers contained in
[ember-test-helpers](https://github.com/switchfly/ember-test-helpers).

*Upgrading from an earlier version? Have a look at our
[Upgrade Guide](#upgrading) below.*

Installation
------------------------------------------------------------------------------

### Installation with Ember CLI

In order to use Ember Mocha with [Ember CLI](http://www.ember-cli.com/),
please follow the instructions for
[ember-cli-mocha](https://github.com/switchfly/ember-cli-mocha).

### Standalone Installation

Ember Mocha can also be installed with bower and used directly in any Ember
project:

```sh
$ bower install ember-mocha
```

You can then choose to include the global (`ember-mocha.js`) or AMD
(`ember-mocha.amd.js`) build when running your tests.

Usage
------------------------------------------------------------------------------

### Setting the Resolver

You'll typically want to set a single resolver for your test suite:

```javascript
import resolver from './helpers/resolver';
import { setResolver } from 'ember-mocha';

setResolver(resolver);
```

If you want to use multiple resolvers in your test suite, you can also
call `setResolver` in the `beforeSetup` callback of your test modules.

### Setup Tests

The `setupTest` function can be used to setup a unit test for any kind
of "module/unit" of your application that can be looked up in a container.

For example, the following is a unit test for the `SidebarController`:

```javascript
import { describe, it } from 'mocha';
import { setupTest } from 'ember-mocha';

describe('SidebarController', function() {
  setupTest('controller:sidebar', {
    // Specify the other units that are required for this test.
    // needs: ['controller:foo']
  });

  // Replace this with your real tests.
  it('exists', function() {
    var controller = this.subject();
    expect(controller).to.be.ok;
  });
});

```

The subject is specified as `controller:sidebar`, which is the key that will
be used to look up this controller in the isolated container that will be
created for this test.

#### Setup Component Tests

The `setupComponentTest` function is specifically designed to test components
and provides additional `render` and `$` helpers within a test's context.

```javascript
import { describe, it } from 'mocha';
import { setupComponentTest } from 'ember-mocha';

describe('GravatarImageComponent', function() {
  setupComponentTest('gravatar-image', {
    // specify the other units that are required for this test
    // needs: ['component:foo', 'helper:bar']
  });

  it('renders', function() {
    // creates the component instance
    var component = this.subject();
    expect(component._state).to.equal('preRender');

    // renders the component on the page
    this.render();
    expect(component._state).to.equal('inDOM');
  });
});
```

#### Setup Model Tests

The `setupModelTest` function can be used to test Ember Data models and
provides an additional `store` helper within a test's context.

```javascript
import { describe, it } from 'mocha';
import { setupModelTest } from 'ember-mocha';

describe('Contact', function() {
  setupModelTest('contact', {
    // Specify the other units that are required for this test.
    needs: []
  });

  // Replace this with your real tests.
  it('exists', function() {
    var model = this.subject();
    // var store = this.store();
    expect(model).to.be.ok;
  });
});
```

### Acceptance Tests

The `setupAcceptanceTest` function can be used to run acceptance
tests as the name suggests. It will automatically setup an
application instance for you, which is provided at `this.application`.

```javascript
import Ember from 'ember';
import { describe, it } from 'mocha';
import { setupAcceptanceTest } from 'ember-mocha';

var Application = Ember.Application.extend({
  rootElement: '#ember-testing',
});

describe('basic acceptance test', function() {
  setupAcceptanceTest({ Application });

  it('can visit /', function() {
    visit('/');

    andThen(() => {
      expect(currentURL()).to.equal('/');
    });
  });
});
```

#### Using `async/await`

In case your project supports the `async/await` feature of ES2016 you can
simplify the test function to this:

```js
it('can visit /', async function() {
  await visit('/');
  expect(currentURL()).to.equal('/');
});
```

- add the `async` keyword in front of the test `function`
- add `await` in front of all async test helper calls
- remove the `andThen()` wrappers

Upgrading
------------------------------------------------------------------------------

Previous releases promoted the use of `describeModule()`,
`describeComponent()` and `describeModel()` instead of the `describe()`
function of Mocha itself. These functions have been deprecated and replaced
by the `setupTest()` functions mentioned [above](#setup-tests). The following
example will explain how to update your code.

Before:

```js
import {expect} from 'chai';
import {it} from 'mocha';
import {describeModule} from 'ember-mocha';

describeModule(
  'route:subscribers',
  'Unit: Route: subscribers',
  {
    needs: ['service:notifications']
  },
  function() {
    it('exists', function() {
      let route = this.subject();
      expect(route).to.be.ok;
    });
  }
);
```

After:

```js
import {expect} from 'chai';
import {it, describe} from 'mocha';
import {setupTest} from 'ember-mocha';

describe('Unit: Route: subscribers', function() {
  setupTest('route:subscribers', {
    needs: ['service:notifications']
  });

  it('exists', function() {
    let route = this.subject();
    expect(route).to.be.ok;
  });
});
```

- import `it` from `mocha` instead of `ember-mocha`
- replace the `describeModule` import with a `setupTest` import
- add a `setupTest()` call to the test `function` with the second and third
  argument of the `describeModule()` call (module name and options)
- replace the `describeModule()` call with a `describe()` call with the first
  and fourth argument of the `describeModule()` call (description and test
  function)

Instead of refactoring all your files by hand we recommend to use the
[ember-mocha-codemods](https://github.com/Turbo87/ember-mocha-codemods)
to automatically convert your tests:

```
npm install -g jscodeshift
jscodeshift -t https://raw.githubusercontent.com/Turbo87/ember-mocha-codemods/master/import-it-from-mocha.js tests
jscodeshift -t https://raw.githubusercontent.com/Turbo87/ember-mocha-codemods/master/new-testing-api.js tests
```

Contributing
------------------------------------------------------------------------------

Contributions are welcome. Please follow the instructions below to install and
test this library.

### Installation

```sh
npm install
```

### Testing

In order to test in the browser:

```sh
npm start
```

... and then visit [http://localhost:4200/tests](http://localhost:4200/tests).

In order to perform a CI test:

```sh
npm test
```

Copyright and License
------------------------------------------------------------------------------

Copyright 2014 Switchfly

This product includes software developed at
Switchfly (http://www.switchfly.com).

NOTICE: Only our own original work is licensed under the terms of the Apache
License Version 2.0. The licenses of some libraries might impose different
redistribution or general licensing terms than those stated in the Apache
License. Users and redistributors are hereby requested to verify these
conditions and agree upon them.

This repository also contains the `ember-mocha-adapter` originally developed
by [Teddy Zeenny](https://github.com/teddyzeenny) at
https://github.com/teddyzeenny/ember-mocha-adapter/ under the MIT license.

repository: fullstackenviormentss/ember-mocha

repo_name: fullstackenviormentss/ember-mocha