Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 220 for cout (6.75 sec)

  1. src/bytes/bytes_test.go

    func TestEqualFold(t *testing.T) {
    	for _, tt := range EqualFoldTests {
    		if out := EqualFold([]byte(tt.s), []byte(tt.t)); out != tt.out {
    			t.Errorf("EqualFold(%#q, %#q) = %v, want %v", tt.s, tt.t, out, tt.out)
    		}
    		if out := EqualFold([]byte(tt.t), []byte(tt.s)); out != tt.out {
    			t.Errorf("EqualFold(%#q, %#q) = %v, want %v", tt.t, tt.s, out, tt.out)
    		}
    	}
    }
    
    var cutTests = []struct {
    	s, sep        string
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  2. tests/count_test.go

    	if count != int64(len(users)) {
    		t.Errorf("Count() method should get correct value, expect: %v, got %v", count, len(users))
    	}
    
    	if err := DB.Model(&User{}).Where("name = ?", user1.Name).Or("name = ?", user3.Name).Count(&count).Find(&users).Error; err != nil {
    		t.Errorf(fmt.Sprintf("Count should work, but got err %v", err))
    	}
    
    	if count != int64(len(users)) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 6.9K bytes
    - Viewed (0)
  3. src/bytes/example_test.go

    	// true
    }
    
    func ExampleCount() {
    	fmt.Println(bytes.Count([]byte("cheese"), []byte("e")))
    	fmt.Println(bytes.Count([]byte("five"), []byte(""))) // before & after each rune
    	// Output:
    	// 3
    	// 5
    }
    
    func ExampleCut() {
    	show := func(s, sep string) {
    		before, after, found := bytes.Cut([]byte(s), []byte(sep))
    		fmt.Printf("Cut(%q, %q) = %q, %q, %v\n", s, sep, before, after, found)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  4. migrator/migrator.go

    func (m Migrator) HasTable(value interface{}) bool {
    	var count int64
    
    	m.RunWithValue(value, func(stmt *gorm.Statement) error {
    		currentDatabase := m.DB.Migrator().CurrentDatabase()
    		return m.DB.Raw("SELECT count(*) FROM information_schema.tables WHERE table_schema = ? AND table_name = ? AND table_type = ?", currentDatabase, stmt.Table, "BASE TABLE").Row().Scan(&count)
    	})
    
    	return count > 0
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  5. src/bufio/example_test.go

    	// Set the split function for the scanning operation.
    	scanner.Split(bufio.ScanWords)
    	// Count the words.
    	count := 0
    	for scanner.Scan() {
    		count++
    	}
    	if err := scanner.Err(); err != nil {
    		fmt.Fprintln(os.Stderr, "reading input:", err)
    	}
    	fmt.Printf("%d\n", count)
    	// Output: 15
    }
    
    // Use a Scanner with a custom split function (built by wrapping ScanWords) to validate
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  6. cmd/data-usage-utils.go

    	// This does not indicate a full scan.
    	LastUpdate time.Time `json:"lastUpdate"`
    
    	// Objects total count across all buckets
    	ObjectsTotalCount uint64 `json:"objectsCount"`
    
    	// Versions total count across all buckets
    	VersionsTotalCount uint64 `json:"versionsCount"`
    
    	// Delete markers total count across all buckets
    	DeleteMarkersTotalCount uint64 `json:"deleteMarkersCount"`
    
    	// Objects total size across all buckets
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  7. src/cmd/asm/internal/asm/expr_test.go

    	{"3%0", "modulo by zero"},
    	{"(1<<63)%0", "modulo of value with high bit set"},
    	{"3<<-4", "negative left shift count"},
    	{"3<<(1<<63)", "negative left shift count"},
    	{"3>>-4", "negative right shift count"},
    	{"3>>(1<<63)", "negative right shift count"},
    	{"(1<<63)>>2", "right shift of value with high bit set"},
    	{"(1<<62)>>2", ""},
    	{`'\x80'`, "illegal UTF-8 encoding for character constant"},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  8. cmd/endpoint-ellipses.go

    	for i := 1; i < len(totalSizes); i++ {
    		result = gcd(result, totalSizes[i])
    	}
    	return result
    }
    
    // isValidSetSize - checks whether given count is a valid set size for erasure coding.
    var isValidSetSize = func(count uint64) bool {
    	return (count >= setSizes[0] && count <= setSizes[len(setSizes)-1])
    }
    
    func commonSetDriveCount(divisibleSize uint64, setCounts []uint64) (setSize uint64) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 15:54:03 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  9. cmd/config.go

    				if err != nil {
    					// ignore history file that cannot be loaded.
    					continue
    				}
    
    				cfgEntry.Data = string(data)
    			}
    			configHistory = append(configHistory, cfgEntry)
    			count--
    			if count == 0 {
    				break
    			}
    		}
    		if !res.IsTruncated {
    			// We are done here
    			break
    		}
    		marker = res.NextMarker
    	}
    	sort.Slice(configHistory, func(i, j int) bool {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Aug 23 10:07:06 GMT 2023
    - 6K bytes
    - Viewed (0)
  10. cmd/namespace-lock.go

    	}
    
    	if !locked { // We failed to get the lock
    		// Decrement ref count since we failed to get the lock
    		n.lockMapMutex.Lock()
    		n.lockMap[resource].ref--
    		if n.lockMap[resource].ref < 0 {
    			logger.CriticalIf(GlobalContext, errors.New("resource reference count was lower than 0"))
    		}
    		if n.lockMap[resource].ref == 0 {
    			// Remove from the map if there are no more references.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
Back to top