question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
37,858,082 | What is the difference between Files.list and Files.walkFileTree and Files.walk with maxdepth = 1?<p>If I want to do something with files only on the first level of the directory,
is there a difference between using <code>Files.list(...)</code> or <code>Files.walkFileTree(...)</code> or <code>Files.walk(...)</code>?</p... | <p>Using following code as test, I got the hang of the issue. The main difference between <code>walk*</code> and <code>list</code> is that <code>list(dir)</code> gives a stream of <strong>files in the directory</strong> <code>dir</code>, while both <code>walk*</code> method <strong>walk the subtree</strong> of its argu... | What is the difference between Files.list and Files.walkFileTree and Files.walk with maxdepth = 1? | java|nio2|java.nio.file | 17 | 14,907 | 3 | 37,860,983 | 37,860,983 | 19 | true | 2016-06-16T11:38:28.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the difference between Files.list and Files.walkFileTree and Files.walk with maxdepth = 1?<p>If I want to do something with files only on the first l... |
37,963,474 | Is it allowed to use relative path for manifest.json and place it outside of the root?<p>We are using a <a href="http://html5doctor.com/web-manifest-specification/" rel="noreferrer"><code>manifest.json</code></a> file like the one below:</p>
<pre><code> {
"name": "Our app",
"description": "Our app description",
... | <p><strong>TL; DR</strong> Relative and absolute paths both work</p>
<p>Suppose you have the following files:</p>
<ul>
<li><code>/content/favicon/android-chrome-192x192.png</code></li>
<li><code>/content/favicon/manifest.json</code>, which references <code>android-chrome-192x192.png</code></li>
<li><code>/index.html<... | Is it allowed to use relative path for manifest.json and place it outside of the root? | asp.net|manifest|favicon | 15 | 8,976 | 2 | 38,323,946 | 38,323,946 | 19 | true | 2016-06-22T09:10:20.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it allowed to use relative path for manifest.json and place it outside of the root?<p>We are using a <a href="http://html5doctor.com/web-manifest-specific... |
37,957,442 | Using material-ui with redux?<p>I'm currently rendering main component this way: </p>
<pre><code> ReactDOM.render(
<Provider store = {store}>
{getRoutes(checkAuth)}
</Provider>,
document.getElementById('app')
)
</code></pre>
<p>the docs state to use MuiThemeProvider to wrap m... | <p>Tried the following and it worked: </p>
<pre><code> const App = () => (
<MuiThemeProvider>
<Provider store = {store}>
{getRoutes(checkAuth)}
</Provider>
</MuiThemeProvider>
)
ReactDOM.render(
<App/>,
document.getElementById('app')
)
</code><... | Using material-ui with redux? | reactjs|redux|material-ui|redux-form | 19 | 11,831 | 3 | 37,957,477 | 37,957,477 | 20 | true | 2016-06-22T02:13:10.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using material-ui with redux?<p>I'm currently rendering main component this way: </p>
<pre><code> ReactDOM.render(
<Provider store = {store}>
... |
38,001,324 | How can I assign a specific maven profile to an intellij run configuration?<p>I have multiple projects loaded into my project structure and they all use different maven profiles. I know I can switch up the profiles using the Maven Projects tab but I would like to assign a specific profile to go along with a specific r... | <p>You can assign specific profiles via the dialog "Edit Run Configurations". See this screenshot:</p>
<p><a href="https://i.stack.imgur.com/hiNn9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hiNn9.png" alt="enter image description here"></a></p>
<p>AFAIK, this profile setting overrides the choice which ... | How can I assign a specific maven profile to an intellij run configuration? | maven|intellij-idea|maven-profiles | 31 | 31,297 | 2 | 38,282,359 | 38,282,359 | 20 | true | 2016-06-23T20:34:24.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I assign a specific maven profile to an intellij run configuration?<p>I have multiple projects loaded into my project structure and they all use diff... |
37,850,117 | Cakephp 3 : How to get max amout row from a table<p>I have table call users , like </p>
<pre><code>id name amount created
1 a 100 6-16-2016
2 b 200 5-16-2016
</code></pre>
<p>I need max amount full row, I have tried below code but getting syntax error.</p>
<pre><code> $user = $this->Users->f... | <p>simplest way</p>
<pre class="lang-php prettyprint-override"><code>$user = $this->Users->find('all',[
'fields' => array('amount' => 'MAX(Users.id)'),
]);
</code></pre>
<p>using select instead of an options array</p>
<pre class="lang-php prettyprint-override"><code>$user = $this->Users->find()
... | Cakephp 3 : How to get max amout row from a table | cakephp|cakephp-3.0 | 9 | 8,232 | 3 | 37,851,138 | 37,851,138 | 21 | true | 2016-06-16T04:51:20.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cakephp 3 : How to get max amout row from a table<p>I have table call users , like </p>
<pre><code>id name amount created
1 a 100 6-16-2016
2 b ... |
37,907,606 | VBA format cells to General<p>I would like to format a excel file to "General", but it's not working for all cells (some are custom, pourcentage...).
here is my code :</p>
<pre><code>With ActiveSheet.Range("A1").Resize(LineIndex, 1)
.Value = WorksheetFunction.Transpose(strLine)
.NumberFormat = "General"
'... | <p>If you want to format <strong>all</strong> cells to <em>General</em>, then use something like:</p>
<pre><code>Sub dural()
ActiveSheet.Cells.NumberFormat = "General"
End Sub
</code></pre> | VBA format cells to General | excel|number-formatting|vba | 8 | 57,666 | 1 | 37,907,639 | 37,907,639 | 21 | true | 2016-06-19T13:11:34.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VBA format cells to General<p>I would like to format a excel file to "General", but it's not working for all cells (some are custom, pourcentage...).
here i... |
38,051,561 | Show white space at the beginning of a text in HTML<p>How do I display white space at the beginning of text in HTML?</p>
<p>For example, I want to use</p>
<pre><code><p> This is a paragraph.</p> // This is a paragraph.
</code></pre>
<p>But it behaves exactly like </p>
<pre><code... | <p>You can use <code>white-space: pre;</code> property in CSS which doesn't collapse spaces:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code> p {
white-space: pre;
... | Show white space at the beginning of a text in HTML | html|whitespace | 16 | 18,433 | 5 | 38,052,592 | 38,052,592 | 21 | true | 2016-06-27T10:26:21.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Show white space at the beginning of a text in HTML<p>How do I display white space at the beginning of text in HTML?</p>
<p>For example, I want to use</p>
... |
37,852,695 | npm install save by default<p>It happened too many times that I forgot to add <code>--save</code> when installing node modules. Is there a way to append this option by default? So that whenever I type <code>npm install <package></code> the package is added to dependencies in <code>package.json</code>.</p> | <p>I found out that <code>npm</code> has configuration flags. Setting <code>save=true</code> does exactly what I need. You can add it to <code>.npmrc</code> file (in user's home directory) or invoke a command:</p>
<pre><code>npm config set save=true
</code></pre> | npm install save by default | node.js|npm|npm-install | 10 | 4,931 | 3 | 37,857,563 | 37,857,563 | 22 | true | 2016-06-16T07:35:03.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
npm install save by default<p>It happened too many times that I forgot to add <code>--save</code> when installing node modules. Is there a way to append this... |
38,006,107 | What's the difference between std::partial_sum and std::inclusive_scan?<p>While reading about <a href="http://en.cppreference.com/w/cpp/algorithm/inclusive_scan" rel="noreferrer">std::inclusive_scan</a>, there does not appear to be any examples.<br>
It strikes me as very similar to <a href="http://en.cppreference.com/w... | <p>Documentation of <code>std::inclusive_scan</code> states:</p>
<blockquote>
<p>In other words, the summation operations may be performed in arbitrary order.
The behavior is nondeterministic if <code>binary_op</code> is not associative.</p>
</blockquote>
<p>Documentation of <code>std::partial_sum</code> states w... | What's the difference between std::partial_sum and std::inclusive_scan? | c++|numeric|stl-algorithm|c++17 | 25 | 3,402 | 2 | 38,006,300 | 38,006,300 | 22 | true | 2016-06-24T05:23:09.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What's the difference between std::partial_sum and std::inclusive_scan?<p>While reading about <a href="http://en.cppreference.com/w/cpp/algorithm/inclusive_s... |
37,970,129 | Table View cellForRowAtIndexPath warning<p>I have updated my code to swift 3.0 and get a warning on the following line:</p>
<pre><code>func tableView(_ tableView: UITableView, cellForRowAtIndexPath indexPath: IndexPath) -> UITableViewCell {
</code></pre>
<p>When I try each of the suggestions to either silence the ... | <p>Just add the declaration of implementing <strong>UITableViewDataSource</strong> protocol to the class definition like this:</p>
<pre><code>class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {}
</code></pre> | Table View cellForRowAtIndexPath warning | swift|uitableview|swift3 | 14 | 5,955 | 3 | 38,088,775 | 38,088,775 | 22 | true | 2016-06-22T13:52:04.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Table View cellForRowAtIndexPath warning<p>I have updated my code to swift 3.0 and get a warning on the following line:</p>
<pre><code>func tableView(_ tabl... |
37,847,616 | PropTypes on Higher Order Components<p>Is there a way for PropTypes from a component inside of a Higher Order Component to point back to where they were created? </p>
<p><a href="https://i.stack.imgur.com/nE7HM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nE7HM.png" alt="enter image description here"></a>... | <p>The name <code>FinalButton</code> in your example won't be known to react since that is just your local variable name, but we change the name of the resulting component to whatever you want. Here I use "Final" in front of whatever the original name was.</p>
<p>Also, we can copy / merge the prop types over to the ne... | PropTypes on Higher Order Components | javascript|reactjs | 14 | 8,236 | 2 | 37,885,431 | 37,885,431 | 23 | true | 2016-06-15T23:48:18.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PropTypes on Higher Order Components<p>Is there a way for PropTypes from a component inside of a Higher Order Component to point back to where they were crea... |
38,040,100 | How to call a function placed in another directory in Matlab?<p>I have a large project coded in <code>MATLAB</code>, with <code>15-18 scripts</code>. It is becoming very challenging to understand the whole code. I was thinking that if I can put some scripts in another folder, it will become very straightforward to unde... | <p><strong>Manual solution</strong></p>
<p>Perform the following:</p>
<ol>
<li>Right click on the folder which is on top of the hierarchy.</li>
<li>click on Add to path</li>
<li>Click on selected folders and subfolders</li>
</ol>
<p>At this stage, your scripts will be able to identify any function or script which resid... | How to call a function placed in another directory in Matlab? | matlab|function|directory|call | 16 | 27,204 | 1 | 38,040,355 | 38,040,355 | 23 | true | 2016-06-26T15:32:01.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to call a function placed in another directory in Matlab?<p>I have a large project coded in <code>MATLAB</code>, with <code>15-18 scripts</code>. It is b... |
37,857,272 | InvalidStateError on websocket object<p>I'm just starting learning websockets, andI get a strange error:</p>
<pre><code><script type="text/javascript">
window.onload = function(){
var service = new WebSocket("ws://localhost:8080/websocket/test");
service.onmessage = function(event){
... | <blockquote>
<p>The <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/onopen" rel="noreferrer"><strong>WebSocket.onopen</strong></a> property is an EventHandler that is called when the WebSocket connection's readyState changes to OPEN; this indicates that the connection is ready to send and receive ... | InvalidStateError on websocket object | javascript|websocket | 15 | 8,490 | 2 | 37,857,336 | 37,857,336 | 24 | true | 2016-06-16T11:01:13.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
InvalidStateError on websocket object<p>I'm just starting learning websockets, andI get a strange error:</p>
<pre><code><script type="text/javascript">... |
37,937,343 | django.db.migrations.exceptions.NodeNotFoundError<p>When i run <code>makemigrations</code> command, i got this error:</p>
<pre><code>Traceback (most recent call last):
...
django.db.migrations.exceptions.NodeNotFoundError: Migration products.0002_auto_20160618_1143 dependencies reference nonexistent parent node (u'pr... | <p>If you open the migration file <code>products.0002_auto_20160618_1143</code> you will see a section called dependencies:</p>
<pre><code>dependencies = [("products", "0001_initial")]
</code></pre>
<p>Which will look like that. This line tell Django that the current file depends on that file. A file that given that ... | django.db.migrations.exceptions.NodeNotFoundError | python|django | 23 | 28,965 | 6 | 37,937,503 | 37,937,503 | 24 | true | 2016-06-21T06:49:37.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
django.db.migrations.exceptions.NodeNotFoundError<p>When i run <code>makemigrations</code> command, i got this error:</p>
<pre><code>Traceback (most recent ... |
37,864,827 | Joining multiple tables in bigquery<p>I would like to be able to join multiple tables in bigquery. Joining two is pretty trivial.</p>
<pre><code>SELECT
t1.field1 AS field1,
t2.field2 AS field2,
t1.field3 AS field3
FROM [datasetName.tableA] t1
JOIN [datasetName.tableB] t2
ON t1.somefield = t2.anotherfield
</code></pre... | <p>I think you are looking for something like below </p>
<pre><code>SELECT
t1.field1 AS field1,
t2.field2 AS field2,
t1.field3 AS field3,
t3.field4 AS field4
FROM [datasetName.tableA] t1
JOIN [datasetName.tableB] t2 ON t1.somefield = t2.anotherfield
JOIN [datasetName.tableC] t3 ON t1.somefield = t3.yetanother... | Joining multiple tables in bigquery | google-bigquery | 11 | 26,903 | 2 | 37,865,143 | 37,865,143 | 26 | true | 2016-06-16T16:37:03.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Joining multiple tables in bigquery<p>I would like to be able to join multiple tables in bigquery. Joining two is pretty trivial.</p>
<pre><code>SELECT
t1.... |
38,013,922 | Slicing a slice pointer passed as argument<p>I have the following code:</p>
<pre><code>func main() {
var buf []byte{1, 2, 3, 4, 5}
buf = buf[2:]
fmt.Println(buf)
panic(1)
}
</code></pre>
<p>However I want to pass a pointer to <code>buf</code> byte slice to another function, and slice it there, so some... | <p>The error <code>cannot use type []byte as type *[]byte in argument to sliceArr()</code> comes from a typo which you haven't posted (you tried to pass a slice and not a pointer to a slice to <code>sliceArr()</code>).</p>
<p>As to the other error (<code>cannot slice type *[]byte</code>), you just need to use parenthe... | Slicing a slice pointer passed as argument | pointers|go|slice | 11 | 11,078 | 1 | 38,014,097 | 38,014,097 | 28 | true | 2016-06-24T12:52:42.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Slicing a slice pointer passed as argument<p>I have the following code:</p>
<pre><code>func main() {
var buf []byte{1, 2, 3, 4, 5}
buf = buf[2:]
... |
37,918,012 | PyQt: give parent when creating a widget?<p>Let's assume I want to create a dialog box, a child of my main program:</p>
<pre><code>from PyQt4 import QtGui, QtCore
class WizardJournal(QtGui.QDialog):
def __init__(self, parent):
super(WizardJournal, self).__init__(parent)
self.parent = parent
... | <p>Given the way your example is currently structured, neither the dialog nor any of its child widgets will be deleted when it is closed.</p>
<p>You can see this by changing the end of the example to look like this:</p>
<pre><code>app.exec_()
print('\n'.join(repr(w) for w in app.allWidgets()))
</code></pre>
<p>which... | PyQt: give parent when creating a widget? | python|memory|pyqt | 15 | 15,695 | 1 | 37,928,086 | 37,928,086 | 29 | true | 2016-06-20T08:42:01.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PyQt: give parent when creating a widget?<p>Let's assume I want to create a dialog box, a child of my main program:</p>
<pre><code>from PyQt4 import QtGui, ... |
37,885,213 | Azure Service Fabric activation error<p>The deployment of one of my apps to a <code>Service Fabric Cluster</code> failed and triggered an Unhealthy Evaluation with an error event saying: <code>There was an error during CodePackage activation.The service host terminated with exit code:3762504530</code></p>
<p>However, ... | <p>I usually connect via RDP to the affected node and do the following things in such a case:</p>
<ul>
<li><p><strong>Check Console-Out / Console-Error logs</strong>: Service Fabric stores console output (if enabled via <code><ConsoleRedirection></code> in your <code>ServiceManifest.xml</code>) and errors in a l... | Azure Service Fabric activation error | azure|azure-service-fabric|azure-deployment | 19 | 16,206 | 1 | 37,887,407 | 37,887,407 | 31 | true | 2016-06-17T15:24:54.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure Service Fabric activation error<p>The deployment of one of my apps to a <code>Service Fabric Cluster</code> failed and triggered an Unhealthy Evaluatio... |
37,996,143 | R Leaflet: Zoom Control Level<p>I am trying to set zoom out maximum in my R Leaflet map. I follow an example of a previous question/answer in <a href="https://stackoverflow.com/questions/35556197/prevent-zooming-out-in-leaflet-r-map">Prevent zooming out in leaflet R-Map?</a> , but it doesn't work. The line that should... | <p>A couple of points:</p>
<ol>
<li>It's <code>minZoom</code> and <code>maxZoom</code> (notice the capital <strong>Z</strong>)</li>
<li>You need the options in each <code>Tile</code> function that you want to set
the zoom levels for.</li>
</ol>
<hr>
<pre><code>library(leaflet)
## the first two tiles have a zoom lev... | R Leaflet: Zoom Control Level | r|leaflet|zooming | 14 | 14,608 | 1 | 38,090,052 | 38,090,052 | 31 | true | 2016-06-23T15:40:05.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R Leaflet: Zoom Control Level<p>I am trying to set zoom out maximum in my R Leaflet map. I follow an example of a previous question/answer in <a href="https:... |
37,875,725 | String includes many substrings in ScalaTest Matchers<p>I need to check that one string contains many substrings. The following works</p>
<pre><code>string should include ("seven")
string should include ("eight")
string should include ("nine")
</code></pre>
<p>but it takes three almost duplicated lines. I'm looking f... | <p>Try this:</p>
<pre><code>string should (include("seven") and include("eight") and include("nine"))
</code></pre> | String includes many substrings in ScalaTest Matchers | string|scala|scalatest|matcher | 22 | 8,735 | 2 | 37,876,017 | 37,876,017 | 35 | true | 2016-06-17T07:35:58.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
String includes many substrings in ScalaTest Matchers<p>I need to check that one string contains many substrings. The following works</p>
<pre><code>string ... |
37,955,332 | Python: Adding hours to pandas timestamp<p>I read a csv file into pandas dataframe <code>df</code> and I get the following:</p>
<pre><code>df.columns
Index([u'TDate', u'Hour', u'SPP'], dtype='object')
>>> type(df['TDate'][0])
<class 'pandas.tslib.Timestamp'>
type(df['Hour'][0])
<type 'numpy.int64'&g... | <p>I think you can add to column <code>TDate</code> column <code>Hour</code> converted <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.to_timedelta.html" rel="noreferrer"><code>to_timedelta</code></a> with <code>unit='h'</code>:</p>
<pre><code>df = pd.DataFrame({'TDate':['2005-01-03','2005-01-04'... | Python: Adding hours to pandas timestamp | python|datetime|pandas|dataframe|timedelta | 13 | 30,465 | 1 | 37,955,390 | 37,955,390 | 35 | true | 2016-06-21T22:03:14.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python: Adding hours to pandas timestamp<p>I read a csv file into pandas dataframe <code>df</code> and I get the following:</p>
<pre><code>df.columns
Index(... |
37,954,809 | Cannot GET / error running hello world in webpack<p>Full Github project: <a href="https://github.com/pbrianmackey/uiexperiment" rel="noreferrer">https://github.com/pbrianmackey/uiexperiment</a></p>
<p>I run</p>
<p><code>webpack-dev-server --content-base deployment/</code></p>
<p>Then go to <code>http://localhost:8080/<... | <p>Turns out I had index.html in the wrong place. From the webpack <a href="https://webpack.github.io/docs/webpack-dev-server.html" rel="noreferrer">docs</a>:</p>
<blockquote>
<p>To load your bundled files, you will need to create an index.html file
in the build folder from which static files are served (--conten... | Cannot GET / error running hello world in webpack | reactjs|webpack-dev-server | 31 | 46,908 | 4 | 37,956,295 | 37,956,295 | 35 | true | 2016-06-21T21:22:52.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot GET / error running hello world in webpack<p>Full Github project: <a href="https://github.com/pbrianmackey/uiexperiment" rel="noreferrer">https://gith... |
37,955,880 | Composer Fatal error: Declaration of Fxp... must be compatible with ...AbstractAssetsRepository.php on line 334<p>I updated composer</p>
<pre><code>composer self-update
</code></pre>
<p>I installed the newer version of the plugin</p>
<pre><code>composer global require "fxp/composer-asset-plugin:*"
</code></pre>
<p>... | <p>You can temporarily disable composer plugins with the <code>--no-plugins</code> option:</p>
<pre><code>composer global remove fxp/composer-asset-plugin --no-plugins
</code></pre>
<p>See Composer docs - <a href="https://getcomposer.org/doc/03-cli.md#global-options" rel="noreferrer">Global options</a>:</p>
<blockqu... | Composer Fatal error: Declaration of Fxp... must be compatible with ...AbstractAssetsRepository.php on line 334 | php|linux|laravel|command-line|composer-php | 18 | 11,800 | 3 | 37,955,910 | 37,955,910 | 37 | true | 2016-06-21T22:54:27.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Composer Fatal error: Declaration of Fxp... must be compatible with ...AbstractAssetsRepository.php on line 334<p>I updated composer</p>
<pre><code>composer... |
38,045,700 | How do I declare multiple mutable variables at the same time?<p>I can declare multiple constants like this:</p>
<pre><code>let (a, b, c) = (1, 0.0, 3);
</code></pre>
<p>But why can't I do this with mutable variables?</p>
<p><code>let mut (a, b, c) = (1, 0.0, 3);</code> throws a compile error:</p>
<pre class="lang-n... | <p>The proper syntax is </p>
<pre><code>let (mut a, mut b, mut c) = (1, 0.0, 3);
</code></pre>
<p>Mutability is a property of the binding, and <code>a</code>, <code>b</code>, and <code>c</code> are all different bindings, each bound to a specific element of the tuple after the pattern has been matched. Thus they can ... | How do I declare multiple mutable variables at the same time? | rust | 20 | 6,982 | 1 | 38,045,743 | 38,045,743 | 37 | true | 2016-06-27T03:57:32.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I declare multiple mutable variables at the same time?<p>I can declare multiple constants like this:</p>
<pre><code>let (a, b, c) = (1, 0.0, 3);
</co... |
38,053,071 | React Native Animated, Complete Event<p>What's the best practice to trigger an event when Animated.spring finishes?</p>
<pre><code>Animated.spring(this.state.pan, {
toValue: 0
}).start()
</code></pre>
<p>I've searched quite a bit and haven't found a single way to do it. I could use addListener to check if the ani... | <p>Half an hour of googling later and i found this, can't believe they didn't document this better.</p>
<p><a href="https://github.com/facebook/react-native/issues/3212" rel="noreferrer">https://github.com/facebook/react-native/issues/3212</a></p>
<pre><code>.start(callback)
</code></pre> | React Native Animated, Complete Event | react-native | 104 | 43,788 | 4 | 38,053,409 | 38,053,409 | 295 | true | 2016-06-27T11:42:41.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Native Animated, Complete Event<p>What's the best practice to trigger an event when Animated.spring finishes?</p>
<pre><code>Animated.spring(this.stat... |
37,872,565 | Reversed cumulative sum of a column in pandas.DataFrame<p>I've got a pandas DataFrame with a boolean column sorted by another column and need to calculate reverse cumulative sum of the boolean column, that is, amount of true values from current row to bottom.</p>
<p>Example</p>
<pre><code>In [13]: df = pd.DataFrame({... | <p>Reverse column A, take the cumsum, then reverse again:</p>
<pre><code>df['C'] = df.loc[::-1, 'A'].cumsum()[::-1]
</code></pre>
<hr>
<pre><code>import pandas as pd
df = pd.DataFrame(
{'A': [False, True, False, False, False, True, False, True],
'B': [0.03771, 0.315414, 0.33248, 0.445505, 0.580156, 0.741551... | Reversed cumulative sum of a column in pandas.DataFrame | python|pandas|dataframe|reverse | 28 | 27,138 | 4 | 37,872,823 | 37,872,823 | 41 | true | 2016-06-17T03:20:30.937Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reversed cumulative sum of a column in pandas.DataFrame<p>I've got a pandas DataFrame with a boolean column sorted by another column and need to calculate re... |
38,056,482 | Wrap entire span on new line if doesn't fit<p>I have two child divs 20% and 80%. The last one contains nested <code>span</code>s and in case of text doesn't fit on the same line it is moved on the next line by single word (default behavior). </p>
<p>HTML: </p>
<pre><code><div class="post-short-footer">
<... | <p>The <code><span></code> tag is inline by default, so the text inside will break when wrapping happens. You can set it to <code>display: inline-block</code> so that it renders as a whole block also remains inline level. Note, wrapping may still happen but only if the text length exceeds the parent container.</p... | Wrap entire span on new line if doesn't fit | html|css|responsive-design | 29 | 53,552 | 3 | 38,056,700 | 38,056,700 | 47 | true | 2016-06-27T14:24:58.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wrap entire span on new line if doesn't fit<p>I have two child divs 20% and 80%. The last one contains nested <code>span</code>s and in case of text doesn't ... |
37,851,873 | What does mean "?" after variable in C#?<p>What does this condition mean?</p>
<pre><code>if (!helper?.Settings.HasConfig ?? false)
</code></pre>
<p>P.S.</p>
<ul>
<li><code>helper</code> is variable of some <code>class</code></li>
<li><code>Settings</code> is some <em>field</em></li>
<li><code>HasConfig</code> is <em... | <p>Well, <code>?.</code> is a <strong>null-conditional</strong> operator</p>
<p><a href="https://msdn.microsoft.com/en-us/library/dn986595.aspx" rel="noreferrer">https://msdn.microsoft.com/en-us/library/dn986595.aspx</a></p>
<pre><code>x?.y
</code></pre>
<p>means return <code>null</code> if <code>x</code> is null an... | What does mean "?" after variable in C#? | c#|c#-4.0|operators | 24 | 29,187 | 4 | 37,852,031 | 37,852,031 | 49 | true | 2016-06-16T06:54:32.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What does mean "?" after variable in C#?<p>What does this condition mean?</p>
<pre><code>if (!helper?.Settings.HasConfig ?? false)
</code></pre>
<p>P.S.</p... |
37,867,354 | In numpy, what does selection by [:,None] do?<p>I'm taking the Udacity course on deep learning and I came across the following code:</p>
<pre><code>def reformat(dataset, labels):
dataset = dataset.reshape((-1, image_size * image_size)).astype(np.float32)
# Map 0 to [1.0, 0.0, 0.0 ...], 1 to [0.0, 1.0, 0.0 ...]... | <p><a href="http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html" rel="noreferrer">http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html</a></p>
<blockquote>
<p>numpy.newaxis</p>
<p>The newaxis object can be used in all slicing operations to create an axis of length one. :const: newaxis is an alias f... | In numpy, what does selection by [:,None] do? | python|numpy | 47 | 45,828 | 6 | 37,867,542 | 37,867,542 | 49 | true | 2016-06-16T18:58:33.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In numpy, what does selection by [:,None] do?<p>I'm taking the Udacity course on deep learning and I came across the following code:</p>
<pre><code>def refo... |
37,867,503 | What are providers in Angular2?<p>In the Angular2 component configuration <code>providers</code> is one of the keys that we could specify. How are these providers defined and what are they used for?</p>
<pre><code>@Component({
..
providers: [..],
..
})
</code></pre>
<p><strong>Note</strong>:</p>
<p>Angular2 do... | <p>Providers are usually singleton (one instance) objects, that other objects have access to through dependency injection (DI).</p>
<p>If you plan to use an object multiple times, for example, the <code>Http</code> service in different components, you can ask for the same instance of that service (reuse it). You do tha... | What are providers in Angular2? | angular|angular2-providers | 58 | 40,755 | 6 | 37,867,887 | 37,867,887 | 62 | true | 2016-06-16T19:07:57.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What are providers in Angular2?<p>In the Angular2 component configuration <code>providers</code> is one of the keys that we could specify. How are these prov... |
37,949,494 | How to count occurrences of each distinct value for every column in a dataframe?<p><code>edf.select("x").distinct.show()</code> shows the distinct values that are present in <code>x</code> column of <code>edf</code> DataFrame. </p>
<p>Is there an efficient method to also show the number of times these distinct values ... | <p><code>countDistinct</code> is probably the first choice:</p>
<pre><code>import org.apache.spark.sql.functions.countDistinct
df.agg(countDistinct("some_column"))
</code></pre>
<p>If speed is more important than the accuracy you may consider <code>approx_count_distinct</code> (<code>approxCountDistinct</code> in Sp... | How to count occurrences of each distinct value for every column in a dataframe? | scala|apache-spark | 38 | 121,673 | 6 | 37,949,565 | 37,949,565 | 73 | true | 2016-06-21T16:10:21.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to count occurrences of each distinct value for every column in a dataframe?<p><code>edf.select("x").distinct.show()</code> shows the distinct values tha... |
37,925,614 | Display db content in another acitivity by clicking on item in listview<p>So I have this problem, my listview is populated from Sqlite DB and I can click on any item in the listview. When I click on an item I want to display, in a new activity these "name, surname, age etc" details but these should be retrieved from my... | <p>Use onItemClickListener method in your listview. When user clicks an item pass the item into next activity and in next activity retrieve data based on the item click. This tutorial will help you to get a good idea. </p>
<p><a href="http://www.javahelps.com/2015/04/import-and-use-external-database-in.html" rel="nofo... | Display db content in another acitivity by clicking on item in listview | android|sqlite|listview | -4 | 38 | 2 | 37,925,940 | 37,925,940 | 0 | true | 2016-06-20T14:54:58.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display db content in another acitivity by clicking on item in listview<p>So I have this problem, my listview is populated from Sqlite DB and I can click on ... |
37,933,843 | What the solution for: I can't access an application made in rails in the local network<p>I use openSUSE and I'm programing in Rails, but even with a "rails s -b 0.0.0.0" I never can access the application in another device in the local network, I've tried different servers 'WebRick", 'Thin', I also tried config my rou... | <p>You have two solutions to resolve your problem.</p>
<p>Option 1, you must install <code>webserver</code> such as <code>apache</code> or <code>nginx</code> and install <code>serverapp</code> such as <code>passenger</code> or <code>unicorn</code>. And you must setup <code>Virtual Host</code> to run on your app.
Refer... | What the solution for: I can't access an application made in rails in the local network | ruby-on-rails|server|opensuse | -5 | 48 | 1 | 37,934,376 | 37,934,376 | 0 | true | 2016-06-21T00:28:49.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What the solution for: I can't access an application made in rails in the local network<p>I use openSUSE and I'm programing in Rails, but even with a "rails ... |
38,030,744 | javascript, put labels in hashmap to conver in json format<p>I have a hashmap like this:</p>
<pre><code>mapUltimos2Anhos: {"La Coruña":11,"Pamplona":2,"León":9,"Valencia":4,"Las Palmas de Gran Canaria":3,"Oviedo":3,"Salamanca":2,"Albacete":3}
</code></pre>
<p>But I need convert this code in another JSON format to use... | <p>You can cycle through your object using a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in" rel="nofollow"><code>for..in</code></a> loop, then push objects to an array using it's keys and values:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console=... | javascript, put labels in hashmap to conver in json format | javascript|json|hashmap | -7 | 48 | 2 | 38,030,811 | 38,030,811 | 0 | true | 2016-06-25T16:50:30.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
javascript, put labels in hashmap to conver in json format<p>I have a hashmap like this:</p>
<pre><code>mapUltimos2Anhos: {"La Coruña":11,"Pamplona":2,"León... |
37,917,898 | How to use generic in interface in this case?<p>I designed some <code>API</code>s and they took many params. I wanna checked the params, so I designed a <code>Interface</code> called <code>Validator</code>. </p>
<pre><code>public interface Validator<T> {
boolean validat();
default T from(Map<String, S... | <p><code>T</code> is a type, not a <code>TypeReference</code> as you need for <code>JSON.parseObject</code>.</p> | How to use generic in interface in this case? | java | -3 | 53 | 3 | 37,918,120 | 37,918,120 | 1 | true | 2016-06-20T08:36:27.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use generic in interface in this case?<p>I designed some <code>API</code>s and they took many params. I wanna checked the params, so I designed a <cod... |
37,921,118 | Redirecting from directory to root [PHP]<p>I have a problem with my website. I have a file /domain/includes/_dash-notifications.php and inside this file I have a function that should redirect me to index.php: header("Location: index.php"). This doesn't work because it tries to find index.php inside /includes directory.... | <p>Try it like this: header("Location: /index.php")</p>
<p>By using / you specify an absolute url so it will load index.php in your web root folder.</p> | Redirecting from directory to root [PHP] | php|html | -3 | 19 | 1 | 37,921,299 | 37,921,299 | 1 | true | 2016-06-20T11:15:11.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Redirecting from directory to root [PHP]<p>I have a problem with my website. I have a file /domain/includes/_dash-notifications.php and inside this file I ha... |
37,903,079 | How to Synchronize with Julia CUDArt?<p>I'm just starting to use Julia's CUDArt package to manage GPU computing. I am wondering how to ensure that if I go to pull data from the gpu (e.g. using <code>to_host()</code>) that I don't do so before all of the necessary computations have been performed on it.</p>
<p>Through... | <p>I think the more canonical way is to make a stream for each device:</p>
<p><code>
streams = [(device(dev); Stream()) for dev in devlist]
</code></p>
<p>and then inside the <code>@async</code> block, after you tell it to do the computations, you use the <code>wait(stream)</code> function to tell it to wait for that... | How to Synchronize with Julia CUDArt? | parallel-processing|julia|julia-gpu | 8 | 283 | 2 | 38,297,680 | 38,297,680 | 1 | true | 2016-06-19T01:12:07.340Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Synchronize with Julia CUDArt?<p>I'm just starting to use Julia's CUDArt package to manage GPU computing. I am wondering how to ensure that if I go t... |
37,784,825 | Control Aspect Ratio of Theme Background (Android)<p>I have set up a loading screen (splash) for my app by following some advice that explains the "proper way" to do it:</p>
<p>styles.xml:</p>
<pre><code><style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground"... | <p>See <a href="http://www.tidev.io/2014/02/12/android-splash-screens-using-9-patch-images/" rel="nofollow noreferrer">this</a> guide by Malcolm Hollingsworth.</p>
<p>Basically, you have to modify your image in a specific way so that Android can know how you want it to change the image when the aspect ratio doesn't ma... | Control Aspect Ratio of Theme Background (Android) | screen|drawable|aspect-ratio|splash-screen | 9 | 3,392 | 1 | 38,033,802 | 38,033,802 | 2 | true | 2016-06-13T08:19:24.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Control Aspect Ratio of Theme Background (Android)<p>I have set up a loading screen (splash) for my app by following some advice that explains the "proper wa... |
37,894,177 | Deserializing JSON object throws a Newtonsoft.Json.JsonSerializationException<p>I have this Json object:</p>
<pre><code>{
"Sheet1": [
{
"one": 1,
"two": 18
},
{
"one": 16,
"two": 33
},
{
"one": 17,
"two": 34
}
]
}
</code></... | <p><code>Sheet1</code> is <strong>not a Sheet type</strong> but a <strong>List of Rows</strong>. This can be identify by brackets.<br />i.e <code>"Sheet1": [</code> which is a clear sign for <strong>Collection</strong> and not an Object which is identified by <code>{</code>.</p>
<p>Change <em>Sheets</em> to the follow... | Deserializing JSON object throws a Newtonsoft.Json.JsonSerializationException | c#|json | 8 | 25,613 | 4 | 37,894,352 | 37,894,352 | 3 | true | 2016-06-18T06:54:48.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deserializing JSON object throws a Newtonsoft.Json.JsonSerializationException<p>I have this Json object:</p>
<pre><code>{
"Sheet1": [
{
"o... |
37,762,047 | Javascript onload and script callback functions, which takes the precedence?<p>I'm loading an external script that uses callback function, which returns some specific data. If this data is not received error should be displayed.</p>
<p>Here is the code I've made:</p>
<pre><code><script>
//setting initial state ... | <blockquote>
<p>Will that json_callback function always have precedence before the onload handler?</p>
</blockquote>
<p>If the external script calls <code>my_callback</code> synchronously then yes.</p>
<p>The <code>scripting</code> section in the official <a href="https://www.w3.org/TR/html5/scripting-1.html#establ... | Javascript onload and script callback functions, which takes the precedence? | javascript|callback|onload|onerror|external-script | 8 | 13,834 | 3 | 37,923,603 | 37,923,603 | 3 | true | 2016-06-11T09:21:08.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript onload and script callback functions, which takes the precedence?<p>I'm loading an external script that uses callback function, which returns some... |
37,826,917 | How to install DCEVM for Java 7 in Linux?<p>The main site of <a href="https://dcevm.github.io/">DCEVM</a> didn't clearly explain how to install DCEVM on Linux. Running "java -jar installer.jar" in Linux (when accessed via PuTTy) gave me the following exception.</p>
<pre><code>[admin@LINUXBOX jdk1.7.0_55]$ java -jar D... | <p>The <code>DISPLAY</code> variable is only set when a X11 session is active. When you login on a remote machine with ssh, this usually is not the case.</p>
<p>There are two possible solutions:</p>
<ul>
<li>install a X server on Windows (e.g. <a href="https://sourceforge.net/projects/xming/" rel="nofollow">XMing</a>... | How to install DCEVM for Java 7 in Linux? | linux|dcevm | 9 | 1,578 | 4 | 38,085,287 | 38,085,287 | 4 | true | 2016-06-15T05:35:15.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to install DCEVM for Java 7 in Linux?<p>The main site of <a href="https://dcevm.github.io/">DCEVM</a> didn't clearly explain how to install DCEVM on Linu... |
37,885,398 | `gulp build` for semantic ui is giving error 'ENOENT: no such file or directory'<p>version:</p>
<blockquote>
<p>gulp@3.9.1</p>
</blockquote>
<p>I have installed <code>semantic-ui</code> through <code>npm install</code> and given default settings during interactive setup process.</p>
<p>But when i do <code>gulp b... | <p>There is an issue with <code>gulp-header 1.8.3</code> causing this.</p>
<p><a href="https://github.com/tracker1/gulp-header/issues/37">https://github.com/tracker1/gulp-header/issues/37</a></p>
<p>Add <code>"gulp-header": "1.8.2"</code> directly to your <code>package.json</code> and you should be fine.</p>
<p>Remo... | `gulp build` for semantic ui is giving error 'ENOENT: no such file or directory' | javascript|node.js|gulp|semantic-ui | 8 | 2,578 | 3 | 37,886,836 | 37,886,836 | 5 | true | 2016-06-17T15:35:37.310Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
`gulp build` for semantic ui is giving error 'ENOENT: no such file or directory'<p>version:</p>
<blockquote>
<p>gulp@3.9.1</p>
</blockquote>
<p>I have in... |
37,976,018 | Native Ads vs Interstitial ads vs banner ads which one will generate more revenue? how to implement native ads?<p>I couldn't find any useful link to the newly added native ads. can anyone give me the link to the documentation.</p>
<p>Can i use the Native ads and banner ads in one screen. Is this a violation of admob p... | <p>Sounds like Native Ads Express from AdMob might be a good fit for you. Here's some links that can show you how it's done:</p>
<ul>
<li><a href="https://firebase.google.com/docs/admob/ios/native-express" rel="noreferrer">iOS implementation guide</a></li>
<li><a href="https://firebase.google.com/docs/admob/android/na... | Native Ads vs Interstitial ads vs banner ads which one will generate more revenue? how to implement native ads? | android|admob|adsense|ads|native-ads | 7 | 13,901 | 3 | 37,997,274 | 37,997,274 | 5 | true | 2016-06-22T18:46:32.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Native Ads vs Interstitial ads vs banner ads which one will generate more revenue? how to implement native ads?<p>I couldn't find any useful link to the newl... |
38,047,481 | Get real source branch name in VSTS Pull Request<p>We are using Visual Studio Team Systems with Git and Team System Build (former Build vNext).
When we conduct a Pull Request, a new Build is triggered that is used to run Unit Tests and deploy to an isolated test system.
To perform the deployment to an isolated system I... | <p>There isn't any variable for this but you can create a power-shell script to get it via <a href="https://www.visualstudio.com/docs/integrate/api/overview" rel="noreferrer">Rest API</a>.</p>
<pre><code>[String]$projecturi = "$env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"
[String]$sourcebranch = "$env:BUILD_SOURCEBRANCH"
[... | Get real source branch name in VSTS Pull Request | git|azure-devops|azure-pipelines | 14 | 6,942 | 6 | 38,048,576 | 38,048,576 | 5 | true | 2016-06-27T06:47:26.777Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get real source branch name in VSTS Pull Request<p>We are using Visual Studio Team Systems with Git and Team System Build (former Build vNext).
When we condu... |
37,930,537 | how to get running mediaStream<p>I've created a webCam Stream with</p>
<pre><code>navigator.getUserMedia({ "video": true }, function(stream){
videoTag.src = window.URL.createObjectURL(stream);
videoTag.play();
}
</code></pre>
<p><strong>Can I access the MediaStream object in <code>stream</code> in global scop... | <p>There is no list of active media streams kept by the browser.</p>
<p>You can save the stream to for example window.stream.</p> | how to get running mediaStream | html5-video|webrtc|getusermedia|mediastream | 7 | 3,140 | 2 | 37,930,590 | 37,930,590 | 6 | true | 2016-06-20T19:41:01.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to get running mediaStream<p>I've created a webCam Stream with</p>
<pre><code>navigator.getUserMedia({ "video": true }, function(stream){
videoTag.s... |
37,884,013 | Adding video as Texture in three.js<p>I am working on this example of Three.js: <a href="http://threejs.org/examples/#canvas_geometry_panorama_fisheye" rel="noreferrer">http://threejs.org/examples/#canvas_geometry_panorama_fisheye</a></p>
<p>In this example, instead of using 6 images, I am using 5 images and one video... | <p>Check the source of <a href="https://stemkoski.github.io/Three.js/Video.html" rel="nofollow noreferrer">THIS</a> page (Three.js version 60).<br />
You can see he is doing a bit more to get his video working.<br />
Specifically, drawing the video onto a canvas and using the canvas as the texture of the material.</p>
... | Adding video as Texture in three.js | javascript|three.js|rendering | 10 | 14,340 | 2 | 37,892,861 | 37,892,861 | 7 | true | 2016-06-17T14:22:33.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding video as Texture in three.js<p>I am working on this example of Three.js: <a href="http://threejs.org/examples/#canvas_geometry_panorama_fisheye" rel="... |
37,898,868 | How to sum up categories in Excel<p>I am new to Excel and have a question.</p>
<p>I have a set of columns as follows:</p>
<pre><code>Amount Category
10 A
15 A
20 B
25 B
15 A
</code></pre>
<p>And I need to sum it up and get the following result:</p>
<pre><code>Category
A 40
B 45
</code></pre>
<p>Thank... | <p>if your first table and second table are set in worksheets named table1 and table2, then write the formula below in B2 cell in table2 </p>
<p><code>=sumifs(table1!A:A, table1!B:B, A2)</code></p> | How to sum up categories in Excel | excel|grouping | 8 | 39,478 | 4 | 37,898,943 | 37,898,943 | 7 | true | 2016-06-18T15:51:59.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to sum up categories in Excel<p>I am new to Excel and have a question.</p>
<p>I have a set of columns as follows:</p>
<pre><code>Amount Category
10 A... |
37,949,661 | Run Docker on Windows without virtualization<p>I'd like to know if I can run docker with a windows containers on windows machine without machine virtualization, like it is on Linux.</p>
<p>Because I have my whole environment running on windows machines on azure, and it would be much easier to add docker to my current ... | <blockquote>
<p>like it is on Linux.</p>
</blockquote>
<p>On Linux, it is "Docker on Linux". If you want to run that docker on Windows, you need a VM: VirtualBox or, <a href="https://blog.docker.com/2016/06/docker-mac-windows-public-beta/" rel="noreferrer">with docker 1.12, Hyper-V</a>: see <a href="https://docs.doc... | Run Docker on Windows without virtualization | windows|azure|docker|windows-server | 8 | 13,110 | 2 | 37,949,708 | 37,949,708 | 7 | true | 2016-06-21T16:19:44.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Run Docker on Windows without virtualization<p>I'd like to know if I can run docker with a windows containers on windows machine without machine virtualizati... |
37,904,746 | How to move camera to user current location as map loads, in Google maps V2?<p>I wonder how can i achieve showing current user location <strong>once</strong> as the map loads, without checking ever again for location change and camera moving, Unless the user asked and clicked for it. I saw many tutorials about button c... | <p>first check if location is enable or not.. if your location is enable then map will load automatically. otherwise not.</p>
<p>here is my code for both thing..</p>
<pre><code> @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setCon... | How to move camera to user current location as map loads, in Google maps V2? | android|google-maps | 7 | 15,651 | 2 | 37,904,907 | 37,904,907 | 8 | true | 2016-06-19T07:01:16.837Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to move camera to user current location as map loads, in Google maps V2?<p>I wonder how can i achieve showing current user location <strong>once</strong>... |
37,887,739 | How can I audit git rerere's resolutions?<p><strong>Background</strong></p>
<p>I am currently resolving a merge conflict with git rerere enabled. <code>git status</code> shows one unmerged path. When I view the file, there are no <code><<<<<<< HEAD</code> or <code>>>>>>>> <... | <p>you can switch to the un-rerere'd merge result with</p>
<pre><code>git checkout -m path/to/file
</code></pre>
<p>and then reapply it with </p>
<pre><code>git rerere
</code></pre>
<p>Regarding the forget troubles, did you do the forget while the conflict was still active? Forget applies to "the current conflict ... | How can I audit git rerere's resolutions? | git|git-merge|git-rerere | 7 | 515 | 1 | 37,889,966 | 37,889,966 | 9 | true | 2016-06-17T18:05:43.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I audit git rerere's resolutions?<p><strong>Background</strong></p>
<p>I am currently resolving a merge conflict with git rerere enabled. <code>git ... |
37,902,174 | More than one template in same component in AngularJS 1.5<p>Can I use more than one template in AngularJS 1.5 components ? I have one component having one attribute, so I want to load different template based on that attribute name.
How can I achieve loading of templates based on attribute name of element?</p>
<pre><c... | <p>I use two ways for making dynamic template of a component in 1.5.x:</p>
<p><strong>1) Pass via attr property:</strong></p>
<pre><code>templateUrl: function($element, $attrs) {
return $attrs.template;
}
</code></pre>
<p><strong>2) Inject a service into template and get template from there:</strong></p>
<p>t... | More than one template in same component in AngularJS 1.5 | angularjs|angularjs-components | 12 | 8,467 | 2 | 37,903,349 | 37,903,349 | 9 | true | 2016-06-18T22:22:10.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
More than one template in same component in AngularJS 1.5<p>Can I use more than one template in AngularJS 1.5 components ? I have one component having one at... |
37,943,834 | How does Convert Java File to Kotlin File work?<p>I'm exploring Kotlin through <a href="https://leanpub.com/kotlin-for-android-developers" rel="noreferrer">Kotlin for Android Developers</a>. One of the first steps is to use <code>Convert Java File to Kotlin File</code> to see how the Java and Kotlin files compare. </p>... | <p>The tool uses the IntelliJ IDEA PSI interface to parse and analyze the Java source code and then converts the resulting tree into Kotlin text. It's open-source just like everything else related to Kotlin; you can find the implementation <a href="https://github.com/JetBrains/kotlin/tree/master/j2k">here</a>.</p> | How does Convert Java File to Kotlin File work? | android|android-studio|intellij-idea|kotlin | 10 | 528 | 1 | 37,945,028 | 37,945,028 | 9 | true | 2016-06-21T11:59:27.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does Convert Java File to Kotlin File work?<p>I'm exploring Kotlin through <a href="https://leanpub.com/kotlin-for-android-developers" rel="noreferrer">K... |
37,962,271 | What's wrong with my GMRES implementation?<p>I'm trying to implement GMRES in Jupyter Notebook, which is (in case you don't know):</p>
<p><a href="https://i.stack.imgur.com/SNOz4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SNOz4.png" alt="enter image description here"></a></p>
<p>This is my code:</p>
<... | <p>I think the algorithm is giving the correct result.</p>
<p>You are trying to solve Ax=b where:</p>
<p><img src="https://chart.googleapis.com/chart?cht=tx&chl=A%20%3D%20%5Cbegin%7Bbmatrix%7D%201%20%26%201%20%5C%5C%20%203%20%26%20-4%20%5Cend%7Bbmatrix%7D%2C%20b%20%3D%20%5Cbegin%7Bbmatrix%7D%203%20%5C%5C%20%202%2... | What's wrong with my GMRES implementation? | python|numpy|scipy|numerical-methods|jupyter-notebook | 8 | 5,444 | 2 | 37,971,370 | 37,971,370 | 9 | true | 2016-06-22T08:14:31.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What's wrong with my GMRES implementation?<p>I'm trying to implement GMRES in Jupyter Notebook, which is (in case you don't know):</p>
<p><a href="https://i... |
38,021,777 | How do I get the current time in Elm 0.17/0.18?<p>I had asked this question already:<br>
<a href="https://stackoverflow.com/questions/29453679/how-do-i-get-the-current-time-in-elm">How do I get the current time in Elm?</a> </p>
<p>And answered it by writing my own (<strong>now deprecated</strong>) variant of start-app... | <p>
One option without having to do the time fetch on every update path would be to wrap your <code>Msg</code> in another message type that would fetch the time and then call your normal <code>update</code> with the time. This is a modified version of <a href="http://elm-lang.org/examples/buttons" rel="noreferrer">http... | How do I get the current time in Elm 0.17/0.18? | functional-programming|elm|frp | 14 | 3,361 | 6 | 38,022,835 | 38,022,835 | 9 | true | 2016-06-24T20:40:22.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I get the current time in Elm 0.17/0.18?<p>I had asked this question already:<br>
<a href="https://stackoverflow.com/questions/29453679/how-do-i-get-t... |
37,963,412 | Log level in Jerseys new LoggingFeature<p>I am trying to log with Jersey 2.23. Since this version, the class <code>LoggingFilter</code> is deprecated, as one can read for example here: <a href="https://jersey.java.net/documentation/latest/logging_chapter.html">https://jersey.java.net/documentation/latest/logging_chapte... | <p>I struggled with this myself for several hours before finally uncovering the "mystery" today.</p>
<p>It is somewhat counter-intuitive but the level you are setting with the <code>LOGGING_FEATURE_LOGGER_LEVEL_SERVER</code> is actually the minimum level the server's logger must be set to in order to print your logs. ... | Log level in Jerseys new LoggingFeature | java|jersey | 7 | 7,174 | 1 | 38,361,817 | 38,361,817 | 9 | true | 2016-06-22T09:07:53.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Log level in Jerseys new LoggingFeature<p>I am trying to log with Jersey 2.23. Since this version, the class <code>LoggingFilter</code> is deprecated, as one... |
37,863,953 | Use glob to find arbitrary length numbers<p>I'm looking for the glob-pattern that find all files containing the pattern <code>myfile_[SomeNumber].txt</code></p>
<p>My naive attempt was </p>
<pre><code>glob.glob("myfile_[0-9]*.txt")
</code></pre>
<p>but this also find all files on the form <code>myfile_[SomeNumber][A... | <p>You are probably confusing regular expression syntax with glob constructs. <code>[0-9]*</code> in globbing means "a single digit followed by zero or more of <em>any</em> character". So drop the <code>*</code>.</p>
<p>In <em>extended globbing</em> there is a qualifier of "one or more", but that is not supported b... | Use glob to find arbitrary length numbers | python|glob | 8 | 4,121 | 1 | 37,864,354 | 37,864,354 | 10 | true | 2016-06-16T15:53:42.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use glob to find arbitrary length numbers<p>I'm looking for the glob-pattern that find all files containing the pattern <code>myfile_[SomeNumber].txt</code><... |
37,928,116 | YAML multi-line strings: keys vs array values<p>This is very specific but left me stumped. We treat nested keys + regular arrays almost the same on parsing – sometimes adding extra info when needed, like this:</p>
<pre><code>---
Entry 1:
- lorem:
true
- ipsum
- dolor
Entry 2:
- lorem
- ipsu... | <p>YAML breaks if you mix keys and array items on the same level. You do not need multi-line strings for that:</p>
<pre><code>- 1
? 2
: 3
</code></pre>
<p>What should this parse to? An array? A mapping? This, however, works:</p>
<pre><code>- 1
- ? 2
: 3
</code></pre>
<p>So you can fix your YAML like this:</p>
<p... | YAML multi-line strings: keys vs array values | arrays|json|string|yaml|multilinestring | 7 | 6,729 | 1 | 37,938,778 | 37,938,778 | 10 | true | 2016-06-20T17:06:32.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
YAML multi-line strings: keys vs array values<p>This is very specific but left me stumped. We treat nested keys + regular arrays almost the same on parsing –... |
37,950,106 | django rest framework - request context key error<p>I have two models (Like and News). I am using django-rest-framework to make a web api out of it.</p>
<pre><code>class Like(models.Model):
user = models.ForeignKey(User)
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField(... | <p>You are getting this error because <strong>you are not passing <code>request</code> in the context when instantiating the <code>NewsSerializer</code> class or other similar serializers</strong> in the <code>to_representation()</code> method.</p>
<p>You are manually instantiating the particular serializer class in <... | django rest framework - request context key error | json|django|django-rest-framework | 10 | 3,358 | 2 | 37,951,366 | 37,951,366 | 10 | true | 2016-06-21T16:41:52.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
django rest framework - request context key error<p>I have two models (Like and News). I am using django-rest-framework to make a web api out of it.</p>
<pr... |
38,043,118 | Bootstrap switch button event<p>I'm using bootstrap switch button. I want to change input value when on text or off text is changed. How can I check if on-text="Android" I want to print android to inp1 text or if off-text="IOS" I want to print ios to inp1 text. İs there another way to check text? You can check online d... | <p>You can check if input is checked:</p>
<pre><code>$('#switch').on('switchChange.bootstrapSwitch', function (event, state) {
var x = $(this).data('on-text');
var y = $(this).data('off-text');
if($("#switch").is(':checked')) {
$("#in0p1").val(x);
} else {
$("#inp1").val(y);
}
});
$('#... | Bootstrap switch button event | jquery|twitter-bootstrap | 7 | 17,211 | 2 | 38,043,332 | 38,043,332 | 12 | true | 2016-06-26T20:58:45.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bootstrap switch button event<p>I'm using bootstrap switch button. I want to change input value when on text or off text is changed. How can I check if on-te... |
38,044,463 | React: How to I get a React component button to lose focus?<p>When I click on a pagination button, the focus state stays in the browser after the page updates. How to I tell that component to blur?</p>
<p>This is where I'm calling the component.</p>
<pre><code><Paginate onClick={this.handleButtonClick.bind(this)}... | <p>You need to use React <code>ref</code> API. When the button is mounted, you sent the reference to its DOM element locally and when you click, you call <code>blur</code> DOM API.</p>
<p>Check the example here:
<a href="http://jsfiddle.net/rtkhanas/af3eau1a/55/" rel="nofollow noreferrer">http://jsfiddle.net/rtkhanas/... | React: How to I get a React component button to lose focus? | reactjs | 11 | 27,941 | 2 | 38,044,508 | 38,044,508 | 12 | true | 2016-06-27T00:38:47.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React: How to I get a React component button to lose focus?<p>When I click on a pagination button, the focus state stays in the browser after the page update... |
37,961,650 | Conditional flex in Angular material<p>Given the bootstrap layout definition</p>
<pre><code>ng-class="{'col-sm-6':vm.data.mode === 'ADD', 'col-sm-3': vm.data.mode === 'EDIT'}"
</code></pre>
<p>What's the angular material equivalent? (To set flex="50" if vm.data.mode === 'ADD' and set flex="25" if vm.data.mode === 'ED... | <p>You can try below.</p>
<pre><code><div layout="row" layout-wrap>
<div flex-gt-sm="{{vm.data.mode === 'ADD' ? 50: 25}}"></div>
<div flex-gt-sm="{{vm.data.mode === 'ADD' ? 50: 25}}"></div>
<div flex-gt-sm="{{vm.data.mode === 'ADD' ? 50: 25}}"></div>
</div>
</code>... | Conditional flex in Angular material | html|angularjs|twitter-bootstrap|twitter-bootstrap-3|angular-material | 7 | 6,222 | 1 | 37,962,012 | 37,962,012 | 13 | true | 2016-06-22T07:44:44.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Conditional flex in Angular material<p>Given the bootstrap layout definition</p>
<pre><code>ng-class="{'col-sm-6':vm.data.mode === 'ADD', 'col-sm-3': vm.dat... |
37,980,020 | About "tensorflow.initialize_all_variables()"<p>I was wondering what're the differences between the following 2 pieces of code: </p>
<pre><code>import tensorflow as tf
x = tf.Variable(0, name='x')
model = tf.initialize_all_variables()
with tf.Session() as session:
for i in range(5):
session.run(model)
... | <p>Yeah, it's a bit tricky here. An important concept of Tensorflow is lazy evaluation, which means a Tensorflow graph of nodes is built first, and the evaluation of the graph only happens at session.run.</p>
<p>For this line of code x=x+1, the x here is of type Tensor, and the + here is the overloaded tf.add, so x=x+... | About "tensorflow.initialize_all_variables()" | tensorflow | 10 | 6,665 | 1 | 37,980,468 | 37,980,468 | 13 | true | 2016-06-22T23:49:05.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
About "tensorflow.initialize_all_variables()"<p>I was wondering what're the differences between the following 2 pieces of code: </p>
<pre><code>import tenso... |
37,894,003 | How to make pandas dataframe str.contains search faster<p>I'm searching for a substring or multiple substrings in the dataframe of 4 million rows. </p>
<pre><code>df[df.col.str.contains('Donald',case=True,na=False)]
</code></pre>
<p>or</p>
<pre><code>df[df.col.str.contains('Donald|Trump|Dump',case=True,na=False)]
</... | <p>If the number of substrings is small, it may be faster to search for one at a time, because you can pass the <code>regex=False</code> argument to <code>contains</code>, which speeds it up.</p>
<p>On a sample DataFrame of about 6000 rows that I tested it with on two sample substrings, <code>blah.contains("foo", rege... | How to make pandas dataframe str.contains search faster | python|pandas|dataframe | 14 | 5,967 | 3 | 37,894,064 | 37,894,064 | 14 | true | 2016-06-18T06:31:26.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make pandas dataframe str.contains search faster<p>I'm searching for a substring or multiple substrings in the dataframe of 4 million rows. </p>
<pre... |
38,041,818 | How to join Multiple tables using hibernate criteria where entity relationship is not direct?<p>I have three entities. those are: </p>
<pre class="lang-java prettyprint-override"><code>@Entity
public class Organization {
@Id
private long id;
@Column
private String name;
}
</code></pre>
<pre class="lan... | <p>you can do like this :</p>
<pre><code>Criteria accountCriteria = getCurrentSession().createCriteria(Account.class,"acc");
Criteria bookCriteria = accountCriteria .createCriteria("book","b");
Criteria orgCriteria = bookCriteria.createCriteria("organization","org");
orgCriteria.add(Restrictions.eq("name", "XYZ"));
... | How to join Multiple tables using hibernate criteria where entity relationship is not direct? | java|sql|join|hibernate-criteria | 9 | 56,382 | 2 | 38,093,127 | 38,093,127 | 14 | true | 2016-06-26T18:32:48.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to join Multiple tables using hibernate criteria where entity relationship is not direct?<p>I have three entities. those are: </p>
<pre class="lang-java... |
37,975,346 | Typescript, Type Object Is Not Generic<p>I am trying to create a type for an Object. But can't seem to get it right. This is what I have.</p>
<pre><code>private test:Object<Test>;
this.test = {id : 'test'};
interface Test
{
id : string;
}
</code></pre>
<p>This doesn't work. This gives me the following erro... | <p>Define a class <code>Test</code>:</p>
<pre><code>export class Test {
field1: number;
field2: string;
/// ...
}
</code></pre>
<p>then </p>
<pre><code>private test:Test;
</code></pre>
<p><strong>Update</strong>: Sorry, didn't notice you have <code>Test</code> as <code>interface</code>. It's fine too.</p>
<p... | Typescript, Type Object Is Not Generic | javascript|typescript | 12 | 36,635 | 1 | 37,975,378 | 37,975,378 | 15 | true | 2016-06-22T18:07:53.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typescript, Type Object Is Not Generic<p>I am trying to create a type for an Object. But can't seem to get it right. This is what I have.</p>
<pre><code>pri... |
37,909,408 | NativeAdsExpress forces RecyclerView to Scroll to have the NativeAd fully visible when first loaded<p>I have a weird "problem" or may be it's a "feature" and I just don't know, whenever a NativeAdExpress is loaded in my RecyclerView if only part of the NativeAd is visible, it forces the RecyclerView to scroll until the... | <p>I did not understand where you actually implement a <code>RecyclerView</code> in your code but here is anyway maybe something that could work in your case.</p>
<p>I had a similar problem with a <code>GridView</code> always getting the focus during a <code>Fragment</code> first load, it was also automatically scroll... | NativeAdsExpress forces RecyclerView to Scroll to have the NativeAd fully visible when first loaded | android|admob|android-recyclerview|native-ads | 7 | 1,589 | 3 | 38,080,880 | 38,080,880 | 15 | true | 2016-06-19T16:28:18.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NativeAdsExpress forces RecyclerView to Scroll to have the NativeAd fully visible when first loaded<p>I have a weird "problem" or may be it's a "feature" and... |
37,935,057 | How to change the text color of PreferenceCategory/PreferenceScreen<p>Here is the:</p>
<p><strong>preferences.xml</strong></p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory
android:key="@... | <p>I added a new style:</p>
<pre><code><style name="PreferenceScreen" parent="Theme.AppCompat">
<item name="android:textColor">#ffffff</item>
<item name="android:textColorPrimary">#ffffff</item>
<item name="colorPrimary">#ff0000</item>
<item name="colorPrima... | How to change the text color of PreferenceCategory/PreferenceScreen | java|android|layout|sharedpreferences|textcolor | 10 | 8,711 | 2 | 38,445,613 | 38,445,613 | 16 | true | 2016-06-21T03:25:29.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change the text color of PreferenceCategory/PreferenceScreen<p>Here is the:</p>
<p><strong>preferences.xml</strong></p>
<pre><code><?xml version=... |
37,918,547 | Middleware to set response ContentType<p>In our ASP.NET Core based web application, we want the following: certain requested file types should get custom ContentType's in response. E.g. <code>.map</code> should map to <code>application/json</code>. In "full" ASP.NET 4.x and in combination with IIS it was possible to ut... | <p>Try to use <code>HttpContext.Response.OnStarting</code> callback. This is the last event that is fired before the headers are sent.</p>
<pre><code>public async Task Invoke(HttpContext context)
{
context.Response.OnStarting((state) =>
{
if (context.Response.StatusCode == (int)HttpStatusCode.OK)
... | Middleware to set response ContentType | c#|asp.net-core|asp.net-core-1.0|owin-middleware | 18 | 9,032 | 2 | 37,920,005 | 37,920,005 | 17 | true | 2016-06-20T09:08:29.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Middleware to set response ContentType<p>In our ASP.NET Core based web application, we want the following: certain requested file types should get custom Con... |
37,931,676 | How to turn a Mutable Collection into an Immutable one<p>I was writing a small piece of code in which I internally handle my data in a mutable map, which in turn has mutable lists.</p>
<p>I wanted to expose my data to the API user, but to avoid any unsafe publication of my data I wanted to expose it in immutable colle... | <p>Currently in Kotlin stdlib there are no implementations of <code>List<T></code> (<code>Map<K,V></code>) that <strong>would not also implement</strong> <code>MutableList<T></code> (<code>MutableMap<K,V></code>). However due to <a href="https://kotlinlang.org/docs/reference/delegation.html">Kot... | How to turn a Mutable Collection into an Immutable one | kotlin | 55 | 39,962 | 8 | 37,936,456 | 37,936,456 | 17 | true | 2016-06-20T20:55:26.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to turn a Mutable Collection into an Immutable one<p>I was writing a small piece of code in which I internally handle my data in a mutable map, which in ... |
38,050,995 | How can the location of Cargo's configuration directory be overridden?<p>It seems that the default behavior of Cargo when searching for its configuration directory is to look in the current user's home directory (<code>~/.cargo</code> on my system). How can this behavior be modified to make Cargo look in a user-supplie... | <blockquote>
<h3>Environment variables Cargo reads</h3>
<p>You can override these environment variables to change Cargo's
behavior on your system:</p>
<ul>
<li><code>CARGO_HOME</code> — Cargo maintains a local cache of the registry index and of git checkouts of crates. By default these are stored und... | How can the location of Cargo's configuration directory be overridden? | rust|rust-cargo | 10 | 7,223 | 2 | 38,051,424 | 38,051,424 | 20 | true | 2016-06-27T10:00:09.350Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can the location of Cargo's configuration directory be overridden?<p>It seems that the default behavior of Cargo when searching for its configuration dir... |
38,052,825 | Is there a way to get specific permissions for debugging in android?<p>I made an application that will, on release, write and manage a database on the internal storage, because it doesn't really need to write to the sd card</p>
<p>However while debugging I would like to be able to write on the sd card so I can view an... | <p>If you are using Android Studio, you can create a <code>src/debug/AndroidManifest.xml</code> file and include your permission in it. The contents of that manifest will be merged in with your <code>src/main/AndroidManifest.xml</code> file, plus manifests from any library, but only for <code>debug</code> builds.</p> | Is there a way to get specific permissions for debugging in android? | android|debugging|permissions | 8 | 2,881 | 1 | 38,052,865 | 38,052,865 | 21 | true | 2016-06-27T11:30:59.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to get specific permissions for debugging in android?<p>I made an application that will, on release, write and manage a database on the intern... |
37,875,592 | How does webpack resolve imports from node_modules?<p>When I need a library from my <code>node_modules</code> folder I do something like this:</p>
<pre><code>import angular from 'angular';
import $ from 'jquery;
</code></pre>
<p>How does webpack know what file(s) it really has to import? Guess there's some kind of st... | <p>Webpack loops over <a href="https://webpack.js.org/api/resolvers/" rel="noreferrer">resolvers</a> to find the file you requested. It goes over <a href="https://webpack.js.org/configuration/resolve/" rel="noreferrer">resolve templates</a> to figure out the exact path.</p>
<p>If you try to import a module that doesn'... | How does webpack resolve imports from node_modules? | webpack|node-modules | 27 | 21,519 | 1 | 37,879,527 | 37,879,527 | 22 | true | 2016-06-17T07:28:08.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does webpack resolve imports from node_modules?<p>When I need a library from my <code>node_modules</code> folder I do something like this:</p>
<pre><cod... |
38,049,020 | How to test file attachment on hidden input using capybara?<p>I have hidden input inside of label:</p>
<pre><code><label for="upload">
<input class="hidden" type="file" name="file[picture]">
</label>
</code></pre>
<p>When I click on the label, I attach a file and then confirm.</p>
<p>After that m... | <p><strong>Update:</strong> Capybara 2.12 added a <code>make_visible</code> option to <code>attach_file</code> so if using 2.12+ you can first try</p>
<pre><code>attach_file('file[picture]', 'path/to/file.png', make_visible: true)
</code></pre>
<p>before directly using <code>execute_script</code> yourself</p>
<hr>
... | How to test file attachment on hidden input using capybara? | ruby-on-rails|rspec|capybara | 12 | 5,187 | 3 | 38,054,794 | 38,054,794 | 29 | true | 2016-06-27T08:21:04.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to test file attachment on hidden input using capybara?<p>I have hidden input inside of label:</p>
<pre><code><label for="upload">
<input cla... |
38,046,862 | How to check realm for android data existence?<p>how do I check whether certain value is exist or not in my realm database based on this code below?</p>
<pre><code>realm.where(User.class).equalTo("cardId", cardId).findFirst()
</code></pre>
<p>Thanks in advance.</p> | <p>You can perform null check.</p>
<pre><code>User user = realm.where(User.class).equalTo("cardId", cardId).findFirst();
if (user != null) {
// Exists
} else {
// Not exist
}
</code></pre> | How to check realm for android data existence? | android|realm | 18 | 11,528 | 2 | 38,046,903 | 38,046,903 | 39 | true | 2016-06-27T06:05:48.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check realm for android data existence?<p>how do I check whether certain value is exist or not in my realm database based on this code below?</p>
<pr... |
37,958,278 | Convert class 'pandas.indexes.numeric.Int64Index' to numpy<p>I am isolating some row ids from a Pandas dataframe, like this: </p>
<pre><code>data = df.loc[df.cell == id]
rows = df.index
print(type(rows))
< class 'pandas.indexes.numeric.Int64Index'>
</code></pre>
<p>I want to convert rows to a numpy array so I ... | <p>try <code>rows = df.index.values</code> instead</p> | Convert class 'pandas.indexes.numeric.Int64Index' to numpy | python|numpy|pandas|dataframe | 19 | 44,617 | 1 | 37,958,335 | 37,958,335 | 49 | true | 2016-06-22T03:55:41.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert class 'pandas.indexes.numeric.Int64Index' to numpy<p>I am isolating some row ids from a Pandas dataframe, like this: </p>
<pre><code>data = df.loc[d... |
37,858,370 | Uncaught SyntaxError: Invalid or unexpected token<p>I have a razor syntax like this: </p>
<pre><code> foreach(var item in model)
{
<td><a href ="#" onclick="Getinfo(@item.email);" >6/16/2016 2:02:29 AM</a> </td>
}
</code></pre>
<p>My javascript that recieves the request goes like thi... | <p>You should pass <code>@item.email</code> in quotes then it will be treated as string argument </p>
<pre><code><td><a href ="#" onclick="Getinfo('@item.email');" >6/16/2016 2:02:29 AM</a> </td>
</code></pre>
<p>Otherwise, it is treated as variable thus error is generated.</p> | Uncaught SyntaxError: Invalid or unexpected token | javascript|jquery|razor | 40 | 323,109 | 3 | 37,858,434 | 37,858,434 | 64 | true | 2016-06-16T11:50:45.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Uncaught SyntaxError: Invalid or unexpected token<p>I have a razor syntax like this: </p>
<pre><code> foreach(var item in model)
{
<td><a hr... |
37,925,035 | Notepad plus plus shortcut for reloading files<p>Is there any keyboard shortcut for reloading files in n++ ?
How can i configure my own?</p>
<p>Steps to reproduce:</p>
<ul>
<li>right click and reload on header tab.</li>
</ul> | <p>Steps for mapping a keyboard shortcut for reloading files in n++. </p>
<ol>
<li>First open Notepad++ application </li>
<li><p>Now go to Settings tab >Shortcut mapper</p></li>
<li><p>Now here select the first tab which is <strong>main menu</strong></p></li>
<li><p>You can find the "<em>reload from disk</em>" option ... | Notepad plus plus shortcut for reloading files | notepad++ | 31 | 17,959 | 3 | 37,925,153 | 37,925,153 | 69 | true | 2016-06-20T14:25:33.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Notepad plus plus shortcut for reloading files<p>Is there any keyboard shortcut for reloading files in n++ ?
How can i configure my own?</p>
<p>Steps to rep... |
37,877,381 | What is the difference between immutable and const variables in Rust?<p>I learned that if a variable is not explicitly declared mutable using <code>mut</code>, it becomes immutable (it cannot be changed after declaration). Then why do we have the <code>const</code> keyword in Rust? Aren't they the same? If not, how do ... | <p><code>const</code>, in Rust, is short for <em>constant</em> and is related to <em>compile-time evaluation</em>. It shows up:</p>
<ul>
<li>when declaring constants: <code>const FOO: usize = 3;</code></li>
<li>when declaring compile-time evaluable functions: <code>const fn foo() -> &'static str</code></li>
</u... | What is the difference between immutable and const variables in Rust? | rust|constants|immutability | 103 | 17,981 | 7 | 37,881,340 | 37,881,340 | 74 | true | 2016-06-17T09:03:07.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the difference between immutable and const variables in Rust?<p>I learned that if a variable is not explicitly declared mutable using <code>mut</code... |
38,015,671 | Asynchronous iterable mapping in Dart<p>Can I map some Iterable using async mapping function? Maybe it is a bug, that this code prints list of _Future imidiately, not ints after 1 or 5 seconds?</p>
<pre><code>import 'dart:async';
Future<int> foo(int i) {
var c = new Completer();
new Timer(new Duration(secon... | <p>The expression <code>(i) async => await foo(i)</code> still returns a future. You can use <code>Future.wait(mappedList)</code> to wait till all created futures are completed.</p> | Asynchronous iterable mapping in Dart | dart | 46 | 21,268 | 5 | 38,016,334 | 38,016,334 | 86 | true | 2016-06-24T14:21:09.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Asynchronous iterable mapping in Dart<p>Can I map some Iterable using async mapping function? Maybe it is a bug, that this code prints list of _Future imidia... |
37,857,695 | Is there a way to sync data between devices without saving on the server?<p>I want to make my own music player website and app and I want to make it so whenever I add a new song anywhere it will update on the other platform.</p>
<p>How can I do this without actually saving all the songs on a server? I can use a server... | <p>So your desired result is for all clients to be synchronized. </p>
<p>If I had to implement this, I would implement behavior on all my clients that would ask for updates on startup, and push changes on exit. Then on my server, I would create an API that can handle these requests, using a database to store the metad... | Is there a way to sync data between devices without saving on the server? | php|android|synchronization | -4 | 786 | 1 | 37,859,520 | 37,859,520 | 0 | true | 2016-06-16T11:21:28.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to sync data between devices without saving on the server?<p>I want to make my own music player website and app and I want to make it so whene... |
38,037,857 | For loop through Array only shows last value, Google Map<p>I'm trying to place 3 markers on Google Map.</p>
<p>In JavaScript I wrote my loop as below</p>
<pre><code>var places = ["Bondi Beach", "Coogee Beach", "Cronulla Beach"];
var lat = [-33.890542, -33.923036, -34.028249];
var lng = [151.274856, 151.259052, 151.15... | <pre><code>for (tot=lat.length; z < tot; z++) {
var locations = [
[places[z], lat[z], lng[z]]
];
}
</code></pre>
<p>Here you're overwriting the locations array with every iteration.
Push the new elements into the array instead.</p>
<pre><code>var locations = []
for (tot=lat.length; z < tot; z++) {
... | For loop through Array only shows last value, Google Map | javascript|google-maps | -3 | 330 | 1 | 38,037,894 | 38,037,894 | 2 | true | 2016-06-26T11:05:10.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
For loop through Array only shows last value, Google Map<p>I'm trying to place 3 markers on Google Map.</p>
<p>In JavaScript I wrote my loop as below</p>
<... |
37,868,117 | overlapping dates between two date ranges in python<p>I'm looking to find overlapping dates between two dates ranges as the following:</p>
<pre><code>range1 = start(2016-06-01) end (2016-06-20)
range2 = start(2016-06-10) end (2016-06-13)
</code></pre>
<p>result here is 4 dates <code>(2016-06-10,2016-06-11,2016-06-12,... | <p>I would suggest generating the dates in each of both ranges, then selecting the intersection between the two set. A snipped doing so may look like this:</p>
<pre><code>from datetime import date, timedelta
def f(d1, d2):
delta = d2 - d1
return set([d1 + timedelta(days=i) for i in range(delta.days + 1)])
r... | overlapping dates between two date ranges in python | python|date|date-range | 7 | 3,879 | 3 | 37,869,871 | 37,869,871 | 3 | true | 2016-06-16T19:44:27.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
overlapping dates between two date ranges in python<p>I'm looking to find overlapping dates between two dates ranges as the following:</p>
<pre><code>range1... |
37,933,244 | swift 3, PHFetchResult.enumerateObjects error<p>In swift 3,the method is show me "ambiguous use of 'enumerateObjects'",what happen.how can i do?</p>
<pre><code>extension PHFetchResult {
public func assetCollection() -> [PHAssetCollection] {
var list :[PHAssetCollection] = []
self.enumerateObjects { (object,... | <p>Do something like this noh. You can't directly add extension for <code>PHFetchResult</code> because it has other ObjectType as its generic parameter <code>PHFetchResult<ObjectType></code> . So you must do something else.</p>
<pre><code>class FetchPhoto {
class func assetCollection() -> [PHAssetCollect... | swift 3, PHFetchResult.enumerateObjects error | swift3 | 7 | 4,936 | 2 | 37,936,820 | 37,936,820 | 3 | true | 2016-06-20T23:15:42.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
swift 3, PHFetchResult.enumerateObjects error<p>In swift 3,the method is show me "ambiguous use of 'enumerateObjects'",what happen.how can i do?</p>
<pre><c... |
38,006,462 | Changing components based on url with react router<p>This is more of an architectural question regarding react than a specific issue, but what is considered best practice for managing state/props with a layout component and a several child components which are rendered based on the url?</p>
<p>Note: I'm aware that sim... | <p>I feel what you are doing is perfectly fine. You are on the right path.</p>
<p>There's a combination of APIs that React provides you with that will take care of exactly what you're not certain about of how to achieve ( <code>way to pass props to components rendered by this.props.children</code> )</p>
<p>First, you... | Changing components based on url with react router | javascript|reactjs|flux | 8 | 14,881 | 1 | 38,006,665 | 38,006,665 | 3 | true | 2016-06-24T05:55:52.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing components based on url with react router<p>This is more of an architectural question regarding react than a specific issue, but what is considered ... |
37,900,553 | Worldwind Line from Symbol to Terrain<p>Worldwind's Point PlaceMark renderable has the feature to drop a line from the Placemark down to the terrain by calling <a href="http://builds.worldwind.arc.nasa.gov/worldwind-releases/2.0/docs/api/gov/nasa/worldwind/render/PointPlacemark.html#setLineEnabled(boolean)" rel="nofoll... | <p>Ok, so the problem here is a mixing between orthographic and perspective projection within the framework. Crucially, if we look at PointPlaceMark's <code>beginDrawing</code> we see:</p>
<pre><code>GL2 gl = dc.getGL().getGL2(); // GL initialization checks for GL2 compatibility.
int attrMask =
GL2.GL_DEPTH_B... | Worldwind Line from Symbol to Terrain | java|opengl|jogl|worldwind | 7 | 581 | 1 | 38,033,116 | 38,033,116 | 5 | true | 2016-06-18T18:55:05.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Worldwind Line from Symbol to Terrain<p>Worldwind's Point PlaceMark renderable has the feature to drop a line from the Placemark down to the terrain by calli... |
37,993,582 | Use rebase when Sync in Visual Studio 2015<p>I'm using Visual Studio 2015 and Git. When I need to push my commits I use fetch and rebase to merge the new commits before push. This is my company default policy to mantain the history clear without the join merges.</p>
<p>Is possible to configure the Sync feature of Visu... | <p>As of right now, it looks like this feature isn't supported by Visual Studio.</p>
<p>You can see the references <a href="https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/10294356-sync-button-should-allow-git-pull-rebase" rel="noreferrer">here</a> and <a href="https://visualstudio.uservoice... | Use rebase when Sync in Visual Studio 2015 | git|visual-studio-2015|git-rebase | 7 | 2,063 | 2 | 38,000,166 | 38,000,166 | 6 | true | 2016-06-23T13:50:03.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use rebase when Sync in Visual Studio 2015<p>I'm using Visual Studio 2015 and Git. When I need to push my commits I use fetch and rebase to merge the new com... |
38,026,276 | How to add "No Record Found" in PrimeNG Datatable When data is not there?<p>I searched on primeNG official site, and I found that there is no such attribute like <code>emptyMessage= "No Record Found"</code> for data table in PrimeNG
ref.<a href="http://www.primefaces.org/primeng/#/datatable" rel="noreferrer">http://ww... | <p>According to the documentation, there is indeed no such tag on the DataTable. I had the same problem/question. And I solved it by creating a second element that I show instead of the DataTable. So adding a condition like <code>*ngIf="jobData.length==0"</code>.</p>
<p>For example:</p>
<pre><code><p-dataTable #da... | How to add "No Record Found" in PrimeNG Datatable When data is not there? | angular|primeng | 12 | 22,024 | 5 | 38,060,072 | 38,060,072 | 6 | true | 2016-06-25T07:53:21.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add "No Record Found" in PrimeNG Datatable When data is not there?<p>I searched on primeNG official site, and I found that there is no such attribute ... |
37,892,093 | How to enable PHP redis extension on Travis<p>I'm running Travis CI for running my tests. I'm using the Trusty container with php v5.6.</p>
<p>Here is my entire .travis.yml file:</p>
<pre><code>language: php
dist: trusty
php:
- '5.4'
before_script:
- phpenv config-rm xdebug.ini
- before_script: echo "extensi... | <p>It appears that <a href="https://docs.travis-ci.com/user/languages/php/#enabling-preinstalled-php-extensions" rel="nofollow noreferrer">this documentation</a> is incorrect! Instead of <code>before_script:</code> it needs to be <code>before_install:</code>. This seems to work fine:</p>
<pre><code>before_install:
- ... | How to enable PHP redis extension on Travis | php|continuous-integration|travis-ci|phpredis | 12 | 1,818 | 1 | 37,901,828 | 37,901,828 | 7 | true | 2016-06-18T00:25:52.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to enable PHP redis extension on Travis<p>I'm running Travis CI for running my tests. I'm using the Trusty container with php v5.6.</p>
<p>Here is my en... |
37,907,224 | Deserialize nested fields in marshmallow<p>I'm consuming an API that returns something like:</p>
<pre><code>{'name': 'foo', 'start': {'date': '2016-06-19', 'time': '18:00'}}
</code></pre>
<p>And I want to desearialize it with marshmallow to get only the name and the start date, so the desired result would be the foll... | <p>You will need to create a <code>NestedSchema</code> for the nested dictionary, and overwrite your parent schema's <code>load</code> method to append the nested field to parent. Specify a <code>only</code> attribute so the <code>Nested</code> field does not fetch all of its items:</p>
<pre><code>class DateTimeSchema... | Deserialize nested fields in marshmallow | python|transformation|preprocessor|marshmallow | 12 | 11,598 | 4 | 37,908,019 | 37,908,019 | 7 | true | 2016-06-19T12:26:24.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deserialize nested fields in marshmallow<p>I'm consuming an API that returns something like:</p>
<pre><code>{'name': 'foo', 'start': {'date': '2016-06-19', ... |
37,869,727 | Kubernetes support for Internal Load Balancers in AWS<p>I have a Kubernetes cluster that is connected over VPN to an on-premise datacentre. This cluster needs to "expose" Services to other programs running in the datacenter, but not to the Internet.</p>
<p>Currently I've been creating Services with type "NodePort" and... | <p>Per <a href="https://github.com/kubernetes/kubernetes/issues/17620#issuecomment-212508777" rel="nofollow noreferrer">this thread</a>, apply annotation <code>service.beta.kubernetes.io/aws-load-balancer-internal</code> to the service definition.</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
name: someServi... | Kubernetes support for Internal Load Balancers in AWS | amazon-web-services|kubernetes | 8 | 12,547 | 4 | 37,928,890 | 37,928,890 | 7 | true | 2016-06-16T21:36:11.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kubernetes support for Internal Load Balancers in AWS<p>I have a Kubernetes cluster that is connected over VPN to an on-premise datacentre. This cluster need... |
37,870,361 | counting unique visitors with flask<p>I would like to count the number of unique visitors and store that number in my database. I know that I can get the ip address with </p>
<pre><code>request.remote_addr
</code></pre>
<p>so my default plan would be to store this address with a timestamp in my database. For any new ... | <p>To get a faster more reliable solution, simply offload this functionality to another service like <a href="https://analytics.google.com/" rel="noreferrer">Google Analytics</a>. They provide a very detailed/in-depth view of the traffic on your website without you having to worry about the intricate details.</p>
<p>R... | counting unique visitors with flask | flask | 7 | 4,909 | 1 | 37,903,727 | 37,903,727 | 8 | true | 2016-06-16T22:25:25.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
counting unique visitors with flask<p>I would like to count the number of unique visitors and store that number in my database. I know that I can get the ip ... |
37,972,004 | What does Connection.isValid(time) actually do to check if connection if valid?<p>Using OJDBC process does the isValid method use to check if the the connection is still alive? I'm trying to figure out what impact it could have on the database and how heavy this process is. e.g. does it request a column, or just ping t... | <p>Each vendor implements jdbc methods differently.
For example Oracle's implementation is :</p>
<pre><code>public boolean isValid(int var1) throws SQLException {
return this.pingDatabase(var1) == 0;
}
</code></pre>
<p>And <code>pingDatabase</code> simply executes <code>select x from dual</code> :</p>
<pre><code... | What does Connection.isValid(time) actually do to check if connection if valid? | java|sql|database|jdbc|ojdbc | 9 | 4,941 | 2 | 37,972,755 | 37,972,755 | 8 | true | 2016-06-22T15:11:07.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What does Connection.isValid(time) actually do to check if connection if valid?<p>Using OJDBC process does the isValid method use to check if the the connect... |
38,020,106 | How should i get aws region names using regions<p>Hi I want to get the amazon web services(aws) region names using regions means </p>
<pre><code> region is "us-east-1" region name is "US East (N. Virginia)"
region is "us-west-2" region name is "US West (Oregon)"
</code></pre>
<p>using us-east-1 region i want to ... | <p>There isn't an AWS API method to call to get this information.</p>
<p>Some SDKs, such as the AWS SDK for .NET has this information baked into the SDK. For example, in C#:</p>
<pre><code>var regions = Amazon.RegionEndpoint.EnumerableAllRegions;
foreach (var r in regions)
{
Console.WriteLine("{0} -> {1}", r.Sys... | How should i get aws region names using regions | java|amazon-web-services | 9 | 3,612 | 6 | 38,020,474 | 38,020,474 | 8 | true | 2016-06-24T18:41:16.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How should i get aws region names using regions<p>Hi I want to get the amazon web services(aws) region names using regions means </p>
<pre><code> region i... |
38,051,950 | Can I restrict CloudWatch Actions based on Resource or Condition?<p>I am trying to restrict CloudWatch Actions to a certain VPC or Resource. Can I do that?. Following is the policy</p>
<pre><code>{
"Sid": "AllowCloudWatchActions",
"Effect": "Allow",
"Action": [
"cloudwatch:DescribeAlarms",
... | <p>CloudWatch does not have any resource-level permissions. To quote the AWS docs:</p>
<blockquote>
<p>CloudWatch doesn't have any specific resources for you to control access to. Therefore, there are no CloudWatch ARNs for you to use in an IAM policy. You use * as the resource when writing a policy to control acces... | Can I restrict CloudWatch Actions based on Resource or Condition? | amazon-web-services|amazon-iam|amazon-cloudwatch | 8 | 4,929 | 2 | 38,055,068 | 38,055,068 | 8 | true | 2016-06-27T10:45:23.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I restrict CloudWatch Actions based on Resource or Condition?<p>I am trying to restrict CloudWatch Actions to a certain VPC or Resource. Can I do that?. ... |
37,934,080 | Can't get scipy.io.wavfile.read() to work<p>I am trying to read a .wav file into an array so that I can then plot the array and do a FFT. I got the file open with the wave module and now I am struggling. I was advised to use scipy.io.wavfile.read(filename, mmap=False) but am not having any luck. This function should do... | <p>You have confused <a href="http://docs.scipy.org/doc/scipy-0.14.0/reference/io.html#module-scipy.io.wavfile" rel="noreferrer">SciPy's WAV module</a> with <a href="https://docs.python.org/2/library/wave.html" rel="noreferrer">Python's</a>. Remove <code>import wave</code>, use <code>import scipy.io.wavfile</code>, and... | Can't get scipy.io.wavfile.read() to work | python-2.7|numpy|scipy | 8 | 11,322 | 1 | 37,934,100 | 37,934,100 | 9 | true | 2016-06-21T01:05:19.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't get scipy.io.wavfile.read() to work<p>I am trying to read a .wav file into an array so that I can then plot the array and do a FFT. I got the file open... |
38,022,221 | Navigating through dynamic Object (json) in C#<p>i'm getting a json from a HTTP GET request that looks like after parsing it with "NewtonSoft.Json":</p>
<pre><code>dynamic data = JsonConvert.DeserializeObject(responseString);
</code></pre>
<p>Where responseString is :</p>
<pre><code>{"name1":{"id":123456789,"name":"... | <p>You can deserialize to JObject instead of dynamic, which gives you access to handy properties such as <code>First</code> which allow you to walk down the object structure without knowing the property name, as well as iterate over the objects on <code>data</code> with a foreach loop, based on your edit.</p>
<p>Once ... | Navigating through dynamic Object (json) in C# | c#|json.net | 9 | 8,485 | 1 | 38,022,324 | 38,022,324 | 9 | true | 2016-06-24T21:14:21.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Navigating through dynamic Object (json) in C#<p>i'm getting a json from a HTTP GET request that looks like after parsing it with "NewtonSoft.Json":</p>
<pr... |
37,932,754 | create an index template using the java api in elastic search<p>The current java API for elastic search documentation does not say anything about creating an index template.
I know I can create an index template using crud, but my elastic search index is going grow depending on the data I get. The data I have right now... | <p>You can use the IndicesAdminClient to create a template</p>
<pre><code>node.client().admin().indices().putTemplate(
new PutIndexTemplateRequest("templatename").source(templateString)
);
</code></pre>
<p>PutIndexTemplateRequest has other methods to programatically build the template if you'd prefer to build it ... | create an index template using the java api in elastic search | java|elasticsearch | 8 | 3,146 | 1 | 37,932,870 | 37,932,870 | 10 | true | 2016-06-20T22:21:18.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
create an index template using the java api in elastic search<p>The current java API for elastic search documentation does not say anything about creating an... |
37,989,945 | Select all fields from table A but single field from B?<p>Is there a way in ABAP's OpenSQL to simplify the select columns in a <code>JOIN</code> when I want to grab all the fields of one table but only selected fields from the other table(s)?</p>
<p>For instance, in mysql <a href="https://stackoverflow.com/a/14000583/... | <p>Yes, this is possible in the OpenSQL from 7.40 SP08. See this <a href="http://scn.sap.com/community/abap/blog/2014/10/08/abap-news-for-740-sp08--open-sql">article</a>.</p>
<p>The quotation from the article has that.</p>
<h1>Column Specification</h1>
<blockquote>
<p>In the SELECT list, you can specify all column... | Select all fields from table A but single field from B? | abap|opensql | 11 | 11,275 | 1 | 37,990,180 | 37,990,180 | 10 | true | 2016-06-23T11:10:50.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Select all fields from table A but single field from B?<p>Is there a way in ABAP's OpenSQL to simplify the select columns in a <code>JOIN</code> when I want ... |
37,815,587 | Swagger best practices<p>I am currently defining a Rest API and I intend to use <strong>Swagger</strong> to document it.
I've already started to define my API specifications with the <strong>Open Api Specification</strong> in YAML into the <strong>Swagger-Editor</strong>.</p>
<p>Then, I understand that I will provide ... | <p>To maintain the API documentation, the best course of action that i can suggest is to follow a hybrid approach.</p>
<p>Initially, when you have to do bulk development, go for the top down approach. This will reduce the initial set up and coding effort. That's the basic idea behind any codegen. </p>
<p>Then, when i... | Swagger best practices | swagger | 13 | 7,213 | 2 | 37,851,048 | 37,851,048 | 11 | true | 2016-06-14T14:58:28.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swagger best practices<p>I am currently defining a Rest API and I intend to use <strong>Swagger</strong> to document it.
I've already started to define my AP... |
38,000,982 | RxJS Observable returning array, run another function with each array iteration<p>I have a function <code>getNews()</code>, which basically returns angular's http.get request. Result of request is array of Id's. I would like to iterate through this array I got and run another http.get request (function <code>getItem(id... | <p>You probably want to use the concatMap operator instead of map. concatMap flattens the returning Observable to the source Observable, while map returns an observable of observable.</p>
<p>If you want data from getItem() to be in the same order listed in 'all_news_url', you could try something like</p>
<pre><code>t... | RxJS Observable returning array, run another function with each array iteration | javascript|angularjs|rxjs|observable | 11 | 17,192 | 2 | 38,009,671 | 38,009,671 | 15 | true | 2016-06-23T20:14:53.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RxJS Observable returning array, run another function with each array iteration<p>I have a function <code>getNews()</code>, which basically returns angular's... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.