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
43,986,513
How do you add custom fields defined in posts to the rest API responses in wordpress<p>I want to do this without using any sort of plugin since these are both core wordpress features (custom fields and the REST API). Here is the documentation for custom fields for reference:</p> <p><a href="https://codex.wordpress.org...
<p>First you need to <a href="https://developer.wordpress.org/reference/functions/register_rest_field/" rel="noreferrer">register_rest_fields</a> to adding custom endpoints in WP REST API JSON Response</p> <pre><code>add_action( 'rest_api_init', 'add_custom_fields' ); function add_custom_fields() { register_rest_field...
How do you add custom fields defined in posts to the rest API responses in wordpress
wordpress|wordpress-rest-api
12
26,672
6
44,007,869
44,007,869
25
true
2017-05-15T18:32:54.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you add custom fields defined in posts to the rest API responses in wordpress<p>I want to do this without using any sort of plugin since these are bot...
44,188,376
Load Balance 1-Topic Kafka Cluster<p>We are in the process of designing a Kafka Cluster (at least 3 nodes) that will process events from an array of web servers. Since the logs are largely identical, we are planning to create a single Topic only (say - webevents)</p> <p>We expect a lot of traffic from the servers. Sin...
<p><strong>Short answer: a topic may have multiple partitions and each partition, not topic, has a leader. Leaders are evenly distributed among brokers. So, if you have multiple partitions in your topic you will have multiple leaders and your writes will be evenly distributed among brokers.</strong></p> <p>You will ha...
Load Balance 1-Topic Kafka Cluster
apache-kafka
9
12,831
1
44,191,189
44,191,189
25
true
2017-05-25T19:26:32.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Load Balance 1-Topic Kafka Cluster<p>We are in the process of designing a Kafka Cluster (at least 3 nodes) that will process events from an array of web serv...
43,941,015
Mocking Method Calls In Python<p>I have been searching stack exchange and around the web for how to do this, but I cannot understand how to mock behaviors for methods. I am trying to mock openpyxl behaviors and behaviors for my custom class. Here is my attempt:</p> <pre><code>import unittest from unittest.mock import ...
<p>You can't override a function <em>call</em>, but you can override the function itself.</p> <p>From the <a href="https://docs.python.org/3/library/unittest.mock.html#quick-guide" rel="noreferrer">docs</a>:</p> <blockquote> <pre><code>&gt;&gt;&gt; from unittest.mock import MagicMock &gt;&gt;&gt; thing = ProductionCl...
Mocking Method Calls In Python
python|unit-testing|methods|mocking|configparser
16
35,139
2
43,941,418
43,941,418
26
true
2017-05-12T15:08:18.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mocking Method Calls In Python<p>I have been searching stack exchange and around the web for how to do this, but I cannot understand how to mock behaviors fo...
44,172,651
Difference between getBoundingClientRect().top and offsetTop?<p>What is the difference between getBoundingClientRect().top and offsetTop? </p> <p><a href="https://codepen.io/anon/pen/bWZWQg" rel="noreferrer">https://codepen.io/anon/pen/bWZWQg</a></p> <pre><code>const elem = document.querySelector('#find'); console.l...
<p><code>getBoundingClientRect</code> gives you offset relative to your client viewport, While <code>offsetTop</code> is always fixed static property. although it changes when the actual position of the element changes on document. For real clarification go to pen and you can check the difference your self.</p> <p>If ...
Difference between getBoundingClientRect().top and offsetTop?
javascript
29
32,590
3
44,172,757
44,172,757
31
true
2017-05-25T05:05:28.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Difference between getBoundingClientRect().top and offsetTop?<p>What is the difference between getBoundingClientRect().top and offsetTop? </p> <p><a href="h...
44,170,543
Angular Material 2 MatMenu - Dynamically creation<p>I need to dynamically create a bunch of <code>MatMenu</code>. So far I have no idea of how I can:</p> <p>1 - Create a template reference variable dynamically (for the <code>mat-menu</code> component)</p> <p>2 - Reference the dynamically created variable (to use in t...
<p>Solved by encapsulating the <code>MatMenu</code> and the associated trigger in an Angular custom component.</p> <p>Scenario: There's an array of objects that must be shown in a table. The last column of the table must show the <code>MatMenu</code> with two options: Edit and Delete.</p> <p>So I made a custom angular ...
Angular Material 2 MatMenu - Dynamically creation
angular|angular-material
17
23,808
1
44,192,485
44,192,485
31
true
2017-05-25T00:38:57.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular Material 2 MatMenu - Dynamically creation<p>I need to dynamically create a bunch of <code>MatMenu</code>. So far I have no idea of how I can:</p> <p...
44,035,282
How can I enable Server GC in .NET Core?<p>I have a .NET Core app (<em>MyApp.exe</em>) developed in <strong>VS2017</strong> running on the <strong>1.0.4</strong> version of the <em>SDK</em>. I have tried adding an <code>App.config</code> with the following entries:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8...
<p>Based on <a href="https://docs.microsoft.com/en-us/dotnet/articles/core/tools/project-json-to-csproj" rel="noreferrer">this source</a>, you do that via the csproj:</p> <pre><code>&lt;PropertyGroup&gt; &lt;ServerGarbageCollection&gt;true&lt;/ServerGarbageCollection&gt; &lt;/PropertyGroup&gt; </code></pre>
How can I enable Server GC in .NET Core?
c#|.net|garbage-collection|.net-core
21
11,060
2
44,035,370
44,035,370
40
true
2017-05-17T21:47:02.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I enable Server GC in .NET Core?<p>I have a .NET Core app (<em>MyApp.exe</em>) developed in <strong>VS2017</strong> running on the <strong>1.0.4</str...
44,109,314
JavaScript calculate with viewport width/height<p>I am trying to set a responsive point in my mobile Webview and did this:</p> <pre><code>var w = window.innerWidth-40; var h = window.innerHeight-100; </code></pre> <p>This works great so far. But the values -40 and -100 are not in the viewport scaling height and width...
<p>Based on <a href="https://css-tricks.com/viewport-sized-typography/" rel="nofollow noreferrer">this site</a> you can use the following util functions to calculate your desired values as a function of a percent of screen width or height:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true"...
JavaScript calculate with viewport width/height
javascript|css|viewport
16
41,995
8
44,109,531
44,109,531
45
true
2017-05-22T09:25:14.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JavaScript calculate with viewport width/height<p>I am trying to set a responsive point in my mobile Webview and did this:</p> <pre><code>var w = window.inn...
44,099,951
How to make view "wrap_content but not larger than" with ConstraintLayout?<p>I'm having 3 view in a row: title, version and imageview (working as button):</p> <ol> <li>title should be <code>wrap_content</code> but respecting the following rules</li> <li>version should be <code>wrap_content</code>, to right of the titl...
<p>Title and version should be in the chain and <code>app:layout_constraintWidth_default="wrap"</code> used:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.c...
How to make view "wrap_content but not larger than" with ConstraintLayout?
android|android-constraintlayout
41
21,510
4
44,101,159
44,101,159
48
true
2017-05-21T17:44:49.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make view "wrap_content but not larger than" with ConstraintLayout?<p>I'm having 3 view in a row: title, version and imageview (working as button):</p...
44,036,971
Multiple outputs in Keras<p>I have a problem which deals with predicting two outputs when given a vector of predictors. Assume that a predictor vector looks like <code>x1, y1, att1, att2, ..., attn</code>, which says <code>x1, y1</code> are coordinates and <code>att's </code> are the other attributes attached to the oc...
<pre><code>from keras.models import Model from keras.layers import * #inp is a "tensor", that can be passed when calling other layers to produce an output inp = Input((10,)) #supposing you have ten numeric values as input #here, SomeLayer() is defining a layer, #and calling it with (inp) produces the output t...
Multiple outputs in Keras
python|tensorflow|keras|deep-learning|neural-network
42
54,545
2
44,037,698
44,037,698
61
true
2017-05-18T00:58:45.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple outputs in Keras<p>I have a problem which deals with predicting two outputs when given a vector of predictors. Assume that a predictor vector looks ...
43,979,889
Async OnActionExecuting in ASP.NET Core's ActionFilterAttribute<p>ASP.NET Core's <code>ActionFilterAttribute</code> has these:</p> <pre><code>public virtual void OnActionExecuting(ActionExecutingContext context); public virtual void OnActionExecuted(ActionExecutedContext context); public virtual Task OnActionExecution...
<p>Asynchronous filters work a bit differently: first execute code that must be executed before the action, call <code>next()</code> for the actual logic, finally add code to be executed after the action.</p> <pre><code>public async Task OnActionExecutionAsync(ActionExecutingContext context, ...
Async OnActionExecuting in ASP.NET Core's ActionFilterAttribute
c#|asp.net-core|action-filter
49
36,115
3
43,979,995
43,979,995
98
true
2017-05-15T12:43:27.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Async OnActionExecuting in ASP.NET Core's ActionFilterAttribute<p>ASP.NET Core's <code>ActionFilterAttribute</code> has these:</p> <pre><code>public virtual...
44,192,541
Typescript guide gives "Duplicate function implementation" warning<p>I'm getting started with TypeScript and at moment I'm following the <a href="https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html" rel="noreferrer">TypeScript in 5 minutes</a> guide. I'm receiving a strange warning in Visual Studi...
<p>Looks like this is a bug in Visual Studio Code. There are a few issues on GitHub about this, such as <a href="https://github.com/Microsoft/TypeScript/issues/10804" rel="noreferrer">here</a> and <a href="https://github.com/Microsoft/vscode/issues/1773" rel="noreferrer">here</a>. The comments on the issues imply that ...
Typescript guide gives "Duplicate function implementation" warning
javascript|typescript
53
24,355
7
44,192,573
44,192,573
106
true
2017-05-26T02:12:17.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Typescript guide gives "Duplicate function implementation" warning<p>I'm getting started with TypeScript and at moment I'm following the <a href="https://www...
44,192,418
How to find MySQL process list and to kill those processes?<p>The MySQL database hangs, due to some queries.</p> <p>How can I find the processes and kill them?</p>
<p>Here is the solution:</p> <ol> <li>Login to DB;</li> <li>Run a command <code>show full processlist;</code>to get the process id with status and query itself which causes the database hanging;</li> <li>Select the process id and run a command <code>KILL &lt;pid&gt;;</code> to kill that process.</li> </ol> <p>Sometim...
How to find MySQL process list and to kill those processes?
mysql|kill-process
126
340,491
5
44,192,419
44,192,419
235
true
2017-05-26T01:57:04.383Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find MySQL process list and to kill those processes?<p>The MySQL database hangs, due to some queries.</p> <p>How can I find the processes and kill th...
44,060,162
Can Perl 6 use the % sigil for something other than a Hash?<p>The Perl 6 docs on variables notes that the <code>%</code> sigil can be used with types that do the <a href="https://docs.perl6.org/type/Associative" rel="noreferrer">Associative</a> role. It specifically mentions <a href="https://docs.perl6.org/type/Pair" r...
<p>You can use <code>%</code> sigiled containers to hold any value that <code>does</code> the <a href="https://docs.perl6.org/type/Associative" rel="nofollow noreferrer"><code>Associative</code></a> Role.</p> <p>You must be careful, as you discovered, in how you declare and assign.</p> <p>In your example, <code>my Pa...
Can Perl 6 use the % sigil for something other than a Hash?
associative|raku
7
316
3
44,060,378
44,060,378
3
true
2017-05-19T01:43:21.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can Perl 6 use the % sigil for something other than a Hash?<p>The Perl 6 docs on variables notes that the <code>%</code> sigil can be used with types that do...
44,063,431
I have a list of objects with time and unit. ONe object can be of 10 DAYS other can be one 1 WEEK how do i sort in this case?<pre><code>[{'time':10,'unit':'DAYS'},{'time':1, 'unit':'WEEKS'}] </code></pre> <p>How do I sort them based on which is smaller in python.</p>
<pre><code>def _sort_on_time(item): if item["unit"] == "WEEKS": # Convert to days. time_val = item["time"] * 7 elif item["unit"] == "DAYS": time_val = item["time"] else: raise ValueError("Unable to determine the unit: %s" % item["unit"]) return time_val sorted([{'time':10...
I have a list of objects with time and unit. ONe object can be of 10 DAYS other can be one 1 WEEK how do i sort in this case?
python
-3
50
1
44,064,372
44,064,372
3
true
2017-05-19T06:58:43.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I have a list of objects with time and unit. ONe object can be of 10 DAYS other can be one 1 WEEK how do i sort in this case?<pre><code>[{'time':10,'unit':'D...
44,195,535
What is StringIndexer , VectorIndexer, and how to use them?<pre><code>Dataset&lt;Row&gt; dataFrame = ... ; StringIndexerModel labelIndexer = new StringIndexer() .setInputCol("label") .setOutputCol("indexedLabel") .fit(dataFrame); VectorIndexerModel featureIndexer = new ...
<p>I know only about those two:</p> <p><strong>StringIndexer and VectorIndexer</strong></p> <p>StringIndexer:</p> <ul> <li>converts a single column to an index column (similar to a factor column in R)</li> </ul> <p>VectorIndexer:</p> <ul> <li>is used to index categorical predictors in a featuresCol column. Remembe...
What is StringIndexer , VectorIndexer, and how to use them?
apache-spark|dataset|spark-dataframe
14
21,519
2
44,202,569
44,202,569
9
true
2017-05-26T07:00:17.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is StringIndexer , VectorIndexer, and how to use them?<pre><code>Dataset&lt;Row&gt; dataFrame = ... ; StringIndexerModel labelIndexer = new StringInd...
44,208,268
Python 3.6 unavailable in AWS CodeBuild, Python 3.5 unavailable in AWS Lambda<p>I have a Python 3 project which I am trying to deploy to AWS Lambda via AWS Codestar -> Codepipeline -> Codebuild -> Cloudformation. </p> <p>My project (which really just consists of a simple API Gateway handler method) imports a Python 3 ...
<p>This is what my buildspec.yml looks like. Notice that the python3.6 version is output in pre_build phase.</p> <pre><code>version: 0.2 phases: install: commands: - yum -y groupinstall development - yum -y install zlib-devel - wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz ...
Python 3.6 unavailable in AWS CodeBuild, Python 3.5 unavailable in AWS Lambda
python|amazon-web-services|aws-lambda|aws-codebuild|aws-codestar
8
6,690
3
44,210,481
44,210,481
9
true
2017-05-26T18:42:55.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python 3.6 unavailable in AWS CodeBuild, Python 3.5 unavailable in AWS Lambda<p>I have a Python 3 project which I am trying to deploy to AWS Lambda via AWS C...
44,330,249
Keras - using activation function with a parameter<p>How is it possible to use leaky ReLUs in the newest version of keras? Function relu() accepts an optional parameter 'alpha', that is responsible for the negative slope, but I cannot figure out how to pass ths paramtere when constructing a layer. </p> <p>This line is...
<p><code>relu</code> is a function and not a class and it takes the input to the activation function as the parameter <code>x</code>. The activation layer takes a function as the argument, so you could initialize it with a lambda function through input <code>x</code> for example:</p> <pre><code>model.add(Activation(la...
Keras - using activation function with a parameter
keras
14
6,698
4
44,330,431
44,330,431
9
true
2017-06-02T13:33:46.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Keras - using activation function with a parameter<p>How is it possible to use leaky ReLUs in the newest version of keras? Function relu() accepts an optiona...
44,063,274
Differences between mkvirtualenv and virtualenv for creating virtual environments<p>I am new to Python virtual environments. Previously I was using the <code>virtualenv</code> command to create virtual environments, but I came across to a tutorial using <code>mkvirtualenv</code> to create a virtual environment. </p> <...
<p><strong>virtualenv</strong> is a tool that allows you to create isolated Python environments, which can be quite helpful when you have different projects with differing requirements.</p> <p><strong>mkvirtualenv</strong> is command under <strong>virtualenvwrapper</strong> which is just a wrapper utility around virtu...
Differences between mkvirtualenv and virtualenv for creating virtual environments
python|virtualenv
7
6,721
2
44,063,472
44,063,472
10
true
2017-05-19T06:49:49.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Differences between mkvirtualenv and virtualenv for creating virtual environments<p>I am new to Python virtual environments. Previously I was using the <code...
44,191,750
dotnet core: can't run unit tests<p>I am developing an application using dotnet core. When I try to run the unit tests, I receive the following message:</p> <pre><code>The active test run was aborted. Reason: Unable to communicate with test host process. </code></pre> <p>I already checked my .csproj files, I have uni...
<p>You have created a stack overflow exception that unfortunately completely crashes the test host process..</p> <p>The problem is:</p> <ol> <li>Any operator is called</li> <li>This calls <code>CheckNullity</code></li> <li><code>CheckNullity</code> has a <code>a == null</code> comparison</li> <li>This invokes the cus...
dotnet core: can't run unit tests
c#|.net|.net-core|xunit.net
7
4,381
1
44,193,071
44,193,071
10
true
2017-05-26T00:29:47.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: dotnet core: can't run unit tests<p>I am developing an application using dotnet core. When I try to run the unit tests, I receive the following message:</p> ...
44,277,019
How to read only n rows of large CSV file on HDFS using spark-csv package?<p>I have a big distributed file on HDFS and each time I use sqlContext with spark-csv package, it first loads the entire file which takes quite some time.</p> <pre><code>df = sqlContext.read.format('com.databricks.spark.csv').options(header='tr...
<p>My understanding is that reading just a few lines is not supported by spark-csv module directly, and as a <strong>workaround</strong> you could just read the file as a text file, take as many lines as you want and save it to some temporary location. With the lines saved, you could use spark-csv to read the lines, in...
How to read only n rows of large CSV file on HDFS using spark-csv package?
apache-spark|pyspark|hdfs|apache-spark-sql|spark-csv
20
32,790
7
44,277,219
44,277,219
12
true
2017-05-31T06:15:00.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to read only n rows of large CSV file on HDFS using spark-csv package?<p>I have a big distributed file on HDFS and each time I use sqlContext with spark-...
44,186,139
How to aggregate rows of jsonb elements in postgres?<p>I want to know if there is any efficient way to aggregate several rows of a JSONB column, consider this table structure:</p> <pre><code>PERFORMANCE(user_id INTEGER, stat_date DATE, metrics JSONB) </code></pre> <p>With rows like this:</p> <pre><code>1, 2017-01-0...
<p>One way is just get values from jsonb data, sum they using <code>group by user_id</code> and then make jsonb data again:</p> <pre><code>select user_id, jsonb_build_object('speed', sum((metrics-&gt;&gt;'speed')::numeric), 'distance', sum((metrics-&gt;&gt;'distance')::numeric) , 'time', sum((metrics-&gt;&gt;'time')::...
How to aggregate rows of jsonb elements in postgres?
sql|postgresql|jsonb
10
6,444
1
44,186,297
44,186,297
13
true
2017-05-25T17:11:27.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to aggregate rows of jsonb elements in postgres?<p>I want to know if there is any efficient way to aggregate several rows of a JSONB column, consider th...
44,216,262
React-native dependency error (com.atlassian.mobile.video okhttp-ws-compat)<p>I'm developing a React-native app and all of a sudden I started getting the following error:</p> <blockquote> <ul> <li>What went wrong: A problem occurred configuring project ':app'. Could not resolve all dependencies for configurati...
<p><code>com.atlassian.mobile.video</code> is not avaible on maven right now. To run your project you need to update it </p> <p>Update your <code>react</code> and <code>react-native</code> version to in your <code>package.json</code> file </p> <pre><code>"react": "16.0.0-alpha.3", "react-native": "0.43.1", </code></p...
React-native dependency error (com.atlassian.mobile.video okhttp-ws-compat)
react-native
29
3,904
6
44,216,865
44,216,865
15
true
2017-05-27T11:25:03.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React-native dependency error (com.atlassian.mobile.video okhttp-ws-compat)<p>I'm developing a React-native app and all of a sudden I started getting the fol...
44,252,037
How to run .NET unit tests in a docker container<p>I have a .NET Core application containing MSTest unit tests. What would the command be to execute all tests using this Dockerfile?</p> <pre><code>FROM microsoft/dotnet:1.1-runtime ARG source COPY . . ENTRYPOINT ["dotnet", "test", "Unittests.csproj"] </code></pre> <p>...
<p>Use a base image with .NET Core SDK installed. For example: </p> <pre><code>microsoft/dotnet microsoft/dotnet:1.1.2-sdk </code></pre> <p>Then run a <code>dotnet test</code> console command. This is why SDK-based image is required - you cann't run <code>dotnet test</code> in a Runtime-based image without SDK. Here ...
How to run .NET unit tests in a docker container
.net|docker|.net-core|visual-studio-2017
9
21,030
2
44,265,076
44,265,076
18
true
2017-05-30T01:11:25.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to run .NET unit tests in a docker container<p>I have a .NET Core application containing MSTest unit tests. What would the command be to execute all test...
44,071,679
ReactJs how to show list with load more option<p>I am tring to show todo list with load more option. I am appling limit.Limit is apply to list.But when i add loadmore()function. then i get error <strong>this.state.limit is null</strong> Wher i am wrong.Any one can suggest me. here is my code todoList.jsx</p> <pre><cod...
<p><strong>Changes:</strong></p> <p><strong>1.</strong> First define the <code>limit</code> in <code>state</code> variable by using <code>getInitialState</code> method, you didn't define the limit, that's why <code>this.state.limit</code> is <code>null</code>.</p> <p><strong>2.</strong> Define all the <code>functions...
ReactJs how to show list with load more option
javascript|reactjs
10
20,262
2
44,071,932
44,071,932
22
true
2017-05-19T13:42:51.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ReactJs how to show list with load more option<p>I am tring to show todo list with load more option. I am appling limit.Limit is apply to list.But when i add...
44,301,160
how can I access to a variable in try block in other try block?<p><a href="http://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javascript/" rel="noreferrer">http://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javascript/</a> In this link, there are some codes that acces...
<p>The author of that post clearly did a mistake there––it happens to all of us.</p> <p>So, the <code>const</code> declarations are block-scoped, like the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const" rel="noreferrer">docs</a> say:</p> <blockquote> <p>Constants are blo...
how can I access to a variable in try block in other try block?
javascript|node.js|asynchronous|async-await|try-catch
9
12,807
1
44,301,196
44,301,196
23
true
2017-06-01T07:27:55.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can I access to a variable in try block in other try block?<p><a href="http://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javas...
44,365,042
Where is the reference for options for writing or reading per format?<p>I use Spark 1.6.1.</p> <p>We are trying to write an ORC file to HDFS using HiveContext and DataFrameWriter. While we can use </p> <pre><code>df.write().orc(&lt;path&gt;) </code></pre> <p>we would rather do something like</p> <pre><code>df.write...
<blockquote> <p>Where can we find a reference to the options that can be passed into the DataFrameWriter?</p> </blockquote> <p>The most definitive and authoritative answer are the <a href="https://github.com/apache/spark" rel="nofollow noreferrer">sources</a>:</p> <ul> <li><a href="https://github.com/apache/spark/blob/...
Where is the reference for options for writing or reading per format?
apache-spark|apache-spark-sql|apache-spark-1.6
18
21,837
1
44,365,916
44,365,916
27
true
2017-06-05T08:44:53.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Where is the reference for options for writing or reading per format?<p>I use Spark 1.6.1.</p> <p>We are trying to write an ORC file to HDFS using HiveConte...
44,098,993
How to lock multiple stages of declarative Jenkins pipeline?<p>I want to run multiple stages inside a lock within a declarative Jenkins pipeline:</p> <pre><code>pipeline { agent any stages { lock(resource: 'myResource') { stage('Stage 1') { steps { echo "my...
<p>The problem is that, despite the fact that declarative pipelines were <a href="https://jenkins.io/blog/2016/09/19/blueocean-beta-declarative-pipeline-pipeline-editor/" rel="noreferrer">technically available in beta in September, 2016</a>, the blog post you reference (from October) is documenting scripted pipelines, ...
How to lock multiple stages of declarative Jenkins pipeline?
jenkins|jenkins-pipeline
60
27,720
6
44,100,937
44,100,937
28
true
2017-05-21T16:06:13.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to lock multiple stages of declarative Jenkins pipeline?<p>I want to run multiple stages inside a lock within a declarative Jenkins pipeline:</p> <pre><...
44,278,066
How to use Criteria Queries in Spring Boot Data Jpa Application<p>I have an application that uses <em>Spring Boot Data jpa</em> . So far i am using a repository like this</p> <pre><code>public interface StudentRepository extends CrudRepository&lt;StudentEntity, Integer&gt;{ @Query(value = "" + "SELECT s.s...
<p>From the <a href="http://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.single-repository-behaviour" rel="noreferrer"><code>docs</code></a></p> <blockquote> <p>To enrich a repository with custom functionality you first define an interface and an implementation for the custom functionalit...
How to use Criteria Queries in Spring Boot Data Jpa Application
hibernate|spring-boot|spring-data-jpa
14
57,381
5
44,278,967
44,278,967
31
true
2017-05-31T07:13:52.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use Criteria Queries in Spring Boot Data Jpa Application<p>I have an application that uses <em>Spring Boot Data jpa</em> . So far i am using a reposit...
44,236,842
Kotlin - equivalence to Swift's combination of "if let + cast"<p>I'm trying to find out how to achieve the combination of "if let + cast" in kotlin:</p> <p>in swift:</p> <pre><code>if let user = getUser() as? User { // user is not nil and is an instance of User } </code></pre> <p>I saw some documentation but they...
<p>One option is to use a <a href="https://kotlinlang.org/docs/reference/typecasts.html#safe-nullable-cast-operator" rel="noreferrer">safe cast operator</a> + <a href="https://kotlinlang.org/docs/reference/null-safety.html#safe-calls" rel="noreferrer">safe call</a> + <a href="https://kotlinlang.org/api/latest/jvm/stdli...
Kotlin - equivalence to Swift's combination of "if let + cast"
android|kotlin
26
11,026
5
44,237,111
44,237,111
36
true
2017-05-29T07:28:30.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Kotlin - equivalence to Swift's combination of "if let + cast"<p>I'm trying to find out how to achieve the combination of "if let + cast" in kotlin:</p> <p>...
44,222,554
How to remove quotes from around a string in Golang<p>I have a string in Golang that is surrounded by quote marks. My goal is to remove all quote marks on the sides, but to ignore all quote marks in the interior of the string. How should I go about doing this? My instinct tells me to use a RemoveAt function like in C#,...
<p>Use a <a href="https://golang.org/ref/spec#Slice_expressions" rel="noreferrer">slice expression</a>:</p> <pre><code>s = s[1 : len(s)-1] </code></pre> <p>If there's a possibility that the quotes are not present, then use this:</p> <pre><code>if len(s) &gt; 0 &amp;&amp; s[0] == '"' { s = s[1:] } if len(s) &gt; ...
How to remove quotes from around a string in Golang
go
20
27,169
5
44,222,606
44,222,606
38
true
2017-05-27T23:46:28.963Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove quotes from around a string in Golang<p>I have a string in Golang that is surrounded by quote marks. My goal is to remove all quote marks on th...
44,245,054
Xamarin Forms iOS status bar text color<p>I am unable to change the status bar text color of my Xamarin Forms iOS app to white. I have change in my info.plist as follow:</p> <pre><code>&lt;key&gt;UIStatusBarStyle&lt;/key&gt; &lt;string&gt;UIStatusBarStyleLightContent&lt;/string&gt; &lt;key&gt;UIViewControllerBasedStat...
<p>In Xamarin.Forms, there are three things you need to do to achieve white text in the iOS Status Bar. I've also posted a sample Xamarin.Forms app below that uses white text in the iOS Status Bar.</p> <h1>1. Update the Info.plist</h1> <p>In <code>Info.plist</code>, add the Boolean Property <code>View controller-based ...
Xamarin Forms iOS status bar text color
ios|xamarin|xamarin.ios|xamarin.forms
19
20,011
5
44,273,050
44,273,050
43
true
2017-05-29T14:36:22.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xamarin Forms iOS status bar text color<p>I am unable to change the status bar text color of my Xamarin Forms iOS app to white. I have change in my info.plis...
44,192,576
Use Create-React-App with Material UI<p>I'm new to Material UI and ReactJS. I've been playing around with <a href="https://github.com/facebookincubator/create-react-app" rel="noreferrer">Create-React-App (CRA)</a> and <a href="https://github.com/reactstrap/reactstrap" rel="noreferrer">reactstrap</a>. My question is, c...
<p>First install <code>material-ui</code></p> <pre><code>npm install --save material-ui </code></pre> <p>or</p> <pre><code>yarn add material-ui </code></pre> <p><code>src/App.js</code></p> <pre><code>import React, { Component } from 'react'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; // a...
Use Create-React-App with Material UI
reactjs|material-ui|create-react-app
23
13,858
1
44,197,904
44,197,904
52
true
2017-05-26T02:17:23.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use Create-React-App with Material UI<p>I'm new to Material UI and ReactJS. I've been playing around with <a href="https://github.com/facebookincubator/creat...
44,357,053
Flutter Test MissingPluginException<p>Running tests which rely on the SharedPreferences Plugin always result in</p> <pre><code>MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences) </code></pre> <p>My pubspec.yaml</p> <pre><code>dev_dependencies: flutter...
<p>If you're using shared_preferences 0.2.4 and above, use <code>setMockInitialValues</code>:</p> <pre><code>SharedPreferences.setMockInitialValues({}); // set initial values here if desired </code></pre> <p>For earlier versions you can do it manually:</p> <pre><code>const MethodChannel('plugins.flutter.io/shared_pr...
Flutter Test MissingPluginException
dart|flutter
25
24,337
3
44,360,235
44,360,235
54
true
2017-06-04T17:45:26.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter Test MissingPluginException<p>Running tests which rely on the SharedPreferences Plugin always result in</p> <pre><code>MissingPluginException(No imp...
44,355,452
Google play app signing key hash<p>I have opted for google play app signing and i understand that google changes the signing keys for the app and I found the Sha 1 certificate but couldnt find the keyhash .</p> <p>How can i get the keyhash of my released app is there a way to extract it from the certificate?</p>
<p><strong>You can extract keyhash from the Sha1 certificate signature</strong>. Key hashes are usually extracted in the following way:</p> <pre><code>public static String getKeyHash(final Context context) { PackageInfo packageInfo = getPackageInfo(context, PackageManager.GET_SIGNATURES); if (packageInfo == nu...
Google play app signing key hash
android|google-play
59
28,210
5
44,448,437
44,448,437
54
true
2017-06-04T15:00:50.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google play app signing key hash<p>I have opted for google play app signing and i understand that google changes the signing keys for the app and I found the...
44,309,507
stacked bar plot using matplotlib<p>I am generating bar plots using matplotlib and it looks like there is a bug with the stacked bar plot. The sum for each vertical stack should be 100. However, for X-AXIS ticks 65, 70, 75 and 80 we get completely arbitrary results which do not make any sense. I do not understand what ...
<p>You need the <code>bottom</code> of each dataset to be the sum of all the datasets that came before. you may also need to convert the datasets to numpy arrays to add them together.</p> <pre><code>p1 = plt.bar(ind, dataset[1], width, color='r') p2 = plt.bar(ind, dataset[2], width, bottom=dataset[1], color='b') p3 = ...
stacked bar plot using matplotlib
python|matplotlib|plot|bar-chart
57
133,639
5
44,309,669
44,309,669
60
true
2017-06-01T13:55:13.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: stacked bar plot using matplotlib<p>I am generating bar plots using matplotlib and it looks like there is a bug with the stacked bar plot. The sum for each v...
43,956,335
Convert float64 column to int64 in Pandas<p>I tried to convert a column from data type <code>float64</code> to <code>int64</code> using:</p> <pre><code>df['column name'].astype(int64) </code></pre> <p>but got an error:</p> <blockquote> <p>NameError: name 'int64' is not defined</p> </blockquote> <p>The column has ...
<p>Solution for pandas <strong>0.24+</strong> for converting numeric with missing values:</p> <pre><code>df = pd.DataFrame({'column name':[7500000.0,7500000.0, np.nan]}) print (df['column name']) 0 7500000.0 1 7500000.0 2 NaN Name: column name, dtype: float64 df['column name'] = df['column name'].astyp...
Convert float64 column to int64 in Pandas
python|pandas|dataframe
66
189,477
5
43,956,345
43,956,345
114
true
2017-05-13T18:01:51.753Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert float64 column to int64 in Pandas<p>I tried to convert a column from data type <code>float64</code> to <code>int64</code> using:</p> <pre><code>df['...
44,078,205
How to check the object type on runtime in TypeScript?<p>I'm trying to find a way to pass an object to function in and check it type in a runtime. This is a pseudo code:</p> <pre class="lang-js prettyprint-override"><code>function func (obj:any) { if(typeof obj === &quot;A&quot;) { // do something } els...
<blockquote> <p><strong>Edit</strong>: I want to point out to people coming here from searches that this question is specifically dealing with non-class types, ie object shapes as defined by <code>interface</code> or <code>type</code> alias. For class types you can use JavaScript's <a href="http://www.typescriptl...
How to check the object type on runtime in TypeScript?
typescript|types|runtime
81
125,477
9
44,078,574
44,078,574
125
true
2017-05-19T20:02:32.010Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check the object type on runtime in TypeScript?<p>I'm trying to find a way to pass an object to function in and check it type in a runtime. This is a ...
44,022,610
Management web-app and mobile version<p>I am building a management web application based on php + mysql, developed with CakePhp framework.</p> <p>Now I have been commissioned to develop the mobile version, mainly for android and ios devices (no windows, until now...) leaving apart that right now i have to study from s...
<p>Cake, even early version of it, takes to themes very gracefully. Just add to your existing website a mobile-friendly template, customized a bit for your brand look, and you won't need to learn a thing about mobile apps. </p>
Management web-app and mobile version
android|ios|cakephp
-4
71
1
44,032,479
44,032,479
1
true
2017-05-17T10:43:11.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Management web-app and mobile version<p>I am building a management web application based on php + mysql, developed with CakePhp framework.</p> <p>Now I have...
44,314,866
How does Microsoft Bot Service Provision Skype bot<p>Would like to know how Microsoft Bot Service Provision Skype bot , Need to check the underline code how microsoft bot service is using Skype API to create skype bot. Please provide the reference and source code.</p>
<p>The code you are asking for is not open source. Bot Framework has many pieces open source (like the <a href="https://github.com/Microsoft/BotBuilder" rel="nofollow noreferrer">SDKs</a>, the <a href="https://github.com/Microsoft/BotFramework-Emulator" rel="nofollow noreferrer">Emulator</a>, the <a href="https://githu...
How does Microsoft Bot Service Provision Skype bot
botframework|skype-bots
-5
69
1
44,315,129
44,315,129
2
true
2017-06-01T18:42:38.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How does Microsoft Bot Service Provision Skype bot<p>Would like to know how Microsoft Bot Service Provision Skype bot , Need to check the underline code how ...
44,057,357
woocommerce_checkout_update_order_meta action is not working<p>Hi today i was working with woo-commerce and i have successfully created some custom checkout fields as per user requirements but i am unable to save them in database.</p> <p>Here how i created custom checkout fields...its in child theme <code>functions.ph...
<p>I have just change a little bit your last hooked function and it works (on WC version 2.6.x and 3.0+). It's better with <a href="http://php.net/manual/en/function.empty.php" rel="noreferrer"><strong><code>empty()</code></strong></a> php function to use variables <em>(to be retro compatible)</em>. <br> Also is better...
woocommerce_checkout_update_order_meta action is not working
wordpress|woocommerce|hook-woocommerce|woothemes
7
17,712
2
44,059,254
44,059,254
8
true
2017-05-18T20:38:39.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: woocommerce_checkout_update_order_meta action is not working<p>Hi today i was working with woo-commerce and i have successfully created some custom checkout ...
44,077,274
How to get index of findFirst() in java 8?<p>I have the following code:</p> <pre><code>ArrayList &lt;String&gt; entries = new ArrayList &lt;String&gt;(); entries.add("0"); entries.add("1"); entries.add("2"); entries.add("3"); String firstNotHiddenItem = entries.stream() .filter(e -&gt; e.equals("...
<p>You can't in a straightforward way - streams process elements without context of where they are in the stream.</p> <p>However, if you're prepared to take the gloves off...</p> <pre><code>int[] position = {-1}; String firstNotHiddenItem = entries.stream() .peek(x -&gt; position[0]++) // increment every el...
How to get index of findFirst() in java 8?
java|java-8|java-stream
15
16,665
4
44,086,981
44,086,981
8
true
2017-05-19T19:02:02.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get index of findFirst() in java 8?<p>I have the following code:</p> <pre><code>ArrayList &lt;String&gt; entries = new ArrayList &lt;String&gt;(); e...
44,229,429
Cannot set property createElement of #<Object> which is only a getter<h3>Description</h3> <p>What you are reporting: I am following this <a href="https://gaearon.github.io/react-hot-loader/getstarted/" rel="noreferrer">set of instructions</a> on how to setup React hot loarder. But when I go to step 3 where I put the p...
<p>I don't have enough reputation to post comments, so I have to write an answer which is not exactly a solution to the problem, but still...</p> <p>The error you are receiving is due to <code>react-hot-loader/patch</code> requiring the actual <code>react</code> module and patching its <code>createElement</code> funct...
Cannot set property createElement of #<Object> which is only a getter
reactjs|babeljs|webpack-2|react-hot-loader|preact
8
2,076
1
44,304,346
44,304,346
10
true
2017-05-28T16:13:44.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot set property createElement of #<Object> which is only a getter<h3>Description</h3> <p>What you are reporting: I am following this <a href="https://ga...
44,345,997
Spring Cannot find class [org.hibernate.ejb.HibernatePersistence]<p>Im working on a java spring project on eclipse, and while Im trying to run the project through a JUnit test, I get and error : Cannot find class [org.hibernate.ejb.HibernatePersistence] . I looked for a lot of similar problems and no one could resolve ...
<p>You should use:</p> <pre><code>org.hibernate.jpa.HibernatePersistenceProvider </code></pre> <p>instead of</p> <pre><code>org.hibernate.ejb.HibernatePersistence </code></pre>
Spring Cannot find class [org.hibernate.ejb.HibernatePersistence]
spring|hibernate|jpa|persistence.xml
10
9,251
1
44,346,291
44,346,291
13
true
2017-06-03T16:14:23.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spring Cannot find class [org.hibernate.ejb.HibernatePersistence]<p>Im working on a java spring project on eclipse, and while Im trying to run the project th...
44,170,174
Explicit default constructors in C++17<p>In C++17, empty tag types in the standard library now have default constructors which are marked <code>explicit</code>, and are also <code>= default</code>. For example, <a href="http://en.cppreference.com/w/cpp/utility/piecewise_construct_t" rel="noreferrer"><code>std::piecewis...
<p>The rationale for the library change is in <a href="http://cplusplus.github.io/LWG/lwg-defects.html#2510" rel="noreferrer">LWG 2510 &quot;Tag types should not be <code>DefaultConstructible</code>&quot;</a>:</p> <blockquote> <p><code>std::experimental::optional</code>, for certain reasons, specifies its <code>nullopt...
Explicit default constructors in C++17
c++|c++17|default-constructor|explicit-constructor
19
2,068
1
44,170,273
44,170,273
16
true
2017-05-24T23:48:26.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Explicit default constructors in C++17<p>In C++17, empty tag types in the standard library now have default constructors which are marked <code>explicit</cod...
44,316,868
CSS Grid Layout Sidebar toggle<p>This is a question regarding the new CSS Grid system that was recently added to the CSS web standards. This is an example of a layout that I am trying to use:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false"> <div class="snippet-code">...
<p>Make the grid adapt with auto, and change the .chat width</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>html,body{ height: 100vh; width: 100wh; padding: 0; marg...
CSS Grid Layout Sidebar toggle
html|css|css-grid
13
15,399
1
44,317,071
44,317,071
26
true
2017-06-01T20:48:55.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CSS Grid Layout Sidebar toggle<p>This is a question regarding the new CSS Grid system that was recently added to the CSS web standards. This is an example of...
44,056,913
md-autocomplete onSelectionChange fired twice<p>I use md-autocomplete <code>angular/material: 2.0.0-beta.5</code> in my Angular application. With the latest release the <code>selected</code> method has been replaced by <code>onSelectionChange</code>. </p> <p>The first time a value from the drop down is selected, the a...
<p>What is happening is onSelectionChange fires both for the new selected, and the one being unselected, in that order. If you add the $event to your call like so</p> <pre><code>(onSelectionChange)="selected($event, country)" </code></pre> <p>you can then check if it is the selected one by looking at the source like...
md-autocomplete onSelectionChange fired twice
angular|angular-material|md-autocomplete
10
5,124
1
44,057,108
44,057,108
27
true
2017-05-18T20:07:20.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: md-autocomplete onSelectionChange fired twice<p>I use md-autocomplete <code>angular/material: 2.0.0-beta.5</code> in my Angular application. With the latest ...
44,176,167
Dynamo db query using contains operator<p>My table items are of the form of </p> <pre><code>function addDoc(movie,cb){ var params = { TableName: "Movies", Item: { "year": movie.year, "title": movie.title, "info": movie.info, "genres" : movie.info.ge...
<p>There are few things that need to be clarified here.</p> <p>1) The Key attributes of DynamoDB has to be scalar data type. So, I believe the attribute <code>genres</code> can't be defined as SET or LIST data type</p> <p>2) <code>KeyConditionExpression</code> - can refer to Hash and Sort key only. So, I presume the ...
Dynamo db query using contains operator
node.js|amazon-web-services|amazon-dynamodb
9
19,267
2
44,176,298
44,176,298
28
true
2017-05-25T08:46:33.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dynamo db query using contains operator<p>My table items are of the form of </p> <pre><code>function addDoc(movie,cb){ var params = { TableName:...
44,028,876
How to specify upload directory in multer-S3 for AWS-S3 bucket?<p>I am using express + multer-s3 to upload files to AWS S3 service.</p> <p>Using the following code, I was able to upload the files to S3 <strong>Bucket</strong> but directly in the bucket.</p> <p>I want them to be uploaded in a folder inside the bucket....
<p>S3 doesn't always have folders (see <a href="http://docs.aws.amazon.com/AmazonS3/latest/UG/FolderOperations.html" rel="noreferrer">http://docs.aws.amazon.com/AmazonS3/latest/UG/FolderOperations.html</a>). It will simulate folders by adding a strings separated by / to your filename.</p> <p>e.g.</p> <pre><code>key: ...
How to specify upload directory in multer-S3 for AWS-S3 bucket?
node.js|amazon-s3|multer-s3
20
13,621
3
44,029,666
44,029,666
36
true
2017-05-17T15:18:30.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to specify upload directory in multer-S3 for AWS-S3 bucket?<p>I am using express + multer-s3 to upload files to AWS S3 service.</p> <p>Using the followi...
43,970,307
Azure functions: Installing Python modules and extensions on consumption plan<p>I am trying to run a python script with Azure functions. I had success updating the python version and installing modules on Azure functions under the App Services plan but I need to use it under the Consumption plan as my script will only...
<p>On Functions Comsumption plan, Kudu extensions are not available. However, you can update pip to be able to install all your dependencies correctly:</p> <ul> <li>Create your Python script on Functions (let's say NameOfMyFunction/run.py)</li> <li>Open a Kudu console</li> <li>Go to the folder of your script (should b...
Azure functions: Installing Python modules and extensions on consumption plan
python|azure|virtual-machine|azure-functions
17
16,678
3
43,984,890
43,984,890
37
true
2017-05-15T01:14:12.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure functions: Installing Python modules and extensions on consumption plan<p>I am trying to run a python script with Azure functions. I had success updat...
44,180,361
@ngrx Effect does not run the second time<p>I've just started learning about @ngrx/store and @ngrx.effects and have created my first effect in my Angular/Ionic app. It runs ok the first time but if I dispatch the event to the store again (i.e when clicking the button again), nothing happens (no network call is made, no...
<p>It sounds like an error is occurring. In that situation, the action in the observable returned by <code>catch</code> will be emitted into the effect's stream and the effect will then complete - which will prevent the effect from running after the error action is emitted.</p> <p>Move the <code>map</code> and the <co...
@ngrx Effect does not run the second time
effects|ngrx
15
5,194
2
44,180,463
44,180,463
38
true
2017-05-25T12:15:46.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: @ngrx Effect does not run the second time<p>I've just started learning about @ngrx/store and @ngrx.effects and have created my first effect in my Angular/Ion...
44,232,566
Add L2 regularization when using high level tf.layers<p>Is it possible to add an L2 regularization when using the layers defined in tf.layers? </p> <p>It seems to me that since tf.layers is an high level wrapper, there is no easy way to get access to the filter weights.</p> <p><strong>With tf.nn.conv2d</strong></p> ...
<p>You can pass them into <a href="https://www.tensorflow.org/api_docs/python/tf/layers/conv2d" rel="noreferrer"><code>tf.layers.conv2d</code> as arguments:</a></p> <pre><code>regularizer = tf.contrib.layers.l2_regularizer(scale=0.1) layer2 = tf.layers.conv2d( inputs, filters, kernel_size, kernel_regul...
Add L2 regularization when using high level tf.layers
tensorflow
27
28,688
4
44,238,354
44,238,354
38
true
2017-05-28T22:21:57.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add L2 regularization when using high level tf.layers<p>Is it possible to add an L2 regularization when using the layers defined in tf.layers? </p> <p>It se...
44,164,367
How To Embed Google Drive Document (PDF) In Blogger Post?<p>I want to embed a pdf document from Google Drive in my Blogger Post.</p>
<p>Select the pdf file you want to embed. Right click > <strong>Preview</strong> > <strong>More actions</strong> > <strong>Open in a new window</strong>. Now click <strong>More actions</strong> > <strong>Embed item</strong>. Copy the embed code and paste it on your blog post (File must be set <strong>publicly visible</...
How To Embed Google Drive Document (PDF) In Blogger Post?
iframe|google-drive-api|blogger
21
58,888
2
44,182,980
44,182,980
42
true
2017-05-24T16:50:56.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How To Embed Google Drive Document (PDF) In Blogger Post?<p>I want to embed a pdf document from Google Drive in my Blogger Post.</p>
44,022,068
Quiet vs Stop in Sidekiq<p>What's the difference between stoping workers vs 'quiet' them. In the web GUI I see both options but not sure what are the differences.</p> <p>Also, whenever I stop all workers, do they stop gracefully meaning they are put on queue again or not?</p> <p>Thanks.</p>
<ol> <li>Quiet means don't fetch new jobs from Redis anymore. Current jobs will continue to process indefinitely.</li> <li>Stop means quiet immediately + force any jobs still processing after the <code>-t</code> timeout (default: 8 seconds) to stop <strong>and push those unfinished jobs back to Redis</strong>.</li> </...
Quiet vs Stop in Sidekiq
sidekiq
24
7,474
1
44,030,318
44,030,318
47
true
2017-05-17T10:18:51.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Quiet vs Stop in Sidekiq<p>What's the difference between stoping workers vs 'quiet' them. In the web GUI I see both options but not sure what are the differe...
44,145,363
Animate visibility of a view from gone to visible with animation<p>I have a view that is <code>invisible</code> by default(Just for the first time).</p> <p>Now I need to switch the visibility to <code>VISIBLE</code> with this <code>animation</code>:</p> <pre><code>if (myView.getVisibility() == View.INVISIBLE) { m...
<p>You can do this using <code>XML</code> animation. </p> <p>Create a <code>slide-up</code> animation <code>XML</code> using <code>set</code> and <code>alpha</code> and put this <code>XML</code> into your resource <code>anim</code> folder. </p> <p><strong>slide_up.xml</strong></p> <pre><code>&lt;?xml version="1.0" e...
Animate visibility of a view from gone to visible with animation
android|animation|android-animation|visibility
26
45,873
5
44,145,485
44,145,485
50
true
2017-05-23T21:30:26.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Animate visibility of a view from gone to visible with animation<p>I have a view that is <code>invisible</code> by default(Just for the first time).</p> <p>...
44,066,709
Your connection is not private NET::ERR_CERT_COMMON_NAME_INVALID<p>I am facing strange issue on chrome while debugging local ASP.NET application on chrome. I am not able to open localhost without <strong>https</strong>. With Https it's giving error: <strong>Your connection is not private</strong> <code>NET::ERR_CERT_CO...
<p>Finally banging head on desk for two days I found this setting in <code>chrome://flags/</code> to <code>Allow invalid certificates for resources loaded from localhost</code>. finally no disable all certificate error, only for localhost. Adding answer for someone struggling with same issue.</p> <p><a href="https://i...
Your connection is not private NET::ERR_CERT_COMMON_NAME_INVALID
asp.net-mvc|google-chrome|https|localhost
24
33,846
11
44,126,123
44,126,123
59
true
2017-05-19T09:47:01.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Your connection is not private NET::ERR_CERT_COMMON_NAME_INVALID<p>I am facing strange issue on chrome while debugging local ASP.NET application on chrome. I...
44,222,883
Run a shell script and immediately background it, however keep the ability to inspect its output<p>How can I run a shell script and immediately <em>background</em> it, however keep the ability to inspect its output any time by tailing <code>/tmp/output.txt</code>.</p> <p>It would be nice if I can <em>foreground</em> th...
<h1>To 'background' a process when you start it</h1> <p>Simply add an ampersand (<code>&amp;</code>) after the command.</p> <p>If the program writes to standard out, it will still write to your console / terminal.</p> <hr /> <h1>To foreground the process</h1> <p>Simply use the <a href="https://man7.org/linux/man-pages/...
Run a shell script and immediately background it, however keep the ability to inspect its output
bash|background-process|daemon|gnu-screen|job-control
65
114,440
3
44,222,911
44,222,911
122
true
2017-05-28T00:59:43.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Run a shell script and immediately background it, however keep the ability to inspect its output<p>How can I run a shell script and immediately <em>backgroun...
44,056,405
What's the difference between --add-exports and --add-opens in Java 9?<p>Java 9 (jdk-9+170) does not allow by default an application to see all classes from the JDK, unlike all previous versions of Java, due to the new module system.</p> <p>To workaround this, the <code>java</code> command line offers a new argument <...
<ul> <li>With <a href="https://blog.codefx.org/java/five-command-line-options-to-hack-the-java-9-module-system/#Accessing-Internal-APIs-With--add-exports" rel="noreferrer"><code>--add-exports</code></a> the package is exported, meaning all public types and members therein are accessible at compile and run time.</li> <l...
What's the difference between --add-exports and --add-opens in Java 9?
java|command-line-arguments|java-9|java-platform-module-system|java-module
80
45,383
1
44,059,335
44,059,335
128
true
2017-05-18T19:33:33.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What's the difference between --add-exports and --add-opens in Java 9?<p>Java 9 (jdk-9+170) does not allow by default an application to see all classes from ...
44,188,240
Kotlin - How to correctly concatenate a String<p>A very basic question, what is the right way to concatenate a String in Kotlin?</p> <p>In Java you would use the <code>concat()</code> method, e.g.</p> <pre><code>String a = "Hello "; String b = a.concat("World"); // b = Hello World </code></pre> <p>The <code>concat()...
<h1>String Templates/Interpolation</h1> <p>In Kotlin, you can concatenate using <em><a href="https://kotlinlang.org/docs/reference/basic-syntax.html#using-string-templates" rel="noreferrer">String interpolation/templates</a></em>:</p> <pre><code>val a = &quot;Hello&quot; val b = &quot;World&quot; val c = &quot;$a $b&qu...
Kotlin - How to correctly concatenate a String
string|kotlin
121
151,568
12
44,188,301
44,188,301
191
true
2017-05-25T19:18:17.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Kotlin - How to correctly concatenate a String<p>A very basic question, what is the right way to concatenate a String in Kotlin?</p> <p>In Java you would us...
44,212,642
Git: Confusion about merge algorithm, conflict format, and interplay with mergetools<p>I don't know the details, but as far as I understand the process of merging and conflict resolution, it goes as follows (assume there is only one file in the repository, modified in two branches):</p> <ol> <li>The user issues a <cod...
<p>The full answer is complicated. Edward Thomson's covers much of it. Here is considerably more detail.</p> <p>Let's start, though, with this: <code>git mergetool</code> runs—I should say, <strong><em>you</em></strong> run <strong><em>it</em></strong>—<em>after</em> all the rest of <code>git merge</code> is done. ...
Git: Confusion about merge algorithm, conflict format, and interplay with mergetools
git|algorithm|file-format|git-merge-conflict|mergetool
10
1,099
2
44,219,184
44,219,184
5
true
2017-05-27T03:24:32.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Git: Confusion about merge algorithm, conflict format, and interplay with mergetools<p>I don't know the details, but as far as I understand the process of me...
44,211,922
NG-bootstrap Modal Component no provider error<p>I the ng-bootstrap library for angular 2; in particular i am looking at: <a href="https://ng-bootstrap.github.io/#/components/modal" rel="noreferrer">Components as content</a>. I've tried to incorporate the example code into my project with very little success. The error...
<p>you have to import <code>NgbModule</code> to your <strong>imports</strong> array of <code>NgModule</code>.</p> <pre><code>import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; @NgModule({ ... imports: [NgbModule.forRoot(), ...], ... }) export class AppModule { } </code></pre>
NG-bootstrap Modal Component no provider error
angular|ng-bootstrap
12
31,292
3
44,211,960
44,211,960
7
true
2017-05-27T01:05:34.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NG-bootstrap Modal Component no provider error<p>I the ng-bootstrap library for angular 2; in particular i am looking at: <a href="https://ng-bootstrap.githu...
44,118,592
Can't Debug an Annotation Processor when using kapt and gradle<p>I'm building an annotation processor, and I recently switched from using the default annotationProcessor type to kapt, using the kotlin-kapt plugin.</p> <p>I was debugging my processor by using the command</p> <pre><code>./gradlew --no-daemon -Dorg.grad...
<p>You actually want to debug the Kotlin compiler daemon, not the Gradle daemon. Here is how you can pass the required JVM arguments:</p> <pre><code>./gradlew &lt;tasks&gt; -Dkotlin.daemon.jvm.options="-Xdebug,-Xrunjdwp:transport=dt_socket\,address=5005\,server=y\,suspend=n" </code></pre>
Can't Debug an Annotation Processor when using kapt and gradle
kotlin|remote-debugging|annotation-processing|annotation-processor|kapt
9
3,653
4
44,119,739
44,119,739
11
true
2017-05-22T17:14:12.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't Debug an Annotation Processor when using kapt and gradle<p>I'm building an annotation processor, and I recently switched from using the default annotat...
43,988,566
BroadcastReceiver for BOOT_COMPLETED is too slow<p>The below is my manifest file.</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.mccheekati.test_trail"&gt; &lt;uses-permission android:name="an...
<blockquote> <p>Is there any what to start the application immediately after reboot?</p> </blockquote> <p>No.</p> <p>There are many, many apps that want to get control at boot time. How quickly yours will get its turn will depend on many variables, such as the number of installed apps, the CPU speed of the device, ...
BroadcastReceiver for BOOT_COMPLETED is too slow
android|broadcastreceiver|bootcompleted
12
6,192
2
43,988,744
43,988,744
12
true
2017-05-15T20:48:45.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: BroadcastReceiver for BOOT_COMPLETED is too slow<p>The below is my manifest file.</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;ma...
44,137,774
Programmatically navigating in React-Router v4<p>How can I move to a new page after some validation is done with <code>React Router V4</code>? I have something like this:</p> <pre><code>export class WelcomeForm extends Component { handleSubmit = (e) =&gt; { e.preventDefault() if(this.validateForm...
<p>You are using <a href="https://reacttraining.com/react-router/web/guides/quick-start" rel="noreferrer">react-router v4</a>, so you need to use <a href="https://reacttraining.com/react-router/web/api/withRouter" rel="noreferrer">withRouter</a> with your component to access the history object’s properties, then use <c...
Programmatically navigating in React-Router v4
reactjs|react-router|react-router-v4
7
12,311
4
44,137,865
44,137,865
12
true
2017-05-23T14:34:48.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Programmatically navigating in React-Router v4<p>How can I move to a new page after some validation is done with <code>React Router V4</code>? I have somethi...
44,098,385
Using multiple Laravel scopes in OR context<p>I have a Subscription model which contain <code>start_date</code> and <code>end_date</code> attributes in my Laravel app. I have created two query scopes, scopeActive and scopeFuture to find active and future subscriptions (respectively).</p> <p>I would like to know how I ...
<h2>For static-context try:</h2> <pre><code>$subscriptions = Subscription::query() -&gt;active() -&gt;orWhere(function ($query) { $query-&gt;future(); }) -&gt;get(); </code></pre> <blockquote> <p>First call <code>query()</code> to prevent errors (because we may have a non-static method with &quo...
Using multiple Laravel scopes in OR context
php|laravel|eloquent
13
10,003
4
44,098,473
44,098,473
18
true
2017-05-21T15:07:24.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using multiple Laravel scopes in OR context<p>I have a Subscription model which contain <code>start_date</code> and <code>end_date</code> attributes in my La...
44,099,594
How to make a tkinter canvas rectangle with rounded corners?<p>I would like to create a rectangle with rounded corners. I'm using canvas from tkinter. </p>
<p>Offering an alternate approach to tobias's method would be to indeed do it with one polygon.</p> <p>This would have the advantage of being one canvas object if you are worried about optimization, or not having to worry about a tag system for referring to a single object.</p> <p>The code is a bit longer, but very bas...
How to make a tkinter canvas rectangle with rounded corners?
python|python-3.x|canvas|tkinter|tkinter-canvas
14
26,392
3
44,100,075
44,100,075
33
true
2017-05-21T17:08:20.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a tkinter canvas rectangle with rounded corners?<p>I would like to create a rectangle with rounded corners. I'm using canvas from tkinter. </p>
44,169,583
Rspec 3.6, Rails 5 error: wrong number of arguments (given 2, expected 1) for `post` request<p>I just started a new project in Rails 5, (my first, though I have several projects in Rails 4.x.) and am having trouble with controller specs. </p> <pre><code>describe RequestsController, :type =&gt; :controller do it "re...
<p>It appears that Rails 5 expects keyword arguments instead of hash arguments, which is a change from previous versions. Also, the first argument is a URL rather than an action. Try</p> <pre><code>post some_url, params: some_hash </code></pre>
Rspec 3.6, Rails 5 error: wrong number of arguments (given 2, expected 1) for `post` request
ruby-on-rails|rspec|ruby-on-rails-5|rspec-rails
18
9,525
1
44,169,691
44,169,691
34
true
2017-05-24T22:38:48.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rspec 3.6, Rails 5 error: wrong number of arguments (given 2, expected 1) for `post` request<p>I just started a new project in Rails 5, (my first, though I h...
44,020,818
How to calculate date difference in pyspark?<p>I have data like this: </p> <pre><code>df = sqlContext.createDataFrame([ ('1986/10/15', 'z', 'null'), ('1986/10/15', 'z', 'null'), ('1986/10/15', 'c', 'null'), ('1986/10/15', 'null', 'null'), ('1986/10/16', 'null', '4.0')], ('low', 'high', 'norma...
<p>You need to cast the column <code>low</code> to class date and then you can use <code>datediff()</code> in combination with <code>lit()</code>. Using <strong>Spark 2.2</strong>:</p> <pre><code>from pyspark.sql.functions import datediff, to_date, lit df.withColumn("test", datediff(to_date(lit("2017-0...
How to calculate date difference in pyspark?
python|apache-spark|dataframe|pyspark|apache-spark-sql
32
84,252
2
44,021,532
44,021,532
57
true
2017-05-17T09:28:11.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to calculate date difference in pyspark?<p>I have data like this: </p> <pre><code>df = sqlContext.createDataFrame([ ('1986/10/15', 'z', 'null'), ...
44,324,595
Difference between DispatchQueue.main.async and DispatchQueue.main.sync<p>I have been using <code>DispatchQueue.main.async</code> for a long time to perform UI related operations.

</p> <p>Swift provides both <code>DispatchQueue.main.async</code> and <code>DispatchQueue.main.sync</code>, and both are performed on the ...
<p>When you use <code>async</code> it lets the calling queue move on without waiting until the dispatched block is executed. On the contrary <code>sync</code> will make the calling queue stop and wait until the work you've dispatched in the block is done. Therefore <code>sync</code> is subject to lead to deadlocks. Try...
Difference between DispatchQueue.main.async and DispatchQueue.main.sync
ios|swift|multithreading|swift3|concurrency
152
121,119
4
44,325,307
44,325,307
84
true
2017-06-02T08:48:05.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Difference between DispatchQueue.main.async and DispatchQueue.main.sync<p>I have been using <code>DispatchQueue.main.async</code> for a long time to perform ...
44,335,619
Find and replace in Visual Studio code in a selection<p>I have the following line in a file I'm editing in VSCode:</p> <p><code>...............111.........111.............111..</code></p> <p>I want to replace all <code>.</code>s with <code>0</code>s. However, when I highlight the line and do a find/replace for <code>...
<p>I was able to get it to work but the workflow is poor:</p> <ol> <li><kbd>control</kbd> + <kbd>H</kbd> to open Find/Replace</li> <li>Select your line of text</li> <li>Click the "Find in selection" icon to the right <kbd>Alt</kbd> <kbd>L</kbd> or <kbd>⎇</kbd> <kbd>⌘</kbd> <kbd>L</kbd> on macOS)</li> <li>Enter your fi...
Find and replace in Visual Studio code in a selection
replace|visual-studio-code
97
125,996
10
44,339,430
44,339,430
139
true
2017-06-02T18:49:15.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find and replace in Visual Studio code in a selection<p>I have the following line in a file I'm editing in VSCode:</p> <p><code>...............111.........1...
44,273,754
How to ensure UWP app is always full screen on launch?<p>Is there a way (either C# or XAML) I can maximize a UWP app window even after I resized and closed it previously on desktop?</p> <p>I have tried with <code>ApplicationViewWindowingMode.FullScreen</code> but this makes the app go entire full screen and covers the ...
<p>You can use another value <code>PreferredLaunchViewSize</code> from <code>ApplicationViewWindowingMode</code> and then set <code>ApplicationView.PreferredLaunchViewSize</code> but the key is to find out what the <em>size</em> is going to be.</p> <p>Theoretically, you could use a really big number and window would j...
How to ensure UWP app is always full screen on launch?
c#|xaml|uwp|windows-10|uwp-xaml
13
8,257
5
44,273,903
44,273,903
12
true
2017-05-31T00:08:07.263Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to ensure UWP app is always full screen on launch?<p>Is there a way (either C# or XAML) I can maximize a UWP app window even after I resized and closed i...
44,232,983
How can we evaluate a Gaussian in an intensity of an Image?<p>You can refer to section <em>4.3.1</em> in <a href="https://link.springer.com/article/10.1155/2010/680429" rel="nofollow noreferrer">this article</a> if you want.</p> <p><a href="https://i.stack.imgur.com/R1fuo.png" rel="nofollow noreferrer"><img src="https...
<p>Not quite. Basically you are manually coding formula (9) from <a href="http://mathworld.wolfram.com/GaussianFunction.html" rel="noreferrer">here</a>. Then:</p> <pre><code> ... exponent = ((x-rho).^2 + (y-theta).^2)./(2*sigma^2); % sigma is also squared val = exp(-exponent); % superfluous bracket removed ...
How can we evaluate a Gaussian in an intensity of an Image?
matlab
-16
1,340
2
44,291,880
44,291,880
17
true
2017-05-28T23:34:50.590Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can we evaluate a Gaussian in an intensity of an Image?<p>You can refer to section <em>4.3.1</em> in <a href="https://link.springer.com/article/10.1155/2...
44,202,247
Laravel 5.4 - Override API 'throttle:60,1'<p>I'm writing a lot of API to get and store data.<br> I like the default <code>throttle</code> option:</p> <pre><code>protected $middlewareGroups = [ 'api' =&gt; [ 'throttle:60,1', 'bindings', ], ]; </code></pre> <p>to limit the request to 60 per minu...
<h2>Current answer</h2> <p>According to <a href="https://github.com/laravel/framework/issues/16786" rel="noreferrer">this GitHub issue</a>, the throttle middleware <strong>should not</strong> be used "twice" (like you want to do that). There are only two ways how to deal with your current problem "correctly":</p> <ol...
Laravel 5.4 - Override API 'throttle:60,1'
php|laravel-5.4|throttling
26
46,139
3
44,208,820
44,208,820
20
true
2017-05-26T12:57:36.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel 5.4 - Override API 'throttle:60,1'<p>I'm writing a lot of API to get and store data.<br> I like the default <code>throttle</code> option:</p> <pre><...
44,095,161
Xcode : Alamofire get String response<p>I am new in IOS development and currently learning networking with Alamofire</p> <p>i am trying to make a login ... whenever the credentials are correct the .php file returns a <code>json</code> and i am able to get that json from <code>Alamofire</code> through the following cod...
<p>If you want <strong>JSON</strong> response use <strong>.responseJSON</strong> , if you want <strong>String</strong> response use <strong>.responseString</strong>. If you want both use both. Hope this help.</p> <pre><code>Alamofire.request(loginUrl, method: .post, parameters: parameters) .responseJSON { response...
Xcode : Alamofire get String response
xcode|alamofire
12
18,707
2
44,095,484
44,095,484
36
true
2017-05-21T09:19:54.223Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xcode : Alamofire get String response<p>I am new in IOS development and currently learning networking with Alamofire</p> <p>i am trying to make a login ... ...
44,055,379
Why must must ngrx / redux effects return actions? Is using a noop action like elm considered bad practice?<p>I'm using a redux-style state management design with Angular and ngrx/store and ngrx/effects. Whenever I don't return an action from an effect, I get an error: </p> <pre><code>Cannot read property 'type' of un...
<p>By default, an ngrx/effect dispatches an action.</p> <p>If you want an effect to be 'fire-and-forget', all you need to do is add <code>{dispatch: false}</code> as an argument to the <code>@Effects()</code> decorator.</p> <p>From the <a href="https://github.com/ngrx/effects/blob/master/docs/api.md#effect" rel="nore...
Why must must ngrx / redux effects return actions? Is using a noop action like elm considered bad practice?
angular|redux|ngrx|ngrx-effects|ngrx-store
25
14,633
1
44,057,952
44,057,952
46
true
2017-05-18T18:29:59.057Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why must must ngrx / redux effects return actions? Is using a noop action like elm considered bad practice?<p>I'm using a redux-style state management design...
44,270,504
React Native iOS and Android folders not present<p>I'm new to react native, and I've been having some trouble understanding the folder structure of the app which should supposedly be present in the project folder on creation. Basically, when creating the project with npm, I get some starting files (App.js etc.) and a n...
<p>One of the points of Expo on top of React Native is that you don't go down to android or ios code. Expo deals with those folders for you, you don't need to interact with them. Is there a reason you need those folders? if so, you will have to eject. Here's the documentation to do so: <a href="https://docs.expo.io/ver...
React Native iOS and Android folders not present
android|ios|react-native|expo
81
103,212
14
44,270,825
44,270,825
56
true
2017-05-30T19:34:12.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Native iOS and Android folders not present<p>I'm new to react native, and I've been having some trouble understanding the folder structure of the app w...
44,021,662
how to create global function that can be accessed from any controller and blade file<p>I have two controller file homecontroller and backendcontroller. What is the best way to create global function and access it from both files? </p> <p>I found <a href="https://stackoverflow.com/questions/32419619/how-do-i-make-glob...
<p><strong>Updated:</strong></p> <p><strong>Step 1</strong> Add folder inside app folder <strong>app-&gt;Helper</strong></p> <p><strong>Step 2</strong> add php Class inside Helper folder <strong>Eg. Helper.php</strong></p> <p>Add namespace and class to the Helper.php</p> <pre><code>namespace App\Helper; class Helper {...
how to create global function that can be accessed from any controller and blade file
laravel|controller|global
63
71,941
9
44,022,161
44,022,161
60
true
2017-05-17T10:02:20.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to create global function that can be accessed from any controller and blade file<p>I have two controller file homecontroller and backendcontroller. What...
44,141,076
compileKotlin block in build.gradle file throws error "Could not find method compileKotlin() for arguments [...]"<p>I'm trying to configure Kotlin to work with Java 1.8 in my Android project. I've tried adding the <code>compileKotlin</code> block at the bottom of my <code>build.gradle</code> file, but I get an error if...
<p>The error you are getting means that there's no <code>compileKotlin</code> task in the project, and that's expected for Android projects.</p> <p>The Kotlin compilation task names in Android projects contain the <a href="https://developer.android.com/studio/build/build-variants.html" rel="noreferrer">build variant</...
compileKotlin block in build.gradle file throws error "Could not find method compileKotlin() for arguments [...]"
android|gradle|kotlin
73
34,820
4
44,143,253
44,143,253
103
true
2017-05-23T17:09:28.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: compileKotlin block in build.gradle file throws error "Could not find method compileKotlin() for arguments [...]"<p>I'm trying to configure Kotlin to work wi...
44,365,469
Need Help for Developing XML file based Android App with Editable Item List<p>I am currently working on an Android Application which shows Data from XML file and can be also edited.</p> <p>This app parses XML document and displays contents of nodes in List of EditText Views, XML file contains nodes of items with child...
<p>You can absolutely get the entered text in the edit text,you can use the OnFocusChangeListener to the edit text and in listview u need to add this xml attribute :</p> <pre><code>android:descendantFocusability="beforeDescendants" </code></pre> <p>and in manifest add this:</p> <pre><code> &lt;activity a...
Need Help for Developing XML file based Android App with Editable Item List
android
-3
37
1
44,365,565
44,365,565
0
true
2017-06-05T09:11:29.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need Help for Developing XML file based Android App with Editable Item List<p>I am currently working on an Android Application which shows Data from XML file...
44,180,120
What is the use of Struct Tag name in C programming?<p>I want to know the actual use of struct tag_name in C programming. Without using the tag_name also i was getting output as with use of tag_name. I want the exact reason behind this process.</p> <p>For ex:</p> <pre><code>//With tag_name st1 struct st1 { int x; cha...
<p>In the first case :</p> <pre><code>struct st1 { int x; char c; } x = {100, 'a'}, y = {70, 'e'}; </code></pre> <p>you declare a type with name <code>struct st1</code>, and you also create two objects, of this type, <code>x</code> and <code>y</code>. So you can create objects of this type whenever you want...
What is the use of Struct Tag name in C programming?
c|struct
13
15,940
3
44,180,198
44,180,198
17
true
2017-05-25T12:01:14.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the use of Struct Tag name in C programming?<p>I want to know the actual use of struct tag_name in C programming. Without using the tag_name also i w...
44,097,144
React Navigation; use image in header?<p>I'm using react navigation in a react native project and I want to customize the header with an image.</p> <p>For a color I can use simple styling, but since react native doesn't support background images I need a different solution.</p>
<p><strong>Update:</strong></p> <p>Since v2 of the library there's an special option for setting the header background, namely <code>headerBackground</code>.</p> <p>This option accepts a React component, so when set to an <code>Image</code> component, it will use that.</p> <p>For example:</p> <pre class="lang-jsx pret...
React Navigation; use image in header?
reactjs|react-native|react-navigation
17
54,351
3
44,097,145
44,097,145
23
true
2017-05-21T12:57:48.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Navigation; use image in header?<p>I'm using react navigation in a react native project and I want to customize the header with an image.</p> <p>For a...
44,341,283
How to use UIViewPropertyAnimator with auto layout?<p>All the examples I could find online for <code>UIViewPropertyAnimator</code> use views that are laid out by setting frame rather than using auto layout, which is how views are commonly laid out. When using auto layout, the view animates to the position I want, but a...
<p>You can use <code>UIViewPropertyAnimator</code> with <em>Auto Layout</em>, but you need to modify the constraints instead of the view's frame and call <code>layoutIfNeeded()</code> inside of the closure.</p> <p><strong>First example: Animate by modifying constraint <code>constant</code></strong></p> <p>Create a v...
How to use UIViewPropertyAnimator with auto layout?
ios|swift|animation|uiview|autolayout
9
5,401
2
44,343,618
44,343,618
27
true
2017-06-03T07:01:04.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use UIViewPropertyAnimator with auto layout?<p>All the examples I could find online for <code>UIViewPropertyAnimator</code> use views that are laid ou...
44,018,175
Hotkey to move a tab from one of two split editors to another?<p>Say I split my editor into two halves, left and right, and I wanna move a file that is opened in a tab from the left-hand side editor to the right one and vice versa. </p>
<p>Windows: <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>→</kbd>/<kbd>←</kbd></p> <p>Mac: <kbd>Ctrl</kbd>+<kbd>Cmd</kbd>+<kbd>→</kbd>/<kbd>←</kbd></p> <p>Command names:</p> <ul> <li><p><code>workbench.action.moveEditorToNextGroup</code> <strong>View: Move Editor into Next Group</strong></p></li> <li><p><code>workbench.action...
Hotkey to move a tab from one of two split editors to another?
visual-studio-code
106
23,885
1
44,018,640
44,018,640
204
true
2017-05-17T07:22:42.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hotkey to move a tab from one of two split editors to another?<p>Say I split my editor into two halves, left and right, and I wanna move a file that is opene...
44,070,130
How to check for duplicate value in recursive array structure on textbox blur event?<p>I am trying have unique title to my node in recursive tree.</p> <p>So when I give title to my nodes it should check that this title is already taken by some other nodes or not. If taken then it should alert user and it should reset ...
<h3>my solution</h3> <ol> <li>store validated copy of name on blur (meaning there are 3 names but I dont know the point of myObj.name so I left it as is, and you can clean up)</li> <li>find dupes recursively, stop on first <code>true</code>. if there's a dupe, use last valid name, else update last valid name.</li> </ol...
How to check for duplicate value in recursive array structure on textbox blur event?
javascript|angularjs
7
288
2
44,147,237
44,147,237
3
true
2017-05-19T12:28:02.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check for duplicate value in recursive array structure on textbox blur event?<p>I am trying have unique title to my node in recursive tree.</p> <p>So...
44,262,721
MySQL error #167 - Out of range value for column even when it is autoincremented<p>I have a field (called ID) that is defined as: </p> <pre><code>smallint(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32768 </code></pre> <p>I have a query as follows (simplified):</p> <pre><code>INSERT INTO delivery (`ConsigneeName`, `...
<p>Your autoincrement starts outside of the range of smallint datetype. So you can not add any entry. Change the datatype of this column to int.</p> <p>See <a href="https://dev.mysql.com/doc/refman/5.7/en/integer-types.html" rel="noreferrer">the mysql documentation</a> about datatype ranges</p> <blockquote> <p>SM...
MySQL error #167 - Out of range value for column even when it is autoincremented
mysql|sql-insert|auto-increment
8
9,243
1
44,262,805
44,262,805
9
true
2017-05-30T12:47:27.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL error #167 - Out of range value for column even when it is autoincremented<p>I have a field (called ID) that is defined as: </p> <pre><code>smallint(1...
44,119,207
Is there any way to get variable importance with Keras?<p>I am looking for a proper or best way to get variable importance in a Neural Network created with Keras. The way I currently do it is I just take the weights (not the biases) of the variables in the first layer with the assumption that more important variables w...
<p>Since everything will be mixed up along the network, the first layer alone can't tell you about the importance of each variable. The following layers can also increase or decrease their importance, and even make one variable affect the importance of another variable. Every single neuron in the first layer itself wil...
Is there any way to get variable importance with Keras?
tensorflow|deep-learning|keras|keras-layer|keras-2
30
31,238
4
44,120,068
44,120,068
18
true
2017-05-22T17:54:26.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any way to get variable importance with Keras?<p>I am looking for a proper or best way to get variable importance in a Neural Network created with K...
44,148,966
AndroidViewModel vs ViewModel<p>With the introduction of the Android Architecture Components library, several new classes were introduced, including <code>AndroidViewModel</code> and <code>ViewModel</code>. However, I'm having trouble figuring out the difference between these two classes. The <a href="https://developer...
<h1>AndroidViewModel provides Application context</h1> <p>If you need to use context inside your Viewmodel you should use AndroidViewModel (AVM), because it contains the application context. To retrieve the context call <code>getApplication()</code>, otherwise use the regular ViewModel (VM).</p> <p>AndroidViewModel h...
AndroidViewModel vs ViewModel
android|mvvm|viewmodel|android-architecture-components|android-viewmodel
237
71,182
3
44,155,403
44,155,403
304
true
2017-05-24T04:24:20.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AndroidViewModel vs ViewModel<p>With the introduction of the Android Architecture Components library, several new classes were introduced, including <code>An...
43,957,259
Run multiple docker compose<p>I am using an application which runs on 3 different docker images:</p> <ul> <li>The first one is the server HTTP callable with a REST API</li> <li>The second one is rabbitmq</li> <li>The third one is a worker</li> </ul> <p>The whole application is launched with <code>docker-compose up</cod...
<p>It sounds like you just want 3 different environments or "stacks" of your Compose application running independently of each other. If this is the case, you can handle this with the <code>--project-name</code> or <code>-p</code> option to <code>docker-compose</code>. An example would be something like this:</p> <ul>...
Run multiple docker compose
docker|kubernetes|docker-compose
48
37,439
3
43,967,853
43,967,853
96
true
2017-05-13T19:35:05.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Run multiple docker compose<p>I am using an application which runs on 3 different docker images:</p> <ul> <li>The first one is the server HTTP callable with ...
44,071,080
Could not find com.android.tools.build:gradle:3.0.0-alpha1 in circle ci<p>I updated the gradle plugin to the latest version : <code>com.android.tools.build:gradle:3.0.0-alpha1</code> and this error occured in AS:</p> <pre><code>export TERM=&quot;dumb&quot; if [ -e ./gradlew ]; then ./gradlew test;else gradle test;fi ...
<p>Google have new maven repo</p> <p><a href="https://android-developers.googleblog.com/2017/10/android-studio-30.html" rel="noreferrer">https://android-developers.googleblog.com/2017/10/android-studio-30.html</a> > section <strong>Google's Maven Repository</strong></p> <p><a href="https://developer.android.com/studi...
Could not find com.android.tools.build:gradle:3.0.0-alpha1 in circle ci
android|android-studio|gradle|build|circleci
174
215,300
15
44,071,571
44,071,571
357
true
2017-05-19T13:13:02.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Could not find com.android.tools.build:gradle:3.0.0-alpha1 in circle ci<p>I updated the gradle plugin to the latest version : <code>com.android.tools.build:g...
44,274,410
MediaRecorder.stop() doesn't clear the recording icon in the tab<p>I start and stop a MediaRecorder stream. The red "recording" icon appears in the Chrome tab on start, but doesn't go away on stop.</p> <p>The icon looks like this:</p> <p><a href="https://i.stack.imgur.com/a0kZn.png" rel="noreferrer"><img src="https:/...
<p>This is because this recording icon is the one of <code>getUserMedia</code> streaming, not the one of <code>MediaRecorder</code>.<br> When you <code>stop</code> the MediaRecorder, the stream is still active.</p> <p>To stop this gUM stream (or any other MediaStream), you'd call <a href="https://developer.mozilla.org...
MediaRecorder.stop() doesn't clear the recording icon in the tab
javascript|google-chrome|web-audio-api|web-mediarecorder
31
10,281
1
44,274,928
44,274,928
64
true
2017-05-31T01:52:07.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MediaRecorder.stop() doesn't clear the recording icon in the tab<p>I start and stop a MediaRecorder stream. The red "recording" icon appears in the Chrome ta...
44,123,552
Scrape title by only downloading relevant part of webpage<p>I would like to scrape just the title of a webpage using Python. I need to do this for thousands of sites so it has to be fast. I've seen previous questions like <a href="https://stackoverflow.com/questions/5960087/retrieving-just-the-title-of-a-webpage-in-pyt...
<p>You can defer downloading the entire response body by enabling stream mode of <code>requests</code>.</p> <blockquote> <p><a href="http://docs.python-requests.org/en/master/user/advanced/#body-content-workflow" rel="noreferrer">Requests 2.14.2 documentation - Advanced Usage</a></p> <p>By default, when you mak...
Scrape title by only downloading relevant part of webpage
python|html|performance|web-scraping
18
3,366
6
44,184,743
44,184,743
18
true
2017-05-22T23:27:26.247Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Scrape title by only downloading relevant part of webpage<p>I would like to scrape just the title of a webpage using Python. I need to do this for thousands ...
44,019,469
How to use SASS / SCSS with latest vue-cli starter project?<p>I need to use SASS or SCSS in my project.</p> <p>I used the vue-cli to make the latest version of a starter project.</p> <p>Anyone had any success in making sass/scss work in the newest starter project with webpack?</p>
<ol> <li><p>you install the necessary dependencies</p> <p><code>npm install -D node-sass sass-loader</code></p></li> <li><p>for global styles, simply import the file into <code>main.js</code>:</p> <p><code>import './styles/my-styles.scss'</code></p></li> <li><p>in <code>.vue</code> files, add the lang to the <code>&l...
How to use SASS / SCSS with latest vue-cli starter project?
webpack|sass|vue.js|vuejs2|vue-component
33
44,092
3
44,019,800
44,019,800
76
true
2017-05-17T08:28:14.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use SASS / SCSS with latest vue-cli starter project?<p>I need to use SASS or SCSS in my project.</p> <p>I used the vue-cli to make the latest version...
44,029,802
Is there a way to revoke another user's access tokens and end their session in Identity Server 4?<p>Is there a recommended way to revoke another user's access in Identity Server 4? The use case I'm looking at is an Administrator revoking system access for a currently logged in user.</p> <p>I've read the documentation...
<p>You can only revoke <code>Reference tokens</code> not <code>JWTs</code>, and yes those need to be stored in a db. Have a look at the <code>IPersistedGrantStore</code> (of the top of my head, so may have got the name wrong), and you'll see the structure is pretty simple. </p> <p>Once you've got them stored, you can ...
Is there a way to revoke another user's access tokens and end their session in Identity Server 4?
access-token|openid-connect|identityserver4
8
3,624
1
44,030,890
44,030,890
8
true
2017-05-17T16:01:35.277Z
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 revoke another user's access tokens and end their session in Identity Server 4?<p>Is there a recommended way to revoke another user's acces...
44,306,005
non-interference requirement on Java 8 streams<p>I am a beginner in Java 8.</p> <blockquote> <p>Non-interference is important to have consistent Java stream behaviour. Imagine we are process a large stream of data and during the process the source is changed. The result will be unpredictable. This is irrespect...
<p>Well the oracle <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html#NonInterference" rel="noreferrer">example</a> is self-explanatory here. First one is this:</p> <pre><code>List&lt;String&gt; l = new ArrayList&lt;&gt;(Arrays.asList("one", "two")); Stream&lt;String&gt; sl = l.s...
non-interference requirement on Java 8 streams
java|java-8|java-stream
7
523
1
44,307,009
44,307,009
11
true
2017-06-01T11:13:57.300Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: non-interference requirement on Java 8 streams<p>I am a beginner in Java 8.</p> <blockquote> <p>Non-interference is important to have consistent Java stre...
43,931,986
How to upgrade Angular CLI to the latest version<p>Using <code>ng --version</code> I got:</p> <blockquote> <p>@angular/cli: 1.0.0</p> </blockquote> <p>which is not the latest release available.</p> <p>Since I have Angular CLI globally installed on my system, in order to upgrade it I tried:</p> <p><code>npm update...
<p>After reading some issues reported on the GitHub repository, I found the solution.</p> <p>In order to update the angular-cli package installed globally in your system, you need to run:</p> <pre><code>npm uninstall -g @angular/cli npm install -g @angular/cli@latest </code></pre> <p>Depending on your system, you may n...
How to upgrade Angular CLI to the latest version
angular|angular-cli
102
878,607
10
43,931,987
43,931,987
1,292
true
2017-05-12T07:35:19.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to upgrade Angular CLI to the latest version<p>Using <code>ng --version</code> I got:</p> <blockquote> <p>@angular/cli: 1.0.0</p> </blockquote> <p>wh...
44,369,117
Receiving Location even when app is not running in Swift<p>Still very new to Swift. I have come from an Android background where there is BroadcastReceiver that can deliver location info to a service even though the app isn't running.</p> <p>So I was looking for something similar in iOS/Swift and it appears that befor...
<p>It may or may not be a good solution but if I were you I would have used both <code>startMonitoringSignificantLocationChanges</code> and <code>regionMonitoring</code>.</p> <p><a href="https://drive.google.com/file/d/19Ih1mU17XQn_SoyujtmW-uZTBt5mLCXj/view" rel="noreferrer">Here</a> is the sample I made which worked ...
Receiving Location even when app is not running in Swift
ios|swift|swift3|geolocation
8
13,346
1
44,371,982
44,371,982
28
true
2017-06-05T12:38:31.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Receiving Location even when app is not running in Swift<p>Still very new to Swift. I have come from an Android background where there is BroadcastReceiver t...
37,783,669
How to add ojdbc7 to Java web app by Gradle?<p>My context:</p> <ul> <li>I build a Java web application what based on Spring Boot 1.3.5.RELEASE . </li> <li>I try to add <code>ojdcb</code> to dependencies list but not success. </li> <li>I know that Oracle has own Maven repository at <code>http://maven.oracle.com</code><...
<p>For Oracle database 12c</p> <p><strong>(1)</strong> Download <code>ojdbc7.jar</code> at Oracle homepage.</p> <p><strong>(2)</strong> Run command</p> <pre><code>mvn install:install-file -Dfile=ojdbc7.jar -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0.1 -Dpackaging=jar </code></pre> <p><strong>(3)</stro...
How to add ojdbc7 to Java web app by Gradle?
java|oracle|maven|gradle|build.gradle
7
17,945
4
50,484,781
50,484,781
7
true
2016-06-13T07:07:20.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add ojdbc7 to Java web app by Gradle?<p>My context:</p> <ul> <li>I build a Java web application what based on Spring Boot 1.3.5.RELEASE . </li> <li>I...
43,987,531
Difference between Active directory and Identity and Access managment<p>Please excuse me if this question sounds trivial to you. But I am very new the Identity and Access Management. There are multiple tools available in the market from IBM, Oracle etc. </p> <p>I am from Microsoft background and was under impression t...
<p>This is a surprisingly common question, and it doesn't help that many participants in the market like to use misleading terminology to describe their own products.</p> <p>Think of it like this:</p> <p>DIRECTORIES, INCLUDING ACTIVE DIRECTORY:</p> <ul> <li><p>A directory is a system that stores information about ident...
Difference between Active directory and Identity and Access managment
active-directory
17
27,437
2
50,048,396
50,048,396
33
true
2017-05-15T19:38:35.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Difference between Active directory and Identity and Access managment<p>Please excuse me if this question sounds trivial to you. But I am very new the Identi...
44,288,460
Google ReCaptcha Uncaught DOMException: Blocked a frame with origin "https://www.google.com"<p>I'm not sure why this is happening, and it isn't the usual, common error of:</p> <blockquote> <p><strong>Uncaught SecurityError:</strong> Block a frame with origin.</p> </blockquote> <p>The error I'm getting is:</p> <blo...
<blockquote> <p>The same-origin policy is an important concept in the web application security model. Under the policy, a web browser permits scripts contained in a first web page to access data in a second web page, but only if both web pages have the same origin. An origin is defined as a combination of URI...
Google ReCaptcha Uncaught DOMException: Blocked a frame with origin "https://www.google.com"
javascript|recaptcha
7
9,801
2
46,069,356
46,069,356
0
true
2017-05-31T15:10:52.280Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google ReCaptcha Uncaught DOMException: Blocked a frame with origin "https://www.google.com"<p>I'm not sure why this is happening, and it isn't the usual, co...
44,171,849
AWS: Boto3: AssumeRole example which includes role usage<p>I'm trying to use the AssumeRole in such a way that i'm traversing multiple accounts and retrieving assets for those accounts. I've made it to this point:</p> <pre><code>import boto3 stsclient = boto3.client('sts') assumedRoleObject = sts_client.assume_role( ...
<p>To get a session with an assumed role: </p> <pre class="lang-py3 prettyprint-override"><code>import botocore import boto3 import datetime from dateutil.tz import tzlocal assume_role_cache: dict = {} def assumed_role_session(role_arn: str, base_session: botocore.session.Session = None): base_session = base_sess...
AWS: Boto3: AssumeRole example which includes role usage
boto|boto3
43
106,018
10
45,834,847
45,834,847
21
true
2017-05-25T03:34:14.753Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AWS: Boto3: AssumeRole example which includes role usage<p>I'm trying to use the AssumeRole in such a way that i'm traversing multiple accounts and retrievin...
44,149,096
For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves<p>I have this test of nodejs when testing I get a error of done function not declared.</p> <pre><code>Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure ...
<p>I was facing the same issue, @MFAL's link in comment helped. I am expanding upon it.</p> <p>When there is an error/incorrect assertion an error is raised inside the promise. This leads to promise rejection. Once rejected done is never called and mocha reports time out. I solved this by writing a <code>.catch</code>...
For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves
node.js|mocha.js
126
146,456
20
45,858,343
45,858,343
71
true
2017-05-24T04:38:59.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves<p>I have this test of nodejs when testing I get a error of d...