_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c20300
train
// Mostly copied from gofmt
{ "resource": "" }
c20301
train
// parseExpr parses s as an expression. // It might make sense to expand this to allow statement patterns, // but there are problems with preserving formatting and also // with what a wildcard for a statement looks like.
{ "resource": "" }
c20302
train
// subst returns a copy of pattern with values from m substituted in place // of wildcards and pos used as the position of tokens from the pattern. // if m == nil, subst returns a copy of pattern and doesn't change the line // number information.
{ "resource": "" }
c20303
train
// NewOpt create an option matcher that can consume short and long options
{ "resource": "" }
c20304
train
// NewParseContext create a new ParseContext
{ "resource": "" }
c20305
train
// Merge adds the values in the provided context in the current context
{ "resource": "" }
c20306
train
// T creates a transition between 2 states
{ "resource": "" }
c20307
train
// Prepare simplifies the FSM and sorts the transitions according to their priorities
{ "resource": "" }
c20308
train
// Parse tries to navigate into the FSM according to the provided args
{ "resource": "" }
c20309
train
// IsBool checks if a given value is a bool value, i.e. implements the BoolValued interface
{ "resource": "" }
c20310
train
// SetFromEnv fills a value from a list of env vars
{ "resource": "" }
c20311
train
// Parse transforms a slice of tokens into an FSM or returns an ParseError
{ "resource": "" }
c20312
train
// Dot generates a graphviz dot representation of an FSM
{ "resource": "" }
c20313
train
// NewBool creates a new bool value
{ "resource": "" }
c20314
train
// NewString creates a new string value
{ "resource": "" }
c20315
train
// NewInt creates a new int value
{ "resource": "" }
c20316
train
// NewFloat64 creates a new int value
{ "resource": "" }
c20317
train
// NewStrings creates a new multi-string value
{ "resource": "" }
c20318
train
// NewInts creates a new multi-int value
{ "resource": "" }
c20319
train
// NewFloats64 creates a new multi-int value
{ "resource": "" }
c20320
train
// NewOptions create an Options matcher which can parse a group of options
{ "resource": "" }
c20321
train
// Exists checks if a directory exists or not
{ "resource": "" }
c20322
train
// Parse a directory to build a list of directories to be made at b0x.go
{ "resource": "" }
c20323
train
// Insert a new folder to the list
{ "resource": "" }
c20324
train
// Get gets the list of file hash from the server
{ "resource": "" }
c20325
train
// Updatable checks if there is any file that should be updaTed
{ "resource": "" }
c20326
train
// EqualHashes builds the list of local hashes before // checking if there is any that should be updated
{ "resource": "" }
c20327
train
// UpdateFiles sends all files that should be updated to the server // the limit is 3 concurrent files at once
{ "resource": "" }
c20328
train
// Set the template to be used // "files" or "file"
{ "resource": "" }
c20329
train
// Exec the template and return the final data as byte array
{ "resource": "" }
c20330
train
// Defaults set the default value for some variables
{ "resource": "" }
c20331
train
// Parse gets the config file's content from File.Data
{ "resource": "" }
c20332
train
// RemoveJSONComments from the file
{ "resource": "" }
c20333
train
// NewGzip creates a Gzip + Options variable
{ "resource": "" }
c20334
train
// Compress to gzip
{ "resource": "" }
c20335
train
// GetCurrentDir gets the directory where the application was run
{ "resource": "" }
c20336
train
// NewCarbon returns a pointer to a new Carbon instance
{ "resource": "" }
c20337
train
// After will be behave like time.After unless time has been frozen // If time is frozen it will add the expected delay and immediately send the frozen time on the returned channel
{ "resource": "" }
c20338
train
// Sleep will be behave like time.Sleep unless time has been frozen // If time is frozen it will add the expected sleep delay and return immediately
{ "resource": "" }
c20339
train
// create returns a new carbon pointe. It is a helper function to create new dates
{ "resource": "" }
c20340
train
// Create returns a new pointer to Carbon instance from a specific date and time. // If the location is invalid, it returns an error instead.
{ "resource": "" }
c20341
train
// CreateFromTime returns a new pointer to a Carbon instance from just a date. // The time portion is set to now. // If the locations is invalid, it returns an error instead.
{ "resource": "" }
c20342
train
// CreateFromFormat returns a new pointer to a Carbon instance from a specific format. // If the location is invalid, it returns an error instead.
{ "resource": "" }
c20343
train
// CreateFromTimestamp returns a new pointer to a Carbon instance from a timestamp. // If the location is invalid, it returns an error instead.
{ "resource": "" }
c20344
train
// CreateFromMonthAndYear returns a new pointer to a Carbon instance from a specific month and year. // If the location is invalid, it returns an error instead.
{ "resource": "" }
c20345
train
// Today returns a pointer to a new carbon instance for today // If the location is invalid, it returns an error instead.
{ "resource": "" }
c20346
train
// Tomorrow returns a pointer to a new carbon instance for tomorrow // If the location is invalid, it returns an error instead.
{ "resource": "" }
c20347
train
// Yesterday returns a pointer to a new carbon instance for yesterday // If the location is invalid, it returns an error instead.
{ "resource": "" }
c20348
train
// Copy returns a new copy of the current Carbon instance
{ "resource": "" }
c20349
train
// Quarter gets the current quarter
{ "resource": "" }
c20350
train
// WeekOfMonth returns the week of the month
{ "resource": "" }
c20351
train
// AddYears adds a year to the current time. // Positive values travel forward while negative values travel into the past
{ "resource": "" }
c20352
train
// AddQuarters adds quarters to the current time. // Positive values travel forward while negative values travel into the past
{ "resource": "" }
c20353
train
// AddCenturies adds centuries to the time. // Positive values travels forward while negative values travels into the past
{ "resource": "" }
c20354
train
// AddMonths adds months to the current time. // Positive value travels forward while negative values travels into the past
{ "resource": "" }
c20355
train
// AddSeconds adds seconds to the current time. // Positive values travels forward while negative values travels into the past.
{ "resource": "" }
c20356
train
// AddDays adds a day to the current time. // Positive value travels forward while negative value travels into the past
{ "resource": "" }
c20357
train
// AddWeekdays adds a weekday to the current time. // Positive value travels forward while negative value travels into the past
{ "resource": "" }
c20358
train
// AddWeeks adds a week to the current time. // Positive value travels forward while negative value travels into the past.
{ "resource": "" }
c20359
train
// AddHours adds an hour to the current time. // Positive value travels forward while negative value travels into the past
{ "resource": "" }
c20360
train
// AddMonthsNoOverflow adds a month to the current time, not overflowing in case the // destination month has less days than the current one. // Positive value travels forward while negative value travels into the past.
{ "resource": "" }
c20361
train
// AddMinutes adds minutes to the current time. // Positive value travels forward while negative value travels into the past.
{ "resource": "" }
c20362
train
// SetYear sets the year of the current time
{ "resource": "" }
c20363
train
// SetMonth sets the month of the current time
{ "resource": "" }
c20364
train
// SetDay sets the day of the current time
{ "resource": "" }
c20365
train
// SetHour sets the hour of the current time
{ "resource": "" }
c20366
train
// SetMinute sets the minute of the current time
{ "resource": "" }
c20367
train
// SetSecond sets the second of the current time
{ "resource": "" }
c20368
train
// SetDate sets only the date of the current time
{ "resource": "" }
c20369
train
// SetDateTime sets the date and the time
{ "resource": "" }
c20370
train
// SetTimestamp sets the current time given a timestamp
{ "resource": "" }
c20371
train
// SetTimeZone sets the location from a string // If the location is invalid, it returns an error instead.
{ "resource": "" }
c20372
train
// IsWeekend determines if the current time is a weekend day
{ "resource": "" }
c20373
train
// IsYesterday determines if the current time is yesterday
{ "resource": "" }
c20374
train
// IsTomorrow determines if the current time is tomorrow
{ "resource": "" }
c20375
train
// IsLeapYear determines if current current time is a leap year
{ "resource": "" }
c20376
train
// IsLongYear determines if the instance is a long year
{ "resource": "" }
c20377
train
// IsSameAs compares the formatted values of the two dates. // If passed date is nil, compares against today
{ "resource": "" }
c20378
train
// IsSameYear checks if the passed in date is in the same year as the current time year. // If passed date is nil, compares against today
{ "resource": "" }
c20379
train
// IsSameMonth checks if the passed in date is in the same month as the current month // If passed date is nil, compares against today
{ "resource": "" }
c20380
train
// IsSameDay checks if the passed in date is the same day as the current day. // If passed date is nil, compares against today
{ "resource": "" }
c20381
train
// IsLastWeek returns true is the date is within last week
{ "resource": "" }
c20382
train
// IsLastMonth returns true is the date is within last month
{ "resource": "" }
c20383
train
// Eq determines if the current carbon is equal to another
{ "resource": "" }
c20384
train
// Closest returns the closest date from the current time
{ "resource": "" }
c20385
train
// Farthest returns the farthest date from the current time
{ "resource": "" }
c20386
train
// Min returns the minimum instance between a given instance and the current instance
{ "resource": "" }
c20387
train
// Max returns the maximum instance between a given instance and the current instance
{ "resource": "" }
c20388
train
// DiffInYears returns the difference in years
{ "resource": "" }
c20389
train
// DiffInMonths returns the difference in months
{ "resource": "" }
c20390
train
// DiffDurationInString returns the duration difference in string format
{ "resource": "" }
c20391
train
// DiffInWeeks returns the difference in weeks
{ "resource": "" }
c20392
train
// DiffInDays returns the difference in days
{ "resource": "" }
c20393
train
// DiffInNights returns the difference in nights
{ "resource": "" }
c20394
train
// DiffInDaysFiltered returns the difference in days using a filter
{ "resource": "" }
c20395
train
// DiffInHoursFiltered returns the difference in hours using a filter
{ "resource": "" }
c20396
train
// DiffInWeekdays returns the difference in weekdays
{ "resource": "" }
c20397
train
// DiffInWeekendDays returns the difference in weekend days using a filter
{ "resource": "" }
c20398
train
// DiffFiltered returns the difference by the given duration using a filter
{ "resource": "" }
c20399
train
// DiffInHours returns the difference in hours
{ "resource": "" }