Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 159 for ranid (0.15 sec)

  1. internal/event/targetlist_test.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package event
    
    import (
    	"context"
    	"crypto/rand"
    	"errors"
    	"reflect"
    	"testing"
    	"time"
    
    	"github.com/minio/minio/internal/store"
    )
    
    type ExampleTarget struct {
    	id       TargetID
    	sendErr  bool
    	closeErr bool
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Dec 05 10:16:33 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  2. cmd/erasure-decode_test.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"bytes"
    	"context"
    	crand "crypto/rand"
    	"io"
    	"math/rand"
    	"testing"
    
    	"github.com/dustin/go-humanize"
    )
    
    func (a badDisk) ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  3. android/guava-tests/test/com/google/common/hash/HashTestUtils.java

        Random rand = new Random(0);
        int keyBits = 32;
        int hashBits = function.bits();
        for (int i = 0; i < keyBits; i++) {
          int[] same = new int[hashBits];
          int[] diff = new int[hashBits];
          // go through trials to compute probability
          for (int j = 0; j < trials; j++) {
            int key1 = rand.nextInt();
            // flip input bit for key2
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  4. cmd/benchmark-utils_test.go

    func getRandomByte() []byte {
    	const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    	// seeding the random number generator.
    	rand.Seed(UTCNow().UnixNano())
    	// pick a character randomly.
    	return []byte{letterBytes[rand.Intn(len(letterBytes))]}
    }
    
    // picks a random byte and repeats it to size bytes.
    func generateBytesData(size int) []byte {
    	// repeat the random character chosen size
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  5. cmd/object-api-utils.go

    	}
    	return hosts
    }
    
    // returns an online host (and corresponding port) from a slice of DNS records
    func getHostFromSrv(records []dns.SrvRecord) (host string) {
    	hosts := getHostsSlice(records)
    	rng := rand.New(rand.NewSource(time.Now().UTC().UnixNano()))
    	var d net.Dialer
    	var retry int
    	for retry < len(hosts) {
    		ctx, cancel := context.WithTimeout(GlobalContext, 300*time.Millisecond)
    
    		host = hosts[rng.Intn(len(hosts))]
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  6. cmd/erasure_test.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"bytes"
    	"context"
    	"crypto/rand"
    	"io"
    	"testing"
    )
    
    var erasureEncodeDecodeTests = []struct {
    	dataBlocks, parityBlocks   int
    	missingData, missingParity int
    	reconstructParity          bool
    	shouldFail                 bool
    }{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Jul 25 19:37:26 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/LongMathTest.java

        Random rand = new Random(1);
        for (int bits = 10; bits < 63; bits++) {
          for (int i = 0; i < 100; i++) {
            long p = BigInteger.probablePrime(bits, rand).longValue();
            assertTrue(LongMath.isPrime(p));
          }
        }
      }
    
      @GwtIncompatible // isPrime is GWT-incompatible
      public void testIsPrimeOnRandomComposites() {
        Random rand = new Random(1);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  8. cmd/encryption-v1.go

    		objectKey := crypto.GenerateKey(key.Plaintext, rand.Reader)
    		sealedKey = objectKey.Seal(key.Plaintext, crypto.GenerateIV(rand.Reader), crypto.S3KMS.String(), bucket, object)
    		crypto.S3KMS.CreateMetadata(metadata, key.KeyID, key.Ciphertext, sealedKey, cryptoCtx)
    		return objectKey, nil
    	case crypto.SSEC:
    		objectKey := crypto.GenerateKey(key, rand.Reader)
    		sealedKey = objectKey.Seal(key, crypto.GenerateIV(rand.Reader), crypto.SSEC.String(), bucket, object)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 36.5K bytes
    - Viewed (0)
  9. internal/config/crypto.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package config
    
    import (
    	"bytes"
    	"context"
    	"crypto/rand"
    	"encoding/binary"
    	"errors"
    	"fmt"
    	"io"
    
    	jsoniter "github.com/json-iterator/go"
    	"github.com/minio/minio/internal/fips"
    	"github.com/minio/minio/internal/kms"
    	"github.com/secure-io/sio-go"
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  10. docs/erasure/README.md

    ## Why is Erasure Code useful?
    
    Plain Text
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Sep 29 04:28:45 GMT 2022
    - 4.1K bytes
    - Viewed (0)
Back to top