Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 121 for sortBy (0.19 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 Apr 24 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 Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Apr 22 15:39:28 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 Apr 26 12:43:10 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:43:43 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  5. cmd/metacache-walk.go

    				meta.name = strings.TrimSuffix(meta.name, SlashSeparator)
    				meta.name = pathJoinBuf(sb, current, meta.name)
    
    				return send(meta)
    			}
    			// Skip all other files.
    		}
    
    		// Process in sort order.
    		sort.Strings(entries)
    		dirStack := make([]string, 0, 5)
    		prefix = "" // Remove prefix after first level as we have already filtered the list.
    		if len(forward) > 0 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  6. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 35.3K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/ImmutableSortedSet.java

          Comparator<? super E> comparator, Collection<? extends E> elements) {
        return copyOf(comparator, (Iterable<? extends E>) elements);
      }
    
      /**
       * Returns an immutable sorted set containing the elements of a sorted set, sorted by the same
       * {@code Comparator}. That behavior differs from {@link #copyOf(Iterable)}, which always uses the
       * natural ordering of the elements.
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 38.5K 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.2K bytes
    - Viewed (0)
  9. maven-core/src/main/java/org/apache/maven/internal/impl/SisuDiBridgeModule.java

                            + getBoundKeys().stream()
                                    .map(Key::toString)
                                    .map(String::trim)
                                    .sorted()
                                    .distinct()
                                    .collect(Collectors.joining("\n - ", " - ", "")));
                }
            };
            injector.bindInstance(Injector.class, injector);
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Apr 25 14:13:36 GMT 2024
    - 8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

          Comparator<? super E> comparator, Collection<? extends E> elements) {
        return copyOf(comparator, (Iterable<? extends E>) elements);
      }
    
      /**
       * Returns an immutable sorted set containing the elements of a sorted set, sorted by the same
       * {@code Comparator}. That behavior differs from {@link #copyOf(Iterable)}, which always uses the
       * natural ordering of the elements.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 36.7K bytes
    - Viewed (0)
Back to top