Id
int64
34.6M
60.5M
Title
stringlengths
15
150
Body
stringlengths
33
36.7k
Tags
stringlengths
3
112
CreationDate
stringdate
2016-01-01 00:21:59
2020-02-29 17:55:56
Y
stringclasses
3 values
60,357,618
how to find the address of a function in a c++ program
<p>i need to find the address of func in the stack so that if i provided a 32 long "A" string and then the function address in the stack i would get the Access granted </p> <p>i remember i did it using <code>objdump</code> but i can't seem to figure it out </p> <pre><code>#include &lt;iostream&gt; using namespace st...
<c++><buffer-overflow>
2020-02-22 22:56:23
LQ_CLOSE
60,357,718
Why is int2word program only prining first ten lines?
<p>I am importing a file the counts in words from one to ninety-nine. The goal is to read each line and return an integer value corresponding to the word in the file. However, I cannot seem to figure out why my code is only working for the first ten numbers/lines?</p> <pre><code>def word_to_int(w): i = 0 ones =...
<python><function>
2020-02-22 23:10:43
LQ_CLOSE
60,357,733
Image in javaFx Listview shows only when is selected
<p>i want to make a listview with an image, some text and a button pro column, but the image is only displayed when the column is selected(clicked). But i want the images/icons to be displayed independ from beeing selected/clicked...</p> <pre><code>todoView.setCellFactory(new Callback&lt;ListView&lt;TodoView&gt;, List...
<java><image><listview><javafx>
2020-02-22 23:13:16
LQ_CLOSE
60,358,197
I'm trying to get the title for this website using BeautifulSoup but i keep getting a type error, how do i fix this?
import requests import bs4 as BeautifulSoup page = requests.get('https://www.basketball-reference.com/friv/dailyleaders.fcgi') soup = BeautifulSoup( page.content, 'html-parser') print (soup.title) I've done a similar code to this for class, however im trying to make a webscraper of my own to get the name o...
<python><beautifulsoup>
2020-02-23 00:44:08
LQ_EDIT
60,359,787
Using a single coordinates variable to select center in Google Maps JavaScript API
<p>I have a variable called coordinates that is formatted like this:</p> <p><code>var coordinates = 'lat / lon';</code></p> <p>I now want to extract the single lat and lon coordinate from that variable to display it as the center in a Google Maps API Map. I have tried using slice to get the specific parts of the coor...
<javascript><variables><google-maps-api-3>
2020-02-23 06:42:51
LQ_CLOSE
60,359,859
copy column from table to table with condition
ALTER proc [dbo].[Timesheet_update] as begin declare @sql2 nvarchar(max),@status nvarchar(1) set @sql2='insert into s21022020 (s21_stfno) select m_stfno from master where m_status<>'D'' execute (@sql2) end execute Timesheet_update Msg 207, Level 16, State 1, Line 23 Invalid column name 'D'. m_status c...
<sql-server><append>
2020-02-23 06:56:17
LQ_EDIT
60,360,428
Does this code read the first 10000 lines from a file?
<pre><code>def read_text(bz2_loc, n=10000): with BZ2File(bz2_loc) as file_: for i, line in enumerate(file_): data = json.loads(line) yield data["body"] if i &gt;= n: break </code></pre> <p>I think it reads each line and return the result immediately, and ...
<python>
2020-02-23 08:29:49
LQ_CLOSE
60,361,492
Variable not being a variable with fwrite
<p>I wanted to ask, how I can write down a variable without it's getting detected as one.</p> <p>As example:</p> <pre><code>$data = &lt;&lt;&lt; DATA &lt;?php $dbServername = $_POST["admin"]; ?&gt; DATA; </code></pre> <p>$dbServername shouldn't be a variable, but $_POST["admin"]; should be one.</p> <p>I want, to wr...
<php><fwrite>
2020-02-23 10:58:52
LQ_CLOSE
60,361,671
Angular 6: How can we add a function to the global namespace?
<p>My requirement is that I need to add a function to the global namespace in an Angular 6 project. This function should then be able to be called from the browser console.</p>
<javascript><html><css><angular><typescript>
2020-02-23 11:23:27
LQ_CLOSE
60,362,626
Is it possible to make money with ads if you have few users?
<p>Hello everyone let's say I just published my app at the App Store and set some interstitial ads from Ads mob, If first ”app downloader” or user sees my ad will I make money or there is some kind of fixed quantity of users from where I can make some income? Or maybe it depends on another things which I do not know, p...
<ios><swift><admob><ads><interstitial>
2020-02-23 13:24:14
LQ_CLOSE
60,362,871
Error ArrayIndexOutOfBoundsException on android
<p>i create login and register </p> <p>build and run working but after register filed name if use put name surname it working can register but if i put onlu name no have surname don't work error </p> <pre><code>String name = nameField.getText().toString().trim(); if (email != null &amp;&amp; email.leng...
<java><android>
2020-02-23 13:50:43
LQ_CLOSE
60,363,274
cut the text length as the screen gets smaller
I want the text length to shrink when the screen gets smaller `<div class="dress-card hvr-bob"> <div class="dress-card-head"> <img class="dress-card-img-top" src="img/rdr2.jpg" alt=""> </div> <div class="dress-card-body"> <h2 class="...
<html><css>
2020-02-23 14:36:12
LQ_EDIT
60,364,077
why is this SQL shown invalid.?
create table paydetails ( emp_id integer (20), dept_id integer (20), basic integer(20), deductions integer(20), additions integer (20), joining_date date(20,20,20));
<sql>
2020-02-23 15:58:59
LQ_EDIT
60,364,950
How To Can I Restrict The User From Entering More Than 1 Digit In Python 3
<p>In,</p> <pre><code>a=int(input("Enter A Integer: ")) </code></pre> <p>How Can I Prevent The User From Entering More Than 4 Digits In This Input</p>
<python><python-3.x>
2020-02-23 17:33:07
LQ_CLOSE
60,365,790
How to show all images in a folder?
<p>I'm trying to make a page where I can share pictures. For the time being, I'm not using a database, just uploading them into my htdocs. All of my pictures will be PNG, and saved in a folder called <code>myimages</code>. I want a page to list all of these images, if it's possible. Thanks for the help!</p>
<php><html><png>
2020-02-23 19:06:21
LQ_CLOSE
60,366,329
How can I solve this problem with arrays in C++? (Beginner level.)
I am an enthusiast programmer, but I don't know much of arrays in C++. I have found page Edabit for small challenges. I am now working on the challenge: Get arithmetic mean of the given array. Now I have code like that: ```c++ #include <iostream> int data; using namespace std; int mean(int data); int main() { ...
<c++><arrays><mean><visual-studio-2019>
2020-02-23 20:03:58
LQ_EDIT
60,366,915
how can I retrieve data from Firebase in web using javascript?
<p>How can I retrieve data from Firebase and add to html page? and, How can I open new html pages automatically to add the data I was retrieving it? example: I have this course from firbase: <a href="https://i.stack.imgur.com/R6BZQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R6BZQ.png" alt="im...
<javascript><html><css><firebase><web>
2020-02-23 21:13:27
LQ_CLOSE
60,368,088
how do i sort variables into other variables by ranking in python
so i am trying to make a program to imrove my python skills which is basically a lucky wheel, you get several items which are all ranked by numbers, i have made the items randomly generate but how would i make them print in order? i assume that the sort() method won't be any use in this situation. ``` # to sort: item...
<python><sorting>
2020-02-24 00:03:31
LQ_EDIT
60,371,782
remove html tags from the json response in android
Hi from the below response want to remove <p> <br> unwanted tags and blank spaces and want to bold display heading should be bold can any one help me String termsnconditions=listSalesStageOpportunity.get(position).getTermsnconditions(); Resonse : "<p>Price           : Price offered for the above config...
<android><html>
2020-02-24 08:13:37
LQ_EDIT
60,375,170
CORS error when calling a firebase function
I am using Google Cloud Functions and I am getting an error related to CORS. I have made a simple function but it's not working because I keep getting the same error over and over again. I have tried almost everything but nothing is working. [enter image description here][1] [1]: https://i.stack.imgur.com/Fr...
<reactjs><google-cloud-firestore><cors><google-cloud-functions>
2020-02-24 11:39:27
LQ_EDIT
60,376,219
How I can rearrange the last element of an array to the first place?
<p>I have an array of objects in javascript:</p> <pre><code>shapeToolsTarget: Array(4) 0: {id: 20, name: "Background", type: "shape"} 1: {id: 21, name: "BorderColor", type: "shape"} 2: {id: 22, name: "BorderWeight", type: "shape"} 3: {id: 3, name: "Paste", type: "text"} </code></pre> <p>How I can rearrange the last e...
<javascript>
2020-02-24 12:43:41
LQ_CLOSE
60,378,705
Python vs Julia autocorrelation
<p>I am trying to do autocorrelation using Julia and compare it to Python's result. How come they give different results?</p> <p>Julia code</p> <pre><code>using StatsBase t = range(0, stop=10, length=10) test_data = sin.(exp.(t.^2)) acf = StatsBase.autocor(test_data) </code></pre> <p>gives</p> <pre><code>10-eleme...
<python><julia>
2020-02-24 15:07:52
HQ
60,379,906
Find the column index by its name in SQL
If I have three columns, 'syscode', 'loc_cod', 'loc_name' but wanted to know that 'loc_name' was 3rd in order, how could I retrieve that with a SQL query? Using T SQL/SSMS.
<sql-server><tsql>
2020-02-24 16:13:31
LQ_EDIT
60,380,273
Python defaultdict initialise while creation
<p>Is there any way of initialise defaultdict during creation time ? I mean to achieve the same behaviour as this in one line:</p> <pre><code>x = defaultdict(int) x[1] = 2 </code></pre> <p>something like:</p> <pre><code>x = defaultdict(int, {1:2}) </code></pre> <p>where <code>x[1] = 2</code> and rest all values are...
<python><defaultdict>
2020-02-24 16:36:08
LQ_CLOSE
60,382,865
What is the best way to debug jQuery selector?
<pre><code>&lt;div id="chart2Carousel" class="carousel slide" data-ride="carousel"&gt; &lt;!-- Wrapper for slides --&gt; &lt;div class="carousel-inner"&gt; &lt;div class="item active"&gt;&lt;div class="chartjs-size-monitor"&gt;&lt;div class="chartjs-size-monitor-expand"&gt;&lt;div class=""&gt;&lt;/div&g...
<javascript><jquery>
2020-02-24 19:43:02
LQ_CLOSE
60,383,825
How to check if a sub-directory does not contain a certain file in python?
<p>Need to append something to the following code:</p> <pre><code>for subdir, dirs, files in os.walk(rootdir): for file in files: if file.endswith(".json"): json_files.append(os.path.join(subdir, file)) if file.endswith(".list"): table_files.append(os.path.join(subdir, file)...
<python><list><file>
2020-02-24 20:58:19
LQ_CLOSE
60,383,847
Why utilize using() when instantiating a class?
<p>I have been working with C# ASP.NET MVC5 for a while and I was wondering something. Why are we utilizing the using() to instantiate a class sometimes?</p> <p>For an example:</p> <pre><code>using (CyrptoStream cs = new CryptoStream(PARAMETERS) { //SOMETHING } </code></pre> <p>or</p> <pre><code>using (Aes encrypt...
<c#><asp.net><class><asp.net-mvc-5>
2020-02-24 21:00:21
LQ_CLOSE
60,384,510
How to generate with Dictionary about duplicate values?
public class DataClass { public int Number1 {get; set;} public int Number2 {get; set;} } List<DataClass> list = new List<DataClass>(); list.Add(new DataClass {Number1= 1, Number2 = 100}); list.Add(new DataClass {Number1= 2, Number2 = 100}); list.Add(new DataClass {Number1...
<c#><linq>
2020-02-24 21:57:47
LQ_EDIT
60,384,689
Terraform azurerm 2.x Error: "features": required field is not set
<p>So azurerm updated to 2.0 a few hours ago....</p> <p>My main code is version locked for safety, but I'm doing some testing to see what's changed from the public beta of 1.44 and now I'm getting the following error on any TF command apart from terraform init.</p> <p>has anybody else come upon this?</p>
<azure><terraform>
2020-02-24 22:14:37
HQ
60,384,944
Parse XML File with PowerShell and if a value is found, copy file to a new location
<p>I have an application that outputs XML files during the life of an event in the software. I need to parse the XML files and once certain text are matched, move the file to another folder</p> <p>The file name format of each XML file is: Event Owner (MEMS), Year (2020) and serial number (00012345). The software wil...
<xml><powershell>
2020-02-24 22:36:28
LQ_CLOSE
60,386,906
Select all records from table a. table b has complementary data but only one record matches table a. I need all of them
<p>I have a MySQL database with 2 tables:</p> <pre><code>Table A: id name age 123a John 34 143w Mark 27 143x Rony 30 Table B: id company job 143w Google developer I need: id name age company job 123a John 34 143w Mark 27 Google developer 143x Rony 30 </code><...
<mysql><select>
2020-02-25 02:59:58
LQ_CLOSE
60,387,772
WARNING: API 'variant.getMappingFile()' is obsolete and has been replaced with 'variant.getMappingFileProvider()'
<p>I just updated Android Studio 3.5 to Android Studio 3.6 and replaced previous Gradle plugin with Gradle plugin 3.6.0 when syncing Gradle:</p> <blockquote> <p>build.gradle: API 'variant.getMappingFile()' is obsolete and has been replaced with 'variant.getMappingFileProvider()'</p> </blockquote> <p>Any suggestio...
<android>
2020-02-25 05:01:31
HQ
60,388,041
Serial console enabled Performance is impacted. To disable, check bootloader
<p>I recently created an Android emulator with Android version R. It showing an Android system notification </p> <p><strong>"Serial console enabled Performance is impacted. To disable, check bootloader"</strong></p> <p>Can someone explain, what this notification means?</p> <p><a href="https://i.stack.imgur.com/or1p...
<android>
2020-02-25 05:30:36
HQ
60,388,568
How to match a int less than 50 in regx
<p>I want to match a url like "index.html\index_1.html\index_12.html\index_49.html\index_n.html and the n must &lt;50 not be 50</p>
<regex>
2020-02-25 06:20:02
LQ_CLOSE
60,388,647
Converting a Google Apps Script to VB Script (Excel)
I guess this will seem a bit lazy, but I have been working on this for quite a few hours to get it to work in Google Sheets. Now I have the need to also get it to work in Excel, using VB script. It's a pretty simple script for experienced programmers, which I am not. :-) I have a range of letters in a spreadsheet. E...
<excel><vba><google-sheets>
2020-02-25 06:26:50
LQ_EDIT
60,390,562
Why does this C code magically print "a[2] = 98"?
<pre><code>#include &lt;stdio.h&gt; int main(void){ int n; int a[5]; int *p; a[2] = 1024; p = &amp;n; /* adding any of these lines makes code to print "a[2] = 98" at output */ p[5] = 98; //OR *(p + 5) = 98; printf("a[2] = %d\n", a[2]); //Prints a[2] = 98 return (0); } </code></pre> <p>I don't unde...
<c>
2020-02-25 08:43:18
LQ_CLOSE
60,391,134
How to remove useless array and indexOf
I want to refactor this code without indexOf() and remove useless groupArr. I want to use ^ES6 or/and lodash <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> const keys= ['activity', 'admin']; const labels = ["accountTypes.GROUP_ACCOUNT", "a...
<javascript><lodash>
2020-02-25 09:18:00
LQ_EDIT
60,393,227
Gradle Sync Failed Android Studio 3.6
<p>I have just updated the Android Studio from 3.5.3 to 3.6. After this update, I have updated the Gradle and Android SDK Build Tools as well. Now the Gradle sync is failing with these errors:</p> <pre><code>1. org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could...
<android-studio><gradle><build.gradle><offline-mode><android-studio-3.6>
2020-02-25 11:09:50
HQ
60,393,467
How can I make a React "If" component that acts like a real "if" in Typescript?
<p>I made a simple <code>&lt;If /&gt;</code> function component using React:</p> <pre><code>import React, { ReactElement } from "react"; interface Props { condition: boolean; comment?: any; } export function If(props: React.PropsWithChildren&lt;Props&gt;): ReactElement | null { if (props.condition) { ...
<javascript><reactjs><typescript>
2020-02-25 11:22:08
HQ
60,393,481
Convert a x.0 float to int function
<p>Ok, kinda hard question to ask in a title, but here is what i want to do.</p> <p>I want to basically detect if my float has a 0 after the . so that i can skip printing out the - for example - 1.0 and just print 1. Anyone have an idea as to how to do this ? I was thinking of some sort of modulus operator but cant re...
<swift>
2020-02-25 11:22:40
LQ_CLOSE
60,394,661
How to run a python script on Go
<p>I have got a python script (that's fairly complicated, but i'll just put the bare minimum here) that is something like this </p> <pre><code>from cassandra.cluster import Cluster cluster = Cluster() session = cluster.connect('mykeyspace') ta = session.execute(somecqlstatement) print("The column names of the tabl...
<python><go>
2020-02-25 12:27:35
LQ_CLOSE
60,397,318
How to compare two aspect ratios?
I want to compare two ratios using javascript. I have two ratios 12:3 and 12:2 and I need to compare both. if(12:3 > 12:2) { console.log(true); } Something similar to above.Thank you.
<javascript><jquery>
2020-02-25 14:50:40
LQ_EDIT
60,397,733
Unsupported operand type method + method
<p>I've actually already found a work around for my problem, but I feel as though there is still a better way. I can't seem to grasp why the program thinks I'm dealing with a <strong>method</strong> vs a <strong>float</strong>.</p> <p>If I try to run the program, it says that I'm trying to add together two <strong>met...
<python><class><methods><typeerror>
2020-02-25 15:11:35
LQ_CLOSE
60,398,156
JS can't resolve 1 22 333
I want to take an array like ['1', '22', '333'] but already I have an array [1, 2, 2, 3, 3, 3] I need your help, please! My code: ``` function createArr() { let quantity = 3 let result = [] for (let i = 1; i <= quantity; i++) { for (let j = 1; ...
<javascript><arrays><string>
2020-02-25 15:33:04
LQ_EDIT
60,400,582
How to write a CSV file without using external libraries
<p>I have already checked out these libraries <code>oledb</code>, <code>Microsoft Text Writer</code>, and <code>TextFieldParser</code>. We are not allowed to use oledb and Microsoft Text Driver on the server. Also, not allowed to use external libraries. I see that TextFieldParser only reads the file. Is there a way to ...
<c#>
2020-02-25 17:53:39
LQ_CLOSE
60,400,851
Flawed Logic in If statement
<p>I tried the year 1900, which in my program prints its a leap year, however, 1900 shouldnt be a leap year. Can someone help me with the logic behind the if condition?</p> <pre><code>class LeapYearTrial{ public static void main(String[]args){ String s; int year; s = JOptionPane.showInputDialog("Enter year"...
<java>
2020-02-25 18:13:58
LQ_CLOSE
60,400,895
Why i have problem when i train my model, pytorch?
im new with pytorch and ai but i have some trouble when i try to train my model. I just create my Dataset and my Dataloader train_dataset = TensorDataset(tensor_train,tensor_label) train_dataloader = DataLoader(train_dataset,batch_size=32,shuffle=True) And after this my criterion and optim...
<artificial-intelligence><pytorch>
2020-02-25 18:16:46
LQ_EDIT
60,401,442
Class method which includes another class method is undefined when setting a variable to be the original class method
<p>Why is the following throwing an error, and how would I go about trying to fix.</p> <pre class="lang-js prettyprint-override"><code>class Foo { bar() { console.log("bar"); } fizz() { this.bar(); // TypeError: this is undefined } } let foo = new Foo(); let buzz = foo.fizz; buzz(); </code></pre>
<javascript><function><class>
2020-02-25 18:55:17
LQ_CLOSE
60,402,987
Optymalize autohotkey code / send keyboard code
I'm impressed what autohotkey can do. How can i Optymalize that code? What I need to know? SetTitleMatchMode RegEx ; ::/act1:: Send {LControl down} Send {LShift down} Send {m} Send {LControl up} Send {LShift up} Send {Left 3} Send {LShift down} Send {Home} ...
<autohotkey>
2020-02-25 20:54:14
LQ_EDIT
60,403,265
how to select Details of every student's latest purchase in sql server just with 1 query?
I have 2 table like this picture: [![pic][1]][1] I want find Details of every student's latest purchase in SQL server just with 1 query. How can I do? [![enter image description here][2]][2] I have no idea. [1]: https://i.stack.imgur.com/YTk68.png [2]: https://i.stack.imgur.com/ZJCYH.png
<sql><sql-server><select>
2020-02-25 21:16:40
LQ_EDIT
60,403,387
Differences between Fprint/Fprintf vs conn.Write in GOLANG
Trying to send encrypted data across a TCP connection. Fprintf works fine for unencrypted data but seems to be adding formatting to encrypted data causing the decrypt to fail intermittently. I am unable send using conn.Write or for that matter writer.Writestring followed by writer.Flush(). scanner := bufio.NewScan...
<go><encryption><printf>
2020-02-25 21:25:31
LQ_EDIT
60,404,264
Blocking and Being New Home Screen Swift iOS
<p>I am new to Swift and iOS programming and I wanted to know if there was a way to essentially block other applications or have your application be the default Home Screen? The idea is a time-saving application so maybe totally hide text messages and the browser when it is enabled. </p> <p>I saw that there is kind of...
<ios><swift>
2020-02-25 22:43:57
LQ_CLOSE
60,405,035
Aws cognito linkedin
<p>I'm trying to add LinkedIn login to my react app that using Amazon Cognito, I did everything like explained <a href="https://aws.amazon.com/premiumsupport/knowledge-center/cognito-linkedin-auth0-social-idp/" rel="noreferrer">here</a> and yes it works <strong>but</strong> I'm not using Amazon Cognito hosted UI and I ...
<amazon-web-services><amazon-cognito><auth0><linkedin-api>
2020-02-26 00:15:20
HQ
60,405,498
asyn await vs await task.run
<p>What is the difference in using asyn/await vs await task.run()</p> <p>await task.run example -</p> <pre><code> public static void Main() { await Task.Run(() =&gt; { return "Good Job"; }); method1(); method2(); } </code></pre> <p>Async await example-</p> <pre><code> public static async...
<c#><.net><async-await><task-parallel-library>
2020-02-26 01:23:04
LQ_CLOSE
60,406,947
getting maximum value from array in c++ using pointer
I am gonna want maximum value from the array using pointer. But am not getting the accurate value. Please, help. #include <iostream> using namespace std; int main() { int* largest; int a[5]={4,5,666,7,8}; largest=a; for(int i=1; i<5; i++) { if...
<c++><arrays>
2020-02-26 04:46:10
LQ_EDIT
60,407,060
What is the usage of the pseudo class :not()?
<p>I saw this pseudo class <code>:not()</code> being used in a source code of a <strong>Youtube</strong> video page, searching in the <strong>MDN</strong> I saw <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:not" rel="nofollow noreferrer">this article</a> explaining the pseudo class, but I couldn't understa...
<css><pseudo-class>
2020-02-26 04:59:58
LQ_CLOSE
60,407,897
I have tag issue on AndroidMainfest.xml file
<p>I am developing an uber app, so I need to connect my app through the internet while I am doing that I saw there are tag issues on my XML file and I tried to fix it changing tags but it's not working.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/a...
<java><android><xml><tags>
2020-02-26 06:20:40
LQ_CLOSE
60,410,562
i try to implement merge sort algorythm using python but the code doesn't work well
<p>here merge function:</p> <pre><code>def __merge__(arr, middle): L = arr[:middle] R = arr[middle:] L.append(math.inf) R.append(math.inf) i = 0 j = 0 for k in range(0, len(arr)): if(L[i] &lt;= R[j]): arr[k] = L[i] i += 1 else: arr[k] ...
<python><sorting>
2020-02-26 09:25:11
LQ_CLOSE
60,411,643
How to Select and click button to login to web page using Python Selenium (Beginner in Selenium)
[![HTML code for button ][1]][1] [1]: https://i.stack.imgur.com/W1J6n.png How can I click on "Sign In" button to login to the web page as I am not getting any valid id to click on it
<python><selenium>
2020-02-26 10:21:35
LQ_EDIT
60,414,348
Match string format with regex
<p>I know there are tons of questions about regex string format, but I am very new to this and I haven't been able to do it myself. How can I use regex to match a string with the following format?</p> <p><code>xx_x_a.zip</code></p> <p>where x is a number and a is a letter. Example:</p> <p><code>33_2_f.zip</code></p>...
<php><regex><bash><shell>
2020-02-26 12:48:33
LQ_CLOSE
60,414,889
Tkinter, is it possible to def button(a,b,c,e)
<p>I'm a newbie so I'm possibly missing other way to do something like this. Im trying to: </p> <pre><code>def button(a,b,c,d,e,f): a=ttk.Button(b,text=c,command=d) a.grid(row=e, column=f) </code></pre> <p>so that i can creat buttons like this:</p> <pre><code>button(a,b,c,d,e,f) </code></pre>
<python><tkinter>
2020-02-26 13:20:06
LQ_CLOSE
60,416,205
Square Brackets at the beginning of postman Json Array
<p>I have an api that expects a Json Array body like so: </p> <pre><code>{ "rrr":"123456788", "channel":"BRANCH", "amount":5500.00, "transactiondate":"12/04/2017", "debitdate":"12/04/2017", "bank":"050", "branch":"48794389", "serviceTypeId":"346346342", "dateRequested":"12/04/2017", "orderRef":"", "payerName":"Amira O...
<json><asp.net-web-api><postman>
2020-02-26 14:31:31
LQ_CLOSE
60,416,852
Laravel: what is the best practice to show errors in a modal when save a form?
<p>In my Laravel application (Bootstrap 4, jQuery and Axios) I have a page with multiple forms. Some forms are in a modal, but not all forms. </p> <pre><code>&lt;form method="post"&gt; &lt;div class="modal"&gt; // show errors // form fields &lt;/div&gt; &lt;/form&gt; </code></pre> <p>I will not use ajax for posting t...
<laravel><validation><request><modal-dialog>
2020-02-26 15:06:26
LQ_CLOSE
60,417,622
How to split array into three arrays by index?
<p>I have an array of 9 elements(maybe more). I need to split by indexes into three arrays.</p> <pre><code>const array = [{id: 0}, {id: 1}, ..., {id: 8}]; </code></pre> <p>I want to recieve 3 array like that:</p> <pre><code>const array0 = [{id: 0}, {id: 3}, {id: 6}]; const array1 = [{id: 1}, {id: 4}, {id: 7}]; const...
<javascript><algorithm><split>
2020-02-26 15:47:14
LQ_CLOSE
60,419,253
Sound Localization with a single microphone
<p>I am trying to determine the direction of an audio signal using the microphone on an iPhone. Is there any way to do this? As far as I have read and attempted, it isn't possible. I have made extensive models with keras and even then determining the location of the sound is shaky at best due to the number of variables...
<ios><swift><audio>
2020-02-26 17:20:54
LQ_CLOSE
60,419,279
Why Array of ArrayLists Does't work in Java?
<p>I'm using an Array of ArrayLists of Integer in Java but it can't run. Every time I get the message "Note: Goal.java uses unchecked or unsafe operations." and "Note: Recompile with -Xlint:unchecked for details." after compile and when I want to run it message "Exception in thread "main" java.lang.NullPointerException...
<java>
2020-02-26 17:22:41
LQ_CLOSE
60,422,162
Javascript Date Library that uses online API? Rather than client machine?
I'm writing a node.js package that I want to distribute. I want a function to run at a certain time... but I don't want to use any of the popular JS libraries because they use the client's machine to determine date - rather I don't want this to be alterable. Basically the script should break after a certain date an...
<javascript><date>
2020-02-26 20:37:31
LQ_EDIT
60,422,322
Write a function unction that takes as input ݊n and returns the matrix C, Cij= 0 if i/j<2 , Cij =ij^2 otherwise in MATLAB
Consider the ݊nxn matrix C with elements Cij= 0 if i/j<2 , Cij =ij^2 otherwise while 1=<i,y=<n Write a Matlab function matSetup that takes as input ݊n and returns the matrix C .Use your function to create C for ݊ = 6. function [Cij]= matSetup(n) I have written this but it seems not to be correc...
<matlab><matrix>
2020-02-26 20:49:59
LQ_EDIT
60,422,411
sidebar menu which scrolls down in sidebar
<p>i saw this several times on other sites but wasnt able to find how to do it easily.</p> <p>I have a website with a submenu in the left sidebar, now i want the menu-widget to stick inside the sidebar area at top of window when i scroll down, so the menu comes with down. </p> <p>After reaching the end of the sidebar...
<javascript><jquery><html><css>
2020-02-26 20:56:30
LQ_CLOSE
60,423,539
How to join several arrays in PHP?
<p>I have this arrays: Array ( [0] => 1 ) Array ( [0] => 1) Array ( [0] => 1 )</p> <p>I want join to one array and result equal : Array ( [0] => 1 , [1] => 1 , [2] => 1 )</p>
<php>
2020-02-26 22:25:53
LQ_CLOSE
60,424,777
Mathematical notation or Pseudocode?
<p>At this moment I am concerned about which is the best way to explain an algorithm intuitively.</p> <p>I have try to read some pseudocode an wow it may be complex for some cases (specially for math applications even more than the formulas itself or pure code like in PHP, C++ or Py). I have thought how about describe...
<math><pseudocode><notation>
2020-02-27 00:49:45
LQ_CLOSE
60,426,868
Git rebase and push instead of pull
<p>Alternative for 1. git pull origin master 2. git add -a 3. git commit -m 'message' 4. git push</p> <p>How can I do the above without using a pull and using a rebase 1. git rebase master 2. git add -a 3. git commit -m 'message' 4. git push</p> <p>Is that all I need to do or am I missing anything. I want to...
<git>
2020-02-27 05:37:56
LQ_CLOSE
60,427,304
How should I go about querying SQL database based on html <a> click?
<p>What I want to do is when a user clicks an HTML a PHP file querys MySQL database and display the data in a popup tab. How should I go about doing this? Should I use javascript to handle the button events? Or can this be done with only PHP? Maybe a combination? You dont have show any code, maybe just a little guidan...
<javascript><php><html><css><mysql>
2020-02-27 06:19:47
LQ_CLOSE
60,427,871
How to correctly show a wxMessageBox with the value of "string01"? [C++, wxFormBuilder, wxWidgets]
How to correctly show a MessageBox with the value of "string01"? [C++, wxFormBuilder, wxWidgets] gui.h: /////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE D...
<c++><wxwidgets><wxformbuilder>
2020-02-27 07:03:47
LQ_EDIT
60,428,406
Implement "docker rmi" in python docker api
I want to have the python equivalent to below command: > docker rmi $(docker images -q -a) So, remove() method is equivalent to rmi but how to about in "-q" and "-a" options.
<python><python-3.x><docker>
2020-02-27 07:42:14
LQ_EDIT
60,429,654
In Redux, Why it checks all reducer for one case to be executed?
<p>I came to know that in react-redux if we dispatch one action so it checks all cases of reducers throughout application. In case of big application that should not be the right way.</p> <p>Is it not time taking process and coz performance get reduced?</p>
<reactjs><redux>
2020-02-27 09:07:34
LQ_CLOSE
60,436,224
How can I wrap children elements inside a div with pure javascript?
<p>For instance, I have the following code</p> <pre><code>&lt;div class="parent&gt; &lt;p&gt; Item 1 &lt;/p&gt; &lt;p&gt; Item 1 &lt;/p&gt; &lt;p&gt; Item 1 &lt;/p&gt; &lt;/div&gt; </code></pre> <p>I want turn the code above into the following code with pure javascript</p> <pre><code>&lt;div class="parent&gt; ...
<javascript>
2020-02-27 15:07:13
LQ_CLOSE
60,436,349
Why do I get a System.ArgumentOutOfRangeException: ''minValue' cannot be greater than maxValue. Parameter name: minValue' error?
<p>I've got an essential skills program which is very simple. The question is within the code. I want the question to be loaded from a text file. </p> <p>I have already added some questions to the text file.</p> <p>I have a list index where a random question will be picked from the text file and it will load as a la...
<c#><windows><visual-studio><winforms>
2020-02-27 15:13:44
LQ_CLOSE
60,438,175
How to use "BinaryString.uncons()" but with a type distinct from Word8?
<p>I have a binary string. I want to split it into head and tail. The close candidate is from <code>bytestring</code> is:</p> <pre><code>uncons :: ByteString -&gt; Maybe (Word8, ByteString) </code></pre> <p>But I want to split it such that the head would be, say, of type <code>Word16</code> instead of <code>Word8</c...
<haskell><binary-data>
2020-02-27 16:54:11
LQ_CLOSE
60,438,440
Transform Get from api in async
Good afternoon, im trying transform my action get all users to async but when i run, show me per example 2 users but without name email etc, but they're there because show edit and delete. This is my code; public IActionResult Index() { IEnumerable<User> users = null; ...
<c#><asynchronous><.net-core>
2020-02-27 17:07:57
LQ_EDIT
60,439,699
How to run jar using shell script and wait for its completion and then perform other task
<p>I have to shell script which will firstly execute jar file then perform file handling after execution as that jar will be producing some output files.</p>
<java><shell><unix>
2020-02-27 18:35:58
LQ_CLOSE
60,440,509
Android Command line tools sdkmanager always shows: Warning: Could not create settings
<p>I use the new Command line tools of android because the old sdk-tools repository of android isn't available anymore. So I changed my gitlab-ci to load the commandlintools. But when I try to run it I get the following error:</p> <pre><code>Warning: Could not create settings java.lang.IllegalArgumentException at ...
<android><gitlab-ci><android-build><android-sdk-manager><android-studio-3.6>
2020-02-27 19:32:08
HQ
60,443,148
Adding first character of a string to each of the other characters
<p>I have a string <code>alphabet = "abcdefghijklmnopqrstuvwxyz"</code> I need output like this <code> aa ab ac ad ae af ... ay az </code> how would I add the first character to every one of the other characters and print it? Thanks!</p>
<python><arrays><string><list><char>
2020-02-27 23:19:56
LQ_CLOSE
60,443,731
How come I can't insert this JSON data to SQL Server?
I'm trying to insert the follwing json data to a table on our SQL Server with python code. [![JSON DATA][1]][1] And if I could solve this with executing a SQL statement, I would be so happy. Because our Apprication server with python and SQL Server are completely different machines. They are actually far apart...
<python><json><sql-server>
2020-02-28 00:35:17
LQ_EDIT
60,443,810
how to match /foo/:id/bar?any_query_string_I_want with regex
<p>This is a page URL and the :id param changes based on the resource and the query string can be all over the map.</p> <p>How can I match /foo/:id/bar?anything</p> <p>thanks in advance</p>
<php><regex>
2020-02-28 00:47:59
LQ_CLOSE
60,444,250
How can i change prinf("%.2f") in C++
How can i change prinf("%.2f") in C++ so that it will also diplay upto two decimals Aslo for this to change in c++ Printf("-6c%14d%20.2f",'A',val1,val2); I have declared val1,val2 in double
<c++><formatting><number-formatting><cout>
2020-02-28 01:58:11
LQ_EDIT
60,444,757
WhY in C programming ,perc value show 0 as output?
<p>perc=(sum/total)*100;</p> <p>i've been trying to put this in the code in cprogramming,but output for this part is showing 0,,,Why is this happening and what else should I do in these types of scenerios?</p>
<c>
2020-02-28 03:15:18
LQ_CLOSE
60,446,009
Is it possible to keep track of a random character in swift?
<p>I created a project and I added that swipe gesture thing, my ViewController has a label when I swipe left👈 It replaces my label with random string from my array (It works ok),However when I swipe right👉 I want to see the previous string from my array the problem is that it is a random string so I can’t keep track ...
<ios><arrays><swift><xcode><random>
2020-02-28 05:55:55
LQ_CLOSE
60,447,276
New to programming, function does not work inside class
<pre><code>&lt;?php class spel { function randomWoord() { $woorden = array( 'Juan', 'Luis', 'Pedro', // and so on ); return $woorden[rand ( 0 , count($woorden) -1)]; } print randomWoord(); } ?&gt; </code></pre> <p>New to programming, function doe...
<php>
2020-02-28 07:41:55
LQ_CLOSE
60,454,978
Input Data is not loading into Database
I am encountering the folowing problem: I have a program which is supposed to load the data into a database and it is not working. No errors popping out, it just does not load. Here is the connection code: public Conexion() { string dataSource = ".\\SQLEXPRESS"; ...
<c#><sql><asp.net><sql-server>
2020-02-28 15:42:03
LQ_EDIT
60,455,266
From left/right to center transition with buttons
<p>I want my buttons on my page to go from the left/right to the center when the page loads. Is there a way I can do it? I wanna make the first one from left, second from right, etc. I'm thinking of using tags for each button- #button1, #button2 etc- and using CSS to make the animations, but don't know how. Can anyone ...
<javascript><css><button>
2020-02-28 15:58:28
LQ_CLOSE
60,455,327
C#: How can I add a list of values into a msql WHERE IN clause
I have a list of values and want to use it in a query but how can I add each value with quotes into mysql where clause. List <string> customerlist = new List<string>(); sql = SELECT * FROM customerlist WHERE custid IN customerlist I am getting the error [![enter image description here][1]][1] I nee...
<c#><mysql>
2020-02-28 16:02:21
LQ_EDIT
60,458,575
MySQL how to query five tables in one SELECT
<p>I have 5 tables as follows:</p> <ul> <li><strong>tbl_individ</strong> - consists of user data (<em>uID, Firstname, Lastname, Mobile, eMail</em>)</li> <li><strong>tbl_role</strong> - consists of roles (<em>rID, Rolename, RoleDescription</em>)</li> <li><strong>tbl_group</strong> - consists of groups (<em>gID, Groupna...
<mysql>
2020-02-28 20:07:09
LQ_CLOSE
60,460,748
Copy value of list not reference
<p>I have a list that i want to compare to after it gets modified. The previous_list = current_list followed by a modification to the current_list. But the issue i have is anytime the current_list is updated, the previous_list is also updated because everything in python is a reference. Ive tried, </p> <pre><code>prev...
<python>
2020-02-28 23:54:33
LQ_CLOSE
60,461,193
Weird question, but how do I make a python script to check if python is installed?
<p>Before you get confused, I am going to compile it with the auto-py-to-exe module after, its just the source code is in python. How do I do this?</p>
<python><python-3.x>
2020-02-29 01:25:40
LQ_CLOSE
60,461,435
Convert List<String> to string C# - asp.net - sql server -
<p>I am new to this and I am asking for help to convert a string type data, I made an sql connection where I returned a name, address and phone number found in another table</p> <p><a href="https://i.stack.imgur.com/7UVEp.png" rel="nofollow noreferrer"><code>List string eTelefono</code></a> <a href="https://i.stack.im...
<c#><asp.net><sql-server>
2020-02-29 02:22:18
LQ_CLOSE
60,461,754
Does Python execute code from the top or bottom of the script
<p>I am working on learning Python and was wondering in what way the scripts are executed what i mean like this if Python runs the code from the beginning of the script or the bottom </p>
<python>
2020-02-29 03:33:59
LQ_CLOSE
60,462,001
how to change payment date in Azure?
<p>It looks like it costs 8 days per month in Azure. How do I change my billing date? What permissions do I need to change the payment date?</p>
<azure><billing>
2020-02-29 04:34:16
LQ_CLOSE
60,465,318
how to implement fill in the blank in Swift
<p>"I _____ any questions."</p> <p>I want to implement a quiz that clicks parentheses in that phrase and puts the correct answer by typing the keyboard in the parentheses.</p> <p>Every time I get a letter, the underline also increases and I have no idea how to implement it.</p> <p>Please advise me how to implement t...
<ios><swift>
2020-02-29 12:50:43
LQ_CLOSE
60,468,018
How can I make a c# application outside of visual studio?
<p>I'm very new to programming and I'm teaching myself. I made a calculator for some calculations we do in the lab I work in and wanted to be able to open the app from the computer at work instead of opening it on visual studio from my laptop. Just curious if this is possible, and I've been trying to Google if this is ...
<c#><visual-studio>
2020-02-29 17:55:56
LQ_CLOSE