_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c15100
train
// GetClipboard returns the contents of the clipboard. It assumes the text was // not captured from an auto-expanded cursor. It exists for Sublime Text API // compatibility.
{ "resource": "" }
c15101
train
// SetClipboard modifies the contents of the clipboard. It assumes the text was // not captured from an auto-expanded cursor. It exists for Sublime Text API // compatibility.
{ "resource": "" }
c15102
train
// UseMiddleware registers middlewares that implement the api2go.HandlerFunc // Middleware is run before any generated routes.
{ "resource": "" }
c15103
train
// NewAPIVersion can be used to chain an additional API version to the routing of a previous // one. Use this if you have multiple version prefixes and want to combine all // your different API versions. This reuses the baseURL or URLResolver
{ "resource": "" }
c15104
train
// NewAPIWithResolver can be used to create an API with a custom URL resolver.
{ "resource": "" }
c15105
train
// NewAPI returns an initialized API instance // `prefix` is added in front of all endpoints.
{ "resource": "" }
c15106
train
// newAPI is now an internal method that can be changed if params are changing
{ "resource": "" }
c15107
train
// middlewareChain executes the middleeware chain setup
{ "resource": "" }
c15108
train
// try to find the referenced resource and call the findAll Method with referencing resource id as param
{ "resource": "" }
c15109
train
// Links returns a jsonapi.Links object to include in the top-level response
{ "resource": "" }
c15110
train
// Insert a user
{ "resource": "" }
c15111
train
//GetBaseURL implements `URLResolver` interface
{ "resource": "" }
c15112
train
// FindAll to satisfy api2go data source interface
{ "resource": "" }
c15113
train
// PaginatedFindAll can be used to load users in chunks
{ "resource": "" }
c15114
train
// FindOne to satisfy `api2go.DataSource` interface // this method should return the user with the given ID, otherwise an error
{ "resource": "" }
c15115
train
// Create method to satisfy `api2go.DataSource` interface
{ "resource": "" }
c15116
train
// Delete to satisfy `api2go.DataSource` interface
{ "resource": "" }
c15117
train
//Update stores all changes on the user
{ "resource": "" }
c15118
train
// GetReferencedIDs to satisfy the jsonapi.MarshalLinkedRelations interface
{ "resource": "" }
c15119
train
// GetReferencedStructs to satisfy the jsonapi.MarhsalIncludedRelations interface
{ "resource": "" }
c15120
train
// SetToManyReferenceIDs sets the sweets reference IDs and satisfies the jsonapi.UnmarshalToManyRelations interface
{ "resource": "" }
c15121
train
// AddToManyIDs adds some new sweets that a users loves so much
{ "resource": "" }
c15122
train
// DeleteToManyIDs removes some sweets from a users because they made him very sick
{ "resource": "" }
c15123
train
// Handle each method like before and wrap them into julienschmidt handler func style
{ "resource": "" }
c15124
train
// GetRouteParameter implemention will extract the param the julienschmidt way
{ "resource": "" }
c15125
train
// Set a string key value in the context
{ "resource": "" }
c15126
train
// Get a key value from the context
{ "resource": "" }
c15127
train
// ContextQueryParams fetches the QueryParams if Set
{ "resource": "" }
c15128
train
// Create a new choc
{ "resource": "" }
c15129
train
// Update a choc
{ "resource": "" }
c15130
train
// Unmarshal parses a JSON API compatible JSON and populates the target which // must implement the `UnmarshalIdentifier` interface.
{ "resource": "" }
c15131
train
// extracts all found relationships and set's them via SetToOneReferenceID or // SetToManyReferenceIDs
{ "resource": "" }
c15132
train
// GetAll of the chocolate
{ "resource": "" }
c15133
train
// GetOne tasty chocolate
{ "resource": "" }
c15134
train
// Insert a fresh one
{ "resource": "" }
c15135
train
// Update updates an existing chocolate
{ "resource": "" }
c15136
train
// UnmarshalJSON unmarshals the JSON-encoded data to the DataObject field if the // root element is an object or to the DataArray field for arrays.
{ "resource": "" }
c15137
train
// MarshalJSON returns the JSON encoding of the DataArray field or the DataObject // field. It will return "null" if neither of them is set.
{ "resource": "" }
c15138
train
// UnmarshalJSON marshals a string value into the Href field or marshals an // object value into the whole struct.
{ "resource": "" }
c15139
train
// MarshalJSON returns the JSON encoding of only the Href field if the Meta // field is empty, otherwise it marshals the whole struct.
{ "resource": "" }
c15140
train
// marshalHTTPError marshals an internal httpError
{ "resource": "" }
c15141
train
// Error returns a nice string represenation including the status
{ "resource": "" }
c15142
train
// Jsonify returns a JSON formatted key name from a go struct field name.
{ "resource": "" }
c15143
train
// MarshalWithURLs can be used to pass along a ServerInformation implementor.
{ "resource": "" }
c15144
train
// Marshal wraps data in a Document and returns its JSON encoding. // // Data can be a struct, a pointer to a struct or a slice of structs. All structs // must at least implement the `MarshalIdentifier` interface.
{ "resource": "" }
c15145
train
// FmtTimeMedium returns the medium time representation of 't' for 'ga_IE'
{ "resource": "" }
c15146
train
// FmtTimeFull returns the full time representation of 't' for 'rof_TZ'
{ "resource": "" }
c15147
train
// FmtTimeLong returns the long time representation of 't' for 'tzm'
{ "resource": "" }
c15148
train
// FmtDateShort returns the short date representation of 't' for 'vun_TZ'
{ "resource": "" }
c15149
train
// String returns the string value of PluralRule
{ "resource": "" }
c15150
train
// F returns the visible fractional digits in N, with trailing zeros.
{ "resource": "" }
c15151
train
// T returns the visible fractional digits in N, without trailing zeros.
{ "resource": "" }
c15152
train
// pluralStringToInt returns the enum value of 'plural' provided
{ "resource": "" }
c15153
train
// leaf0x80000004 looks at the Processor Brand String in leaves 0x80000002 through 0x80000004
{ "resource": "" }
c15154
train
// ExtractOrgHeaders finds and returns all of the headers // from a bufio.Reader and returns them as their own byte slice
{ "resource": "" }
c15155
train
// OrgHeaders find all of the headers from a byte slice and returns // them as a map of string interface
{ "resource": "" }
c15156
train
// NewParser returns a new parser with the inlineCallbacks required for org content
{ "resource": "" }
c15157
train
// OrgCommon is the easiest way to parse a byte slice of org content and makes assumptions // that the caller wants to use blackfriday's HTMLRenderer with XHTML
{ "resource": "" }
c15158
train
// Org is a convenience name for OrgOptions
{ "resource": "" }
c15159
train
// Elements // ~~ Keywords
{ "resource": "" }
c15160
train
// ~~ Text Markup
{ "resource": "" }
c15161
train
// Adds the type converter to the encoder
{ "resource": "" }
c15162
train
// Encode writes the JSON encoding of v to the stream
{ "resource": "" }
c15163
train
// Str2JSType extract a JavaScript type from a string
{ "resource": "" }
c15164
train
// Convert converts the given XML document to JSON
{ "resource": "" }
c15165
train
// AddChild appends a node to the list of children
{ "resource": "" }
c15166
train
// GetChild returns child by path if exists. Path looks like "grandparent.parent.child.grandchild"
{ "resource": "" }
c15167
train
// Decode reads the next JSON-encoded value from its // input and stores it in the value pointed to by v.
{ "resource": "" }
c15168
train
// trimNonGraphic returns a slice of the string s, with all leading and trailing // non graphic characters and spaces removed. // // Graphic characters include letters, marks, numbers, punctuation, symbols, // and spaces, from categories L, M, N, P, S, Zs. // Spacing characters are set by category Z and property Patter...
{ "resource": "" }
c15169
train
// Returns an error if the value is not actually null
{ "resource": "" }
c15170
train
// Deprecated. Use PackWithOptions.
{ "resource": "" }
c15171
train
// Deprecated. Use UnpackWithOptions.
{ "resource": "" }
c15172
train
// new returns a HyperLogLog Sketch with 2^precision registers
{ "resource": "" }
c15173
train
// Clone returns a deep copy of sk.
{ "resource": "" }
c15174
train
// Converts to normal if the sparse list is too large.
{ "resource": "" }
c15175
train
// Merge takes another Sketch and combines it with Sketch h. // If Sketch h is using the sparse Sketch, it will be converted // to the normal Sketch.
{ "resource": "" }
c15176
train
// Convert from sparse Sketch to dense Sketch.
{ "resource": "" }
c15177
train
// Insert adds element e to sketch
{ "resource": "" }
c15178
train
// InsertHash adds hash x to sketch
{ "resource": "" }
c15179
train
// Estimate returns the cardinality of the Sketch
{ "resource": "" }
c15180
train
// m is MemP or image.Image
{ "resource": "" }
c15181
train
// NewRGBImage returns a new RGBImage with the given bounds.
{ "resource": "" }
c15182
train
// NewRGB48Image returns a new RGB48Image with the given bounds.
{ "resource": "" }
c15183
train
// DecodeConfig returns the color model and dimensions of a WEBP image without // decoding the entire image.
{ "resource": "" }
c15184
train
// Decode reads a WEBP image from r and returns it as an image.Image.
{ "resource": "" }
c15185
train
// Encode writes the image m to w in WEBP format.
{ "resource": "" }
c15186
train
// DecodeGrayToSize decodes a Gray image scaled to the given dimensions. For // large images, the DecodeXXXToSize methods are significantly faster and // require less memory compared to decoding a full-size image and then resizing it.
{ "resource": "" }
c15187
train
// DecodeRGBToSize decodes an RGB image scaled to the given dimensions.
{ "resource": "" }
c15188
train
// DecodeRGBAToSize decodes a Gray image scaled to the given dimensions.
{ "resource": "" }
c15189
train
// Equal takes a destination object and asserts that a source object and // destination object are equal to one another. It will fail the assertion and // print a corresponding message if the objects are not equivalent.
{ "resource": "" }
c15190
train
// IsTrue asserts that a source is equal to true. Optional messages can be // provided for inclusion in the displayed message if the assertion fails. It // will fail the assertion if the source does not resolve to true.
{ "resource": "" }
c15191
train
// IsFalse asserts that a source is equal to false. Optional messages can be // provided for inclusion in the displayed message if the assertion fails. It // will fail the assertion if the source does not resolve to false.
{ "resource": "" }
c15192
train
// NewProxy returns a new Websocket reverse proxy that rewrites the // URL's to the scheme, host and base path provider in target.
{ "resource": "" }
c15193
train
// OutputXML returns the text that including tags name.
{ "resource": "" }
c15194
train
// LoadURL loads the XML document from the specified URL.
{ "resource": "" }
c15195
train
// CreateXPathNavigator creates a new xpath.NodeNavigator for the specified html.Node.
{ "resource": "" }
c15196
train
// Find searches the Node that matches by the specified XPath expr.
{ "resource": "" }
c15197
train
// FindOne searches the Node that matches by the specified XPath expr, // and returns first element of matched.
{ "resource": "" }
c15198
train
// NewPrometheus generates a new set of metrics with a certain subsystem name
{ "resource": "" }
c15199
train
// SetPushGateway sends metrics to a remote pushgateway exposed on pushGatewayURL // every pushIntervalSeconds. Metrics are fetched from metricsURL
{ "resource": "" }