text
stringlengths
1
22.8M
```objective-c // // // This program is free software: you can redistribute it and/or modify // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // along with this program. If not, see <path_to_url // #import "DHTypeBrowser.h" #import "DHTypes.h" #import "DHDocsetManager.h" @implementation DHTypeBrowser - (void)viewDidLoad { if(!self.docset) { // happens during state restoration return; } [super viewDidLoad]; self.clearsSelectionOnViewWillAppear = NO; self.searchController = [DHDBSearchController searchControllerWithDocsets:@[self.docset] typeLimit:nil viewController:self]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(prepareForURLSearch:) name:DHPrepareForURLSearch object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(enforceSmartTitleBarButton) name:DHSplitViewControllerDidSeparate object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(enforceSmartTitleBarButton) name:DHSplitViewControllerDidCollapse object:nil]; [self.tableView registerNib:[UINib nibWithNibName:@"DHBrowserCell" bundle:nil] forCellReuseIdentifier:@"DHBrowserCell"]; [self.tableView registerNib:[UINib nibWithNibName:@"DHLoadingCell" bundle:nil] forCellReuseIdentifier:@"DHLoadingCell"]; self.tableView.rowHeight = 44; self.title = self.docset.name; [self enforceSmartTitleBarButton]; if(self.isRestoring) { return; } } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; if(!self.didLoad && self.docset) { self.didLoad = YES; if(isRegularHorizontalClass && self.isActive) { [[DHWebViewController sharedWebViewController] loadURL:[self.docset indexFilePath]]; } NSString *typesCache = [self.docset.path stringByAppendingPathComponent:@".types.plist"]; NSDictionary *typesCacheDict = [NSDictionary dictionaryWithContentsOfFile:typesCache]; if(([self.docset.path contains:@"Apple_API_Reference"] || [self.docset.platform isEqualToString:@"apple"]) && typesCacheDict && [typesCacheDict[@"language"] integerValue] != [DHAppleActiveLanguage currentLanguage]) { typesCacheDict = nil; } if(typesCacheDict && typesCacheDict[@"types"] && [typesCacheDict[@"types"] isKindOfClass:[NSArray class]] && [typesCacheDict[@"types"] count]) { self.types = [typesCacheDict[@"types"] mutableCopy]; } else { self.tableView.allowsSelection = NO; self.isLoading = YES; dispatch_queue_t queue = dispatch_queue_create([[NSString stringWithFormat:@"%u", arc4random() % 100000] UTF8String], 0); dispatch_async(queue, ^{ [self.docset executeBlockWithinDocsetDBConnection:^(FMDatabase *db) { NSMutableArray *types = [NSMutableArray array]; NSMutableDictionary *typesDict = [NSMutableDictionary dictionary]; NSConditionLock *lock = [DHDocset stepLock]; NSString *platform = self.docset.platform; [lock lockWhenCondition:DHLockAllAllowed]; NSString *query = @"SELECT type, COUNT(rowid) FROM searchIndex GROUP BY type"; if([self.docset.platform isEqualToString:@"apple"]) { if([DHAppleActiveLanguage currentLanguage] == DHNewActiveAppleLanguageSwift) { query = @"SELECT type, COUNT(rowid) FROM searchIndex WHERE path NOT LIKE '%<dash_entry_language=objc>%' AND path NOT LIKE '%<dash_entry_language=occ>%' GROUP BY type"; } else { query = @"SELECT type, COUNT(rowid) FROM searchIndex WHERE path NOT LIKE '%<dash_entry_language=swift>%' GROUP BY type"; } } FMResultSet *rs = [db executeQuery:query]; BOOL next = [rs next]; [lock unlock]; while(next) { NSString *type = [rs stringForColumnIndex:0]; if(type && type.length) { NSInteger count = [rs intForColumnIndex:1]; NSString *pluralName = [DHTypes pluralFromEncoded:type]; if([pluralName isEqualToString:@"Categories"] && ([platform isEqualToString:@"python"] || [platform isEqualToString:@"flask"] || [platform isEqualToString:@"twisted"] || [platform isEqualToString:@"django"] || [platform isEqualToString:@"actionscript"] || [platform isEqualToString:@"nodejs"])) { pluralName = @"Modules"; } typesDict[type] = @{@"type": type, @"count": @(count), @"plural": pluralName}; } [lock lockWhenCondition:DHLockAllAllowed]; next = [rs next]; [lock unlock]; } NSMutableArray *typeOrder = [NSMutableArray arrayWithArray:[[DHTypes sharedTypes] orderedTypes]]; [typeOrder removeObject:@"Guide"]; [typeOrder removeObject:@"Section"]; [typeOrder removeObject:@"Sample"]; [typeOrder removeObject:@"File"]; [typeOrder addObject:@"Guide"]; [typeOrder addObject:@"Section"]; [typeOrder addObject:@"Sample"]; [typeOrder addObject:@"File"]; if([platform isEqualToString:@"go"] || [platform isEqualToString:@"godoc"]) { [typeOrder removeObject:@"Type"]; [typeOrder insertObject:@"Type" atIndex:0]; } if([platform isEqualToString:@"swift"]) { [typeOrder removeObject:@"Type"]; [typeOrder insertObject:@"Type" atIndex:0]; } for(NSString *key in typeOrder) { NSDictionary *type = typesDict[key]; if(type) { [types addObject:type]; } } dispatch_sync(dispatch_get_main_queue(), ^{ self.isLoading = NO; self.isEmpty = types.count <= 0; if(!self.isEmpty) { self.tableView.allowsSelection = YES; } self.types = types; NSMutableDictionary *newTypesCacheDict = [@{@"types": types} mutableCopy];; if([self.docset.path contains:@"Apple_API_Reference.docset"] || [self.docset.platform isEqualToString:@"apple"]) { newTypesCacheDict[@"language"] = @([DHAppleActiveLanguage currentLanguage]); } [newTypesCacheDict writeToFile:typesCache atomically:NO]; [self.tableView reloadData]; }); } readOnly:YES lockCondition:DHLockAllAllowed optimisedIndex:YES]; }); } } [self.tableView deselectAll:YES]; [self.searchController viewWillAppear]; } - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection { if(previousTraitCollection) { [super traitCollectionDidChange:previousTraitCollection]; } [self.searchController traitCollectionDidChange:previousTraitCollection]; [self enforceSmartTitleBarButton]; } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; [self.searchController viewWillDisappear]; } - (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; [self.searchController viewDidDisappear]; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [self.searchController viewDidAppear]; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if(self.isLoading || self.isEmpty) { return 3; } NSInteger count = self.types.count; return count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { DHBrowserTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:(self.isLoading || self.isEmpty) ? @"DHLoadingCell" : @"DHBrowserCell" forIndexPath:indexPath]; if((self.isLoading || self.isEmpty) && indexPath.row == 2) { cell.userInteractionEnabled = NO; NSMutableParagraphStyle *paragraph = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy]; [paragraph setAlignment:NSTextAlignmentCenter]; UIFont *font = [UIFont boldSystemFontOfSize:20]; cell.textLabel.attributedText = [[NSAttributedString alloc] initWithString:(self.isEmpty) ? @"Empty Docset" : @"Loading..." attributes:@{NSParagraphStyleAttributeName : paragraph, NSForegroundColorAttributeName: [UIColor colorWithWhite:0.8 alpha:1], NSFontAttributeName: font}]; } else if(self.isLoading || self.isEmpty) { cell.userInteractionEnabled = NO; cell.textLabel.text = @""; } else { cell.userInteractionEnabled = YES; NSDictionary *type = self.types[indexPath.row]; cell.textLabel.text = type[@"plural"]; [cell.titleLabel setRightDetailText:[type[@"count"] stringValue] adjustMainWidth:YES]; cell.imageView.image = [UIImage imageNamed:type[@"type"]];; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; } return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self performSegueWithIdentifier:@"DHEntryBrowserSegue" sender:self]; } - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if([[segue identifier] isEqualToString:@"DHEntryBrowserSegue"]) { id entryBrowser = [segue destinationViewController]; [entryBrowser setDocset:self.docset]; NSDictionary *selectedType = self.types[self.tableView.indexPathForSelectedRow.row]; [entryBrowser setType:selectedType[@"type"]]; [entryBrowser setTitle:selectedType[@"plural"]]; } else if([[segue identifier] isEqualToString:@"DHShowIndexPageSegue"]) { DHWebViewController *webViewController = [segue destinationViewController]; webViewController.urlToLoad = [self.docset indexFilePath]; } else { [self.searchController prepareForSegue:segue sender:sender]; } } - (void)prepareForURLSearch:(id)sender { [self.searchDisplayController setActive:NO animated:NO]; } - (void)encodeRestorableStateWithCoder:(NSCoder *)coder { [self.searchController encodeRestorableStateWithCoder:coder]; [coder encodeObject:self.docset.relativePath forKey:@"docsetRelativePath"]; [coder encodeObject:self.types forKey:@"types"]; [super encodeRestorableStateWithCoder:coder]; } - (void)decodeRestorableStateWithCoder:(NSCoder *)coder { NSString *docsetRelativePath = [coder decodeObjectForKey:@"docsetRelativePath"]; self.docset = [[DHDocsetManager sharedManager] docsetWithRelativePath:docsetRelativePath]; self.isRestoring = YES; [self viewDidLoad]; self.isRestoring = NO; self.types = [coder decodeObjectForKey:@"types"]; [self.searchController decodeRestorableStateWithCoder:coder]; [super decodeRestorableStateWithCoder:coder]; } - (void)enforceSmartTitleBarButton { if(isRegularHorizontalClass) { if(self.navigationItem.titleView) { self.navigationItem.titleView = nil; self.title = self.docset.name; } } else if(!self.navigationItem.titleView && ![[self.docset indexFilePath] isCaseInsensitiveEqual:[[NSBundle mainBundle] pathForResource:@"home" ofType:@"html"]] && [DHDocsetBrowser titleBarItemAttributedStringTemplate]) { @try { UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; NSMutableAttributedString *title = [[DHDocsetBrowser titleBarItemAttributedStringTemplate] mutableCopy]; [title.mutableString setString:[NSString stringWithFormat:@"%@ ", self.docset.name]]; [title addAttributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor], NSFontAttributeName: [UIFont fontWithName:@"Ionicons" size:20]} range:NSMakeRange(title.mutableString.length-1, 1)]; if(isIOS11) { [title addAttributes:@{NSBaselineOffsetAttributeName: @(2)} range:NSMakeRange(0, title.mutableString.length-2)]; } else { [title addAttributes:@{NSBaselineOffsetAttributeName: @(-2)} range:NSMakeRange(title.mutableString.length-1, 1)]; } [button setAttributedTitle:title forState:UIControlStateNormal]; [button addTarget:self action:@selector(smartTitleBarButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; self.navigationItem.titleView = button; } @catch(NSException *exception) { NSLog(@"%@ %@", exception, [exception callStackSymbols]); } } } - (void)smartTitleBarButtonPressed:(id)sender { [[DHWebViewController sharedWebViewController] loadURL:[self.docset indexFilePath]]; [self performSegueWithIdentifier:@"DHShowIndexPageSegue" sender:self]; } - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; } @end ```
Aphananthe is a small genus of evergreen trees in the family Cannabaceae. Around six species are recognised, found in Madagascar, South-east Asia, Mexico and Australia. Leaves are alternate on the stem and toothed. Flowers are unisexual, fruit form as drupes. The generic name of Aphananthe refers to insignificant flowers. Species include Aphananthe aspera and Aphananthe philippinensis. References External links Cannabaceae Rosales genera
```c++ /* * (See accompanying file LICENSE_1_0.txt or copy at * path_to_url * */ /*! * \file atomic/detail/ops_gcc_x86_dcas.hpp * * This header contains implementation of the double-width CAS primitive for x86. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_X86_DCAS_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_GCC_X86_DCAS_HPP_INCLUDED_ #include <boost/cstdint.hpp> #include <boost/memory_order.hpp> #include <boost/atomic/detail/config.hpp> #include <boost/atomic/detail/storage_type.hpp> #include <boost/atomic/capabilities.hpp> #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) template< bool Signed > struct gcc_dcas_x86 { typedef typename make_storage_type< 8u, Signed >::type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; static BOOST_CONSTEXPR_OR_CONST bool is_always_lock_free = true; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { if ((((uint32_t)&storage) & 0x00000007) == 0) { #if defined(__SSE2__) __asm__ __volatile__ ( #if defined(__AVX__) "vmovq %1, %%xmm4\n\t" "vmovq %%xmm4, %0\n\t" #else "movq %1, %%xmm4\n\t" "movq %%xmm4, %0\n\t" #endif : "=m" (storage) : "m" (v) : "memory", "xmm4" ); #else __asm__ __volatile__ ( "fildll %1\n\t" "fistpll %0\n\t" : "=m" (storage) : "m" (v) : "memory" ); #endif } else { #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) #if defined(__PIC__) uint32_t v_lo = (uint32_t)v; uint32_t scratch; __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %[value_lo], %%ebx\n\t" "movl %[dest], %%eax\n\t" "movl 4+%[dest], %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b %[dest]\n\t" "jne 1b\n\t" "movl %[scratch], %%ebx\n\t" : [scratch] "=m" (scratch), [dest] "=o" (storage), [value_lo] "+a" (v_lo) : "c" ((uint32_t)(v >> 32)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "edx", "memory" ); #else // defined(__PIC__) __asm__ __volatile__ ( "movl %[dest], %%eax\n\t" "movl 4+%[dest], %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b %[dest]\n\t" "jne 1b\n\t" : [dest] "=o" (storage) : [value_lo] "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "eax", "edx", "memory" ); #endif // defined(__PIC__) #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) #if defined(__PIC__) uint32_t v_lo = (uint32_t)v; uint32_t scratch; __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %[value_lo], %%ebx\n\t" "movl 0(%[dest]), %%eax\n\t" "movl 4(%[dest]), %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b 0(%[dest])\n\t" "jne 1b\n\t" "movl %[scratch], %%ebx\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : [scratch] "=m,m" (scratch), [value_lo] "+a,a" (v_lo) : "c,c" ((uint32_t)(v >> 32)), [dest] "D,S" (&storage) #else : [scratch] "=m" (scratch), [value_lo] "+a" (v_lo) : "c" ((uint32_t)(v >> 32)), [dest] "D" (&storage) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "edx", "memory" ); #else // defined(__PIC__) __asm__ __volatile__ ( "movl 0(%[dest]), %%eax\n\t" "movl 4(%[dest]), %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b 0(%[dest])\n\t" "jne 1b\n\t" : #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : [value_lo] "b,b" ((uint32_t)v), "c,c" ((uint32_t)(v >> 32)), [dest] "D,S" (&storage) #else : [value_lo] "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32)), [dest] "D" (&storage) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "eax", "edx", "memory" ); #endif // defined(__PIC__) #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) } } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT { storage_type value; if ((((uint32_t)&storage) & 0x00000007) == 0) { #if defined(__SSE2__) __asm__ __volatile__ ( #if defined(__AVX__) "vmovq %1, %%xmm4\n\t" "vmovq %%xmm4, %0\n\t" #else "movq %1, %%xmm4\n\t" "movq %%xmm4, %0\n\t" #endif : "=m" (value) : "m" (storage) : "memory", "xmm4" ); #else __asm__ __volatile__ ( "fildll %1\n\t" "fistpll %0\n\t" : "=m" (value) : "m" (storage) : "memory" ); #endif } else { #if defined(__clang__) // Clang cannot allocate eax:edx register pairs but it has sync intrinsics value = __sync_val_compare_and_swap(&storage, (storage_type)0, (storage_type)0); #else // We don't care for comparison result here; the previous value will be stored into value anyway. // Also we don't care for ebx and ecx values, they just have to be equal to eax and edx before cmpxchg8b. __asm__ __volatile__ ( "movl %%ebx, %%eax\n\t" "movl %%ecx, %%edx\n\t" "lock; cmpxchg8b %[storage]\n\t" : "=&A" (value) : [storage] "m" (storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif } return value; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { #if defined(__clang__) // Clang cannot allocate eax:edx register pairs but it has sync intrinsics storage_type old_expected = expected; expected = __sync_val_compare_and_swap(&storage, old_expected, desired); return expected == old_expected; #elif defined(__PIC__) // Make sure ebx is saved and restored properly in case // of position independent code. To make this work // setup register constraints such that ebx can not be // used by accident e.g. as base address for the variable // to be modified. Accessing "scratch" should always be okay, // as it can only be placed on the stack (and therefore // accessed through ebp or esp only). // // In theory, could push/pop ebx onto/off the stack, but movs // to a prepared stack slot turn out to be faster. uint32_t scratch; bool success; #if defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %[desired_lo], %%ebx\n\t" "lock; cmpxchg8b (%[dest])\n\t" "movl %[scratch], %%ebx\n\t" : "+A" (expected), [scratch] "=m" (scratch), [success] "=@ccz" (success) : [desired_lo] "Sm" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32)), [dest] "D" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #else // defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %[desired_lo], %%ebx\n\t" "lock; cmpxchg8b (%[dest])\n\t" "movl %[scratch], %%ebx\n\t" "sete %[success]\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : "+A,A,A,A,A,A" (expected), [scratch] "=m,m,m,m,m,m" (scratch), [success] "=q,m,q,m,q,m" (success) : [desired_lo] "S,S,D,D,m,m" ((uint32_t)desired), "c,c,c,c,c,c" ((uint32_t)(desired >> 32)), [dest] "D,D,S,S,D,D" (&storage) #else : "+A" (expected), [scratch] "=m" (scratch), [success] "=q" (success) : [desired_lo] "S" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32)), [dest] "D" (&storage) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif // defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) return success; #else // defined(__PIC__) bool success; #if defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) __asm__ __volatile__ ( "lock; cmpxchg8b %[dest]\n\t" : "+A" (expected), [dest] "+m" (storage), [success] "=@ccz" (success) : "b" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #else // defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) __asm__ __volatile__ ( "lock; cmpxchg8b %[dest]\n\t" "sete %[success]\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : "+A,A" (expected), [dest] "+m,m" (storage), [success] "=q,m" (success) : "b,b" ((uint32_t)desired), "c,c" ((uint32_t)(desired >> 32)) #else : "+A" (expected), [dest] "+m" (storage), [success] "=q" (success) : "b" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32)) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif // defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) return success; #endif // defined(__PIC__) } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { #if defined(__clang__) // Clang cannot allocate eax:edx register pairs but it has sync intrinsics storage_type old_val = storage; while (true) { storage_type val = __sync_val_compare_and_swap(&storage, old_val, v); if (val == old_val) return val; old_val = val; } #elif !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) #if defined(__PIC__) uint32_t scratch; __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %%eax, %%ebx\n\t" "movl %%edx, %%ecx\n\t" "movl %[dest], %%eax\n\t" "movl 4+%[dest], %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b %[dest]\n\t" "jne 1b\n\t" "movl %[scratch], %%ebx\n\t" : "+A" (v), [scratch] "=m" (scratch), [dest] "+o" (storage) : : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "ecx", "memory" ); return v; #else // defined(__PIC__) __asm__ __volatile__ ( "movl %[dest], %%eax\n\t" "movl 4+%[dest], %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b %[dest]\n\t" "jne 1b\n\t" : "=A" (v), [dest] "+o" (storage) : "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return v; #endif // defined(__PIC__) #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) #if defined(__PIC__) uint32_t scratch; __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %%eax, %%ebx\n\t" "movl %%edx, %%ecx\n\t" "movl 0(%[dest]), %%eax\n\t" "movl 4(%[dest]), %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b 0(%[dest])\n\t" "jne 1b\n\t" "movl %[scratch], %%ebx\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : "+A,A" (v), [scratch] "=m,m" (scratch) : [dest] "D,S" (&storage) #else : "+A" (v), [scratch] "=m" (scratch) : [dest] "D" (&storage) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "ecx", "memory" ); return v; #else // defined(__PIC__) __asm__ __volatile__ ( "movl 0(%[dest]), %%eax\n\t" "movl 4(%[dest]), %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b 0(%[dest])\n\t" "jne 1b\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : "=A,A" (v) : "b,b" ((uint32_t)v), "c,c" ((uint32_t)(v >> 32)), [dest] "D,S" (&storage) #else : "=A" (v) : "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32)), [dest] "D" (&storage) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return v; #endif // defined(__PIC__) #endif } }; #endif // defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) template< bool Signed > struct gcc_dcas_x86_64 { typedef typename make_storage_type< 16u, Signed >::type storage_type; typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; static BOOST_CONSTEXPR_OR_CONST bool is_always_lock_free = true; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { uint64_t const* p_value = (uint64_t const*)&v; const uint64_t v_lo = p_value[0], v_hi = p_value[1]; #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %[dest], %%rax\n\t" "movq 8+%[dest], %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b %[dest]\n\t" "jne 1b\n\t" : [dest] "=o" (storage) : "b" (v_lo), "c" (v_hi) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "rax", "rdx", "memory" ); #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq 0(%[dest]), %%rax\n\t" "movq 8(%[dest]), %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b 0(%[dest])\n\t" "jne 1b\n\t" : : "b" (v_lo), "c" (v_hi), [dest] "r" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "rax", "rdx", "memory" ); #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT { #if defined(__clang__) // Clang cannot allocate rax:rdx register pairs but it has sync intrinsics storage_type value = storage_type(); return __sync_val_compare_and_swap(&storage, value, value); #elif defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) // GCC 4.4 can't allocate rax:rdx register pair either but it also doesn't support 128-bit __sync_val_compare_and_swap storage_type value; // We don't care for comparison result here; the previous value will be stored into value anyway. // Also we don't care for rbx and rcx values, they just have to be equal to rax and rdx before cmpxchg16b. #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %%rbx, %%rax\n\t" "movq %%rcx, %%rdx\n\t" "lock; cmpxchg16b %[storage]\n\t" "movq %%rax, %[value]\n\t" "movq %%rdx, 8+%[value]\n\t" : [value] "=o" (value) : [storage] "m" (storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %%rbx, %%rax\n\t" "movq %%rcx, %%rdx\n\t" "lock; cmpxchg16b %[storage]\n\t" "movq %%rax, 0(%[value])\n\t" "movq %%rdx, 8(%[value])\n\t" : : [storage] "m" (storage), [value] "r" (&value) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) return value; #else // defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) storage_type value; // We don't care for comparison result here; the previous value will be stored into value anyway. // Also we don't care for rbx and rcx values, they just have to be equal to rax and rdx before cmpxchg16b. __asm__ __volatile__ ( "movq %%rbx, %%rax\n\t" "movq %%rcx, %%rdx\n\t" "lock; cmpxchg16b %[storage]\n\t" : "=&A" (value) : [storage] "m" (storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return value; #endif } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { #if defined(__clang__) // Clang cannot allocate rax:rdx register pairs but it has sync intrinsics storage_type old_expected = expected; expected = __sync_val_compare_and_swap(&storage, old_expected, desired); return expected == old_expected; #elif defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) // GCC 4.4 can't allocate rax:rdx register pair either but it also doesn't support 128-bit __sync_val_compare_and_swap uint64_t const* p_desired = (uint64_t const*)&desired; const uint64_t desired_lo = p_desired[0], desired_hi = p_desired[1]; bool success; #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %[expected], %%rax\n\t" "movq 8+%[expected], %%rdx\n\t" "lock; cmpxchg16b %[dest]\n\t" "sete %[success]\n\t" "movq %%rax, %[expected]\n\t" "movq %%rdx, 8+%[expected]\n\t" : [dest] "+m" (storage), [expected] "+o" (expected), [success] "=q" (success) : "b" (desired_lo), "c" (desired_hi) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq 0(%[expected]), %%rax\n\t" "movq 8(%[expected]), %%rdx\n\t" "lock; cmpxchg16b %[dest]\n\t" "sete %[success]\n\t" "movq %%rax, 0(%[expected])\n\t" "movq %%rdx, 8(%[expected])\n\t" : [dest] "+m" (storage), [success] "=q" (success) : "b" (desired_lo), "c" (desired_hi), [expected] "r" (&expected) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) return success; #else // defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) uint64_t const* p_desired = (uint64_t const*)&desired; const uint64_t desired_lo = p_desired[0], desired_hi = p_desired[1]; bool success; #if defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) __asm__ __volatile__ ( "lock; cmpxchg16b %[dest]\n\t" : "+A" (expected), [dest] "+m" (storage), [success] "=@ccz" (success) : "b" (desired_lo), "c" (desired_hi) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #else // defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) __asm__ __volatile__ ( "lock; cmpxchg16b %[dest]\n\t" "sete %[success]\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : "+A,A" (expected), [dest] "+m,m" (storage), [success] "=q,m" (success) : "b,b" (desired_lo), "c,c" (desired_hi) #else : "+A" (expected), [dest] "+m" (storage), [success] "=q" (success) : "b" (desired_lo), "c" (desired_hi) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif // defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) return success; #endif // defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { #if defined(__clang__) // Clang cannot allocate eax:edx register pairs but it has sync intrinsics storage_type old_val = storage; while (true) { storage_type val = __sync_val_compare_and_swap(&storage, old_val, v); if (val == old_val) return val; old_val = val; } #elif defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) // GCC 4.4 can't allocate rax:rdx register pair either but it also doesn't support 128-bit __sync_val_compare_and_swap storage_type old_value; uint64_t const* p_value = (uint64_t const*)&v; const uint64_t v_lo = p_value[0], v_hi = p_value[1]; #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %[dest], %%rax\n\t" "movq 8+%[dest], %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b %[dest]\n\t" "jne 1b\n\t" "movq %%rax, %[old_value]\n\t" "movq %%rdx, 8+%[old_value]\n\t" : [dest] "+o" (storage), [old_value] "=o" (old_value) : "b" (v_lo), "c" (v_hi) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq 0(%[dest]), %%rax\n\t" "movq 8(%[dest]), %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b 0(%[dest])\n\t" "jne 1b\n\t" "movq %%rax, 0(%[old_value])\n\t" "movq %%rdx, 8(%[old_value])\n\t" : : "b" (v_lo), "c" (v_hi), [dest] "r" (&storage), [old_value] "r" (&old_value) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) return old_value; #else // defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) uint64_t const* p_value = (uint64_t const*)&v; const uint64_t v_lo = p_value[0], v_hi = p_value[1]; #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %[dest], %%rax\n\t" "movq 8+%[dest], %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b %[dest]\n\t" "jne 1b\n\t" : "=&A" (v), [dest] "+o" (storage) : "b" (v_lo), "c" (v_hi) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq 0(%[dest]), %%rax\n\t" "movq 8(%[dest]), %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b 0(%[dest])\n\t" "jne 1b\n\t" : "=&A" (v) : "b" (v_lo), "c" (v_hi), [dest] "r" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) return v; #endif } }; #endif // defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_GCC_X86_DCAS_HPP_INCLUDED_ ```
```less /*! * # Semantic UI - Item * path_to_url * * * Released under the MIT license * path_to_url * */ /******************************* Theme *******************************/ @type : 'view'; @element : 'item'; @import (multiple) '../../theme.config'; /******************************* Standard *******************************/ /*-------------- Item ---------------*/ .ui.items > .item { display: @display; margin: @itemSpacing 0em; width: @width; min-height: @minHeight; background: @background; padding: @padding; border: @border; border-radius: @borderRadius; box-shadow: @boxShadow; transition: @transition; z-index: @zIndex; } .ui.items > .item a { cursor: pointer; } /*-------------- Items ---------------*/ .ui.items { margin: @groupMargin; } .ui.items:first-child { margin-top: 0em !important; } .ui.items:last-child { margin-bottom: 0em !important; } /*-------------- Item ---------------*/ .ui.items > .item:after { display: block; content: ' '; height: 0px; clear: both; overflow: hidden; visibility: hidden; } .ui.items > .item:first-child { margin-top: 0em; } .ui.items > .item:last-child { margin-bottom: 0em; } /*-------------- Images ---------------*/ .ui.items > .item > .image { position: relative; flex: 0 0 auto; display: @imageDisplay; float: @imageFloat; margin: @imageMargin; padding: @imagePadding; max-height: @imageMaxHeight; align-self: @imageVerticalAlign; } .ui.items > .item > .image > img { display: block; width: 100%; height: auto; border-radius: @imageBorderRadius; border: @imageBorder; } .ui.items > .item > .image:only-child > img { border-radius: @borderRadius; } /*-------------- Content ---------------*/ .ui.items > .item > .content { display: block; flex: 1 1 auto; background: @contentBackground; margin: @contentMargin; padding: @contentPadding; box-shadow: @contentBoxShadow; font-size: @contentFontSize; border: @contentBorder; border-radius: @contentBorderRadius; } .ui.items > .item > .content:after { display: block; content: ' '; height: 0px; clear: both; overflow: hidden; visibility: hidden; } .ui.items > .item > .image + .content { min-width: 0; width: @contentWidth; display: @contentDisplay; margin-left: @contentOffset; align-self: @contentVerticalAlign; padding-left: @contentImageDistance; } .ui.items > .item > .content > .header { display: inline-block; margin: @headerMargin; font-family: @headerFont; font-weight: @headerFontWeight; color: @headerColor; } /* Default Header Size */ .ui.items > .item > .content > .header:not(.ui) { font-size: @headerFontSize; } /*-------------- Floated ---------------*/ .ui.items > .item [class*="left floated"] { float: left; } .ui.items > .item [class*="right floated"] { float: right; } /*-------------- Content Image ---------------*/ .ui.items > .item .content img { align-self: @contentImageVerticalAlign; width: @contentImageWidth; } .ui.items > .item img.avatar, .ui.items > .item .avatar img { width: @avatarSize; height: @avatarSize; border-radius: @avatarBorderRadius; } /*-------------- Description ---------------*/ .ui.items > .item > .content > .description { margin-top: @descriptionDistance; max-width: @descriptionMaxWidth; font-size: @descriptionFontSize; line-height: @descriptionLineHeight; color: @descriptionColor; } /*-------------- Paragraph ---------------*/ .ui.items > .item > .content p { margin: 0em 0em @paragraphDistance; } .ui.items > .item > .content p:last-child { margin-bottom: 0em; } /*-------------- Meta ---------------*/ .ui.items > .item .meta { margin: @metaMargin; font-size: @metaFontSize; line-height: @metaLineHeight; color: @metaColor; } .ui.items > .item .meta * { margin-right: @metaSpacing; } .ui.items > .item .meta :last-child { margin-right: 0em; } .ui.items > .item .meta [class*="right floated"] { margin-right: 0em; margin-left: @metaSpacing; } /*-------------- Links ---------------*/ /* Generic */ .ui.items > .item > .content a:not(.ui) { color: @contentLinkColor; transition: @contentLinkTransition; } .ui.items > .item > .content a:not(.ui):hover { color: @contentLinkHoverColor; } /* Header */ .ui.items > .item > .content > a.header { color: @headerLinkColor; } .ui.items > .item > .content > a.header:hover { color: @headerLinkHoverColor; } /* Meta */ .ui.items > .item .meta > a:not(.ui) { color: @metaLinkColor; } .ui.items > .item .meta > a:not(.ui):hover { color: @metaLinkHoverColor; } /*-------------- Labels ---------------*/ /*-----Star----- */ /* Icon */ .ui.items > .item > .content .favorite.icon { cursor: pointer; opacity: @actionOpacity; transition: @actionTransition; } .ui.items > .item > .content .favorite.icon:hover { opacity: @actionHoverOpacity; color: @favoriteColor; } .ui.items > .item > .content .active.favorite.icon { color: @favoriteActiveColor; } /*-----Like----- */ /* Icon */ .ui.items > .item > .content .like.icon { cursor: pointer; opacity: @actionOpacity; transition: @actionTransition; } .ui.items > .item > .content .like.icon:hover { opacity: @actionHoverOpacity; color: @likeColor; } .ui.items > .item > .content .active.like.icon { color: @likeActiveColor; } /*---------------- Extra Content -----------------*/ .ui.items > .item .extra { display: @extraDisplay; position: @extraPosition; background: @extraBackground; margin: @extraMargin; width: @extraWidth; padding: @extraPadding; top: @extraTop; left: @extraLeft; color: @extraColor; box-shadow: @extraBoxShadow; transition: @extraTransition; border-top: @extraDivider; } .ui.items > .item .extra > * { margin: (@extraRowSpacing / 2) @extraHorizontalSpacing (@extraRowSpacing / 2) 0em; } .ui.items > .item .extra > [class*="right floated"] { margin: (@extraRowSpacing / 2) 0em (@extraRowSpacing / 2) @extraHorizontalSpacing; } .ui.items > .item .extra:after { display: block; content: ' '; height: 0px; clear: both; overflow: hidden; visibility: hidden; } /******************************* Responsive *******************************/ /* Default Image Width */ .ui.items > .item > .image:not(.ui) { width: @imageWidth; } /* Tablet Only */ @media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) { .ui.items > .item { margin: @tabletItemSpacing 0em; } .ui.items > .item > .image:not(.ui) { width: @tabletImageWidth; } .ui.items > .item > .image + .content { display: block; padding: 0em 0em 0em @tabletContentImageDistance; } } /* Mobile Only */ @media only screen and (max-width: @largestMobileScreen) { .ui.items:not(.unstackable) > .item { flex-direction: column; margin: @mobileItemSpacing 0em; } .ui.items:not(.unstackable) > .item > .image { display: block; margin-left: auto; margin-right: auto; } .ui.items:not(.unstackable) > .item > .image, .ui.items:not(.unstackable) > .item > .image > img { max-width: 100% !important; width: @mobileImageWidth !important; max-height: @mobileImageMaxHeight !important; } .ui.items:not(.unstackable) > .item > .image + .content { display: block; padding: @mobileContentImageDistance 0em 0em; } } /******************************* Variations *******************************/ /*------------------- Aligned --------------------*/ .ui.items > .item > .image + [class*="top aligned"].content { align-self: flex-start; } .ui.items > .item > .image + [class*="middle aligned"].content { align-self: center; } .ui.items > .item > .image + [class*="bottom aligned"].content { align-self: flex-end; } /*-------------- Relaxed ---------------*/ .ui.relaxed.items > .item { margin: @relaxedItemSpacing 0em; } .ui[class*="very relaxed"].items > .item { margin: @veryRelaxedItemSpacing 0em; } /*------------------- Divided --------------------*/ .ui.divided.items > .item { border-top: @dividedBorder; margin: @dividedMargin; padding: @dividedPadding; } .ui.divided.items > .item:first-child { border-top: none; margin-top: @dividedFirstLastMargin !important; padding-top: @dividedFirstLastPadding !important; } .ui.divided.items > .item:last-child { margin-bottom: @dividedFirstLastMargin !important; padding-bottom: @dividedFirstLastPadding !important; } /* Relaxed Divided */ .ui.relaxed.divided.items > .item { margin: 0em; padding: @relaxedItemSpacing 0em; } .ui[class*="very relaxed"].divided.items > .item { margin: 0em; padding: @veryRelaxedItemSpacing 0em; } /*------------------- Link --------------------*/ .ui.items a.item:hover, .ui.link.items > .item:hover { cursor: pointer; } .ui.items a.item:hover .content .header, .ui.link.items > .item:hover .content .header { color: @headerLinkHoverColor; } /*-------------- Size ---------------*/ .ui.items > .item { font-size: @relativeMedium; } /*--------------- Unstackable ----------------*/ @media only screen and (max-width: @largestMobileScreen) { .ui.unstackable.items > .item > .image, .ui.unstackable.items > .item > .image > img { width: @unstackableMobileImageWidth !important; } } .loadUIOverrides(); ```
or is a fjord in the municipalities of Lavangen and Salangen in Troms og Finnmark county, Norway. The majority of the fjord is in Lavangen municipality (hence the name of the municipality). The long fjord flows to the northwest and empties into the larger Astafjorden. The deepest point in the fjord reaches about below sea level. The village of Tennevoll lies at the end of the fjord and the village of Å lies on the northern shore. See also List of Norwegian fjords References Fjords of Troms og Finnmark Lavangen Salangen
Scarlett Hill was a Canadian soap opera (first written for CBC Television) which ran from October 1962 to 1964. This was the first daytime soap opera produced for Canadian television, although it was based upon an American radio drama created by Robert and Kathleen Lindsay. The series focused on the residents of a boarding house, and starred John Drainie, Ed McNamara, Gordon Pinsent, and Beth Lockerbie. The series was syndicated to the United Kingdom, Australia and the US; in America, the show ran in syndication from 1965 to 1966 on a handful of stations. Cast The cast included: Ivor Barry: Walter Pendelton Suzanne Bryant: Janice Turner Beth Lockerbie: Kate Russell Ed McNamara: Harry Alan Pearce: Sidney Gordon Pinset: Dr. David Black Lucy Warner: Ginny References External links 1960s Canadian drama television series CBC Television original programming Canadian television soap operas 1962 Canadian television series debuts 1964 Canadian television series endings
John Anthony Scalzi (March 22, 1907 – September 27, 1962) was a Major League Baseball player. He played one season with the Boston Braves between June 19 and 24, 1931. After serving as President of the Colonial League, Scalzi was serving as a scout for the New York Mets when he was killed in a car accident near Port Chester, New York. Scalzi Park, the largest recreational area within his home city of Stamford, Connecticut, is named after him. References External links 1907 births 1962 deaths Albany Senators players Baseball players from Connecticut Boston Braves players Georgetown University alumni New York Mets scouts Road incident deaths in New York (state) Sportspeople from Stamford, Connecticut
```javascript define(function (require) { var san = require('san'); var $ = require('jquery'); var moment = require('moment'); var layerTemplate = require('tpl!./CalendarLayer.html'); var Layer = san.defineComponent({ template: layerTemplate, filters: { selectedClass: function (date, value) { return date === value.getDate() && this.data.get('viewMonth') === value.getMonth() && this.data.get('viewYear') === value.getFullYear() ? 'selected' : ''; } }, updateViewState: function () { var viewYear = this.data.get('viewYear'); var viewMonth = this.data.get('viewMonth'); var viewDate = new Date(viewYear, viewMonth, 1); viewYear = viewDate.getFullYear(); viewMonth = viewDate.getMonth(); this.data.set('viewYear', viewYear); this.data.set('viewMonth', viewMonth); var dates = []; var day = viewDate.getDay() - 1; for (; day % 7; day--) { dates.push(''); } var nextMonth = new Date(viewYear, viewMonth + 1, 1); var days = (nextMonth - viewDate) / 24 / 60 / 60 / 1000; for (var i = 1; i <= days; i++) { dates.push(i); } this.data.set('dates', dates); }, hide: function () { this.data.set('left', -1000); }, show: function (pos) { this.data.set('left', pos.left); this.data.set('top', pos.top); var value = this.data.get('value'); this.data.set('viewYear', value.getFullYear()); this.data.set('viewMonth', value.getMonth()); this.updateViewState(); }, isHide: function () { return this.data.get('left') < 0; }, prevMonth: function () { var viewMonth = this.data.get('viewMonth'); this.data.set('viewMonth', viewMonth - 1); this.updateViewState(); }, nextMonth: function () { var viewMonth = this.data.get('viewMonth'); this.data.set('viewMonth', viewMonth + 1); this.updateViewState(); }, select: function (date) { this.fire('select', new Date( this.data.get('viewYear'), this.data.get('viewMonth'), date )); this.hide(); } }); return san.defineComponent({ template: '<template on-click="mainClick()" class="ui-calendar">{{ value | valueText }}</template>', initData: function () { return { value: new Date() }; }, initLayer: function () { if (!this.layer) { var layer = new Layer(); layer.data.set('left', -1000); layer.data.set('top', 0); layer.data.set('value', this.data.get('value')); this.layer = layer; this.layer.attach(document.body); var calendar = this; layer.on('select', function (value) { calendar.data.set('value', value); }); this.watch('value', function (value) { layer.data.set('value', value); }); this._docClicker = this.docClicker.bind(this); $(document).on('click', this._docClicker); } }, docClicker: function (e) { var target = e.target || e.srcElement; if (target !== this.el && $(target).closest(this.el).length === 0 && $(target).closest(this.layer.el).length === 0 ) { this.hideLayer(); } }, mainClick: function () { this.initLayer(); if (this.layer.isHide()) { this.showLayer(); } else { this.hideLayer(); } }, showLayer: function () { var pos = $(this.el).offset(); this.layer.show({ left: pos.left, top: pos.top + this.el.offsetHeight + 1 }); }, hideLayer: function () { this.layer && this.layer.hide(); }, disposed: function () { if (this.layer) { this.layer.dispose(); this.layer = null; $(document).off('click', this._docClicker); this._docClicker = null; } }, filters: { valueText: function (value) { if (value instanceof Date) { return moment(value).format('YYYY-MM-DD'); } return ''; } } }); }); ```
```java /* * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.apache.carbondata.core.scan.expression; import org.apache.carbondata.core.constants.CarbonCommonConstants; import org.apache.carbondata.core.metadata.datatype.DataType; import org.apache.carbondata.core.metadata.datatype.DataTypes; import org.apache.carbondata.core.scan.filter.intf.ExpressionType; import org.apache.carbondata.core.scan.filter.intf.RowIntf; import org.apache.carbondata.core.util.CarbonUtil; public class LiteralExpression extends LeafExpression { /** * */ private static final long serialVersionUID = 1L; private Object value; private DataType dataType; public LiteralExpression(Object value, DataType dataType) { this.value = value; this.dataType = dataType; } @Override public ExpressionResult evaluate(RowIntf value) { return new ExpressionResult(dataType, this.value, true); } public ExpressionResult getExpressionResult() { return new ExpressionResult(dataType, this.value, true); } @Override public ExpressionType getFilterExpressionType() { // TODO Auto-generated method stub return ExpressionType.LITERAL; } @Override public String getString() { // TODO Auto-generated method stub return "LiteralExpression(" + value + ')'; } @Override public String getStatement() { boolean quoteString = false; Object val = value; if (val != null) { if (dataType == DataTypes.STRING || val instanceof String) { quoteString = true; } else if (dataType == DataTypes.TIMESTAMP || dataType == DataTypes.DATE) { val = CarbonUtil.getFormattedDateOrTimestamp(dataType == DataTypes.TIMESTAMP ? CarbonCommonConstants.CARBON_TIMESTAMP_DEFAULT_FORMAT : CarbonCommonConstants.CARBON_DATE_DEFAULT_FORMAT, dataType, value, true); quoteString = true; } } return val == null ? null : quoteString ? "'" + val.toString() + "'" : val.toString(); } /** * getLiteralExpDataType. * * @return */ public DataType getLiteralExpDataType() { return dataType; } public Object getLiteralExpValue() { return value; } @Override public void findAndSetChild(Expression oldExpr, Expression newExpr) { } } ```
```haskell {-# LANGUAGE CPP #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-specialise #-} {-# OPTIONS_GHC -fno-omit-interface-pragmas #-} {-# OPTIONS_GHC -Wno-orphans #-} module PlutusTx.Builtins.HasOpaque where import PlutusTx.Base (id, ($)) import PlutusTx.Bool (Bool (..)) import PlutusTx.Builtins.Internal import Data.Kind qualified as GHC import Data.String (IsString (..)) import Data.Text qualified as Text import GHC.Magic qualified as Magic import Prelude qualified as Haskell (String) #if MIN_VERSION_base(4,20,0) import Prelude (type (~)) #endif {- Note [noinline hack] For some functions we have two conflicting desires: - We want to have the unfolding available for the plugin. - We don't want the function to *actually* get inlined before the plugin runs, since we rely on being able to see the original function for some reason. 'INLINABLE' achieves the first, but may cause the function to be inlined too soon. We can solve this at specific call sites by using the 'noinline' magic function from GHC. This stops GHC from inlining it. As a bonus, it also won't be inlined if that function is compiled later into the body of another function. We do therefore need to handle 'noinline' in the plugin, as it itself does not have an unfolding. Another annoying quirk: even if you have 'noinline'd a function call, if the body is a single variable, it will still inline! This is the case for the obvious definition of 'stringToBuiltinString' (since the newtype constructor vanishes), so we have to add some obfuscation to the body to prevent it inlining. -} obfuscatedId :: a -> a obfuscatedId a = a {-# NOINLINE obfuscatedId #-} stringToBuiltinByteString :: Haskell.String -> BuiltinByteString stringToBuiltinByteString str = encodeUtf8 $ stringToBuiltinString str {-# INLINABLE stringToBuiltinByteString #-} stringToBuiltinString :: Haskell.String -> BuiltinString -- To explain why the obfuscatedId is here -- See Note [noinline hack] stringToBuiltinString str = obfuscatedId (BuiltinString $ Text.pack str) {-# INLINABLE stringToBuiltinString #-} {- Same noinline hack as with `String` type. -} instance IsString BuiltinByteString where -- Try and make sure the dictionary selector goes away, it's simpler to match on -- the application of 'stringToBuiltinByteString' -- See Note [noinline hack] fromString = Magic.noinline stringToBuiltinByteString {-# INLINE fromString #-} -- We can't put this in `Builtins.hs`, since that force `O0` deliberately, which prevents -- the unfoldings from going in. So we just stick it here. Fiddly. instance IsString BuiltinString where -- Try and make sure the dictionary selector goes away, it's simpler to match on -- the application of 'stringToBuiltinString' -- See Note [noinline hack] fromString = Magic.noinline stringToBuiltinString {-# INLINE fromString #-} {- Note [Built-in types and their Haskell counterparts] 'HasToBuiltin' allows us to convert a value of a built-in type such as 'ByteString' to its Plutus Tx counterpart, 'BuiltinByteString' in this case. The idea is the same for all built-in types: just take the Haskell version and make it the Plutus Tx one. 'HasToOpaque' is different, we use it for converting values of only those built-in types that exist in the Plutus Tx realm, within the Plutus Tx realm. I.e. we cannot convert a 'ByteString', since 'ByteString's don't exist in Plutus Tx, only 'BuiltinByteString's do. Consider, say, the built-in pair type. In Plutus Tx, we have an (opaque) type for this. It's opaque because you can't actually pattern match on it, instead you can only in fact use the specific functions that are available as builtins. We _also_ have the normal Haskell pair type. This is very different: you can pattern match on it, and you can use whatever user-defined functions you like on it. Users would really like to use the latter, and not the former. So we often want to _wrap_ our built-in functions with little adapters that convert between the opaque "version" of a type and the "normal Haskell" "version" of a type. This is what the 'HasToOpaque' and 'HasFromOpaque' classes do. They let us write wrappers for builtins relatively consistently by just calling 'toOpaque' on their arguments and 'fromOpaque' on the result. They shouldn't probably be used otherwise. Ideally, we would not have instances for types which don't have a different Haskell representation type, such as 'Integer'. 'Integer' in Plutus Tx user code _is_ the opaque built-in type, we don't expose a different one. So there's no conversion to do. However, this interacts badly with the instances for polymorphic built-in types, which also convert the type _inside_ them. (This is necessary to avoid doing multiple traversals of the type, e.g. we don't want to turn a built-in list into a Haskell list, and then traverse it again to conver the contents). Then we _need_ instances for all built-in types, so we provide a @default@ implementation for both 'toOpaque' and 'fromOpaque' that simply returns the argument back and use it for those types that don't require any conversions. Summarizing, 'toBuiltin'/'fromBuiltin' should be used to cross the boundary between Plutus Tx and Haskell, while 'toOpaque'/'fromOpaque' should be used within Plutus Tx to convert values to/from their @Builtin*@ representation, which we need because neither pattern matching nor standard library functions are available for values of @Builtin*@ types that we get from built-in functions. -} {- Note [HasFromOpaque/HasToOpaque instances for polymorphic builtin types] For various technical reasons (see Note [Representable built-in functions over polymorphic built-in types]) it's not always easy to provide polymorphic constructors for built-in types, but we can usually provide destructors. What this means in practice is that we can write a generic 'HasFromOpaque' instance for pairs that makes use of polymorphic @fst@/@snd@ builtins, but we can't write a polymorphic 'ToOpaque' instance because we'd need a polymorphic version of the '(,)' constructor. Instead we write monomorphic instances corresponding to monomorphic constructor builtins that we add for specific purposes. -} {- Note [Fundeps versus type families in HasFromOpaque/HasToOpaque] We could use a type family here to get the builtin representation of a type. After all, it's entirely determined by the Haskell type. However, this is harder for the plugin to deal with. It's okay to have a type variable for the representation type that needs to be instantiated later, but it's *not* okay to have an irreducible type application on a type variable. So fundeps are much nicer here. -} -- See Note [Built-in types and their Haskell counterparts]. -- See Note [HasFromOpaque/HasToOpaque instances for polymorphic builtin types]. -- See Note [Fundeps versus type families in HasFromOpaque/HasToOpaque]. -- | A class for converting values of transparent Haskell-defined built-in types (such as '()', -- 'Bool', '[]' etc) to their opaque Plutus Tx counterparts. Instances for built-in types that are -- not transparent are provided as well, simply as identities, since those types are already opaque. type HasToOpaque :: GHC.Type -> GHC.Type -> GHC.Constraint class HasToOpaque a arep | a -> arep where toOpaque :: a -> arep default toOpaque :: a ~ arep => a -> arep toOpaque = id {-# INLINABLE toOpaque #-} -- See Note [Built-in types and their Haskell counterparts]. -- See Note [HasFromOpaque/HasToOpaque instances for polymorphic builtin types]. -- See Note [Fundeps versus type families in HasFromOpaque/HasToOpaque]. -- | A class for converting values of opaque Plutus Tx types to their transparent Haskell-defined -- counterparts (a.k.a. pattern-matchable) built-in types (such as '()', 'Bool', '[]' etc). If no -- transparent counterpart exists, then the implementation is identity. type HasFromOpaque :: GHC.Type -> GHC.Type -> GHC.Constraint class HasFromOpaque arep a | arep -> a where fromOpaque :: arep -> a default fromOpaque :: a ~ arep => arep -> a fromOpaque = id {-# INLINABLE fromOpaque #-} instance HasToOpaque BuiltinInteger BuiltinInteger instance HasFromOpaque BuiltinInteger BuiltinInteger instance HasToOpaque BuiltinByteString BuiltinByteString instance HasFromOpaque BuiltinByteString BuiltinByteString instance HasToOpaque BuiltinString BuiltinString instance HasFromOpaque BuiltinString BuiltinString {- Note [Strict conversions to/from unit] Converting to/from unit *should* be straightforward: just `const ()`. *But* GHC is very good at optimizing this, and we sometimes use unit where side effects matter, e.g. as the result of `trace`. So GHC will tend to turn `fromOpaque (trace s)` into `()`, which is wrong. So we want our conversions to/from unit to be strict in Haskell. This means we need to case pointlessly on the argument, which means we need case on unit (`chooseUnit`) as a builtin. But then it all works okay. -} -- See Note [Strict conversions to/from unit]. instance HasToOpaque () BuiltinUnit where toOpaque x = case x of () -> unitval {-# INLINABLE toOpaque #-} instance HasFromOpaque BuiltinUnit () where fromOpaque u = chooseUnit u () {-# INLINABLE fromOpaque #-} instance HasToOpaque Bool BuiltinBool where toOpaque b = if b then true else false {-# INLINABLE toOpaque #-} instance HasFromOpaque BuiltinBool Bool where fromOpaque b = ifThenElse b True False {-# INLINABLE fromOpaque #-} -- | The empty list of elements of the given type that gets spotted by the plugin (grep for -- 'mkNilOpaque' in the plugin code) and replaced by the actual empty list constant for types that -- are supported (a subset of built-in types). mkNilOpaque :: BuiltinList a mkNilOpaque = BuiltinList [] {-# OPAQUE mkNilOpaque #-} class MkNil arep where mkNil :: BuiltinList arep mkNil = mkNilOpaque instance MkNil BuiltinInteger instance MkNil BuiltinBool instance MkNil BuiltinData instance MkNil (BuiltinPair BuiltinData BuiltinData) instance (HasToOpaque a arep, MkNil arep) => HasToOpaque [a] (BuiltinList arep) where toOpaque = goList where goList :: [a] -> BuiltinList arep goList [] = mkNil goList (d:ds) = mkCons (toOpaque d) (goList ds) {-# INLINABLE toOpaque #-} instance HasFromOpaque arep a => HasFromOpaque (BuiltinList arep) [a] where fromOpaque = go where -- The combination of both INLINABLE and a type signature seems to stop this getting -- lifted to the top level, which means it gets a proper unfolding, which means that -- specialization can work, which can actually help quite a bit here. go :: BuiltinList arep -> [a] -- Note that we are using builtin chooseList here so this is *strict* application! So we -- need to do the manual laziness ourselves. go l = chooseList l (\_ -> []) (\_ -> fromOpaque (head l) : go (tail l)) unitval {-# INLINABLE go #-} {-# INLINABLE fromOpaque #-} instance HasToOpaque (BuiltinData, BuiltinData) (BuiltinPair BuiltinData BuiltinData) where toOpaque (d1, d2) = mkPairData (toOpaque d1) (toOpaque d2) {-# INLINABLE toOpaque #-} instance (HasFromOpaque arep a, HasFromOpaque brep b) => HasFromOpaque (BuiltinPair arep brep) (a, b) where fromOpaque p = (fromOpaque $ fst p, fromOpaque $ snd p) {-# INLINABLE fromOpaque #-} instance HasToOpaque BuiltinData BuiltinData instance HasFromOpaque BuiltinData BuiltinData instance HasToOpaque BuiltinBLS12_381_G1_Element BuiltinBLS12_381_G1_Element instance HasFromOpaque BuiltinBLS12_381_G1_Element BuiltinBLS12_381_G1_Element instance HasToOpaque BuiltinBLS12_381_G2_Element BuiltinBLS12_381_G2_Element instance HasFromOpaque BuiltinBLS12_381_G2_Element BuiltinBLS12_381_G2_Element instance HasToOpaque BuiltinBLS12_381_MlResult BuiltinBLS12_381_MlResult instance HasFromOpaque BuiltinBLS12_381_MlResult BuiltinBLS12_381_MlResult ```
```c *** colormask.c~ 2006-05-13 13:54:56.000000000 +0200 --- colormask.c 2006-05-13 13:54:56.000000000 +0200 *************** *** 381,387 **** (void)strcat(buf, "."); (void)strcat(buf, progname); if ((fp = fopen(buf, "r")) == NULL) { ! (void)strcpy(buf, "/etc/"); (void)strcat(buf, progname); if ((fp = fopen(buf, "r")) == NULL) return 0; } --- 381,387 ---- (void)strcat(buf, "."); (void)strcat(buf, progname); if ((fp = fopen(buf, "r")) == NULL) { ! (void)strcpy(buf, "%%PREFIX%%/etc/"); (void)strcat(buf, progname); if ((fp = fopen(buf, "r")) == NULL) return 0; } ```
```javascript /** * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 'use strict'; // MODULES // var bench = require( '@stdlib/bench' ); var isArray = require( '@stdlib/assert/is-array' ); var randu = require( '@stdlib/random/base/randu' ); var defineProperty = require( '@stdlib/utils/define-property' ); var pkg = require( './../package.json' ).name; var inheritedWritableProperties = require( './../lib' ); // eslint-disable-line id-length // MAIN // bench( pkg, function benchmark( b ) { var out; var obj; var i; function Foo() { this.a = 'beep'; this.b = 'boop'; this.c = [ 1, 2, 3 ]; this.d = {}; this.e = null; this.f = randu(); defineProperty( this, 'g', { 'value': 'bar', 'configurable': true, 'writable': false, 'enumerable': true }); return this; } Foo.prototype.h = [ 'foo' ]; obj = new Foo(); b.tic(); for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedWritableProperties( obj ); if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } b.toc(); if ( !isArray( out ) ) { b.fail( 'should return an array' ); } b.pass( 'benchmark finished' ); b.end(); }); ```
Raúl Entrerríos Rodríguez (born 12 February 1981) is a Spanish handball player and handball coach. He participated at the 2008 Summer Olympics in Beijing as a member of the Spain men's national handball team. The team won a bronze medal, defeating Croatia. His older brother Alberto Entrerríos is a Spanish international handball player. In 2021 he ended his club career, and will from the summer of 2021 be coaching FC Barcelona's U18-team. References External links Spanish male handball players Handball players at the 2008 Summer Olympics Handball players at the 2012 Summer Olympics Olympic handball players for Spain Olympic bronze medalists for Spain Living people Liga ASOBAL players FC Barcelona Handbol players CB Ademar León players BM Valladolid players Olympic medalists in handball 1981 births Medalists at the 2008 Summer Olympics Real Grupo de Cultura Covadonga sportsmen Sportspeople from Gijón Handball players at the 2020 Summer Olympics Medalists at the 2020 Summer Olympics Mediterranean Games medalists for Spain Competitors at the 2005 Mediterranean Games Mediterranean Games medalists in handball
Iatrosophist (, ) is an ancient title designating a professor of medicine. It comes from 'doctor' and 'learned person'. People who have been referred to by the title include: Adamantius Cassius Iatrosophista Gessius of Petra Magnus of Nisibis Oribasius Palladius (physician) Paul of Aegina Zeno of Cyprus See also Iatrosophia References Byzantine physicians
```java Default values for unassigned data types Collections vs arrays Converting a string to upper or lower case `StringBuffer` vs `StringBuilder` Do not attempt comparisons with NaN ```
```java /* */ package com.microsoft.sqlserver.jdbc.bulkCopy; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import com.microsoft.sqlserver.jdbc.ComparisonUtil; import com.microsoft.sqlserver.jdbc.ISQLServerBulkData; import com.microsoft.sqlserver.jdbc.SQLServerBulkCopy; import com.microsoft.sqlserver.jdbc.TestResource; import com.microsoft.sqlserver.jdbc.bulkCopy.BulkCopyTestWrapper.ColumnMap; import com.microsoft.sqlserver.testframework.DBConnection; import com.microsoft.sqlserver.testframework.DBResultSet; import com.microsoft.sqlserver.testframework.DBStatement; import com.microsoft.sqlserver.testframework.DBTable; /** * Utility class */ class BulkCopyTestUtil { /** * perform bulk copy using source table and validate bulkcopy * * @param wrapper * @param sourceTable */ static void performBulkCopy(BulkCopyTestWrapper wrapper, DBTable sourceTable) { performBulkCopy(wrapper, sourceTable, true); } /** * perform bulk copy using source and destination tables and validate bulkcopy * * @param wrapper * @param sourceTable * @param destTable */ static void performBulkCopy(BulkCopyTestWrapper wrapper, DBTable sourceTable, DBTable destTable) { performBulkCopy(wrapper, sourceTable, destTable, true); } /** * perform bulk copy using source table * * @param wrapper * @param sourceTable * @param validateResult */ static void performBulkCopy(BulkCopyTestWrapper wrapper, DBTable sourceTable, boolean validateResult) { DBTable destinationTable = null; try (DBConnection con = new DBConnection(wrapper.getConnectionString()); DBConnection conBulkCopy = new DBConnection(wrapper.getDataSource()); DBStatement stmt = con.createStatement()) { destinationTable = sourceTable.cloneSchema(); stmt.createTable(destinationTable); try (DBResultSet srcResultSet = stmt.executeQuery("SELECT * FROM " + sourceTable.getEscapedTableName() + " ORDER BY " + sourceTable.getEscapedColumnName(0)); SQLServerBulkCopy bulkCopy = wrapper .isUsingConnection() ? new SQLServerBulkCopy((Connection) conBulkCopy.product()) : new SQLServerBulkCopy(wrapper.getConnectionString())) { if (wrapper.isUsingBulkCopyOptions()) { bulkCopy.setBulkCopyOptions(wrapper.getBulkOptions()); } bulkCopy.setDestinationTableName(destinationTable.getEscapedTableName()); if (wrapper.isUsingColumnMapping()) { for (int i = 0; i < wrapper.cm.size(); i++) { ColumnMap currentMap = wrapper.cm.get(i); if (currentMap.sourceIsInt && currentMap.destIsInt) { bulkCopy.addColumnMapping(currentMap.srcInt, currentMap.destInt); } else if (currentMap.sourceIsInt && (!currentMap.destIsInt)) { bulkCopy.addColumnMapping(currentMap.srcInt, currentMap.destString); } else if ((!currentMap.sourceIsInt) && currentMap.destIsInt) { bulkCopy.addColumnMapping(currentMap.srcString, currentMap.destInt); } else if ((!currentMap.sourceIsInt) && (!currentMap.destIsInt)) { bulkCopy.addColumnMapping(currentMap.srcString, currentMap.destString); } } } bulkCopy.writeToServer((ResultSet) srcResultSet.product()); if (validateResult) { validateValues(con, sourceTable, destinationTable); } } catch (SQLException ex) { fail(ex.getMessage()); } finally { if (null != destinationTable) { stmt.dropTable(destinationTable); } } } catch (SQLException ex) { fail(ex.getMessage()); } } /** * perform bulk copy using source and destination tables * * @param wrapper * @param sourceTable * @param destTable * @param validateResult */ static void performBulkCopy(BulkCopyTestWrapper wrapper, DBTable sourceTable, DBTable destinationTable, boolean validateResult) { try (DBConnection con = new DBConnection(wrapper.getConnectionString()); DBConnection conBulkCopy = new DBConnection(wrapper.getDataSource()); DBStatement stmt = con.createStatement(); DBResultSet srcResultSet = stmt.executeQuery("SELECT * FROM " + sourceTable.getEscapedTableName() + " ORDER BY " + sourceTable.getEscapedColumnName(0)); SQLServerBulkCopy bulkCopy = wrapper.isUsingConnection() ? new SQLServerBulkCopy( (Connection) conBulkCopy.product()) : new SQLServerBulkCopy(wrapper.getConnectionString())) { if (wrapper.isUsingBulkCopyOptions()) { bulkCopy.setBulkCopyOptions(wrapper.getBulkOptions()); } bulkCopy.setDestinationTableName(destinationTable.getEscapedTableName()); if (wrapper.isUsingColumnMapping()) { for (int i = 0; i < wrapper.cm.size(); i++) { ColumnMap currentMap = wrapper.cm.get(i); if (currentMap.sourceIsInt && currentMap.destIsInt) { bulkCopy.addColumnMapping(currentMap.srcInt, currentMap.destInt); } else if (currentMap.sourceIsInt && (!currentMap.destIsInt)) { bulkCopy.addColumnMapping(currentMap.srcInt, currentMap.destString); } else if ((!currentMap.sourceIsInt) && currentMap.destIsInt) { bulkCopy.addColumnMapping(currentMap.srcString, currentMap.destInt); } else if ((!currentMap.sourceIsInt) && (!currentMap.destIsInt)) { bulkCopy.addColumnMapping(currentMap.srcString, currentMap.destString); } } } bulkCopy.writeToServer((ResultSet) srcResultSet.product()); if (validateResult) { validateValues(con, sourceTable, destinationTable); } } catch (SQLException ex) { fail(ex.getMessage()); } } /** * perform bulk copy using source and destination tables * * @param wrapper * @param sourceTable * @param destTable * @param validateResult * @param fail */ static void performBulkCopy(BulkCopyTestWrapper wrapper, DBTable sourceTable, DBTable destinationTable, boolean validateResult, boolean fail) { try (DBConnection con = new DBConnection(wrapper.getConnectionString()); DBConnection conBulkCopy = new DBConnection(wrapper.getDataSource()); DBStatement stmt = con.createStatement(); DBResultSet srcResultSet = stmt.executeQuery("SELECT * FROM " + sourceTable.getEscapedTableName() + " ORDER BY " + sourceTable.getEscapedColumnName(0)); SQLServerBulkCopy bulkCopy = wrapper.isUsingConnection() ? new SQLServerBulkCopy( (Connection) conBulkCopy.product()) : new SQLServerBulkCopy(wrapper.getConnectionString())) { try { if (wrapper.isUsingBulkCopyOptions()) { bulkCopy.setBulkCopyOptions(wrapper.getBulkOptions()); } bulkCopy.setDestinationTableName(destinationTable.getEscapedTableName()); if (wrapper.isUsingColumnMapping()) { for (int i = 0; i < wrapper.cm.size(); i++) { ColumnMap currentMap = wrapper.cm.get(i); if (currentMap.sourceIsInt && currentMap.destIsInt) { bulkCopy.addColumnMapping(currentMap.srcInt, currentMap.destInt); } else if (currentMap.sourceIsInt && (!currentMap.destIsInt)) { bulkCopy.addColumnMapping(currentMap.srcInt, currentMap.destString); } else if ((!currentMap.sourceIsInt) && currentMap.destIsInt) { bulkCopy.addColumnMapping(currentMap.srcString, currentMap.destInt); } else if ((!currentMap.sourceIsInt) && (!currentMap.destIsInt)) { bulkCopy.addColumnMapping(currentMap.srcString, currentMap.destString); } } } bulkCopy.writeToServer((ResultSet) srcResultSet.product()); if (fail) fail(TestResource.getResource("R_expectedExceptionNotThrown")); if (validateResult) { validateValues(con, sourceTable, destinationTable); } } catch (SQLException ex) { if (!fail) { fail(ex.getMessage()); } } finally { if (null != destinationTable) { stmt.dropTable(destinationTable); } } } catch (SQLException e) { if (!fail) { fail(e.getMessage()); } } } /** * perform bulk copy using source and destination tables * * @param wrapper * @param sourceTable * @param destTable * @param validateResult * @param fail * @param dropDest */ static void performBulkCopy(BulkCopyTestWrapper wrapper, DBTable sourceTable, DBTable destinationTable, boolean validateResult, boolean fail, boolean dropDest) { try (DBConnection con = new DBConnection(wrapper.getConnectionString()); DBConnection conBulkCopy = new DBConnection(wrapper.getDataSource()); DBStatement stmt = con.createStatement(); DBResultSet srcResultSet = stmt.executeQuery("SELECT * FROM " + sourceTable.getEscapedTableName() + " ORDER BY " + sourceTable.getEscapedColumnName(0)); SQLServerBulkCopy bulkCopy = wrapper.isUsingConnection() ? new SQLServerBulkCopy( (Connection) conBulkCopy.product()) : new SQLServerBulkCopy(wrapper.getConnectionString())) { try { if (wrapper.isUsingBulkCopyOptions()) { bulkCopy.setBulkCopyOptions(wrapper.getBulkOptions()); } bulkCopy.setDestinationTableName(destinationTable.getEscapedTableName()); if (wrapper.isUsingColumnMapping()) { for (int i = 0; i < wrapper.cm.size(); i++) { ColumnMap currentMap = wrapper.cm.get(i); if (currentMap.sourceIsInt && currentMap.destIsInt) { bulkCopy.addColumnMapping(currentMap.srcInt, currentMap.destInt); } else if (currentMap.sourceIsInt && (!currentMap.destIsInt)) { bulkCopy.addColumnMapping(currentMap.srcInt, currentMap.destString); } else if ((!currentMap.sourceIsInt) && currentMap.destIsInt) { bulkCopy.addColumnMapping(currentMap.srcString, currentMap.destInt); } else if ((!currentMap.sourceIsInt) && (!currentMap.destIsInt)) { bulkCopy.addColumnMapping(currentMap.srcString, currentMap.destString); } } } bulkCopy.writeToServer((ResultSet) srcResultSet.product()); if (fail) fail(TestResource.getResource("R_expectedExceptionNotThrown")); bulkCopy.close(); if (validateResult) { validateValues(con, sourceTable, destinationTable); } } catch (SQLException ex) { if (!fail) { fail(ex.getMessage()); } } finally { if (dropDest && null != destinationTable) { stmt.dropTable(destinationTable); } } } catch (SQLException ex) { if (!fail) { fail(ex.getMessage()); } } } /** * validate if same values are in both source and destination table * * @param con * @param sourceTable * @param destinationTable * @throws SQLException */ static void validateValues(DBConnection con, DBTable sourceTable, DBTable destinationTable) throws SQLException { try (DBStatement srcStmt = con.createStatement(); DBStatement dstStmt = con.createStatement(); DBResultSet srcResultSet = srcStmt.executeQuery("SELECT * FROM " + sourceTable.getEscapedTableName() + " ORDER BY " + sourceTable.getEscapedColumnName(0)); DBResultSet dstResultSet = dstStmt .executeQuery("SELECT * FROM " + destinationTable.getEscapedTableName() + " ORDER BY " + destinationTable.getEscapedColumnName(0))) { ResultSetMetaData destMeta = ((ResultSet) dstResultSet.product()).getMetaData(); int totalColumns = destMeta.getColumnCount(); // verify data from sourceType and resultSet int numRows = 0; while (srcResultSet.next() && dstResultSet.next()) { numRows++; for (int i = 1; i <= totalColumns; i++) { Object srcValue, dstValue; srcValue = srcResultSet.getObject(i); dstValue = dstResultSet.getObject(i); ComparisonUtil.compareExpectedAndActual(destMeta.getColumnType(i), srcValue, dstValue); } } // verify number of rows and columns assertTrue(((ResultSet) srcResultSet.product()).getMetaData().getColumnCount() == totalColumns); if (numRows > 0) { assertTrue(sourceTable.getTotalRows() == numRows); assertTrue(destinationTable.getTotalRows() == numRows); } } } /** * * @param bulkWrapper * @param srcData * @param dstTable */ static void performBulkCopy(BulkCopyTestWrapper bulkWrapper, ISQLServerBulkData srcData, DBTable dstTable) { try (DBConnection con = new DBConnection(bulkWrapper.getConnectionString()); DBStatement stmt = con.createStatement(); SQLServerBulkCopy bc = new SQLServerBulkCopy(bulkWrapper.getConnectionString())) { bc.setDestinationTableName(dstTable.getEscapedTableName()); bc.writeToServer(srcData); validateValues(con, srcData, dstTable); } catch (Exception e) { fail(e.getMessage()); } } /** * * @param con * @param srcData * @param destinationTable * @throws Exception */ static void validateValues(DBConnection con, ISQLServerBulkData srcData, DBTable destinationTable) throws Exception { try (DBStatement dstStmt = con.createStatement(); DBResultSet dstResultSet = dstStmt .executeQuery("SELECT * FROM " + destinationTable.getEscapedTableName() + " ORDER BY " + destinationTable.getEscapedColumnName(0))) { ResultSetMetaData destMeta = ((ResultSet) dstResultSet.product()).getMetaData(); int totalColumns = destMeta.getColumnCount(); // reset the counter in ISQLServerBulkRecord, which was incremented during read by BulkCopy java.lang.reflect.Method method = srcData.getClass().getMethod("reset"); method.invoke(srcData); // verify data from sourceType and resultSet while (srcData.next() && dstResultSet.next()) { Object[] srcValues = srcData.getRowData(); for (int i = 1; i <= totalColumns; i++) { Object srcValue, dstValue; srcValue = srcValues[i - 1]; if (srcValue.getClass().getName().equalsIgnoreCase("java.lang.Double")) { // in case of SQL Server type Float (ie java type double), in float(n) if n is <=24 ie precsion // is <=7 SQL Server type Real is returned(ie java type float) if (destMeta.getPrecision(i) < 8) srcValue = ((Double) srcValue).floatValue(); } dstValue = dstResultSet.getObject(i); int dstType = destMeta.getColumnType(i); if (java.sql.Types.TIMESTAMP != dstType && java.sql.Types.TIME != dstType && microsoft.sql.Types.DATETIMEOFFSET != dstType) { // skip validation for temporal types due to rounding eg 7986-10-21 09:51:15.114 is rounded as // 7986-10-21 09:51:15.113 in server ComparisonUtil.compareExpectedAndActual(dstType, srcValue, dstValue); } } } } } } ```
```c /* * Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne. */ #include "slirp.h" /* Number of packets queued before we start sending * (to prevent allocing too many mbufs) */ #define IF6_THRESH 10 /* * IPv6 output. The packet in mbuf chain m contains a IP header */ int ip6_output(struct socket *so, struct mbuf *m, int fast) { Slirp *slirp = m->slirp; M_DUP_DEBUG(slirp, m, 0, 0); struct ip6 *ip = mtod(m, struct ip6 *); DEBUG_CALL("ip6_output"); DEBUG_ARG("so = %p", so); DEBUG_ARG("m = %p", m); /* Fill IPv6 header */ ip->ip_v = IP6VERSION; ip->ip_hl = IP6_HOP_LIMIT; ip->ip_tc_hi = 0; ip->ip_tc_lo = 0; ip->ip_fl_hi = 0; ip->ip_fl_lo = 0; if (fast) { /* We cannot fast-send non-multicast, we'd need a NDP NS */ assert(IN6_IS_ADDR_MULTICAST(&ip->ip_dst)); if_encap(m->slirp, m); m_free(m); } else { if_output(so, m); } return 0; } ```
```go package types_test import ( "testing" "time" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "cosmossdk.io/core/header" coretesting "cosmossdk.io/core/testing" storetypes "cosmossdk.io/store/types" authcodec "cosmossdk.io/x/auth/codec" "cosmossdk.io/x/auth/keeper" authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/auth/vesting" vestingtestutil "cosmossdk.io/x/auth/vesting/testutil" "cosmossdk.io/x/auth/vesting/types" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" ) var ( stakeDenom = "stake" feeDenom = "fee" emptyCoins = sdk.Coins{} ) type VestingAccountTestSuite struct { suite.Suite ctx sdk.Context accountKeeper keeper.AccountKeeper } func (s *VestingAccountTestSuite) SetupTest() { encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, vesting.AppModule{}) key := storetypes.NewKVStoreKey(authtypes.StoreKey) env := runtime.NewEnvironment(runtime.NewKVStoreService(key), coretesting.NewNopLogger()) testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) s.ctx = testCtx.Ctx.WithHeaderInfo(header.Info{}) // gomock initializations ctrl := gomock.NewController(&testing.T{}) acctsModKeeper := vestingtestutil.NewMockAccountsModKeeper(ctrl) maccPerms := map[string][]string{ "fee_collector": nil, "mint": {"minter"}, "bonded_tokens_pool": {"burner", "staking"}, "not_bonded_tokens_pool": {"burner", "staking"}, "multiPerm": {"burner", "minter", "staking"}, "random": {"random"}, } s.accountKeeper = keeper.NewAccountKeeper( env, encCfg.Codec, authtypes.ProtoBaseAccount, acctsModKeeper, maccPerms, authcodec.NewBech32Codec("cosmos"), "cosmos", authtypes.NewModuleAddress("gov").String(), ) } func TestGetVestedCoinsContVestingAcc(t *testing.T) { now := time.Now() startTime := now.Add(24 * time.Hour) endTime := startTime.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() cva, err := types.NewContinuousVestingAccount(bacc, origCoins, startTime.Unix(), endTime.Unix()) require.NoError(t, err) // require no coins vested _before_ the start time of the vesting schedule vestedCoins := cva.GetVestedCoins(now) require.Nil(t, vestedCoins) // require no coins vested _before_ the very beginning of the vesting schedule vestedCoins = cva.GetVestedCoins(startTime.Add(-1)) require.Nil(t, vestedCoins) // require all coins vested at the end of the vesting schedule vestedCoins = cva.GetVestedCoins(endTime) require.Equal(t, origCoins, vestedCoins) // require 50% of coins vested t50 := time.Duration(0.5 * float64(endTime.Sub(startTime))) vestedCoins = cva.GetVestedCoins(startTime.Add(t50)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}, vestedCoins) // require 75% of coins vested t75 := time.Duration(0.75 * float64(endTime.Sub(startTime))) vestedCoins = cva.GetVestedCoins(startTime.Add(t75)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 750), sdk.NewInt64Coin(stakeDenom, 75)}, vestedCoins) // require 100% of coins vested vestedCoins = cva.GetVestedCoins(endTime) require.Equal(t, origCoins, vestedCoins) } func TestGetVestingCoinsContVestingAcc(t *testing.T) { now := time.Now() startTime := now.Add(24 * time.Hour) endTime := startTime.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() cva, err := types.NewContinuousVestingAccount(bacc, origCoins, startTime.Unix(), endTime.Unix()) require.NoError(t, err) // require all coins vesting before the start time of the vesting schedule vestingCoins := cva.GetVestingCoins(now) require.Equal(t, origCoins, vestingCoins) // require all coins vesting right before the start time of the vesting schedule vestingCoins = cva.GetVestingCoins(startTime.Add(-1)) require.Equal(t, origCoins, vestingCoins) // require no coins vesting at the end of the vesting schedule vestingCoins = cva.GetVestingCoins(endTime) require.Equal(t, emptyCoins, vestingCoins) // require 50% of coins vesting in the middle between start and end time t50 := time.Duration(0.5 * float64(endTime.Sub(startTime))) vestingCoins = cva.GetVestingCoins(startTime.Add(t50)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}, vestingCoins) // require 25% of coins vesting after 3/4 of the time between start and end time has passed t75 := time.Duration(0.75 * float64(endTime.Sub(startTime))) vestingCoins = cva.GetVestingCoins(startTime.Add(t75)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}, vestingCoins) } func TestSpendableCoinsContVestingAcc(t *testing.T) { now := time.Now() startTime := now.Add(24 * time.Hour) endTime := startTime.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() cva, err := types.NewContinuousVestingAccount(bacc, origCoins, startTime.Unix(), endTime.Unix()) require.NoError(t, err) // require that all original coins are locked before the beginning of the vesting // schedule lockedCoins := cva.LockedCoins(now) require.Equal(t, origCoins, lockedCoins) // require that all original coins are locked at the beginning of the vesting // schedule lockedCoins = cva.LockedCoins(startTime) require.Equal(t, origCoins, lockedCoins) // require that there exist no locked coins in the end of the vesting schedule lockedCoins = cva.LockedCoins(endTime) require.Equal(t, sdk.NewCoins(), lockedCoins) // require that all vested coins (50%) are spendable lockedCoins = cva.LockedCoins(startTime.Add(12 * time.Hour)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}, lockedCoins) // require 25% of coins vesting after 3/4 of the time between start and end time has passed lockedCoins = cva.LockedCoins(startTime.Add(18 * time.Hour)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}, lockedCoins) } func TestTrackDelegationContVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() // require the ability to delegate all vesting coins cva, err := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) require.NoError(t, err) cva.TrackDelegation(now, origCoins, origCoins) require.Equal(t, origCoins, cva.DelegatedVesting) require.Nil(t, cva.DelegatedFree) // require the ability to delegate all vested coins cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) require.NoError(t, err) cva.TrackDelegation(endTime, origCoins, origCoins) require.Nil(t, cva.DelegatedVesting) require.Equal(t, origCoins, cva.DelegatedFree) // require the ability to delegate all vesting coins (50%) and all vested coins (50%) cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) require.NoError(t, err) cva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, cva.DelegatedVesting) require.Nil(t, cva.DelegatedFree) cva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, cva.DelegatedVesting) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, cva.DelegatedFree) // require no modifications when delegation amount is zero or not enough funds cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) require.NoError(t, err) require.Panics(t, func() { cva.TrackDelegation(endTime, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 1000000)}) }) require.Nil(t, cva.DelegatedVesting) require.Nil(t, cva.DelegatedFree) } func TestTrackUndelegationContVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() // require the ability to undelegate all vesting coins cva, err := types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) require.NoError(t, err) cva.TrackDelegation(now, origCoins, origCoins) cva.TrackUndelegation(origCoins) require.Nil(t, cva.DelegatedFree) require.Equal(t, emptyCoins, cva.DelegatedVesting) // require the ability to undelegate all vested coins cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) require.NoError(t, err) cva.TrackDelegation(endTime, origCoins, origCoins) cva.TrackUndelegation(origCoins) require.Equal(t, emptyCoins, cva.DelegatedFree) require.Nil(t, cva.DelegatedVesting) // require no modifications when the undelegation amount is zero cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) require.NoError(t, err) require.Panics(t, func() { cva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 0)}) }) require.Nil(t, cva.DelegatedFree) require.Nil(t, cva.DelegatedVesting) // vest 50% and delegate to two validators cva, err = types.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) require.NoError(t, err) cva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) cva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) // undelegate from one validator that got slashed 50% cva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 25)}) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 25)}, cva.DelegatedFree) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, cva.DelegatedVesting) // undelegate from the other validator that did not get slashed cva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) require.Equal(t, emptyCoins, cva.DelegatedFree) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 25)}, cva.DelegatedVesting) } func TestGetVestedCoinsDelVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() // require no coins are vested until schedule maturation dva, err := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) vestedCoins := dva.GetVestedCoins(now) require.Nil(t, vestedCoins) // require all coins be vested at schedule maturation vestedCoins = dva.GetVestedCoins(endTime) require.Equal(t, origCoins, vestedCoins) } func TestGetVestingCoinsDelVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() // require all coins vesting at the beginning of the schedule dva, err := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) vestingCoins := dva.GetVestingCoins(now) require.Equal(t, origCoins, vestingCoins) // require no coins vesting at schedule maturation vestingCoins = dva.GetVestingCoins(endTime) require.Equal(t, emptyCoins, vestingCoins) } func TestSpendableCoinsDelVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() // require that all coins are locked in the beginning of the vesting // schedule dva, err := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) lockedCoins := dva.LockedCoins(now) require.True(t, lockedCoins.Equal(origCoins)) // require that all coins are spendable after the maturation of the vesting // schedule lockedCoins = dva.LockedCoins(endTime) require.Equal(t, sdk.NewCoins(), lockedCoins) // require that all coins are still vesting after some time lockedCoins = dva.LockedCoins(now.Add(12 * time.Hour)) require.True(t, lockedCoins.Equal(origCoins)) // delegate some locked coins // require that locked is reduced delegatedAmount := sdk.NewCoins(sdk.NewInt64Coin(stakeDenom, 50)) dva.TrackDelegation(now.Add(12*time.Hour), origCoins, delegatedAmount) lockedCoins = dva.LockedCoins(now.Add(12 * time.Hour)) require.True(t, lockedCoins.Equal(origCoins.Sub(delegatedAmount...))) } func TestTrackDelegationDelVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() // require the ability to delegate all vesting coins dva, err := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) dva.TrackDelegation(now, origCoins, origCoins) require.Equal(t, origCoins, dva.DelegatedVesting) require.Nil(t, dva.DelegatedFree) // require the ability to delegate all vested coins dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) dva.TrackDelegation(endTime, origCoins, origCoins) require.Nil(t, dva.DelegatedVesting) require.Equal(t, origCoins, dva.DelegatedFree) // require the ability to delegate all coins half way through the vesting // schedule dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) dva.TrackDelegation(now.Add(12*time.Hour), origCoins, origCoins) require.Equal(t, origCoins, dva.DelegatedVesting) require.Nil(t, dva.DelegatedFree) // require no modifications when delegation amount is zero or not enough funds dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) require.Panics(t, func() { dva.TrackDelegation(endTime, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 1000000)}) }) require.Nil(t, dva.DelegatedVesting) require.Nil(t, dva.DelegatedFree) } func TestTrackUndelegationDelVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() // require the ability to undelegate all vesting coins dva, err := types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) dva.TrackDelegation(now, origCoins, origCoins) dva.TrackUndelegation(origCoins) require.Nil(t, dva.DelegatedFree) require.Equal(t, emptyCoins, dva.DelegatedVesting) // require the ability to undelegate all vested coins dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) dva.TrackDelegation(endTime, origCoins, origCoins) dva.TrackUndelegation(origCoins) require.Equal(t, emptyCoins, dva.DelegatedFree) require.Nil(t, dva.DelegatedVesting) // require no modifications when the undelegation amount is zero dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) require.Panics(t, func() { dva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 0)}) }) require.Nil(t, dva.DelegatedFree) require.Nil(t, dva.DelegatedVesting) // vest 50% and delegate to two validators dva, err = types.NewDelayedVestingAccount(bacc, origCoins, endTime.Unix()) require.NoError(t, err) dva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) dva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) // undelegate from one validator that got slashed 50% dva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 25)}) require.Nil(t, dva.DelegatedFree) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 75)}, dva.DelegatedVesting) // undelegate from the other validator that did not get slashed dva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) require.Nil(t, dva.DelegatedFree) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 25)}, dva.DelegatedVesting) } func TestGetVestedCoinsPeriodicVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) periods := types.Periods{ types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, types.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, types.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, } bacc, origCoins := initBaseAccount() pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) // require no coins vested at the beginning of the vesting schedule vestedCoins := pva.GetVestedCoins(now) require.Nil(t, vestedCoins) // require all coins vested at the end of the vesting schedule vestedCoins = pva.GetVestedCoins(endTime) require.Equal(t, origCoins, vestedCoins) // require no coins vested during first vesting period vestedCoins = pva.GetVestedCoins(now.Add(6 * time.Hour)) require.Nil(t, vestedCoins) // require 50% of coins vested after period 1 vestedCoins = pva.GetVestedCoins(now.Add(12 * time.Hour)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}, vestedCoins) // require period 2 coins don't vest until period is over vestedCoins = pva.GetVestedCoins(now.Add(15 * time.Hour)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}, vestedCoins) // require 75% of coins vested after period 2 vestedCoins = pva.GetVestedCoins(now.Add(18 * time.Hour)) require.Equal(t, sdk.Coins{ sdk.NewInt64Coin(feeDenom, 750), sdk.NewInt64Coin(stakeDenom, 75), }, vestedCoins) // require 100% of coins vested vestedCoins = pva.GetVestedCoins(now.Add(48 * time.Hour)) require.Equal(t, origCoins, vestedCoins) } func TestOverflowAndNegativeVestedCoinsPeriods(t *testing.T) { now := time.Now() tests := []struct { name string periods []types.Period wantErr string }{ { "negative .Length", types.Periods{ types.Period{Length: -1, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, types.Period{Length: 6 * 60 * 60, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, }, "period #0 has a negative length: -1", }, { "overflow after .Length additions", types.Periods{ types.Period{Length: 9223372036854775108, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, types.Period{Length: 6 * 60 * 60, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, }, "vesting start-time cannot be before end-time", // it overflow to a negative number, making start-time > end-time }, { "good periods that are not negative nor overflow", types.Periods{ types.Period{Length: now.Unix() - 1000, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, types.Period{Length: 60, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, types.Period{Length: 30, Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, }, "", }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { bacc, origCoins := initBaseAccount() pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), tt.periods) if tt.wantErr != "" { require.ErrorContains(t, err, tt.wantErr) return } require.NoError(t, err) if pbva := pva.BaseVestingAccount; pbva.EndTime < 0 { t.Fatalf("Unfortunately we still have negative .EndTime :-(: %d", pbva.EndTime) } }) } } func TestGetVestingCoinsPeriodicVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) periods := types.Periods{ types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, types.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, types.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, } bacc, origCoins := initBaseAccount() pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) // require all coins vesting at the beginning of the vesting schedule vestingCoins := pva.GetVestingCoins(now) require.Equal(t, origCoins, vestingCoins) // require no coins vesting at the end of the vesting schedule vestingCoins = pva.GetVestingCoins(endTime) require.Equal(t, emptyCoins, vestingCoins) // require 50% of coins vesting vestingCoins = pva.GetVestingCoins(now.Add(12 * time.Hour)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}, vestingCoins) // require 50% of coins vesting after period 1, but before period 2 completes. vestingCoins = pva.GetVestingCoins(now.Add(15 * time.Hour)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}, vestingCoins) // require 25% of coins vesting after period 2 vestingCoins = pva.GetVestingCoins(now.Add(18 * time.Hour)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}, vestingCoins) // require 0% of coins vesting after vesting complete vestingCoins = pva.GetVestingCoins(now.Add(48 * time.Hour)) require.Equal(t, emptyCoins, vestingCoins) } func TestSpendableCoinsPeriodicVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) periods := types.Periods{ types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, types.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, types.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, } bacc, origCoins := initBaseAccount() pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) // require that there exist no spendable coins at the beginning of the // vesting schedule lockedCoins := pva.LockedCoins(now) require.Equal(t, origCoins, lockedCoins) // require that all original coins are spendable at the end of the vesting // schedule lockedCoins = pva.LockedCoins(endTime) require.Equal(t, sdk.NewCoins(), lockedCoins) // require that all still vesting coins (50%) are locked lockedCoins = pva.LockedCoins(now.Add(12 * time.Hour)) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}, lockedCoins) } func TestTrackDelegationPeriodicVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) periods := types.Periods{ types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, types.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, types.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, } bacc, origCoins := initBaseAccount() // require the ability to delegate all vesting coins pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) pva.TrackDelegation(now, origCoins, origCoins) require.Equal(t, origCoins, pva.DelegatedVesting) require.Nil(t, pva.DelegatedFree) // require the ability to delegate all vested coins pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) pva.TrackDelegation(endTime, origCoins, origCoins) require.Nil(t, pva.DelegatedVesting) require.Equal(t, origCoins, pva.DelegatedFree) // delegate half of vesting coins pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) pva.TrackDelegation(now, origCoins, periods[0].Amount) // require that all delegated coins are delegated vesting require.Equal(t, pva.DelegatedVesting, periods[0].Amount) require.Nil(t, pva.DelegatedFree) // delegate 75% of coins, split between vested and vesting pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) pva.TrackDelegation(now.Add(12*time.Hour), origCoins, periods[0].Amount.Add(periods[1].Amount...)) // require that the maximum possible amount of vesting coins are chosen for delegation. require.Equal(t, pva.DelegatedFree, periods[1].Amount) require.Equal(t, pva.DelegatedVesting, periods[0].Amount) // require the ability to delegate all vesting coins (50%) and all vested coins (50%) pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) pva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, pva.DelegatedVesting) require.Nil(t, pva.DelegatedFree) pva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, pva.DelegatedVesting) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, pva.DelegatedFree) // require no modifications when delegation amount is zero or not enough funds pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) require.Panics(t, func() { pva.TrackDelegation(endTime, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 1000000)}) }) require.Nil(t, pva.DelegatedVesting) require.Nil(t, pva.DelegatedFree) } func TestTrackUndelegationPeriodicVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(24 * time.Hour) periods := types.Periods{ types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, types.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, types.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 250), sdk.NewInt64Coin(stakeDenom, 25)}}, } bacc, origCoins := initBaseAccount() // require the ability to undelegate all vesting coins at the beginning of vesting pva, err := types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) pva.TrackDelegation(now, origCoins, origCoins) pva.TrackUndelegation(origCoins) require.Nil(t, pva.DelegatedFree) require.Equal(t, emptyCoins, pva.DelegatedVesting) // require the ability to undelegate all vested coins at the end of vesting pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) pva.TrackDelegation(endTime, origCoins, origCoins) pva.TrackUndelegation(origCoins) require.Equal(t, emptyCoins, pva.DelegatedFree) require.Nil(t, pva.DelegatedVesting) // require the ability to undelegate half of coins pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) pva.TrackDelegation(endTime, origCoins, periods[0].Amount) pva.TrackUndelegation(periods[0].Amount) require.Equal(t, emptyCoins, pva.DelegatedFree) require.Nil(t, pva.DelegatedVesting) // require no modifications when the undelegation amount is zero pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) require.Panics(t, func() { pva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 0)}) }) require.Nil(t, pva.DelegatedFree) require.Nil(t, pva.DelegatedVesting) // vest 50% and delegate to two validators pva, err = types.NewPeriodicVestingAccount(bacc, origCoins, now.Unix(), periods) require.NoError(t, err) pva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) pva.TrackDelegation(now.Add(12*time.Hour), origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) // undelegate from one validator that got slashed 50% pva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 25)}) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 25)}, pva.DelegatedFree) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}, pva.DelegatedVesting) // undelegate from the other validator that did not get slashed pva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) require.Equal(t, emptyCoins, pva.DelegatedFree) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 25)}, pva.DelegatedVesting) } func TestGetVestedCoinsPermLockedVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(1000 * 24 * time.Hour) bacc, origCoins := initBaseAccount() // require no coins are vested plva, err := types.NewPermanentLockedAccount(bacc, origCoins) require.NoError(t, err) vestedCoins := plva.GetVestedCoins(now) require.Nil(t, vestedCoins) // require no coins be vested at end time vestedCoins = plva.GetVestedCoins(endTime) require.Nil(t, vestedCoins) } func TestGetVestingCoinsPermLockedVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(1000 * 24 * time.Hour) bacc, origCoins := initBaseAccount() // require all coins vesting at the beginning of the schedule plva, err := types.NewPermanentLockedAccount(bacc, origCoins) require.NoError(t, err) vestingCoins := plva.GetVestingCoins(now) require.Equal(t, origCoins, vestingCoins) // require all coins vesting at the end time vestingCoins = plva.GetVestingCoins(endTime) require.Equal(t, origCoins, vestingCoins) } func TestSpendableCoinsPermLockedVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(1000 * 24 * time.Hour) bacc, origCoins := initBaseAccount() // require that all coins are locked in the beginning of the vesting // schedule plva, err := types.NewPermanentLockedAccount(bacc, origCoins) require.NoError(t, err) lockedCoins := plva.LockedCoins(now) require.True(t, lockedCoins.Equal(origCoins)) // require that all coins are still locked at end time lockedCoins = plva.LockedCoins(endTime) require.True(t, lockedCoins.Equal(origCoins)) // delegate some locked coins // require that locked is reduced delegatedAmount := sdk.NewCoins(sdk.NewInt64Coin(stakeDenom, 50)) plva.TrackDelegation(now.Add(12*time.Hour), origCoins, delegatedAmount) lockedCoins = plva.LockedCoins(now.Add(12 * time.Hour)) require.True(t, lockedCoins.Equal(origCoins.Sub(delegatedAmount...))) } func TestTrackDelegationPermLockedVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(1000 * 24 * time.Hour) bacc, origCoins := initBaseAccount() // require the ability to delegate all vesting coins plva, err := types.NewPermanentLockedAccount(bacc, origCoins) require.NoError(t, err) plva.TrackDelegation(now, origCoins, origCoins) require.Equal(t, origCoins, plva.DelegatedVesting) require.Nil(t, plva.DelegatedFree) // require the ability to delegate all vested coins at endTime plva, err = types.NewPermanentLockedAccount(bacc, origCoins) require.NoError(t, err) plva.TrackDelegation(endTime, origCoins, origCoins) require.Equal(t, origCoins, plva.DelegatedVesting) require.Nil(t, plva.DelegatedFree) // require no modifications when delegation amount is zero or not enough funds plva, err = types.NewPermanentLockedAccount(bacc, origCoins) require.NoError(t, err) require.Panics(t, func() { plva.TrackDelegation(endTime, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 1000000)}) }) require.Nil(t, plva.DelegatedVesting) require.Nil(t, plva.DelegatedFree) } func TestTrackUndelegationPermLockedVestingAcc(t *testing.T) { now := time.Now() endTime := now.Add(1000 * 24 * time.Hour) bacc, origCoins := initBaseAccount() // require the ability to undelegate all vesting coins plva, err := types.NewPermanentLockedAccount(bacc, origCoins) require.NoError(t, err) plva.TrackDelegation(now, origCoins, origCoins) plva.TrackUndelegation(origCoins) require.Nil(t, plva.DelegatedFree) require.Equal(t, emptyCoins, plva.DelegatedVesting) // require the ability to undelegate all vesting coins at endTime plva, err = types.NewPermanentLockedAccount(bacc, origCoins) require.NoError(t, err) plva.TrackDelegation(endTime, origCoins, origCoins) plva.TrackUndelegation(origCoins) require.Nil(t, plva.DelegatedFree) require.Equal(t, emptyCoins, plva.DelegatedVesting) // require no modifications when the undelegation amount is zero plva, err = types.NewPermanentLockedAccount(bacc, origCoins) require.NoError(t, err) require.Panics(t, func() { plva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 0)}) }) require.Nil(t, plva.DelegatedFree) require.Nil(t, plva.DelegatedVesting) // delegate to two validators plva, err = types.NewPermanentLockedAccount(bacc, origCoins) require.NoError(t, err) plva.TrackDelegation(now, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) plva.TrackDelegation(now, origCoins, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) // undelegate from one validator that got slashed 50% plva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 25)}) require.Nil(t, plva.DelegatedFree) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 75)}, plva.DelegatedVesting) // undelegate from the other validator that did not get slashed plva.TrackUndelegation(sdk.Coins{sdk.NewInt64Coin(stakeDenom, 50)}) require.Nil(t, plva.DelegatedFree) require.Equal(t, sdk.Coins{sdk.NewInt64Coin(stakeDenom, 25)}, plva.DelegatedVesting) } func TestGenesisAccountValidate(t *testing.T) { pubkey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubkey.Address()) baseAcc := authtypes.NewBaseAccount(addr, pubkey, 0, 0) initialVesting := sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 50)) baseVestingWithCoins, err := types.NewBaseVestingAccount(baseAcc, initialVesting, 100) require.NoError(t, err) tests := []struct { name string acc authtypes.GenesisAccount expErr bool }{ { "valid base account", baseAcc, false, }, { "invalid base valid account", authtypes.NewBaseAccount(addr, secp256k1.GenPrivKey().PubKey(), 0, 0), true, }, { "valid base vesting account", baseVestingWithCoins, false, }, { "valid continuous vesting account", func() authtypes.GenesisAccount { acc, _ := types.NewContinuousVestingAccount(baseAcc, initialVesting, 100, 200) return acc }(), false, }, { "invalid vesting times", func() authtypes.GenesisAccount { acc, _ := types.NewContinuousVestingAccount(baseAcc, initialVesting, 1654668078, 1554668078) return acc }(), true, }, { "valid periodic vesting account", func() authtypes.GenesisAccount { acc, _ := types.NewPeriodicVestingAccount(baseAcc, initialVesting, 0, types.Periods{types.Period{Length: int64(100), Amount: sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 50)}}}) return acc }(), false, }, { "invalid vesting period lengths", types.NewPeriodicVestingAccountRaw( baseVestingWithCoins, 0, types.Periods{types.Period{Length: int64(50), Amount: sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 50)}}}), true, }, { "invalid vesting period amounts", types.NewPeriodicVestingAccountRaw( baseVestingWithCoins, 0, types.Periods{types.Period{Length: int64(100), Amount: sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 25)}}}), true, }, { "valid permanent locked vesting account", func() authtypes.GenesisAccount { acc, _ := types.NewPermanentLockedAccount(baseAcc, initialVesting) return acc }(), false, }, { "invalid positive end time for permanently locked vest account", &types.PermanentLockedAccount{BaseVestingAccount: baseVestingWithCoins}, true, }, } for _, tt := range tests { tt := tt t.Run(tt.name, func(t *testing.T) { require.Equal(t, tt.expErr, tt.acc.Validate() != nil) }) } } func initBaseAccount() (*authtypes.BaseAccount, sdk.Coins) { _, _, addr := testdata.KeyTestPubAddr() origCoins := sdk.Coins{sdk.NewInt64Coin(feeDenom, 1000), sdk.NewInt64Coin(stakeDenom, 100)} bacc := authtypes.NewBaseAccountWithAddress(addr) return bacc, origCoins } func TestVestingAccountTestSuite(t *testing.T) { suite.Run(t, new(VestingAccountTestSuite)) } ```
The 1996–97 season saw Rochdale compete in their 23rd consecutive season in the fourth tier of the English football league, named at the time as the Football League Third Division. Statistics |} Final League Table Competitions Football League Third Division F.A. Cup Football League Cup (Coca Cola Cup) Football League Trophy (Auto Windscreens Shield) Lancashire Cup References Rochdale A.F.C. seasons Rochdale
```xml import { statusSharedColorNames, personaSharedColorNames, unusedSharedColorNames, mappedStatusColorNames, } from './sharedColorNames'; /** * Design tokens for alias colors */ export type ColorTokens = { colorNeutralForeground1: string; colorNeutralForeground1Hover: string; colorNeutralForeground1Pressed: string; colorNeutralForeground1Selected: string; colorNeutralForeground2: string; colorNeutralForeground2Hover: string; colorNeutralForeground2Pressed: string; colorNeutralForeground2Selected: string; colorNeutralForeground2BrandHover: string; colorNeutralForeground2BrandPressed: string; colorNeutralForeground2BrandSelected: string; colorNeutralForeground3: string; colorNeutralForeground3Hover: string; colorNeutralForeground3Pressed: string; colorNeutralForeground3Selected: string; colorNeutralForeground3BrandHover: string; colorNeutralForeground3BrandPressed: string; colorNeutralForeground3BrandSelected: string; colorNeutralForeground4: string; colorNeutralForegroundDisabled: string; colorNeutralForegroundInvertedDisabled: string; colorBrandForegroundLink: string; colorBrandForegroundLinkHover: string; colorBrandForegroundLinkPressed: string; colorBrandForegroundLinkSelected: string; colorNeutralForeground2Link: string; colorNeutralForeground2LinkHover: string; colorNeutralForeground2LinkPressed: string; colorNeutralForeground2LinkSelected: string; colorCompoundBrandForeground1: string; colorCompoundBrandForeground1Hover: string; colorCompoundBrandForeground1Pressed: string; colorBrandForeground1: string; colorBrandForeground2: string; colorBrandForeground2Hover: string; colorBrandForeground2Pressed: string; colorNeutralForeground1Static: string; colorNeutralForegroundInverted: string; colorNeutralForegroundInvertedHover: string; colorNeutralForegroundInvertedPressed: string; colorNeutralForegroundInvertedSelected: string; colorNeutralForegroundInverted2: string; colorNeutralForegroundOnBrand: string; colorNeutralForegroundStaticInverted: string; colorNeutralForegroundInvertedLink: string; colorNeutralForegroundInvertedLinkHover: string; colorNeutralForegroundInvertedLinkPressed: string; colorNeutralForegroundInvertedLinkSelected: string; colorBrandForegroundInverted: string; colorBrandForegroundInvertedHover: string; colorBrandForegroundInvertedPressed: string; colorBrandForegroundOnLight: string; colorBrandForegroundOnLightHover: string; colorBrandForegroundOnLightPressed: string; colorBrandForegroundOnLightSelected: string; colorNeutralBackground1: string; colorNeutralBackground1Hover: string; colorNeutralBackground1Pressed: string; colorNeutralBackground1Selected: string; colorNeutralBackground2: string; colorNeutralBackground2Hover: string; colorNeutralBackground2Pressed: string; colorNeutralBackground2Selected: string; colorNeutralBackground3: string; colorNeutralBackground3Hover: string; colorNeutralBackground3Pressed: string; colorNeutralBackground3Selected: string; colorNeutralBackground4: string; colorNeutralBackground4Hover: string; colorNeutralBackground4Pressed: string; colorNeutralBackground4Selected: string; colorNeutralBackground5: string; colorNeutralBackground5Hover: string; colorNeutralBackground5Pressed: string; colorNeutralBackground5Selected: string; colorNeutralBackground6: string; colorNeutralBackgroundInverted: string; colorNeutralBackgroundStatic: string; colorNeutralBackgroundAlpha: string; colorNeutralBackgroundAlpha2: string; colorSubtleBackground: string; colorSubtleBackgroundHover: string; colorSubtleBackgroundPressed: string; colorSubtleBackgroundSelected: string; colorSubtleBackgroundLightAlphaHover: string; colorSubtleBackgroundLightAlphaPressed: string; colorSubtleBackgroundLightAlphaSelected: string; colorSubtleBackgroundInverted: string; colorSubtleBackgroundInvertedHover: string; colorSubtleBackgroundInvertedPressed: string; colorSubtleBackgroundInvertedSelected: string; colorTransparentBackground: string; colorTransparentBackgroundHover: string; colorTransparentBackgroundPressed: string; colorTransparentBackgroundSelected: string; colorNeutralBackgroundDisabled: string; colorNeutralBackgroundInvertedDisabled: string; colorNeutralStencil1: string; colorNeutralStencil2: string; colorNeutralStencil1Alpha: string; colorNeutralStencil2Alpha: string; colorBackgroundOverlay: string; colorScrollbarOverlay: string; colorBrandBackground: string; colorBrandBackgroundHover: string; colorBrandBackgroundPressed: string; colorBrandBackgroundSelected: string; colorCompoundBrandBackground: string; colorCompoundBrandBackgroundHover: string; colorCompoundBrandBackgroundPressed: string; colorBrandBackgroundStatic: string; colorBrandBackground2: string; colorBrandBackground2Hover: string; colorBrandBackground2Pressed: string; colorBrandBackground3Static: string; colorBrandBackground4Static: string; colorBrandBackgroundInverted: string; colorBrandBackgroundInvertedHover: string; colorBrandBackgroundInvertedPressed: string; colorBrandBackgroundInvertedSelected: string; colorNeutralCardBackground: string; colorNeutralCardBackgroundHover: string; colorNeutralCardBackgroundPressed: string; colorNeutralCardBackgroundSelected: string; colorNeutralCardBackgroundDisabled: string; colorNeutralStrokeAccessible: string; colorNeutralStrokeAccessibleHover: string; colorNeutralStrokeAccessiblePressed: string; colorNeutralStrokeAccessibleSelected: string; colorNeutralStroke1: string; colorNeutralStroke1Hover: string; colorNeutralStroke1Pressed: string; colorNeutralStroke1Selected: string; colorNeutralStroke2: string; colorNeutralStroke3: string; colorNeutralStrokeSubtle: string; colorNeutralStrokeOnBrand: string; colorNeutralStrokeOnBrand2: string; colorNeutralStrokeOnBrand2Hover: string; colorNeutralStrokeOnBrand2Pressed: string; colorNeutralStrokeOnBrand2Selected: string; colorBrandStroke1: string; colorBrandStroke2: string; colorBrandStroke2Hover: string; colorBrandStroke2Pressed: string; colorBrandStroke2Contrast: string; colorCompoundBrandStroke: string; colorCompoundBrandStrokeHover: string; colorCompoundBrandStrokePressed: string; colorNeutralStrokeDisabled: string; colorNeutralStrokeInvertedDisabled: string; colorTransparentStroke: string; colorTransparentStrokeInteractive: string; colorTransparentStrokeDisabled: string; colorNeutralStrokeAlpha: string; colorNeutralStrokeAlpha2: string; colorStrokeFocus1: string; colorStrokeFocus2: string; colorNeutralShadowAmbient: string; colorNeutralShadowKey: string; colorNeutralShadowAmbientLighter: string; colorNeutralShadowKeyLighter: string; colorNeutralShadowAmbientDarker: string; colorNeutralShadowKeyDarker: string; colorBrandShadowAmbient: string; colorBrandShadowKey: string; }; export type ColorStatusSuccess = | 'colorStatusSuccessBackground1' | 'colorStatusSuccessBackground2' | 'colorStatusSuccessBackground3' | 'colorStatusSuccessForeground1' | 'colorStatusSuccessForeground2' | 'colorStatusSuccessForeground3' | 'colorStatusSuccessForegroundInverted' | 'colorStatusSuccessBorderActive' | 'colorStatusSuccessBorder1' | 'colorStatusSuccessBorder2'; export type ColorStatusWarning = | 'colorStatusWarningBackground1' | 'colorStatusWarningBackground2' | 'colorStatusWarningBackground3' | 'colorStatusWarningForeground1' | 'colorStatusWarningForeground2' | 'colorStatusWarningForeground3' | 'colorStatusWarningForegroundInverted' | 'colorStatusWarningBorderActive' | 'colorStatusWarningBorder1' | 'colorStatusWarningBorder2'; export type ColorStatusDanger = | 'colorStatusDangerBackground1' | 'colorStatusDangerBackground2' | 'colorStatusDangerBackground3' | 'colorStatusDangerBackground3Hover' | 'colorStatusDangerBackground3Pressed' | 'colorStatusDangerForeground1' | 'colorStatusDangerForeground2' | 'colorStatusDangerForeground3' | 'colorStatusDangerForegroundInverted' | 'colorStatusDangerBorderActive' | 'colorStatusDangerBorder1' | 'colorStatusDangerBorder2'; export type ColorPaletteRed = | 'colorPaletteRedBackground1' | 'colorPaletteRedBackground2' | 'colorPaletteRedBackground3' | 'colorPaletteRedForeground1' | 'colorPaletteRedForeground2' | 'colorPaletteRedForeground3' | 'colorPaletteRedForegroundInverted' | 'colorPaletteRedBorderActive' | 'colorPaletteRedBorder1' | 'colorPaletteRedBorder2'; export type ColorPaletteGreen = | 'colorPaletteGreenBackground1' | 'colorPaletteGreenBackground2' | 'colorPaletteGreenBackground3' | 'colorPaletteGreenForeground1' | 'colorPaletteGreenForeground2' | 'colorPaletteGreenForeground3' | 'colorPaletteGreenForegroundInverted' | 'colorPaletteGreenBorderActive' | 'colorPaletteGreenBorder1' | 'colorPaletteGreenBorder2'; export type ColorPaletteDarkOrange = | 'colorPaletteDarkOrangeBackground1' | 'colorPaletteDarkOrangeBackground2' | 'colorPaletteDarkOrangeBackground3' | 'colorPaletteDarkOrangeForeground1' | 'colorPaletteDarkOrangeForeground2' | 'colorPaletteDarkOrangeForeground3' | 'colorPaletteDarkOrangeBorderActive' | 'colorPaletteDarkOrangeBorder1' | 'colorPaletteDarkOrangeBorder2'; export type ColorPaletteYellow = | 'colorPaletteYellowBackground1' | 'colorPaletteYellowBackground2' | 'colorPaletteYellowBackground3' | 'colorPaletteYellowForeground1' | 'colorPaletteYellowForeground2' | 'colorPaletteYellowForeground3' | 'colorPaletteYellowForegroundInverted' | 'colorPaletteYellowBorderActive' | 'colorPaletteYellowBorder1' | 'colorPaletteYellowBorder2'; export type ColorPaletteBerry = | 'colorPaletteBerryBackground1' | 'colorPaletteBerryBackground2' | 'colorPaletteBerryBackground3' | 'colorPaletteBerryForeground1' | 'colorPaletteBerryForeground2' | 'colorPaletteBerryForeground3' | 'colorPaletteBerryBorderActive' | 'colorPaletteBerryBorder1' | 'colorPaletteBerryBorder2'; export type ColorPaletteMarigold = | 'colorPaletteMarigoldBackground1' | 'colorPaletteMarigoldBackground2' | 'colorPaletteMarigoldBackground3' | 'colorPaletteMarigoldForeground1' | 'colorPaletteMarigoldForeground2' | 'colorPaletteMarigoldForeground3' | 'colorPaletteMarigoldBorderActive' | 'colorPaletteMarigoldBorder1' | 'colorPaletteMarigoldBorder2'; export type ColorPaletteLightGreen = | 'colorPaletteLightGreenBackground1' | 'colorPaletteLightGreenBackground2' | 'colorPaletteLightGreenBackground3' | 'colorPaletteLightGreenForeground1' | 'colorPaletteLightGreenForeground2' | 'colorPaletteLightGreenForeground3' | 'colorPaletteLightGreenBorderActive' | 'colorPaletteLightGreenBorder1' | 'colorPaletteLightGreenBorder2'; export type ColorPaletteDarkRed = | 'colorPaletteDarkRedBackground2' | 'colorPaletteDarkRedForeground2' | 'colorPaletteDarkRedBorderActive'; export type ColorPaletteCranberry = | 'colorPaletteCranberryBackground2' | 'colorPaletteCranberryForeground2' | 'colorPaletteCranberryBorderActive'; export type ColorPalettePumpkin = | 'colorPalettePumpkinBackground2' | 'colorPalettePumpkinForeground2' | 'colorPalettePumpkinBorderActive'; export type ColorPalettePeach = | 'colorPalettePeachBackground2' | 'colorPalettePeachForeground2' | 'colorPalettePeachBorderActive'; export type ColorPaletteGold = | 'colorPaletteGoldBackground2' | 'colorPaletteGoldForeground2' | 'colorPaletteGoldBorderActive'; export type ColorPaletteBrass = | 'colorPaletteBrassBackground2' | 'colorPaletteBrassForeground2' | 'colorPaletteBrassBorderActive'; export type ColorPaletteBrown = | 'colorPaletteBrownBackground2' | 'colorPaletteBrownForeground2' | 'colorPaletteBrownBorderActive'; export type ColorPaletteForest = | 'colorPaletteForestBackground2' | 'colorPaletteForestForeground2' | 'colorPaletteForestBorderActive'; export type ColorPaletteSeafoam = | 'colorPaletteSeafoamBackground2' | 'colorPaletteSeafoamForeground2' | 'colorPaletteSeafoamBorderActive'; export type ColorPaletteDarkGreen = | 'colorPaletteDarkGreenBackground2' | 'colorPaletteDarkGreenForeground2' | 'colorPaletteDarkGreenBorderActive'; export type ColorPaletteLightTeal = | 'colorPaletteLightTealBackground2' | 'colorPaletteLightTealForeground2' | 'colorPaletteLightTealBorderActive'; export type ColorPaletteTeal = | 'colorPaletteTealBackground2' | 'colorPaletteTealForeground2' | 'colorPaletteTealBorderActive'; export type ColorPaletteSteel = | 'colorPaletteSteelBackground2' | 'colorPaletteSteelForeground2' | 'colorPaletteSteelBorderActive'; export type ColorPaletteBlue = | 'colorPaletteBlueBackground2' | 'colorPaletteBlueForeground2' | 'colorPaletteBlueBorderActive'; export type ColorPaletteRoyalBlue = | 'colorPaletteRoyalBlueBackground2' | 'colorPaletteRoyalBlueForeground2' | 'colorPaletteRoyalBlueBorderActive'; export type ColorPaletteCornflower = | 'colorPaletteCornflowerBackground2' | 'colorPaletteCornflowerForeground2' | 'colorPaletteCornflowerBorderActive'; export type ColorPaletteNavy = | 'colorPaletteNavyBackground2' | 'colorPaletteNavyForeground2' | 'colorPaletteNavyBorderActive'; export type ColorPaletteLavender = | 'colorPaletteLavenderBackground2' | 'colorPaletteLavenderForeground2' | 'colorPaletteLavenderBorderActive'; export type ColorPalettePurple = | 'colorPalettePurpleBackground2' | 'colorPalettePurpleForeground2' | 'colorPalettePurpleBorderActive'; export type ColorPaletteGrape = | 'colorPaletteGrapeBackground2' | 'colorPaletteGrapeForeground2' | 'colorPaletteGrapeBorderActive'; export type ColorPaletteLilac = | 'colorPaletteLilacBackground2' | 'colorPaletteLilacForeground2' | 'colorPaletteLilacBorderActive'; export type ColorPalettePink = | 'colorPalettePinkBackground2' | 'colorPalettePinkForeground2' | 'colorPalettePinkBorderActive'; export type ColorPaletteMagenta = | 'colorPaletteMagentaBackground2' | 'colorPaletteMagentaForeground2' | 'colorPaletteMagentaBorderActive'; export type ColorPalettePlum = | 'colorPalettePlumBackground2' | 'colorPalettePlumForeground2' | 'colorPalettePlumBorderActive'; export type ColorPaletteBeige = | 'colorPaletteBeigeBackground2' | 'colorPaletteBeigeForeground2' | 'colorPaletteBeigeBorderActive'; export type ColorPaletteMink = | 'colorPaletteMinkBackground2' | 'colorPaletteMinkForeground2' | 'colorPaletteMinkBorderActive'; export type ColorPalettePlatinum = | 'colorPalettePlatinumBackground2' | 'colorPalettePlatinumForeground2' | 'colorPalettePlatinumBorderActive'; export type ColorPaletteAnchor = | 'colorPaletteAnchorBackground2' | 'colorPaletteAnchorForeground2' | 'colorPaletteAnchorBorderActive'; export type ColorStatusTokens = Record<ColorStatusSuccess | ColorStatusWarning | ColorStatusDanger, string>; export type StatusColorPaletteTokens = Record< | ColorPaletteRed | ColorPaletteGreen | ColorPaletteDarkOrange | ColorPaletteYellow | ColorPaletteBerry | ColorPaletteMarigold | ColorPaletteLightGreen, string >; export type PersonaColorPaletteTokens = Record< | ColorPaletteDarkRed | ColorPaletteCranberry | ColorPalettePumpkin | ColorPalettePeach | ColorPaletteGold | ColorPaletteBrass | ColorPaletteBrown | ColorPaletteForest | ColorPaletteSeafoam | ColorPaletteDarkGreen | ColorPaletteLightTeal | ColorPaletteTeal | ColorPaletteSteel | ColorPaletteBlue | ColorPaletteRoyalBlue | ColorPaletteCornflower | ColorPaletteNavy | ColorPaletteLavender | ColorPalettePurple | ColorPaletteGrape | ColorPaletteLilac | ColorPalettePink | ColorPaletteMagenta | ColorPalettePlum | ColorPaletteBeige | ColorPaletteMink | ColorPalettePlatinum | ColorPaletteAnchor, string >; export type ColorPaletteTokens = StatusColorPaletteTokens & PersonaColorPaletteTokens; /** * Possible color variant values */ export type ColorVariants = { shade50: string; shade40: string; shade30: string; shade20: string; shade10: string; primary: string; tint10: string; tint20: string; tint30: string; tint40: string; tint50: string; tint60: string; }; export type Brands = 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 110 | 120 | 130 | 140 | 150 | 160; export type BrandVariants = Record<Brands, string>; type StatusSharedColorNames = (typeof statusSharedColorNames)[number]; type PersonaSharedColorNames = (typeof personaSharedColorNames)[number]; export type MappedStatusColorNames = (typeof mappedStatusColorNames)[number]; type UnusedSharedColorNames = (typeof unusedSharedColorNames)[number]; export type StatusSharedColors = Record<StatusSharedColorNames, ColorVariants>; export type PersonaSharedColors = Record<PersonaSharedColorNames, ColorVariants>; export type MappedStatusColors = Record<MappedStatusColorNames, ColorVariants>; export type UnusedSharedColors = Record<UnusedSharedColorNames, ColorVariants>; export type FontSizeTokens = { fontSizeBase100: string; fontSizeBase200: string; fontSizeBase300: string; fontSizeBase400: string; fontSizeBase500: string; fontSizeBase600: string; fontSizeHero700: string; fontSizeHero800: string; fontSizeHero900: string; fontSizeHero1000: string; }; export type LineHeightTokens = { lineHeightBase100: string; lineHeightBase200: string; lineHeightBase300: string; lineHeightBase400: string; lineHeightBase500: string; lineHeightBase600: string; lineHeightHero700: string; lineHeightHero800: string; lineHeightHero900: string; lineHeightHero1000: string; }; export type FontWeightTokens = { fontWeightRegular: number; fontWeightMedium: number; fontWeightSemibold: number; fontWeightBold: number; }; export type FontFamilyTokens = { fontFamilyBase: string; fontFamilyMonospace: string; fontFamilyNumeric: string; }; export type TextAlignment = | 'inherit' | 'initial' | 'revert' | 'unset' | 'center' | 'end' | 'start' | 'justify' | 'left' | 'match-parent' | 'right'; export type TextAlignments = { start: TextAlignment; center: TextAlignment; end: TextAlignment; justify: TextAlignment; }; export type TypographyStyle = { fontFamily: string; fontSize: string; fontWeight: string; lineHeight: string; }; export type TypographyStyles = { body1: TypographyStyle; body1Strong: TypographyStyle; body1Stronger: TypographyStyle; body2: TypographyStyle; caption1: TypographyStyle; caption1Strong: TypographyStyle; caption1Stronger: TypographyStyle; caption2: TypographyStyle; caption2Strong: TypographyStyle; subtitle1: TypographyStyle; subtitle2: TypographyStyle; subtitle2Stronger: TypographyStyle; title1: TypographyStyle; title2: TypographyStyle; title3: TypographyStyle; largeTitle: TypographyStyle; display: TypographyStyle; }; export type BorderRadiusTokens = { borderRadiusNone: string; borderRadiusSmall: string; borderRadiusMedium: string; borderRadiusLarge: string; borderRadiusXLarge: string; borderRadiusCircular: string; }; export type StrokeWidthTokens = { strokeWidthThin: string; strokeWidthThick: string; strokeWidthThicker: string; strokeWidthThickest: string; }; export type SpacingTokens = { none: string; xxs: string; xs: string; sNudge: string; s: string; mNudge: string; m: string; l: string; xl: string; xxl: string; xxxl: string; }; export type HorizontalSpacingTokens = { spacingHorizontalNone: string; spacingHorizontalXXS: string; spacingHorizontalXS: string; spacingHorizontalSNudge: string; spacingHorizontalS: string; spacingHorizontalMNudge: string; spacingHorizontalM: string; spacingHorizontalL: string; spacingHorizontalXL: string; spacingHorizontalXXL: string; spacingHorizontalXXXL: string; }; export type VerticalSpacingTokens = { spacingVerticalNone: string; spacingVerticalXXS: string; spacingVerticalXS: string; spacingVerticalSNudge: string; spacingVerticalS: string; spacingVerticalMNudge: string; spacingVerticalM: string; spacingVerticalL: string; spacingVerticalXL: string; spacingVerticalXXL: string; spacingVerticalXXXL: string; }; export type DurationTokens = { durationUltraFast: string; durationFaster: string; durationFast: string; durationNormal: string; durationGentle: string; durationSlow: string; durationSlower: string; durationUltraSlow: string; }; export type CurveTokens = { curveAccelerateMax: string; curveAccelerateMid: string; curveAccelerateMin: string; curveDecelerateMax: string; curveDecelerateMid: string; curveDecelerateMin: string; curveEasyEaseMax: string; curveEasyEase: string; curveLinear: string; }; /** * Design tokens for shadow levels */ export type ShadowTokens = { shadow2: string; shadow4: string; shadow8: string; shadow16: string; shadow28: string; shadow64: string; }; export type ShadowBrandTokens = { shadow2Brand: string; shadow4Brand: string; shadow8Brand: string; shadow16Brand: string; shadow28Brand: string; shadow64Brand: string; }; export type Greys = | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 76 | 78 | 80 | 82 | 84 | 86 | 88 | 90 | 92 | 94 | 96 | 98; export type AlphaColors = 5 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90; // TODO: do we want to split theme for better tree shaking? (MUI) // But will this end up in the bundle at all? It should be used only in makeStyles and should be removed during build export type Theme = FontSizeTokens & LineHeightTokens & BorderRadiusTokens & StrokeWidthTokens & HorizontalSpacingTokens & VerticalSpacingTokens & DurationTokens & CurveTokens & ShadowTokens & ShadowBrandTokens & FontFamilyTokens & FontWeightTokens & ColorPaletteTokens & ColorStatusTokens & ColorTokens; export type PartialTheme = Partial<Theme>; ```
The Lycée Claudel d'Ottawa is a French-language private school in Ottawa built in the early 1960s. It was renovated by Edward J. Cuhaci to provide an infill between two existing school buildings comprising classrooms and a 600-seat auditorium. It is located on Lycée Place (formerly Old Riverside Drive). The school has approximately 1000 students in grades JK-12. It is named after the French poet Paul Claudel, and follows the French international curriculum. All classes, with the exception of language classes, are taught in French, and students complete the French baccalaureat at the end of grade 12 (called "Terminale"). The Lycée Paul Claudel has the highest average results among French overseas schools (of which there are over 300) as of Spring 2013. Program The school is also competitive in many fields; it has been junior boys' soccer champion and tennis champion in both boys' and girls' categories in the city of Ottawa. Students François Le Moine, Philippe Boisvert and Jean-Christophe Martel were National French Debating Champions of Canada in 2001, 2002 and 2003. Christine Mikolajuk and Greta Levy were Regional, Provincial and National Bilingual Debating Champions in 2002 and 2004, respectively. Three students, Fatoumata Diane, Jasmine Sander Preston and Fatma Zaguia, won the Canadian finale of the World French Language Trophies and were invited to France for the world finale hosted by famous French TV hosts Julien Lepers and Bernard Pivot. They ended up bringing back the victory for Claudel. The University of Ottawa's Gee-Gees star Pilar Khoury is also an alumnus of the school. Alumni As the school is located in Canada's national capital, some Canadian politicians' children are among its alumni, including those of former Canadian Prime Ministers Pierre Trudeau and Brian Mulroney, and Quebec Premier Rene Levesque. Hockey player Alex Kovalev's children also attended the school. See also Agence pour l'enseignement français à l'étranger References External links Lycée Claudel d'Ottawa Private schools in Ottawa Claudel Middle schools in Ottawa High schools in Ottawa International Baccalaureate schools in Ontario French international schools in Canada
```c++ // // blocking_udp_client.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // // file LICENSE_1_0.txt or copy at path_to_url // #include <boost/asio/deadline_timer.hpp> #include <boost/asio/io_context.hpp> #include <boost/asio/ip/udp.hpp> #include <cstdlib> #include <boost/bind.hpp> #include <boost/date_time/posix_time/posix_time_types.hpp> #include <iostream> using boost::asio::deadline_timer; using boost::asio::ip::udp; //your_sha256_hash------ // // This class manages socket timeouts by applying the concept of a deadline. // Each asynchronous operation is given a deadline by which it must complete. // Deadlines are enforced by an "actor" that persists for the lifetime of the // client object: // // +----------------+ // | | // | check_deadline |<---+ // | | | // +----------------+ | async_wait() // | | // +---------+ // // If the actor determines that the deadline has expired, any outstanding // socket operations are cancelled. The socket operations themselves are // implemented as transient actors: // // +---------------+ // | | // | receive | // | | // +---------------+ // | // async_- | +----------------+ // receive() | | | // +--->| handle_receive | // | | // +----------------+ // // The client object runs the io_context to block thread execution until the // actor completes. // class client { public: client(const udp::endpoint& listen_endpoint) : socket_(io_context_, listen_endpoint), deadline_(io_context_) { // No deadline is required until the first socket operation is started. We // set the deadline to positive infinity so that the actor takes no action // until a specific deadline is set. deadline_.expires_at(boost::posix_time::pos_infin); // Start the persistent actor that checks for deadline expiry. check_deadline(); } std::size_t receive(const boost::asio::mutable_buffer& buffer, boost::posix_time::time_duration timeout, boost::system::error_code& ec) { // Set a deadline for the asynchronous operation. deadline_.expires_from_now(timeout); // Set up the variables that receive the result of the asynchronous // operation. The error code is set to would_block to signal that the // operation is incomplete. Asio guarantees that its asynchronous // operations will never fail with would_block, so any other value in // ec indicates completion. ec = boost::asio::error::would_block; std::size_t length = 0; // Start the asynchronous operation itself. The handle_receive function // used as a callback will update the ec and length variables. socket_.async_receive(boost::asio::buffer(buffer), boost::bind(&client::handle_receive, _1, _2, &ec, &length)); // Block until the asynchronous operation has completed. do io_context_.run_one(); while (ec == boost::asio::error::would_block); return length; } private: void check_deadline() { // Check whether the deadline has passed. We compare the deadline against // the current time since a new asynchronous operation may have moved the // deadline before this actor had a chance to run. if (deadline_.expires_at() <= deadline_timer::traits_type::now()) { // The deadline has passed. The outstanding asynchronous operation needs // to be cancelled so that the blocked receive() function will return. // // Please note that cancel() has portability issues on some versions of // Microsoft Windows, and it may be necessary to use close() instead. // Consult the documentation for cancel() for further information. socket_.cancel(); // There is no longer an active deadline. The expiry is set to positive // infinity so that the actor takes no action until a new deadline is set. deadline_.expires_at(boost::posix_time::pos_infin); } // Put the actor back to sleep. deadline_.async_wait(boost::bind(&client::check_deadline, this)); } static void handle_receive( const boost::system::error_code& ec, std::size_t length, boost::system::error_code* out_ec, std::size_t* out_length) { *out_ec = ec; *out_length = length; } private: boost::asio::io_context io_context_; udp::socket socket_; deadline_timer deadline_; }; //your_sha256_hash------ int main(int argc, char* argv[]) { try { using namespace std; // For atoi. if (argc != 3) { std::cerr << "Usage: blocking_udp_timeout <listen_addr> <listen_port>\n"; return 1; } udp::endpoint listen_endpoint( boost::asio::ip::make_address(argv[1]), std::atoi(argv[2])); client c(listen_endpoint); for (;;) { char data[1024]; boost::system::error_code ec; std::size_t n = c.receive(boost::asio::buffer(data), boost::posix_time::seconds(10), ec); if (ec) { std::cout << "Receive error: " << ec.message() << "\n"; } else { std::cout << "Received: "; std::cout.write(data, n); std::cout << "\n"; } } } catch (std::exception& e) { std::cerr << "Exception: " << e.what() << "\n"; } return 0; } ```
```go package tags import ( "encoding/json" "errors" "time" "github.com/ipfs-cluster/ipfs-cluster/config" "github.com/kelseyhightower/envconfig" ) const configKey = "tags" const envConfigKey = "cluster_tags" // Default values for tags Config const ( DefaultMetricTTL = 30 * time.Second ) // Default values for tags config var ( DefaultTags = map[string]string{ "group": "default", } ) // Config is used to initialize an Informer and customize // the type and parameters of the metric it produces. type Config struct { config.Saver MetricTTL time.Duration Tags map[string]string } type jsonConfig struct { MetricTTL string `json:"metric_ttl"` Tags map[string]string `json:"tags"` } // ConfigKey returns a human-friendly identifier for this type of Metric. func (cfg *Config) ConfigKey() string { return configKey } // Default initializes this Config with sensible values. func (cfg *Config) Default() error { cfg.MetricTTL = DefaultMetricTTL cfg.Tags = DefaultTags return nil } // ApplyEnvVars fills in any Config fields found // as environment variables. func (cfg *Config) ApplyEnvVars() error { jcfg := cfg.toJSONConfig() err := envconfig.Process(envConfigKey, jcfg) if err != nil { return err } return cfg.applyJSONConfig(jcfg) } // Validate checks that the fields of this Config have working values, // at least in appearance. func (cfg *Config) Validate() error { if cfg.MetricTTL <= 0 { return errors.New("tags.metric_ttl is invalid") } return nil } // LoadJSON reads the fields of this Config from a JSON byteslice as // generated by ToJSON. func (cfg *Config) LoadJSON(raw []byte) error { jcfg := &jsonConfig{} err := json.Unmarshal(raw, jcfg) if err != nil { logger.Error("Error unmarshaling disk informer config") return err } cfg.Default() return cfg.applyJSONConfig(jcfg) } func (cfg *Config) applyJSONConfig(jcfg *jsonConfig) error { err := config.ParseDurations( cfg.ConfigKey(), &config.DurationOpt{Duration: jcfg.MetricTTL, Dst: &cfg.MetricTTL, Name: "metric_ttl"}, ) if err != nil { return err } cfg.Tags = jcfg.Tags return cfg.Validate() } // ToJSON generates a JSON-formatted human-friendly representation of this // Config. func (cfg *Config) ToJSON() (raw []byte, err error) { jcfg := cfg.toJSONConfig() raw, err = config.DefaultJSONMarshal(jcfg) return } func (cfg *Config) toJSONConfig() *jsonConfig { return &jsonConfig{ MetricTTL: cfg.MetricTTL.String(), Tags: cfg.Tags, } } // ToDisplayJSON returns JSON config as a string. func (cfg *Config) ToDisplayJSON() ([]byte, error) { return config.DisplayJSON(cfg.toJSONConfig()) } ```
```python """ ============================= Species distribution dataset ============================= This dataset represents the geographic distribution of species. The dataset is provided by Phillips et. al. (2006). The two species are: - `"Bradypus variegatus" <path_to_url`_ , the Brown-throated Sloth. - `"Microryzomys minutus" <path_to_url`_ , also known as the Forest Small Rice Rat, a rodent that lives in Peru, Colombia, Ecuador, Peru, and Venezuela. References: * `"Maximum entropy modeling of species geographic distributions" <path_to_url~schapire/papers/ecolmod.pdf>`_ S. J. Phillips, R. P. Anderson, R. E. Schapire - Ecological Modelling, 190:231-259, 2006. Notes: * See examples/applications/plot_species_distribution_modeling.py for an example of using this dataset """ # Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> # Jake Vanderplas <vanderplas@astro.washington.edu> # from io import BytesIO from os import makedirs from os.path import exists try: # Python 2 from urllib2 import urlopen PY2 = True except ImportError: # Python 3 from urllib.request import urlopen PY2 = False import numpy as np from sklearn.datasets.base import get_data_home, Bunch from sklearn.datasets.base import _pkl_filepath from sklearn.externals import joblib DIRECTORY_URL = "path_to_url~schapire/maxent/datasets/" SAMPLES_URL = DIRECTORY_URL + "samples.zip" COVERAGES_URL = DIRECTORY_URL + "coverages.zip" DATA_ARCHIVE_NAME = "species_coverage.pkz" def _load_coverage(F, header_length=6, dtype=np.int16): """Load a coverage file from an open file object. This will return a numpy array of the given dtype """ header = [F.readline() for i in range(header_length)] make_tuple = lambda t: (t.split()[0], float(t.split()[1])) header = dict([make_tuple(line) for line in header]) M = np.loadtxt(F, dtype=dtype) nodata = int(header[b'NODATA_value']) if nodata != -9999: M[nodata] = -9999 return M def _load_csv(F): """Load csv file. Parameters ---------- F : file object CSV file open in byte mode. Returns ------- rec : np.ndarray record array representing the data """ if PY2: # Numpy recarray wants Python 2 str but not unicode names = F.readline().strip().split(',') else: # Numpy recarray wants Python 3 str but not bytes... names = F.readline().decode('ascii').strip().split(',') rec = np.loadtxt(F, skiprows=0, delimiter=',', dtype='a22,f4,f4') rec.dtype.names = names return rec def construct_grids(batch): """Construct the map grid from the batch object Parameters ---------- batch : Batch object The object returned by :func:`fetch_species_distributions` Returns ------- (xgrid, ygrid) : 1-D arrays The grid corresponding to the values in batch.coverages """ # x,y coordinates for corner cells xmin = batch.x_left_lower_corner + batch.grid_size xmax = xmin + (batch.Nx * batch.grid_size) ymin = batch.y_left_lower_corner + batch.grid_size ymax = ymin + (batch.Ny * batch.grid_size) # x coordinates of the grid cells xgrid = np.arange(xmin, xmax, batch.grid_size) # y coordinates of the grid cells ygrid = np.arange(ymin, ymax, batch.grid_size) return (xgrid, ygrid) def fetch_species_distributions(data_home=None, download_if_missing=True): """Loader for species distribution dataset from Phillips et. al. (2006) Read more in the :ref:`User Guide <datasets>`. Parameters ---------- data_home : optional, default: None Specify another download and cache folder for the datasets. By default all scikit learn data is stored in '~/scikit_learn_data' subfolders. download_if_missing: optional, True by default If False, raise a IOError if the data is not locally available instead of trying to download the data from the source site. Returns -------- The data is returned as a Bunch object with the following attributes: coverages : array, shape = [14, 1592, 1212] These represent the 14 features measured at each point of the map grid. The latitude/longitude values for the grid are discussed below. Missing data is represented by the value -9999. train : record array, shape = (1623,) The training points for the data. Each point has three fields: - train['species'] is the species name - train['dd long'] is the longitude, in degrees - train['dd lat'] is the latitude, in degrees test : record array, shape = (619,) The test points for the data. Same format as the training data. Nx, Ny : integers The number of longitudes (x) and latitudes (y) in the grid x_left_lower_corner, y_left_lower_corner : floats The (x,y) position of the lower-left corner, in degrees grid_size : float The spacing between points of the grid, in degrees Notes ------ This dataset represents the geographic distribution of species. The dataset is provided by Phillips et. al. (2006). The two species are: - `"Bradypus variegatus" <path_to_url`_ , the Brown-throated Sloth. - `"Microryzomys minutus" <path_to_url`_ , also known as the Forest Small Rice Rat, a rodent that lives in Peru, Colombia, Ecuador, Peru, and Venezuela. References ---------- * `"Maximum entropy modeling of species geographic distributions" <path_to_url~schapire/papers/ecolmod.pdf>`_ S. J. Phillips, R. P. Anderson, R. E. Schapire - Ecological Modelling, 190:231-259, 2006. Notes ----- * See examples/applications/plot_species_distribution_modeling.py for an example of using this dataset with scikit-learn """ data_home = get_data_home(data_home) if not exists(data_home): makedirs(data_home) # Define parameters for the data files. These should not be changed # unless the data model changes. They will be saved in the npz file # with the downloaded data. extra_params = dict(x_left_lower_corner=-94.8, Nx=1212, y_left_lower_corner=-56.05, Ny=1592, grid_size=0.05) dtype = np.int16 archive_path = _pkl_filepath(data_home, DATA_ARCHIVE_NAME) if not exists(archive_path): print('Downloading species data from %s to %s' % (SAMPLES_URL, data_home)) X = np.load(BytesIO(urlopen(SAMPLES_URL).read())) for f in X.files: fhandle = BytesIO(X[f]) if 'train' in f: train = _load_csv(fhandle) if 'test' in f: test = _load_csv(fhandle) print('Downloading coverage data from %s to %s' % (COVERAGES_URL, data_home)) X = np.load(BytesIO(urlopen(COVERAGES_URL).read())) coverages = [] for f in X.files: fhandle = BytesIO(X[f]) print(' - converting', f) coverages.append(_load_coverage(fhandle)) coverages = np.asarray(coverages, dtype=dtype) bunch = Bunch(coverages=coverages, test=test, train=train, **extra_params) joblib.dump(bunch, archive_path, compress=9) else: bunch = joblib.load(archive_path) return bunch ```
```javascript 'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_precision) { var v = opt_precision; if (undefined === v) { v = Math.min(getDecimals(n), 3); } var base = Math.pow(10, v); var f = ((n * base) | 0) % base; return {v: v, f: f}; } $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "AM", "PM" ], "DAY": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], "MONTH": [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], "SHORTDAY": [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], "SHORTMONTH": [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], "fullDate": "EEEE, MMMM d, y", "longDate": "MMMM d, y", "medium": "MMM d, y h:mm:ss a", "mediumDate": "MMM d, y", "mediumTime": "h:mm:ss a", "short": "M/d/yy h:mm a", "shortDate": "M/d/yy", "shortTime": "h:mm a" }, "NUMBER_FORMATS": { "CURRENCY_SYM": "$", "DECIMAL_SEP": ".", "GROUP_SEP": ",", "PATTERNS": [ { "gSize": 3, "lgSize": 3, "macFrac": 0, "maxFrac": 3, "minFrac": 0, "minInt": 1, "negPre": "-", "negSuf": "", "posPre": "", "posSuf": "" }, { "gSize": 3, "lgSize": 3, "macFrac": 0, "maxFrac": 2, "minFrac": 2, "minInt": 1, "negPre": "\u00a4-", "negSuf": "", "posPre": "\u00a4", "posSuf": "" } ] }, "id": "en-bs", "pluralCat": function (n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} }); }]); ```
Eosopostega is a genus of moths of the family Opostegidae. Species Eosopostega armigera Puplesis & Robinson, 1999 Eosopostega issikii D.R. Davis, 1988 Etymology The generic name originates from the Greek eos (dawn, east) prefixed to the generic stem Opostega, in reference to the extreme eastern palearctic distribution of this taxon. It is feminine in gender. External links Generic Revision of the Opostegidae, with a Synoptic Catalog of the World's Species (Lepidoptera: Nepticuloidea) Opostegidae Monotrysia genera
Petrovice () is a municipality and village in Bruntál District in the Moravian-Silesian Region of the Czech Republic. It has about 100 inhabitants. The village is well preserved and is protected by law as a village monument zone. Etymology The name is derived from the personal name Petr. He was probably the leader of the colonizers who came here in the 13th century. Geography Petrovice is located about north of Bruntál and north of Ostrava. The municipality is located on the border with Poland in the Osoblažsko microregion. Petrovice lies in the Zlatohorská Highlands. The highest points in the territory are the slopes of Biskupská hora (at an altitude of about ) in the northern part, and the peaks of Kutný vrch () and Solná hora () on the southern municipal border. The built-up area is located in the valley of the Osoblaha River, which originates in the territory of Petrovice. History The first written mention of Petrovice is from 1267. The village was founded by bishop Bruno von Schauenburg, probably between 1250 and 1252. Demographics Sights The landmark of Petrovice is the Church of Saint Roch. It is a typical rural single nave church, which was built in the Neoclassical style in 1826–1830. Notable people Josef Pfitzner (1901–1945), German politician and writer, executed for war crimes References External links Villages in Bruntál District
```javascript "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("rxjs-compat/add/operator/merge"); //# sourceMappingURL=merge.js.map ```
```ocaml (**************************************************************************) (* *) (* OCaml *) (* *) (* Fabrice Le Fessant, INRIA Saclay *) (* *) (* en Automatique. *) (* *) (* All rights reserved. This file is distributed under the terms of *) (* special exception on linking described in the file LICENSE. *) (* *) (**************************************************************************) open Typedtree module type MapArgument = sig val enter_structure : structure -> structure val enter_value_description : value_description -> value_description val enter_type_declaration : type_declaration -> type_declaration val enter_type_extension : type_extension -> type_extension val enter_extension_constructor : extension_constructor -> extension_constructor val enter_pattern : pattern -> pattern val enter_expression : expression -> expression val enter_package_type : package_type -> package_type val enter_signature : signature -> signature val enter_signature_item : signature_item -> signature_item val enter_module_type_declaration : module_type_declaration -> module_type_declaration val enter_module_type : module_type -> module_type val enter_module_expr : module_expr -> module_expr val enter_with_constraint : with_constraint -> with_constraint val enter_core_type : core_type -> core_type val enter_structure_item : structure_item -> structure_item val leave_structure : structure -> structure val leave_value_description : value_description -> value_description val leave_type_declaration : type_declaration -> type_declaration val leave_type_extension : type_extension -> type_extension val leave_extension_constructor : extension_constructor -> extension_constructor val leave_pattern : pattern -> pattern val leave_expression : expression -> expression val leave_package_type : package_type -> package_type val leave_signature : signature -> signature val leave_signature_item : signature_item -> signature_item val leave_module_type_declaration : module_type_declaration -> module_type_declaration val leave_module_type : module_type -> module_type val leave_module_expr : module_expr -> module_expr val leave_with_constraint : with_constraint -> with_constraint val leave_core_type : core_type -> core_type val leave_structure_item : structure_item -> structure_item end module MakeMap : functor (Iter : MapArgument) -> sig val map_structure : structure -> structure val map_pattern : pattern -> pattern val map_structure_item : structure_item -> structure_item val map_expression : expression -> expression val map_signature : signature -> signature val map_signature_item : signature_item -> signature_item val map_module_type : module_type -> module_type end module DefaultMapArgument : MapArgument ```
Wrestling Dontaku 2010 was a professional wrestling pay-per-view (PPV) event promoted by New Japan Pro-Wrestling (NJPW). The event took place on May 3, 2010, in Fukuoka, Fukuoka, at the Fukuoka Kokusai Center. The event featured nine matches (including one dark match), four of which were contested for championships. It was the seventh event under the Wrestling Dontaku name. Storylines Wrestling Dontaku 2010 featured nine professional wrestling matches that involved different wrestlers from pre-existing scripted feuds and storylines. Wrestlers portrayed villains, heroes, or less distinguishable characters in the scripted events that built tension and culminated in a wrestling match or series of matches. Event In the third match, NJPW veteran Jyushin Thunder Liger defeated Consejo Mundial de Lucha Libre (CMLL) representative Negro Casas to win the CMLL World Middleweight Championship. The event also featured the continuation of a three-way tag team rivalry between Bad Intentions (Giant Bernard and Karl Anderson), No Limit (Tetsuya Naito and Yujiro Takahashi) and Seigigun (Wataru Inoue and Yuji Nagata), with Seigigun capturing the IWGP Tag Team Championship from No Limit. Pro Wrestling Noah's Naomichi Marufuji successfully defended his IWGP Junior Heavyweight Championship against Ryusuke Taguchi during the event. In the main event, Togi Makabe, a decade after his first Wrestling Dontaku appearance, defeated Shinsuke Nakamura to win the IWGP Heavyweight Championship for the first time. Results References External links The official New Japan Pro-Wrestling website 2010 2010 in professional wrestling May 2010 events in Japan
```php <?php namespace Spatie\SchemaOrg\Contracts; interface AchieveActionContract { public function actionStatus($actionStatus); public function additionalType($additionalType); public function agent($agent); public function alternateName($alternateName); public function description($description); public function disambiguatingDescription($disambiguatingDescription); public function endTime($endTime); public function error($error); public function identifier($identifier); public function image($image); public function instrument($instrument); public function location($location); public function mainEntityOfPage($mainEntityOfPage); public function name($name); public function object($object); public function participant($participant); public function potentialAction($potentialAction); public function provider($provider); public function result($result); public function sameAs($sameAs); public function startTime($startTime); public function subjectOf($subjectOf); public function target($target); public function url($url); } ```
```javascript (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ 'use strict'; var replace = String.prototype.replace; var percentTwenties = /%20/g; module.exports = { 'default': 'RFC3986', formatters: { RFC1738: function (value) { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { return value; } }, RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; },{}],2:[function(require,module,exports){ 'use strict'; var stringify = require('./stringify'); var parse = require('./parse'); var formats = require('./formats'); module.exports = { formats: formats, parse: parse, stringify: stringify }; },{"./formats":1,"./parse":3,"./stringify":4}],3:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); var has = Object.prototype.hasOwnProperty; var defaults = { allowDots: false, allowPrototypes: false, arrayLimit: 20, decoder: utils.decode, delimiter: '&', depth: 5, parameterLimit: 1000, plainObjects: false, strictNullHandling: false }; var parseValues = function parseQueryStringValues(str, options) { var obj = {}; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); for (var i = 0; i < parts.length; ++i) { var part = parts[i]; var bracketEqualsPos = part.indexOf(']='); var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; var key, val; if (pos === -1) { key = options.decoder(part, defaults.decoder); val = options.strictNullHandling ? null : ''; } else { key = options.decoder(part.slice(0, pos), defaults.decoder); val = options.decoder(part.slice(pos + 1), defaults.decoder); } if (has.call(obj, key)) { obj[key] = [].concat(obj[key]).concat(val); } else { obj[key] = val; } } return obj; }; var parseObject = function (chain, val, options) { var leaf = val; for (var i = chain.length - 1; i >= 0; --i) { var obj; var root = chain[i]; if (root === '[]') { obj = []; obj = obj.concat(leaf); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; var index = parseInt(cleanRoot, 10); if ( !isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit) ) { obj = []; obj[index] = leaf; } else { obj[cleanRoot] = leaf; } } leaf = obj; } return leaf; }; var parseKeys = function parseQueryStringKeys(givenKey, val, options) { if (!givenKey) { return; } // Transform dot notation to bracket notation var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; // The regex chunks var brackets = /(\[[^[\]]*])/; var child = /(\[[^[\]]*])/g; // Get the parent var segment = brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; // Stash the parent if it exists var keys = []; if (parent) { // If we aren't using plain objects, optionally prefix keys // that would overwrite object prototype properties if (!options.plainObjects && has.call(Object.prototype, parent)) { if (!options.allowPrototypes) { return; } } keys.push(parent); } // Loop through children appending to the array until we hit depth var i = 0; while ((segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; } } keys.push(segment[1]); } // If there's a remainder, just add whatever is left if (segment) { keys.push('[' + key.slice(segment.index) + ']'); } return parseObject(keys, val, options); }; module.exports = function (str, opts) { var options = opts ? utils.assign({}, opts) : {}; if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { throw new TypeError('Decoder has to be a function.'); } options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; options.parseArrays = options.parseArrays !== false; options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; if (str === '' || str === null || typeof str === 'undefined') { return options.plainObjects ? Object.create(null) : {}; } var tempObj = typeof str === 'string' ? parseValues(str, options) : str; var obj = options.plainObjects ? Object.create(null) : {}; // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options); obj = utils.merge(obj, newObj, options); } return utils.compact(obj); }; },{"./utils":5}],4:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); var formats = require('./formats'); var arrayPrefixGenerators = { brackets: function brackets(prefix) { // eslint-disable-line func-name-matching return prefix + '[]'; }, indices: function indices(prefix, key) { // eslint-disable-line func-name-matching return prefix + '[' + key + ']'; }, repeat: function repeat(prefix) { // eslint-disable-line func-name-matching return prefix; } }; var toISO = Date.prototype.toISOString; var defaults = { delimiter: '&', encode: true, encoder: utils.encode, encodeValuesOnly: false, serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; var stringify = function stringify( // eslint-disable-line func-name-matching object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly ) { var obj = object; if (typeof filter === 'function') { obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); } else if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; } obj = ''; } if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; } return [formatter(prefix) + '=' + formatter(String(obj))]; } var values = []; if (typeof obj === 'undefined') { return values; } var objKeys; if (Array.isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } if (Array.isArray(obj)) { values = values.concat(stringify( obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } else { values = values.concat(stringify( obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } } return values; }; module.exports = function (object, opts) { var obj = object; var options = opts ? utils.assign({}, opts) : {}; if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; var sort = typeof options.sort === 'function' ? options.sort : null; var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; if (typeof options.format === 'undefined') { options.format = formats['default']; } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { throw new TypeError('Unknown format option provided.'); } var formatter = formats.formatters[options.format]; var objKeys; var filter; if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); } else if (Array.isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; if (typeof obj !== 'object' || obj === null) { return ''; } var arrayFormat; if (options.arrayFormat in arrayPrefixGenerators) { arrayFormat = options.arrayFormat; } else if ('indices' in options) { arrayFormat = options.indices ? 'indices' : 'repeat'; } else { arrayFormat = 'indices'; } var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; if (!objKeys) { objKeys = Object.keys(obj); } if (sort) { objKeys.sort(sort); } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } keys = keys.concat(stringify( obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode ? encoder : null, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } var joined = keys.join(delimiter); var prefix = options.addQueryPrefix === true ? '?' : ''; return joined.length > 0 ? prefix + joined : ''; }; },{"./formats":1,"./utils":5}],5:[function(require,module,exports){ 'use strict'; var has = Object.prototype.hasOwnProperty; var hexTable = (function () { var array = []; for (var i = 0; i < 256; ++i) { array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } return array; }()); var compactQueue = function compactQueue(queue) { var obj; while (queue.length) { var item = queue.pop(); obj = item.obj[item.prop]; if (Array.isArray(obj)) { var compacted = []; for (var j = 0; j < obj.length; ++j) { if (typeof obj[j] !== 'undefined') { compacted.push(obj[j]); } } item.obj[item.prop] = compacted; } } return obj; }; var arrayToObject = function arrayToObject(source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i]; } } return obj; }; var merge = function merge(target, source, options) { if (!source) { return target; } if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); } else if (typeof target === 'object') { if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { target[source] = true; } } else { return [target, source]; } return target; } if (typeof target !== 'object') { return [target].concat(source); } var mergeTarget = target; if (Array.isArray(target) && !Array.isArray(source)) { mergeTarget = arrayToObject(target, options); } if (Array.isArray(target) && Array.isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { if (target[i] && typeof target[i] === 'object') { target[i] = merge(target[i], item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function (acc, key) { var value = source[key]; if (has.call(acc, key)) { acc[key] = merge(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; var assign = function assignSingleSource(target, source) { return Object.keys(source).reduce(function (acc, key) { acc[key] = source[key]; return acc; }, target); }; var decode = function (str) { try { return decodeURIComponent(str.replace(/\+/g, ' ')); } catch (e) { return str; } }; var encode = function encode(str) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } var string = typeof str === 'string' ? str : String(str); var out = ''; for (var i = 0; i < string.length; ++i) { var c = string.charCodeAt(i); if ( c === 0x2D // - || c === 0x2E // . || c === 0x5F // _ || c === 0x7E // ~ || (c >= 0x30 && c <= 0x39) // 0-9 || (c >= 0x41 && c <= 0x5A) // a-z || (c >= 0x61 && c <= 0x7A) // A-Z ) { out += string.charAt(i); continue; } if (c < 0x80) { out = out + hexTable[c]; continue; } if (c < 0x800) { out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; } return out; }; var compact = function compact(value) { var queue = [{ obj: { o: value }, prop: 'o' }]; var refs = []; for (var i = 0; i < queue.length; ++i) { var item = queue[i]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); for (var j = 0; j < keys.length; ++j) { var key = keys[j]; var val = obj[key]; if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { queue.push({ obj: obj, prop: key }); refs.push(val); } } } return compactQueue(queue); }; var isRegExp = function isRegExp(obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; var isBuffer = function isBuffer(obj) { if (obj === null || typeof obj === 'undefined') { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; module.exports = { arrayToObject: arrayToObject, assign: assign, compact: compact, decode: decode, encode: encode, isBuffer: isBuffer, isRegExp: isRegExp, merge: merge }; },{}]},{},[2])(2) }); ```
Milk Mantra is a dairy foods company based in Odisha, India founded in August 2009 by former director at Tetley Srikumar Misra and cofounded by Rashima Misra and Lt Col Ashit Mahapatra, to solve the trust deficit between consumers and food in India arising out of opaque supply chains and adulterated food. First operational in 2012, it is India's first venture capital-backed agri-foods startup. It was set up to solve the milk scarcity problem in the state. Milk Mantra has been built as a purpose driven socially responsible business that seeks to rebalance capitalism by leveraging brand capital to create impact at scale. Milk Mantra and Srikumar Misra have been featured on the front page of the Wall Street Journal, in case studies by Stanford Business School and Indian Institute of Ahmedabad and also extensively covered by leading academia and media. History Milk Mantra was founded in August 2009 by Srikumar Misra, a former executive with Tata Group, Rashima Misra and Lt Col Ashit Mahapatra. Its first series of investments were received from VC firms Eight Roads Adventures and Aavishkaar Venture Management Services and angel investors. The company took 18 months to complete its series funding and started its operations in early 2011 with the commissioning of a factory in Gop in Odisha. In April 2011, the company started the Ethical Milk Sourcing programme, “Happy Farmers = Happy Cows = Best Milk!” in two villages in Puri District. In June 2011, the company developed its 3-layer packaging technique called 'Tripak' which prevents the milk contents from light damage. In 2012, it launched its products in Bhubaneswar and Kolkata with services like direct-to-home milk delivery. In 2013, it launched a range of Easter India's first probiotic curd. In December 2014, it acquired Westernland Dairy, which extended Milk Mantra's reach to Jharkhand and Chhattisgarh. Milk Mantra comes with a distinct brand proposition, “No More Boiling” with an USP that lies in its packaging which promises improved shelf life of its dairy products. In 2013, Stanford Business School did a 3 part case study on Milk Mantra and Aavishkaar on raising VC funding in India. On June 21, 2016, RBI Governor Raghuram Rajan visited the plant of Milk Mantra and met its management, employees and some women farmers to understand the business model of the startup which sources its chief product (milk) from over 70,000 farmers in the state, called the Ethical Milk Sourcing (EMS) programme. In 2016, Milk Mantra rolled out a functional ready-to-drink healthy milk beverage MooShake and was piloted in Bengaluru and Hyderabad. In 2018, on a state visit to Bhubaneswar for the 'Commonwealth Lunch’, the British High Commissioner to the Republic of India, Sir Dominic Asquith along with his wife and the Deputy High Commissioner Mr. Bruce Bucknell visited the Milk Mantra office. In June 2020, the startup became EBITDA positive with a turnover of in the financial year 2020–21. In 2021 the company launched its own D2C dairy & subscription app DailyMoo to directly connect with its consumers. Funding Between 2010 and 2017, Milk Mantra raised a total capital of USD 19 million (₹140 crores) in funding from a group of 20 angel investors which included Aavishkaar Venture Trustees and Eight Roads Ventures (then Fidelity Growth Partners India), and Neev Fund. In 2020, Milk Mantra raised USD 10 million debt funding from US DFC for scaling up & executing geographic expansion plans, building an awesome challenger brand and a digital financial services platform for the company’s ethical sourcing network. It also received technical assistance grant of USD 350,000. List of investors Aavishkaar Venture Trustees Neev Fund Eight Roads Ventures US DFC Products Milk Mantra, under the brand name Milky Moo manufactures and sells various milk products like buttermilk, curd, probiotic yogurt, cheese, cottage cheese, milkshakes, dairy based desserts and other beverages under the brand Milky Moo. Under the brand Moo Shake, the company also manufactures and sells flavored milkshakes. In early 2015, Milk Mantra entered the health food industry by launching MooShake. Under the brand, it produces a health beverage which is blended with curcumin, an extract from turmeric, believed to have multiple health benefits. It was first launched in Bengaluru. MooShake products have a shelf life of 180 days. Srikumar Misra has also received a US Patent for MooShake with the patent numbers US-10750758-B2 and US-10052293-B2. Production Milk Mantra has its main processing plant at Gop in Puri city of Odisha. It has a processing capacity of 2,40,000 liters of milk per day. The startup also has a plant in the neighbouring Sambalpur which can process 90000 liters per day. Honors Fast Company 10 most innovative Asia-Pacific companies of 2021 Milk Mantra has been recognized as most innovative companies of 2020 in India and 10 most innovative Asia-Pacific companies of 2021 by Fast company. Fast Company Most innovative companies of 2020 in India In 2019, Milk Mantra was awarded as laureate of the prestigious McNulty Prize. The award was decided by a high profile jury and given by former secretary of state Madeleine Albright at Aspen, Colorado, USA. 2016 Frost & Sullivan Awards for Product of the Year Award for MooShake 2014 – Emerging Business Leader Award (Srikumar Misra) References External links Dairy products companies of India Indian brands Companies based in Odisha 2009 establishments in Orissa Indian companies established in 2009 Food and drink companies established in 2009
```yaml id: Cortex ASM - Prisma Cloud Enrichment version: -1 contentitemexportablefields: contentitemfields: {} name: Cortex ASM - Prisma Cloud Enrichment description: Given the IP address this playbook enriches information from Prisma Cloud. starttaskid: "0" tasks: "0": id: "0" taskid: 1b0c5f5c-3921-4914-8b08-6359e3e81e03 type: start task: id: 1b0c5f5c-3921-4914-8b08-6359e3e81e03 version: -1 name: "" iscommand: false brand: "" description: '' nexttasks: '#none#': - "1" separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 450, "y": 160 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "1": id: "1" taskid: 91810d09-5547-4519-8860-5d5821854b80 type: playbook task: id: 91810d09-5547-4519-8860-5d5821854b80 version: -1 name: Prisma Cloud - Find Public Cloud Resource by Public IP v2 type: playbook iscommand: false brand: "" playbookId: Prisma Cloud - Find Public Cloud Resource by Public IP v2 description: '' nexttasks: '#none#': - "19" scriptarguments: CloudProvider: complex: root: inputs.cloudProvider PublicIPAddress: complex: root: inputs.remoteIP separatecontext: true continueonerrortype: "" loop: iscommand: false exitCondition: "" wait: 1 max: 100 view: |- { "position": { "x": 450, "y": 300 } } note: false timertriggers: [] ignoreworker: false skipunavailable: true quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "2": id: "2" taskid: edff10b3-44be-460b-8b89-20a618efba1d type: title task: id: edff10b3-44be-460b-8b89-20a618efba1d version: -1 name: Set field type: title iscommand: false brand: "" description: '' nexttasks: '#none#': - "3" - "7" - "23" separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 340, "y": 1400 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "3": id: "3" taskid: 42839e98-8b83-4aa6-8a34-2c1d6b02974b type: condition task: id: 42839e98-8b83-4aa6-8a34-2c1d6b02974b version: -1 name: Is there instance information? description: Determines if there is instance information obtained from Prisma Cloud. type: condition iscommand: false brand: "" nexttasks: '#default#': - "13" "yes": - "4" separatecontext: false conditions: - label: "yes" condition: - - operator: isNotEmpty left: value: complex: root: PrismaCloud accessor: Attribution iscontext: true continueonerrortype: "" view: |- { "position": { "x": -70, "y": 1620 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "4": id: "4" taskid: ba4c079a-4b83-4bb4-8186-f1302aeebc87 type: title task: id: ba4c079a-4b83-4bb4-8186-f1302aeebc87 version: -1 name: System IDs type: title iscommand: false brand: "" description: '' nexttasks: '#none#': - "5" separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 160, "y": 1820 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "5": id: "5" taskid: 6964364a-c14d-44c6-874e-4ce53e597914 type: regular task: id: 6964364a-c14d-44c6-874e-4ce53e597914 version: -1 name: Set system IDs grid field (instance ID) description: |- Automation used to more easily populate a grid field. This is necessary when you want to assign certain values as static or if you have context paths that you will assign to different values as well. Example of command: `!GridFieldSetup keys=ip,src val1=${AWS.EC2.Instances.NetworkInterfaces.PrivateIpAddress} val2="AWS" gridfiled="gridfield"` type: regular iscommand: false brand: "" script: GridFieldSetup nexttasks: '#none#': - "10" scriptarguments: gridfield: simple: asmsystemids keys: simple: type,id,link val1: simple: PRISMACLOUD-INSTANCE-ID val2: complex: root: PrismaCloud.Attribution accessor: rrn val3: simple: n/a separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 160, "y": 1960 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "7": id: "7" taskid: 42188e35-cbd1-41e3-88c1-4b263f7d8e68 type: condition task: id: 42188e35-cbd1-41e3-88c1-4b263f7d8e68 version: -1 name: Are there tags information? description: Determines if there is tag information obtained from Prisma Cloud. type: condition iscommand: false brand: "" nexttasks: '#default#': - "13" "yes": - "8" separatecontext: false conditions: - label: "yes" condition: - - operator: isNotEmpty left: value: complex: root: PrismaCloud.Config.data accessor: tags iscontext: true continueonerrortype: "" view: |- { "position": { "x": 820, "y": 1620 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "8": id: "8" taskid: 07698068-143d-49b8-8111-1ade9bf0df2a type: title task: id: 07698068-143d-49b8-8111-1ade9bf0df2a version: -1 name: Tags type: title iscommand: false brand: "" description: '' nexttasks: '#none#': - "15" separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 1200, "y": 1840 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "9": id: "9" taskid: e7510731-1927-41f8-8a6f-54cc43f56fc8 type: regular task: id: e7510731-1927-41f8-8a6f-54cc43f56fc8 version: -1 name: Set tags grid field description: |- Automation used to more easily populate a grid field. This is necessary when you want to assign certain values as static or if you have context paths that you will assign to different values as well. Example of command: `!GridFieldSetup keys=ip,src val1=${AWS.EC2.Instances.NetworkInterfaces.PrivateIpAddress} val2="AWS" gridfiled="gridfield"` type: regular iscommand: false brand: "" script: GridFieldSetup nexttasks: '#none#': - "10" scriptarguments: gridfield: simple: asmtags keys: simple: key,value,source val1: complex: root: PrismaCloud.Config.data accessor: tags transformers: - operator: jmespath args: expression: value: simple: keys(@) val2: complex: root: PrismaCloud.Config.data accessor: tags transformers: - operator: jmespath args: expression: value: simple: values(@) val3: simple: PrismaCloud separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 910, "y": 2290 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "10": id: "10" taskid: 5fe243c8-be52-44aa-86b1-f69a39446c33 type: regular task: id: 5fe243c8-be52-44aa-86b1-f69a39446c33 version: -1 name: Set true flag for completed enrichment description: Set a value in context under the key you entered. type: regular iscommand: false brand: "" script: Set nexttasks: '#none#': - "13" scriptarguments: append: simple: "true" key: simple: asm_fields_set_for_prisma value: simple: "true" separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 440, "y": 2430 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "11": id: "11" taskid: 75a3efdb-3fe1-4af3-806d-b1982c1200d1 type: title task: id: 75a3efdb-3fe1-4af3-806d-b1982c1200d1 version: -1 name: Complete type: title iscommand: false brand: "" description: '' separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 440, "y": 3100 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "12": id: "12" taskid: d013c103-5faa-483d-8340-a8bf8c23cefb type: regular task: id: d013c103-5faa-483d-8340-a8bf8c23cefb version: -1 name: Set ASM enrichment status to true description: |- Automation used to more easily populate a grid field. This is necessary when you want to assign certain values as static or if you have context paths that you will assign to different values as well. Instead of a value you can enter `TIMESTAMP` to get the current timestamp in ISO format. For example: `!GridFieldSetup keys=ip,src,timestamp val1=${AWS.EC2.Instances.NetworkInterfaces.PrivateIpAddress} val2="AWS" val3="TIMESTAMP" gridfiled="gridfield"` type: regular iscommand: false brand: Builtin script: GridFieldSetup nexttasks: '#none#': - "11" scriptarguments: gridfield: simple: asmenrichmentstatus keys: simple: source,record_exists,timestamp val1: simple: Prisma Cloud val2: simple: "true" val3: simple: TIMESTAMP separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 230, "y": 2900 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "13": id: "13" taskid: 98c133ff-04dd-4061-89ad-74274d88fb99 type: condition task: id: 98c133ff-04dd-4061-89ad-74274d88fb99 version: -1 name: Was enrichment performed? description: Check if enrichment was performed by checking for a value of true in the relevant flag variable. type: condition iscommand: false brand: "" nexttasks: '#default#': - "14" "yes": - "12" separatecontext: false conditions: - label: "yes" condition: - - operator: isTrue left: value: simple: asm_fields_set_for_prisma iscontext: true right: value: {} continueonerrortype: "" view: |- { "position": { "x": 440, "y": 2680 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "14": id: "14" taskid: 88110f67-c0ca-4033-86c1-cef0634eb4d6 type: regular task: id: 88110f67-c0ca-4033-86c1-cef0634eb4d6 version: -1 name: Set ASM enrichment status to false description: |- Automation used to more easily populate a grid field. This is necessary when you want to assign certain values as static or if you have context paths that you will assign to different values as well. Instead of a value you can enter `TIMESTAMP` to get the current timestamp in ISO format. For example: `!GridFieldSetup keys=ip,src,timestamp val1=${AWS.EC2.Instances.NetworkInterfaces.PrivateIpAddress} val2="AWS" val3="TIMESTAMP" gridfiled="gridfield"` type: regular iscommand: false brand: Builtin script: GridFieldSetup nexttasks: '#none#': - "11" scriptarguments: gridfield: simple: asmenrichmentstatus keys: simple: source,record_exists,timestamp val1: simple: Prisma Cloud val2: simple: "false" val3: simple: TIMESTAMP separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 650, "y": 2900 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "15": id: "15" taskid: d5126e14-294a-4c02-8f41-6182bb041cc5 type: condition task: id: d5126e14-294a-4c02-8f41-6182bb041cc5 version: -1 name: What Cloud Provider? description: Branch based on Cloud Provider type: condition iscommand: false brand: "" nexttasks: '#default#': - "13" AWS: - "16" Azure: - "9" GCP: - "18" separatecontext: false conditions: - label: AWS condition: - - operator: inList left: value: complex: root: inputs.cloudProvider iscontext: true right: value: simple: AWS,Amazon Web Services,Amazon - label: Azure condition: - - operator: inList left: value: complex: root: inputs.cloudProvider iscontext: true right: value: simple: Azure,Microsoft Azure - label: GCP condition: - - operator: inList left: value: complex: root: inputs.cloudProvider iscontext: true right: value: simple: GCP,Google Cloud Platform,Google continueonerrortype: "" view: |- { "position": { "x": 1200, "y": 1970 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "16": id: "16" taskid: 25944d35-d446-47fe-84be-b282a9121908 type: regular task: id: 25944d35-d446-47fe-84be-b282a9121908 version: -1 name: Set tags grid field description: |- Automation used to more easily populate a grid field. This is necessary when you want to assign certain values as static or if you have context paths that you will assign to different values as well. Example of command: `!GridFieldSetup keys=ip,src val1=${AWS.EC2.Instances.NetworkInterfaces.PrivateIpAddress} val2="AWS" gridfiled="gridfield"` type: regular iscommand: false brand: "" script: GridFieldSetup nexttasks: '#none#': - "10" scriptarguments: gridfield: simple: asmtags keys: simple: key,value,source val1: complex: root: PrismaCloud.Config.data.tags accessor: key val2: complex: root: PrismaCloud.Config.data.tags accessor: value val3: simple: PrismaCloud separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 1320, "y": 2290 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "17": id: "17" taskid: f13478ac-13de-4b2f-87ca-e70b5a99438e type: regular task: id: f13478ac-13de-4b2f-87ca-e70b5a99438e version: -1 name: Set tags grid field description: |- Automation used to more easily populate a grid field. This is necessary when you want to assign certain values as static or if you have context paths that you will assign to different values as well. Example of command: `!GridFieldSetup keys=ip,src val1=${AWS.EC2.Instances.NetworkInterfaces.PrivateIpAddress} val2="AWS" gridfiled="gridfield"` type: regular iscommand: false brand: "" script: GridFieldSetup nexttasks: '#none#': - "10" scriptarguments: gridfield: simple: asmtags keys: simple: key,value,source val1: complex: root: PrismaCloud.Config.data.tags accessor: items val2: simple: ' ' val3: simple: PrismaCloud separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 1750, "y": 2300 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "18": id: "18" taskid: 25fb1d61-58d0-4aef-85db-8cd927573a66 type: condition task: id: 25fb1d61-58d0-4aef-85db-8cd927573a66 version: -1 name: Are there any Network tags? description: Checks if there are network tags items. type: condition iscommand: false brand: "" nexttasks: '#default#': - "13" "yes": - "17" separatecontext: false conditions: - label: "yes" condition: - - operator: isExists left: value: complex: root: PrismaCloud.Config.data.tags accessor: items iscontext: true right: value: {} continueonerrortype: "" view: |- { "position": { "x": 1750, "y": 2150 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "19": continueonerrortype: "" id: "19" ignoreworker: false isautoswitchedtoquietmode: false isoversize: false nexttasks: '#none#': - "35" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" id: df44266c-def7-40d4-88df-b6c4b716314b iscommand: false name: Event search in Prisma Cloud type: title version: -1 description: '' taskid: df44266c-def7-40d4-88df-b6c4b716314b timertriggers: [] type: title view: |- { "position": { "x": 450, "y": 500 } } "21": continueonerrortype: "" id: "21" ignoreworker: false isautoswitchedtoquietmode: false isoversize: false nexttasks: '#none#': - "2" note: false quietmode: 0 scriptarguments: execution-timeout: simple: "1000" limit: simple: "1000" query: complex: accessor: id root: PrismaCloud.Attribution transformers: - args: prefix: value: simple: event from cloud.audit_logs where operation in ( 'RunInstances') and json.rule = $.responseElements.instancesSet.items[0].instanceId contains ' suffix: value: simple: '''' operator: concat - operator: uniq time_range_unit: simple: day time_range_value: simple: "30" separatecontext: false skipunavailable: false task: brand: PrismaCloud v2 description: Search events inventory on the Prisma Cloud platform using RQL language. Use this command for all queries that start with "event". When no absolute time nor relative time arguments are provided, the default time range is all times. id: df11dabe-f564-4489-8851-386518d6222a iscommand: true name: AWS Prisma Cloud Event Search script: PrismaCloud v2|||prisma-cloud-event-search type: regular version: -1 taskid: df11dabe-f564-4489-8851-386518d6222a timertriggers: [] type: regular view: |- { "position": { "x": 440, "y": 1120 } } "23": conditions: - condition: - - left: iscontext: true value: simple: PrismaCloud.Event.subject operator: isNotEmpty right: value: {} label: "yes" continueonerrortype: "" id: "23" ignoreworker: false isautoswitchedtoquietmode: false isoversize: false nexttasks: '#default#': - "13" "yes": - "25" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: Checks if there are any ownership information. id: 732b724a-9bc8-45ba-8b73-81376381f8e8 iscommand: false name: Are there an ownership related information from event search? type: condition version: -1 taskid: 732b724a-9bc8-45ba-8b73-81376381f8e8 timertriggers: [] type: condition view: |- { "position": { "x": -700, "y": 1620 } } "25": continueonerrortype: "" id: "25" ignoreworker: false isautoswitchedtoquietmode: false isoversize: false nexttasks: '#none#': - "10" note: false quietmode: 0 scriptarguments: gridfield: simple: asmserviceownerunrankedraw keys: simple: name,email,source,timestamp val1: complex: accessor: subject root: PrismaCloud.Event transformers: - operator: uniq val2: simple: n/a val3: simple: PrismaCloud-Event val4: simple: TIMESTAMP separatecontext: false skipunavailable: false task: brand: "" description: Set asmserviceownerunrankedraw with ServiceNow user ID information. id: e1f6a0d2-75cb-4dea-80bf-93b9afb833d8 iscommand: false name: Set asmserviceownerunrankedraw (from event search) script: GridFieldSetup type: regular version: -1 taskid: e1f6a0d2-75cb-4dea-80bf-93b9afb833d8 timertriggers: [] type: regular view: |- { "position": { "x": -700, "y": 1960 } } "30": continueonerrortype: "" id: "30" ignoreworker: false isautoswitchedtoquietmode: false isoversize: false nexttasks: '#none#': - "2" note: false quietmode: 0 scriptarguments: execution-timeout: simple: "1000" limit: simple: "1000" query: complex: accessor: id root: PrismaCloud.Attribution transformers: - args: prefix: value: simple: event from cloud.audit_logs where cloud.type = 'gcp' AND operation IN ( 'beta.compute.instances.insert' ) and json.rule = $.resource.labels.instance_id contains ' suffix: value: simple: '''' operator: concat - operator: uniq time_range_unit: simple: day time_range_value: simple: "30" separatecontext: false skipunavailable: false task: brand: PrismaCloud v2 description: Search events inventory on the Prisma Cloud platform using RQL language. Use this command for all queries that start with "event". When no absolute time nor relative time arguments are provided, the default time range is all times. id: a9a9e693-d2e6-4420-8975-1897c3a7f323 iscommand: true name: GCP Prisma Cloud Event Search script: PrismaCloud v2|||prisma-cloud-event-search type: regular version: -1 taskid: a9a9e693-d2e6-4420-8975-1897c3a7f323 timertriggers: [] type: regular view: |- { "position": { "x": 880, "y": 1120 } } "31": continueonerrortype: "" id: "31" ignoreworker: false isautoswitchedtoquietmode: false isoversize: false nexttasks: '#none#': - "2" note: false quietmode: 0 scriptarguments: execution-timeout: simple: "1000" limit: simple: "1000" query: complex: accessor: resourceName filters: - - left: iscontext: true value: simple: PrismaCloud.Attribution.resourceType operator: isEqualString right: value: simple: Instance root: PrismaCloud.Attribution transformers: - args: prefix: value: simple: event from cloud.audit_logs where cloud.type = 'azure' AND operation = 'Create or Update Virtual Machine (EndRequest)' and json.rule = $.resourceId contains ' suffix: value: simple: '''' operator: concat - operator: uniq time_range_unit: simple: day time_range_value: simple: "30" separatecontext: false skipunavailable: false task: brand: PrismaCloud v2 description: Search events inventory on the Prisma Cloud platform using RQL language. Use this command for all queries that start with "event". When no absolute time nor relative time arguments are provided, the default time range is all times. id: 4d0cb4cb-ad3d-4dac-8a77-9b7c7c068c59 iscommand: true name: Azure Prisma Cloud Event Search script: PrismaCloud v2|||prisma-cloud-event-search type: regular version: -1 taskid: 4d0cb4cb-ad3d-4dac-8a77-9b7c7c068c59 timertriggers: [] type: regular view: |- { "position": { "x": 1320, "y": 1120 } } "34": conditions: - condition: - - left: iscontext: true value: simple: inputs.cloudProvider operator: inList right: value: simple: AWS,Amazon Web Services,Amazon - - left: iscontext: true value: simple: PrismaCloud.Attribution.id operator: isNotEmpty label: AWS - condition: - - left: iscontext: true value: simple: inputs.cloudProvider operator: inList right: value: simple: Azure,Microsoft Azure - - left: iscontext: true value: complex: accessor: resourceName filters: - - left: iscontext: true value: simple: PrismaCloud.Attribution.resourceType operator: isEqualString right: value: simple: Instance root: PrismaCloud.Attribution operator: isNotEmpty label: Azure - condition: - - left: iscontext: true value: simple: inputs.cloudProvider operator: inList right: value: simple: GCP,Google Cloud Platform,Google - - left: iscontext: true value: simple: PrismaCloud.Attribution.id operator: isNotEmpty label: GCP continueonerrortype: "" id: "34" ignoreworker: false isautoswitchedtoquietmode: false isoversize: false nexttasks: '#default#': - "2" AWS: - "21" Azure: - "31" GCP: - "30" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: Are there valid inputs and what is the Cloud service provider. id: b1b34806-df04-4c23-80e5-dc67a50bdcd0 iscommand: false name: Are there valid inputs and what is the Cloud service provider? type: condition version: -1 taskid: b1b34806-df04-4c23-80e5-dc67a50bdcd0 timertriggers: [] type: condition view: |- { "position": { "x": 450, "y": 845 } } "35": conditions: - condition: - - left: iscontext: true value: complex: filters: - - left: iscontext: true value: simple: modules.brand operator: isEqualString right: value: simple: PrismaCloud v2 - - left: iscontext: true value: simple: modules.state operator: isEqualString right: value: simple: active root: modules operator: isExists right: value: {} label: "yes" continueonerrortype: "" id: "35" ignoreworker: false isautoswitchedtoquietmode: false isoversize: false nexttasks: '#default#': - "2" "yes": - "34" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: Check if Prisma Cloud V2 is enabled. id: 86e8a5b5-55d2-44d5-8983-904e9cf8a152 iscommand: false name: Is Prisma Cloud V2 enabled? type: condition version: -1 taskid: 86e8a5b5-55d2-44d5-8983-904e9cf8a152 timertriggers: [] type: condition view: |- { "position": { "x": 450, "y": 650 } } view: |- { "linkLabelsPosition": { "15_13_#default#": 0.47, "3_13_#default#": 0.2, "7_13_#default#": 0.22 }, "paper": { "dimensions": { "height": 3005, "width": 2830, "x": -700, "y": 160 } } } inputs: - key: remoteIP value: simple: ${alert.remoteip} required: true description: IP address of service. playbookInputQuery: - key: cloudProvider value: {} required: false description: Cloud service provider. playbookInputQuery: outputs: [] tests: - No tests (auto formatted) fromversion: 6.8.0 ```
Al Gharbiyah ( 'western'), or Gharb ( 'west'), or variants may refer to: Al Gharbia, Abu Dhabi Western Region, Bahrain Għarb, Gozo, Malta Gharbia Governorate, Egypt Gharb Al-Andalus or Al-Gharb, former name of a region of modern-day Portugal and Spain 711–1249 Gharb-Chrarda-Béni Hssen, or Gharb, a former region of Morocco Gharb Basin Gharbia, Algeria See also Gharbi (disambiguation) Maghrib (disambiguation) Al-Janubiyah (disambiguation) (southern) Ash Shamaliyah (disambiguation) (northern) Ash Sharqiyah (disambiguation) (eastern) Al Wusta (disambiguation) (central) Western (disambiguation) Abu Ghraib, Iraq Algarve, Portugal Cape Trafalgar, Spain
Arkansas Highway 313 is a north–south state highway in Lafayette County. The route runs from Arkansas Highway 53 north to Arkansas Highway 29 in Lewisville. The route does not intersect any other state highways. Route description Arkansas Highway 313 begins at Arkansas Highway 53 at Mars Hill, an unincorporated community. The route runs north into Lewisville, the county seat of Lafayette County. The road is a two–lane road for its entire length. History The route was designated a state highway by the Arkansas State Highway Commission on June 23, 1965. The highway follows the original routing. Major intersections See also List of state highways in Arkansas References External links 313 Transportation in Lafayette County, Arkansas
```objective-c /* * copyright (c) 2001 Fabrice Bellard * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * You should have received a copy of the GNU Lesser General Public * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef AVFORMAT_INTERNAL_H #define AVFORMAT_INTERNAL_H #include <stdint.h> #include "avformat.h" #include "os_support.h" #define MAX_URL_SIZE 4096 /** size of probe buffer, for guessing file type from file contents */ #define PROBE_BUF_MIN 2048 #define PROBE_BUF_MAX (1 << 20) #define MAX_PROBE_PACKETS 2500 #ifdef DEBUG # define hex_dump_debug(class, buf, size) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size) #else # define hex_dump_debug(class, buf, size) do { if (0) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size); } while(0) #endif typedef struct AVCodecTag { enum AVCodecID id; unsigned int tag; } AVCodecTag; typedef struct CodecMime{ char str[32]; enum AVCodecID id; } CodecMime; /*************************************************/ /* fractional numbers for exact pts handling */ /** * The exact value of the fractional number is: 'val + num / den'. * num is assumed to be 0 <= num < den. */ typedef struct FFFrac { int64_t val, num, den; } FFFrac; struct AVFormatInternal { /** * Number of streams relevant for interleaving. * Muxing only. */ int nb_interleaved_streams; /** * This buffer is only needed when packets were already buffered but * not decoded, for example to get the codec parameters in MPEG * streams. */ struct AVPacketList *packet_buffer; struct AVPacketList *packet_buffer_end; /* av_seek_frame() support */ int64_t data_offset; /**< offset of the first packet */ /** * Raw packets from the demuxer, prior to parsing and decoding. * This buffer is used for buffering packets until the codec can * be identified, as parsing cannot be done without knowing the * codec. */ struct AVPacketList *raw_packet_buffer; struct AVPacketList *raw_packet_buffer_end; /** * Packets split by the parser get queued here. */ struct AVPacketList *parse_queue; struct AVPacketList *parse_queue_end; /** * Remaining size available for raw_packet_buffer, in bytes. */ #define RAW_PACKET_BUFFER_SIZE 2500000 int raw_packet_buffer_remaining_size; /** * Offset to remap timestamps to be non-negative. * Expressed in timebase units. * @see AVStream.mux_ts_offset */ int64_t offset; /** * Timebase for the timestamp offset. */ AVRational offset_timebase; #if FF_API_COMPUTE_PKT_FIELDS2 int missing_ts_warning; #endif int inject_global_side_data; int avoid_negative_ts_use_pts; /** * Whether or not a header has already been written */ int header_written; }; struct AVStreamInternal { /** * Set to 1 if the codec allows reordering, so pts can be different * from dts. */ int reorder; /** * bitstream filter to run on stream * - encoding: Set by muxer using ff_stream_add_bitstream_filter * - decoding: unused */ AVBitStreamFilterContext *bsfc; /** * Whether or not check_bitstream should still be run on each packet */ int bitstream_checked; }; #ifdef __GNUC__ #define dynarray_add(tab, nb_ptr, elem)\ do {\ __typeof__(tab) _tab = (tab);\ __typeof__(elem) _elem = (elem);\ (void)sizeof(**_tab == _elem); /* check that types are compatible */\ av_dynarray_add(_tab, nb_ptr, _elem);\ } while(0) #else #define dynarray_add(tab, nb_ptr, elem)\ do {\ av_dynarray_add((tab), nb_ptr, (elem));\ } while(0) #endif struct tm *ff_brktimegm(time_t secs, struct tm *tm); char *ff_data_to_hex(char *buf, const uint8_t *src, int size, int lowercase); /** * Parse a string of hexadecimal strings. Any space between the hexadecimal * digits is ignored. * * @param data if non-null, the parsed data is written to this pointer * @param p the string to parse * @return the number of bytes written (or to be written, if data is null) */ int ff_hex_to_data(uint8_t *data, const char *p); /** * Add packet to AVFormatContext->packet_buffer list, determining its * interleaved position using compare() function argument. * @return 0, or < 0 on error */ int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt, int (*compare)(AVFormatContext *, AVPacket *, AVPacket *)); void ff_read_frame_flush(AVFormatContext *s); #define NTP_OFFSET 2208988800ULL #define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL) /** Get the current time since NTP epoch in microseconds. */ uint64_t ff_ntp_time(void); /** * Append the media-specific SDP fragment for the media stream c * to the buffer buff. * * Note, the buffer needs to be initialized, since it is appended to * existing content. * * @param buff the buffer to append the SDP fragment to * @param size the size of the buff buffer * @param st the AVStream of the media to describe * @param idx the global stream index * @param dest_addr the destination address of the media stream, may be NULL * @param dest_type the destination address type, may be NULL * @param port the destination port of the media stream, 0 if unknown * @param ttl the time to live of the stream, 0 if not multicast * @param fmt the AVFormatContext, which might contain options modifying * the generated SDP */ void ff_sdp_write_media(char *buff, int size, AVStream *st, int idx, const char *dest_addr, const char *dest_type, int port, int ttl, AVFormatContext *fmt); /** * Write a packet to another muxer than the one the user originally * intended. Useful when chaining muxers, where one muxer internally * writes a received packet to another muxer. * * @param dst the muxer to write the packet to * @param dst_stream the stream index within dst to write the packet to * @param pkt the packet to be written * @param src the muxer the packet originally was intended for * @param interleave 0->use av_write_frame, 1->av_interleaved_write_frame * @return the value av_write_frame returned */ int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt, AVFormatContext *src, int interleave); /** * Get the length in bytes which is needed to store val as v. */ int ff_get_v_length(uint64_t val); /** * Put val using a variable number of bytes. */ void ff_put_v(AVIOContext *bc, uint64_t val); /** * Read a whole line of text from AVIOContext. Stop reading after reaching * either a \\n, a \\0 or EOF. The returned string is always \\0-terminated, * and may be truncated if the buffer is too small. * * @param s the read-only AVIOContext * @param buf buffer to store the read line * @param maxlen size of the buffer * @return the length of the string written in the buffer, not including the * final \\0 */ int ff_get_line(AVIOContext *s, char *buf, int maxlen); #define SPACE_CHARS " \t\r\n" /** * Callback function type for ff_parse_key_value. * * @param key a pointer to the key * @param key_len the number of bytes that belong to the key, including the '=' * char * @param dest return the destination pointer for the value in *dest, may * be null to ignore the value * @param dest_len the length of the *dest buffer */ typedef void (*ff_parse_key_val_cb)(void *context, const char *key, int key_len, char **dest, int *dest_len); /** * Parse a string with comma-separated key=value pairs. The value strings * may be quoted and may contain escaped characters within quoted strings. * * @param str the string to parse * @param callback_get_buf function that returns where to store the * unescaped value string. * @param context the opaque context pointer to pass to callback_get_buf */ void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf, void *context); /** * Find stream index based on format-specific stream ID * @return stream index, or < 0 on error */ int ff_find_stream_index(AVFormatContext *s, int id); /** * Internal version of av_index_search_timestamp */ int ff_index_search_timestamp(const AVIndexEntry *entries, int nb_entries, int64_t wanted_timestamp, int flags); /** * Internal version of av_add_index_entry */ int ff_add_index_entry(AVIndexEntry **index_entries, int *nb_index_entries, unsigned int *index_entries_allocated_size, int64_t pos, int64_t timestamp, int size, int distance, int flags); void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance); /** * Add a new chapter. * * @param s media file handle * @param id unique ID for this chapter * @param start chapter start time in time_base units * @param end chapter end time in time_base units * @param title chapter title * * @return AVChapter or NULL on error */ AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base, int64_t start, int64_t end, const char *title); /** * Ensure the index uses less memory than the maximum specified in * AVFormatContext.max_index_size by discarding entries if it grows * too large. */ void ff_reduce_index(AVFormatContext *s, int stream_index); enum AVCodecID ff_guess_image2_codec(const char *filename); /** * Convert a date string in ISO8601 format to Unix timestamp. */ int64_t ff_iso8601_to_unix_time(const char *datestr); /** * Perform a binary search using av_index_search_timestamp() and * AVInputFormat.read_timestamp(). * * @param target_ts target timestamp in the time base of the given stream * @param stream_index stream number */ int ff_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags); /** * Update cur_dts of all streams based on the given timestamp and AVStream. * * Stream ref_st unchanged, others set cur_dts in their native time base. * Only needed for timestamp wrapping or if (dts not set and pts!=dts). * @param timestamp new dts expressed in time_base of param ref_st * @param ref_st reference stream giving time_base of param timestamp */ void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp); int ff_find_last_ts(AVFormatContext *s, int stream_index, int64_t *ts, int64_t *pos, int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )); /** * Perform a binary search using read_timestamp(). * * @param target_ts target timestamp in the time base of the given stream * @param stream_index stream number */ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, int64_t pos_min, int64_t pos_max, int64_t pos_limit, int64_t ts_min, int64_t ts_max, int flags, int64_t *ts_ret, int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )); /** * Set the time base and wrapping info for a given stream. This will be used * to interpret the stream's timestamps. If the new time base is invalid * (numerator or denominator are non-positive), it leaves the stream * unchanged. * * @param s stream * @param pts_wrap_bits number of bits effectively used by the pts * (used for wrap control) * @param pts_num time base numerator * @param pts_den time base denominator */ void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, unsigned int pts_num, unsigned int pts_den); /** * Add side data to a packet for changing parameters to the given values. * Parameters set to 0 aren't included in the change. */ int ff_add_param_change(AVPacket *pkt, int32_t channels, uint64_t channel_layout, int32_t sample_rate, int32_t width, int32_t height); /** * Set the timebase for each stream from the corresponding codec timebase and * print it. */ int ff_framehash_write_header(AVFormatContext *s); /** * Read a transport packet from a media file. * * @param s media file handle * @param pkt is filled * @return 0 if OK, AVERROR_xxx on error */ int ff_read_packet(AVFormatContext *s, AVPacket *pkt); /** * Interleave a packet per dts in an output media file. * * Packets with pkt->destruct == av_destruct_packet will be freed inside this * function, so they cannot be used after it. Note that calling av_packet_unref() * on them is still safe. * * @param s media file handle * @param out the interleaved packet will be output here * @param pkt the input packet * @param flush 1 if no further packets are available as input and all * remaining packets should be output * @return 1 if a packet was output, 0 if no packet could be output, * < 0 if an error occurred */ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush); void ff_free_stream(AVFormatContext *s, AVStream *st); /** * Return the frame duration in seconds. Return 0 if not available. */ void ff_compute_frame_duration(AVFormatContext *s, int *pnum, int *pden, AVStream *st, AVCodecParserContext *pc, AVPacket *pkt); unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id); enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag); /** * Select a PCM codec based on the given parameters. * * @param bps bits-per-sample * @param flt floating-point * @param be big-endian * @param sflags signed flags. each bit corresponds to one byte of bit depth. * e.g. the 1st bit indicates if 8-bit should be signed or * unsigned, the 2nd bit indicates if 16-bit should be signed or * unsigned, etc... This is useful for formats such as WAVE where * only 8-bit is unsigned and all other bit depths are signed. * @return a PCM codec id or AV_CODEC_ID_NONE */ enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags); /** * Chooses a timebase for muxing the specified stream. * * The chosen timebase allows sample accurate timestamps based * on the framerate or sample rate for audio streams. It also is * at least as precise as 1/min_precision would be. */ AVRational ff_choose_timebase(AVFormatContext *s, AVStream *st, int min_precision); /** * Chooses a timebase for muxing the specified stream. */ enum AVChromaLocation ff_choose_chroma_location(AVFormatContext *s, AVStream *st); /** * Generate standard extradata for AVC-Intra based on width/height and field * order. */ int ff_generate_avci_extradata(AVStream *st); /** * Add a bitstream filter to a stream. * * @param st output stream to add a filter to * @param name the name of the filter to add * @param args filter-specific argument string * @return >0 on success; * AVERROR code on failure */ int ff_stream_add_bitstream_filter(AVStream *st, const char *name, const char *args); /** * Wrap errno on rename() error. * * @param oldpath source path * @param newpath destination path * @return 0 or AVERROR on failure */ static inline int ff_rename(const char *oldpath, const char *newpath, void *logctx) { int ret = 0; if (rename(oldpath, newpath) == -1) { ret = AVERROR(errno); if (logctx) av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s\n", oldpath, newpath); } return ret; } /** * Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end * which is always set to 0. * * @param size size of extradata * @return 0 if OK, AVERROR_xxx on error */ int ff_alloc_extradata(AVCodecContext *avctx, int size); /** * Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end * which is always set to 0 and fill it from pb. * * @param size size of extradata * @return >= 0 if OK, AVERROR_xxx on error */ int ff_get_extradata(AVCodecContext *avctx, AVIOContext *pb, int size); /** * add frame for rfps calculation. * * @param dts timestamp of the i-th frame * @return 0 if OK, AVERROR_xxx on error */ int ff_rfps_add_frame(AVFormatContext *ic, AVStream *st, int64_t dts); void ff_rfps_calculate(AVFormatContext *ic); /** * Flags for AVFormatContext.write_uncoded_frame() */ enum AVWriteUncodedFrameFlags { /** * Query whether the feature is possible on this stream. * The frame argument is ignored. */ AV_WRITE_UNCODED_FRAME_QUERY = 0x0001, }; /** * Copies the whilelists from one context to the other */ int ff_copy_whitelists(AVFormatContext *dst, AVFormatContext *src); int ffio_open2_wrapper(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options); /** * Returned by demuxers to indicate that data was consumed but discarded * (ignored streams or junk data). The framework will re-call the demuxer. */ #define FFERROR_REDO FFERRTAG('R','E','D','O') #endif /* AVFORMAT_INTERNAL_H */ ```
```c++ // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // path_to_url #include <boost/vmd/detail/setup.hpp> #include <boost/detail/lightweight_test.hpp> int main() { #if !BOOST_PP_VARIADICS # if defined __GCCXML__ BOOST_ERROR("No variadic macro support: __GCCXML__ defined."); # elif defined __CUDACC__ BOOST_ERROR("No variadic macro support: __CUDACC__ defined."); # elif defined __PATHSCALE__ BOOST_ERROR("No variadic macro support: __PATHSCALE__ defined."); # elif defined __DMC__ BOOST_ERROR("No variadic macro support: __DMC__ defined."); # elif defined __CODEGEARC__ BOOST_ERROR("No variadic macro support: __CODEGEARC__ defined."); # elif defined __BORLANDC__ BOOST_ERROR("No variadic macro support: __BORLANDC__ defined."); # elif defined __MWERKS__ BOOST_ERROR("No variadic macro support: __MWERKS__ defined."); # elif (defined __SUNPRO_CC && __SUNPRO_CC < 0x5130) BOOST_ERROR("No variadic macro support: __SUNPRO_CC defined below version 12.3."); # elif defined __HP_aCC && !defined __EDG__ BOOST_ERROR("No variadic macro support: __HP_aCC defined and __EDG__ not defined."); # elif defined __MRC__ BOOST_ERROR("No variadic macro support: __MRC__ defined."); # elif defined __SC__ BOOST_ERROR("No variadic macro support: __SC__ defined."); # elif defined __IBMCPP__ BOOST_ERROR("No variadic macro support: __IBMCPP__ defined."); # elif defined __PGI BOOST_ERROR("No variadic macro support: __PGI defined."); # /* VC++ (C/C++) */ # elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__ # /* Wave (C/C++), GCC (C++) */ # elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__ # /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */ # elif !defined __cplusplus && __STDC_VERSION__ < 199901L BOOST_ERROR("No variadic macro support: __STDC_VERSION__ is less than 199901L."); # elif defined __cplusplus && __cplusplus < 201103L BOOST_ERROR("No variadic macro support: __cplusplus is less than 201103L."); # endif #endif return boost::report_errors(); } ```
```html <!DOCTYPE html> <html xmlns="path_to_url"><head><title>M (owl.Owl_neural_parallel.Make.M)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">owl</a> &#x00BB; <a href="../../index.html">Owl_neural_parallel</a> &#x00BB; <a href="../index.html">Make</a> &#x00BB; M</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.M</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-network"><a href="#type-network" class="anchor"></a><code><span><span class="keyword">type</span> network</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mkpar"><a href="#val-mkpar" class="anchor"></a><code><span><span class="keyword">val</span> mkpar : <span><a href="#type-network">network</a> <span class="arrow">&#45;&gt;</span></span> <span><span><a href="../../../Owl_algodiff/S/index.html#type-t">Owl_algodiff.S.t</a> array</span> array</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-init"><a href="#val-init" class="anchor"></a><code><span><span class="keyword">val</span> init : <span><a href="#type-network">network</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-update"><a href="#val-update" class="anchor"></a><code><span><span class="keyword">val</span> update : <span><a href="#type-network">network</a> <span class="arrow">&#45;&gt;</span></span> <span><span><span><a href="../../../Owl_algodiff/S/index.html#type-t">Owl_algodiff.S.t</a> array</span> array</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-copy"><a href="#val-copy" class="anchor"></a><code><span><span class="keyword">val</span> copy : <span><a href="#type-network">network</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-network">network</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-train_generic"><a href="#val-train_generic" class="anchor"></a><code><span><span class="keyword">val</span> train_generic : <span><span class="optlabel">?state</span>:<a href="../../../Owl_optimise/S/Checkpoint/index.html#type-state">Owl_optimise.S.Checkpoint.state</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="optlabel">?params</span>:<a href="../../../Owl_optimise/S/Params/index.html#type-typ">Owl_optimise.S.Params.typ</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="optlabel">?init_model</span>:bool <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-network">network</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../Owl_algodiff/S/index.html#type-t">Owl_algodiff.S.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../Owl_algodiff/S/index.html#type-t">Owl_algodiff.S.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../../Owl_optimise/S/Checkpoint/index.html#type-state">Owl_optimise.S.Checkpoint.state</a></span></code></div></div></div></body></html> ```
The Norway women's junior national handball team is the national under-19 handball team of Norway. Controlled by the Norwegian Handball Federation it represents the country in international matches. History World Championship Champions   Runners up   Third place   Fourth place European Championship Champions   Runners up   Third place   Fourth place References External links Women's national junior handball teams Women's handball in Norway Handball
```html <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Struct template inverse&lt;icl::inplace_bit_add&lt; Type &gt;&gt;</title> <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.74.0"> <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Icl"> <link rel="up" href="../../header/boost/icl/functors_hpp.html" title="Header &lt;boost/icl/functors.hpp&gt;"> <link rel="prev" href="inverse_icl_inpla_id647963.html" title="Struct template inverse&lt;icl::inplace_minus&lt; Type &gt;&gt;"> <link rel="next" href="inverse_icl_inpla_id647997.html" title="Struct template inverse&lt;icl::inplace_bit_subtract&lt; Type &gt;&gt;"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td align="center"><a href="../../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> <td align="center"><a href="path_to_url">People</a></td> <td align="center"><a href="path_to_url">FAQ</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="inverse_icl_inpla_id647963.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../header/boost/icl/functors_hpp.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="inverse_icl_inpla_id647997.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="refentry" lang="en"> <a name="boost.icl.inverse_icl_inpla_id647980"></a><div class="titlepage"></div> <div class="refnamediv"> <h2><span class="refentrytitle">Struct template inverse&lt;icl::inplace_bit_add&lt; Type &gt;&gt;</span></h2> <p>boost::icl::inverse&lt;icl::inplace_bit_add&lt; Type &gt;&gt;</p> </div> <h2 xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/icl/functors_hpp.html" title="Header &lt;boost/icl/functors.hpp&gt;">boost/icl/functors.hpp</a>&gt; </span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Type<span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="inverse_icl_inpla_id647980.html" title="Struct template inverse&lt;icl::inplace_bit_add&lt; Type &gt;&gt;">inverse</a><span class="special">&lt;</span><span class="identifier">icl</span><span class="special">::</span><span class="identifier">inplace_bit_add</span><span class="special">&lt;</span> <span class="identifier">Type</span> <span class="special">&gt;</span><span class="special">&gt;</span> <span class="special">{</span> <span class="comment">// types</span> <span class="keyword">typedef</span> <span class="identifier">icl</span><span class="special">::</span><span class="identifier">inplace_bit_subtract</span><span class="special">&lt;</span> <span class="identifier">Type</span> <span class="special">&gt;</span> <a name="boost.icl.inverse_icl_inpla_id647980.type"></a><span class="identifier">type</span><span class="special">;</span> <span class="special">}</span><span class="special">;</span></pre></div> </div> <table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="inverse_icl_inpla_id647963.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../header/boost/icl/functors_hpp.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="inverse_icl_inpla_id647997.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html> ```
José Balta y Montero (25 April 1814 – 26 July 1872) was a Peruvian soldier and politician who served as the 19th President of Peru from 1868 to 1872. He was the son of John Balta Bru and Agustina Montero Casafranca. In 1865, he aided Mariano Ignacio Prado in the seizure of the presidency and served in his administration. In 1867, he in turn overthrew Prado. As president, he re-established constitutional rule and undertook vast projects for national improvement. He granted a monopoly of guano export to a French company and obtained large loans in Europe, yet the lavish expenditures of his administration plunged Peru deep in debt. Balta was deposed and shot by a disgruntled member of his own cabinet, Defense Minister Tomás Gutiérrez during his subsequent coup d'état attempt. Early career José Balta y Montero embraced a military career from an early age. At only 16 years of age he entered the Military College in 1830, from which he graduated three years later with the rank of sergeant. By the age of 38, he already had the rank of colonel. In 1855, he joined the cause of Luis José de Orbegoso (1834), that of Felipe Santiago Salaverry (1835) and the Restoration (1838 to 1839). In 1865, he joined the rebellion of Pedro Diez Canseco and Mariano Ignacio Prado against President Juan Antonio Pezet. He participated in the Battle of May 2, but the following year he distinguished himself among the opponents of president Prado, who exiled him to Chile. José Balta returned to Peru in 1867 and led a movement against the Prado in Chiclayo, which was echoed in Arequipa, where he rose with General Pedro Diez Canseco. Both refused to swear under the new Constitution of 1860, which was proclaimed in force. Mariano Ignacio Prado, then traveled south to quell the rebellion, but under pressure from both Balta and Diez-Canseco, and exercised by the Congress from Lima, he was forced to resign. The interim presidency fell for the third time and in the general veteran Pedro Diez Canseco became president. Before the first month of his term, on February 6, Diez Canseco called for presidential elections, in which Balta actively campaigned. In that contest, he got 3168 votes, against 384 for Manuel Costas and 153 for his main rival, Manuel Toribio Ureta, who represented the Liberals. Balta wore the presidential sash on 2 August 1868. Presidency of the Republic Under his administration, Balta began opening the country to foreign capital. Nicolás de Piérola, the appointed Minister of Finance, tried to resolve the financial crisis that choked Peru by surrendering what would become the exploitation of Guano to the French-Jewish company Dreyfus. This put him at odds with the local oligarchy. The money from the agreement was used for the construction of railways and other projects. This was one of the main legacies of the Balta government. By the year 1861, Peru only had a 90-mile railroad system, but by 1874, it became a 947 miles system. At the same time, besides the railroads, several major projects were also realized: new piers on the coasts, major avenues in Lima and new bridges in the coast. However, not having enough money to pay contractors for railway construction, the government began to ask Dreyfus for advances in guano revenues, which led to a large increase in the already huge debt. President Jose Balta, facing the economic crisis, appointed Nicolás de Piérola, a political conservative and a democrat, as finance minister in 1868. Piérola requested authorization to Congress to negotiate directly (no consignment) the sale of guano abroad in a volume that bordered the two million metric tons. The French Jewish house "Dreyfus Hnos" accepted the proposal. The contract between the Peruvian government and the house Dreyfus was signed on 17 August 1869 and was approved by Congress on 11 November 1870. The contract went ahead despite protests from the Peruvian capitalists or consignees. By 1879, the rail system had 1,963 miles of track. Elections and murder In 1871, with very close elections, rumors circulated that Juan Francisco Balta, brother of head of state, and prime minister at the time, would run for president. However, on the advice of Nicolás de Piérola, this did not happen. Balta, therefore, decided to support the candidacy of former President Jose Rufino Echenique, but he too declined nomination. Finally, the third candidate, Antonio Arenas was the one who received the full support of Balta. The contenders were Manuel Toribio Ureta Arenas, who was a repeat candidate, and Manuel Pardo y Lavalle, then Supreme Prosecutor. The latter's campaign was overwhelming, and in 1872 was established as the first civilian president in the history of the Republic of Peru. Although Jose Balta had been tempted to remain in power by the Gutierrez brothers, one of whom was Minister of War, he ultimately declined to do so, a situation rare in the history of Peru. That year, 1872, July 22, Tomas Gutierrez, the then minister, was proclaimed Supreme Head of the Republic. That same day, President Balta was taken prisoner when he went to meet with Miguel Grau Seminario and Aurelio Garcia y Garcia, the two highest ranking naval officers at the time. Through the mediation of these two great military men, the Navy did not provide support for the rebellion of Tomas Gutierrez, and did not recognize his government. Likewise, Lima's population disagreed, and one of the conspirator brothers, Silvestre Gutierrez, died on 22 July 1872 in one of the many skirmishes in the capital. In retaliation for his brother's death, president Tomás Gutierrez gave order to kill José Balta y Montero; he was shot in his bed. This led some days later to the overthrow and lynching of Gutierrez. In the 1990 presidential election, his great-grandson Nicolás de Piérola Balta (also a great-grand nephew of President Nicolás de Piérola) was a candidate. Work and legacy In 1869 he founded the School of Agriculture. Founded Ancón and constitutional province of Tarapacá. Construction of pier dock in Callao. Construction of the Lima-Callao and Lima-Huacho. Salaverry Port Trust. Construction of the "Palace of the Exhibition", currently the Museum of Art. Founded the neighborhood of La Victoria. He built the Cathedral of San Marcos de Arica, and the office of the same city (now Chile). External links Genealogy and family tree of the Balta family from Peru (Spanish) References 1814 births 1872 deaths Peruvian people of Spanish descent Presidents of Peru Executed presidents Assassinated Peruvian politicians Deaths by firearm in Peru People murdered in Peru 1870s assassinated politicians Assassinated presidents in South America 19th-century assassinated national presidents
```objective-c // SHE library // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. #pragma once namespace she { enum SurfaceFormat { kRgbaSurfaceFormat, }; struct SurfaceFormatData { SurfaceFormat format; uint32_t bitsPerPixel; uint32_t redShift; uint32_t greenShift; uint32_t blueShift; uint32_t alphaShift; uint32_t redMask; uint32_t greenMask; uint32_t blueMask; uint32_t alphaMask; }; } // namespace she ```
The 1994 SMU Mustangs football team represented Southern Methodist University (SMU) as a member of the Southwest Conference (SWC) during the 1994 NCAA Division I-A football season. Led by fourth-year head coach Tom Rossley, the Mustangs compiled an overall record of 1–9–1 with a mark of 0–6–1 in conference play, placing last out of eight teams in the SWC. The highlight of the campaign was a 21–21 tie vs. Texas A&M, which went 10–0–1 but was ineligible to win the SWC championship and participate in a bowl game (and was also banned from television) due to harsh penalties enforced by the NCAA for numerous rule violations. It was the last tie for the Mustangs and Aggies, as the NCAA adopted overtime for regular season games starting in 1996. This was the final season SMU played home games at Ownby Stadium, although the Mustangs moved their home game with Houston to the nearby Cotton Bowl. The scheduled home game with Texas A&M was shifted to the Alamodome in San Antonio for a guarantee of the gate; most of the crowd of over 51,000 wore the Aggies' Maroon and White. The regular season finale vs. TCU was the Mustangs' last on-campus home game until the opening of Gerald J. Ford Stadium for the 2000 season. Schedule Roster References SMU SMU Mustangs football seasons SMU Mustangs football
Loyola University Stadium was a multi-purpose stadium in New Orleans. It was home to the Loyola University Wolf Pack football team and track and field team. The stadium opened in 1928. The stadium was a double-decker stadium with a track surrounding the grass playing field. It was located on Freret Street at Calhoun Street between Bobet Hall and the gymnasium. It hosted the first collegiate night game in the southern United States. The stadium also hosted high school football games. See also Loyola Wolf Pack References American football venues in New Orleans Athletics (track and field) venues in New Orleans Defunct athletics (track and field) venues in the United States Defunct college football venues Defunct multi-purpose stadiums in the United States Defunct sports venues in New Orleans Demolished sports venues in Louisiana High school football venues in Louisiana Loyola Wolf Pack football Sports venues completed in 1928 1928 establishments in Louisiana
Louis IV the Saint (; 28 October 1200 – 11 September 1227), a member of the Ludovingian dynasty, was Landgrave of Thuringia and Saxon Count palatine from 1217 until his death. He was the husband of Elizabeth of Hungary. Biography Louis was born at Creuzburg Castle, the second son of Landgrave Hermann I of Thuringia, from his marriage with Sophia, a daughter of the Wittelsbach duke Otto I of Bavaria. During the German throne quarrel between the Hohenstaufen ruler Philip of Swabia and his Welf rival Otto IV, his father switched sides several times and tried to expand his own influence by betrothing his eldest son Hermann to the Hungarian princess Elizabeth, daughter of King Andrew II. The young girl arrived in Thuringia in 1211 to be raised at the Ludovingian court, then a venue for poets and minnesingers like Walther von der Vogelweide or Wolfram von Eschenbach. Louis elder brother died in 1216, therefore he himself, upon his father's death on 25 April 1217, ascended the Thuringian throne at the age of sixteen. In 1218, on the Feast of St. Kilian, at age eighteen, he was armed as a knight in the Church of St. George in Eisenach. At Wartburg Castle in 1220 at age twenty, Louis married 14-year-old Elizabeth of Hungary, with whom he had three children: Hermann II, Sophie, and Gertrude, later abbess at Altenberg. He set up his court at Wartburg Castle near Eisenach. When in 1221 Louis' Wettin brother-in-law, Margrave Theodoric I of Meissen died, he acted as a guardian for Theodoric's minor son Henry III. However, his attempts to occupy the Meissen and Lusatian lands were rejected by his sister Jutta. Like his father, Louis was in close contact with the Hohenstaufen emperor Frederick II, who appointed him a Marshal of the Holy Roman Empire and confirmed his rights in the Margraviate of Meissen. In 1226, Louis was called to the Diet in Cremona, where he promised Emperor Frederick II to take up the cross and accompany him to the Holy Land. He embarked for the Sixth Crusade in 1227, partly inspired also by the tales of his uncle, who had been to the Levant with the Holy Roman Emperor. Fellow-travellers were five counts, Louis von Wartburg, Gunther von Kefernberg, Meinrad von Mühlberg, Heinrich von Stolberg, and Burkhard von Brandenberg; Louis left his pregnant wife behind, who had a premonition that they would never meet again. In August 1227 Louis traversed the mountains between Thuringia and Upper Franconia, through the duchies of Swabia and Bavaria, crossing the Tyrolian Alps. He fell ill of plague after reaching Brindisi and Otranto in the Kingdom of Sicily. He received extreme unction from the Patriarch of Jerusalem and the Bishop of Santa Croce. He died before reaching Otranto in 1227. A few days after his death, his daughter Gertrude was born. Louis's remains were buried in Reinhardsbrunn Abbey in 1228. He was succeeded by his five-year-old son Hermann II, under the tutelage of his uncle Henry Raspe. After his death, Elizabeth left the court, made arrangements for the care of her children, and in 1228, renounced the world, becoming a tertiary of St. Francis of Assisi. She built the Franciscan hospital at Marburg and devoted herself to the care of the sick until her death at the age of 24 in 1231. She was officially proclaimed a saint only four years after her death. While Louis was never formally canonized, he became known among the German people as Louis the saint (). He is known elsewhere as Blessed Louis of Thuringia. Family and children He and Elizabeth of Hungary had the following children: Hermann II, Landgrave of Thuringia (1222–1241), married Helen, daughter of Duke Otto I of Brunswick-Lüneburg Sophie of Thuringia (1224–1275), married Duke Henry II of Brabant; their son Henry became the progenitor of the House of Hesse Gertrude (1227–1297), abbess of the Premonstratensian monastery of Altenberg near Wetzlar; she was beatified by Pope Clement VI in 1348. Explanatory notes References Literature Walter Heinemeyer: Ludwig IV the Saint, Landgrave of Thuringia and Count Palatine of Saxony. In: New German Biography (NDB). Volume 15, Duncker & Humblot, Berlin, 1987, , S. 422 f. (digitized). Helga aq: Ludwig IV, the Holy, in: shape perception and memory medium German sculpture in the 14th century. A contribution to medieval grave monuments, epitaphs and curiosities in Saxony, Saxony-Anhalt, Thuringia, North Hesse, North-Rhine Westphalia and southern Lower Saxony. Volume 2. Catalog of selected objects from the High Middle Ages to the early 15th century. Tenea Verlag, Berlin 2006, S. 538 f. with Fig. 799 f. . Karl Robert Wenck: Louis IV, Holy, Landgrave of Thuringia. In: General German Biography (ADB). Volume 19, Duncker & Humblot, Leipzig 1884, S. 594–597. Sources External links http://www.deutsche-biographie.de/sfz54810.html 1200 births 1227 deaths People from Wartburgkreis German Roman Catholic saints 13th-century Christian saints Regents of Germany 13th-century regents 13th-century counts in Europe Landgraves of Thuringia Roman Catholic royal saints Ludovingians Christians of the Sixth Crusade Royal reburials
Tighanab () may refer to: Tighanab Bala
```java /* * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.apache.beam.sdk.coders; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Serializable; import org.apache.beam.sdk.values.TypeDescriptor; import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.MoreObjects; import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Objects; import org.checkerframework.checker.nullness.qual.Nullable; /** * A {@code DelegateCoder<T, IntermediateT>} wraps a {@link Coder} for {@code IntermediateT} and * encodes/decodes values of type {@code T} by converting to/from {@code IntermediateT} and then * encoding/decoding using the underlying {@code Coder<IntermediateT>}. * * <p>The conversions from {@code T} to {@code IntermediateT} and vice versa must be supplied as * {@link CodingFunction}, a serializable function that may throw any {@code Exception}. If a thrown * exception is an instance of {@link CoderException} or {@link IOException}, it will be re-thrown, * otherwise it will be wrapped as a {@link CoderException}. * * @param <T> The type of objects coded by this Coder. * @param <IntermediateT> The type of objects a {@code T} will be converted to for coding. */ public final class DelegateCoder<T, IntermediateT> extends CustomCoder<T> { /** * A {@link DelegateCoder.CodingFunction CodingFunction&lt;InputT, OutputT&gt;} is a serializable * function from {@code InputT} to {@code OutputT} that may throw any {@link Exception}. */ public interface CodingFunction<InputT, OutputT> extends Serializable { OutputT apply(InputT input) throws Exception; } public static <T, IntermediateT> DelegateCoder<T, IntermediateT> of( Coder<IntermediateT> coder, CodingFunction<T, IntermediateT> toFn, CodingFunction<IntermediateT, T> fromFn) { return of(coder, toFn, fromFn, null); } public static <T, IntermediateT> DelegateCoder<T, IntermediateT> of( Coder<IntermediateT> coder, CodingFunction<T, IntermediateT> toFn, CodingFunction<IntermediateT, T> fromFn, @Nullable TypeDescriptor<T> typeDescriptor) { return new DelegateCoder<>(coder, toFn, fromFn, typeDescriptor); } @Override public void encode(T value, OutputStream outStream) throws CoderException, IOException { encode(value, outStream, Context.NESTED); } @Override public void encode(T value, OutputStream outStream, Context context) throws CoderException, IOException { coder.encode(applyAndWrapExceptions(toFn, value), outStream, context); } @Override public T decode(InputStream inStream) throws CoderException, IOException { return decode(inStream, Context.NESTED); } @Override public T decode(InputStream inStream, Context context) throws CoderException, IOException { return applyAndWrapExceptions(fromFn, coder.decode(inStream, context)); } /** * Returns the coder used to encode/decode the intermediate values produced/consumed by the coding * functions of this {@code DelegateCoder}. */ public Coder<IntermediateT> getCoder() { return coder; } /** * {@inheritDoc} * * @throws NonDeterministicException when the underlying coder's {@code verifyDeterministic()} * throws a {@link Coder.NonDeterministicException}. For this to be safe, the intermediate * {@code CodingFunction<T, IntermediateT>} must also be deterministic. */ @Override public void verifyDeterministic() throws NonDeterministicException { coder.verifyDeterministic(); } /** * {@inheritDoc} * * @return a structural for a value of type {@code T} obtained by first converting to {@code * IntermediateT} and then obtaining a structural value according to the underlying coder. */ @Override public Object structuralValue(T value) { try { IntermediateT intermediate = toFn.apply(value); return coder.structuralValue(intermediate); } catch (Exception exn) { throw new IllegalArgumentException( "Unable to encode element '" + value + "' with coder '" + this + "'.", exn); } } @Override public boolean equals(@Nullable Object o) { if (o == null || this.getClass() != o.getClass()) { return false; } DelegateCoder<?, ?> that = (DelegateCoder<?, ?>) o; return Objects.equal(this.coder, that.coder) && Objects.equal(this.toFn, that.toFn) && Objects.equal(this.fromFn, that.fromFn); } @Override public int hashCode() { return Objects.hashCode(this.coder, this.toFn, this.fromFn); } @Override public String toString() { return MoreObjects.toStringHelper(getClass()) .add("coder", coder) .add("toFn", toFn) .add("fromFn", fromFn) .toString(); } @Override public TypeDescriptor<T> getEncodedTypeDescriptor() { if (typeDescriptor == null) { return super.getEncodedTypeDescriptor(); } return typeDescriptor; } ///////////////////////////////////////////////////////////////////////////// private <InputT, OutputT> OutputT applyAndWrapExceptions( CodingFunction<InputT, OutputT> fn, InputT input) throws CoderException, IOException { try { return fn.apply(input); } catch (IOException exc) { throw exc; } catch (Exception exc) { throw new CoderException(exc); } } private final Coder<IntermediateT> coder; private final CodingFunction<T, IntermediateT> toFn; private final CodingFunction<IntermediateT, T> fromFn; // null unless the user explicitly provides a TypeDescriptor. // If null, then the machinery from the superclass (StructuredCoder) will be used // to try to deduce a good type descriptor. private final @Nullable TypeDescriptor<T> typeDescriptor; protected DelegateCoder( Coder<IntermediateT> coder, CodingFunction<T, IntermediateT> toFn, CodingFunction<IntermediateT, T> fromFn, @Nullable TypeDescriptor<T> typeDescriptor) { this.coder = coder; this.fromFn = fromFn; this.toFn = toFn; this.typeDescriptor = typeDescriptor; } } ```
The 1868 Democratic National Convention was held at the Tammany Hall headquarters building in New York City between July 4, and July 9, 1868. The first Democratic convention after the conclusion of the American Civil War, the convention was notable for the return of Democratic Party politicians from the Southern United States. Venue The convention was held at the new Tammany Hall building on East 14th Street in Manhattan, New York City, which replaced the organization's earlier headquarters. For the convention, the hall was elaborately decorated. Convention officers Horatio Seymour, the former governor of New York, served as the permanent chairman of the convention. Each state delegation had a vice president and secretary to the convention. Henry L. Palmer of Wisconsin served as the convention's temporary chairman, after the convention voted on the opening day to appoint him after he was nominated by Democratic National Committee Chairman August Belmont. Events of the convention On July 4, 1868, coinciding with the first day of the Democratic National Convention, the Soldiers and Sailors National Convention was held at the Cooper Institute, also in New York City. On July 6, a committee from that convention was granted privilege to address the Democratic National Convention. On July 6, an address from the Woman's Suffrage Association was presented and read before the convention. During the convention, many delegates utilized the catch phrase, "this is a white man's country, let white men rule". Presidential nomination Presidential candidates The front-runner in the early balloting was George H. Pendleton, who led on the first 15 ballots, followed in varying order by incumbent president Andrew Johnson, Winfield Scott Hancock, Sanford Church, Asa Packer, Joel Parker, James E. English, James Rood Doolittle, and Thomas A. Hendricks. Three-fourth of the delegates from southern states gave their support to Johnson. The unpopular Johnson, having narrowly survived impeachment, won 65 votes on the first ballot; the second-highest number of votes after Pendleton, but less than one-third of the total necessary for nomination, and he thus lost his bid for election as president in his own right. His vote tally rapidly dropped away thereafter, and from the eighth ballot onwards, he would only receive votes from his home state of Tennessee. Meanwhile, the convention chairman Horatio Seymour, former governor of New York, received 9 votes on the fourth ballot from the state of North Carolina. This unexpected move caused "loud and enthusiastic cheering," but Seymour refused, saying, I must not be nominated by this Convention, as I could not accept the nomination if tendered. My own inclination prompted me to decline at the outset; my honor compels me to do so now. It is impossible, consistently with my position, to allow my name to be mentioned in this Convention against my protest. The clerk will proceed with the call. After numerous indecisive ballots, the names of John T. Hoffman, Francis P. Blair, and Stephen Johnson Field were placed in nomination. This raised the number of names placed into nomination to thirteen. None of these new candidates, however, gained much traction. For twenty-one ballots, the opposing candidates battled it out: the East battling the West for control, the conservatives battling the radicals. The two leading candidates were determined that the other should not receive the nomination; because of the two-thirds rule of the convention, a compromise candidate was needed. Seymour still hoped it would be Chief Justice Salmon P. Chase, but on the twenty-second ballot, the chairman of the Ohio delegation announced, "at the unanimous request and demand of the delegation I place Horatio Seymour in nomination with twenty-one votes-against his inclination, but no longer against his honor." Seymour had to wait for the rousing cheers to die down before he could address the delegates and decline. I have no terms in which to tell of my regret that my name has been brought before this convention. God knows that my life and all that I value most in life I would give for the good of my country, which I believe to be identified with that of the Democratic party... "Take the nomination, then!" cried someone from the floor. ...but when I said that I could not be a candidate, I meant it! I could not receive the nomination without placing not only myself but the Democratic party in a false position. God bless you for your kindness to me, but your candidate I cannot be.Official proceedings of the National Democratic convention, held at New York, July 4-9, 1868 (Pg. 153) Seymour left the platform to cool off and rest. No sooner had he left the hall than former representative Clement Vallandigham, a member of the Ohio delegation and one-time ally of Seymour, rose and proclaimed that the delegation would not accept Seymour's refusal, and that he was the only man who could break the deadlock at the convention, much less win the presidency. The chairman of New York's delegation then stood and, while bound by the convention rules not to switch its votes (which it had already cast for Hendricks) until the round of balloting had concluded, made a passionate speech in support of Seymour. The roll call continued, with Seymour only picking up one additional vote (from Tennessee), but the final state, Wisconsin, cast a blank ballot which it then immediately switched to Seymour. This started a stampede with all the remaining states quickly throwing their support behind Seymour, eventually leading to his being nominated unanimously. In 1868, the States of Arkansas, Alabama, Florida, North Carolina, South Carolina, Georgia, and Louisiana were readmitted to the Union. Nebraska had been admitted to the Union on March 1, 1867. Texas, Mississippi and Virginia had not yet been readmitted to the Union. Balloting 1st Day of Presidential Balloting / 3rd Day of Convention (July 7, 1868) 2nd Day of Presidential Balloting / 4th Day of Convention (July 8, 1868) 3rd Day of Presidential Balloting / 5th Day of Convention (July 9, 1868) Vice presidential nomination Vice presidential candidate Exhausted, the delegates unanimously nominated General Francis Preston Blair Jr. for vice-president on the first ballot after the names of Augustus C. Dodge and Thomas Ewing Jr. were withdrawn from consideration. Blair's nomination reflected a desire to balance the ticket east and west as well as north and south. Blair had worked hard to acquire the Democratic nomination and accepted second place on the ticket, finding himself in controversy. Blair had gained attention by an inflammatory letter addressed to Colonel James O. Broadhead, dated a few days before the convention met. In his letter, Blair wrote that the "real and only issue in this contest was the overthrow of Reconstruction, as the radical Republicans had forced it in the South." See also History of the United States Democratic Party List of Democratic National Conventions U.S. presidential nomination convention 1868 Republican National Convention 1868 United States presidential election References Works cited Bibliography Coleman, Charles Hubert. The election of 1868 : the Democratic effort to regain control (1933) online Primary sources Chester, Edward W A guide to political platforms (1977) pp 86–89 online Official proceedings of the National Democratic convention, held at New York, July 4-9, 1868 External links Democratic Party Platform of 1868 at The American Presidency Project 1868 conferences 1868 United States presidential election 1868 in New York (state) 1860s in New York City 19th century in Manhattan Political conventions in New York City New York State Democratic Committee Political events in New York (state) Democratic National Conventions July 1868 events 19th-century political conferences 1860s political events
The Jyväskylä rail accident occurred on 6 March 1998 in Jyväskylä, Finland, when the Sr1-driven express train P105 from Turku bound for Joensuu via Pieksämäki derailed. The train left the tracks after coming in too fast on a switch near the station. 300 people were on board (some sources say 500); the fireman driving the train and nine passengers were killed, and 94 passengers injured. The investigation found the cause of the accident to be human error when interpreting signals. The driver of the train was expecting the train to enter the station on another track, which had a higher speed limit of . An estimate of the total cost of the accident was 21.5 million FIM (3.6 million euros). Chronology of events The train had departed Tampere 20 minutes late, but was arriving at Jyväskylä only 10 minutes behind schedule. The crew of two drivers had switched seats at Jämsä, with the driver in charge (the engineer) looking out and the secondary driver (or fireman, ) driving the train when it arrived to Jyväskylä. The fireman was searching for a coffee bag in his personal bag before the distant signal of Jyväskylä railyard and handed it to the engineer, who then began to brew coffee. While seven out of the nine daily trains arriving from Tampere were using track 1, this train was due to arrive on track 3 because of its length. However, track 3 was entered through a so-called short switch, with a maximum speed of . Track 1, which had been used by all arriving trains until the end of 1997, featured a long switch, speed limit . According to the data available from the event recorder, the driver was seemingly prepared to enter the switch leading to track 1 at . Even though emergency braking was initiated, it was effective for only before the switch. The locomotive was thrown some away from the track, crossing a highway and hitting a concrete bridge support at approximately . The driving fireman was killed on impact. The two coaches at the front of the train rolled over and six others derailed, remaining upright. Many passengers were thrown out of the overturned cars and nine were killed as they were crushed under them. As the accident happened close to the city center, the first rescuers were on the scene only four minutes after the accident. However, more units were quickly needed when the extent of the accident became clear. Luckily many of the rescue workers had been involved in a large scale accident less than two years earlier during the 1996 Neste 1000 Lakes Rally (renamed the following year as Rally Finland), when one spectator was killed and 32 injured when a rally car hit a group of spectators during the Harju special stage. Lifting equipment was needed, as many passengers were trapped under overturned carriages; three people were saved from under the cars with air cushions. Causes The investigation of the accident was slow at first and included reconstructions of the accident. The causes became clearer after a few days when the black box of the train was deciphered and the surviving engineer had recovered enough to be heard. The main cause of the accident was blamed on human error when interpreting signals. The Finnish signalling system at that time was still less than ten years old. It contained a number signal as a complement to the expect 35 or proceed 35 aspects to allow higher speeds, such as . The signals at Jyväskylä were showing expect 35 and proceed 35; with the number signal they were able to show the signals expect 80 and proceed 80 respectively for trains directed on track 1. According to the data recovered from the train and subsequent braking tests, it seems that the driver had misinterpreted the signals and arrived at Jyväskylä, fully expecting to enter track 1 at a speed of , and, realising what had happened, applied emergency braking just before the fateful switch. The accident also showed problems in VR's management. The company had not upgraded safety instructions and the notes handed to the drivers were not easily readable. The accident investigation board interviewed 100 railway engineers, 70 of which answered, during the investigation. Almost 30% of them had mixed up number signals and over half had seen unsafe incidents during the past year. The fireman driving the train was tired as he had finished his previous shift at 06:05 in the morning and had not slept well at the provided facilities at Tampere. Additionally, the engineer had begun brewing coffee just before arriving at Jyväskylä. He was then unable to warn his colleague about the overspeed before it was too late. Aftermath This accident, following the Jokela rail accident two years before, showed the importance of the automatic train control system, which could have prevented both of them. At Jyväskylä, the system would have first warned the driver, then braked automatically before the switch, slowing the train to a safe speed. Deployment of the system had started in 1995, and it was hurried in the aftermath of the accidents. VR offered compensations to those involved in the accident, and VR Cargo cancelled a safety campaign that was started only a few days before. The accident caused major disturbances to Jyväskylä's road and rail traffic. The accident investigation board recommended the use of seatbelts in trains. VR implemented airplane-style seatbelts in three InterCity carriages during the year 1999, but finally decided against a wide-range deployment due to their impracticality. The surviving engineer was sued on 25 January 2000 for causing a traffic hazard, negligent homicide and negligent bodily injury. He was acquitted during the same year by the Jyväskylä District Court. The decision was upheld in November 2001 by the Vaasa Court of Appeal, freeing him from charges. See also Finnish railway signalling Similar accidents Jokela rail accident – overspeed through turnout Brühl train disaster – overspeed through turnout Waterfall rail accident – overspeed through sharp curve References Literature External links Railway accidents in 1998 Derailments in Finland 1998 in Finland Transport in Jyväskylä Accidents and incidents involving VR Group March 1998 events in Europe
Enrique Llopis Doménech (born 15 October 2000) is a Spanish athlete who specializes in the 110m hurdles. Personal bests Outdoors 110 metres hurdles: 13.30 (Munich, 2022) Indoors 60 metres hurdles: 7.48 (Madrid, 2022) International competitions References External links 2000 births Living people Spanish male hurdlers People from Gandia Sportspeople from the Province of Valencia Athletes (track and field) at the 2023 European Games European Games bronze medalists for Spain European Games medalists in athletics
```javascript module.exports = { mappings: { "@node_modules/lodash/lodash.min.js": "@libs/lodash/" } } ```
Maripaston was a village in the Bigi Poika resort of the Para District, Suriname. The village was located along the Saramacca River and used to be the main village of the Matawai maroons. History The wood plantation Sonnette was located at the site since at least 1819, and was abandoned after 1832. The village was founded after 1836 by Adensi, a daughter of granman (paramount leader) Kodjo, but the inhabitants were later chased away by the authorities. Noah Adrai resettled the village in 1852. A Moravian church was constructed in the village in 1860 by Johannes King. Maripaston developed into the main village of the Matawai and the seat of the granman. In 1898, Lavanti Agubaka, who lived in Boven Saramacca, was elected as the new granman, and the village lost the status as main village In 1899 plans had been developed to build a tramway from Berlijn to Maripaston, however the line was never constructed. Maripaston was last mentioned in newspapers in 1951 as a settled place. and has probably been abandoned. There is economical activity at the site, because illegal gold prospectors used to be active. In 2011, the gold concession was awarded to Grassalco who is operating a gold mine in the area. Maripaston can only be reached by boat and is located half an hour downstream of Kwakoegron. Notable people Johannes King (~1830-1898), missionary and writer. Gallery References Matawai settlements Populated places in Para District
```javascript 'use strict' const cp = require('child_process') module.exports = name => { try { cp.execSync('node -e \'require.resolve("' + name + '")\'', {stdio: 'ignore', env: { NODE_PATH: process.env.NODE_PATH }}) return true } catch (err) { return false } } ```
The Andhra Pradesh Police is the law enforcement agency of the state of Andhra Pradesh, India. Public order and police being a state subject in India, the police force is headed by the Director general of police, Kasireddy Rajendranadh Reddy History The Madras Act XXIV of 1859 which marked the beginning of the Madras Police and shortly later, the Police Act of 1861 instituted the system of police which forms the foundation of modern-day police in India. The "Ceded Areas" of Andhra, as they were popularly known, continued as a part of the Madras Police and it was only in October 1953, after the birth of a separate Andhra State, that the Andhra State Police gained individual existence. Finally with the formation of the Andhra Pradesh on 1 November 1956 integrating the Telugu areas of the erstwhile Hyderabad state with the Andhra State, the modern day Andhra Pradesh Police came into existence. After the bifurcation of the state in 2014, the police force once again bifurcated. This time, it was divided into Andhra Pradesh police and Telangana Police. Andhra Pradesh State Level Recruitment Board The Andhra Pradesh State Police Recruitment Board is responsible for recruitment. The board is releases recruitment notification time to time and conducts written examinations, physical tests, medical tests, and interviews for selecting applicants. Police ranks The Andhra Pradesh Police designates the following ranks. Officers Director General of Police (DGP) Additional Director General of Police (Addl.DGP) Inspector General of Police (IGP) Deputy Inspector General of Police (DIG) Superintendent of Police (SP) Additional Superintendent of Police (Addl.SP) Assistant superintendent of police / Deputy superintendent of police (ASP / DSP) Sub-ordinates Inspector of Police (Insp.) Sub-inspector (SI) Assistant sub-inspector of police (ASI) Head constable (HC) Police Constable (PC) Structure and organization Districts Each police district is either coterminous with the Revenue district, or is located entirely within a revenue district. It is headed by a District commissioner of Police (or simply called Superintendent of Police). Each district comprises two or more Sub-Divisions, several circles and Police Stations. Sub-Divisions Each Sub-Division is headed by a Police officer of the rank Deputy Superintendent of Police (Officers of Andhra Pradesh Police Service are directly recruited officers or promoted from lower ranks) or an Additional Superintendent of Police (Officers of Indian Police Service). The officer who heads a Sub-Division is known as S.D.P.O. resp. Sub Divisional Police Officer. Circles A Circle comprises several Police Stations. An Inspector of Police who heads a police circle is the Circle Inspector of Police or CI. Stations A Police Station is headed by an Inspector (an upper subordinate rank). A Police Station is the basic unit of policing, responsible for prevention and detection of crime, maintenance of public order, enforcing law in general as well as for performing protection duties and making security arrangements for the constitutional authorities, government functionaries, representatives of the public in different legislative bodies and local self governments, public figures etc. Commissionerate A Police Commissionerate is a law enforcement body especially in the urban parts of the state. The commissionerate is headed by a Commissioner of Police. Vijayawada City Police and Visakhapatnam City Police are the local law enforcement agencies for the cities of Vijayawada and Visakhapatnam respectively. The Guntur Urban Police is being planned to be upgraded as Guntur Police Commissionerate. Insignia of Andhra Pradesh Police (State Police) Gazetted Officers Non-gazetted officers List of Directors General of Police in Andhra Pradesh Incidents On 12 May 2017, Andhra Pradesh Police computer's network was attacked by a malware known as WannaCry ransomware attack which was found to be critical. See also Operation Puttur Visakhapatnam City Police Vijayawada City Police Notes References External links Police mains exam answer key. State law enforcement agencies of India 1956 establishments in Andhra Pradesh
Michael Pickett (born 17 August 2002) is a New Zealand swimmer. He represented New Zealand at the 2019 World Aquatics Championships held in Gwangju, South Korea and he finished in 38th place in the heats in the men's 50 metre freestyle event. In 2018, he competed in the boys' 50 metre freestyle at the Summer Youth Olympics held in Buenos Aires, Argentina. He also competed in the boys' 100 metre freestyle and mixed 4 × 100 metre freestyle relay events. In both the 50 metre and 100 metre events he advanced to the semi-finals and he did not advance to compete in the final. References Living people 2002 births Place of birth missing (living people) New Zealand male freestyle swimmers Swimmers at the 2018 Summer Youth Olympics 21st-century New Zealand people
Corongo can refer to a city, a district and a province in Peru. For the use of the term in a specific setting, see: Corongo for the town in Peru Corongo District for the district in the Corongo province Corongo Province for the province in Ancash
Gamull is a surname. Notable people with the surname include: Francis Gamull (1606–1654), English politician Gamull Baronets
Mdundiko is one of the traditional and ritual dances (ngoma) of the Zaramo people living in the Dar es Salaam area, in Tanzania. Mdundiko dances are associated with weddings and the rites of passage celebrating female puberty. The mdundiko style has inspired some modern popular Tanzanian music. The bongo flava group "Mambo Jambo", for example, mix western hip hop/rap and mdundiko rhythms (their first single was entitled Hip-Hop Mdundiko). Footnotes Tanzanian music Culture in Dar es Salaam Tanzanian styles of music African music genres [[Category:Tanzanian music industry]
Trip Gabriel is an American political journalist who works for The New York Times. He has covered each presidential campaign since 2012, as well as numerous U.S. Senate, congressional and gubernatorial races. Much of his reporting has focused on voters, demographics and the battleground states; especially as Donald Trump disrupted traditional party coalitions. In 2015, Gabriel was based in Iowa during the run-up to the presidential caucuses, as Trump began consolidating his hold on Republicans. In 2019, his article about Representative Steve King of Iowa as a precursor to Trump's politics of anti-immigrant nationalism created an uproar, after King told the reporter: “White nationalist, white supremacist, Western civilization — how did that language become offensive?” King, a Republican, was stripped of his committee assignments in the House of Representatives by republican leaders. Other coverage by Gabriel that had a high impact included reporting about Republicans using critical race theory as a culture-war issue in 2021; the political formation of Pete Buttigieg when he sought the 2020 Democratic nomination; the crushing down-ballot losses by Democrats in 2020, and the foreign policy stumbles of Ben Carson in 2015, in which an advisor to Carson, Duane R. Clarridge, told The Times, “Nobody has been able to sit down with him and have him get one iota of intelligent information about the Middle East." Career Gabriel joined The Times in 1994 as a reporter in the Style department. In 1997, he became editor of the Sunday Styles section and also worked as the director of fashion news. He conceived the long-running "Modern Love" column, one of the newspaper's most popular features. Under his direction, the once struggling Styles section grew and developed into a multifaceted presentation of fashion, lifestyle, entertainment and celebrity news. As a result of that success, Gabriel spun off a separate "Thursday Styles" section in 2007. After 12 years guiding Styles, Gabriel returned to reporting in 2010. He covered education nationally, including the series "Cheat Sheet" about academic plagiarism and other cheating by students and teachers. Before joining The Times, Gabriel contributed to many magazines, including Rolling Stone, Vanity Fair, and GQ. In 2017, he described experiencing a rare case of Transient Global Amnesia in the journal Cognitive Behavior and Neurology. References 1955 births Living people The New York Times writers The New York Times editors People from Westchester County, New York Middlebury College alumni Phillips Academy alumni 20th-century American journalists American male journalists
```xml import { nextTestSetup } from 'e2e-utils' import { check } from 'next-test-utils' const isPPREnabledByDefault = process.env.__NEXT_EXPERIMENTAL_PPR === 'true' describe('app dir - css', () => { const { next, isNextDev, skipped } = nextTestSetup({ files: __dirname, skipDeployment: true, dependencies: { '@picocss/pico': '1.5.7', sass: 'latest', '@next/mdx': 'canary', }, }) if (skipped) { return } describe('css support', () => { describe('server layouts', () => { it.skip('should support global css inside server layouts', async () => { const browser = await next.browser('/dashboard') // Should body text in red await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('.p')).color` ), 'rgb(255, 0, 0)' ) // Should inject global css for .green selectors await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('.green')).color` ), 'rgb(0, 128, 0)' ) }) it('should support css modules inside server layouts', async () => { const browser = await next.browser('/css/css-nested') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('#server-cssm')).color` ), 'rgb(0, 128, 0)' ) }) it('should support external css imports', async () => { const browser = await next.browser('/css/css-external') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('main')).paddingTop` ), '80px' ) }) }) describe('server pages', () => { it('should support global css inside server pages', async () => { const browser = await next.browser('/css/css-page') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ), 'rgb(255, 0, 0)' ) }) it('should support css modules inside server pages', async () => { const browser = await next.browser('/css/css-page') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('#cssm')).color` ), 'rgb(0, 0, 255)' ) }) it('should not contain pages css in app dir page', async () => { const html = await next.render('/css/css-page') expect(html).not.toContain('/pages/_app.css') }) }) describe('client layouts', () => { it('should support css modules inside client layouts', async () => { const browser = await next.browser('/client-nested') // Should render h1 in red await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ), 'rgb(255, 0, 0)' ) }) it('should support global css inside client layouts', async () => { const browser = await next.browser('/client-nested') // Should render button in red await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('button')).color` ), 'rgb(255, 0, 0)' ) }) }) describe('client pages', () => { it('should support css modules inside client pages', async () => { const browser = await next.browser('/client-component-route') // Should render p in red await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('p')).color` ), 'rgb(255, 0, 0)' ) }) it('should support global css inside client pages', async () => { const browser = await next.browser('/client-component-route') // Should render `b` in blue await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('b')).color` ), 'rgb(0, 0, 255)' ) }) }) describe('client components', () => { it('should support css modules inside client page', async () => { const browser = await next.browser('/css/css-client') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('#css-modules')).fontSize` ), '100px' ) }) it('should support css modules inside client components', async () => { const browser = await next.browser('/css/css-client/inner') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('#client-component')).fontSize` ), '100px' ) }) }) describe('special entries', () => { it('should include css imported in loading.js', async () => { const $ = await next.render$('/loading-bug/hi') // The link tag should be hoist into head with precedence properties expect($('head link[data-precedence]').length).toBe(2) expect($('body h2').text()).toBe('Loading...') }) it('should include css imported in client template.js', async () => { const browser = await next.browser('/template/clientcomponent') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('button')).fontSize` ), '100px' ) }) it('should include css imported in server template.js', async () => { const browser = await next.browser('/template/servercomponent') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ), 'rgb(255, 0, 0)' ) }) it('should include css imported in client not-found.js', async () => { const browser = await next.browser('/not-found/clientcomponent') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ), 'rgb(255, 0, 0)' ) }) it('should include css imported in server not-found.js', async () => { const browser = await next.browser('/not-found/servercomponent') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ), 'rgb(255, 0, 0)' ) }) it('should include root layout css for root not-found.js', async () => { const browser = await next.browser('/this-path-does-not-exist') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ), 'rgb(210, 105, 30)' ) }) it('should include css imported in root not-found.js', async () => { const browser = await next.browser('/random-non-existing-path') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ), 'rgb(210, 105, 30)' ) await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('h1')).backgroundColor` ), 'rgb(0, 0, 0)' ) }) it('should include css imported in error.js', async () => { const browser = await next.browser('/error/client-component') await browser.elementByCss('button').click() // Wait for error page to render and CSS to be loaded await new Promise((resolve) => setTimeout(resolve, 2000)) await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('button')).fontSize` ), '50px' ) }) }) describe('page extensions', () => { it('should include css imported in MDX pages', async () => { const browser = await next.browser('/mdx') await check( async () => await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ), 'rgb(255, 0, 0)' ) }) }) describe('chunks', () => { it('should bundle css resources into chunks', async () => { const html = await next.render('/dashboard') expect( [ ...html.matchAll( /<link rel="stylesheet" href="[^<]+\.css(\?v=\d+)?"/g ), ].length ).toBe(3) }) }) describe('css ordering', () => { it('should have inner layers take precedence over outer layers', async () => { const browser = await next.browser('/ordering') expect( await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ) ).toBe('rgb(255, 0, 0)') expect( await browser.eval( `window.getComputedStyle(document.querySelector('h2')).color` ) ).toBe('rgb(255, 0, 0)') }) }) if (isNextDev) { it('should not affect css orders during HMR', async () => { const filePath = 'app/ordering/page.js' const origContent = await next.readFile(filePath) // h1 should be red const browser = await next.browser('/ordering') expect( await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ) ).toBe('rgb(255, 0, 0)') expect( await browser.eval( `window.getComputedStyle(document.querySelector('h2')).color` ) ).toBe('rgb(255, 0, 0)') try { await next.patchFile( filePath, origContent.replace('<h1>Hello</h1>', '<h1>Hello!</h1>') ) // Wait for HMR to trigger await check( () => browser.eval(`document.querySelector('h1').textContent`), 'Hello!' ) expect( await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ) ).toBe('rgb(255, 0, 0)') expect( await browser.eval( `window.getComputedStyle(document.querySelector('h2')).color` ) ).toBe('rgb(255, 0, 0)') } finally { await next.patchFile(filePath, origContent) } }) // Turbopack doesn't preload styles if (!process.env.TURBOPACK) { it('should not preload styles twice during HMR', async () => { const filePath = 'app/hmr/page.js' const origContent = await next.readFile(filePath) const browser = await next.browser('/hmr') try { await next.patchFile( filePath, origContent.replace( '<div>hello!</div>', '<div>hello world!</div>' ) ) // Wait for HMR to trigger await check( () => browser.elementByCss('body').text(), 'hello world!' ) // there should be only 1 preload link expect( await browser.eval( `(() => { const tags = document.querySelectorAll('link[rel="preload"][href^="/_next/static/css"]') const counts = new Map(); for (const tag of tags) { counts.set(tag.href, (counts.get(tag.href) || 0) + 1) } return Math.max(...counts.values()) })()` ) ).toBe(1) } finally { await next.patchFile(filePath, origContent) } }) } it('should reload @import styles during HMR', async () => { const filePath = 'app/hmr/import/actual-styles.css' const origContent = await next.readFile(filePath) // background should be red const browser = await next.browser('/hmr/import') expect( await browser.eval( `window.getComputedStyle(document.querySelector('body')).backgroundColor` ) ).toBe('rgb(255, 0, 0)') try { await next.patchFile( filePath, origContent.replace( 'background-color: red;', 'background-color: blue;' ) ) // Wait for HMR to trigger await check( () => browser.eval( `window.getComputedStyle(document.querySelector('body')).backgroundColor` ), 'rgb(0, 0, 255)' ) } finally { await next.patchFile(filePath, origContent) } }) describe('multiple entries', () => { it.skip('should only inject the same style once if used by different layers', async () => { const browser = await next.browser('/css/css-duplicate-2/client') expect( await browser.eval( `[...document.styleSheets].filter(({ cssRules }) => [...cssRules].some(({ cssText }) => (cssText||'').includes('_randomized_string_for_testing_')) ).length` ) ).toBe(1) }) it('should deduplicate styles on the module level', async () => { const browser = await next.browser('/css/css-conflict-layers') await check( () => browser.eval( `window.getComputedStyle(document.querySelector('.btn:not(.btn-blue)')).backgroundColor` ), 'rgb(255, 255, 255)' ) await check( () => browser.eval( `window.getComputedStyle(document.querySelector('.btn.btn-blue')).backgroundColor` ), 'rgb(0, 0, 255)' ) }) it('should only include the same style once in the flight data', async () => { const initialHtml = await next.render('/css/css-duplicate-2/server') if (process.env.TURBOPACK) { expect( initialHtml.match(/app_css_css-duplicate-2_[\w]+\.css/g).length ).toBe(5) } else { // Even if it's deduped by Float, it should still only be included once in the payload. const matches = initialHtml .match(/\/_next\/static\/css\/.+?\.css/g) .sort() // Heavy on testing React implementation details. // Assertions may change often but what needs to be checked on change is if styles are needlessly duplicated in Flight data // There are 3 matches, one for the rendered <link> (HTML), one for Float preload (Flight) and one for the <link> inside Flight payload. // And there is one match for the not found style if (isPPREnabledByDefault) { expect(matches).toEqual([ // may be split across chunks when we bump React '/_next/static/css/app/css/css-duplicate-2/layout.css', '/_next/static/css/app/css/css-duplicate-2/layout.css', '/_next/static/css/app/css/css-duplicate-2/layout.css', '/_next/static/css/app/css/layout.css', '/_next/static/css/app/css/layout.css', '/_next/static/css/app/css/layout.css', '/_next/static/css/app/layout.css', '/_next/static/css/app/layout.css', '/_next/static/css/app/layout.css', '/_next/static/css/app/not-found.css', ]) } else { expect(matches).toEqual([ '/_next/static/css/app/css/css-duplicate-2/layout.css', '/_next/static/css/app/css/css-duplicate-2/layout.css', '/_next/static/css/app/css/css-duplicate-2/layout.css', '/_next/static/css/app/css/layout.css', '/_next/static/css/app/css/layout.css', '/_next/static/css/app/css/layout.css', '/_next/static/css/app/layout.css', '/_next/static/css/app/layout.css', '/_next/static/css/app/layout.css', '/_next/static/css/app/not-found.css', ]) } } }) it.skip('should only load chunks for the css module that is used by the specific entrypoint', async () => { // Visit /b first await next.render('/css/css-duplicate/b') const browser = await next.browser('/css/css-duplicate/a') expect( await browser.eval( `[...document.styleSheets].some(({ href }) => href.includes('/a/page.css'))` ) ).toBe(true) // Should not load the chunk from /b expect( await browser.eval( `[...document.styleSheets].some(({ href }) => href.includes('/b/page.css'))` ) ).toBe(false) }) }) } }) describe('sass support', () => { describe('server layouts', () => { it('should support global sass/scss inside server layouts', async () => { const browser = await next.browser('/css/sass/inner') // .sass expect( await browser.eval( `window.getComputedStyle(document.querySelector('#sass-server-layout')).color` ) ).toBe('rgb(165, 42, 42)') // .scss expect( await browser.eval( `window.getComputedStyle(document.querySelector('#scss-server-layout')).color` ) ).toBe('rgb(222, 184, 135)') }) it('should support sass/scss modules inside server layouts', async () => { const browser = await next.browser('/css/sass/inner') // .sass expect( await browser.eval( `window.getComputedStyle(document.querySelector('#sass-server-layout')).backgroundColor` ) ).toBe('rgb(233, 150, 122)') // .scss expect( await browser.eval( `window.getComputedStyle(document.querySelector('#scss-server-layout')).backgroundColor` ) ).toBe('rgb(139, 0, 0)') }) }) describe('server pages', () => { it('should support global sass/scss inside server pages', async () => { const browser = await next.browser('/css/sass/inner') // .sass expect( await browser.eval( `window.getComputedStyle(document.querySelector('#sass-server-page')).color` ) ).toBe('rgb(245, 222, 179)') // .scss expect( await browser.eval( `window.getComputedStyle(document.querySelector('#scss-server-page')).color` ) ).toBe('rgb(255, 99, 71)') }) it('should support sass/scss modules inside server pages', async () => { const browser = await next.browser('/css/sass/inner') // .sass expect( await browser.eval( `window.getComputedStyle(document.querySelector('#sass-server-page')).backgroundColor` ) ).toBe('rgb(75, 0, 130)') // .scss expect( await browser.eval( `window.getComputedStyle(document.querySelector('#scss-server-page')).backgroundColor` ) ).toBe('rgb(0, 255, 255)') }) }) describe('client layouts', () => { it('should support global sass/scss inside client layouts', async () => { const browser = await next.browser('/css/sass-client/inner') // .sass expect( await browser.eval( `window.getComputedStyle(document.querySelector('#sass-client-layout')).color` ) ).toBe('rgb(165, 42, 42)') // .scss expect( await browser.eval( `window.getComputedStyle(document.querySelector('#scss-client-layout')).color` ) ).toBe('rgb(222, 184, 135)') }) it('should support sass/scss modules inside client layouts', async () => { const browser = await next.browser('/css/sass-client/inner') // .sass expect( await browser.eval( `window.getComputedStyle(document.querySelector('#sass-client-layout')).backgroundColor` ) ).toBe('rgb(233, 150, 122)') // .scss expect( await browser.eval( `window.getComputedStyle(document.querySelector('#scss-client-layout')).backgroundColor` ) ).toBe('rgb(139, 0, 0)') }) }) describe('client pages', () => { it('should support global sass/scss inside client pages', async () => { const browser = await next.browser('/css/sass-client/inner') // .sass await check( () => browser.eval( `window.getComputedStyle(document.querySelector('#sass-client-page')).color` ), 'rgb(245, 222, 179)' ) // .scss await check( () => browser.eval( `window.getComputedStyle(document.querySelector('#scss-client-page')).color` ), 'rgb(255, 99, 71)' ) }) it('should support sass/scss modules inside client pages', async () => { const browser = await next.browser('/css/sass-client/inner') // .sass expect( await browser.eval( `window.getComputedStyle(document.querySelector('#sass-client-page')).backgroundColor` ) ).toBe('rgb(75, 0, 130)') // .scss expect( await browser.eval( `window.getComputedStyle(document.querySelector('#scss-client-page')).backgroundColor` ) ).toBe('rgb(0, 255, 255)') }) }) }) // Pages directory shouldn't be affected when `appDir` is enabled describe('pages dir', () => { if (!isNextDev) { it('should include css modules and global css after page transition', async () => { const browser = await next.browser('/css-modules/page1') await browser.elementByCss('a').click() await browser.waitForElementByCss('#page2') expect( await browser.eval( `window.getComputedStyle(document.querySelector('h1')).backgroundColor` ) ).toBe('rgb(205, 92, 92)') expect( await browser.eval( `window.getComputedStyle(document.querySelector('.page-2')).backgroundColor` ) ).toBe('rgb(255, 228, 181)') }) } }) describe('HMR', () => { if (isNextDev) { it('should support HMR for CSS imports in server components', async () => { const filePath = 'app/css/css-page/style.css' const origContent = await next.readFile(filePath) // h1 should be red const browser = await next.browser('/css/css-page') expect( await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ) ).toBe('rgb(255, 0, 0)') try { await next.patchFile(filePath, origContent.replace('red', 'blue')) // Wait for HMR to trigger await check( () => browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ), 'rgb(0, 0, 255)' ) } finally { await next.patchFile(filePath, origContent) } }) it('should support HMR for CSS imports in client components', async () => { const filePath = 'app/css/css-client/client-page.css' const origContent = await next.readFile(filePath) // h1 should be red const browser = await next.browser('/css/css-client') expect( await browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ) ).toBe('rgb(255, 0, 0)') try { await next.patchFile(filePath, origContent.replace('red', 'blue')) await check( () => browser.eval( `window.getComputedStyle(document.querySelector('h1')).color` ), 'rgb(0, 0, 255)' ) } finally { await next.patchFile(filePath, origContent) } }) it('should not break HMR when CSS is imported in a server component', async () => { const filePath = 'app/hmr/page.js' const origContent = await next.readFile(filePath) const browser = await next.browser('/hmr') await browser.eval(`window.__v = 1`) try { await next.patchFile(filePath, origContent.replace('hello!', 'hmr!')) await check(() => browser.elementByCss('body').text(), 'hmr!') // Make sure it doesn't reload the page expect(await browser.eval(`window.__v`)).toBe(1) } finally { await next.patchFile(filePath, origContent) } }) it('should not create duplicate link tags during HMR', async () => { const filePath = 'app/hmr/global.css' const origContent = await next.readFile(filePath) const browser = await next.browser('/hmr') try { await next.patchFile( filePath, origContent.replace('background: gray;', 'background: red;') ) await check( () => browser.eval( `window.getComputedStyle(document.querySelector('body')).backgroundColor` ), 'rgb(255, 0, 0)' ) await check( () => browser.eval( `(() => { const tags = document.querySelectorAll('link[rel="stylesheet"][href^="/_next/static"]') const counts = new Map(); for (const tag of tags) { counts.set(tag.href, (counts.get(tag.href) || 0) + 1) } return Math.max(...counts.values()) })()` ), 1 ) } finally { await next.patchFile(filePath, origContent) } }) it('should support HMR with sass/scss', async () => { const filePath1 = 'app/css/sass/global.scss' const origContent1 = await next.readFile(filePath1) const filePath2 = 'app/css/sass/global.sass' const origContent2 = await next.readFile(filePath2) const browser = await next.browser('/css/sass/inner') // .scss expect( await browser.eval( `window.getComputedStyle(document.querySelector('#scss-server-layout')).color` ) ).toBe('rgb(222, 184, 135)') // .sass expect( await browser.eval( `window.getComputedStyle(document.querySelector('#sass-server-layout')).color` ) ).toBe('rgb(165, 42, 42)') try { await next.patchFile( filePath1, origContent1.replace('color: burlywood;', 'color: red;') ) await check( () => browser.eval( `window.getComputedStyle(document.querySelector('#scss-server-layout')).color` ), 'rgb(255, 0, 0)' ) } finally { await next.patchFile(filePath1, origContent1) } try { await next.patchFile( filePath2, origContent2.replace('color: brown', 'color: red') ) await check( () => browser.eval( `window.getComputedStyle(document.querySelector('#sass-server-layout')).color` ), 'rgb(255, 0, 0)' ) } finally { await next.patchFile(filePath2, origContent2) } }) } }) if (isNextDev) { describe('Suspensey CSS', () => { it('should suspend on CSS imports if its slow on client navigation', async () => { const browser = await next.browser('/suspensey-css') await browser.elementByCss('#slow').click() await check(() => browser.eval(`document.body.innerText`), 'Get back') await check(async () => { return await browser.eval(`window.__log`) }, /background = rgb\(255, 255, 0\)/) }) }) } }) ```
Jessica Muscat (born 27 February 1989 in Mosta, Malta), more commonly known as Jessika is a Maltese singer and actress. She represented San Marino in the Eurovision Song Contest 2018 in Lisbon, Portugal, with the song "Who We Are", alongside Jenifer Brening. She had previously attempted to represent her home country every year from 2008 to 2017 and in the Junior Eurovision Song Contest 2004 with the song "Precious Time". As an actress, she plays the character of Emma on daily Maltese soap opera Ħbieb u Għedewwa. Eurovision attempts Junior Eurovision Song Contest Maltese national selection Eurovision Song Contest Maltese national selection Sammarinese national selection Discography Singles Notes References 1989 births Living people Eurovision Song Contest entrants of 2018 21st-century Maltese women singers 21st-century Maltese singers People from Mosta Eurovision Song Contest entrants for San Marino
```xml <?xml version="1.0" encoding="utf-8"?> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="path_to_url" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd"> <file datatype="xml" source-language="en" target-language="ja" original="../LocalizableStrings.resx"> <body> <trans-unit id="DotnetWorkloadInfoLabel"> <source>.NET workloads installed:</source> <target state="translated"> .NET :</target> <note /> </trans-unit> <trans-unit id="MalformedText"> <source>Malformed command text '{0}'</source> <target state="translated"> '{0}'</target> <note /> </trans-unit> <trans-unit id="NoExecutableFoundMatchingCommandErrorMessage"> <source>Could not execute because the specified command or file was not found.</source> <target state="translated"></target> <note /> </trans-unit> <trans-unit id="UnableToLocateDotnetMultiplexer"> <source>Unable to locate dotnet multiplexer</source> <target state="translated">dotnet </target> <note /> </trans-unit> <trans-unit id="FileNotFound"> <source>File not found `{0}`.</source> <target state="translated">: `{0}`</target> <note /> </trans-unit> <trans-unit id="ProjectNotRestoredOrRestoreFailed"> <source>The project may not have been restored or restore failed - run `dotnet restore`</source> <target state="translated">`dotnet restore` </target> <note /> </trans-unit> <trans-unit id="NoExecutableFoundMatchingCommand"> <source>Possible reasons for this include: * You misspelled a built-in dotnet command. * You intended to execute a .NET program, but {0} does not exist. * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.</source> <target state="translated">: * dotnet * .NET {0} * dotnet PATH </target> <note /> </trans-unit> <trans-unit id="WaitingForDebuggerToAttach"> <source>Waiting for debugger to attach. Press ENTER to continue</source> <target state="translated">ENTER </target> <note /> </trans-unit> <trans-unit id="ProcessId"> <source>Process ID: {0}</source> <target state="translated"> ID: {0}</target> <note /> </trans-unit> <trans-unit id="CouldNotAccessAssetsFile"> <source>Could not access assets file.</source> <target state="translated"></target> <note /> </trans-unit> <trans-unit id="WriteLineForwarderSetPreviously"> <source>WriteLine forwarder set previously</source> <target state="translated"> WriteLine </target> <note /> </trans-unit> <trans-unit id="AlreadyCapturingStream"> <source>Already capturing stream!</source> <target state="translated">!</target> <note /> </trans-unit> <trans-unit id="RunningFileNameArguments"> <source>Running {0} {1}</source> <target state="translated">{0} {1} </target> <note /> </trans-unit> <trans-unit id="ProcessExitedWithCode"> <source>&lt; {0} exited with {1} in {2} ms.</source> <target state="translated">&lt; {0} {2} {1} </target> <note /> </trans-unit> <trans-unit id="UnableToInvokeMemberNameAfterCommand"> <source>Unable to invoke {0} after the command has been run</source> <target state="translated">{0} </target> <note /> </trans-unit> <trans-unit id="DotNetSdkInfoLabel"> <source>.NET SDK:</source> <target state="translated">.NET SDK:</target> <note /> </trans-unit> <trans-unit id="DotNetRuntimeInfoLabel"> <source>Runtime Environment:</source> <target state="translated">:</target> <note /> </trans-unit> <trans-unit id="EmbedAppNameInHostAppHostHasBeenModified"> <source>Unable to use '{0}' as application host executable as it does not contain the expected placeholder byte sequence '{1}' that would mark where the application name would be written.</source> <target state="translated">'{0}' '{1}' </target> <note /> </trans-unit> <trans-unit id="EmbedAppNameInHostFileNameIsTooLong"> <source>Given file name '{0}' is longer than 1024 bytes</source> <target state="translated"> '{0}' 1024 </target> <note /> </trans-unit> <trans-unit id="CannotFindCommandAvailableAsTool"> <source>Cannot find command 'dotnet {0}', run the following command to install dotnet tool install --global {1}</source> <target state="translated"> 'dotnet {0}' dotnet tool install --global {1} </target> <note /> </trans-unit> <trans-unit id="DotnetCliHomeUsed"> <source>Using home directory '{0}' set by the '{1}' environment variable.</source> <target state="translated">'{1}' '{0}' </target> <note /> </trans-unit> <trans-unit id="DotNetSdkInfo"> <source>.NET SDK</source> <target state="translated">.NET SDK</target> <note /> </trans-unit> </body> </file> </xliff> ```
Simpsonville is an unincorporated community in northwestern Upshur County, Texas, United States. Originally named Chelsea when founded in the 1850s, the town name was changed to Simpsonville on April 22, 1858, in honor of an early settler. Highway signage and road maps indicate this community is named Thomas, due to a subsequent renaming of the town occasioned in 1913 when the town's application for a new post office—the most recent post office had been closed in 1906 by postal officials—had been rejected on the grounds that a Matagorda County town called Simpsonville had just been granted a post office. Notes Unincorporated communities in Texas Unincorporated communities in Upshur County, Texas
```go // _ _ // __ _____ __ ___ ___ __ _| |_ ___ // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ // \ V V / __/ (_| |\ V /| | (_| | || __/ // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| // // // CONTACT: hello@weaviate.io // package test import ( "encoding/json" "fmt" "os" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/weaviate/weaviate/test/helper" graphqlhelper "github.com/weaviate/weaviate/test/helper/graphql" "github.com/weaviate/weaviate/test/helper/sample-schema/books" ) func Test_Bind(t *testing.T) { helper.SetupClient(os.Getenv(weaviateEndpoint)) booksClass := books.ClassBindVectorizer() helper.CreateClass(t, booksClass) defer helper.DeleteClass(t, booksClass.Class) t.Run("add data to Books schema", func(t *testing.T) { for _, book := range books.Objects() { helper.CreateObject(t, book) helper.AssertGetObjectEventually(t, book.Class, book.ID) } }) tests := []struct { concept string expectedTitle string }{ { concept: "Dune", expectedTitle: "Dune", }, { concept: "three", expectedTitle: "The Lord of the Ice Garden", }, } for _, tt := range tests { t.Run("query Books data with nearText", func(t *testing.T) { result := graphqlhelper.AssertGraphQL(t, helper.RootAuth, fmt.Sprintf(` { Get { Books( limit: 1 nearText: { concepts: ["%v"] distance: 0.5 } ){ title _additional { distance } } } } `, tt.concept)) books := result.Get("Get", "Books").AsSlice() require.Len(t, books, 1) title := books[0].(map[string]interface{})["title"] assert.Equal(t, tt.expectedTitle, title) distance := books[0].(map[string]interface{})["_additional"].(map[string]interface{})["distance"].(json.Number) assert.NotNil(t, distance) dist, err := distance.Float64() require.Nil(t, err) assert.Greater(t, dist, 0.0) }) } } ```
```java /** * Tencent is pleased to support the open source community by making APT available. * path_to_url */ package com.tencent.wstt.apt.statistics.actions; import org.eclipse.jface.action.Action; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.dnd.Clipboard; import org.eclipse.swt.dnd.TextTransfer; import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; import com.tencent.wstt.apt.stubanalysis.data.SourceDataItem; /** * @Description * @date 20131110 6:02:58 * */ public class CopySelectedItemsFromTableViewAction extends Action { TableViewer viewer; private Clipboard clipboard; public CopySelectedItemsFromTableViewAction(TableViewer viewer) { this.viewer = viewer; } @Override public void run() { StringBuffer sb = getContents(); clipboard = new Clipboard(Display.getCurrent()); Transfer[] transfers = new Transfer[] { TextTransfer .getInstance() }; clipboard.setContents(new String[]{sb.toString()}, transfers); } /** * tableview * @return */ private StringBuffer getContents() { StringBuffer sb = new StringBuffer(); Table table = viewer.getTable(); TableItem[] selectedItems = table.getSelection(); int itemCount = selectedItems.length; int columnCount = table.getColumnCount(); for(int i = 0; i < itemCount; i++) { for(int j = 0; j < columnCount; j++) { sb.append(selectedItems[i].getText(j)); sb.append(SourceDataItem.SPLIT); } sb.deleteCharAt(sb.length() - 1); sb.append("\r\n"); } return sb; } } ```
Star Boating Club is a Wellington based rowing club, situated on the waterfront adjacent to Whairepo Lagoon. It is the oldest rowing club in Wellington, having existed since 1866. Star is one of New Zealand's oldest active rowing clubs and sporting organisations. It is home to rowers of all ages. Its club building is classified as a "Category I" ("places of 'special or outstanding historical or cultural heritage significance or value'") historic place by Heritage New Zealand. History Star Boating Club was conceived in 1866, when a meeting was called to discuss "formation of a Wellington Regatta Club". The club was formalised as the "Star Regatta Club" in 1867, with four boats. The name was changed shortly afterwards to Star Boating Club. In 1881, Star and Union Rowing Club Christchurch first instituted 'club rowing races' as they are known today. By 1903, Star's membership had blossomed to over 400 people. The club went through darker times during the Great Depression, and 150 and 117 Star members shipped out to serve in World War I and II, respectively. So many members served in WWII that a 'Star Platoon' was attached to the Wellington Regiment's 'B Company'. Star members at the time included George Cooke (the club's top oarsman in the 1920s and 30s who was killed in action in WWII) and Lord Freyberg (of Freyberg Pool fame, former Governor General and Victoria Cross recipient). Indeed, the 50th anniversary of the club itself was postponed ten years because of the advent of WWII. The club celebrated its 150-year anniversary in 2016. It maintains a strong membership of Wellingtonians who still deem it an honour to wear the blue and white colours. Building Star Boating Club has had three club houses. Over the years, the expansion of Wellington City and the development of its shoreline necessitated the Club to move four times. The first two club houses were sheds. The first shed was near the site of the Wellington Cenotaph. In 1874 the club moved to its second shed next to Plimmer's Wharf on Victoria Street. By 1883 the club needed to move again and it was at this point that the current building for the club was built. It was designed by club member and architect William Chatfield. The building was built on sleepers so that as more reclamation took place, it could be moved closer to the shore. It was officially opened on 7 June 1886 and shifted on rails, towed by a steam engine, in 1889. Renovation and refurbishment As part of the redevelopment of Wellington's waterfront in 1989 the building was relocated to its current site. At this time it was also extensively refurbished. Following the 2011 Christchurch earthquake, the clubhouse was earthquake-strengthened. Downstage Theatre and civic venue Between 1969 and 1973 Downstage Theatre occupied the clubrooms while the rowing club continued to operate from the ground floor. The building has also been used for major events in Wellington, including the 1992 Fringe Festival, the 1993 Gay and Lesbian Devotion Festival, and the International Festival of the Arts in 1994 and 1996. Notable members George Bridgewater George Cooke Lord Bernard Freyberg John Gibbons Peter Taylor Ruby Tew Louise Trappitt Membership Star Boating Club caters for all levels of rowing from juniors to masters and has produced many successful national and international rowers. Affiliated schools Queen Margaret College Rongotai College Scots College Wellington East Girls' College Wellington College Wellington Girls' College Wellington High School References External links Official site Rowing clubs in New Zealand Sport in Wellington City Buildings and structures in Wellington City Heritage New Zealand Category 1 historic places in the Wellington Region 1880s architecture in New Zealand Wellington Harbour
```go package useragent_test import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/cri-o/cri-o/server/useragent" ) // The actual test suite. var _ = t.Describe("Useragent", func() { t.Describe("Get", func() { It("should succeed", func() { // Given // When result, err := useragent.Get() // Then Expect(err).ToNot(HaveOccurred()) Expect(result).To(SatisfyAll( ContainSubstring("cri-o"), ContainSubstring("os"), ContainSubstring("arch"), )) }) }) }) ```
```xml /* eslint-disable jest/no-export */ import { readFileSync } from "fs" import { join as pathJoin } from "path" import _ from "lodash" import { GitLabDSL } from "../../../dsl/GitLabDSL" import { GitDSL, GitJSONDSL } from "../../../dsl/GitDSL" import GitLab, { gitlabJSONToGitLabDSL } from "../../GitLab" import GitLabAPI, { getGitLabAPICredentialsFromEnv } from "../GitLabAPI" import { gitLabGitDSL as gitJSONToGitDSL, gitlabChangesToDiff } from "../GitLabGit" const fixtures = pathJoin(__dirname, "fixtures") /** Returns a fixture. */ const loadFixture = (path: string): string => readFileSync(pathJoin(fixtures, path), {}).toString().replace(/\r/g, "") /** Returns JSON from the fixtured dir */ export const requestWithFixturedJSON = (path: string, field = ""): (() => Promise<any>) => () => { let data = JSON.parse(loadFixture(path)) if (field) { data = _.get(data, field) } return Promise.resolve(data) } /** Returns arbitrary text value from a request */ export const requestWithFixturedContent = (path: string): (() => Promise<string>) => () => Promise.resolve(loadFixture(path)) /** * HACKish: Jest on Windows seems to include some additional * whitespace that differs from non-Windows snapshot output, * so we strip these until we can better-address the issue. */ const stripWhitespaceForSnapshot = (str: string) => { return str.replace(/\s/g, "") } const MRInfoFixture = "getMergeRequestInfo.json" const changedFilePath = "danger/roulette/Dangerfile" const baseSHA = JSON.parse(readFileSync(pathJoin(fixtures, MRInfoFixture), {}).toString())[0].response.diff_refs .base_sha describe("GitLabGit DSL", () => { let gitlab: GitLab = {} as any let gitJSONDSL: GitJSONDSL = {} as any let gitlabDSL: GitLabDSL = {} as any let gitDSL: GitDSL = {} as any beforeEach(async () => { const api = new GitLabAPI( { pullRequestID: "27117", repoSlug: "gitlab-org/gitlab-foss" }, getGitLabAPICredentialsFromEnv({ DANGER_GITLAB_HOST: "gitlab.com", DANGER_GITLAB_API_TOKEN: "FAKE_DANGER_GITLAB_API_TOKEN", }) ) gitlab = new GitLab(api) // Actually used const defaultField = "0.response" api.getMergeRequestInfo = requestWithFixturedJSON(MRInfoFixture, defaultField) api.getMergeRequestApprovals = requestWithFixturedJSON("getMergeRequestApprovals.json", defaultField) api.getMergeRequestCommits = requestWithFixturedJSON("getMergeRequestCommits.json", defaultField) api.getMergeRequestDiffs = requestWithFixturedJSON("getMergeRequestDiffs.json", defaultField) api.getCompareChanges = requestWithFixturedJSON("getCompareChanges.json", `${defaultField}.diffs`) gitJSONDSL = await gitlab.getPlatformGitRepresentation() const gitlabJSONDSL = await gitlab.getPlatformReviewDSLRepresentation() gitlabDSL = gitlabJSONToGitLabDSL(gitlabJSONDSL as GitLabDSL, api) const before = await requestWithFixturedContent("fileContentsBefore.txt")() const after = await requestWithFixturedContent("fileContentsAfter.txt")() gitlabDSL.utils.fileContents = async (_path, _repo, ref) => { if (_path !== changedFilePath) { return "" } return ref === baseSHA ? before : after } gitDSL = gitJSONToGitDSL(gitlabDSL, gitJSONDSL, gitlab.api) }) it("show diff chunks for a specific file", async () => { const { chunks } = (await gitDSL.structuredDiffForFile(changedFilePath))! expect(chunks).toMatchSnapshot() }) it("shows the diff for a specific file", async () => { const { diff } = (await gitDSL.diffForFile(changedFilePath))! expect(stripWhitespaceForSnapshot(diff)).toMatchSnapshot() }) describe("textDiffForFile", () => { it("returns a null for files not in the change list", async () => { const empty = await gitDSL.diffForFile("fuhqmahgads.json") expect(empty).toEqual(null) }) it("returns a diff for modified files", async () => { gitDSL = gitJSONToGitDSL(gitlabDSL, gitJSONDSL, gitlab.api) const diff = (await gitDSL.diffForFile(changedFilePath))! expect(diff).toMatchSnapshot() }) }) describe("gitlabChangesToDiff", () => { it("should convert changes to diff", async () => { const { diffs: changes } = await requestWithFixturedJSON("gitlab_changes.json")() const diff = gitlabChangesToDiff(changes) expect(diff).toMatchSnapshot() }) }) }) ```
The women's 800 metres at the 2023 World Athletics Championships was held at the National Athletics Centre in Budapest from 23 to 27 August 2023. Summary Featuring the reigning Olympic, World, Commonwealth and European champions, who between them had dominated the global podiums since Tokyo in 2021, the women's 800 metres was one of the most hottly anticipated races of the championships. After winning the 2020 Olympics and 2022 World Championships, Athing Mu started looking for new horizons to conquer. Hurdler Sydney McLaughlin, also training under Bobby Kersee, staked out the 400 metres, so even though Mu was an NCAA Champion, sub-50 performer in that event, Mu focused her season efforts on the longer 1500 metres, only running one 800 metres race before these championships. 2022 silver medalist Keely Hodgkinson, who gave Mu a scare in Eugene, came in as the world leader for 2023; her only defeat, a tactical masterclass from Commonwealth champion Mary Moraa at the Paris Diamond League. Drama ensued in the semi-finals as Mu and Prudence Sekgodiso collided, turning her sideways. After recovering her balance, Mu had to run around five athletes to get back to a qualifying second place behind 2022 bronze medalist Mary Moraa. British number two Jemma Reekie, under a fresh coaching team, impressed in the semi-final to put herself forward as a wild-card medal chance in the final. In the final, Mu went out fast, first to the break line with Moraa uncharacteristically holding back. She was followed by Hodgkinson, Moraa, and Reekie. Mu was occupying the outside of lane one, taking as much space as possible. The group stayed together as the bell came at a swift but not brutal 56.6. Through the penultimate turn and down the backstretch, Mu tried to get separation, but with her backwards-leaning running style, Moraa would not going away. Hodgkinson and Reekie stayed tucked in close behind to make it a foursome. Having spent most of the race in lane two, coming into the home stretch, Moraa launched her kick, followed by Hodgkinson on the inside. When challenged, Mu had no answer. Moraa passed on the outside, and then Hodgkinson passed on the inside. Moraa continued on to a two-metre victory over Hodgkinson, who had her first major championship victory over Mu, but had to settle for a third consecutive global silver medal. Mu held on to finish two metres behind Hodgkinson for bronze, still six metres ahead of fast-closing Raevyn Rogers, passing Reekie as she had done in Tokyo. The race was acclaimed as one of the highlights of the championships, reinforcing the emerging and dramatic three-way rivalry between Moraa, Mu and Hodgkinson set to dominate the event for years to come, and acknowledging Reekie as one of the women most likely to bridge the gap to the Big Three. Records Before the competition, records were as follows: Qualification standard The standard to qualify automatically for entry was 1:59.80. Schedule The event schedule, in local time (UTC+2), was as follows: Results Heats The first 3 athletes in each heat (Q) and the next 3 fastest (q) qualified for the semi-finals. Semi-finals The first 2 athletes in each heat (Q) and the next 2 fastest (q) qualified for the final. Final The final was started on 27 August at 20:45. References 800 800 metres at the World Athletics Championships
Keith and Cullen is one of the eight wards used to elect members of the Moray Council. It elects three Councillors. Councillors Election results 2022 Moray Council election 2017 Moray Council election 2012 Moray Council election 2007 Moray Council election References Wards of Moray
```javascript import bestSubSequence from "./lcs"; /** * Computes the differences between the two arrays. * * @param {array} a the base array * @param {array} b the target array * @param compareFunc the comparison function used to determine equality (a, b) => boolean * @return {object} the difference between the arrays */ export function diff( a, b, compareFunc = (ia, ib) => ia === ib ) { const ret = { removed: [], added: [], }; bestSubSequence( a, b, compareFunc, (type, oldArr, oldStart, oldEnd, newArr, newStart, newEnd) => { if (type === "add") { for (let i = newStart; i < newEnd; ++i) { ret.added.push(newArr[i]); } } else if (type === "remove") { for (let i = oldStart; i < oldEnd; ++i) { ret.removed.push(oldArr[i]); } } } ); return ret; } ```
Bingley Hall (also known as New Bingley Hall to distinguish itself from the Bingley Hall in Birmingham) is an exhibition hall located in Stafford, England, on the site of the Staffordshire County Showground. During the 1970s and 1980s it was a very popular concert venue. History Notable performers include Bob Marley & The Wailers, Status Quo, Yes (3 sell out nights), The Rolling Stones, Pink Floyd, The Who, Rush, Black Sabbath, Genesis (who were filmed there in 1976 for Genesis: In Concert), Santana, David Bowie, ZZ Top, Motörhead, ABBA, Eagles, Barry Manilow, Kiss, Queen, Rainbow, and Bruce Springsteen and the E Street Band. References Music venues in Staffordshire Buildings and structures in Stafford
```objective-c /*============================================================================= Library: CppMicroServices file at the top-level directory of this distribution and at path_to_url . path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. =============================================================================*/ #ifndef CPPMICROSERVICES_TESTDRIVERACTIVATOR_H #define CPPMICROSERVICES_TESTDRIVERACTIVATOR_H #include "cppmicroservices/BundleActivator.h" namespace cppmicroservices { class TestDriverActivator : public BundleActivator { public: TestDriverActivator(); static bool StartCalled(); void Start(BundleContext); void Stop(BundleContext); private: static TestDriverActivator* m_Instance; bool m_StartCalled; }; } #endif // CPPMICROSERVICES_TESTDRIVERACTIVATOR_H ```
```javascript Use `String.link` to create `<a>` tags without messy concatenation Async and defer scripts `top.location.href` Navigation Timing API MediaDevices.getUserMedia() ```
```java /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * * Subject to the condition set forth below, permission is hereby granted to any * person obtaining a copy of this software, associated documentation and/or * data (collectively the "Software"), free of charge and under any and all * copyright rights in the Software, and any and all patent rights owned or * freely licensable by each licensor hereunder covering either (i) the * unmodified Software as contributed to or provided by such licensor, or (ii) * the Larger Works (as defined below), to deal in both * * (a) the Software, and * * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if * one is included with the Software each a "Larger Work" to which the Software * is contributed by such licensors), * * without restriction, including without limitation the rights to copy, create * derivative works of, display, perform, and distribute the Software and make, * use, sell, offer for sale, import, export, have made, and have sold the * Software and the Larger Work(s), and to sublicense the foregoing rights on * either these or other terms. * * This license is subject to the following condition: * * The above copyright notice and either this complete permission notice or at a * minimum a reference to the UPL must be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.graalvm.nativeimage.impl; import java.util.Objects; /** * Represents a {@link ConfigurationCondition} during parsing before it is resolved in a context of * the classpath. */ public final class UnresolvedConfigurationCondition implements Comparable<UnresolvedConfigurationCondition> { private static final UnresolvedConfigurationCondition JAVA_LANG_OBJECT_REACHED = new UnresolvedConfigurationCondition(Object.class.getTypeName(), true); public static final String TYPE_REACHED_KEY = "typeReached"; public static final String TYPE_REACHABLE_KEY = "typeReachable"; private final String typeName; private final boolean runtimeChecked; public static UnresolvedConfigurationCondition create(String typeName, boolean runtimeChecked) { Objects.requireNonNull(typeName); if (JAVA_LANG_OBJECT_REACHED.getTypeName().equals(typeName)) { return JAVA_LANG_OBJECT_REACHED; } return new UnresolvedConfigurationCondition(typeName, runtimeChecked); } private UnresolvedConfigurationCondition(String typeName, boolean runtimeChecked) { this.typeName = typeName; this.runtimeChecked = runtimeChecked; } public static UnresolvedConfigurationCondition alwaysTrue() { return JAVA_LANG_OBJECT_REACHED; } public String getTypeName() { return typeName; } public boolean isRuntimeChecked() { return runtimeChecked; } public boolean isAlwaysTrue() { return typeName.equals(JAVA_LANG_OBJECT_REACHED.getTypeName()); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UnresolvedConfigurationCondition that = (UnresolvedConfigurationCondition) o; return runtimeChecked == that.runtimeChecked && Objects.equals(typeName, that.typeName); } @Override public int hashCode() { return Objects.hash(typeName, runtimeChecked); } @Override public int compareTo(UnresolvedConfigurationCondition o) { int res = Boolean.compare(runtimeChecked, o.runtimeChecked); if (res != 0) { return res; } return typeName.compareTo(o.typeName); } @Override public String toString() { var field = runtimeChecked ? TYPE_REACHED_KEY : TYPE_REACHABLE_KEY; return "[" + field + ": \"" + typeName + "\"" + "]"; } } ```
```objective-c // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! #ifndef V8DOMStringMap_h #define V8DOMStringMap_h #include "bindings/core/v8/ScriptWrappable.h" #include "bindings/core/v8/ToV8.h" #include "bindings/core/v8/V8Binding.h" #include "bindings/core/v8/V8DOMWrapper.h" #include "bindings/core/v8/WrapperTypeInfo.h" #include "core/CoreExport.h" #include "core/dom/DOMStringMap.h" #include "platform/heap/Handle.h" namespace blink { class V8DOMStringMap { public: CORE_EXPORT static bool hasInstance(v8::Local<v8::Value>, v8::Isolate*); static v8::Local<v8::Object> findInstanceInPrototypeChain(v8::Local<v8::Value>, v8::Isolate*); CORE_EXPORT static v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate*); static DOMStringMap* toImpl(v8::Local<v8::Object> object) { return toScriptWrappable(object)->toImpl<DOMStringMap>(); } CORE_EXPORT static DOMStringMap* toImplWithTypeCheck(v8::Isolate*, v8::Local<v8::Value>); CORE_EXPORT static const WrapperTypeInfo wrapperTypeInfo; static void refObject(ScriptWrappable*); static void derefObject(ScriptWrappable*); template<typename VisitorDispatcher> static void trace(VisitorDispatcher visitor, ScriptWrappable* scriptWrappable) { #if ENABLE(OILPAN) visitor->trace(scriptWrappable->toImpl<DOMStringMap>()); #endif } static void visitDOMWrapper(v8::Isolate*, ScriptWrappable*, const v8::Persistent<v8::Object>&); static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; static void installConditionallyEnabledProperties(v8::Local<v8::Object>, v8::Isolate*) { } static void preparePrototypeObject(v8::Isolate*, v8::Local<v8::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) { } }; template <> struct V8TypeOf<DOMStringMap> { typedef V8DOMStringMap Type; }; } // namespace blink #endif // V8DOMStringMap_h ```
```java Using specific exception types in the `throws` clause Converting stack trace to a string Use try-with-resources instead of `finally` Using exceptions in Java Most common reason behind **stack overflow** error ```
```javascript const { LuisRecognizer } = require('botbuilder-ai'); class FlightBookingRecognizer { constructor(config) { const luisIsConfigured = config && config.applicationId && config.endpointKey && config.endpoint; if (luisIsConfigured) { // Set the recognizer options depending on which endpoint version you want to use e.g v2 or v3. // More details can be found in path_to_url const recognizerOptions = { apiVersion: 'v3' }; this.recognizer = new LuisRecognizer(config, recognizerOptions); } } get isConfigured() { return (this.recognizer !== undefined); } /** * Returns an object with preformatted LUIS results for the bot's dialogs to consume. * @param {TurnContext} context */ async executeLuisQuery(context) { return await this.recognizer.recognize(context); } getFromEntities(result) { let fromValue, fromAirportValue; if (result.entities.$instance.From) { fromValue = result.entities.$instance.From[0].text; } if (fromValue && result.entities.From[0].Airport) { fromAirportValue = result.entities.From[0].Airport[0][0]; } return { from: fromValue, airport: fromAirportValue }; } getToEntities(result) { let toValue, toAirportValue; if (result.entities.$instance.To) { toValue = result.entities.$instance.To[0].text; } if (toValue && result.entities.To[0].Airport) { toAirportValue = result.entities.To[0].Airport[0][0]; } return { to: toValue, airport: toAirportValue }; } /** * This value will be a TIMEX. And we are only interested in a Date so grab the first result and drop the Time part. * TIMEX is a format that represents DateTime expressions that include some ambiguity. e.g. missing a Year. */ getTravelDate(result) { const datetimeEntity = result.entities.datetime; if (!datetimeEntity || !datetimeEntity[0]) return undefined; const timex = datetimeEntity[0].timex; if (!timex || !timex[0]) return undefined; const datetime = timex[0].split('T')[0]; return datetime; } } module.exports.FlightBookingRecognizer = FlightBookingRecognizer; ```
is a passenger railway station located in the city of Tatsuno, Hyōgo Prefecture, Japan, operated by West Japan Railway Company (JR West). Lines Sembon Station is served by the Kishin Line, and is located 27.6 kilometers from the terminus of the line at . Station layout The station consists of one ground-level side platform serving single bi-directional track. The station is unattended. History Senbon Station opened on March 24, 1934. With the privatization of the Japan National Railways (JNR) on April 1, 1987, the station came under the aegis of the West Japan Railway Company. Passenger statistics In fiscal 2019, the station was used by an average of 31 passengers daily. Surrounding area JA Hyogo Nishi Senbon Branch See also List of railway stations in Japan References External links Station Official Site Railway stations in Hyōgo Prefecture Kishin Line Railway stations in Japan opened in 1934 Tatsuno, Hyōgo
```java /******************************************************************************* * <p> * <p> * path_to_url * <p> * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *******************************************************************************/ package com.intuit.wasabi.repository.cassandra.impl; import com.datastax.driver.mapping.Result; import com.google.common.base.Preconditions; import com.google.inject.Inject; import com.intuit.wasabi.authenticationobjects.UserInfo; import com.intuit.wasabi.authenticationobjects.UserInfo.Username; import com.intuit.wasabi.feedbackobjects.UserFeedback; import com.intuit.wasabi.repository.FeedbackRepository; import com.intuit.wasabi.repository.RepositoryException; import com.intuit.wasabi.repository.cassandra.accessor.UserFeedbackAccessor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; /** * Cassandra implementation of FeedbackRepository * * @see FeedbackRepository */ public class CassandraFeedbackRepository implements FeedbackRepository { /** * Accessor */ private UserFeedbackAccessor userFeedbackAccessor; /** * Logger for the class */ protected static final Logger LOGGER = LoggerFactory.getLogger(CassandraFeedbackRepository.class); /** * Constructor * * @param userFeedbackAccessor */ @Inject public CassandraFeedbackRepository(UserFeedbackAccessor userFeedbackAccessor) { this.userFeedbackAccessor = userFeedbackAccessor; } /** * {@inheritDoc} */ @Override public void createUserFeedback(UserFeedback userFeedback) { LOGGER.debug("creating user feedback {}", userFeedback); try { userFeedbackAccessor.createUserFeedback(userFeedback.getUsername().getUsername(), userFeedback.getSubmitted(), userFeedback.getScore(), userFeedback.getComments(), userFeedback.isContactOkay(), userFeedback.getEmail()); } catch (Exception e) { LOGGER.error("Error while creating user feedback", e); throw new RepositoryException("Could not save feedback from user " + userFeedback, e); } } /** * {@inheritDoc} */ @Override public List<UserFeedback> getUserFeedback(UserInfo.Username username) throws RepositoryException { LOGGER.debug("Getting user feedback for {}", username); Preconditions.checkNotNull(username, "Parameter \"username\" cannot be null"); List<UserFeedback> feedbacks = new ArrayList<>(); try { Result<com.intuit.wasabi.repository.cassandra.pojo.UserFeedback> result = userFeedbackAccessor.getUserFeedback(username.getUsername()); feedbacks = makeFeedbacksFromResult(result); } catch (Exception e) { LOGGER.error("Error while getting feedback for user " + username.getUsername(), e); throw new RepositoryException("Could not retrieve feedback from user " + username, e); } return feedbacks; } /** * {@inheritDoc} */ @Override public List<UserFeedback> getAllUserFeedback() { LOGGER.debug("Getting all user feedbacks "); List<UserFeedback> feedbacks = new ArrayList<>(); try { Result<com.intuit.wasabi.repository.cassandra.pojo.UserFeedback> result = userFeedbackAccessor.getAllUserFeedback(); feedbacks = makeFeedbacksFromResult(result); } catch (Exception e) { LOGGER.error("Error while getting all user feedback", e); throw new RepositoryException("Could not retrieve feedback from all users", e); } return feedbacks; } /** * Helper method to translate pojo UserFeedback into UserFeedback * * @param result with pojo UserFeedback objects * @return List of UserFeedback objects */ protected List<UserFeedback> makeFeedbacksFromResult( Result<com.intuit.wasabi.repository.cassandra.pojo.UserFeedback> result) { List<UserFeedback> feedbacks = new ArrayList<>(); for (com.intuit.wasabi.repository.cassandra.pojo.UserFeedback userFeedback : result.all()) { UserFeedback feedback = makeUserFeedback(userFeedback); feedbacks.add(feedback); } return feedbacks; } /** * Translate one pojo user feedback object into UserFeedback * * @param userFeedback pojo * @return UserFeedback */ protected UserFeedback makeUserFeedback( com.intuit.wasabi.repository.cassandra.pojo.UserFeedback userFeedback) { UserFeedback feedback = new UserFeedback(); feedback.setComments(userFeedback.getComment()); feedback.setContactOkay(userFeedback.isContactOkay()); feedback.setEmail(userFeedback.getUserEmail()); feedback.setScore(userFeedback.getScore()); feedback.setSubmitted(userFeedback.getSubmitted()); feedback.setUsername(Username.valueOf(userFeedback.getUserId())); return feedback; } } ```
```javascript /*! Select2 4.0.13 | path_to_url */ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return""},inputTooLong:function(n){return""+(n.input.length-n.maximum)+""},inputTooShort:function(n){return""+(n.minimum-n.input.length)+""},loadingMore:function(){return""},maximumSelected:function(n){return""+n.maximum+""},noResults:function(){return""},searching:function(){return""},removeAllItems:function(){return""}}}),n.define,n.require}(); ```
```ruby # frozen_string_literal: true require "spec_helper" module Decidim module Amendable describe CreateDraft do let!(:component) { create(:proposal_component, :with_amendments_enabled) } let!(:user) { create(:user, :confirmed, organization: component.organization) } let!(:amendable) { create(:proposal, component:) } let(:title) { "More sidewalks and less roads!" } let(:body) { "Everything would be better" } let(:params) do { amendable_gid: amendable.to_sgid.to_s, emendation_params: { title:, body: } } end let(:context) do { current_user: user, current_organization: component.organization } end let(:form) { Decidim::Amendable::CreateForm.from_params(params).with_context(context) } let(:command) { described_class.new(form) } include_examples "create amendment draft" end end end ```
The 1978 World Tour was the first concert tour by American hard rock band Van Halen. The world tour, which was in support of their debut album, covered mainly North America with 125 shows in the United States and two shows in Canada, 38 shows in Europe, and seven shows in Japan. At 172 shows total over a 10-month period, the tour was one of the band's most extensive overall. Throughout the tour Van Halen was mostly a supporting act for bands such as Black Sabbath and Journey, however, Van Halen headlined shows in Europe and Japan. Background First North American leg See also Infinity Tour Van Halen started their first leg opening for acts Montrose and Journey. Herbie Herbert, the manager for Journey at the time, recalled bringing guitarist Neal Schon of Journey along with him to go see the band in New York to a sold out audience of 3,500 people. Opening for Black Sabbath See also Never Say Die! Tour (Black Sabbath) "We did 23 shows in 25 days," recalled Eddie Van Halen regarding the European leg. "I didn't know they had that many places! But to meet Tony Iommi when I was so into him was really incredible." David Lee Roth summed up the experience as "a real shot in the ass". The Liverpool Empire Theatre date was attended by future members of Apollo 440 – who, in 1997, issued an adaptation of Van Halen's 'Ain't Talkin' 'bout Love' as 'Ain't Talkin' 'bout Dub'. "We had a great time with the Sabbath guys…" recalled Alex Van Halen. "It was really special because Ed and I were big fans of the band. Every time they came to LA, I was out there in the audience, fighting tooth and nail to get to the front so I could get my eardrums destroyed. But I learnt a lot from them about audience participation… One time, we were up near Leicester, about half an hour before showtime, and Ozzy and Bill Ward were out there on the front lawn with the punters, having a beer. I thought, 'Fuck me, none of this star-type shit.' I was really impressed." "Ozzy used to tell a funny story…" recalled onetime Osbourne sidekick Don Airey. "Sabbath had done a tour for a year [sic] with Kiss… and it nearly killed him because Kiss had been so good. And he said, 'We're never doing that again. Next tour, we just want a bar band from LA. That's all we want.' And then he got to the first gig. Ozzy said they walked in as 'Eruption' was going on. Ozzy said, 'We just went into the dressing room. We sat there going, That was incredible… and then it finished, and we were just too stunned to speak. Then there was a knock on the door and the best-looking man in the world walked in and said, Hello' – you know, David Lee Roth. I think they only lasted about two months on that tour. Then the record broke… I went to see them at the Rainbow when they supported Sabbath. By the time they played the Rainbow again a month later, they were headlining. Incredible!" Of the North American leg of the tour, Ozzy Osbourne said: "Van Halen are so good they ought to be headlining the tour." Setlist Songs played overall "On Fire" "I'm the One" Michael Anthony bass solo "Runnin' with the Devil" "Atomic Punk" Alex Van Halen drum solo "Jamie's Cryin'" "Little Dreamer" "Last Night" "Down in Flames" "Feel Your Love Tonight" "Ain't Talkin' 'Bout Love" "Voodoo Queen" "Ice Cream Man" ("John Brim" cover) "Somebody Get Me a Doctor" Eddie Van Halen guitar solo featuring "Eruption" "You Really Got Me" ("The Kinks" cover) Encore "D.O.A." "Bottoms Up!" "Summertime Blues" ("Eddie Cochran" cover) Typical set list "On Fire" "I'm the One" Michael Anthony bass solo "Runnin' with the Devil" "Atomic Punk" Alex Van Halen drum solo "Jamie's Cryin'" "Little Dreamer" "Feel Your Love Tonight" "Ain't Talkin' 'Bout Love" "Ice Cream Man" ("John Brim" cover) Eddie Van Halen guitar solo featuring "Eruption" "You Really Got Me" ("The Kinks" cover) Encore "D.O.A." "Bottoms Up!" Tour dates Box office score data Personnel Eddie Van Halen – guitar and background vocals David Lee Roth – lead vocals and acoustic guitar Michael Anthony – bass and background vocals Alex Van Halen – drums References Bibliography Van Halen concert tours 1978 concert tours
```javascript // // // path_to_url // // Unless required by applicable law or agreed to in writing, software // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. var http = require('http') var dispatcher = require('httpdispatcher') var port = parseInt(process.argv[2]) var userAddedRatings = [] // used to demonstrate POST functionality var unavailable = false var healthy = true if (process.env.SERVICE_VERSION === 'v-unavailable') { // make the service unavailable once in 60 seconds setInterval(function () { unavailable = !unavailable }, 60000); } if (process.env.SERVICE_VERSION === 'v-unhealthy') { // make the service unavailable once in 15 minutes for 15 minutes. // 15 minutes is chosen since the Kubernetes's exponential back-off is reset after 10 minutes // of successful execution // see path_to_url#restart-policy // Kiali shows the last 10 or 30 minutes, so to show the error rate of 50%, // it will be required to run the service for 30 minutes, 15 minutes of each state (healthy/unhealthy) setInterval(function () { healthy = !healthy unavailable = !unavailable }, 900000); } /** * We default to using mongodb, if DB_TYPE is not set to mysql. */ if (process.env.SERVICE_VERSION === 'v2') { if (process.env.DB_TYPE === 'mysql') { var mysql = require('mysql') var hostName = process.env.MYSQL_DB_HOST var portNumber = process.env.MYSQL_DB_PORT var username = process.env.MYSQL_DB_USER var password = process.env.MYSQL_DB_PASSWORD } else { var MongoClient = require('mongodb').MongoClient var url = process.env.MONGO_DB_URL } } dispatcher.onPost(/^\/ratings\/[0-9]*/, function (req, res) { var productIdStr = req.url.split('/').pop() var productId = parseInt(productIdStr) var ratings = {} if (Number.isNaN(productId)) { res.writeHead(400, {'Content-type': 'application/json'}) res.end(JSON.stringify({error: 'please provide numeric product ID'})) return } try { ratings = JSON.parse(req.body) } catch (error) { res.writeHead(400, {'Content-type': 'application/json'}) res.end(JSON.stringify({error: 'please provide valid ratings JSON'})) return } if (process.env.SERVICE_VERSION === 'v2') { // the version that is backed by a database res.writeHead(501, {'Content-type': 'application/json'}) res.end(JSON.stringify({error: 'Post not implemented for database backed ratings'})) } else { // the version that holds ratings in-memory res.writeHead(200, {'Content-type': 'application/json'}) res.end(JSON.stringify(putLocalReviews(productId, ratings))) } }) dispatcher.onGet(/^\/ratings\/[0-9]*/, function (req, res) { var productIdStr = req.url.split('/').pop() var productId = parseInt(productIdStr) if (Number.isNaN(productId)) { res.writeHead(400, {'Content-type': 'application/json'}) res.end(JSON.stringify({error: 'please provide numeric product ID'})) } else if (process.env.SERVICE_VERSION === 'v2') { var firstRating = 0 var secondRating = 0 if (process.env.DB_TYPE === 'mysql') { var connection = mysql.createConnection({ host: hostName, port: portNumber, user: username, password: password, database: 'test' }) connection.connect(function(err) { if (err) { res.end(JSON.stringify({error: 'could not connect to ratings database'})) console.log(err) return } connection.query('SELECT Rating FROM ratings', function (err, results, fields) { if (err) { res.writeHead(500, {'Content-type': 'application/json'}) res.end(JSON.stringify({error: 'could not perform select'})) console.log(err) } else { if (results[0]) { firstRating = results[0].Rating } if (results[1]) { secondRating = results[1].Rating } var result = { id: productId, ratings: { Reviewer1: firstRating, Reviewer2: secondRating } } res.writeHead(200, {'Content-type': 'application/json'}) res.end(JSON.stringify(result)) } }) // close the connection connection.end() }) } else { MongoClient.connect(url, function (err, client) { if (err) { res.writeHead(500, {'Content-type': 'application/json'}) res.end(JSON.stringify({error: 'could not connect to ratings database'})) console.log(err) } else { const db = client.db("test") db.collection('ratings').find({}).toArray(function (err, data) { if (err) { res.writeHead(500, {'Content-type': 'application/json'}) res.end(JSON.stringify({error: 'could not load ratings from database'})) console.log(err) } else { if (data[0]) { firstRating = data[0].rating } if (data[1]) { secondRating = data[1].rating } var result = { id: productId, ratings: { Reviewer1: firstRating, Reviewer2: secondRating } } res.writeHead(200, {'Content-type': 'application/json'}) res.end(JSON.stringify(result)) } // close client once done: client.close() }) } }) } } else { if (process.env.SERVICE_VERSION === 'v-faulty') { // in half of the cases return error, // in another half proceed as usual var random = Math.random(); // returns [0,1] if (random <= 0.5) { getLocalReviewsServiceUnavailable(res) } else { getLocalReviewsSuccessful(res, productId) } } else if (process.env.SERVICE_VERSION === 'v-delayed') { // in half of the cases delay for 7 seconds, // in another half proceed as usual var random = Math.random(); // returns [0,1] if (random <= 0.5) { setTimeout(getLocalReviewsSuccessful, 7000, res, productId) } else { getLocalReviewsSuccessful(res, productId) } } else if (process.env.SERVICE_VERSION === 'v-unavailable' || process.env.SERVICE_VERSION === 'v-unhealthy') { if (unavailable) { getLocalReviewsServiceUnavailable(res) } else { getLocalReviewsSuccessful(res, productId) } } else { getLocalReviewsSuccessful(res, productId) } } }) dispatcher.onGet('/health', function (req, res) { if (healthy) { res.writeHead(200, {'Content-type': 'application/json'}) res.end(JSON.stringify({status: 'Ratings is healthy'})) } else { res.writeHead(500, {'Content-type': 'application/json'}) res.end(JSON.stringify({status: 'Ratings is not healthy'})) } }) function putLocalReviews (productId, ratings) { userAddedRatings[productId] = { id: productId, ratings: ratings } return getLocalReviews(productId) } function getLocalReviewsSuccessful(res, productId) { res.writeHead(200, {'Content-type': 'application/json'}) res.end(JSON.stringify(getLocalReviews(productId))) } function getLocalReviewsServiceUnavailable(res) { res.writeHead(503, {'Content-type': 'application/json'}) res.end(JSON.stringify({error: 'Service unavailable'})) } function getLocalReviews (productId) { if (typeof userAddedRatings[productId] !== 'undefined') { return userAddedRatings[productId] } return { id: productId, ratings: { 'Reviewer1': 5, 'Reviewer2': 4 } } } function handleRequest (request, response) { try { console.log(request.method + ' ' + request.url) dispatcher.dispatch(request, response) } catch (err) { console.log(err) } } var server = http.createServer(handleRequest) process.on('SIGTERM', function () { console.log("SIGTERM received") server.close(function () { process.exit(0); }); }); server.listen(port, function () { console.log('Server listening on: path_to_url port) }) ```
```swift // // Astronaut.swift // Moonshot // // Created by Nick Lockwood on 27/06/2020. // struct Astronaut: Codable, Identifiable { var id: String var name: String var description: String } ```
```c++ * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). * * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ #include <memory> #include <string> #include <vector> #include <gtest/gtest.h> #include <openssl/digest.h> #include <openssl/hmac.h> #include "../test/file_test.h" #include "../test/test_util.h" #include "../test/wycheproof_util.h" static const EVP_MD *GetDigest(const std::string &name) { if (name == "MD5") { return EVP_md5(); } else if (name == "SHA1") { return EVP_sha1(); } else if (name == "SHA224") { return EVP_sha224(); } else if (name == "SHA256") { return EVP_sha256(); } else if (name == "SHA384") { return EVP_sha384(); } else if (name == "SHA512") { return EVP_sha512(); } return nullptr; } TEST(HMACTest, TestVectors) { FileTestGTest("crypto/hmac_extra/hmac_tests.txt", [](FileTest *t) { std::string digest_str; ASSERT_TRUE(t->GetAttribute(&digest_str, "HMAC")); const EVP_MD *digest = GetDigest(digest_str); ASSERT_TRUE(digest) << "Unknown digest: " << digest_str; std::vector<uint8_t> key, input, output; ASSERT_TRUE(t->GetBytes(&key, "Key")); ASSERT_TRUE(t->GetBytes(&input, "Input")); ASSERT_TRUE(t->GetBytes(&output, "Output")); ASSERT_EQ(EVP_MD_size(digest), output.size()); // Test using the one-shot API. auto mac = std::make_unique<uint8_t[]>(EVP_MD_size(digest)); unsigned mac_len; ASSERT_TRUE(HMAC(digest, key.data(), key.size(), input.data(), input.size(), mac.get(), &mac_len)); EXPECT_EQ(Bytes(output), Bytes(mac.get(), mac_len)); // Test using HMAC_CTX. bssl::ScopedHMAC_CTX ctx; ASSERT_TRUE( HMAC_Init_ex(ctx.get(), key.data(), key.size(), digest, nullptr)); ASSERT_TRUE(HMAC_Update(ctx.get(), input.data(), input.size())); ASSERT_TRUE(HMAC_Final(ctx.get(), mac.get(), &mac_len)); EXPECT_EQ(Bytes(output), Bytes(mac.get(), mac_len)); // Test that an HMAC_CTX may be reset with the same key. ASSERT_TRUE(HMAC_Init_ex(ctx.get(), nullptr, 0, digest, nullptr)); ASSERT_TRUE(HMAC_Update(ctx.get(), input.data(), input.size())); ASSERT_TRUE(HMAC_Final(ctx.get(), mac.get(), &mac_len)); EXPECT_EQ(Bytes(output), Bytes(mac.get(), mac_len)); // Test feeding the input in byte by byte. ASSERT_TRUE(HMAC_Init_ex(ctx.get(), nullptr, 0, nullptr, nullptr)); for (size_t i = 0; i < input.size(); i++) { ASSERT_TRUE(HMAC_Update(ctx.get(), &input[i], 1)); } ASSERT_TRUE(HMAC_Final(ctx.get(), mac.get(), &mac_len)); EXPECT_EQ(Bytes(output), Bytes(mac.get(), mac_len)); }); } static void RunWycheproofTest(const char *path, const EVP_MD *md) { SCOPED_TRACE(path); FileTestGTest(path, [&](FileTest *t) { t->IgnoreInstruction("keySize"); t->IgnoreInstruction("tagSize"); std::vector<uint8_t> key, msg, tag; ASSERT_TRUE(t->GetBytes(&key, "key")); ASSERT_TRUE(t->GetBytes(&msg, "msg")); ASSERT_TRUE(t->GetBytes(&tag, "tag")); WycheproofResult result; ASSERT_TRUE(GetWycheproofResult(t, &result)); if (!result.IsValid()) { // Wycheproof tests assume the HMAC implementation checks the MAC. Ours // simply computes the HMAC, so skip the tests with invalid outputs. return; } uint8_t out[EVP_MAX_MD_SIZE]; unsigned out_len; ASSERT_TRUE(HMAC(md, key.data(), key.size(), msg.data(), msg.size(), out, &out_len)); // Wycheproof tests truncate the tags down to |tagSize|. ASSERT_LE(tag.size(), out_len); EXPECT_EQ(Bytes(out, tag.size()), Bytes(tag)); }); } TEST(HMACTest, WycheproofSHA1) { RunWycheproofTest("third_party/wycheproof_testvectors/hmac_sha1_test.txt", EVP_sha1()); } TEST(HMACTest, WycheproofSHA224) { RunWycheproofTest("third_party/wycheproof_testvectors/hmac_sha224_test.txt", EVP_sha224()); } TEST(HMACTest, WycheproofSHA256) { RunWycheproofTest("third_party/wycheproof_testvectors/hmac_sha256_test.txt", EVP_sha256()); } TEST(HMACTest, WycheproofSHA384) { RunWycheproofTest("third_party/wycheproof_testvectors/hmac_sha384_test.txt", EVP_sha384()); } TEST(HMACTest, WycheproofSHA512) { RunWycheproofTest("third_party/wycheproof_testvectors/hmac_sha512_test.txt", EVP_sha512()); } ```
Marian Bergeron (May 3, 1918 – October 22, 2002) was Miss America in 1933. She went on to a career in big-band singing and public speaking. She was a major supporter of the Miss America Pageant. Bergeron, from West Haven, Connecticut, won the crown as the pageant returned to Atlantic City, New Jersey after a five-year hiatus. She is the only Miss America to hail from New England, and she is also the youngest Miss America in history, winning the crown at the age of . She held the title for two years since no competition was held in 1934. One of the sponsors of the pageant, RKO Pictures, refused to award Bergeron the prize of a screen test, claiming that she was too young. Bergeron went on to a career in big-band singing. She was already an established singer at the time of the pageant, having started at the age of twelve. She appeared with several bands, among them Rudy Vallee and Guy Lombardo. She later became a public speaker. Bergeron was married three times. Her first marriage, to Donald Ruhlman, lasted until his death in 1972 and produced three children. Her final marriage, to Frederick Setzer, lasted until his death in March 2002. Bergeron died of leukemia in Ohio in 2002. As of 2021, she remains the only Miss America from New England. References 1918 births 2002 deaths People from West Haven, Connecticut Deaths from leukemia Miss America 1930s delegates Miss America winners Deaths from cancer in Ohio
The following lists events that happened in 1923 in El Salvador. Incumbents President: Jorge Meléndez (until 1 March), Alfonso Quiñónez Molina (starting 1 March) Vice President: Alfonso Quiñónez Molina (until 1 March), Pío Romero Bosque (starting 1 March) Events January 14 January — Voters in El Salvador elected National Democratic Party candidate Alfonso Quiñónez Molina to be President of El Salvador with a 100% margin but no results were posted. He was the only candidate. February 7 February — El Salvador signed the 1923 Central American Treaty of Peace and Amity. March 1 March — Alfonso Quiñónez Molina was sworn in as President of El Salvador. Pío Romero Bosque was sworn in as vice president. September 17 September — C.D. Luis Ángel Firpo, a Salvadoran soccer team, was established. Deaths 3 September — Pedro José Escalón, politician (b. 1847) References El Salvador 1920s in El Salvador Years of the 20th century in El Salvador El Salvador
Timothy Ralph Danielson (born December 3, 1947) is a former American middle-distance runner. He is one of only 17 U.S. high school athletes to ever run the mile in under four minutes. In 2014, he was convicted of the first-degree murder of his ex-wife. High school While running for Chula Vista High School in Chula Vista, California, Danielson became the second high school 4-minute miler when he ran a 3:59.4 mile at San Diego's Balboa Stadium on June 11, 1966. His mile time puts him sixth on the all-time high school miler list, behind Alan Webb's 3:53.43 (2001), Jim Ryun's 3:55.3 (1965), Drew Hunter's 3:58.25, Reed Brown's 3:59.3 (2017), Matthew Maton's 3:59.38 (2015), and Grant Fisher's 3:59.38 (2015), and was the fastest time ever run by a California high school student until Colin Sahlman from Newbury Park High School ran 3:58.81 in 2022. He won the mile race at the CIF California State Meet in 1965 with a time of 4:08.0 and again the next year with a time of 4:07.0. He won the Golden West Invitational High School meet two-mile race in 1966 in a time of 8:55.4. He was Track and Field News "High School Athlete of the Year" in 1966. College After high school Danielson attended Brigham Young University, where he competed for the track team for a year but never managed to break four minutes for the mile again. He was in the race at the 1967 National Championships where Jim Ryun set the world record at 3:51.1. After running second for much of the race, he faded near the end, finishing 8th in just over 4 minutes. During that same race, Marty Liquori became the third high school 4 minute miler, a step ahead of him. Danielson's career direction changed. Ryun said "I lost track of Tim after that." He married Carolyn Mooers in February 1968, their first son was born in June, all distractions at the same time he was attempting to qualify for the 1968 Olympics. Before professionalism was allowed "In those days, if anyone married they were finished." said Liquori. Personal Danielson began working as an engineer for GKN Aerospace Engine Products in El Cajon, California in 1971. He married his third wife, Ming Qi in 2006; they divorced in 2008. On June 16, 2011, Danielson was charged in the murder of Ming Qi. He pleaded not guilty. During the trial, Danielson claimed the murder was a suicide attempt, a result of his use of Chantix, a drug known a history of these side effects, included in disclaimers attached to its advertising. On May 12, 2014 Danielson was convicted of first-degree murder. On July 11, 2014, Danielson was sentenced to 50 years to life in prison. References External links California State Records before 2000 American male middle-distance runners 1948 births BYU Cougars men's track and field athletes Living people Sportspeople from Chula Vista, California Track and field athletes from California American sportspeople convicted of crimes American people convicted of murder People convicted of murder by California Prisoners sentenced to life imprisonment by California
```javascript import { mount, createLocalVue } from "@vue/test-utils"; import FieldMasked from "src/fields/optional/fieldMasked.vue"; let jQuery = require("jquery"); let $ = jQuery(window); global.$ = $; const localVue = createLocalVue(); let wrapper; function createField2(data, methods) { const _wrapper = mount(FieldMasked, { localVue, propsData: data, methods: methods }); wrapper = _wrapper; return _wrapper; } describe("fieldMasked.vue", () => { describe("check template", () => { let schema = { type: "masked", label: "Phone", model: "phone", mask: "(99) 999-9999", autocomplete: "off", disabled: false, placeholder: "", readonly: false, inputName: "" }; let model = { phone: "(30) 123-4567" }; let input; before(() => { createField2({ schema, model, disabled: false }); input = wrapper.find("input"); }); it("should contain an masked input element", () => { expect(wrapper.exists()).to.be.true; expect(input.is("input")).to.be.true; expect(input.attributes().type).to.be.equal("text"); expect(input.classes()).to.include("form-control"); }); it("should contain the value", () => { expect(input.element.value).to.be.equal("(30) 123-4567"); }); describe("check optional attribute", () => { let attributes = ["autocomplete", "disabled", "placeholder", "readonly", "inputName"]; attributes.forEach(name => { it("should set " + name, () => { checkAttribute(name, wrapper, schema); }); }); }); it("input value should be the model value after changed", () => { model.phone = "(70) 555- 4433"; wrapper.update(); expect(input.element.value).to.be.equal("(70) 555- 4433"); }); it("model value should be the input value if changed", () => { input.element.value = "(21) 888-6655"; input.trigger("input"); expect(model.phone).to.be.equal("(21) 888-6655"); }); it.skip("should be formatted data in model", done => { input.element.value = "123456789"; // Call the paste event what trigger the formatter let $input = jQuery(input.element); $input.trigger(jQuery.Event("paste")); setTimeout(() => { expect(input.element.value).to.be.equal("(12) 345-6789"); input.trigger("input"); expect(model.phone).to.be.equal("(12) 345-6789"); done(); }, 10); }); }); }); ```
```python """Utilities for disa time-series modeling.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import numpy as np import pandas as pd from pandas.tseries.holiday import USFederalHolidayCalendar as calendar def _keep(window, windows): """Helper function for creating rolling windows.""" windows.append(window.copy()) return -1. # Float return value required for Pandas apply. def create_rolling_features_label(series, window_size, pred_offset, pred_n=1): """Computes rolling window of the series and creates rolling window of label. Args: series: A Pandas Series. The indices are datetimes and the values are numeric type. window_size: integer; steps of historical data to use for features. pred_offset: integer; steps into the future for prediction. pred_n: integer; window size of label. Returns: Pandas dataframe where the index is the datetime predicting at. The columns beginning with "-" indicate windows N steps before the prediction time. Examples: >>> series = pd.Series(np.random.random(6), index=pd.date_range(start='1/1/2018', end='1/06/2018')) # Example #1: >>> series 2018-01-01 0.803948 2018-01-02 0.269849 2018-01-03 0.971984 2018-01-04 0.809718 2018-01-05 0.324454 2018-01-06 0.229447 >>> window_size = 3 # get 3 months of historical data >>> pred_offset = 1 # predict starting next month >>> pred_n = 1 # for predicting a single month >>> utils.create_rolling_features_label(series, window_size, pred_offset, pred_n) pred_datetime -3_steps -2_steps -1_steps label 2018-01-04 0.803948 0.269849 0.971984 0.809718 2018-01-05 0.269849 0.971984 0.809718 0.324454 2018-01-06 0.971984 0.809718 0.324454 0.229447 # Example #2: >>> window_size = 3 # get 3 months of historical data >>> pred_offset = 2 # predict starting 2 months into future >>> pred_n = 1 # for predicting a single month >>> utils.create_rolling_features_label(series, window_size, pred_offset, pred_n) pred_datetime -4_steps -3_steps -2_steps label 2018-01-05 0.803948 0.269849 0.971984 0.324454 2018-01-06 0.269849 0.971984 0.809718 0.229447 # Example #3: >>> window_size = 3 # get 3 months of historical data >>> pred_offset = 1 # predict starting next month >>> pred_n = 2 # for predicting a multiple months >>> utils.create_rolling_features_label(series, window_size, pred_offset, pred_n) pred_datetime -3_steps -2_steps -1_steps label_0_steps label_1_steps 2018-01-04 0.803948 0.269849 0.971984 0.809718 0.324454 2018-01-05 0.269849 0.971984 0.809718 0.324454 0.229447 """ if series.isnull().sum() > 0: raise ValueError('Series must not contain missing values.') if pred_n < 1: raise ValueError('pred_n must not be < 1.') if len(series) < (window_size + pred_offset + pred_n): raise ValueError('window_size + pred_offset + pred_n must not be greater ' 'than series length.') total_steps = len(series) def compute_rolling_window(series, window_size): # Accumulate series into list. windows = [] series.rolling(window_size)\ .apply(_keep, args=(windows,)) return np.array(windows) features_start = 0 features_end = total_steps - (pred_offset - 1) - pred_n historical_windows = compute_rolling_window( series[features_start:features_end], window_size) # Get label pred_offset steps into the future. label_start, label_end = window_size + pred_offset - 1, total_steps label_series = series[label_start:label_end] y = compute_rolling_window(label_series, pred_n) if pred_n == 1: # TODO(crawles): remove this if statement/label name. It's for backwards # compatibility. columns = ['label'] else: columns = ['label_{}_steps'.format(i) for i in range(pred_n)] # Make dataframe. Combine features and labels. label_ix = label_series.index[0:len(label_series) + 1 - pred_n] df = pd.DataFrame(y, columns=columns, index=label_ix) df.index.name = 'pred_date' # Populate dataframe with past sales. for day in range(window_size - 1, -1, -1): day_rel_label = pred_offset + window_size - day - 1 df.insert(0, '-{}_steps'.format(day_rel_label), historical_windows[:, day]) return df def add_aggregate_features(df, time_series_col_names): """Compute summary statistic features for every row of dataframe.""" x = df[time_series_col_names] features = {} features['mean'] = x.mean(axis=1) features['std'] = x.std(axis=1) features['min'] = x.min(axis=1) features['max'] = x.max(axis=1) percentiles = range(10, 100, 20) for p in percentiles: features['{}_per'.format(p)] = np.percentile(x, p, axis=1) df_features = pd.DataFrame(features, index=x.index) return df_features.merge(df, left_index=True, right_index=True) def move_column_to_end(df, column_name): temp = df[column_name] df.drop(column_name, axis=1, inplace=True) df[column_name] = temp def is_between_dates(dates, start=None, end=None): """Return boolean indices indicating if dates occurs between start and end.""" if start is None: start = pd.to_datetime(0) if end is None: end = pd.to_datetime(sys.maxsize) date_series = pd.Series(pd.to_datetime(dates)) return date_series.between(start, end).values def _count_holidays(dates, months, weeks): """Count number of holidays spanned in prediction windows.""" cal = calendar() holidays = cal.holidays(start=dates.min(), end=dates.max()) def count_holidays_during_month(date): n_holidays = 0 beg = date end = date + pd.DateOffset(months=months, weeks=weeks) for h in holidays: if beg <= h < end: n_holidays += 1 return n_holidays return pd.Series(dates).apply(count_holidays_during_month) def _get_day_of_month(x): """From a datetime object, extract day of month.""" return int(x.strftime('%d')) def add_date_features(df, dates, months, weeks, inplace=False): """Create features using date that is being predicted on.""" if not inplace: df = df.copy() df['doy'] = dates.dayofyear df['dom'] = dates.map(_get_day_of_month) df['month'] = dates.month df['year'] = dates.year df['n_holidays'] = _count_holidays(dates, months, weeks).values return df class Metrics(object): """Performance metrics for regressor.""" def __init__(self, y_true, predictions): self.y_true = y_true self.predictions = predictions self.residuals = self.y_true - self.predictions self.rmse = self.calculate_rmse(self.residuals) self.mae = self.calculate_mae(self.residuals) self.malr = self.calculate_malr(self.y_true, self.predictions) def calculate_rmse(self, residuals): """Root mean squared error.""" return np.sqrt(np.mean(np.square(residuals))) def calculate_mae(self, residuals): """Mean absolute error.""" return np.mean(np.abs(residuals)) def calculate_malr(self, y_true, predictions): """Mean absolute log ratio.""" return np.mean(np.abs(np.log(1 + predictions) - np.log(1 + y_true))) def report(self, name=None): if name is not None: print_string = '{} results'.format(name) print(print_string) print('~' * len(print_string)) print('RMSE: {:2.3f}\nMAE: {:2.3f}\nMALR: {:2.3f}'.format( self.rmse, self.mae, self.malr)) ```
Linnaeus's flower clock was a garden plan hypothesized by Carl Linnaeus that would take advantage of several plants that open or close their flowers at particular times of the day to accurately indicate the time. According to Linnaeus's autobiographical notes, he discovered and developed the floral clock in 1748. It builds on the fact that there are species of plants that open or close their flowers at set times of day. He proposed the concept in his 1751 publication Philosophia Botanica, calling it the (). His observations of how plants changed over time are summarised in several publications. Calendarium florae (the Flower Almanack) describes the seasonal changes in nature and the botanic garden during the year 1755. In Somnus plantarum (the Sleep of Plants), he describes how different plants prepare for sleep during the night, and in Vernatio arborum he gives an account of the timing of leaf-bud burst in different trees and bushes. He may never have planted such a garden, but the idea was attempted by several botanical gardens in the early 19th century, with mixed success. Many plants exhibit a strong circadian rhythm (see also Chronobiology), and a few have been observed to open at quite a regular time, but the accuracy of such a clock is diminished because flowering time is affected by weather and seasonal effects. The flowering times recorded by Linnaeus are also subject to differences in daylight due to latitude: his measurements are based on flowering times in Uppsala, where he taught and had received his university education. The plants suggested for use by Linnaeus are given in the table below, ordered by recorded opening time; "-" signifies that data are missing. Cultural references to the concept Some 30 years before Linnaeus's birth, such a floral clock may have been described by Andrew Marvell, in his poem "The Garden" (1678): How well the skilful gardener drew Of flow'rs and herbs this dial new; Where from above the milder sun Does through a fragrant zodiac run; And, as it works, th' industrious bee Computes its time as well as we. How could such sweet and wholesome hoursBe reckoned but with herbs and flow'rs!In Terry Pratchett's novel Thief of Time, a floral clock with the same premise is described. It features fictional flowers that open at night "for the moths", so runs all day. Horologium Florae, released in 2023, is the album name of Japanese singer and virtual YouTuber Kyo Hanabasami. See also Floral clock References External links Online text of Philosophia Botanica Botany
```c++ /******************************************************************************* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *******************************************************************************/ #ifndef GPU_GENERIC_SYCL_SHUFFLE_KERNELS_HPP #define GPU_GENERIC_SYCL_SHUFFLE_KERNELS_HPP #include "common/dnnl_thread.hpp" #include "common/primitive_exec_types.hpp" #include "gpu/generic/sycl/sycl_io_helper.hpp" #include "gpu/generic/sycl/sycl_primitive_conf.hpp" #include "xpu/sycl/memory_storage_base.hpp" #include "xpu/sycl/types.hpp" namespace dnnl { namespace impl { namespace gpu { namespace generic { namespace sycl { struct shuffle_kernel_vec1_t { shuffle_kernel_vec1_t(const sycl_shuffle_conf_t &conf, xpu::sycl::in_memory_arg_t &data, xpu::sycl::out_memory_arg_t &dst) : conf_(conf), data_(data), dst_(dst) {} void operator()(::sycl::nd_item<1> item) const { memory_tensor_t data_mem(data_, conf_.src_md); memory_tensor_t dst_mem(dst_, conf_.dst_md); auto sg = item.get_sub_group(); dim_t blk_size = conf_.block_size; const dim_t stride_mb = conf_.stride_m; size_t base = ((item.get_group(0) * conf_.wg_size + sg.get_group_id()[0] * sg.get_local_range()[0]) * blk_size + sg.get_local_id() * blk_size); size_t xaxis = (base / 1) % conf_.MB; dim_t yaxis = (base / conf_.MB) % conf_.C; int j = yaxis / conf_.transpose_col; int i = yaxis % conf_.transpose_col; const dim_t output_off = xaxis * stride_mb + yaxis * conf_.SP; const dim_t input_off = xaxis * stride_mb + (i * conf_.transpose_row + j) * conf_.SP; for (dim_t sp = 0; sp < conf_.SP; ++sp) { float dst = data_mem.load(input_off + sp); dst_mem.store(dst, output_off + sp); } } private: const xpu::sycl::md_t &data_md() const { return conf_.src_md; } const xpu::sycl::md_t &dst_md() const { return conf_.dst_md; } const xpu::sycl::md_t &stat_md() const { return conf_.stat_md; } sycl_shuffle_conf_t conf_; xpu::sycl::in_memory_arg_t data_; xpu::sycl::out_memory_arg_t dst_; }; struct shuffle_kernel_vec2_t { shuffle_kernel_vec2_t(const sycl_shuffle_conf_t &conf, xpu::sycl::in_memory_arg_t &data, xpu::sycl::out_memory_arg_t &dst) : conf_(conf), data_(data), dst_(dst) {} void operator()(::sycl::nd_item<1> item) const { memory_tensor_t data_mem(data_, conf_.src_md); memory_tensor_t dst_mem(dst_, conf_.dst_md); const dim_t stride_mb = conf_.stride_m; size_t ithr = item.get_group(0) * conf_.wg_size + item.get_local_id(); dim_t sp_start {0}, sp_end {0}; balance211(conf_.SP, conf_.nthr, ithr, sp_start, sp_end); for (size_t mb = 0; mb < conf_.MB; mb++) { for (size_t sp = sp_start; sp < sp_end; sp++) { const dim_t off = mb * stride_mb + sp * conf_.C; for (dim_t c = 0; c < conf_.C; ++c) { dim_t i = c % conf_.transpose_col; dim_t j = c / conf_.transpose_col; float dst = data_mem.load(off + i * conf_.transpose_row + j); dst_mem.store(dst, off + c); } } } } private: const xpu::sycl::md_t &data_md() const { return conf_.src_md; } const xpu::sycl::md_t &dst_md() const { return conf_.dst_md; } const xpu::sycl::md_t &stat_md() const { return conf_.stat_md; } sycl_shuffle_conf_t conf_; xpu::sycl::in_memory_arg_t data_; xpu::sycl::out_memory_arg_t dst_; }; struct shuffle_kernel_vec3_t { shuffle_kernel_vec3_t(const sycl_shuffle_conf_t &conf, xpu::sycl::in_memory_arg_t &data, xpu::sycl::out_memory_arg_t &dst) : conf_(conf), data_(data), dst_(dst) {} void operator()(::sycl::nd_item<1> item) const { memory_tensor_t data_mem(data_, conf_.src_md); memory_tensor_t dst_mem(dst_, conf_.dst_md); size_t ithr = item.get_group(0) * conf_.wg_size + item.get_local_id(); const dim_t outer_size = conf_.outer_size; const dim_t inner_size = conf_.inner_size; const dim_t dim = conf_.axis_size * inner_size; dim_t axis_size = conf_.axis_size; dim_t ax_start {0}, ax_end {0}; balance211(axis_size, conf_.nthr, ithr, ax_start, ax_end); for (dim_t ou = 0; ou < outer_size; ou++) { for (dim_t iwork = ax_start; iwork < ax_end; ++iwork) { int j = iwork / conf_.transpose_col; int i = iwork % conf_.transpose_col; for (dim_t in = 0; in < inner_size; in++) { const dim_t off = ou * dim + in; float dst = data_mem.load(data_md().off_l( off + (i * conf_.transpose_row + j) * inner_size)); dst_mem.store( dst, data_md().off_l(off + iwork * inner_size)); } } } } private: const xpu::sycl::md_t &data_md() const { return conf_.src_md; } const xpu::sycl::md_t &dst_md() const { return conf_.dst_md; } const xpu::sycl::md_t &stat_md() const { return conf_.stat_md; } sycl_shuffle_conf_t conf_; xpu::sycl::in_memory_arg_t data_; xpu::sycl::out_memory_arg_t dst_; }; } // namespace sycl } // namespace generic } // namespace gpu } // namespace impl } // namespace dnnl #endif ```
```xml import { createColumnHelper } from '@tanstack/react-table'; import { Service } from '../../../types'; export const columnHelper = createColumnHelper<Service>(); ```
KJQY may refer to: KEIM-LP, a defunct low-power radio station (103.1 FM) formerly licensed to serve Monument, Colorado, United States, which held the call sign KJQY-LP from 2015 to 2016 KIQN (FM), a radio station (103.3 FM) licensed to serve Colorado City, Colorado, which held the call sign KJQY from 2006 to 2014 and in 2015 KPHT, a radio station (95.5 FM) licensed to serve Rocky Ford, Colorado, which held the call sign KJQY from 2002 to 2005 KSSX, a radio station (95.7 FM} licensed to serve Carlsbad, California, which held the call sign KJQY from 2001 to 2002 KMYI, a radio station (94.1 FM) licensed to serve San Diego, California, which held the call sign KJQY from 1998 to 2001 KLQV, a radio station (102.9 FM) licensed to serve San Diego, California, which held the call sign KJQY from 1997 to 1998 KSON (FM), a radio station (103.7 FM) licensed to serve San Diego, California, which held the call sign KJQY from 1979 to 1995
The Hendrie Stakes is a Thoroughbred horse race run annually at Woodbine Racetrack in Toronto, Ontario, Canada. Held in mid May, the Grade III sprint race is open to fillies and mares, aged four and older and is contested over a distance of six and a half furlongs on Polytrack synthetic dirt. It offers a purse of $116,205 with an additional $50,000 for Ontario-bred horses provided by the Canadian Thoroughbred Horse Society (CTHS) through its Thoroughbred Improvement Program (TIP). It was inaugurated in 1975 and run at the Fort Erie Racetrack for the first two years as the George C. Hendrie Handicap in honor of George Campbell Hendrie. The Hendrie's have been called one of Canada's most prominent racing families who, as did George Hendrie's father and grandfather before him, served as president of the Ontario Jockey Club. Records Speed record: 1:14.54 - Fatal Bullet (2008) 1:15.28 - Cactus Kris 1:15.60 - Eseni (1997) 1:15.66 - El Prado Essence (2003) Most wins: 2 - La Voyageuse (1979, 1980 2 - El Prado Essence (2002, 2003) Most wins by an owner: 4 - Knob Hill Stable (1988, 1990, 1997, 2000) Most wins by a jockey: 5 - Patrick Husbands (2003, 2009, 2011, 2012, 2014) 5 - David Clark (1986, 1989, 2000, 2004, 2005) 5 - Todd Kabel (1998, 1999, 2002, 2006, 2007) Most wins by a trainer: 4 - Mark E. Casse (2012, 2013, 2014, 2021) Winners of the Hendrie Stakes See also List of Canadian flat horse races References The Hendrie Stakes at Pedigree Query Graded stakes races in Canada Sprint category horse races for fillies and mares Recurring sporting events established in 1975 Woodbine Racetrack 1975 establishments in Ontario
```java // // // path_to_url // // Unless required by applicable law or agreed to in writing, software // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // //////////////////////////////////////////////////////////////////////////////// import java.io.ByteArrayOutputStream; import java.io.ByteArrayInputStream; import java.io.StringReader; import java.io.InputStream; import java.math.BigDecimal; import com.code_intelligence.jazzer.api.FuzzedDataProvider; import com.fasterxml.jackson.core.Base64Variant; import com.fasterxml.jackson.core.Base64Variants; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.json.UTF8JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator.Feature; import com.fasterxml.jackson.core.SerializableString; import com.fasterxml.jackson.core.io.SerializedString; import java.io.IOException; public class UTF8GeneratorFuzzer { public static void fuzzerTestOneInput(FuzzedDataProvider data) { JsonFactory jf = new JsonFactory(); ByteArrayOutputStream out = new ByteArrayOutputStream(); String fuzzString; JsonGenerator g; int offset; byte[] b; Base64Variant b64v; Feature[] features = new Feature[]{ Feature.AUTO_CLOSE_TARGET, Feature.AUTO_CLOSE_JSON_CONTENT, Feature.FLUSH_PASSED_TO_STREAM, Feature.QUOTE_FIELD_NAMES, Feature.QUOTE_NON_NUMERIC_NUMBERS, Feature.ESCAPE_NON_ASCII, Feature.WRITE_NUMBERS_AS_STRINGS, Feature.WRITE_BIGDECIMAL_AS_PLAIN, Feature.STRICT_DUPLICATE_DETECTION, Feature.IGNORE_UNKNOWN, }; try { g = jf.createGenerator(out); for (int i = 0; i < features.length; i++) { if (data.consumeBoolean()) { g.enable(features[i]); } else { g.disable(features[i]); } } } catch (IOException ignored) { return; } int numberOfOps = data.consumeInt(); for (int i = 0; i < numberOfOps%20; i++) { try { int apiType = data.consumeInt(); switch(apiType%13) { case 0: fuzzString = data.consumeString(1000000); StringReader targetReader = new StringReader(fuzzString); g.writeStartArray(); g.writeString(targetReader, fuzzString.length()); g.writeEndArray(); case 1: fuzzString = data.consumeString(1000000); g.writeStartArray(); g.writeString(fuzzString); g.writeEndArray(); case 2: fuzzString = data.consumeString(1000000); SerializableString ss = new SerializedString(fuzzString); g.writeStartArray(); g.writeString(ss); g.writeEndArray(); case 3: fuzzString = data.consumeString(1000000); g.writeStartArray(); g.writeRaw(fuzzString); g.writeEndArray(); case 4: fuzzString = data.consumeString(1000000); offset = data.consumeInt(); g.writeStartArray(); g.writeRaw(fuzzString, offset, fuzzString.length()); g.writeEndArray(); case 5: String key = data.consumeString(1000000); String value = data.consumeString(1000000); g.writeStartObject(); g.writeStringField(key, value); g.writeEndObject(); case 6: b64v = Base64Variants.getDefaultVariant(); b = data.consumeBytes(1000000); offset = data.consumeInt(); g.writeStartArray(); g.writeBinary(b64v, b, offset, b.length); g.writeEndArray(); case 7: b = data.consumeBytes(1000000); offset = data.consumeInt(); g.writeStartObject(); g.writeUTF8String(b, offset, b.length); g.writeEndObject(); case 8: b64v = Base64Variants.getDefaultVariant(); b = data.consumeBytes(1000000); int l = data.consumeInt(); InputStream targetStream = new ByteArrayInputStream(b); g.writeStartArray(); g.writeBinary(b64v, targetStream, l); g.writeEndArray(); case 9: String dcString = data.consumeString(10); BigDecimal BD = new BigDecimal(dcString); g.writeNumber(BD); case 10: int fuzzInt = data.consumeInt(); g.writeNumber(fuzzInt); case 11: float fuzzFloat = data.consumeFloat(); g.writeNumber(fuzzFloat); case 12: fuzzString = data.consumeString(100000); g.writeNumber(fuzzString); } } catch (IOException | IllegalArgumentException ignored) { } } try { g.close(); } catch (IOException ignored) { } } } ```
William Gallagher, better known by his on-air name Billy Zero, is an American radio personality. Born in Ft. Meade, Maryland in 1971, he is best known for his work at Baltimore and Washington radio stations. He performed in many bands in the 90's including Bovox Clown, Love Muffin Prowler, Mentle Gen and Naked Lunch. In February 2006, Gallagher started a new online record store called Dj Boy Records online at djboy.com. Gallagher worked at the WHFS, 99.1 FM from December 1994 through February 2000. Zero went to work for Advertising.com in February 2000. Four months later, he left to start his own company - djboy.com and getbackstage.com. Gallagher was contacted by a headhunter in July 2000 and informed that XM Satellite Radio was hiring. He started out as director of ad sales development, then moved to Music Director of the Unsigned Channel. Gallagher was made the program director of Unsigned when Pat Dinizio of The Smithereens left to focus on his music career. Unsigned was canceled from XM's Lineup in November 2005. Gallagher then went to work on Fred, XM 44 for three months to help out, then went to Big Tracks, a channel that XM launched, and helped build the channel from scratch. Zero moved on to XMU as Program Director where he programmed and played as a DJ indie music on XM 43 until November 2008. After he was laid off from XM in 2008, he served as program director at WTMD on the campus of Towson University. He left the station the following year. On January 1, 2010, he started an artist management company called Zero Management. By May 2010, he had eight artists and two agents. His artists included Grammy-nominated artist, Wayna, Emmy-nominated Ellen Cherry, The Hint, Alfonso Velez, Derek Olds, Carolyn Malachi, The Eureka Birds, Will Rast and The Funk Ark. In January 2012, the Zero Management lineup shifted to focus on career artists. The lineup of managed artists include: Grammy-Nominated Christylez Bacon, Eureka Birds, Derek Olds, Monika Gaba, Rites of Ash, Tobias Russell, The Perfects, Vital and Janine Wilson. Zero is currently consulting with a number of artists and organizations and can be seen moderating panels in 2012 at MacWorld's iWorld and SXSW. Gallagher shifted away from management in 2013 and focused on DJ Boy Radio and a number of new creative endeavors. DJ Boy Radio, an audio advertising agency, launched in 2015. The company's website has since gone offline and a Facebook page has not been updated since 2018. He was president of the Washington D.C. chapter of the National Academy of Recording Arts & Sciences from 2008 to 2010 and trustee from June 2010 through May 2012. Gallagher launched DJ Boy Radio, an audio advertising agency, in 2015. The company's website has since gone offline and a Facebook page has not been updated since 2018. References Living people 1971 births American radio personalities People from Anne Arundel County, Maryland
```java /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * * Subject to the condition set forth below, permission is hereby granted to any * person obtaining a copy of this software, associated documentation and/or * data (collectively the "Software"), free of charge and under any and all * copyright rights in the Software, and any and all patent rights owned or * freely licensable by each licensor hereunder covering either (i) the * unmodified Software as contributed to or provided by such licensor, or (ii) * the Larger Works (as defined below), to deal in both * * (a) the Software, and * * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if * one is included with the Software each a "Larger Work" to which the Software * is contributed by such licensors), * * without restriction, including without limitation the rights to copy, create * derivative works of, display, perform, and distribute the Software and make, * use, sell, offer for sale, import, export, have made, and have sold the * Software and the Larger Work(s), and to sublicense the foregoing rights on * either these or other terms. * * This license is subject to the following condition: * * The above copyright notice and either this complete permission notice or at a * minimum a reference to the UPL must be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.oracle.truffle.dsl.processor.java.model; public enum CodeTreeKind { STATIC_FIELD_REFERENCE, STATIC_METHOD_REFERENCE, GROUP, COMMA_GROUP, REMOVE_LAST, INDENT, STRING, NEW_LINE, TYPE, TYPE_LITERAL, DOC, JAVA_DOC; } ```