Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 211 for sortBy (0.24 sec)

  1. istioctl/pkg/kubeinject/kubeinject.go

    func GetFirstPod(client v1.CoreV1Interface, namespace string, selector string) (*corev1.Pod, error) {
    	options := metav1.ListOptions{LabelSelector: selector}
    
    	sortBy := func(pods []*corev1.Pod) sort.Interface { return sort.Reverse(podutils.ActivePods(pods)) }
    	podList, err := client.Pods(namespace).List(context.TODO(), options)
    	if err != nil {
    		return nil, err
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 29 02:29:02 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  2. istioctl/pkg/ztunnelconfig/ztunnelconfig.go

    		return types.NamespacedName{}, err
    	}
    	pods := slices.Reference(podsr.Items)
    	if len(pods) > 0 {
    		// We need to pass in a sorter, and the one used by `kubectl logs` is good enough.
    		sortBy := func(pods []*corev1.Pod) sort.Interface { return podutils.ByLogging(pods) }
    		sort.Sort(sortBy(pods))
    		return config.NamespacedName(pods[0]), nil
    	}
    	return types.NamespacedName{}, fmt.Errorf("no pods found")
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed May 01 13:11:40 GMT 2024
    - 22.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Ordering.java

        if (k == 0 || !iterator.hasNext()) {
          return Collections.emptyList();
        } else if (k >= Integer.MAX_VALUE / 2) {
          // k is really large; just do a straightforward sorted-copy-and-sublist
          ArrayList<E> list = Lists.newArrayList(iterator);
          Collections.sort(list, this);
          if (list.size() > k) {
            list.subList(k, list.size()).clear();
          }
          list.trimToSize();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  4. cmd/metacache-entries.go

    func (m metaCacheEntries) less(i, j int) bool {
    	return m[i].name < m[j].name
    }
    
    // sort entries by name.
    // m is sorted and a sorted metadata object is returned.
    // Changes to m will also be reflected in the returned object.
    func (m metaCacheEntries) sort() metaCacheEntriesSorted {
    	if m.isSorted() {
    		return metaCacheEntriesSorted{o: m}
    	}
    	sort.Slice(m, m.less)
    	return metaCacheEntriesSorted{o: m}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:43:43 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

       * Returns an immutable sorted multiset containing the given elements sorted by their natural
       * ordering.
       *
       * @throws NullPointerException if any element is null
       */
      public static <E extends Comparable<? super E>> ImmutableSortedMultiset<E> of(
          E e1, E e2, E e3, E e4) {
        return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3, e4));
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 35.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/primitives/UnsignedLongs.java

          return "UnsignedLongs.lexicographicalComparator()";
        }
      }
    
      /**
       * Sorts the array, treating its elements as unsigned 64-bit integers.
       *
       * @since 23.1
       */
      public static void sort(long[] array) {
        checkNotNull(array);
        sort(array, 0, array.length);
      }
    
      /**
       * Sorts the array between {@code fromIndex} inclusive and {@code toIndex} exclusive, treating its
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/primitives/UnsignedInts.java

          return "UnsignedInts.lexicographicalComparator()";
        }
      }
    
      /**
       * Sorts the array, treating its elements as unsigned 32-bit integers.
       *
       * @since 23.1
       */
      public static void sort(int[] array) {
        checkNotNull(array);
        sort(array, 0, array.length);
      }
    
      /**
       * Sorts the array between {@code fromIndex} inclusive and {@code toIndex} exclusive, treating its
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  8. internal/logger/logger.go

    }
    
    // uniq swaps away duplicate elements in data, returning the size of the
    // unique set. data is expected to be pre-sorted, and the resulting set in
    // the range [0:size] will remain in sorted order. Uniq, following a
    // sort.Sort call, can be used to prepare arbitrary inputs for use as sets.
    func uniq(data sort.Interface) (size int) {
    	p, l := 0, data.Len()
    	if l <= 1 {
    		return l
    	}
    	for i := 1; i < l; i++ {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  9. cmd/signature-v2.go

    		}
    		if val == "" {
    			canonicalQueries = append(canonicalQueries, key)
    			continue
    		}
    		canonicalQueries = append(canonicalQueries, key+"="+val)
    	}
    
    	// The queries will be already sorted as resourceList is sorted, if canonicalQueries
    	// is empty strings.Join returns empty.
    	canonicalQuery := strings.Join(canonicalQueries, "&")
    	if canonicalQuery != "" {
    		return encodedResource + "?" + canonicalQuery
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/SortedLists.java

      /**
       * Searches the specified list for the specified object using the binary search algorithm. The
       * list must be sorted into ascending order according to the specified comparator (as by the
       * {@link Collections#sort(List, Comparator) Collections.sort(List, Comparator)} method), prior to
       * making this call. If it is not sorted, the results are undefined.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 10.9K bytes
    - Viewed (0)
Back to top