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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
53,411,725 | Array - PHP - implementing values<p>I wrote a function that retruns this array data.. (Symfony)</p>
<pre><code>"data": [
{
"1": "2"
},
{
"1": "10"
},
{
"1": "4"
}
],
</code></pre>
<p>and I defined this values in an api call..</p>
<pre><code>private function getData()
{... | <p>Use array_combine </p>
<pre><code>$days = ['Sun', 'Mon', 'Tue'];
$arr = ['2', '10', '4'];
$combineArray = array_combine($days, $arr);
</code></pre> | Array - PHP - implementing values | php|arrays|api | -3 | 56 | 3 | 53,412,009 | 53,412,009 | 0 | true | 2018-11-21T12:08:20.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Array - PHP - implementing values<p>I wrote a function that retruns this array data.. (Symfony)</p>
<pre><code>"data": [
{
"1": "2"
},
{... |
53,485,184 | Flask REST API: result is not getting displayed as ValueError: View function did not return a response<p>I am facing problem when deploying a text summarizer (LexRank) through Flask RESTful API. Please see below my code snippet</p>
<pre><code>@app.route('/response/',methods = ['GET','POST'])
def response():
if request... | <p><code>sum_lex.append(str(sent))</code> returns <code>None</code>, because appending to a list is done in-place. Because you're effectively running <code>' '.join(None)</code>, you get the error.</p>
<p>Try this instead:</p>
<pre><code>sum_lex=[]
for sent in sum_1:
sum_lex.append(str(sent))
resp = ' '.join(sum_... | Flask REST API: result is not getting displayed as ValueError: View function did not return a response | python|flask | -3 | 70 | 1 | 53,485,515 | 53,485,515 | 1 | true | 2018-11-26T16:19:50.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flask REST API: result is not getting displayed as ValueError: View function did not return a response<p>I am facing problem when deploying a text summarizer... |
53,454,203 | Integrated DMCA badges are not show up on all pages<p>I have integrated DMCA badge through the Wordpress plugin, but the badge is not showing for all pages.</p>
<p>Any solutions on how to fix it?</p>
<p><a href="https://costoffliving.com/" rel="nofollow noreferrer">costoffliving.com</a></p> | <p>Sorry to hear you're having troubles with the plugin.</p>
<ul>
<li><p>Can I ask which version of wordpress you're using?</p></li>
<li><p>Can you tell me which page you're having trouble with?</p></li>
</ul>
<p>The DMCA.com Wordpress Badge plugin (<a href="https://www.dmca.com/WordPress/" rel="nofollow noreferrer">... | Integrated DMCA badges are not show up on all pages | wordpress|badge | -3 | 34 | 1 | 53,489,372 | 53,489,372 | 1 | true | 2018-11-24T00:31:04.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Integrated DMCA badges are not show up on all pages<p>I have integrated DMCA badge through the Wordpress plugin, but the badge is not showing for all pages.<... |
53,415,286 | Subscription not connecting using ApolloServer<p>I am trying to get a subscription up and running with ApolloServer (v 2.2.2). I had a setup that all-of-a-sudden just stopped working. When I try to connect to the subscription in <code>graphiql</code>/<code>Playground</code>I get the error:</p>
<pre><code>{
"erro... | <p>The it turns out that Firefox has issues with websockets (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=712329" rel="nofollow noreferrer">this bug report</a> that has been re-appeared even after the supposed fix). </p>
<p>In Firefox it works directly after starting a novel browser but after some hot rel... | Subscription not connecting using ApolloServer | javascript|graphql|apollo-server|graphql-subscriptions | 11 | 10,826 | 2 | 53,421,653 | 53,421,653 | 2 | true | 2018-11-21T15:24:59.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Subscription not connecting using ApolloServer<p>I am trying to get a subscription up and running with ApolloServer (v 2.2.2). I had a setup that all-of-a-su... |
53,437,755 | PowerShell - Convert FileTime to HexString<p>After searching the interwebs, I've managed to create a C# class to get a FileTimeUTC Hex String.</p>
<pre><code>public class HexHelper
{
public static string GetUTCFileTimeAsHexString()
{
string sHEX = "";
long ftLong = DateTime.Now.ToFileTimeUtc()... | <p>Turns out you need to include the using directive. In this case, "using System;"</p>
<pre><code>$HH = @"
using System;
public class HexHelper
{
public static string GetUTCFileTimeAsHexString()
{
string sHEX = "";
long ftLong = DateTime.Now.ToFileTimeUtc();
int ftHigh = (int)(ftLon... | PowerShell - Convert FileTime to HexString | c#|string|powershell|hex|filetime | 7 | 282 | 2 | 53,437,778 | 53,437,778 | 2 | true | 2018-11-22T20:40:14.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PowerShell - Convert FileTime to HexString<p>After searching the interwebs, I've managed to create a C# class to get a FileTimeUTC Hex String.</p>
<pre><cod... |
53,439,791 | file in python formatting<p>So here is a file</p>
<pre><code>APPLE: toronto, 2018, garden, tasty, 5
apple is a tasty fruit
>>>end
Orange: japan, 32, home, sour, 1
orange is a sour fruit
>>>end
graEes: america, 24, organic, sweet, 4
grapes is a sweet fruit
>>>end
</code></pre>
<p>This is a ... | <p>For this simple example, the following gives the results you want. (Although you probably misspelled grapes).</p>
<pre><code>from pprint import pprint
import re
def main():
fin = open('f1.txt', 'r')
data = {}
key = ''
parsed = []
for line in fin:
line = line.rstrip()
if line.st... | file in python formatting | python|dictionary | -3 | 59 | 1 | 53,440,123 | 53,440,123 | 2 | true | 2018-11-23T01:51:10.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
file in python formatting<p>So here is a file</p>
<pre><code>APPLE: toronto, 2018, garden, tasty, 5
apple is a tasty fruit
>>>end
Orange: japan, 3... |
53,454,403 | different result between c+ set and unordered_set<p>I am working on leetcode Frog Jump question and find some wired result when I use unordered_set instead of set for the following test case. unordered_set and set both have size 4, but looks like unordered_set doesn't loop through all elements.</p>
<p>[0,1,2,3,4,5,6,7... | <p>It happens because some of your insertions modify the same container that you are currently iterating over by a <code>for</code> cycle. Not surprisingly, insertions into <code>set</code>and into <code>unordered_set</code> might end up in different positions in the linear sequence of container elements. In one contai... | different result between c+ set and unordered_set | c++|set|unordered | -3 | 52 | 1 | 53,454,469 | 53,454,469 | 2 | true | 2018-11-24T01:26:08.150Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
different result between c+ set and unordered_set<p>I am working on leetcode Frog Jump question and find some wired result when I use unordered_set instead o... |
53,417,080 | Kotlin's 'let' plus elvis, and accidental null return values<p>I was surprised today to learn that this take on apparently idiomatic code fails:</p>
<pre><code>class QuickTest {
var nullableThing: Int? = 55
var nullThing: Int? = null
@Test
fun `test let behaviour`() {
nullableThing?.let {
... | <p>You could use <code>also</code> instead of <code>let</code>. <code>also</code> will return <code>nullableThing</code>, whereas <code>let</code> will return whatever the lambda returns.</p>
<p>See this article: <a href="https://medium.com/@elye.project/mastering-kotlin-standard-functions-run-with-let-also-and-apply-... | Kotlin's 'let' plus elvis, and accidental null return values | kotlin|idioms | 8 | 4,106 | 2 | 53,417,202 | 53,417,202 | 4 | true | 2018-11-21T16:57:42.047Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kotlin's 'let' plus elvis, and accidental null return values<p>I was surprised today to learn that this take on apparently idiomatic code fails:</p>
<pre><c... |
53,492,756 | How does compiler figure out fixed point of a functor and how cata work at leaf level?<p>I feel like understanding the abstract concept of fixed point of a functor, however, I am still struggling to figure out the exact implementation of it and its catamorphism in Haskell.</p>
<p>For example, if I define, as according... | <p>"List is the fixed point of ListF" is a fast-and-loose figure of speech. While <a href="http://www.cse.chalmers.se/~nad/publications/danielsson-et-al-popl2006.html" rel="nofollow noreferrer">fast and loose reasoning is morally correct</a>, you always need to keep in mind the boring correct thing. Which is as follows... | How does compiler figure out fixed point of a functor and how cata work at leaf level? | haskell|category-theory|recursion-schemes|fixpoint-combinators|catamorphism | 7 | 547 | 3 | 53,495,816 | 53,495,816 | 4 | true | 2018-11-27T04:28:05.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does compiler figure out fixed point of a functor and how cata work at leaf level?<p>I feel like understanding the abstract concept of fixed point of a f... |
53,460,689 | React ref current is NULL<p>I have this code taken from the official React Ref docs</p>
<pre><code>import React from "react";
import { render } from "react-dom";
class CustomTextInput extends React.Component {
constructor(props) {
super(props);
// create a ref to store the textInput DOM element
this.tex... | <p>The code is fine since it's the <a href="https://reactjs.org/docs/refs-and-the-dom.html#adding-a-ref-to-a-dom-element" rel="nofollow noreferrer">exact same example</a> present in react docs. Problem is your <code>react-dom</code> version is older. <code>React.createRef()</code> API was introduced in React 16.3 (all ... | React ref current is NULL | reactjs|ref | 8 | 6,939 | 1 | 53,460,882 | 53,460,882 | 6 | true | 2018-11-24T17:30:07.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React ref current is NULL<p>I have this code taken from the official React Ref docs</p>
<pre><code>import React from "react";
import { render } from "react-... |
53,397,976 | React Async Select<p>I am struggling with <strong>Async Select</strong> from <code>react-select</code>. I managed to display some defaultOptions and do an async fetch of its options using promises and <code>loadOptions</code> prop. </p>
<p>What I need is to have the options updated (resolve the promise) when the dropd... | <p>I actually found a way to solve it using a basic <code>react-select</code>. I am going to manage the <code>options</code> using a react state being set <code>onMenuOpen</code>. Using this approach, I have control on what options are displayed when the user clicks on the select.</p>
<p><a href="https://codesandbox.i... | React Async Select | reactjs|react-select | 8 | 16,956 | 2 | 53,411,073 | 53,411,073 | 7 | true | 2018-11-20T17:02:09.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Async Select<p>I am struggling with <strong>Async Select</strong> from <code>react-select</code>. I managed to display some defaultOptions and do an as... |
53,392,904 | Vue-Cookies: this.$cookies is undefined<p>In my main component I have:</p>
<pre><code>mounted() {
window.$cookie.set('cookie_name', userName, expiringTime);
},
</code></pre>
<p>This yields the following error:</p>
<blockquote>
<p>Error in mounted hook: "TypeError: Cannot read property 'set' of
undefined"</p>... | <p>You must use <code>window.$cookies</code> or <code>this.$cookies</code> (don't forget the s).</p> | Vue-Cookies: this.$cookies is undefined | cookies|vue.js | 7 | 10,548 | 2 | 53,393,038 | 53,393,038 | 9 | true | 2018-11-20T12:22:26.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vue-Cookies: this.$cookies is undefined<p>In my main component I have:</p>
<pre><code>mounted() {
window.$cookie.set('cookie_name', userName, expiringTi... |
53,356,039 | How do I pass data from scene to scene in phaser 3?<p>I'm making a game in Phaser 3 but I can't seem to find how to pass the score from a GameScene to a GameOverScene.</p> | <p>When calling <code>this.scene.start</code> you can pass optional data to the scene.</p>
<p><a href="https://photonstorm.github.io/phaser3-docs/Phaser.Scenes.SceneManager.html#start__anchor" rel="noreferrer"><code>this.scene.start(key, data)</code></a>, which has <a href="http://labs.phaser.io/edit.html?src=src%5Csc... | How do I pass data from scene to scene in phaser 3? | javascript|phaser-framework | 9 | 6,180 | 1 | 53,358,511 | 53,358,511 | 11 | true | 2018-11-17T22:15:59.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I pass data from scene to scene in phaser 3?<p>I'm making a game in Phaser 3 but I can't seem to find how to pass the score from a GameScene to a Game... |
53,455,197 | how do I add a firewall rule to a gke service?<p>Its not clear to me how to do this.</p>
<p>I create a service for my cluster like this:</p>
<pre><code>kubectl expose deployment my-deployment --type=LoadBalancer --port 8888 --target-port 8888
</code></pre>
<p>And now my service is accessible from the internet on por... | <p><code>loadBalancerSourceRanges</code> seems to work and also updates the dynamically created GCE firewall rules for the service</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: na-server-service
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 80
targetPort: 80
loadBalancerSourceRa... | how do I add a firewall rule to a gke service? | kubernetes|google-cloud-platform|google-kubernetes-engine | 8 | 8,757 | 3 | 53,471,619 | 53,471,619 | 11 | true | 2018-11-24T04:41:39.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how do I add a firewall rule to a gke service?<p>Its not clear to me how to do this.</p>
<p>I create a service for my cluster like this:</p>
<pre><code>kub... |
53,371,363 | Difference between TypeScript optional type and type | undefined<p>I am struggling to understand the difference between having a field defined as <code>string | undefined</code> and <code>string?</code></p>
<p>Our current code uses type definitions like this one:</p>
<pre><code>class Foo {
public bar: string | unde... | <p><code>bar?: string</code> is an optional property, whereas <code>bar: string | undefined</code> is a required one:</p>
<pre><code>interface Foo {
bar?: string
}
interface Foo2 {
bar: string | undefined
}
const foo: Foo = {} // OK
const foo2: Foo2 = {} // error, bar is required
const foo2: Foo2 = {bar: und... | Difference between TypeScript optional type and type | undefined | typescript|typescript-typings|typescript2.0 | 10 | 3,658 | 4 | 53,371,849 | 53,371,849 | 13 | true | 2018-11-19T09:09:40.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Difference between TypeScript optional type and type | undefined<p>I am struggling to understand the difference between having a field defined as <code>strin... |
53,456,798 | Elm: attribute "onerror" adds "data-onerror" attribute instead<p>In Elm I have a simple image, and I want it to be replaced by some 'missing' image onerror. So I added an "onerror" attribute:</p>
<pre><code>img
[ src "broken-link.png"
, attribute "onerror" "this.onerror=null;this.src='missing.png';"
] []
<... | <h1>Why is this?</h1>
<p>This seems to be a built-in undocumented safety feature of Elm.</p>
<p>Checking source code of Elm, <code>Html.attribute</code> is defined as (<a href="https://github.com/elm/html/blob/97f28cb847d816a6684bca3eba21e7dbd705ec4c/src/Html/Attributes.elm#L183" rel="noreferrer">source</a>)</p>
<pr... | Elm: attribute "onerror" adds "data-onerror" attribute instead | elm | 10 | 533 | 2 | 53,457,081 | 53,457,081 | 13 | true | 2018-11-24T09:20:33.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Elm: attribute "onerror" adds "data-onerror" attribute instead<p>In Elm I have a simple image, and I want it to be replaced by some 'missing' image onerror. ... |
53,386,968 | MultiThreading in AWS lambda using Python3<p>I am trying to implement Multithreading in AWS lambda. This is a Sample code that defines the format of my original code which I am trying to execute in lambda.</p>
<pre><code>import threading
import time
def this_will_await(arg,arg2):
print("Hello User")
print(arg,arg... | <p>Have you tried adding <code>timer.join()</code>? You'll need to join the Timer thread because otherwise the Lambda environment will kill off the thread when the parent thread finishes.</p>
<p>This code in a Lambda function:</p>
<pre><code>import threading
import time
def this_will_await(arg,arg2):
print("Hello... | MultiThreading in AWS lambda using Python3 | python|python-3.x|multithreading|amazon-web-services|aws-lambda | 10 | 8,977 | 1 | 53,387,226 | 53,387,226 | 14 | true | 2018-11-20T05:49:50.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MultiThreading in AWS lambda using Python3<p>I am trying to implement Multithreading in AWS lambda. This is a Sample code that defines the format of my origi... |
53,394,562 | Dart: convert Observable to Future and vice-versa?<p>How can I convert a Dart <code>Observable</code> to a <code>Future</code> and vice-versa?</p> | <p>To convert a <code>Observable</code> to a <code>Future</code>:</p>
<ul>
<li><code>myObservable.first</code></li>
<li><code>myObservable.firstWhere</code></li>
</ul>
<p>To convert a <code>Future</code> to an <code>Observable</code>:</p>
<ul>
<li><code>Observable.fromFuture(myFuture)</code></li>
</ul>
<p>Or into a... | Dart: convert Observable to Future and vice-versa? | dart|rxdart | 9 | 3,095 | 1 | 53,394,563 | 53,394,563 | 15 | true | 2018-11-20T13:54:29.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dart: convert Observable to Future and vice-versa?<p>How can I convert a Dart <code>Observable</code> to a <code>Future</code> and vice-versa?</p> |
53,368,828 | Refs for dynamically generated components in React?<p>The code below is a minimal working example to explain my problem. This code generates 3 Note components using Array.map and when you hit enter in them it empties the statically generated Note component above them using a ref to its DOM element. </p>
<p>What I wan... | <p>You need to store a separate ref for all your Note components and then pass back the index of the Note in focus to the handleKeyDown function</p>
<pre><code>import React, { Component } from "react";
import "./App.css";
class App extends Component {
constructor() {
super();
this.notes = [
{ text: "H... | Refs for dynamically generated components in React? | javascript|reactjs|dom|ref | 10 | 13,384 | 1 | 53,368,891 | 53,368,891 | 17 | true | 2018-11-19T05:32:32.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Refs for dynamically generated components in React?<p>The code below is a minimal working example to explain my problem. This code generates 3 Note component... |
53,498,226 | What is the meaning of exclamation and question marks in Jupyter notebook?<p>I would like to know what's the meaning of the following expressions, especially the meaning of <code>!</code> and <code>?</code>, in the following examples, related to querying data in a Pandas DataFrame:</p>
<p><strong>Exclamation mark:</st... | <p>Both of these marks will work in a <strong>Jupyter notebook</strong>.</p>
<p>The exclamation mark <code>!</code> is used for executing commands from the uderlying operating system; here is an example using WIndows <code>dir</code>:</p>
<pre><code>!dir
# result:
Volume in drive C has no label.
Volume Serial Number... | What is the meaning of exclamation and question marks in Jupyter notebook? | python|jupyter-notebook|jupyter | 21 | 10,765 | 1 | 53,498,455 | 53,498,455 | 17 | true | 2018-11-27T11:02:34.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the meaning of exclamation and question marks in Jupyter notebook?<p>I would like to know what's the meaning of the following expressions, especially... |
53,386,522 | Add vim modeline in markdown document<p>I would like to know how to use vim modelines in a Markdown document. Is it possible, or does modelines only recognise certain comment markers?</p>
<p>I have tried using this as the first line of my file:</p>
<pre><code><!-- vim: set ft=markdown -->
</code></pre>
<p>I al... | <p>Your modeline syntax is off. Add a colon at the end, and it will work:</p>
<pre><code><!-- vim: set ft=markdown: -->
</code></pre>
<p>Modeline doesn't care about comment markers. There are two different modeline formats:</p>
<ul>
<li><p><code>[text]{white}{vi:|vim:|ex:}[white]{options}</code></p>
<p>This f... | Add vim modeline in markdown document | vim|markdown | 10 | 1,298 | 2 | 53,386,643 | 53,386,643 | 18 | true | 2018-11-20T05:03:46.390Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add vim modeline in markdown document<p>I would like to know how to use vim modelines in a Markdown document. Is it possible, or does modelines only recognis... |
53,471,992 | Elastic Search total index size<p>I am trying to get the actual size of index (not the store) in elasticsearch. I used the indices API to get the stats. </p>
<pre><code>GET doc/_stats
</code></pre>
<p>Is "indexing"-"index_total" actual index size?</p>
<pre><code>"total": {
"docs": {
"count": 1000000,
... | <p>You can get the all index sizes using this command, showing separately </p>
<pre><code>curl '192.168.x.x:9200/_cat/indices?v'
</code></pre> | Elastic Search total index size | elasticsearch|size|elasticsearch-indices | 13 | 17,457 | 1 | 53,474,532 | 53,474,532 | 19 | true | 2018-11-25T21:06:48.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Elastic Search total index size<p>I am trying to get the actual size of index (not the store) in elasticsearch. I used the indices API to get the stats. </p>... |
53,456,619 | Send a single email to multiple recipients using Mailkit or mimekit<p><em>Please do not mark it as a duplicate question because the solution exists for mail message, not for mailkit.</em></p>
<p>I am trying to send an email to multiple addresses. I tried using the code below but I have not tried using a loop.</p>
<pr... | <p>You can use AddRange method like this.</p>
<pre><code>InternetAddressList list = new InternetAddressList();
list.Add(new MailboxAddress(emailaddress));
list.Add(new MailboxAddress(emailaddress));
list.Add(new MailboxAddress(emailaddress));
var message = new MimeMessage();
message.From.Add(new MailboxAddress("CU... | Send a single email to multiple recipients using Mailkit or mimekit | c#|asp.net-mvc|email|mailkit|mime-message | 8 | 12,351 | 1 | 53,456,926 | 53,456,926 | 23 | true | 2018-11-24T08:51:10.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Send a single email to multiple recipients using Mailkit or mimekit<p><em>Please do not mark it as a duplicate question because the solution exists for mail ... |
53,399,058 | Reactive Spring does not support ServerHttpRequest as parameter in REST endpoint tests?<p>The question is very similar to <a href="https://stackoverflow.com/questions/40361298/reactive-spring-does-not-support-httpservletrequest-as-parameter-in-rest-endpoin">this one</a>. Except the fact that I use:</p>
<ol>
<li><code>... | <p>You've imported the wrong class:</p>
<ul>
<li><code>org.springframework.http.server.ServerHttpRequest</code> is for Spring MVC</li>
<li><code>org.springframework.http.server.reactive.ServerHttpRequest</code> is for Spring WebFlux</li>
</ul> | Reactive Spring does not support ServerHttpRequest as parameter in REST endpoint tests? | java|spring|spring-webflux|project-reactor | 9 | 10,265 | 1 | 53,401,122 | 53,401,122 | 25 | true | 2018-11-20T18:12:12.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reactive Spring does not support ServerHttpRequest as parameter in REST endpoint tests?<p>The question is very similar to <a href="https://stackoverflow.com/... |
53,448,538 | Xcode 10 and super.tearDown<p>Since Xcode 10.1(maybe 10) when I create a Unit test file I don't have calls super.tearDown() and super.setUp() .</p>
<p>I've not seen such changes in release notes.</p>
<p>In documentation <a href="https://developer.apple.com/documentation/xctest/xctestcase/understanding_setup_and_teard... | <p>For a direct subclass of XCTestCase, there never was any change of behavior for not calling <code>super.setUp()</code>. That's because <code>setUp</code> and <code>tearDown</code> are template methods with empty implementations at the top level.</p>
<p>Though there's no change in behavior, omitting the calls to <co... | Xcode 10 and super.tearDown | xcode|xctest|teardown | 11 | 2,628 | 1 | 53,455,661 | 53,455,661 | 26 | true | 2018-11-23T14:30:28.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Xcode 10 and super.tearDown<p>Since Xcode 10.1(maybe 10) when I create a Unit test file I don't have calls super.tearDown() and super.setUp() .</p>
<p>I've ... |
53,483,315 | Why does Postman show "Bad String" in this body of POST request<p>As i was testing POST request on Postman with details shown in image. I am getting error when i Send this request.</p>
<blockquote>
<p>{
"FaultId": "Invalid post data, please correct the request",
"fault": "FAULT_INVALID_POST_REQUEST"
}<... | <p>Looks like the quote marks are not correct, maybe from copy and pasting from a specifically formatted document or syntax may be wrong.</p>
<p>Try removing/replacing manually or using this:</p>
<pre><code>{
"FirstName": "blah",
"LastName": "blah",
"UserName": "blah",
"Password": "blah",
"Email":... | Why does Postman show "Bad String" in this body of POST request | json|post|postman | 15 | 19,206 | 1 | 53,483,522 | 53,483,522 | 29 | true | 2018-11-26T14:31:49.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does Postman show "Bad String" in this body of POST request<p>As i was testing POST request on Postman with details shown in image. I am getting error wh... |
53,399,520 | Angular 2+ theme button colors not working<p>I have a stackblitz example <a href="https://stackblitz.com/edit/angular-zdzuv9" rel="noreferrer">here</a>
that I believe is set up following the <a href="https://material.angular.io/guide/theming" rel="noreferrer">Angular theming documentation</a>, and yet the colors in the... | <p>All you forgot here was to import <code>MatButtonModule</code> like:</p>
<pre><code>import {MatButtonModule} from '@angular/material/button';
</code></pre>
<p>and then off-course in import array</p>
<pre><code>imports: [ BrowserModule, FormsModule, MatButtonModule ]
</code></pre>
<p>in your <code>app.module.ts</code... | Angular 2+ theme button colors not working | angular|themes | 9 | 11,315 | 5 | 53,469,515 | 53,469,515 | 31 | true | 2018-11-20T18:43:50.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular 2+ theme button colors not working<p>I have a stackblitz example <a href="https://stackblitz.com/edit/angular-zdzuv9" rel="noreferrer">here</a>
that ... |
53,485,708 | How the write(), read() and getvalue() methods of Python io.BytesIO work?<p>I'm trying to understand the <strong>write()</strong> and <strong>read()</strong> methods of <strong>io.BytesIO</strong>.
My understanding was that I could use the <strong>io.BytesIO</strong> as I would use a File
object.</p>
<pre><code>impor... | <p>The issue is that you are positioned at the end of the stream. Think of the position like a cursor. Once you have written <code>b' world'</code>, your cursor is at the end of the stream. When you try to <code>.read()</code>, you are reading everything after the position of the cursor - which is nothing, so you get t... | How the write(), read() and getvalue() methods of Python io.BytesIO work? | python|bytesio | 32 | 26,639 | 3 | 53,485,819 | 53,485,819 | 32 | true | 2018-11-26T16:53:56.147Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How the write(), read() and getvalue() methods of Python io.BytesIO work?<p>I'm trying to understand the <strong>write()</strong> and <strong>read()</strong>... |
53,426,322 | What is the shortcut key to comment multiple lines using PyCharm IDE?<p>In Corey Schafer's <em><a href="https://youtu.be/5qQQ3yzbKp8" rel="nofollow noreferrer">Programming Terms: Mutable vs Immutable</a></em>, at <a href="https://youtu.be/5qQQ3yzbKp8?t=186" rel="nofollow noreferrer">3:06</a>, he selected multiple lines... | <p>This is a setting you can change and define in "Settings".</p>
<p>The default is with <kbd>Ctrl</kbd>+<kbd>/</kbd> for Windows, or <kbd>Cmd</kbd>+<kbd>/</kbd> for Mac.</p> | What is the shortcut key to comment multiple lines using PyCharm IDE? | python|pycharm|comments | 15 | 54,308 | 3 | 53,426,371 | 53,426,371 | 36 | true | 2018-11-22T08:03:48.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the shortcut key to comment multiple lines using PyCharm IDE?<p>In Corey Schafer's <em><a href="https://youtu.be/5qQQ3yzbKp8" rel="nofollow noreferre... |
53,415,751 | Count occurences of True/False in column of dataframe<p>Is there a way to count the number of occurrences of boolean values in a column without having to loop through the DataFrame?</p>
<p>Doing something like </p>
<pre><code>df[df["boolean_column"]==False]["boolean_column"].sum()
</code></pre>
<p>Will not work beca... | <p>Use <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.value_counts.html" rel="noreferrer"><code>pd.Series.value_counts()</code></a>:</p>
<pre><code>>> df = pd.DataFrame({'boolean_column': [True, False, True, False, True]})
>> df['boolean_column'].value_counts()
True 3
Fal... | Count occurences of True/False in column of dataframe | python|pandas|boolean|counter|series | 17 | 52,026 | 8 | 53,415,824 | 53,415,824 | 40 | true | 2018-11-21T15:48:27.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Count occurences of True/False in column of dataframe<p>Is there a way to count the number of occurrences of boolean values in a column without having to loo... |
53,376,518 | dart JSON String convert to List String<p>I have an API that calls the json String array as follows:</p>
<pre><code>[
"006.01.01",
"006.01.01 1090",
"006.01.01 1090 1090.950",
"006.01.01 1090 1090.950 052",
"006.01.01 1090 1090.950 052 A",
"006.01.01 1090 1090.950 052 A 521219",
"006.01.01 1090 1090.950 ... | <p>The result of parsing a JSON list is a <code>List<dynamic></code>. The return type of <code>jsonDecode</code> is just <code>dynamic</code>.</p>
<p>You can cast such a list to a <code>List<String></code> as</p>
<pre><code>List<String> stringList = (jsonDecode(input) as List<dynamic>).cast<... | dart JSON String convert to List String | dart|flutter | 18 | 31,771 | 3 | 53,387,975 | 53,387,975 | 51 | true | 2018-11-19T14:15:13.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
dart JSON String convert to List String<p>I have an API that calls the json String array as follows:</p>
<pre><code>[
"006.01.01",
"006.01.01 1090",
"... |
53,442,802 | How to find a specific element in array from an array<p>I am struggling with add one entry in history value from sampledata </p>
<pre><code> let sampledata = [
{
headerKey: "FirstName",
value: "Dave",
}, {
headerKey: "LastName",
value: "K",
}]
// add here in history valu... | <p>You can use a <code>forEach()</code> loop and inside that find the existing object in <code>addHere</code> array to get the object that matches the <code>headerKey</code> and then update the <code>historyValue</code> array:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel=... | How to find a specific element in array from an array | javascript|angular | -3 | 54 | 1 | 53,442,858 | 53,442,858 | 0 | true | 2018-11-23T08:09:51.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find a specific element in array from an array<p>I am struggling with add one entry in history value from sampledata </p>
<pre><code> let sampledata... |
53,409,442 | Build system on Linux that doesn't rely on make<p>In GNU/Linux the use of GNU <code>make</code> and Makefiles is very common but not entirely satisfying. I am aware of tools like <code>autotools</code> and <code>CMake</code> but ultimately they still generates a Makefile, (in the case of <code>CMake</code>)at least on ... | <p>I don't get your point about cmake. There is <a href="https://ninja-build.org/" rel="nofollow noreferrer">ninja</a>, it is commonly used with cmake. CMake has multiple generators, make just being the most commonly used. More about it maybe in <a href="https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html"... | Build system on Linux that doesn't rely on make | linux|build|gnu-make | -3 | 43 | 1 | 53,409,577 | 53,409,577 | 1 | true | 2018-11-21T09:57:21.767Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Build system on Linux that doesn't rely on make<p>In GNU/Linux the use of GNU <code>make</code> and Makefiles is very common but not entirely satisfying. I a... |
53,473,096 | how to create a simple image test<p>I want to create a test image like the following image for my propose in <code>matlab</code>. but I have no idea how to make this. </p>
<p><a href="https://i.stack.imgur.com/wPyhG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wPyhG.png" alt="enter image descript... | <pre><code>a1= 256; b1= 256; %% big square size
a2 = 200;b2 = 200; %% small square size
r = a1/4; %% cicle radius
shape1 = zeros(a1,b1);
shape2 = rgb2gray(insertShape(shape1,'FilledRectangle',[0.5*(a1-a2) 0.5*(b1-b2) a2 b2],'Opacity',0.5));
shape3 = rgb2gray(insertShape(shape2,'FilledCircle',[a1/2 b1/2 r],'Opacity',1)... | how to create a simple image test | matlab|image-processing | -3 | 46 | 1 | 53,473,442 | 53,473,442 | 1 | true | 2018-11-25T23:37:38.450Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to create a simple image test<p>I want to create a test image like the following image for my propose in <code>matlab</code>. but I have no idea how to m... |
53,369,647 | Testing Failed when build using Xcode build command or appium<p>I am using :</p>
<pre><code>Xcode 10.1
Os Version : 12.1
iPhone 6
</code></pre>
<p>I did follow all required steps to setup build and everything but still getting error when try to build project using xcode build.</p>
<p>I am confuse between 2 thing tha... | <p>I was able to resolve issue by following steps :</p>
<ol>
<li><p>Uninstalled following : </p>
<p>Xcode,Appium,Xcode command line,ideviceinstaller,carthage,xpretty,deviceconsole</p></li>
<li><p>Reinstalled everything as per this video guide : <a href="https://youtu.be/ySglJIrDVMQ" rel="nofollow noreferrer">https://... | Testing Failed when build using Xcode build command or appium | appium|appium-ios | 7 | 6,972 | 2 | 53,496,650 | 53,496,650 | 1 | true | 2018-11-19T06:53:25.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Testing Failed when build using Xcode build command or appium<p>I am using :</p>
<pre><code>Xcode 10.1
Os Version : 12.1
iPhone 6
</code></pre>
<p>I did fo... |
53,371,880 | terminal find file with latest patch number<p>I have a folder with a lot of patch files with pattern</p>
<pre><code>1.1.hotfix1
1.2.hotfix2
2.1.hotfix1
2.1.hotfix2 ...etc
</code></pre>
<p>and I have to find out the latest patch(<code>2.1.hotfix2</code> should be the result of the example) with a bash</p>
<p>how can... | <p>Reverse order all files by time and print the first line.</p>
<p>In case you have some other files then you can print files having hotfix text only. </p>
<pre><code>ls -t1 *hotfix* | head -n 1
</code></pre> | terminal find file with latest patch number | bash|shell|command-line | -3 | 45 | 2 | 53,372,136 | 53,372,136 | 2 | true | 2018-11-19T09:42:28.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
terminal find file with latest patch number<p>I have a folder with a lot of patch files with pattern</p>
<pre><code>1.1.hotfix1
1.2.hotfix2
2.1.hotfix1
2.1... |
53,384,757 | How to make maven use credentials when executing dependency plugin from command line<p>I have a private Maven repository. It's defined in pom.xml of the project</p>
<pre><code> <repository>
<id>some.id</id>
<url>https://some.host/artifactory/some.id</url>
</repos... | <p>It doesn't look like the plugin is using the saved credentials when <code>remoteRepositories</code> property is used. Testing using <code>repositoryId</code> instead worked as expected for me.</p>
<pre><code>mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:get -DrepositoryId=some.id -Dartifact=groupId:art... | How to make maven use credentials when executing dependency plugin from command line | maven|maven-dependency-plugin | 7 | 12,345 | 1 | 53,385,997 | 53,385,997 | 4 | true | 2018-11-20T00:58:10.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make maven use credentials when executing dependency plugin from command line<p>I have a private Maven repository. It's defined in pom.xml of the proj... |
53,432,524 | All declarations of 'stream' must have identical modifiers api-ai-javascript - Dialogflow<p>I am trying to integrate Dialogflow in Angular 7. I am getting this error.</p>
<pre><code> ** Angular Live Development Server is listening on localhost:4200,
open your browser on http://localhost:4200/ **
Date: 2018-11-22T13... | <p>For temporary solution to this, I have added the following check in your tsconfig.json file</p>
<pre><code> "compilerOptions": {
"skipLibCheck": true
}
</code></pre> | All declarations of 'stream' must have identical modifiers api-ai-javascript - Dialogflow | angular|dialogflow-es|angular7 | 7 | 3,345 | 3 | 53,476,375 | 53,476,375 | 4 | true | 2018-11-22T13:54:21.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
All declarations of 'stream' must have identical modifiers api-ai-javascript - Dialogflow<p>I am trying to integrate Dialogflow in Angular 7. I am getting th... |
53,487,916 | Why is ApproximateAgeOfOldestMessage in SQS not bigger than approx 5 mins<p>I am utilising spring cloud aws messaging (<code>2.0.1.RELEASE</code>) in java to consume from an SQS queue. If it's relevant we use default settings, java 10 and spring cloud <code>Finchley.SR2</code>,</p>
<p>We recently had an issue where a ... | <p>Based on a <a href="https://forums.aws.amazon.com/thread.jspa?messageID=820342&tstart=0" rel="noreferrer">similar question on AWS forums</a>, this is apparently a bug with regular SQS queues where only a single message is affected. </p>
<p>In order to have a useful alarm for this issue, I would suggest setting ... | Why is ApproximateAgeOfOldestMessage in SQS not bigger than approx 5 mins | amazon-sqs|amazon-cloudwatch | 7 | 11,037 | 2 | 53,490,897 | 53,490,897 | 5 | true | 2018-11-26T19:40:50.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is ApproximateAgeOfOldestMessage in SQS not bigger than approx 5 mins<p>I am utilising spring cloud aws messaging (<code>2.0.1.RELEASE</code>) in java to... |
53,429,942 | How can set the base path of ASP.NET Core app whilst disabling access from the root path?<p>I know I can set the base path of my service using <code>app.UsePathBase("/AppPath");</code> so that my API is available from <code>http://example.com/AppPath/controller1</code> but if I do this my API is also availabl... | <p>That's by design <a href="https://github.com/aspnet/HttpAbstractions/issues/893" rel="nofollow noreferrer">according to this Github issue</a>.</p>
<blockquote>
<p>UsePathBase is primarily about getting those segments out of your way because they're a deployment detail, and if they stayed it would mess up your routin... | How can set the base path of ASP.NET Core app whilst disabling access from the root path? | asp.net-core | 9 | 12,062 | 1 | 53,430,232 | 53,430,232 | 6 | true | 2018-11-22T11:26:52.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can set the base path of ASP.NET Core app whilst disabling access from the root path?<p>I know I can set the base path of my service using <code>app.UseP... |
53,358,651 | ReactJS - Preferred convention for prop naming<p>I wonder what is preferred prop naming convention by ReactJS community ?</p>
<p><code><TodoList todos={todos} onRemoveTodo={removeTodo} onCheckTodo={checkTodo} /></code></p>
<p>or</p>
<p><code><TodoList items={todos} onRemoveItem={removeTodo} onCheckItem={che... | <p>I don't think there is an iron-clad convention for naming props. You can look at the following articles:</p>
<ul>
<li><a href="https://dlinau.wordpress.com/2016/02/22/how-to-name-props-for-react-components/" rel="nofollow noreferrer">How to name props for React components</a></li>
<li><a href="https://hackernoon.com... | ReactJS - Preferred convention for prop naming | javascript|reactjs|naming-conventions|naming | 8 | 12,556 | 3 | 53,358,734 | 53,358,734 | 7 | true | 2018-11-18T07:06:53.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ReactJS - Preferred convention for prop naming<p>I wonder what is preferred prop naming convention by ReactJS community ?</p>
<p><code><TodoList todos={t... |
53,401,053 | Is there .all() or .any() equivalent in python Tensorflow<p>Trying to find a similar operation to <code>.any()</code>, <code>.all()</code> methods that will work on a tensor. Here is a scenario:</p>
<pre><code>a = tf.Variable([True, False, True], dtype=tf.bool)
# this is how I do it right now
has_true = a.reduce_sum(... | <p>There are <a href="https://www.tensorflow.org/api_docs/python/tf/math/reduce_any" rel="nofollow noreferrer"><code>tf.reduce_any</code></a> and <a href="https://www.tensorflow.org/api_docs/python/tf/math/reduce_all" rel="nofollow noreferrer"><code>tf.reduce_all</code></a> methods:</p>
<pre><code>sess = tf.Session()
... | Is there .all() or .any() equivalent in python Tensorflow | python|tensorflow | 7 | 2,617 | 1 | 53,401,140 | 53,401,140 | 7 | true | 2018-11-20T20:31:26.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there .all() or .any() equivalent in python Tensorflow<p>Trying to find a similar operation to <code>.any()</code>, <code>.all()</code> methods that will ... |
53,420,087 | Passing terraform variable values from .tfvars file in the project folders to the module<p>The following is my folder structure of my terraform project for AWS:</p>
<pre><code>c:\terraform
├─modules
│ └─ec2-fullstacks
│ ├─main.tf
│ └─variables.tf
└─qa
└─testappapi
├─testa... | <p>You have created a module in <code>c:\terraform\modules\ec2-fullstacks\main.tf</code> with following mandatory variables</p>
<pre><code>variable "ec2_ami_name" {}
variable "aws_account_name" {}
variable "aws_region" {}
</code></pre>
<p>So while referring this module terraform expects you to pass these mandatory p... | Passing terraform variable values from .tfvars file in the project folders to the module | variables|module|terraform|terraform-provider-aws | 7 | 6,713 | 1 | 53,427,168 | 53,427,168 | 8 | true | 2018-11-21T20:33:56.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Passing terraform variable values from .tfvars file in the project folders to the module<p>The following is my folder structure of my terraform project for A... |
53,374,946 | What is the difference between React component instance property and state property?<p>Consider the below example</p>
<pre><code>class MyApp extends Component {
counter = 0;
state = {
counter: 0
};
incrementCounter() {
this.counter = this.counter + 1;
this.setState({
... | <p><code>state</code> and <code>instance properties</code> serve different purposes. While calling setState with empty arguments will cause a render and will reflect the updated instance properties, state can be used for many more features like
comparing <code>prevState</code> and <code>currentState</code> in shouldCom... | What is the difference between React component instance property and state property? | javascript|reactjs | 11 | 2,597 | 2 | 53,375,107 | 53,375,107 | 11 | true | 2018-11-19T12:45:35.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the difference between React component instance property and state property?<p>Consider the below example</p>
<pre><code>class MyApp extends Compone... |
53,356,871 | Count data divided by year and by region in R<p>I have a very large (too big to open in Excel) biological dataset that looks something like this </p>
<pre><code> year <- c(1990, 1980, 1985, 1980, 1990, 1990, 1980, 1985, 1985,1990,
1980, 1985, 1980, 1990, 1990, 1980, 1985, 1985,
1990,... | <p>Something like this?</p>
<pre><code>library(dplyr)
df2 <- df %>%
mutate(sp_year = paste(species, year, sep = "_")) %>%
group_by(region) %>%
count(sp_year) %>%
spread(sp_year,n)
df2
</code></pre>
<p>Which gives this:</p>
<pre><code># A tibble: 3 x 10
# Groups: region [3]
region A_19... | Count data divided by year and by region in R | r|grouping|tidyverse|data-management | 10 | 295 | 2 | 53,356,978 | 53,356,978 | 12 | true | 2018-11-18T00:34:54.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Count data divided by year and by region in R<p>I have a very large (too big to open in Excel) biological dataset that looks something like this </p>
<pre><... |
53,371,505 | access logs in cron jobs kubernetes<p>im running cron job in kubernetes, jobs completes successfully and i log output to log file inside(path: storage/logs) but i cannot access that file due to container is in completed here is my job yaml. </p>
<pre><code>apiVersion: v1
items:
- apiVersion: batch/v1beta1
kind: Cr... | <p>I guess you know that the pod is kept around as you have <code>successfulJobsHistoryLimit: 3</code>. Presumably your point is that your logging is going logged to a file and not stdout and so you don't see it with <code>kubectl logs</code>. If so maybe you could also log to stdout or put something into the job to lo... | access logs in cron jobs kubernetes | kubernetes|kubernetes-cronjob | 22 | 40,994 | 2 | 53,372,214 | 53,372,214 | 12 | true | 2018-11-19T09:18:52.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
access logs in cron jobs kubernetes<p>im running cron job in kubernetes, jobs completes successfully and i log output to log file inside(path: storage/logs) ... |
53,410,748 | change column value based on multiple conditions<p>I've seen a lot of posts similar but none seem to answer this question:</p>
<p>I have a data frame with multiple columns. Lets say A, B and C</p>
<p>I want to change column A's value based on conditions on A, B and C</p>
<p>I've got this so far but not working.</p>
... | <p>You are really close, assign value <code>Matt</code> to filtered <code>A</code> by boolean masks:</p>
<pre><code>df.loc[(df['A']=='Harry') & (df['B']=='George') & (df['C']>'2019'),'A'] = 'Matt'
</code></pre> | change column value based on multiple conditions | pandas | 9 | 7,448 | 2 | 53,410,785 | 53,410,785 | 14 | true | 2018-11-21T11:05:18.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
change column value based on multiple conditions<p>I've seen a lot of posts similar but none seem to answer this question:</p>
<p>I have a data frame with m... |
53,436,370 | Elm: How to merge two dictionaries?<p>I have two dictionaries, and their values incidcate type effectiveness of a Pokémon attack. Now I want to combine these to have the combined effectiveness.</p>
<p>So for instance, one dictionary has:</p>
<pre><code> normal -> 0.5
fire -> 2
</code></pre>
<p>The other has:<... | <p>The signature might be confusing you because it isn't restricted to merging into a new <code>Dict</code>, but could merge into a list of key-value pairs instead, for example. When reading the signature in your case you can replace <code>result</code> with <code>Dict comparable c</code>. or even use <code>Int</code> ... | Elm: How to merge two dictionaries? | dictionary|elm | 8 | 820 | 1 | 53,436,552 | 53,436,552 | 14 | true | 2018-11-22T18:16:55.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Elm: How to merge two dictionaries?<p>I have two dictionaries, and their values incidcate type effectiveness of a Pokémon attack. Now I want to combine these... |
53,416,529 | React: import csv file and parse<p>I have the following csv file that is named <code>data.csv</code> and located in the same folder as my js controller:</p>
<pre><code>namn,vecka,måndag,tisdag,onsdag,torsdag,fredag,lördag,söndag
Row01,a,a1,a2,a3,a4,a5,a6,a7
Row02,b,b1,b2,b3,b4,b5,b6,b7
Row03,c,c1,c2,c3,c4,c5,c6,c7
Row... | <p>To answer my own question, I was able to rewrite it like this (<code>/src/controllers/data-controller/data-controller.js</code>, added the full code for better clarity):</p>
<pre><code>import React from 'react';
import Papa from 'papaparse';
import {withRouter} from 'react-router-dom';
class DataController extends... | React: import csv file and parse | javascript|reactjs|csv|parsing|import | 14 | 44,606 | 2 | 53,421,129 | 53,421,129 | 20 | true | 2018-11-21T16:29:14.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React: import csv file and parse<p>I have the following csv file that is named <code>data.csv</code> and located in the same folder as my js controller:</p>
... |
53,492,538 | Why does a property inherited from an interface become virtual?<p>Say I have one interface and two classes, and one of the classes implement this interface:</p>
<pre><code>interface IAAA
{
int F1 { get; set; }
}
class AAA1
{
public int F1 { get; set; }
public int F2 { get; set; }
}
class AAA2 : IAAA
{
... | <p>As from <a href="https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase.isvirtual?view=netframework-4.7.2#remarks" rel="noreferrer">remarks section of MS docs</a>:</p>
<blockquote>
<p>A virtual member may reference instance data in a class and must be referenced through an instance of the class.... | Why does a property inherited from an interface become virtual? | c#|reflection | 41 | 1,089 | 1 | 53,492,618 | 53,492,618 | 35 | true | 2018-11-27T03:58:56.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does a property inherited from an interface become virtual?<p>Say I have one interface and two classes, and one of the classes implement this interface:<... |
53,431,249 | OpenCV Python - can I transform this simple code into a GUI application using Opencv methods and classes alone?<p>Bascially, I have the mouse_match opencv code that takes a directory path as an argument, loops over the images in the directory, then lets the user select -by mouse- a portion of an image, then performs te... | <p><a href="https://github.com/MikeTheWatchGuy/PySimpleGUI/blob/master/YoloObjectDetection/yolo_video_with_webcam.py" rel="nofollow noreferrer">Here is a program</a> that integrates openCV with a GUI. It identifies and labels objects using YOLO.</p>
<p>You will need to install PySimpleGUI for the GUI portion. It uti... | OpenCV Python - can I transform this simple code into a GUI application using Opencv methods and classes alone? | python | -3 | 533 | 1 | 53,434,828 | 53,434,828 | 0 | true | 2018-11-22T12:39:37.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OpenCV Python - can I transform this simple code into a GUI application using Opencv methods and classes alone?<p>Bascially, I have the mouse_match opencv co... |
53,362,145 | How do i print the time to this format 23:44:22.184320<p>How do i print the time to this format?</p>
<pre><code>23:44:22.184320
</code></pre>
<p>What I have tried is</p>
<pre><code>func main() {
// Which will print to the current time
fmt.Println(time.Now())
// How do I convert to
// 23:44:22.184320
}
<... | <p>Use this instead:</p>
<pre><code>time.Now().Format("15:04:05.999999")
</code></pre>
<p>Note that the time layout for the <code>time</code> package is:</p>
<pre><code>Mon Jan 2 15:04:05 MST 2006
</code></pre>
<p><a href="https://golang.org/pkg/time/#pkg-constants" rel="nofollow noreferrer">time package</a></p> | How do i print the time to this format 23:44:22.184320 | go | -3 | 32 | 1 | 53,362,206 | 53,362,206 | 2 | true | 2018-11-18T14:50:10.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do i print the time to this format 23:44:22.184320<p>How do i print the time to this format?</p>
<pre><code>23:44:22.184320
</code></pre>
<p>What I hav... |
53,473,935 | Automatically generating items for a listview<p>I have a listview which displays arrays from the arrays.xml in a list. The problem is, instead of reading it from xml, I want it to automatically create items from an int. For example if the int is 10, then it should create 10 list items- chapter 1, chapter 2, ... chapter... | <p>Then you should populate the list manually.</p>
<pre><code>int count = x;
String[] array = new String[count];
for(int i = 0; i < count; i++){
array[i] = ("Chapter " + (i + 1));
}
</code></pre> | Automatically generating items for a listview | android|listview | -3 | 61 | 2 | 53,474,023 | 53,474,023 | 2 | true | 2018-11-26T02:09:59.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Automatically generating items for a listview<p>I have a listview which displays arrays from the arrays.xml in a list. The problem is, instead of reading it ... |
53,355,578 | How to delete gitlab CI jobs pipelines logs/builds and history<p>How can we configure gitlab to keep only the last 10 CI jobs/builds and keep deleting the rest? </p>
<p>For example , in Jenkins , we can configure the job to keep only last X builds.</p> | <p>I think Gitlab doesn't support this feature. But you can create this functionality on your own using Gitlab API and webhooks.</p>
<p>When you push to repo (and pipeline started) it will trigger webhook which can read your CI history via API => you can delete whatever you want.</p>
<p>Here is docs for <a href="http... | How to delete gitlab CI jobs pipelines logs/builds and history | gitlab|gitlab-ci|gitlab-ci-runner | 41 | 69,679 | 11 | 53,376,533 | 53,376,533 | 4 | true | 2018-11-17T21:05:36.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to delete gitlab CI jobs pipelines logs/builds and history<p>How can we configure gitlab to keep only the last 10 CI jobs/builds and keep deleting the re... |
53,389,150 | What if all resources are placed in one resolution for android app bundle<p>As we all know that Google launch new feature of distributing android apk using android-app-bundle that has so many advantages.</p>
<p>So my question is, how my app will behave if I place all the images/resources in single folder like drawable... | <p>Your app will work the same as before: Play serves to a given device the files that the Android platform would have loaded if it had served the APK with all the files.</p>
<p>In other words, if an mdpi device would have loaded the resource <code>res/drawable-xxxhdpi/icon.png</code>, then that's what Play will serve... | What if all resources are placed in one resolution for android app bundle | android|android-app-bundle | 9 | 807 | 3 | 53,390,199 | 53,390,199 | 5 | true | 2018-11-20T08:43:26.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What if all resources are placed in one resolution for android app bundle<p>As we all know that Google launch new feature of distributing android apk using a... |
53,491,613 | GUITexture is deprecated, so what should I use instead of it?<p>I'm currently experiencing an issue with updated coding in C#. I'm working out of a textbook "3.x Game Development Essentials", and am currently attempting to make an array that will have textures assigned to it which will show the progression of a battery... | <p><code>GUITexture</code> is indeed <strong>deprecated</strong> just like <a href="https://stackoverflow.com/questions/47447542/guitext-is-deprecated-so-what-should-i-use-instead-of-it">GUIText </a>. Since your <code>hudCharge</code> variable is a type of <code>Texture2D</code>, make <code>chargeHudGUI</code> to be t... | GUITexture is deprecated, so what should I use instead of it? | c#|visual-studio|user-interface|unity3d|guitexture | 9 | 11,042 | 2 | 53,491,832 | 53,491,832 | 8 | true | 2018-11-27T01:48:18.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GUITexture is deprecated, so what should I use instead of it?<p>I'm currently experiencing an issue with updated coding in C#. I'm working out of a textbook ... |
53,369,784 | Collapsible accordion in angular<p>I am making accordion to make a collapsible div using javascript in angular application..</p>
<p>For which if its not getting open on click over the button on <code>Parent One</code> or any other parent name..</p>
<p><strong>Html</strong>:</p>
<pre><code><div *ngFor="let item of... | <p>Keep your function in <code>ngAfterViewInit</code> instead of <code>ngOnInit</code>. See updated <a href="https://stackblitz.com/edit/angular-dzmnvj?file=src/app/app.component.ts" rel="noreferrer">stackblitz</a></p>
<p>The problem is that on ngOnInit the view is not completely painted, and you do not get all the el... | Collapsible accordion in angular | javascript|html|angular|typescript|accordion | 7 | 32,002 | 2 | 53,369,870 | 53,369,870 | 9 | true | 2018-11-19T07:05:25.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Collapsible accordion in angular<p>I am making accordion to make a collapsible div using javascript in angular application..</p>
<p>For which if its not get... |
53,475,177 | Monitoring Locks with Java Flight Recorder and Java Mission Control<h1>What I want to do</h1>
<p>I have a Java program which I am trying to improve. I suspect synchronized blocks within the code to hurt performance but I would like to make sure this is my problem before touching my code. </p>
<h1>How I went on about ... | <p>A liitle more research on my own provided me with the answer. </p>
<p>The JavaMonitorEnter events (and other events that one would like to monitor) need to be specified in a flight recorder configuration file. In this situation, I was using the <code>profile</code> configuration which is provided along with the <co... | Monitoring Locks with Java Flight Recorder and Java Mission Control | java|java-8|jmc|jfr|java-mission-control | 12 | 1,037 | 1 | 53,476,699 | 53,476,699 | 9 | true | 2018-11-26T05:26:50.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Monitoring Locks with Java Flight Recorder and Java Mission Control<h1>What I want to do</h1>
<p>I have a Java program which I am trying to improve. I suspe... |
53,395,800 | Does creating an instance of a child class create an instance of the parent class?<p>I'm new to C#, and I wanted to know, that if I create an instance of a child class, does it also automatically create an instance of the parent class or what?</p>
<p>Here is my code:</p>
<pre><code>class Program
{
public class P... | <p>No it doesn't but it calls the base constructor (the constructor of the parent class). Which in your case is empty, so the call to the base class constructor is done for you by the compiler:</p>
<pre><code>class Program
{
public class ParentClass
{
public ParentClass()
{
Console.... | Does creating an instance of a child class create an instance of the parent class? | c#|.net | 28 | 6,718 | 8 | 53,395,880 | 53,395,880 | 10 | true | 2018-11-20T15:01:00.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does creating an instance of a child class create an instance of the parent class?<p>I'm new to C#, and I wanted to know, that if I create an instance of a c... |
53,414,287 | Import hooks into React Typescript<p>I am trying to implement hooks into a React (^16.6.0) application using TypeScript</p>
<pre><code>import * as React, {useState} from 'react';
</code></pre>
<p>Any idea what is the right syntax for this import?</p> | <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import" rel="noreferrer"><code>import</code></a> supports a limited set of syntax variations.</p>
<p>It can be:</p>
<pre><code>import React, {useState} from 'react';
</code></pre>
<p>The downside is that entire library is impor... | Import hooks into React Typescript | reactjs|react-hooks | 11 | 10,558 | 2 | 53,414,751 | 53,414,751 | 13 | true | 2018-11-21T14:29:03.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Import hooks into React Typescript<p>I am trying to implement hooks into a React (^16.6.0) application using TypeScript</p>
<pre><code>import * as React, {u... |
53,358,893 | Elixir: Difference between Supervisor, GenServer and Application<p>I was practicing with this example.<br>
<a href="https://github.com/kwmiebach/how-to-elixir-supervisor" rel="noreferrer">https://github.com/kwmiebach/how-to-elixir-supervisor</a></p>
<p>I followed the instruction and got the idea of how it works, but I... | <p>First of all, these are all "OTP Design Principles" (and supported with a standard library), they are all wrappers (or better put, abstractions) on top of basic Erlang primitives like processes. This means they are <em>not</em> the only way to program in Erlang (hence Elixir), but they're shared by the community and... | Elixir: Difference between Supervisor, GenServer and Application | elixir|erlang-supervisor | 11 | 1,355 | 1 | 53,361,008 | 53,361,008 | 14 | true | 2018-11-18T07:52:05.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Elixir: Difference between Supervisor, GenServer and Application<p>I was practicing with this example.<br>
<a href="https://github.com/kwmiebach/how-to-elixi... |
53,406,505 | Azure SQL Login Denied, error 18456 state 113<p>We have an Azure SQL server. From some machines in our Azure subscription we cannot connect to our SQL server, but from other machines it's fine. From machines outside of Azure we have no issues at all.</p>
<p>The error thrown is</p>
<pre><code>Login failed for user 'SQ... | <p>After a support call with Microsoft, they confirmed that Error 113 is a temporary firewall ban of the connections IP address.</p>
<p>We had a process that had an invalid password configured, and it got enough attempts wrong that the IP address got on a ban list. It kept retrying, so it stayed on the ban list. Every... | Azure SQL Login Denied, error 18456 state 113 | azure-sql-server | 10 | 2,118 | 1 | 53,406,506 | 53,406,506 | 15 | true | 2018-11-21T06:40:02.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure SQL Login Denied, error 18456 state 113<p>We have an Azure SQL server. From some machines in our Azure subscription we cannot connect to our SQL server... |
53,426,069 | Getting User Data by using Guards (Roles, JWT)<p>The documentation is kinda thin here so I ran into a problem. I try to use Guards to secure Controller or it's Actions, so I gonna ask for the role of authenticated requests (by JWT). In my auth.guard.ts I ask for "request.user" but it's empty, so I can't check the users... | <p>Additionally to your <code>RolesGuard</code> you need to use an <code>AuthGuard</code>.</p>
<h3>Standard</h3>
<p>You can use the standard <code>AuthGuard</code> implementation which attaches the user object to the request. It throws a 401 error, when the user is unauthenticated.</p>
<pre><code>@UseGuards(AuthGuar... | Getting User Data by using Guards (Roles, JWT) | javascript|node.js|typescript|nestjs | 22 | 19,741 | 4 | 53,429,786 | 53,429,786 | 16 | true | 2018-11-22T07:44:05.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting User Data by using Guards (Roles, JWT)<p>The documentation is kinda thin here so I ran into a problem. I try to use Guards to secure Controller or it... |
53,495,212 | Java 8 Collectors.groupingBy with mapped value to set collecting result to the same set<p>Objects are used in example are from package <code>org.jsoup.nodes</code></p>
<pre><code>import org.jsoup.nodes.Attribute;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
</code></pre>
<p>I need group attribute... | <p>You can split your attributes with <code>flatMap</code> and create new entries to group:</p>
<pre><code>Optional<Element> buttonOpt = ...
Map<String, Set<String>> stringStringMap =
buttonOpt.map(button ->
button.attributes()
.asList()
.st... | Java 8 Collectors.groupingBy with mapped value to set collecting result to the same set | java|lambda|java-8|java-stream|collectors | 18 | 8,775 | 3 | 53,495,326 | 53,495,326 | 16 | true | 2018-11-27T08:06:48.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java 8 Collectors.groupingBy with mapped value to set collecting result to the same set<p>Objects are used in example are from package <code>org.jsoup.nodes<... |
53,370,590 | ngx-translate how to test components<p>I've got an application which uses this library. How do I test components with it? I DO NOT WANT TO TEST THE LIBRARY. I just need to start tests of my component without multiple errors about TranslateModule then TranslateService then TranslateStore ... until I get an error when co... | <p>If you don't necessarily need the keys to be translated you can import the <code>TranslateModule</code> in your test like this:</p>
<pre><code>beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
...
],
imports: [
TranslateModule.forRoot(),
],
providers: [
... | ngx-translate how to test components | angular|typescript|testing|internationalization|ngx-translate | 16 | 19,465 | 4 | 53,391,734 | 53,391,734 | 17 | true | 2018-11-19T08:10:10.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ngx-translate how to test components<p>I've got an application which uses this library. How do I test components with it? I DO NOT WANT TO TEST THE LIBRARY. ... |
53,460,850 | Shadow Root getElementsByClassName<p>I am using LitElement to create custom Web Components. I am fairly new at it and decided to try making image slideshow. I used <a href="https://www.w3schools.com/howto/howto_js_slideshow.asp" rel="noreferrer">W3Schools slideshow as reference</a>
while modifying it to work as LitElem... | <p>The <code>getElementsByClassName()</code> method works only on a HTML Document or element.</p>
<p>The <code>shadowRoot</code> is a Document Fragment <a href="https://dom.spec.whatwg.org/#interface-shadowroot" rel="nofollow noreferrer">by inheritance</a>, not a Document nor a HTML element.</p>
<p>Instead you should u... | Shadow Root getElementsByClassName | javascript|shadow-dom|getelementsbyclassname|lit-element | 11 | 7,730 | 2 | 53,463,234 | 53,463,234 | 18 | true | 2018-11-24T17:46:35.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shadow Root getElementsByClassName<p>I am using LitElement to create custom Web Components. I am fairly new at it and decided to try making image slideshow. ... |
53,415,686 | Compare Timestamp with date in sequelize query<p>I have <code>createdAt</code> column which stores value as <code>"2018-11-07 15:03:16.532+00"</code>.
I want to write query like <code>select * from table_name where createdAt = input_date</code>, where my<code>input_date</code> is only date value like <code>2018-11-07</... | <p>try using the <code>sequelize.fn()</code> argument, for example like this, try adjusting it.</p>
<p>Ex:</p>
<pre><code>TableName.findAll({
where: sequelize.where(sequelize.fn('date', sequelize.col('createdAt')), '=', '2018-11-07')
})
</code></pre> | Compare Timestamp with date in sequelize query | javascript|node.js|postgresql|sequelize.js|timestamp-with-timezone | 10 | 11,811 | 3 | 53,418,174 | 53,418,174 | 21 | true | 2018-11-21T15:44:36.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Compare Timestamp with date in sequelize query<p>I have <code>createdAt</code> column which stores value as <code>"2018-11-07 15:03:16.532+00"</code>.
I want... |
53,431,973 | How to convert an array has special structure into an array of key-value pairs using PHP?<p>This is the source of what i am trying to do:</p>
<ol>
<li>source: a11993b18486c13240388</li>
<li>What i vae done so far:</li>
</ol>
<pre><code>$array = preg_split("/(,?\s+)|((?<=[a-z])(?=\d))|((?<=\d)(?=[a-z]))/i", $r... | <p>You need to loop through array using <code>for</code> and in loop add values to new array.</p>
<pre><code>$newArr = [];
for ($i=0; $i<count($arr); $i+=2)
$newArr[$arr[$i]] = $arr[$i+1];
</code></pre>
<p>Result</p>
<pre><code>Array
(
[a] => 11993
[b] => 18486
[c] => 13240388
)
</code></... | How to convert an array has special structure into an array of key-value pairs using PHP? | php|arrays|regex | -4 | 42 | 3 | 53,432,070 | 53,432,070 | 1 | true | 2018-11-22T13:23:39.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert an array has special structure into an array of key-value pairs using PHP?<p>This is the source of what i am trying to do:</p>
<ol>
<li>sourc... |
53,428,339 | Why app is rejected with "Missing Purpose String in Info.plist File" for NSBluetoothPeripheralUsageDescription key?<p>So I have info.plist with:</p>
<p><code><key>NSBluetoothPeripheralUsageDescription</key>
<string>Bluetooth is required bla bla.</string></code></p>
<p>I even had localised it ... | <p>Solved by adding the Usage Description Strings also to the "Custom iOS Target Properties".</p> | Why app is rejected with "Missing Purpose String in Info.plist File" for NSBluetoothPeripheralUsageDescription key? | ios|objective-c|xcode|bluetooth|app-store | 9 | 8,518 | 4 | 53,428,777 | 53,428,777 | 2 | true | 2018-11-22T10:00:41.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why app is rejected with "Missing Purpose String in Info.plist File" for NSBluetoothPeripheralUsageDescription key?<p>So I have info.plist with:</p>
<p><cod... |
53,452,150 | Modify field names in serializer in Django Rest Framework<p>I have an object I'd like to serialize using DRF's serializers, but I'd like to normalize some field names. I thought I might be able to use the <code>source</code> attribute to achieve this:</p>
<pre><code>user = { 'FirstName': 'John', 'LastName': 'Doe' }
s... | <p>You can achieve this with properties on your Django model:</p>
<pre><code>class Foo(models.model):
bar = models.CharField(max_length=40)
@property
def sanitized_bar(self):
print("Getting value")
return self.bar.lower()
@sanitized_bar.setter
def sanitized_bar(self, value):
... | Modify field names in serializer in Django Rest Framework | python|django-rest-framework|serialization | 8 | 4,874 | 2 | 53,452,388 | 53,452,388 | 2 | true | 2018-11-23T19:36:53.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Modify field names in serializer in Django Rest Framework<p>I have an object I'd like to serialize using DRF's serializers, but I'd like to normalize some fi... |
53,422,395 | How to get the IP Address for Azure DevOps Hosted Agents to add to the white list<p>Is there a way to the IP address range for the hosted machine running?</p>
<p>This is related to the Release Pipeline -> Hosted agent.</p>
<p>Issue: Getting access denied on connection, as the connection is getting refused via Firewal... | <p>We need to white list the IP address used by the Azure Datacenters in the list mentioned below:
<a href="https://www.microsoft.com/en-nz/download/details.aspx?id=41653" rel="nofollow noreferrer">https://www.microsoft.com/en-nz/download/details.aspx?id=41653</a></p>
<p>Note: This list gets updated every week, so ple... | How to get the IP Address for Azure DevOps Hosted Agents to add to the white list | azure-devops|azure-pipelines | 20 | 33,547 | 10 | 53,490,367 | 53,490,367 | 2 | true | 2018-11-22T00:41:07.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the IP Address for Azure DevOps Hosted Agents to add to the white list<p>Is there a way to the IP address range for the hosted machine running?</p... |
53,471,063 | Yarn ERROR: There are no scenarios; must have at least one<p>I tried to install <a href="https://yarnpkg.com/lang/en/" rel="noreferrer">Yarn</a> and when I used the <code>yarn</code> command I got:</p>
<pre><code>00h00m00s 0/0: : ERROR: There are no scenarios; must have at least one.
</code></pre>
<p>my <code>yarn --... | <p>It looks like that I was trying to execute the wrong yarn, because simply running <code>sudo apt install yarn</code> on my Ubuntu 18.04 gave me <a href="http://manpages.ubuntu.com/manpages/bionic/man1/yarn.1.html" rel="noreferrer">yarn from cmdtest</a>.</p>
<p>So I solved by uninstalling it:</p>
<pre><code>sudo apt ... | Yarn ERROR: There are no scenarios; must have at least one | javascript|ubuntu|debian|yarnpkg|debian-based | 115 | 79,121 | 10 | 53,471,064 | 53,471,064 | 262 | true | 2018-11-25T19:27:34.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Yarn ERROR: There are no scenarios; must have at least one<p>I tried to install <a href="https://yarnpkg.com/lang/en/" rel="noreferrer">Yarn</a> and when I u... |
53,475,203 | How do you sign a HIPAA BAA for Google Cloud platform?<p>Not sure if this question is appropriate for this topic.</p>
<p>There is a lot of documentation stating that Google will sign a BAA for their services but it is very difficult to find the place to actually sign it. After a few searches I was able to find how to ... | <p>This page details Google Cloud HIPAA Compliance. You will need to contact your account manager to receive a BAA. Also required is that you do not use / disable any products not covered by the BAA.</p>
<p><a href="https://cloud.google.com/security/compliance/hipaa/" rel="noreferrer">https://cloud.google.com/security... | How do you sign a HIPAA BAA for Google Cloud platform? | google-cloud-platform|hipaa | 7 | 1,814 | 1 | 53,478,001 | 53,478,001 | 9 | true | 2018-11-26T05:30:08.803Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you sign a HIPAA BAA for Google Cloud platform?<p>Not sure if this question is appropriate for this topic.</p>
<p>There is a lot of documentation sta... |
53,493,618 | iOS Terminated due to signal 9 on allowing permission<p>I am making an iOS app and I am new in iOS world. In this app, I want to access user contacts. Everything is going good and working well. But I experienced a amazing behavior which I have not seen in Android since I am android developer. </p>
<p>In iOS to access ... | <p>Your app is not crashing its just forced to restart by iOS with new privacy settings. iOS will SIGKILL the app. (it's default behaviour of iOS). You can checkout - <a href="http://developer.apple.com/devcenter/download.action?path=/wwdc_2012/wwdc_2012_session_pdfs/session_710__privacy_support_in_ios_and_os_x.pdf" re... | iOS Terminated due to signal 9 on allowing permission | ios|swift|xcode|contacts-framework | 9 | 5,657 | 2 | 53,493,748 | 53,493,748 | 15 | true | 2018-11-27T06:01:45.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
iOS Terminated due to signal 9 on allowing permission<p>I am making an iOS app and I am new in iOS world. In this app, I want to access user contacts. Everyt... |
53,416,226 | How to write parquet file from pandas dataframe in S3 in python<p>I have a pandas dataframe. i want to write this dataframe to parquet file in S3.
I need a sample code for the same.I tried to google it. but i could not get a working sample code.</p> | <p>First ensure that you have pyarrow or fastparquet installed with pandas.</p>
<p>Then install boto3 and aws cli. Use aws cli to set up the config and credentials files, located at .aws folder.</p>
<p>Here is a simple script using <a href="https://arrow.apache.org/docs/python/parquet.html" rel="noreferrer">pyarrow</a>... | How to write parquet file from pandas dataframe in S3 in python | python-3.x|amazon-s3|parquet | 38 | 63,295 | 4 | 53,494,582 | 53,494,582 | 17 | true | 2018-11-21T16:13:31.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to write parquet file from pandas dataframe in S3 in python<p>I have a pandas dataframe. i want to write this dataframe to parquet file in S3.
I need a s... |
53,441,734 | How to disable pytest dumping out source code?<p>When one of the tests fail, pytest will dump out the source code of the function where the exception is raised. However, something when the error is raised from another library, it still dumps the function source code flood the output.</p>
<p>Is it possible to disable p... | <p>You can use the <code>--tb</code> option. You can choose either <code>--tb=short</code> or <code>--tb=native</code> as per what suits you. Check the detailed documentation <a href="https://docs.pytest.org/en/latest/how-to/output.html#modifying-python-traceback-printing" rel="noreferrer">here</a>.</p> | How to disable pytest dumping out source code? | python|pytest | 14 | 1,793 | 2 | 53,442,916 | 53,442,916 | 19 | true | 2018-11-23T06:40:20.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to disable pytest dumping out source code?<p>When one of the tests fail, pytest will dump out the source code of the function where the exception is rais... |
53,439,566 | Python: How to read and load an excel file from AWS S3?<p>I have uploaded an excel file to AWS S3 bucket and now I want to read it in python. Any help would be appreciated. Here is what I have achieved so far, </p>
<pre><code>import boto3
import os
aws_id = 'aws_id'
aws_secret = 'aws_secret_key'
client = boto3.clien... | <p>Spent quite some time on it and here's how I got it working, </p>
<pre><code>import boto3
import io
import pandas as pd
import json
aws_id = ''
aws_secret = ''
bucket_name = ''
object_key = ''
s3 = boto3.client('s3', aws_access_key_id=aws_id, aws_secret_access_key=aws_secret)
obj = s3.get_object(Bucket=bucket_nam... | Python: How to read and load an excel file from AWS S3? | python|python-3.x|amazon-web-services|amazon-s3 | 8 | 38,725 | 4 | 53,441,249 | 53,441,249 | 22 | true | 2018-11-23T01:04:46.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python: How to read and load an excel file from AWS S3?<p>I have uploaded an excel file to AWS S3 bucket and now I want to read it in python. Any help would ... |
53,381,061 | Can Flutter remove the need for a mac to create IOS apps?<p>So I've wanted to build both android and IOS apps and the other day I found flutter. I know that IOS requires a MacOS but flutter works on windows. </p>
<p>My question is, can I develop and publish IOS apps on a windows computer using flutter?</p> | <p>No.</p>
<p>The documentation on their site (<a href="https://flutter.io/docs/deployment/ios" rel="noreferrer">https://flutter.io/docs/deployment/ios</a>) references using Xcode and having the regular Apple accounts set up. The only way to build iOS applications without a Mac is to use a cloud service (which would u... | Can Flutter remove the need for a mac to create IOS apps? | dart|flutter | 10 | 6,678 | 5 | 53,381,182 | 53,381,182 | 7 | true | 2018-11-19T19:03:21.663Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can Flutter remove the need for a mac to create IOS apps?<p>So I've wanted to build both android and IOS apps and the other day I found flutter. I know that ... |
53,438,063 | Changing the titles on My Account pages in Woocommerce<p>I've seen loads of example of how to re-order / change the navigation and page with the WooCommerce my account dashboard. But i can't for the life of me work out how to change the main titles for each section (My Account, Orders, Downloads, Addresses etc).</p>
<... | <p>It can be done using the composite filter hook <code>woocommerce_endpoint_{$endpoint}_title</code>. </p>
<p>For example if you need to change the My Account "** Account details**" title you will use <em>(where the endpoint is <code>edit-account</code>)</em>:</p>
<pre><code>add_filter( 'woocommerce_endpoint_edit-ac... | Changing the titles on My Account pages in Woocommerce | php|wordpress|woocommerce|title|account | 7 | 6,965 | 3 | 53,439,008 | 53,439,008 | 7 | true | 2018-11-22T21:15:28.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing the titles on My Account pages in Woocommerce<p>I've seen loads of example of how to re-order / change the navigation and page with the WooCommerce ... |
53,381,294 | Why does an incomplete switch expression compile successfully<p>Trying out <a href="http://jdk.java.net/12/" rel="noreferrer">JDK/12 EarlyAccess Build 20</a>, where the <a href="http://openjdk.java.net/jeps/325" rel="noreferrer">JEP-325 Switch Expressions</a> has been integrated as a preview feature. A sample code for ... | <p>This is a known bug. See <a href="https://bugs.openjdk.java.net/browse/JDK-8212982" rel="nofollow noreferrer">JDK-8212982</a>
for details on its status.</p>
<blockquote>
<p>This code: </p>
<pre><code>public class SwitchBug {
static String hold(String item) {
return switch(item) {
ca... | Why does an incomplete switch expression compile successfully | java|javac|java-12|preview-feature|switch-expression | 10 | 830 | 1 | 53,383,266 | 53,383,266 | 10 | true | 2018-11-19T19:22:37.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does an incomplete switch expression compile successfully<p>Trying out <a href="http://jdk.java.net/12/" rel="noreferrer">JDK/12 EarlyAccess Build 20</a>... |
53,453,640 | Is there a way to install an older version of Android platform-tools?<p>I have been hunting around for the afternoon to try to see if there is any way to install older versions of the <code>Android</code> <code>platform-tools</code>. I have tried via <code>sdkmanager</code> and by the older <code>android</code> versio... | <p>Yes, you could download old version,
<a href="https://dl.google.com/android/repository/platform-tools_r27.0.0-windows.zip" rel="noreferrer">https://dl.google.com/android/repository/platform-tools_r27.0.0-windows.zip</a> is an example .</p>
<p>change the version number in the link to get your wanted version. another... | Is there a way to install an older version of Android platform-tools? | android|adb|android-sdk-manager|platform-tools | 8 | 17,415 | 1 | 53,453,827 | 53,453,827 | 15 | true | 2018-11-23T22:48:17.427Z | 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 install an older version of Android platform-tools?<p>I have been hunting around for the afternoon to try to see if there is any way to ins... |
53,424,764 | Circular progress button based on hold (flutter)<p>I'm trying to make a button where when user hold it, there will be a progress, but if the user unpress the button before it finish, the progress will decrease. somthing like the one on the picture<a href="https://i.stack.imgur.com/Aih0R.png" rel="noreferrer"><img src="... | <p>As said by Arnold Parge, you can use the <a href="https://docs.flutter.io/flutter/widgets/GestureDetector-class.html" rel="noreferrer">GestureDetector</a> and listen to <code>onTapDown</code> and <code>onTapUp</code>. To create your desired LoadingButton, you can use the following Widget Structure:</p>
<pre><code>-... | Circular progress button based on hold (flutter) | dart|flutter | 7 | 7,996 | 2 | 53,427,723 | 53,427,723 | 21 | true | 2018-11-22T06:03:14.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Circular progress button based on hold (flutter)<p>I'm trying to make a button where when user hold it, there will be a progress, but if the user unpress the... |
53,379,143 | If there's an if-constexpr, how come there's no switch-constexpr?<p>In C++17, <a href="https://en.cppreference.com/w/cpp/language/if" rel="noreferrer"><code>if constexpr</code></a> was introduced; however, there doesn't seem to be a <code>switch constexpr</code> (see <a href="https://en.cppreference.com/w/cpp/language/... | <p><a href="https://wg21.link/P0128R1" rel="noreferrer"><code>if constexpr</code></a> was ultimately derived from a <a href="https://wg21.link/N4461" rel="noreferrer">more sane form</a> of the <a href="https://wg21.link/N3329" rel="noreferrer"><code>static if</code> concept</a>. Because of that derivation, applying the... | If there's an if-constexpr, how come there's no switch-constexpr? | c++|c++17|c++20|if-constexpr | 12 | 2,377 | 3 | 53,379,817 | 53,379,817 | 22 | true | 2018-11-19T16:42:57.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
If there's an if-constexpr, how come there's no switch-constexpr?<p>In C++17, <a href="https://en.cppreference.com/w/cpp/language/if" rel="noreferrer"><code>... |
53,445,422 | Typescript Generic Promise Return Type<p>Basically I'm trying to implement a function that always returns a fulfilled promise of the same "type" i pass to the function as a parameter</p>
<p>So if I call with a boolean it returns a fulfilled Promise, if I call with a string parameter it returns a fulfilled Promise and ... | <p>You implementation seems fine, the problem with void is that the parameter is still expected. You could call it with <code>undefined</code></p>
<pre><code>const PromiseOK = <T>(val: T): Promise<T> => {
return Promise.resolve(val);
};
PromiseOK<void>(undefined)
</code></pre>
<p>A better op... | Typescript Generic Promise Return Type | typescript|generics|promise|typescript-generics | 9 | 8,502 | 3 | 53,446,056 | 53,446,056 | 10 | true | 2018-11-23T11:00:19.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typescript Generic Promise Return Type<p>Basically I'm trying to implement a function that always returns a fulfilled promise of the same "type" i pass to th... |
53,411,220 | Pass activity result into a react native module<p>I am trying to do some speech to text recognition using react native. I wrote a react module to start a recognizer intent </p>
<pre><code>public class SpeechToTextModule extends ReactContextBaseJavaModule {
...
@ReactMethod
public void startListening(Callback err... | <p>There's a way to <a href="https://facebook.github.io/react-native/docs/native-modules-android#getting-activity-result-from-startactivityforresult" rel="noreferrer">register as Activity event listener</a>.</p>
<p>Add this to your Native Module:</p>
<pre><code>public class SpeechToTextModule
extends ReactContextB... | Pass activity result into a react native module | android|react-native | 8 | 6,218 | 4 | 53,412,641 | 53,412,641 | 12 | true | 2018-11-21T11:35:15.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass activity result into a react native module<p>I am trying to do some speech to text recognition using react native. I wrote a react module to start a rec... |
53,436,144 | How do I read application properties in Micronaut?<p>I integrated AWS SES API to my Micronaut Groovy application using guide <a href="http://guides.micronaut.io/micronaut-email-groovy/guide/index.html" rel="noreferrer">send mail in micronaut</a> and I am able send mails if I directly assign values to properties.</p>
<... | <p>You are using it incorrectly, you are injecting the literal value <code>aws.secretkeyid</code>, not the value of a variable.</p>
<p>The correct syntax is (Groovy):</p>
<pre><code>@Value('${aws.secretkeyid}')
String keyId
</code></pre>
<p>Notice that you must use single quotes to avoid Groovy to attempt interpolat... | How do I read application properties in Micronaut? | micronaut | 9 | 15,684 | 2 | 53,445,316 | 53,445,316 | 17 | true | 2018-11-22T17:55:41.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I read application properties in Micronaut?<p>I integrated AWS SES API to my Micronaut Groovy application using guide <a href="http://guides.micronaut... |
53,412,106 | Linking to images referenced in vuex store in Vue.js<p>I am using Vue.js for the first time so apologies if this is a basic question – I have set up the vue project with the <strong>vue-cli</strong>, <strong>vue-router</strong> and <strong>vuex</strong> if this information is helpful. </p>
<p>My main issue here is wit... | <p><code>:src='student.image'</code> (v-binding) is executed at runtime, but webpack aliases work in compile time. So you have to wrap the aliased file path in <code>require</code>.</p>
<pre><code>{
id: 1,
name: 'Advik',
age: '19',
studying: 'Physiotherapy',
image: require('~@/assets/images/students/advik-1.... | Linking to images referenced in vuex store in Vue.js | javascript|vue.js|url-routing|vuex | 7 | 6,152 | 1 | 53,412,811 | 53,412,811 | 5 | true | 2018-11-21T12:31:42.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Linking to images referenced in vuex store in Vue.js<p>I am using Vue.js for the first time so apologies if this is a basic question – I have set up the vue ... |
53,411,841 | Independent versioning of packages in a mono-repo<p>We just started working on something that is maybe best described as a company-wide "open" source framework. Our main language is C# and we use Jenkins and ProGet to create and share nuget-packages. We started putting everything (and I really mean everything. One modu... | <p>Both monorepos and very-many-repos have <em>advantages</em>; one example of advantages with many small repos is that you can <code>git tag</code> an individual package's <em>specific</em> version easily. Doing the same in a monorepo is more awkward sometimes.</p>
<p>But, if what you are <strong>releasing</strong> i... | Independent versioning of packages in a mono-repo | c#|git|jenkins|nuget|versioning | 11 | 6,702 | 1 | 53,412,066 | 53,412,066 | 7 | true | 2018-11-21T12:15:55.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Independent versioning of packages in a mono-repo<p>We just started working on something that is maybe best described as a company-wide "open" source framewo... |
53,496,808 | Angular Material Table - Apply dynamically background color to a row (Angular 2+)<p>Hello I have an Angular application that displays in real time the status of processes running in a scheduler engine.
I have the following table to display those processes:
<a href="https://i.stack.imgur.com/o4Glb.png" rel="nofollow nor... | <p>You can also use <code>[ngClass]</code> to achieve this:</p>
<pre><code><td [ngClass]="{
'is-white': data.STATUS === 'S',
'is-blue': data.STATUS === 'W',
'is-red': data.STATUS === 'E',
'is-green': data.STATUS === 'F'
}">...</td>
</code></pre>
<p>And then in your css:</p>
<pre><code>td.is-white... | Angular Material Table - Apply dynamically background color to a row (Angular 2+) | html|css|angular|angular-material | 8 | 23,836 | 3 | 53,497,880 | 53,497,880 | 9 | true | 2018-11-27T09:47:02.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular Material Table - Apply dynamically background color to a row (Angular 2+)<p>Hello I have an Angular application that displays in real time the status... |
53,476,115 | Error : IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents<p>Below are my dependencies</p>
<pre><code>implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:const... | <p>There is some issue with <code>material:1.1.0-alpha01</code></p>
<p>A simple solution is to change the parent theme</p>
<pre><code><style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
</code></... | Error : IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents | android|android-layout|material-design|bottombar | 84 | 58,128 | 12 | 53,476,116 | 53,476,116 | 111 | true | 2018-11-26T07:02:02.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error : IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents<p>Below are my dependencies</p>
<pre><c... |
53,496,781 | aiohttp how to save a persistent ClientSession in a class?<p>I'm writing a class that will do http requests using aiohttp. According to the docs I should not to create a ClientSession per request, so I want to reuse the same session.</p>
<p>code:</p>
<pre><code>class TestApi:
def __init__(self):
self.session... | <p>The expression <code>TestApi()</code> on a line by itself creates a <code>TestApi</code> object and immediately throws it away. <code>aiohttp</code> complaints that the session was never closed (either by leaving an <code>async with</code> block or with an explicit call to <code>close()</code>), but even without the... | aiohttp how to save a persistent ClientSession in a class? | python|httprequest|python-asyncio|aiohttp | 14 | 6,475 | 1 | 53,497,526 | 53,497,526 | 9 | true | 2018-11-27T09:45:22.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
aiohttp how to save a persistent ClientSession in a class?<p>I'm writing a class that will do http requests using aiohttp. According to the docs I should not... |
53,444,093 | Getting error when trying to use Nuxt font awesome 5 although I followed the official manual page<p>I'm trying to use font awesome 5 in my Nuxt project following the official guide below.
<a href="https://www.npmjs.com/package/nuxt-fontawesome" rel="noreferrer">https://www.npmjs.com/package/nuxt-fontawesome</a></p>
<p... | <p>Ok, I had a similar issue and found that the vue-fontawesome plugin worked although the nuxt-fontawesome one didn't. So, my steps:</p>
<p><code>npm install --save @fortawesome/vue-fontawesome @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons @fortawesome/free-brands-svg-icons</code></p>
<p>create... | Getting error when trying to use Nuxt font awesome 5 although I followed the official manual page | javascript|nuxt.js | 8 | 4,935 | 1 | 53,445,399 | 53,445,399 | 12 | true | 2018-11-23T09:41:44.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting error when trying to use Nuxt font awesome 5 although I followed the official manual page<p>I'm trying to use font awesome 5 in my Nuxt project follo... |
53,484,337 | Stop an Azure Function from logging the “Executing” and “Executed” messages<p>When my Azure Function is triggered, it logs “Executing” and “Executed” messages. This is fine during testing but as this Function gets triggered a lot, it is creating a lot of unwanted log messages. The logging that I have added myself is im... | <p>The execution logs you want to get rid of is generated by function runtime, we can set a higher log level to filter information and keep our self-defined info.</p>
<p>Go to Azure portal, Platform features> Function app settings> host.json</p>
<p>For Function app v2, with this setting in <a href="https://docs.micro... | Stop an Azure Function from logging the “Executing” and “Executed” messages | azure|asp.net-core-2.0|azure-functions | 10 | 5,418 | 2 | 53,494,407 | 53,494,407 | 14 | true | 2018-11-26T15:27:19.350Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Stop an Azure Function from logging the “Executing” and “Executed” messages<p>When my Azure Function is triggered, it logs “Executing” and “Executed” message... |
53,357,741 | How to perform OAuth 2.0 using the Curl CLI?<p>I would like to use curl from a Windows command prompt to perform Google OAuth 2.0. My goal is to better understand the authentication flows that an OAuth server implements, see the HTTP headers, etc.</p>
<p>How can this be done using curl.exe from a Windows Command Promp... | <blockquote>
<p>How to perform OAuth 2.0 using the Curl CLI?</p>
</blockquote>
<p>This answer is for Windows Command Prompt users but should be easily adaptable to Linux and Mac also.</p>
<p>You will need your Google <code>Client ID</code> and <code>Client Secret</code>. These can be obtained from the Google Consol... | How to perform OAuth 2.0 using the Curl CLI? | curl|oauth-2.0|google-cloud-platform|google-oauth | 27 | 49,187 | 1 | 53,357,742 | 53,357,742 | 25 | true | 2018-11-18T03:53:33.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to perform OAuth 2.0 using the Curl CLI?<p>I would like to use curl from a Windows command prompt to perform Google OAuth 2.0. My goal is to better under... |
53,400,009 | Java generics self-reference: is it safe?<p>I have this simple interface:</p>
<pre><code>public interface Node<E extends Node<E>>
{
public E getParent();
public List<E> getChildren();
default List<E> listNodes()
{
List<E> result = new ArrayList<>();
... | <p>An easy example to illustrate the problem: a node of a different type of node:</p>
<pre><code>class NodeA implements Node<NodeA> {
...
}
</code></pre>
<p>And:</p>
<pre><code>class NodeB implements Node<NodeA> {
...
}
</code></pre>
<p>In this case, <code>E root = (E) this</code> would resolve ... | Java generics self-reference: is it safe? | java|generics|this|self-reference | 16 | 1,030 | 4 | 53,400,338 | 53,400,338 | 13 | true | 2018-11-20T19:15:25.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java generics self-reference: is it safe?<p>I have this simple interface:</p>
<pre><code>public interface Node<E extends Node<E>>
{
public E... |
53,433,663 | Maven not running JUnit 5 tests<p>I'm trying to get a simple junit test running with maven but it is not detecting any tests. Where am I going wrong? The project directory</p>
<pre><code>Project -> src -> test-> java -> MyTest.java
</code></pre>
<p>Results :</p>
<pre><code>Tests run: 0, Failures: 0, Errors:... | <p>According to the annotation (<code>import org.junit.jupiter.api.Test</code>), you are trying to run JUnit 5 tests with Maven. According to the <a href="https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html" rel="noreferrer">documentation</a>, you have to add this dependency:</p>
<pre>... | Maven not running JUnit 5 tests | maven|junit|maven-surefire-plugin|junit5 | 54 | 37,163 | 6 | 53,433,724 | 53,433,724 | 90 | true | 2018-11-22T15:01:32.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Maven not running JUnit 5 tests<p>I'm trying to get a simple junit test running with maven but it is not detecting any tests. Where am I going wrong? The pro... |
53,415,708 | Common pattern when variable is used before being assigned<p>I have a module</p>
<pre><code>import pino, { Logger } from 'pino';
let logger: Logger;
if (process.env.NODE_ENV === 'production') {
const dest = pino.extreme();
logger = pino(dest);
}
if (process.env.NODE_ENV === 'development') {
// @ts-ignor... | <blockquote>
<p>but even if it will be undefined it is suted for me</p>
</blockquote>
<p>I would suggest that having <code>logger</code> be <code>undefined</code> is not a good idea (more below), but based on your statement above:</p>
<p>Make that explicit, to the compiler and to maintainers of the code:</p>
<pre>... | Common pattern when variable is used before being assigned | typescript | 16 | 22,041 | 4 | 53,415,766 | 53,415,766 | 18 | true | 2018-11-21T15:45:47.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Common pattern when variable is used before being assigned<p>I have a module</p>
<pre><code>import pino, { Logger } from 'pino';
let logger: Logger;
if (p... |
53,391,431 | Flutter - Will BLoC stream instances cause memory leak when a widget is closed?<p>There are some scenarios where screens with their respective BLoCs are frequently created and closed. So I'm somewhat concerned about memory safety of the Streams instances created in this process, because it doesn't seem they are dispose... | <p>Streams will properly be cleaned as long as they aren't used anymore.
The thing is, to simply removing the variable isn't enough to unsure it's unused. It could still run in background.</p>
<p>You need to call <code>Sink.close()</code> so that it stops the associated <code>StreamController</code>, to ensure resourc... | Flutter - Will BLoC stream instances cause memory leak when a widget is closed? | dart|flutter|rxdart | 8 | 4,870 | 1 | 53,391,586 | 53,391,586 | 9 | true | 2018-11-20T10:54:15.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter - Will BLoC stream instances cause memory leak when a widget is closed?<p>There are some scenarios where screens with their respective BLoCs are freq... |
53,464,595 | How to use componentWillMount() in React Hooks?<p>In the official docs of React it mentions - </p>
<blockquote>
<p>If you’re familiar with React class lifecycle methods, you can think
of useEffect Hook as componentDidMount, componentDidUpdate, and
componentWillUnmount combined.</p>
</blockquote>
<p>My question... | <p>You cannot use any of the existing lifecycle methods (<code>componentDidMount</code>, <code>componentDidUpdate</code>, <code>componentWillUnmount</code> etc.) in a hook. They can only be used in class components. And with Hooks you can only use in functional components. The line below comes from the React doc:</p>
... | How to use componentWillMount() in React Hooks? | javascript|reactjs|jsx|react-hooks | 392 | 396,318 | 21 | 53,465,182 | 53,465,182 | 715 | true | 2018-11-25T04:13:08.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use componentWillMount() in React Hooks?<p>In the official docs of React it mentions - </p>
<blockquote>
<p>If you’re familiar with React class li... |
44,121,467 | How to save Amazon Redshift output to local CSV through SQL Workbench?<p>I am writing psql through Amazon Redshift and now I am trying to save the output as CSV through PSQL query, on SQL Workbench
The reason I am planning to do this through query instead of using <code>select</code> clause and then right click to save... | <p>Try running any one of the following in the Workbench</p>
<pre><code>WbExport -type=text
-file='C:\Downloads\myData.txt'
-delimiter='\t'
-decimal=','
-dateFormat='yyyy-MM-dd';
select a, b ,c from myTable;
WbExport -type=text
-file='C:\Downloads\myQuery.txt'
-delimiter=... | How to save Amazon Redshift output to local CSV through SQL Workbench? | amazon-web-services|amazon-redshift|export-to-csv|sql-workbench-j | 10 | 18,502 | 3 | 48,627,465 | 48,627,465 | 7 | true | 2017-05-22T20:18:10.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to save Amazon Redshift output to local CSV through SQL Workbench?<p>I am writing psql through Amazon Redshift and now I am trying to save the output as ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.