text:
---

title: Rocky RESTful API Version 4.0 (Unofficial)

toc_footers:
  - Sign Up for a Developer Key https://www.rockthevote.org/programs-and-partner-resources/tech-for-civic-engagement/online-voter-registration-platform/

search: true
---

# Overview

Rocky is web application that provides a web user interface that U.S. citizens can use for assistance in preparing a voter registration application document that is complete and correct for all Federal and state specific requirements, and therefore should be accepted in most cases by the election officials to whom the user submits the completed, printed, signed form.

This specification defines an application programming interface that provides exactly the same functions as the Rocky web UI, but intended for a complementary purpose: use by other web applications that have or collect personal info via their own web UI, and which rely on the Rocky backend for data validation, error reporting (particularly for state specific conditions), PDF generation, and data storage. Via this API, Rocky provides a web service to service clients (web applications that use this API to interact with Rocky) that are software operated by Rocky "partner organizations".

Partner organizations also have access to aggregated data and reporting. These are provided by the Rocky Web UI in two ways partner organization staff can use to obtain statistics and summary information: a CSV file download provides aggregated registration data for all the registrations done via that partner; and a summary web page provides statistics about this partnerspecific aggregated data set. This API provides analogous bulk data extraction, with the "partner_registrations" interface that returns the same data as is provided in the web UI CSV file download.

The primary interface is this API is the "registrations" interface, in which callers provide all the personal data needed to create a person’s voter registration application form. Rocky checks the validity of each field, including state specific validation rules. If there are errors, Rocky returns to the caller a set of error reporting on individual fields of personal data. If there are no errors, Rocky returns the URL of a PDF file that contains the validated information, properly formatted as a voter registration request form.

This API also includes an optional interface "state_requirements," used to precheck the user data based on location and date of birth. One intended use of the precheck function is for cases where service clients that already know the user’s location, and perhaps also DOB. In such cases, the service client can find out from Rocky whether a user is ineligible, and if so, not even begin the web UI dialogues with the user to obtain personal information. Location ineligibility is the result of states that do not allow voter registration by mail, or do not accept Rockygenerated forms for some other reason. DOB is used to determine age ineligibility in the user’s state.

When the user is not ineligible based on location or DOB, "state_requirements" returns several kinds of state specific information that the caller could use as part its web UI with the user  for example, the list of political parties that user can select for affiliation, or an indication that certain fields are optional for the state, or not collected by the state.

Finally, the API includes the "partner_registrations" interface to obtain records of past registration transactions. Like the similar UI in the Rocky Partner Portal, access requires authentication, and the records returned are only those pertinent to the authenticated entity.

# Release Notes

## V4

The registration submission endpoint (/api/v4/registrations and /api/v4/gregistrations) will now return a validation error if the email address submitted is in our block list.

### Removed

* `GET /api/v4/registrations`
* `GET /api/v4/gregistrations`

We will also depreacte old versions (v1, v2, v3) of these APIs shortly and return only an error message.

### Added

* `POST /api/v4/registrant_reports` - create report
* `GET /api/v4/registrant_reports/<ID>` - check the status of a particular report and get the download URL
* `GET /api/v4/registrant_reports/<ID>/download` - download the contents of a registrant report in CSV format

## V3

Added these interfaces:

* `GET /api/v3/registrations/pdf_ready`
* `POST /api/v3/registrations/stop_reminders`
* `POST /api/v3/registrations/bulk`

In addition:

* Added parameter for registration to indicate async PDF generation or response blocking PDF generation.
* Added parameter for custom stop_reminders url. Added UID to the response.
* Modified format from `/api/v3/partners/partner.json` to `/api/v3/partners/[partner_id].json`
* Added `application/registration/partner` CSS urls, `finish_iframe_url`, `external_tracking_snippet`, `registration_instructions_url` to `/api/v3/partners/[partner_id].json` response.
* Added new fields to match column names for ActiveResource expectations and general standardization.

Modified request for:

* `GET /api/v3/partners/[partner_id].json`

to allow for all survey question languages.

## V2.2

Added these interfaces:

* `GET /api/v2/partnerpublicprofiles/partner.json`
* `GET /api/v2/gregistrationstates.json`
* `POST /api/v2/gregistration.json`
* `GET /api/v2/gregistrations.json`

Since this addition did not modify the existing API, did not rev from v2 to v3.

# Status Codes

All successful requests have response status code 200.

All requests with errors stemming from invalid or missing inputs have status code 400.

# Response Bodies

All response bodies are JSON dictionaries, with the key/value pairs described

# Interface Definitions

All requests and responses are JSON format. All fields are required unless otherwise specified as optional. All string fields have no length or format restrictions, unless specifically stated. Some field values have specific formats; others have parenthesized notations on field values.

## registrations

Creates a new registrant record using the input parameter data; and also triggers the side effects of a new record, e.g. sending confirmation email.

Fields

Most fields are personal information. A few fields merit additional description:

Field | Description
----- | -----------
partner_id | Uniquely identifies a partner organization that uses Rocky as a service for the organization’s members or community. Each transaction is logged by partner_id and every registrant record is tagged by partner_id.
source_tracking_id | Used to identify the source of a request. For example, in the Web UI, it is typically used as query parameter embedded in a URL in email messages, and identifies the request as part of a particular email campaign. The string value is uninterpreted, however, and may be used for any similar purpose
partner_tracking_id |  Similar to `source_tracking_id`, but intended for use for partner specific purposes, such as implementing a leaderboard, that may require an a tag in addition to the source_tracking_id.
id_number | Typically a state driver’s license number state ID card number, or social security number; length and format vary by state, as does the explanation of what forms of ID are acceptable. However, id_number is not optional. (Note: it is true that some states’ localities will accept NVRA forms without an ID number, for the special case of people with neither state ID or an SSN. However, since we cannot record precisely how each state handles this special case, we require some ID number, to avoid creating registration requests that may be rejected.)
email_address | Required by default, even though it is optional for the paper form; however, we need it to contact the user to send them a link to the PDF we generate for them.
opt_in_email |  Determined by the caller, and simply recorded in the registration record created by the call; the caller can determine whether to always obtain the info from the user, or have a default in the case of no user input. Regardless, the opt_in_email field is required to record true or false for option, regardless of how the caller determined the user’s preference. This field is used to record a user preference for email from RockTheVote.
opt_in_sms | Required in exactly the same way as `opt_in_email`
opt_in_volunteer | Required in exactly the same way as `opt_in_email`
partner_opt_in_email, partner_opt_in_sms, partner_opt_in_volunteer | Used in an analogous way to record user preference for communication with the partner organization.
party |  Optional because it is not required on the form; however, the allowable values are state specific.
callback |  Optional parameter that, if present and not empty, changes the return value from JSON format to jsonp; that is, the JSON return value would be a string J, and if the callback parameter’s value is F, then the return value will be F(J);
custom_stop_reminders_url | Optional URL string that will be used in a link in reminder emails to registrants to cancel any further reminder emails. If the provided URL includes `<UID>`, that string will be replaced by the registrant’s UID. If left blank, the default core system stop_reminders URL will be used.
async | Specifies whether or not the request should return a response immediately (async=false) or wait for a PDF to be generated (async=true)

Other Notes

* Some fields are required in some states, optional in others, and not recorded in others; similarly some fields have permitted values that vary by state. State specific information is provided by other interfaces in this API.
* `pdfurl` is an out parameter that is the URL of a PDF file containing the voter registration application form with the personal information provided in the request.
  * The URL itself is a large number, large enough to make it very difficult for adversaries to guess URLs, for example https://register.rockthevote.org/pdf/456136972787234.pdf
  * One intended use is that the caller embed the URL in a link in dynamically generated HTML that is presented to the user.
  * The URL is returned regardless of whether the PDF is ready for download.

> Example POST request payload (minimum required fields)

```json
{
  "registration": {
    "lang": "en",
    "partner_id": "123456789",
    "send_confirmation_reminder_emails": true,
    "created_at": "01102016 11:22:33",
    "updated_at": "01102016 12:23:56",
    "date_of_birth": "01-01-1990",
    "id_number": "1234",
    "email_address"<EMAIL_ADDRESS>    "first_registration": true,
    "home_zip_code": "01234",
    "us_citizen": true,
    "has_state_license": true,
    "is_eighteen_or_older": true,
    "name_title": "Mrs.",
    "last_name": "Smith",
    "home_address": "123 Main St",
    "home_city": "Big Town",
    "home_state_id": "CA",
    "has_mailing_address": false,
    "race": "White (not Hispanic)",
    "change_of_name": false,
    "change_of_address": false,
    "opt_in_email": true,
    "opt_in_sms": true,
    "opt_in_volunteer": false,
    "partner_opt_in_email": true,
    "partner_opt_in_sms": false,
    "partner_opt_in_volunteer": true"
  }
}
```

