id stringlengths 2 7 | text stringlengths 17 51.2k | title stringclasses 1
value |
|---|---|---|
c20100 | s.Get(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators", teamAppIdentity), nil, lr)
} | |
c20101 | {
var teamAppPermission TeamAppPermissionListResult
return teamAppPermission, s.Get(ctx, &teamAppPermission, fmt.Sprintf("/teams/permissions"), nil, lr)
} | |
c20102 | s.Get(ctx, &teamFeature, fmt.Sprintf("/teams/%v/features/%v", teamIdentity, teamFeatureIdentity), nil, nil)
} | |
c20103 | s.Get(ctx, &teamFeature, fmt.Sprintf("/teams/%v/features", teamIdentity), nil, lr)
} | |
c20104 | s.Put(ctx, &teamInvitation, fmt.Sprintf("/teams/%v/invitations", teamIdentity), o)
} | |
c20105 | s.Delete(ctx, &teamInvitation, fmt.Sprintf("/teams/%v/invitations/%v", teamIdentity, teamInvitationIdentity))
} | |
c20106 | &teamInvitation, fmt.Sprintf("/teams/invitations/%v/accept", teamInvitationToken), nil)
} | |
c20107 | &teamMember, s.Put(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), o)
} | |
c20108 | &teamMember, s.Post(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), o)
} | |
c20109 | &teamMember, s.Patch(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), o)
} | |
c20110 | s.Delete(ctx, &teamMember, fmt.Sprintf("/teams/%v/members/%v", teamIdentity, teamMemberIdentity))
} | |
c20111 | s.Get(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), nil, lr)
} | |
c20112 | s.Get(ctx, &teamMember, fmt.Sprintf("/teams/%v/members/%v/apps", teamIdentity, teamMemberIdentity), nil, lr)
} | |
c20113 | &teamPreferences, fmt.Sprintf("/teams/%v/preferences", teamPreferencesIdentity), nil, nil)
} | |
c20114 | s.Patch(ctx, &teamPreferences, fmt.Sprintf("/teams/%v/preferences", teamPreferencesIdentity), o)
} | |
c20115 | &userPreferences, fmt.Sprintf("/users/%v/preferences", userPreferencesIdentity), nil, nil)
} | |
c20116 | s.Patch(ctx, &userPreferences, fmt.Sprintf("/users/%v/preferences", userPreferencesIdentity), o)
} | |
c20117 | s.Post(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections", spaceIdentity), o)
} | |
c20118 | s.Delete(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections/%v", spaceIdentity, vpnConnectionIdentity))
} | |
c20119 | s.Get(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections", spaceIdentity), nil, lr)
} | |
c20120 | s.Get(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections/%v", spaceIdentity, vpnConnectionIdentity), nil, nil)
} | |
c20121 | s.Get(ctx, &whitelistedAddOnService, fmt.Sprintf("/organizations/%v/whitelisted-addon-services", organizationIdentity), nil, lr)
} | |
c20122 | s.Get(ctx, &whitelistedAddOnService, fmt.Sprintf("/teams/%v/whitelisted-addon-services", teamIdentity), nil, lr)
} | |
c20123 | Transport of type %T doesn't support CancelRequest; Timeout not supported\n", t.Transport)
return
}
tr.CancelRequest(req)
} | |
c20124 | mgrRegistryMtx.Unlock()
mgrRegistry[mgr] = true
return mgr
} | |
c20125 | mgrRegistryMtx.Unlock()
delete(mgrRegistry, m)
} | |
c20126 | m.mtx.Unlock()
if !found {
return nil, false
}
value, ok = state[key]
return value, ok
} | |
c20127 | func() {
return func() { mgr.SetValues(values, cb) }
}(mgr, cb)
}
}
go cb()
} | |
c20128 | 1
return ContextKey{id: keyCounter}
} | |
c20129 |
defer stackTagPool.Release(gid)
addStackTag(gid, func() { cb(gid) })
} | |
c20130 | its goroutines be freed up by the CancelFunc and
// exit with an error to the stack
clientCancel()
return grpc.Errorf(codes.Internal, "failed proxying s2c: %v", s2cErr)
}
case c2sErr := <-c2sErrChan:
// This happens when the clientStream has nothing else to offer (io.EOF), returned a gRPC error. In... | |
c20131 |
f.m.Lock()
f.refs++
f.m.Unlock()
} | |
c20132 | <= 0 {
f.SegmentLocs.DecRef()
f.SegmentLocs = nil
f.ss = nil
}
f.m.Unlock()
} | |
c20133 |
footerLen := footerBegLen + len(jBuf) + footerEndLen
return uint64(footerLen)
} | |
c20134 |
m.stats.AtomicCopyTo(rv)
m.m.Lock()
m.statsSegmentsLOCKED(rv)
m.m.Unlock()
return rv, nil
} | |
c20135 | rv.CurDirtyTopSegments = sssDirtyTop.CurSegments
}
if sssDirtyMid != nil {
rv.CurDirtyMidOps = sssDirtyMid.CurOps
rv.CurDirtyMidBytes = sssDirtyMid.CurBytes
rv.CurDirtyMidSegments = sssDirtyMid.CurSegments
}
if sssDirtyBase != nil {
rv.CurDirtyBaseOps = sssDirtyBase.CurOps
rv.CurDirtyBaseBytes = sssDir... | |
c20136 | has been deleted and quickly
// recreated. Here we drop the existing store footer's
// segments that correspond to the prior incarnation.
storeChildFooter = nil
}
}
}
childFooter := s.buildNewFooter(storeChildFooter, childStack)
if len(footer.ChildFooters) == 0 {
footer.ChildFooters = m... | |
c20137 | // With multiple child collections it is possible that some child
// collections segments are empty. Ok to skip these empty segments.
continue
}
segmentLoc, err := s.persistSegment(file, segment, s.options)
if err != nil {
return err
}
footer.SegmentLocs = append(footer.SegmentLocs, segmentLoc)
}... | |
c20138 | if s.options.CollectionOptions.Log != nil {
s.options.CollectionOptions.Log(
"store: error deleting file %s, err: %v",
fileName, err)
}
}
}()
})
}
return finfo, nil
} | |
c20139 | {
return pos - rem
}
return pos
} | |
c20140 | "total_compaction_written_bytes": totCompactionWrittenBytes,
"num_segments": numSegments,
"num_last_compaction_before_bytes": numLastCompactionBeforeBytes,
"num_last_compaction_after_bytes": numLastCompactionAfterBytes,
"total_compaction_decrease_bytes": totCompactionDecreaseBytes,
"... | |
c20141 | := make(ghistogram.Histograms)
histogramsSnapshot.AddAll(s.histograms)
return histogramsSnapshot
} | |
c20142 | atomic.AddUint64(&m.stats.TotCloseLowerLevelEnd, 1)
}
stackDirtyTopPrev := m.stackDirtyTop
m.stackDirtyTop = nil
stackDirtyMidPrev := m.stackDirtyMid
m.stackDirtyMid = nil
stackDirtyBasePrev := m.stackDirtyBase
m.stackDirtyBase = nil
stackCleanPrev := m.stackClean
m.stackClean = nil
m.m.Unlock()
stack... | |
c20143 | collection holds 1 ref count for its cached snapshot copy.
m.latestSnapshot = reuseSnapshot(rv)
}
}
m.m.Unlock()
return
} | |
c20144 | m.snapshot(0, nil, true) // collection lock already held.
atomic.AddUint64(&m.stats.TotSnapshotEnd, 1)
return rv, nil
} | |
c20145 | err := m.get(key, readOptions)
if err != nil {
atomic.AddUint64(&m.stats.TotGetErr, 1)
}
return val, err
} | |
c20146 |
atomic.AddUint64(&m.stats.TotNewBatchTotalKeyValBytes, uint64(totalKeyValBytes))
return newBatch(m, BatchOptions{totalOps, totalKeyValBytes})
} | |
c20147 | != nil {
childSnap, _ = src.ChildCollectionSnapshot(cName)
}
dst.childSegStacks[cName] =
childCollection.appendChildLLSnapshot(dstChildStack, childSnap)
}
return dst
} | |
c20148 | if !exists || // This child collection was dropped recently, OR
// this child collection was recreated quickly.
childCollection.incarNum != srcChildStack.incarNum {
continue
}
dstChildStack := childCollection.getOrInitChildStack(dst, cName)
dst.childSegStacks[cName] =
childCollection.appendChildSta... | |
c20149 |
return ErrIteratorDone
}
return nil
} | |
c20150 | c.start && c.curr < c.end {
idx = c.curr
_, key, _ = c.s.getOperationKeyVal(c.curr)
}
return
} | |
c20151 | more accurate window.
return a.index.lookup(key)
}
return 0, a.Len()
} | |
c20152 |
for _, operand := range operands {
s = s + mo.Sep + string(operand)
}
return []byte(s), true
} | |
c20153 |
return []byte(string(leftOperand) + mo.Sep + string(rightOperand)), true
} | |
c20154 |
r.afterCloseCallbacks = append(r.afterCloseCallbacks, cb)
r.m.Unlock()
} | |
c20155 | file := r.file
r.m.Unlock()
return file
} | |
c20156 | r.file.Close()
for _, cb := range r.afterCloseCallbacks {
cb()
}
r.afterCloseCallbacks = nil
r.file = nil
}
r.m.Unlock()
return err
} | |
c20157 | r.m.Lock()
ref := r.refs
r.m.Unlock()
return ref
} | |
c20158 | osFile2, ok := f.(OsFile); ok {
return osFile2.OsFile()
}
return nil
} | |
c20159 | // Key does not satisfy the hop condition.
return true
}
s.offsets[s.numKeys] = uint32(s.numKeyBytes)
copy(s.data[s.numKeyBytes:], key)
s.numKeys++
s.numKeyBytes += len(key)
return true
} | |
c20160 |
keyStart = s.offsets[indexOfLastKey]
keyEnd = uint32(s.numKeyBytes)
cmp = bytes.Compare(s.data[keyStart:keyEnd], key)
if cmp < 0 {
leftPos = (indexOfLastKey) * s.hop
rightPos = s.srcKeyCount
return
}
for i < j {
h := i + (j-i)/2
keyStart = s.offsets[h]
if h < indexOfLastKey {
keyEnd = s.offsets[... | |
c20161 | += sss.CurOps
dest.CurBytes += sss.CurBytes
dest.CurSegments += sss.CurSegments
} | |
c20162 | rv.CurOps += uint64(seg.Len())
nk, nv := seg.NumKeyValBytes()
rv.CurBytes += nk + nv
}
return rv
} | |
c20163 | := range ss.childSegStacks {
childSnapshot.ensureFullySorted()
}
} | |
c20164 | error) {
return w.ss.Get(key, readOptions)
} | |
c20165 | IteratorOptions,
) (Iterator, error) {
return w.ss.StartIterator(startKeyInclusive, endKeyExclusive,
iteratorOptions)
} | |
c20166 | nil {
sloc.mref.AddRef()
}
}
} | |
c20167 | nil {
sloc.mref.DecRef()
}
}
} | |
c20168 |
s.m.Lock()
s.refs++
s.m.Unlock()
} | |
c20169 | s.refs > 0 || s.footer == nil {
return nil
}
footer := s.footer
s.footer = nil
return footer.Close()
} | |
c20170 | error {
if options.Abort {
close(s.abortCh)
}
return s.Close()
} | |
c20171 | cb(c)
if c.curBatch < 0 {
c.curBatch = 1000
}
if c.curSnapshot < 0 {
c.curSnapshot = 1000
}
if c.curIterator < 0 {
c.curIterator = 1000
}
if c.curKey < 0 {
c.curKey = 1000
}
return running, nil
}
} | |
c20172 | c.pvalues)
if err := c.Next(); err != nil {
r.handleError(c, err)
}
r.pool.Put(c)
} | |
c20173 | ok {
c.Error(httpError.Error(), httpError.StatusCode())
} else {
c.Error(err.Error(), http.StatusInternalServerError)
}
} | |
c20174 | return newRoute(path, r).Patch(handlers...)
} | |
c20175 | {
if r := c.router.routes[route]; r != nil {
return r.URL(pairs...)
}
return ""
} | |
c20176 |
default:
if data != nil {
return []byte(fmt.Sprint(data)), nil
}
}
return nil, nil
} | |
c20177 | r.group.router.add(method, r.path, hh)
return r
} | |
c20178 | break
}
}
template += path[end+1:start] + "<" + name + ">"
end = i
start = -1
}
}
if end < 0 {
template = path
} else if end < len(path)-1 {
template += path[end+1:]
}
return template
} | |
c20179 | uintptr(data))
if e != 0 {
return e
}
return nil
} | |
c20180 | } else {
var f js.Callback
f = js.NewCallback(func(args []js.Value) {
if args[0].String() == "granted" {
n.New(js.ValueOf(title), opts)
}
f.Release()
})
n.Call("requestPermission", f)
}
return
} | |
c20181 | err
}
return Beep(DefaultFreq, DefaultDuration)
} | |
c20182 | cmd()
}
defer conn.Close()
obj := conn.Object("org.freedesktop.Notifications", dbus.ObjectPath("/org/freedesktop/Notifications"))
call := obj.Call("org.freedesktop.Notifications.Notify", 0, "", uint32(0), appIcon, title, message, []string{}, map[string]dbus.Variant{}, int32(-1))
if call.Err != nil {
e := cmd... | |
c20183 | e != nil {
return errors.New("beeep: " + err.Error() + "; " + e.Error())
}
}
return nil
} | |
c20184 | ":") {
return false
}
return ipv6Pattern.MatchString(ip)
} | |
c20185 |
return nil, fmt.Errorf("Unable to parse IP address %q", ip)
}
IP := net.ParseIP(ip)
return &Hostname{domain, IP, enabled, LooksLikeIPv6(ip)}, nil
} | |
c20186 | enabled)
if err != nil {
panic(err)
}
return hostname
} | |
c20187 | == n.Domain && h.IP.Equal(n.IP)
} | |
c20188 | return h.IP.Equal(ip)
} | |
c20189 | c.Bool(key) || c.GlobalBool(key)
} | |
c20190 | os.Stderr.WriteString(fmt.Sprintf("%s\n", message))
}
} | |
c20191 | string) {
MaybeErrorln(c, message)
os.Exit(1)
} | |
c20192 | "q") && !AnyBool(c, "s") {
fmt.Println(message)
}
} | |
c20193 | }
MaybeError(c, "Errors while parsing hostsfile. Try hostess fix")
}
return hostsfile
} | |
c20194 | if len(errs) > 0 {
for _, err := range errs {
MaybeErrorln(c, err.Error())
}
}
return hostsfile
} | |
c20195 |
} else {
err := hostfile.Save()
if err != nil {
MaybeError(c, ErrCantWriteHostFile.Error())
}
}
} | |
c20196 | - len(s)
if r < 0 {
r = 0
}
return s + strings.Repeat(" ", r)
} | |
c20197 |
found := hostsfile.Hosts.ContainsDomain(domain)
if found {
MaybePrintln(c, fmt.Sprintf("Found %s in %s", domain, GetHostsPath()))
} else {
MaybeError(c, fmt.Sprintf("%s not found in %s", domain, GetHostsPath()))
}
} | |
c20198 | {
fmt.Printf("%s -> %s %s\n",
StrPadRight(hostname.Domain, maxdomain),
StrPadRight(hostname.IP.String(), maxip),
hostname.FormatEnabled())
}
} | |
c20199 | contains no dupes or conflicts; nothing to do", GetHostsPath()))
os.Exit(0)
}
MaybeSaveHostFile(c, hostsfile)
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.