- Identity being tied to the instance you join is very limiting. While a lot of instances have public feeds you could at least browse without logging in, in theory, many don't and require you to have an account. So if you wanted to get that "small town" feel in one small instance, you have to actually make an account and join it to do so. That's cumbersome and feels very unnecessary. I think identity could be sharable between instances in some fashion. Imagine you could join instance X and then click a join button on instance Y that takes your X identity and links it over to Y in much the same way that remote follows work. Perhaps as part of this process you could even optionally take on a new local name on the Y instance if you wanted and appear as if you are a truly local user, but under the hood there'd be a linkage between the two identities creating a kind of web of trust (if that's the right term). Thus you could someday later join instance Z using either your X or Y identity but doing so would link all
-(BOOL)containsActiveAutoRenewableSubscriptionOfProductIdentifier:(NSString *)productIdentifier forDate:(NSDate *)date | |
{ | |
// IMPORTANT NOTE! | |
// | |
// I, Sean, have modified this from the original algo that came with this library. | |
// | |
// The original implementation would get the newest purchase record by sorting based on the subscriptionExpirationDate. | |
// Then it would check /only/ that one newest purchase record to see if the date was within the purchase record's range. | |
// | |
// This was VERY WRONG because it made multiple bad assumptions - one is that it assumed the incoming date was always |
@propertyWrapper | |
struct Wrapper<T> { | |
var actualValue: T! | |
var wrappedValue: T { | |
get { | |
actualValue | |
} | |
set { | |
actualValue = newValue |
// This is an experiment for moving a view between different stacks and having SwiftUI animate it properly. | |
// By "drawing" all of the cards in one place and moving their geometry, it preserves the card view's | |
// identifity from SwiftUI's POV. This means when things change, SwiftUI can understand how they changed | |
// and animate it properly. Is there a better way to do this? | |
class Card : Identifiable, ObservableObject, Equatable { | |
@Published var name: String | |
@Published var tagged = false | |
init(_ name: String) { |
I recently started a private Minecraft server on my Linode. I was dismayed to discover that it caused the CPU graph on the Dashboard to spike to 100% despite the CPU usage as reported by top
being only around 40-50% when a couple of players were present and around 10% when idle. I spent a lot of time worrying about this and even opened a support ticket to make sure I wasn't doing anything terribly wrong. Support pointed me to a post that discussed the same issue. The conclusion appears to be that it's a bug either in Minecraft or Java and it is confusing the reporting but isn't a real problem.
Despite this, I decided I didn't really like seeing the CPU graph maxed out all of the time, nor did I like the idea that Minecraft sits there consuming 10% of the CPU even when idle. While looking for solutions I ran across a b
extension BinaryInteger { | |
subscript(bit index: Int) -> Bool { | |
get { | |
((self >> index) & Self(1)) == 1 | |
} | |
set { | |
if newValue { | |
self |= (Self(1) << index) | |
} else { | |
self &= ~(Self(1) << index) |
protocol ReferenceEquatable: AnyObject, Equatable {} | |
extension ReferenceEquatable { | |
static func == (lhs: Self, rhs: Self) -> Bool { | |
return lhs === rhs | |
} | |
} | |
protocol ReferenceHashable: ReferenceEquatable, Hashable {} |
// Created by Sean Heber (@BigZaphod) on 10/12/19. | |
// License: BSD | |
import Foundation | |
//==--------------------------------------------------------- | |
/// This implementation requires the ability to initialize an | |
/// instance of a type before it can decode it. This is to support | |
/// reference types automatically so that each instance is | |
/// only stored once in the archive. Decoding a reference |
typealias GeometricValue = Numeric & Comparable | |
struct GenericPoint<ValueType: GeometricValue>: Equatable { | |
var x: ValueType | |
var y: ValueType | |
static var zero: Self { Self(x: 0, y: 0) } | |
} | |
extension GenericPoint { |
// Created by Sean Heber on 9/26/19. | |
@import UIKit; | |
@interface KeyboardAwareContainerView : UIView | |
@property (nonatomic, readonly, nonnull) UIView *contentView; | |
@end |