Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 377 for asSlice (0.14 sec)

  1. src/sort/gen_sort_variants.go

    			pivot = (b - 1) - (pivot - a)
    			hint = increasingHint
    		}
    
    		// The slice is likely already sorted.
    		if wasBalanced && wasPartitioned && hint == increasingHint {
    			if partialInsertionSort{{.FuncSuffix}}(data, a, b {{.ExtraArg}}) {
    				return
    			}
    		}
    
    		// Probably the slice contains many duplicate elements, partition the slice into
    		// elements equal to and elements greater than the pivot.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:27 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  2. callbacks/preload.go

    				return err
    			}
    		} else if rel := relationships.Relations[name]; rel != nil {
    			if joined, nestedJoins := isJoined(name); joined {
    				switch rv := db.Statement.ReflectValue; rv.Kind() {
    				case reflect.Slice, reflect.Array:
    					if rv.Len() > 0 {
    						reflectValue := rel.FieldSchema.MakeSlice().Elem()
    						for i := 0; i < rv.Len(); i++ {
    							frv := rel.Field.ReflectValueOf(db.Statement.Context, rv.Index(i))
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial005_an_py310.py

        assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"'
    
    
    @needs_py310
    def test_token_inactive_user(client: TestClient):
        access_token = get_access_token(
            username="alice", password="secretalice", scope="me", client=client
        )
        response = client.get(
            "/users/me", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 400, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/expr.go

    	} else {
    		// large numbers of strings are passed to the runtime as a slice.
    		fn = "concatstrings"
    
    		t := types.NewSlice(types.Types[types.TSTRING])
    		// args[1:] to skip buf arg
    		slice := ir.NewCompLitExpr(base.Pos, ir.OCOMPLIT, t, args[1:])
    		slice.Prealloc = n.Prealloc
    		args = []ir.Node{buf, slice}
    		slice.SetEsc(ir.EscNone)
    	}
    
    	cat := typecheck.LookupRuntime(fn)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  5. operator/pkg/util/reflect_test.go

    		t.Error("got IsValueNil(ptr) false, want true")
    	}
    	if !IsValueNil(map[int]int(nil)) {
    		t.Error("got IsValueNil(map) false, want true")
    	}
    	if !IsValueNil([]int(nil)) {
    		t.Error("got IsValueNil(slice) false, want true")
    	}
    	if !IsValueNil(any(nil)) {
    		t.Error("got IsValueNil(interface) false, want true")
    	}
    
    	if IsValueNil(toInt8Ptr(42)) {
    		t.Error("got IsValueNil(ptr) true, want false")
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 10.2K bytes
    - Viewed (0)
  6. pkg/auth/authorizer/abac/abac_test.go

    {"user":"scheduler",                   "resource": "bindings" }
    {"user":"kubelet",   "readonly": true, "resource": "bindings" }
    {"user":"kubelet",                     "resource": "events"   }
    {"user":"alice",                                              "namespace": "projectCaribou"}
    {"user":"bob",       "readonly": true,                        "namespace": "projectCaribou"}
    `)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 24 15:14:54 UTC 2019
    - 40K bytes
    - Viewed (0)
  7. pkg/apis/resource/validation/validation.go

    	return allErrs
    }
    
    // validateSliceIsASet ensures that a slice contains no duplicates and does not exceed a certain maximum size.
    func validateSliceIsASet[T comparable](slice []T, maxSize int, validateItem func(item T, fldPath *field.Path) field.ErrorList, fldPath *field.Path) field.ErrorList {
    	var allErrs field.ErrorList
    	allItems := sets.New[T]()
    	for i, item := range slice {
    		idxPath := fldPath.Index(i)
    		if allItems.Has(item) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 09:18:10 UTC 2024
    - 28.3K bytes
    - Viewed (0)
  8. src/bytes/buffer_test.go

    	}()
    
    	buf := NewBuffer(make([]byte, 1))
    	const maxInt = int(^uint(0) >> 1)
    	buf.Grow(maxInt)
    }
    
    // Was a bug: used to give EOF reading empty slice at EOF.
    func TestReadEmptyAtEOF(t *testing.T) {
    	b := new(Buffer)
    	slice := make([]byte, 0)
    	n, err := b.Read(slice)
    	if err != nil {
    		t.Errorf("read error: %v", err)
    	}
    	if n != 0 {
    		t.Errorf("wrong count; got %d want 0", n)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:31:36 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  9. pkg/controller/endpointslicemirroring/reconciler.go

    		compareLabels := cloneAndRemoveKeys(existingSlices[0].Labels, discovery.LabelManagedBy, discovery.LabelServiceName)
    		// Return early if first slice matches desired endpoints, labels and annotations
    		totals = totalChanges(existingSlices[0], desiredSet)
    		if totals.added == 0 && totals.updated == 0 && totals.removed == 0 &&
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 18:08:12 UTC 2023
    - 13.1K bytes
    - Viewed (0)
  10. platforms/core-configuration/configuration-cache/src/integTest/groovy/org/gradle/internal/cc/impl/ConfigurationCacheBuildOptionsIntegrationTest.groovy

            configurationCache.assertStateStored()
            problems.assertResultHasProblems(result) {
                withNoInputs()
            }
    
            when:
            printString "alice"
    
            then:
            output.count("The string is alice") == 1
            configurationCache.assertStateLoaded()
    
            when:
            printString "bob"
    
            then:
            output.count("The string is bob") == 1
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 28K bytes
    - Viewed (0)
Back to top