Objc - Swift Interoperability: Objc API for Any type?
Vote count: 0 I've got an objective c API defined like this: - (instancetype)initWithItems:(NSArray *)items reuseIdentifier:(NSString *)reuseIdentifier configuration:(void(^)(id item, id cell, NSIndexPath *indexPath))configuration; This translates into Swift like this: public init!(items: [AnyObject...
Validation for a dynamically added dropdown
Vote count: 0 I have a dynamic dropdown but the city options don't behave like they should. When I select a state and then a city, the validation doesn't work for the city. The fields are supposed to become red when they don't validate and become whie again when they validate but the city dropdown d...
API send email and Password using CURL
Vote count: 0 I have written some code into a plugin for Wordpress that when the User hits the submit button their information is stored in the WP database and is also sent to a third party website with their email and password using JSON protocalls. this is the code I use: $url = "https://api.examp...
ios youtube embedded video frame issue
Vote count: 0 I am trying to embed a video from youtube with the following code: func setUpVideo() { let width = webView.frame.width let height = webView.frame.height let frame = 0 bmiWebView.allowsInlineMediaPlayback = true let videoUrl = "https://www.youtube.com/embed/GCALWdwKr48" let htmlUrl = "<...
Responsive design shows different
Vote count: 0 I make a responsive web sites or I want :). But I have a big problem. My problem is devices show difference. I look for mobile/tablet on google resizer or another resizer sites, chrome addons etc. All of them shows good. But İf some devices showing good, some devices bad.İn my opinion,...
HTML encoded characters and CDATA being lost after converting xml String to Document object then back to String. Is there any way to avoid?
Vote count: 0 Lets say we have an xml like so: <item> <![CDATA[abc]]> </item> I have a method convertStringToDocument that converts this String xmlString into a Document (org.w3c.dom.Document). In order to digitally sign the xml. public static Document convertStringToDocument(String xmlString) { try...
Why are physical devices crashing my XCTest UI tests randomly?
Vote count: 0 Recently, when writing new tests and testing on physical devices, eventually (sometimes within a few times of ru ing tests or sometimes after hours of ru ing tests) each device will start crashing. The only solution I have found is to restart the device and then the tests start ru ing ...
Force git status to acknowledge a copy and a type change
Vote count: 0 How are the status codes 'C' and 'T' triggered in git? Can someone give me a really simple set of commands to run that will emulate the steps needed so that when i run git log --name-status i see the status codes above? If you know how to trigger a 'U' as well that would be helpful but...
Frequency percentages per group, not total R
Vote count: 0 I'm trying to make a grouped barplot with frequency (%) on the y-axis and depression_meds (N/Y) on the x-axis, grouped by another variable score (LOW/HIGH). My code so far: meds <- table(data2$depression_meds,data2$score)/sum(table(data2$score)) * 100 bp <- barplot(meds, beside=TRUE, a...
SwiftyGif - Gif doesn't animate unless using an outlet
Vote count: 0 So I am trying to add a gif to a UIImageView using SwiftyGif and I am stuck as to why it fails to animate the gif unless I am using an outlet. I programmatically created a UIImageView and used the .setGifImage function and all it does is display an image using the first frame of the gi...
How to do Python Replace Syntax?
Vote count: -1 I'm new to Programming so please forebear with me. I'm trying to do a replace syntax in Python but the syntax keeps showing an error. I've done research on the community and have tried various tactics and techniques suggested all resulting in futile. Please provide insights!!!!!! Than...
QGraphicsPixmapItem rotate only the image
Vote count: 0 Well after looking for hours on the web i couldn't find anything. So i was trying to make a towerDefence game and the towers are moving around the enemy. Anyway i tried the following code: this->pixmap().transformed(QTransform().rotate(90)); But it is not rotating at 90 degres :( Maybe...
Static resource reload with akka-http
Vote count: 0 In short: is it possible to reload static resources using akka-http? A bit more: I have Scala project. I'm using App object to launch my Main class. I'm using getFromResourceDirectory to locate my resource folder. What I would like to have is to hot-swap my static resources during deve...