Field | Type | Notes
----- | ---- | -----
lang | locale-compatible string | Required. Options: (en/es, etc)
partner_id | string | Required. Series of digits, no specific length
send_confirmation_reminder_emails | boolean | Required
collect_email_address | string | Optional. ‘no’ for false
source_tracking_id | string | Optional |
partner_tracking_id | string | Optional |
short_form | boolean | Optional. Default false
state_ovr_data | string | Optional. Hash, only used for stats and in cases where registrant went through finish with state steps but ended up finishing with rock the vote)
created_at | datetime | Required. ‘mmddyyyy hh:mm:ss’ (for statistics)
updated_at | datetime | Required.  ‘mmddyyyy hh:mm:ss’ (for statistics)
date_of_birth | date | Required. ‘mm-dd-yyyy’
id_number | string | Required. Series of alnum, length and format state specific
email_address | string | Required. RFC syntax
first_registration | boolean | Required |
home_zip_code | string | Required. ‘zzzzz’ ( 5 digit)
us_citizen | boolean | Required
has_state_license | boolean | Required
is_eighteen_or_older | boolean | Required
name_title | string | Required. Must be one of "Mr.", "Mrs.", "Miss", "Ms.", "Sr.", "Sra.", "Srta."
first_name | string | Optional |
middle_name | string | Optional |
last_name | string | Required |
name_suffix | string | Optional. Must be one of "Jr.", "Sr.", "II", "III", "IV"
home_address | string | Required |
home_unit | string | Optional
home_city | string | Required |
home_state_id | string(2) | Required |
has_mailing_address | boolean | Required |
mailing_address | string | Req if `has_mailing_address`
mailing_unit | string | Optional
mailing_city | string | Req if `has_mailing_address` |
mailing_state_id | string(2) | Req if `has_mailing_address` |
mailing_zip_code | string  | Req if `has_mailing_address`
race | string | Required/optional is state specific| Value must be one of "American Indian / Alaskan Native", "Asian / Pacific Islander", "Black (not Hispanic)", "Hispanic", "Multiracial", "White (not Hispanic)", "Other", "Decline to State", "Indio Americano / Nativo de Alaska", "Asiatico / Islas del Pacifico", "Negra (no Hispano)", "Hispano", "Blanca (no Hispano)", "Otra", "Declino comentar"
party | string | Optional. No validation because allowable choices are state specific
phone | string | Optional
phone_type | string | Required if a phone number is provided. Must be one of "Mobile", "Home", "Work", "Other", "Movil", "Casa", "Trabajo", "Otro"
change_of_name | boolean | Required
prev_name_title | string | Optional |
prev_first_name | string | Optional |
prev_middle_name | string | Optional |
prev_last_name | string | Req if `change_of_name` |
prev_name_suffix | string | Optional |
change_of_address | boolean | Required
prev_address | string | Req if `change_of_address` |
prev_unit | string | Optional |
prev_city | string | Req if `change_of_address`
prev_state_id | string(2) | Req if `change_of_address`
prev_zip_code | string | Req if `change_of_address`
opt_in_email | boolean | Required
opt_in_sms | boolean | Required
opt_in_volunteer | boolean | Required
partner_opt_in_email | boolean | Required
partner_opt_in_sms | boolean | Required
partner_opt_in_volunteer | boolean | Required
survey_question_1 | string | Req if `survey_answer_1` is not blank
survey_answer_1 | string | Optional
survey_question_2 | string | Req if `survey_answer_2` is not blank
survey_answer_2 | string | Optional
callback | string | Optional |
custom_stop_reminders_url | string | Optional. URL format
async | boolean | Optional. Default is "true"

### HTTP Request

`POST /api/v4/registrations.json`

Post JSON dictionary of fields nested under `registration`

### Success Response

Key | Value Type | Note
--- | ---------- | -----
pdfurl | string | URL (for the generated PDF)
uid | string | UID string

Errors

#### Validation Error

Key | Value Type | Note
--- | ---------- | -----
field_name | string | Field where error occurred
message | string | Determined by Rocky, for display by caller, in specified lang

#### Syntax Error

Key | Value Type | Note
--- | ---------- | -----
field_name | string | Name of field that is not defined for this request
message | string | Value: "Invalid parameter type"

#### Unsupported language

Key | Value Type
--- | ----------
message | string

#### Survey Question Error

Key | Value Type | Note
--- | ---------- | ------
message | string | Format: 'Question N required when Answer N provided'

## bulk_registrations

Creates 1 or multiple incomplete registrant records. Used for creating data in the core Rocky system for statistics, but does not cause emails to be sent or PDFs to be created. Validations are not performed.

Fields

