Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 165 for SUM (0.01 sec)

  1. src/main/java/jcifs/util/InputValidator.java

            }
        }
    
        /**
         * Safe integer addition with overflow check
         *
         * @param a first operand
         * @param b second operand
         * @return sum of a and b
         * @throws ArithmeticException if overflow occurs
         */
        public static int safeAdd(int a, int b) {
            validateIntegerAddition(a, b, "Addition");
            return a + b;
        }
    
        /**
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 13.5K bytes
    - Viewed (0)
  2. cmd/object-handlers_test.go

    		}
    	)
    
    	type ObjectInput struct {
    		objectName  string
    		partLengths []int64
    
    		metaData map[string]string
    	}
    
    	objectLength := func(oi ObjectInput) (sum int64) {
    		for _, l := range oi.partLengths {
    			sum += l
    		}
    		return sum
    	}
    
    	// set of inputs for uploading the objects before tests for
    	// downloading is done. Data bytes are from DummyDataGen.
    	objectInputs := []ObjectInput{
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Sep 28 20:59:21 UTC 2025
    - 163.1K bytes
    - Viewed (0)
  3. cmd/erasure.go

    		if di.RootDisk {
    			rootDiskCount++
    		}
    	}
    
    	// Count offline disks as well to ensure consistent
    	// reportability of offline drives on local setups.
    	if len(disksInfo) == (rootDiskCount + offlineDisks.Sum()) {
    		// Success.
    		return onlineDisks, offlineDisks
    	}
    
    	// Root disk should be considered offline
    	for i := range disksInfo {
    		ep := disksInfo[i].Endpoint
    		if disksInfo[i].RootDisk {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Sep 28 20:59:21 UTC 2025
    - 16.1K bytes
    - Viewed (0)
  4. tests/scan_test.go

    		t.Errorf("Should find expected results, got %+v", results)
    	}
    
    	var ages int
    	if err := DB.Table("users").Where("name = ? or name = ?", user2.Name, user3.Name).Select("SUM(age)").Scan(&ages).Error; err != nil || ages != 30 {
    		t.Fatalf("failed to scan ages, got error %v, ages: %v", err, ages)
    	}
    
    	var name string
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Wed Jun 12 10:57:36 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. cmd/format-erasure_test.go

    			continue
    		}
    		h := sha256.New()
    		for _, set := range format.Erasure.Sets {
    			for _, diskID := range set {
    				h.Write([]byte(diskID))
    			}
    		}
    		formatHashes[i] = hex.EncodeToString(h.Sum(nil))
    	}
    
    	formatCountMap := make(map[string]int)
    	for _, hash := range formatHashes {
    		if hash == "" {
    			continue
    		}
    		formatCountMap[hash]++
    	}
    
    	maxHash := ""
    	maxCount := 0
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  6. src/main/java/jcifs/util/ServerResponseValidator.java

            }
        }
    
        /**
         * Safely add integers checking for overflow
         *
         * @param a first value
         * @param b second value
         * @return sum
         * @throws SmbException if overflow would occur
         */
        public int safeAdd(int a, int b) throws SmbException {
            totalValidations.incrementAndGet();
    
            long result = (long) a + (long) b;
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  7. cmd/encryption-v1.go

    	mac := hmac.New(sha256.New, d.objectEncryptionKey) // derive part encryption key from part ID and object key
    	mac.Write(partIDbin[:])
    	partEncryptionKey := mac.Sum(nil)
    
    	// Limit the reader, so the decryptor doesn't receive bytes
    	// from the next part (different DARE stream)
    	encLenToRead := d.parts[d.partIndex].Size - d.partEncRelOffset
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Sep 28 20:59:21 UTC 2025
    - 38K bytes
    - Viewed (0)
  8. cmd/erasure-object_test.go

    		}
    
    		h := md5.New()
    		h.Write(testCase.content)
    		expectedHash := h.Sum(nil)
    
    		h.Reset()
    		_, err = io.Copy(h, gr)
    		if err != nil {
    			t.Fatalf("Test %d: Failed to calculate md5sum of the object: %v", i+1, err)
    		}
    		gr.Close()
    		foundHash := h.Sum(nil)
    
    		if !bytes.Equal(foundHash, expectedHash) {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 38.3K bytes
    - Viewed (0)
  9. internal/logger/logger.go

    }
    
    // HashString - return the highway hash of the passed string
    func HashString(input string) string {
    	hh, _ := highwayhash.New(magicHighwayHash256Key)
    	hh.Write([]byte(input))
    	return hex.EncodeToString(hh.Sum(nil))
    }
    
    // LogAlwaysIf prints a detailed error message during
    // the execution of the server.
    func LogAlwaysIf(ctx context.Context, subsystem string, err error, errKind ...any) {
    	if err == nil {
    		return
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  10. cmd/metrics-v2.go

    			Value:       float64(offlineDrives.Sum()),
    		})
    
    		metrics = append(metrics, MetricV2{
    			Description: getNodeDrivesOnlineTotalMD(),
    			Value:       float64(onlineDrives.Sum()),
    		})
    
    		metrics = append(metrics, MetricV2{
    			Description: getNodeDrivesTotalMD(),
    			Value:       float64(totalDrives.Sum()),
    		})
    
    		metrics = append(metrics, MetricV2{
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Sep 28 20:59:21 UTC 2025
    - 133.6K bytes
    - Viewed (0)
Back to top