Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 1,614 for qsort (0.17 sec)

  1. src/slices/sort_test.go

    		n /= 100
    	}
    	data := make([]int, n)
    	for i := 0; i < len(data); i++ {
    		data[i] = rand.Intn(100)
    	}
    	if IsSorted(data) {
    		t.Fatalf("terrible rand.rand")
    	}
    	Sort(data)
    	if !IsSorted(data) {
    		t.Errorf("sort didn't sort - 1M ints")
    	}
    }
    
    type intPair struct {
    	a, b int
    }
    
    type intPairs []intPair
    
    // Pairs compare on a only.
    func intPairCmp(x, y intPair) int {
    	return x.a - y.a
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 19:20:55 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  2. build-logic/binary-compatibility/src/main/groovy/gradlebuild/EnrichedReportRenderer.groovy

                        });
                        // Sort the array in place by type, then member
                        // Note that Firefox is fine with a sort function returning any positive or negative number, but Chrome 
                        // requires 1 or -1 specifically and ignores higher or lower values.  This sort ought to remain consistent
                        // with the sort used by AbstractAcceptedApiChangesMaintenanceTask.
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Feb 07 20:38:43 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types/sym_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package types_test
    
    import (
    	"cmd/compile/internal/types"
    	"reflect"
    	"sort"
    	"testing"
    )
    
    func TestSymLess(t *testing.T) {
    	var (
    		local = types.NewPkg("", "")
    		abc   = types.NewPkg("abc", "")
    		uvw   = types.NewPkg("uvw", "")
    		xyz   = types.NewPkg("xyz", "")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 02 20:30:31 UTC 2019
    - 1.2K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/text/language/coverage.go

    	scripts func() []Script
    	regions func() []Region
    }
    
    func (s *coverage) Tags() []Tag {
    	if s.tags == nil {
    		return nil
    	}
    	return s.tags()
    }
    
    // bases implements sort.Interface and is used to sort base languages.
    type bases []Base
    
    func (b bases) Len() int {
    	return len(b)
    }
    
    func (b bases) Swap(i, j int) {
    	b[i], b[j] = b[j], b[i]
    }
    
    func (b bases) Less(i, j int) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/text/internal/language/compose.go

    }
    
    // Make returns a new Tag from the current settings.
    func (b *Builder) Make() Tag {
    	t := b.Tag
    
    	if len(b.extensions) > 0 || len(b.variants) > 0 {
    		sort.Sort(sortVariants(b.variants))
    		sort.Strings(b.extensions)
    
    		if b.private != "" {
    			b.extensions = append(b.extensions, b.private)
    		}
    		n := maxCoreSize + tokenLen(b.variants...) + tokenLen(b.extensions...)
    		buf := make([]byte, n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/cover/profile.go

    				FileName: fn,
    				Mode:     mode,
    			}
    			files[fn] = p
    		}
    		p.Blocks = append(p.Blocks, b)
    	}
    	if err := s.Err(); err != nil {
    		return nil, err
    	}
    	for _, p := range files {
    		sort.Sort(blocksByStart(p.Blocks))
    		// Merge samples from the same location.
    		j := 1
    		for i := 1; i < len(p.Blocks); i++ {
    			b := p.Blocks[i]
    			last := p.Blocks[j-1]
    			if b.StartLine == last.StartLine &&
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 11 17:02:03 UTC 2021
    - 7.5K bytes
    - Viewed (0)
  7. test/fixedbugs/issue20014.dir/main.go

    package main
    
    import (
    	"sort"
    	"strings"
    
    	"issue20014.dir/a"
    )
    
    func main() {
    	samePackage()
    	crossPackage()
    
    	// Print fields registered with field tracking.
    	var fields []string
    	for _, line := range strings.Split(fieldTrackInfo, "\n") {
    		if line != "" {
    			fields = append(fields, strings.Split(line, "\t")[0])
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 16 19:48:35 UTC 2022
    - 1K bytes
    - Viewed (0)
  8. pilot/pkg/networking/core/loadbalancer/loadbalancer.go

    	}
    
    	// since Priorities should range from 0 (highest) to N (lowest) without skipping.
    	// 2. adjust the priorities in order
    	// 2.1 sort all priorities in increasing order.
    	priorities := []int{}
    	for priority := range priorityMap {
    		priorities = append(priorities, priority)
    	}
    	sort.Ints(priorities)
    	// 2.2 adjust LocalityLbEndpoints priority
    	// if the index and value of priorities array is not equal.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 23 05:38:57 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. callbacks/helper.go

    package callbacks
    
    import (
    	"reflect"
    	"sort"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    )
    
    // ConvertMapToValuesForCreate convert map to values
    func ConvertMapToValuesForCreate(stmt *gorm.Statement, mapValue map[string]interface{}) (values clause.Values) {
    	values.Columns = make([]clause.Column, 0, len(mapValue))
    	selectColumns, restricted := stmt.SelectAndOmitColumns(true, false)
    
    	keys := make([]string, 0, len(mapValue))
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Apr 14 12:32:57 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  10. src/runtime/pprof/label_test.go

    // license that can be found in the LICENSE file.
    
    package pprof
    
    import (
    	"context"
    	"reflect"
    	"sort"
    	"testing"
    )
    
    func labelsSorted(ctx context.Context) []label {
    	ls := []label{}
    	ForLabels(ctx, func(key, value string) bool {
    		ls = append(ls, label{key, value})
    		return true
    	})
    	sort.Sort(labelSorter(ls))
    	return ls
    }
    
    type labelSorter []label
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top