[Registration interface definition fields](#registration-fields), plus these fields (all required):

Field | Type | Notes
----- | ---- | -----
status | string | Indicates a step number that the user stopped at
ineligible_non_participating_state | boolean | Whether the registrant is ineligible due to the state not participating
ineligible_age | boolean | Whether the registrant is ineligible due to being too young
ineligible_non_citizen | boolean | Whether the registrant is ineligible due to not being a US citizen
under_18_ok | boolean | Whether the registrant decided to proceed despite being under 18
remind_when_18 | boolean | Whether the registrant requested a reminder when 18
age | integer | Age of registrant
javascript_disabled | boolean | Whether the user had javascript disabled
using_state_online_registration | boolean | Whether the user selected to use the state online reg system
finish_with_state | boolean  | Whether the user is in a "finish_with_state" flow

### HTTP Request

`POST /api/v4/registrations/bulk`

Body is JSON list of `registration` dictionaries combining [bulk](#bulk-registration-fields) and [normal](#registration-fields) registration fields

```json
{
  "registrations": [
    {
      "status": "1",
      "ineligible_non_participating_state": false,
      "ineligible_age": false,
      "ineligible_non_citizen": false,
      "under_18_ok": false,
      "remind_when_18": false,
      "age": 20,
      "javascript_disabled": false,
      "using_state_online_registration": false,
      "finish_with_state": false,
      "lang": "en",
      "partner_id": "123456789",
      "send_confirmation_reminder_emails": true,
      "created_at": "01102016 11:22:33",
      "updated_at": "01102016 12:23:56",
      "date_of_birth": "01-01-1990",
      "id_number": "1234",
      "email_address"<EMAIL_ADDRESS>      "first_registration": true,
      "home_zip_code": "01234",
      "us_citizen": true,
      "has_state_license": true,
      "is_eighteen_or_older": true,
      "name_title": "Mrs.",
      "last_name": "Smith",
      "home_address": "123 Main St",
      "home_city": "Big Town",
      "home_state_id": "CA",
      "has_mailing_address": false,
      "race": "White (not Hispanic)",
      "change_of_name": false,
      "change_of_address": false,
      "opt_in_email": true,
      "opt_in_sms": true,
      "opt_in_volunteer": false,
      "partner_opt_in_email": true,
      "partner_opt_in_sms": false,
      "partner_opt_in_volunteer": true
    }
  ]
}
```

### Success

Field | Type | Notes
----- | ---- | -----
abandoned_registrations | integer | Number of records written

### Error Response

If any registrations can't be saved, status code 400 is returned, with a JSON list of responses for each record that is either an empty hash (`{}`) if there are no errors for that user, or a dictionary with `type`, `field_name` and `message` if there is an error

Field | Type | Notes
----- | ---- | -----
type | string | ValidationError, SyntaxError, UnsupportedLanguageError
field_name | string | Field where error occurred
message | string | Determined by Rocky, for display by caller, in specified lang

## gregistrations

Creates a new registrant record using the input parameter data, for the use case where the user was eligible to finish their registration on a government operated state specific web site, chose to be redirected there, and did not return  presumably because they finished registration on the state’s site.

 Differs from registrations only in the following ways:

 * Only the following parameters are required
   * lang
   * gpartner_id
   * send_confirmation_reminder_emails
   * date_of_birth
   * email_address
   * home_zip_code
   * us_citizen
   * name_title
   * last_name
 * If `send_confirmation_reminder_emails` is true, then the emails sent are the the emails that are pertinent to this use case, rather than the standard use case of completing a registration using the Rocky UI
 * The PDF is not generated, and therefore the `async` parameter has no effect
 * Success has no output parameters
 * There is an additional error return code

 ### HTTP Request

 ```json
 {
   "registration": {
     "lang": "en",
     "gpartner_id": "123456789",
     "send_confirmation_reminder_emails": true,
     "date_of_birth": "01-01-1990",
     "email_address"<EMAIL_ADDRESS>     "home_zip_code": "01234",
     "us_citizen": true,
     "name_title": "Mrs.",
     "last_name": "Smith"
   }
 }
 ```

 `POST /api/v4/gregistrations.json`

 Post a JSON object with key `registration` and value of a registration object

 ### Success

 No body

 ### Errors

 #### Unsupported state

 Key | Value Type
 --- | ---------
 message | string

 See [registrations interface definition errors](#registrations-errors) for other return data definitions.

 ## bulk_gregistrations

 Same as gregistrations but expects an array of registrant records and returns the number of records created.

 ### Fields

 [Registration interface definition fields](#registration-fields), plus these fields (all required):

 Field | Type | Notes
 ----- | ---- | -----
 status | string | Indicates a step number that the user stopped at
 created_at | string | UTC datetime format
 updated_at | string | UTC datetime format

 ### HTTP Request

 `POST /api/v4/bulk_gregistrations.json`

 Body is JSON dictionary with a single key, `bulk_gregistrations`, and value as a list of bulk registration dictionaries, as described above.

 ### Success Response

 Body is a dictionary with key `bulk_gregistrations`, and the value is an integer with the number of records written, which should be the number of registrations posted.

 > Success Response

 ```json
 {
   "bulk_gregistrations": "integer (number of records written)"
 }
 ```

 ### Error

 If any registrations have an error, a status code 400 is returned, with a JSON list of responses for each record that is either an empty hash ({}) if there are no errors for that user, or a dictionary with `type`, `field_name` and `message` if there is an error

 > Example object for a user with an error

 ```json
 {
   "type": "string (ValidationError, SyntaxError, UnsupportedLanguageError)",
   "field_name": "string (field where error occurred)",
   "message": "string (determined by Rocky, for display by caller, in specified lang)"
 }
 ```

 ## gregistrationstates

 Returns a list of state for which Rocky current supports per-state integration with states. There are no input parameters. State return data is the 2 letter code for the state, and the URL to use to send registrant data to the state’s web site.

 ### HTTP Request

 `GET /api/v4/gregistrationstates.json`

 ### Response

 Returns status code 200, with both of a dictionary with one key, `states`, which is a list of dictionaries with two keys: `name` which is the 2 letter state code, and `url` which is a string URL.

 > Example response (truncated)

 ```json
 {
   "states": [
     {
       "name": "AZ",
       "url": "https://servicearizona.com/webapp/evoter/selectLanguage"
     },
     {
       "name": "CA",
       "url": "https://covrtest.sos.ca.gov?language=LANGUAGE&t=p&CovrAgencyKey=AGENCY_KEY&PostingAgencyRecordId=TOKEN"
     }
   ]
 }
 ```

 ## state_requirements

Checks state eligibility and provides state specific fields information

Most input fields are personal information; most output fields are indicated as state specific. A few fields merit additional description:

* For input, one of `home_state_id` and `home_zip_code` is required. If both are provided, they must match. Really only one is needed.
* Fields named `<foo>_msg` contain a string with state specific information that explains the state specific situation of `<foo>`, such as what the requirements are for reporting race, or stating party affiliation, or why the state does not allow party affiliation, or what the state’s rules are about ID numbers for voter registration, or for minimum age for filing a voter registration application.
* Fields named `sos_<foo>` refer to the contract information for the office of Secretary of State for the state specified in the `home_state_id` input field
* Invalid state error is for a `home_state_id` input field value that is not a state, e.g. AJ
* Non-participating state error is for a correct state id, but for a state that does not participate in mailin NVRA form registration; the explanatory msg is state specific
* To validate the age, make sure the person is 18+ yo and return localized error message if she’s not
* `no_party_msg` is the name of the last option for party affiliation; in some states it is "none" while in others it is "decline to state" and over time any state can change its preferences
* `requires_party_msg` explains the state’s rules for whether an application must or may include a party affiliation selection
* `callback` is an optional string parameter, exactly as described above

### HTTP Request

`GET /api/v4/state_requirements.json`

Parameter | Type | Notes
--------- | ---- | -----
lang | string | Required. Locale compatible string (en/es, etc)
home_state_id | string | Required. 2-character state abbreviation
home_zip_code | string | Required. ‘zzzzz’ 5 digit zip code
date_of_birth | string | Optional. ‘mm-dd-yyyy’
callback | string | Optional.

### Success response

Key | Value Type
--- | ----
requires_race | boolean
requires_race_msg | string
requires_party | boolean
requires_party_msg | string
no_party | boolean
no_party_msg | string
party_list | list of strings
id_length_min | integer
id_length_max | integer
id_number_msg | string
sos_address | string
sos_phone | string
sos_url | string
sub_18_msg | string

### Errors

#### Invalid state ID

Key | Value Type
--- | ----------
message | string

#### Invalid ZIP code

Key | Value Type
--- | ----------
message | string

#### Incorrect ZIP code ( ZIP does not match state)

Key | Value Type
--- | ----------
message | string

#### Nonparticipating state

Key | Value Type | Notes
--- | ---------- | --------
message | string | State specific

#### Invalid age

Key | Value Type | Notes
--- | ---------- | --------
message | string | State specific

#### Unsupported language

Key | Value Type
--- | ----------
message | string

#### Syntax Error

Key | Value Type | Notes
--- | ---------- | -------
message | string |
field_name | string | Name of field that is not defined for this request

## pdf_ready

For a given registration UID, returns true or false to indicate whether the PDF for that registrant exists.

### HTTP Request

`GET /api/v4/registrations/pdf_read`

Returns status of PDF generation for the given registrant

Parameter | Type | Notes
--------- | ---- | -----
UID | string | Required.
callback | string | Optional.

### Success Response

Key | Value Type
--- | ----
pdf_ready | boolean
UID | string

### Errors

#### Invalid Partner or API key

Key | Value Type
--- | ----------
message | string

#### Not Found UID

Key | Value Type | Notes
--- | ---------- | -----
field_name | string | Value: "UID"
message | string | Value: "Registrant not found"

#### Syntax Error

Key | Value Type | Notes
--- | ---------- | -----
field_name | string | Name of field that is not defined for this request
message | string | Value: "Invalid parameter type"

## stop_reminders

### HTTP Request

`POST /api/v4/registrations/stop_reminders`

For a given registration `UID` sets `reminders_left` to 0 to prevent further reminder emails.

Parameter | Type | Notes
--------- | ---- | -----
partner_id | string | Required. Series of digits, no specific length.
partner_API_key | string | Required. No specific length.
UID | string | Required.
callback | string | Optional.

### Success

```json
{
  "UID": "123123123",
  "first_name": "Jane",
  "last_name": "Smith",
  "email_address"<EMAIL_ADDRESS>  "reminders_stopped": false
}
```

Key | Value Type
----- | ----
UID   | string
first_name | string
last_name | string
email_address | string
reminders_stopped | boolean

### Errors

#### Invalid Partner or API key

Key | Value Type
--- | ---------
message | string

#### Not Found UID

Key | Value Type | Note
--- | --------- |  ----
field_name | string | Value: "UID"
message | string | Value: "Registrant not found"

#### Syntax Error

Key | Value Type | Note
--- | --------- |  ----
field_name | string | Name of field that is not defined for this request
message | string | Value: "Invalid parameter type"

## reports

For a given partner, checks `partner_id` (ID in the "partners" table) and corresponding API key, and starts generation of partner-specific registration records. Partner account was created using Rocky web UI; API key was set then, and can be reset later via admin UI. Optional "email" parameter filters the partner’s registration records, to return only those with an email address that matches the address provided in the parameter. Optional "since" parameter limits returned records to those created after the datetime provided as parameter value; the records include those that were started but not completed, and a noted via the "status" out parameter. The callback parameter is an optional string parameter, exactly as described above.

### HTTP Request

`POST /api/v4/registrant_reports.json`

Returns a status_url to call to check on the report progress. Calls to that URL will return a download_url in the response once the report is complete.

Parameter | Type | Notes
--------- | ---- | -----
partner_id | string | Required, series of digits, no specific length
partner_API_key | string | Required, no specific length
since | string | Optional, UTC datetime format
before | string | Optional, UTC datetime format
email | string | Optional, email name at domain format
callback | string | Optional
report_type | string | Optional. See valid report_type values in table below. Used to indicate an alternate CSV format with added fields.

### Valid report_type Values

Value | Description
----- | -----------
blank | Leave blank for report on the online voter registration tool.
extended | Alternate CSV format for OVR with added fields.
alert_request_report | Pledge to Vote report
abr_report | Absentee Ballot Request report
lookup_report | Voter Status Lookup report
grommet_registrants_report | PA Registration Report (PA App only)
canvassing_shift_report | Canvassing Shift Report (PA App only)
grommet_shift_report | PA Shift Report (Old versions of PA App only)

### "Extended" Report Type Field Definitions

Field | Description
----- | -----------
VR Application Status | This is specific to the PA field app. This field indicates the status of a user’s voter registration application with the state.
VR Application Status Details | This is specific to the PA field app. This field indicates the details/reason for a user’s voter registration application status.
VR Application Status Imported DateTime | This is specific to the PA field app. It indicates when the user's application status was last imported/updated.
Built via API | This field indicates that the user’s registration was created as the result of an API call, rather than a session on Rock the Vote’s default web-based user interface. This includes registrations created via the PA field app & via the nationwide Rock the Vote API.
Pre-Registered | If a user is not old enough to be fully registered (which will be noted under “Ineligible reason”), but is eligible for pre-registration in their state, this field will indicate whether they completed the pre-registration process.
Has State License | This is specific to the PA field app and indicates whether a registrant included a state-issued ID number.
Has SSN | This is specific to the PA field app and indicates whether a registrant included the last 4 digits of their SSN.
VR Application Submission Modifications | This is specific to the PA field app. This field indicates what, if any, modifications were required to submit a user’s voter registration application.
VR Application Submission Errors | This is specific to the PA field app. This field indicates what, if any, errors occurred with a user’s voter registration application.
Submitted Via State API | This field is specific to the PA field app and indicates if the registration has or has not been submitted via the State API.
Submitted Signature to State API | This field is specific to the PA field app and indicates if the registration has or has not been submitted via the State API.
utm_source, utm_medium, utm_campaign, utm_term, utm_content | utm_  source codes that you add to your tool’s URL will be located in these fields.
Other_parameters | Indicates parameters added to your base URL not listed above.
Change of Name | This indicates whether the registrant says they had changed their name since they last registered to vote.
Prev Name Title | Prev First Name, Prev Middle Name, Prev Last Name, Prev Name Suffix: These fields provide the previous name of the registrant as it was inputted into the OVR tool.
Registration Source | This is specific to the PA field app.
Registration Medium | This is specific to the PA field app.
Shift ID | This is specific to the PA field app.
Blocks Shift ID | This is specific to the PA field app.
Over 18 Affirmed | This is specific to the PA field app.
Preferred Language | This is specific to the PA field app.
State Flow Status | This is specific to the PA field app.
State API Transaction ID | This is specific to the PA field app.

### Success Response

JSON dictionary with details about the report generation

Key | Value Type | Notes
--- | ---------- | -----
status | string | "queued", or other current report status
report_id | integer | e.g. 17
record_count | integer | e.g. 2314 total number of records being generated by this report
current_index | integer | e.g. 100 current index of being processed by the report
status_url | string | e.g. "https://register.rockthevote.com/api/v4/registrant_reports/17"
download_url | string | may be empty if not complete

## report status

For a given partner, checks `partner_id` (ID in the "partners" table) and corresponding API key, and returns status of previously queued report.

### HTTP Request

`GET /api/v4/registrant_reports/<ID>.json`

Returns report record with ID and URL for checking report status

Parameter | Type | Notes
--------- | ---- | -----
partner_id | string | Required, series of digits, no specific length
partner_API_key | string | Required, no specific length
callback | string | Optional

### Success Response

JSON dictionary with details about the report generation

Key | Value Type | Notes
--- | ---------- | -----
status | string | "queued", or other current report status
report_id | integer | e.g. 17
record_count | integer | e.g. 2314 total number of records being generated by this report
current_index | integer | e.g. 100 current index of being processed by the report
status_url | string | e.g. "https://register.rockthevote.com/api/v4/registrant_reports/17"
download_url | string | may be empty if not complete. e.g. "https://register.rockthevote.com/api/v4/registrant_reports/17/download"

### Error Responses

#### Invalid Partner or API key

Key | Value Type
--- | ----------
message | string

#### Syntax Error

Key | Value Type | Note
--- | ---------- | -----
field_name | string | Name of field that is not defined for this request
message | string | Value: "Invalid parameter type"

## partners

Creates a new partner, very similar to partner creation in the Web UI of the partner portal.

### HTTP Request

`POST /api/v4/partners.json`

Post JSON dictionary of fields nested under `partner`

Parameter | Type | Notes
--------- | ---- | -----
org_name | string
org_URL | string | URL format
org_privacy_url | string  | Optional
contact_name | string
contact_email | string | Email address format
contact_phone | string | 'nnnnnnnnnn' format
contact_address | string
contact_city | string
contact_state | string |  2 letter state code)
contact_ZIP | string | 5 digits, 'nnnnn'
logo_image_URL | string | URL format)
survey_question_1_[locale] | string | Where [locale] may be any of the enabled locale codes
survey_question_2_[locale] | string | Where [locale] may be any of the enabled locale codes
partner_ask_volunteer | boolean

### Success Response

Key | Value Type | Notes
--- | ---------- | -----
partner_id | string | Series of digits

### Error Responses

#### Syntax Error

Key | Value Type | Notes
--- | ---------- | -----
field_name | string | Name of field that is not defined for this request
message | string | Value: "Invalid parameter type"

### partner

For a given partner, checks partner_id (ID in the "partners" table) and corresponding API key, and returns partnerspecific profile records. Partner profile was created using Rocky web UI or API call POST partners. The callback parameter is an optional string parameter, exactly as described above.

### HTTP Request

`GET /api/v4/partners/[partner_id].json`

Parameter | Type | Notes
--------- | ---- | -----
partner_id | string | Required. Series of digits, no specific length.
callback | string | Optional.

### Success Response

Key | Value Type | Notes
--- | ---------- | -----
org_name | string
org_URL | string | URL format
org_privacy_url | string | URL format
contact_name | string
contact_email | string | Email address format
contact_phone | string  | nnnnnnnnnn format
contact_address | string
contact_city | string
contact_state | string |  2 letter state code
contact_ZIP | string | nnnnn format
logo_image_URL | string | URL format
application_css_URL | string | URL format
registration_css_URL | string | URL format
parnter_css_URL | string | URL format
finish_iframe_url | string | URL format
survey_question_1_[locale] | string | Where [locale] may be any enabled locale
survey_question_2_[locale] | string | Where [locale] may be any enabled locale
whitelabeled | boolean
rtv_email_opt_in | boolean
partner_email_opt_in | boolean
rtv_sms_opt_in | boolean
partner_sms_opt_in | boolean
rtv_ask_email_opt_in | boolean
partner_ask_email_opt_in | boolean
rtv_ask_sms_opt_in | boolean
partner_ask_sms_opt_in | boolean
ask_for_volunteers | boolean
partner_ask_for_volunteers | boolean
external_tracking_snippet | string
registration_instructions_url | string | URL format
application_css_present | boolean
application_css_url | string | URL format
registration_css_present | boolean
registration_css_url | string | URL format
partner_css_present | boolean
partner_css_url | string | URL format
primary | boolean

### Error Response

#### Invalid Partner or API key

Key | Value Type
--- | ----------
message | string

## partner

For a given partner, checks partner_id (ID in the "partners" table) and corresponding API key, without an API key, and returns the portion of partnerspecific profile records that are not private. Intended for unauthenticated access to public information.

Partner profile was created using Rocky web UI or API call POST partners. The callback parameter is an optional string parameter, exactly as described above.

In addition to the return field names above, there are return fields that are aliases for the above, provided for internal use with Rocky. Though present in return data, the alias fields can be ignored by most callers. They are:

Field | Alias
----- | -----
organization | org_name
url | org_URL
privacy_url | org_privacy_url
name | contact_name
email | contact_email
phone | contact_phone
address | contact_address
city | contact_city
state_abbrev | contact_state
zip_code | contact_ZIP
rtv_email_opt_in | rtv_ask_email_opt_in
partner_email_opt_in | partner_ask_email_opt_in
rtv_sms_opt_in | rtv_ask_email_opt_in
partner_sms_opt_in | partner_ask_sms_opt_in

### HTTP Request

`GET /api/v4/partnerpublicprofiles/[partner_id].json`

Parameter | Type | Notes
--------- | ---- | -----
partner_id | string | Required. Series of digits, no specific length.
callback | string | Optional.

### Success Response

Key | Value Type | Notes
--- | ---------- | -----
org_name | string | URL format
org_URL | string
org_privacy_url | string
logo_image_URL | string | URL format
survey_question_1 | {hash}
survey_question_2 | {hash}
whitelabeled | boolean
rtv_ask_email_opt_in | boolean
partner_ask_email_opt_in | boolean
rtv_ask_sms_opt_in | boolean
partner_ask_sms_opt_in | boolean
rtv_ask_volunteer | boolean
partner_ask_volunteer | boolean

In addition to the return field names above, there are return fields that are aliases for the above, provided for internal use with Rocky. Though present in return data, the alias fields can be ignored by most callers. They are:

Field | Alias
----- | -----
organization | org_name
url | org_URL
privacy_url | org_privacy_url
rtv_email_opt_in | rtv_ask_email_opt_in
partner_email_opt_in | partner_ask_email_opt_in
rtv_sms_opt_in | rtv_ask_email_opt_in
partner_sms_opt_in | partner_ask_sms_opt_in

### Error Response

#### Invalid Partner or API key

Key | Value Type
--- | ----------
message | string

gha_license_id: NOASSERTION


text:
---
layout: post
title: 5 ways to make your database better - by Tim Abell
description: Step up your database game with these top tips.
category: blog
---

## [1] Documentation

Shoot me okay, but maintenance of software is [insert large number here] times
the cost of creation, especially with relational databases. You are a pro
working for a client, you owe it to them to make it possible for them to have
future staff (and yourself!) be as effective as possible. You put all that
effort into figuring out why a column should exist and have that name, now
share that knowledge before you move on to the next greenfield project

* [Redgate SqlDoc](https://www.red-gate.com/products/sql-development/sql-doc/)
	is great for rapidly adding missing documentation.
* [SchemaSpy](http://schemaspy.org/) generates static html sites making it easy
	to see what documentation there is (or isn't!) and share it with the team.
	It's free & open source (although a bit fiddly to set up and run). It has
	particularly nice clickable diagrams.
* [Dataedo generates static html sites &
	pdfs](https://dataedo.com/tutorials/getting-started/generating-database-documentation)
	as well, and is commercial and slicker than SchemaSpy
* This [gist for source-controlling ms_description
	attributes](https://gist.github.com/timabell/6fbd85431925b5724d2f) gives you
	a two-way source-controllable / editable list of your documentation in SQL
	Server
* [SQL Schema Explorer](http://schemaexplorer.io/) generates dynamic html sites
	making it easy to see what documentation there is and share it with the team.

## [2] Refactor your database

Migrations are a thing now. Use them.  Stop leaving landmines for future people - misleading
names, bad structures etc. Use the redgate tools (ready-roll etc), use your
orm’s tools (EF migrations, active record migrations). Yes you have to deal
with data, but it’s the exception not the rule that it’s going to take hours to
run because of data volumes.

* [Redgate's SQL Change
	Automation](https://www.red-gate.com/products/sql-development/sql-change-automation/)
	(formerly
	[ReadyRoll](https://www.red-gate.com/blog/working/from-release-engineer-to-readyroll-founder-and-redgate-product-manager))
	is an opinionated tool for creating and running database migrations, it even
	generates Database Administrator (DBA) friendly pure-sql deployment packages.
	Very impressive!
* [Redgate's SQL Source Control supports
	migrations](https://documentation.red-gate.com/soc6/common-tasks/working-with-migration-scripts)
* I've been using [EF Core
	migrations](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/)
	recently and they work well. There are equivalents for all the major
	platforms.

## [3] Enforce data integrity

Does your app fall over if the data is bad? Databases have many powerful ways
of enforcing the rules your code relies on: nullability, foreign keys, [check
constraints](https://www.w3schools.com/SQL/sql_check.asp), unique constraints.
Stop the bad data before it even gets in there. Now your database is enforcing
these rules your code doesn't have to handle violations of them when reading
data because they'll never happen

## [4] Integration testing

You have an ORM. Great. You have unit tests. Great. But where the rubber hits
the road and your code sends SQL to a real database it breaks at runtime more
often than you’d like to admit because the generated sql didn't jive with the
real database structure or data in some obscure fashion.
I suggest automating from the layer below the UI to keep the tests fast. There
are many techniques for keeping the tests quick but still realistic: do end to
end smoke tests instead of individual pieces, use an in-memory database, use
[database
snapshots](https://gist.github.com/timabell/3164291#file-create-snapshot-sql)
or the fancy [sql-clone](https://www.red-gate.com/products/dba/sql-clone/index)
tool from Redgate to make creation / rollback virtually instant. Can you pull
realistic (anonymised) data from production? Better still, now you’ll catch a
whole new class of bugs before they hit prod.

* Here's [a guide from Redgate detailing one way to do continuous integration
	testing with
	databases](https://www.red-gate.com/simple-talk/sql/sql-tools/continuous-integration-for-databases-using-red-gate-tools/)

## [5] Make it visible

Are the only people that can see the database structures the coders and DBAs?
do the business owners, support people, Quality Assurance (QA) people find it a
mystery? You should be just as proud of your database as you are of your code,
by shining a light on this dark corner of your digital estate you can make it
as good as it should be, not an embarrassing backwater. By sharing the database
in an accessible form to the non-coders in your team you can help them be more
effective in their jobs.

* The html generated by [SchemaSpy](http://schemaspy.org/) can be shared on any
	webserver to let your whole team see your schema structures
* [SQL Schema Explorer](http://schemaexplorer.io/) can be run on your network
	or cloud hosting ([schema explorer is
	dockerized](https://hub.docker.com/r/timabell/sdv/)!) to give your team easy
	access to both the schema and data within the database.

Combine these tools with a continuous integration system and you have easy
access to the bleeding edge of your databases development.

## Take action now!

1.Make a start on at least one of these improvements today.
2.Share this article with your team - get everyone motivated to improve.
3.Share this article on social media - help spread the word that our
	databases deserve better!

I hope this has inspired you to make an improvement in the often unloved
underbelly of your applications.

What do you think needs improving in the way we deal with databases? What
change did you make because of this? [Let me
know!](mailto:articles@timwise.co.uk?subject=making better databases)

Originally posted at
[http://schemaexplorer.io/blog/2018/07/10/5-ways-to-make-your-database-better.html](http://schemaexplorer.io/blog/2018/07/10/5-ways-to-make-your-database-better.html)

license: MIT

branch_name: refs/heads/main

extension: md

gha_language: SCSS

license_type: permissive


text:
---
title: ChildrenCreated
page_title: ChildrenCreated - RadTimePicker
description: Check our Web Forms article about ChildrenCreated.
slug: timepicker/server-side-programming/events/childrencreated
tags: childrencreated
published: True
position: 1
---

# ChildrenCreated

**RadTimePicker** exposes the **ChildrenCreated** server event, which occurs after the child controls are created.

>caution
**ChildrenCreated** can be wired only during the **Page_PreInit** event, since it is fired before the regular handlers are attached.
>

The **ChildrenCreated** event handler receives two arguments:

1. The control whose children have just been created. This argument is of type object, but can be cast to the appropriate type.

2. A **DefaultViewChangedEventArgs** object. This object has the following two properties:

	* **OldView** is the **CalendarView** object for the view that was current before the change.

	* **NewView** is the **CalendarView** object for the current view after the change.

You can use this event to set date input, calendar and time view properties, or add additional controls. The following example uses the **ChildrenCreated** event handler to add a control that clears the selection:

````C#
protected void RadTimePicker1_ChildrenCreated(object sender, System.EventArgs e)
{
    RadTimePicker picker = (RadTimePicker)sender;
    HyperLink clearLink = new HyperLink();
    clearLink.NavigateUrl = string.Format("javascript:$find('{0}').Clear()", picker.ClientID);
    clearLink.Text = "Clear";
    picker.Controls.Add(clearLink);
}
````
````VB.NET
Protected Sub RadTimePicker1_ChildrenCreated(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadTimePicker1.ChildrenCreated
    Dim picker As RadTimePicker = DirectCast(sender, RadTimePicker)
    Dim clearLink As New HyperLink()
    clearLink.NavigateUrl = _
      String.Format("javascript:$find('{0}').Clear()", picker.ClientID)
    clearLink.Text = "Clear"
    picker.Controls.Add(clearLink)
End Sub
````

# See Also

 * [ItemCreated]({%slug timepicker/server-side-programming/events/itemcreated%})

repository: telerik/ajax-docs

branch_name: refs/heads/master

gha_language: C#

repo_name: telerik/ajax-docs


text:
# ISI Drone
### The Ecommerce Website to sale Drones
#### developed using Jsp, Servlet, My Sql Server and Jenkins.

Enhance existing e-commerce web app provided  by school to simulate auto Integration and deployment Scenario using Jenkins.
Implement Admin Management Protal for e-commers application
Create feature to order shipping  status.
Provide Sales report by customer name and date created on.
Provide orders report with delivery status information such as delivered succesfully or cancel order.

## Installation

Use (https://github.com/priyanka747/ISIDrone.git) clone ISIDrone.
Project is build and run with the Eclipse IDE

## Usage
Use maven-plugin, jdk, Tomcat v8.0

## Contributing
For changes, please open an issue first to discuss what you would like to change.

Contributers : Priyanka Thakker, Rohini Lawrence, Jeel Gandhi, Priyank Patel, Raj Prajapati, Mit patel

## License
All rights reserved by the team.


text:
# The RubyMine Server

## What is it?

Currently VERY VERY unstable.

RubyMine is a server that aims to be on feature parity with the features of the regular minecraft server systems (Bukkit, Hmod/Canary, Sponge, etc). It tries to make it easy to run a production survival server under extreme memory constraints. The goal of the project is to create a server system to be on par with the big ones.

## Installation

### From GitHub

    $ git clone git://github.com/connor557/rubymine

## Usage

### Start the server

    $ bin/server [-h host] [-p port]

gha_language: Ruby

gha_license_id: MIT


text:
---
title: Getting help on Excel Functions
keywords:
last_updated: September 14, 2016
tags: [getting_started]
sidebar: home_sidebar
permalink: home_excel_help.html
folder: home
---

## Function Wizard

* Function: Inside the function wizard is a description of the function.
* Arguments: Inside the function wizard you will get help on each input when the focus is on range input for that argument.
* Details: There is also a link to the online help inside the function wizard.

## Internet

Clicking above on `Help Category -> Excel Functions` will allow you to browse all the functions.

## Example sheets

Inside the folder where QuantSA is installed is a subfolder with a number of example sheets, these show worked examples of calling some of the functions.

repository: JamesLTaylor/QuantSA

repo_name: JamesLTaylor/QuantSA


text:
# make-bot-with-discord.py

## before installing!
- if u use software in windows not Replit.com u need to install discord.py
- open cmd and type **cd C:\Users\User\AppData\Local\Programs\Python\Python38\Scripts**
- type **pip install discord.py**
- and done

## how to install:
- u need make bot at **[Discord Developer Portal](https://discord.com/developers/applications/)**
- add aplication and go to bot and make a bot
- after that copy the token and turn on presence and member intent
- paste the token at bot.run(**"paste here"**) u will find the instruction inside code
- copy the main.py into your python file
- fill the required to launch the bot
- and launch

## how to make bot keep alive?
- u need **[replit](https://replit.com/~)** to write the code and **[uptimerobot](https://uptimerobot.com/)** to make bot keep alive
- **[Click Me](keepalivebot/)** The Files
- make a new python file in replit
- install discord.py at package
- paste the code at main.py
- put the bot token to secrets at panel and fill the key = TOKEN value = your token
- and fill the code from how to install instruction
- make a new file named keep_alive.py and put the code from keep_alive.py from here
- and run the code after that
- copy your code web link(example = https://neoness.tes.repl.co)
- in uptime robot and make a new and put your web link
- and done

## need another command for bot?
- **[Read The Docs](https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html#)**
- **[Discord API server](https://discord.gg/discord-api)**

need help?
- discord = kliped#8574


text:
# Repository Layout

This page covers the repository structure and details about the directories in Cluster API.

```
cluster-api
└───.github
└───api
└───bootstrap
└───cmd
│   │   clusterctl
└───config
└───controllers
└───controlplane
└───dev
└───docs
└───errors
└───exp
└───feature
└───hack
└───internal
└───logos
└───scripts
└───test
└───util
└───version
└───webhooks
└───main.go
└───Makefile
```

### GitHub

[~/.github](https://github.com/kubernetes-sigs/cluster-api/tree/main/.github)

Contains GitHub workflow configuration and templates for Pull requests, bug reports etc.

### API

[~/api](https://github.com/kubernetes-sigs/cluster-api/tree/main/api)

This folder is used to store types and their related resources present in CAPI core. It includes things like API types, spec/status definitions, condition types, simple webhook implementation, autogenerated, deepcopy and conversion files. Some examples of Cluster API types defined in this package include Cluster, ClusterClass, Machine, MachineSet, MachineDeployment and MachineHealthCheck.

API folder has subfolders for each supported API version.

### Bootstrap

[~/bootstrap](https://github.com/kubernetes-sigs/cluster-api/tree/main/bootstrap)

This folder contains  Cluster API bootstrap provider Kubeadm (CABPK) which is a reference implementation of a Cluster API bootstrap provider. This folder contains the types and controllers responsible for generating a cloud-init or ignition configuration to turn a Machine into a Kubernetes Node. It is built and deployed as an independent provider alongside the Cluster API controller manager.

### ControlPlane

[~/controlplane](https://github.com/kubernetes-sigs/cluster-api/tree/main/controlplane)

This folder contains a reference implementation of a Cluster API Control Plane provider - KubeadmControlPlane. This package contains the API types and controllers required to instantiate and manage a Kubernetes control plane. It is built and deployed as an independent provider alongside the Cluster API controller manager.

### Cluster API Provider Docker

[~/test/infrastructure/docker](https://github.com/kubernetes-sigs/cluster-api/tree/main/test/infrastructure/docker)

This folder contains a reference implementation of an infrastructure provider for the Cluster API project using Docker. This provider is intended for development purposes only.

### Clusterctl CLI

[~/cmd/clusterctl](https://github.com/kubernetes-sigs/cluster-api/tree/main/cmd/clusterctl)

This folder contains Clusterctl, a CLI that can be used to deploy Cluster API and providers, generate cluster manifests, read the status of a cluster, and much more.

### Manifest Generation

[~/config](https://github.com/kubernetes-sigs/cluster-api/tree/main/config)

This is a Kubernetes manifest folder containing application resource configuration as kustomize YAML definitions. These are generated from other folders in the repo using `make generate-manifests`

Some of the subfolders are:
* [~/config/certmanager](https://github.com/kubernetes-sigs/cluster-api/tree/main/config/certmanager) - It contains manifests like self-signed issuer CR and certificate CR useful for cert manager.

* [~/config/crd](https://github.com/kubernetes-sigs/cluster-api/tree/main/config/crd) - It contains CRDs generated from types defined in [api](#api) folder

* [~/config/manager](https://github.com/kubernetes-sigs/cluster-api/tree/main/config/manager) - It contains manifest for the deployment of core Cluster API manager.

* [~/config/rbac](https://github.com/kubernetes-sigs/cluster-api/tree/main/config/rbac) - Manifests for RBAC resources generated from kubebuilder markers defined in controllers.

* [~/config/webhook](https://github.com/kubernetes-sigs/cluster-api/tree/main/config/webhook) - Manifest for webhooks generated from the markers defined in the web hook implementations present in [api](#api) folder.

Note: Additional `config` containing manifests can be found in the packages for [KubeadmControlPlane](#controlplane), [KubeadmBoostrap](#bootstrap) and [Cluster API Provider Docker](#cluster-api-provider-docker).

### Controllers

[~/internal](https://github.com/kubernetes-sigs/cluster-api/tree/main/internal)

This folder contains resources which are not meant to be used directly by users of Cluster API e.g. the implementation of controllers is present in [~/internal/controllers](https://github.com/kubernetes-sigs/cluster-api/tree/main/internal/controllers) directory so that we can make changes in controller implementation without breaking users. This allows us to keep our api surface smaller and move faster.

[~/controllers](https://github.com/kubernetes-sigs/cluster-api/tree/main/controllers)

This folder contains reconciler types which provide access to CAPI controllers present in [~/internal/controllers](https://github.com/kubernetes-sigs/cluster-api/tree/main/internal/controllers) directory to our users. These types can be used by users to run any of the Cluster API controllers in an external program.

### Documentation

[~/docs](https://github.com/kubernetes-sigs/cluster-api/tree/main/docs)

This folder is a place for proposals, developer release guidelines and the Cluster API book.

[~/logos](https://github.com/kubernetes-sigs/cluster-api/tree/main/logos)

Cluster API related logos and artwork

### Tools

[~/hack](https://github.com/kubernetes-sigs/cluster-api/tree/main/hack)

This folder has scripts used for building, testing and developer workflow.

[~/scripts](https://github.com/kubernetes-sigs/cluster-api/tree/main/scripts)

This folder consists of CI scripts related to setup, build and e2e tests. These are mostly called by CI jobs.

[~/dev](https://github.com/kubernetes-sigs/cluster-api/tree/main/dev)

This folder has example configuration for integrating Cluster API development with tools like IDEs.

### Util, Feature and Errors

[~/util](https://github.com/kubernetes-sigs/cluster-api/tree/main/util)

This folder contains utilities which are used across multiple CAPI package. These utils are also widely imported in provider implementations and by other users of CAPI.

[~/feature](https://github.com/kubernetes-sigs/cluster-api/tree/main/feature)

This package provides feature gate management used in Cluster API as well as providers. This implementation of feature gates is shared across all providers.

[~/errors](https://github.com/kubernetes-sigs/cluster-api/tree/main/errors)

This is a place for defining errors returned by CAPI. Error types defined here can be used by users of CAPI and the providers.

### Experimental features

[~/exp](https://github.com/kubernetes-sigs/cluster-api/tree/main/exp)

This folder contains experimental features of CAPI. Experimental features are unreliable until they are promoted to the main repository. Each experimental feature is supposed to be present in a subfolder of [~/exp](https://github.com/kubernetes-sigs/cluster-api/tree/main/exp) folder e.g. ClusterResourceSet is present inside [~/exp/addons](https://github.com/kubernetes-sigs/cluster-api/tree/main/exp/addons) folder. Historically, machine pool resources are not present in a sub-directory. Migrating them to a subfolder like `~/exp/machinepools` is still pending as it can potentially break existing users who are relying on existing folder structure.

CRDs for experimental features are present outside [~/exp](https://github.com/kubernetes-sigs/cluster-api/tree/main/exp) directory in [~/config](https://github.com/kubernetes-sigs/cluster-api/tree/main/config) folder. Also, these CRDs are deployed in the cluster irrespective of the feature gate value. These features can be enabled and disabled using feature gates supplied to the core Cluster API controller.

### Webhooks

The [api](#api) folder contains webhooks consisting of validators and defaults for many of the types in Cluster API.

[~/internal/webhooks](https://github.com/kubernetes-sigs/cluster-api/tree/main/internal/webhooks)

This directory contains the implementation of some of the Cluster API webhooks. The internal implementation means that the methods supplied by this package cannot be imported by external code bases.

[~/webhooks](https://github.com/kubernetes-sigs/cluster-api/tree/main/webhooks)

This folder exposes the custom webhooks present in [~internal/webhooks](#webhooks) to the users of CAPI.

Note: Additional webhook implementations can be found in the API packages for [KubeadmControlPlane](#controlplane), [KubeadmBoostrap](#bootstrap) and [Cluster API Provider Docker](#cluster-api-provider-docker).

repository: kubernetes-sigs/cluster-api

gha_language: Go

repo_name: kubernetes-sigs/cluster-api


text:
# #100DaysofStory: 032

    DRAFT-032 ~ Island

---

## Monday, July 15, 2019

![Island Visual Inspiration: Unknown](island.jpg)

Visual Inspiration: Unknown

Musical Inspiration: Monolink - [Rearrange My Mind](https://open.spotify.com/track/3ZC8nX0TZsL0mSwf7xQp9h)

---

## Ideabox

### Notes

### Setting

### Characters

---

## Island

"A weird feeling has been with me ever since we touched down on the island. Before we began our descent, I was happy and without a care—more than that, really."

They had been walking, now they sat on the sand. The last of the light from the sun was giving the sky a griseous gradient that went from blue-grey near one horizon to black near the opposite.

"When did the transition happen?" The other one asked, "or—I guess a better one to start—do you...hmm...can you trace the feeling back to any specific moment?" He brought a handful of the coarse grains of sand up to eye level and watched as they cascaded through the cracks between his fingers. He could no longer see individual grains with the fading light, only a strong hint that something was there.

"I think I know what started it, though it doesn't make complete sense to me that something as trivial as forgetting a small, non-essential item at home—I left it behind; forgot to pack it—would be the cause. That's why I began to wonder if there's a deeper issue at play here and the realization of my mistake triggered it." He gazed distantly at the utterly flat line of the horizon. There were no clouds interrupting that line tonight. "Or, what I'm currently believing is the most plausible answer: the timing of what I noticed happened to be such that it led me astray..."

An expression somewhere between confusion and fright grew on his face as he continued to talk and to think.

"...almost as if I was purposefully led away from the real cause by my subconscious...or something pretending to be my subconscious."

His friend let out a short laugh, then went silent when the haunted expression turned his way. The friend cleared his throat, at a loss for what to say. The friend had wondered why he had been acting strangely—but only for a brief moment. Sometimes he just acted strangely for no apparent reason.

"Everyone has those days, man." The friend tried to smile without judgement, hoping it came across as comforting; reassuring. "Everyone's subconscious gets compromised at some point, usually at many points...whether by some sort of virunetics or bug in the kernel—or the base OS—or somewhere higher up—above more of the abstractions." The friend chuckled, though accidentally made it sound mirthless and cold.

His friend saw his face change into an almost comical mixture of relief and confusion.

"No idea why, but that is actually good to hear—though it does give me tons of shiv to think about and figure out." He looked back out over the now-black ocean beyond the dark sand. "I think I'd already convinced myself...and if you had denied that something could be _that_ wrong..."

He chuckled, "...you know how I am with conspiracies."

---- ∫ ----

repository: tobias-fyi/challenges

repo_name: tobias-fyi/challenges


text:
# tagdb
Filesystem tags implementation.

tagdb allows you to "attach" keywords to arbitrary files and then ask for files
with certain keyword attached. Pretty simple, huh?

Why you would need keywords on files? First let's answer another question: Why
Twitter does have #hashtags thing? To help you find similar tweets. tagdb works
the same way and helps you find similar or somehow related files.

To help you understand why tagdb can be useful let's discuss few usage examples.
First one is IT-related e-books collection (I actually have over 3 GiB of
them). There are books about security,
programming, algorithms, system management, cryptography, machine learning,
networking, etc... You got the idea. How would you organize this collection
into hierarchy of directories? Consider that many books cover more than one topic.
My answer: You don't have to. Place all books into one directory and use tagdb.
[Grokking Algorithms] book (btw pretty good book) is about algorithms? Great,
label it with "algorithms" keyword:
```
tagctl tag Grokking_Algorithms.png -t algorithms
```
Now you can easily get list of all algorithms-related books with following command:
```
tagctl query algorithms
```

Another great example is a photo gallery. Nobody likes `IMG_XXXXX.png` file
names assigned by cameras, right?
Sort photos by location/year/etc using tagdb!
```
tagctl tag IMG_00001.png IMG_00002.png ... -t location
tagctl query year_2017
tagctl query location
```

See? tagdb can be very useful! Now go install it!

### Installation

```
go get github.com/foxcpp/tagdb/tagctl
```
And... that's all. Now you have CLI utility `tagctl` installed in
`$GOPATH/bin`.

Binaries for Linux/Windows/etc can be found in
[Releases](https://github.com/foxcpp/tagdb/releases) section.

### Usage

See `tagctl help` for CLI usage hints.

Few examples:
```
$ tagctl tag Documents/agreement.odt.asc -t work
$ tagctl untag Pictures/avatar.xcf -t todo
$ tagctl tags
work
todo
$ tagctl query work
/home/user/Documents/agreement.odt.asc
```

### License

MIT.

### Similar Projects

* DBFS by SourceForge
* [TMSU](https://github.com/oniony/TMSU) by oniony

[Grokking Algorithms]: https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230

repository: foxcpp/tagdb

repo_name: foxcpp/tagdb


text:
---
layout: post
title: Seminar - Hong Zhang (Shandong University)
subtitle: Searching for Wormholes with Gravitational Wave Scattering

#cover-img: /assets/img/path.jpg
tags: [seminar, event, blog, Hong-Zhang, Shangdong-University]
---

<style>
body {
text-align: justify}
</style>

Seminar time: 2022/06/02 10:00-12:00 (CST)

Click the link to join the meeting, or add to the meeting list:
https://meeting.tencent.com/dm/ryx3eooHYifj

Conference ID: 261-936-645

## Speaker: Hong Zhang(Shangdong University)

## Searching for Wormholes with Gravitational Wave Scattering

### Hong Zhang

______________________________

## Abstract

Wormholes bridging distant places of the universe are well-known solutions of general relativity. However, no hint of their existence has been found yet. In this work, we propose using the gravitational wave scattering off spherical wormholes to search for their existence. We carefully calculate the reflected and transmitted waveforms with time-independent scattering theory. Our results quantitatively show the signatures in the waveforms on both sides of the wormhole.

______________________________

## Bio

 Hong Zhang, graduated from the Department of Modern Physics, University of Science and Technology of China in 2008, and obtained a Ph.D. in nuclear physics from Stony Brook University in the United States in 2014. From 2014 to 2019, he did postdoctoral research at Ohio State University in the United States and Technical University Munich in Germany, and worked in Shandong University since 2019. Research interests focus on low-energy quantum effective theory and its applications in nuclear physics and dark matter.

gha_language: JavaScript


text:
---
layout: post
title: IdentityServer3 with custom grant flow and windows authentication
---

#### What we are going to do?

1. Host and configure `IdentityServer3`
2. Create a client for `IdentityServer3` with `Flows.Other` and `AllowedCustomGrantTypes: "windows"`
3. Host and configure `WindowsAuthenticationService`
4. Create custom grant validator in `IdentityServer3` for `windows` grant type
5. Create console client and get token from `IdentityServer3` by current `windows principal`.

#### How this all communicate?

![Communication](http://i.imgur.com/X86m1fK.png)

Our client (in my case desktop application) will call `WindowsAuthenticationService` for converting current `windows principal` to `jwt token` trusted by `IdentityServer3`.
Then `Client` will call to `/token` endpoint (with the custom grant: windows ) of `IdentityServer3` with providing `jwt token` got from `WindowsAuthenticationService`. `IdentityServer3` will issue new token with requested scopes, custom claims and so on.

#### What we will archive?

This will allow us to authenticate users in `IdentityServer3` with windows authentication. Also, we can add roles, claims to these users through [IdentityManager](https://github.com/IdentityManager/IdentityManager).

<!--more-->

### 1. Host and configure `IdentityServer3`

Create a new empty asp.net web project. We are going to use OWIN-based web app hosted in IIS.

Install following packages:

`Install-Package Microsoft.Owin.Host.SystemWeb`
`Install-Package IdentityServer3`

After that we need our `Startup.cs` to configure our web app and `IdentityServer3`.
Add `Startup.cs` file (Right Click On Project > Add > OWIN Startup Class) to configure our app to use `IdentityServer3`.

I will not go deeper for basics configuration of IdentityServer3 . Read more about basics of configuring IdentityServer3 in
[official documentation](https://identityserver.github.io/Documentation/docsv2/configuration/overview.html)

Don't forget to Enable SSL in Properties Menu (F4) and update ProjectURL in Project Properties: Web tab.

### 2. Create client for `IdentityServer3` with `Flows.Other` and `AllowedCustomGrantTypes: "windows"`

We should define our Client with `Flows.Custom` and `AllowedCustomGrantTypes: "windows"`. Read more about configuring Clients
in [official documentation](https://identityserver.github.io/Documentation/docsv2/configuration/clients.html)

![Custom Flow and AllowedCustomGrantTypes "windows"](http://i.imgur.com/EbpLjxy.png)

Also in my case all my users should come from windows authentication for achieving it I disabled local login.

![Disable local login](http://i.imgur.com/mSirFpM.png)

### 3. Host and configure `WindowsAuthenticationService`

Again Create a new empty asp.net web project, with `Startup.cs` and `Owin.Host.SystemWeb` nuget installed on it.

Then we need `WindowsAuthentication` package for issuing `jwt token`'s based on current `windows principal`.

`Install-Package IdentityServer.WindowsAuthentication`

Now we need to configure our application to use Windows Authentication.

For IIS Express (F4 properties menu)

![IIS Express](http://i.imgur.com/FjcfTOr.png)

For IIS (uncomment this line in web.config)

![IIS](http://i.imgur.com/L2QV1CJ.png)

Now we should configure `IdentityServer.WindowsAuthentication`. Here it is:

![WinAuth configuration](http://i.imgur.com/aB7HJm6.png)

Note to highlighting lines. You should Load the same Certificate as in IdentityServer, and you should set `EnableOAuth2Endpoint` true, to get `jwt token` by requesting custom grant from `WindowsAuthenticationService`'s `/token` endpoint.

Again don't forget to Enable SSL in Properties Menu (F4) and update ProjectURL in Project Properties: Web tab.

### 4. Create custom grant validator in `IdentityServere3` for `windows` grant type

Now the most important part is to teach our `IdentityServer3` to understand `windows` grant type.

For that, we need to implement `ICustomGrantValidator` interface. Read more about Custom Grant Validators
in [official documentation](https://identityserver.github.io/Documentation/docsv2/advanced/customGrantTypes.html)

We should define what we need in the custom grant request to be passed when we are granting access to `windows` grant type. We need `jwt token` that is issued by `WindowsAuthenticationService`. We will set/get it as `win_token` param.

![Getting win_token from request](http://i.imgur.com/wpNTRMb.png)

After that, we need to validate that `win_token` is issued from our `WindowsAuthenticationService`.

![Token Validation](http://i.imgur.com/VcTNGU4.png)

Now we have validated (trusted) token. Next step is to get unique identifier of user. It is stored in `NameIdentifier` claim.

![Getting NameIdentifier token](http://i.imgur.com/mgVeOoT.png)

Everything ready to authenticate the user in `IdentityServer3` and issue token to the client.

![User Authentication](http://i.imgur.com/AVO9rLM.png)

### 5. Create console client and get token from `IdentityServer3` by current `windows principal`.

Everything setup, now we should test our services. Create new `ConsoleApplication` and install `Thinktecture.IdentityModel.Client` package.

`Install-Package Thinktecture.IdentityModel.Client`

Now We need to connect to `WindowsAuthenticationService` with `UseDefaultCrediantals` (this will include our windows principal in request) and get converted `jwt token` back.

![Getting win token from request](http://i.imgur.com/PFsSQRB.png)

After that we should get access token from result (`resultToken.AccessToken`) and send it via `win_token` param by requesting custom `windows` grant from `IdnetityServer3`.

![Requesting custom windows grant](http://i.imgur.com/P6p37Ff.png)

We Done!

A whole working sample can be found here: [IdSrv3.WindowsCustomGrant.Sample]().

#### Links

[Documentation](https://identityserver.github.io/Documentation/)

[IdentityServer3](https://github.com/IdentityServer/IdentityServer3)

[WindowsAuthenticationService](https://github.com/IdentityServer/WindowsAuthentication)

[IdentityManager](https://github.com/IdentityManager/IdentityManager)


text:
---
title: Hugo doesn't work
description: Trouble shooting with Hugo
slug: hugo-doesn't-work
date: 2022-09-09 15:48:00+0800
categories:
    - Project Records
tags:
    - Hugo
    - Trouble Shooting
---

Today, I opened my blog workplace and decided to write something about my latest work.
It was kind of weird that after I ran `hugo server` and visit the development site,
I seen nothing but a white page. I found this kind of strange things bother me a lot,
so I decide to do some more to record them in case I meet them again.

This post can be very easy currently,
wether it will become more complex depends on the amount of problems.

## found no layout file for "HTML" for "page"

**Description:** Run `hugo server` and visit the development site, see nothing but a white page.
Find WARNINGs like 'found no layout file for "HTML" for "page"'.

**Related link:** [How to fix the error 'found no layout file for "HTML" for "page"' in Hugo CMS?](https://stackoverflow.com/questions/60269683/how-to-fix-the-error-found-no-layout-file-for-html-for-page-in-hugo-cms)

**Solution:** Run `hugo mod clean`.

**Guess Cause:** Some of the computer rubbish cleaner software may delete the running essenstial of Hugo as rubbish.
This issue is likely to appear after I clean my computer with rubbish cleaner.


text:
---
layout: learn
title: Circuit Breaking
description: >
  Envoy's circuit breaking lets you configure failure thresholds to prevent
  cascading failure in a microservices architecture. Learn how to configure
  circuit breakers on clusters and best practices for tuning the thresholds.
---

In the world of microservices, services often make calls to other services. But
what happens when a service is busy, or unable to respond to that call? How do
you avoid a failure in one part of your infrastructure cascading into other
parts of your infrastructure? One approach is to use circuit breaking.

Circuit breaking lets you configure failure thresholds that ensure safe
maximums after which these requests stop. This allows for a more graceful
failure, and time to respond to potential issues before they become larger.
It’s possible to implement circuit breaking in a few parts of your
infrastructure, but implementing these circuit breakers within services means
they are vulnerable to the same overload and failure we’re hoping to prevent.
Instead, we can configure circuit breaking at the network layer within Envoy,
and combine it with other traffic shaping patterns to ensure healthy and stable
infrastructure.

## Configuring circuit breaking

Envoy provides simple configuration for circuit breaking. Consider the
specifics of your system as you set up circuit breaking.

Circuit breaking is specified as part of a Cluster (a group of similar upstream
hosts) definition by adding a `circuit_breakers` field. Clusters are returned
from the Cluster Discovery Service (CDS), either in the bootstrap config, or a
remote CDS server .

## Circuit Breaker Configuration

Here's what a simple circuit breaking configuration looks like:

```yaml
circuit_breakers:
  thresholds:
    - priority: DEFAULT
      max_connections: 1000
      max_requests: 1000
    - priority: HIGH
      max_connections: 2000
      max_requests: 2000
```

In this example, there are a few fields that allow for a lot of service
flexibility:

 `thresholds` allows us to define priorities and limits for the type of traffic
 that our service responds to.

`priority` refers to how routes defined as `DEFAULT` or `HIGH` are treated by
the circuit breaker. Using the settings above, we would want to set any
requests that shouldn’t wait in a long queue to HIGH. For example: POST
requests in a service where a user wants to make a purchase, or save their
state.

`max_connections` are the maximum number of connections that Envoy will make to
our service clusters. The default for these is 1024, but in real-world
instances we may drastically lower them.

`max_requests` are the maximum number of parallel requests that Envoy makes to
our service clusters. The default is also 1024.

## Typical Circuit Breaker Policy

Essentially all clusters will benefit from a simple circuit breaker at the
network level. Because HTTP/1.1 and HTTP/2 have different connection behaviors
(one connection per request vs. many requests per connection), clusters with
different protocols will each use a different option:

 - For **HTTP/1.1** connections, use `max_connections`.
 - For **HTTP/2** connections, use `max_requests`.

Circuit breakers prevent catastrophic outages based on timeout failures, where a
single service cascades everywhere. The most insidious failures happen not
because a service is down, but because it’s hanging on to requests for tens of
seconds. Generally, it’s better for one service to be completely down than for
all services to be outside their SLO because they’re waiting for a timeout deep
in the stack.

A good value for either of these options depends on two things: the number of
connections/requests to your service and the typical request latency. For
example, an HTTP/1 service with 1,000 requests / second and average latency of 2
seconds will typically have 2,000 connections open at any given time. Because
circuit breakers trip when there are a large number of slower-than-normal
connections, consider a starting point for this service in the range of 10 x
2,000. This would open the breaker when most of the requests in the last 10
seconds have failed to return any response. Exactly what you pick will depend on
the spikiness of your load and how overprovisioned the service is.

## Advanced circuit breaking

Now that you’ve seen a basic configuration and policy for circuit breaking,
we’ll discuss more advanced circuit breaking practices. These advanced
practices will add more resiliency to your infrastructure at the network level.

### Break–on–latency

As mentioned above, one of the most common use cases of circuit breakers is to
prevent failures that are caused when a service is excessively slow, but not
fully down. While Envoy doesn’t directly provide an option to trip the breaker
on latency, you can combine it with [Automatic Retries](automatic-retries)
to emulate this behavior.

To break on an unexpected spike in slow requests, reduce the latency threshold
for retries and enable circuit break on lots of retries using the `max_retries`
option.

If you do this, monitor the results closely! Many practitioners report that
setting too low a latency threshold is the only time they’ve *created* an
outage by adding circuit breakers. When this latency threshold too low, you can
DoS your services. Start higher than you think you need, and lower it over
time.

### Configure breaking based on a long queue of retries

Even if you’re only [retrying requests](automatic-retries)
on connection errors, it is valuable to set up circuit breaking. Because
retries have the  potential to increase the number of requests by 2x or more,
circuit breaking  using the `max_retries` parameter protects services from
being overloaded by  too many active retries. Set this value to a similar
number as `max_connections` or `max_requests`—a fraction of the total number of
requests the service typically handles in a 10-second window. If the service
has as many retries outstanding as the typical number of requests, it’s broken
and should be disabled.

## Next Steps

With circuit breaking configured, your service is equipped to help selectively
shed load when failure occurs, preventing it from cascading to multiple
services. Combining this tool with
[automatic retries](automatic-retries)
makes for robust services that are able to handle common issues at the network
level.


text:
alembic-templates-pyramid
=========================

Pyramid template for alembic

Installation:
-------------
Install alembic using "pip install alembic".

Find the location of alembic install directory.

Copy "pyramid" folder to "[alembic_dir]/templates/"

Usage:
------
"alembic list_templates" should list pyramid as a template option

"alembic init --template pyramid alembic"

Make sure the "Base" object from "models " is available as "from [proj].models import Base"

repository: virajkanwade/alembic-templates-pyramid

repo_name: virajkanwade/alembic-templates-pyramid


text:
# Word Tools: Counter and Scrabble

#### Epicodus C# Week 2 Code Review, 07/06/2018

#### By Elly Maimon

## Description

A .NET web app that allows the user to run two different Word Tools: a word counter, and a Scrabble points counter. Both of the tools have been written in C#.

## Specs for Word Counter

| Behavior | Input | Output | Explanation |
|----------|-------|--------|-------------|
| Program finds how many times a letter shows up in a given word. | "h", "hello" | "1" | A single letter is the simplest case to test here. |
| Program finds how many times a letter shows up in a given word where there is more than one instance of that letter. | "l", "hello" | "2" | Getting slightly more complex, I now add a second instance of the letter. |
| Program finds how many times a letter shows up in a given word despite capitalization. | "l", "heLLo" | "2" | Before moving on to multiple words, I handle case sensitivity. |
| Program finds how many times a single numbers shows up in a larger number. | "3", "333" | "3" | I include the case of numbers to keep to characters before moving on to a phrase. |
| Program finds how many times a letter shows up in a given word despite mixing in numbers. | "l" , "3hello3" | "2" | Now I can handle the mixture before expanding to multiple word phrases. |
| Program finds a match when given a word and then the same word. | "hello", "hello" | "1" | This is the simplest test case where we are now looking for more than just one letter or number. |
| Program finds how many times a word shows up in a given phrase. | "hello", "hello to you" | "1" | Now I add multiple words to further expand. |
| Program finds how many times a word shows up in a given phrase where there is more than one instance of the word. | "hello", "hello to you hello to you" | "2" | Now we add multiple occurrences in the next simplest version.
| Program finds how many times a word shows up in a given phrase, despite the capitalization. | "hello ", "hello there HeLLo" | "2" | Testing our earlier edge case in a more complex environment.
| Program finds how many times a number shows up in a given phrase. | "3" "3 Hello 3 people" | "2" | Complicating with numbers |
| Program finds how many times a number shows up in a given phrase despite the number being in a word. | "3" "3Hello 3 peopl3e" | "3" | Further complexity by forcing the program to take into account having to search inside a word for a number. |
| Program finds how many times a word shows up in a given phrase despite the word being adjacent to a punctuation mark. | "hello" "hello, to you, hello." | "2" | Further complexity by forcing the program to take into account having to ignore punctuation marks. |
| Program determines whether to look for single letters or a whole word based on inputs. | "hi" "high hi yo hi" OR "h" "high hi yo hi" | "2" OR "4"| Adding automated determination between single character inputs and multiple character inputs for further level of complexity. |
| Program accepts multiple word input. | "hi there" "hi hi there hi" | "1" | Further expanding on idea by accepting multiple word input to search phrase for. |

## Specs for Scrabble Counter

| Behavior | Input | Output |
|----------|-------|--------|
| Program receives word and returns points value. | hi | 4 |
| Program receives multiple words and returns points value. | hi hi | 8 |
| Program receives words with capital letters and returns points value. | Hi | 4 |

## Setup on OSX

* Download and install .Net Core 1.1.4
* Download and install Mono
* Clone the repo
* Run `dotnet restore` from project directory and test directory to install packages
* Run `dotnet build` from project directory and fix any build errors
* Run `dotnet test` from the test directory to run the testing suite
* Run `dotnet run` to start the server

## Technologies Used

* .Net Core 1.1.4

## Links

* Link to repository for this website: https://github.com/ellymaimon/WordCounter2.0

## License

This software is licensed under the MIT license.

Copyright (c) 2018 **Elly Maimon**


text:
# Datastream: Default Value

Default Value is a setting that allows you to set the initial value for the Datastream. This value later can be used in hardware API, HTTPS API, or within Rule Engine. Usually, this setting is used to set the initial value when hardware boots up for the first time.

Example: You are working on a smart light bulb and would like to turn it on when it first connects to the server after provisioning.

Set the default value for the Datastream `V1` to `1`. Then use this code on the hardware:

```cpp
BLYNK_CONNECTED() {
  // request the V1 value on connect
  // for initial connect it will be default value 1
  Blynk.sync(V1);
}

BLYNK_WRITE(V1)
{
    // here you get default value 1
    int bulbValue = param.asInt();
    handle(bulbValue);
}
```

You can change the default value of the product at any time. There is no need to update firmware over-the-air even when the product was already shipped to your clients.


text:
# Contributing

### Branches ###
* _master_: The `master` branch is exclusively for code that has already been released on Pypi. Pull requests are required to merge changes into this branch.
* _uat_: Code that is in 'in-package' testing. This means that the latest TestPypi release should remain synced with this branch. Pull requests are not required to merge changes into this branch.

### General contribution pipeline ###
https://help.github.com/en/github/getting-started-with-github/fork-a-repo

repository: Adam-Hammo/arlulaapi

gha_language: Python

repo_name: Adam-Hammo/arlulaapi


text:
A small project to run QEMU in ARM Cortex-M3 mode with remote gdb endpoint.
=====

Primarily for testing CLion embedded support.

[CLion](https://jetbrains.com/clion/) 2019.2+ is required with embedded support plugin enabled.

Features
---
Uses QEMU emulation of TI lm3s811evb.  The binary is uploaded via gdb anyway but qemu
requires some kernel to start.

QEMU cmd arguments:
* `-cpu cortex-m3` - cpu type
* `-M lm3s811evb` - guest machine type
* `-nographic` - do not open window
* `-s` - cli shortcut to start gdbserver at port 1234
* `-S` - freeze execution, wait until gdb is connected
* `-kernel README` - load binary garbage as kernel

Standard CMSIS 5 for Cortex-M3 + libnano are used. CMSIS is modified according to lm3s memory map.

`stdout` is redirected to lm3s UART0.

There is a [fake peripheral device definition](fake_peripheral.svd) which may be used for debugging and testing
purposes. The "device" is located in RAM, at address `0x20001800`. In the program code it is filled up with values.

Clion Run configuration
---

![Clion Run configuration](runconfig.png)

license: Unlicense


text:
### [CVE-2022-1064](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-1064)
![](https://img.shields.io/static/v1?label=Product&message=forkcms%2Fforkcms&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3C%205.11.1%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-89%20Improper%20Neutralization%20of%20Special%20Elements%20used%20in%20an%20SQL%20Command&color=brighgreen)

### Description

SQL injection through marking blog comments on bulk as spam in GitHub repository forkcms/forkcms prior to 5.11.1.

### POC

#### Reference
- https://huntr.dev/bounties/2f664985-c5fc-485b-b4fc-4c401be2cf40

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
XGBoost for classification.
XGBoost is an open-source software library which provides a gradient boosting framework for C++, Java, Python, R, and Julia. It works on Linux, Windows, and macOS.
From the project description, it aims to provide a scalable, portable and distributed gradient boosting library.

## Notes for this Component
1) The library enables the use of the algorithm both with cross validation and without. By default the library doesn't perform cross validation. If the user wishes to perform cross validation,
the user needs to use the parameter: ```--x_val=NUMBER_OF_FOLDS```, which is ```--x_val=None``` by default.
2) The path given by ```--data``` must be a path to a csv file which is already processed and ready for training. This means that the csv must not contain:

   - NaN values (empty cells)

   - Strings

   - Columns whose names start with 'Unnamed'.

## Parameters

### cnvrg.io parameters

```--data``` - str, required. Path to `.csv` file (the dataset). Assumes that the files includes only integers and floats (no strings), and the table is built as such: all the columns but the
rightmost one are considered as features columns (x), and the rightmost one is the label column (y).

```--test_size``` - Float. The portion of the data of testing. Default is 0.2.

```--x_val``` - int, optional (default = 5). Number of folds for the cross-validation.

```--test_split``` - float, optional (default = 0.2). The portion of the data for testing.

```--output_model``` - str, optional (default = 'xgboost_model.sav') The name of the output file which is a trained model.

### Algorithm parameters

```--max_depth``` - int (default = 3). The maximum tree depth for base learners.

```--learning_rate``` - float (default = 0.1). Boosting learning rate (xgb’s “eta”).

```--n_estimators``` - int (default = 100). Number of trees to fit.

```--verbosity``` - int (default = 0). The degree of verbosity. Valid values are 0 (silent) - 3 (debug).

```--objective``` - str or callable (default = binary:logistic). Specify the learning task and the corresponding learning objective or a custom objective function to be used.

```--booster``` - str (default = 'gbtree'). Specify which booster to use: 'gbtree', 'gblinear' or 'dart'.

```--tree_method``` - str (default = 'auto'). Specify which tree method to use. Default to auto. If this parameter is set to default, XGBoost will choose the most conservative option available. Go to the xgboost documentation at the link below for more information.

```--n_jobs``` - int (default = '1'). Number of parallel threads used to run xgboost.

```--gamma``` - float (default = '0'). Minimum loss reduction required to make a further partition on a leaf node of the tree.

```--min_child_weight``` - int (default = '1'). Minimum sum of instance weight(hessian) needed in a child.

```--max_delta_step``` - int (default = '0'). Maximum delta step to allow each tree’s weight estimation to be.

```--subsample``` - float (default = '1'). Subsample ratio of the training instance.

```--colsample_bytree``` - float (default = '1'). Subsample ratio of columns when constructing each tree.

```--colsample_bylevel``` - float (default = '1'). Subsample ratio of columns for each level.

```--colsample_bynode``` - float (default = '1'). Subsample ratio of columns for each split.

```--reg_alpha``` - float (default = '0'). xgb's alpha. L1 regularization term on weights.

```--reg_lambda``` - float (default = '1'). xgb's lambda. L2 regularization term on weights.

```--scale_pos_weight``` - float (default = '1'). Balancing of positive and negative weights.

```--base_score``` - float (default = '0.5'). The initial prediction score of all instances, global bias.

```--random_state``` - int (default = '0'). Random number seed.

```--missing``` - float, optional (default = None). Value in the data which needs to be present as a missing value. If None, defaults to np.nan.

## Link
https://xgboost.readthedocs.io/en/latest/python/python_api.html#module-xgboost.sklearn

repository: AccessibleAI/ailibrary

repo_name: AccessibleAI/ailibrary


text:
![jSimpleCSV](https://i.imgur.com/ZI2PxoV.png)
# jSimpleCSV

A simple Java library for reading from and writing to CSV files.

## Usage
### Reading from a CSV file
```java
import jSimpleCSV.CSVReader;

public static void main(String args[]){
    CSVReader cr = new CSVReader();

    String[][] input = cr.toArray("input.csv");
}
```
### Writing to a CSV file
```java
import jSimpleCSV.CSVWriter;

public static void main(String args[]){
    CSVWriter cw = new CSVWriter();

    String[][] out = {{"Hello","World"},{"World","Hello"}};

    cr.toCSV(out,"output.csv");
}
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License
[MIT](https://choosealicense.com/licenses/mit/)

repository: anirudhgiri/jSimpleCSV

repo_name: anirudhgiri/jSimpleCSV