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 |
|---|---|---|---|---|---|
60,251,802 | How to find all possible combinations from a list with only two elements and no duplicates with Python? | <p>I have the following:</p>
<pre><code>list = ["player1", "player2", "player3"]
</code></pre>
<p>I want to find all possible combinations of two elements of that list, but with no duplicates. I have tried to work with the itertools.combinations() but without the desired result.</p>
<p>I'm looking for a result like ... | <python><itertools> | 2020-02-16 18:31:34 | LQ_CLOSE |
60,252,713 | write one specific formula in python | <p>I have a question, everyone knows how can I write this formula with python? </p>
<p><a href="https://i.stack.imgur.com/eg7G5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eg7G5.png" alt="enter image description here"></a></p>
| <python><math> | 2020-02-16 20:05:36 | LQ_CLOSE |
60,252,859 | JavaScript Event Listeners inside methods | <p>I was hoping to be able to call object methods from an event listener, however, I am unable to access object properties on the called function:</p>
<pre><code>import {action} from '../desktopIntegration/actions.js'
class Object {
constructor() {
this.property = 2
}
addListener() {
action.on("keyup"... | <javascript> | 2020-02-16 20:22:44 | LQ_CLOSE |
60,253,101 | JAVA: How do I determine if the input is a palindrome? | <p>Please use the method below. </p>
<p>I am trying to get rid of all white spaces, punctuations and make everything lowercase. Then I want to see whether the string is a palindrome (same when read from the front and back.</p>
<p>I can't figure it out.</p>
<pre><code>public static void main(String[] args) {
... | <java> | 2020-02-16 20:54:01 | LQ_CLOSE |
60,253,151 | PHP Float subtraction returning wrong results | <p>When i try to do <strong>(50.00 - 49.99)</strong> it returns to me <strong>0.009999999999998</strong>, why? How do i solve this?</p>
| <php><math><subtraction><operation> | 2020-02-16 20:59:52 | LQ_CLOSE |
60,253,775 | Date formatting error assistance in bash shell script issue | <p>I'm having issue identifying what exactly my issue is with this bash shell script. I copied exactly what my teacher has but cannot get it to run properly. Thank you in advance.</p>
<p>Script:
[Script code for the program<a href="https://i.stack.imgur.com/VYqAX.png" rel="nofollow noreferrer">1</a></p>
<p>Outcome:
... | <linux><bash><shell><unix> | 2020-02-16 22:26:45 | LQ_CLOSE |
60,254,970 | Can someone help me figure out why my mini-max tic-tac-toe AI does not work? | This is me trying to make a minimax tic-tac-toe game. The AI for some reason still goes in order in which the spot turns up on the list for the board. It looks like it is calculating the scores, but I do not think it is utilizing them for some reason. It is supposed to pick the spot with the highest score. It outputs m... | <python><artificial-intelligence><minimax> | 2020-02-17 01:51:55 | LQ_EDIT |
60,255,456 | Bash redirect and process questions | [image][1]
[1]: https://i.stack.imgur.com/zXkz0.png
hi,why use ">" no data, use ">>" have data,thanks very much
GNU bash, version 4.4.12 | <bash><redirect> | 2020-02-17 03:11:06 | LQ_EDIT |
60,255,464 | In most of cases machine learning algorithm gets over-fit. Anyone can explain me in clear way | <p>when it gets over-fit most articles say, algorithm tries to memories, the data points which are give as train input.In a clear way could anyone explain how algorithm memorizes?</p>
| <algorithm><machine-learning><deep-learning><artificial-intelligence><data-science> | 2020-02-17 03:13:34 | LQ_CLOSE |
60,256,296 | Failure to get nonnegative integer single number | number = int(input('Enter a nonnegative integer: '))
product=1
for i in range(number):
product = product * (i+1)
print(product)
The result is the nonnegative integer is
1
2
6
24...
5040
But I only need the nonnegative integer of 7 which is 5040, how do I get that? | <python><integer> | 2020-02-17 05:15:24 | LQ_EDIT |
60,256,467 | how to use val insted of var in scala | I simply want to remove var and use Val instead in below code
def getConfigId: Long = {
val object1: java.util.List[objectA] = objectRepo.findByUser(User(session.id))
var object2: objectA = null
if (object1.size() == 1) {
object2 = object1.get(0)
} else if (object1.size() > 1) {
... | <java><scala><if-statement><collections><functional-programming> | 2020-02-17 05:38:36 | LQ_EDIT |
60,259,610 | Flutter - how to filter debug console in vscode | <p>For a few days, and without changing anything, at least deliberately, in <code>DEBUG CONSOLE</code> in <code>VSCODE</code> I get messages like:</p>
<pre><code>W/.arae_blueprin(14366): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
W/.arae_blueprin(14366): Acc... | <flutter><visual-studio-code> | 2020-02-17 09:41:23 | HQ |
60,259,853 | Moving Background Image with custom segue swift | [I want to get moving background animation like this.][1]
1.Can anyone help me with this problem. 2.Is it possible to make this kind of animation in horizontally
[1]: https://www.google.com/url?sa=i&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F27848409%2Fcustom-segue-with-separate-moving-background&psig=AO... | <swift><xcode><animation><uiviewcontroller><segue> | 2020-02-17 09:56:48 | LQ_EDIT |
60,260,485 | How does a vector as a key works internally in C++? | <p>This SO answers says that <a href="https://stackoverflow.com/questions/8903737/stl-map-with-a-vector-for-the-key">STL Map with a Vector for the Key</a> the vector can be used as a key. So when we use a vector as a key. How does that actually work since the key needs to be unique so when we insert another vector with... | <c++><arrays><dictionary><vector><stl> | 2020-02-17 10:30:09 | HQ |
60,260,970 | Angular material design | We are using angular material mat radio button and it is selected. This radio button gets unchecked on opening angular modal pop up with another set of angular material radio button. | <angular><angular-material> | 2020-02-17 10:56:54 | LQ_EDIT |
60,261,501 | Kali Linux Installing Bluto | <p>Could somebody help me with the following problem? It would be much appreciated.</p>
<p><strong>Goal</strong> : To install Bluto on Kali Linux 2020.1 using <code>sudo pip install bluto</code> command</p>
<p><strong>Problem</strong> : Install does not complete</p>
<p><strong>Error message:</strong></p>
<p><code>E... | <linux><pip><kali-linux> | 2020-02-17 11:29:12 | LQ_CLOSE |
60,262,591 | How to prevent a base class from inheritance in C++? | <p>I don't want to make the base class from being derived to a new class. Is there any way to achieve this?
I want to tell the compiler that you can't inherit the base class just like a final keyword in java</p>
| <c++><inheritance> | 2020-02-17 12:33:31 | LQ_CLOSE |
60,262,635 | CI/CD pipeline with PostgreSQL failed with "Database is uninitialized and superuser password is not specified" error | <p>I'm using Bitbucket pipeline with PosgreSQL for CI/CD. According to this <a href="https://confluence.atlassian.com/bitbucket/test-with-databases-in-bitbucket-pipelines-856697462.html" rel="noreferrer">documentation</a> PostgreSQL service has been described in <code>bitbucket-pipelines.yml</code> this way:</p>
<pre>... | <postgresql><docker><pipeline> | 2020-02-17 12:36:34 | HQ |
60,263,030 | Is there third party package repository for Swift? | <p>I came from web development/design (still are) and I started to learn Swift 5 for iOS app development. In web development, there's a lot of sites or repo where I can download pre-written codes for the web like packagist.org. My question is, is there a similar site where I can pull pre-written code in Swift so I can ... | <ios><swift> | 2020-02-17 13:01:06 | LQ_CLOSE |
60,264,110 | How do I resolve Activity Not Found Exception | <p>In my android app, I've added an activity <em>MainActivity</em> in the manifest file, on navigating to that activity using an inten I get <code>activity not found error</code> asking if I've added it to manifest</p>
<p>here is my manifest activity</p>
<pre><code> <activity
android:name=".Main... | <java><android><kotlin><activitynotfoundexception> | 2020-02-17 13:59:10 | LQ_CLOSE |
60,264,259 | How secure is GIT bundle | <p>I have two identical repositories on two separated internet-less machines.<br>
The code is sensitive and cannot be exposed to the outside world (even not its diff).</p>
<p>How secure is a git bundle file which contains only a delta update?<br>
I know that one cannot pull from it if he does not have the initial base... | <git><git-bundle> | 2020-02-17 14:07:27 | LQ_CLOSE |
60,264,848 | Mapbox Examples in android studio - how to begin | I'd like to begin loading mapbox examples in AndroidStudio. I followed guides, but I'm struggling with dependencies problems.
Can someone help me, please?
I downloaded examples from github and loaded it in my AndroidStudio.
I follow all explanations, dependencies.... repositories... ecc
I syncronized Gradle and it ... | <android><sdk><mapbox> | 2020-02-17 14:43:05 | LQ_EDIT |
60,264,933 | Runtime error with Angular 9 and Ivy: Cannot read property 'id' of undefined ; Zone | <p>We have an Angular 8 project with tests. We are attempting to upgrade to Angular 9 and went through all the steps in <a href="https://update.angular.io/#8.0:9.0l3" rel="noreferrer">https://update.angular.io/#8.0:9.0l3</a>. This all went smoothly, no issues. The app compiles with no errors and all of the tests run... | <angular><angular9> | 2020-02-17 14:47:08 | HQ |
60,265,461 | matching regex in awk/gawk | <p>Can someone make the <code>awk</code> line below work in awk please. The syntax uses the standard PCRE regex standard (and i need to expect that some non-numeric characters are preceded to the first number, that is the string can look like <code>"++3.59 ± 0.04* "</code>). (note that I tried <code>[0-9]</code> and... | <regex><awk><regex-greedy> | 2020-02-17 15:18:45 | LQ_CLOSE |
60,266,310 | -0.1.ToString("0") is "-0" in .NET Core and "0" in .NET Framework | <pre><code>(-0.1).ToString("0")
</code></pre>
<p>evaluates to "-0" in .NET Core and "0" in .NET Framework when value is double or float. On the other hand when value is decimal:</p>
<pre><code>(-0.1M).ToString("0")
</code></pre>
<p>it evaluates to "0" in both frameworks.</p>
<p>Does anyone have more details on this... | <c#><.net><.net-core><tostring> | 2020-02-17 16:07:44 | HQ |
60,267,506 | Splitting a string that is converted to a list with a single item into multiple items | <p>I have a string that is converted to a list using the split() function, and I want to split my single item into multiple items each containing one character.</p>
<p>Here's my code:</p>
<pre><code>string = "ABCDEFG"
x = string.split()
print(x)
</code></pre>
<p>Thank you for your time!:D</p>
| <python><list><indexing><split><whitespace> | 2020-02-17 17:18:04 | LQ_CLOSE |
60,268,306 | (Eliminate duplicates) | (Eliminate duplicates) Write a method that returns a new array by eliminating the
duplicate values in the array using the following method header:
public static int[] eliminateDuplicates(int[] list)
Write a test program that reads in 10 integers, invokes the method, and displays
the distinct numbers separated by e... | <java> | 2020-02-17 18:13:46 | LQ_EDIT |
60,268,564 | how to calculate the exponent from a power a law fitting of the data in python | <p>how to calculate the exponent from a power a law fitting of the data. I want to fit my data with y=x^a now I want to know the value of a (where x and y is given).I am using python.</p>
| <python><python-3.x> | 2020-02-17 18:37:01 | LQ_CLOSE |
60,268,719 | How I use an external javasrript file inside .ts file without converting it? | <p>i have external javascript file. I want to use it in .ts file without converting it. Anyone have idea to use it inside typescript without converting.</p>
| <javascript><angular><typescript><ionic-framework><ionic4> | 2020-02-17 18:48:41 | LQ_CLOSE |
60,270,181 | How can I check in javascript if it's day time or night time on the client? | <p>Using <a href="https://date-fns.org/v2.9.0/docs/isBefore" rel="nofollow noreferrer"><code>date-nfs</code></a>, how can I check if <code>new Date()</code> is between 8am and 8pm?</p>
| <javascript><date><date-nfs> | 2020-02-17 20:47:40 | LQ_CLOSE |
60,270,386 | Count number of matching words from an array of words with another array of sentence in Javascript | <pre><code>var word_array = ['apple', 'mango', 'school'];
var sentences = [
{name: 'Jon', info: 'Jon takes apple in school'},
{name: 'Anna', info: 'Anna loves to eat mango'},
{name: 'Dani', info: 'Dani wants to go to park today'}
];
</code></pre>
<p>I want to count the matched words for each names of the sentences.<... | <javascript> | 2020-02-17 21:04:35 | LQ_CLOSE |
60,270,488 | How to create brick pattern in WPF in code? | <p>This question is similar to others, but my research has not uncovered the answer I seek. I am trying to fill a rectangle with a brick pattern. I understand there is not a HatchBrush in WPF and if there was perhaps I would do this: <code>HatchBrush brush = new HatchBrush(HatchStyle.DiagonalBrick,System.Drawing.Color.... | <c#><wpf> | 2020-02-17 21:15:25 | LQ_CLOSE |
60,271,134 | Which way is faster when stripping part of string in JavaScript | <p>I need to strip part of JWT token and I am courious which one is faster, or less complex internally.</p>
<p>Example input string:</p>
<pre><code>const input = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjMsInR5cGUiOjAsImlhdCI6MTU4MTk3NDk1MCwiZXhwIjoxNTgxOTc4NTUwfQ.oEwxI51kVjB6jJUY2N5Ct6-hO0GUCUonolPbryUo-lI"
</... | <javascript><performance><strip><code-complexity> | 2020-02-17 22:15:35 | LQ_CLOSE |
60,273,387 | Will I be Charged for a VM instance which was running in a project I shut down? | <p>I have recently shut down a project and I had a VM instance running in that. Will that charge my free trial credit even after shut down??
If yes, will it charge even after deletion(after 30 days of shut down)</p>
| <google-cloud-platform><google-compute-engine><gcloud> | 2020-02-18 03:35:37 | LQ_CLOSE |
60,275,113 | hi please help my multidex is not resolving |
Gayatri Anushka
1 second ago
hi please help, my android.support.multidex.MultiDexApplication is still red after all the steps :(
please help, not able to resolve this. im following a course online but no help. can I omit multidex?
android {
compileSdkVersion 28
buildToolsVersion "29.0.2"
... | <android><firebase><android-multidex> | 2020-02-18 06:37:22 | LQ_EDIT |
60,276,013 | Property 'allSettled' does not exist on type 'PromiseConstructor'.ts(2339) | <p>I try to use <a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled" rel="noreferrer">Promise.allSettled</a> API with TypeScript. Code here:</p>
<p><code>server.test.ts</code>:</p>
<pre class="lang-js prettyprint-override"><code>it('should partial success if QP... | <javascript><typescript><es6-promise> | 2020-02-18 07:43:35 | HQ |
60,279,884 | How to get params from response API Google via PHP | <p>I use PHP call API from Google, but the API response is a function. someone know how can I get params "results" in response. Thanks</p>
<p><a href="https://i.stack.imgur.com/FxH9S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FxH9S.png" alt="G"></a></p>
| <php><json><api><parameters><response> | 2020-02-18 11:28:59 | LQ_CLOSE |
60,281,914 | vb.net FileExist returns false | I have a weird problem. I have a folder with 700+ .jpgs Then I have a Textbox with one filename per line.
Now I want to check which file does not exist in the folder, but should be there.
This is my code:
Dim Counter As Integer = 0
For Each Line As String In tbFileNames.Lines
Coun... | <vb.net> | 2020-02-18 13:23:11 | LQ_EDIT |
60,282,611 | What does the "!!" operator mean in Kotlin? | <p>I'm reading this <a href="https://developer.android.com/jetpack/docs/guide" rel="nofollow noreferrer">guide</a> from Google for Android and they have the snippet bellow.</p>
<p>What does the <code>!!</code> do in <code>userDao.save(response.body()!!)</code>?</p>
<pre><code>private fun refreshUser(userId: String) {... | <android><kotlin> | 2020-02-18 13:59:40 | LQ_CLOSE |
60,287,591 | How to Replace a PHP File With an Existing PHP File | <p>So currently I have two PHP files, they are identical. There is a function that updates the current file being used to add data and also a clear function. I want the clear function on the first file to replace itself with the content of the second. </p>
| <php> | 2020-02-18 18:48:47 | LQ_CLOSE |
60,289,095 | How to scrape tables from some URL in Javascript? | <p>In Python it is very simple: pandas.read_html("some URL");</p>
<p>I am wondering what's the best way to do this in Javascript. Is there some existing library that can help with this?</p>
| <javascript><python><web-scraping> | 2020-02-18 20:38:13 | LQ_CLOSE |
60,290,309 | error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class | <p>First time using firestore and I'm getting this error. It seems to be a problem with Ivy, from my research. I don't have a lot of experience modifying tsconfig.app.json, which is the direction I've been pointed to, following other answers.</p>
<p>The only thing I was able to modify from the original project was to ... | <angular><google-cloud-firestore><angularfire> | 2020-02-18 22:24:39 | HQ |
60,291,542 | 150 years ago today in PHP | <p>I am looking to have a one line return function to get the date 150 years ago from today.</p>
<p>I currently have,</p>
<pre><code>return date('Y-m-d', strtotime('-150 year'));
</code></pre>
<p>The problem is this returns 1970-01-01 instead of 150 years ago.</p>
<p>Why is this?</p>
| <php><function><date> | 2020-02-19 00:58:41 | LQ_CLOSE |
60,292,096 | Why C# List<T> Add method is very slow | I have asp.net mvc project with dapper read data from database and I need export to excel.
Dapper is fast ! `ExecuteReader` only 35 seconds.
But `list.Add(InStock);` spend too much time !!! Over 1020 seconds !!
Is there any idea ?? Thank you !!
public List<InStock> GetList(string stSeId, string edSe... | <c#><.net><ado.net><dapper><generic-list> | 2020-02-19 02:22:09 | LQ_EDIT |
60,293,057 | Regex to Filter string with unicode characters and emojis for java | <p>I'm developing a Spring boot chat application. How can I create a regex to achieve followings,</p>
<ul>
<li>Remove special characters</li>
<li>remove newlines tabs etc..</li>
<li>Accept Unicode characters</li>
<li>Accept for emojis</li>
</ul>
<p>further,
DB tables <code>CHARACTER SET</code> <code>utf8mb4</code> an... | <java><regex><spring-boot><unicode><emoji> | 2020-02-19 04:30:57 | LQ_CLOSE |
60,293,646 | How can I select max TASK_ID and CREATED_DATE from below data? Have already tried using MAX and DISTINCT | I have this data:
REFERENCE_NO TASK_ID CREATED_DATE
244038 83102 2020-01-14 09:23:21:000000
244038 83114 2020-01-14 09:23:21:867000 | <sql><sql-server> | 2020-02-19 05:32:15 | LQ_EDIT |
60,294,250 | How to transform given dataset in python? | <pre><code> 1 0.0 6.400000000
2 6.400000000 27.0
2 27.0 27.100000000
2 27.100000000 27.400000000
2 27.400000000 27.700000000
2 27.700000000 30.600000000
1 30.600000000 31.0
1 ... | <python><pandas><numpy> | 2020-02-19 06:26:00 | LQ_CLOSE |
60,295,938 | Change many values with specific | <p>I have data like this:</p>
<pre><code>data.frame(text1 = c("Amazon", "Google", "other"))
</code></pre>
<p>Add I would like to replace whatever is in the list with a specific value</p>
<pre><code>mylist <- c("Amazon", "Google")
</code></pre>
<p>replace what is in the mylist with stock value</p>
<p>Expected o... | <r> | 2020-02-19 08:30:31 | LQ_CLOSE |
60,297,809 | HTML filepicker multi - get files in use | <p>The following problem occured using Firefox v73 on Window 7:</p>
<p>In my code i use a multi-file-picker in html to upload up to 100-files parallal:</p>
<pre><code><input type="file" id="files" name="files" multiple>
</code></pre>
<p>The files will be sent to a REST-API which process them afterwards.
When i... | <html><firefox><multifile-uploader><filepicker> | 2020-02-19 10:09:09 | HQ |
60,298,691 | Jquery - Get all the option fields of a select and save the value and id and compare with var string and is inside | I have a select with several option, each option has an id and the value.
This select is loaded with an ajax in jquery.
There is also a string variable that contains a text, with which you would have to compare all the option values and if any of them are within this text, select the option value as selected.
... | <javascript><jquery><html> | 2020-02-19 10:53:37 | LQ_EDIT |
60,301,120 | JavaFx and file | <p>How can I write to file using javaFx and scene builder for a simple form? </p>
<p>I just want the user data to be saved in the file. Also, I have problems creating the file. Should I create the file in a new java Class, or? </p>
| <java><file><javafx> | 2020-02-19 13:09:20 | LQ_CLOSE |
60,303,315 | Why hasn't this list changed? | <p>In the following code, the function modify_list want to modify b, but it failed, the print result is [1,2,3]. why hasn't the list a changed?</p>
<pre><code>def modify_list(b):
b = [1,2]
a = [1,2,3]
modify_list(a)
print(a)
</code></pre>
| <python><list> | 2020-02-19 15:07:31 | LQ_CLOSE |
60,304,580 | Regex for matching decimals only, not integers | <p>I'm looking for a regex to match decimal numbers only, but to fail on integers.</p>
<p>For example, the following numbers should pass</p>
<pre><code>0.00
1.00
-1.00
3.3
2.22123
</code></pre>
<p>But the following should fail</p>
<pre><code>-1
-3
4
559
</code></pre>
<p>I don't know why this is so hard to find/cre... | <regex> | 2020-02-19 16:08:31 | LQ_CLOSE |
60,305,061 | Python type hints for types not yet defined | <p>How do I provide type hints for an alternative constructor for a class? For example if I have a method like this converting something to my new class,</p>
<pre><code>class MyClass:
@classmethod
def from_string(cl: Type[????], s: str) -> ????:
p, q = some_function(s)
return cl(p, q)
</code... | <python><typing> | 2020-02-19 16:34:10 | LQ_CLOSE |
60,305,152 | How to query document reference type from firestore using flutter | <p>I have a field in my customers collection referencing a list of collection references that point to orders, how do I retrieve all the orders from my customer collection. What I hope to do is retrieve a list of orders for a specific customer based on an id. Thank you!</p>
<p><a href="https://i.stack.imgur.com/IkStg.... | <firebase><flutter><dart><google-cloud-firestore> | 2020-02-19 16:38:09 | LQ_CLOSE |
60,305,158 | REVERSE function returns just a single char | <p>Using the built in REVERSE function on a nvarchar I expect '51.02' to be returned but instead receive 2.</p>
<pre><code>DECLARE @HourMins nvarchar = '20.15'
SELECT REVERSE(@HourMins) digs
</code></pre>
<p>Can anyone tell me why?</p>
<p><a href="https://i.stack.imgur.com/sAlpu.png" rel="nofollow noreferrer"><img ... | <sql><tsql> | 2020-02-19 16:38:30 | LQ_CLOSE |
60,306,854 | Creating objects in bulk and prining the names of the objects | <p>I wanted to make a 100 objects from the same class and print the names of the objects each time they were created. Something like this:</p>
<pre><code>class Human():
def __init__(self):
#print the name of the object
human1 = Human()
human2 = Human()
human3 = Human()
human4 = Human()
human5 = Hu... | <python><python-3.x><class><oop><object> | 2020-02-19 18:20:36 | LQ_CLOSE |
60,307,044 | JavaScript alert not showing up in the browser page but at the right hand side of screen | <p>Visual Studio Code must have had an update. I wasn't able to find anything on their website but I wasn't seeing my alert I created like it used to appear on the browser page and then I noticed that the alert is at the bottom right hand of the screen outside of the browser page but inside the Visual Studio Code. Is t... | <javascript> | 2020-02-19 18:32:38 | LQ_CLOSE |
60,307,864 | unresolved external symbol _MsiLocateComponentW@12 | <p>I know that simply posting code and asking for a solution isn't a good idea, but I have no idea what's causing this.</p>
<p>I'm trying to find the installation path of PowerPoint based on <a href="https://docs.microsoft.com/en-us/previous-versions/office/troubleshoot/office-developer/find-office-installation-path" ... | <c++><windows><winapi> | 2020-02-19 19:30:43 | LQ_CLOSE |
60,307,935 | How do you make a div shaped like an ellipse in CSS? | <p>I am trying to make the following shapes with css. I don't know how I can do this, can you help?</p>
<p><a href="https://i.stack.imgur.com/TnFna.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TnFna.png" alt="ellipse divs"></a></p>
| <html><css> | 2020-02-19 19:35:05 | LQ_CLOSE |
60,308,405 | Get value to the right of the decimal in python | <p>If I print 5/4 I get 1.25. How do I just get the .25 part. </p>
<pre><code>print(5/4)
1.25
</code></pre>
| <python> | 2020-02-19 20:06:50 | LQ_CLOSE |
60,308,643 | Stack has not been tested with GHC & Cabal versions | <p>In my Haskell project when I <code>stack run</code>, it is showing the following, but still runs. What warning is this? How can I get rid of it?</p>
<pre><code>Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version 3... | <haskell><cabal><haskell-stack> | 2020-02-19 20:23:26 | HQ |
60,309,261 | C++: How do I assign a value from a 2D dynamic array to another 2D dynamic array since 'temp[0][0] = array[0][0]' doesn't work? | <p>I'm new to c++, and I'm trying to figure out how to get a 2D dynamic array called temp to get values from another 2D dynamic array called array. I couldn't figure out how to assign any values from array to temp because the statement 'temp[0][0] = array[0][0];' doesn't seem to assign the value of array[0][0] which is... | <c++><dynamic-arrays><assign> | 2020-02-19 21:09:26 | LQ_CLOSE |
60,310,873 | Execution failed for task ':app:mergeDexDebug'. Firestore | Flutter | <p>Trying to use Firestore in my project. My project is a brand new one, but having problems running the app on my device without getting an error:
<strong>Execution failed for task ':app:mergeDexDebug'.</strong></p>
<p>My app is using AndroidX. I've added my google-services.json file, followed the steps etc.</p>
<p>... | <flutter><dart><google-cloud-firestore> | 2020-02-19 23:36:15 | HQ |
60,311,633 | Average of empty list throws InvalidOperationException: Sequence contains no elements | <p>The following code</p>
<pre><code>double avg = item?.TechnicianTasks?.Average(x => x.Rating) ?? 0
</code></pre>
<p>throws </p>
<blockquote>
<p>InvalidOperationException: Sequence contains no elements</p>
</blockquote>
<p>the <code>item.TechnicianTasks</code> was supposed to be null, however I saw that it is... | <c#><linq> | 2020-02-20 01:20:54 | LQ_CLOSE |
60,313,479 | How can I write this in one line? | <p>Hey So I'm working on a problem that asks me to manipulate a dictionary by grabbing all the keys and values and formatting them into a single string for every key/value pair. I have to do this in one line, or so I think, the problem is better explained in the image.<a href="https://i.stack.imgur.com/aODwN.png" rel="... | <python> | 2020-02-20 05:31:58 | LQ_CLOSE |
60,314,531 | How I can give access for everyone around the world to my spring boot app that started on my computer? | <p>I started my spring boot app on my computer, and now I can easily make Http requests to <code>http://localhost:8080/</code>. How I can give access to everyone around the world to make Http requests to my app without deploying this app anywhere? </p>
| <java><spring><spring-boot><http><ip> | 2020-02-20 07:06:54 | LQ_CLOSE |
60,319,192 | Recursion with array's PHP | <p>I have a function (listarUrls ()) that returns / scans all the urls it finds on a web page.
I need that for each of the urls that the function returns to me, I return to the list / scan all the urls of that page
many times as requested by the user, that is</p>
<pre><code> .If the user asks for 1 iteration of... | <php><arrays><recursion> | 2020-02-20 11:44:32 | LQ_CLOSE |
60,320,534 | Custom markers icons not displayed on android | <p>I have this code : </p>
<pre><code>this.service.getListe(data).forEach((data: any) => {
const marker: Marker = this.map.addMarkerSync(data);
marker.on(GoogleMapsEvent.MARKER_CLICK).subscribe((params) => {
this.click(params);
});
});
</code></pre>
<p>Now the <code>getListe()</code> looks l... | <angular><google-maps><ionic-framework><ionic3> | 2020-02-20 12:59:54 | LQ_CLOSE |
60,320,610 | NameError: name '*' is not defined | <p>Why this line <code>add(root, sum, 0)</code> gets <code>NameError: name 'add' is not defined</code> error?</p>
<pre><code>class Solution:
def rob(root: TreeNode) -> int:
sum = [0, 0]
add(root, sum, 0)
if sum[0] < sum[1]:
return sum[1]
else:
return su... | <python-3.x> | 2020-02-20 13:04:52 | LQ_CLOSE |
60,321,460 | Linq Query to Sum into new list | <p>I want to create a 2nd list from 1st list to show the sum with descending order.</p>
<pre><code>1st list :
ID Value
1 20
2 40
3 10
2nd List:
ID Value
1 70
2 50
3 10
</... | <c#><linq> | 2020-02-20 13:48:45 | LQ_CLOSE |
60,322,831 | How do I append an HTTP header in this format in PHP (cURL)? | <p>I am trying to make a GET request in PHP using cURL and here is what the documentation says about my header:</p>
<blockquote>
<p>Append an HTTP header called zuluapi using the created signature.</p>
<p><code>zuluapi <publicKey>:<base 64 encoded signature></code></p>
</blockquote>
<p>I have the p... | <php><api><curl><http-headers> | 2020-02-20 15:01:07 | LQ_CLOSE |
60,323,069 | Java: check if value is 100 or 200 or 300 or x00 | <p>In java, I increase a value in a <code>while</code> statement and I would like to perform an action when this value has specific values (without hardcoding it because it can in theory go to infinite):</p>
<p>100, 200, 300, x00, etc.</p>
<p>I know this has a specific name, but I cannot remember it (Modulo ? But if ... | <java> | 2020-02-20 15:13:58 | LQ_CLOSE |
60,323,245 | excel, check if string contains a character a-z or A-Z | <p>I have a column with unstructured data. I need to detect if the string has an alphabetical character meaning a-z or A-Z. I am not sure how to do this in excel with a formula or other. I am thinking this could be a long countif and sumproduct. Or maybe regex in excel. I will post an attempt try once I try this out mo... | <excel><excel-formula> | 2020-02-20 15:23:16 | LQ_CLOSE |
60,323,541 | How to create an array object in the main method in java? | <p>I've just started Java this semester and I'm very new to it. I'm struggling to get an array method to print out anything through my main method. The example given below is from the notes, except for the info in the main method which I added, but I cannot get it to print anything through the main method since it give... | <java><arrays><methods> | 2020-02-20 15:38:28 | LQ_CLOSE |
60,327,101 | PHP will not echo variables | <p>I have the following very basic PHP script:</p>
<pre><code> <?php
$username = $_POST['username'];
$password = $_POST['password'];
echo "This is the username: ";
echo $username;
?>
</code></pre>
<p>And this is the output:</p>
<pre><code>This is the username:
</code></pre>
<p>I have my username and pass... | <php><output><echo> | 2020-02-20 19:17:45 | LQ_CLOSE |
60,331,526 | getElementById works only in Firefox | No much to say, my script works fine in Firefox but its not in Chrome or IE or Opera
var ids = ['id1','id2'];
function myfunction() {
for (var i = 0; i < ids.length; i++) {
var x = document.getElementById(ids[i]);
if (x.style.display === "none") {
x.st... | <javascript><css> | 2020-02-21 02:53:25 | LQ_EDIT |
60,331,539 | ERROR in The Angular Compiler requires TypeScript >=3.6.4 and <3.8.0 but 3.8.2 was found instead | <p>I ran</p>
<pre><code>ng version
</code></pre>
<p>and got the following output:</p>
<pre><code>Angular CLI: 9.0.3
Node: 12.16.1
OS: win32 x64
Angular: 9.0.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
P... | <angular><angular9> | 2020-02-21 02:55:01 | HQ |
60,332,668 | Why the return type of getchar() is int? | <p>I searched for the answer on Internet but I could not understand what is this 'EOF'?
Please let me know from basic about what is getchar() and what are it's uses?
Note that I am just a beginner of C language.</p>
| <c><char><int><return-type><getchar> | 2020-02-21 05:27:48 | LQ_CLOSE |
60,332,984 | Hello. I want an efficient way to truncate unwanted part from string in a DataFrame column | Data looks like these.
Particulars<br/>
IMPS/P2A/924413019791/CRYSTALV/THEGREAT/<br/>
MOB/QYW6RJS14956/Ratnakar Bank CreditCard<br/>
IMPS/P2A/924517325604/rajdha/HDFCBAN/X539003/<br/>
BY CASH DEPOSIT-BNA/SWRO12802/9635/040919/JABALPU<br/>
IMPS/P2A/924809539696/pradee/THEGREA/X783336/<br/>
IMPS/P2A/924911569760... | <python><pandas><dataframe> | 2020-02-21 06:05:42 | LQ_EDIT |
60,333,482 | Translate ECMAScript 6's arrow function to a regular function | <p>Im trying to convert the script below to a normal function, but fail to understand how. </p>
<p>The script counts the numbers of instances (model) in a Array (productList.Lockers) and appends it to a target div. </p>
<pre><code>productList.Lockers.forEach(o => $('#' + o.model).siblings('#modelcount').text((i, t... | <javascript> | 2020-02-21 06:52:09 | LQ_CLOSE |
60,335,115 | HTTP Request, Object/Array Destructuring | <p>I have an array of objects, that are on an api.</p>
<pre><code>{
"ErrorCode": 0,
"ErrorMessage": null,
"Warehouses": [
{
"Code": null,
"Name": "Depozit Fabrica",
"WarehouseID": "cb4fbab4-b8db-4807-a2b0-fad710f1fd9e"
},
{
"Code": "3"... | <javascript><arrays><rest><api><object> | 2020-02-21 08:54:26 | LQ_CLOSE |
60,335,328 | Date Split and remove of timezone | I have array which contains the following the dates
```
{
Mon Feb 17 2020 00:00:00 GMT+0530 (India Standard Time)
,Tue Feb 18 2020 00:00:00 GMT+0530 (India Standard Time)
,Wed Feb 19 2020 00:00:00 GMT+0530 (India Standard Time)
,Thu Feb 20 2020 00:00:00 GMT+0530 (India Standard Time)
}
```
How can i remove t... | <javascript><arrays><model-view-controller> | 2020-02-21 09:09:22 | LQ_EDIT |
60,335,706 | Looping through JSON and printing child nodes | I have the following JSON:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
var departments = {
"Department-1": [{
"fr": "Dept 1 - French",
"en": "Dept 1"
}],
"Department-2": [{
"fr": "Dept 2 - French",
"en... | <javascript><json><loops> | 2020-02-21 09:32:49 | LQ_EDIT |
60,341,523 | Why we are using equals() method in HashMap and HashSet without implementing comparator interface? | <p>Why we are using equals() method in HashMap and HashSet without implementing the comparator interface?. I have seen some example programs in the above concept. But there without comparator interface, they are using equals() and hashcode() method. My question is ,can we use those methods without comparator interface?... | <java><collections> | 2020-02-21 15:13:32 | LQ_CLOSE |
60,342,176 | Adding 2 array `type`s in Golang | <p>I have a <code>type</code> called <code>EmployeeList</code> which is just an array of <code>Employee</code> structs. </p>
<p>If I have to add/combine <code>EmployeeList</code> objects, I thought I could add them as follows</p>
<pre><code>package main
import (
"fmt"
)
type Employee struct {
Id int `js... | <arrays><go><struct> | 2020-02-21 15:53:18 | LQ_CLOSE |
60,342,476 | Python if something repeat function | <p>I don't how to make the script repeat this function if the user doesn't input the correct information.</p>
<pre><code>def installer(x):
if x == "Y" or x == "y":
print("Ok, Getting On with the install")
noncustompath()
elif x == "N" or x == "n":
print("Ok, Cool")
else:
#Repeat function
</code></pre>
... | <python><if-statement> | 2020-02-21 16:12:04 | LQ_CLOSE |
60,344,548 | How to change string to lower case? | <p>Trying to make it so that if the user enters any vowel capitalized, it will return true. So, that's where I added the "letter = letter.toLowerCase();" but it's not working still..</p>
<pre><code> public static boolean isVowel (String letter) {
letter = letter.toLowerCase();
if (letter == "a" || l... | <java><lowercase> | 2020-02-21 18:40:37 | LQ_CLOSE |
60,344,818 | How can I read in a specific number of characters from a line? (C++) | <p>I am working on a homework assignment where I need to error check the first line of a .txt file. In this case, the first line of the text file should read "Number of samples: ", followed by an unspecified number. If the line DOES NOT start with "Number of samples: ", I need to terminate the program after displaying ... | <c++><string><ifstream> | 2020-02-21 19:04:21 | LQ_CLOSE |
60,345,358 | when i want to connect have this problem "error": "Internal Server Error", "message": "No message available", | <p><a href="https://i.stack.imgur.com/waLH8.png" rel="nofollow noreferrer"> i have this code i can create a user i can get the username and password but i have an error when i want to connect </a></p>
<p>@PostMapping("/signin")</p>
<pre><code>public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginR... | <spring><spring-boot><spring-security><jwt><jwt-auth> | 2020-02-21 19:50:03 | LQ_CLOSE |
60,345,372 | Is there a python function to replace a specific index in a specific list that is in a text file? | <p>What I want to do:
I have a few lists in a text file now and want to change just 1 element of 1 of the lists using python.
What I have done so far:</p>
<p>Current txt file:</p>
<pre><code>food,bought
oranges,yes
strawberry,no
apples,no
</code></pre>
<p>I want it to appear like this after using the code to replace... | <python> | 2020-02-21 19:51:48 | LQ_CLOSE |
60,345,653 | Java arraylist project String and Ints | <p>I have to make a project using an array list and reading data from a file
The file will contain input that looks something like this: </p>
<p>4</p>
<p>34 F</p>
<p>23 M</p>
<p>32 M</p>
<p>43 F</p>
<p>The 4 refers to how many racers there are; the numbers represent that racer's score and the F and M represent ge... | <java><arraylist> | 2020-02-21 20:14:38 | LQ_CLOSE |
60,346,513 | How to excecute script every 6 hours? JQUERY | I need to refresh token every 6hours so then I can use an api without doing login again.
I'm trying like this:
setInterval(function(){
var code = window.location.href.split("=").pop();
var xhr = new XMLHttpRequest();
xhr.open("POST", "https://api.mercadolibre.com/oauth/t... | <javascript> | 2020-02-21 21:36:26 | LQ_EDIT |
60,346,626 | Enable remote errors with ASP.NET Core | <p>Normal ASP.NET (not core) applications could add this to the web.config to see errors from remote locations:</p>
<pre><code><system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
</code></pre>
<p>It was helpful for when you could not login to the actual server to see what ... | <asp.net-core><.net-core><asp.net-core-3.1> | 2020-02-21 21:46:31 | LQ_CLOSE |
60,350,762 | How can I estimate standard error in maximum likelihood destinati in | <p>I can’t estimate standard error for parametri in maximum likelihood estimation. How could I do?</p>
| <r><log-likelihood> | 2020-02-22 09:30:49 | LQ_CLOSE |
60,354,200 | Foobar - Test cases not passing - Disorderly escape (python) | 0/10 test cases are passing.
Here is the challenge description:
(to keep formatting nice - i put the description in a paste bin)
Link to challenge description: [https://pastebin.com/UQM4Hip9][1]
[1]: https://pastebin.com/UQM4Hip9
Here is my trial code - PYTHON - (0/10 test cases passed)
from ... | <python><math><factorial><fractions> | 2020-02-22 16:25:13 | LQ_EDIT |
60,355,185 | can I start the code from a certain line in C++? | <p>Basically I want the code to go back and start again from a certain line after it's done something.
For example, I have a menu where you can choose an action and if everything is finished in that action I want it to display the menu again.</p>
<p>Here's some rough code to illustrate.</p>
<pre><code> int option;... | <c++> | 2020-02-22 18:05:41 | LQ_CLOSE |
60,355,189 | Parsing Json in Golang (using struct) | I'm trying to parse JSON using Golang (I'm a n00b in Golang). Can anyone tell me why this is not working as expected?(I'm expecting it to print the Name here) : https://play.golang.org/p/tzY5hFUckhD | <go> | 2020-02-22 18:06:05 | LQ_EDIT |
60,355,455 | bad alloc c++ loading file in matrix | <p>I try to load a large file (20gb) and load it into a matrix. However I get a bad_alloc error when it tries to load the file in the matrix. My code is working on Mac but doesn't on Linux. </p>
<p>Here is my code: </p>
<pre><code>std::ifstream ifs(filename, std::ifstream::binary);
loadModel(ifs);
void loadModel(st... | <c++><bad-alloc> | 2020-02-22 18:35:21 | LQ_CLOSE |
60,355,555 | How can I right pad a numpy array with zeroes? | <p>I have a <code>numpy</code> array with shape <code>(1, 79, 161)</code>. I need to make the shape <code>(1, 100, 161)</code> by padding the center axis with zeroes to the right. What's the best way to accomplish this?</p>
| <python><numpy> | 2020-02-22 18:45:53 | LQ_CLOSE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.