How to implement a pop-up dialog box in iOS?
After a calculation, I want to display a pop up or alert box conveying a message to the user. Does anyone know where I can find more information about this?
How to create Drawable from resource
I have an image `res/drawable/test.png` (R.drawable.test). I want to pass this image to a function which accepts `Drawable`, e.g. `mButton.setCompoundDrawables()`. So how can I convert an image resou...
Can you test google analytics on a localhost address?
I have to test out my new GA account on my local machine. Will this work just by copying the standard snippet supplied by Google onto the page ? I don't want to spend 24 hours waiting to see if it...
- Modified
- 30 Mar at 21:38
What's the reason I can't create generic array types in Java?
What's the reason why Java doesn't allow us to do ``` private T[] elements = new T[initialCapacity]; ``` I could understand .NET didn't allow us to do that, as in .NET you have value types that at ...
- Modified
- 12 Mar at 10:19
Flutter: how to prevent device orientation changes and force portrait?
I would like to prevent my application from changing its orientation and force the layout to stick to "portrait". In the main.dart, I put: ``` void main(){ SystemChrome.setPreferredOrientations([ ...
- Modified
- 26 Dec at 09:42
How to enable CORS in ASP.net Core WebAPI
I have a backend ASP.Net Core Web API hosted on an Azure Free Plan (Source Code: [https://github.com/killerrin/Portfolio-Backend](https://github.com/killerrin/Portfolio-Backend)). I also have a Cl...
- Modified
- 19 Jan at 16:28
The create-react-app imports restriction outside of src directory
I am using create-react-app. I am trying to call an image from my public folder from a file inside my `src/components`. I am receiving this error message. > ./src/components/website_index.js Module n...
- Modified
- 6 Feb at 18:18
Android - Adding at least one Activity with an ACTION-VIEW intent-filter after Updating SDK version 23
I am getting the following tool tip in : > App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent-filler. See issue explanation for more details.Adds d...
- Modified
- 20 Jun at 09:12
Timeout for python requests.get entire response
I'm gathering statistics on a list of websites and I'm using requests for it for simplicity. Here is my code: ``` data=[] websites=['http://google.com', 'http://bbc.co.uk'] for w in websites: r= r...
- Modified
- 5 Oct at 15:54
How to rename files and folder in Amazon S3?
Is there any function to rename files and folders in Amazon S3? Any related suggestions are also welcome.
- Modified
- 5 Jun at 12:7
Error when using 'sed' with 'find' command on OS X: "invalid command code ."
Being forced to use CVS for a current client and the address changed for the remote repo. The only way I can find to change the remote address in my local code is a recursive search and replace. Howe...
Choose Git merge strategy for specific files ("ours", "mine", "theirs")
I am in the middle of rebasing after a `git pull --rebase`. I have a few files that have merge conflicts. How can I accept "their" changes or "my" changes for specific files? ``` $ git status # Not...
- Modified
- 2 Aug at 00:24
How to set bootstrap navbar active class with Angular JS?
If I have a navbar in bootstrap with the items ``` Home | About | Contact ``` How do I set the active class for each menu item when they are active? That is, how can I set `class="active"` when the...
- Modified
- 11 Nov at 17:29
How does functools partial do what it does?
I am not able to get my head on how the `partial` works in `functools`. I have the following code from [here](https://stackoverflow.com/questions/3252228/python-why-is-functools-partial-necessary): ``...
- Modified
- 16 Oct at 14:32
How to import Google Web Font in CSS file?
I'm working with a CMS which I only have access to the CSS file. So, I can't include anything in the `<head>` of the document. I was wondering if there was a way to import the web font from within the...
- Modified
- 15 May at 12:46
How do I set a cookie on HttpClient's HttpRequestMessage
I am trying to use the web api's `HttpClient` to do a post to an endpoint that requires login in the form of an HTTP cookie that identifies an account (this is only something that is `#ifdef`'ed out o...
- Modified
- 11 Sep at 16:38
How do you split and unsplit a window/view in Eclipse IDE?
How do you split a window/view in Eclipse IDE? I want to edit code while viewing the different code in the same file. If there is a trick to open the same file twice, this might do, but I would rathe...
Install MySQL on Ubuntu without a password prompt
How do I write a script to install MySQL server on Ubuntu? `sudo apt-get install mysql` will install, but it will also ask for a password to be entered in the console. How do I do this in a non-inte...
Use of "instanceof" in Java
> [What is the 'instanceof' operator used for?](https://stackoverflow.com/questions/7313559/what-is-the-instanceof-operator-used-for) I learned that Java has the `instanceof` operator. Can you el...
- Modified
- 22 Jul at 14:59
Boolean operators && and ||
According to the [R language definition](https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Operators), the difference between `&` and `&&` (correspondingly `|` and `||`) is that the former ...
- Modified
- 27 Sep at 11:39
Python function overloading
I know that Python does not support method overloading, but I've run into a problem that I can't seem to solve in a nice Pythonic way. I am making a game where a character needs to shoot a variety of ...
- Modified
- 26 Jan at 19:56
How to log formatted message, object array, exception?
What is the correct approach to log both a populated message and a stack trace of the exception? ``` logger.error( "\ncontext info one two three: {} {} {}\n", new Object[] {"1", "2", "3"}, ...
Remove an entire column from a data.frame in R
Does anyone know how to remove an entire column from a data.frame in R? For example if I am given this data.frame: ``` > head(data) chr genome region 1 chr1 hg19_refGene CDS 2 chr1 hg19_r...
Run jar file in command prompt
How do we run a jar file in command prompt?