question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
37,684,995
Tracking in-app billing with Firebase<p>After adding Firebase Analytics to my iOS and Android app the revenue of the iOS in-app purchases are automatically tracked in Firebase, but the Android in-app purchases are not.</p> <p>Do I have to write extra code for the Android version?</p>
<p>No extra code is necessary.</p> <p>You need to link your Firebase app to Google Play in order for those in-app purchases to be reported in Firebase Analytics. You can do so in the Firebase Project Settings->Account Linking section.</p>
Tracking in-app billing with Firebase
android|firebase|in-app-purchase|in-app-billing|firebase-analytics
11
8,517
1
37,689,219
37,689,219
16
true
2016-06-07T16:49:47.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Tracking in-app billing with Firebase<p>After adding Firebase Analytics to my iOS and Android app the revenue of the iOS in-app purchases are automatically t...
37,636,259
React : Pass function to child component<p>I try to pass a function to my child component. For each child component when the user click on them, the onclick function will be call. This onclick function is written into the parent component.</p> <p>Parent component:</p> <pre><code>class AgentsList extends React.Compone...
<p>You need to bind Agents to AgentsList: Here's a quick example with your code, I had to get rid of some stuff, but you get the idea:</p> <p><a href="http://jsfiddle.net/vhuumox0/19/" rel="noreferrer">http://jsfiddle.net/vhuumox0/19/</a></p> <pre><code>var agentsNodes = agents.map(function(agent, i) { if(agent.id_...
React : Pass function to child component
javascript|reactjs
33
95,553
1
37,636,304
37,636,304
33
true
2016-06-05T00:17:07.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React : Pass function to child component<p>I try to pass a function to my child component. For each child component when the user click on them, the onclick ...
37,743,661
Firebase No properties to serialize found on class<p>I'm bloqued creating a Firebase Database. </p> <p>I'm trying to model a class. A very simple class:</p> <pre><code>package com.glups.model; import com.google.firebase.database.IgnoreExtraProperties; @IgnoreExtraProperties public class AlumnoFB { private Stri...
<p>Firebase require your Pojo to have <strong>public variables or getter/setter.</strong></p> <p>Change variable declarations to public</p> <pre><code>public String nombre; public String apellidos; public String telefono; public String email; public Boolean tieneWhatsapp; public Boolean tieneTelegram; public Boolean ...
Firebase No properties to serialize found on class
java|android|firebase|firebase-realtime-database
98
50,989
12
37,744,290
37,744,290
183
true
2016-06-10T08:37:54.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase No properties to serialize found on class<p>I'm bloqued creating a Firebase Database. </p> <p>I'm trying to model a class. A very simple class:</p>...
37,685,958
Failing a build in Jenkinsfile<p>Under certain conditions I want to fail the build. How do I do that?</p> <p>I tried:</p> <pre><code>throw RuntimeException("Build failed for some specific reason!") </code></pre> <p>This does in fact fail the build. However, the log shows the exception:</p> <pre><code>org.jenkinsc...
<p>You can use the <a href="https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#error-error-signal" rel="noreferrer"><code>error</code></a> step from the pipeline DSL to fail the current build.</p> <pre><code>error("Build failed because of this and that..") </code></pre>
Failing a build in Jenkinsfile
jenkins|groovy|jenkins-pipeline
105
149,047
4
37,686,051
37,686,051
221
true
2016-06-07T17:44:34.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Failing a build in Jenkinsfile<p>Under certain conditions I want to fail the build. How do I do that?</p> <p>I tried:</p> <pre><code>throw RuntimeExceptio...
37,729,662
Laravel: Running queue:listen continuously on Windows Azure Web App<p>I feel a little bit silly for asking this question but I can't seem to find an answer on the internet for this problem. After searching for several hours I figured out that on a linux server you use Supervisor to run "php artisan queue:listen" (eithe...
<p>In short, Supervisor is a modern alternative to nohup (no hang up) with a few other bits and pieces tacked on. In short, there's other resources that can keep a task running in the background (daemon) and the solution I use for Windows based projects (very few tbh) is Forever which I discovered via: <a href="https:/...
Laravel: Running queue:listen continuously on Windows Azure Web App
php|laravel|azure|queue|laravel-artisan
9
9,224
3
37,730,455
37,730,455
7
true
2016-06-09T15:02:38.977Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel: Running queue:listen continuously on Windows Azure Web App<p>I feel a little bit silly for asking this question but I can't seem to find an answer o...
37,700,020
Firebase Storage - URL for image services<p>I'm trying to get Firebase Storage to work with an image service like <a href="https://www.imgix.com/" rel="noreferrer">Imgix</a> or <a href="https://cloudinary.com" rel="noreferrer">Cloudinary</a>. However, the download URL's that Firebase provides, do not seem to work with ...
<p>You can absolutely use a service like Imgix or Cloudinary with Firebase Storage URLs--the issue here (as is true with 99% of cases like this) is that the URL needs to be percent escaped when used in the fetch.</p> <p>If we have a URL like: <code>https://firebasestorage.googleapis.com/v0/b/fir-cloudvisiontest.appspo...
Firebase Storage - URL for image services
firebase|cloudinary|firebase-storage
10
5,709
2
37,706,262
37,706,262
13
true
2016-06-08T10:33:23.057Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase Storage - URL for image services<p>I'm trying to get Firebase Storage to work with an image service like <a href="https://www.imgix.com/" rel="noref...
37,846,023
<input type=“search”> no longer shows cancel button (x) under firefox<p>I found that <code>&lt;input type=“search”&gt;</code> only works in Chrome and IE, but not in Firefox. How can I make <code>&lt;input type=“search”&gt;</code> show the cancel button (x) in Firefox?</p>
<p>Webkit derived browsers put in an x to clear a value. Firefox does not. However firefox supports this feature, but it does nothing about it and you need to style it your self to show the X button in firefox.</p> <p>Following link will help you to achieve the goal: <a href="http://codepen.io/shidhincr/pen/ICLBD" rel...
<input type=“search”> no longer shows cancel button (x) under firefox
html
12
11,808
2
37,846,330
37,846,330
14
true
2016-06-15T21:23:51.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: <input type=“search”> no longer shows cancel button (x) under firefox<p>I found that <code>&lt;input type=“search”&gt;</code> only works in Chrome and IE, bu...
37,688,027
How can I list all of the configuration sources or properties in ASP.NET Core?<p>I want to ensure that a particular configuration property is being read from a configuration source. I was going to print out all of the configuration sources (or print out all of the configuration properties), but I can’t seem to figure o...
<p>You can get a list of all the keys discovered by all configuration sources by doing:</p> <pre><code>var keys = builder.Build().AsEnumerable().ToList(); </code></pre> <p>I haven't found a way to build each configuration source separately so you could see the sources individually.</p> <p>In debug mode, you can see ...
How can I list all of the configuration sources or properties in ASP.NET Core?
c#|asp.net|.net|asp.net-core|.net-core
24
14,646
3
37,688,484
37,688,484
28
true
2016-06-07T19:44:53.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I list all of the configuration sources or properties in ASP.NET Core?<p>I want to ensure that a particular configuration property is being read from...
37,737,843
Aggregating multiple columns with custom function in Spark<p>I was wondering if there is some way to specify a custom aggregation function for spark dataframes over multiple columns. </p> <p>I have a table like this of the type (name, item, price):</p> <pre><code>john | tomato | 1.99 john | carrot | 0.45 bill | apple...
<p>The easiest way to do this as a <code>DataFrame</code> is to first collect two lists, and then use a <code>UDF</code> to <code>zip</code> the two lists together. Something like:</p> <pre><code>import org.apache.spark.sql.functions.{collect_list, udf} import sqlContext.implicits._ val zipper = udf[Seq[(String, Doub...
Aggregating multiple columns with custom function in Spark
scala|apache-spark|dataframe|apache-spark-sql|orc
43
46,876
5
37,747,315
37,747,315
36
true
2016-06-09T23:38:44.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Aggregating multiple columns with custom function in Spark<p>I was wondering if there is some way to specify a custom aggregation function for spark datafram...
37,720,097
Unit Test Cases with JUnit +(Robolectric or Mockito or both in Android)<p>This is first time I have to write unit test cases in Android.</p> <p>So I have searched lots of things.</p> <ol> <li><strong>Robolectric framewordk</strong> - Runs on JVM</li> <li><strong>Mockito Framwork</strong> - Mocking objects</li> </ol> ...
<p>They have slightly different usages and I tend to use both in my projects.</p> <p><strong>Mockito</strong> </p> <p>is used for making mocks of <em>your</em> classes. </p> <p>When you are testing a particular class you mock all of its dependencies with Mockito.</p> <p>Where possible most of your tests should use...
Unit Test Cases with JUnit +(Robolectric or Mockito or both in Android)
android|mockito|junit4|robolectric
43
11,320
3
37,720,618
37,720,618
49
true
2016-06-09T08:01:38.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unit Test Cases with JUnit +(Robolectric or Mockito or both in Android)<p>This is first time I have to write unit test cases in Android.</p> <p>So I have se...
37,818,677
How can I limit ngFor repeat to some number of items in Angular?<p>My Code:</p> <pre class="lang-ts prettyprint-override"><code>&lt;li *ngFor="let item of list; let i=index" class="dropdown-item" (click)="onClick(item)"&gt; &lt;template [ngIf]="i&lt;11"&gt;{{item.text}}&lt;/template&gt; &lt;/li&gt; </code></pre> <p...
<p>This seems simpler to me</p> <pre class="lang-ts prettyprint-override"><code>&lt;li *ngFor=&quot;let item of list | slice:0:10; let i=index&quot; class=&quot;dropdown-item&quot; (click)=&quot;onClick(item)&quot;&gt;{{item.text}}&lt;/li&gt; </code></pre> <p>Closer to your approach</p> <pre class="lang-ts prettyprint...
How can I limit ngFor repeat to some number of items in Angular?
angular
182
192,588
9
37,818,735
37,818,735
395
true
2016-06-14T17:36:53.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I limit ngFor repeat to some number of items in Angular?<p>My Code:</p> <pre class="lang-ts prettyprint-override"><code>&lt;li *ngFor="let item of l...
37,653,037
Android How to call Fragment from my Main Activity<p>i am very new to android development.</p> <p>in my case i have one main activity and one fragment created.Main activity as two buttons.</p> <p>when i click on button, my fragment should load .how can i achieve that?</p> <p>Mainactivity .XML </p> <pre><co...
<p><strong>Updated:</strong> Please change your MainActivity as like this: </p> <pre><code> public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activit...
Android How to call Fragment from my Main Activity
java|android|android-fragments
9
89,156
6
37,653,673
37,653,673
14
true
2016-06-06T08:43:09.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android How to call Fragment from my Main Activity<p>i am very new to android development.</p> <p>in my case i have one main activity and one fragment creat...
37,624,369
Android Studio Error: Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running<p>Installed Android Studio 2.2 Preview 2 and getting this error:</p> <blockquote> <p>Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you...
<p>I had the same issue, but I have resolved it the next:</p> <p>1) Install jdk1.8...</p> <p>2) In AndroidStudio File->Project Structure->SDK Location, select your directory where the <strong>JDK</strong> is located, by default Studio uses embedded JDK but for some reason it produces error=216.</p> <p>3) Click Ok.</...
Android Studio Error: Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running
java|android|android-studio|java-8|android-studio-2.2
73
206,630
4
37,712,337
37,712,337
126
true
2016-06-03T22:31:13.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android Studio Error: Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running<p>Installed Android Stud...
37,671,125
How to configure Spring Security to allow Swagger URL to be accessed without authentication<p>My project has Spring Security. Main issue: Not able to access swagger URL at <a href="http://localhost:8080/api/v2/api-docs" rel="noreferrer">http://localhost:8080/api/v2/api-docs</a>. It says Missing or invalid Authorizatio...
<p>Adding this to your WebSecurityConfiguration class should do the trick.</p> <pre><code>@Configuration public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter { @Override public void configure(WebSecurity web) throws Exception { web.ignoring().antMatchers("/v2/api-docs", ...
How to configure Spring Security to allow Swagger URL to be accessed without authentication
spring-mvc|swagger|swagger-ui|swagger-2.0|springfox
125
216,373
13
37,683,455
37,683,455
223
true
2016-06-07T05:25:16.410Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to configure Spring Security to allow Swagger URL to be accessed without authentication<p>My project has Spring Security. Main issue: Not able to access...
37,760,366
pytest -> How to use fixture return value in test method under a class<p>I have a fixture that returns a value like this:</p> <pre><code>import pytest @pytest.yield_fixture(scope="module") def oneTimeSetUp(browser): print("Running one time setUp") if browser == 'firefox': driver = webdriver.Firefox() ...
<p>There's a technique outlined in the <a href="https://pytest.org/latest/unittest.html" rel="noreferrer">py.text unittest integration documentation</a> that may be helpful to you ... using the built-in <code>request</code> fixture. Otherwise, I'm not aware of way to access the return value of a fixture without providi...
pytest -> How to use fixture return value in test method under a class
python|python-3.x|automated-tests|pytest|python-unittest
9
24,610
1
37,761,165
37,761,165
8
true
2016-06-11T05:39:47.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: pytest -> How to use fixture return value in test method under a class<p>I have a fixture that returns a value like this:</p> <pre><code>import pytest @pyt...
37,611,488
How to stream a video with AVURLAsset and save to disk the cached data<p>Some days ago I was asked to check how difficult is to play a video while downloading it from Internet. I know it's an easy task because someone told me a while ago. So, I checked and it was super easy.</p> <p>The problem was that I wanted to sav...
<p>The solution for this problem is to use <code>AVAssetExportSession</code> and <code>AVAssetResourceLoaderDelegate</code>:</p> <p>First step is to add a notification to know when the video finish. Then we can start saving it to disk.</p> <pre><code>override func viewDidLoad() { super.viewDidLoad() NSNotif...
How to stream a video with AVURLAsset and save to disk the cached data
ios|swift|avfoundation|avplayer|avurlasset
11
17,967
2
37,611,489
37,611,489
25
true
2016-06-03T10:06:42.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to stream a video with AVURLAsset and save to disk the cached data<p>Some days ago I was asked to check how difficult is to play a video while downloadin...
37,605,119
Angular2 router (@angular/router), how to set default route?<p>How can I set a default route in my @Routes route metadata collection? If you use the angular2 router from @angular/router-deprecated you define the routes in @routeConfig object, which is a collection of route objects, but these route objects have more at...
<p><strong>V2.0.0 and later</strong></p> <p>See also see <a href="https://angular.io/guide/router#the-default-route-to-heroes" rel="noreferrer">https://angular.io/guide/router#the-default-route-to-heroes</a></p> <pre class="lang-ts prettyprint-override"><code>RouterConfig = [ { path: '', redirectTo: '/heroes', path...
Angular2 router (@angular/router), how to set default route?
angular
95
177,222
10
37,605,802
37,605,802
172
true
2016-06-03T02:40:22.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular2 router (@angular/router), how to set default route?<p>How can I set a default route in my @Routes route metadata collection? If you use the angular...
37,668,291
Flatten double nested JSON<p>I am trying to flatten a JSON file that looks like this:</p> <pre><code>{ "teams": [ { "teamname": "1", "members": [ { "firstname": "John", "lastname": "Doe", "orgname": "Anon", "phone": "916-555-1234", "mobile": "", "email":...
<p>This is one way to do it. Should give you some ideas.</p> <pre><code>df = pd.concat( [ pd.concat([pd.Series(m) for m in t['members']], axis=1) for t in data['teams'] ], keys=[t['teamname'] for t in data['teams']] ) 0 1 1 email j...
Flatten double nested JSON
python|json|excel|pandas|dictionary
10
13,370
2
37,668,569
37,668,569
10
true
2016-06-06T23:24:19.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flatten double nested JSON<p>I am trying to flatten a JSON file that looks like this:</p> <pre><code>{ "teams": [ { "teamname": "1", "members": [ ...
37,746,516
Use component in itself recursively to create a tree<p>Do you know is it possible to use component in itself? If yes,where to read about it?</p> <p>I have next situation: have list of mainItems, every Main Item has subItem (the same look like mainItem), every subItem can have it's own subItem etc. So it better to use...
<p><strong>update</strong></p> <p><code>forwardRef()</code> isn't required anymore because <code>directives</code> was moved to <code>NgModule.declarations</code> and therefore recursive components don't need to be registered on themselves as <code>directives</code> anymore.</p> <p><a href="https://plnkr.co/edit/IrW8...
Use component in itself recursively to create a tree
angular|components
37
27,470
3
37,747,022
37,747,022
47
true
2016-06-10T10:58:01.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use component in itself recursively to create a tree<p>Do you know is it possible to use component in itself? If yes,where to read about it?</p> <p>I have n...
37,775,213
Adding pull to refresh on webview for refreshing<p>I will add pull to refresh on my webview so it refresh my webview. i have seen all questions on this page but i can't find the good way to add pull to refresh... </p> <p>Mainactivity.java</p> <pre><code>package com.vvhvb.hesselfeenstra.vvheerenveenseboys; import and...
<p>You could wrap webview in Swipe refesh layout like this</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="m...
Adding pull to refresh on webview for refreshing
java|android|android-studio|webview|pull-to-refresh
29
54,040
8
37,775,633
37,775,633
41
true
2016-06-12T14:12:50.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adding pull to refresh on webview for refreshing<p>I will add pull to refresh on my webview so it refresh my webview. i have seen all questions on this page ...
37,602,168
Firebase Returning user object after account creation<p>Im trying to create a user within Firebase and then create a user profile within the database on a web server. I have implemented the following code which creates the user quite nicely. However im not sure on how to receive the user id (which i need for a unique ...
<p>In order to get the user id in the client side you should do this:</p> <pre><code>firebase.auth().createUserWithEmailAndPassword(textUser, textPassword) .then(function(user){ console.log('uid',user.uid) //Here if you want you can sign in the user }).catch(function(error) { //Handle error }); </code></pre>...
Firebase Returning user object after account creation
javascript|firebase|firebase-realtime-database|firebase-authentication
12
15,380
4
37,602,405
37,602,405
29
true
2016-06-02T21:11:03.893Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase Returning user object after account creation<p>Im trying to create a user within Firebase and then create a user profile within the database on a w...
37,795,337
Android: multiple intentservices or one intentservice with multiple intents?<p>I'm a little confused about intentService. The docs say that if you send an intentService multiple tasks (intents) then it will execute them one after the other on one separate thread. My question is - is it possible to have multiple intentS...
<p><strong>1) Is it possible to have multiple intentService threads at the same time or not?</strong></p> <p>No, each IntentService only has one <a href="https://developer.android.com/reference/android/os/HandlerThread.html">HandlerThread</a> that it uses to execute requests in the order that "startService" is called...
Android: multiple intentservices or one intentservice with multiple intents?
android|multithreading|android-service|android-intentservice|worker-thread
13
7,723
1
37,795,406
37,795,406
12
true
2016-06-13T17:00:37.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android: multiple intentservices or one intentservice with multiple intents?<p>I'm a little confused about intentService. The docs say that if you send an in...
37,785,156
How to find the Office AddIn Host it is a Word application or Excel using office.js?<p>I am creating a office AddIn which works in both excel and word applications and based on host if it is a word or excel host i want to execute different logic. I am using office.js to create office Addin. </p> <p>for example :-</p> ...
<p><strong>Update Dec 5, 2016: We will soon be releasing an API to detect the host and platform information</strong> (partially in response to the fact that the <code>_host_info</code> URL paramater, which folks had unofficially relied on, needed to be recently removed for Office Online). We also have a temporary work...
How to find the Office AddIn Host it is a Word application or Excel using office.js?
excel|add-in|office-js
7
1,574
3
37,795,222
37,795,222
1
true
2016-06-13T08:37:25.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find the Office AddIn Host it is a Word application or Excel using office.js?<p>I am creating a office AddIn which works in both excel and word applic...
37,816,952
How to handle Contentful content data in Gatsby<p>I'm interested in using <a href="https://github.com/gatsbyjs/gatsby" rel="noreferrer">Gatsby</a> to build a <a href="https://www.netlify.com" rel="noreferrer">Netlify</a> static site using content from <a href="https://www.contentful.com/features/" rel="noreferrer">Cont...
<p>Since this question was posted, an official Contentful plugin's been added to Gatsby's collection (official as in created by Gatsby team, not Contentful): <a href="https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-contentful" rel="nofollow noreferrer">https://github.com/gatsbyjs/gatsby/tree/maste...
How to handle Contentful content data in Gatsby
contentful|gatsby|netlify
7
4,386
3
47,113,387
47,113,387
8
true
2016-06-14T16:00:39.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to handle Contentful content data in Gatsby<p>I'm interested in using <a href="https://github.com/gatsbyjs/gatsby" rel="noreferrer">Gatsby</a> to build a...
44,049,719
How does asyncio.as_completed work<p>Reading <a href="https://stackoverflow.com/a/41901796/2594812">this answer</a>, I ran across asyncio.tasks.as_completed. I don't understand how that function actually works. It is documented as being a non-async routine that returns futures in the order they complete. It creates a...
<p>The code you copied is missing a header part, that is quite imporant.</p> <pre><code># This is *not* a @coroutine! It is just an iterator (yielding Futures). def as_completed(fs, *, loop=None, timeout=None): """Return an iterator whose values are coroutines. When waiting for the yielded coroutines you'll ...
How does asyncio.as_completed work
python|python-3.x|python-asyncio
9
9,747
1
47,140,788
47,140,788
8
true
2017-05-18T13:54:06.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How does asyncio.as_completed work<p>Reading <a href="https://stackoverflow.com/a/41901796/2594812">this answer</a>, I ran across asyncio.tasks.as_completed....
37,743,194
Local Flink config running standalone from IDE<p>If I'd like to run a Flink app locally, directly from within Intellij but I need to specify config params (like fs.hdfs.hdfssite to set up S3 access), is there any other way to provide those config params apart from <code>ExecutionEnvironment.createLocalEnvironment(conf)...
<p>To create a <code>StreamExecutionEnvironment</code> with configuration options, use this call <code>StreamExecutionEnvironment.createLocalEnvironment(int parallelism, Configuration configuration)</code></p>
Local Flink config running standalone from IDE
apache-flink
8
3,396
4
42,138,015
42,138,015
4
true
2016-06-10T08:12:20.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Local Flink config running standalone from IDE<p>If I'd like to run a Flink app locally, directly from within Intellij but I need to specify config params (l...
37,993,014
what is uri in SOAP non wsdl mode options<p>php SOAPClient and SOAPServer in non wsdl mode require an array of options. the location in options used to point where is the web service server file but what do the uri in options?? because i change it to every thing and the web server is work fine</p> <pre><code>$options ...
<p>An array of options. If working in WSDL mode, this parameter is optional. If working in non-WSDL mode, the location and uri options must be set, where:</p> <ul> <li><strong>location</strong> is the URL of the SOAP server to send the request to</li> <li><strong>uri</strong> is the target namespace of the SOAP service...
what is uri in SOAP non wsdl mode options
web-services|soap
10
19,491
1
42,273,815
42,273,815
6
true
2016-06-23T13:26:18.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: what is uri in SOAP non wsdl mode options<p>php SOAPClient and SOAPServer in non wsdl mode require an array of options. the location in options used to point...
37,697,938
Is there a way to resolve Rails deleted migrations?<p>I happened to have deleted migrations and I don't want to revert these removed migrations.</p> <p>This is what <code>rake db:migrate:status</code> produces:</p> <pre><code> Status Migration ID Migration Name ---------------------------------------------------...
<p>If you can find the migration's timestamp - the number part of the filename, then you can do:</p> <pre><code>rake db:migrate:down VERSION=20100905201547 </code></pre> <p>You can find the timestamp using <code>rake db:migrate:status</code></p> <p><strong>Edit</strong> - when the migration file has been irrecoverab...
Is there a way to resolve Rails deleted migrations?
ruby-on-rails|ruby-on-rails-3|ruby-on-rails-4|migration|rails-migrations
10
7,200
2
42,508,681
42,508,681
6
true
2016-06-08T09:03:27.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to resolve Rails deleted migrations?<p>I happened to have deleted migrations and I don't want to revert these removed migrations.</p> <p>This...
37,928,266
how to check syslog for ubuntu docker<p>I installed <a href="https://hub.docker.com/r/tutum/ubuntu/" rel="noreferrer"><code>tutum/ubuntu</code></a> in local vm's docker.</p> <p>When I login to <code>ubuntu</code> and run below command.</p> <pre><code>logger "Test Logging" </code></pre> <p>I can't find the file where...
<p>There is no rsyslogd installed by default, nor in this image you are using.</p> <p>If you wish to utilize rsyslogd in your docker container, you should install/configure it by your self via Dockerfile first.</p> <pre><code>RUN apt-get -y install rsyslog </code></pre> <p>You will probably need supervisord as well ...
how to check syslog for ubuntu docker
ubuntu|logging|docker|syslog
15
13,368
1
42,258,714
42,258,714
7
true
2016-06-20T17:16:53.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to check syslog for ubuntu docker<p>I installed <a href="https://hub.docker.com/r/tutum/ubuntu/" rel="noreferrer"><code>tutum/ubuntu</code></a> in local ...
43,967,887
How to customize javafx scrollbar thumb thickness by css?<p>I tried to set thickness by <code>-fx-pref-height: 10px;</code> when orientation is horizontal, and by <code>-fx-pref-width: 10px;</code> when scrollbar orientation is vertical. But is doesn't work.</p> <pre><code>.scroll-bar:horizontal .thumb { -fx-backg...
<p>you can set the padding of the scrollbars to shrink the thumbs' thickness.</p> <pre><code>.scroll-bar:vertical { -fx-pref-width: 16.5; -fx-padding: 3; } .scroll-bar:horizontal { -fx-pref-height: 16.5; -fx-padding: 3; } .scroll-bar, .scroll-bar:pressed, .scroll-bar:focused { -fx-font-size: 15; ...
How to customize javafx scrollbar thumb thickness by css?
css|javafx|scrollbar
8
7,239
3
47,881,595
47,881,595
8
true
2017-05-14T19:15:13.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to customize javafx scrollbar thumb thickness by css?<p>I tried to set thickness by <code>-fx-pref-height: 10px;</code> when orientation is horizontal, a...
38,010,494
Is it possible to "toggle software keyboard" via the code in UI test?<p>I have UI tests which testing login functionality (and uses it to test other stuff), but sometimes when focus is changed from one field to another - the keyboard hides, and although the cursor is blinking in the field, I getting error on <code>fiel...
<p>The simulator's .plist file changed to add support for multiple simulators. The ConnectHardwareKeyboard boolean is now nested underneath the device's UDID. Luckily this UDID is also stored in the plist file. You can add this code using 'run script' under your UITest target's build phases. </p> <p>Xcode 9 answer:<...
Is it possible to "toggle software keyboard" via the code in UI test?
ios|xcode|ios-simulator|xcode-ui-testing
35
11,587
7
47,820,883
47,820,883
22
true
2016-06-24T09:52:11.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to "toggle software keyboard" via the code in UI test?<p>I have UI tests which testing login functionality (and uses it to test other stuff), ...
44,043,036
How to read image file from S3 bucket directly into memory?<p>I have the following code</p> <pre><code>import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import boto3 s3 = boto3.resource('s3', region_name='us-east-2') bucket = s3.Bucket('sentinel-s2-l1c') object = bucket.Object('tiles/...
<p>I would suggest using <a href="https://docs.python.org/3.6/library/io.html" rel="noreferrer">io module</a> to read the file directly in to memory, without having to use a temporary file at all.</p> <p>For example:</p> <pre><code>import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np im...
How to read image file from S3 bucket directly into memory?
python|matplotlib|amazon-s3|boto3
56
70,214
9
47,910,352
47,910,352
68
true
2017-05-18T08:53:34.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to read image file from S3 bucket directly into memory?<p>I have the following code</p> <pre><code>import matplotlib.pyplot as plt import matplotlib.ima...
44,368,672
First and last value of window function in one row in PostgreSQL<p>I'd like to have first value of one column and last value of second column in one row for a specified partition. For that I created this query:</p> <pre><code>SELECT DISTINCT b.machine_id, batch, timestamp_sta, timestamp_stp, FIRST_VALUE(timestamp_sta)...
<p>The question is old, but this solution is simpler and faster than what's been posted so far:</p> <pre><code>SELECT b.machine_id , batch , timestamp_sta , timestamp_stp , min(timestamp_sta) OVER w AS batch_start , max(timestamp_stp) OVER w AS batch_end FROM db_data.sta_stp a JOIN db_data...
First and last value of window function in one row in PostgreSQL
postgresql|window-functions
7
12,095
3
51,457,588
51,457,588
12
true
2017-06-05T12:11:38.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: First and last value of window function in one row in PostgreSQL<p>I'd like to have first value of one column and last value of second column in one row for ...
44,362,462
How to run a post-install script after individual execution of "npm install <package>"<p>I am maintaining the following directory structure:</p> <pre><code>/home/user/Desktop/ |-- app/ | |-- package.json | `-- server.js |-- node/ ...
<p>You can use <a href="https://docs.npmjs.com/cli/v7/using-npm/scripts#hook-scripts" rel="noreferrer">npm hook scripts</a> to do something after package is installed.</p> <p>Create <code>node_modules/.hooks/postinstall</code> executable and it will be run also after <code>npm install &lt;package&gt;</code>.</p> <p><st...
How to run a post-install script after individual execution of "npm install <package>"
node.js|npm|npm-install|node-modules|npm-scripts
17
10,289
3
51,155,609
51,155,609
9
true
2017-06-05T05:49:50.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to run a post-install script after individual execution of "npm install <package>"<p>I am maintaining the following directory structure:</p> <pre><code>...
38,014,048
Mockito on Android, Context.getString(id) and NullPointerException<p>I've just started learning a Mockito testing framework, I followed official tutorial from: <a href="https://developer.android.com/training/testing/unit-testing/local-unit-tests.html" rel="noreferrer">developer.android.com</a></p> <p>The code is:</p> ...
<p>It seems that you are using the exact code from <a href="https://developer.android.com/training/testing/unit-testing/local-unit-tests.html#mocking-dependencies" rel="nofollow noreferrer">developer.android.com</a>. Apparently they posted an incomplete example.. add this method to your test:</p> <pre><code>@Before p...
Mockito on Android, Context.getString(id) and NullPointerException
android|unit-testing|testing|mockito
14
13,831
4
46,819,861
46,819,861
1
true
2016-06-24T12:59:17.753Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mockito on Android, Context.getString(id) and NullPointerException<p>I've just started learning a Mockito testing framework, I followed official tutorial fro...
43,975,973
How to fix error: failed to download on rbenv install<p>On fresh, new CentOS 7.0 VM Rbenv installation will not install rubies for me</p> <pre><code>[vagrant@ad-proxy ~]$ rbenv install 2.2.4 Downloading ruby-2.2.4.tar.bz2... -&gt; https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.bz2 error: failed to download ru...
<p>In my case updating <code>curl</code> combined with nss update helped.</p>
How to fix error: failed to download on rbenv install
curl|rbenv
14
8,006
2
46,406,704
46,406,704
5
true
2017-05-15T09:33:40.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fix error: failed to download on rbenv install<p>On fresh, new CentOS 7.0 VM Rbenv installation will not install rubies for me</p> <pre><code>[vagran...
43,990,032
Angular 2 component input without value<p>I want to create a component that has attributes that need no value. For example, instead of something like this: (which I have now)</p> <pre><code>&lt;app-document [mode]="'edit'" ... &gt;&lt;/app-document&gt; </code></pre> <p>or</p> <pre><code>&lt;app-document [editMode]=...
<p><a href="https://material.angular.io/" rel="noreferrer">Material2</a> wrote the following method:</p> <pre><code>/** Coerces a data-bound value (typically a string) to a boolean. */ export function coerceBooleanProperty(value: any): boolean { return value != null &amp;&amp; `${value}` !== 'false'; } </code></pre>...
Angular 2 component input without value
angular
18
6,733
2
46,523,651
46,523,651
31
true
2017-05-15T22:57:54.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular 2 component input without value<p>I want to create a component that has attributes that need no value. For example, instead of something like this: ...
44,301,989
How to use Cloud Functions for Firebase to prerender pages for SEO?<p>The Cloud Functions for Firebase documentation <a href="https://firebase.google.com/docs/hosting/functions" rel="noreferrer">here</a> states that this can be done using cloud functions -</p> <blockquote> <p>Prerendering for single page apps to imp...
<p>Two tasks: - Add the function to your hosting rewrite as in your example - Write the function to generate an html page</p> <p><a href="https://hackernoon.com/firebase-to-the-rescue-dynamic-routing-via-hosting-functions-integration-aef888ddf311" rel="noreferrer">This tutorial</a> provides a great example, with the f...
How to use Cloud Functions for Firebase to prerender pages for SEO?
firebase|seo|google-cloud-functions|firebase-hosting
8
6,923
3
46,551,859
46,551,859
10
true
2017-06-01T08:10:07.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use Cloud Functions for Firebase to prerender pages for SEO?<p>The Cloud Functions for Firebase documentation <a href="https://firebase.google.com/doc...
37,635,996
How to determine if user cancels Google Play subscription?<p>About to build a subscription product into our Android app, but a little unclear on the best way to know about canceled subscriptions. The only way we are planning on letting the user cancel is for them to go to Google Play Store and explicitly cancel, but in...
<p>It looks like it's now possible to receive server-side notifications about subscriptions changes (renewal, cancellation...):</p> <blockquote> <p>The In-app Billing API provides server push notifications that give developers the capability to monitor state changes for Play-managed subscriptions. </p> </blockquote>...
How to determine if user cancels Google Play subscription?
android|google-play|subscriptions|google-play-developer-api
26
9,742
2
46,832,133
46,832,133
8
true
2016-06-04T23:27:11.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to determine if user cancels Google Play subscription?<p>About to build a subscription product into our Android app, but a little unclear on the best way...
44,003,663
Changing default subnet for docker custom networks<p>Our internal network has the range 172.20.0.0/16 reserved for internal purposes and docker uses the 172 range by default for its internal networking. I can reset the bridge to live in 192.168 by providing the <code>bip</code> setting to the daemon:</p> <pre><code>➜ ...
<p>For anyone who found this question. Now it is possible.</p> <pre><code>$ docker -v Docker version 18.06.0-ce, build 0ffa825 </code></pre> <p>Edit or create config file for docker daemon:</p> <pre><code># nano /etc/docker/daemon.json </code></pre> <p>Add lines:</p> <pre><code>{ "default-address-pools": [ ...
Changing default subnet for docker custom networks
docker|docker-compose
19
17,198
1
52,885,161
52,885,161
31
true
2017-05-16T14:01:51.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Changing default subnet for docker custom networks<p>Our internal network has the range 172.20.0.0/16 reserved for internal purposes and docker uses the 172 ...
37,750,552
@angular/router 3.0.0-alpha.3: How to migrate OnActivate<p>I just upgraded @angular/router to 3.0.0-alpha.3. However, I cannot find the interface OnActivate which was available in 2.0.0-rc.1. Any hint is appreciated.</p>
<p>I'm personally not convinced that CanActivate and Deactivate guards are the best places to migrate OnActivation logic that isn't a guard of some sort.</p> <p>Maybe the new router events are a better option: <a href="https://stackoverflow.com/questions/37977428/how-to-use-new-navigationstart-angular-router-3-0-0-alp...
@angular/router 3.0.0-alpha.3: How to migrate OnActivate
angular|router
10
2,864
3
38,591,268
38,591,268
1
true
2016-06-10T14:17:06.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: @angular/router 3.0.0-alpha.3: How to migrate OnActivate<p>I just upgraded @angular/router to 3.0.0-alpha.3. However, I cannot find the interface OnActivate ...
37,684,252
Installing Wildfly 10.0.0 on ubuntu 16.0 could not be able to configure init.d file<p>I am using the command sudo cp /opt/wildfly/bin/init.d/wildfly.conf /etc/default/wildfly to copy and edit the init.d file. I am getting this error cp: cannot stat '/opt/wildfly/bin/init.d/wildfly.conf': No such file or directory> When...
<p>In <strong>wildfly 10</strong> <code>init.d</code> file located in <code>${WILDFLY_HOME}/docs/contrib/scripts/</code> directory</p> <p>So you need to run </p> <pre><code>cp /opt/wildfly/docs/contrib/scripts/init.d/wildfly-init-debian.sh /etc/init.d/wildfly </code></pre> <p>and</p> <p>Debian:</p> <pre><code>cp /...
Installing Wildfly 10.0.0 on ubuntu 16.0 could not be able to configure init.d file
ubuntu-16.04|wildfly-10
9
1,862
5
38,899,161
38,899,161
5
true
2016-06-07T16:07:05.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Installing Wildfly 10.0.0 on ubuntu 16.0 could not be able to configure init.d file<p>I am using the command sudo cp /opt/wildfly/bin/init.d/wildfly.conf /et...
37,899,216
"Server x timed out" during MongoDB aggregation<p>I have a script that periodically runs aggregation on a mongodb collection. As the dataset has grown, the amount of time it takes to aggregate has also grown. My aggregation script has recently stopped working consistently, and the error logs show: <code> error: { [Mon...
<p>I got the same problem for logs time aggregation. I think I have the solution for you.</p> <p>I found that the option <code>socketTimeoutMS</code> is responsible for that. Check your mongo_client.js default <code>socketTimeoutMS</code> value. For me it was <code>2min</code>. Mongodb module version 2.1.18.</p> <p>S...
"Server x timed out" during MongoDB aggregation
node.js|mongodb|docker|alpine-linux
9
3,841
1
38,695,850
38,695,850
10
true
2016-06-18T16:30:43.673Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: "Server x timed out" during MongoDB aggregation<p>I have a script that periodically runs aggregation on a mongodb collection. As the dataset has grown, the a...
37,820,253
Suitescript 2.0 addButton<p>I have a suitelet with a sublist button and I am trying to get the button to execute a function on a custom module. I can not get it to work. I get an error "Cannot call method "receive" of undefined" Any Ideas?</p> <p>Snippet of code to add button <div class="snippet" data-lang="js" data...
<p>After not getting this to work after multiple tries I filed a defect with Netsuite (Defect 390444) and they have just told me that this has now been fixed and tested and will be in the next major release.</p>
Suitescript 2.0 addButton
netsuite|suitescript
8
10,510
5
38,570,623
38,570,623
0
true
2016-06-14T19:09:19.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Suitescript 2.0 addButton<p>I have a suitelet with a sublist button and I am trying to get the button to execute a function on a custom module. I can not ge...
37,818,492
How use `unaccent` with full text search in django 1.10?<p>We are working on a project and we are using <code>Django 1.10a1</code>, we're using django full text search with PostgreSQL but we need to use unaccent.</p> <p>So, I have this code:</p> <pre><code> search = 'Car' query_set = Article.objects.an...
<p>Install the <em>unaccent</em> extension into your database:</p> <pre><code>mydb=# CREATE EXTENSION unaccent; </code></pre> <p>Create a new search configuration, based on an other one:</p> <pre><code>mydb=# CREATE TEXT SEARCH CONFIGURATION french_unaccent( COPY = french ); </code></pre> <p>Insert the <em>unaccent...
How use `unaccent` with full text search in django 1.10?
python|django|postgresql
8
2,351
3
38,713,813
38,713,813
9
true
2016-06-14T17:26:33.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How use `unaccent` with full text search in django 1.10?<p>We are working on a project and we are using <code>Django 1.10a1</code>, we're using django full t...
37,772,517
What is Clojure spec?<p>I could not understand the intent of <strong>clojure</strong>.<strong>spec</strong></p> <p>What kind of problems does it solve?</p> <p>Why should we use it?</p>
<p>spec allows you to create specifications for data and functions. Specifications are at their core predicative (based on existing Clojure predicates) and structural, rather than type-based as you might see in a statically typed language. By basing spec on predicates, you can write specifications that are far more exp...
What is Clojure spec?
clojure|functional-programming|clojurescript|specifications|clojure.spec
7
1,547
2
38,518,300
38,518,300
30
true
2016-06-12T09:09:05.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is Clojure spec?<p>I could not understand the intent of <strong>clojure</strong>.<strong>spec</strong></p> <p>What kind of problems does it solve?</p> ...
37,816,106
Install Typing packages behind corporate proxy<p>I'm getting the error message below. I searched for the self signed certificate problem and I got to <a href="https://github.com/typings/typings/issues/106" rel="noreferrer">this</a> answer, but I did everything that is mentioned here. I'm just going around and still no ...
<p>My <code>.typingsrc</code> file is located at the project root level (where typings.json is located).</p> <p>It simply contains:</p> <pre><code>proxy="http://xxx.xxx.xxx:80" rejectUnauthorized=false </code></pre>
Install Typing packages behind corporate proxy
typescript-typings
7
7,442
3
38,825,810
38,825,810
17
true
2016-06-14T15:21:27.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Install Typing packages behind corporate proxy<p>I'm getting the error message below. I searched for the self signed certificate problem and I got to <a href...
38,046,306
How to merge a *Single Image* with a video<p>I am trying to combine a single video with a single image. <strong>This is not trying to combine many images into a single video</strong> such as </p> <ul> <li><p><a href="https://stackoverflow.com/questions/30470154/create-movie-from-uiimage-swift">create movie from [UIIma...
<p>Right, so I actually dealt with this problem a while ago. The issue is indeed with how you are creating the video from the picture. What you need to do is add the pixel buffer at time zero, and then AGAIN at the end, otherwise you will end up with an empty video until the very last frame, like you are experiencing. ...
How to merge a *Single Image* with a video
swift|uiimage|buffer|avassetwriter|avmutablecomposition
17
6,216
4
38,711,051
38,711,051
9
true
2016-06-27T05:11:15.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to merge a *Single Image* with a video<p>I am trying to combine a single video with a single image. <strong>This is not trying to combine many images int...
37,642,869
RecyclerView GridLayoutManager with full width header<p>I'm using a very helpful example <a href="http://blog.sqisland.com/2014/12/recyclerview-grid-with-header.html" rel="noreferrer">here</a> to show a RecyclerView and a GridLayoutManager to show a grid with a header.</p> <p>It looks pretty good, but my graphic desig...
<p>Try with this:</p> <pre><code>mLayoutManager = new GridLayoutManager(this, 2); mLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { @Override public int getSpanSize(int position) { switch(mAdapter.getItemViewType(position)){ cas...
RecyclerView GridLayoutManager with full width header
android|android-recyclerview|gridlayoutmanager
38
18,242
2
38,656,526
38,656,526
100
true
2016-06-05T14:11:42.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: RecyclerView GridLayoutManager with full width header<p>I'm using a very helpful example <a href="http://blog.sqisland.com/2014/12/recyclerview-grid-with-hea...
37,718,907
Variable Explorer in Jupyter Notebook<p>Is there a variable explorer in Jupyter (IPython) like in Spyder? It is very uncomfortable having to print the list of variables all the time each time I run through the test code.</p> <p>Has this feature been implemented yet? If so, how to enable it?</p>
<h1>UPDATE</h1> <p>Scroll down to the section labeled update for a much less convoluted method.</p> <h1>OLD ANSWER</h1> <p>Here is a notebook on how to make your own <a href="https://github.com/ipython/ipywidgets/blob/master/docs/source/examples/Variable%20Inspector.ipynb" rel="noreferrer">Variable Inspector</a>. I ...
Variable Explorer in Jupyter Notebook
python|jupyter-notebook|facilities
99
139,034
6
41,338,184
41,338,184
107
true
2016-06-09T06:59:38.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Variable Explorer in Jupyter Notebook<p>Is there a variable explorer in Jupyter (IPython) like in Spyder? It is very uncomfortable having to print the list o...
37,752,482
Custom domain for Azure application gateway<p>I am trying to create application gateway with custom domain name, I keep getting error saying "cannot have Domain Name Label specified." </p> <p>I was wondering if I am doing something wrong or it's not possible for azure application gateway to have custom domain name ?</...
<p>Here are my lessons learned regarding the azure application gateway:</p> <pre><code>1.) Application gateway does _not_ support statically addressed public IPs 2.) Application gateway does _not_ support public IPs with a DNS name (e.g. somename.cloudapp.net) 3.) The application gateway’s DNS name _should_ be used to...
Custom domain for Azure application gateway
azure|azure-application-gateway
12
12,861
3
43,219,385
43,219,385
14
true
2016-06-10T15:55:06.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Custom domain for Azure application gateway<p>I am trying to create application gateway with custom domain name, I keep getting error saying "cannot have Dom...
37,702,957
MongoDB data/db not found<p>I do gave this path for data/db </p> <pre><code>/usr/local/Cellar/mongodb/3.2.6/data/db </code></pre> <p>The following step was made in order to create a bound to mongodb folder</p> <pre><code>sudo mongod --directoryperdb --dbpath /usr/local/Cellar/mongodb/3.2.6/data/db --logpath /usr/loc...
<p>You need to create this directory as root</p> <p>Either you need to use sudo , e.g. <code>sudo mkdir -p /data/db</code></p> <p>Or you need to do su - to become superuser, and then create the directory with <code>mkdir -p /data/db</code></p>
MongoDB data/db not found
node.js|mongodb
21
52,242
6
43,033,484
43,033,484
33
true
2016-06-08T12:47:40.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB data/db not found<p>I do gave this path for data/db </p> <pre><code>/usr/local/Cellar/mongodb/3.2.6/data/db </code></pre> <p>The following step was...
38,022,413
Firebase notification on child added/modified<p>Is it possible to generate a push notification (if the app is not in the foreground) on firebase db changes? I started coding an android app.</p>
<p>Firebase provides a tool called <em>Cloud Functions</em>.</p> <p>With this, you can listen to your Firebase Database and send Notifications without the need for an external server :)</p> <p>See : <a href="https://firebase.google.com/docs/functions/use-cases" rel="nofollow noreferrer">https://firebase.google.com/do...
Firebase notification on child added/modified
android|firebase|firebase-realtime-database|firebase-cloud-messaging
16
22,293
3
42,708,855
42,708,855
14
true
2016-06-24T21:32:35.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase notification on child added/modified<p>Is it possible to generate a push notification (if the app is not in the foreground) on firebase db changes? ...
37,752,273
How do I run specific tests using dotnet test?<p>I have a large test suite in a .NET Core project. I can use the Test Explorer window to select a few tests to run.</p> <p>I can also run the <strong>whole</strong> test suite on the command line with <code>dotnet test</code>. Is there a way to run only one (or a few) te...
<p>With the dotnet version 1.0.0, you have to use the --filter option:</p> <p>You can filter by DisplayName, FullyQualifiedName and Traits.</p> <p>Ex:</p> <pre><code>dotnet test --filter "FullyQualifiedName=YourNamespace.TestClass1.Test1" </code></pre> <p>Also, these operators are allowed: =, != and ~ (contains).</...
How do I run specific tests using dotnet test?
xunit.net|.net-core|.net-core-rc2|xunit2
76
25,380
2
42,787,656
42,787,656
100
true
2016-06-10T15:45:15.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I run specific tests using dotnet test?<p>I have a large test suite in a .NET Core project. I can use the Test Explorer window to select a few tests t...
37,863,124
Finding property in Object<p>Imagine this scenario:</p> <pre><code>var myObject = { "1030":{}, "1059":{} } </code></pre> <p>I want to check if <code>1030</code> is in that object. How would I do this?</p>
<p>Try <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty" rel="nofollow" title="hasOwnProperty">hasOwnProperty</a></p> <pre><code>if(myObject.hasOwnProperty("1030")) { // Do code } </code></pre> <p>It's a bit safer than checking <code>if(myObject["1030"])...
Finding property in Object
javascript
-4
49
1
37,863,162
37,863,162
0
true
2016-06-16T15:13:51.613Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Finding property in Object<p>Imagine this scenario:</p> <pre><code>var myObject = { "1030":{}, "1059":{} } </code></pre> <p>I want to check if <cod...
37,904,613
Add another array after every 2 in an array in php<p>I have an array</p> <pre><code>$array1 = Array ( [0] =&gt; Array ( [event_id] =&gt; 2 [event_name] =&gt; Vectro [event_date_time] =&gt; 2016-06-20 15:25:39 [location] =&gt; Edachira [gps_latitud...
<p>To do what you want, use this code:</p> <pre><code>&lt;?php $final_array = array(); for($k = 0, $j = 0; $j &lt; count($array2); $k += 2, $j++) { for($i = 0; $i &lt; 2; $i++) { if(isset($array1[$i + $k]) $final_array[] = $array1[$i + $k]; } if($j % 3 == 0) $final_array[] = $...
Add another array after every 2 in an array in php
php|arrays
-3
52
1
37,904,868
37,904,868
0
true
2016-06-19T06:38:58.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add another array after every 2 in an array in php<p>I have an array</p> <pre><code>$array1 = Array ( [0] =&gt; Array ( [event_id] =...
37,913,751
How to convert this php into java to stop caching?<p>I'm using fastcgi-cache full page caching and using php for geoip_country_code, I just used a vpn and connected to another country and I realized the page is being cached.</p> <p>I followed this: <a href="https://www.howtoforge.com/using-geoip-with-nginx-on-ubuntu-1...
<p>It turns out that fastcgi cache is not caching the same page for everybody. </p> <p>This PHP code therefore is not cached the same.</p> <p>I thought it did. I ran this PHP GeoIp code that displays the user's country name, I flushed the cache and loaded the page, it said Australia, my friend loaded the page in Bela...
How to convert this php into java to stop caching?
javascript|php|caching
-4
77
2
37,932,906
37,932,906
0
true
2016-06-20T02:07:12.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert this php into java to stop caching?<p>I'm using fastcgi-cache full page caching and using php for geoip_country_code, I just used a vpn and co...
37,672,095
Core php routes is not defined but working<p><a href="http://localhost/abc/category/my-accessories-44/" rel="nofollow">http://localhost/abc/category/my-accessories-44/</a></p> <p>this code is written in php core, as this is called from as category/my-accessories-44/ but there no file and folder with category name, ho...
<p>the route was manipulated from .htaccess.</p>
Core php routes is not defined but working
php
-5
37
1
38,006,416
38,006,416
0
true
2016-06-07T06:35:49.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Core php routes is not defined but working<p><a href="http://localhost/abc/category/my-accessories-44/" rel="nofollow">http://localhost/abc/category/my-acces...
38,011,908
Controller/Action paths is not working on Azure php web sites<p>I hosted my php web site in Azure.Landing page is working properly.But all other pages is not working.Always having the 404 errors.I think I need to url rewrite in azure instead of .htaccess file in php.Can anyone tell me how do I want to do that?. site Ur...
<p>You can use the rewrite module of IIS for this, you control the rules in a web.config file just like you would with .htaccess. The format is different however so you will need to create your rules in the correct format.</p> <p>So you have two options, the first is to use IIS Manager to remotely administer the web i...
Controller/Action paths is not working on Azure php web sites
php|mysql|azure|routing
-3
39
1
38,013,676
38,013,676
0
true
2016-06-24T11:04:06.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Controller/Action paths is not working on Azure php web sites<p>I hosted my php web site in Azure.Landing page is working properly.But all other pages is not...
38,044,262
Replace a string in file<p>My file is like this</p> <pre><code>DIV=25 FACILITY=11111 </code></pre> <p>and I want to use Perl to replace DIV=25 into DIV=30. Below is my script to do it, but the output of the file is DIV=3030</p> <pre><code>open( IN_IOE, $FILE_NAME ) || die "Cannot open file"; my @line_ioe = &lt;IN_IO...
<p>if you have multiple lines with different numeric numbers (i.e. DIV=25, DIV =31, DIV=21) you could do following.</p> <pre><code>s/DIV=\d+/DIV=25/g </code></pre> <p>here \d is to replace any digits and 'g' to perform this globally.</p>
Replace a string in file
perl
-3
66
3
38,045,440
38,045,440
0
true
2016-06-26T23:56:57.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace a string in file<p>My file is like this</p> <pre><code>DIV=25 FACILITY=11111 </code></pre> <p>and I want to use Perl to replace DIV=25 into DIV=30....
37,900,539
Setting up git with similar apps<p>I am a new to using .git and I have three IOS apps that all have little changes from each other. I need to know how I can set up something on source tree so when I push one update to one of the apps the rest will have that change. I do not know much about git but if any one could help...
<p>The answer is probably an Xcode answer rather than a git answer. I would suggest creating a single Xcode project that has multiple targets. Each target would build one of your 3 apps, with the common source and assets shared between the targets.</p>
Setting up git with similar apps
ios|git|sourcetree
-3
24
2
37,900,795
37,900,795
1
true
2016-06-18T18:53:30.243Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Setting up git with similar apps<p>I am a new to using .git and I have three IOS apps that all have little changes from each other. I need to know how I can ...
37,903,694
How to split a string from UITextField<p>I have a UITextField as following:</p> <pre><code>_itemTextField = [[UITextField alloc]; </code></pre> <p>This UITextField may contain item number only ex: "11321" or item number and size ex: "11321-XS" or "12355-40".</p> <p>I want to extract the item and size (if it's availa...
<pre><code>NSString *str = @"11115-ex"; if([str containsString:@"-"]){ NSArray * arr =[str componentsSeparatedByString:@"-"]; NSString *first = [arr objectAtIndex:0]; NSString *second = [arr objectAtIndex:1]; NSLog(@"Return String %@ %@",first,second); } else { NSLog(@"Return String %@",str); } </co...
How to split a string from UITextField
ios|objective-c|string|uitextfield
-3
63
1
37,903,778
37,903,778
1
true
2016-06-19T03:31:28.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to split a string from UITextField<p>I have a UITextField as following:</p> <pre><code>_itemTextField = [[UITextField alloc]; </code></pre> <p>This UIT...
37,906,664
Database Variable Java (Static vs enum)<p>I'm just going through my code and tidying things up, standardising things etc.</p> <p>Just a quick questionin my Database class I have declared the database variables at the start of the class. see below:</p> <pre><code> private static final String DATABASE = "....."; ...
<p>An enum defines a type. </p> <p>January and February are of type Month. </p> <p>Mars and Earth are of type Planet. </p> <p>Those two things don't have any common type. They're just strings. An enum is not appropriate.</p>
Database Variable Java (Static vs enum)
java|variables|enums|static
-3
42
1
37,906,703
37,906,703
1
true
2016-06-19T11:20:45.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Database Variable Java (Static vs enum)<p>I'm just going through my code and tidying things up, standardising things etc.</p> <p>Just a quick questionin my ...
37,923,730
Multiply alternate digits in an array using C#<p>Im doing a school project in where i have to find a GTIN code when given the first seven digits, here is the code:</p> <pre><code>Console.WriteLine("Please enter the first 7 digits of the code");// asking the user to input the digits of the code int[] GTIN =...
<p>Try something like this,</p> <pre><code>int sum = 0,value=0; for(int i=0;i&lt;GTIN.Length;i++) //allows you to fill the array { Console.WriteLine("Please enter an integer"); if((i%2)==0) value = 3; else value = 1; sum += value * int.Parse(Console.ReadLine()); } </code></pre>
Multiply alternate digits in an array using C#
c#|arrays|multiplication
-3
258
2
37,923,985
37,923,985
1
true
2016-06-20T13:22:56.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiply alternate digits in an array using C#<p>Im doing a school project in where i have to find a GTIN code when given the first seven digits, here is the...
37,943,532
How do I freeze a form until an action has been done on the first form<p>I have 2 forms.. form1 &amp; form2</p> <p>I would like to freeze form2 until the user has pressed a button on form1..</p> <p>What methods could I be using?</p>
<p>Next time please review your own question and try yourself if you can understand what you have just ask..</p> <p>as far as i understand you want to open up form2 as soon as form1 is opened, however you want to keep form2 "enabled=false".</p> <p>you can try the following and see if it matches your expectations:</p>...
How do I freeze a form until an action has been done on the first form
c#|.net|forms
-3
50
1
37,943,897
37,943,897
1
true
2016-06-21T11:46:05.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I freeze a form until an action has been done on the first form<p>I have 2 forms.. form1 &amp; form2</p> <p>I would like to freeze form2 until the us...
37,845,729
What are the front-end data modeling best practices for translating complex nested SQL associations into manageable services?<p>I'm reaching out to gain perspective on possible solutions to this problem. I'll be using Angular and Rails, but really this problem is a bit more abstract and doesn't need to be answered in t...
<p>I assume you will use restful apis, attention I don't know rails but I will suggest you some general practices that you might consider</p> <p>Let's say you have one page that shows 10 posts and their 10 comments sorted by date, make this response possible in one api call</p> <p>There is one more page that shows on...
What are the front-end data modeling best practices for translating complex nested SQL associations into manageable services?
angularjs|data-modeling
9
1,545
1
37,954,825
37,954,825
1
true
2016-06-15T21:03:02.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What are the front-end data modeling best practices for translating complex nested SQL associations into manageable services?<p>I'm reaching out to gain pers...
38,005,850
Can only use snippet code twice before getting errors<p>I've been using this code to read private fields in Java to later pass them into Maps for bukkit.</p> <pre><code>Field FieldF = net.minecraft.server.v1_9_R2.EntityTypes.class.getDeclaredField("F"); FieldF.setAccessible(true); Object valueF = FieldF.get("v...
<p>First, learn a bit of Java. <a href="https://docs.oracle.com/javase/tutorial/essential/exceptions/" rel="nofollow">https://docs.oracle.com/javase/tutorial/essential/exceptions/</a></p> <p>Use try/catch blocks instead of throws declarations in addToMaps()</p> <p>An example:</p> <pre><code> Class clazz = null; try...
Can only use snippet code twice before getting errors
java|bukkit
-3
76
2
38,017,673
38,017,673
1
true
2016-06-24T04:56:26.987Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can only use snippet code twice before getting errors<p>I've been using this code to read private fields in Java to later pass them into Maps for bukkit.</p>...
38,046,072
Xcode is not working on my mac after downloading multiple times<p>I am trying to download xcode because I want homebrew to work on my mac. Whenever I start the download, it works but when I open the extension, there is a cross sign on the logo which indicates that the file cannot be opened. I tried to download differen...
<p>Thats because of your mac OS X version not support the latest version of Xcode.</p> <p>You need to download the latest version of mac OS X.</p>
Xcode is not working on my mac after downloading multiple times
ios|xcode
-4
46
1
38,047,266
38,047,266
1
true
2016-06-27T04:44:33.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xcode is not working on my mac after downloading multiple times<p>I am trying to download xcode because I want homebrew to work on my mac. Whenever I start t...
37,880,177
how to get value of cell in table and display it in textbox<p>I have a table like this:</p> <pre><code>&lt;table id="mytable"&gt; &lt;tr&gt; &lt;th&gt;Customer Id&lt;/th&gt; &lt;th&gt;Name&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;123&lt;/td&gt; &lt;td&gt;A&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;...
<ul> <li>Use <code>querySelectorAll</code> to select <code>td</code> elements</li> <li>Use <code>Array.from</code> to cast <code>array-like-object</code> to <code>array</code> to apply <code>array</code> method</li> <li>Register events using <code>addEventListener</code></li> </ul> <p><div class="snippet" data-lang="j...
how to get value of cell in table and display it in textbox
javascript|html
-4
822
1
37,880,241
37,880,241
2
true
2016-06-17T11:14:43.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to get value of cell in table and display it in textbox<p>I have a table like this:</p> <pre><code>&lt;table id="mytable"&gt; &lt;tr&gt; &lt;th&gt...
37,988,472
Check if a certain app is installed on device with React Native<p>From my app, I'm trying to check if another app is installed (in my example, Google Maps). So I tried to use:</p> <pre><code>Linking.canOpenURL('comgooglemaps://?daddr=' + address + '&amp;directionsmode=walking').then(supported =&gt; {...}).catch(err =&...
<p>I'm assuming you're having this problem with iOS.</p> <p>Starting with iOS 9, you have to declare the URL scheme you want to use. <a href="https://stackoverflow.com/a/32777034/158525">See this other answer with the details</a>.</p> <p>Or the official doc: <a href="https://developers.google.com/maps/documentation/i...
Check if a certain app is installed on device with React Native
react-native
7
6,477
1
37,993,477
37,993,477
2
true
2016-06-23T10:05:06.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Check if a certain app is installed on device with React Native<p>From my app, I'm trying to check if another app is installed (in my example, Google Maps). ...
37,816,170
Rest API plugin wordpress disable default routes<p>Hello guy's Please help me i install REST API plugin WP and i adding some specific route and any things it's work fine as i wont. But I want to disable default route exemple : /wp-json/ /wp-json/wp/v2/posts</p>
<p>You can use this on your plugin for remove all default route.</p> <pre><code>remove_action( 'rest_api_init', 'create_initial_rest_routes', 0 ); </code></pre>
Rest API plugin wordpress disable default routes
wordpress|api
7
3,653
2
38,029,648
38,029,648
2
true
2016-06-14T15:24:14.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rest API plugin wordpress disable default routes<p>Hello guy's Please help me i install REST API plugin WP and i adding some specific route and any things it...
37,872,554
How to make condition if sim card is absent then show dialog if not do something in android?<p>I have an app in which I have to check whether sim card is inserted in device or not and make some condition if sim is not inserted then show dialog else do something ,how can I do that</p>
<p>Below function returns true if sim is present. </p> <pre><code> public static boolean isSimSupport(Context context) { TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); //gets the current TelephonyManager return !(tm.getSimState() == TelephonyManager.SIM_S...
How to make condition if sim card is absent then show dialog if not do something in android?
android
-3
829
2
37,872,976
37,872,976
3
true
2016-06-17T03:19:37.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make condition if sim card is absent then show dialog if not do something in android?<p>I have an app in which I have to check whether sim card is ins...
37,696,583
Xuggler Repository Link Broken<p>In my JAVA application, i am using Xuggler for ScreenCapture and other functionality. Now its a maven project so i put Xuggler as dependency in Pom.xml as told in this <a href="http://www.xuggle.com/downloads">Link</a>. </p> <p>Now few days ago i cleaned my system, so when i again impo...
<p>It doesn't seem anyone is maintaining Xuggler any more: the <a href="https://blog.xuggle.com/" rel="nofollow">last blog post</a> says "Xuggler development is on hiatus. Probably permanently."</p> <p>If you are good with Maven and suchlike you might be able to build Xuggler yourself. <a href="https://code.google.co...
Xuggler Repository Link Broken
java|maven|svn|xuggler
7
2,314
2
37,924,763
37,924,763
3
true
2016-06-08T08:00:23.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xuggler Repository Link Broken<p>In my JAVA application, i am using Xuggler for ScreenCapture and other functionality. Now its a maven project so i put Xuggl...
37,871,229
How to get string from dataPackageView.GetDataAsync()<p>I'm trying to get non-standard-format data from the clipboard using <code>DataPackageView.GetDataAsync</code>. I am stumped on converting the returned <code>system.__ComObject</code> to a string. </p> <p><strong>Here is the code:</strong></p> <pre><code>var da...
<p>This article explains how custom dataPackage objects are implemented. </p> <p><a href="http://www.minddriven.de/index.php/technology/dot-net/c-sharp/winrt-datapackage-custom-objects" rel="nofollow">http://www.minddriven.de/index.php/technology/dot-net/c-sharp/winrt-datapackage-custom-objects</a></p> <p>The key is...
How to get string from dataPackageView.GetDataAsync()
c#|uwp|com-interop
7
792
2
37,932,141
37,932,141
3
true
2016-06-17T00:08:11Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get string from dataPackageView.GetDataAsync()<p>I'm trying to get non-standard-format data from the clipboard using <code>DataPackageView.GetDataAsyn...
37,699,677
See request time in Chrome developer tools<p>During ajax development, I often need a way of seeing the time a request was sent in Chrome developer tools. Either an absolute time (such as 3:45:23 PM) or a relative time (4.56s since page load) is fine.</p> <p>The closest I can find is the timeline in the Network tab, sh...
<p>This feels like a giant oversight to me on the part of the Chrome devs. They give you every possible bit of timing except the absolute start/end times (and like you, I'd be happy for relative timing since the start of the page load).</p> <p>The best I've been able to do is to set the tightest possible range in the...
See request time in Chrome developer tools
javascript|ajax|google-chrome|google-chrome-devtools
30
14,638
4
37,953,013
37,953,013
3
true
2016-06-08T10:17:16.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: See request time in Chrome developer tools<p>During ajax development, I often need a way of seeing the time a request was sent in Chrome developer tools. Eit...
37,744,874
Magento2: REST API : Save Product Detail per store view not working<p>Using Magento2.1.0-rc1 Branch With Sample Data</p> <p>Using REST API catalogProductRepositoryV1 REF: <a href="http://devdocs.magento.com/swagger/index.html" rel="noreferrer">http://devdocs.magento.com/swagger/index.html</a> Get Key from Admin token...
<p>after debugging a lot on Magento2, Found that Magento2 does not have any functionality to Store Data from REST API as per StoreID <strong>getStore</strong> function in <strong>StoreManager</strong> just check if store is exist in session else return default , that is why all <strong>REST</strong> API Calls are stor...
Magento2: REST API : Save Product Detail per store view not working
api|rest|product|magento2
9
9,295
3
37,875,681
37,875,681
4
true
2016-06-10T09:37:20.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Magento2: REST API : Save Product Detail per store view not working<p>Using Magento2.1.0-rc1 Branch With Sample Data</p> <p>Using REST API catalogProductRe...
38,006,500
How to use non-default browser?<p>I have an R package that triggers Oauth2 flow in the browser (via <code>httr</code>). A user is in the odd situation that their IT department requires a specific system default browser (in this case, it's IE + Windows). But the user needs to do the OAuth in a different browser.</p> <p...
<p>First, you should also save the previous values of both <code>browser</code> option and <code>R_BROWSER</code> so that you can restore the previous state of the session:</p> <pre><code>old_R_BROWSER &lt;- Sys.getenv("R_BROWSER") old_browser &lt;- options()$browser </code></pre> <p>Then you can achieve desired beha...
How to use non-default browser?
r
7
1,326
2
38,025,066
38,025,066
4
true
2016-06-24T05:59:20.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use non-default browser?<p>I have an R package that triggers Oauth2 flow in the browser (via <code>httr</code>). A user is in the odd situation that t...
37,941,284
Database operations in IntentService results into application halt,become unresponsive and giving ANR<p>I am using an IntentService in a alarm manager to trigger it after every 15 seconds. I have to continuously send large amount data to server and receiving large amount of data in response in background. I have to fol...
<p>After a lot of struggle finally i got a solution :</p> <p>I simply used separate process to work for the intent-service.</p> <p>using this in "<strong>Manifest</strong>" file</p> <pre><code> &lt;service android:name=".BackgroundSyncDataService" android:process=":my_process"&gt; &lt;/service&gt; </code><...
Database operations in IntentService results into application halt,become unresponsive and giving ANR
android|retrofit|android-intentservice|jsonschema2pojo
11
797
2
38,046,400
38,046,400
4
true
2016-06-21T10:00:14.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Database operations in IntentService results into application halt,become unresponsive and giving ANR<p>I am using an IntentService in a alarm manager to tri...
37,793,140
Banana Pi not booting (red LED on)<p>I got some brand new banana Pi's, these are the "Banana Pi-M2" and the "Banana Pi-M3"</p> <p>I was trying to install Debian on both of them, but I couldn't get it to work. I was exactly following this tutorial here (Windows): <a href="http://wiki.lemaker.org/BananaPro/Pi:SD_card_in...
<p>It sounds like an underpowering situation.</p> <p>If you have a barrel jack instead of micro usb use the barrel jack.</p> <blockquote> <p>The pre-production samples of this board had the usual 4.0/1.7mm barrel jack for DC-IN BPi M2/M2+ also use. This has been replaced by a Micro USB jack on the first production ...
Banana Pi not booting (red LED on)
linux|debian|device|banana-pi
7
8,260
3
38,305,749
38,305,749
4
true
2016-06-13T15:02:50.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Banana Pi not booting (red LED on)<p>I got some brand new banana Pi's, these are the "Banana Pi-M2" and the "Banana Pi-M3"</p> <p>I was trying to install De...
37,889,360
Appending to a Pandas Dataframe From a pd.read_sql Output<p>I'm coming from R but need to do this in Python for various reasons. This very well could be a basic PEBKAC issue with my Python more than anything with Pandas, PyODBC or anything else. </p> <p>Please bear with me.</p> <p>My current Python 3 code:</p> <pre>...
<p>How about</p> <p><code>for i in orders: df = df.append(pd.read_sql(querystring, cnxn, params = [i]))</code></p>
Appending to a Pandas Dataframe From a pd.read_sql Output
python|pandas|dataframe|pyodbc
8
5,195
4
37,889,450
37,889,450
5
true
2016-06-17T19:50:02.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Appending to a Pandas Dataframe From a pd.read_sql Output<p>I'm coming from R but need to do this in Python for various reasons. This very well could be a ba...
37,854,949
Is there a way to parameterize cloud formation resource names?<p>I'm trying to make AutoScalingGroup names on cloud formation templates dynamic. I was thinking if this is possible via parameters, or any other way?</p> <pre><code>"DynamicASGName": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties"...
<p>CloudFormation uses two sets of names: the <em>logical resource name</em>, to identify a resource within the stack, and the <em>physical name</em> which uniquely identifies it across the whole region.</p> <p>CloudFormation doesn't support setting the logical name dynamically, but with certain types, you can set the ...
Is there a way to parameterize cloud formation resource names?
amazon-web-services|amazon-cloudformation
8
6,180
1
37,863,628
37,863,628
6
true
2016-06-16T09:20:07.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to parameterize cloud formation resource names?<p>I'm trying to make AutoScalingGroup names on cloud formation templates dynamic. I was thinki...
37,975,500
npm install doesnt create dist folder<p>I am following this tutorial <a href="http://grafana.org/blog/2016/04/08/clock-plugin-p1.html" rel="noreferrer">link</a> to create a grafana plugin.</p> <p>But when I copy this code <a href="https://github.com/grafana/clock-panel/tree/6a9d0d625e3757582ce30f0b5c7e784a2b0e978b" re...
<p>You are missing running <code>grunt</code> default task</p> <p>You should run:</p> <p><code>npm install</code> (which installs your dependencies), followed by a <code>grunt</code> (which copies src files to dist as you can see in the Gruntfile.js <code>copy:src_to_dist</code> task)</p> <p>So in short just run: <c...
npm install doesnt create dist folder
javascript|node.js|npm|npm-install|grafana
11
33,307
3
37,976,005
37,976,005
7
true
2016-06-22T18:16:23.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: npm install doesnt create dist folder<p>I am following this tutorial <a href="http://grafana.org/blog/2016/04/08/clock-plugin-p1.html" rel="noreferrer">link<...
37,978,687
How to autowired spring service into a jsp?<p>As mentioned in the title, i need to autowire a service in my page.jsp.. "<em>i know that's not recommended to do it</em> "</p> <pre><code> &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%&gt; &lt;%@ taglib uri="http...
<p>You should not even try to do that... JSP are translated to java source and compiled to java classes by the servlet container, and the Java EE specification does not say where they go, so you cannot have spring scan them, so annotation is not an option</p> <p>Worse, the JSP cannot be Spring beans because they are ...
How to autowired spring service into a jsp?
jsp|spring-mvc|autowired
7
6,975
5
37,987,210
37,987,210
7
true
2016-06-22T21:36:00.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to autowired spring service into a jsp?<p>As mentioned in the title, i need to autowire a service in my page.jsp.. "<em>i know that's not recommended to ...
38,003,406
Pandas: Why is default column type for numeric float?<p>I am using Pandas 0.18.1 with python 2.7.x. I have an empty dataframe that I read first. I see that the types of these columns are <code>object</code> which is OK. When I assign one row of data, the type for numeric values changes to <code>float64</code>. I was ex...
<p>It's not possible for Pandas to store <code>NaN</code> values in integer columns.</p> <p>This makes <code>float</code> the obvious default choice for data storage, because as soon as missing value arises Pandas would have to change the data type for the entire column. And missing values arise very often in practice...
Pandas: Why is default column type for numeric float?
python|csv|pandas|nan|na
10
11,018
3
38,003,951
38,003,951
8
true
2016-06-23T23:22:26.057Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas: Why is default column type for numeric float?<p>I am using Pandas 0.18.1 with python 2.7.x. I have an empty dataframe that I read first. I see that t...
38,025,341
How to encode categorical values<p>Hi I'm new to python and pandas.</p> <p>I have extracted the unique values of one of the column using pandas. Now after getting the unique values of the column, which are string.</p> <pre><code>['Others, Senior Management-Finance, Senior Management-Sales' 'Consulting, Strategic pl...
<p>Use <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.factorize.html" rel="nofollow noreferrer"><code>pd.factorize</code></a>:</p> <pre><code>df['Col1'] = pd.factorize(df.Col1)[0] + 1 print (df) Col1 0 1 1 1 2 2 3 2 4 2 5 3 6 3 </code></pre> <p><a href="https://pand...
How to encode categorical values
python|pandas|numpy|replace|categories
9
7,693
2
38,025,451
38,025,451
8
true
2016-06-25T05:33:43.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to encode categorical values<p>Hi I'm new to python and pandas.</p> <p>I have extracted the unique values of one of the column using pandas. Now after g...
37,873,164
Are there issues with running user pods on a Kubernetes master node?<p>Many of the run-throughs for deploying Kubernetes master nodes suggest you use <code>--register-schedulable=false</code> to prevent user pods being scheduled to the master node (e.g. <a href="https://coreos.com/kubernetes/docs/latest/deploy-master.h...
<p>Running pods on the master node is definitely possible. </p> <p>The security risk you mention is one issue, but if you configure service accounts, it isn't actually much different for all deployed pods to have secure remote access to the apiserver vs. insecure local access. </p> <p>Another issue is resource conten...
Are there issues with running user pods on a Kubernetes master node?
kubernetes
10
4,372
3
37,874,706
37,874,706
9
true
2016-06-17T04:31:15.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Are there issues with running user pods on a Kubernetes master node?<p>Many of the run-throughs for deploying Kubernetes master nodes suggest you use <code>-...
37,880,491
.ansible/tmp/ansible-tmp-* Permission denied<p>Remote host throws error while running Ansible playbook despite a user being sudo user.</p> <pre><code>"/usr/bin/python: can't open file '/home/ludd/.ansible/tmp/ansible-tmp-1466162346.37-16304304631529/zypper' </code></pre>
<p>A fix that worked for me, was to change the path of the ansible's <code>remote_tmp</code> directory, in ansible's configuration file, e.g.</p> <pre><code># /etc/ansible/ansible.cfg remote_tmp = /tmp/${USER}/ansible </code></pre> <p>Detailed information can be found <a href="https://github.com/ansible/ansible/is...
.ansible/tmp/ansible-tmp-* Permission denied
ansible
14
13,895
4
37,880,679
37,880,679
9
true
2016-06-17T11:31:27.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: .ansible/tmp/ansible-tmp-* Permission denied<p>Remote host throws error while running Ansible playbook despite a user being sudo user.</p> <pre><code>"/usr/...
37,921,913
Java and haarcascade face and mouth detection - mouth as the nose<p>Today I begin to test the project which detects a smile in Java and OpenCv. To recognition face and mouth project used haarcascade_frontalface_alt and haarcascade_mcs_mouth But i don't understand why in some reasons project detect nose as a mouth. I h...
<p>Most likely it detects it wrong on your picture, because of proportion of face (too long distance from eyes to mouth compared to distance between eyes). Detection of mouth and nose using haar detector isn't very stable, so algorithms usually use geometry model of face, to choose best combination of feature candidate...
Java and haarcascade face and mouth detection - mouth as the nose
java|opencv|face-detection|haar-classifier
14
2,621
1
38,023,553
38,023,553
9
true
2016-06-20T11:54:07.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java and haarcascade face and mouth detection - mouth as the nose<p>Today I begin to test the project which detects a smile in Java and OpenCv. To recognitio...
38,051,118
Why does my project reference point to a dll in the "obj" directory?<p>I'm adding a project reference to a project, that already has a few project references added to it. If I inspect the existing ones' properties, they all have paths to their projects' <code>bin</code> directory, e.g.:</p> <p><code>C:\MyProject2\bin\...
<p>When the referenced project isn't built, the reference's path will point to a DLL in the obj directory. After it has been built, the path will automatically point to a (now existing DLL) in the bin directory.</p>
Why does my project reference point to a dll in the "obj" directory?
c#|asp.net|visual-studio-2015|project-reference
8
4,426
3
38,094,369
38,094,369
10
true
2016-06-27T10:05:21.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does my project reference point to a dll in the "obj" directory?<p>I'm adding a project reference to a project, that already has a few project references...
37,961,165
How zsh stores history? History file format<p>I am not sure if I fully understand how zsh stores its history. Example line:</p> <p><code>: 1458291931:0;ls -l</code></p> <p>I guess we have here:</p> <ul> <li>timestamp: <strong>1458291931</strong></li> <li>command: <strong>ls -l</strong></li> </ul> <p>but what this m...
<p>This is the so-called *extended history format, which is enabled by the <a href="http://zsh.sourceforge.net/Doc/Release/Options.html#History" rel="noreferrer"><code>EXTENDED_HISTORY</code> shell option</a>. The second number (the "mystical <strong>0</strong>") is the duration of the command. "0" either means that th...
How zsh stores history? History file format
zsh|oh-my-zsh
11
2,878
1
37,977,775
37,977,775
11
true
2016-06-22T07:23:08.697Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How zsh stores history? History file format<p>I am not sure if I fully understand how zsh stores its history. Example line:</p> <p><code>: 1458291931:0;ls -...
37,992,342
Dapper multi mapping many to many relationship<p>I am trying to map an N-N relationship with dapper using as DB MySQL. This is more or less the code.</p> <pre><code> var query = new StringBuilder(); query.Append("SELECT O.Id, O.Email, O.Status, P.Name FROM Owners AS O"); query.Append(" INNER JOI...
<p>I'm not sure if you can get Dapper to return the data directly as you want but you could load the data such that there is a one-to-one relationship between Owners and Pets and then follow it with LINQ query to group the Pets for each Owner.</p> <pre><code>return dbConnection .Query&lt;Owner, Pet, Owner&gt;( ...
Dapper multi mapping many to many relationship
c#|sql|dapper
8
4,896
1
38,017,455
38,017,455
11
true
2016-06-23T12:57:42.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dapper multi mapping many to many relationship<p>I am trying to map an N-N relationship with dapper using as DB MySQL. This is more or less the code.</p> <p...
37,616,292
Should I default jsonb to '{}' or {} in migration<p>Of <a href="http://nandovieira.com/using-postgresql-and-jsonb-with-ruby-on-rails">the scarce instructions</a> I've read about adding Postgres's data type <code>jsonb</code> in a migration, it's looking like this:</p> <pre><code>create_table :ref_check_ins do |t| t....
<p>In the migration file, you're going to want to use the <code>{}</code> vs <code>'{}'</code>.</p> <p>I literally just was struggling this for a while, and the thing is is that I think the PG adapter implicitly knows how to convert a hash to a jsonb object. It's not like the json type in the postgres DB, where you're...
Should I default jsonb to '{}' or {} in migration
ruby-on-rails|postgresql|ruby-on-rails-5|jsonb
12
4,661
2
38,084,200
38,084,200
11
true
2016-06-03T13:55:27.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Should I default jsonb to '{}' or {} in migration<p>Of <a href="http://nandovieira.com/using-postgresql-and-jsonb-with-ruby-on-rails">the scarce instructions...
37,949,215
How do I move mutable state into a closure?<p>Closures have some data in their state, but how do I make it mutable? For example, I want a counter closure which returns the incremented value each time, but it doesn't work. How do I make it work?</p> <pre><code>fn counter() -&gt; Box&lt;Fn() -&gt; i32&gt; { let mut ...
<p>As the error message says:</p> <blockquote> <p>cannot assign to captured outer variable in an <code>Fn</code> closure</p> </blockquote> <p>Instead, you want a <a href="http://doc.rust-lang.org/std/ops/trait.FnMut.html" rel="noreferrer"><code>FnMut</code></a> closure: </p> <pre><code>fn counter() -&gt; Box&lt;Fn...
How do I move mutable state into a closure?
rust
8
4,930
1
37,949,326
37,949,326
12
true
2016-06-21T15:56:19.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I move mutable state into a closure?<p>Closures have some data in their state, but how do I make it mutable? For example, I want a counter closure whi...
37,840,809
Dev_appserver.py error when trying to deploy to Google AppEngine<p>I'm trying to deploy an example dart server using Google AppEngine. However when I run this python script (with the latest python version installed 3.5)</p> <blockquote> <p>dev_appserver.py</p> </blockquote> <p>I've also tried</p> <blockquote> <...
<p>GAE <a href="https://cloud.google.com/appengine/docs/about-the-standard-environment" rel="noreferrer">standard environment</a> only supports Python 2.7 at this time, see <a href="https://cloud.google.com/appengine/docs" rel="noreferrer">Google App Engine Documentation</a>.</p> <p>Python 3.4 is supported only in the...
Dev_appserver.py error when trying to deploy to Google AppEngine
python|google-app-engine|dart
11
6,695
7
37,864,869
37,864,869
13
true
2016-06-15T16:21:33.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dev_appserver.py error when trying to deploy to Google AppEngine<p>I'm trying to deploy an example dart server using Google AppEngine. However when I run th...
37,890,242
Servlet Filter as Component Spring Boot<p>I would like to configure Servlet Filter in a Spring Boot Web Application and I would like to autowire some Beans and properties using @Value annotation. I was able to achieve this using following configurations : </p> <pre><code> @Configuration public class MyWebConfig{...
<blockquote> <p>1) It works even when I comment out FilterRegistrationBean piece of code. I feel I must use FilterRegistrationBean if I want to set certain order. Correct?</p> </blockquote> <p>It works because any <code>Filter</code> beans are automatically registered with some default configuration unless you've pr...
Servlet Filter as Component Spring Boot
spring|configuration|spring-boot|components|servlet-filters
9
7,692
1
37,890,892
37,890,892
14
true
2016-06-17T20:54:19.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Servlet Filter as Component Spring Boot<p>I would like to configure Servlet Filter in a Spring Boot Web Application and I would like to autowire some Beans a...
38,031,768
Can ElasticSearch be packaged locally with Electron?<p>I'm exploring building an Electron desktop app that would be powered by ElasticSearch running on the client. Is this possible, and if so, how can it be done?</p>
<p>Depending on interpretation, there are two possible answers to your question:</p> <p>If you want to implement an elasticsearch library that enables the use of elasticsearch from within electron, try <a href="https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html">elasticsearch.js</a>...
Can ElasticSearch be packaged locally with Electron?
elasticsearch|npm|electron|atom-editor
7
2,870
1
38,059,895
38,059,895
14
true
2016-06-25T18:38:58.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can ElasticSearch be packaged locally with Electron?<p>I'm exploring building an Electron desktop app that would be powered by ElasticSearch running on the c...
37,868,288
How do I attach more than one stylesheet to an rmarkdown document?<p>If I'm creating a .rmd report and this is my example YAML, how do I attach another stylesheet to this report's output?</p> <pre><code>--- title: "Example Report" author: "Cool guy 62" date: "`r format(Sys.time(), '%d %B, %Y')`" output: html_documen...
<p>Place the multiple css files into a bracketed array like so:</p> <pre><code>--- title: "Example Report" author: "Cool guy 62" date: "`r format(Sys.time(), '%d %B, %Y')`" output: html_document: theme: null css: ['browserreset.css', 'style.css', 'C:/Users/coolguy62/webpages/styles/bootstrap-modified.css'] -...
How do I attach more than one stylesheet to an rmarkdown document?
css|r|knitr|r-markdown
7
1,312
1
37,868,289
37,868,289
16
true
2016-06-16T19:54:23.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I attach more than one stylesheet to an rmarkdown document?<p>If I'm creating a .rmd report and this is my example YAML, how do I attach another style...
37,897,252
Plot confusion matrix in R using ggplot<p>I have two confusion matrices with calculated values as true positive (tp), false positives (fp), true negatives(tn) and false negatives (fn), corresponding to two different methods. I want to represent them as <a href="https://i.stack.imgur.com/r3lu5.png" rel="noreferrer"><img...
<p>This could be a good start</p> <pre><code>library(ggplot2) ggplot(data = dframe, mapping = aes(x = label, y = method)) + geom_tile(aes(fill = value), colour = "white") + geom_text(aes(label = sprintf("%1.0f",value)), vjust = 1) + scale_fill_gradient(low = "white", high = "steelblue") </code></pre> <p><stron...
Plot confusion matrix in R using ggplot
r|ggplot2|confusion-matrix
19
36,684
6
37,897,416
37,897,416
18
true
2016-06-18T13:01:11.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Plot confusion matrix in R using ggplot<p>I have two confusion matrices with calculated values as true positive (tp), false positives (fp), true negatives(tn...
37,897,984
R plot: Displaying both point type and line type in legend<p>I have generated a plot with <code>plot</code> function. I added the point markers with <code>pch()</code> and the line type with <code>lty</code>. In the legend section I wanted to merge the points and lines together. I used <code>merge=TRUE</code> but it ...
<p>People have asked you to put in some toy code. This is important as it gives people a starting point to help you. Actually it is not difficult to do this. Consider the following:</p> <pre><code>set.seed(0); x1 &lt;- rnorm(10); x2 &lt;- rnorm(10); x3 &lt;- rnorm(10) plot(x1, type = "b", pch = 19, lty = 1, col = 1, ...
R plot: Displaying both point type and line type in legend
r|plot|legend
12
18,467
1
37,898,128
37,898,128
18
true
2016-06-18T14:20:27.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R plot: Displaying both point type and line type in legend<p>I have generated a plot with <code>plot</code> function. I added the point markers with <code>pc...
37,961,016
Symfony 2: Disable Doctrine event listener in ContainerAwareCommand<p>I am using several Doctrine listeners registered in configuration file for some automatic updates (created_on, updated_on timestamps etc.). Currently I have implemented additional functionality that requires stashing prepared values in the database f...
<p>something like this should do the trick :</p> <pre><code>$searchedListener = null; $em = $this-&gt;getDoctrine()-&gt;getManager(); foreach ($em-&gt;getEventManager()-&gt;getListeners() as $event =&gt; $listeners) { foreach ($listeners as $key =&gt; $listener) { if ($listener instanceof ListenerClassYouL...
Symfony 2: Disable Doctrine event listener in ContainerAwareCommand
php|symfony|doctrine-orm|command|event-listener
11
8,989
3
37,961,280
37,961,280
18
true
2016-06-22T07:15:59.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Symfony 2: Disable Doctrine event listener in ContainerAwareCommand<p>I am using several Doctrine listeners registered in configuration file for some automat...