_id
stringlengths 2
7
| title
stringlengths 1
118
| partition
stringclasses 3
values | text
stringlengths 17
51.2k
| language
stringclasses 1
value | meta_information
dict |
---|---|---|---|---|---|
c0 | getStringValue | train | nil {
return 0, err
}
b[i-1] = c
b = append(b[:i], b[i+1:]...)
i--*/
continue
}
}
if !endQuote {
return 0, NewParseError("missing '\"' in string value")
}
return i + 1, nil
} | go | {
"resource": ""
} |
c1 | getBoolValue | train |
if isLitValue(lv, b) {
n = len(lv)
}
}
if n == 0 {
return 0, NewParseError("invalid boolean value")
}
return n, nil
} | go | {
"resource": ""
} |
c2 | getNumericalValue | train | return 0, 0, err
}
negativeIndex = 0
case 'b':
if helper.numberFormat == hex {
break
}
fallthrough
case 'o', 'x':
if i == 0 && b[i] != '0' {
return 0, 0, NewParseError("incorrect base format, expected leading '0'")
}
if i != 1 {
return 0, 0, NewParseError(fmt.Sprintf("incorrect base format found %s at %d index", string(b[i]), i))
}
if err := helper.Determine(b[i]); err != nil {
return 0, 0, err
}
default:
if isWhitespace(b[i]) {
break loop
}
if isNewline(b[i:]) {
break loop
}
if !(helper.numberFormat == hex && isHexByte(b[i])) {
if i+2 < len(b) && !isNewline(b[i:i+2]) {
return 0, 0, NewParseError("invalid numerical character")
} else if !isNewline([]rune{b[i]}) {
return 0, 0, NewParseError("invalid numerical character")
}
break loop
}
}
}
}
return helper.Base(), i, nil
} | go | {
"resource": ""
} |
c3 | getNegativeNumber | train | if !isDigit(b[i]) {
return i
}
}
return i
} | go | {
"resource": ""
} |
c4 | isEscaped | train | case '\\': // backslash
default:
return false
}
return value[len(value)-1] == '\\'
} | go | {
"resource": ""
} |
c5 | OpenFile | train | Sections{}, awserr.New(ErrCodeUnableToReadFile, "unable to open file", err)
}
defer f.Close()
return Parse(f)
} | go | {
"resource": ""
} |
c6 | Parse | train |
if err = Walk(tree, v); err != nil {
return Sections{}, err
}
return v.Sections, nil
} | go | {
"resource": ""
} |
c7 | ParseBytes | train |
if err = Walk(tree, v); err != nil {
return Sections{}, err
}
return v.Sections, nil
} | go | {
"resource": ""
} |
c8 | BuildInputShape | train | b.GoType(ref, true),
b.BuildShape(ref, c.Input, false),
)
} | go | {
"resource": ""
} |
c9 | SetMessageVersion | train | s.MessageVersion = &v
return s
} | go | {
"resource": ""
} |
c10 | SetPrompt | train | {
s.Prompt = v
return s
} | go | {
"resource": ""
} |
c11 | SetCodeHook | train | *CodeHook) *FulfillmentActivity {
s.CodeHook = v
return s
} | go | {
"resource": ""
} |
c12 | SetBotAliases | train | *GetBotAliasesOutput {
s.BotAliases = v
return s
} | go | {
"resource": ""
} |
c13 | SetBotChannelAssociations | train | []*BotChannelAssociation) *GetBotChannelAssociationsOutput {
s.BotChannelAssociations = v
return s
} | go | {
"resource": ""
} |
c14 | SetVersionOrAlias | train | s.VersionOrAlias = &v
return s
} | go | {
"resource": ""
} |
c15 | SetBotVersions | train | []*string) *GetUtterancesViewInput {
s.BotVersions = v
return s
} | go | {
"resource": ""
} |
c16 | SetIntentVersion | train | s.IntentVersion = &v
return s
} | go | {
"resource": ""
} |
c17 | SetGroupNumber | train | s.GroupNumber = &v
return s
} | go | {
"resource": ""
} |
c18 | SetProcessBehavior | train | s.ProcessBehavior = &v
return s
} | go | {
"resource": ""
} |
c19 | SetSlotConstraint | train | s.SlotConstraint = &v
return s
} | go | {
"resource": ""
} |
c20 | SetSlotType | train | *Slot {
s.SlotType = &v
return s
} | go | {
"resource": ""
} |
c21 | SetSlotTypeVersion | train | s.SlotTypeVersion = &v
return s
} | go | {
"resource": ""
} |
c22 | SetValueElicitationPrompt | train | s.ValueElicitationPrompt = v
return s
} | go | {
"resource": ""
} |
c23 | SetDistinctUsers | train | s.DistinctUsers = &v
return s
} | go | {
"resource": ""
} |
c24 | SetFirstUtteredDate | train | s.FirstUtteredDate = &v
return s
} | go | {
"resource": ""
} |
c25 | SetLastUtteredDate | train | s.LastUtteredDate = &v
return s
} | go | {
"resource": ""
} |
c26 | SetUtteranceString | train | s.UtteranceString = &v
return s
} | go | {
"resource": ""
} |
c27 | decryptHandler | train | return nil, awserr.New("MissingCMKIDError", "Material description is missing CMK ID", nil)
}
kp.CipherData.MaterialDescription = m
kp.cmkID = cmkID
kp.WrapAlgorithm = KMSWrap
return &kp, nil
} | go | {
"resource": ""
} |
c28 | DecryptKey | train | GrantTokens: []*string{},
})
if err != nil {
return nil, err
}
return out.Plaintext, nil
} | go | {
"resource": ""
} |
c29 | GenerateCipherData | train | Key: out.Plaintext,
IV: iv,
WrapAlgorithm: KMSWrap,
MaterialDescription: kp.CipherData.MaterialDescription,
EncryptedKey: out.CiphertextBlob,
}
return cd, nil
} | go | {
"resource": ""
} |
c30 | DecryptContents | train | error) {
reader := cc.Cipher.Decrypt(src)
return &CryptoReadCloser{Body: src, Decrypter: reader}, nil
} | go | {
"resource": ""
} |
c31 | SetUpdateId | train | {
s.UpdateId = &v
return s
} | go | {
"resource": ""
} |
c32 | SetUpdateIds | train | {
s.UpdateIds = v
return s
} | go | {
"resource": ""
} |
c33 | SetClusterLogging | train | *Logging {
s.ClusterLogging = v
return s
} | go | {
"resource": ""
} |
c34 | SetParams | train | *Update {
s.Params = v
return s
} | go | {
"resource": ""
} |
c35 | IsReaderSeekable | train | return v.IsSeeker()
case io.ReadSeeker:
return true
default:
return false
}
} | go | {
"resource": ""
} |
c36 | Read | train | io.Reader:
return t.Read(p)
}
return 0, nil
} | go | {
"resource": ""
} |
c37 | IsSeeker | train | ok := r.r.(io.Seeker)
return ok
} | go | {
"resource": ""
} |
c38 | SeekerLen | train | a io.Readers might not actually be seekable.
switch v := s.(type) {
case ReaderSeekerCloser:
return v.GetLen()
case *ReaderSeekerCloser:
return v.GetLen()
}
return seekerLen(s)
} | go | {
"resource": ""
} |
c39 | Close | train |
case io.Closer:
return t.Close()
}
return nil
} | go | {
"resource": ""
} |
c40 | WriteAt | train | if int64(cap(b.buf)) < expLen {
if b.GrowthCoeff < 1 {
b.GrowthCoeff = 1
}
newBuf := make([]byte, expLen, int64(b.GrowthCoeff*float64(expLen)))
copy(newBuf, b.buf)
b.buf = newBuf
}
b.buf = b.buf[:expLen]
}
copy(b.buf[pos:], p)
return pLen, nil
} | go | {
"resource": ""
} |
c41 | Bytes | train | defer b.m.Unlock()
return b.buf
} | go | {
"resource": ""
} |
c42 | SetCpuThreshold | train | {
s.CpuThreshold = &v
return s
} | go | {
"resource": ""
} |
c43 | SetIgnoreMetricsTime | train | int64) *AutoScalingThresholds {
s.IgnoreMetricsTime = &v
return s
} | go | {
"resource": ""
} |
c44 | SetLoadThreshold | train | {
s.LoadThreshold = &v
return s
} | go | {
"resource": ""
} |
c45 | SetMemoryThreshold | train | {
s.MemoryThreshold = &v
return s
} | go | {
"resource": ""
} |
c46 | SetThresholdsWaitTime | train | s.ThresholdsWaitTime = &v
return s
} | go | {
"resource": ""
} |
c47 | SetEbs | train | *BlockDeviceMapping {
s.Ebs = v
return s
} | go | {
"resource": ""
} |
c48 | SetBerkshelfVersion | train | s.BerkshelfVersion = &v
return s
} | go | {
"resource": ""
} |
c49 | SetManageBerkshelf | train | s.ManageBerkshelf = &v
return s
} | go | {
"resource": ""
} |
c50 | SetCloneAppIds | train | []*string) *CloneStackInput {
s.CloneAppIds = v
return s
} | go | {
"resource": ""
} |
c51 | SetClonePermissions | train | s.ClonePermissions = &v
return s
} | go | {
"resource": ""
} |
c52 | SetSourceStackId | train | s.SourceStackId = &v
return s
} | go | {
"resource": ""
} |
c53 | SetBatchCount | train | int64) *CloudWatchLogsLogStream {
s.BatchCount = &v
return s
} | go | {
"resource": ""
} |
c54 | SetBufferDuration | train | {
s.BufferDuration = &v
return s
} | go | {
"resource": ""
} |
c55 | SetDatetimeFormat | train | {
s.DatetimeFormat = &v
return s
} | go | {
"resource": ""
} |
c56 | SetFileFingerprintLines | train | string) *CloudWatchLogsLogStream {
s.FileFingerprintLines = &v
return s
} | go | {
"resource": ""
} |
c57 | SetInitialPosition | train | {
s.InitialPosition = &v
return s
} | go | {
"resource": ""
} |
c58 | SetMultiLineStartPattern | train | string) *CloudWatchLogsLogStream {
s.MultiLineStartPattern = &v
return s
} | go | {
"resource": ""
} |
c59 | SetAcknowledgedAt | train | s.AcknowledgedAt = &v
return s
} | go | {
"resource": ""
} |
c60 | SetDeleteElasticIp | train | s.DeleteElasticIp = &v
return s
} | go | {
"resource": ""
} |
c61 | SetDeleteVolumes | train | bool) *DeleteInstanceInput {
s.DeleteVolumes = &v
return s
} | go | {
"resource": ""
} |
c62 | SetAgentVersions | train | []*AgentVersion) *DescribeAgentVersionsOutput {
s.AgentVersions = v
return s
} | go | {
"resource": ""
} |
c63 | SetCommandIds | train | []*string) *DescribeCommandsInput {
s.CommandIds = v
return s
} | go | {
"resource": ""
} |
c64 | SetEcsClusterArns | train | []*string) *DescribeEcsClustersInput {
s.EcsClusterArns = v
return s
} | go | {
"resource": ""
} |
c65 | SetEcsClusters | train | []*EcsCluster) *DescribeEcsClustersOutput {
s.EcsClusters = v
return s
} | go | {
"resource": ""
} |
c66 | SetIps | train | []*string) *DescribeElasticIpsInput {
s.Ips = v
return s
} | go | {
"resource": ""
} |
c67 | SetElasticIps | train | []*ElasticIp) *DescribeElasticIpsOutput {
s.ElasticIps = v
return s
} | go | {
"resource": ""
} |
c68 | SetElasticLoadBalancers | train | []*ElasticLoadBalancer) *DescribeElasticLoadBalancersOutput {
s.ElasticLoadBalancers = v
return s
} | go | {
"resource": ""
} |
c69 | SetLoadBasedAutoScalingConfigurations | train | *DescribeLoadBasedAutoScalingOutput {
s.LoadBasedAutoScalingConfigurations = v
return s
} | go | {
"resource": ""
} |
c70 | SetUserProfile | train | *SelfUserProfile) *DescribeMyUserProfileOutput {
s.UserProfile = v
return s
} | go | {
"resource": ""
} |
c71 | SetOperatingSystems | train | []*OperatingSystem) *DescribeOperatingSystemsOutput {
s.OperatingSystems = v
return s
} | go | {
"resource": ""
} |
c72 | SetRaidArrayIds | train | []*string) *DescribeRaidArraysInput {
s.RaidArrayIds = v
return s
} | go | {
"resource": ""
} |
c73 | SetRaidArrays | train | []*RaidArray) *DescribeRaidArraysOutput {
s.RaidArrays = v
return s
} | go | {
"resource": ""
} |
c74 | SetRdsDbInstanceArns | train | []*string) *DescribeRdsDbInstancesInput {
s.RdsDbInstanceArns = v
return s
} | go | {
"resource": ""
} |
c75 | SetRdsDbInstances | train | []*RdsDbInstance) *DescribeRdsDbInstancesOutput {
s.RdsDbInstances = v
return s
} | go | {
"resource": ""
} |
c76 | SetServiceErrorIds | train | []*string) *DescribeServiceErrorsInput {
s.ServiceErrorIds = v
return s
} | go | {
"resource": ""
} |
c77 | SetServiceErrors | train | []*ServiceError) *DescribeServiceErrorsOutput {
s.ServiceErrors = v
return s
} | go | {
"resource": ""
} |
c78 | SetAgentInstallerUrl | train | string) *DescribeStackProvisioningParametersOutput {
s.AgentInstallerUrl = &v
return s
} | go | {
"resource": ""
} |
c79 | SetStackSummary | train | *StackSummary) *DescribeStackSummaryOutput {
s.StackSummary = v
return s
} | go | {
"resource": ""
} |
c80 | SetStackIds | train | []*string) *DescribeStacksInput {
s.StackIds = v
return s
} | go | {
"resource": ""
} |
c81 | SetStacks | train | []*Stack) *DescribeStacksOutput {
s.Stacks = v
return s
} | go | {
"resource": ""
} |
c82 | SetTimeBasedAutoScalingConfigurations | train | *DescribeTimeBasedAutoScalingOutput {
s.TimeBasedAutoScalingConfigurations = v
return s
} | go | {
"resource": ""
} |
c83 | SetIamUserArns | train | []*string) *DescribeUserProfilesInput {
s.IamUserArns = v
return s
} | go | {
"resource": ""
} |
c84 | SetVolumeIds | train | []*string) *DescribeVolumesInput {
s.VolumeIds = v
return s
} | go | {
"resource": ""
} |
c85 | SetEcsClusterName | train | s.EcsClusterName = &v
return s
} | go | {
"resource": ""
} |
c86 | SetEc2InstanceIds | train | {
s.Ec2InstanceIds = v
return s
} | go | {
"resource": ""
} |
c87 | SetSecure | train | bool) *EnvironmentVariable {
s.Secure = &v
return s
} | go | {
"resource": ""
} |
c88 | SetTemporaryCredential | train | *GrantAccessOutput {
s.TemporaryCredential = v
return s
} | go | {
"resource": ""
} |
c89 | SetEcsContainerInstanceArn | train | s.EcsContainerInstanceArn = &v
return s
} | go | {
"resource": ""
} |
c90 | SetInfrastructureClass | train | s.InfrastructureClass = &v
return s
} | go | {
"resource": ""
} |
c91 | SetLastServiceErrorId | train | s.LastServiceErrorId = &v
return s
} | go | {
"resource": ""
} |
c92 | SetPrivateDns | train | s.PrivateDns = &v
return s
} | go | {
"resource": ""
} |
c93 | SetPublicDns | train | s.PublicDns = &v
return s
} | go | {
"resource": ""
} |
c94 | SetRegisteredBy | train | s.RegisteredBy = &v
return s
} | go | {
"resource": ""
} |
c95 | SetReportedAgentVersion | train | s.ReportedAgentVersion = &v
return s
} | go | {
"resource": ""
} |
c96 | SetReportedOs | train | *Instance {
s.ReportedOs = v
return s
} | go | {
"resource": ""
} |
c97 | SetRootDeviceVolumeId | train | s.RootDeviceVolumeId = &v
return s
} | go | {
"resource": ""
} |
c98 | SetSshHostDsaKeyFingerprint | train | s.SshHostDsaKeyFingerprint = &v
return s
} | go | {
"resource": ""
} |
c99 | SetSshHostRsaKeyFingerprint | train | s.SshHostRsaKeyFingerprint = &v
return s
} | go | {
"resource": ""
} |