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,214,058 | How to build a system that gets GPS data from 4000+ embedded devices and processes it in real time | <p>I want to develop a system that has 4000 embedded devices that send their GPS data every 10 second to the system and this system is expected to handle this amount of data flow and required to perform mathematical operations on these data. I want this system to be open for upgrades so it should handle adding more dev... | <operating-system><embedded><iot> | 2019-12-06 13:22:35 | LQ_CLOSE |
59,214,772 | Analog TrimLeft C# function | <p>How can I remove leading zeros from a string such as '0097619896'?</p>
| <sql><sql-server> | 2019-12-06 14:10:00 | LQ_CLOSE |
59,216,125 | How to select unique nested dictionaries from list | <p>I have a list with nesetd dictionaries:</p>
<pre><code>lst = [
{'a':{'a1':1,'a2':2},
'b':{'b1':1,'b2':2},
'c':{'c1':1,'c2':2}},
{'a':{'a2':2,'a1':1},
'b':{'b1':1,'b2':2},
'c':{'c1':1,'c2':2}},
{'a':{'a1':1,'a2':2},
'b':{'bb1':11,'bb2':22},
'c':{'c1':1,'c2':2}},
{'b':{'b1':1,'b2':2},
'a':{'a1':1,'a2':2},
'c':{'c1... | <python><python-3.x><dictionary> | 2019-12-06 15:36:28 | LQ_CLOSE |
59,216,302 | how to create a first vue js project | <p>I just started with vue.js. I created a simple project but it is not working.Please check what is wrong in the above code. I totally new to this I don't know what I have made mistake in this.</p>
<p>thank you </p>
<pre><code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<... | <vue.js> | 2019-12-06 15:47:59 | LQ_CLOSE |
59,219,028 | Transform info in json valid | <p>Transform this result in json valid.</p>
<pre><code>"{\"name\":\"log\",\"hostname\":\"denis-Latitude-E7470\",\"pid\":1007,\"level\":30,\"conextion\":\"DBA MongDB: \[32m%s\[0m\",\"msg\":\"online\",\"time\":\"2019-12-06T13:50:42.510Z\",\"v\":0}"
</code></pre>
| <javascript><node.js><json> | 2019-12-06 19:15:19 | LQ_CLOSE |
59,219,107 | Coping a row from sheet to another based on whether the candidate is accepted or rejected | <p>Now, I'm trying to create a semi automated tool in google sheets for hiring (self-use). I need a code to copy the whole row based on whether the candidate is (Accepted or Rejected) if the candidate is accepted I want to copy the whole row and paste it in the (Accepted Candidates Sheet).</p>
<p>Can anyone support me... | <google-apps-script><google-sheets> | 2019-12-06 19:21:57 | LQ_CLOSE |
59,219,450 | HOw Can I black & white camera in unity 2019.1.9? | I want make a filter camera for unity that black & white in unity 2019.1.9
how can I make it?
that can change it to RGB and black and white every time
thanks | <c#><unity3d> | 2019-12-06 19:48:09 | LQ_EDIT |
59,219,636 | How to convert string 21/01/2019 (dd/MM/yyyy) to Date object in same format using Java | <p>My input string is "22/12/2019" in "dd/MM/yyyy" format. I need to convert this string into Date object while retaining the format. The output still needs to be in dd/MM/yyyy format but it should be a Date object. Please advise</p>
| <java><string><date><datetime> | 2019-12-06 20:03:49 | LQ_CLOSE |
59,219,787 | Parallel vectors in C | I need some help with the use of parallel vectors. What I want to do is have 2 parallel vectors, 1 containing the alphabet and the other, the alphabet the other way around and when someone types in a word, it prints out the word using the inverted alphabet.
```#include <iostream>
#include <ctype.h>
using namespa... | <c++><arrays><vector> | 2019-12-06 20:16:48 | LQ_EDIT |
59,220,108 | How to sort array in javascript or typescript by a key but if key is same sort in alphabetical order? | <p>I have this array </p>
<pre><code>[
{
"Books": [],
"_id": "5dea9a11a8e1bf301c462ce4",
"FileName": "AAAAA",
"Order": 99999
},
{
"_id": "5dea9864a8e1bf301c462cdb",
"Books": [],
"FileName": "some1",
"Order": 3
},
{
"Books": [],
"_id": "5dea9873a8e1bf301c462ce1",
... | <javascript><arrays><typescript> | 2019-12-06 20:45:59 | LQ_CLOSE |
59,222,033 | Constructor in Java - Scanner Class | import java.util.Scanner;
public class Tutorials {
public static void main(String[] args) {
Car Vehicle = new Car();
Vehicle.supboys();
}
}
import java.util.Scanner;
public class Car {
private String Vehicle;
public Car(String name... | <java><java.util.scanner> | 2019-12-07 00:42:50 | LQ_EDIT |
59,223,666 | Directory conventions for extra files | <p>I have written a (python) script which identifies all node on its subnet (NAT subnet) and send an email if the IP address doesn't exist within a record. For this size of project, I don't want to run a database. I think a text file delimited by new lines with an IP address on each would be suitable. What is the appro... | <python> | 2019-12-07 06:45:00 | LQ_CLOSE |
59,223,833 | Pin point where the optional is returning nil | <p>The output of my code is "Optional(46 bytes)"
how can I pint point which variable is returning nil so I can adjust it.</p>
| <swift><xcode> | 2019-12-07 07:15:37 | LQ_CLOSE |
59,224,367 | SQL - Schemas - MS SQL Server | <p>I'm in a new job using Microsoft SQL Server.
Is there a way to show how all of these tables link together?</p>
| <sql><sql-server> | 2019-12-07 08:43:12 | LQ_CLOSE |
59,224,530 | How can I apply multiple transformation to the same key in a Python dictionary | <p>I am an inventory manager, and my stock is as below</p>
<pre><code>oldstock = {"A":100,"B":120,"C":150,"D":100,"E":230,"F":200,"G":180,"H":140,"I":90,"J":50}
</code></pre>
<p>I sold some items from each bin as below however (seems as though a list of dictionaries was the best way to represent it)</p>
<pre><code>s... | <python><list><dictionary> | 2019-12-07 09:10:55 | LQ_CLOSE |
59,224,869 | How to handle datecodes from excel in R with dplyr | <p>Hy everybody</p>
<p>I already imported a excelsheet with stock data. The import changes the appearance of the date column. This means, imported in R the dataset has structure as seen in dummy_df2:</p>
<pre><code>dates <- as.tibble(c("32143","32146", "32147","32148"))
Stock1 <- as.tibble(c("NA", "NA", "NA", ... | <r><excel><dplyr> | 2019-12-07 10:00:48 | LQ_CLOSE |
59,225,142 | Exam results processing | <p>I am trying to process around 8000 exam results I have put these in a datatable.</p>
<p>What I would like to know is how you would go about processing this data from a statistical point of view.</p>
<p>I have looked at averages and Max/min using summary in r.
I have used to scatter plot to plot the data.
I have us... | <r><dataframe><ggplot2><statistics><statsmodels> | 2019-12-07 10:42:30 | LQ_CLOSE |
59,225,770 | java main method wont compile because it cannot find a symbol to create an object | <p>im relatively new to java since im attending my first year at university.
currently we are doing OOP in class and i have the following problem:</p>
<p>i am creating a "Train", but when i try to compile it , it gives the following error:
<a href="https://i.gyazo.com/2d4f3ccc68f45419a9439ab9adb1a499.png[1]" rel="nofo... | <java> | 2019-12-07 12:03:12 | LQ_CLOSE |
59,226,210 | How to extract string between double quotes in java? | <p>I'm reading a response from a source which is an journal or an essay and I have the html response as a string like:</p>
<p>According to some, dreams express "profound aspects of personality" (Foulkes 184), though "others disagree" but truth is.</p>
<p>My goal is just to extract all of the quotes out of the given s... | <java><string> | 2019-12-07 12:57:18 | LQ_CLOSE |
59,226,549 | C++: Is there a way to access protected vector size via main function without turning it to public? | I've been working on a Shape program lately ( Some of you might remember my other questions about this... ;/ ) And I have a tiny problem which I want to fix.
In my Menu class, which holds all the functions related to the menu. I have a unique_ptr vector with the type of my base class Shape which holds all of the new... | <c++><class><vector><polymorphism> | 2019-12-07 13:38:50 | LQ_EDIT |
59,227,819 | Wait until two different users click a button and then go to a page | <p>Hi working on a website project where I want to wait until two separate users click a button and then have them both go to the same page. These users will be each in their own browser window.
I have searched the internet and went to research ajax but found that is not what I am looking for because I want the page to... | <javascript><php><jquery><html><ajax> | 2019-12-07 16:04:14 | LQ_CLOSE |
59,228,006 | create method channel after upgrading flutter- can not resolve method getFlutterView() | <p>i was using native android method in my flutter app using documentation which said use</p>
<pre><code>MethodChannel(flutterView, CHANNEL).setMethodCallHandler...
</code></pre>
<p>but after upgrading flutter the <code>MethodChannel</code> function does not require <code>flutterView</code> and
there is no <code>flut... | <android><flutter><flutter-channel> | 2019-12-07 16:25:31 | HQ |
59,228,396 | Letters to Numbers in an array | <p>Ok so basically I am working on a final grade calculator for believe it or not, finals. I was asked to use a picker view to select a letter (grade). I am trying to figure out how that when someone selects a letter grade it will use a number like 90 or 80 or so on so I can fit it into my math equation.</p>
| <ios><arrays><swift> | 2019-12-07 17:10:53 | LQ_CLOSE |
59,228,601 | How to save the items that a user bought in the database and prevent him to buy it again | <p>I need some help storing the files a user bought and downloaded. I have a table with files and their ID. When users buy and file it's just redirecting him to the download link. But I want to make PHP script insert into the database the ID of the files that user bought. But how to do it with multiple files and store ... | <php><mysql><field><store> | 2019-12-07 17:36:05 | LQ_CLOSE |
59,229,480 | What exactly does this compiler error want me to perform? | <p>Thank you in advance for reading ! So this is the code : </p>
<pre><code>#include<iostream>
#include<vector>
std::vector<int> MonkeyCount(int n);
int main() {
MonkeyCount(4);
return 0;
}
std::vector<int> MonkeyCount(int n) {
std::vector<int> MonkeyCountV;
for (... | <c++><vector> | 2019-12-07 19:32:52 | LQ_CLOSE |
59,230,960 | How can I store objects into an ArrayList without them duplicating in Java? | <p>So i have some code that takes a bunch of data and creates objects from that data. Here is the pseudo code. The main class looks like this:</p>
<pre><code>public static void main(String[] args) {
storage.addObject(2, 20, Jake, JE);
storage.addObject(5, 34, Kate, KI);
storage.addObject(3, 26, Joe, JL);
</code></pre>... | <java><arrays><object><duplicates> | 2019-12-07 22:56:15 | LQ_CLOSE |
59,231,816 | my code says segmantation fault when i run it can someone help me? | <p>}<a href="https://i.stack.imgur.com/R015I.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R015I.png" alt="enter image description here"></a></p>
<p>but when I run it it says segmentation fault and apart from that, I don't know if the code is correct.</p>
<p><a href="https://i.stack.imgur.com/Ncy... | <c++><arrays><segmentation-fault> | 2019-12-08 01:54:55 | LQ_CLOSE |
59,235,127 | Python class definition syntax (bracket) | <p>I found most guys said there is no difference with or without bracket in class definition. But my codes output different results for it. </p>
<pre><code>#!/usr/bin/env python
class Tree(object):
def __init__(self):
self.left = None
self.right = None
self.data = None
root = Tree()
root.d... | <python> | 2019-12-08 11:55:41 | LQ_CLOSE |
59,235,633 | How can you make a object access the variables in a method without using .this? | <p>By making the object in main function and calling its method and updating the variables from class.
example:</p>
<pre><code>public class Test{
int a;
void testMethod(){
//how to access the variable here?
}
public static void main(String[] args){
Test Obj = new Test();
obj.testMethod();
}
</code></pre>
<p>How to ac... | <java> | 2019-12-08 12:59:51 | LQ_CLOSE |
59,235,754 | how to create mysql dynamc pivot rows to colum | please am in need of urgent help from anyone who can solve this.
SELECT DISTINCT
_2_12_company.companyInitials,
_2_05_comptype.typeInitials
FROM
_2_12_company,
_2_05_comptype,
_2_19_companycomptype
WHERE
_2_12_company.id = _2_19_companycomptype.companyID AND _2_05_comptype.id = _2_19_... | <java><mysql><database><select><distinct> | 2019-12-08 13:14:09 | LQ_EDIT |
59,236,446 | How should I fix this - 'int' object is not iterable? | <p>Unlike other questions, I'm getting this error <em>without</em> using a looping construct.</p>
<p>Here's the code</p>
<pre><code>def makes_twenty(n1,n2):
return ( (sum(n1, n2) == 20) or ((n1 == 20) or (n2 == 20)) )
</code></pre>
<p>The error I receive -
<code>'int' object is not iterable</code>
<a href="http... | <python><python-3.x><function><sum><int> | 2019-12-08 14:35:03 | LQ_CLOSE |
59,237,227 | Php search filter showing all rows without filtering | <p>While displaying the filtered data, this sql can filter data as per $locationone and $locationtwo.</p>
<p>But it is failing to filter data as per <strong>$cate</strong></p>
<p>I mean its displaying all the rows from both locations and failing to filter it as per <strong>science(topic)</strong></p>
<pre><code>$cat... | <php><mysql> | 2019-12-08 16:00:34 | LQ_CLOSE |
59,237,461 | Why is my CSS keyframe fade in animation working? | <p><a href="https://i.stack.imgur.com/hrUR3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hrUR3.png" alt="enter image description here"></a> <a href="https://i.stack.imgur.com/YnCdm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YnCdm.png" alt="enter image description here"></a>... | <html><css><css-animations> | 2019-12-08 16:31:26 | LQ_CLOSE |
59,238,267 | will an hashcode ever give a negative value? | <p>In the code given, it was trying to give a valid index for a hashtable by checking for any collision using another method linearprobe. I am just confuse of why we need to check for index < 0, so will there be instance when hashCode will be negative? When/why will that happens?</p>
<pre><code>private int getHashI... | <java><hash><hashtable><hashcode> | 2019-12-08 17:57:03 | LQ_CLOSE |
59,238,685 | Can someone explain C# static variables usage to me, when accessing from another script? | <p>Keep in mind I'm new to C#. Static variables don't seem to serve the same purpose as in C/C++, Fortran, etc. so I'm struggling a bit, esp. with this:</p>
<p>I want to be able to attach game objects to variables using the inspector, but access those variables (say, the color of Text UIs) from another script, without... | <c#> | 2019-12-08 18:39:23 | LQ_CLOSE |
59,239,077 | MIUI 10 doesn't let service start activity - Xiaomi Redmi Note | <p>My app has a service and an activity. From the service, activity is called with following code:</p>
<pre><code>Intent intent = new Intent(getApplicationContext(), MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
</code></p... | <java><android><miui> | 2019-12-08 19:23:52 | HQ |
59,239,433 | convert html to html string in JS file | <p>I want to create some html via JS, therefore I need to write the html inside the JS file like:</p>
<pre><code>function createHtmlSection() {
return "<li class=\"chapter up-wrapper-btn\">" +
"<div>" +
"<button><i class=\"fa fa-plus\" onclick=\"addSection('up',this)\"></... | <javascript><html> | 2019-12-08 20:05:55 | HQ |
59,239,816 | Python 'print' function 'sep' parameter is not working as expected | <p>I am using Python version 3.7.4 on Windows 10 Enterprise.</p>
<p>I am facing a weird issue with Python's <code>print</code> function and especially <code>sep</code> parameter. </p>
<p>In Python REPL, when I use code <code>print(1, 2, 3, 4, 5, sep='\t')</code>, I get proper output as <code>1 2 3 4 5</co... | <python> | 2019-12-08 20:54:25 | LQ_CLOSE |
59,240,555 | C# Error CS0019, Operator '*' cannot be applied to operands of type 'double[]' and 'double' | <p>I have tried working on a vector addition code in C#, and part of it involves using math to determine X and Y values for a vector, and for some reason it gives me the error saying I cannot multiply an array value with a double precision floating point value. I have tried converting, but that has only created more er... | <c#> | 2019-12-08 22:40:44 | LQ_CLOSE |
59,240,905 | Get current OS language - Python | <p>I want to take the current OS language in Python.
For example if english are chosen, I want to get a code (or something like that) and when I change with shift+alt to other language, I want to take the newly changed language code.</p>
<p>Is this possible?</p>
| <python><operating-system><locale><python-3.8> | 2019-12-08 23:36:49 | LQ_CLOSE |
59,241,711 | Where is documentation on Python's `set`'s class methods? | I gather that Python's built-in type `set` has a number of useful class methods, such as `set.intersection()`. Where are they documented? I haven't found them documented [here](https://docs.python.org/3.7/library/stdtypes.html?highlight=set#set), which seems to cover only the instance methods. | <python><set> | 2019-12-09 02:11:43 | LQ_EDIT |
59,241,957 | .Net Core 3.1 not yet supported in Azure Pipelines hosted agents? Getting NETSDK1045 | <p>It's great that <a href="https://devblogs.microsoft.com/dotnet/announcing-net-core-3-1/" rel="noreferrer">.Net Core 3.1 is out</a>, but I'm not sure the Azure Pipelines hosted agents have caught up.</p>
<p>My YAML pipeline specifies:</p>
<pre><code>pool:
vmImage: 'windows-latest'
</code></pre>
<p>and the <code>... | <.net-core><azure-pipelines> | 2019-12-09 02:55:24 | HQ |
59,247,413 | Align both vertically and horizontally using Bootstrap flex | <p>After looking through the bootstrap 4 Flex doc, I can't seem to get the "align-item-center" property to work. I tested pretty much every example available online but really can't seem to change the vertical alignment of anything, it's driving me nuts. I join a simple HTML example I'm trying to make work. </p>
<p><d... | <html><css><bootstrap-4><flexbox> | 2019-12-09 10:58:31 | LQ_CLOSE |
59,250,049 | Date Regex with special character as optional pre element | <p>Date Regex with special character as optional pre element</p>
<p>I need a date regex for YYYY-MM-DD, plus the following four case: </p>
<pre><code>1978-12-20
>1978-12-20
>=1978-12-20
<1978-12-20
<=1978-12-20
</code></pre>
<p>How can I allow those 5 scenarios? </p>
| <javascript><regex><date><special-characters> | 2019-12-09 13:35:36 | LQ_CLOSE |
59,250,693 | I've deployed JButton using multiple layout managers, but it doesn't display properly | <p>I wanted to place several buttons to check the differences between the different layout managers. But the code I wrote shows only the buttons displayed by one layout manager, and the buttons of the other layout manager are not displayed at all. What should I do?</p>
<p>This is my code:</p>
<pre><code>import java.a... | <java><swing><awt> | 2019-12-09 14:13:50 | LQ_CLOSE |
59,250,938 | Reload page after 2 seconds using JavaScript | <p>I'm reloading the page like this <code>window.location.reload();</code> is there a way to have it do the same thing but after 2 seconds?</p>
| <javascript> | 2019-12-09 14:26:58 | LQ_CLOSE |
59,251,150 | Use non-local numbers to receive messages | <p>Can I use a Canadian number to send and receive SMS from US numbers?
And also a German number, which is marked as international, for receiving and sending SMS in Europe?</p>
| <twilio> | 2019-12-09 14:39:37 | LQ_CLOSE |
59,252,964 | I am getting this error while building a Personal Portfolio website in Codepen | **The height of the welcome section should be equal to the height of the view port.**
Here is the project's link:
- https://codepen.io/Aaradhyacodepen/pen/jOEEZav?editors=1100
| <javascript><html><css><codepen> | 2019-12-09 16:28:27 | LQ_EDIT |
59,253,025 | 'Python -m' in terminal | <p>I have met this pattern for quite some time when I see people try to execute a package through python. But I am not sure what does '-m' mean here. Is it a specific pattern that you need to follow?
for example:</p>
<p><code>python -m [library] download [model]</code></p>
<p>or </p>
<pre><code>python -m venv env (t... | <python> | 2019-12-09 16:32:20 | LQ_CLOSE |
59,255,498 | How to register a global state for actix_web? | I am a new user of `Rust` and `actix_web` crate. I am trying to set up a global state for my HttpServer, and it seems like `register_data` is the proper API. (I could be wrong about this API).
But from the [doc][1], it is not clear to me how to create a single instance of Application Data shared by all HttpServer th... | <rust><actix-web> | 2019-12-09 19:37:15 | LQ_EDIT |
59,255,817 | System Linq Enumerable error while using intersect | <p>I have 3 lists and I'm trying to display their common items in a text box, and while I am implementing the method</p>
<pre><code>var result = l1.Intersect(l2);
textBox1.Text = "";
textBox1.Text = result.ToString();
</code></pre>
<p>while l1 is my first list and l2 is my second list
I get the erro... | <c#><list><linq><text> | 2019-12-09 20:04:12 | LQ_CLOSE |
59,257,552 | Linux commands in BASH shell | I am trying to execute this command for a linux assignment, but I cannot figure out what the command should be? I know to append to a file you use the >> but I am not sure how to redirect and append the output together.
"9. Redirect the output of the process list (ps) only for httpd process appending it to final.txt... | <linux><append><io-redirection> | 2019-12-09 22:24:24 | LQ_EDIT |
59,257,781 | Can I instanciate a multi nic vm in a devtest lab environment? | Can I have multiple nics ressource and assigne them to the devtest lab vm ?
Can I specied the Lab virtual network CIDR ?
Can I set subnet address range ? | <azure><azure-devtest-labs> | 2019-12-09 22:48:56 | LQ_EDIT |
59,259,747 | Insert query works through SSMS but SqlCommand code gets error "Insufficient result space to convert uniqueidentifier value to char." | Table for the inserts:
CREATE TABLE [dbo].[CcureMessage](
[CcureMessageId] [uniqueidentifier] NOT NULL,
[Event] [varchar](20) NULL,
[Type] [varchar](20) NULL,
[Message] [varchar](max) NOT NULL,
[Xml] [varchar](4000) NOT NULL,
CONSTRAINT [PK_CcureMessage] PRIMARY KEY CLUSTERED
( [CcureMessag... | <c#><sql-server><ado><guid><uniqueidentifier> | 2019-12-10 03:25:17 | LQ_EDIT |
59,260,014 | Creating a 64 bit application in Visual Studio with SysNative | I'm trying to build a 64 bit application using visual studio in C++
I need to access `Sens.dll` in windows directory. Since Visual Studio is 32 bit application, I have to use **SysNative** instead of **System32**
`C:/Windows/SysNative/Sens.dll`
because of File System Redirection.
If I change the path to `C:... | <c++><visual-studio><32bit-64bit><include-path> | 2019-12-10 03:59:19 | LQ_EDIT |
59,262,154 | Whats the meaning of mock test using Mockito | <p>When using mockito, I guess i'm supposed to use when().thenreturn to customize the return value, even that's different from the real method. I just got confused that if everything is mocked (or fake?), how does mockito work to test if the method truly works well?</p>
| <java><unit-testing><mocking><mockito> | 2019-12-10 07:22:45 | LQ_CLOSE |
59,262,697 | Python While Loop with Multiple Conditions not Exiting | <p>I have a code in which exits only when anyone of the 3 variables cross 7</p>
<pre><code>while(a!=7 or b!=7 or c!=7):
#My algorithm to increase values based on input
#end of while
</code></pre>
<p>My code never exits the while loop when anyone of of the variables cross 7.
However when I change the code to</p>
... | <python><while-loop> | 2019-12-10 08:04:59 | LQ_CLOSE |
59,263,557 | How I Do SQL Server Column Auto Filter | Hello every one i need help how i filter SQL Server Column Data Filter Like all the word which starts from a Or A come on first line Like B or b come on the second ...
Create Table Table_my
(
C1 varchar(50)
, C2 varchar(50)
,
)
Select*
From Table_my
WHERE C1 Like... | <sql><sql-server> | 2019-12-10 09:03:37 | LQ_EDIT |
59,263,582 | How to find the size of an image in bytes using python? | <p>I couldn't find anyway to print the size of an image in bytes. </p>
| <python><python-3.x><python-2.7><python-imaging-library> | 2019-12-10 09:05:04 | LQ_CLOSE |
59,263,964 | Groupby sum, count the number based on condition and concatenate in pandas | <p>I have a dataframe as shown below</p>
<pre><code>Sector Property_ID Unit_ID Unit_usage Property_Usage Rent_Unit_Status Unit_Area
SE1 1 1 Shop Commercial Rented 200
SE1 1 2 Resid Commercial Rented 200
SE1 1 3... | <pandas><pandas-groupby> | 2019-12-10 09:26:41 | LQ_CLOSE |
59,264,175 | how to make 2 arraylist on an adapter, adapted to one API? | <p>how to make 2 arraylist on an adapter, adapted to one API. I have given a list of cases here metadataList; but it doesn't work because the activity.java part must have a Metadata List implementation. How to retrieve data with different getter setters (2 getter setters) but can be combined in one adapter?</p>
<p>AP... | <java><android> | 2019-12-10 09:37:43 | LQ_CLOSE |
59,264,814 | What is the most frequent way to send an HTTP request in the industry at the moment (AJAX, Fetch API, Async/Await)? | <p>I know that AJAX used to be more prevalent in the past when it came to creating HTTP requests and i'm curious on what the industry standard is now?</p>
| <javascript> | 2019-12-10 10:12:28 | LQ_CLOSE |
59,265,157 | Use two nested for structures to log the following pattern. Any ideas? | <pre><code> 0 1 0 1
1 0 1 0
0 1 0 1
1 0 1 0
</code></pre>
<p>Any ideas on how to get this done in JavaScript using 2 nested for loops? </p>
| <javascript><loops><for-loop> | 2019-12-10 10:31:04 | LQ_CLOSE |
59,265,381 | How to use string parameters inside groovy script in jenkins freestyle project? | I have created a jenkins freestyle project executing groovy script inside which i need to call an api to validate username and password. How to pass these parameters and use the same inside the groovy script.
A bit urgent.
| <jenkins-groovy> | 2019-12-10 10:42:25 | LQ_EDIT |
59,267,250 | is there any method to count an average date time in python and visualize it? | I am sorry I am new in python. This is my date time. I have it in csv. Here I have two columns CALL and Time. How can I count the average date time so I will know when is the best time to call
```
Time;"Call"
0 2019-12-10 11:35:55;"Answer"
1 2019-12-10 11:31:42;"Not Answer"... | <python><csv><datetime> | 2019-12-10 12:28:47 | LQ_EDIT |
59,268,211 | Reading a ~180KB file line by line results in StackOverflowException | <p>This text file has ~15,000 short lines. I read it this way:</p>
<pre><code>using (var reader = new StreamReader("words.txt")) {
while (reader.Peek() >= 0) {
list.Add(reader.ReadLine());
}
var r = new Random();
var randomLineNumber = r.Next(0, list.Count - 1);
InterfacePassword.Text = ... | <c#> | 2019-12-10 13:21:36 | LQ_CLOSE |
59,269,400 | Stop a blocking goroutine | <p>How can I kill a goroutine which is blocking. An idea is that returning from the host function would be a solution but I'm not sure if this kills the goroutine or not.</p>
<pre><code>func myFunc() int {
c := make(<-chan int)
go func(){
for i := range c {
// do stuff
}
}()
return 0 /... | <go><channel><goroutine> | 2019-12-10 14:25:12 | LQ_CLOSE |
59,270,289 | Split on newline, but not newline-space in JS | <p>I am trying to split my string into an array on every new line, but not if a newline begins with a space. </p>
<pre><code>ORGANIZER;organizer@example.com //YES
ATTENDEE; user@example.com, another@exa //YES
mple.com, peter@example.com //NO
DESCRIPTION;LANGUAGE=en-US //YES
</code></pre>
| <javascript><node.js><split> | 2019-12-10 15:11:41 | LQ_CLOSE |
59,273,055 | Selenium on Google Colab, PermissionError: [Errno 13] Permission denied: '/content/chromedriver.exe' | I have been using Google Colab for my python projects. I want to learn & implement Selenium using Google Colab. I am trying to log in to Facebook as shown below. But, I am stuck with 'Permission error'. I have looked into various posts & tried to execute suggested solutions such as (https://stackoverflow.com/questions/... | <python><selenium><google-chrome><selenium-chromedriver><google-colaboratory> | 2019-12-10 18:05:29 | LQ_EDIT |
59,273,234 | How To stay Logged In, MySQL+Python 3+ tkinter | <p>I Made a Login+Register Page using the Tkinter, python3, and MySQL. Now I want to do the rest of my application but want to avoid trying to log in every time. I couldn't find the code to stay logged in. Does anyone know? </p>
| <python><mysql><python-3.x><authentication><tkinter> | 2019-12-10 18:19:38 | LQ_CLOSE |
59,275,073 | PHP connecting to database fails without error | <p>I am trying to connect to databse on my server by using this code:</p>
<pre><code><?php
$username = "username";
$servername = "localhost";
$password = "password";
echo "Before connection";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->conne... | <php><mysql><database> | 2019-12-10 20:44:46 | LQ_CLOSE |
59,275,613 | How does SQL SERVER broke down View code and pick the right tables to extract? | I encountered a problem regarding views in SQL SERVER 2017.
When query with a view, which has multiple underlying tables behind. Besides table involved in SELECT Clause, other tables also get logical read by SQL Server, want to know why.
So, here is scenario:
/***************************************************... | <sql-server><join><view> | 2019-12-10 21:28:02 | LQ_EDIT |
59,279,006 | If else statement problem in android studio | I know this is a very silly question. But i am stuck in this and I have no idea how to solve it.
There are some variables with values:
> float total = 74.67 ;
String grade = "", point = "";
And with this values I want to do this:
if(total>=80){
grade = "A+";
point = "4.00";... | <java><android><if-statement><conditional-statements><relational-operators> | 2019-12-11 04:42:12 | LQ_EDIT |
59,279,176 | NavigationLink Works Only for Once | <p>I was working on an application with login and after login there are categories listed. And under each category there are some items listed horizontally. The thing is after login, main page appears and everything is listed great. When you click on an item it goes to detailed screen but when you try to go back it jus... | <ios><xcode><navigation><swiftui><navigationlink> | 2019-12-11 05:05:12 | HQ |
59,283,596 | Why does awk always print full lines? | <p>When attempting to use <code>awk</code> to get the process ID from the output of <code>ps aux</code> like so:</p>
<pre><code>ps aux | awk "{ print $2 }"
</code></pre>
<p>No matter what number of row I attempt to print, <code>awk</code> always outputs the full line. I've never managed to get it to work properly. I'... | <bash><macos><awk> | 2019-12-11 10:24:00 | LQ_CLOSE |
59,284,743 | Cloud-build Trigger | <p><strong><em>1.I want to build trigger on Cloud build for only specific branches</em></strong></p>
<p><strong><em>2.It should work with both branches as well as tags in same trigger</em></strong></p>
<p>Any solution/suggestion</p>
<p>Thanks in advance</p>
| <google-cloud-build> | 2019-12-11 11:24:23 | LQ_CLOSE |
59,287,355 | json: cannot unmarshal object into Go value of type error with certain values | <p>Can I decode certain values from json to a struct? I am getting a response like this <a href="https://developer.github.com/v3/gists/#response-5" rel="nofollow noreferrer">https://developer.github.com/v3/gists/#response-5</a> when creating a gist and I created a struct like so:</p>
<pre><code>type GistResponse stru... | <json><go> | 2019-12-11 13:55:37 | LQ_CLOSE |
59,287,387 | Combine a JS to conditional | <p>JS newbie here. I have a landing page with two options - once and regular (two buttons). we have to include a script to the page, but can't have both firing and rather need it to be conditional. </p>
<p>The scripts are like this:</p>
<pre><code> <!-- Regular Donation -->
<script type="text/javascrip... | <javascript><arrays><if-statement><conditional-statements> | 2019-12-11 13:57:21 | LQ_CLOSE |
59,289,148 | How to create web push notification wen insert data in database with php | <pre><code><script src='push.min.js' type="text/javascript"></script>
<?php
require_once 'dbconfig.php';
$task = $db_con->prepare('SELECT * FROM table WHERE notification = "unread"');
$task->execute();
while($rows=$task->fetch(PDO::FETCH_ASSOC))
{
?>
</code></pre... | <javascript><php> | 2019-12-11 15:31:17 | LQ_CLOSE |
59,289,471 | How to display programmable exactly what time? I need that part code | <p>It is necessary to create an analog clock.How to display programmable exactly what time? I need that part code.Thank you</p>
| <android-studio> | 2019-12-11 15:49:21 | LQ_CLOSE |
59,292,305 | Pytthon / TXT: code to copy text after string | <p>I have a txt file that will be different for different users, it looks something like:</p>
<pre><code>NAME: Joe Bloggs
USERNAME: BLOGJOE
EMAIL: Joe.Bloggs@JB.com
PASSWORD: IAMJOE
</code></pre>
<p>I am trying to make an function where I can choose optional inputs for example, I want username and Password, then it w... | <python><function> | 2019-12-11 18:55:51 | LQ_CLOSE |
59,294,143 | How to start and stop a MS edge browserwindow from a VB script | So I want to start an MS Edge browser and close it after a few moments.
I've tried some things like the Microsoft Internet Controls.
But I need a different browser than the IE.
Dim pi As New Process
pi = Process.Start("shell:Appsfolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!Microsof... | <.net><vb.net><microsoft-edge> | 2019-12-11 21:11:15 | LQ_EDIT |
59,294,443 | awk and flagging identical patterns | <p>I'm missing something about awk pattern matching a using flags --</p>
<p>Given a file:</p>
<pre><code>2019 foo
a
b
c
2019 bar
d
e
f
2019 foobar
g
h
i
</code></pre>
<p>I can use awk with flags and get the expected output --
<code>awk '/foo/{flag=1;next} /^[0-9]+/{flag=0} flag' file</code></p>
<pre><code>... | <linux><bash><awk> | 2019-12-11 21:34:37 | LQ_CLOSE |
59,294,807 | How to match all strings that has only one dot using regular expression | <p>I need to capture strings containing only one dot. String will mostly contains domain names like </p>
<p>test.com, fun.test.com, lesh.test.com.</p>
<p>I need to check only the first one and to ignore the string that has more than one dots.</p>
<p>How can I do this using regex?</p>
| <regex><validation> | 2019-12-11 22:05:19 | LQ_CLOSE |
59,297,931 | Get levels for the Reply system in php+sql | <pre><code> id user_id comment_id body parent level
94 4 28 first reply NULL NULL
95 4 28 second reply NULL NULL
96 4 28 reply to the first reply 94 1
97 4 28 rep... | <mysql><sql><pdo> | 2019-12-12 04:54:07 | LQ_CLOSE |
59,300,486 | Can someone help me to fix this code? I search everywhere and I found nothing helpful | Please help fix this: Redundant conformance constraint 'T': 'ReusableView'
[enter image description here][1]
[1]: https://i.stack.imgur.com/9a1ap.png | <ios><swift> | 2019-12-12 08:33:21 | LQ_EDIT |
59,300,584 | Clearing a static list in C# | <p>I'm trying to clear a static list from my "playerStats" script which I use to access static variables globally. Adding elements to the list works just fine (with playerStats.myList.Add(levelNumber)), but when I try to use myList.Clear I get this error: </p>
<p><em>"Only assignment, call, increment, decrement, await... | <c#><unity3d> | 2019-12-12 08:39:50 | LQ_CLOSE |
59,301,566 | Python double for function | <p>I built this Python code with the intent to match each first name with the last name:</p>
<pre><code>first_names = ['Jane','Sam','Deborah']
last_names = ['Simmons','Kaybone','Stone']
for f_name in first_names:
for l_name in last_names:
print(f_name.title() + " " + l_name.title())
</code></pre>
<p>But ... | <python> | 2019-12-12 09:37:39 | LQ_CLOSE |
59,302,487 | how to get text from this element I can't understand this element |
How can I get text of this element please help..???
<div class="status-value" id="divdoctyp" xpath="1">AADHAAR CARD</div>
I tried this
WebElement doctype= driver.findElement(By.xpath("//div[@id='divdoctyp']"));
String type=doctype.getAttribute("type");
String label=doctype.getText();
... | <java><selenium-webdriver><gettext><webdriverwait><getattribute> | 2019-12-12 10:27:01 | LQ_EDIT |
59,302,724 | plus array column with with conversion that array_column in php | I want to create a accounting system. I insert all information that i need them in array but I have problem to showing array.
my accounting system has some ways to get shop and my price column in array have all the ways that isolated with `,` sign.
my array like this:
```php
$array = [
array(
... | <php><arrays> | 2019-12-12 10:40:13 | LQ_EDIT |
59,304,685 | How to use atoi with an int and malloc? | <p>When I try and use atoi with an int and malloc I get a bunch of errors and key is given the wrong value, what am I doing wrong?</p>
<pre><code>#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct arguments {
int key;
};
void argument_handler(int argc, char **argv, struct argumen... | <c><pointers><malloc><atoi> | 2019-12-12 12:33:01 | LQ_CLOSE |
59,306,162 | C++ Remove all non-number charachters from std::string | <p>What is an efficient way to remove all chars within in a string which are not in the range from 0 to 9?</p>
<pre><code>string s = "h3ll0";
string numbers = removeNonNumbersFromString(s);
cout << numbers << endl;
</code></pre>
<p>output should be <code>30</code></p>
| <c++><regex><string> | 2019-12-12 13:52:24 | LQ_CLOSE |
59,306,404 | I made a platformer! wait... something went wrong :\ | i have started with making a platformer. but my first attempt was a biiiig failure.
code:
sorry, the code is not working, it says 'invalid code format'
i'll just leave the link to download it...
https://yadi.sk/d/dtiUXyAL-KV8vQ
The error is:
Traceback (most recent call last):
File "it dosen't mat... | <python><pygame> | 2019-12-12 14:06:14 | LQ_EDIT |
59,308,807 | Can anyone help me with the errors the given code showing? Help me to compile the code fully | It's a manipulation of two codes.
first i send the latitude and longitude value found from the gps module by sms(arduino,gsm module), then by another code i send it to a php file in the server by using http protocol(arduino+gps/gsm/gprs shield). Now when i am merging two codes,it's showing errors like below:
... | <c++><arduino> | 2019-12-12 16:19:40 | LQ_EDIT |
59,309,510 | Formatting LocalDate in Java | <p>I defined the following format in Java :</p>
<pre><code>//define format of YYYYMMDD
private final DateTimeFormatter dtf = DateTimeFormatter.BASIC_ISO_DATE;
</code></pre>
<p>My application fetches a certain date from the calendar:</p>
<pre><code>LocalDate localDate = fetchDate(); // fetch date in format "yyyy-mm-d... | <java><datetime><localdate> | 2019-12-12 17:02:35 | LQ_CLOSE |
59,309,520 | I am buildin an E-commerce websit using spring,hibernate and h2 in JavaEE. I'm getting this error ...Please help ..Thanks in advance | WARNING: Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'homeController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Cou... | <spring><dependency-injection> | 2019-12-12 17:03:09 | LQ_EDIT |
59,311,189 | Crash when attempting to save a String to UserDefaults in Swift | <p>I am using this line of code to save a String to UserDefaults,</p>
<pre><code>UserDefaults.standard.set(userSelected, forKey: "myKeyString")
</code></pre>
<p>However it results in the crash,</p>
<pre><code>[User Defaults] Attempt to set a non-property-list object (Function) as an NSUserDefaults/CFPreferences valu... | <ios><swift> | 2019-12-12 19:00:25 | LQ_CLOSE |
59,313,193 | Python - most accurate time, timezone, calendar library/module | <p>What is the most accurate library or module for python for time zone conversions, i.e. local time to UTC conversions, calendar day conversions that address many historic wartime time zone changes, timezone adoptions and splits, etc over the last couple of centuries? </p>
| <python><datetime><time> | 2019-12-12 21:48:40 | LQ_CLOSE |
59,313,358 | Build-in exception length fewer than expected? | I go over the all build-in exception in JDK, I only find `SizeLimitExceededException` when size exceed the expected length. However, if I want to throw a exception when size limit is below the expected length, there is not such build-in exception class that I can call? | <java><exception> | 2019-12-12 22:05:05 | LQ_EDIT |
59,313,460 | is there a way to disable in Twillio that i can call out with unverified numbers | is there a way to disable in Twillio so that i can call out with unverified numbers?
I'm trying to set up some kind of integration Twillio, Fusionpbx, and Zoho CRM.
and this is where I get stuck I need to disable the feature to only allow outbound from verified numbers. | <twilio> | 2019-12-12 22:14:21 | LQ_EDIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.