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
37,806,030
Ajax call not working with Decrypto
I have to convert a encrypted data response back to plain text. For this I am using a ajax post call to get the data response and than on sucess passing that data response a decrypto function and getting back the response in plain text (this is the idea) Now, when I created a Ajax post call and than passing that ...
<javascript><jquery><html><ajax><encryption>
2016-06-14 07:49:48
LQ_EDIT
37,806,096
Why do I get a malformed JSON in request body in this cURL call?
<p>I have been trying to call the CloudFlare API v4, using an example provided in their own documentation.</p> <p>This is the code of the example</p> <pre><code>curl -X PUT "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records/372e67954025e0ba6aaa6d586b9e0b59" \ -H "X-Auth-Email: us...
<json><curl><dns><cloudflare>
2016-06-14 07:52:23
HQ
37,806,159
What is a complex type in entity framework and when to use it?
<p>I have tried to read the msdn <a href="https://msdn.microsoft.com/en-us/library/cc716799(v=vs.100).aspx" rel="noreferrer">article</a> on complex types. But it does not explain when to use it. Also there is not a comprehensive explanation on the web on complex types and when to use them. </p>
<c#><asp.net><entity-framework>
2016-06-14 07:56:24
HQ
37,806,253
Manipulate OS X windows with script
<p>Ok, so I'm trying to make my setup super simple by creating a script that I can run in the morning that will launch all the applications that I use in the day and lay them out across my 'spaces' how I like them.</p> <p>This was going ok and I was easily able to have a bash script launch the apps and then call to an...
<bash><macos><applescript><osx-elcapitan><mission-control>
2016-06-14 08:01:19
HQ
37,806,616
Reassign unique_ptr object with make_unique statements - Memory leak?
<p>I don't get what following statement would do (specially second line)?</p> <pre><code>auto buff = std::make_unique&lt;int[]&gt;(128); buff = std::make_unique&lt;int[]&gt;(512); </code></pre> <p>Will the second call to <code>make_unique</code> followed by assignment operator will de-allocate memory allocated by fir...
<c++><c++11><memory-leaks><c++14><unique-ptr>
2016-06-14 08:19:53
HQ
37,806,674
Jsf session timeout handling if user is not logged in
<p>I want to do the below if the session expires: - reset session before it ends if user is not logged so he continue normally. - redirect to login page if user is logged in.</p> <p>I managed to do the second but I need to do the first. </p> <p>I am working with jsf.</p>
<session><jsf>
2016-06-14 08:22:44
LQ_CLOSE
37,806,747
Number connect 2d array c
Number connect game,I am expecting the selected number to loop/move multiple times to connect another number.But I only manage to loop/move the number once,I am not sure why.I have attach an example below.I really need help. Here's my code: #include <stdio.h> #include <stdlib.h> ch...
<c>
2016-06-14 08:26:53
LQ_EDIT
37,806,762
How to disable CSRF Token in Laravel and why we have to disable it?
<p>I want to see how I can disable CSRF token in Laravel and where I have to disable it. Is this good to disable it or not?</p>
<laravel>
2016-06-14 08:27:41
HQ
37,808,229
How to insert column in sql server dynamically using stored procedures?
M trying this query bt its not working. CREATE PROCEDURE USP_UPDATEUSERS_0 @COLUMNNAME NVARCHAR(30),@DATATYPE NVARCHAR(30) AS ALTER TABLE HC_USER_MAIN ADD COLUMNNAME=@COLUMNNAME DATATYPE=@DATATYPE its showing error: Msg 102, Level 15, State 1, Procedure USP_UPDATEUSERS_0, Line 1 Incorrect syntax near '='.
<sql><sql-server>
2016-06-14 09:35:02
LQ_EDIT
37,808,643
Selenium install Marionette webdriver
<p>I have this issue with firefox version 47 <a href="https://github.com/seleniumhq/selenium/issues/2110" rel="noreferrer">https://github.com/seleniumhq/selenium/issues/2110</a></p> <p>So, i have tried to add Marionette web driver to fix it: <a href="https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDr...
<python><selenium><firefox><firefox-marionette>
2016-06-14 09:51:45
HQ
37,810,111
String indices or integer indices for dicionaries in Python?
<p>I have a dictionary that acts as a counter for different keys, i.e., the value of a key is the number of times a key occurred. Is it faster for me to use a string indexed dictionary or an integer indexed one? Which has a better performance?</p>
<python><string><dictionary><integer>
2016-06-14 11:00:29
LQ_CLOSE
37,810,361
Rotate only the Border using CSS
<p>I'm trying to rotate only the border using css but the font-icon is also rotating. How do I stop the rotation of the icon and make only the border?</p> <p>CSS:</p> <pre><code>.circle { width: 100px; height: 100px; background: transparent; border-radius: 50%; border: 2px dashed #000; -webkit-an...
<html><css><css-animations>
2016-06-14 11:12:18
HQ
37,810,599
"return render" vs "render ... and return" in Rails
<p>Is there any functional difference in writing <code>return render 'edit'</code> and <code>render 'edit' and return</code>? Are both syntaxes safe to use?</p> <p>The <code>return render</code> syntax is slightly more concise, but the <code>render and return</code> is advocated officially here <a href="http://guides....
<ruby-on-rails><controller>
2016-06-14 11:22:35
HQ
37,810,709
Kafka topic partitions to Spark streaming
<p>I have some use cases that I would like to be more clarified, about Kafka topic partitioning -> spark streaming resource utilization.</p> <p>I use spark standalone mode, so only settings I have are "total number of executors" and "executor memory". As far as I know and according to documentation, way to introduce p...
<apache-spark><apache-kafka><spark-streaming>
2016-06-14 11:27:58
HQ
37,811,435
SQL Query to convert single row from multiple tables into a single row in table???
I have 7 tables with same structure. And each table has 2 columns,In these one column is join key( but not a primary key) and 2nd column is Unique. Below is the requirement mentioned for 2 tables. But we need to develop for 7 tables. TAB1: ===== CITY NAME HYD RAMU HYD KRISH TAB1: ===== CITY ...
<sql><oracle>
2016-06-14 12:01:38
LQ_EDIT
37,811,794
How to properly return Optional<> of a method?
<p>I have read a lot of Java 8 Optional and I do understand the concept, but still get difficulties when trying to implement it myself in my code.</p> <p>Although I have serached the web for good examples, I didn't found one with good explanation.</p> <p>I have the next method:</p> <pre><code>public static String ge...
<java><optional>
2016-06-14 12:17:18
HQ
37,813,358
What is the meaning of Event consumes in JavaFX
<p>I was trying to understand <a href="http://docs.oracle.com/javase/8/javafx/events-tutorial/processing.htm#CEGJCICG" rel="noreferrer">Event Handling in JavaFX</a> and there I found this line.</p> <blockquote> <p>The route can be modified as event filters and event handlers along the route process the event. Also...
<java><events><javafx>
2016-06-14 13:22:48
HQ
37,813,575
How to stop user from opening a website in another tab?
<p>Like it happens in Banking sites....i want to implement the same thing in my website. Please help me how to go about it.</p>
<php><jquery>
2016-06-14 13:31:57
LQ_CLOSE
37,814,803
How to get react-native run-ios to open in iTerm instead of Terminal on a macOS?
<p>How can somebody configure <code>react-native run-ios</code> to execute in iTerm instead of Terminal on OSX? By default, it opens a new Terminal window, but Terminal doesn't work as well with my window manager as iTerm does.</p>
<macos><react-native>
2016-06-14 14:24:44
HQ
37,815,189
When I change orientation portrait to landscap, a function is restarted in android. How can I resove it?
[![When I change orientation portrait to landscape(or landscaper to portrait), a function is restarted. I want the function is saved in android. I'm making a calculator. I don't want operator buttons to be enable before number buttons is clicked. So I made a function that make operator buttons click after number but...
<java><android>
2016-06-14 14:41:48
LQ_EDIT
37,815,371
Pyinstaller "Failed to execute script pyi_rth_pkgres" and missing packages
<p>This is my first time posting a question here as most of my questions have already been answered by someone else! I am working on a GUI application in python and am attempting to use pyinstaller to package it into a single folder and .exe for easier portability. Currently, I am using windows 10 and anaconda3 to ma...
<python><opencv><ffmpeg><pyinstaller>
2016-06-14 14:49:51
HQ
37,816,035
Using environment variables / parameterizing config.xml
<p>I am building an ionic/cordova project using the cordova-plugin-facebook4 plugin for Facebook authentication access. In <code>config.xml</code> this looks like:</p> <pre><code>&lt;plugin name="cordova-plugin-facebook4" spec="~1.7.1"&gt; &lt;variable name="APP_ID" value="1234567890123456"/&gt; &lt;variable name=...
<javascript><android><facebook><cordova><ionic-framework>
2016-06-14 15:18:16
HQ
37,816,192
Capture UIKeyCommand for Function Keys on iOS
<p>I am trying to capture the F5 key on an external bluetooth keyboard in an iOS application. I have set up the UIKeyCommands, yet I cannot figure out how to create a UIKeyCommand that would capture the function keys. There is no option for UIKeyModifierFunction.</p>
<ios><keyboard>
2016-06-14 15:25:24
HQ
37,816,600
Treating a PHP error while waiting for JSON response with jQuery AJAX
<p>I have to send a form through jQuery AJAX, retrieve the JSON response and check if for example data.name and data.email are "success" to get the user to know his form was submitted.</p> <p>But when there is a PHP error for example and there is no JSON response. what's the best way to get that, as the callback messa...
<php><jquery><json><ajax>
2016-06-14 15:44:45
LQ_CLOSE
37,817,097
JSON DeserializeObject is very slow
<p>I created small recursive C# app to parse unknown JSON string to find particular Key/Value pair's using <code>Newtonsoft.Json.dll</code>. It works OK on small JSON strings, but takes really long time, if JSON is bigger: 3.5MB JSON file with 15K+ lines takes >3 min to parse. Parsing same file using RegExp takes &lt;1...
<c#><json><json.net>
2016-06-14 16:07:06
LQ_CLOSE
37,817,537
This view is not constrained
<p>I get the following error and I am using Android studio 2.2 Preview 3. I searched Google but couldn't find any resources.</p> <pre><code>Error: This view is not constrained, it only has design time positions, so it will jump to (0,0) unless you add constraints </code></pre> <p><a href="https://i.stack.imgur.com/nC...
<java><android><layout>
2016-06-14 16:31:07
HQ
37,817,599
Spring Boot 1.4 testing with Security enabled?
<p>I'm wondering how I should go about authenticating a user for my tests? As it stands now all tests I will write will fail because the endpoints require authorization.</p> <p>Test code:</p> <pre><code>@RunWith(SpringRunner.class) @WebMvcTest(value = PostController.class) public class PostControllerTest { @Auto...
<spring><spring-mvc><spring-security><spring-boot><spring-test-mvc>
2016-06-14 16:34:20
HQ
37,818,401
Importing html files with es6 template string loader
<p>I want to import my templates into my js with <a href="https://www.npmjs.com/package/es6-template-string-loader" rel="noreferrer">es6 template string loader</a>. The only difference in my case is that I don't want to include css, only html. My code is as follows:</p> <pre><code>import app from '../../bootstrap.js';...
<javascript><webpack>
2016-06-14 17:20:11
HQ
37,818,501
std::map key value pairs not iterating in sequence
<p>I am inserting key value pairs in a <code>std::map</code> as</p> <pre><code>key = //something; value = //something; demoMap[key] = value; </code></pre> <p>Printing the key and value here gives me correct results. However, when I iterate this map as:</p> <pre><code>for( std::map&lt;std::string, std::string&gt;::it...
<c++><iteration><stdmap>
2016-06-14 17:27:00
LQ_CLOSE
37,818,559
Why Strong Params contains permitted: false
<p>I put in a <code>binding.pry</code> at the top of my controller's <code>update</code> action. Once at that break point, I put in <code>params[:foo_bar]</code> to examine the <code>params</code> hash. Here is what I get:</p> <pre><code>&lt;ActionController::Parameters {"utf8"=&gt;"✓", "_method"=&gt;"patch", "authe...
<ruby-on-rails><ruby><strong-parameters>
2016-06-14 17:30:47
HQ
37,818,636
Listing objects by date in python 3
So, i have a list of objects, it looks like this: ID Date 1 15/11/2009 2 11/06/2010 3 11/09/2015 4 12/08/2013 5 09/08/2011 6 11/10/2012 7 11/10/2014 Now, I want to sort that list of objects by its ...
<list><sorting><date><python-3.x><datetime>
2016-06-14 17:34:51
LQ_EDIT
37,818,664
How to use browser Incognito Mode in visual studio when Run a web project
<p><a href="https://i.stack.imgur.com/UuESD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/UuESD.png" alt="enter image description here"></a></p> <p>If i Run the project, it will launch using <strong>Google Chrome normal mode</strong>. But how can i launch it using <strong>Google Chrome Incognito Mode ?</s...
<browser><visual-studio-2015><incognito-mode>
2016-06-14 17:36:06
HQ
37,818,744
Removing duplicates while preserving values
<p>I have a tabular table example here:</p> <pre><code>Jerry 2 John 3 Mark 4 John 1 Kevin 10 </code></pre> <p>I want to remove duplicate entries, John in this case, but want to preserve the value and add them up. Not sure if that made sense, but it should look like:</p> <pre><code>Jerry 2 John 4 Mark 4 Kevin 10 </co...
<r>
2016-06-14 17:40:40
LQ_CLOSE
37,818,831
Is there a best practice on setting up glibc on docker alpine linux base image?
<p>Is there a best practice on setting up glibc on docker alpine linux base image with correct paths so any spawned process can correctly reference the location of the installed libc libraries?</p>
<docker><glibc><alpine>
2016-06-14 17:46:30
HQ
37,818,883
Use Cases of NIFI
<p>I have a question about Nifi and its capabilities as well as the appropriate use case for it. </p> <p>I've read that Nifi is really aiming to create a space which allows for flow-based processing. After playing around with Nifi a bit, what I've also come to realize is it's capability to model/shape the data in a wa...
<apache-nifi>
2016-06-14 17:49:28
HQ
37,818,902
Diff between commits in Visual Studio 2015 using git
<p>Using Visual Studio 2015 Update 2 and git as source control, how do you diff between 2 commits on a branch? Note that I am not talking about diff on the granular <strong>file level</strong> (ie. view history of file and comparing), but rather for entire commits. </p> <p>I would expect to be able to compare when loo...
<git><visual-studio><visual-studio-2015><compare><git-diff>
2016-06-14 17:50:40
HQ
37,818,938
PyCharm change working directory of console
<p>How do I change the default working directory when I open a new Python Console? I have multiple projects open in my PyCharm view and the Python Console seems to be defaulting to an arbitrary one. Of course I can work around by modifying sys.path but I want a definite solution :) </p>
<python><ide><pycharm>
2016-06-14 17:52:51
HQ
37,819,022
Edit maven's settings.xml from Intellij
<p>In Netbeans, maven's <code>settings.xml</code> file is part of every project and can easily be edited from each project:</p> <p><a href="https://i.stack.imgur.com/foPEV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/foPEV.png" alt="enter image description here"></a></p> <p>Is there something similar in ...
<java><maven><intellij-idea><settings>
2016-06-14 17:58:02
HQ
37,819,091
Informing Haskell that `(Reverse (Reverse xs)) ~ xs`
<p>If <code>Reverse :: [k] -&gt; [k]</code> is a type family then Haskell cannot tell that <code>(Reverse (Reverse xs)) ~ xs</code>. Is there a way to let the type system know this without any runtime cost?</p> <p>I'm tempted to just use <code>unsafeCoerce</code>, but that seems a shame.</p>
<haskell><type-families>
2016-06-14 18:01:36
HQ
37,819,172
ESLint --fix not editing files
<p>I am trying to lint and fix my code using ESLint. When I run ESLint with my config file and without the fix flag, it runs fine, and this is what it outputs. </p> <p>eslint-c .eslintrc.json ./src/aura/SearchAvailableNumbers</p> <pre><code>/home/jason/sfa/testproj/src/aura/SearchAvailableNumbers/SearchAvailableNum...
<javascript><lint><eslint>
2016-06-14 18:06:33
HQ
37,819,278
Android Espresso - Click checkbox if not checked
<p>I have <code>onView(withId(R.id.check_box)).perform(click())</code>, but i only want to do this if the check box is not already checked. How can I do this in espresso?</p>
<android><testing><checkbox><android-espresso>
2016-06-14 18:12:09
HQ
37,820,106
sql command not properly ended for select statement - oracle
I have a pl/sql function and in that i have the following piece of code: execute immediate 'select ' || schemaname || '.' || value1 || '_seq.nextval from dual into cnpParmId'; for this line, am getting an error : SQL Error: ORA-00933: SQL command not properly ended In the above code am getting the value1 ...
<oracle><function><stored-procedures><plsql><plsqldeveloper>
2016-06-14 19:01:24
LQ_EDIT
37,820,688
Best practice for storing ASP.NET Core Authorization claims when authenticating users against Active Directory?
<p>I am creating an enterprise intranet ASP.NET Core MVC application. I want my users to authenticate using Active Directory and I want user authorizations (claims) stored in <em>ApplicationDbContext</em>.</p> <p>I assume that I need to use <em>Microsoft.AspNetCore.Identity</em> and <em>Microsoft.AspNetCore.Identity....
<asp.net-core><asp.net-identity><asp.net-core-mvc>
2016-06-14 19:37:30
HQ
37,820,998
Rstudio and Google Drive Syncing Problems: "The process cannot access the file because it is being used by another process"
<p>So I'm using RStudio and storing my files on Google Drive (the version with folders on your system, acting like Dropbox). I'm using it because it provides a lot more space for free than Dropbox, and I need that space for the projects I'm working on.</p> <p>When I attempt to write any document at all -- an R script,...
<google-drive-api><rstudio>
2016-06-14 19:57:48
HQ
37,821,280
Update for Pascal
<p>I have been asked to update a program in Pascal. I program is used to transfer data from one program to another, What I need to know is what either state of the port mean?<br> <strong>tTransferState = (sAbort, sWaiting, sFirstLine, sModelFeature, sOtherLines, sSending, sClosePort, sOpenPort, sPaused, sFinished);</...
<delphi><pascal>
2016-06-14 20:14:39
LQ_CLOSE
37,821,303
Python evaluating/compiling a string
<p>I want to evaluate a string to accomplish the following. The string will be coming from an xml config file. This is how I would configure a serial option without a config file:</p> <pre><code>import serial ser = serial.Serial(/dev/ttyUSB0) ser.parity = serial.PARITY_MARK ...configure other options </code></pre> ...
<python>
2016-06-14 20:15:41
LQ_CLOSE
37,821,377
"The breakpoint will not currently be hit. A copy of file was found in dll file, but the current source code is different"
<p>I keep getting this error saying there's a copy of the .cs file hence the break point will not get hit. </p> <p>I have tried cleaning solution, rebuilding , deleting the .pdb files in the obj and bin folders, closing VS and restarting it, restarting the whole machine (It's Windows! Sometimes the most complicated, u...
<c#><.net><visual-studio-2015><breakpoints>
2016-06-14 20:19:32
HQ
37,821,455
EntityFramework Multiple Where
<p>I am wondering, if I use multiple <code>Where(...)</code> methods one after the other, is EntityFramework smart enough to combine it in a resulting query. Let's say I have:</p> <pre><code>context.Items .Where(item =&gt; item.Number &gt; 0) .Where(item =&gt; item.Number &lt; 5) .ToList(); </code></pre> ...
<c#><.net><entity-framework><linq>
2016-06-14 20:24:50
HQ
37,821,706
C++ setprecision
<p>newbie learning C++ and not understanding the problem I have trying to use setprecision(2) says setprecision(2) is undefined. If anyone could help I'd be most grateful.</p> <pre><code> #include &lt;iostream&gt; #include &lt;string&gt; using namespace std; int main() { double price,shipping; cout&lt;&lt;"En...
<c++>
2016-06-14 20:41:19
LQ_CLOSE
37,822,288
How to update S3 bucket with expire date using AWS CLI
<p>I would like to update the S3 bucket with the new content(create a folder within a bucket). What is the <code>--expires</code> date format. I didn't find any examples using <code>AWS CLI</code> on google. Can someone please help me on this thing? </p> <p>Something like this:</p> <pre><code>aws s3 sync $backup_h...
<amazon-s3><aws-cli>
2016-06-14 21:18:16
HQ
37,822,607
Floating Point Exception for seemingly no reason
<p>My code is throwing me a floating point exception here, but I can't figure out why.</p> <pre><code>int i = this -&gt; numerator; while(i &gt; 1){ if ((this -&gt; numerator % i == 0) &amp;&amp; (this -&gt; denominator % i == 0)) { this -&gt; numerator = this -&gt; numerator / i; this -&gt; denomi...
<c++>
2016-06-14 21:42:08
LQ_CLOSE
37,822,711
How can I make a better use of this method? - RUBY (raw)
def proficiency_parser(stored_data, name, race, year, title, percentage) if stored_data.has_key?(name) if stored_data[name].has_key?(race) if stored_data[name][race].has_key?(year) stored_data[name][race][year][title] = percentage else stored_data[name][race][year] ...
<ruby><methods>
2016-06-14 21:51:56
LQ_EDIT
37,822,872
Compare substring of elements in one list to strings in another list (convert my for loop to list comprehension)
I'd like to compare a substring of each element in a list of strings to the elements in another list of strings...BUT I want it in a list comprehension (for loops aren't as concise for my tastes) The code below works....can someone convert to list comprehension for me? mylist = [] for x in list1: ...
<python><list><list-comprehension>
2016-06-14 22:03:58
LQ_EDIT
37,823,076
How can I analzye only specific sentences in R?
<p>I have a data set of 4,500 long texts that I analyze using R packages. I want to analyze only sentences that contain specific words, how can I do it? and can I use R to create a second set of all the sentences (which will be independent of the original set?) thanks</p>
<r><text-mining><text-analysis>
2016-06-14 22:20:42
LQ_CLOSE
37,823,091
how can I change path to img src from java script?
<p>I have an image in my div:</p> <pre><code>&lt;div class="pressphone"&gt; &lt;img class="phone" src="../img/template/iphone3.png"&gt; &lt;/div&gt; </code></pre> <p>how can I switch the photo to <code>../img/template/iphone4.png</code> from javascript/jquery?</p>
<javascript><jquery>
2016-06-14 22:21:20
LQ_CLOSE
37,823,322
How to enable Visual Memory Debugger in Xcode 8?
<p>I migrated a project from the previous version of Xcode to Xcode 8. What I want is to use the new visual memory debugger. It's available in new projects, but is entirely missing in my imported one. Why is this?</p>
<xcode><swift><cocoa><xcode8>
2016-06-14 22:44:38
HQ
37,823,524
what is the difference between compile, testCompile and provided in gradle dependency
<p>I am using android studio and in project structure -> dependencies tab following options i can see:</p> <ol> <li>Compile</li> <li>Provided</li> <li>APK</li> <li>Test Compile</li> <li>Debug Compile</li> <li>Release Compile</li> </ol> <p>my question: what is the difference between compile, testCompile and provided i...
<android><gradle>
2016-06-14 23:04:48
HQ
37,824,170
How do I make this calculator work? (Ruby)
#I just wanted to work on one method then replicate it to the rest. which is why one method is really only done. (kinda) puts "Welcome to My Calculator! " print "Please place in the numbers. " first_number = gets.to_i print "Second number. " second_number = gets.to_i puts "What operation? ...
<ruby>
2016-06-15 00:15:39
LQ_EDIT
37,825,107
.NET Core use Configuration to bind to Options with Array
<p>Using the .NET Core <code>Microsoft.Extensions.Configuration</code> <strong>is it possible to bind to a Configuration to an object that contains an array?</strong></p> <p><code>ConfigurationBinder</code> has a method <a href="https://github.com/aspnet/Configuration/blob/dev/src/Microsoft.Extensions.Configuration.Bi...
<c#><configuration><asp.net-core><.net-core>
2016-06-15 02:26:47
HQ
37,825,637
Deleted anaconda to remove python3 in the hopes of going back to python2.
I installed python3 with anaconda when I did some of my ML stuff. Now I wanted to use python2 for a script I'm building but python defaults to python3 and I couldn't find any solution to switch or remove python3 so I deleted anaconda folder hoping python to revert back to python 2 since it won't be able to locate the p...
<python><macos><python-2.7><python-3.x>
2016-06-15 03:33:42
LQ_EDIT
37,825,638
How to find the element using selenium webdriver
I have attached the DOM.. How to identify the highlighted text message using selenium web driver. PS I m new to selenium, Thanks[enter image description here][1] [1]: http://i.stack.imgur.com/tmXgr.jpg
<selenium><webdriver>
2016-06-15 03:33:46
LQ_EDIT
37,825,951
Am I 'allowed' to modify props in the constructor?
<p>They say you shouldn't modify the <code>props</code> in a React Component. Does that extend to modifying them in the constructor?</p> <p>Specifically,</p> <pre><code>export default class BookingForm extends React.Component { constructor(props) { // am I allowed to modify `props` here? super(pr...
<javascript><reactjs>
2016-06-15 04:07:24
HQ
37,826,174
How to click link in IE with no href,onclick?
here's the web site: [enter link description here][1] step 1: <li class="at2" data="0">业绩预告<i></i></li> <li data="1" class="">业绩预增<i></i></li> <li data="2" class="">业绩预减<i></i></li> <li data="3" id="fpygTab" class="">分配预告<i></i></li> step 2: <span class="clickspan">业绩变动幅度</span> i want...
<javascript><excel><vba>
2016-06-15 04:28:58
LQ_EDIT
37,827,055
Could not add entry '0' to cache localClassSetAnalysis.bin
<p>This project was running but today when i run it it gives this error</p> <blockquote> <p>Error:Execution failed for task ':app:compileDebugJavaWithJavac'. Could not add entry '0' to cache localClassSetAnalysis.bin (/home/blackgoogle/Desktop/SpeechToText/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localCl...
<android><android-studio>
2016-06-15 05:46:37
HQ
37,827,308
convert datatable into an array in C#
I want to convert DataTable in an 2-D array form in C#. Below is the example for clear understanding. DataTable in C#: code Price ---------- ---------- 1146441600000 34 1146528000000 5 1146614400000 10 1146700800000 7 1146787200000 12 1147046400000 8 ...
<javascript><c#><arrays>
2016-06-15 06:06:04
LQ_EDIT
37,827,641
i have a one matrix 5*5 ,i want to print that matrix into 2*2 as many as possible matrices comes?
i have a 3*3 matrix, I want to print that matrix into 2*2 matrices For Example. 2 5 3 5 8 9 1 4 5 Comes to 2*2 matrices 2 5 5 8 5 8 1 4 5 3 8 9 8 9 4 5 This is the process,,
<arrays>
2016-06-15 06:28:23
LQ_EDIT
37,827,685
PyCharm: Configuring multi-hop remote Interpreters via SSH
<p>To connect to the computer at my office I need to run ssh twice. First to connect to the host-1 and then from host-1 to host-2 and each one has different credentials. However the configuration menu in Pycharm only accepts one ssh tunnel.</p> <p><a href="http://i.stack.imgur.com/KE7Sz.jpg" rel="noreferrer">Configure...
<python><ssh><pycharm><ssh-tunnel>
2016-06-15 06:31:01
HQ
37,828,621
Find UI elements in unity c#
I'm facing an issue regarding UI elements in unity. I am making a leader board as in Piano tiles for all Facebook friends score. I tried instantiating UI elements at run time but cant implement I want to assign random values to UI Text and UI images in for loop I made and array of panels and and activate and dea...
<c#><unity3d>
2016-06-15 07:20:20
LQ_EDIT
37,828,790
Why do I have to return Unit.INSTANCE when implementing in Java a Kotlin function that returns a Unit?
<p>If I have a Kotlin function</p> <pre><code>fun f(cb: (Int) -&gt; Unit) </code></pre> <p>and I want to call <code>f</code> from Java, I have to do it like:</p> <pre><code>f(i -&gt; { dosomething(); return Unit.INSTANCE; }); </code></pre> <p>which looks very ugly. Why can't I just write it like <code>f(i...
<java><kotlin><kotlin-interop>
2016-06-15 07:28:32
HQ
37,829,160
@SafeVarargs on interface method
<p>In this code,</p> <pre><code>package com.example; interface CollectorIF&lt;T&gt; { // @SafeVarargs // Error: @SafeVarargs annotation cannot be applied to non-final instance method addAll void addAll(T... values); } class Collector&lt;T&gt; implements CollectorIF&lt;T&gt; { @SafeVarargs ...
<java><generics><variadic-functions>
2016-06-15 07:46:29
HQ
37,829,710
how to assign class of html element to a javascript variable
I am passing a javascript variable "name" to the following function. function addCategory(name){ $("#myTable").append('<tr class=name><td>'+name+'</td><td><a onclick="" type="button" class="btn btn-xs" ><i class="glyphicon glyphicon-erase"></i></a></td></tr>'); $('#postcat')[0].rese...
<javascript>
2016-06-15 08:14:12
LQ_EDIT
37,829,961
what could be the regular expression for the text "192.168.71.1 GET HTTP/1.0 /test/abc"?
what could be the relevant regular expression for the text "192.168.71.1 GET HTTP/1.0 /test/abc" i have tried for regular expressions separately but could not combine all these with a space in betweeen
<java><regex>
2016-06-15 08:26:15
LQ_EDIT
37,830,008
Handling multiple event dependency in event-driven architecture
<p>What would be best practice if you have an event-driven architecture and a service subscribing to events has to wait for multiple event (of the same kind) before proceeding with creating the next event in the chain?</p> <p>An example would be a book order handling service that has to wait for each book in the order...
<publish-subscribe><microservices><event-driven>
2016-06-15 08:28:14
HQ
37,830,098
Topics on Firebase Cloud Messaging?
<p>Is there any constraints about number of different topics for Firebase Cloud Messaging in one app?</p>
<android><firebase-cloud-messaging><firebase-notifications>
2016-06-15 08:32:35
HQ
37,830,274
Firebase gets stuck on no INTERNET connection
<p>In my app, I am using Firebase for database. Now when I am listening for any change in child nodes of a particular location, and if there is no internet connection, no callback gets fired. The firebase call just gets stuck.</p> <p>I am using this,</p> <pre><code>FirebaseDatabase firebaseDatabase = FirebaseDatabase...
<android><firebase><firebase-realtime-database>
2016-06-15 08:39:58
HQ
37,830,400
why use diffrent date format makes diffrent result in same date?
i try to use current date in date formats but when i use diffrent date formats this makes diffrent results..at first i used this code: private String getTodayDateString() { Calendar cal = Calendar.getInstance(); int month=cal.get(Calendar.MONTH); return Integer.toString(month); } ...
<java>
2016-06-15 08:45:09
LQ_EDIT
37,830,491
What Port Does AWS S3 Use?
<p>I have a question because of error which I Faced due to configs some other person made in aws :</p> <p>Short Question is what port Does <strong>AWS S3</strong> use to communicate to ec2-instance ? </p>
<amazon-web-services><amazon-s3><aws-security-group>
2016-06-15 08:49:50
HQ
37,830,558
Swift - How to set initial value for NSUserDefaults
<p>I have a switch called soundSwitch, I am saving the state of the button using an user default as such:</p> <pre><code>@IBAction func soundsChanged(sender: AnyObject) { if soundSwitch.on{ defaults.setBool(true, forKey: "SoundActive") print("Sound ON") }else{ defaul...
<ios><swift><nsuserdefaults><uiswitch>
2016-06-15 08:52:20
HQ
37,830,758
Code Signing Error Whenever I try replacing stock files in new SceneKit application
<p>So Xcode 8 was recently released and I'm still unsure as to what exactly might be causing this problem (it might be just the fact that it's a beta version of Xcode or perhaps that I'm somehow doing something incorrectly).</p> <p>The problem at hand is that I'm trying to create a new SceneKit application and I'm cur...
<ios><xcode><swift><scenekit><xcode8>
2016-06-15 09:01:05
HQ
37,830,839
Show strings seperated by commas
I am trying to show contact numbers separated by commas But i am not able to do it. Right now I am ble to show them line by line.How to show them like 9999999999,8888888888....etc Below is my code snippet String displayName = contact.getPhone(0); result.append(displayName + "\n");
<java><android>
2016-06-15 09:03:53
LQ_EDIT
37,831,348
How to disable npm's progress bar
<p>As pointed out <a href="https://github.com/npm/npm/issues/11283" rel="noreferrer">here</a> the progress bar of npm slows down the whole installation progress significantly. The solution given is to disable it</p> <pre><code>$&gt; npm set progress=false &amp;&amp; npm install </code></pre> <p>The question I have, i...
<node.js><performance><npm>
2016-06-15 09:24:59
HQ
37,831,652
JNI How to allocate memory for object array dynamically
I am working on JNI with C language. Here i have created a object array of size 4000. According to my requirements the array size has to grown dynamically. How can i allocate memory dynamically. I have tried using malloc. But i cant achieve this. OriginalArray = (*env)->NewObjectArray(env, 4000, tradeObject, NULL);
<c><java-native-interface><dynamic-memory-allocation>
2016-06-15 09:38:24
LQ_EDIT
37,832,026
webpack, sass, react-css-modules - ReferenceError window is not defined
<p>I'm using webpack and React with react-css-modules and scss files. When i try and build it gives me an error on every file that imports scss files - </p> <pre><code>ERROR in ./app/components/Buttons/Button.scss Module build failed: ReferenceError: window is not defined </code></pre> <p>I have googled for a solid d...
<sass><webpack><webpack-dev-server><css-modules><react-css-modules>
2016-06-15 09:54:51
HQ
37,832,307
JSON file doesn't work
<p>with my code, this line is underline in red by IDE...why?</p> <p>THANKS everybody in advance!</p> <pre><code>String path = Environment.getExternalStorageDirectory() .getAbsolutePath() + "/droidText/"; </code></pre> <p>THIS IS MY CODE:</p> <pre><code>public String showResult(View v) throws IOExcep...
<java><android><json>
2016-06-15 10:06:33
LQ_CLOSE
37,832,575
How to view logs for a docker image?
<p>In the docker world, one can easily see logs for docker container (that is, a running image). But during image creation, one usually issues multiple commands. For example npm install commands in node projects. It would be beneficial to see logs for those commands as well. I quickly searched from the documentation, b...
<docker><dockerfile><docker-image>
2016-06-15 10:18:54
HQ
37,832,622
Android: app crashing after launch activity
<p>I have this app but for some reason I can't get it to work past the launch screen. After a user clicks an item on the listview it generates a random int in the activity and based on that changes the textView. If the user's input matches the right .contains strings it'll print out a toast. Here is the launch activity...
<java><android><listview><random><textview>
2016-06-15 10:20:44
LQ_CLOSE
37,833,115
JavaScript returning code
I've made a list of ships that it represented like so: var fleet = [ "RMS MARY", 2000, 15], ["TITANIC 2", 10000, 13], ["Boaty McBoatface", 2000, 18], ["Jutlandia", 1945, 10], ["Hjejlen", 250, 8], ]; What i need to do now is make a function that will filter the ships by a given ca...
<javascript>
2016-06-15 10:40:40
LQ_EDIT
37,833,390
Why can't i see true or false in console
<p>I've wroten a bIt code and I got help a bit. I thing code is working correctly but I can't see true or false In the console why? it should give one of them(true or false). Maybe i'm calling method a wrong way. Could you please explain where am i doing wrong.</p> <pre><code>public static void main(String[] args) { ...
<java><methods><boolean>
2016-06-15 10:52:21
LQ_CLOSE
37,833,395
Kotlin Annotation IntDef
<p>I have this code sample:</p> <pre><code>class MeasureTextView: TextView { constructor(context: Context?) : super(context) constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleA...
<annotations><kotlin>
2016-06-15 10:52:32
HQ
37,833,625
Python : What is the purpose of a double comma in a if statement
I have this piece of python code below. def m(list): v = list[0] for e in list: if v < e: v = e return v values = [[3, 4, 5, 1], [33, 6, 1, 2]] for row in values: print(m(row), end = " ") The result is 5, 33. Can somebody explain me th...
<python><if-statement>
2016-06-15 11:04:57
LQ_EDIT
37,833,738
Difference between TextInputLayout and TextInputEditText
<p>Need to know what actually difference between TextInputEditText and TextInputLayout, When should we use one of them.</p>
<android><android-studio><android-widget><android-design-library>
2016-06-15 11:09:42
HQ
37,835,152
PHP Variable variables and array key veriables
I try to create code with out IF: if($lvl==0) { $OutPutArray[0]['follow'][]=$infoArr; } elseif($lvl==1) { $OutPutArray[0]['follow'][0]['follow'][]=$infoArr; } elseif($lv...
<php><arrays>
2016-06-15 12:13:55
LQ_EDIT
37,835,214
Django - How do I get a str from this charField?
I have been trying to follow documentation but I keep getting the error: 'issues has no attribute content" My goal is that i need a temp variable to hold data until I commit it to my actual database. So when reading the code, content is basically tmp, and logComments is when I actually want to commit it to the da...
<django>
2016-06-15 12:16:16
LQ_EDIT
37,835,286
Generate All Possible Combinations - Java
<p>I have a list of items {a,b,c,d} and I need to generate all possible combinations when, </p> <ul> <li>you can select any number of items</li> <li>the order is not important (ab = ba)</li> <li>empty set is not considered</li> </ul> <p>If we take the possibilities, it should be, </p> <pre><code>n=4, number of items...
<java><combinations>
2016-06-15 12:19:10
HQ
37,835,929
Connect To SQL Server With Windows Authentication From A Linux Machine Through JDBC
<p>I want to be able to connect to a SQL Server using jdbc and windows authentication. I saw some answers on the internet saying i should add the following property to the connection string:</p> <pre><code>integratedSecurity=true; </code></pre> <p>And also add</p> <pre><code>sqljdbc_auth.dll </code></pre> <p>To the...
<java><sql-server><jdbc><windows-authentication>
2016-06-15 12:47:30
HQ
37,836,081
Javascript Document Write (help me please..)
i have a homewrk. write javascript ( Documentwrite) cn help me ? please.. <html> <head> <script type="text/javascript"> function myFunction() { var x1 = document.test.x1.value; var y1 = document.test.y1.value; var x = parseInt(x1)*parseInt(y1) docum...
<javascript><document.write>
2016-06-15 12:53:58
LQ_EDIT
37,836,099
Automatic documentation/contract generation for Pub/Sub RabbitMQ
<p>In the REST world, we have something like a Swagger Specification, which fully describes the contract over a REST interface boundary (between client and server). Those Swagger specifications can be used to auto-generate REST clients, but also to automatically generate documentation for your REST API consumers. These...
<rest><rabbitmq><amqp><code-contracts><swagger-2.0>
2016-06-15 12:55:14
HQ
37,836,379
java.lang.IllegalArgumentException: Invalid character (CR or LF) found in method name
<p>I have a Spring MVC application running on Tomcat8. Once in a day or two I get an exception in my log file</p> <pre><code>15-Jun-2016 10:43:39.832 INFO [http-nio-8080-exec-50] org.apache.coyote.http11.AbstractHttp11Processor.process Error parsing HTTP request header Note: further occurrences of HTTP header parsing...
<java><spring-mvc><ubuntu><tomcat8>
2016-06-15 13:07:35
HQ
37,836,742
Trouble with Slot Setting for Azure App Services
<p>I need to understand Slot Application Settings better for Azure App Services. When they apply and how to use them correctly.</p> <p>I have 2 App Services set up each running 2 slots as below.</p> <ol> <li>Site 1 with slot - building-staging</li> <li><p>Site 1 with slot - staging</p></li> <li><p>Site 2 with slot - ...
<azure><azure-web-sites><azure-deployment-slots>
2016-06-15 13:22:16
HQ
37,836,764
Run command in Docker Container only on the first start
<p>I have a Docker Image which uses a Script (<code>/bin/bash /init.sh</code>) as Entrypoint. I would like to execute this script only on the first start of a container. It should be omitted when the containers is restarted or started again after a crash of the docker daemon.</p> <p>Is there any way to do this with do...
<docker>
2016-06-15 13:23:20
HQ