Quantcast
Channel: User Doug Smith - Stack Overflow
Browsing all 35 articles
Browse latest View live

Comment by Doug Smith on How do I ensure my DispatchQueue executes some code...

@matt And if it returns false? Effectively I'm wondering if A) I call the function on the main thread, will the dispatch queue respect that? B) If not, should I/is it allowed to wrap it in a...

View Article



Comment by Doug Smith on I have a singleton that can be accessed on multiple...

@matt No they are two different questions (see titles to tell)

View Article

Comment by Doug Smith on How do I ensure my DispatchQueue executes some code...

What if there's not really a result to pass? To elaborate more on my specific use case (as you guessed I mostly made up examples) it's to do with theming the app, where essentially a bunch of listener...

View Article

Comment by Doug Smith on Writing a Chrome extension and trying to communicate...

@MlungisiNdlela No because I'm not accessing the DOM

View Article

Comment by Doug Smith on How do you create an italic AND black (weight)...

@matt Try swapping out .systemFont with UIFont(name: "Avenir", size: 32.0)!, the result no longer seems to work

View Article


With Firebase Analytics how do I see breakdown by specific iOS version? (eg...

If I go to my Firebase Analytics Dashboard, there's a "platform breakdown" pie chart that just says "100% iOS". If I go to "Filter" at the top I can choose each specific version of iOS, but it's super...

View Article

How do I calculate the standard deviation with a pivot table in Pandas?

I have a bunch of data involving certain numbers for certain players of specific sports. I want to use pivot tables in Pandas to have it split up the data by sport, and for the corresponding value for...

View Article

With CSS, how do I make an image span the full width of the page as a...

Say, like in this example here: http://www.electrictoolbox.com/examples/wide-background-image.htmlWhen I do it, I end up getting white borders around the image no matter what I do. What am I doing wrong?

View Article


How to add spacing between two words using NSAttributedString?

Say I have a sentence rendered That looks like this.If I wanted there to be more space on either said of like, how would I do that? So it would effectively look like That looks like this.Injecting...

View Article


iOS 13 performActionFor shortcutItem doesn't get called in SceneDelegate now...

performActionFor shortcutItem gets called in my SceneDelegate if the app has already launched, but it doesn't get called if the app actually launches from a shortcut item. Why is this?

View Article

Setting up AWS Lambda with Go, why do I always get "Internal server error"...

I'm using literally the example function from the Go docs:package mainimport ("context""fmt""github.com/aws/aws-lambda-go/lambda")type MyEvent struct { Name string `json:"name"`}func HandleRequest(ctx...

View Article

On OS X, how do I change my shell from fish back to bash?

I'm kinda preferring bash lately to fish, and I'm wondering if I can change it back. I tried this command: chsh -s /bin/bash but closing the terminal and reopening it does not restore it to bash, but...

View Article

How can SwiftUI Views change if the updated variable isn’t marked with a $?

In many cases in SwiftUI, values are marked with a $ to indicate that they’re a Binding variable, and allow them to update dynamically. Here’s an example of this behavior:class Car: ObservableObject {...

View Article


Is it possible to pin a UIView's top to the bottom of the navigation bar?

I'm trying to position my UIView to be 20pt under the navigation bar, but when I set it relative to the view on the view controller it's still under the navigation bar at 20pt, and I don't want to...

View Article

Image may be NSFW.
Clik here to view.

How do I make the green battery icon (when phone is charging) in the status...

Is this a known iOS 7 glitch? If I fade the alpha of the navigationBar (or even set the status bar to none in Interface Builder) the green charging battery icon still shows up in the status bar,...

View Article


Is there a one-line version of "add to array if not nil, otherwise don't...

Say I have an array of Ints.var nums = [5, 4, 3, 2, 1]var maybeNum: Int?nums.append(maybeNum)But this results in an error. Do I really have to check if it has a value, and only insert it if it does?

View Article

In Firebase Analytics, one of the devices listed is just "iPhone", what does...

I see devices like iPhone X, iPhone XR, iPhone XS, then just "iPhone" without any model specifier. Which does this correspond to?Note it's not an aggregate value of all iPhone models as there's more...

View Article


Atomic properties vs thread-safe in Objective-C

In most of the discussions I've read, it indicates that making a property atomic does not guarantee it to be thread-safe, it just guarantees that the value returned won't be garbage as a result of one...

View Article

Horizontally and vertically responsive table with sticky/fixed headers?

On a page on a website I'm building, there will only be a table displayed. I want that table to stick to the edges of the screen regardless of the width/height of the screen.This table also needs to...

View Article

How can I toggle the images for this expand/collapse button using jQuery?

I want to be able to expand/collapse a menu, I can do that, but by clicking the button, and the button image should change based on the state of the collapsed menu.Here's the code I was trying, but I...

View Article
Browsing all 35 articles
Browse latest View live




Latest Images