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,846,146 | How to calculate differences between consecutive rows in pandas data frame? | <p>I've got a data frame, <code>df</code>, with three columns: <code>count_a</code>, <code>count_b</code> and <code>date</code>; the counts are floats, and the dates are consecutive days in 2015.</p>
<p>I'm trying to figure out the difference between each day's counts in both the <code>count_a</code> and <code>count_b... | <python><pandas> | 2016-01-18 01:56:19 | HQ |
34,846,530 | JAVA: adding and removing elements from a defined variable within a class | I'm trying to get this class to run but I keep running into issues. I'm new to Java and not sure if I am doing this correctly. If someone could just help me out with the addition of elements to a list I can figure out the rest!
class ListPractice implements Testable {
def mylist = [4,5,6]
/**
... | <list><groovy> | 2016-01-18 02:45:15 | LQ_EDIT |
34,846,636 | Is it possible to continuing running JavaScript code after a redirect? | <p>So, on my website, a user types in a subject they want the gist of, then after searching, it redirects them to a Wikipedia API displaying the general idea of the subject. However, there's a bunch of information about the API that gets in the way on the webpage, so I need to use JavaScript to get rid of that excess s... | <javascript><html><ajax><api> | 2016-01-18 02:58:22 | LQ_CLOSE |
34,847,089 | How do you write (9.5*(4.5)-2.5*3)/(45.5-3.5) in Java? | <p>How do you write (9.5*(4.5)-2.5*3)/(45.5-3.5) in Java?</p>
| <java><math><expression> | 2016-01-18 03:58:02 | LQ_CLOSE |
34,847,190 | how to check for an empty array java | <p>I wanted to know if this code is valid for checking whether an array is empty, or should I check for null?</p>
<pre><code>if(arrayName={})
System.out.println("array empty");
else System.out.println("array not empty");
</code></pre>
<p>Thank you!</p>
| <java><arrays> | 2016-01-18 04:09:21 | HQ |
34,847,699 | Swift Tuple Not a Collection? | In Swift, why isn't a tuple considered a collection type?
Of course this is fussbudget territory, but I find a certain amount of fussing helps me understand, retain, and organize what I'm learning.
Thanks. | <swift><collections><tuples> | 2016-01-18 05:14:52 | LQ_EDIT |
34,848,401 | Divide elements on groups in RecyclerView | <p>I need to divide elements in RecyclerView on groups with titles (like in the Inbox app on the picture below) so help me please to figure out what approach would be better for my case:
1) I can use Heterogenous layouts for it but it is not so convenient to insert new elements in groups (because I need check if elemen... | <android><material-design><android-recyclerview> | 2016-01-18 06:23:18 | HQ |
34,848,505 | How to make a loading animation in Console Application written in JavaScript or NodeJs? | <p>How to make a loading animation in Console Application written in JavaScript or NodeJs?</p>
<p>Example animation or other animation.</p>
<pre><code>1. --
2. \
3. |
4. /
5. --
</code></pre>
| <javascript><node.js> | 2016-01-18 06:31:05 | HQ |
34,848,634 | Multiple input smoothly | <p>I need a form that have such a row need to be repeated multiple times. Row consist of text field, radio, checkbox, select box all types of input field. After typing first input field, cursor should be shown on next field by pressing just enter. Add button should be added to add each row. After submitting form data s... | <php><mysql><forms> | 2016-01-18 06:40:54 | LQ_CLOSE |
34,849,492 | When i am runnig my objective-c code i am facing This error in this Code | Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-2935.137/UITableView.m:6509
2016-01-18 12:35:16.816 ALJ Jobs[1008:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from table... | <ios><objective-c><uitableview> | 2016-01-18 07:42:15 | LQ_EDIT |
34,849,841 | Inhibit all warnings option in Xcode project doesn't hide warning when building | <ol>
<li><p>Cocoapods inhibit_all_warnings! doesn't set the Pods project "Inhibit all warnings" to "Yes"</p></li>
<li><p>Xcode still displays pods warning after settings Pods project and individual pods "Inhibit all warnings" option to "Yes"</p></li>
</ol>
<p>Cocoapods version: 0.39.0
Xcode version: 7.2</p>
<p>My pod... | <ios><xcode><compilation><cocoapods> | 2016-01-18 08:07:30 | HQ |
34,850,089 | Simple bulls and cows java game | <p>I try to create a verry simple Bulls and Cows game (<a href="https://en.wikipedia.org/wiki/Bulls_and_Cows" rel="nofollow">https://en.wikipedia.org/wiki/Bulls_and_Cows</a>). The game is for my school project. My knowledge is limited, so I need to make the game using only loops, IF-else constructions and other simple ... | <java><methods> | 2016-01-18 08:23:46 | LQ_CLOSE |
34,850,121 | Why forbidden to use a remote function inside a guard | <p>Why I can't to use <code>String</code> or other module in guard?</p>
<p>Code:</p>
<pre><code>def foo(s1, s2) when String.length(s1) == String.length(s2) do
# something
end
</code></pre>
<p>And how I can elegantly reformat such case, when I wish to use module functions?</p>
| <elixir> | 2016-01-18 08:25:55 | HQ |
34,850,734 | adb cannot bind 'tcp:5037' | <p>It used to work fine, but today after I connected my Android phone to my machine, and run <code>adb devices</code>, I got the following error:</p>
<pre><code>* daemon not running. starting it now on port 5037 *
cannot bind 'tcp:5037': Address already in use
ADB server didn't ACK
* failed to start daemon *
error: ca... | <android><adb> | 2016-01-18 09:00:49 | HQ |
34,851,713 | Sort Javascript array based on a substring in the array element | <pre><code>var arr = ["This is three", "This is four", "This is one", "This is two", ...];
</code></pre>
<p>If I have an array like the one shown above, and I need to sort the array based on the substring value in the strings - i.e one, two, three..,
What is the best approach to the problem? </p>
<p>My final result ... | <javascript><arrays><sorting><substr> | 2016-01-18 09:52:45 | LQ_CLOSE |
34,851,839 | How to handle Web Workers "standard" syntax with webpack? | <p>I wonder if it's actually possible to handle Web Worker "standard syntax" in webpack (e.g <code>var worker = new Worker('my-worker-file.js');</code>) and how? </p>
<p>I know about <a href="https://github.com/webpack/worker-loader">worker-loader</a> but as far as I understand it needs a specific syntax and is not co... | <webpack><web-worker> | 2016-01-18 09:58:02 | HQ |
34,852,604 | Failed to implement a search widget | <p>I'm trying to implement a search widget in my app . I found a useful tutorial from <a href="http://developer.android.com/intl/es/training/search/setup.html" rel="nofollow">here</a>.</p>
<p><a href="http://i.stack.imgur.com/T6bEp.png" rel="nofollow">My Activity A</a></p>
<p>But my app crashed.</p>
<p><strong>Activ... | <android><search><nullpointerexception><appbar> | 2016-01-18 10:36:01 | LQ_CLOSE |
34,852,836 | Remove underscore from a string in R | <p>In my data.frame, I have a column of type <code>character</code>, where all the values look like this : <code>123_456</code> (three digits, an underscore, three digits).</p>
<p>I need to transform these values to a <code>numeric</code>, and <code>as.numeric(my_dataframe$my_column)</code> gives me a <code>NA</code>.... | <r> | 2016-01-18 10:48:36 | LQ_CLOSE |
34,853,034 | find primers and palindromes in python | A palindromic prime is a prime number that is also palindromic.
For example, 131 is a prime and also a palindromic prime, as are 313 and 757.
I need to write a function that displays the first n palindromic prime numbers.
Display 10 numbers per line and align the numbers properly, as follows:
2 3 ... | <python><function><loops><primes><palindrome> | 2016-01-18 10:58:48 | LQ_EDIT |
34,853,252 | Can anyone help me ? How to access this json data using Angularjs? | [{"_id":"5693413efc055b0011ac7891","attribute":[{"Size":"asd","Brand":"asds","product_id":"1"}]},{"_id":"569cb82c079bfa80094dc936","attribute":[{"Size":"SA","Brand":"123","product_id":"2"}]}] | <javascript><angularjs><mean> | 2016-01-18 11:08:55 | LQ_EDIT |
34,853,620 | how can I pass parameter from javascript to php | <p>the javascript code as below...how can I pass x to php?And there is not any button. </p>
<pre><code> function f(){
var x = document.getElementById("point").innerHTML;
}
</code></pre>
<p>And if I pass x to the php file,how can I receive it?</p>
| <javascript><php><html> | 2016-01-18 11:27:31 | LQ_CLOSE |
34,853,934 | Need help, specifically with removing repeated word in list | I need to develop a program in which it takes in a user inputted string, e.g. ‘to be or not to be’. Then separate the string into its separate words, ‘to’, ’be’, ’or’, ’not’, ’to’, ’be’. The words are then put into a list, [‘to’, ’be’, ’or’, ’not’, ’to’, ’be’] where they are changed into their position in the list. How... | <python><python-3.x> | 2016-01-18 11:43:53 | LQ_EDIT |
34,854,618 | Shorting the columns of data frame under a specific group | <p>I have a data frame from which the columns has this format:</p>
<pre><code>name stock1 stock2 value1 value2
stoc_from_csv Google Yahoo 50 21
stock up to date Opel Tayoota 42 44
</code></pre>
<p>How can I reshape the column to have all with 1 the one next to other, same for 2 etc. An ex... | <r> | 2016-01-18 12:17:37 | LQ_CLOSE |
34,854,697 | CSS display: block, animate H1.. jQuerry | How to slideDown h2 using jQuerry?
html
<body>
<hr>
<h2>Text</h2>
script
$(window).load(function(){
$("h2").slideDown();
});
not working | <jquery><html><css> | 2016-01-18 12:22:29 | LQ_EDIT |
34,854,737 | C: Why does semi-colon after a macro cause illegal else compile error | I'm relatively new to C, and apparently I have a fundamental misunderstanding of how macros work. I thought a macro just caused the preprocessor to replace the `@define`d macro with the replacement text. But apparently that's not always the case. My code follows:
**TstBasInc.h**
#pragma once
#incl... | <c><macros> | 2016-01-18 12:24:46 | LQ_EDIT |
34,854,860 | Sparql Select all diffirent languages appear on Warehouse | I am trying to select all diffirent language that appear on warehouse to display them as a list, but with no luck until now.
Is there any way to select languages efficiently?
Any idea ? Thanks in advance. | <sparql><rdf><semantic-web> | 2016-01-18 12:30:40 | LQ_EDIT |
34,855,039 | delete pairs of data out of a range | I'm trying to delete from a matrix like this:
x y
37.013930 048.775597
43.015619 348.803652
06.017302 349.831709
05.018978 348.859767
37.020646 300.887827
23.022307 348.915887l
. .
. .
. .
... | <python><numpy><pandas> | 2016-01-18 12:40:36 | LQ_EDIT |
34,855,049 | Using HMAC SHA256 in Ruby | <p>I'm trying to apply HMAC-SHA256 for generate a key for an Rest API.</p>
<p>I'm doing something like this:</p>
<pre><code>def generateTransactionHash(stringToHash)
key = '123'
data = 'stringToHash'
digest = OpenSSL::Digest.new('sha256')
hmac = OpenSSL::HMAC.digest(digest, key, data)
puts hmac
end
</code>... | <ruby-on-rails><ruby><sha256><hmac> | 2016-01-18 12:41:03 | HQ |
34,856,036 | Visual C# - How to write a file comfortable and easy | I'm pretty new in developing C#, and my problem is to write a text file. I found some solution with StreamWriter lik this...
StreamWriter file = new StreamWriter(C:\Downloads\test.txt);
file.WriteLine("this is line one");
file.WriteLine("\r\n");
file.WriteLine("this is line 2");
file.close();... | <c#><file><c#-4.0><c#-3.0><filewriter> | 2016-01-18 13:33:15 | LQ_EDIT |
34,856,780 | Leaflet : tiles didn't load | <p>I try to use the leaflet-map with polymer.
I add the leaflet-map tag inside my template, but when loading (and waiting) there is only one tile which is displayed (in the top left) with the original configuration (no leaflet-tilelayer, only set the latitude, longitude and zoom)</p>
<p>I switch to non-polymer version... | <javascript><polymer><leaflet> | 2016-01-18 14:12:15 | LQ_CLOSE |
34,856,910 | Why does this implicit cast not result in compile-time error? | <p>Just trying to understand C#. Just considering the following simplified example.</p>
<pre><code>void Main()
{
IList<IAnimal> animals = new List<IAnimal>
{
new Chicken(),
new Cow(),
};
// Shouldn't this line result in a compile-time error?
foreach (Chicken element in ... | <c#><.net><implicit-cast> | 2016-01-18 14:18:30 | LQ_CLOSE |
34,856,932 | How do i install gradle on WINDOWS 10 | <p>I tried some ways with the path thing but it didnt work because when i edit the path in System variables it opens up all the paths not like in tutorials where i should just put the ;%GRADLE_HOME%\bin at the end.</p>
<p><a href="https://i.stack.imgur.com/CJTlf.png" rel="noreferrer"><img src="https://i.stack.imgur.co... | <gradle> | 2016-01-18 14:19:18 | HQ |
34,857,049 | R.java file is not generated | <p>I'm new to Android development. I listen Eclipse is better for beginners. So i downloaded and installed in my laptop, Setup also successfully done. My problem is that errors while run the project because R.java file is not generated. Please help me.</p>
| <android> | 2016-01-18 14:24:40 | LQ_CLOSE |
34,857,179 | How to index a .PDF file in ElasticSearch | <p>I am new to ElasticSearch. I have gone through very basic tutorial on creating Indexes. I do understand the concept of a indexing. I want ElasticSearch to search inside a .PDF File. Based on my understanding of creating Indexes, it seems I need to read the .PDF file and extract all the keywords for indexing. But, I... | <elasticsearch> | 2016-01-18 14:31:18 | HQ |
34,857,857 | Validate a email field with jquery | <p>I need to validate a email field with jquery but the program doesn't work.</p>
<pre><code> var email_form=$('#email');
if(email_form!=null){
console.log("HI");
$('#email').on('input', function(){
console.log("show ");
});
}
</code></pre>
<p>The program prin... | <jquery> | 2016-01-18 15:05:01 | LQ_CLOSE |
34,858,402 | Issue to make click on <a> tag in funcional test with selenium | i am to make a functional test and i need to make click on `<a>` tag, but i try some ways and really i don't know, i try with the commands in this url
https://saucelabs.com/resources/articles/the-selenium-2018click2019-command, nothing has worked, if somebody can help me , i would apreciate it. Thanks.
import time... | <python><django><selenium> | 2016-01-18 15:31:47 | LQ_EDIT |
34,859,497 | Chrome custom tabs not opening other apps | <p>The <code>Chrome custom tabs</code> doesn't seem to launch other apps by deeplinking.</p>
<p>For example a PayPal payment, when <code>Chrome</code> is launched with this URL. It will ask the user if the URL has to be opened with the PayPal app or with Chrome.</p>
<p>But this is not the case with <code>Chrome custo... | <android><chrome-custom-tabs> | 2016-01-18 16:26:49 | HQ |
34,859,635 | How to get the replication factor of C* cluster? | <p>I cant find it in cassandra.yaml, maybe nodetool can get me the configured replication factor of my cluster?</p>
<p>What is the default value of the replication factor?</p>
| <cassandra><nodetool> | 2016-01-18 16:33:15 | HQ |
34,859,919 | what does the ! mean in Angular? i.e $scope.selected = !$scope.selected; | <p>I was wondering what does the ! actually mean in this method</p>
<pre><code> $scope.toggleSelected = function () {
$scope.selected = !$scope.selected;
};
</code></pre>
<p>I understand it's allowing me to set a selected item and it won't work without it but what exactly is the ! for?</p>
| <javascript><angularjs> | 2016-01-18 16:47:39 | LQ_CLOSE |
34,860,397 | Spacemacs hybrid line numbers | <p>How do I get hybrid line numbering (relative line numbers, but the current line shows the absolute line number instead of 0) in spacemacs for all files?</p>
<p>I tried setting relative line numbers in user-config but that doesn't seem to be working, and can't figure out how to replace the 0 in relative mode either:... | <emacs><spacemacs> | 2016-01-18 17:15:01 | HQ |
34,861,215 | Airflow - how to make EmailOperator html_content dynamic? | <p>I'm looking for a method that will allow the content of the emails sent by a given EmailOperator task to be set dynamically. Ideally I would like to make the email contents dependent on the results of an xcom call, preferably through the html_content argument.</p>
<pre><code>alert = EmailOperator(
task_id=aler... | <airflow> | 2016-01-18 18:04:59 | HQ |
34,861,257 | How can i set a tag for viewpager fragments? | <p>I,m using slidingTabLayout with 4 tabs and a viewpager and 4 fragment class for every tab. </p>
<p>i need to reload one of my fragments (first tab) in my project when user click some button, and for this i need to have a tag for that fragment</p>
<p>my question is : how can i set a tag for one of viewpagers fragme... | <android><android-fragments><android-viewpager> | 2016-01-18 18:07:31 | HQ |
34,861,729 | How do I undo mix phoenix.gen.html? | <p><code>mix phoenix.gen.html</code> generates a bunch of files. How do I do undo this generation? or do i have to do it by hand?</p>
| <elixir><phoenix-framework> | 2016-01-18 18:37:07 | HQ |
34,862,219 | how to architect/organize a react application | <p>From a maintenance/architecture/performance perspective, when writing a react application, is it better to put all components in a super/parent component and bind it once to a page, or to have multiple mount nodes on the page for each piece of functionality?</p>
<p>My current approach is to have multiple mount node... | <reactjs> | 2016-01-18 19:07:29 | LQ_CLOSE |
34,862,324 | I am implementing a Minimum Spanning Forrest algorihm in java. But stuck on how to write a loop | Algorithmm:
**input :** Graph G
**output:** Set of MSTs T
**begin**
T=null;
E=G.Edges;
for all vertices in G,
Create a tree t having single vertex b
add t to T
end for
repeat
Find an edge e ∈ E having minimum weight
such that one end belongs to t ∈ T and the other
... | <java><algorithm><graph-algorithm> | 2016-01-18 19:14:57 | LQ_EDIT |
34,862,378 | Randomizing a list in Python | <p>I am wondering if there is a good way to "shake up" a list of items in Python. For example <code>[1,2,3,4,5]</code> might get shaken up / randomized to <code>[3,1,4,2,5]</code> (any ordering equally likely).</p>
| <python><list><random> | 2016-01-18 19:18:00 | HQ |
34,862,484 | Querying a MYSQL database with a GET variable | <p>I would like to query my database with the contents of my Get variable, then retrieve the matching url and put the matching url into a variable, what's the best and safest way of doing this? </p>
| <php><mysql> | 2016-01-18 19:25:02 | LQ_CLOSE |
34,862,779 | Why does -u mean remember for git push [-u] | In the manual it states that `-u` will tell git to remember where to push to.
However, I think this is a strange abbreviation. `-r` would make more sense.
It works fine I'm just wondering where these abbreviations come from.
Any one? | <git><git-push> | 2016-01-18 19:42:00 | LQ_EDIT |
34,863,114 | Dockerfile ONBUILD instruction | <p>I read on the docker documentation how ONBUILD instruction can be used, but it is not clear at all.<br>
Can someone please explain it to me?</p>
| <docker> | 2016-01-18 20:03:05 | HQ |
34,863,374 | how to use CMake file (GLOB SRCS *. ) with a build directory | <p>this is my current CMakeLists.txt file </p>
<pre><code>cmake_minimum_required(VERSION 3.3)
set(CMAKE_C_FLAGS " -Wall -g ")
project( bmi )
file( GLOB SRCS *.cpp *.h )
add_executable( bmi ${SRCS})
</code></pre>
<p>This builds from my source directory, but I have to clean up all the extra files after. My question ... | <cmake> | 2016-01-18 20:20:02 | HQ |
34,863,453 | How to set "Selection" scope of search & replace in VS 2015 | <p>When I select a text block in text editor and open the search & replace window (Ctrl+H), the search & replace scope is set to "Selection" automatically in VS 2013 and the olders. </p>
<p>In VS 2015, the scope is always set to "Current document".</p>
<p>I've not found any information about this change. Does... | <visual-studio-2015> | 2016-01-18 20:24:53 | HQ |
34,863,645 | How can I keep a docker debian container open? | <p>I want to use a debian Docker container to test something, and by this I mean execute some commands in the debian bash console. I tried downloading the image using <code>docker pull debian</code> and then running it using <code>docker run debian</code>, but I get no output. What am I doing wrong? Shouldn't the docke... | <bash><ubuntu><docker><debian><dockerfile> | 2016-01-18 20:37:28 | HQ |
34,863,711 | How should I save the data from the json response in Android? | <p>lets say I'm creating an app to browse reddit using their API. I'm getting a json response containing submissions, which I plan to populate a listview with.
My question is how I should save this data? Should I create a bunch of objects or is there a better way to save it? I will need to be able to identify which sub... | <android><json> | 2016-01-18 20:42:11 | LQ_CLOSE |
34,864,533 | iOS Universal Device App with SpriteKit, how to scale nodes for all views? | <p>I want to make a <strong><em>landscape</em> app</strong> to be <strong>universal</strong>, so that the sprite nodes scale proportionally to whatever view size is running the app. I'd like an <em>entirely programmatic</em> solution because I don't like the IB. </p>
<p>My game is pretty simple, and I don't need scro... | <ios><swift><sprite-kit><universal> | 2016-01-18 21:37:48 | HQ |
34,864,581 | Vector is not clearing | <p>I have created a function that gets a series of guesses (a sequence of colors) from a user and puts them in a vector, and this function is called within a while loop in main().</p>
<p>Each time it is called by the while loop, the guess should be cleared before being refilled with inputs. However, within the second ... | <c++> | 2016-01-18 21:41:50 | LQ_CLOSE |
34,864,690 | Apple PushKit didUpdatePushCredentials is never called on iOS 9+ | <p>I am developing a VoIP app for iPhone. To receive calls, Apple developed PushKit so developers can send VoIP notifications using APNS.</p>
<p>Everything was working fine on iOS 8. When I updated to iOS 9, the <code>PKRegistryDelegate</code> does not fire the method <code>didUpdatePushCredentials</code> after regist... | <ios><iphone><apple-push-notifications><voip><pushkit> | 2016-01-18 21:49:43 | HQ |
34,864,695 | Saving prediction results to CSV | <p>I am storing the results from a sklearn regression model to the varibla prediction.</p>
<pre><code>prediction = regressor.predict(data[['X']])
print(prediction)
</code></pre>
<p>The values of the prediction output looks like this</p>
<pre><code>[ 266.77832991 201.06347505 446.00066136 499.76736079 295.1551990... | <python><numpy><pandas><scikit-learn> | 2016-01-18 21:50:07 | HQ |
34,865,072 | How to refresh the page after a ServiceWorker update? | <p>I've consulted a lot of resources on Service Workers:</p>
<ul>
<li><a href="https://jakearchibald.com/2014/using-serviceworker-today/#updating-your-serviceworker" rel="noreferrer">Updating your ServiceWorker</a></li>
<li><a href="https://ponyfoo.com/articles/serviceworker-revolution" rel="noreferrer">ServiceWorker:... | <javascript><service-worker><progressive-web-apps> | 2016-01-18 22:16:15 | HQ |
34,865,717 | use conda environment in sublime text 3 | <p>Using Sublime Text 3, how can I build a python file using a conda environment that I've created as in <a href="http://conda.pydata.org/docs/using/envs.html" rel="noreferrer">http://conda.pydata.org/docs/using/envs.html</a></p>
| <python><sublimetext3><anaconda> | 2016-01-18 23:03:30 | HQ |
34,866,380 | Android Studio: Load a File into an Array | <p>I have made a class that can save an array to file, yet, I need it to load the file back into an array inside of an Activity named SampleGridViewAdapter.</p>
<p>Text file format named gallerydump_img.txt:</p>
<pre><code>https://mywebsite.com/path/samplefile.rtf
https://anotherwebsite.com/
https://thirdwebsite.com/... | <java><android><android-studio> | 2016-01-19 00:07:35 | LQ_CLOSE |
34,866,447 | SaaS app with angularjs and nodejs, how do i organize different clients? | <p>I’m trying to decide what to do I this scenario:</p>
<p>I want to create a product that I want to sell in a SaaS business model, I already have the backend more or less thought out and some code in place in nodejs. It handles oAuth, sessions, and controls the roles of the users when accessing a certain endpoint.</p... | <angularjs><node.js><saas><code-reuse><reusability> | 2016-01-19 00:14:38 | HQ |
34,866,674 | Logging from ASP.NET 5 application hosted as Azure Web App | <p>I have an ASP.NET 5 Web API that I host in Azure as a Web App. I want to log messages from my code using Azure Diagnostics. There are multiple article including <a href="https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-troubleshoot-visual-studio/#apptracelogs" rel="noreferrer">Azure docs</a>... | <c#><azure><logging><asp.net-core><azure-diagnostics> | 2016-01-19 00:41:02 | HQ |
34,866,803 | php forum outputs string of text, how to find source of said string? | <p>I'm working on a site which is a simple php forum, and every so often it'll insert an alert/error div on the page, e.g., "Error! You can't do that because of this," or whatever.</p>
<p>How do I search each of the files on my server for the string "Error! You can't do that because of this"? Asked differently, how do... | <php><html> | 2016-01-19 00:56:13 | LQ_CLOSE |
34,867,265 | I need to find a xpath, so that I can click on the next button using selenium. | <button id="79436c61930112002b29d457b47ffbfa_next" class="list_nav btn btn-icon h_flip_content" title="" data-nav="true" name="vcr_next" data-original-title="Next page">
<span class="sr-only">Next page</span>
<span class="icon-vcr-right"></span>
</button>
I have already tried getDriver().findEleme... | <html><selenium><xpath> | 2016-01-19 01:53:02 | LQ_EDIT |
34,868,567 | Recursion not executing properly | Below is the snippet of my code
please note:
n=22
m=7
array = 0000110000111101000101
checker[] = false
public static boolean ultra(int step)
{
System.out.println(step);
if(step>n)
{
System.out.println("success1");
win=true;
... | <java><recursion> | 2016-01-19 04:34:14 | LQ_EDIT |
34,868,838 | Boolean Validaiton | I am facing a little problem here.
I have fetch the data from data using following code,
class CreateGrounddetails < ActiveRecord::Migration
def change
create_table :grounddetails do |t|
t.string :name
t.datetime :working_hours
t.string :address
t.string :contact_n... | <ruby-on-rails><ruby><ruby-on-rails-4><sqlite> | 2016-01-19 05:06:14 | LQ_EDIT |
34,870,407 | please help me i'm getting the following error.....so please its urgent | please tell me about the error in android..guide me to solve this please.. Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\android\android-sdk_r24.4.1-windows\android-sdk-wind... | <android> | 2016-01-19 07:01:09 | LQ_EDIT |
34,870,515 | I want to edit this HTML design in ul li format but when I am converting its images are breakdown. I am newbie Please help me Thanks in advance |
I want to edit this HTML design in ul li format
but when i am trying to do that it goes breakdown.
<!-- begin snippet: js hide: false -->
<!-- language: lang-html -->
<body>
<table bgcolor="#fff" border="0" cellpadding="0" cellspacing="0" width="1132"><tbody><!------------------------------ START ONE... | <html> | 2016-01-19 07:08:22 | LQ_EDIT |
34,870,530 | function attached with a button not working after changing its id in ajax success callback | <p>When I click the button its id, name and val attribute change successfully in ajax success. But if If I click it again the old function attached to the previous id is called not the one attached to the new id. I checked other posts but they did not worked for me either.</p>
<pre><code><input type="submit" name="... | <jquery><ajax> | 2016-01-19 07:09:06 | LQ_CLOSE |
34,870,690 | Javascript regex replace consecutive strings | I have a string that looks like this
"+919357F%7F%7F%7F%00%00%00%29Your%20OTP%20for"
I need all the consecutive %7F replaced with ~
I found a nearly working solution with this command
"+919357F%7F%7F%7F%00%00%00%29Your%20OTP%20for".replace(/[%7F]{2,}/g, '~');
but for some reason it does eat away a couple of ot... | <javascript><regex><string><replace> | 2016-01-19 07:18:35 | LQ_EDIT |
34,870,888 | Serving static assets in webpack dev server | <p>I run webpack-dev-server from the root folder of my project.
I have <em>assets</em> folder in <em>/src/assets</em> that is copied by CopyWebPackPlugin:</p>
<pre><code>new CopyWebpackPlugin([ { from: 'src/assets', to: 'assets' } ])
</code></pre>
<p>If I put <em>logo.png</em> inside assets folder then After running ... | <webpack><webpack-dev-server> | 2016-01-19 07:30:47 | HQ |
34,871,814 | Failed to start namenode in hadoop? | <p>I config Hadoop in windows 7 <a href="http://toodey.com/2015/08/10/hadoop-installation-on-windows-without-cygwin-in-10-mints/">from tutorial</a>
It setting up a Single Node Cluster.
When run <code>hdfs namenode -format</code> to format namenode it throw exception like:
And when <code>start-all.cmd</code> the windows... | <java><apache><hadoop> | 2016-01-19 08:28:39 | HQ |
34,872,382 | Manually adding aar with dependency pom/iml file | <p>Since I cannot use a private maven in order to share my library, I was thinking in sharing the aar and importing into another project.
The problem comes when the aar and jar files does not contain any dependency. So once I manually import the aar in android studio (using Import .JAR/.AA Package) there is no depend... | <android><android-studio><gradle><pom.xml><aar> | 2016-01-19 08:56:49 | HQ |
34,872,479 | What is significant of cascading in Hibernate? | <p>Why we are using cascading in Java?? What is its importance.
Here i am using for save and update</p>
<pre><code>Stock stock = new Stock();
StockDailyRecord stockDailyRecords = new StockDailyRecord();
//set the stock and stockDailyRecords data
stockDailyRecords.setStock(stock);
stock.getStockDailyRecords()... | <java><hibernate> | 2016-01-19 09:02:05 | LQ_CLOSE |
34,872,893 | Navigation using JSON & underscore JS | I need to set up a navigation using JSON & underscore JS, there are two headings with 5 links in each.
This is the way I have my JSON and I cannot get the underscore to work and bring all the links and labels, can anyone please help:
var navigations = [
{
... | <javascript><underscore.js> | 2016-01-19 09:23:42 | LQ_EDIT |
34,873,496 | How to Delete the cell value in a given range if it contains a string value using excel vba | Can anybody tell me how to delete the cells value in a given range if the cell value is String (Not a particular string, in general any String) | <vba><excel> | 2016-01-19 09:50:55 | LQ_EDIT |
34,874,420 | Writing audio to server over TCP socket | <p>I'm trying to transmit real time mic recording to server over TCP socket and server to write input stream to a file.
The connection is established but after some time, I'm getting connection refused error at my clientside.</p>
<p>Server Code:</p>
<pre><code> public class auServer extends Thread{
private sta... | <java><android><sockets><tcp><stream> | 2016-01-19 10:31:14 | HQ |
34,874,814 | Bower install fails to find satisfying version, although there is a matching tag on GitHub | <p>I am having problems installing bower dependencies on a Windows installation. Installation fails for me on Windows 7 x64, with git <code>2.6.4.windows.1</code>, node <code>v5.4.1</code>, npm <code>3.3.12</code>, bower <code>1.7.2</code>.</p>
<p>It works for a colleague on OSX (git <code>2.5.4</code>, node <code>v4.... | <bower><bower-install> | 2016-01-19 10:49:23 | HQ |
34,875,066 | Trouble with *ngIf in Angular 2 (TypeScript) | <p>I am using Angular 2 beta (TypeScript). I met a weird problem. I tried Chrome, Firefox, Opera, all same results.</p>
<p>When I click the "Toggle" button, it can successfully show/hide the text "Hello World!".</p>
<p>When I send the command from another browser using socket, the boolean "show" changes successfully ... | <typescript><angular> | 2016-01-19 11:01:36 | HQ |
34,875,081 | Get rest of string | Javascript | <p>I need to check the head section specifically within the scripts for a specific number which is a string - <code>"/150185454/"</code>.</p>
<p>Currently I'm doing this like so which works well: </p>
<pre><code>var headContent = document.getElementsByTagName('head')[0].innerHTML;
</code></pre>
<p>So <code>"/1501854... | <javascript><jquery> | 2016-01-19 11:02:30 | LQ_CLOSE |
34,875,609 | having a pointer to pointer in main and create an array in other function | I have this :
#include <stdio.h>
#include <stdlib.h>
void mad(int ***,int ,int );
int main(void){
int **x;
int n,m;
scanf("%d%d",&n,&m);
mad(x,n,m);
x[0][0] = 5;
printf:("%d\n",x[0][0]);
return 0... | <c><arrays><function><pointers> | 2016-01-19 11:28:03 | LQ_EDIT |
34,875,637 | How to pass multiple parameters in command line when running gradle task? | <p>I've got a java and groovy classes that are being run by gradle task. I have managed to make it work but I do not like the way I have to pass the parameters in command line. Here is how I do it currently via command line: <code>gradle runTask -Pmode"['doStuff','username','password']"</code><br>
my build.gradle code ... | <java><gradle><build.gradle> | 2016-01-19 11:29:02 | HQ |
34,875,771 | How to animate ng-repeat items relative to click events causing the change | <p>I'm trying to animate a user selecting items from different sets of items.
The item should animate from the clicked set to it's new position in list of selected items.</p>
<p>In the below demo, consider the pink boxes as available items and the bordered box as the list of selected items (blue boxes). User can selec... | <javascript><jquery><css><angularjs><jquery-ui> | 2016-01-19 11:35:47 | HQ |
34,876,013 | Column repeat direction in microsoft report viewer | <p>I am using windows form to generate Identity Card using c# and Microsoft report viewer. Everything is working fine except I could not find column repeat direction in Microsoft report viewer. </p>
<p><strong>Current Scenario</strong></p>
<p>My report paper size is A4. Each page can display maximum 10 individual car... | <c#><reporting-services><reportviewer><microsoft-reporting> | 2016-01-19 11:47:09 | HQ |
34,876,551 | Illegal start of expresssion | import java.text.*;
import java.util.*;
public class Test {
public static void main(String args[]) {
public void sample(){
System.out.println("Hello Working ....");
}
} | <java> | 2016-01-19 12:14:15 | LQ_EDIT |
34,876,740 | Google Play App Review doesn't show App Version code or name | <p>I have released an app on play store, and have received some reviews. In google play developer console, I could not see the version of app in few of the reviews. This is what I found under the APPLICATION heading.</p>
<p><code>Version code — Version name —</code></p>
<p>I tried searching around, but could not find... | <google-play><developer-console> | 2016-01-19 12:23:33 | HQ |
34,876,970 | js onclick working strange | <p>I have the next code </p>
<pre><code>$.ajax({
url: '/data',
type: "POST",
data: JSON.stringify(formData),
contentType: "application/json",
dataType: "json",
success: function(response){
for (var i=0; ... | <javascript><twitter-bootstrap> | 2016-01-19 12:34:42 | LQ_CLOSE |
34,877,411 | Android Studio - Adding an imageview with source | <p>When I add an ImageView in Android Studio from the Palette the program doesn't prompt me to select an actual image like it used to be in Eclipse. It just puts an empty ImageView there like this: </p>
<pre><code><ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
androi... | <android><android-studio> | 2016-01-19 12:56:27 | LQ_CLOSE |
34,878,275 | How can this be done in perl | <Root>
<Top Name=" ">
<Tag name="ALU">
<in name="PC"/>
<iodirection name="AB"/>
</Tag>
<Tag name=" ">
<in name="CCB"/>
<ou name="PC"/>
<bi name="AB"/>
</Tag>
<Tag name=" ">
<in name="DB"/>
<ou name="DI"... | <xml><perl><foreach> | 2016-01-19 13:38:44 | LQ_EDIT |
34,878,803 | C++ non-static data member initializers, just a little bit confused | <p>I am a little bit confused about why the following code does what it does:</p>
<pre><code>class Base
{
public:
Base() = default;
Base(const Base &) =delete;
Base &operator=(const Base &) = delete;
Base(const char*) {}
};
class Holder
{
public:
Holder() = default;
private:
// Bas... | <c++><c++11> | 2016-01-19 14:01:49 | HQ |
34,879,092 | Reliability issues with Checkpointing/WAL in Spark Streaming 1.6.0 | <h1>Description</h1>
<p>We have a Spark Streaming 1.5.2 application in Scala that reads JSON events from a Kinesis Stream, does some transformations/aggregations and writes the results to different S3 prefixes. The current batch interval is 60 seconds. We have 3000-7000 events/sec. We’re using checkpointing to protect... | <scala><apache-spark><spark-streaming><amazon-kinesis><checkpointing> | 2016-01-19 14:15:54 | HQ |
34,879,525 | Code .php gets commented out | <p><strong>1 - Here's a image of my error code .. <em>The purple color zone is the zone commented out automatically and I don't know why it happens...</em></strong></p>
<p><a href="https://i.stack.imgur.com/nV5ih.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nV5ih.jpg" alt="enter image description... | <php><html><mysql><google-chrome><xampp> | 2016-01-19 14:34:58 | LQ_CLOSE |
34,879,657 | C# passing single quotes through query showing error | string query = "Select * from getLabelDetails where itemlookupCode='"+S"';";
The above query is showing error as it is missing semi column. - "';" - How can I pass single quotes for this query? | <c#><sql> | 2016-01-19 14:41:21 | LQ_EDIT |
34,880,341 | How to write 2 byte arrays to a file c#? | I have 2 arrays from my own created zip program.<br>
farArray and bytes.<br>
they are both byte arrays.<br><br>
Now I want to save that in a file (example: "file.zip").<br><br>
I know that I can write bytes with this code:<br>
File.WriteAllBytes(savefile.FileName, bytes);
But I only save 1 byteArray now.<... | <c#><arrays><savefiledialog> | 2016-01-19 15:13:17 | LQ_EDIT |
34,880,551 | Write something in .txt file using javascript | <p>How do I write something in a .txt file using javascript?</p>
<p>I created a variable holding a specific value and now I want to safe it into a .txt file</p>
| <javascript><file> | 2016-01-19 15:22:24 | LQ_CLOSE |
34,880,638 | Compound literal lifetime and if blocks | <p>This is a theoretical question, I know how to do this unambiguously, but I got curious and dug into the standard and I need a second pair of standards lawyer eyes.</p>
<p>Let's start with two structs and one init function:</p>
<pre><code>struct foo {
int a;
};
struct bar {
struct foo *f;
};
struct bar *
in... | <c> | 2016-01-19 15:27:09 | HQ |
34,880,756 | Java beginner - using the 'int counter' more than once within a button action | <p>I am a Java beginner and would like to know if I can use 'int counter' more than once as part of a button action. If I try to use this a second time I receive the error 'variable counter is already defined in method jButton1ActionPerformed(ActionEvent)'. Is there a way of re-setting the counter so I can use it again... | <java><counter> | 2016-01-19 15:33:28 | LQ_CLOSE |
34,881,006 | sparse list of values using ranges | <p>is there a more terse way of writing</p>
<pre><code>listOf('a'..'z','A'..'Z').flatMap { it }
</code></pre>
<p>The idea here is to iterate over some values in a range, like the numbers from 1 through 100, skipping 21 through 24</p>
<pre><code>listOf(1..20, 25..100).flatMap { it }
</code></pre>
| <kotlin> | 2016-01-19 15:45:02 | HQ |
34,881,079 | pandas distinction between str and object types | <p>Numpy seems to make a distinction between <code>str</code> and <code>object</code> types. For instance I can do ::</p>
<pre><code>>>> import pandas as pd
>>> import numpy as np
>>> np.dtype(str)
dtype('S')
>>> np.dtype(object)
dtype('O')
</code></pre>
<p>Where dtype('S') and dt... | <python><numpy><pandas> | 2016-01-19 15:48:18 | HQ |
34,881,537 | How to printf real digit of float in printf | <p>for instance:</p>
<pre><code>#include <stdio.h>
int main(int argc, char **argv) {
my_printf("%f\n", 1.233239208938208);
my_printf("%f\n", 1.23);
return (0);
};
</code></pre>
<p>I hope output is </p>
<pre><code>1.233239208938208
1.23
</code></pre>
<p>How should I do?</p>
| <c> | 2016-01-19 16:08:34 | LQ_CLOSE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.