Snippets Collections
self.postModel = self.postModel.sorted(by: { $0.time_stamp > $1.time_stamp
100% scale use CTRL+1 or CMD+1
75% scale use CTRL+2 or CMD+2
50% scale use CTRL+3 or CMD+3
33% scale use CTRL+4 or CMD+4
25% scale use CTRL+5 or CMD+5
import numpy as np
p = np.array([1/2, 1/2])
ex = np.array([1, 2])
dot_prod = ex @ p
#ifdef __APPLE__
freopen("inputFilename.txt", "r", stdin);
freopen("outputFilename.txt", "w", stdout);
#endif
/// Groups the elements in a collection using a block.
///
/// @param collection An object that implements @c NSFastEnumeration.
/// @param block      A block that takes an element in @c collection as its only
///                   argument and returns a key by which to group the element.
///                   The return value is required to implement @c NSCopying.
///                   The block must not be @c nil .
///
/// @returns A dictionary that maps the keys returned by @c block to a set of all
///          values in @c collection that share the same key.
///
/// Examples:
/// @code
/// NSArray *numbers = @[ @1, @2, @3, @4, @5 ];
///
/// NSDictionary *grouped = ASTGroupBy(numbers, ^(NSNumber *number){
///     return number.integerValue % 2 == 0 ? @"even" : @"odd";
/// });
///
/// grouped[@"even"]; /// { @2, @4 }
/// grouped[@"odd"];  /// { @1, @3, @5 }
/// @endcode
ASTERISM_OVERLOADABLE NSDictionary *ASTGroupBy(id<NSFastEnumeration> collection, id<NSCopying> (NS_NOESCAPE ^block)(id obj)) {
    return __ASTGroupBy_NSFastEnumeration_block(collection, block);
}
star

Tue Jan 18 2022 10:48:29 GMT+0000 (Coordinated Universal Time)

#ios #swift #xcode #sort #array #sortarray
star

Mon Jan 17 2022 10:24:31 GMT+0000 (Coordinated Universal Time)

#ios #swift #xcode #simulator #size
star

Mon May 03 2021 16:22:37 GMT+0000 (Coordinated Universal Time)

#c++ #output #xcode #redirection
star

Tue Apr 20 2021 01:06:11 GMT+0000 (Coordinated Universal Time) https://gitlab.eecs.umich.edu/eecs281/wiki/-/wikis/xcode-file-redirection

#c++ #output #xcode #redirection
star

Sun Mar 07 2021 17:50:51 GMT+0000 (Coordinated Universal Time) https://github.com/robb/Asterism/blob/master/Asterism/ASTGroupBy.h

#objectivec #obj-c #docs #xcode

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension