_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c14800 | // OnSplitWithBits reports whether at least n consecutive trailing bits
// of the current checksum are set the same way. | |
c14801 | // MakeInterface returns a sort Interface using the provided length
// and pair of swap and less functions. | |
c14802 | // SliceSorter returns a sort.Interface to sort the provided slice
// using the provided less function.
// If the provided interface is not a slice, the function panics. | |
c14803 | // Slice sorts the provided slice using less.
// If the provided interface is not a slice, the function panics.
// The sort is not stable. For a stable sort, use sort.Stable with sort.SliceSorter. | |
c14804 | // With sorts data given the provided length, swap, and less
// functions.
// The sort is not guaranteed to be stable. | |
c14805 | // Less returns the opposite of the embedded implementation's Less method. | |
c14806 | // IsSorted reports whether data is sorted. | |
c14807 | // EXIFItemID returns the item ID of the EXIF part, or 0 if not found. | |
c14808 | // SpatialExtents returns the item's spatial extents property values, if present,
// not correcting from any camera rotation metadata. | |
c14809 | // VisualDimensions returns the item's width and height after correcting
// for any rotations. | |
c14810 | // PrimaryItem returns the HEIF file's primary item. | |
c14811 | // ItemByID by returns the file's Item of a given ID.
// If the ID is known, the returned error is ErrUnknownItem. | |
c14812 | // NewSem creates a semaphore with max units available for acquisition. | |
c14813 | // Acquire will deduct n units from the semaphore. If the deduction would
// result in the available units falling below zero, the call will block until
// another go routine returns units via a call to Release. If more units are
// requested than the semaphore is configured to hold, error will be non-nil. | |
c14814 | // Release will return n units to the semaphore and notify any currently
// blocking Acquire calls. | |
c14815 | // Path returns the absolute path of the primary directory, or an empty
// string if there's no suitable directory present. This is the path
// that should be used for writing files. | |
c14816 | // Open opens the named file inside the directory for reading. If the
// directory has multiple search paths, each path is checked in order
// for the file and the first one found is opened. | |
c14817 | // NewStatsReader returns an io.Reader that will have the number of bytes
// read from r added to v. | |
c14818 | // NewStatsReadSeeker returns an io.ReadSeeker that will have the number of bytes
// read from rs added to v. | |
c14819 | // Bytes returns a slice of the bytes, or a copy of the bytes, retained by w.
// If more bytes than could be retained were written to w, it returns a
// concatenation of the N first bytes, a message for how many bytes were dropped,
// and the N last bytes. | |
c14820 | // GoroutineID returns the current goroutine's ID.
// Use of this function is almost always a terrible idea.
// It is also very slow.
// GoroutineID is intended only for debugging.
// In particular, it is used by syncutil. | |
c14821 | // ShouldFail reports whether a fake error should be returned. | |
c14822 | // FailErr checks ShouldFail and, if true, assigns a fake error to err
// and returns true. | |
c14823 | // UnknownKeys returns the keys from the config that have not yet been discovered by one of the RequiredT or OptionalT calls. | |
c14824 | // Err waits for all previous calls to Go to complete and returns the
// first non-nil error, or nil. | |
c14825 | // New returns a new Replacer from a list of old, new string pairs.
// Replacements are performed in order, without overlapping matches. | |
c14826 | // Replace performs all replacements in-place on s. If the capacity
// of s is not sufficient, a new slice is allocated, otherwise Replace
// returns s. | |
c14827 | // Size tries to determine the length of r. If r is an io.Seeker, Size may seek
// to guess the length. | |
c14828 | // equalFoldRune compares a and b runes whether they fold equally.
//
// The code comes from strings.EqualFold, but shortened to only one rune. | |
c14829 | // HasPrefixFold is like strings.HasPrefix but uses Unicode case-folding. | |
c14830 | // HasSuffixFold is like strings.HasPrefix but uses Unicode case-folding. | |
c14831 | // ContainsFold is like strings.Contains but uses Unicode case-folding. | |
c14832 | // Open opens the given file path for reading, reusing existing file descriptors
// when possible. | |
c14833 | // CoreOSImageURL returns the URL of the latest stable CoreOS image for running on Google Compute Engine. | |
c14834 | // InstanceGroups returns all the instance groups in a project's zone, along
// with their associated InstanceGroupManagers.
// The returned map is keyed by the instance group identifier URL. | |
c14835 | // Open opens the named file for reading. It returns an error if the file size
// is larger than 1 << 20. | |
c14836 | // IFFT returns the inverse FFT of the complex-valued slice. | |
c14837 | // FFT returns the forward FFT of the complex-valued slice. | |
c14838 | // decrDim decrements an element of x by 1, skipping all -1s, and wrapping up to d.
// If a value is 0, it will be reset to its correspending value in d, and will carry one from the next non -1 value to the right.
// Returns true if decremented, else false. | |
c14839 | // bluesteinFFT returns the FFT calculated using the Bluestein algorithm. | |
c14840 | // New reads the WAV header from r. | |
c14841 | // ReadFloats is like ReadSamples, but it converts any underlying data to a
// float32. | |
c14842 | // NextPowerOf2 returns the next power of 2 >= x. | |
c14843 | // ToComplex2 returns the complex equivalent of the real-valued matrix. | |
c14844 | // Segment returns segs equal-length slices that are segments of x with noverlap% of overlap.
// The returned slices are not copies of x, but slices into it.
// Trailing entries in x that connot be included in the equal-length segments are discarded.
// noverlap is a percentage, thus 0 <= noverlap <= 1, and noverlap = ... | |
c14845 | // radix2FFT returns the FFT calculated using the radix-2 DIT Cooley-Tukey algorithm. | |
c14846 | // reorderData returns a copy of x reordered for the DFT. | |
c14847 | // Apply applies the window windowFunction to x. | |
c14848 | // PrettyClose returns true if the slices a and b are very close, else false. | |
c14849 | // PrettyCloseC returns true if the slices a and b are very close, else false. | |
c14850 | // ComplexEqual returns true if a and b are very close, else false. | |
c14851 | // Float64Equal returns true if a and b are very close, else false. | |
c14852 | // MakeMatrix2 is a helper function to convert a 2-d array to a matrix. | |
c14853 | // Copy returns a new copy of m. | |
c14854 | // MakeEmptyMatrix creates an empty Matrix with given dimensions. | |
c14855 | // offset returns the index in the one-dimensional array | |
c14856 | // Dimensions returns the dimension array of the Matrix. | |
c14857 | // To2D returns the 2-D array equivalent of the Matrix.
// Only works on Matrixes of 2 dimensions. | |
c14858 | // Authenticator is a default authentication middleware to enforce access from the
// Verifier middleware request context values. The Authenticator sends a 401 Unauthorized
// response for any unverified tokens and passes the good ones through. It's just fine
// until you decide to write something similar and customize... | |
c14859 | // TokenFromCookie tries to retreive the token string from a cookie named
// "jwt". | |
c14860 | // NewLocker return new lock | |
c14861 | // NewLocker return new redis based lock | |
c14862 | // ReadMethods returns regexp slice of readable methods, mostly used by the acl | |
c14863 | // NewProvider creates and prepare the stripe provider | |
c14864 | // getAccessMap return access map for specific client | |
c14865 | // CanAccessMethod check if user can access fullMethod by getting its accessMap | |
c14866 | // RecoveryHandlerFunc outputs the stack and the error
// returns valid grpc error | |
c14867 | // Retry function for default retry attempts | |
c14868 | // NewHandler create new mongo handler | |
c14869 | // NewClient creates new grpc connection to the addr using the ClientOpt | |
c14870 | // New create new digota server | |
c14871 | // Provider returns payment provider from the map using the provided id
// panics if the provider could not be found | |
c14872 | // NewContext store user in ctx and return new ctx. | |
c14873 | // FromContext returns the User stored in ctx, if any. | |
c14874 | // GetClient return client based on provided serialId | |
c14875 | // Validate is doing struct level validation using validator.v9 | |
c14876 | // New creates storage handler from config.Storage and prepare it for use
// returns error if something went wrong during the preparations | |
c14877 | // New creates a locker handler from the provided
// config.Locker and save it in handler for further use | |
c14878 | // IsReturnable checks che | |
c14879 | // New implements the orderpb.New interface.
// Creates new order from order Items and return Order or error, error will
// returned if something went wrong .. let say something such as inactive Items. | |
c14880 | // Get implements the orderpb.Get interface.
// Retrieve order or returns error. | |
c14881 | // Pay implements the orderpb.Pay interface. Pay on specific orderId with CC based on payment provider supplied. | |
c14882 | // calculateTotal will calculate the new amount of the cart. using
// go-money library, which helps us to do money calculations of
// the `Fowler's Money pattern`. will return error if something went
// wrong, like wrong currencies. | |
c14883 | // WriteMethods returns regexp slice of writable methods, mostly used by the acl | |
c14884 | // WithLocation creates a new Option that sets up a
// "Clock" interface that the RotateLogs object will use
// to determine the current time.
//
// This optin works by always returning the in the given
// location. | |
c14885 | // New creates a new RotateLogs object. A log filename pattern
// must be passed. Optional `Option` parameters may be passed | |
c14886 | // Write satisfies the io.Writer interface. It writes to the
// appropriate file handle that is currently being used.
// If we have reached rotation time, the target file gets
// automatically rotated, and also purged if necessary. | |
c14887 | // must be locked during this operation | |
c14888 | // CurrentFileName returns the current file name that
// the RotateLogs object is writing to | |
c14889 | // Rotate forcefully rotates the log files. If the generated file name
// clash because file already exists, a numeric suffix of the form
// ".1", ".2", ".3" and so forth are appended to the end of the log file
//
// Thie method can be used in conjunction with a signal handler so to
// emulate servers that generate new... | |
c14890 | // Close satisfies the io.Closer interface. You must
// call this method if you performed any writes to
// the object. | |
c14891 | // Text returns the text that should be
// prepended to the log message when a specific
// log level is being written. | |
c14892 | // New returns a new golog with a default output to `os.Stdout`
// and level to `InfoLevel`. | |
c14893 | // acquireLog returns a new log fom the pool. | |
c14894 | // SetOutput overrides the Logger's Printer's Output with another `io.Writer`.
//
// Returns itself. | |
c14895 | // SetPrefix sets a prefix for this "l" Logger.
//
// The prefix is the first space-separated
// word that is being presented to the output.
// It's written even before the log level text.
//
// Returns itself. | |
c14896 | // SetTimeFormat sets time format for logs,
// if "s" is empty then time representation will be off.
//
// Returns itself. | |
c14897 | // DisableNewLine disables the new line suffix on every log function, even the `F`'s,
// the caller should add "\n" to the log message manually after this call.
//
// Returns itself. | |
c14898 | // Print prints a log message without levels and colors. | |
c14899 | // Println prints a log message without levels and colors.
// It adds a new line at the end, it overrides the `NewLine` option. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.