Id
int64
34.6M
60.5M
Title
stringlengths
15
150
Body
stringlengths
33
36.7k
Tags
stringlengths
3
112
CreationDate
stringdate
2016-01-01 00:21:59
2020-02-29 17:55:56
Y
stringclasses
3 values
34,646,833
Any Javascript Expert: Who can add multiple IDs in This Script to Check If CSS does not match redirect Page
Javascript expert, i have the below script $('#copyright, #credit, #doom a').each(function () { if ($(this).css('font-size') != '15px') { document.location.href = "http://www.example.com"; } }); It check all these IDs Css properties for font-size 15px if not equal then t...
<javascript><jquery><html><redirect><url-redirection>
2016-01-07 03:20:24
LQ_EDIT
34,646,992
How to work with xml and java (android)
<p>How do I make something in xml, and change the value of it in Java?</p> <p>ex:</p> <pre><code>&lt;TextView android:text="Hello World!" android:textSize="50dp" android:layout_marginTop="27dp" android:id="@+id/textView" android:editable="true" android:enabled="true" /&gt; </code></pre> <p>No...
<java><android><xml>
2016-01-07 03:41:04
LQ_CLOSE
34,647,303
Spring RestTemplate with paginated API
<p>Our REST APIs are returning results in Pages. Here is an example of one Controller</p> <pre><code>@RequestMapping(value = "/search", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE + ";charset=UTF-8") @ResponseStatus(HttpStatus.OK) public Page&lt;MyObject&gt; findAll(Pageable pageable) { ....
<spring><rest><resttemplate>
2016-01-07 04:18:45
HQ
34,647,536
how to get audio.duration value by a function
<p>Im my audio player I need to get the duration of my audio track. I need a function that gets src of the audio and returns its duration. Here is what I am trying to do but does not work:</p> <pre><code>function getDuration(src){ var audio = new Audio(); audio.src = "./audio/2.mp3"; var due; return ge...
<javascript><jquery><audio><html5-audio>
2016-01-07 04:44:14
HQ
34,647,589
how can i add values with the same "account title" and display this in my gridview using vb.net / aspx
[This is the source grid view with a sql datasource named trialbalance][1] [1]: http://i.stack.imgur.com/bA2jO.jpg [Output gridview should look like this...][2] [2]: http://i.stack.imgur.com/M9Qmd.jpg
<asp.net><sql-server><vb.net>
2016-01-07 04:49:45
LQ_EDIT
34,647,831
Best resources for learning Machine Learning for beginners
<p>I am keen in learning machining learning. I know programming, just want to know some useful sites which will help in understanding the concepts of machine learning with simple examples.</p>
<machine-learning>
2016-01-07 05:16:50
LQ_CLOSE
34,647,874
Java servets response.getMethod() not working
Hello I am trying to create a simple servlet as follows import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Form extends HttpServlet { public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException { ...
<java><servlet-3.0><get-method>
2016-01-07 05:21:09
LQ_EDIT
34,648,255
Using clang-format in CLion
<p>I'd like to format my code using clang-format in CLion. I've gone through the settings and haven't found any setting that would allow me to run an external command to transform code. How are such things normally done in CLion?</p>
<c++><clang><clion><clang-format>
2016-01-07 05:56:16
HQ
34,648,336
how to get IP address and pc name of all pc's shared with me in a array using matlab script
<p>the array should be looks like below.<br> <strong>PC NAME IP ADDRESS</strong></p> <pre><code> SYSTEM1 192.168.12.45 SYSTEM2 192.168.12.4 SYSTEM3 192.168.12.5 SYSTEM4 192.168.12.15 </code></pre>
<matlab>
2016-01-07 06:02:37
LQ_CLOSE
34,648,411
instead of passing whole array to intent pass only onClicked value
i am trying to pass only the onClicked value in the below code instead of passing the whole array to intent. Is it possible?? here, i am sending whole array as in "i.putExtra("rank", rank)", is there some other way. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanc...
<android><arrays><android-intent>
2016-01-07 06:09:01
LQ_EDIT
34,648,673
Custom Serchbar in ios
Hello i am using `UISerchbar` in `tableview` but is there any easy way to create custom `searchbar` in `tableview headerview`?
<ios><objective-c><uitableview><uisearchbar>
2016-01-07 06:30:23
LQ_EDIT
34,648,921
Pair up row in Sql
I have a Players table with 3 columns id, name, wins(number of win matches). To make a Swiss pairing, I sort this table order by wins. How can I return a table with 4 columns id1, name1, id2, name2 such that each row of new table is the pair of rows in Players table. I can do it in python language, but I want to know t...
<sql><postgresql>
2016-01-07 06:47:25
LQ_EDIT
34,649,300
Cookies vs. Web storage
<p>I am creating a project where I want to save the last level that the user reached so they can continue where they leave off the next time. I am wondering whether I should use cookies or web storage, and the reasons for using each one. For example, does one affect performance, is one commonly enabled/disabled, is one...
<javascript><html>
2016-01-07 07:13:00
LQ_CLOSE
34,649,311
Will it cause any issue if I use multiple Facebook Pixel in one page?
<p>I would like to include both my Facebook Pixel id and customer's Facebook Pixel id in one page, so both of us can have some insight about users, and customer can also create ADs for the page if he or she wants to.</p> <p>I already test tracking and it seems to work fine. However I do receive warnings from Pixel SDK...
<facebook>
2016-01-07 07:13:32
HQ
34,649,969
How to find the features names of the coefficients using scikit linear regression?
<pre><code>#training the model model_1_features = ['sqft_living', 'bathrooms', 'bedrooms', 'lat', 'long'] model_2_features = model_1_features + ['bed_bath_rooms'] model_3_features = model_2_features + ['bedrooms_squared', 'log_sqft_living', 'lat_plus_long'] model_1 = linear_model.LinearRegression() model_1.fit(train_d...
<python><machine-learning><scikit-learn><linear-regression>
2016-01-07 07:58:04
HQ
34,650,410
Angular 2 [hidden] does not seem to be working?
<p>My component is defined this way:</p> <pre><code>import { Component } from 'angular2/core' @Component({ selector: 'sidebar', templateUrl: 'js/app/views/sidebar.html', }) export class SidebarComponent { public sections: boolean[] = [ true, false, false, false, fal...
<angular>
2016-01-07 08:28:14
HQ
34,650,738
How can I change the format of this input?
<p>I have this script in js:</p> <p><strong>CODE HTML:</strong></p> <pre><code>&lt;input class="required-input" type="text" name="date_of_birth" id="date_of_birth" placeholder="MM/DD/YYYY"&gt; </code></pre> <p><strong>CODE JS:</strong></p> <pre><code>$('.required-input').each(function() { $(this).on('i...
<javascript><regex><validation>
2016-01-07 08:48:14
LQ_CLOSE
34,651,379
how to make py.test --cov skip virtualenv directory
<p>Should I care how my tests cover the external libraries I'm using in my project ? </p> <p>The py.test --cov displays how all files are covered, including ones in my virtualenv directory. How can I make the output show only the coverage of the modules I've written ?</p>
<python-2.7><virtualenv><pytest><test-coverage>
2016-01-07 09:21:37
HQ
34,652,311
When OutofMemory error occurs in Android?
I am parsing JSON String fetched from web.(Around 40,000 records in a single chunk). I call AsyncTask recursively(40k records retrieved in a single call) until i fetched all the records from server(Total records 2 lac). In first two calls app responds smooth and around 80k records fetched from server, but in third c...
<android>
2016-01-07 10:05:40
LQ_EDIT
34,652,998
How does angular "$uibModalInstance.close(data)" works?
<p>The official documentation of AngularJS does not contain any thing that describes how <code>$uibModalInstance.close</code> works, in the following code fragment, <code>scope.close</code> is a method used to close the modal window and pass an object to the caller controller</p> <pre class="lang-js prettyprint-over...
<angularjs><angular-ui-modal>
2016-01-07 10:37:29
HQ
34,653,770
Why does Ubuntu have old versions of nodejs and npm in their apt-get package manager?
<p>When I install nodejs and npm with apt-get </p> <pre><code>sudo apt-get update sudo apt-get install nodejs modejs-legacy npm I have the versions </code></pre> <p>I get the following versions</p> <pre><code>npm -v 1.3.10 nodejs -v v0.10.25 </code></pre> <p>I know how to update these manually, but why does the ap...
<node.js><ubuntu><npm><apt-get>
2016-01-07 11:16:51
HQ
34,653,869
Android studio - share data between activity
<p>Im making an app/game in android studio. And I have over 10 activities in my app/game and I have f.eks "int HP" I want to share with the others activities. </p>
<java><android><android-studio>
2016-01-07 11:22:03
LQ_CLOSE
34,654,869
What is the meaning of this -> symbol in Java?
<p>I am not able to understand how to make this code should work in Java7</p> <pre><code>RetryPolicy retryPolicy = new RetryPolicy() .retryWhen((ClientResponse response) -&gt; response.getStatus() != 200) .withDelay(1, TimeUnit.SECONDS) .withMaxRetries(3); Recurrent.get(() -&gt; webResource.post(ClientResponse....
<java>
2016-01-07 12:13:51
LQ_CLOSE
34,655,321
MySQL: How to ORDER BY on multiple columns?
<p>I have the the following columns on a table</p> <pre><code>type | date_1 | date_2 | date_3 </code></pre> <p>type column is </p> <pre><code>ENUM('1','2','3') </code></pre> <p>I need to order by on date columns but use appropriate columns based on <code>type</code> column on every row.</p>
<mysql><sql>
2016-01-07 12:37:23
LQ_CLOSE
34,655,695
Redux - how to keep the reducer state during hot reload
<p>I use <em>React</em> + <em>Redux</em> + <em>Webpack</em> + <em>WebpackDevserver</em>. Once the hot loader is launched all my reducers are reseted to the initial state. </p> <p>Can I keep somehow my reducers in the actual state?</p> <p>My Webpack config contains:</p> <pre><code>entry: [ "./index.jsx" ], outpu...
<webpack><redux><webpack-dev-server><react-hot-loader>
2016-01-07 12:54:56
HQ
34,656,168
Stay signed in option with cookie-session in express
<p>I would like to have a "Stay signed in" option such as the one provided by Gmail. This way, the user <strong>can decide</strong> if they want to keep the session open upon opening a new browser session after previously closing it.</p> <p>Looking into the github issues I saw <a href="https://github.com/expressjs/co...
<node.js><express><cookie-session>
2016-01-07 13:18:55
HQ
34,656,814
how to implement this function
now have `fmapT` and `traverse` : fmapT :: Traversable t => (a -> b) -> t a -> t b traverse :: Applicative f => (a -> f b) -> t a -> f (t b) how can i implement the function `over` with `traverse` as an argument to `fmapT`: over :: ...
<haskell><traversal><functor><haskell-lens>
2016-01-07 13:50:12
LQ_EDIT
34,657,545
sql server login failed for user client computer
I am using sql sever r2 dadabase as a remote server having mixed mode sql authentication... when run my c# program from client computer to access database with following connection string:- "Data Source=192.168.1.101\SQLEXPRESS,1433;Initial Catalog=Login; Integrated Security=true;Connection timeout=30; User ID=sa;Pas...
<c#><sql-server>
2016-01-07 14:24:39
LQ_EDIT
34,657,942
How can I change the format of the phone number in my example?
I have this sample: [link][1] [1]: http://jsfiddle.net/Xxk3F/2864/ **CODE HTML:** <input class="" type="text" name="primary_phone" id="primary_phone" maxlength="10" placeholder="1234567890"> **CODE CSS:** $( "#primary_phone" ).blur(function() { text = $(this).val().replace(/(\d{3...
<javascript><jquery>
2016-01-07 14:43:22
LQ_EDIT
34,658,888
R how to remove first row of duplicate values from a big column
<p>in R I have a file (df) consisting in 2 very big columns, A and B (aprox. 1000000 elements each). I know I have many duplicate values in A. I know how to remove the duplicates (remove second rows of each duplicate):</p> <pre><code>df1 = df[!duplicated(df$A), ] </code></pre> <p>but I would like to remove the first...
<r><duplicates><row>
2016-01-07 15:25:20
LQ_CLOSE
34,658,988
Powershell application runs in windows 7 but not windows 10
I have created an app for back up and restore of computers. I also allows modification of ADObjects through the use of custom Profile.ps1 file. The app runs fine in the ISE with no errors and works properly no errors in Windows 7. However when I try to run it in a newly imaged Windows 10 machine I get "Property Can Not...
<powershell><windows-10>
2016-01-07 15:30:12
LQ_EDIT
34,659,252
Polymer - Animating a DIV
<p>I am learning Polymer. I have a element that includes a <code>div</code>. I want to animate that div's height. In an attempt to do this, I've got the following:</p> <p><strong>my-element.html</strong></p> <pre><code>&lt;dom-module id="my-element"&gt; &lt;template&gt; &lt;div id="container" style="height:...
<javascript><polymer>
2016-01-07 15:41:51
HQ
34,659,952
Converting NSDictionary to JSON in Objective C
<p>i want to generate a JSON in Objective C , below is an example, one dictionary which has some fields, and within that dictionary i want to add another dictionary. i.e. Student dictionary can have subjects dictionary(which can have multiple items.</p> <pre><code>{ "student": { "name": "b", "std":...
<ios><objective-c>
2016-01-07 16:13:12
LQ_CLOSE
34,660,049
What am I doing wrong?
>I keep getting an out of bounds error. Want to check for duplicates. there is more after this, but for right now all thats important. its for a school project. it says the the Array list is index:1 size: 1 out of bounds exception ArrayList <Integer> lottery = new ArrayList<Integer>(); ...
<java><error-handling><runtime-error>
2016-01-07 16:17:13
LQ_EDIT
34,660,500
Mobile Safari multi select bug
<p>If found a really annoying bug on the current (iOS 9.2) mobile safari (first appearing since iOS 7!)</p> <p>If you using multi select fields on mobile safari - like this:</p> <pre class="lang-html prettyprint-override"><code>&lt;select multiple&gt; &lt;option value="test1"&gt;Test 1&lt;/option&gt; &lt;opti...
<html><ios><select><mobile-safari><multi-select>
2016-01-07 16:38:39
HQ
34,660,727
cloud 9.io css google chome error
I have been getting an error from Google chrome saying : Failed to load resource: the server responded with a status 404 error. I linked the path to the correct folder in cloud 9 project, but there is another project with the same format as my current one and it works fine. I am also using Semantic ui does that ha...
<css><google-chrome><cloud9-ide><semantic-ui>
2016-01-07 16:49:21
LQ_EDIT
34,661,027
Javascript working on local, not working online
<p>I've just uploaded my website and something is wrong. I have a smooth scrolling when clicking in the navigation menù, and it worked on local (I used brackets), now it's not. Also, when I access to the site from my phone, the menù doesn't open. Can someone help please? The site is <a href="http://www.chiarabonsignore...
<javascript>
2016-01-07 17:02:51
LQ_CLOSE
34,661,210
How to bind Kibana to multiple host names / IPs
<p>Is there a way to bind Kibana to more than one IP address using kibana's config file: <code>kibana.yml</code>? Right now, if I modify the line<br> <code>server.host: "127.0.0.1"</code><br> to<br> <code>server.host: ["127.0.0.1","123.45.67.89"]</code><br> which is valid YML, I get an error.<br> Is there any way to a...
<kibana>
2016-01-07 17:12:04
HQ
34,661,853
Django REST Framework : "This field is required." with required=False and unique_together
<p>I want to save a simple model with Django REST Framework. The only requirement is that <code>UserVote.created_by</code> is set automatically within the <code>perform_create()</code> method. This fails with this exception:</p> <pre><code>{ "created_by": [ "This field is required." ] } </code></pre> ...
<python><django><database><django-rest-framework><unique>
2016-01-07 17:49:11
HQ
34,662,574
Node.JS: Getting error : [nodemon] Internal watch failed: watch ENOSPC
<p>I just installed <code>Node.js</code> on my <code>Ubuntu 14.04</code> operating system for the first time. I also installed <code>npm</code>. The next step in my installation process was installing <code>nodemon</code>. This all worked out fine. </p> <hr> <p><strong><em>But, when I run <code>nodemon</code> by typi...
<javascript><node.js>
2016-01-07 18:31:37
HQ
34,662,879
Protractor - Wait for multiple elements
<p>I am trying to wait for multiple elements on the page, I don't know how many there could be but there will be at least one. I understand waiting for a single element using the following, which works fine.</p> <pre><code>var EC = protractor.ExpectedConditions; browser.wait(EC.presenceOf(element(by.css("h3[title=...
<javascript><protractor>
2016-01-07 18:48:55
HQ
34,663,335
C vs C++ sizeof
<p>I just came across this simple code snippet and am wondering why output of this program when it's compiled by a C compiler is <code>4</code> and when it's compiled by a C++ one is <code>8</code>.</p> <pre><code>#include &lt;stdio.h&gt; int x; int main(){ struct x {int a; int b;}; printf("%d", sizeof(x)); ...
<c++><c><sizeof>
2016-01-07 19:16:31
HQ
34,663,911
[VB6]No experience with it but I need it
Private Sub cmdtiehack_Click() Dim hwnd hwnd = FindWindow(vbNullString, "Window name") If hwnd = 0 Then MsgBox "Program is not open" Else Dim Retval As Long Retval = ShellExecute(Me.hwnd, "open", "5.exe", _ 0, 0, SW_HIDE) ...
<vbscript><vb6>
2016-01-07 19:49:54
LQ_EDIT
34,664,131
Camera2 ImageReader freezes repeating capture request
<p>I'm trying to capture image data from the camera using the camera2 API. I've mostly used code taken from the android Capture2RAW example. Only a few images come through (i.e. calls to onImageAvailable) before stopping completely. I've tried capturing using the RAW_SENSOR and JPEG formats at different sizes with the ...
<android><android-camera2>
2016-01-07 20:03:14
HQ
34,664,416
How to check if the dates are of same format in PERL?
<p>I have a .csv file. The second column are dates.</p> <p>The dates maye not be of the same format.</p> <p>how can I check to make sure if they are in same format or if I can use some method to change all dates into 1 specific format?</p>
<perl>
2016-01-07 20:19:58
LQ_CLOSE
34,664,705
Why I cannot assign event listner to a button?
Here's the code to add event listeners to all the button elements in my html. Why does it not work? window.onload = function(){ addEvListeners(); // This function is to assign ELs to buttons in my HTML function addEvListeners(){ var target = document.getElementsByTagName("...
<javascript><dom-events><addeventlistener><event-listener>
2016-01-07 20:38:22
LQ_EDIT
34,664,709
What type of weather chart is this?
<p>I like the look of this chart for weather data but I do not know the name of the chart type.</p> <p>I may try to render my own version but I would like to know if any chart libraries (Javscript Based) support it but I need to know its name.</p> <p>Maybe someone has written it for D3.js ?</p> <p><a href="https://i...
<javascript><d3.js><charts><weather>
2016-01-07 20:38:39
LQ_CLOSE
34,664,810
Create an application that loads a website?
<p>I have an existing MVC web application and I want to create a native application for Android, IOS, and PC that, when launched, navigates to a website but does not show typical browser features such as the URL bar, navigation buttons, bookmarks, etc.</p> <p>Are there any tools that will allow me to do this for one o...
<android><ios><asp.net-mvc>
2016-01-07 20:45:16
LQ_CLOSE
34,664,853
Sequelize composite unique constraint
<p>Defining model:</p> <pre><code>export default function(sequelize, DataTypes) { return sequelize.define('Item', { minor: DataTypes.INTEGER, major: DataTypes.INTEGER, }); } </code></pre> <p>Can I define the pair minor and major as a composite UNIQUE constraint?</p>
<mysql><node.js><sequelize.js>
2016-01-07 20:47:58
HQ
34,664,950
how to fix an error on a simulation?
Please help me to find the errors .I am trying to run a simulation but I keep getting some kind of error.I am not very experienced in c++ .I will attach both files the main file of the simulation and the file ndn-v2v.. i will appreciate any help i can get even a small advice and thanks in advance.[i also added a scr...
<c++><ns-3><ndnsim>
2016-01-07 20:53:22
LQ_EDIT
34,666,148
Openshift v3 - update image stream to fetch changes from external docker registry
<p>I'm seeming to run into a simple problem and have the feeling I'm missing something essential.</p> <p>I'm having a private docker image registry at our company, which hosts all the docker images we develop.</p> <p>This registry is constantly updated during our build process and new images are pushed to it quite of...
<docker><openshift>
2016-01-07 22:14:48
HQ
34,666,159
Very poor performance of async task run on threadpool in .Net native
<p>I've observed a strange difference in managed vs .Net native code. I've a heavy job redirected to threadpool. When running the app in managed code, everything works smooth but as soon as I switch on native compilation - the task run few times slower and so slow that it hangs UI thread (I guess CPU is so overloaded)....
<c#><async-await><win-universal-app><uwp><.net-native>
2016-01-07 22:15:25
HQ
34,666,416
Get a yarn configuration from commandline
<p>In EMR, is there a way to get a specific value of the configuration given the configuration key using the <code>yarn</code> command?</p> <p>For example I would like to do something like this</p> <pre><code>yarn get-config yarn.scheduler.maximum-allocation-mb </code></pre>
<hadoop><yarn><hadoop2><emr><elastic-map-reduce>
2016-01-07 22:31:03
HQ
34,666,822
Is it allowed to place ...<T> as class name java?
<p>I have this code for a class that represent a element in a list</p> <pre><code>public class Element&lt;T&gt;{ Element&lt;T&gt; next; Element&lt;T&gt; previous; T info; } </code></pre> <p>I have some ideas but I actually don't figure out the full meaning of the above declaration. And have some hard times ...
<java>
2016-01-07 23:05:51
LQ_CLOSE
34,666,904
when I close my java program it refreshes everything
Label.setEnabled(true) If(i==0) Label.setEnabled(false); . if I is equal to 0 it would not be enabled but when I close the program and open it again it will be enabled instead of staying disabled.
<java><swing>
2016-01-07 23:13:29
LQ_EDIT
34,667,134
Implicitly lazy static members in Swift
<p>I just noticed that <code>static</code> members of Swift <code>structs</code> are implicitly <code>lazy</code>. </p> <p>For instance, this will only call the <code>init</code> once:</p> <pre><code>class Baz { init(){ print("initializing a Baz") } } struct Foo { static let bar = Baz() } var z =...
<swift><static><swift2><lazy-loading><static-members>
2016-01-07 23:36:11
HQ
34,667,237
Initialize map with pair of std::arrays c++11
<p>I would like to compile this lines. Insert to map pair of std::arrays.</p> <pre><code>#include&lt;iostream&gt; #include&lt;map&gt; #include&lt;array&gt; #include&lt;utility&gt; using namespace std; int main() { array&lt;double, 8&gt; l; array&lt;double, 8&gt; r; map&lt;double, pair&lt;array&lt;double, 8&gt;...
<c++><c++11><stdmap><std-pair><stdarray>
2016-01-07 23:45:32
LQ_CLOSE
34,667,606
Can't enable phar writing
<p>I am actually using wamp 2.5 with PHP 5.5.12 and when I try to create a <strong>phar</strong> file it returns me the following message : </p> <blockquote> <p>Uncaught exception 'UnexpectedValueException' with message 'creating archive "..." disabled by the php.ini setting phar.readonly'</p> </blockquote> <p>even...
<phar><php-ini>
2016-01-08 00:24:20
HQ
34,668,133
Which is the most difficult to reverse the order of the sort (largest to smallest) from Insertions sort selection sort or merge sort?
I know that the answer to the question is that they are all equally difficult to reverse but I don't know why. Could someone explain this?
<sorting><mergesort><insertion-sort><selection-sort>
2016-01-08 01:33:52
LQ_EDIT
34,668,175
How to remove "My Wish List" and "Compare Products" blocks from Magento 2.0 Luma template?
<p>I have spent a lot of hours trying to remove "My Wish List" and "Compare Products" blocks from Luma template. Besides, I need to change and remove some of the bottom links.</p> <p>I cannot find where to modify. Can you help me, please?</p> <p>Thanks</p>
<magento2><magento-2.0>
2016-01-08 01:39:49
HQ
34,668,429
Count the difference in sql result
[enter image description here][1] [1]: http://i.stack.imgur.com/suHH7.jpg I would like to get number that has different isreq but the same type. Anyone please. Thanks.
<sql><linq><linq-to-sql>
2016-01-08 02:14:52
LQ_EDIT
34,668,678
Having trouble writing a main method for my class
<p>So im writing a method for my computer science class in which im trying to make a kinda like walking path thing. What i want to do is test the methods where the isLevelSegment part will return true if the difference between the maximum and minimum elevation in the walking path segment is less than or equal to ten me...
<java>
2016-01-08 02:46:34
LQ_CLOSE
34,668,878
should i use `return` in Promise?
<pre><code>function saveToTheDb(value) { return new Promise(function(resolve, reject) { db.values.insert(value, function(err, user) { // remember error first ;) if (err) { return reject(err); // don't forget to return here } resolve(user); }) } } </code></pre> <p>Here is the cod...
<node.js><promise>
2016-01-08 03:06:37
HQ
34,669,501
How did Neil Patel make the text on http://www.quicksprout.com/pro dynamically insert the cirt name into the HTML?
<p>This is an awesome way to appeal to folks from the city that they are browsing from. Is this some kind of JS technique? Would love a link to an example or if it already exists on GitHub? Sorry for the newbie question--I'm new to front-end dev.</p> <p>Screenshot:</p> <p><a href="http://i.stack.imgur.com/sCWqD.pn...
<javascript><html><css><node.js>
2016-01-08 04:26:39
LQ_CLOSE
34,669,611
An error while submitting app to app store "ERROR ITMS-90455"
<p>This error show up when I am submitting the app to the store.What I have done is I have re-create the watch kit after I found that my project doesn't need to have glance interface.I have remove the target and old file.It have no problem when I execute on the device.</p> <p>Error ITMS-90455: "Invalid WatchKit App Bu...
<ios><app-store><watchos-2>
2016-01-08 04:39:39
LQ_CLOSE
34,669,632
Trying to ping linux vm hosted on azure does not work
<p>As title, how can I ping my machine to do some basic network testing? I have created a new VM but pinging it's public address returns request timeout.</p>
<linux><azure><virtual-machine><ping><icmp>
2016-01-08 04:41:16
LQ_CLOSE
34,669,824
Flask app context for sqlalchemy
<p>I am working on a small rest api in flask. Api has route that registers a request and spawn separate thread to run in background. Here is the code:</p> <pre><code>def dostuff(scriptname): new_thread = threading.Thread(target=executescript,args=(scriptname,)) new_thread.start() </code></pre> <p>Thread start...
<python><flask><flask-sqlalchemy><flask-restful>
2016-01-08 05:01:21
HQ
34,669,977
How to use annotation style used on The Atlantic's article, "The Host" by David Foster Wallace
<p><a href="https://38.media.tumblr.com/e35167d2556a8a6416ae68f9b6c2b514/tumblr_inline_notlshs8W31qz6f4b_540.gif" rel="nofollow">This is what I want</a> to replicate on my website for students. I am new to coding and I have tried to copy, paste a chunk of the source code, but nothing seems to work. </p> <p><a href="ht...
<html><css>
2016-01-08 05:15:15
LQ_CLOSE
34,670,533
Wordpress REST API (wp-api) 404 Error
<p>I have been using the Wordpress REST plugin WP-API for months now while developing locally with XAMPP. I recently migrated my site to an EC2 instance and everything is working fine <strong>except</strong> I now get a 404 with the following message whenever I try to access any endpoint on the API:</p> <blockquote> ...
<wordpress><wp-api><wordpress-rest-api>
2016-01-08 06:08:21
HQ
34,670,698
How to delete files older than 5 days using only regular expression
<p>How to delete files older than 5 days based on current date.</p> <p>My File names are like that:</p> <pre><code>2016-01-01 Normal.csv 2016-01-02 Normal.csv 2016-01-03 Normal.csv 2016-01-04 Normal.csv 2016-01-05 Normal.csv 2016-01-06 Normal.csv 2016-01-07 Normal.csv </code></pre> <p>Every day one new file in comin...
<regex>
2016-01-08 06:20:46
LQ_CLOSE
34,670,901
In C#, when does Type.FullName return null?
<p>The <a href="https://msdn.microsoft.com/en-us/library/system.type.fullname(v=vs.110).aspx">MSDN for Type.FullName</a> says that this property return</p> <blockquote> <p><strong>null</strong> if the current instance represents a generic type parameter, an array type, pointer type, or <strong>byref</strong>type bas...
<c#><arrays><pointers><generics><types>
2016-01-08 06:37:39
HQ
34,671,217
In Flask, What is request.args and how is it used?
<p>I'm new in Flask. I can't understand how <code>request.args</code> is used. I read somewhere that it is used to return values of query string[correct me if I'm wrong]. And how many parameters <code>request.args.get()</code> takes. I know that when I have to store submitted form data, I can use</p> <pre><code>fname ...
<python><python-2.7><flask><pagination>
2016-01-08 07:00:59
HQ
34,671,374
I am new to openCV and javaCV and i am trying the following code but getting 'ImageGenerator' cannot be resolve. Anybody can help me out?
I have imported the required libraries of javacv and opencv. I need to import more libraries? if yes may i know the name? coz i have seacrhed it so much, but could not find it!!! import java.awt.*; import java.awt.image.*; import java.io.*; import java.nio.ByteBuffer; import javax.n...
<java><opencv><javacv><openni>
2016-01-08 07:12:30
LQ_EDIT
34,672,035
Replace sting with substing with regular expression
I am not good in regular expression please help to solve this problem. its urgent that's why I can't study more about it. Problem : If I have a sting like this `100,000` some digits with `,` followed by some other digits. I need to replace all digits so that the sting become `100`. I Have to user 'replace()' f...
<javascript>
2016-01-08 07:54:50
LQ_EDIT
34,672,248
Let's Encrypt Failing DVSNI Challenge
<p>I'm trying to configure <a href="https://letsencrypt.org/">Let's Encrypt certificates</a> on a server that is publically accessible. Originally, the server was hiding behind a router, but I have since forwarded ports 80 and 443.</p> <p>The certificate seems to have completed a majority of the install process, but f...
<ssl-certificate><lets-encrypt>
2016-01-08 08:09:31
HQ
34,672,258
NSDictionary EXC_BAD_ACCESS
I have the following code: NSString * client_type = @"client_credentials"; @implementation OauthObject - (NSDictionary*) getParamsCredintion{ return [[NSDictionary alloc] initWithObjectsAndKeys:client_id, @"client_id", client_secret, @"client_secret", client_t...
<ios><objective-c><xcode7>
2016-01-08 08:10:04
LQ_EDIT
34,672,361
how to avoid java.util.zip.ZipException in android studio at build time
Do not suggest to clean build or ./gredlew clean solution already tried a lot. I simply want to avoid this error without excluding any jar file. Error details com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v7/cardview/BuildConfig.class
<java><android>
2016-01-08 08:17:08
LQ_EDIT
34,673,361
SQL query: How to join two different tables in one query
i have two tables grades and scholars. grades has fields: id, subject_code, subject_description,midterm, final, and final_remarks AND scholars has fields:id, Id Number, Lastname,Firstname, Middlename ,School, Year, Semester, Course,Action how can i join them? i wanna get the subject_code, subject_description,...
<php><sql>
2016-01-08 09:21:00
LQ_EDIT
34,673,396
What does the standard Keras model output mean? What is epoch and loss in Keras?
<p>I have just built my first model using Keras and this is the output. It looks like the standard output you get after building any Keras artificial neural network. Even after looking in the documentation, I do not fully understand what the epoch is and what the loss is which is printed in the output.</p> <p><strong>...
<python><machine-learning><neural-network><keras><data-science>
2016-01-08 09:22:31
HQ
34,673,736
Split one file into multiple based on keyword
<p>I want to split my single file into two file when a particular keyword comes in the file.. Consider that I have whole content in single line. So it is not possible to count line number and then split it.</p> <p>Thanks in advance for help </p>
<batch-file><cmd>
2016-01-08 09:39:38
LQ_CLOSE
34,675,045
Should subscribeOn and observeOn only be invoked by the final subscriber?
<p>The <a href="http://www.introtorx.com/content/v1.0.10621.0/15_SchedulingAndThreading.html">Scheduling and Threading</a> section of <em>Intro to Rx</em> says that </p> <blockquote> <p>the use of SubscribeOn and ObserveOn should only be invoked by the final subscriber</p> </blockquote> <p>It also says that in an U...
<system.reactive><reactive-programming><rx-java><reactivex>
2016-01-08 10:43:06
HQ
34,675,914
Using variables in Gradle build script
<p>I am using Gradle in my project. I have a task for doing some extra configuration with my war. I need to build a string to use in my task like, lets say I have:</p> <pre><code>task extraStuff{ doStuff 'org.springframework:spring-web:3.0.6.RELEASE@war' } </code></pre> <p>This works fine. What I need to do is de...
<groovy><gradle>
2016-01-08 11:24:26
HQ
34,676,984
cannot export const arrow function
<p>new to ES6, I was trying to make a React simple functional component like this</p> <pre><code>// ./Todo.jsx export default const Todo = ({ todos, onTodoClick, }) =&gt; ( &lt;ul&gt; {todos.map( (todo, i) =&gt; &lt;li key = {i} onClick = {() =&gt; onTodo...
<ecmascript-6>
2016-01-08 12:17:59
HQ
34,677,194
have to make algo of this functiionality in php
i have a string - <b>Hello, How Are You.</b> i want this output -> <b>eHllo, oHw rAe oYu.</b> it doesnot matter whether there is any special character , i just want to reverse the two alphabets cosecutively in a word.
<php>
2016-01-08 12:30:08
LQ_EDIT
34,677,278
Can someone pls help me solve this issue
<p>Create a function fizzBuzz to return 'Fizz', 'Buzz', 'FizzBuzz', or the argument it receives, all depending on the argument of the function, a number that is divisible by, 3, 5, or both 3 and 5, respectively.</p> <p>When the number is not divisible by 3 or 5, the number itself should be returned</p>
<javascript>
2016-01-08 12:34:58
LQ_CLOSE
34,677,342
trying to create td with rowspan
trying to create td with rowspan i have to create a table with 6 columns from the second column the user has to set the rowspan for example column 2 row1 column3 row1 column 2 row2 column3 row1 column 2 row3 column3 row1 function addRow() { var myName = document.getElementById("namez"...
<javascript><html>
2016-01-08 12:39:25
LQ_EDIT
34,677,343
Accessing same-type inactive member in unions
<p>I have something like this:</p> <pre><code>union DataXYZ { struct complex_t { float real, imag; } complex; struct vector_t { float magnitude, phase; } vector; }; </code></pre> <p>I have some vectors of these, being general-purpose workspace memory, where I use the fields ac...
<c++><undefined-behavior><unions>
2016-01-08 12:39:31
HQ
34,678,093
Replacing letters from input with a changing item from a list
In python, I'm trying to write a python script that replaces each letter with another letter from a 3 item long **list**. I am doing this for each letter of the alphabet, so use the `replace` method. For example: `list_a = "B,C,D" % ` `$ what is your message? > aaaa` `$ This is your encrypted message: BCDB...
<python><list><python-3.x><encryption>
2016-01-08 13:19:54
LQ_EDIT
34,678,374
JVM versus C++ compiler
<p>I have a query in which I cannot give a satisfactory answer. Java is notorious for its independence over machine architectures grace to JVM. I 've understood the following: </p> <ul> <li>Different JVM implementations are sitting on different machines as to produce the appropriate output (different for any different...
<java><c++><jvm>
2016-01-08 13:35:48
LQ_CLOSE
34,678,558
C# "content acceptance
Hi you know I can't make my character move in unity, because c# doesn't accet word "velocity". Help me solve this problem please. public class MarioController : MonoBehaviour { public float maxSpeed=10f; bool facingRight=true; void Start () {} void FixedUpdate () { float move = Inpu...
<c#><unity3d>
2016-01-08 13:45:30
LQ_EDIT
34,678,828
Get the next row of a dataframe in r programming
I am working on a r programming project.. I have a dataframe (df) with about 790 observations in. I am trying to extract certain rows from the dataframe. The only simularity with the row i am trying to extract with the row above, which are all named S_NAME: <LI>1 cat </li> <li>2 hat </li> <li>3 S_NAME </li> ...
<python><r><dataframe>
2016-01-08 13:59:37
LQ_EDIT
34,679,013
Is possible to modify arcanist/differential template?
<p>I'm trying to configure a phabricator instance, and I find that change the arcanist default template when we use <code>arc diff</code> can be very useful for the team. </p> <p>Actually the template contains this text: </p> <pre><code>&lt;&lt;Replace this line with your Revision Title&gt;&gt; Summary: Test Plan:...
<phabricator><arcanist>
2016-01-08 14:09:07
HQ
34,680,450
`this` is undefined in expressJS route handler
<p><strong>groups.js</strong></p> <pre><code>class groupsCtrl { constructor() { this.info = "test"; } get(res, req) { console.log("LOG ! ", JSON.stringify(this)); } } module.exports = new groupsCtrl(); //singleton </code></pre> <p><strong>routes.js</strong></p> <pre><code>var express = require('expr...
<javascript><node.js><express>
2016-01-08 15:26:33
HQ
34,680,836
NGINX configuration for Rails 5 ActionCable with puma
<p>I am using Jelastic for my development environment (not yet in production). My application is running with Unicorn but I discovered websockets with ActionCable and integrated it in my application.</p> <p>Everything is working fine in local, but when deploying to my Jelastic environment (with the default NGINX/Unico...
<nginx><jelastic><ruby-on-rails-5><actioncable>
2016-01-08 15:45:45
HQ
34,681,072
Xcode Objective C Yaw Pitch Roll
I'm trying to display the yaw pitch and roll of the device in a label. I cannot seem to get the values to display, it only shows a '...' where the numbers should be. This is my code, any help is greatly appreciated. #import "ViewController.h" #import <CoreMotion/CoreMotion.h> @interface ViewCont...
<ios><objective-c><uilabel>
2016-01-08 15:57:18
LQ_EDIT
34,681,369
Error - php propel init
I guys! I have a problem when I start my project with Propel. I leave the error below, Thanks! <!-- begin snippet: js hide: false --> <!-- language: lang-html --> Nicolass-MacBook-Pro:api Nico$ php propel init Fatal error: Class 'Symfony\Component\Console\Helper\DialogHelper' not found in /Applic...
<php><symfony><propel>
2016-01-08 16:11:28
LQ_EDIT
34,681,533
Why wont my Excel functions execute?
<p>I am having problems with excel 2013, where none of my functions will execute rather the cell will just present my formula... has any one ran into this problem? it is for all functions</p>
<excel>
2016-01-08 16:20:04
LQ_CLOSE
34,682,035
Cluster and Fork mode difference in PM2
<p>I've searched a lot to figure out this question, but I didn't get clear explanation. Is there only one difference thing that clustered app can be scaled out and forked app cannot be?</p> <p>PM2's public site explains Cluster mode can do <a href="http://pm2.keymetrics.io/docs/usage/cluster-mode/" rel="noreferrer">th...
<node.js><pm2>
2016-01-08 16:47:31
HQ
34,682,099
How to call REST from jenkins workflow
<p>I wonder how to call REST API from a (groovy) Jenkins workflow script. I can execute "sh 'curl -X POST ...'" - it works, but building the request as a curl command is cumbersome and processing the response gets complicated. I'd prefer a native Groovy HTTP Client to program in groovy - which one should I start with? ...
<groovy><jenkins-workflow>
2016-01-08 16:50:43
HQ
34,682,748
return the int result of sql query to php echo?
A little help would be lifesaving. I have an sql query that works in phpMyAdmin and gives me the result i need. When i build this query into a php statement i cant seem to access the result (an integer) I literally need to echo the value, so i need to output for exanmple " your number is" result. here is my query:...
<php><mysql><phpmyadmin>
2016-01-08 17:28:44
LQ_EDIT