How to display percentage on top of column in stacked Amchart

Javascript
I am using stacked amcharts . For example one in Amchart Now I want to display overall percentage on top of each column. How to add percentage ...
11 days ago

Testing a function that calls a function that returns a promise

Javascript
I have code in the following form: sut.methodtotest = param => { return dependency.methodcall(param) .then((results) => { ...
11 days ago

Change parent's state using funciton in child component

Javascript
How to re render data using setState [child to parent] ? deleteItem function in FoodList should delete the selected data and re render it. Im not aski...
11 days ago

How to avoid repeated rendering of react component?

Javascript
The startUpload method inside <Items /> will call the callback function to update the state of the parent component each time it receives a resp...
11 days ago

Download file generated by javascript in android webview

Javascript
I have an android app with a webview. Whenever a user clicks on a button, JavaScript creates a blob, puts text in it and downloads it. Here's the fu...
11 days ago

Java: how to ensure serializable collections

Java
In Java, the Collection-interfaces do not extend Serializable for several good reasons. In addition, most common implementations of these interfaces i...
11 days ago

Why List<String> is not acceptable as List<Object>?

Java
Consider below method doSomething(List&lt;Object&gt;) which accepts List&lt;Object&gt; as parameter. private void doSomething(List&lt;Object&gt; list...
11 days ago

Java HashMap - variable.getKey - Generic Print Method

Java
I'm looking to create a method which will accept a String as a parameter and then print out the respective HashMap that the String refers too. sensor...
11 days ago

RxJava: OnNext Unsubscribe is not working

Java
I'm trying to unsubscribe after receiving the first item from an observable. And it seems to not work. What am I doing wrong? public class Observ...
11 days ago

How to convert a byte array to two long values?

Java
I'm reading a 16 byte array (byte[16]) from a JDBC ResultSet with rs.getBytes("id") and now I need to convert it to two long values. How can I do that...
11 days ago

Join strings with a separator and stripping empty ones

Java
I need the code logic for the following: These are the three String variables, String s1 = "A"; String s2 = "B"; String s3 = "C"; I need to have t...
11 days ago

Linear Layout not visible / Overlapping

Java
I am trying to implement something like an action bar in android 2.2 . This is my main.xml &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLa...
11 days ago

App icon not shown in Safari in the share menu opened by a long press on a link

iOS
My app has an extension. This extension is available in Safari. When I use Safari share button then it opens a share panel and my app icon is ther...
11 days ago

Appending NSAttributedString with line break returns attributed string with wrong format

iOS
I'm using NSMutableAttributedString and NSAttributedString to display a label text in two different font sizes. My approach is: NSMutableAttributedSt...
11 days ago

Observing Notifications

iOS
I am posting a notification when app is coming to foreground state, I am observing notification in each and every view controller. How is the behaviou...
11 days ago

Converting [NSObject, AnyObject] to [String, AnyObject] in Swift

iOS
I have the following line which used to work in iOS 8 in Swift. let placemark = placemarks![0] as? CLPlacemark let destinationPlacemark = MKPlace...
11 days ago

IOS: copy a file in documents folder

iOS
In my project I have two file .txt (in Resources folder), how can I copy them inside documents folder?
11 days ago

How to control embedded Unity app from native iOS app

iOS
I want to create an iOS app that contains Unity3D elements. I also want to control these elements, to change colors and set specific properties on the...
11 days ago

Make a Button show a new View on click, without using a Segue?

iOS
I'm working on a multi-page brochure app, and have used segues to join pages. I'm getting to the point where I have 20 or so pages and the segue syste...
11 days ago

HTTP GET with request body RETROFIT

Java
I am using Retrofit to make api calls in my android application. I have to submit a @Body of JSON @GET("api/") void getData(@Body UserPostRequestBody...
11 days ago