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,587,063
My bruteforce machine (built with java using selenium and web-driver) is way too fast that it does not login properly even with correct login info
<p>I am building a brute-force machine with Java using selenium and web-driver. The program basically asks the user for URL of the website login page, inspect element selector for username, password, and login button, and it would automatically input the passwords and click on the login button automatically at a very f...
<java><selenium><webdriver><brute-force>
2020-01-04 01:02:38
LQ_CLOSE
59,587,706
C# Palindrome Test
<p>I need to create a IsPalindrome function where it will determine if a provided string is a palindrome. Alphanumeric chars will be considered when evaluating whether or not the string is a palindrome. With this said, I am having trouble trying to disreguard the spaces and the Caps. Here is what my function looks like...
<c#><function><palindrome>
2020-01-04 03:44:08
LQ_CLOSE
59,588,031
How do run a task in background and even if app terminated in xamarin forms?
<p>I need to run a task at a specified time even if my app in the background or terminated in Xamarin Forms(Android and iOS). Please suggest me the best way to do it.</p>
<c#><xamarin><xamarin.forms><xamarin.android><xamarin.ios>
2020-01-04 04:59:41
LQ_CLOSE
59,588,489
About Initializing Pointers in C++
<p>I've been reading C++ Primer 5th edition. It mentions that </p> <blockquote> <p>It is illegal to assign an int variable to a pointer, even if the variable’s value happens to be 0.</p> </blockquote> <p>I give it a try, and find the following result:</p> <pre><code>int *u = 0; // success int *w = 123; // fail /...
<c++><pointers>
2020-01-04 06:31:22
HQ
59,589,685
Swift - search strings in TextView and make them bold
<p>I have an <code>UITextField</code> with long text inside, I need to find all the occurrences of a string inside the text and make them bold. I know I should use <code>NSMutableAttributedString</code> for making the text bold, but how can I search specific substring inside the text?</p>
<ios><swift><uitextfield><nsmutableattributedstring>
2020-01-04 10:02:40
LQ_CLOSE
59,590,110
How to disable wifi show password in ubuntu 18.04
<p>Is there any way to disable wifi show password in ubuntu 18.04 or is there any way stop system to store wifi passwords. </p>
<linux><security><wifi><ubuntu-18.04><disable>
2020-01-04 11:09:19
LQ_CLOSE
59,590,374
How to turn on User Location - Blue Dot
<p>I'm playing with this example - <a href="https://www.raywenderlich.com/425-mapkit-tutorial-overlay-views" rel="nofollow noreferrer">https://www.raywenderlich.com/425-mapkit-tutorial-overlay-views</a></p> <p>But how do I turn on User Location? (Blue dot)</p> <p>Thanks</p>
<ios><swift><iphone><xcode>
2020-01-04 11:50:29
LQ_CLOSE
59,590,998
How to create numpy array with every alternative number starting from 5 to 55
<p><strong>please help</strong> *I've just started python and I'm lost here * *kindly just tell me the way I'll do it *</p>
<python><numpy>
2020-01-04 13:11:15
LQ_CLOSE
59,591,166
How can I make Angular HTTP Post wait for node js response
<p>i am new to Angular/Node JS, and I am doing a project for university where I am trying to implement authorization/authentication in my frontend and backend.</p> <p>So I made the method Login in the Node JS and testing with postman the response is what I want. But when I send call the method login in the Angular it ...
<node.js><angular><authentication><authorization>
2020-01-04 13:32:24
LQ_CLOSE
59,591,360
Regex remove all text to the left of certain last character
Im trying to remove all the text which falls before the last character in a regex pattern. Example: ``` rom.com/run/login.php ``` Becomes: ``` login.php ``` How would I go about doing this in javascript? I'm new to regular expressions.
<javascript><node.js><regex><npm><substring>
2020-01-04 13:57:55
LQ_EDIT
59,591,724
Sort a vector by specific member C++
<p>Is it possible to sort a <code>vector</code> by a specific member of it's class? </p> <p>I have a class called <code>Car</code>:</p> <pre><code>class Carro { private: int positionX; int place; public: Carro(string marca, float energiaInicial, float energiaMaxima, int velocMax, string model = "mode...
<c++><class><sorting>
2020-01-04 14:40:28
LQ_CLOSE
59,591,843
Counting the Digits in a number
<p>So, I want to find a way to make sure an int is exactly 18 digits long, in Python, and give different responses depending on whether it is or isn't. So, if, say, 336819654318227461 was entered, it would respond by saying "Yes, that's 18 digits!" or whatever else, but if, say, 15 was entered, it would say something l...
<python><discord.py>
2020-01-04 14:55:45
LQ_CLOSE
59,592,150
Component not showing its content on lazy loading
<p>I am having trouble sharing components in modules in Angular 8. I was trying to build a stackblitz but I got stuck in some problem. I don't know if the problem is related to Angular or stackblitz itselft. My example can be accessed here</p> <p><a href="https://stackblitz.com/edit/angular-jdw21n" rel="nofollow nore...
<angular><stackblitz>
2020-01-04 15:31:07
LQ_CLOSE
59,593,198
Cannot read property 'previous' of undefined
<p>Functions in firebase throws me this error:</p> <pre><code>TypeError: Cannot read property 'previous' of undefined at exports.sendNotifications.functions.database.ref.onWrite (/srv/index.js:5:19) at cloudFunction (/srv/node_modules/firebase-functions/lib/cloud-functions.js:131:23) at /worker/worker.js:825:24 at &lt...
<javascript><node.js><firebase><vue.js><google-cloud-functions>
2020-01-04 17:34:09
LQ_CLOSE
59,593,950
How can send mail in java, nonlogin process
<p>I have a requirement of sending the email with the attachment of a file. I found few online java code but that is through gmail/yahoo with login credentials. But I want to send it as anonymous instead of logging in.</p> <p>Similar to what is available in oracle plsql UTIL_SMTP</p> <p>Any body can help here! Thanks...
<java>
2020-01-04 19:06:53
LQ_CLOSE
59,594,260
How to Fix Segmentation fault (core dumped) Error
<p>I am trying to read some values from a txt file and load it into mem, this is actually a dataset for neural network training, I am getting a segmentation fault when the following function is called, how can i fix this error, my main issue is this error does not show it is thrown, how can i find the line and resolve ...
<c>
2020-01-04 19:50:12
LQ_CLOSE
59,594,943
Capture and Store Google Places Data
I need to make a job that summarize amount of business in one specific region (district, city, province or country). I would like to use the Google Places API, but this returns only until 60 places. In one city, for example, it can there are more que 30,000 places register in Google Maps. I need this places for summa...
<google-maps><google-maps-api-3><google-api><google-places-api>
2020-01-04 21:18:32
LQ_EDIT
59,595,168
Given a binary array return a count the number of consecutive 1's
<p>Write a function that accepts a binary array. This function should return the largest consecutive number of 1's in a row.</p>
<javascript><arrays><count>
2020-01-04 21:53:45
LQ_CLOSE
59,595,814
how to convert this json to array. i want display data[x] for my view as table
<p>{ laporan": [ { "segmen": "pu", "judul_baris": [ { "judul": "Tanggal" }, { "judul": "Penambahan Perusahaan" }, { "judul": "Penambahan TK Baru" }, { "judul": "Penambahan TK Eksisting" }, { "judul": "Pengurangan TK" }, { "judul": "Penambahan Iuran" } ], "nilai_baris": [ { "data0": "01-01-2020", "data1": 0, "data2": 0,...
<php><json><codeigniter><multidimensional-array>
2020-01-04 23:44:28
LQ_CLOSE
59,596,468
Is it possible, in a conceptual level, to realize distribute computing in an assembly/compiled code level?
<p>The goal of this question is to ask if it is possible to have some compiled code (think in terms of an ordinary program, not necessarily written in any special way [e.g multi-threaded] or in any particular paradigm/language) being sent through the network to be somehow processed in a cpu located in another machine.<...
<assembly><distributed><thread-synchronization><message-passing><compiled>
2020-01-05 02:10:33
LQ_CLOSE
59,596,712
How can I change an IBAction to mouseEntered?
<p>I want to create an IBAction when my mouse enters an NSButton. Whenever I create an IBAction from the button, it only works when I click it.</p> <p>How can I make it so that the IBActions works when my mouse enters the button?</p>
<swift><macos><cocoa><ibaction>
2020-01-05 03:15:48
LQ_CLOSE
59,598,286
How to use time.Parse with string Go?
<p>I have func use to get hour . </p> <pre><code>func GetHourFromAPI(lastUpdate string) int { t, err := time.Parse(time.RFC3339, lastUpdate) var hourTime = t.Hour() if err != nil { fmt.Println(err) } return hourTime } </code></pre> <p>lastUpdate is type string like this : "20190925141100...
<go><time>
2020-01-05 08:48:12
LQ_CLOSE
59,598,361
Angular app with firebase auth and node.js / mongodb
<p>I am just planning architecture for my web app and I just wanted to ask you, if it is good idea to use Firebase auth with Angular and mongoDB as a database. (I don't want to use Firestore realtime database)</p> <p>Is a good idea to use queries directly from my Angular client or do I need some node.js/express backen...
<javascript><node.js><angular><mongodb><firebase>
2020-01-05 09:00:05
LQ_CLOSE
59,598,433
Cannot Compile Java project
<p>I'm trying to compile an old java program that I wrote on BlueJ but now trying to run it without it. It's a simple code that uses <code>java.awt., java.io.*, and java.util.*</code> if that makes a difference.</p> <p>I have the java JDK downloaded and all variables set. I can run a different program that I coded wit...
<java>
2020-01-05 09:12:14
LQ_CLOSE
59,598,768
Order by error in creat view in sql server
**CREATE VIEW tblSanPham_VIEW AS SELECT TenSP, MaDanhMuc, Mamau FROM tblSanPham ORDER BY MaSP DESC** Msg 1033, Level 15, State 1, Procedure tblSanPham_VIEW, Line 6 [Batch Start Line 47] The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless...
<sql><sql-server>
2020-01-05 10:07:22
LQ_EDIT
59,599,940
Parse error: syntax error, unexpected 'exit' (T_EXIT) in C:\xampp\htdocs\Chat\Chat\includes\signup.inc.php on line 12
<p>trying to make a sign up page but when someone signs in an error comes, why? line(s): 12.</p> <pre><code>if (empty($username) || empty($password) || empty($passwordrepeat)) { header("Location: ../signup.php?error=emptyfeilds&amp;".$username) exit(); // &lt;-- Here! </code></pre>
<php>
2020-01-05 12:38:43
LQ_CLOSE
59,600,131
JavaScript function does not work. Help a newbie :\
<p>I'm working on a linear gradient generator. I wanted to add a random gradient function, so it picks the background style and sets a gradient with two random colors. Everything worked until i added this random function. It looks like this:</p> <pre><code>function getRandomInRange(min, max) { return Math.floor(Ma...
<javascript><function>
2020-01-05 13:02:01
LQ_CLOSE
59,600,742
Can someone explain this html switch code to me?
// I don't really understand the switch here, from what I know the switch function is supposed allow me to write certain cases and each case is supposed to redirect me to a function, this is an example from my college slides, are the cases numbered "1234","12345", "123" or are those the passwords the user might enter? ...
<javascript><switch-statement>
2020-01-05 14:15:34
LQ_EDIT
59,601,078
SQL How to create where clause to filter last six periods with this format YYYYMM
I want to run a query with a criteria that sums the previous 6 periods with the following period format yyyymm Period Usage ====== ===== 201907 30 201908 40 201909 50 201910 60 201911 70 201912 60 202001 20
<sql><sql-server>
2020-01-05 14:54:33
LQ_EDIT
59,601,557
I have no idea why this error: "missing 1 required positional argument: 'self'"
<p>This is my code:</p> <pre><code> from tkinter import Tk, Button import GUI root = Tk() b = GUI.time button1 = Button( root, text="Local time", command=b.local_time # text on top of button ) # button click event handler button1.pack() button2 = Button( root, text="Greenwich time", command=b.greenwich_t...
<python><python-3.x><oop><tkinter>
2020-01-05 15:52:25
LQ_CLOSE
59,603,355
Passing a parameter on click gives an error
<pre><code> $(".editorCancel").click({param1: kind}, closeMainMenu); function closeMainMenu(event){ console.log(event.data.param1); } </code></pre> <p>This will print the right value <code>param1</code>, <strong>but also print an error :</strong></p> <blockquote> <p>Cannot read property 'data' of unde...
<jquery>
2020-01-05 19:17:56
LQ_CLOSE
59,604,795
How to verify it's the same computer
<p>I was wondering if there's any Python code I can run that, assuming the Python code has not been tampered with, will return an ID specific to that computer that cannot be spoofed. My initial thought was to use MAC addresses, but I know those can be easily spoofed. How about CPU serial number? How would I go about do...
<python>
2020-01-05 22:32:06
LQ_CLOSE
59,604,859
Could anyone help me to install Intel package fortran in Mac OS Catalina?
<p>I have downloaded the installation file from the link below but after finishing installation I am not seeing anything to open the application. <a href="https://software.intel.com/en-us/fortran-compilers/choose-download" rel="nofollow noreferrer">https://software.intel.com/en-us/fortran-compilers/choose-download</a>...
<fortran>
2020-01-05 22:44:30
LQ_CLOSE
59,604,979
How to license C++ software
<p>I would like to start selling some software I have developed in C++. The first line of protection will be the fact that C++ produces an executable. Within that, I will also apply algorithmic and manual obfuscation techniques to make it very hard to understand even once cracked.</p> <p>With regards to licensing, my ...
<c++><cryptography><license-key>
2020-01-05 23:06:19
LQ_CLOSE
59,607,005
RxSwift, What is the difference between Do and Map?
What is the difference between "do" operator and "map" operator? It seems the same. I'm learning RxSwift. Please check the marble diagram of do and map. do http://reactivex.io/documentation/operators/do.html map http://reactivex.io/documentation/operators/map.html
<ios><swift><reactive-programming><rx-swift><reactive>
2020-01-06 05:18:41
LQ_EDIT
59,609,655
How to reduce git repository size
<p>Earlier I pushed some big files to git branch which increased the repository size. Later I removed those redundant files from that branch using,</p> <pre class="lang-sh prettyprint-override"><code>git rm big_file git commit -m 'rm bg file' git push origin branch-name </code></pre> <p>But the file size of git repos...
<git><gitlab>
2020-01-06 09:34:02
LQ_CLOSE
59,610,133
Why Kubernetes system requirements are so high?
<p>I tried different implentations of Kubernetes and realized that master node requires approximately 2GB RAM with 2 CPU cores and worker node 700MB with 1 core. Each component of k8s seems to be not so heavy-loaded, but it still requires a lot of resources.</p> <p>What is a bottleneck and is it configurable?</p>
<kubernetes>
2020-01-06 10:09:24
LQ_CLOSE
59,610,447
XML Comparison which having attributes in SQL server
I'm having two XML strings in two seperate tables. **ROOT** **Node ID=** 1 **name** vignesh **/name** **street** 1211 **/street** **/Node** **Node ID=** 2 **name** ram **/name** **street** 333 **/street** **/Node** **/ROOT** ---------- **ROOT** **Node ID=** 1 **name** newbi...
<sql><sql-server><xml>
2020-01-06 10:29:21
LQ_EDIT
59,610,669
Conditional Operation on two int values stored as strings
<p>How can I implement a logic similar to the below mentioned code base ? </p> <pre><code>string a = "1"; string b = "2"; if (a&gt;=b) { Console.WriteLine("Greatest is" + a); } </code></pre> <p>This is a simple dummy that I created to achieve my require...
<c#><.net><if-statement><conditional-statements>
2020-01-06 10:43:54
LQ_CLOSE
59,611,833
how to get a actual direction like east - west in unity?
i am using google api for show a map in unity and also genrate object on map's some location from player position now i want to know actual direct it means identy direction (east-west) from google map or google api. > i am make a some code but it is not give me actual direction. var v = transform....
<google-maps><unity3d><google-maps-api-3><map-directions>
2020-01-06 12:07:20
LQ_EDIT
59,612,806
Visible variables in c++ and how to make variable visible more
<p><br>I am still a beginner in c++, but I know something. I am studying the 1st term and I wanna make my own project, IMO it's the best way to learn to program. Anyway<br> I wanna load data from file to dynamic array (and I know how to do that) but I to that job be done by special function and to that array be visible...
<c++><variables>
2020-01-06 13:15:07
LQ_CLOSE
59,613,566
Eliminating multiple server calls | MS SQL Server
There is a stored procedure which needs to be modified to eliminate a call to another server. What is the easiest and feasible way to do this so that the final SP's execution time is faster and also preference to solutions which does not involve much change to the application. Eg:``` select * from dbo.table1 a in...
<sql><sql-server><stored-procedures>
2020-01-06 14:08:12
LQ_EDIT
59,614,618
Unity C# | Array of ints - does not exist in the current context
I try to make an array of ints: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Test : MonoBehaviour { int[] levelsSolvedCounter = new int[3]; levelsSolvedCounter[0] = 10; } But I get an error "The name 'levelsSolvedC...
<c#><arrays><unity3d>
2020-01-06 15:20:06
LQ_EDIT
59,616,564
Copy first 7 keys in object into a new object
<p>As the title suggests, how do I make a new object containing the 7 first keys of another object using JS? :) This is the structure of the object I would like to copy the data from.</p> <pre><code>{"data":[{"id":2338785,"team1":{"id":10531,"name":"Just For Fun"},"team2":{"id":10017,"name":"Rugratz"},"result":"2 - 0"...
<javascript><arrays><json><object><vue.js>
2020-01-06 17:38:15
LQ_CLOSE
59,616,744
@State variable $ sign usage
<p>Learning SwiftUI and having some difficulty in understanding @State. For example in the code below, why don't we use State variable (that is with $ sign) with if statement? Why only as Toggle argument? How do we differentiate both the states?</p> <pre><code>import SwiftUI struct ContentView: View { @State priv...
<swift><swiftui>
2020-01-06 17:55:07
LQ_CLOSE
59,618,554
Am I able to add a member-wise initializer to a Codable-conforming object?
<p>I currently have a class that conforms to Codable and has an initializer like so</p> <pre><code>public class A: Codable { var aString: String? public init(input: String?) { self.aString = input } } </code></pre> <p>When I try to create an instance of it, I get an error</p> <pre><code>let myA =...
<swift><codable>
2020-01-06 20:29:51
LQ_CLOSE
59,618,768
How do I set a background transparency I want in CSS?
<p>I try to put a photo under a block of text, but the colors of the photo are too strong and no longer understood what is written. I tried with comand : "opacity:0.5" but it doesn't work..</p>
<html><css><opacity><photo>
2020-01-06 20:47:34
LQ_CLOSE
59,619,222
javascript regex to match number square brackets and get the remaining string
I have a string like following value[0] 1. I want to check if `str contains square brackets`. 2. If yes than get the number which in above case is `0` 3. Get the rest of the string without brackets and number which in above case is `value` > var matches = this.key.match('/[([0-9]+)]/'); // 1 > ...
<javascript><regex>
2020-01-06 21:29:16
LQ_EDIT
59,619,274
Python function, need to make it so lists can go through the function. SEC EDGAR
''' for url in indexurls: row = parseFormPage(indexurls) row ''' indexurls is a list filled with urls returns an error instead of going through the list. Need help with iterations! heres the function code ''' def parseFormPage(indexurls): ''' Input: URL Output: filer_cik...
<python><function><iteration>
2020-01-06 21:33:56
LQ_EDIT
59,619,491
Creating JSON array using Javascript
I have a json object which I need to remodel and create an array of the Json. The initial json looks like {"id":"[ 1, 2, 3]","priority":"High","assignto":"DanTest","comment":"This is a test"} Expected result: [{ id: "1" priority: "High", assignto: "DanTest" comment: "This is a test"...
<javascript><json>
2020-01-06 21:54:36
LQ_EDIT
59,620,716
How do I get past IndentationError with try and except in a for loop in Python?
given_items = ["one", "two", 3, 4, "five", ["six", "seven", "eight"]] for item in given_items: try: for element in item: except TypeError: pass else: print(element) prints: o n e t w o (Vertically) then line 6 (for element in item) crashes the program...
<python>
2020-01-07 00:34:35
LQ_EDIT
59,621,185
while loop with two specific conditions
<p>I've got a code something like:</p> <pre><code>list1 = input() while list1 != "y" or list1 != "n": print() print("INVALID INPUT") print() list1 = input() </code></pre> <p>and whenever I run it I get stuck in the loop regardless of the input.</p> <p>I'd like the loop to end if I enter in either "y" or "n"...
<python>
2020-01-07 01:45:38
LQ_CLOSE
59,621,668
Check a value is exactly 0?
<p>I want to check whether a value <code>s</code> is exactly zero,but when <code>s = False</code>, <code>s == 0</code> is also true.Thus how to address such case?<br> Thanks in advance!</p>
<python>
2020-01-07 03:04:26
LQ_CLOSE
59,622,079
Load route from ios native code (objective c)
I'm integrating an ios native library. The library opens a third party app, this process data and reload my app using deep, the lib catches the response. I wanna load the JS screen component from the native ios code integrated. I tried to use the `RCTLinkingManager` but I don't know how to get the application instan...
<ios><objective-c>
2020-01-07 04:13:21
LQ_EDIT
59,622,839
Why is the max() function returning an item that is smaller than another one in a list?
<p>Here's the code in question:</p> <pre><code>my_list = ['apples', 'oranges', 'cherries', 'banana'] print(max(my_list) </code></pre> <p>Why does it print 'oranges' instead of 'cherries'?</p>
<python><max>
2020-01-07 05:46:49
LQ_CLOSE
59,622,896
Disable or avoid fake gps
<p>I have an Android app.</p> <p>This program can detect fake positions.</p> <p>But I want to avoid this problem by using Java programming.</p> <p>Please help me.</p> <p>Thanks</p>
<java><android>
2020-01-07 05:54:21
LQ_CLOSE
59,623,369
React: The `style` prop expects a mapping from style properties to values, not a string
<p>I have the following HTML to render using React:</p> <pre><code> &lt;a style='background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Ubuntu, Roboto, Noto, "Segoe UI", Arial, sans-serif;font-siz...
<javascript><html><reactjs><syntax><react-props>
2020-01-07 06:38:27
LQ_CLOSE
59,623,674
How to use optional chaining with array in Typescript?
<p>I'm trying to use optional chaining with array instead of object but not sure how to do that:</p> <p>Here's what I'm trying to do <code>myArray.filter(x =&gt; x.testKey === myTestKey)?[0]</code>.</p> <p>But it's giving error like that so how to use it with array.</p>
<javascript><arrays><typescript>
2020-01-07 07:05:02
HQ
59,623,748
background Image gone compressed when keyboard is open
I am making signup page using this image background. [Background image][1] [1]: https://i.stack.imgur.com/huxGd.png It Look like: [Signup page][2] [2]: https://i.stack.imgur.com/XGvyJ.jpg but when i focus edittext and keyboard is opened, background image is compressed. how can i resolve this.
<android><android-layout><android-softkeyboard>
2020-01-07 07:11:10
LQ_EDIT
59,623,848
I want to concole.log the text of the h2 tag whenever users clicks the tag and when clicks another h2 tag it should display the text of that h2 tag
<p>I want to concole.log the text of the h2 tag whenever users clicks the tag and when clicks another h2 tag it should display the text of that h2 tag the class and id of the tags are same.. </p>
<javascript><php><html><css>
2020-01-07 07:19:20
LQ_CLOSE
59,623,878
Returning JSON object that has an element in an array
I want to bring back the error associated with the field 'firstname' but I can't figure out how to reference the correct branch of the json. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> { "_original":{ "firstname":"1", "lastname":"1", "e...
<javascript><reactjs>
2020-01-07 07:22:00
LQ_EDIT
59,624,186
How to eliminate character with regex?
<p>I have a text data like these event_date=2020-01-05 how to eliminate all characters except the two last digit/date with regex?</p>
<regex><shell>
2020-01-07 07:45:40
LQ_CLOSE
59,624,375
How do c++ compilers find an extern variable?
<p>I compile this program by g++ and clang++. There has a difference:<br> g++ prints 1, but clang++ prints 2.<br> It seems that<br> g++: the extern varible is defined in the shortest scope.<br> clang++: the extern varible is defined in the shortest global scope.</p> <p>Does C++ spec has any specification about that?</...
<c++><language-lawyer><c++17>
2020-01-07 08:01:16
HQ
59,625,170
I want to show Native_Ads_view In XML file in android studio but it give me error?
hope you will be all fine basically my problem is that when i add native_ads_view in XML file it give me error ("Required XML_attribute "adSize" was missing"). i am stuck here i search alot but failed.I hope you guys give me better a response i am waiting for your answer. XML FILE ``` <?xml version="1.0" enco...
<android>
2020-01-07 09:05:50
LQ_EDIT
59,626,155
Multi-Step Form when resizing on mobile devices
So, I'm trying to create a mobile responsive web app, I've already managed to fit it properly on mobile devices, but I don't want the "second form" to go above the first one, but to create a multi-step form when viewing on mobile devices. Here's my code so far: <div class="container"> <form action="/ac...
<javascript><html><css>
2020-01-07 10:03:14
LQ_EDIT
59,626,192
How can I insert date in my SQL Server 2012?
<p>The date that is receive is in the format 'Wed Jan 01 02:00:00 IST 2020'.</p> <p>If I use hibernate, it automatically converts this format into '2020-01-01 02:00:00' but for this case I have to use native query.</p> <p>Is it possible in SQL SERVER 2012 to save the date 'Wed Jan 01 02:00:00 IST 2020' as the format ...
<java><sql><hibernate><sql-server-2012>
2020-01-07 10:05:10
LQ_CLOSE
59,626,251
SQL Server Data cleaning
<p>please I want your help I will start working on data mining project using sql server for database. I have big database and before I start working on my project for sure I need to do data cleaning on my database, so please I want your suggestions what I need to do, like removing duplicate, and removing spaces from ...
<sql><sql-server><data-mining><data-cleaning>
2020-01-07 10:08:01
LQ_CLOSE
59,626,898
How Can I solve the logical error in the flowing code?
<p>No value is being printed inside if condition block. Where is the logical error? Thanks.</p> <pre><code>#include&lt;bits/stdc++.h&gt; using namespace std; int fx[]= {-1,-1,-1,0,1,1,1,0}; int fy[]= {-1,0,1,1,1,0,-1,-1}; int ar[20][20]; int n; int v1, v2; void fun(int a, int b) { for(int i=0; i&lt;8; i++) ...
<c++>
2020-01-07 10:47:31
LQ_CLOSE
59,627,478
Regular expression to remove the dot (.) from a number
<p>I want to write a regular expression in Java to remove the dot (.) from a number and all the numbers that come after it.</p> <p>Example: 3.14</p> <p>Need a regex to return only 3.</p> <p>I'm trying to use this block:</p> <pre><code>String value = "3.14"; value = value.replaceAll("[[.]]", ""); System.out.println(...
<java><regex>
2020-01-07 11:24:38
LQ_CLOSE
59,627,701
HTML/CSS | checkboxes postions in picture
I have a short question to our web developer. How is it possible to drop a few checkboxes inside a picutre at a specific postion?! It would be very nice if I can drop the 11 checkboxes at the led position of the palm picture ;) [LED-Palm][1] <div class="container"> <img alt="palm" src="palme.png" /> ...
<html><css><user-interface><checkbox><frontend>
2020-01-07 11:38:27
LQ_EDIT
59,628,119
Pull mysql data between 2 dates
I have searched this site for what i need but i coulldnt find anything to my specific. I have a slight difficulty about pulling data between two dates from mysql. I know the system how to write the code to filter data between two dates but the issue i am having is these two dates are in different months. Let me explain...
<php><mysql><date>
2020-01-07 12:06:16
LQ_EDIT
59,628,247
One-line sytaxe to Read and return file on python using with loop
I need to read a file and return resulat: this is the syntaxe I use return json.loads(with open(file, 'r') as f: f.read()) I know that we cannot write with open loop in one line, so I look for the correct syntax to fix that
<python><contextmanager>
2020-01-07 12:14:41
LQ_EDIT
59,628,778
Convert two array in one multidimensional
<p>I have two array : </p> <pre><code>a = [a,b,c,d] b = [1,2,3,4] </code></pre> <p>And I would like to convert in this </p> <pre><code>c = [[a,1], [b,2],[c,3],[d,4]] </code></pre> <p>I tried <code>a &lt;&lt; b</code> but this does not work, any idea how to convert this ?</p>
<arrays><ruby-on-rails><ruby>
2020-01-07 12:50:15
LQ_CLOSE
59,630,320
Is it a best practice in Java to declare variables before give them as parameters
<p>Assuming this code :</p> <pre><code>public static Dataset&lt;Row&gt; getData(SparkSession sparkSession, StructType schema, String delimiter, String pathToData) { final Dataset&lt;Row&gt; dataset = sparkSession .read() .option("delimiter", "\\...
<java><variables><final>
2020-01-07 14:24:00
LQ_CLOSE
59,630,616
How to get a daily mean
<p>I got the following question. Currently I am working with RStudio and i want to get a daily mean, however I just started to learn Rstudio and don't know how to continue...</p> <p>my data set looks like this:</p> <ol> <li>row (day): 2019-12-01; 2019-12-01; 2019-12-02; 2019-12-02; 2019-12-02; 2019-12-03;.....</li> <...
<r><rstudio>
2020-01-07 14:40:32
LQ_CLOSE
59,631,029
if user input dopes not equal alphabet print error message
<p>I am in my first weeks of coding and am trying to solve an issue in my code</p> <p>the challenge: how to inform user that his input is not in the alphabet and subsequently return him to the input line without continuing the code.</p> <p>the code i have</p> <pre><code>import random import re print(" _______\\_...
<python><python-3.x>
2020-01-07 15:06:16
LQ_CLOSE
59,631,237
Swift "for" inside of ( ) what is this..?
<pre><code>func getIndex(for priority: Task.Priority) -&gt; Int { prioritizedTasks.firstIndex { $0.priority == priority }! } </code></pre> <p>what is "for" inside of ()? It is for loop...? what is $0 ? I tried to find them in apple document but I don't know the operator name for them...</p>
<swift>
2020-01-07 15:19:15
LQ_CLOSE
59,631,672
How to pad all strings in a comma separated set of strings
<p>Is there a way to pad each individual string in a comma separated string in one shot?</p> <p>I can split the comma separated string, go through each string and pad it (with 0, for 3 character) and join the array elements again but not sure if it can be done in one shot.</p> <p>For instance, if I have:</p> <pre><c...
<c#><jquery><string><split><padding>
2020-01-07 15:48:30
LQ_CLOSE
59,632,231
How to avoid adding "async" to hundreds of locations in my code when adding a simple fetch call?
<p>I'm working on a big project with complex code that is not well written, it looks like spaghetti, with a lot of imbrications, functions calling each other with a lot of stack depth.</p> <p>Please note that as of now, <strong>the project code is 100% synchronous</strong> (no promises, no API calls, no database, no I...
<javascript><node.js><asynchronous><async-await>
2020-01-07 16:20:11
LQ_CLOSE
59,632,551
Simple moving averages with formula
<p>I have to calculate Simple Moving Averages on some data with this formula in R:</p> <p><a href="https://i.stack.imgur.com/dHXCT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dHXCT.png" alt="formula"></a></p> <p>Does anybody know how to do that?</p>
<r>
2020-01-07 16:38:57
LQ_CLOSE
59,633,021
Angular get holidays gapis
This is my function inside service getHolidays() { let api = 'https://www.googleapis.com/calendar/v3/calendars/tn%40holiday.calendar.google.com/events?key=myKey' return this.http.get<any>(api, { headers : new HttpHeaders().append('Content-type', 'application/json') }); ...
<azure><azure-web-sites><azure-web-app-service>
2020-01-07 17:09:12
LQ_EDIT
59,634,016
What's the difference in the order of applying selectors
<p>The task was to set red color to all paragraphs in the class <code>standart</code></p> <p>I did it this way</p> <pre><code>.standart p { color:red; } </code></pre> <p>but I was told it's bad solution and this is the "good one"</p> <pre><code>p.standart { color:red; } </code></pre> <p>What's the difference betwe...
<html><css>
2020-01-07 18:21:49
LQ_CLOSE
59,634,797
Trying to calculate retention rate in R, how to divide one row by another with the same date and then apply same logic across entire data frame?
<p>I am attempting to calculate retention rate of an Instagram story (# of viewers on the last frame divided by # viewers on first frame) within the same date. I have this data within a data frame in R where each frame is listed as a a row and any frame with the same date makes up the entire story for that date. I am h...
<r><date><row>
2020-01-07 19:22:15
LQ_CLOSE
59,634,852
python scrabble score calculation
<p><a href="https://i.stack.imgur.com/WoHAH.png" rel="nofollow noreferrer">I am a beginner to python and I'm trying to make a simple scrabble score calculation program. May I know how to get the letter score from the letterScore function and add it to the scrabbleScore function? Thanks a lot for your help! Please have ...
<python>
2020-01-07 19:25:57
LQ_CLOSE
59,637,798
I need to get json object from API, modify & post it using C#
Step 1) Calling an API with my credentials to log in. Step 2) Once I am logged in I need to get a json object Step 3) I need to ask user what new objects need to be added to the json object and where it is to be added. Step 4) I need to add those objects in original json object and then upload/post it. I have tr...
<c#><.net><json><visual-studio><async-await>
2020-01-08 00:05:56
LQ_EDIT
59,639,242
Remove blank line in c++
<p><strong>How to remover blank lines after reading a text file using c++?</strong></p> <pre><code>while(arry[i]="/n"){ i++; } </code></pre> <p>This is my code.It gives some output.But it is not a expected output.</p>
<c++>
2020-01-08 03:59:43
LQ_CLOSE
59,641,263
How do you tell which category the property belongs to?
<pre><code>typealias Names = String typealias Works = String let a: Names = Names() let b: Works = Works() if a is Names {// a is not Works } </code></pre> <p>How do I know if "a" belongs to "Names" instead of "Works"?</p> <p>Thanks!</p>
<swift><type-alias>
2020-01-08 07:30:15
LQ_CLOSE
59,641,698
If i click on Recyclerview then how to go for an new activity?
public void onClick(View v) { Intent i = new Intent(context.getApplicationContext(),Watch.class); startactivity(i); } });
<android>
2020-01-08 08:06:31
LQ_EDIT
59,644,426
How to create one vertical column in between rows in Flexbox
<p><a href="https://i.stack.imgur.com/7VcfC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7VcfC.png" alt="enter image description here"></a></p> <p>Is there is a way to create this style with Flexbox? </p>
<css><flexbox>
2020-01-08 11:02:57
LQ_CLOSE
59,644,845
How to split a string into substrings using special keywords?
<p>I have to split a string into an array. It has to split when it finds the special substring denoted by '@ + keyword'. Example of keywords:</p> <ul> <li>@alpha</li> <li>@beta</li> <li><p>@lolli</p> <p><strong>Input:</strong></p> <p>'AAHSD@alphaHDHDG@alphaSGTDHDGT@betaSDGSDFHDG@alphaASFAGF@lolliSFDSFG@alphaSGHSHSF@...
<angular><string><typescript><split><substring>
2020-01-08 11:26:25
LQ_CLOSE
59,653,283
Download And Save File From URL in Swift
<p>I'm trying to...</p> <ul> <li><p>download a file (an MLModel) from a server</p></li> <li><p>save that file to the device </p></li> <li><p>re-launch the app</p></li> <li><p>use the URL (path) that the file was saved to, to access the downloaded file.. so I don't have to re-download it every time the app launches</p>...
<swift><coreml><urlsession><mlmodel>
2020-01-08 20:21:19
LQ_CLOSE
59,653,672
is possible that : "SELECT COUNT (*) < SELECT COUNT (VALUE)?"
the result value SELECT COUNT (*) to be smaller than the value SELECT COUNT (VALUE)? And why ? Explain the answer please
<mysql><sql><group-by>
2020-01-08 20:55:23
LQ_EDIT
59,654,842
Why do I have a syntax error in this random area of the code?
<pre><code>zone_map = { 'a1': { ZONENAME = ^'Dungeon', DESCRIPTION = 'desc' EXAMINATION = 'exam' SOLVED = False UP = 'up' DOWN = 'down' LEFT = 'left' RIGHT = 'right' </code></pre> <p>(^ is where the syntax error is) I have had this unknown syntax error for a while now and can't figure o...
<python-3.x>
2020-01-08 22:43:48
LQ_CLOSE
59,655,835
Better to animate in code or in animation software for website?
<p>So I want to add a animated spinning globe to my 'about' section on my website. Basically, I have a vector image of a globe that I created, I want it to spin a few times, then have a pin drop on my city. So, i'd want to add some motion graphics to show the spinning, the content on the globe would 'smear' and then t...
<html><css><animation>
2020-01-09 01:01:02
LQ_CLOSE
59,655,988
Implementing a non-copyable C++ class
<p>In Visual Studio 2019, I am trying, without success, to implement the technique for making a class non-copyable shown for C++11, and later, at the accepted answer at <a href="https://stackoverflow.com/questions/2173746/how-do-i-make-this-c-object-non-copyable"><em>How do I make this C++ object non-copyable?</em></a>...
<c++><constructor>
2020-01-09 01:24:00
LQ_CLOSE
59,656,614
Problems pushing in javascript (Cannot read property 'push' of null)
<p>I'm new on javascript and I am having a lot of trouble finding the error to this program:</p> <pre><code>const listaTweets = document.getElementById("lista-tweets"); //Función para agregar tweets document.getElementById("formulario").addEventListener("submit", function(e){ e.preventDefault; //Capturar mensa...
<javascript><arrays><json><function><ecmascript-6>
2020-01-09 02:57:12
LQ_CLOSE
59,657,742
Invalid syntax in executing SQL query using python
<p>I am trying to run the below SQL query using pymysql in python</p> <pre><code>cursor.execute(""SELECT count(1) from user_login WHERE user_id="+username + "and password="+password"") </code></pre> <p>Here username=abc and password=xyz are variables with values</p> <p>I know there is a problem with quotation marks....
<python><mysql><sql><mysql-python><pymysql>
2020-01-09 05:30:04
LQ_CLOSE
59,658,267
Find a comma saperated word from string in javascript
<p>I am trying to find word from a string I have a string like</p> <pre><code> var str="Roof Garden, Garden, Hall, Children Room, Guest Room, Roof_Garden"; </code></pre> <p>Now i want to find "Garden" in this string So i want to get only Garden not " Roof Garden" or Roof_Garden Please suggest me any best way...
<javascript><node.js><string><find>
2020-01-09 06:22:44
LQ_CLOSE
59,658,531
Difference in applying codes in elements
<p>I would like to ask what is the difference between <code>*{}</code> and <code>body,html{}</code>. It changes the view in the html and I want to have a broad knowledge about this. Thanks.</p>
<css>
2020-01-09 06:46:45
LQ_CLOSE
59,658,609
Python 3: Theoretical question about the use of variables in functions
<p>I have a theoretical question about Python 3.0 based on the example below:</p> <pre><code>def bookstore(book,price): return ("book Type: "+ book.capitalize() + " costs $" + price) book_entry=input('Enter book type: ') price_entry=input('Enter book type price: ') print (bookstore(book_entry,price_entry)) </cod...
<python><python-3.x><theory>
2020-01-09 06:52:19
LQ_CLOSE