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
35,137,732
How to detect dns server and ip-adresses in PHP
<p>I want to program a DNS-leaktester in PHP. Is it possible? or do I have to use other languages like python etc. to get the information.</p>
<php><dns>
2016-02-01 18:29:30
LQ_CLOSE
35,138,017
How to specify which domain using ngrok
<p>I use mamp and I have virtual hosts all on port 8888. For example:</p> <ul> <li>site1.dev:8888</li> <li>site2.dev:8888</li> </ul> <p>would point to <code>localhost/site1/</code>, <code>localhost/site2/</code> etc.</p> <p>Before using virtual hosts, I would just change my docroot to whatever project I was currentl...
<ngrok>
2016-02-01 18:48:44
HQ
35,138,710
Parse public keys from .txt file by php
<p>I have .txt file with list of public keys and its ids and status. Exists some "best practice" method how can I extract one of this public key based on KEY_ID in php from .txt file?</p> <p>keys.txt</p> <pre><code>KEY_ID: 1 STATUS: VALID -----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaq6djyzkpHdX7kt8...
<php>
2016-02-01 19:30:48
LQ_CLOSE
35,139,127
Can someone please thoroughly explain what a URI is?
<p>I understand it has something to do with databases but I am not exactly sure what it does.. I looked on the android developer page and they don't explain it very well. </p>
<uri>
2016-02-01 19:53:46
LQ_CLOSE
35,139,317
how to clear history in safari while button clicked in objective c
Could you please let me know how to clear safari history while button clicked in our app using ios sdk? Thanks,
<ios><objective-c>
2016-02-01 20:04:04
LQ_EDIT
35,139,711
Running Python script via ansible
<p>I'm trying to run a python script from an ansible script. I would think this would be an easy thing to do, but I can't figure it out. I've got a project structure like this:</p> <pre><code>playbook-folder roles stagecode files mypythonscript.py tasks main.yml release.yml </code><...
<ansible><ansible-2.x>
2016-02-01 20:28:55
HQ
35,139,790
I want to print a value in debugger in jsp <script> var url = std.setUrl(); alert(url); </script>
The above code gives an alert instead of printing it to a debugger.
<javascript><jsp>
2016-02-01 20:34:14
LQ_EDIT
35,140,116
Accessing navigator in Actions with React-Native and Redux
<p>Using React-Native (0.19) and Redux, I'm able to navigate from scene to scene in React Components like so:</p> <pre><code>this.props.navigator.push({ title: "Registrations", component: RegistrationContainer }); </code></pre> <p>Additionally I'd like to be able push components to the navigator from anywhere in th...
<react-native><redux>
2016-02-01 20:53:15
HQ
35,140,117
How to interpret LDA components (using sklearn)?
<p>I used <strong>Latent Dirichlet Allocation</strong> (<strong>sklearn</strong> implementation) to analyse about 500 scientific article-abstracts and I got topics containing most important words (in german language). My problem is to interpret these values associated with the most important words. I assumed to get pro...
<python-3.x><scikit-learn><lda><topic-modeling>
2016-02-01 20:53:20
HQ
35,140,341
EF7: The term 'add-migration' is not recognized as the name of a cmdlet
<p>I have framework version set to: dnx46 in project.json. Also have the following packages:</p> <pre><code> "dependencies": { "EntityFramework.Commands": "7.0.0-rc1-final", "EntityFramework.Core": "7.0.0-rc1-final", "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final", "Microsoft.AspNet.Identity.E...
<entity-framework><entity-framework-core>
2016-02-01 21:06:36
HQ
35,140,358
React Native - Fetch POST request is sending as GET request
<p>I'm having issues when using FETCH.</p> <p>I am trying to make a POST request using FETCH in react-native.</p> <pre><code> fetch("http://www.example.co.uk/login", { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, ...
<react-native>
2016-02-01 21:07:57
HQ
35,140,408
How to get value from a Java enum
<p>I have a enum which looks like:</p> <pre><code>public enum Constants{ YES("y"), NO("N") private String value; Constants(String value){ this.value = value; } } </code></pre> <p>I have a test class which looks like</p> <pre><code>public class TestConstants{ public static void main(String[] args){ S...
<java><enums>
2016-02-01 21:10:56
HQ
35,141,256
How to detect when a React Native app is opened?
<p>My React Native app wants to synchronize its local data with an API when the user opens the app. This should happen whenever the user returns to the app, not just when it first starts. Essentially, what I would like is the equivalent of AppDelegate's <code>applicationDidBecomeActive</code> callback, so that I can ru...
<react-native>
2016-02-01 22:03:05
HQ
35,141,419
Visual studio code color picker
<p>I love visual studio code but there's one thing that is missing in my opinion.<br /> A color picker. <br /> Does anyone know if there's a color picker for visual studio code just like in visual studio?</p>
<color-picker><visual-studio-code>
2016-02-01 22:14:28
HQ
35,142,273
Defined a method in Ruby and am trying to return a string that incorporates what the method is calculating
Here's my code: tv_price = 200.50 tv_buyers = 3 tv_sales = tv_price * tv_buyers def two_decimals(number) puts sprintf('%0.2f', number) end puts "The total dollar amount of TVs sold today was #{two_decimals(tv_sales).to_s}." I want to return the following: **The total dollar amount of TV...
<ruby>
2016-02-01 23:16:52
LQ_EDIT
35,142,532
how to split long lines for fmt.sprintf
<p>I have a very long line in fmt.Sprintf. How do I split it in the code? I don't want to put everything in a single line so the code looks ugly.</p> <pre><code>fmt.Sprintf("a:%s, b:%s ...... this goes really long") </code></pre>
<go><gofmt>
2016-02-01 23:41:30
HQ
35,142,634
Unknown override specifier, missing type specifier
<p>First, <code>Parameter.h</code>:</p> <pre><code>#pragma once #include &lt;string&gt; class Parameter { public: Parameter(); ~Parameter(); private: string constValue; string varName; }; </code></pre> <p>And <code>Parameter.cpp</code>:</p> <pre><code>#include "Parameter.h" using namespace std; P...
<c++>
2016-02-01 23:51:30
HQ
35,142,656
where did NUnit Gui Runner go? version 3.0.1
<p>I just upgraded to version 3.0.1 from nunit 2.6.4. It used to have a NUnit Gui Runner, located here:</p> <p><a href="https://i.stack.imgur.com/PNHqE.png"><img src="https://i.stack.imgur.com/PNHqE.png" alt="enter image description here"></a></p> <p>After installing 3.0.1 (which I downloaded windows version <a href=...
<nunit>
2016-02-01 23:53:34
HQ
35,143,055
How to mock psycopg2 cursor object?
<p>I have this code segment in Python2:</p> <pre><code>def super_cool_method(): con = psycopg2.connect(**connection_stuff) cur = con.cursor(cursor_factory=DictCursor) cur.execute("Super duper SQL query") rows = cur.fetchall() for row in rows: # do some data manipulation on row return r...
<python><python-2.7><unit-testing><mocking><psycopg2>
2016-02-02 00:34:57
HQ
35,143,300
i get a segmentation fault (core dumped) error but only when half my code runs
the goal of this code is to manipulate an ASCII "image" that comes in the form of a really long string that i print out on different lines ............. ............. .XXX.....X... .XXX.....X... .XXX......... .XXX......... .XXXXXXX..... .XXXXXXX..... .XXXXXXX..... ........... it looks like this ` #includ...
<c++>
2016-02-02 01:02:35
LQ_EDIT
35,144,103
Sometimes pip install is very slow
<p>I am sure it is not network issue. Some of my machine install packages using pip is very fast while some other machine is pretty slow, from the logs, I suspect the slow is due to it will compile the package, I am wondering how can I avoid this compilation to make the pip installation fast. Here's the logs from the s...
<python><pip>
2016-02-02 02:38:47
HQ
35,144,135
How to upload a json file with secret keys to Heroku
<p>I'm building a rails app that pulls data from Google Analytics using the Google Api Client Library for Ruby.</p> <p>I'm using OAuth2 and can get everything working in development on a local machine. My issue is that the library uses a downloaded file, <code>client_secrets.json</code>, to store two secret keys.</p>...
<ruby-on-rails><ruby><json><git><heroku>
2016-02-02 02:43:49
HQ
35,144,550
How to install cryptography on ubuntu?
<p>My ubuntu is 14.04 LTS.</p> <p>When I install cryptography, the error is:</p> <pre><code>Installing egg-scripts. uses namespace packages but the distribution does not require setuptools. Getting distribution for 'cryptography==0.2.1'. no previously-included directories found matching 'documentation/_build' zip_sa...
<python><ubuntu><cryptography><pip>
2016-02-02 03:31:15
HQ
35,144,670
Realm Exception 'value' is not a valid managed object
<p>I'm setting a property on a realm object with another realm object which is a different class, however I'm getting the error: 'value' is not avalid managed object.</p> <pre><code>realmObject.setAnotherRealmObject(classInstance.returnAnotherRealmObjectWithValues()) </code></pre> <p>The class instance receives anoth...
<android><realm>
2016-02-02 03:45:02
HQ
35,144,784
How to use migration programmatically in EntityFramework Codefirst?
<p>I'm working in a project that uses EF Code First. I'm trying to use migration features. I don't want to use Package Console Manager. How can I execute the "Add-Migration" and "Update-Database" programmatically? </p> <pre><code>add-migration TestMigration01 -force update-database </code></pre>
<c#><entity-framework><ef-code-first><entity-framework-6><entity-framework-migrations>
2016-02-02 03:58:32
HQ
35,144,835
Fluentd vs Kafka
<p>The use case is this: I've several java applications running which all have to interact with different (each one has a specific target) elasticsearch indices. For instance an application A uses the indices A,B,C of ElasticSearch to query and update. Application B uses indices A,C,D(say). </p> <p>Some common interfa...
<elasticsearch><apache-kafka><fluentd>
2016-02-02 04:04:13
HQ
35,145,159
Simplest way to validate string (Java)
<p>I want to check that a string meets the following criteria:</p> <ul> <li>Consists of exactly two words</li> <li>Each word contains only letters (A-Z and a-z), and is at least two letters long</li> <li>The two words are separated by exactly one space</li> </ul> <p>For example, "Jon Snow" should validate, and any ot...
<java><regex><string><validation>
2016-02-02 04:38:39
LQ_CLOSE
35,145,203
Which ad network do these guys use?
I've been watching these guys and their ad on the lock screen, i'd like to know which ad network they're using, is there a way to find this out? please let me know as this would really help me make an informed decision. [enter image description here][1] [1]: http://i.stack.imgur.com/J849H.png
<ads>
2016-02-02 04:42:42
LQ_EDIT
35,145,400
git checkout my_branch vs. git checkout origin/my_branch
<p>I was on <code>branch1</code> when I checkout <code>branch2</code> like this (both branches are existing).</p> <p><code>git checkout origin/branch2</code></p> <p>then I got a detached head error:</p> <pre><code>You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and y...
<git>
2016-02-02 05:00:39
HQ
35,145,702
I want to read text from motor plate image
<p>I have develop OCR Demo app using tessaract library its giving 100% result from image which keep simple text.but i want to read text from motor plate image. if any one knows please help me. <a href="https://i.stack.imgur.com/q2buH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q2buH.png" alt="i w...
<android>
2016-02-02 05:27:20
LQ_CLOSE
35,146,662
how to return opposite of true or false
I was interview in company and i was asked a question , question was bti strange so wanted to ask with expert guys. The question suppose i have function which returns bool type, Lets say this : public bool func(int param) { bool retVal; //here is some algorithm which as a result ei...
<c><algorithm><data-structures>
2016-02-02 06:37:09
LQ_EDIT
35,147,009
How does setting the height of elemets html and body to 100% help me in setting the height of an element to the device's screen height?
[I tumbled upon this question here][1] [1]: http://stackoverflow.com/questions/12172177/set-div-height-equal-to-screen-size Look at the answer, He put the height of the body and html to 100% which helped him solve his answer, Can I get correct explanation for this? why that happens? what if I don't us...
<html><css>
2016-02-02 06:59:56
LQ_EDIT
35,147,366
Check if a value exits in array (Laravel or Php)
<p>I have this array:</p> <pre><code>$list_desings_ids = array('hc1wXBL7zCsdfMu','dhdsfHddfD','otheridshere'); </code></pre> <p>With a die() + var_dumo() this array return me:</p> <pre><code>array:2 [β–Ό 0 =&gt; "hc1wXBL7zCsdfMu" 1 =&gt; "dhdsfHddfD" 2 =&gt; "otheridshere" ] </code></pre> <p>I want check if a d...
<php><arrays><laravel>
2016-02-02 07:23:28
HQ
35,147,995
unexpected else statement in php
<p>My code retrieve videos based on user connection speed.</p> <p>I am getting syntax error unexpected else on my code. i am troubleshooting this for the past few days and had run out of idea on how to solve it..</p> <p>ajax code</p> <pre><code> $.ajax({ method: "POST", url: "viewvideo.php...
<javascript><php><ajax>
2016-02-02 08:05:11
LQ_CLOSE
35,148,100
why using stack data structure for storing primitive values instead of linked lists or arrays ?
<p>Since Stacks internally uses either Linked Lists / Arrays, why don't java directly store primitive values in Linked Lists / Arrays instead of Stacks ? </p>
<java><memory><memory-management><data-structures><stack>
2016-02-02 08:11:54
LQ_CLOSE
35,148,468
Safari View Controller uses wrong status bar color
<p>My app uses a dark navigation bar color. Therefore I set the status bar color to white (so it has a nice contrast).</p> <p><a href="https://i.stack.imgur.com/nDItJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nDItJ.png" alt="red navigation bar with white status bar"></a></p> <p>I did this by setting t...
<ios><colors><uinavigationbar><statusbar><sfsafariviewcontroller>
2016-02-02 08:34:28
HQ
35,148,530
Why is this memory referencing segfault?
<pre><code>double fun(int i) { volatile double d[1] = {3.14}; volatile long int a[2]; a[i] = 1073741824; return d[0]; } </code></pre> <p>fun(0) βž™ 3.14</p> <p>fun(1) βž™ 3.14</p> <p>fun(2) βž™ 3.1399998664856</p> <p>fun(3) βž™ 2.00000061035156</p> <p>fun(4) βž™ 3.14, then segmentation fault</p> <p>can someone explain ...
<c><memory-management>
2016-02-02 08:37:56
LQ_CLOSE
35,149,275
Indent/format code in Visual Studio code on MAC
<p>i'm trying to indent my code in visual studio code. I searched and i found that ctrl + F + K should be work, but it doesn't. I tried cmd + k + f too, but it still not working. I hope you can help me!</p>
<macos><indentation><auto-indent><visual-studio-code>
2016-02-02 09:18:37
HQ
35,149,422
How to fix the maven check style error
<p>Currently I just tried to download and build to make the Netty source code work. But when I tried to run the command <code>mvn eclipse:eclipse</code> in the source folder. I got an error said </p> <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.10:check (check-style) on ...
<java><maven><netty>
2016-02-02 09:25:37
HQ
35,149,563
how to optimize this mysql query - %a% or
SELECT DISTINCT u.id AS userId,u.type AS userType FROM User AS u,Personal AS p,Company AS c WHERE (p.realName LIKE '%adf%' AND u.type=1 AND u.id=p.userId) OR (c.name LIKE '%grge%' AND u.id=c.userId) LIMIT 0 , 10000
<mysql>
2016-02-02 09:31:40
LQ_EDIT
35,149,690
Configure sublime text 3 folder node_modules for node.js
<p>I need node_modules in the sidebar but not when searching files, "go to files".</p> <p>If I use</p> <pre><code>{ "folder_exclude_patterns": [ "node_modules"] } </code></pre> <p>It works ok except for the sidebar. </p>
<node.js><sublimetext3>
2016-02-02 09:37:51
HQ
35,149,777
Provider cannot be found. It may not be properly installed : ADODB
<p>I am using ADO to connect to EXCEL from 64bit machine by VBScript. The MS Office(2013) is 32bit. The connection string is </p> <pre><code>Set objExcel = CreateObject( "ADODB.Connection" ) objExcel.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &amp; myXlsFile &amp; ";Extended Properties=""Excel 12.0;IMEX=1;"...
<vbscript>
2016-02-02 09:42:03
LQ_CLOSE
35,149,861
Equivalent urllib.parse.quote() in python 2.7
<p>What is the equivalent of <code>urllib.parse.quote</code></p> <p>It's <code>urllib.urlencode()</code>?</p> <p>Thanks</p>
<python><python-2.7><python-3.x>
2016-02-02 09:45:46
HQ
35,150,186
Getting git-revision hash with webpack
<p>I'm trying to create archive with webpack with suffix by git-revision. Could you tell me please what is good way to do it?</p>
<webpack><git-revision>
2016-02-02 09:59:10
HQ
35,150,409
Fixed navbar separates from top of browser on Chrome for iPhone
<p>I have a website with a bootstrap fixed-to-top navigation bar (<a href="https://getbootstrap.com/examples/navbar-fixed-top/" rel="noreferrer">example here</a>), and noticed that, using Chrome on an iPhone, the navbar separates from the top of the screen by just a few pixels when scrolling quickly. This is shown in t...
<html><css><iphone><google-chrome>
2016-02-02 10:08:25
HQ
35,150,709
Authorise Pinterest App
<p>I have added a collaborator for my Pinterest app, however, when accessing the colaberators account and clicking on the application there is no 'authorise' button or anything similar. The "You still need at least 1 collaborator to authorize your app before you can submit" warning still shows on the collaberators acco...
<api><pinterest>
2016-02-02 10:20:55
HQ
35,150,847
Why is sub class' static code getting executed?
<p>I have written the following code and created object for the super class.</p> <pre><code>class SuperClass{ static int a=2; static int b(){ return 2; } int c(){ return 2; } SuperClass(){ System.out.println("Super"); } static { System.out.println("super...
<java><constructor><static><static-methods>
2016-02-02 10:26:57
HQ
35,151,985
Activity crash while launching third party application
I am trying to start new application on certain Action click and suppose for any reason that application get crashed and doesn't launch,why is it crashing my current activity which started that application. launchmode for current activity is singleTask and same for other app as well and care has been taken to addFla...
<android><android-activity>
2016-02-02 11:18:11
LQ_EDIT
35,152,310
Mongoose text-search with partial string
<p>Hi i'm using <strong>mongoose</strong> to search for persons in my collection.</p> <pre><code>/*Person model*/ { name: { first: String, last: String } } </code></pre> <p>Now i want to search for persons with a query:</p> <pre><code>let regex = new RegExp(QUERY,'i'); Person.find({ $or: [ ...
<node.js><mongodb><mongoose><text-search>
2016-02-02 11:33:46
HQ
35,152,462
How to avoid memory leak
Question on memory leak. Probably a basic one. C++ Pseudo code: map map_a; for ( 1 to 10 ) { element = 5; vector<int> *ptr = map_a[element]; if (!ptr) { ptr = new vector<int>; map[element] = ptr; } ptr->push_back(i); } How to free up the memory...
<c++>
2016-02-02 11:40:55
LQ_EDIT
35,152,522
React Transferring Props except one
<p>React suggests to <a href="https://facebook.github.io/react/docs/reusable-components.html#transferring-props-a-shortcut" rel="noreferrer">Transfer Props</a>. Neat!</p> <p>How can I transfert all but one?</p> <pre><code>render: function(){ return (&lt;Cpnt {...this.propsButOne}&gt;&lt;Subcpnt one={this.props.one}...
<javascript><reactjs>
2016-02-02 11:43:29
HQ
35,152,605
SSH connections keep dropping out due to inactivity
<p>My SSH connections keep dropping out due to inactivity in the EC2 hosts. I have tried to put these options [1] in <code>/etc/ssh/ssh_config</code> in the server and in the client, but the connections keep dropping out.</p> <pre><code>ServerAliveInterval 15 ServerAliveCountMax 3 </code></pre> <p>How I make connecti...
<linux><amazon-web-services><ssh><amazon-ec2>
2016-02-02 11:46:42
LQ_CLOSE
35,152,667
Why do I hot nan?
Simple python code def m(x,y): x=2 y=[3,5] a=1 b=[0,26] print m(a,b) I want to change the arguments,if it is possible without return.When I run my code python d1.py None Why?
<python><python-2.7>
2016-02-02 11:49:25
LQ_EDIT
35,152,818
std::conditional vs std::enable_if
<p>I have a hashing function that can take any object type and hash it, it uses <code>std::hash</code> internally. Because <code>std::hash</code> does not support enum types I've created overloads of the function, 1 for enumerations using <code>std::underlying_type</code> and 1 for other types:</p> <pre><code>template...
<c++><c++14>
2016-02-02 11:55:35
HQ
35,152,945
getting top 2 rows in each group without row number in sql
i am looking a simple code to get result of 2 rows with latest invoice date in each group . Although this task can be accomplished by a ror_number that you can see in below code , but i need alternative of this with minimum complexity. Code :- create table #tt ( id int, invoiceDT datetime ) insert int...
<sql><sql-server>
2016-02-02 12:01:07
LQ_EDIT
35,153,108
why is logged_out.html not overriding in django registration?
<p>I am using built-in django login and logout. In my Project/urls.py i have added url's for both login and logout.</p> <pre><code>from django.conf.urls import include, url from account import views from django.contrib.auth import views as auth_views from django.contrib import admin urlpatterns = [ url(r'^admin/',...
<python><django><django-templates>
2016-02-02 12:08:51
HQ
35,153,112
Gradle version 2.10 is required. Current version is 2.8 Error
<p>Following things are using in the project-</p> <blockquote> <p>The android studio version - 2.0 Preview 4.<br> ANDROID_BUILD_MIN_SDK_VERSION=9<br> ANDROID_BUILD_TARGET_SDK_VERSION=22<br> ANDROID_BUILD_TOOLS_VERSION=22.0.1<br> ANDROID_BUILD_SDK_VERSION=22<br></p> </blockquote> <pre><code>classpath 'com.an...
<android><android-studio><build.gradle><android-studio-2.0>
2016-02-02 12:08:54
HQ
35,153,377
receiving array of data using UART arduino
<p>i am trying to send data through UART in arduino to fingerprint scanner i am using an array to send the commands and it works fine </p> <pre><code>for(i =0 ; i&lt;= 24 ; i++) { Serial.write(SendArray[i]); SendArray[i] =0; } </code></pre> <p>the problem is when i'm trying to receive response from the ...
<c><arrays><arduino>
2016-02-02 12:20:43
LQ_CLOSE
35,153,774
mongoimport json file syntax
<p>I'm trying to import json document using mongoimport command and have tried all possible ways but it's giving be below error. Plz tell me what m I doing wrong here. I've given full path of json doc. I want to import big document having 800+ records but because it failing so currently my students.json contains simple...
<json><mongodb><mongoimport>
2016-02-02 12:39:43
HQ
35,153,902
Find the list of Google Container Registry public images
<p>Where can I find the list of GCR public images? In case of docker images, we can list it in hub.docker.com. But I couldn't find anything like that for GCR.</p>
<image><list><public><google-container-registry>
2016-02-02 12:45:14
HQ
35,154,441
Docker-compose links vs external_links
<p>I believe it is simple question but I still do not get it from Docker-compose documentations. What is the difference between links and external_links?</p> <p>I like external_links as I want to have core docker-compose and I want to extend it without overriding the core links. </p> <p>What exactly I have, I am tryi...
<elasticsearch><docker><logstash><docker-compose>
2016-02-02 13:09:32
HQ
35,154,603
R Data-Frame: Get Maximum of Variable B condititional on Variable A
<p>I am searching for an efficient and fast way to do the following: I have a data frame with, say, 2 variables, A and B, where the values for A can occur several times:</p> <pre><code>mat&lt;-data.frame('VarA'=rep(seq(1,10),2),'VarB'=rnorm(20)) VarA VarB 1 0.95848233 2 -0.07477916 3 2....
<r><dataframe>
2016-02-02 13:17:53
LQ_CLOSE
35,154,652
Getting webpage source code with java
<p>I'm trying to get a webpage source code with JAVA but i fail all the time! I want to get the source code from the link below.</p> <p><a href="http://widget.websta.me/rss/n/wikirap_official" rel="nofollow">http://widget.websta.me/rss/n/wikirap_official</a></p> <p>I searched on the net and tried many codes but all r...
<java><android><instagram><feed>
2016-02-02 13:19:45
LQ_CLOSE
35,155,824
Can Spring Data REST's QueryDSL integration be used to perform more complex queries?
<p>I'm currently building a REST API in which I want clients to easily filter on most properties of a specific entity. Using <a href="http://querydsl.com/" rel="noreferrer">QueryDSL</a> in combination with <a href="http://projects.spring.io/spring-data-rest/" rel="noreferrer">Spring Data REST</a> (<a href="https://gist...
<spring><spring-data><spring-data-jpa><spring-data-rest><querydsl>
2016-02-02 14:15:21
HQ
35,156,134
How to properly setup custom handler404 in django?
<p>According to the <a href="https://docs.djangoproject.com/en/dev/topics/http/views/#customizing-error-views" rel="noreferrer">documentation</a> this should be fairly simple: I just need to define <code>handler404</code>. Currently I am doing, in my top <code>urls.py</code>:</p> <pre><code>urlpatterns = [ ... ] ...
<django><http-status-code-404>
2016-02-02 14:29:34
HQ
35,157,642
NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor conflits on Elastic Search jar
<p>While creating Elasticsearch Client, I'm getting the exception java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor; After some lookup, seams like the Guava-18 is being overwrite by an older version at runtime, and Guava-18 only works during com...
<java><maven><elasticsearch><jar><guava>
2016-02-02 15:38:10
HQ
35,157,742
How to convert singleton array to a scalar value in Python?
<p>Suppose I have 1x1x1x1x... array and wish to convert it to scalar?</p> <p>How do I do it?</p> <p><code>squeeze</code> does not help.</p> <pre><code>import numpy as np matrix = np.array([[1]]) s = np.squeeze(matrix) print type(s) print s matrix = [[1]] print type(s) print s s = 1 print type(s) print s </code></...
<python><numpy><multidimensional-array>
2016-02-02 15:43:00
HQ
35,157,786
VSCode: Open file from file explorer with Enter key on Mac OSX
<p>When using VSCode on Windows, I can navigate the file explorer and hit <kbd>Enter</kbd> on the focused file and the file will open in the editor. On my Mac, however, when I do this, VSCode will open the rename input as follows:</p> <p><a href="https://i.stack.imgur.com/up03Q.jpg"><img src="https://i.stack.imgur.com...
<visual-studio-code>
2016-02-02 15:44:37
HQ
35,158,261
ImageView in ListView briefly shows previous image on scroll with RecycleElement enabled
<p>I have a list of the following class:</p> <pre><code>public class Set { public string IconUrl { get; set; } } </code></pre> <p>This list is bound to a ListView:</p> <pre><code>&lt;ListView ItemsSource="{Binding Sets}"&gt; &lt;ListView.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;ViewCell&g...
<ios><xamarin><xamarin.forms>
2016-02-02 16:07:21
HQ
35,158,573
Java ArrayList of Strings Throwing ArrayIndexOutOfBoundException
<p>Here is my problem:</p> <ol> <li><p>I have a Java String returned from my Web service in the below form:</p> <p>21,6.417,0.3055714,27,0.7778,0.04761905</p></li> <li><p>Now I have splitted this string into separate Strings by using split function by comma delimiter.</p> <p>dataList = Arrays.asList(data.split(","))...
<java><string><arraylist>
2016-02-02 16:21:54
LQ_CLOSE
35,158,956
How to do math pow with decimals
<pre><code>double variable1= 1.125; double variable2= 1/7; Math.Pow(variable1,variable2); </code></pre> <p>the problem is when using doubles variable2 returns 0 so the Math.Pow result is not acurate, i should use decimals but it is not suported with Math.Pow , what should i do ?</p>
<c#><math><decimal>
2016-02-02 16:38:18
LQ_CLOSE
35,159,244
Xcode - There are no dSYMs available for download
<p>I want to extract the dSYM file from but when I click on <em>"Download dSYMs..."</em> in the <em>Organizer</em> I get the follow message: "There are no dSYMs available for download.". </p> <p>I'm using Xcode 7.2 with a workspace generated by Cocoapods 0.39. </p> <p>How can I get them?</p> <p><a href="https://i.st...
<ios><xcode><xcode7><dsym>
2016-02-02 16:51:37
HQ
35,159,530
Does Rust have Collection traits?
<p>I'd like to write a library that's a thin wrapper around some of the functionality in <a href="https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html">BTreeMap</a>. I'd prefer not to tightly couple it to that particular data structure though. Strictly speaking, I only need a subset of its functiona...
<collections><rust><traits><standard-library>
2016-02-02 17:04:41
HQ
35,159,967
Setting GOOGLE_APPLICATION_CREDENTIALS for BigQuery Python CLI
<p>I'm trying to connect to Google BigQuery through the BigQuery API, using Python. </p> <p>I'm following this page here: <a href="https://cloud.google.com/bigquery/bigquery-api-quickstart" rel="noreferrer">https://cloud.google.com/bigquery/bigquery-api-quickstart</a></p> <p>My code is as follows:</p> <pre><code>im...
<python><google-bigquery>
2016-02-02 17:26:59
HQ
35,160,256
How do I output lists as a table in Jupyter notebook?
<p>I know that I've seen some example somewhere before but for the life of me I cannot find it when googling around.</p> <p>I have some rows of data:</p> <pre><code>data = [[1,2,3], [4,5,6], [7,8,9], ] </code></pre> <p>And I want to output this data in a table, e.g.</p> <pre><code>+---+---+-...
<python><jupyter-notebook>
2016-02-02 17:40:45
HQ
35,160,329
Custom Facebook Login button iOS
<p>I've just integrated the Facebook iOS SDK with my app, and the login works great. That said, the SDK doesnt seem to give me the option to customize my login button (it provides me with that ugly default button in the middle of the screen). I'm using Storyboards with my app - how can I go about hooking up my own butt...
<ios><objective-c><facebook>
2016-02-02 17:44:34
HQ
35,161,401
C++ dereferencing for std::priority_queue::top
<p>Documentation states <code>std::priority_queue::top</code> returns a constant reference to the top element in the priority_queue, but when printing the top element, the unary dereference operator is not used. </p> <pre><code>// priority_queue::top #include &lt;iostream&gt; // std::cout #include &lt;queue&gt; ...
<c++><reference><priority-queue>
2016-02-02 18:43:21
LQ_CLOSE
35,162,533
Convert String date YYYY-MM to date in Javascript
<p>I have a date as a String like : <code>2015-12</code> for december 2015.</p> <p>I would like to convert this date to get this date in milliseconds in javascript. (From the first day of the month)</p> <p>How can i do it ?</p>
<javascript><jquery><date>
2016-02-02 19:46:55
LQ_CLOSE
35,162,628
Please help me. i trying create simple game in cocos2d-x. but when i compile my project i get error like this
Please help me. i trying create simple game in cocos2d-x. but when i compile my project i get error like this BUILD FAILED D:\Android\sdk\tools\ant\build.xml:597: The following error occurred while executing this line: D:\Android\sdk\tools\ant\build.xml:716: The following error occurred while executing this li...
<java><android><cocos2d-android>
2016-02-02 19:52:28
LQ_EDIT
35,162,658
Pro/contra of using "else" if the then-clause exits the method anyways
<p>Which of these two is the "better" method and why?</p> <pre><code>if(list.isEmpty()) { return; } else { [...] } </code></pre> <p>vs.</p> <pre><code>if(list.isEmpty()) { return; } [...] </code></pre>
<java><if-statement><return>
2016-02-02 19:54:19
LQ_CLOSE
35,162,886
I am testing a site that is currently live. I am getting an error code when I test it using XAMPP.
<p>When I load my website using my localhost server in XAMPP I get this error: Undefined index: hideHeader in /Applications/XAMPP/xamppfiles/htdocs/test_new/header.php on line 5</p> <p>I'm trying to understand it. It works and is live right now on godaddy. I'm updating the site and want to test my changes. Here is the...
<php><indexing><undefined>
2016-02-02 20:09:52
LQ_CLOSE
35,163,198
Associativity of fold-expressions
<p><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4191.html" rel="noreferrer"><strong>N4191</strong></a> proposed fold-expressions to C++. The definition there was that</p> <pre><code>(args + ...) </code></pre> <p>is a left-fold (i.e. <code>(((a0 + a1) + a2) + ...)</code>, and that </p> <pre><code...
<c++><language-lawyer><c++17><associativity><fold-expression>
2016-02-02 20:28:53
HQ
35,164,431
Stack Initialization
I'm still fairly new to C programming so sorry for this really basic question, but can anyone tell me what this particular code does part by part? What does "->" after the stack do? int StackInit(struct Stack *stack) { stack->currentItemIndex = -1; stack->initialized = true; return SUCCESS; }
<c>
2016-02-02 21:49:16
LQ_EDIT
35,164,560
No resource found that matches the given name: attr 'android:windowElevation
i instal new windows and then instal eclipse but when i create a new project its get error and i dont know what is it workspace\appcompat_v7\res\values-v21\themes_base.xml:129: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. workspace\appcompat_v7\res\...
<android><eclipse>
2016-02-02 21:56:36
LQ_EDIT
35,165,688
How to Publish Visual Studio Database Project in VS 2015
<p>I was unable to google this.</p> <p>We have an existing database project (sql server).</p> <p>Some new files (scripts) were added.</p> <p>We have an existing server / database where some new scripts need to be run into that context.</p> <p>In Visual Studio 2015, how can I accomplish this?</p> <p>I was told to s...
<visual-studio-2015><publish><database-project>
2016-02-02 23:18:54
HQ
35,165,788
Quick keyword search
Simple code here, I'm trying to write a code that can pick up on specific keywords, but I'm not having a lot of luck. Here's the code: #include <iostream> int main(){ std::string input; bool isUnique = true; std::cout<<"Please type a word: "; std::cin>>input; if(input == "the" |...
<c++><iostream>
2016-02-02 23:26:36
LQ_EDIT
35,166,013
How do you update a django template context variable after an AJAX call?
<p>I have a table Product that shows information of a group of products.</p> <pre><code> &lt;table id="item_table" class="table table-sm table-hover table-bordered"&gt; &lt;thead class="thead-inverse"&gt; &lt;tr&gt; &lt;th colspan="2"&gt;Date&lt;/th&gt; &lt;th colspan="6"&gt;...
<jquery><ajax><django><django-templates>
2016-02-02 23:47:52
HQ
35,166,596
Will a NULL string get malloced?
I have a function that accepts a char pointer. In the function the pointer gets malloced. I sent in NULL as the argument in one instance and it didnt create any compiler warnings. I am confused as to why this is? I expected it to do so. I also did not free anything.
<c><malloc>
2016-02-03 00:49:46
LQ_EDIT
35,166,685
UNKNOWN - Segmentation Fault
I keep getting a Segmentation fault. I figured out that it happens between these two lines: printf("%s - File exists!\n", file_name); printf("inforloop"); But I'm unsure why the segmentation fault keeps occuring. This is the entire code: #include<stdio.h> #include<unist...
<c>
2016-02-03 01:00:17
LQ_EDIT
35,166,758
React Javascript displaying/decoding unicode characters
<p>I have a string in unicode that i need to convert. I need to render the string with \u00f3 to Γ³. This is an example, it should happen with all other types of characters, Γ‘, Γ­, ΓΊ...</p> <p>I have the following basic code: <a href="https://jsfiddle.net/dddf7o70/" rel="noreferrer">https://jsfiddle.net/dddf7o70/</a><...
<javascript><reactjs>
2016-02-03 01:08:01
HQ
35,166,821
ValueError: attempted relative import beyond top-level package
<p>I was playing the the Python's import system in order to understand better how it works, and I encountered another problem. I have the following structure </p> <pre><code>pkg/ __init__.py c.py d.py subpkg/ __init__.py a.py b.py </code></pre> <p>Inside <code>a.py</code> I ha...
<python-3.x><python-import>
2016-02-03 01:16:39
HQ
35,167,097
Use Perl to only print if value of column A is present for each value in Column B
So in Perl how can I go through a sample file like so: 1 D Z 1 E F 1 G L 2 D I 2 E L 3 D P 3 G L So here I want to be able to print out only the values that have the same first value across all values in the second column. Thus output would look like this: 1 D Z 1 E ...
<arrays><perl><hash>
2016-02-03 01:48:23
LQ_EDIT
35,167,770
Can't Draw Filled Rectangle in OpenGL
<p>I am trying to draw a simple filled rectangle in OpenGL. All Google searching tells me that glRectf() should do this, by specifying the color beforehand with glColor4f(), however the rectangle is always drawn unfilled (borders only).</p> <p>Is there anything I am missing, or need to specify in the code beforehand? ...
<opengl>
2016-02-03 03:04:16
LQ_CLOSE
35,167,824
Difference between a server with http.createServer and a server using express in node js
<p>What's the difference between creating a server using http module and creating a server using express framework in node js? Thanks.</p>
<node.js><express><npm><server>
2016-02-03 03:09:47
HQ
35,167,861
sort array data without duplicate
i make twitter bot using codebird I want to sort the data status in php array without duplicates , line by line (urls media /remote file links) this my code require_once ('codebird.php'); `\Codebird\Codebird::setConsumerKey("pubTRI3ik5hJqxxxxxxxxxx",` `"xxxxxS6Uj1t5GJPi6AUxxxxx");` $cb = \Codeb...
<php><arrays><twitter>
2016-02-03 03:13:53
LQ_EDIT
35,167,904
What is the scoop of percompile variable in c++?
Is the scoop of the precompile variable the file where it defined? for example: three files test1.hpp/test1.cpp test2.hpp/test2.cpp test3.hpp/test3.cpp #ifndef test1_hpp #define test1_hpp // dosomething #endif // In test2.hpp and test.hpp both #include test1.hpp. If the scoop of test1_hpp is the w...
<c++><precompile>
2016-02-03 03:19:55
LQ_EDIT
35,168,226
textbox value cannot be change using javascript
<pre><code> document.getElementById("name").value = data; </code></pre> <p>it shows Uncaught TypeError: Cannot set property 'value' of null. why is this happen?</p> <p>the data have the value.</p>
<javascript><html>
2016-02-03 03:55:50
LQ_CLOSE
35,168,615
what is the difference between --force-rm and --rm when running docker build command
<p>When we build docker images using <code>docker build</code> command we have two options <code>--force-rm=true</code> and <code>--rm=true</code> to remove intermediate containers. what is the difference between these two options and in what scenarios should each be used.</p>
<docker>
2016-02-03 04:37:17
HQ
35,169,491
How to implement a deep bidirectional LSTM with Keras?
<p>I am trying to implement a LSTM based speech recognizer. So far I could set up bidirectional LSTM (i think it is working as a bidirectional LSTM) by following the example in Merge layer. Now I want to try it with another bidirectional LSTM layer, which make it a deep bidirectional LSTM. But I am unable to figure out...
<deep-learning><keras><lstm>
2016-02-03 05:54:02
HQ
35,169,608
In which case pip install building wheel?
<p>I found that in different folders, sometimes "pip install" will build wheel which take a lot of time, while sometimes it won't. I'm not sure why's that and how to control that. Anyone can help on this.</p> <p>The command I use: "bin/python -m pip install -r ../requirements.txt" (due to shebang line length limitatio...
<python><pip>
2016-02-03 06:03:02
HQ