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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
44,033,997 | How do I merge two objects while omitting null values with lodash<p>I've researched how to merge two JavaScript objects while omitting null values, so far I've tried using merge, assign, clone without success.</p>
<p>Here is my test (<a href="https://jsfiddle.net/9upjf4bc/" rel="noreferrer">JSFiddle</a>) :</p>
<pre><... | <p>Use <a href="https://lodash.com/docs/4.17.4#mergeWith" rel="noreferrer"><code>_.mergeWith</code></a>:</p>
<pre><code>let merged = _.mergeWith(
{}, defaultValues, product,
(a, b) => b === null ? a : undefined
)
</code></pre>
<p><a href="https://jsfiddle.net/9upjf4bc/1/" rel="noreferrer">Updated fiddle</a... | How do I merge two objects while omitting null values with lodash | javascript|object|merge|lodash | 15 | 9,225 | 1 | 44,034,059 | 44,034,059 | 30 | true | 2017-05-17T20:12:09.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I merge two objects while omitting null values with lodash<p>I've researched how to merge two JavaScript objects while omitting null values, so far I'... |
44,001,007 | Scrape the absolute URL instead of a relative path in python<p>I'm trying to get all the href's from a HTML code and store it in a list for future processing such as this: </p>
<p>Example URL: www.example-page-xl.com</p>
<pre><code> <body>
<section>
<a href="/helloworld/index.php"> Hello Wor... | <p>In this case <strong><em>urlparse.urljoin</em></strong> helps you. You should modify your code like this- </p>
<pre><code>import bs4 as bs4
import urllib.request
from urlparse import urljoin
web_url = 'https:www.example-page-xl.com'
sauce = urllib.request.urlopen(web_url).read()
soup = bs.BeautifulSoup(sauce,'lxm... | Scrape the absolute URL instead of a relative path in python | python|beautifulsoup|mechanize | 25 | 16,966 | 3 | 44,002,598 | 44,002,598 | 32 | true | 2017-05-16T12:06:42.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scrape the absolute URL instead of a relative path in python<p>I'm trying to get all the href's from a HTML code and store it in a list for future processing... |
44,358,076 | Should I close the channel/connection after every publish?<p>I am using amqplib in Node.js, and I am not clear about the best practices in my code. </p>
<p>Basically, my current code calls the <code>amqp.connect()</code> when the Node server starts up, and then uses a different channel for each producer and each con... | <p>In general, it's not a good practice to open and close connections and channels per message. Connections are long lived and it takes resources to keep opening and closing them. For channels, they share the TCP connection with the connection so they are more lightweight, but they will still consume memory and definit... | Should I close the channel/connection after every publish? | rabbitmq|node-amqp | 23 | 16,436 | 1 | 44,363,000 | 44,363,000 | 37 | true | 2017-06-04T19:40:07.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Should I close the channel/connection after every publish?<p>I am using amqplib in Node.js, and I am not clear about the best practices in my code. </p>
<... |
44,112,238 | Check if input is from console<p>I want to share a variable of my views with:</p>
<pre><code>class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
\Schema::defaultStringLength(191);
$cust... | <p>You can check if you are running in the console by using</p>
<pre><code>app()->runningInConsole()
</code></pre>
<p>Underneath that, all it does is check the interface type</p>
<pre><code>return php_sapi_name() == 'cli' || php_sapi_name() == 'phpdbg'
</code></pre>
<p>You can find more on the <a href="http://ph... | Check if input is from console | laravel|laravel-5|laravel-5.4|laravel-artisan | 22 | 11,041 | 2 | 44,112,518 | 44,112,518 | 44 | true | 2017-05-22T11:55:51.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check if input is from console<p>I want to share a variable of my views with:</p>
<pre><code>class AppServiceProvider extends ServiceProvider
{
/**
... |
44,152,988 | Append not thread-safe?<p>I noticed that if I tried appending to a slice using goroutines inside a <code>for</code> loop, there would be instances where I would get missing/blank data:</p>
<pre><code>destSlice := make([]myClass, 0)
var wg sync.WaitGroup
for _, myObject := range sourceSlice {
wg.Add(1)
go func... | <p>In Go no value is safe for concurrent read/write, slices (which are <a href="https://golang.org/pkg/reflect/#SliceHeader" rel="noreferrer">slice headers</a>) are no exception.</p>
<p>Yes, your code has data races. Run with the <code>-race</code> option to verify.</p>
<p>Example:</p>
<pre><code>type myClass struct {
... | Append not thread-safe? | go|concurrency|append|slice|goroutine | 24 | 28,735 | 4 | 44,153,078 | 44,153,078 | 45 | true | 2017-05-24T08:27:43.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Append not thread-safe?<p>I noticed that if I tried appending to a slice using goroutines inside a <code>for</code> loop, there would be instances where I wo... |
44,243,368 | How to login with AWS CLI using credentials profiles<p>I want to setup multiple AWS profiles so that I can easily change settings and credentials when jumping between projects.</p>
<p>I've read the AWS documentation but it's quite vague about how to select what profile you want to use when logging in.</p>
<p>When I'm... | <p>To setup multiple profiles for AWS login you need to the following:</p>
<ol>
<li>Setup the credentials file with your access keys</li>
<li>Setup default settings for profiles (optional)</li>
<li>Set the AWS_PROFILE environment variable</li>
<li>Remove previous AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY</li>
</ol>
... | How to login with AWS CLI using credentials profiles | amazon-web-services|authentication|command-line-interface|aws-cli|amazon-ecr | 15 | 23,884 | 3 | 44,243,369 | 44,243,369 | 52 | true | 2017-05-29T13:10:50.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to login with AWS CLI using credentials profiles<p>I want to setup multiple AWS profiles so that I can easily change settings and credentials when jumpin... |
44,101,458 | Random Forest Feature Importance Chart using Python<p>I am working with RandomForestRegressor in python and I want to create a chart that will illustrate the ranking of feature importance. This is the code I used:</p>
<pre><code>from sklearn.ensemble import RandomForestRegressor
MT= pd.read_csv("MT_reduced.csv")
df ... | <p>Here is an example using the iris data set.</p>
<pre><code>>>> from sklearn.datasets import load_iris
>>> iris = load_iris()
>>> rnd_clf = RandomForestClassifier(n_estimators=500, n_jobs=-1, random_state=42)
>>> rnd_clf.fit(iris["data"], iris["target"])
>>> for name, imp... | Random Forest Feature Importance Chart using Python | python|plot|random-forest|feature-selection | 49 | 113,685 | 8 | 44,102,451 | 44,102,451 | 66 | true | 2017-05-21T20:26:32.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Random Forest Feature Importance Chart using Python<p>I am working with RandomForestRegressor in python and I want to create a chart that will illustrate the... |
44,174,747 | Spark dataframe: collect () vs select ()<p>Calling <code>collect()</code> on an RDD will return the entire dataset to the driver which can cause out of memory and we should avoid that.</p>
<p>Will <code>collect()</code> behave the same way if called on a dataframe?<br>
What about the <code>select()</code> method?<br>
... | <p><a href="https://spark.apache.org/docs/latest/programming-guide.html#actions" rel="noreferrer">Actions vs Transformations</a></p>
<blockquote>
<ul>
<li>Collect (Action) - Return all the elements of the dataset as an array at the driver program. This is usually useful after a filter or
other operation that ret... | Spark dataframe: collect () vs select () | dataframe|apache-spark|apache-spark-sql | 57 | 175,635 | 6 | 44,175,160 | 44,175,160 | 67 | true | 2017-05-25T07:27:32.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spark dataframe: collect () vs select ()<p>Calling <code>collect()</code> on an RDD will return the entire dataset to the driver which can cause out of memor... |
44,074,682 | How to use slugify in Python 3?<p>I'm trying to use <a href="https://github.com/un33k/python-slugify" rel="noreferrer">slugify</a>, which I installed using <code>pip3 install slugify</code>. However, in the interpreter, if I try to slugify the string <code>'hello'</code> I see the following:</p>
<pre><code>Python 3.5.... | <p>The <a href="https://pypi.python.org/pypi/slugify" rel="noreferrer">slugify package you installed</a> isn't built for python 3, it currently only supports python 2. And it is very unlikely it will get updated. One of the easiest way to tell is that throughout its source code, it used the python 2 keyword <code>unico... | How to use slugify in Python 3? | python|slugify | 29 | 26,929 | 2 | 44,074,724 | 44,074,724 | 70 | true | 2017-05-19T16:19:01.510Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use slugify in Python 3?<p>I'm trying to use <a href="https://github.com/un33k/python-slugify" rel="noreferrer">slugify</a>, which I installed using <... |
44,183,795 | How to create GridView Layout in Flutter<p>I am trying to layout a 4x4 grid of tiles in flutter. I managed to do it with columns and rows. But now I found the <code>GridView</code> component. Could anyone provide an example on how to do it using it?</p>
<p>I can't really wrap my head around the docs. I don't seem to g... | <p>A simple example loading images into the tiles.</p>
<pre><code>import 'package:flutter/material.dart';
void main() {
runApp( MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white30,
child: GridView.count(
... | How to create GridView Layout in Flutter | flutter|dart|gridview|flutter-layout | 55 | 166,969 | 5 | 44,184,514 | 44,184,514 | 73 | true | 2017-05-25T15:05:00.430Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create GridView Layout in Flutter<p>I am trying to layout a 4x4 grid of tiles in flutter. I managed to do it with columns and rows. But now I found th... |
44,305,617 | Nested maps in Golang<pre><code>func main() {
var data = map[string]string{}
data["a"] = "x"
data["b"] = "x"
data["c"] = "x"
fmt.Println(data)
}
</code></pre>
<p>It runs.</p>
<pre><code>func main() {
var data = map[string][]string{}
data["a"] = append(data["a"], "x")
data["b"] = append... | <p>The <a href="https://golang.org/ref/spec#The_zero_value" rel="noreferrer">zero value</a> for map types is <code>nil</code>. It is not yet initialized. You cannot store values in a <code>nil</code> map, that's a runtime panic.</p>
<p>In your last example you initialize the (outer) <code>data</code> map, but it has n... | Nested maps in Golang | dictionary|go|square-bracket | 72 | 90,648 | 4 | 44,305,711 | 44,305,711 | 102 | true | 2017-06-01T10:53:48.557Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nested maps in Golang<pre><code>func main() {
var data = map[string]string{}
data["a"] = "x"
data["b"] = "x"
data["c"] = "x"
fmt.Println(... |
43,955,199 | How to add multiple middleware to Redux?<p>I have one piece of middleware already plugged in, <strong>redux-thunk</strong>, and I'd like to add another, <strong>redux-logger</strong>.</p>
<p>How do I configure it so my app uses both pieces of middleware? I tried passing in an array of <code>[ReduxThunk, logger]</code>... | <p><a href="http://redux.js.org/docs/api/applyMiddleware.html" rel="noreferrer">applyMiddleware</a> takes each piece of middleware as a new argument (not an array). So just pass in each piece of middleware you'd like.</p>
<pre><code>const createStoreWithMiddleware = applyMiddleware(ReduxThunk, logger)(createStore);
</... | How to add multiple middleware to Redux? | reactjs|redux|react-redux|middleware|redux-thunk | 77 | 43,811 | 6 | 43,955,223 | 43,955,223 | 121 | true | 2017-05-13T16:03:30.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add multiple middleware to Redux?<p>I have one piece of middleware already plugged in, <strong>redux-thunk</strong>, and I'd like to add another, <str... |
44,170,991 | Reload a React Native app on an Android device manually via command line<p>I'd like to manually force a Reload of my React Native app on demand without physically shaking the device. (I'm getting carpal tunnel.)</p>
<p>I know that Live Reload / Hot Reload are available. I'm looking for a on-demand command line solutio... | <p>Using the cmd line you can send a command to the Android device. </p>
<pre><code>adb shell input text "RR"
</code></pre>
<p>This command tells the Android device to type the character "R" twice which is the React Native command to Reload on Android.</p>
<p>The <code>adb shell</code> command has many useful fea... | Reload a React Native app on an Android device manually via command line | react-native | 76 | 54,559 | 8 | 44,170,992 | 44,170,992 | 191 | true | 2017-05-25T01:43:51.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reload a React Native app on an Android device manually via command line<p>I'd like to manually force a Reload of my React Native app on demand without physi... |
44,159,819 | How to dismiss an AlertDialog on a FlatButton click?<p>I have the following <code>AlertDialog</code>.</p>
<pre><code>showDialog(
context: context,
child: new AlertDialog(
title: const Text("Location disabled"),
content: const Text(
"""
Location is d... | <p><a href="https://docs.flutter.io/flutter/widgets/Navigator/pop.html" rel="noreferrer"><code>Navigator.pop()</code></a> should do the trick. You can also use that to return the result of the dialog (if it presented the user with choices)</p> | How to dismiss an AlertDialog on a FlatButton click? | android|ios|flutter|flutter-alertdialog | 136 | 111,112 | 17 | 44,160,351 | 44,160,351 | 219 | true | 2017-05-24T13:28:54.767Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to dismiss an AlertDialog on a FlatButton click?<p>I have the following <code>AlertDialog</code>.</p>
<pre><code>showDialog(
context: contex... |
44,010,506 | How tomreverse a string in python?<p>I have a string: </p>
<pre><code>ahdeg
</code></pre>
<p>What is the best way to reverse a string in python so it would be: </p>
<pre><code>gedha
</code></pre>
<p>Anything would help, thanks! </p> | <p>Say you have a string.</p>
<p><code>string = 'Test'</code></p>
<p><code>string[::-1]</code> would reverse this into 'tseT'</p> | How tomreverse a string in python? | python|string | -5 | 50 | 1 | 44,010,535 | 44,010,535 | -2 | true | 2017-05-16T19:57:10.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How tomreverse a string in python?<p>I have a string: </p>
<pre><code>ahdeg
</code></pre>
<p>What is the best way to reverse a string in python so it would... |
43,953,110 | Visual Studio 2015 Login Form Without Database<p>I'm using Visual Studio 2015 Professional and I'm new to that version. So my question will be a simple one.................But I really do need help with this code. This is a login form code without a database. But each time I coded it I can't use else statement and it k... | <p>You should replace ; from this line by {</p>
<pre><code>if (TxtUN.Text == Username && TxtPW.Text == Password);
</code></pre>
<p>And also compare strings with Equals function in this way:</p>
<pre><code>TxtUN.Text.Equals(Username) && TxtPW.Text.Equals(Password)
</code></pre>
<p>So that this line s... | Visual Studio 2015 Login Form Without Database | c#|visual-studio-2015 | -4 | 1,795 | 1 | 43,953,171 | 43,953,171 | 1 | true | 2017-05-13T12:22:39.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Visual Studio 2015 Login Form Without Database<p>I'm using Visual Studio 2015 Professional and I'm new to that version. So my question will be a simple one..... |
44,160,894 | Angular-cli : How to ignore class names from being minified<p>For an application we need to keep the classname not minified because we use</p>
<pre><code>var className = myObject.constructor.name;
export class myObject{ ... }
</code></pre>
<p>when we run</p>
<p>ng build -- pro</p>
<p>the class name gets minified in... | <p>Angular cli uses webpack and uglify internally. One solution would be changing the options in uglify by exporting the webpack configuration. You can see the webpack files by running ng eject, and ng eject --prod</p>
<pre><code>new UglifyJsPlugin({
"mangle": false,
"compress": {
"screw_ie8": true... | Angular-cli : How to ignore class names from being minified | angular|typescript|angular-cli|bundling-and-minification | 20 | 10,298 | 8 | 44,168,066 | 44,168,066 | 3 | true | 2017-05-24T14:10:49.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular-cli : How to ignore class names from being minified<p>For an application we need to keep the classname not minified because we use</p>
<pre><code>va... |
44,186,116 | Jenkins - How to reserve an executor for (a) specific job(s)<p>We have a Jenkins server with 8 executors and 20 jobs. 15 of those jobs take approximately 2 hours to finish while the remaining 5 take only 15 minutes. I would like to reserve 1 executor (or 2) to run those 5 small jobs only and restrict other jobs to run ... | <p>As i understand it Kiddo uses the master for 8 executors. What you can do is to add a new slave which runs on the master, let's call it slave-master. I.e. You will have master with 6 executors that has usage set to utilise as much as possible, and then slave-master which has usage restricted to only the short build... | Jenkins - How to reserve an executor for (a) specific job(s) | jenkins|jenkins-plugins | 10 | 13,095 | 5 | 44,194,922 | 44,194,922 | 3 | true | 2017-05-25T17:09:52.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Jenkins - How to reserve an executor for (a) specific job(s)<p>We have a Jenkins server with 8 executors and 20 jobs. 15 of those jobs take approximately 2 h... |
44,223,751 | How to add an empty map type column to DataFrame?<p>I want to add a new map type column to a dataframe, like this:</p>
<pre class="lang-none prettyprint-override"><code>|-- cMap: map (nullable = true)
| |-- key: string
| |-- value: string (valueContainsNull = true)
</code></pre>
<p>I tried the code:</p>
<pre clas... | <p>Unlike other types, <code>MapType</code> isn't an object you can just use as-is (it's not an object extending <code>DataType</code>), you have to call <code>MapType.apply(...)</code> which expects the key and value types as arguments (and returns an instance of the <code>MapType</code> <em>class</em>):</p>
<pre><co... | How to add an empty map type column to DataFrame? | dataframe|scala|apache-spark|dictionary|apache-spark-sql | 9 | 5,898 | 4 | 44,223,797 | 44,223,797 | 3 | true | 2017-05-28T04:14:36.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add an empty map type column to DataFrame?<p>I want to add a new map type column to a dataframe, like this:</p>
<pre class="lang-none prettyprint-over... |
44,334,746 | How to uninstall pre-commit<p>Following the "non administrative installation" instructions on Pre-Commit's <a href="http://pre-commit.com/" rel="noreferrer">website</a>, I ran the following command:</p>
<pre><code>curl http://pre-commit.com/install-local.py | python
</code></pre>
<p>These instructions provide the fol... | <p>How about this:</p>
<pre><code>curl http://pre-commit.com/install-local.py | python - uninstall
</code></pre> | How to uninstall pre-commit | python|uninstallation|pre-commit.com | 10 | 15,621 | 2 | 44,334,854 | 44,334,854 | 4 | true | 2017-06-02T17:49:27.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to uninstall pre-commit<p>Following the "non administrative installation" instructions on Pre-Commit's <a href="http://pre-commit.com/" rel="noreferrer">... |
44,332,481 | Django case insensitive "distinct" query<p>I am using this django query</p>
<pre><code>people.exclude(twitter_handle=None).distinct('twitter_handle').values_list('twitter_handle', flat=True)
</code></pre>
<p>My distinct query is returning two objects
For example : </p>
<pre><code>['Abc','abc']
</code></pre>
<p>Ho... | <p>You can use <a href="https://docs.djangoproject.com/en/1.11/ref/models/querysets/#django.db.models.query.QuerySet.annotate" rel="noreferrer"><code>.annotate()</code></a> along with <a href="https://docs.djangoproject.com/en/1.11/ref/models/expressions/#func-expressions" rel="noreferrer"><code>Func() expressions</cod... | Django case insensitive "distinct" query | python|django|orm | 8 | 2,304 | 2 | 44,333,189 | 44,333,189 | 5 | true | 2017-06-02T15:28:06.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django case insensitive "distinct" query<p>I am using this django query</p>
<pre><code>people.exclude(twitter_handle=None).distinct('twitter_handle').values... |
43,950,631 | Where does dev_dbg writes log to?<p>In a device driver source in the Linux tree, I saw <code>dev_dbg(...)</code> and <code>dev_err(...)</code>, where do I find the logged message?</p>
<p>One reference suggest to add <code>#define DEBUG</code> . The other <a href="https://01.org/linuxgraphics/gfx-docs/drm/admin-guide/... | <p><code>dev_dbg()</code> expands to <code>dynamic_dev_dbg()</code>, <code>dev_printk()</code>, or no-op depending on the compilation flags.</p>
<pre class="lang-c prettyprint-override"><code>#if defined(CONFIG_DYNAMIC_DEBUG)
#define dev_dbg(dev, format, ...) \
do { ... | Where does dev_dbg writes log to? | linux-device-driver | 7 | 6,975 | 2 | 43,957,671 | 43,957,671 | 7 | true | 2017-05-13T07:52:46.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Where does dev_dbg writes log to?<p>In a device driver source in the Linux tree, I saw <code>dev_dbg(...)</code> and <code>dev_err(...)</code>, where do I f... |
44,022,398 | Firebase - Share authentication across sub domains using firebase admin sdk<p>I have done some research about sharing the <code>auth object</code> across sub domains of my app. Apparently firebase's web sdk this setup. </p>
<p>My idea is to have a single login website <code>login.myapp.com</code> which can be used by ... | <p>It sounds like custom token minting is what you need. How about you <a href="https://firebase.google.com/docs/auth/admin/create-custom-tokens" rel="noreferrer">mint a custom token</a> in <code>login.myapp.com</code> using an Admin SDK, and then pass it to your requesting apps? These apps can then login to Firebase b... | Firebase - Share authentication across sub domains using firebase admin sdk | firebase|firebase-authentication|firebase-admin | 9 | 3,082 | 1 | 44,054,758 | 44,054,758 | 7 | true | 2017-05-17T10:33:11.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Firebase - Share authentication across sub domains using firebase admin sdk<p>I have done some research about sharing the <code>auth object</code> across sub... |
44,112,339 | JS Last index of a non-null element in an array<p>I have an array with defined and null values inside, like so :</p>
<pre><code>var arr = [
{...},
null,
null,
{...},
null
];
</code></pre>
<p>Is there any way for me to get the index of the last non-null element from this array?
And I mean without having to l... | <p>You could use a <code>while</code> loop and iterate from the end.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var array = [{ foo: 0 }, null, null, { bar: 42 }, null],
... | JS Last index of a non-null element in an array | javascript|arrays|indexing|null | 7 | 6,177 | 5 | 44,112,454 | 44,112,454 | 8 | true | 2017-05-22T12:00:42.883Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JS Last index of a non-null element in an array<p>I have an array with defined and null values inside, like so :</p>
<pre><code>var arr = [
{...},
null,... |
44,170,454 | Up/Down Key not working in Onenote 2016 for Autohotkey<p>I mapped alt+i/k to Up/down key using Autohotkey, with the following code:</p>
<pre><code>!i:: Send {up}
!k:: Send {down}
</code></pre>
<p>These remappings work with every application except Onenote 2016. I checked it online and found some discussions in the fo... | <h2>It works if you use <code>SendPlay</code> and run AHK script with UI Access</h2>
<p>This is your script with <code>Send</code> changed to <code>SendPlay</code>:</p>
<pre><code>!i::SendPlay {up}
!k::SendPlay {down}
</code></pre>
<p>It emulates <kbd>↑</kbd> and <kbd>↓</kbd> as you expect. Tested with OneNote 2016 ... | Up/Down Key not working in Onenote 2016 for Autohotkey | autohotkey|onenote | 14 | 1,809 | 7 | 44,336,298 | 44,336,298 | 8 | true | 2017-05-25T00:27:39.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Up/Down Key not working in Onenote 2016 for Autohotkey<p>I mapped alt+i/k to Up/down key using Autohotkey, with the following code:</p>
<pre><code>!i:: Send... |
44,054,395 | How to escape html placeholder attribute in rendered vue<p>I've setup a <a href="https://jsfiddle.net/jessycormier/qu1275ae/" rel="noreferrer">jsFiddle</a> to showcase the issue.</p>
<pre class="lang-html prettyprint-override"><code><div id="app">
<strong>{{title}}</strong><br>
<input ty... | <p>To use Unicode characters in Javascript you must properly escape them. To quote Microsoft's page on <a href="https://docs.microsoft.com/en-us/scripting/javascript/advanced/special-characters-javascript" rel="noreferrer">Special Characters (JavaScript)</a></p>
<blockquote>
<p>You can specify a Unicode character by... | How to escape html placeholder attribute in rendered vue | encoding|vuejs2|vue-component | 7 | 2,848 | 1 | 44,054,554 | 44,054,554 | 10 | true | 2017-05-18T17:30:37.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to escape html placeholder attribute in rendered vue<p>I've setup a <a href="https://jsfiddle.net/jessycormier/qu1275ae/" rel="noreferrer">jsFiddle</a> t... |
44,259,047 | How to remove App Service Certificate resource<p>So I have SSL certificate bought directly using Azure portal.</p>
<p>Now I migrated from Azure and want to delete every resource from Azure except my SQL Server and database.</p>
<p>When I try to delete App Service Certificate I have this error:</p>
<blockquote>
<p>... | <p>Go to azure resource portal (<a href="https://resources.azure.com" rel="noreferrer">https://resources.azure.com</a> ) and navigate to subscriptions --> <code>specific subscription</code> --> providers --> Microsoft.Web --> certificates and see if it is here and i think you can delete it from here directly. </p> | How to remove App Service Certificate resource | azure|ssl-certificate|azure-web-app-service | 8 | 6,159 | 2 | 44,269,847 | 44,269,847 | 10 | true | 2017-05-30T09:57:03.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove App Service Certificate resource<p>So I have SSL certificate bought directly using Azure portal.</p>
<p>Now I migrated from Azure and want to ... |
43,969,877 | Select only rows that occur at specific time<p>I have read in <code>C.csv</code> and the <code>datetime</code> column is a <code>object</code> type.</p>
<p>I want to get every row that has <code>23:45:00</code> in it, regardless of date. I would like to have <code>datetime</code> as index and i would like to convert <... | <pre><code>print(df)
datetime C H L O OI V WAP
0 2017-04-22 09:23:00 39.48 39.48 39.48 39.48 0 0 39.48
1 2017-04-22 09:24:00 39.48 39.48 39.48 39.48 0 0 39.48
2 2017-04-22 09:25:00 39.48 39.48 39.48 39.48 0 0 39.48
3 2017-04-22 09:26:00 39.44 39.44 3... | Select only rows that occur at specific time | python|pandas|datetime|time | 8 | 7,455 | 1 | 43,969,995 | 43,969,995 | 11 | true | 2017-05-14T23:50:37.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Select only rows that occur at specific time<p>I have read in <code>C.csv</code> and the <code>datetime</code> column is a <code>object</code> type.</p>
<p>... |
44,046,927 | Comparison of Ternary operator, Elvis operator, safe Navigation Operator and logical OR operators<h2>Comparison with Ternary operator vs Elvis operator vs safe Navigation Operator vs logical or operators in angular</h2>
<hr>
<h2>Ternary Operator(statement ? obj : obj)</h2>
<pre><code>let gender = user.male ? "male" ... | <p><strong>update</strong></p>
<p>With <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#optional-chaining" rel="nofollow noreferrer">TypeScript 3.7</a> they've implemented Optional Chaining, which is like the safe navigation operator, but then better. Also the <a href="https://ww... | Comparison of Ternary operator, Elvis operator, safe Navigation Operator and logical OR operators | angular|typescript|operators | 19 | 14,598 | 4 | 44,047,139 | 44,047,139 | 12 | true | 2017-05-18T11:48:55.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Comparison of Ternary operator, Elvis operator, safe Navigation Operator and logical OR operators<h2>Comparison with Ternary operator vs Elvis operator vs sa... |
44,274,493 | FIrebase Phone Authentication supported countries?<p>Does anyone know if Firebase Phone Authentication works for India phone numbers?</p>
<p>I successfully implemented and to work for US numbers (<code>+1xxxxxxxxxx</code>), but the text not received when I tried with an India phone number. Wasn't sure if it didn't wor... | <p>From the <a href="https://firebase.google.com/support/faq/#develop" rel="noreferrer">FAQ</a>, the list of supported countries for Firebase Phone Auth are:</p>
<blockquote>
<p>Firebase Authentication supports phone number verification across the the world, but not all networks reliably deliver our verification mes... | FIrebase Phone Authentication supported countries? | firebase|firebase-authentication|twitter-digits | 9 | 13,344 | 2 | 44,274,724 | 44,274,724 | 12 | true | 2017-05-31T02:03:48.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FIrebase Phone Authentication supported countries?<p>Does anyone know if Firebase Phone Authentication works for India phone numbers?</p>
<p>I successfully ... |
44,296,271 | Alamofire ServerTrustPolicy Certificate Pinning Not Blocking Charles Proxy Swift 3<p>I've searched far and wide and have not been able to find an answer for my question. To make our app more secure, we've been told to use "certificate pinning". We already make use of the Alamofire library for all our API calls, so it s... | <p>I'm going to answer my own question, only because I want to possibly help anyone else with this same problem in the future. When I was configuring the <code>serverTrustPolicies</code> above, you create a dictionary of <code>String : ServerTrustPolicy</code>, my error lied in the <code>String</code> for the server na... | Alamofire ServerTrustPolicy Certificate Pinning Not Blocking Charles Proxy Swift 3 | ios|swift|alamofire|http-proxy|certificate-pinning | 7 | 3,862 | 1 | 44,296,719 | 44,296,719 | 12 | true | 2017-05-31T23:37:09.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Alamofire ServerTrustPolicy Certificate Pinning Not Blocking Charles Proxy Swift 3<p>I've searched far and wide and have not been able to find an answer for ... |
43,953,048 | How to reset Firefox console without refreshing the page?<p>How can I reset a Firefox <a href="https://developer.mozilla.org/en-US/docs/Tools/Web_Console" rel="noreferrer">Web Console</a> in order to be able to use variables already declared?</p>
<p><code>console.clear()</code> will only clear the output. All variable... | <p>When testing something, use the same construction you would (well, should) use to prevent code and variables being dropped in the global scope. Use Immediately Invoked Function Expressions (IIFE) and place your code in it. Each IIFE is it's own context, so re-declaring is not a problem.</p>
<pre><code>(function () {... | How to reset Firefox console without refreshing the page? | firefox|firefox-developer-tools | 13 | 5,376 | 2 | 43,953,212 | 43,953,212 | 13 | true | 2017-05-13T12:14:47.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to reset Firefox console without refreshing the page?<p>How can I reset a Firefox <a href="https://developer.mozilla.org/en-US/docs/Tools/Web_Console" re... |
44,046,754 | Role of QueryRenderer in Relay Modern?<p>So, first <strong>a bit of background</strong>.
I'm a native iOS/Android developer who is now starting my first ever React Native project. It comes with all the benefits and pains of Javascript, but I like it a lot so far :-) I decided to also try my hand at GraphQL for the fir... | <p>So, after having worked some more with our app, I thought I'd come back to post about our thoughts and experiences so far, in the hopes that it helps someone. </p>
<p>Building on @Peter Suwara's great post, we arrived at a similar strategy initially</p>
<ul>
<li>Have a root/parent nav tree</li>
<li>For each screen... | Role of QueryRenderer in Relay Modern? | reactjs|graphql|relay | 19 | 2,360 | 2 | 44,238,066 | 44,238,066 | 13 | true | 2017-05-18T11:40:14.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Role of QueryRenderer in Relay Modern?<p>So, first <strong>a bit of background</strong>.
I'm a native iOS/Android developer who is now starting my first eve... |
44,146,939 | Restricting User on ability to chose maximum items from selectInput<p>Shiny function selectInput() gives an option to select multiple items from the dropdown list with 'multiple = TRUE'</p>
<p>However I want to restrict user on how many items max can be chosen from underlying dropdown list.</p>
<p>Can you please sugg... | <p>You can do this if you define it as <code>selectizeInput()</code> instead of <code>selectInput()</code>, and use the <code>options = list(maxItems = n)</code> parameter.</p>
<p>For example</p>
<pre><code>selectizeInput("select", "Select", LETTERS, options = list(maxItems = 4))
</code></pre> | Restricting User on ability to chose maximum items from selectInput | shiny | 11 | 2,339 | 1 | 44,150,085 | 44,150,085 | 15 | true | 2017-05-24T00:11:20.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Restricting User on ability to chose maximum items from selectInput<p>Shiny function selectInput() gives an option to select multiple items from the dropdown... |
44,251,583 | django allauth custom messages: Styling messages with html/css<p>Allauth's the messages are stored as text files in the templates directory by default and these look something like:</p>
<pre><code>{% load i18n %}
{% blocktrans %}You cannot remove your primary e-mail address ({{email}}).{% endblocktrans %}
</code></pre... | <p>The template is the place for message styling markup, not the messages <code>.txt</code> files. You should be able to achieve the per case variation through Django's defaults, or conditional statements if needed. I see you're using Bootstrap, and for many use cases, the default Django messaging tags map nicely onto ... | django allauth custom messages: Styling messages with html/css | html|css|django|django-allauth|django-messages | 7 | 7,189 | 1 | 44,252,256 | 44,252,256 | 15 | true | 2017-05-29T23:55:30.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
django allauth custom messages: Styling messages with html/css<p>Allauth's the messages are stored as text files in the templates directory by default and th... |
44,081,249 | How to migrate existing SQLite application to Room Persistance Library?<p>It might be a bit early to ask, but is it possible and how to migrate/upgrade an existing SQLite database application to a new Android Room Persistance Library?</p> | <p>Assuming your room entities match your current table schemas, you can keep using the same database/tables.</p>
<p>Room manages a master table which is initialized on creation or upgrade of the database, so you need to increment your database version and provide a dummy migration:</p>
<pre><code>@Database(entities ... | How to migrate existing SQLite application to Room Persistance Library? | android|database|sqlite|orm|android-room | 17 | 6,684 | 2 | 44,121,200 | 44,121,200 | 16 | true | 2017-05-20T02:11:12.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to migrate existing SQLite application to Room Persistance Library?<p>It might be a bit early to ask, but is it possible and how to migrate/upgrade an ex... |
44,145,215 | CUDA surfaces vs textures<p>What is the difference between a surface and texture object in CUDA? When should I use one or the other?</p>
<p>As far as I can tell from the developer documentation, they are exactly the same. Both appear to be CUDA arrays that use special texture memory. The only difference seems to be th... | <p><a href="http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#texture-memory" rel="noreferrer">Textures</a> are read-only, <a href="http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#surface-memory" rel="noreferrer">surfaces</a> are writable and readable. The surface API was introduced later ... | CUDA surfaces vs textures | memory|cuda | 12 | 4,125 | 1 | 44,146,215 | 44,146,215 | 16 | true | 2017-05-23T21:18:25.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CUDA surfaces vs textures<p>What is the difference between a surface and texture object in CUDA? When should I use one or the other?</p>
<p>As far as I can ... |
44,318,374 | How to duplicate a Redshift table schema?<p>I'm trying to duplicate a Redshift table including modifiers.</p>
<p>I've tried using a CTAS statement and for some reason that fails to copy modifiers like <code>not null</code></p>
<pre><code>create table public.my_table as (select * from public.my_old_table limit 1);
</c... | <p>According to the <a href="http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_TABLE_NEW.html" rel="nofollow noreferrer">docs</a> you can do </p>
<pre><code>CREATE TABLE my_table(LIKE my_old_table);
</code></pre> | How to duplicate a Redshift table schema? | amazon-web-services|duplicates|copy|amazon-redshift | 9 | 11,060 | 1 | 44,318,466 | 44,318,466 | 17 | true | 2017-06-01T23:04:11.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to duplicate a Redshift table schema?<p>I'm trying to duplicate a Redshift table including modifiers.</p>
<p>I've tried using a CTAS statement and for s... |
44,307,771 | curl command a gzipped POST body to an apache server<p>With mod_deflate properly activated on my apache 2.2 server, I am trying to send a gzipped body via curl command line.</p>
<p>All tutorials I have seen say to add -H'Content-Encoding: gzip' and gzip my body file, however this fails:</p>
<pre><code>echo '{ "mydumm... | <p>The thing is that mod_deflate does not like the gzip header shown here:</p>
<pre><code>hexdump -C body.gz
00000000 1f 8b 08 08 20 08 30 59 00 03 62 6f 64 79 00 ab |.... .0Y..body..|
00000010 56 50 ca ad 4c 29 cd cd ad 54 52 b0 52 50 ca 2a |VP..L)...TR.RP.*|
00000020 ce cf 53 52 a8 e5 02 00 a6 6a 24 99 17 00... | curl command a gzipped POST body to an apache server | apache|curl|post|compression|gzip | 14 | 17,971 | 2 | 44,307,772 | 44,307,772 | 18 | true | 2017-06-01T12:38:03.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
curl command a gzipped POST body to an apache server<p>With mod_deflate properly activated on my apache 2.2 server, I am trying to send a gzipped body via cu... |
44,153,451 | PrimeNG manually invoke FileUpload<p>I want to select the files first and then to start upload those files by an another button instead of component's own <code>Upload</code> button.</p>
<p>How can I do this?</p>
<p><strong>Example code what I've tried:</strong></p>
<pre><code><button pButton type="button" label=... | <p>Example code which works for me</p>
<pre><code>import {FileUpload} from 'primeng/primeng';
@Component({
...
})
export class AppComponent {
@ViewChild('fileInput') fileInput: FileUpload;
startUpload(){
this.fileInput.upload();
}
}
</code></pre>
<p><strong><a href="https://plnkr.co/edit/wNZGM... | PrimeNG manually invoke FileUpload | angular|typescript|primeng | 9 | 9,788 | 2 | 44,153,753 | 44,153,753 | 19 | true | 2017-05-24T08:50:08.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PrimeNG manually invoke FileUpload<p>I want to select the files first and then to start upload those files by an another button instead of component's own <c... |
44,273,599 | UDP communication using c++ boost asio<p>I need to communicate with a different device in a private network over UDP. I am new to using boost, but based on what I searched online and also the tutorials on Boost website, I came up with below code.. I am currently trying to send and receive data from my own device. Just ... | <p>You forget to</p>
<ol>
<li>bind the receiving socket</li>
<li>run the <code>io_service</code></li>
<li>use the same UDP port for the receiver</li>
</ol>
<p>There's no use doing <code>async_*</code> calls in a loop, because all it does is queue tasks, which won't get executed unless a thread runs <code>io_service::... | UDP communication using c++ boost asio | c++|sockets|boost|udp|boost-asio | 10 | 28,205 | 1 | 44,273,900 | 44,273,900 | 19 | true | 2017-05-30T23:48:14.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
UDP communication using c++ boost asio<p>I need to communicate with a different device in a private network over UDP. I am new to using boost, but based on w... |
44,207,534 | How do I specify optional prop types in flow?<p>I'd like to declare a component in an external library definition (I'm writing flow types for <code>react-bootstrap</code>) so that I have optional and required props, and no extra props. I have the following:</p>
<pre><code>declare export type AlertProps = {|
bsClass:... | <p>You can specify optional props by putting a ? after the property name. For example</p>
<pre><code>type Props = {
optionalString?: string,
maybeString: ?string,
}
</code></pre>
<p>I can omit optionalString, but if I pass it, it must be a string or undefined. maybeString I must pass, but it's value can be null, ... | How do I specify optional prop types in flow? | reactjs|flowtype|react-proptypes | 8 | 7,970 | 1 | 44,212,369 | 44,212,369 | 20 | true | 2017-05-26T17:53:07.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I specify optional prop types in flow?<p>I'd like to declare a component in an external library definition (I'm writing flow types for <code>react-boo... |
43,962,012 | How to connect nodeJS docker container to mongoDB<p>I have problems to connect a nodeJS application which is running as a docker container to a mongoDB. Let me explain what I have done so far:</p>
<pre><code>$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NA... | <p>There are couple of ways to do it.</p>
<ul>
<li><p>run your app in the same network as your mongodb:</p>
<pre><code>docker run --net container:mongo_live your_app_docker_image
# then you can use mongodb in your localhost
$ ENV MONGO_URL mongodb://localhost:27017/
</code></pre></li>
<li><p>Also you can link two co... | How to connect nodeJS docker container to mongoDB | node.js|mongodb|docker | 13 | 17,703 | 4 | 43,962,099 | 43,962,099 | 21 | true | 2017-05-14T08:45:02.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to connect nodeJS docker container to mongoDB<p>I have problems to connect a nodeJS application which is running as a docker container to a mongoDB. Let ... |
44,003,428 | Insert a list using dapper.NET C#<p>I'd like to insert a list of objects in an SQL table.</p>
<p>I know this question <a href="https://stackoverflow.com/questions/21209757/dapper-insert-a-list">here</a> but I don't understand.</p>
<p>Here is my class :</p>
<pre><code>public class MyObject
{
public int? ID { get... | <p>You can insert these just as you would INSERT a single line:</p>
<pre><code>public class MyObject
{
public int? ID { get; set; }
public string ObjectType { get; set; }
public string Content { get; set; }
public string PreviewContent { get; set; }
public static void SaveList(List<MyObject>... | Insert a list using dapper.NET C# | c#|sql|list|dapper | 11 | 25,088 | 5 | 44,003,682 | 44,003,682 | 21 | true | 2017-05-16T13:52:16.573Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Insert a list using dapper.NET C#<p>I'd like to insert a list of objects in an SQL table.</p>
<p>I know this question <a href="https://stackoverflow.com/que... |
44,002,460 | Getting object store already exists inside onupgradeneeded<p>My code is as follows (usually naming convention for the well-known objects):</p>
<pre><code>var DBOpenRequest = window.indexedDB.open("messages", 6);
//...
DBOpenRequest.onupgradeneeded = function(event) {
console.log("Need to upgrade.");
var db = even... | <blockquote>
<p>Isn't the createObjectStore operating on a new version of the database which is empty?</p>
</blockquote>
<p>When you get <code>upgradeneeded</code> the database is in whatever state you left it in before. Since you don't know what versions of your code a user will have visited, you need to look at th... | Getting object store already exists inside onupgradeneeded | javascript|indexeddb | 9 | 4,373 | 2 | 44,007,456 | 44,007,456 | 23 | true | 2017-05-16T13:10:41.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting object store already exists inside onupgradeneeded<p>My code is as follows (usually naming convention for the well-known objects):</p>
<pre><code>va... |
44,103,804 | Inline style is not working ReactJS<p>I am trying to learn React. Why can you not use style inside of a return inside of a component?</p>
<p>The Error:</p>
<blockquote>
<p>The <code>style</code> prop expects a mapping from style properties to values,
not a string. For example, style={{marginRight: spacing + 'em'}... | <p><strong>From <a href="https://facebook.github.io/react/docs/dom-elements.html#style" rel="noreferrer">DOC</a></strong>:</p>
<blockquote>
<p>In React, inline styles are not specified as a string. Instead they
are specified with an object whose key is the camelCased version of
the style name, and whose value is... | Inline style is not working ReactJS | reactjs | 19 | 31,236 | 5 | 44,103,916 | 44,103,916 | 23 | true | 2017-05-22T02:31:41.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Inline style is not working ReactJS<p>I am trying to learn React. Why can you not use style inside of a return inside of a component?</p>
<p>The Error:</p>
... |
44,184,834 | Value error: Input arrays should have the same number of samples as target arrays. Found 1600 input samples and 6400 target samples<p>I'm trying to do a 8-class classification. Here is the code:</p>
<pre><code>import keras
import numpy as np
from keras.preprocessing.image import ImageDataGenerator
from keras.models im... | <p>It looks like the number of examples in X_train i.e. train_data doesn't match with the number of examples in y_train i.e. train_labels. Can you double check it? And, in the future, please attach the full error since it helps in debugging the issue.</p> | Value error: Input arrays should have the same number of samples as target arrays. Found 1600 input samples and 6400 target samples | python|arrays|numpy|keras | 16 | 45,899 | 5 | 44,184,954 | 44,184,954 | 23 | true | 2017-05-25T15:56:59.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Value error: Input arrays should have the same number of samples as target arrays. Found 1600 input samples and 6400 target samples<p>I'm trying to do a 8-cl... |
44,299,666 | When global_variables_initializer() is actually required<pre><code>import tensorflow as tf
x = tf.constant(35, name='x')
y = tf.Variable(x + 5, name='y')
# model = tf.global_variables_initializer()
with tf.Session() as session:
print("x = ", session.run(x))
# session.run(model)
print("y = ", se... | <p><a href="https://www.tensorflow.org/api_docs/python/tf/global_variables_initializer" rel="noreferrer"><code>tf.global_variables_initializer</code></a> is a shortcut to initialize all global variables. It is not required, and you can use other ways to initialize your variables or in case of easy scripts sometimes you... | When global_variables_initializer() is actually required | python|python-3.x|tensorflow|initializer | 26 | 25,668 | 4 | 44,300,704 | 44,300,704 | 23 | true | 2017-06-01T06:06:15.983Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When global_variables_initializer() is actually required<pre><code>import tensorflow as tf
x = tf.constant(35, name='x')
y = tf.Variable(x + 5, name='y')
# m... |
43,959,824 | Instead, use a data or computed property based on the prop's value. Vue JS<p>Well, I'm trying to change a value of "variable" in Vue, but when I click on the button they throw a message in console:</p>
<pre><code>[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent compone... | <p>The warning is pretty clear. In your <code>changeValue</code> method you are changing the value of the property, <code>menuOpen</code>. This will change the value internally to the component, but if the <em>parent</em> component has to re-render for any reason, then whatever the value is <em>inside</em> the componen... | Instead, use a data or computed property based on the prop's value. Vue JS | javascript|vue.js|vuejs2|vue-component | 17 | 25,403 | 1 | 43,960,134 | 43,960,134 | 25 | true | 2017-05-14T02:29:08.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Instead, use a data or computed property based on the prop's value. Vue JS<p>Well, I'm trying to change a value of "variable" in Vue, but when I click on the... |
43,990,356 | Xamarin "xcodebuild output not as expected"<p>I'm trying to get Xamarin.UITests working for an iOS project and I keep getting this error:</p>
<p><code>SetUp : Calabash.XDB.Core.Exceptions.ExternalProcessException : xcodebuild output not as expected</code></p>
<p>If anybody has any idea how to continue debugging this,... | <p>For those struggling with the same issue: My problem was that XCode tools could not be located. How to fix:</p>
<ol>
<li>Open XCode > Preferences > Location > XCodeTools</li>
<li>Select XCode from the "Command Line Tools" drop down.
<a href="https://i.stack.imgur.com/3E68C.png" rel="noreferrer">screenshot here</a><... | Xamarin "xcodebuild output not as expected" | xamarin|xamarin.ios|calabash|xamarin.uitest | 12 | 1,608 | 1 | 43,990,403 | 43,990,403 | 26 | true | 2017-05-15T23:39:22.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Xamarin "xcodebuild output not as expected"<p>I'm trying to get Xamarin.UITests working for an iOS project and I keep getting this error:</p>
<p><code>SetUp... |
43,991,498 | RSelenium: server signals port is already in use<p>I'm using the following code in RSelenium to open a browser. After I close the browser, or even close the handler by running remDr$close(), the port is still in use. I have to go to the terminal and manually kill the process so that the same port becomes available. Is ... | <p>The process is composed of two parts a server (the Selenium Server) and a client
(the browser you initiate). The <code>close</code> method of the remoteDriver class closes the client (the browser). The server also needs to be stopped when you are finished. </p>
<p>To stop the server when you are finished:</p>
<pre... | RSelenium: server signals port is already in use | r|rselenium | 28 | 17,459 | 7 | 43,993,442 | 43,993,442 | 26 | true | 2017-05-16T02:16:40.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RSelenium: server signals port is already in use<p>I'm using the following code in RSelenium to open a browser. After I close the browser, or even close the ... |
44,016,688 | Unable to list kafka topics in openwhisk setup<p>Setup details:
I am setting up openwhisk on my local ubuntu(16.04) vm. in this setup kafka is running in one docker and zookeeper in another docker.</p>
<p>I connect to the the kafka docker using cmd </p>
<pre><code>sudo docker exec -it <container id> sh
</code>... | <p>The <a href="https://hub.docker.com/r/ches/kafka/" rel="noreferrer">Kafka container OpenWhisk is using</a> sets a <code>JMX_PORT</code> by default. That's the 7203 port you're seeing. To get your script to work you need to unset that environment setting:</p>
<pre><code>unset JMX_PORT; bin/kafka-topics.sh --list --z... | Unable to list kafka topics in openwhisk setup | docker|apache-kafka|openwhisk | 9 | 8,770 | 1 | 44,017,005 | 44,017,005 | 26 | true | 2017-05-17T05:57:23.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to list kafka topics in openwhisk setup<p>Setup details:
I am setting up openwhisk on my local ubuntu(16.04) vm. in this setup kafka is running in on... |
44,286,941 | give active class onclick in ngFor angular 2<p>Hi I have unordered list and all of them have active class. I want to toggle active class when clicked to any list item. My code is like this</p>
<pre><code><ul class="sub_modules">
<li *ngFor="let subModule of subModules" class="active">
<a>{{ sub... | <p>You can do something like: </p>
<pre class="lang-xml prettyprint-override"><code><ul class="sub_modules">
<li (click)="activateClass(subModule)"
*ngFor="let subModule of subModules"
[ngClass]="{'active': subModule.active}">
<a>{{ subModule.name }}</a>
</li>
</ul&... | give active class onclick in ngFor angular 2 | angular|ng-class|ngfor | 19 | 57,118 | 5 | 44,287,475 | 44,287,475 | 26 | true | 2017-05-31T14:03:29.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
give active class onclick in ngFor angular 2<p>Hi I have unordered list and all of them have active class. I want to toggle active class when clicked to any ... |
44,315,368 | Export higher order components without 'export default'<p>I am using <code>react-click-outside</code> to hide dropdown menus if the user clicks outside the menu. Normally, I would export the component like so:</p>
<pre><code>export default enhanceWithClickOutside(Dropdown);
</code></pre>
<p>However, in this case, I w... | <pre><code>export class Dropdown extends React.component {
...
}
export const EnhancedDropdown = enhanceWithClickOutside(Dropdown);
</code></pre>
<p>Somewhere else</p>
<pre><code>import { Dropdown, EnhancedDropdown } from 'path/to/Dropdown';
</code></pre> | Export higher order components without 'export default' | reactjs|higher-order-components | 15 | 6,150 | 1 | 44,315,425 | 44,315,425 | 26 | true | 2017-06-01T19:13:14.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Export higher order components without 'export default'<p>I am using <code>react-click-outside</code> to hide dropdown menus if the user clicks outside the m... |
44,005,681 | Node JS browser simulation (cookies, sessions, headers)<p>I need to make requests from node js like a normal browser.
What do I mean ? </p>
<ol>
<li>I can set any HTTP information, like cookies, headers, body. So to built HTTP request as I want.</li>
<li>After the request is made, all response data should be readable... | <p>For situations where you don't need to parse HTML or run client-side JavaScript, you can use simple tools like Request or SuperAgent:</p>
<ul>
<li><a href="https://www.npmjs.com/package/request" rel="noreferrer">https://www.npmjs.com/package/request</a></li>
<li><a href="https://www.npmjs.com/package/superagent" re... | Node JS browser simulation (cookies, sessions, headers) | javascript|node.js|cookies|browser|request | 14 | 24,612 | 2 | 44,005,813 | 44,005,813 | 28 | true | 2017-05-16T15:30:23.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Node JS browser simulation (cookies, sessions, headers)<p>I need to make requests from node js like a normal browser.
What do I mean ? </p>
<ol>
<li>I can ... |
43,948,828 | How to pass an array of items in React.js<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const ListItem = React.createClass({
render: function() {
return <li > {
t... | <p>Data can be passed to components via props.</p>
<p><a href="https://facebook.github.io/react/tutorial/tutorial.html#passing-data-through-props" rel="noreferrer">https://facebook.github.io/react/tutorial/tutorial.html#passing-data-through-props</a></p>
<p>In your case props would be accessed inside the components v... | How to pass an array of items in React.js | reactjs | 13 | 70,668 | 2 | 43,948,864 | 43,948,864 | 33 | true | 2017-05-13T03:09:01.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass an array of items in React.js<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
<div class="snippet-... |
44,051,059 | How do you change a user in PostgreSQL?<pre><code>postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication | {}
shor... | <p>When you display the <code>psql</code> online help by entering <code>\?</code> you can see:</p>
<pre><code>Connection
\c[onnect] {[DBNAME|- USER|- HOST|- PORT|-] | conninfo}
connect to new database (currently "postgres")
</code></pre>
<p>So you need to use:</p>
<pre><code>\c shorturl sh... | How do you change a user in PostgreSQL? | postgresql|psql | 21 | 48,642 | 2 | 44,051,135 | 44,051,135 | 34 | true | 2017-05-18T14:49:09.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you change a user in PostgreSQL?<pre><code>postgres=# \du
List of roles
Role name | Attributes ... |
44,010,057 | Add background image with fabric.js<p>I'm able to add images by using an input type="file" id="file" however would like to be able upload an image that can be moved and stay behind all else as a background image. Right now I can add something and send it to the back but moving it is difficult because the controls run o... | <p>You can use the <a href="http://fabricjs.com/docs/fabric.StaticCanvas.html#setBackgroundImage" rel="noreferrer"><strong><code>setBackgroundImage()</code></strong></a> method to add a background image to the canvas with fabric.js.</p>
<pre><code>document.getElementById(id).addEventListener("change", function(e) {
... | Add background image with fabric.js | javascript|jquery|html|css|fabricjs | 11 | 28,214 | 2 | 44,011,767 | 44,011,767 | 41 | true | 2017-05-16T19:31:16.213Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add background image with fabric.js<p>I'm able to add images by using an input type="file" id="file" however would like to be able upload an image that can b... |
44,003,371 | All row sum with pandas except one<p>I have several tables on a PostgreSQL database that look more or less like that:</p>
<pre><code>gid col2 col1 col3
6 15 45 77
1 15 45 57
2 14 0.2 42
3 12 6 37
4 ... | <p>Use <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.drop.html" rel="noreferrer"><code>drop</code></a> + <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.sum.html" rel="noreferrer"><code>sum</code></a>:</p>
<pre><code>df['sum'] = df.drop('gid', axis=1).s... | All row sum with pandas except one | python|postgresql|pandas|numpy | 13 | 19,735 | 1 | 44,003,409 | 44,003,409 | 43 | true | 2017-05-16T13:49:39.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
All row sum with pandas except one<p>I have several tables on a PostgreSQL database that look more or less like that:</p>
<pre><code>gid col2 col... |
44,291,781 | Dynamically changing number of columns in React Native Flat List<p>I have a <code>FlatList</code> where I want to change the number of columns based on orientation. However, I get the red screen when I do this. As per the red screen error message, I'm not quite sure how I should be changing the key prop. Any help is ap... | <p>From the <a href="https://facebook.github.io/react-native/docs/flatlist.html" rel="noreferrer">documentation</a>, looks like you should do something like this</p>
<pre><code>key={(this.state.horizontal ? 'h' : 'v')}
</code></pre> | Dynamically changing number of columns in React Native Flat List | reactjs|react-native|react-native-flatlist | 24 | 19,475 | 7 | 44,298,055 | 44,298,055 | 53 | true | 2017-05-31T18:02:50.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dynamically changing number of columns in React Native Flat List<p>I have a <code>FlatList</code> where I want to change the number of columns based on orien... |
44,362,502 | IntelliJ Optimize Imports for the entire scala project<p>One of the very useful features of IntelliJ is that when I am done editing a file, I can do a "optimize imports". this removes all the unused imports from my code.</p>
<p>This is very useful, but I have to do it for every file.</p>
<p>Can I do "optimize imports... | <p>Select the source root in the project tree; </p>
<p><strong>1. Hit the keyboard shortcut for "<em>Optimize import</em>"</strong></p>
<p><strong>MAC</strong></p>
<pre><code>Cmd-shift-A
</code></pre>
<p><strong>Windows</strong></p>
<pre><code>Ctrl-shift-A
</code></pre>
<p><strong>2. You will see</strong></p>
... | IntelliJ Optimize Imports for the entire scala project | intellij-idea | 34 | 9,484 | 1 | 44,362,569 | 44,362,569 | 60 | true | 2017-06-05T05:53:23.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
IntelliJ Optimize Imports for the entire scala project<p>One of the very useful features of IntelliJ is that when I am done editing a file, I can do a "optim... |
44,161,288 | Robomongo : Exceeded memory limit for $group<p>I`m using a script to remove duplicates on mongo, it worked in a collection with 10 items that I used as a test but when I used for the real collection with 6 million documents, I get an error.</p>
<p>This is the script which I ran in Robomongo (now known as <a href="http... | <pre><code>{ allowDiskUse: true }
</code></pre>
<p>Should be placed right after the aggregation pipeline.</p>
<p>In your code this should go like this:</p>
<pre><code>db.getCollection('RAW_COLLECTION').aggregate([
// Group on unique value storing _id values to array and count
{ "$group": {
"_id... | Robomongo : Exceeded memory limit for $group | mongodb|duplicates|out-of-memory | 33 | 36,684 | 4 | 44,161,889 | 44,161,889 | 68 | true | 2017-05-24T14:26:37.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Robomongo : Exceeded memory limit for $group<p>I`m using a script to remove duplicates on mongo, it worked in a collection with 10 items that I used as a tes... |
44,184,769 | Android Room - Select query with LIKE<p>I'm trying to make a query to search all objects whose names contain text:</p>
<pre><code>@Query("SELECT * FROM hamster WHERE name LIKE %:arg0%")
fun loadHamsters(search: String?): Flowable<List<Hamster>>
</code></pre>
<p>Messages:</p>
<pre><code>Error:no vi... | <p>You should enclose the <code>%</code> characters in your input query - not in the query itself.</p>
<p>E.g. try this:</p>
<pre><code>@Query("SELECT * FROM hamster WHERE name LIKE :arg0")
fun loadHamsters(search: String?): Flowable<List<Hamster>>
</code></pre>
<p>Then your <code>String search</code> va... | Android Room - Select query with LIKE | android|kotlin|android-room | 149 | 66,636 | 4 | 44,185,385 | 44,185,385 | 196 | true | 2017-05-25T15:53:41.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Android Room - Select query with LIKE<p>I'm trying to make a query to search all objects whose names contain text:</p>
<pre><code>@Query("SELECT * FROM ... |
44,020,790 | I need a way to Select perticular rows from one excel sheet and copy them in other if condition matches<p>I have a table1 in sheet A and a table2 in sheet B (B has 2 columns Date & ContentXYZ).</p>
<p>Conditions: If any cell in ContentXYZ column of Sheet B contains a substring say "abc" copy that complete row to t... | <p>A simple macro to do your task,</p>
<pre><code>Sub copyrow()
Dim i As Long, j As Long
j = Sheets("SheetA").Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To Sheets("SheetB").Cells(Rows.Count, "A").End(xlUp).Row
If InStr(Cells(i, 2), "abc") > 0 Then
Sheets("SheetA").Cells((j + 1), "A") = Cells(i, 1)
... | I need a way to Select perticular rows from one excel sheet and copy them in other if condition matches | excel|vba | -5 | 51 | 1 | 44,032,346 | 44,032,346 | 0 | true | 2017-05-17T09:27:12.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I need a way to Select perticular rows from one excel sheet and copy them in other if condition matches<p>I have a table1 in sheet A and a table2 in sheet B ... |
44,031,530 | Is using AWS S3 with AWS EC2 necessary?<p>I have been using EC2 for several months now for my mobile application, and I have come to a point where I would like to make the server as great as I can...</p>
<p>I have just been using EC2 and uploading images/video etc to it, now after 6-8 of research, I am quite confused!... | <p><strong>Amazon EC2</strong> is a virtual computer that can run whatever software you wish. For example, you could run an Apache web server with PHP so that your website can run custom logic.</p>
<p><strong>Amazon S3</strong> is an object storage service that can store as much data as you like, with the optional abi... | Is using AWS S3 with AWS EC2 necessary? | amazon-web-services|amazon-s3|amazon-ec2 | -4 | 58 | 1 | 44,035,999 | 44,035,999 | 0 | true | 2017-05-17T17:38:16.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is using AWS S3 with AWS EC2 necessary?<p>I have been using EC2 for several months now for my mobile application, and I have come to a point where I would li... |
44,341,481 | Variable strings of a url<p>There are several different cities to scrap through</p>
<pre><code>www.domain.ru/moskva
www.domain.ru/sanktpeterburg
www.domain.ru/yekaterinburg
</code></pre>
<p>How do I iterate operations with every of this domain without writing the entire url?
How do I make a variable?
i = moskva, sank... | <pre><code>for i in ["moskva","sanktpeterburg","yekaterinburg"]:
process("https://www.domain.ru/"+i)
</code></pre>
<p>You'll want to change <code>process</code> to the actual name of the function.</p> | Variable strings of a url | python|beautifulsoup | -3 | 21 | 1 | 44,341,504 | 44,341,504 | 0 | true | 2017-06-03T07:24:26.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Variable strings of a url<p>There are several different cities to scrap through</p>
<pre><code>www.domain.ru/moskva
www.domain.ru/sanktpeterburg
www.domain.... |
44,223,001 | How to get a local copy of a website from a hosting site?<p>I'm redesigning a website and I need to have a local copy from the hosting service but it doesn't show where to 'fork' a website? I can't even tell if it's on wordpress or not? I'm new to this so any input would be highly appreciated. </p> | <p>You are going to need to use the services cPanel then file manager if it has one.</p>
<p>Another option would be to SFTP or FTP into the hosting and pull the files via a client like <a href="https://filezilla-project.org/" rel="nofollow noreferrer">FileZilla</a>.</p>
<p>Or if you have SSH access you can sFTP or ad... | How to get a local copy of a website from a hosting site? | wordpress|web-hosting | -3 | 42 | 2 | 44,223,023 | 44,223,023 | 2 | true | 2017-05-28T01:26:29.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get a local copy of a website from a hosting site?<p>I'm redesigning a website and I need to have a local copy from the hosting service but it doesn't... |
44,289,677 | Firebase Auth Couldn't Verify Domain<p>I have a Firebase account, and I want to tailor the email address from which verification emails are sent. I follow the instructions.</p>
<p><a href="https://i.stack.imgur.com/KdA4M.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KdA4M.png" alt="enter image description ... | <p>Maybe the trailing space on your TXT record?</p>
<pre><code>$ dig txt thewhozoo.com
; <<>> DiG 9.8.3-P1 <<>> txt thewhozoo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59407
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ... | Firebase Auth Couldn't Verify Domain | firebase|firebase-authentication | 11 | 2,877 | 3 | 44,449,006 | 44,449,006 | 2 | true | 2017-05-31T16:07:49.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Firebase Auth Couldn't Verify Domain<p>I have a Firebase account, and I want to tailor the email address from which verification emails are sent. I follow th... |
44,165,510 | How to convert FileStreamResult to IFormFile?<p>I change the size of the image with this code. But this method returns <code>FileStreamResult</code>. I want to convert <code>FileStreamResult</code> to <code>IFromFile</code>. How can I do that?</p>
<p>Note: I am using <a href="https://github.com/CoreCompat/CoreCompat" ... | <p>This should handle converting your FileStreamResult to a FormFile:</p>
<pre><code>public IFormFile ReturnFormFile(FileStreamResult result)
{
var ms = new MemoryStream();
try
{
result.FileStream.CopyTo(ms);
return new FormFile(ms, 0, ms.Length);
}
catch(Exception e){
ms.Dis... | How to convert FileStreamResult to IFormFile? | c#|asp.net-mvc | 7 | 21,518 | 2 | 44,165,736 | 44,165,736 | 3 | true | 2017-05-24T17:58:15.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert FileStreamResult to IFormFile?<p>I change the size of the image with this code. But this method returns <code>FileStreamResult</code>. I want ... |
44,342,619 | Apache Zeppelin - How to use Helium framework in Apache Zeppelin<p>From Zeppelin-0.7, Zeppelin started supporting Helium plugins/packages using Helium Framework. However, I am not able to view any of the plugin on Helium page (localhost:8080/#/helium). As per this <a href="https://issues.apache.org/jira/browse/ZEPPELIN... | <h3>Zeppelin 0.7.x</h3>
<p>Zeppelin 0.7.x doesn't support the online registry. In other words,
Zeppelin doesn't use <code>helium.json</code>. So you need to install each package by yourself. </p>
<ol>
<li>clone the helium package what you want to install</li>
<li>modify the <code>artifact</code> value to the <stron... | Apache Zeppelin - How to use Helium framework in Apache Zeppelin | apache|apache-zeppelin | 9 | 4,924 | 1 | 44,350,750 | 44,350,750 | 5 | true | 2017-06-03T09:50:01.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Apache Zeppelin - How to use Helium framework in Apache Zeppelin<p>From Zeppelin-0.7, Zeppelin started supporting Helium plugins/packages using Helium Framew... |
44,217,188 | JWT Security with IP Addresses<p>I am building a Web Application using Angular 2 and the backend service built in ASP.NET Core Web API. </p>
<p>For authentication, I am thinking of using <code>JWT</code> and storing the token in a Secure HttpOnly Cookie.</p>
<p>For extra security, I am also thinking of capturing the ... | <p>My initial thought was that using JWT in a cookie to connect to an API is not the typical use case, why don't you use a standard MVC app then, but that's not your question and actually it's equally secure as long as the token is in a secure, httponly cookie (and of course the implementation is correct). It's just a ... | JWT Security with IP Addresses | security|authentication|cookies|asp.net-core|jwt | 15 | 11,801 | 3 | 44,220,409 | 44,220,409 | 6 | true | 2017-05-27T13:02:24.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JWT Security with IP Addresses<p>I am building a Web Application using Angular 2 and the backend service built in ASP.NET Core Web API. </p>
<p>For authenti... |
44,310,019 | Google play developer console crash reports<p>I am looking for an API to pull my app's crash reports programmatically and I can't seem to find if this exists or not. I read through the google play developer API docs but it seems like it's for publishing your app and managing game related actions. </p>
<p>Anyone know i... | <p>EDIT, quote from the support site:</p>
<blockquote>
<p>As of May 2018, you can no longer download detailed reports for crashes and ANRs.</p>
</blockquote>
<p>Old answer:</p>
<p>You can access Crashes and ANR's using gsutil</p>
<p><a href="https://support.google.com/googleplay/android-developer/answer/6135870?h... | Google play developer console crash reports | android|google-play|google-play-developer-api | 12 | 11,300 | 2 | 44,310,565 | 44,310,565 | 6 | true | 2017-06-01T14:17:15.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google play developer console crash reports<p>I am looking for an API to pull my app's crash reports programmatically and I can't seem to find if this exists... |
37,690,920 | Conditional step/stage in Jenkins pipeline<p>How do you run a build step/stage only if building a specific branch?</p>
<p>For example, run a deployment step only if the branch is called <code>deployment</code>, leaving everything else the same.</p> | <p>Doing the same in declarative pipeline syntax, below are few examples:</p>
<pre><code>stage('master-branch-stuff') {
when {
branch 'master'
}
steps {
echo 'run this stage - ony if the branch = master branch'
}
}
</code></pre>
<hr />
<pre><code>stage('feature-branch-stuff') {
when ... | Conditional step/stage in Jenkins pipeline | jenkins|groovy|jenkins-pipeline | 138 | 240,462 | 4 | 44,231,270 | 44,231,270 | 262 | true | 2016-06-07T23:13:52.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Conditional step/stage in Jenkins pipeline<p>How do you run a build step/stage only if building a specific branch?</p>
<p>For example, run a deployment step... |
44,337,449 | POSTMAN: "You do not have permission to view this directory or page" with Bearer Token<p>I've got a website hosted on HostGator, let's say it's domain is <code>https://example.com</code>.</p>
<p>I also have an application hosted on Azure, with <code>Active Directory</code> Authentication enabled on the entire site (in... | <p>The evilSnobu have already explained this issue which caused by incorrect audience. I want to explain it more general to help understand this issue.</p>
<p>There are two concepts client and resource server in the OAuth 2.0 Authorization Framework(refer <a href="https://www.rfc-editor.org/rfc/rfc6749" rel="nofollow ... | POSTMAN: "You do not have permission to view this directory or page" with Bearer Token | azure|oauth|oauth-2.0|active-directory|postman | 7 | 18,978 | 2 | 44,360,920 | 44,360,920 | 7 | true | 2017-06-02T21:07:22.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
POSTMAN: "You do not have permission to view this directory or page" with Bearer Token<p>I've got a website hosted on HostGator, let's say it's domain is <co... |
44,208,838 | ViewComponent with optional parameters<p>I am creating a set of View Components that represent filters on different views. They work great so far, but I don't understand this behavior I am experiencing.</p>
<p>If I use declare two InvokeAsync:</p>
<pre><code>public async Task<IViewComponentResult> InvokeAsync(s... | <p>According to <a href="https://github.com/aspnet/Razor/issues/1266" rel="nofollow noreferrer">this Github issue</a>, it doesn't seem like it will be done by the team.</p>
<blockquote>
<p>@rynowak Apr 29, 2017 - I'm going to move it in and mark it up for grabs. At this point locking down our public APIs and completing... | ViewComponent with optional parameters | c#|asp.net-core|asp.net-core-viewcomponent | 11 | 4,676 | 2 | 44,264,038 | 44,264,038 | 8 | true | 2017-05-26T19:23:59.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ViewComponent with optional parameters<p>I am creating a set of View Components that represent filters on different views. They work great so far, but I don'... |
44,095,961 | Resizing Button within a stackview<p>So I've be studying Swift/iOS development recently and I'm having a little trouble with sizing buttons within a stack view, I have the following layout:</p>
<p><a href="https://i.stack.imgur.com/04Fcu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/04Fcu.png" alt="enter im... | <p>Try this.. </p>
<ol>
<li>Remove leading and trailing constraints of the button.</li>
<li>Add constraint <em>Horizontal in Container</em> to the button. </li>
<li><p>Add constraint <em>Equal Width</em> of the button with super view (which should be stack view I suppose). Like this.. Press <code>control</code> + drag... | Resizing Button within a stackview | ios|uibutton|autolayout|uistackview | 19 | 27,446 | 3 | 44,096,124 | 44,096,124 | 9 | true | 2017-05-21T10:51:28.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Resizing Button within a stackview<p>So I've be studying Swift/iOS development recently and I'm having a little trouble with sizing buttons within a stack vi... |
44,243,653 | router subscribe calls multiple time<p>With this code</p>
<pre class="lang-js prettyprint-override"><code>ngOnInit() {
this.router.events.subscribe((val) => {
if (this.router.url.indexOf('page') > -1) {
let id = this.activedRoute.snapshot.params['Id']
this.busy = this.httpCall.get('/pub/page/Get... | <p>From your logs you can see that your subscription is called three times on each route change. So that means events observable emits many signals but you interested in only one.</p>
<pre><code> ngOnInit() {
this.getData();
this.router.events.filter(event => event instanceof NavigationEnd).subscrib... | router subscribe calls multiple time | angular | 13 | 12,313 | 5 | 44,243,970 | 44,243,970 | 9 | true | 2017-05-29T13:26:02.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
router subscribe calls multiple time<p>With this code</p>
<pre class="lang-js prettyprint-override"><code>ngOnInit() {
this.router.events.subscribe((val) =... |
44,347,890 | React Native Clipboard - how to copy an image or anything other than text?<p>In React Native, with the Clipboard, how can I place an image in the Clipboard? The only method provided to set Clipboard content is "setString". Can you not set images or other content than strings?</p> | <p>It is possible to bridge native iOS clipboard API and expose the <code>setImage</code> method. To do that you need:</p>
<ol>
<li>Add native module header file <code>Clipboard.h</code>:</li>
</ol>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-co... | React Native Clipboard - how to copy an image or anything other than text? | clipboard|react-native|react-native-ios | 8 | 3,121 | 1 | 44,423,850 | 44,423,850 | 9 | true | 2017-06-03T19:39:10.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Native Clipboard - how to copy an image or anything other than text?<p>In React Native, with the Clipboard, how can I place an image in the Clipboard? ... |
44,208,683 | Visual Studio 2017 Azure Function Template does not have files like - run.csx or project.json<p>I am using Visual Studio 2017 preview(2) to create Azure Function. The template generated for it is very different from what I get in Visual Studio 2015.</p>
<p>The Visual Studio 2017 template create a .cs file for function... | <p>This is intended. Azure Functions team changed the way you develop and deploy Function Apps in Visual Studio 2017. Now, it's basically a compiled class library, with functions being static methods with proper attributes.</p>
<p>You should not be editing <code>function.json</code> manually anymore; instead use WebJ... | Visual Studio 2017 Azure Function Template does not have files like - run.csx or project.json | azure|visual-studio-2017|azure-functions | 8 | 2,325 | 1 | 44,209,304 | 44,209,304 | 10 | true | 2017-05-26T19:12:15.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Visual Studio 2017 Azure Function Template does not have files like - run.csx or project.json<p>I am using Visual Studio 2017 preview(2) to create Azure Func... |
44,261,512 | How to detect if net.Socket connection dies - node.js<h2>Background</h2>
<p>I am communicating with a machine using <a href="https://nodejs.org/api/net.html" rel="noreferrer"><code>net.Socket</code></a> via TCP/IP. </p>
<p>I am able to establish the connection and to send and receive packets of Buffers, which is all ... | <p>Here's an interesting read: <a href="https://blog.stephencleary.com/2009/05/detection-of-half-open-dropped.html" rel="noreferrer">https://blog.stephencleary.com/2009/05/detection-of-half-open-dropped.html</a></p>
<p>Note in particular this remark:</p>
<blockquote>
<p>It is important to note that the act of recei... | How to detect if net.Socket connection dies - node.js | javascript|node.js|sockets|tcp | 12 | 10,564 | 2 | 44,263,344 | 44,263,344 | 10 | true | 2017-05-30T11:52:16.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to detect if net.Socket connection dies - node.js<h2>Background</h2>
<p>I am communicating with a machine using <a href="https://nodejs.org/api/net.html... |
44,284,506 | PyTorch: access weights of a specific module in nn.Sequential()<p>When I use a pre-defined module in PyTorch, I can typically access its weights fairly easily. However, how do I access them if I wrapped the module in <code>nn.Sequential()</code> first? r.g:</p>
<pre><code>class My_Model_1(nn.Module):
def __init__(s... | <p>From the <a href="https://discuss.pytorch.org/t/access-weights-of-a-specific-module-in-nn-sequential/3627" rel="noreferrer">PyTorch forum</a>, this is the recommended way:</p>
<pre><code>model_2.layer[0].weight
</code></pre> | PyTorch: access weights of a specific module in nn.Sequential() | python|pytorch | 7 | 13,642 | 3 | 44,353,013 | 44,353,013 | 10 | true | 2017-05-31T12:12:30.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PyTorch: access weights of a specific module in nn.Sequential()<p>When I use a pre-defined module in PyTorch, I can typically access its weights fairly easil... |
43,948,737 | FFMPEG hevc_nvenc "No NVENC capable devices found" with NVidia GTX950M<p>I get the error "No NVENC capable devices found" when trying a simple encoding like this, even skipping audio to make sure it's not an audio problem:</p>
<pre><code>ffmpeg.exe -i input.mp4 -c:v hevc_nvenc -an out.mp4
</code></pre>
<p>I also trie... | <p>950M doesn't support h265 codec indeed.</p>
<p>From <a href="https://developer.nvidia.com/nvidia-video-codec-sdk" rel="noreferrer">nvidia nvenc page</a> or <a href="https://developer.nvidia.com/video-encode-decode-gpu-support-matrix" rel="noreferrer">the detailed support matrix</a>, we can learn that h265/hevc is s... | FFMPEG hevc_nvenc "No NVENC capable devices found" with NVidia GTX950M | ffmpeg|hevc|h.265|nvenc | 8 | 15,370 | 1 | 43,949,563 | 43,949,563 | 11 | true | 2017-05-13T02:49:54.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FFMPEG hevc_nvenc "No NVENC capable devices found" with NVidia GTX950M<p>I get the error "No NVENC capable devices found" when trying a simple encoding like ... |
44,059,885 | PowerShell Remove Junction<p>As of Windows 10 PowerShell is finally capable of creating Junctions and links natively.</p>
<p>Howerver the Remove-Item function seems to be unaware of the junction and tries to remove the directory asking for confirmation and if it should recursively delete items within.</p>
<p>So, the ... | <blockquote>
<p>Is there a way to remove a junction using PowerShell?</p>
</blockquote>
<p>Currently, at least in PowerShell v5, <a href="https://github.com/PowerShell/PowerShell/issues/621" rel="noreferrer">this is considered "fixed"</a>. What you can do is use the <code>-Force</code> switch, else you will get an e... | PowerShell Remove Junction | powershell|junction | 11 | 17,721 | 4 | 44,060,418 | 44,060,418 | 12 | true | 2017-05-19T01:02:26.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PowerShell Remove Junction<p>As of Windows 10 PowerShell is finally capable of creating Junctions and links natively.</p>
<p>Howerver the Remove-Item functi... |
43,937,066 | matplotlib: hide subplot and fill space with other subplots<p>I've got a figure that contains three subplots which are arranged vertically. Once I click into the figure, I want the second subplot <code>ax2</code> to be hidden and the other plots to fill the space. A second click into the figure should restore the origi... | <p>You can define two different <code>GridSpec</code>s. One would have 3 subplots, the other 2. Depending on the visibility of the middle axes, you change the position of the other two axes to obey to the first or second GridSpec.<br>
(There is no need for any dummy figure or so, like other answers might suggest.)</p>
... | matplotlib: hide subplot and fill space with other subplots | python|matplotlib | 10 | 5,404 | 2 | 43,944,246 | 43,944,246 | 13 | true | 2017-05-12T11:47:13.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
matplotlib: hide subplot and fill space with other subplots<p>I've got a figure that contains three subplots which are arranged vertically. Once I click into... |
43,958,438 | Merge videos and images using ffmpeg<p>I'm trying to compile one .webm file that contains this:</p>
<ol>
<li>10 seconds showing image1.jpg</li>
<li>Show a movie (an .mp4 file), which lasts about 20 seconds</li>
<li>10 seconds showing image2.jpg</li>
<li>10 seconds showing image3.jpg</li>
</ol>
<p>I was unable to find... | <p>You can use the <a href="https://ffmpeg.org/ffmpeg-filters.html#concat" rel="noreferrer">concat filter</a>.</p>
<h1>Without audio</h1>
<pre><code>ffmpeg \
-loop 1 -framerate 24 -t 10 -i image1.jpg \
-i video.mp4 \
-loop 1 -framerate 24 -t 10 -i image2.jpg \
-loop 1 -framerate 24 -t 10 -i image3.jpg \
-filter_compl... | Merge videos and images using ffmpeg | ffmpeg | 7 | 12,830 | 1 | 43,958,846 | 43,958,846 | 13 | true | 2017-05-13T22:09:44.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Merge videos and images using ffmpeg<p>I'm trying to compile one .webm file that contains this:</p>
<ol>
<li>10 seconds showing image1.jpg</li>
<li>Show a m... |
44,203,956 | WinForms; detecting form closed from another form<p>Is it possible to detect a form closing from another form.
For example.
If I had a mainForm that opens subForm, can I detect within the mainForm that the subForm has closed and execute code?</p>
<p>I understand I could create an event handler within the subForm, but ... | <p>The FormClosed event is public, so you can create a handler from the main form.</p>
<pre><code>//Inside main Form. Click button to open new form
private void button1_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.FormClosed += F2_FormClosed;
f2.Show();
}
private void F2_FormClose... | WinForms; detecting form closed from another form | c#|forms|winforms | 8 | 5,959 | 3 | 44,204,013 | 44,204,013 | 14 | true | 2017-05-26T14:21:33.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
WinForms; detecting form closed from another form<p>Is it possible to detect a form closing from another form.
For example.
If I had a mainForm that opens su... |
44,226,827 | How to know if webkitSpeechRecognition is started?<p>I'm making a bot to listen to my voice.<br/>
So i did :</p>
<pre><code>this.recognition = new webkitSpeechRecognition();
</code></pre>
<p>I can do this to start listen :</p>
<pre><code>this.recognition.start();
</code></pre>
<p>And this to stop listen :</p>
<pre... | <p>You can do this by raising a flag variable on the <code>onstart</code> and <code>onend</code> events:</p>
<pre><code>var recognition = new webkitSpeechRecognition();
var recognizing = false;
recognition.onstart = function () {
recognizing = true;
};
recognition.onend = function () {
recognizing = false;
}... | How to know if webkitSpeechRecognition is started? | javascript|google-chrome|webkitspeechrecognition | 12 | 5,141 | 2 | 44,226,843 | 44,226,843 | 14 | true | 2017-05-28T11:30:48.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to know if webkitSpeechRecognition is started?<p>I'm making a bot to listen to my voice.<br/>
So i did :</p>
<pre><code>this.recognition = new webkitSpe... |
44,269,086 | How to upgrade npm to npm@5 on the latest node docker image?<p>Locally, I have successfully installed npm@5 via:</p>
<pre><code>$ npm install npm@5 -g
$ npm -v
$ 5.0.0
</code></pre>
<p>And locally, I can run the npm setup just fine (it's basically <code>npm i && tsc</code>)</p>
<pre><code>$ npm run setup
up... | <p>I found out that the <a href="https://github.com/nodejs/docker-node/blob/581eebd097343c9f1c1ceb5260cd2ec770410e29/7.10/Dockerfile#L34" rel="nofollow noreferrer">node's alpine image ships with yarn</a>. </p>
<p><a href="https://code.facebook.com/posts/1840075619545360" rel="nofollow noreferrer">Yarn</a> is Facebook'... | How to upgrade npm to npm@5 on the latest node docker image? | docker|npm|alpine-linux | 12 | 5,917 | 1 | 44,280,995 | 44,280,995 | 15 | true | 2017-05-30T18:09:33.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to upgrade npm to npm@5 on the latest node docker image?<p>Locally, I have successfully installed npm@5 via:</p>
<pre><code>$ npm install npm@5 -g
$ npm... |
43,972,237 | Aurora RDS instance can not be stopped<p>I am trying Amazon Aurora instance and I can not see an option to stop it. The only options are Delete and Reboot. </p>
<p>Am I missing something. </p> | <h3>Edit: 2018/09/25 - Amazon Aurora Now Supports Stopping and Starting of Database Clusters</h3>
<p><a href="https://aws.amazon.com/about-aws/whats-new/2018/09/amazon-aurora-stop-and-start/" rel="nofollow noreferrer">Per this announcement</a>, Aurora now supports starting and stopping the db instance. This feature wa... | Aurora RDS instance can not be stopped | amazon-web-services|amazon-aurora | 15 | 10,512 | 3 | 43,979,245 | 43,979,245 | 16 | true | 2017-05-15T05:42:23.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Aurora RDS instance can not be stopped<p>I am trying Amazon Aurora instance and I can not see an option to stop it. The only options are Delete and Reboot. <... |
44,018,590 | 128-bit values - From XMM registers to General Purpose<p>I have a couple of questions related to moving XMM values to general purpose registers. All the questions found on SO focus on the opposite, namely transfering values in gp registers to XMM.</p>
<ol>
<li><p>How can I move an XMM register value (128-bit) to two 6... | <p>You cannot move the upper bits of an XMM register into a general purpose register directly.<br>
You'll have to follow a two-step process, which may or may not involve a roundtrip to memory or the destruction of a register.</p>
<p><strong>in registers (SSE2)</strong></p>
<pre><code>movq rax,xmm0 ;lower 64 bit... | 128-bit values - From XMM registers to General Purpose | assembly|x86|sse | 11 | 4,668 | 3 | 44,018,742 | 44,018,742 | 16 | true | 2017-05-17T07:44:52.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
128-bit values - From XMM registers to General Purpose<p>I have a couple of questions related to moving XMM values to general purpose registers. All the ques... |
44,359,995 | AWS SNS : Case of multiple subscribers<p>I am a beginner in using AWS services. I have a requirement recently in which I wanted to send some data from service 1 to service 2 and service 3. So, what I am thinking to do is, I will push notification to SNS from service 1 and service 2 and service 3 would be subscribers to... | <p>Messages sent to SNS topics go to all subscribers.</p>
<blockquote>
<p>Publishers send messages to topics. Once a new message is published, Amazon SNS attempts to deliver that message to <strong>every endpoint</strong> that is subscribed to the topic. <em>(emphasis added)</em></p>
<p><a href="http://docs.aws... | AWS SNS : Case of multiple subscribers | amazon-web-services|notifications|amazon-sns | 11 | 14,880 | 1 | 44,361,071 | 44,361,071 | 16 | true | 2017-06-04T23:59:18.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AWS SNS : Case of multiple subscribers<p>I am a beginner in using AWS services. I have a requirement recently in which I wanted to send some data from servic... |
43,985,903 | TeamCity C# compile error: Invalid expression term 'int'<p>A project that compiles locally (targeting .NET Framework 4.6.1) fails on TeamCity with the following message:</p>
<blockquote>
<p>[CoreCompile] Csc [Csc] Using shared compilation with compiler from directory: C:\Program Files (x86)\MSBuild\14.0\bin</p>
... | <p>Firstly, if it might help anybody, when TeamCity fails a step, a lot of text in that step will be red in color (even mere warnings), so at first I ran into a dead-end with believing the second error message was the problem. It wasn't.</p>
<p>Turns out, my Resharper 2016.3.2 (on Visual Studio 2017) had changed the f... | TeamCity C# compile error: Invalid expression term 'int' | msbuild|teamcity|visual-studio-2017 | 8 | 11,788 | 1 | 43,985,949 | 43,985,949 | 17 | true | 2017-05-15T17:55:20.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TeamCity C# compile error: Invalid expression term 'int'<p>A project that compiles locally (targeting .NET Framework 4.6.1) fails on TeamCity with the follow... |
44,012,321 | Meaning of #var="ngModel"<p>I am creating <code>login.component.html</code> and during that time I create an input field then bind it to the <code>email</code> variable found in my <code>login.component.ts</code>. Originally I had written it as:</p>
<pre class="lang-html prettyprint-override"><code><input type="t... | <p>The syntax you refer to is mentioned in <a href="https://angular.io/docs/ts/latest/cookbook/form-validation.html" rel="noreferrer">the form validation docs</a>, where they explain:</p>
<blockquote>
<p>The template variable (<code>#name</code>) has the value <code>"ngModel"</code> (always
<code>ngModel</code>). ... | Meaning of #var="ngModel" | angular|angular2-forms | 17 | 10,039 | 2 | 44,012,444 | 44,012,444 | 17 | true | 2017-05-16T21:59:48.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Meaning of #var="ngModel"<p>I am creating <code>login.component.html</code> and during that time I create an input field then bind it to the <code>email</cod... |
43,981,966 | CMake: How to specify directory where ctest should look for executables?<p>I wanted to integrate ctest to a c++/c project. I use google tests to write unit tests.</p>
<p>Relevant part of my CMakeLists.txt looks like this:</p>
<pre><code>...
####### CREATING EXE #######
add_executable(test_exe main.cpp test.cpp)
targe... | <p><a href="https://cmake.org/cmake/help/v3.7/command/add_test.html" rel="noreferrer">Documentation</a> for <code>add_test</code> specifies <em>WORKING_DIRECTORY</em> option for <em>long form</em> of the command. Value of this option is used as a directory in which test operates:</p>
<pre><code>add_test(NAME test_exe ... | CMake: How to specify directory where ctest should look for executables? | c++|cmake|googletest|ctest | 14 | 15,914 | 3 | 43,988,051 | 43,988,051 | 18 | true | 2017-05-15T14:24:08.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CMake: How to specify directory where ctest should look for executables?<p>I wanted to integrate ctest to a c++/c project. I use google tests to write unit t... |
44,112,271 | How to check if a key exists in AsyncStorage in React Native? getItem() always returns a promise object<p>I'm trying to check whether a key is available in <code>AsyncStorage</code> with <code>AsyncStorage.getItem('key_name')</code>. If the key is not available it is not returning null, it still returns following prom... | <p>You need to add async await, or add .then to the result</p>
<pre><code>async checkUserSignedIn(){
let context = this;
try {
let value = await AsyncStorage.getItem('user');
if (value != null){
// do something
}
else {
// do something else
}
} catch (e... | How to check if a key exists in AsyncStorage in React Native? getItem() always returns a promise object | javascript|react-native|asyncstorage | 18 | 22,860 | 4 | 44,112,370 | 44,112,370 | 18 | true | 2017-05-22T11:57:33.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check if a key exists in AsyncStorage in React Native? getItem() always returns a promise object<p>I'm trying to check whether a key is available in <... |
44,159,978 | Nginx Configuration Versioning Strategy<p>currently a project my team inherited has a complete mess on the nginx configuration across 10+ environments, we would like to implement a versioning strategy however im not sure how people "normally" achieve this. you make the whole nginx conf folder a git repo and ignore what... | <p>We manage it via separate Git repository exclusive only for nginx configuration. Yes, it includes everything inside <code>/etc/nginx/</code> directory.</p>
<p>But it's not synced directly on server, instead a bash script is used to pull changes, update configuration, and reload nginx configuration.</p>
<p>Script e... | Nginx Configuration Versioning Strategy | linux|git|nginx|version-control|config | 14 | 4,097 | 1 | 44,163,566 | 44,163,566 | 18 | true | 2017-05-24T13:35:24.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nginx Configuration Versioning Strategy<p>currently a project my team inherited has a complete mess on the nginx configuration across 10+ environments, we wo... |
44,358,328 | How I can access docker data volumes on Windows machine?<p>I have <code>docker-compose.yml</code> like this:</p>
<pre><code>version: '3'
services:
mysql:
image: mysql
volumes:
- data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=$ROOT_PASSWORD
volumes:
data:
</code></pre>
<p>And my mo... | <p>For Linux containers under Windows, docker runs <strong>actually</strong> over a Linux virtual machine, so your <code>named</code> volume is a mapping of a local directory in that VM to a directory in the container.</p>
<p>So what you got as <code>/var/lib/docker/volumes/some_app/_data</code> is a directory inside ... | How I can access docker data volumes on Windows machine? | docker|docker-compose|docker-volume|docker-for-windows | 12 | 17,477 | 1 | 44,358,745 | 44,358,745 | 18 | true | 2017-06-04T20:09:44.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How I can access docker data volumes on Windows machine?<p>I have <code>docker-compose.yml</code> like this:</p>
<pre><code>version: '3'
services:
mysql:
... |
43,952,198 | How to override or extend a libary type definition in Typescript<p>If I import a library type declaration in Typescript. How can I extend the definition of that library when there's compiler issues with it, but it would be otherwise valid js code? For example validate.js type bindings are very inaccurate compared to th... | <p>Put additional typings in <code>custom-typings.d.ts</code> in root of <code>src</code>.</p>
<p><strong>custom-typings.d.ts</strong></p>
<pre><code>import * as mongoose from "mongoose";
//augment validate.js
declare module "validate.js" {
let Promise: any;
function async(param: any): any;
}
//augment mong... | How to override or extend a libary type definition in Typescript | typescript | 19 | 31,236 | 1 | 43,955,512 | 43,955,512 | 23 | true | 2017-05-13T10:46:49.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to override or extend a libary type definition in Typescript<p>If I import a library type declaration in Typescript. How can I extend the definition of t... |
44,106,907 | When to mark function as async<p>Basically, function must be prefixed with <code>async</code> keyword if <code>await</code> used inside it. But if some function just returns Promise and doesn't awaiting for anything, should I mark the function as <code>async</code>?</p>
<p>Seems like both correct or not?</p>
<pre><co... | <blockquote>
<p>if some function just returns Promise and doesn't awaiting for anything, should I mark the function as async?</p>
</blockquote>
<p>I would say you shouldn't. The purpose of <code>async</code>/<code>await</code> is to create (and resolve) the promise for you; if you already have a promise to return, t... | When to mark function as async | javascript|asynchronous|async-await|ecmascript-2017 | 31 | 6,432 | 4 | 44,114,047 | 44,114,047 | 23 | true | 2017-05-22T07:22:16.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When to mark function as async<p>Basically, function must be prefixed with <code>async</code> keyword if <code>await</code> used inside it. But if some funct... |
43,945,394 | Rails 5.1 webpacker "import" a .js.erb file?<p>From <code>app/javascript/packs/application.js</code> I'm trying to <code>import "../foo"</code> where the file is <code>foo.js.erb</code>. Webpacker and yarn are working great for other imports in application.js, for example <code>import "../bar"</code> when that file i... | <p>If what you want to do is this:</p>
<pre><code>import '../foo'
</code></pre>
<p>When the actual file is <code>foo.js.erb</code>, you need to update <code>config/webpack/webpacker.yml</code> to include</p>
<pre><code>- .js.erb
</code></pre>
<p>In the list of extensions. Otherwise you need to fully specify the file n... | Rails 5.1 webpacker "import" a .js.erb file? | ruby-on-rails|ruby-on-rails-5.1|webpacker | 15 | 7,966 | 3 | 43,947,412 | 43,947,412 | 25 | true | 2017-05-12T19:44:42.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rails 5.1 webpacker "import" a .js.erb file?<p>From <code>app/javascript/packs/application.js</code> I'm trying to <code>import "../foo"</code> where the fil... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.