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 |
|---|---|---|---|---|---|
59,900,533 | How can I draw lines with html, css and js | <p>I'm working on a Personal web project I need to draw lines from 2 inputs to a third one.</p>
<p>How can I draw the lines (D in picture) using HTML, CSS and Js ?</p>
<p><a href="https://i.stack.imgur.com/IC4eH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IC4eH.png" alt="enter image description... | <javascript><html><css><draw> | 2020-01-24 16:39:46 | LQ_CLOSE |
59,900,538 | Shared component library best practices | <p>I am creating a shareable React component library. </p>
<p>The library contains many components but the end user may only need to use a few of them. </p>
<p>When you bundle code with Webpack (or Parcel or Rollup) it creates one single file with <em>all the code</em>. </p>
<p>For performance reasons I do not want ... | <reactjs><npm><webpack><es6-modules><rollup> | 2020-01-24 16:40:06 | HQ |
59,900,637 | Error "TestEngine with ID 'junit-vintage' failed to discover tests" with Spring Boot 2.2 | <p>I have a simple app using Spring Boot and Junit 5:</p>
<ul>
<li><p>When using Spring Boot 2.1 (e.g, 2.1.8 or 2.1.12), my unit tests run
smoothly</p></li>
<li><p>When using Spring Boot 2.2 (e.g., 2.2.2.RELEASE or 2.3.2.RELEASE) my unit tests fail with error message </p></li>
</ul>
<pre><code>[ERROR] Failed to execu... | <spring-boot><junit5> | 2020-01-24 16:47:41 | HQ |
59,901,898 | How to check .Net framework installed on Windows | <p>How to check .Net framework installed on Windows using power shell or any programmatically? I have been checking the registry key value in path <strong>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP</strong> and referring to below link <a href="https://docs.microsoft.com/en-us/dotnet/framework/migrati... | <.net> | 2020-01-24 18:31:11 | LQ_CLOSE |
59,902,516 | adding a tag when a button is clicked | <p>I need a script when the selected text is surrounded by tags after clicking on the button. For example, there was the text</p>
<blockquote>
<p>This is my text, I love read</p>
</blockquote>
<p>I selected "my text" and then clicked on the button, and this text becomes surrounded by tags, for example</p>
<blockqu... | <javascript><css> | 2020-01-24 19:23:32 | LQ_CLOSE |
59,902,752 | Unlimited ArrayList in Java | <p>I need to make trivial array of strings in Java but I can not find a simple way to do it. I try to use <code>List<String> myList = new ArrayList<>();</code> but implementation says this is limited to 10 items. The question is simple how to make array of strings without limit which is able to add new item... | <java><list> | 2020-01-24 19:41:05 | LQ_CLOSE |
59,903,635 | Angular 8 and Observable that waits for another observable | <p>I need the data of observable1, but I need it only when observable2 is set to <code>true</code>. It is set to <code>true</code> AFTER the data of observable1 changes. How can I chain the two observables so that I will get the data of observable1 every time it changes, but that these results will wait for the change ... | <angular><rxjs><observable> | 2020-01-24 21:01:04 | LQ_CLOSE |
59,904,445 | PHP : preg_replace_callback() not working if occurrence starts with a number | I'm using **preg_replace_callback()** with a regex to pick up some heading content and create an ID based on the content but it seems that it's not working if the occurrence begins with a number and I don't understand where I'm wrong. Here is the code I'm using :
function betterId($match){
$escape = str_split... | <php><html> | 2020-01-24 22:23:45 | LQ_EDIT |
59,904,576 | My assembly "quiz Multiply" code is not working at all? | this is my assembly code . it not working at all..
I tried to write it in another way but it gives me other mistakes
I use emu8086..... in first page there will be 3 pages (1,2,3) and you have to choose which
page.
1- study 2-exam 3-exit
1-study: will learn Multiplication table from 0-9
2-exam: questions about m... | <assembly><dos><x86-16><emu8086> | 2020-01-24 22:38:25 | LQ_EDIT |
59,905,201 | How can I solve this problem without using lists? | <p>Problem: You're a swimmer, and you want to compare all of your race times to find the fastest one. Write a program that continuously takes race times as doubles from standard input, until the input is "no more races," at which point it should print out the time of your fastest race.</p>
<p>The answer I found on ano... | <python> | 2020-01-25 00:12:05 | LQ_CLOSE |
59,907,578 | Using Dart (webdev) to write a js library / expose a dart api to js. IN THE BROWSER | <p>Please give a simple but complete example showing how to write a library in dart that can be used from javascript in the browser without using requirejs. </p>
<p>The library should contain a function, a class and a global variable. </p>
<p>A reference to sass-dart is not a solution to that problem because it is fo... | <dart><dart-js-interop> | 2020-01-25 08:26:01 | LQ_CLOSE |
59,908,100 | How to show increment of counter in my ui in flutter? | <p>I have declared a variable called ticketCounter that is getting stored in SharedPrefs. This variable is getting incremented and decremented as needed. However I wanted to display this counter on my appBar and want its value to update. Although the value is getting stored in the variable it isn't showing up. </p>
<p... | <user-interface><flutter><dart> | 2020-01-25 09:43:54 | LQ_CLOSE |
59,908,682 | java.lang.NullPointerException: Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference | <p>Everything working fine i got this error at the end please give solution. I have tried each and every solution, I don't know what to do.. please give the exact solution trying from past 2 days but i can't solve the problem..</p>
<p>Thanks in advance</p>
<pre><code>public double calculatedDistance(DataSnapshot data... | <java><android><firebase-realtime-database><maps><double> | 2020-01-25 11:13:36 | LQ_CLOSE |
59,908,685 | which version of java supported by eclipse helios? | im new to eclipse and java.whenever i run the java program in eclipse there is a major.minor 52 exception.i want to know which version of java is supported by eclipse helios. My computer is windows 7 32 bit os. so i cant download any other version of eclipse. plzz help me with a favourable answer
| <java><eclipse><testing><selenium-webdriver><helios> | 2020-01-25 11:14:31 | LQ_EDIT |
59,909,606 | Java - NullPointerExceptioneven when variable has been set in constructor | <p>I have made this code, but it seems that it throws a NullPointerException even when it has been set.
This is the code (I am aware my code is not future proof or optimised at all. Please do not comment about it). I have tried passing the reference to the method Main, but that doesn't seem to work.</p>
<p>MainTest.ja... | <java><class><methods> | 2020-01-25 13:19:51 | LQ_CLOSE |
59,912,085 | Hash of a complex structure | <p>I'd like to know a relatively simple way to generate the hash of a complex C structure (which form a graph, in my case). By "simple" I mean, if possible, without having to go through all the nodes it forms. My goal would be, afterwards, to check if two structures are identical thanks to their hash, but also to sort ... | <c><hash> | 2020-01-25 18:13:24 | LQ_CLOSE |
59,912,529 | ESP32 CAM - EEPROM / sdcard / non erasable memory - beginier problem | {overwiew}
I am working on my first project with ESP32, I have ESP32 CAM model and I am creating an automatic roller blinds. I got most of the project working - I have web server that controls continous servo and all mechanics. I want to be able to adjust the time for going up-down without reprograming the microcont... | <arduino><microcontroller><esp32><eeprom> | 2020-01-25 19:06:26 | LQ_EDIT |
59,913,082 | How to send an Image which is in uri file by email in c# | <p>I want to send a picture via email through the code in c#, but I get the picture I need to send as a URI.
I saw that to send I need the location of the image but I only have the image as URI.</p>
<p>Is it possible?</p>
| <c#><image><email><uri> | 2020-01-25 20:22:15 | LQ_CLOSE |
59,913,250 | mkdir immediatly after rmdir gives me access denied | <p>I have a folder (let's call it <code>F</code>). </p>
<p>I wrote a batch file that does</p>
<pre><code>rmdir F /S /Q
mkdir F
</code></pre>
<p>When I call the mkdir <code>F</code>, it gives me access denied, probably because the system may be still deleting <code>F</code>. How can I do to deal with this problem?</p... | <batch-file><mkdir><rmdir> | 2020-01-25 20:45:51 | LQ_CLOSE |
59,913,470 | Getting different results when dereferencing a pointer to an integer | <pre><code>#include<stdlib.h>
#include<iostream>
using namespace std;
void fun(int* a){
int b=*a++;
cout<<b<<endl;
}
void fun1(int *a){
int b=*a+1;
cout<<b<<endl;
}
int main(){
int n=5;
fun(&n);//output remains 5
fun1(&n);//output incremented by ... | <c++><function><pointers><dereference> | 2020-01-25 21:16:28 | LQ_CLOSE |
59,913,580 | What does (1UL << 22) mean in MySQL Source Code Documentation | <p>I am updating an existing library in Java I have to connect to MySQL 8 but the source code documentation has a #DEFINE I don't understand. I'm looking specifically at the client capability flags at <a href="https://dev.mysql.com/doc/dev/mysql-server/latest/group__group__cs__capabilities__flags.html" rel="nofollow no... | <java><mysql><mysql-8.0> | 2020-01-25 21:31:03 | LQ_CLOSE |
59,913,765 | Convert factor to number with this command correct | <p>Im trying to convert the following factor to number in RStudio, can I use this commands?</p>
<p><code>NewFactor <- factor(c(31, 764, 9.6, 513, 125.344, 3131.657, 9853));as.numeric(NewFactor)</code></p>
| <r><type-conversion> | 2020-01-25 21:57:32 | LQ_CLOSE |
59,914,412 | Skipping lines in a txt file and returning them | <p>I need some help completing this problem. I have no idea how to tackle this at all and I need to finish it.</p>
<p>"Q: Sometimes, when processing a file, some number of header, comment, or documentation lines at the beginning of a file must be omitted from the processing and skipped over before processing the remai... | <python> | 2020-01-25 23:51:20 | LQ_CLOSE |
59,916,267 | java.util.ConcurrentModificationException in activity onCreate | <p>In a recent release where I added MoPub via Admob ad mediation I am seeing a bunch of ConcurrentModificationException in crash logs. It all seems to be native code and I am on the latest version of all ad related and google/android related libraries. Anyone run in to this before?</p>
<pre><code>java.lang.RuntimeExc... | <java><android><admob><mopub> | 2020-01-26 07:04:09 | HQ |
59,917,340 | Can't cast interface{} to []map[string]interface{} directly | <p>I have method which accepts <code>map[string]interface{}</code> parameters (it comes from parsed YAML file):</p>
<pre class="lang-golang prettyprint-override"><code>func load(params map[string]interface{}) error {
}
</code></pre>
<p>This method is trying to extract one element from <code>params</code> and cast it ... | <go><casting> | 2020-01-26 10:12:35 | LQ_CLOSE |
59,918,015 | JS parse string always as string and no number evaluation | <p>Example:</p>
<pre><code>var garbage = JSON.parse('12345E666');
</code></pre>
<p>=> infinity
while </p>
<pre><code>var garbage = JSON.parse('1234E300');
</code></pre>
<p>=> 1.234e+303</p>
<p>As you can see, this is rather rotten and definitely not what I want. </p>
<p>The task at hand is to receive a string ...... | <javascript> | 2020-01-26 11:48:45 | LQ_CLOSE |
59,919,528 | Decode the string with the number of letter repeation | <p>I have a string "<strong>3A4B2GEF</strong>", need to decode it to "<strong>AAABBBBGGEF</strong>". If there is no number before letter, <strong>it means that repeat = 1</strong>. But in the output the maximum letters of string is 30, example "29A3B" output is:</p>
<pre><code>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAB
BB
</code>... | <python><python-3.x> | 2020-01-26 14:59:21 | LQ_CLOSE |
59,919,587 | How to add spaces between two words using html? | <p>Suppose I have word Abhishek Mane
I want to make this as follows
Abhishek_____________________________ Mane. Underscore(_) indicates spaces that i want</p>
| <html> | 2020-01-26 15:05:34 | LQ_CLOSE |
59,920,912 | Border not showing in CSS even after labeling them !important | <p>Here is the code for this particular <code>div</code>:</p>
<pre><code>.generated_text {
display: inline-block;
width: 50px;
font-family:'Gudea' !important;
text-align: left;
color:#000 !important;
background:#fff !important;
border: 30px !important;
border-color: #4b4b4b !important;
... | <html><css> | 2020-01-26 17:31:13 | LQ_CLOSE |
59,922,794 | JavaScript charAt problem that I can’t seem to answer correctly | <p>Write a function called charAt which accepts a string and an index (number) and returns the character at that index.</p>
<p>The function should return an empty string if the number is greater than the length of the string.</p>
<p>Do not use the built in charAt method - the tests will fail if you do!</p>
| <javascript> | 2020-01-26 21:14:01 | LQ_CLOSE |
59,923,035 | How to align button and ul elements horizontally | <p>I want to achieve following layout:</p>
<p>[my button][hello1][hello2]</p>
<p>This is html:</p>
<pre><code><div id='container'>
<button id='my-button'>my button</button>
<ul id='my-ul'>
<li>hello1</li>
<li>hello2</li>
</ul>
</div>
</code... | <css> | 2020-01-26 21:46:36 | LQ_CLOSE |
59,923,243 | Composer warning "Package zendframework/zend-code is abandoned" | <p>I get a warning from composer:</p>
<p>Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.</p>
<p>However, I can't see any reference to ze... | <symfony> | 2020-01-26 22:14:57 | HQ |
59,923,613 | Difference of Product and Sum of Digits | <p>The task is to find the difference in the products of the digits and sum of digits. For example, an input of <code>4 5 6</code> would give <code>105</code>. The issue I'm having is dealing with previous iterations. I know it has something to do with the indexes of the list but I'm having difficulty figuring it out. ... | <python><python-3.x> | 2020-01-26 23:14:07 | LQ_CLOSE |
59,923,964 | Replace items in a list by for in statement ( Python) | <p>I am a new Python user and I am wondering how to replace every integer in a list with str variables? </p>
<p>I used the for-in statement, but it is not working. Please let me know how I can make the code work? Thank you so much! </p>
<p><a href="https://i.stack.imgur.com/3m7PX.png" rel="nofollow noreferrer">my cod... | <python> | 2020-01-27 00:16:09 | LQ_CLOSE |
59,926,495 | Can any body help me to create this image in android by using shape | <p><a href="https://i.stack.imgur.com/BWBz8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BWBz8.png" alt="enter image description here"></a></p>
<p>Please suggest me which is the best way to create this image by just create png or jpeg or by using shape. I want an only bg image not "20% Off" writt... | <android><android-studio><android-layout> | 2020-01-27 07:10:27 | LQ_CLOSE |
59,926,620 | What is the being called here: return _() | <p>I have come across this code in MoreLinq, in file <code>Batch.cs</code> (<a href="https://github.com/morelinq/MoreLINQ/blob/master/MoreLinq/Batch.cs#L96" rel="noreferrer">link</a>):</p>
<pre><code>return _(); IEnumerable<TResult> _()
</code></pre>
<p>I read up on discards, but nevertheless I cannot make sens... | <c#> | 2020-01-27 07:21:11 | HQ |
59,927,859 | How to .js file $ajax code defined '$ not defined error''? | <pre><code>var deneme = document.createElement("SCRIPT");
deneme.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js";
var nodeajax = document.createTextNode("function deneme() {console.log('dawdawdawd');$.ajax({ type: \"POST\", url: \"http://localhost:54371/checkbox.aspx/Check\", data: '{sayfa: 10... | <javascript><jquery><ajax> | 2020-01-27 09:03:51 | LQ_CLOSE |
59,929,469 | creating a foriegn key contstraint on non primary or unique key | how to use foreign key constraint on non primary key for example ihave two tables account and transactions i want to check the acname in transactions is one of the acname in account
table account (acno,acname,bal,type)
table transactions (tid,acno,acname,bal,credit/debit,datetime)
here transactions .acname should... | <sql><postgresql><foreign-keys> | 2020-01-27 10:39:49 | LQ_EDIT |
59,929,999 | Do I cast the result of new? | In the answers to the question https://stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc was covered that I do not need and should not cast the returned `void` pointer of `malloc()`.
But how is it about the `new` operator in C++?
_____________________________
Is there an explicit reason to do:
... | <c++><casting><new-operator><heap-memory> | 2020-01-27 11:12:59 | LQ_EDIT |
59,932,106 | MySQL Join with several CASE WHEN | <p>I need some help with MySQL where I want to JOIN with a CASE WHEN. I am getting 3 columns from statement below. </p>
<p>I would like to add from table Customer.name so I get a 4th column with Customer Name.
Table CustomerCategory has foreign key and ID from Customer.CustomerID<br>
Also every customer has an id but... | <mysql> | 2020-01-27 13:26:37 | LQ_CLOSE |
59,939,275 | Count from long to wide format | <p>Having a long format like this:</p>
<pre><code>df <- data.frame(id = c(1,1,1,2,2), text = c("stock","arrange","stock","arrange","arrange"))
</code></pre>
<p>How is it possible to receive the wide format of making the variables in text column new columns which have as values the number the exist?
Example of expe... | <r> | 2020-01-27 21:38:16 | LQ_CLOSE |
59,940,084 | Create/append nested dictionary inside a dictionary in Python? | <p>How to append a dictionary?<br>
I tried <code>maindict[a] = m</code> and <code>maindict[a][x] = n</code>. It didnt work, I get <code>TypeError: list indices must be integers or slices, not str</code></p>
<pre><code>maindict =
{ 'a' : '',
'b' : '',
...
}
m =
{ 'x' : '',
'y' : ''}
n =
{ 'l' : '',
'm' : '... | <python><python-3.x> | 2020-01-27 22:57:10 | LQ_CLOSE |
59,943,354 | Grouping dataframe based on similar column values | <pre><code>OFFENSE_ID RULE_ID STATUS
100 1 open
101 2 closed
102 2 open
103 1 open
104 2 closed
105 2 open
</code></pre>
<p>Here's how I want it - </p>
<pre><code>RULE_ID OPEN CLOSED
... | <python><dataframe> | 2020-01-28 06:40:28 | LQ_CLOSE |
59,946,042 | how to use VBA to copy paste in a determinate cell, changing the variable every week (not in the code) | I receive a weekly table and I've to update various columns in the whole document.
Every week has a target number from 1 to 52.
I tried to make the VBA copy paste in the next free column, but I realized that It can lead you to an error if you don't update it in the proper way.
So I was thinking, do you know a ... | <excel><vba> | 2020-01-28 09:50:40 | LQ_EDIT |
59,946,532 | How to convert numbers like 902.1 or 902 to 900 in php | <p>Anyone knows how i can convert How to convert numbers like 902.1 or 902 to 900 in php..i have tried both ceil and floor like below but still same issue</p>
<pre><code>$amount = 902.1
$amount2 = floor($amount);
return $amount2;
returns 902
</code></pre>
<p>but i want to return either 900 or 910..something l... | <php> | 2020-01-28 10:19:10 | LQ_CLOSE |
59,946,764 | Combobox items does not display title in C# WPF MVVM | <p>I have main view model which contains:</p>
<pre><code>public class MainViewModel: INotifyPropertyChanged
{
public MainViewModel() { Categories = LoadCategories(); }
public ObservableCollection<CategoryViewModel> Categories {get;}
public FileData Data {get; set;}
}
public class FileData: INotifyPrope... | <c#><wpf><mvvm> | 2020-01-28 10:31:54 | LQ_CLOSE |
59,948,085 | How the Substitution of the 3rd to the last occurrence using SED command works? | <p>Let's consider the 'file.txt',
<a href="https://i.stack.imgur.com/qt4sr.png" rel="nofollow noreferrer">click for the file contents</a></p>
<p>I want to substitute the 3rd to the last occurrence of "p".</p>
<pre><code>sed -E 's/(.*)p((.*p){2})/\1@\2/' file.txt
</code></pre>
<p>Here, "p" is substituted by "@".
I wa... | <unix><sed> | 2020-01-28 11:47:04 | LQ_CLOSE |
59,948,685 | python3 i wonder if u guys can solve? | Guys i code on this website :https://repl.it/ | i really need help with python,in tkinter stuff this is my code:
from tkinter import *
import tkinter as tk
root = tk.Tk()
root.geometry('400x400')
___________________________________________________
... | <python><python-3.x><tkinter> | 2020-01-28 12:21:34 | LQ_EDIT |
59,949,022 | Declare a C++ function that has C calling convention but internal linkage | <p>I'm trying to interface with a C library, which expects me to provide a pointer to a callback function.</p>
<p>As I understand it, according to the standard the callback must have C <em>language linkage</em>, due to possibly different calling convention. I can accomplish this by declaring my callback function as <c... | <c++><c><extern><linkage><cross-language> | 2020-01-28 12:42:13 | HQ |
59,949,285 | Array sum that I got from a for loop returns NaN (Javascript) | <p>That function below returns <strong>NaN</strong> instead of expected <strong>4</strong>. I bet there's some obvious mistake, but I'm not seeing it.</p>
<pre><code>function myFunction(arr) {
let arrSum = 0
for (let i=0; i<=arr.length; i++) {arrSum += arr[i];}
return arrSum;
}
const myArr = [2,2];
cons... | <javascript><arrays><return><nan> | 2020-01-28 12:56:13 | LQ_CLOSE |
59,950,954 | How do I work with the alphavantage API to fetch the currency exchange data using either JSON or php? | https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=USD&to_currency=JPY&apikey=demo
DATA AS FOLLOWS:-
Realtime Currency Exchange Rate
1. From_Currency Code "USD"
2. From_Currency Name "United States Dollar"
3. To_Currency Code "JPY"
4. To_Currency Name "Japanese Yen"
5. Exchange... | <javascript><php><html><json><ajax> | 2020-01-28 14:29:28 | LQ_EDIT |
59,950,988 | Why does the compiler parse this as a function pointer and not a recursive call? | <p>In this following code <code>foo()</code> is parsed in two different places and calls two different functions (marked by the <code>********</code>).</p>
<pre><code>#include <cstdio>
typedef int (*func)(void);
int bar()
{
printf("bar\n");
return 4; // guaranteed to be random
}
int foo()
{
printf... | <c++><language-lawyer> | 2020-01-28 14:30:54 | LQ_CLOSE |
59,951,280 | Why is android still using Java 8? | <p>Just wondering why Android is very behind the latest versions of Java which the latest release is Java 11.</p>
<p>I understand we have Kotlin now which comes with some great features. But just wondering will Google ever update to the latest version if not, why?</p>
<p>Many thanks in advance </p>
| <java><android> | 2020-01-28 14:46:24 | LQ_CLOSE |
59,952,704 | C++20 Concepts : Which template specialization gets chosen when the template argument qualifies for multiple concepts? | <p>Given :</p>
<pre><code>#include <concepts>
#include <iostream>
template<class T>
struct wrapper;
template<std::signed_integral T>
struct wrapper<T>
{
wrapper() = default;
void print()
{
std::cout << "signed_integral" << std::endl;
}
};
template<... | <c++><language-lawyer><c++20><c++-concepts> | 2020-01-28 16:06:05 | HQ |
59,953,382 | How can I extend the length of an array by 1 in C#? | <p>I want an array capacity to increase as I add items in order to add as many items to it as possible. Is there a way to do this in C#?</p>
| <c#><arrays> | 2020-01-28 16:46:31 | LQ_CLOSE |
59,953,428 | How to code in python a system $dF/dt=A$ with $F$ and $A$ matrices? | I'd like to code in python a coupled system of differential equations like :
$dF_{ij}/dt=A_{ij}$ where $A_{ij}$ is a function of the matrix $F$.
Meaning a system of 1st order differential equations.
For the same system but with vectors : $dF_{i}/dt=A_{i}$ I'm using scipy.integrate.odeint.
But it doesn't ... | <python><matrix><scipy><system><differential-equations> | 2020-01-28 16:48:52 | LQ_EDIT |
59,956,033 | Difference of sys.path | <p>The following two python runs don't print the same output. Does anybody know why there is a difference? Thanks.</p>
<pre><code>$ pwd
/tmp
$ cat main.py
import sys
print("\n".join(sys.path))
$ python3 -c 'import sys; print("\n".join(sys.path))' | head -n 1
$ python3 ./main.py | head -n 1
/private/tmp
</code></pre>... | <python> | 2020-01-28 19:50:34 | LQ_CLOSE |
59,956,374 | Is void() a valid C++ expression? | <p>Apparently, this ternary expression with <code>void()</code> as one argument compiles:</p>
<pre class="lang-cpp prettyprint-override"><code>void foo() {}
//...
a == b ? foo() : void();
</code></pre>
<p>Is <code>void()</code> a valid expression by the standard, or is it just a compiler thing? If it's valid, then w... | <c++><expression><void> | 2020-01-28 20:17:48 | HQ |
59,958,536 | How to click button with Selemium without "id=" or "name=" | Trying to have selenium click a button on a webpage. Cannot find the element to make it click.
```
<button type="submit" class="xButton xCTA xSubmit">
<span>Enter</span>
</button>
```
| <javascript><selenium><selenium-webdriver> | 2020-01-28 23:19:42 | LQ_EDIT |
59,959,815 | How to output whole information when using group_by and summarize | <p>My data has continent, country and dif(number).I am now trying to find the maximum of dif by each continent, and following is my code. How can I get the countries name at the same time?</p>
<pre><code>dt_dif %>%
group_by(continent)%>%
summarize(max_dif = max(dif))
</code></pre>
| <r> | 2020-01-29 02:39:18 | LQ_CLOSE |
59,961,772 | Can anyone help to draw rectangle in wxwidgets because i have written a code but it doesn't work it only displays a window frame | #include "wx/wx.h"
class MyFrame : public wxFrame{
public:
MyFrame();
~MyFrame();
private:
//DECLARE_EVENT_TABLE()
};
class MyWindow : public wxWindow{
public:
void OnPaint(wxPaintEvent& event);
private:
... | <c++><wxwidgets> | 2020-01-29 06:48:28 | LQ_EDIT |
59,962,577 | Is it possible to send SMS over Wifi in Android App? | I'm working on an Android application in Android Studio and wanted to add a feature that allowed a text (SMS) message to be sent from the application to a mobile phone number.
I found one way to do this by using the SMS Manager API, but it seems like this only works if the application is run on a cell phone with a ... | <android><sms><android-wifi><smsmanager> | 2020-01-29 07:49:39 | LQ_EDIT |
59,966,387 | Strongly typing props of vue components using composition api and typescript typing system | <p>I am using vue composition api with typescript.</p>
<p>How can I strongly type the component props using typescript typing system?</p>
| <typescript><vue.js><strong-typing><vue-composition-api> | 2020-01-29 11:43:51 | HQ |
59,967,898 | How would I modify this to put it into a function? | <pre><code>question_prompts = [
"What color are Apples?\n(a) Red/Green\n(b) Purple\n(c) Orange\n\n",
"What color are Bananas?\n(a) Blue\n(b) Yellow\n(c) Green\n\n",
"What color are Strawberries?\n(a) Red\n(b) Blue\n(c) Green\n\n" ]
def main_questions():
</code></pre>
<p>These are a set of three questions,... | <python><python-3.x> | 2020-01-29 13:13:19 | LQ_CLOSE |
59,969,636 | No list returned by random.shuffle() | <p>I wrote some code in two different ways which I thought were exacly equivalent but I got two very differnt answers:</p>
<p>This first way worked exactly as expected:</p>
<pre><code>test_listA = list(range(0, 5))
random.shuffle(test_listA)
print(test_listA)
</code></pre>
<p>It printed out:</p>
<pre><code>[2, 1, 0... | <python> | 2020-01-29 14:47:42 | LQ_CLOSE |
59,970,843 | C# | Best way to read file into byte array in selected encoding? | Now i use something like that:
Encoding.UTF8.GetBytes(File.ReadAllText(filename))
Any suggestions how to do that better?
And what encoding uses `File.ReadAllBytes(filename)` method?
P.S. I need utf-8 byte arrays to store files in db | <c#><.net> | 2020-01-29 15:54:16 | LQ_EDIT |
59,972,432 | Why compilation error is giving in this java code? | <p>I was trying to compile the code and it shows a compilation error. Can anyone help me out to understand what is wrong in the code? I guess there should be a default constructor inside Mammal class but why?</p>
<pre><code>class Mammal {
public Mammal(int age) {
System.out.print("Mammal");
}
}
public class Platy... | <java> | 2020-01-29 17:21:54 | LQ_CLOSE |
59,972,626 | Parse Space Delimited Files With Spaces In Fields | <p>I have a CSV file that uses a space as the delimiter. But some of the fields contain a space and those fields are wrapped with double quotes. Any field with a null/empty value is represented as "-". Fields that are not null/empty and do not contain spaces are not wrapped in double quotes. Here's an example of one ro... | <csv><go><delimiter> | 2020-01-29 17:34:10 | LQ_CLOSE |
59,974,044 | need help for fix code in html for oage format | hello i need my page to look like this
[this what im trying to do][1]
but thats what i got [enter image description here][2]
thats the whole page i hope i can get a help with it i have a problem with layout and color of navigation
and the picture up is at the top left
i tried to work at it and took hours ... | <html><css><layout><alignment><centering> | 2020-01-29 19:13:36 | LQ_EDIT |
59,976,940 | How to make document.querySelector accept div id as parameter? | <p>I have this function:</p>
<pre><code>document.querySelector(".myDivClass");
</code></pre>
<p>Which accepts a div css class as parameter. How to make it accept a div id as parameter instead?</p>
| <javascript><css><reactjs> | 2020-01-29 23:10:51 | LQ_CLOSE |
59,977,174 | I was trying to write a program and it seems totally fine but i cannot find the reason why it doesn't work, any help would be thankful | <p>I have created a program which acts as a quiz. It is nowhere near done but I am working on it.</p>
<p>The code is below:</p>
<pre><code>#include <stdio.h>
#include <string.h>
#include <iostream>
int optionOne(int choice, int plonkPoints);
int optionTwo(int choice, int plonkPoints);
int optionTh... | <c><function> | 2020-01-29 23:40:52 | LQ_CLOSE |
59,977,227 | Put real time (non static) on qt (c++) | <p>i want put the real time on qt, but non static</p>
<p>I have this code:</p>
<pre><code>QDateTime dateTime = dateTime.currentDateTime();
QString dateTimeString = dateTime.toString("yyyy-MM-dd hh-mm-ss");
ui->data->setText(dateTimeString);
</code></pre>
<p>but it shows only a static dateTime and i want the re... | <c++><qt> | 2020-01-29 23:46:30 | LQ_CLOSE |
59,977,887 | How to try Android development as an older programmer in 2020? | <p>Given a person who has been programming for embedded industrial systems for a few decades now. </p>
<p><strong>How can I make it easy for an older programmer to try mobile development (Android)?</strong></p>
<p>I’m asking because the amount of information on Android development is so overwhelming, and so much of i... | <android><android-studio><mobile><ide> | 2020-01-30 01:22:17 | LQ_CLOSE |
59,979,633 | Index position in Python | <p>Can someone please explain why in the second variable we select index [1]? Wouldn't the index position be the same as the first variable since I am trying to compare the first letter of the word. Please help and thank you in advance. </p>
<pre><code>def animal_crakers(text):
string = text.split()
return str... | <python> | 2020-01-30 05:30:02 | LQ_CLOSE |
59,979,741 | Which is best pdf viewer in android? | <p>Which is best pdf viewer in android? Jio magzine which pdf viewer used?</p>
| <android> | 2020-01-30 05:41:57 | LQ_CLOSE |
59,979,799 | How to fetch data and show in Tgrid in delphi | <p>I'm working on an application where i want to fetch data from database and show it in <code>Tgrid.</code> Since it doesn't have a <code>DataSource</code> Property, i can't figure out a way how to add item in Tgrid.</p>
| <delphi> | 2020-01-30 05:49:36 | LQ_CLOSE |
59,980,081 | html+input type text with regex not taking underscore(_) and special characters | <p>am working for an html input type text which i dont want to take underscore and special characters.
I dont want to have an change function which will do the same..if there is a regex which wont take mainly underscore and special characters will be awesome.</p>
<p>Any fiddle will be highly helpful</p>
| <html><regex> | 2020-01-30 06:15:43 | LQ_CLOSE |
59,982,070 | How can I select unique row based on value matched in other column | I have searched a lot but can not get my head around this.
I need to filter the results based on comparing values in 2 rows.
Data)
[Data I want to filter][1]
Results I want to end up with
[Desired results][2]
Is this possible in MySQL?
If there is a way to do this in PHP after the query I'm happy with th... | <mysql> | 2020-01-30 08:48:52 | LQ_EDIT |
59,982,393 | Java 8 Stream | Add a value of the stream to another List/Collection without using foreach or any terminal Operation | <p>So far i tried to add values from a stream to a list with peek() but later I found out that peek() is only used "to support debugging, where you want to see the elements as they flow past a certain point in a pipeline".</p>
<p>Now my question is whats the coding-convention here ?</p>
<p>Do I map it in a second str... | <java><java-stream> | 2020-01-30 09:08:41 | LQ_CLOSE |
59,982,443 | unable to write the output to a text file | from urllib import request
from redditscore.tokenizer import CrazyTokenizer
tokenizer = CrazyTokenizer()
url = "http://www.site.uottawa.ca/~diana/csi5386/A1_2020/microblog2011.txt"
for line in request.urlopen(url):
tokens = tokenizer.tokenize(line.decode('utf-8'))
... | <python> | 2020-01-30 09:11:32 | LQ_EDIT |
59,983,736 | How do I make my window 10 PC an SMTP server? | I want to configure my window system as mail server,please let me if any body know how to configure windows 10 as mail server, I have ec2 window instance. | <technical-indicator> | 2020-01-30 10:20:47 | LQ_EDIT |
59,985,128 | Pseudocode Python Concepts | <p>I know that pseudocode by its very nature is based more on natural language syntax and principles than anything else, but it is supposed to represent coding concepts. I am still a beginner , so I don't understand all of the concepts.</p>
<pre><code> int string (char s[1..m], char t[1..n])
// d is a table with... | <python><pseudocode> | 2020-01-30 11:34:37 | LQ_CLOSE |
59,987,153 | why we cannot perform this operation in vector | When we passing vector in function why we cant do it like an array for example.
#include<bits/stdc++.h>
using namespace std;
void func(vector<int> vect)
{
vect.push_back(30);
}
int main()
{
... | <c++><pointers><vector> | 2020-01-30 13:28:17 | LQ_EDIT |
59,987,614 | sapnco BAPI invoked in CUA for child systems | Hi I am currently developing an C# application with sapnco 3 connector.
I am wondering if I could invoke BAPI into CUA and this BAPI would pass details to child system.
This field is available through Test Function Module (field "RFC target sys"), but it is unavailable directly in standard BAPIs when accessed from sa... | <c#><sap><saprfc><bapi><function-module> | 2020-01-30 13:54:13 | LQ_EDIT |
59,987,658 | React js destructuring assignment | I have the following function.
```
returnStateElement = (...elements) => {
const copy = Object.assign({}, this.state);
return elements.reduce((obj, key) => ({ ...obj, [key]: copy[key] }), {});
};
```
Work:
```
f = () => {
const dataSender = this.returnStateElement('email', 'password');
let { e... | <javascript><reactjs><variable-assignment><assignment-operator><destructuring> | 2020-01-30 13:56:43 | LQ_EDIT |
59,989,362 | awk to match pattern in html and use regex | <p>Using <code>awk</code> to parse an <code>html</code> and it does execute but prints the entire line not just the percentage as in the desired. My thinking is that the pattern <code>reads passed filters:</code> is matched, then the <code>regex</code> is used to use the <code></td><td class='col2'>78.76014... | <regex><awk> | 2020-01-30 15:29:33 | LQ_CLOSE |
59,989,651 | Python find max in list of lists and elements with undefined number of values | I have a big list of list. I am trying to find max and min in it. Previous questions on this consists lists with strings and this question is differen.t
big_list = [[1,2,3],4,[5,6,0,5,7,8],0,[2,1,4,5],[9,1,-2]]
My code:
max = max(list(map(max,boxs_list)))
Present output:
TypeError: 'numpy.... | <python><pandas><list><numpy><nested-lists> | 2020-01-30 15:45:52 | LQ_EDIT |
59,990,837 | Safely deleting unused coded: What are all the ways a macro can be called? (Excel-VBA) | I want to remove some code I believe is unused in a specific Excel VBA Project. I think I've checked all the places that macros can be hiding, but I want to be absolutely sure the workbook won't try to a call certain sub after I delete it. Is my checklist complete?
1. The code itself, called by other subroutines... | <excel><vba> | 2020-01-30 16:54:25 | LQ_EDIT |
59,991,809 | Select range of data between two string vlaues | <p>I want select the data in between two string values AAA and DDD. There are data out of range of AAA and DDD that I do not want. Any ideas. Thanks.</p>
<p><a href="https://i.stack.imgur.com/bOf7U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bOf7U.png" alt="enter image description here"></a></... | <tsql> | 2020-01-30 17:53:56 | LQ_CLOSE |
59,992,775 | What is the best way to create an Observable which directly emits after creation? | <p>I am asking myself what would be the most proper and semantically correct way to create an observable which emits directly after creation?</p>
<p>Of course I can always do something like this <code>of(unkown)</code>, <code>of(undefined)</code>, <code>of(null)</code>, <code>of(true)</code> and so on, but what would ... | <angular><typescript><rxjs><observable> | 2020-01-30 18:59:11 | LQ_CLOSE |
59,995,278 | form that saves information entered into a data.txt file php none of them works | <p>i'am looking for form that has index.html and process.php
In index you enter Your Name:
Your age: (but you dont enter it gives you option from 10 to 50) and you click submit
and that information saves in data.txt file on /var/www/html not on client side.
I've tried hundred of them none of them works</p>
<p>Also p... | <php><html><forms> | 2020-01-30 22:11:24 | LQ_CLOSE |
59,996,193 | 'which' command outputs nothing in Ubuntu | <p>I want to figure out path of the executable command, but <code>which</code> says nothing. Why ? So and when it's usual case for <code>which</code>to return nothing about command's path. path is hidden/inaccessible for some types of executables or ...</p>
<pre><code>which sdk
</code></pre>
<p>sdk - it's <a href="ht... | <linux><bash><shell><ubuntu> | 2020-01-30 23:51:35 | LQ_CLOSE |
59,997,831 | Python: Turn Nested List to Dictionary | <p>I am trying to turn a nested list like this:
(Example list)</p>
<pre><code>[['A','1','2','3'], ['B','4','5','6'],...]
</code></pre>
<p>To a dictionary that looks like this</p>
<pre><code>{'A':'1','2','3','B': '4','5','6'}
</code></pre>
<p>Can someone please help me?</p>
| <python><list><dictionary><nested> | 2020-01-31 04:24:23 | LQ_CLOSE |
59,998,302 | convert vba macro to google sheets | i need a way to translate a vba excel macro to google sheets, the code below transfers a list of data to an invoice and then saves it as a pdf i searched online for a translator but didn't find it if some one knows one or if some one can translate this one.
thank you in advance
Private Sub CommandBu... | <javascript><excel><vba><google-apps-script><google-sheets> | 2020-01-31 05:20:47 | LQ_EDIT |
59,998,317 | Download fb videos, I have attached two images, just need download after on click | I have attached two image:
--------------------------
first is: my link where fb video link
second is: after click video opening & play
**Actually I want to download this video from the url when user click on the link then video will be download but currently its opening video & play....
but I don't want ... | <javascript><php><video> | 2020-01-31 05:22:14 | LQ_EDIT |
59,998,851 | Abnormal behavior of python's set function | <p>I was working on a problem which required the use of python's set function to be applied onto strings.
This is what I observed which is baffling me.
Please do tell me a reason as to why it occurs if anyone does know.</p>
<pre><code>>>> set('123456789')
{'2', '6', '7', '5', '9', '1', '8', '4', '3'}
>>... | <python><python-3.x><set> | 2020-01-31 06:21:42 | LQ_CLOSE |
59,998,926 | Can we have a 2 different textStyle inside styles.xml? | <p>I wanted to my title to have italic and bold at the same time. How can i achieve this on styles.xml? or is it possible to achieve this within styles.xml only?</p>
| <android><xml> | 2020-01-31 06:28:15 | LQ_CLOSE |
59,999,021 | How to extract text from a pdf file | <p>What is the best way to extract text from a pdf file.....
I have tried some
PyPDF2 -----> it only returns an empty string for all pages
tabula -----> it returns a weird table of NaN
the pdf I am trying to scrap is
<a href="http://imdagrimet.gov.in/sites/default/files/daas_bulletin/Vaishali_46.pdf" rel="nofollow ... | <python><pdf> | 2020-01-31 06:35:39 | LQ_CLOSE |
59,999,152 | SQL : Conversion failed when converting date and/or time from character string | I am working with data stored in SQL and I am having troubles inserting NULLS into a DATETIME Column.
Ideas? | <sql-server><datetime><null> | 2020-01-31 06:47:56 | LQ_EDIT |
59,999,863 | SyntaxError in python while using commas | <p><strong>Hi.I am new to python.I caught a syntax error while executing this code:</strong></p>
<pre><code>a="input("Enter a no.")"
print(type(a))
</code></pre>
<p><strong>But if I execute:</strong></p>
<pre><code>a='input("Enter a no.")'
print(type(a))
</code></pre>
<p><strong>Or:</strong></p>
<pre><code>a="inpu... | <python><python-3.x> | 2020-01-31 07:49:52 | LQ_CLOSE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.