question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
71,197,308
How to create a "confirm" button in a modal with a redirect path<p>I created a modal, when the user clicks on <code>confirm</code>, I would like the user to be redirected to the page =&gt; <code>securities-in-portfolio</code>.</p> <p><a href="https://i.stack.imgur.com/eLmXJ.png" rel="nofollow noreferrer">modal</a></p>...
<p>Yep. in your component file. You have to have a method named confirm. it looks like:</p> <pre><code>constructor(private readonly router: Router // -&gt; add this) {} confirm() { this.router.navigateByUrl('/ROUTE_TO_SECURITIES_IN_PORTFOLIO'); } </code></pre>
How to create a "confirm" button in a modal with a redirect path
angular|typescript
-1
40
2
71,197,498
71,197,498
1
true
2022-02-20T18:11:32.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a "confirm" button in a modal with a redirect path<p>I created a modal, when the user clicks on <code>confirm</code>, I would like the user to ...
71,211,266
Need to change name of a key in a script that returns a sorted List<p>I have some code that loops thru a flat json doc and creates a hierarchal of the items based on level and position. It all works as expected but i have the need to change the child elements name from child to items. And thats where my problem starts....
<p>See my fork of your Replit:</p> <p><a href="https://replit.com/join/wleqdijkot-mattsenne" rel="nofollow noreferrer">https://replit.com/join/wleqdijkot-mattsenne</a></p> <p>There are additional places you need to change &quot;child&quot; to &quot;items&quot;, including lines 34, 35:</p> <pre><code>if (oldparent.hasOw...
Need to change name of a key in a script that returns a sorted List
javascript|node.js
-1
18
1
71,211,454
71,211,454
1
true
2022-02-21T18:24:14.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need to change name of a key in a script that returns a sorted List<p>I have some code that loops thru a flat json doc and creates a hierarchal of the items ...
71,227,118
Table in R showing mean values from dataframe<p>I have a data set that is formatted similar to this:</p> <pre><code>A | B | C --------- 0 | 1 | 2 0 | 2 | 3 1 | 5 | 9 1 | 2 | 11 2 | 6 | 7 2 | 3 | 4 3 | 8 | 10 </code></pre> <p>The data is in a dataframe and I'm currently looking to create a table that shows the mean of B...
<pre class="lang-r prettyprint-override"><code>library(dplyr) df |&gt; group_by(a) |&gt; summarize(across(everything(), mean)) + # A tibble: 4 × 3 a b c &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; 1 0 1.5 2.5 2 1 3.5 10 3 2 4.5 5.5 4 3 8 10 </code></pre>
Table in R showing mean values from dataframe
r
-1
20
1
71,227,155
71,227,155
1
true
2022-02-22T19:17:28.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Table in R showing mean values from dataframe<p>I have a data set that is formatted similar to this:</p> <pre><code>A | B | C --------- 0 | 1 | 2 0 | 2 | 3 1...
71,230,793
Why doesn't this If statement properly compare the stored variable with an element in an array?<p>So i'm just doing some elementary testing while I learn java, and i'm curious why this doesn't work:</p> <pre><code>public static void main(String[] args) { String[] names={&quot;John&quot;,&quot;Mark&quot;,&quot;S...
<p>never use == to compare strings. Always use equals or equalsIgnoreCase methods. == will check both references pointing to the same object and equals will check the content of the strings.</p>
Why doesn't this If statement properly compare the stored variable with an element in an array?
java|arrays|if-statement|user-input
-1
26
2
71,230,807
71,230,807
1
true
2022-02-23T02:46:36.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why doesn't this If statement properly compare the stored variable with an element in an array?<p>So i'm just doing some elementary testing while I learn jav...
71,232,254
How to fix glitching google icons?<p>After installing jdk-17_windows-x64_bin.exe, this issue started occuring. I do not know how to fix it. I can't even run tampermonkey properly.<a href="https://i.stack.imgur.com/X51UU.png" rel="nofollow noreferrer">The glitching google icons</a></p>
<p>It might be issue between Chrome and graphics drivers. Try refreshing the page, it resolves most of the time for me.</p>
How to fix glitching google icons?
windows|tampermonkey|openjdk-17
-1
33
1
71,236,238
71,236,238
1
true
2022-02-23T06:30:23.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fix glitching google icons?<p>After installing jdk-17_windows-x64_bin.exe, this issue started occuring. I do not know how to fix it. I can't even run ...
71,239,368
create Kibana index pattern can match on 2 different index<p>I would like to do an Kibana index pattern able to match with this index : <a href="https://i.stack.imgur.com/BMQ2h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BMQ2h.png" alt="enter image description here" /></a></p> <p>I would like som...
<p>Then you can simply comma-separate them</p> <pre><code>network*,system* </code></pre>
create Kibana index pattern can match on 2 different index
elasticsearch|kibana
-1
28
1
71,239,399
71,239,399
1
true
2022-02-23T15:04:27.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: create Kibana index pattern can match on 2 different index<p>I would like to do an Kibana index pattern able to match with this index : <a href="https://i.st...
71,244,667
Assigning objects to { } in Javascript and Hardhat<p>Consider the following code snippet:</p> <pre><code>let { networkConfig, getNetworkIdFromName } = require('../helper-hardhat-config') const fs = require('fs') module.exports = async ({ getNamedAccounts, deployments, getChainId }) =&gt; { const { deploy, ...
<p>It's called object destructuring, check about it here <a href="https://www.freecodecamp.org/news/javascript-object-destructuring-spread-operator-rest-parameter/" rel="nofollow noreferrer">https://www.freecodecamp.org/news/javascript-object-destructuring-spread-operator-rest-parameter/</a></p>
Assigning objects to { } in Javascript and Hardhat
javascript|solidity|hardhat
-1
42
1
71,244,727
71,244,727
1
true
2022-02-23T22:14:14.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Assigning objects to { } in Javascript and Hardhat<p>Consider the following code snippet:</p> <pre><code>let { networkConfig, getNetworkIdFromName } = requir...
71,245,399
Converting object to an encodable object failed: Instance of 'LeadSource'<p>the problem in the integrating between flutter and graphql mutation when send a request to the server with a datatype called LeadSource i found in the schema. always get an exception with this error , and this is example for the code</p> <pre><...
<p>can you try leadSource.name or leadSource.index by sending data to service. (if you can't see name property, you should be update your dart latest version)</p>
Converting object to an encodable object failed: Instance of 'LeadSource'
flutter|dart
-1
42
1
71,245,659
71,245,659
1
true
2022-02-23T23:51:19.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Converting object to an encodable object failed: Instance of 'LeadSource'<p>the problem in the integrating between flutter and graphql mutation when send a r...
71,251,292
Only those whoe have an offer or service(Not Null Value)<p>I have 3 tables like this</p> <p>1st table:person</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: left;">PID</th> <th style="text-align: right;">MOBILE</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;...
<blockquote> <p>My table should only include those who have an offer or service.</p> </blockquote> <p>You can filter to only include the rows where there is either an offer or a service by checking that the <code>PID</code> from those tables is not <code>NULL</code>:</p> <pre class="lang-sql prettyprint-override"><code...
Only those whoe have an offer or service(Not Null Value)
sql|oracle
-1
44
2
71,251,740
71,251,740
1
true
2022-02-24T11:33:22.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Only those whoe have an offer or service(Not Null Value)<p>I have 3 tables like this</p> <p>1st table:person</p> <div class="s-table-container"> <table class...
71,252,119
Write a dictionary which has a list as values into a csv while preserving the list order, my code does this but not separating the values in the rows<p>I have a dictionary which contains two values as the values of the key (a series of averages in the 50% and 100% order), I want to write them to a csv which will have 3...
<p>You can use pandas:</p> <pre><code>import pandas as pd mydict = {230: [5.93, 5.9350000000000005], 235: [5.96, 6.005], 240: [5.970000000000001, 5.985], 245: [6.005, 6.0], 250: [5.98, 5.99], 255: [5.995, 6.015], 260: [6.05, 6.03], 265: [6...
Write a dictionary which has a list as values into a csv while preserving the list order, my code does this but not separating the values in the rows
python|csv|dictionary
-1
30
1
71,252,327
71,252,327
1
true
2022-02-24T12:38:58.047Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Write a dictionary which has a list as values into a csv while preserving the list order, my code does this but not separating the values in the rows<p>I hav...
71,255,853
problem to receive from firarebase and write them on recycler view<p>I'm trying to retrive data from firebase and write them on a custom recycler view. I wrote the code but I can't understand why the data is not correctly taken from the database.</p> <p>this is the main activity:</p> <pre><code>private lateinit var myD...
<p>You need to call <code>adapter.notifyDataSetChanged()</code> after you make any changes to the list of data that the adapter shows (so inside your <code>onDataChange</code>).</p> <p>As a general rule, I also recommend never leaving <code>onCanceled</code> empty as you're ignoring possible errors. At its minimum it ...
problem to receive from firarebase and write them on recycler view
android|kotlin|firebase-realtime-database
-1
21
1
71,256,012
71,256,012
1
true
2022-02-24T17:20:46.640Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: problem to receive from firarebase and write them on recycler view<p>I'm trying to retrive data from firebase and write them on a custom recycler view. I wro...
71,258,824
Pandas one-liner to return column data of head output<p>I have a large DF with a list of projects and what phases are available for the project.</p> <pre><code>import pandas as pd projects = { 'phase': [1, 1, 1, 2, 1, 2, 1], 'projID': [&quot;foo&quot;,&quot;foo&quot;,&quot;foo&quot;,&quot;bar&quot;,&quot;foo&qu...
<p>You can simply add the <code>.values</code> method or <code>[0]</code>. Kindly try:</p> <pre><code>pn = df_tmp.loc[df_tmp['phase'] == _data_phase ,'pname'].values[0] </code></pre> <p>I think that is slicing the dataframe with the specified criteria is a good to get what you need, I wouldn't change it! (You can use o...
Pandas one-liner to return column data of head output
python|pandas
-1
35
1
71,258,865
71,258,865
1
true
2022-02-24T22:08:25.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas one-liner to return column data of head output<p>I have a large DF with a list of projects and what phases are available for the project.</p> <pre><co...
71,259,797
WPF | What is the name of the resize cursor?<p>I would like to use this kind of controls in my WPF app. I don’t know what they’re called, though. On the following picture is the cursor which appears when you hover over such a control. What is the name of this type of control?</p> <p><img src="https://i.imgur.com/FB0qXv...
<p>its called GridSplitter and you can find another name on youtube example There are people who call this words</p> <ul> <li>ResizeMode</li> <li>ResizeLayout</li> <li>ResizeWindow</li> </ul>
WPF | What is the name of the resize cursor?
c#|wpf
-1
35
1
71,259,878
71,259,878
1
true
2022-02-25T00:37:43.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WPF | What is the name of the resize cursor?<p>I would like to use this kind of controls in my WPF app. I don’t know what they’re called, though. On the foll...
71,257,818
MongoDB large array or documents<p>We are trying to save profile views.</p> <p>We created a schema something like that</p> <pre class="lang-js prettyprint-override"><code>{ user: userId, viewers: [] } </code></pre> <p>We think the viewers array could have millions of items</p> <p>So would it make more sense to do i...
<p>I think this would be better, it's way more easy to analyze data. And will not cause the limit of 16mb in one document.</p> <pre><code>{ user: userId, viewer: viewerId }, { user: userId, viewer: viewerId }, { user: userId, viewer: viewerId } </code></pre>
MongoDB large array or documents
database|mongodb|mongoose|database-design
-1
35
1
71,260,062
71,260,062
1
true
2022-02-24T20:22:57.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB large array or documents<p>We are trying to save profile views.</p> <p>We created a schema something like that</p> <pre class="lang-js prettyprint-ov...
71,238,072
How to get live stream from a webpage<p>I want to add a live stream to my site. Is it possible?</p> <p>The source: <a href="https://istanbuluseyret.ibb.gov.tr/bagdat-caddesi/" rel="nofollow noreferrer">https://istanbuluseyret.ibb.gov.tr/bagdat-caddesi/</a></p> <pre><code>&lt;video id=&quot;videojs620230c0a8c70_html5_ap...
<p>You cannot use M3U8 files in a <code>&lt;video&gt;</code> tag.</p> <p>To play the video you must read the M3U8 (text) file and pass the inside links to the <code>&lt;video&gt;</code> tag using a <strong>buffer</strong>, so this means using <strong>MediaSource Extensions</strong> (MSE) method. There are tutorials onl...
How to get live stream from a webpage
html|video|video-streaming|http-live-streaming
-1
284
1
71,271,631
71,271,631
1
true
2022-02-23T13:47:45.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get live stream from a webpage<p>I want to add a live stream to my site. Is it possible?</p> <p>The source: <a href="https://istanbuluseyret.ibb.gov.t...
71,272,140
Can I subscribe inside the combineLatest by the return result?<p>I want to use combineLatest to get a bunch of result. Then one of result is passed as input parameter to do another subscribe call.</p> <pre><code>combineLatest([first, second, third, four, five]).pipe(take(1)). subscribe(([a, b, c, d, e]) =&gt; { ...
<p>hard to diagnose why it wouldn't be running without knowing more about the observables. but I'd do it something like this to avoid nested subscribes and make this a little easier to diagnose / manage:</p> <pre><code>combineLatest([first, second, third, four, five]).pipe( take(1), switchMap(([a, b, c, d, e]) =&...
Can I subscribe inside the combineLatest by the return result?
javascript|rxjs
-1
38
1
71,272,234
71,272,234
1
true
2022-02-25T22:00:29.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I subscribe inside the combineLatest by the return result?<p>I want to use combineLatest to get a bunch of result. Then one of result is passed as input ...
71,273,537
How to display date in a cell using apps script<p>I have an apps script(for google sheets) that I would like to schedule everyday. How to I add a timestamp(preferably in PST) to indicate to users the last updated time? Example-In cell B2 of the tab called &quot;Overview&quot;, I would like the following timestamp: &quo...
<p>Add to your script</p> <pre><code>SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Overview').getRange('B2').setValue(new Date()) </code></pre> <p>and défine in the sheet the format you need</p>
How to display date in a cell using apps script
javascript|google-apps-script|google-sheets
-1
36
1
71,273,571
71,273,571
1
true
2022-02-26T02:05:37.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display date in a cell using apps script<p>I have an apps script(for google sheets) that I would like to schedule everyday. How to I add a timestamp(p...
71,275,649
Union Different Field type as String<p>I have <code>2 tables</code> in <code>GCP BigQuery Table</code>.</p> <pre><code>Table 1 has 4 Attributes Name (STRING) ID (INTEGER) Org Num (STRING) Country Code (INTEGER) </code></pre> <p><code>Table 2</code> also have 4 Attributes</p> <pre><code>Name (STRING) ID (STRING) Org Nu...
<pre><code>SELECT name, CAST(id AS STRING) AS id, [Org Num], CAST([Country Code] AS STRING) AS [Country Code] FROM 'project1.Dataset1.Table1' UNION ALL SELECT name, id, CAST([Org Num] AS STRING) AS [Org Num], [Country Code] FROM 'project1.Dataset1.Table2' </code></pre>
Union Different Field type as String
sql|google-bigquery
-1
33
2
71,277,167
71,277,167
1
true
2022-02-26T09:53:59.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Union Different Field type as String<p>I have <code>2 tables</code> in <code>GCP BigQuery Table</code>.</p> <pre><code>Table 1 has 4 Attributes Name (STRING...
71,278,117
I have written this piece of code and I know it can be reformatted, in order to look cleaner, but I don't know how. Could anyone help me?<p>I'm new at programming and I would like some insights in how to make it cleaner. This is part of a monthly expense program. 1</p> <pre><code>import tkinter as tk from tkinter impor...
<p>You have written far more code than you really need.</p> <p>Consider this:</p> <pre><code>import tkinter as tk from tkinter import ttk from functools import partial class Janela(tk.Toplevel): def __init__(self, parent, title, geometry='300x100'): super(Janela, self).__init__(parent) self.geometr...
I have written this piece of code and I know it can be reformatted, in order to look cleaner, but I don't know how. Could anyone help me?
python|tkinter
-1
32
1
71,278,357
71,278,357
1
true
2022-02-26T15:55:53.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I have written this piece of code and I know it can be reformatted, in order to look cleaner, but I don't know how. Could anyone help me?<p>I'm new at progra...
71,292,477
Data cannot be shared between activity and fragment and cannot communicate<p>Data cannot be shared between activity and fragment and cannot communicate Activity cannot observe fragment data <a href="https://developer.android.google.cn/guide/fragments/communicate" rel="nofollow noreferrer">Communicating with fragments</...
<p>This is because you are creating a new instance of the ViewModel in the fragment.</p> <p>If you want the activity and fragment to share the same instance of the ViewModel you have to use.</p> <p><code> private lateinit var viewModel: BlankViewModel by activityViewModels()</code></p> <p>and remove the providers decla...
Data cannot be shared between activity and fragment and cannot communicate
android|fragment|viewmodel
-1
23
1
71,292,637
71,292,637
1
true
2022-02-28T08:49:26.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Data cannot be shared between activity and fragment and cannot communicate<p>Data cannot be shared between activity and fragment and cannot communicate Activ...
71,309,350
Pandas group by selected dates<p>I have a dataframe that is very similar to this dataframe:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: center;">index</th> <th style="text-align: center;">date</th> <th style="text-align: center;">month</th> </tr> </thead> <tbody> <tr>...
<p>You can iterate through the DataFrame and use <strong>replace</strong> to change the dates.</p> <pre><code>import pandas as pd df = pd.DataFrame(data={'date': [&quot;2019-12-1&quot;, &quot;2020-03-1&quot;, &quot;2020-07-1&quot;, &quot;2021-02-1&quot;, &quot;2021-09-1&quot;], 'month': [12,3...
Pandas group by selected dates
python|pandas|dataframe|date|normalize
-1
45
3
71,309,728
71,309,728
1
true
2022-03-01T13:39:14.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas group by selected dates<p>I have a dataframe that is very similar to this dataframe:</p> <div class="s-table-container"> <table class="s-table"> <thea...
71,310,012
Check dataRange for duplicate values<p>So I have a datarange &quot;values&quot; below. How can I simply find the duplicates within the datarange. I.E. rows C4/D4 says &quot;something,here&quot; and row C10/D10 says &quot;something,here&quot; it would log my 2 duplicates</p> <pre><code>function checkforDups() { var ...
<h3>Find duplicates</h3> <pre><code>function checkforDups() { const ss = SpreadsheetApp.getActive(); const sh = ss.getSheetByName(&quot;Form Responses 1&quot;); const vs = sh.getRange(2, 3, 99, 2).getDisplayValues(); let uA = []; vs.forEach((r, i) =&gt; { let x = r.join(',') if (!~uA.indexOf(x)) { ...
Check dataRange for duplicate values
javascript|google-apps-script
-1
36
1
71,311,315
71,311,315
1
true
2022-03-01T14:27:05.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Check dataRange for duplicate values<p>So I have a datarange &quot;values&quot; below. How can I simply find the duplicates within the datarange. I.E. rows C...
71,311,388
Checking List within String (python)<p>I know you can check if a word matches a word list</p> <pre><code>fruit = 'bananas' fruitList = ('apples', 'bananas', 'cherries') if fruit in fruitList: do something </code></pre> <p>Is there a similar way to do it backwards? To find if a word in a list is contained in a string...
<p>Your attempt with <a href="https://docs.python.org/3/library/functions.html#any" rel="nofollow noreferrer"><code>any</code></a> was very close, you just had your inputs flipped:</p> <pre><code>if any(fruit in fruitString for fruit in fruitList): # do something </code></pre>
Checking List within String (python)
python|if-statement
-1
33
1
71,311,509
71,311,509
1
true
2022-03-01T16:08:20.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Checking List within String (python)<p>I know you can check if a word matches a word list</p> <pre><code>fruit = 'bananas' fruitList = ('apples', 'bananas', ...
71,315,360
Why isn't my Oracle Rest-Enabled SQL Reference being recognised?<p>Been fighting with this one for days. Hopefully, I'm being thick and there's a semicolon missing from somewhere.</p> <p>I've been trying to setup a reference to my REST-enabled SQL (RESS) on my local box, and Apex refuses to acknowledge it.</p> <p>I'm u...
<p>the screen shots look good. I would now check whether <em>the database</em> can reach the ORDS endpoint with APEX_WEB_SERVICE, as follows (you can use either SQL*Plus or SQL Workshop for this):</p> <pre><code>declare l_result clob; begin apex_web_service.set_request_headers( p_name_01 =&gt; 'Conten...
Why isn't my Oracle Rest-Enabled SQL Reference being recognised?
oracle-apex|oracle-rest-data-services
-1
284
1
71,320,519
71,320,519
1
true
2022-03-01T22:31:44.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why isn't my Oracle Rest-Enabled SQL Reference being recognised?<p>Been fighting with this one for days. Hopefully, I'm being thick and there's a semicolon m...
71,321,002
How to extract nested variables in kwrgs?<p>I have a function which is supposed to grab a query from a remote server and run it on OsQuery. I have been able to configure it so that the data is sent from the remote server and is received in the kwargs data structure.</p> <p>When I run <code>print(kwargs)</code> it shows...
<p>To get a value from nested dictionaries or other nested datastructures, you need to index each level separately, like so:</p> <pre><code>def _osquery_handler_function(self, event, *args, **kwargs): query = kwargs['properties']['osquery_query'] print(&quot;Query Is: %s&quot;, query) </code></pre>
How to extract nested variables in kwrgs?
python|keyword-argument
-1
41
1
71,321,040
71,321,040
1
true
2022-03-02T10:20:25.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to extract nested variables in kwrgs?<p>I have a function which is supposed to grab a query from a remote server and run it on OsQuery. I have been able ...
71,320,896
How to scrape only a single href from a div class?<p>I would like to extract the content of the 1st <code>&lt;a href&gt;</code> from this <code>&lt;div&gt;</code></p> <pre class="lang-html prettyprint-override"><code> &lt;div class=&quot;tocDeliverFormatsLinks&quot;&gt;&lt;a href=&quot;/doi/abs/10.1080/03066150.2021.19...
<p>You can select a list then slicing or use <code>select_one</code> as css selector to select single element as follows:</p> <pre><code>html_doc = '''&lt;div class=&quot;tocDeliverFormatsLinks&quot;&gt;&lt;a href=&quot;/doi/abs/10.1080/03066150.2021.1956473&quot;&gt;Abstract&lt;/a&gt; | &lt;a class=&quot;ref nowrap...
How to scrape only a single href from a div class?
python|html|beautifulsoup
-1
27
1
71,321,295
71,321,295
1
true
2022-03-02T10:11:51.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to scrape only a single href from a div class?<p>I would like to extract the content of the 1st <code>&lt;a href&gt;</code> from this <code>&lt;div&gt;</...
71,326,070
Discord.js - Making music bot speak to report actions<p>I've had in mind to add a function to my music bot, so that, while it is playing music or videos in VC, it talks and reports if, for example, the song is looped, paused, stopped and others. I did find some codes for it but they would play <strong>only</strong> one...
<p>Here I found a solution, but instead of <strong>Playing local .mp3 file</strong> it will play a <strong>Text to Speech</strong> in the voice channel. Use the following with <strong>discord.js v13.2.0</strong> :</p> <p>1.npm i libsodium-wrappers</p> <p>2.npm idiscordjs/voice</p> <p>3.npm i discordjs/opus</p> <p>4.np...
Discord.js - Making music bot speak to report actions
javascript|discord.js
-1
37
1
71,327,317
71,327,317
1
true
2022-03-02T16:28:46.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Discord.js - Making music bot speak to report actions<p>I've had in mind to add a function to my music bot, so that, while it is playing music or videos in V...
71,327,773
How to remove both number and text from a parenthesis using regrex in python?<p>In the following text, I want to remove everything inside the parenthesis including number and string. I use the following syntax but I got result of 22701 instead of 2270. What would be a way to show 2270 only using re.sub? Thanks</p> <pre...
<p>Does the text always follow the same pattern? Try:</p> <pre><code>import re import numpy as np import pandas as pd text = &quot;2270 (1st xyz)&quot; text_new = re.sub(r&quot;\s\([^)]*\)&quot;,&quot;&quot;,text) print(text_new) </code></pre> <p><strong>Output:</strong></p> <pre><code>2270 </code></pre>
How to remove both number and text from a parenthesis using regrex in python?
python-3.x|python-re
-1
43
2
71,328,093
71,328,093
1
true
2022-03-02T18:50:07.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove both number and text from a parenthesis using regrex in python?<p>In the following text, I want to remove everything inside the parenthesis inc...
71,332,290
How to create a dictionary with no duplicating keys from two pandas columns<p>Say that I have a data frame <code>df</code> that looks like the following:</p> <pre><code> A B 0 key1 value1 1 key2 value2 2 key2 value3 3 key3 value4 4 key3 value5 </code></pre> <p>How can I transform it into a diction...
<p>You could use <code>groupby</code> + <code>agg(list)</code> + <code>to_dict</code>:</p> <pre><code>out = df.groupby('A')['B'].agg(list).to_dict() </code></pre> <p>Output:</p> <pre><code>{'key1': ['value1'], 'key2': ['value2', 'value3'], 'key3': ['value4', 'value5']} </code></pre>
How to create a dictionary with no duplicating keys from two pandas columns
python|pandas|dataframe|dictionary
-1
42
1
71,332,319
71,332,319
1
true
2022-03-03T04:54:35.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a dictionary with no duplicating keys from two pandas columns<p>Say that I have a data frame <code>df</code> that looks like the following:</p>...
71,340,703
Outputting Specific Prosperities of an Array(List) of Objects in Python<p>I have an class Student which has an array(list) of Objects called Students. I am trying to output the names of all the students in the array.</p> <pre class="lang-py prettyprint-override"><code>class Student(object): name = &quot;&quot; ...
<p>If you just want the name, you can <code>print(Students[0].name)</code>. If you want to see the relevant attributes when printing a <code>Student</code> object, you can implement the <code>__repr__</code> method.</p> <pre class="lang-py prettyprint-override"><code>class Student: # The class &quot;constructor&qu...
Outputting Specific Prosperities of an Array(List) of Objects in Python
python
-1
27
1
71,340,791
71,340,791
1
true
2022-03-03T16:42:51.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Outputting Specific Prosperities of an Array(List) of Objects in Python<p>I have an class Student which has an array(list) of Objects called Students. I am t...
71,341,001
Python: GUI based "reverse entry" using recursion failing<p>I am trying to make a Python program that asks the user for a number then reverses it using recursion. My attempt is below, but my code gives me TypeError: unsupported operand type(s) for //: 'Entry' and 'int' - any ideas?</p> <pre><code>from tkinter import * ...
<p>Your recursive function is perfectly fine but there are several other problems in your code.</p> <p>The main one is that the <code>command</code> parameter of <code>Button</code> must be the function that will be called when the user presses on the buttton. In your code, <code>command</code> is set to the return va...
Python: GUI based "reverse entry" using recursion failing
python|tkinter|recursion
-1
37
1
71,341,744
71,341,744
1
true
2022-03-03T17:07:13.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python: GUI based "reverse entry" using recursion failing<p>I am trying to make a Python program that asks the user for a number then reverses it using recur...
71,341,858
Oracle SQL - Keep rows within group where there are larger number of values for column, in a specific column category<p>I need to figure out how to take the results from the table below and only show me the green highlighted rows in the image. Within each account_id/site_id combo (there are two shown in the example - 1...
<p>By using a combination of window functions, you can count the number of Y flags for each group/account/site/brand, then find the maximum number of Y flags of those partitioned with another analytic function, then only return the rows where those two values match.</p> <h2>Query</h2> <pre class="lang-sql prettyprint-o...
Oracle SQL - Keep rows within group where there are larger number of values for column, in a specific column category
sql|oracle|join|count|exists
-1
40
1
71,342,453
71,342,453
1
true
2022-03-03T18:08:56.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Oracle SQL - Keep rows within group where there are larger number of values for column, in a specific column category<p>I need to figure out how to take the ...
71,343,287
How to make port mapping while docker run command?<p>I have 2 different service as <strong>payment</strong> and <strong>order</strong>. I want them to use different dbs.</p> <p>First I pull and run mysql db image for order service by running following command;</p> <pre><code>docker run --name mysql-order -p 3306:3306 -...
<p>Because the service does not listen to port <code>3407</code>, but to port <code>3306</code> inside your container. So the port mapping should be <code>3407:3306</code>.</p> <p>Something like</p> <pre class="lang-sh prettyprint-override"><code>docker run --name mysql-payment -p 3407:3306 .... </code></pre>
How to make port mapping while docker run command?
mysql|docker|docker-compose
-1
274
1
71,343,390
71,343,390
1
true
2022-03-03T20:17:31.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make port mapping while docker run command?<p>I have 2 different service as <strong>payment</strong> and <strong>order</strong>. I want them to use di...
71,345,589
Faster data reformatting with groupby<p>So I have a DataFrame that looks something along these lines:</p> <pre class="lang-py prettyprint-override"><code>import pandas as pd ddd = { 'a': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 'b': [22, 25, 18, 53, 19, 8, 75, 11, 49, 64], 'c': [1, 1, 1, 2, 2, 3, 4, 4, 4, 5] } df ...
<p>We could first filter <code>df</code> for the &quot;c&quot; values that appear 2 or more times; then use <code>groupby</code> + named aggregation:</p> <pre><code>msk = df['c'].value_counts() &gt;= 2 out = (df[df['c'].isin(msk.index[msk])] .groupby('c') .agg(start=('a','first'), end=('a','last'), foo=('...
Faster data reformatting with groupby
python|pandas|dataframe|pandas-groupby
-1
31
1
71,345,622
71,345,622
1
true
2022-03-04T01:15:27.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Faster data reformatting with groupby<p>So I have a DataFrame that looks something along these lines:</p> <pre class="lang-py prettyprint-override"><code>imp...
71,353,519
How to trigger a task after build<p>I have the following code:</p> <pre><code>import org.openapitools.generator.gradle.plugin.tasks.GenerateTask plugins { id 'org.openapi.generator' version '5.3.1' } apply plugin: 'java' sourceSets { main { java.srcDirs += &quot;${buildDir}/api/src/main/java/&quot; ...
<p>What you want is this:</p> <pre><code>build.configure { finalizedBy generateJavaApi } </code></pre>
How to trigger a task after build
java|gradle|groovy
-1
44
1
71,357,292
71,357,292
1
true
2022-03-04T15:20:57.753Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to trigger a task after build<p>I have the following code:</p> <pre><code>import org.openapitools.generator.gradle.plugin.tasks.GenerateTask plugins { ...
71,364,531
function that find uncompleted noted by flags into an array with nested objects<p>i'm trying to build a simple function that return only the uncompleted notes into an array with nested objects.</p> <p>my object looks like:</p> <pre><code>function uncompletedNotes(notes) { } const notes = [ { id: 1, descript...
<p>Try this for example:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>function uncompletedNotes(notes) { return notes.reduce((prev, note) =&gt; prev.concat(note.todos.filt...
function that find uncompleted noted by flags into an array with nested objects
javascript
-1
39
2
71,364,639
71,364,639
1
true
2022-03-05T17:48:41.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: function that find uncompleted noted by flags into an array with nested objects<p>i'm trying to build a simple function that return only the uncompleted note...
71,368,471
in discord.py How can i make my bot that the commands only can be use in specific channel or specific server?<p>So, anyone can invite my personal bot to their server. So, I want the command will work on specific channel or specific server with @bot.event not client.</p>
<p>if you use <code>await bot.process_commands(message)</code> you can try this</p> <pre><code>@bot.event async def on_message(message): if message.channel.id == yourchannelid: await bot.process_commands(message) if message.guild.id = yourguildid: await bot.process_commands(message) </code...
in discord.py How can i make my bot that the commands only can be use in specific channel or specific server?
javascript|python|discord
-1
44
1
71,368,887
71,368,887
1
true
2022-03-06T07:36:04.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: in discord.py How can i make my bot that the commands only can be use in specific channel or specific server?<p>So, anyone can invite my personal bot to thei...
71,371,630
ValueError: Cannot convert <.....><....> to Excel<p>hi im new to python programming. im try to web scraping a news website using python. I got the title and its links. But when i try to save it in excel file it shows value error</p> <p>Here is Source code and Error</p> <pre><code>import requests, openpyxl from bs4 impo...
<p>You are trying to push the <code>BeautifulSoup</code> object to your excel instead extracting the <code>href</code> as in <code>print(link.get('href'))</code>:</p> <pre><code>link = hlines.find('a').get('href') </code></pre> <p>or</p> <pre><code>link = hlines.a.get('href') </code></pre> <h3>Example</h3> <pre><code>i...
ValueError: Cannot convert <.....><....> to Excel
python-3.x|beautifulsoup|python-requests|openpyxl|valueerror
-1
518
1
71,371,975
71,371,975
1
true
2022-03-06T15:28:08.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ValueError: Cannot convert <.....><....> to Excel<p>hi im new to python programming. im try to web scraping a news website using python. I got the title and ...
71,373,803
Grid CSS repeat function creating more than specified columns<p>So im practicing CSS grid and im learning about the &quot;repeat()&quot; function. the code in question is: <code>grid-template-columns: repeat(2, 20px 50px)</code></p> <p>in the explanation it says &quot;This code will create four columns where the first ...
<p>Some CSS grid tutorials introduce <code>repeat()</code> as a quick way to write more concise CSS rules. So for instance, rather than typing:<br /> <code>grid-template-columns: 1fr 1fr 1fr 1fr 1fr;</code></p> <p>Use the <code>repeat()</code> function:<br /> <code>grid-template-columns: repeat(5, 1fr);</code></p> <p>S...
Grid CSS repeat function creating more than specified columns
css|css-grid
-1
263
2
71,374,009
71,374,009
1
true
2022-03-06T20:03:10.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Grid CSS repeat function creating more than specified columns<p>So im practicing CSS grid and im learning about the &quot;repeat()&quot; function. the code i...
71,379,918
.NET Core 6.0 Custom Boostrap Service<p>I am new to .net core 6.0. I wish to understand if we can initialize a custom data cache implementation at the start of the application.</p> <p>I tried Middleware but, this executes on every request (can use but not ideal). I tried Hosted services, but could not find much help.</...
<p>You can retrieve a service and run your bootstraping logic before the application is started in your Program.cs, similarly to this:</p> <pre><code>var builder = WebApplication.CreateBuilder(args); // register services... var app = builder.Build(); using (var scope = app.Services.CreateScope()) { var bootstrap...
.NET Core 6.0 Custom Boostrap Service
c#|asp.net-core|.net-core|asp.net-core-6.0
-1
37
1
71,380,880
71,380,880
1
true
2022-03-07T10:50:29.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: .NET Core 6.0 Custom Boostrap Service<p>I am new to .net core 6.0. I wish to understand if we can initialize a custom data cache implementation at the start ...
71,385,197
How to write this Json properly<p>Im writing a Json api and the input is like this. How can i type this properly in json? The input is Json in Strapi API</p> <pre><code>Category 1: { Name : x Price: y Url: z } { Name : a Price: b Url: c } { Name : d Price: e ...
<p>The following structure will work just fine for your use case:</p> <pre class="lang-js prettyprint-override"><code>{ &quot;categories&quot;: { &quot;Category 1&quot;: [ { &quot;Name&quot;: &quot;x&quot;, &quot;Price&quot;: &quot;y&quot;, &quot;Url&quot;: &quot;z&quot; }, ...
How to write this Json properly
json|api|fetch|strapi
-1
28
1
71,385,259
71,385,259
1
true
2022-03-07T17:43:55.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to write this Json properly<p>Im writing a Json api and the input is like this. How can i type this properly in json? The input is Json in Strapi API</p>...
71,363,979
need to change background color with DAX measure - Not duplicate<p>I am new to Power BI just started my IT career. how do I solve this problem, its not a duplicate question.</p> <p><strong>Note:</strong> I have already got the required output using conditional formatting, but I have been asked to do the same by creatin...
<p>Try changing your SWITCH statement to this:</p> <pre><code>SWITCH( TRUE(), q&lt;=2, &quot;Yellow&quot;, q&gt;=3 &amp;&amp; q&lt;=4, &quot;Blue&quot;, q&gt;=5 &amp;&amp; q&lt;=20, &quot;Orange&quot; ) </code></pre> <p>It worked for me.</p>
need to change background color with DAX measure - Not duplicate
powerbi|dax|powerquery
-1
268
1
71,386,383
71,386,383
1
true
2022-03-05T16:35:26.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: need to change background color with DAX measure - Not duplicate<p>I am new to Power BI just started my IT career. how do I solve this problem, its not a dup...
71,386,048
How to pull text from the same page and use it in a calculation<p>I'm working on a page that I want to display reviews on from multiple places. We'll have to update these stats by hand once in a while but I want to enter the amount of reviews and the average number those reviews would give (example: 4.8 based on 5 revi...
<p>HTML has the <code>&lt;output&gt;</code> element that could help you with that. Although given that you're updating all these things manually, I'd argue you should just make a dynamic website and use JavaScript to add these values</p> <p><a href="https://www.w3schools.com/tags/tag_output.asp" rel="nofollow noreferre...
How to pull text from the same page and use it in a calculation
html
-1
23
1
71,386,634
71,386,634
1
true
2022-03-07T19:05:28.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pull text from the same page and use it in a calculation<p>I'm working on a page that I want to display reviews on from multiple places. We'll have to...
71,397,958
Bottom overflowed<p>I have a code that is responsible for displaying the characteristics of the device (the code is presented below. I have shortened it for readability.) My problem:</p> <ol> <li><p>in the body: if there are long names, then the display of elements is confused (as in the photo). How can I get the eleme...
<p>You can use <a href="https://api.flutter.dev/flutter/widgets/FittedBox-class.html" rel="nofollow noreferrer">FittedBox</a> widget! For your example, if you want to resize your AppBar text based on width.</p> <pre><code>appBar: AppBar( title: const FittedBox( fit: BoxFit.fitWidth, ch...
Bottom overflowed
flutter|dart
-1
32
2
71,398,272
71,398,272
1
true
2022-03-08T16:01:22.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bottom overflowed<p>I have a code that is responsible for displaying the characteristics of the device (the code is presented below. I have shortened it for ...
71,404,723
AWS EC2: HTTPS access error – browsers don’t see the certificate used for configuring SSL in Elastic Load Balancer<p>I configured SSL offload on Elastic Load Balancer using a certificate from AWS Certificate Manager.</p> <p>The HTTPS listener is configured as follows: the default action is forwarding to Group Instances...
<p>When you configure SSL offload at ALB, you should point your A record to the ALB instead of your IPv4.</p> <p>Please follow this guide and check if it works: <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-elb-load-balancer.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/Rou...
AWS EC2: HTTPS access error – browsers don’t see the certificate used for configuring SSL in Elastic Load Balancer
amazon-web-services|amazon-ec2|https|ssl-certificate
-1
273
2
71,404,781
71,404,781
1
true
2022-03-09T05:29:12.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AWS EC2: HTTPS access error – browsers don’t see the certificate used for configuring SSL in Elastic Load Balancer<p>I configured SSL offload on Elastic Load...
71,408,606
Java w3c dom getElementsByTagName does not return any node<p>I have this code and only list3 has length different than zero. Is it possible to get nodelist by local tag name, without namespace prefix, like list4 ?</p> <pre><code>DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder...
<p>Since you create factory/builder that is not namespace aware, the tag name is literally &quot;x1:entry&quot;, without any namespace.</p> <p>You need to call</p> <pre><code>dbf.setNamespaceAware(true); </code></pre> <p>Then</p> <pre><code>NodeList list = doc.getElementsByTagNameNS(&quot;http://wtest2&quot;, &quot;ent...
Java w3c dom getElementsByTagName does not return any node
java|xml|dom
-1
33
1
71,408,903
71,408,903
1
true
2022-03-09T11:27:19.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java w3c dom getElementsByTagName does not return any node<p>I have this code and only list3 has length different than zero. Is it possible to get nodelist b...
71,409,079
Problem finding link in text using regular expression<p>I'm doing a site parsing and moved to the level of json formation. I have links in the text that I thought it would be nice to keep as well. To do this, I use a regular expression, but it does not work quite correctly.</p> <p>Text:</p> <pre><code> \r\n&lt;li&gt;&...
<p>If it's always in a href attribute in the format you showed using <code>&quot;</code> or <code>'</code> you could use:</p> <pre><code>region = &quot; \r\n&lt;li&gt;&lt;a href=\'http://chechnya.gov.ru/wp-content/uploads/documents/226-8.pdf\'&gt;Regulations documents&lt;/a&gt;&lt;/li&gt;\r\n&lt;/ul&gt;\r\n'&quot; lin...
Problem finding link in text using regular expression
python|regex
-1
39
1
71,409,836
71,409,836
1
true
2022-03-09T12:05:07.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problem finding link in text using regular expression<p>I'm doing a site parsing and moved to the level of json formation. I have links in the text that I th...
71,417,081
How can I convert this java filter into a PostgreSQL query?<p>I have the below java streams function, but I would like to use a PostgreSQL query instead to retrieve the same information, perform the filter and if possible collect to a list. I would like to write a query in the repo layer such as <code>@Query(&quot;&quo...
<p>There is no support for using stream to interact with database as of now.</p> <p>If you only need to filter your data you can using JPQL queries. A <code>filter</code> is basically a <code>WHERE</code> clause in JPQL.</p> <pre><code>SELECT p FROM PopResponderDao p where p.popRegistrationDaos IS NOT EMPTY </code></pr...
How can I convert this java filter into a PostgreSQL query?
java|postgresql|jpa
-1
41
1
71,419,106
71,419,106
1
true
2022-03-09T23:17:51.697Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I convert this java filter into a PostgreSQL query?<p>I have the below java streams function, but I would like to use a PostgreSQL query instead to r...
71,422,996
After define the header breaks dont work anymore<p>after I define a PHP header with UTF-8 my breaks on $msg don't work anymore. Where is the problem? Is there another way to make breaks?</p> <p>Thanks!</p> <p>Code:</p> <pre><code>&lt;?php $username = $_POST['name']; $lastname = $_POST['lastname']; $useremail = $_P...
<p>It's not the <code>utf-8</code> which has caused this, it's the <code>text/html</code>.</p> <p>You're telling the receiving mail client to parse and display the email as a HTML document. As you hopefully know, in HTML a line break is specified using the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Elem...
After define the header breaks dont work anymore
php|html|contact-form
-1
33
2
71,423,058
71,423,058
1
true
2022-03-10T11:00:31.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: After define the header breaks dont work anymore<p>after I define a PHP header with UTF-8 my breaks on $msg don't work anymore. Where is the problem? Is ther...
71,243,422
CSS background shorthand, can't include size<p>This works:</p> <pre><code>background: none center no-repeat background-size: contain </code></pre> <p>This does not work:</p> <pre><code>background: none center contain no-repeat </code></pre> <p>According to <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/backg...
<p>From MDN:</p> <blockquote> <p>The value may only be included immediately after , separated with the '/' character, like this: &quot;center/80%&quot;.</p> </blockquote> <p>To clarify: The solution is to write <code>background: none center/contain no-repeat</code>, instead of separating them with spaces.</p>
CSS background shorthand, can't include size
css
-1
29
1
71,243,496
71,243,496
1
true
2022-02-23T20:09:13.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CSS background shorthand, can't include size<p>This works:</p> <pre><code>background: none center no-repeat background-size: contain </code></pre> <p>This do...
71,104,648
Breaking google sheet table into smaller tables and send gmail to corresponding emails(google script)<p>Is there a way that we can break the main table below into smaller tables and email (gmail) them to the corresponding email on the first column?</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr...
<p>You can try this. I leave it up to you to adjust the styling to suit your taste. I edited this to add the first part. Sorting the clients.</p> <pre><code>function test() { try { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sh = ss.getSheetByName(&quot;Sheet2&quot;); // dont get header var ...
Breaking google sheet table into smaller tables and send gmail to corresponding emails(google script)
javascript|google-apps-script
-1
30
1
71,105,135
71,105,135
1
true
2022-02-13T20:37:35.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Breaking google sheet table into smaller tables and send gmail to corresponding emails(google script)<p>Is there a way that we can break the main table below...
71,106,465
How to get adjacent array key in PHP if my keys are not in sequence?<p>Below is my array. Assuming I know the current array key (say 53), how do I get the adjacent/next array key which is not in sequence? I can't use <code>current()</code>, can I?</p> <pre><code>( [50] =&gt; Array ( [product_id]...
<p>You can get the keys and the values as an array with <code>array_keys()</code> and <code>array_values()</code> respectively. Now use <code>array_search()</code> to get the index of the key (53).</p> <p>You can then increase the index by 1 which will be the index of the next key. Once you know the index of the next k...
How to get adjacent array key in PHP if my keys are not in sequence?
php|arrays
-1
37
1
71,106,525
71,106,525
1
true
2022-02-14T02:06:30.227Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get adjacent array key in PHP if my keys are not in sequence?<p>Below is my array. Assuming I know the current array key (say 53), how do I get the ad...
71,128,486
Changing function-output(y) given value of input(x)<pre><code>#We know that f(x)=-x^3 if x&lt;=0 #We know that f(x)=x^2 if x:=0-1 #We know that f(x)=√x if x&gt;1 x &lt;- 1.5 print(x) if(x&lt;=0) { cat(&quot;y is&quot;,(-x)^3) } else if(0&lt;x&lt;1) { cat(&quot;y is&quot;, x^2) } else if(x=&gt;1) { c...
<p>In R, the correct syntax for</p> <ul> <li>&quot;x is greater than or equals to 1&quot; is <code>x &gt;= 1</code></li> <li>&quot;x is smaller than or equals to 1&quot; is <code>x &lt;= 1</code></li> <li>&quot;x is greater than zero but smaller than 1&quot; is <code>x &gt; 0 &amp; x &lt; 1</code></li> </ul> <pre><code...
Changing function-output(y) given value of input(x)
r
-1
24
1
71,128,599
71,128,599
1
true
2022-02-15T14:48:45.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Changing function-output(y) given value of input(x)<pre><code>#We know that f(x)=-x^3 if x&lt;=0 #We know that f(x)=x^2 if x:=0-1 #We know that f(x)=...
71,338,307
query() of generator `max_length` being succeeded<p>Goal: set <code>min_length</code> and <code>max_length</code> in Hugging Face Transformers generator query.</p> <p>I've passed <code>50, 200</code> as these parameters. Yet, the length of my outputs are much higher...</p> <p>There's no runtime failure.</p> <pre class=...
<h4>Explanation:</h4> <p>As explained by Narsil on Hugging Face Transformers <a href="https://github.com/huggingface/transformers/issues/15914#issuecomment-1058112592" rel="nofollow noreferrer">Git Issue response</a></p> <blockquote> <p>Models, don't ingest the text one character at a time, but one token at a time. Th...
query() of generator `max_length` being succeeded
python-3.x|huggingface-transformers
-1
42
1
71,349,357
71,349,357
1
true
2022-03-03T13:50:27.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: query() of generator `max_length` being succeeded<p>Goal: set <code>min_length</code> and <code>max_length</code> in Hugging Face Transformers generator quer...
71,116,527
How could I use a function thats inside a for loop in python<p>I have a function that prints out the students that has passed an exam. But if I do the function like this:</p> <pre><code>csv_dict_reader = csv.reader( read_obj, delimiter=&quot;;&quot;, ) next(csv_dict_reader) for row in csv_dict_reader: if r...
<p>What about this :</p> <pre class="lang-py prettyprint-override"><code>csv_dict_reader = csv.reader(read_obj, delimiter=';',) next(csv_dict_reader) for row in csv_dict_reader: if row[11]: # allPassedStudents.append(row[0]) passedDate = datetime.strptime(row[11], '%d-%m...
How could I use a function thats inside a for loop in python
python
-1
29
2
71,116,558
71,116,558
1
true
2022-02-14T18:21:42.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How could I use a function thats inside a for loop in python<p>I have a function that prints out the students that has passed an exam. But if I do the functi...
71,145,629
Create list of dates with increment of months and stop increments less than given date in pandas<p>Given data</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Id</th> <th>start Date</th> <th>Frequency</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>10-10-2015</td> <td>1</td> </tr> <tr> <td>2...
<p>You could <code>apply</code> <code>pd.date_range</code> on each row to create your required dates and <code>join</code> back to the original DataFrame:</p> <pre><code>df[&quot;start Date&quot;] = pd.to_datetime(df[&quot;start Date&quot;], format=&quot;%d-%m-%Y&quot;) dates = df.apply(lambda x: pd.Series(pd.date_rang...
Create list of dates with increment of months and stop increments less than given date in pandas
python|pandas|dataframe|data-analysis|exploratory-data-analysis
-1
263
1
71,145,911
71,145,911
1
true
2022-02-16T16:29:14.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create list of dates with increment of months and stop increments less than given date in pandas<p>Given data</p> <div class="s-table-container"> <table clas...
71,146,931
Simplifying counting operation in pandas dataframe<p>I have the following code to count the number of times a value is higher than average and lower than average, then appends the value to a new column at the month stating whether it has more values higher than average or lower than average. However the code is quite a...
<ol> <li><code>resample</code> and <code>agg</code> to get the maximum date and most common value for each month</li> <li><code>merge</code> back to original dataframe and <code>rename</code></li> </ol> <pre><code>df[&quot;Date&quot;] = pd.to_datetime(df[&quot;Date&quot;]) modes = df.resample(&quot;M&quot;, on=&quot;Da...
Simplifying counting operation in pandas dataframe
python|pandas|dataframe
-1
22
1
71,147,211
71,147,211
1
true
2022-02-16T17:56:20.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Simplifying counting operation in pandas dataframe<p>I have the following code to count the number of times a value is higher than average and lower than ave...
71,193,534
Add a background Image in Constraint Layout<p>I am trying to add a background image to a Constraint layout, which is the root view of my xml. The image shows if I change the layout to linear or relative but it does not show in a constraint layout. What could be the cause?</p> <pre><code>&lt;androidx.constraintlayout.wi...
<pre><code>&lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; android:layout_width=&quot;match_parent&quot; &lt;--change these two lines--&gt; android:layout_height=&quot;match_parent&quot; android:background=&quot;@drawable/ic_selected...
Add a background Image in Constraint Layout
android
-1
284
1
71,193,554
71,193,554
1
true
2022-02-20T10:34:03.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add a background Image in Constraint Layout<p>I am trying to add a background image to a Constraint layout, which is the root view of my xml. The image shows...
71,306,935
Why my child container is over lapping on main container<blockquote> <p>Can anyone tell me how to solve this problem, As you can see my <code>.tab</code> class is set to 100% width and it's overlapping on the <code>.main-container</code> class? I also use overflow on my main container however it began having a scroll c...
<p>This overflow is caused by the box-sizing. Just add <code>.tabs { box-sizing: border-box; }</code> and the issue should be fixed.</p> <p>The default value of <code>box-sizing: content-box</code> does not include the paddings and border. As such 100% width of the parent + paddings and border will always overflow! As ...
Why my child container is over lapping on main container
html|css
-1
18
1
71,307,038
71,307,038
1
true
2022-03-01T10:22:54.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why my child container is over lapping on main container<blockquote> <p>Can anyone tell me how to solve this problem, As you can see my <code>.tab</code> cla...
71,228,755
Dart: Constructor with named parameters and executing a function<p>I would like to create a class with named parameters which also executes a function. However, I am not able to find a soluiton to call a function from the constructor. Is there something like a default init function?</p> <p>My main goal is to trigger th...
<p>Could you add a body to your constructor?</p> <pre class="lang-dart prettyprint-override"><code>class A { final String a; A({this.a = 'default'}) { init(); } void init() { print('New A has been created.'); } String toString() =&gt; &quot;A's value is '$a'.&quot;; } void main() { fin...
Dart: Constructor with named parameters and executing a function
flutter|dart|constructor
-1
284
1
71,228,900
71,228,900
1
true
2022-02-22T21:51:30.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dart: Constructor with named parameters and executing a function<p>I would like to create a class with named parameters which also executes a function. Howev...
71,420,292
Convert PHP multidimentional array to multilevel menu using recursive?<p>I'm trying to create a PHP recursive function to create a multilevel menu from multi-dimentional array, but still failed.</p> <p>I have a data as such:</p> <pre><code>&lt;?php $json = '{&quot;id&quot;:1,&quot;name&quot;:&quot;john&quot;,&quot;memb...
<pre><code>&lt;?php $json = '{&quot;id&quot;:1,&quot;name&quot;:&quot;john&quot;,&quot;member&quot;:[{&quot;id&quot;:9,&quot;name&quot;:&quot;jane&quot;,&quot;member&quot;:[]},{&quot;id&quot;:10,&quot;name&quot;:&quot;lorem&quot;,&quot;member&quot;:[{&quot;id&quot;:12,&quot;name&quot;:&quot;ipsum&quot;,&quot;member&qu...
Convert PHP multidimentional array to multilevel menu using recursive?
php|recursion
-1
27
1
71,421,396
71,421,396
1
true
2022-03-10T07:33:04.313Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert PHP multidimentional array to multilevel menu using recursive?<p>I'm trying to create a PHP recursive function to create a multilevel menu from multi...
71,266,645
IndexOutOfRange occuring when retrieving nodes from Grid<p>I am implementing Breath First Search and trying to obtain the neighbour nodes but I am running into an <code>IndexOutOfRange</code> Error when obtaining neighbours from the Grid (Grid is 100x100). I understand the error but I do not understand why and how it's...
<p><code>x - 1</code> .. <code>z - 1</code> .. <code>x + 1</code> .. <code>z + 1</code> .. there is no check whether these are actually possible</p> <p>You only check your current position</p> <blockquote> <pre><code>if(IsIndexInBounds(x, z) { ... } </code></pre> </blockquote> <p>but you would need to check for each of...
IndexOutOfRange occuring when retrieving nodes from Grid
c#|unity3d|breadth-first-search
-1
34
2
71,267,192
71,267,192
1
true
2022-02-25T13:33:47.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: IndexOutOfRange occuring when retrieving nodes from Grid<p>I am implementing Breath First Search and trying to obtain the neighbour nodes but I am running in...
71,118,590
how can i change selected option of dropdown depend of other select option?<p>I'm trying to change the selected option depending on the other and reverse. but when i do that multiple times, the dropdown block, can i have some help to improve it if possible.</p> <p><div class="snippet" data-lang="js" data-hide="false" d...
<p>You need to set the value to the select field not the option.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const $select = $('.select'); $select.on( 'change', function()...
how can i change selected option of dropdown depend of other select option?
jquery
-1
31
1
71,118,757
71,118,757
1
true
2022-02-14T21:37:42.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can i change selected option of dropdown depend of other select option?<p>I'm trying to change the selected option depending on the other and reverse. bu...
71,213,886
How can I use regular expressions to extract all words with at least one digit in text with Python<p>I am new to regular expressions and I have a text as follows. How can I use the RegEx to extract all words with at least one digit in it? Really appreciate it.</p> <pre><code>text = '''The start of the Civil War in 1861...
<p>You could use this pattern:</p> <pre><code>'\w*\d+\w*' </code></pre> <p>How does it work:<br /> <code>\w*</code> matches 0 or more characters (but not space)<br /> <code>\d+</code> matches 1 or more digits<br /> <code>\w*</code> matches 0 or more characters again</p> <p>Using <code>re</code> and findall we get:</p> ...
How can I use regular expressions to extract all words with at least one digit in text with Python
python|regex
-1
27
2
71,213,943
71,213,943
1
true
2022-02-21T22:43:07.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I use regular expressions to extract all words with at least one digit in text with Python<p>I am new to regular expressions and I have a text as fol...
71,336,755
Set only last variable to file<p>In bash use jq to parse json.</p> <pre><code> for currentActivation in ${ACTIVATION_ARRAY[@]}; do rulesResponse=$(curl -s -XGET &quot;$RULES_REQUEST_URL_PREFIX&amp;activation=$currentActivation&amp;types=$rulesTypeKey&amp;p=1&amp;ps=1&quot;) typeRuleTotal=$(jq -r '.total' &...
<p>You are sequentially writing to the same file but always using the unaltered input <code>$RULES_REPORT_INIT_JSON</code>. This makes you see only the last change.</p> <p>Instead of writing to the file on each iteration, you could save the changes to the variable and write to the file just once in the end:</p> <pre cl...
Set only last variable to file
bash|jq
-1
29
1
71,336,867
71,336,867
1
true
2022-03-03T11:53:33.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Set only last variable to file<p>In bash use jq to parse json.</p> <pre><code> for currentActivation in ${ACTIVATION_ARRAY[@]}; do rulesResponse=$(cur...
71,165,169
COUNT and GROUP BY several columns<p>I got table like this where I want to calculate &quot;WeekCount&quot; so that number of &quot;Done&quot; is counted but grouped by Cycle and a Week. |</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>Day</th> <th>Cycle</th> <th>Week</th> <th>D...
<p>It's not clear why you need to join the table a second time at all.</p> <p>I suspect the following will give you what you want. Since it's not joining the table a second time, the only rows it will see are the ones with <code>Done=1</code> so the counts will be correct:</p> <pre><code>SELECT a.ID, COUNT (a.Done) as ...
COUNT and GROUP BY several columns
sql|group-by|count
-1
44
1
71,165,938
71,165,938
1
true
2022-02-17T20:47:13.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: COUNT and GROUP BY several columns<p>I got table like this where I want to calculate &quot;WeekCount&quot; so that number of &quot;Done&quot; is counted but ...
71,295,855
How do I remove duplicated words and comma's from my input when answering in lines 11-20 for my Python 3 code? No suggestions works at all for mine<p>How do I remove every duplicated word and comma from my code on lines 11-20 in my code below? I have tried everyone's suggestions and answers for days of attempting but n...
<p>Python is well known for its ability to deal with various scenarios and string handling, and in this case you can resolve the problem of repetition of commas and the &quot;and a&quot; term with the string.replace method, removing the excess commas and the term &quot;and a&quot; before parsing it. Here's some code to...
How do I remove duplicated words and comma's from my input when answering in lines 11-20 for my Python 3 code? No suggestions works at all for mine
python
-1
43
2
71,296,145
71,296,145
1
true
2022-02-28T13:38:47.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I remove duplicated words and comma's from my input when answering in lines 11-20 for my Python 3 code? No suggestions works at all for mine<p>How do ...
71,407,683
How to select the rows with max certain column value?<p>I have a table with several rows and two columns, it is like this.</p> <pre><code> station_id | count ------------+------- 184 | 7 87 | 31 71 | 29 68 | 7 51 | 65 146 | 22 80 | 37 ...
<p>You might want to use RANK() or DENSE_RANK()</p> <pre><code>SELECT * FROM (select station_id, count(*) count, dense_rank() over(order by count desc) as count_rank from bus_lines GROUP BY station_id ORDER BY count_rank ) t </code></pre>
How to select the rows with max certain column value?
sql|postgresql|select
-1
40
2
71,407,774
71,407,774
1
true
2022-03-09T10:16:21.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to select the rows with max certain column value?<p>I have a table with several rows and two columns, it is like this.</p> <pre><code> station_id | count...
71,417,075
How to filterout the arrays from aray of an array based on an attribute in ruby?<p>I have an array that has some extra information along with the ids and i want to use this ids to filter out arrays from an array of array. Below is an example.</p> <pre><code>[[#&lt;Position:0x00007fc32a124b80 self_id: 1077, positi...
<p>There are of course better ways to do this kind of thing with Rails or any database, but you seem to be asking for a pure-Ruby approach, so here are some options for that.</p> <p>Option 1:</p> <pre><code>filtered_array = people_array.filter do |person| positions_array.find{|pos| pos.person_id == person.id} end.t...
How to filterout the arrays from aray of an array based on an attribute in ruby?
ruby-on-rails|ruby
-1
40
2
71,417,640
71,417,640
1
true
2022-03-09T23:16:51.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to filterout the arrays from aray of an array based on an attribute in ruby?<p>I have an array that has some extra information along with the ids and i w...
71,420,995
PostgreSQL query to filter out an empty Collection in Java<p>Instead of writing</p> <pre><code>.filter(tableADao -&gt; tableADao.tableBDaos().isEmpty()) </code></pre> <p>I'm looking to write a postgreSQL query to remove the empty collection. I think I need to write a join followed by IS NOT EMPTY. How can this be writt...
<p>Try</p> <pre><code>select * from A a where 0 &lt; (select count(*) from B b where a.id_pop = b.crr_pop_id ) </code></pre>
PostgreSQL query to filter out an empty Collection in Java
java|postgresql|jpa
-1
29
1
71,421,179
71,421,179
1
true
2022-03-10T08:33:02.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PostgreSQL query to filter out an empty Collection in Java<p>Instead of writing</p> <pre><code>.filter(tableADao -&gt; tableADao.tableBDaos().isEmpty()) </co...
71,127,634
Search and replace timestamps and GPS data with regex in Notepad++<p>I have log files with some lines containing GPS data, which I need to filter:</p> <pre class="lang-none prettyprint-override"><code>[2022-02-15 15:50:20.551] [user01] ID: 1 long: 18.03580993572624, lat: 59.29910442961695, heading: 309.700000 [2022-02...
<p>You may try the following find and replace, in regex mode:</p> <pre class="lang-none prettyprint-override"><code>Find: ^\[(.*?)\] \[(.*?)\] ID: \d+ long: (\d+(?:\.\d+)?), lat: (\d+(?:\.\d+)?), heading: \d+(?:\.\d+)?$ Replace: $1, $2, $4, $3 </code></pre> <p><a href="https://regex101.com/r/mBVTa6/1" rel="nofollow ...
Search and replace timestamps and GPS data with regex in Notepad++
regex|notepad++
-1
32
1
71,127,754
71,127,754
1
true
2022-02-15T13:52:02.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Search and replace timestamps and GPS data with regex in Notepad++<p>I have log files with some lines containing GPS data, which I need to filter:</p> <pre c...
71,167,018
Is it possible for a file in any OS to not be in any folder?<p>I am studying for my A+ exam and I wanted to get some clarification about how files are stored.</p> <p>My understanding is that in Windows, storage of all files starts at the root of the drive, whether it be C: or D: etc..., but all files are on one of thes...
<p>I can't speak about Windows, but on unix-like OSes (macOS, Linux, BSD, etc) and filesystems it's sort-of possible for a file to exist without being in a folder.</p> <p>In a traditional unix-like filesystem, a directory is essentially a list of filenames and the inodes numbers that hold the actual files. The same ino...
Is it possible for a file in any OS to not be in any folder?
linux|windows|macos|directory|root
-1
35
1
71,167,386
71,167,386
1
true
2022-02-18T00:22:15.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible for a file in any OS to not be in any folder?<p>I am studying for my A+ exam and I wanted to get some clarification about how files are stored...
71,142,925
How to short button value ? - CSS<p>I want to short button value using CSS. <a href="https://i.stack.imgur.com/RBj4s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RBj4s.png" alt="enter image description here" /></a></p> <p>Final out put need to like this.. <a href="https://i.stack.imgur.com/aQXpE.p...
<p>Wrap the button text in a <code>&lt;span&gt;</code>, which has properties to control text overflow and linebreaks.</p> <p>Have a look at this jsfiddle: <a href="http://jsfiddle.net/5hEPZ/" rel="nofollow noreferrer">http://jsfiddle.net/5hEPZ/</a></p> <pre class="lang-html prettyprint-override"><code>&lt;button&gt; ...
How to short button value ? - CSS
html|css
-1
36
2
71,143,116
71,143,116
1
true
2022-02-16T13:41:02.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to short button value ? - CSS<p>I want to short button value using CSS. <a href="https://i.stack.imgur.com/RBj4s.png" rel="nofollow noreferrer"><img src=...
71,336,482
Get count of unmapped records in a many-to-many table<p>I have 3 tables as such</p> <p><strong>Product</strong></p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ProductID</th> <th>ProductDetails</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>...</td> </tr> <tr> <td>2</td> <td>...</td> </tr>...
<p>A simple <code>not exists</code> query should be sufficient:</p> <pre><code>select * from products where not exists ( select * from vendor_product_map where vendor_product_map.product = product.id and vendor_product_map.vendor = 12345678 ) </code></pre>
Get count of unmapped records in a many-to-many table
mysql|sql|join|mariadb
-1
41
1
71,336,610
71,336,610
1
true
2022-03-03T11:33:33.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get count of unmapped records in a many-to-many table<p>I have 3 tables as such</p> <p><strong>Product</strong></p> <div class="s-table-container"> <table cl...
71,282,312
css changes not shown in browser<p>I don't think this is worthy question or not but still I am in trouble to find solution?</p> <p>I am working on my first project in PHP and using the notepad++ editor. So, my problem is when ever I am saving my work and after restarting my laptop other changes were done in my website ...
<p>If you made changes in the style section or main.css, those can be overwritten and not take effect if you also put styles within the html element. Put some code up and people can help you better.</p> <p>if you use the ``` code can go in your original post. Edit it.</p> <p>PHP</p> <pre><code>&lt;?php $t=time(); ech...
css changes not shown in browser
html|css|class|css-selectors
-1
40
2
71,282,332
71,282,332
1
true
2022-02-27T05:22:19.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: css changes not shown in browser<p>I don't think this is worthy question or not but still I am in trouble to find solution?</p> <p>I am working on my first p...
71,153,819
Python - tkinter - put different grids in some window?<pre><code>################################################ # Left | Right # #-----------------------|----------------------# # hello| hello | | hello| hello | hello# #-----------------------|------|--------|------# # ...
<p>I would suggest to create two frames for the labels, one for the <em>left</em> and the other for the <em>right</em>.</p> <p>Then you can use the number of labels in each frame to determine the <em>row</em> and <em>column</em> of the new label to be added.</p> <pre class="lang-py prettyprint-override"><code>from tkin...
Python - tkinter - put different grids in some window?
python|tkinter|grid
-1
32
1
71,154,939
71,154,939
2
true
2022-02-17T07:11:15.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python - tkinter - put different grids in some window?<pre><code>################################################ # Left | Right ...
71,191,067
Golang time.Ticker triggers twice after blocking a while<p>I'm using <code>time.Ticker</code> with some blocking code, found a strange behavior:</p> <pre class="lang-golang prettyprint-override"><code>func main() { ticker := time.NewTicker(1 * time.Second) i := 0 for { select { case &lt;-ti...
<p>The ticker creates a <a href="https://go.dev/tour/concurrency/3" rel="nofollow noreferrer">buffered channel</a> with a capacity of one. The ticker drops time values when the channel is full.</p> <p>Here's the timeline for the trace in the question. Events listed for the same time happen a tiny bit after each other i...
Golang time.Ticker triggers twice after blocking a while
go|timer
-1
296
2
71,191,284
71,191,284
2
true
2022-02-20T03:06:10.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Golang time.Ticker triggers twice after blocking a while<p>I'm using <code>time.Ticker</code> with some blocking code, found a strange behavior:</p> <pre cla...
71,202,206
What unit should I use to set imageView width and height in Android?<pre><code> imageView.getLayoutParams().height = 130; imageView.getLayoutParams().width= 230; </code></pre> <p>Here 130 and 230 are DP or pixel?</p>
<p>They're in pixels. All lengths and widths outside of xml are in pixels. You can convert DP to pixels by using <a href="https://stackoverflow.com/questions/4605527/converting-pixels-to-dp">Converting pixels to dp</a> if you want to specify the size in dp.</p>
What unit should I use to set imageView width and height in Android?
android|imageview
-1
28
1
71,202,282
71,202,282
2
true
2022-02-21T06:49:13.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What unit should I use to set imageView width and height in Android?<pre><code> imageView.getLayoutParams().height = 130; imageView.getLayoutParams().width=...
71,253,688
Numpy: Swap value in 2D numpy array<p>I have a 2D numpy array:</p> <pre><code>arr = np.array(([[6,1,2], [3,4,5], [0,7,8]])) </code></pre> <p>I use a other 1D numpy array:</p> <pre><code>value = np.asarray([9,8,7,6,5,4,3,2,1]) </code></pre> <p>I would like to change the values ​​of my 2...
<p>This is very simple, you just need a single command. Numpy automatically takes care of the vectorization.</p> <pre><code>arr = value[arr] </code></pre> <p>Here is an example with the data you provided:</p> <pre><code>&gt;&gt;&gt; value[arr] array([[3, 8, 7], [6, 5, 4], [9, 2, 1]]) </code></pre>
Numpy: Swap value in 2D numpy array
python|numpy
-1
27
1
71,253,773
71,253,773
2
true
2022-02-24T14:42:09.953Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Numpy: Swap value in 2D numpy array<p>I have a 2D numpy array:</p> <pre><code>arr = np.array(([[6,1,2], [3,4,5], [0,7,8]]))...
71,291,261
Why .save( ) is not and throwing error as ``TypeError: sourceData.save is not a function``?<p>Here is the code of my source model:</p> <pre><code>const sourceSchema = new Schema( { name:{ type: String, required: true }, url:{ type: String, requ...
<p>The <code>.find</code> method returns an array as the result. You might want to use <code>.findOne</code> instead.</p>
Why .save( ) is not and throwing error as ``TypeError: sourceData.save is not a function``?
node.js|mongoose
-1
28
1
71,291,287
71,291,287
2
true
2022-02-28T06:21:05.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why .save( ) is not and throwing error as ``TypeError: sourceData.save is not a function``?<p>Here is the code of my source model:</p> <pre><code>const sourc...
71,318,430
Fetch data ageing for more than 90 days in oracle<p>I want to get data in oracle for more than 90 days from todays date. So I wrote the below query for fetching the data.</p> <pre><code>select a.span_id, a.link_id, b.rejected_date from tbl_fiber_inv_jobs a inner join tbl_fiber_inv_job_progress b on a.job_id = b.job_...
<blockquote> <p>I want to get data in oracle for <strong>more than 90 days from todays date</strong></p> </blockquote> <p>To me, it looks like</p> <pre><code>and b.rejected_date &lt;= TRUNC(sysdate)-90 </code></pre>
Fetch data ageing for more than 90 days in oracle
oracle|datetime|stored-procedures
-1
44
1
71,318,510
71,318,510
2
true
2022-03-02T06:43:54.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fetch data ageing for more than 90 days in oracle<p>I want to get data in oracle for more than 90 days from todays date. So I wrote the below query for fetch...
71,334,086
Why can I write a for loop that doesn't modify the counter?<p>This code seems to be valid Dart code, even though the last part of the for loop declaration i missing:</p> <pre><code>for( int i=0; i&lt;1; ){ // Missing i++ // Do something } </code></pre> <p>The result is an infinite loop.</p> <p>Why is this not conside...
<p>Well it is a feature, it just gives you an extra control over your for loop. You are technically still following the contract of for-loop but stating that, incremental part will be handled by you later on.</p> <p>This t just gives you a chance to do the increment within the for loop instead of doing it on the fly.</...
Why can I write a for loop that doesn't modify the counter?
dart
-1
29
2
71,334,188
71,334,188
2
true
2022-03-03T08:28:13.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why can I write a for loop that doesn't modify the counter?<p>This code seems to be valid Dart code, even though the last part of the for loop declaration i ...
71,362,985
How to convert a loop into a list comprehension<p>How can I write this loop using list comprehension?</p> <pre><code>t = [i.find_all('li') for i in soup.select('div.col.col-7-12')] Des = [] for i in t: r = [] Des.append(r) for j in i: n = j.text r.append(n) </code></pre>
<pre><code>t = [i.find_all('li') for i in soup.select('div.col.col-7-12')] Des = [] for i in t: r = [] Des.append(r) for j in i: n = j.text r.append(n) </code></pre> <p>Replace one loop:</p> <pre><code>t = [i.find_all('li') for i in soup.select('div.col.col-7-12')] Des = [] for i in...
How to convert a loop into a list comprehension
python|list-comprehension
-1
42
1
71,363,056
71,363,056
2
true
2022-03-05T14:25:06.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert a loop into a list comprehension<p>How can I write this loop using list comprehension?</p> <pre><code>t = [i.find_all('li') for i in soup.sele...
71,398,603
Calculate intersected distance across polygons between two points<p><a href="https://i.stack.imgur.com/c1zTz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c1zTz.png" alt="enter image description here" /></a></p> <p>I have shape files including all the coordinates (lat, long) of different polygons, ...
<ul> <li>have generated some geometry. A grid over Ukraine and a diagonal line</li> <li>using <a href="https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoSeries.intersection.html" rel="nofollow noreferrer">https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoSeries.intersection.html</a> to find...
Calculate intersected distance across polygons between two points
python|geopandas|gdal|shapely
-1
522
2
71,400,136
71,400,136
2
true
2022-03-08T16:47:24.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculate intersected distance across polygons between two points<p><a href="https://i.stack.imgur.com/c1zTz.png" rel="nofollow noreferrer"><img src="https:/...
71,333,718
mySql and php add to database<p>I've been stuck on this for hours. I have to manipulate a database with a website using php. I'm trying to add data from a form to my database but it gives me : PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens i...
<p>You are using named placeholder in your prepared statement. This means you'll need to pass those as an associative index. Otherwise the statement will not know which value to bind to the placeholder</p> <pre><code>$req-&gt; execute(array( ':adresse' =&gt; $_POST['adresse'], ':ouverture' =&gt; $_...
mySql and php add to database
php|mysql
-1
41
1
71,333,775
71,333,775
2
true
2022-03-03T07:51:30.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mySql and php add to database<p>I've been stuck on this for hours. I have to manipulate a database with a website using php. I'm trying to add data from a fo...
71,213,609
Cleaner way and alternative to write if and else with JS checks<p>What are some alternatives to write cleaner, better, and smarter if/else function?</p> <p>I am actually trying to convert my code to something more readable.</p> <pre><code> const statusComment = () =&gt; { const isApproved = &quot;&quot;; co...
<p>Let's break it down a bit: your string has two parts that are joined by a dash <code>-</code>:</p> <ol> <li>The first part is always present: it depends on the <code>checkApproval</code> boolean value.</li> <li>The second part is optional and depends on the truthy status of <code>comment</code>.</li> </ol> <p>Also, ...
Cleaner way and alternative to write if and else with JS checks
javascript
-1
38
2
71,214,147
71,214,147
2
true
2022-02-21T22:09:33.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cleaner way and alternative to write if and else with JS checks<p>What are some alternatives to write cleaner, better, and smarter if/else function?</p> <p>I...
71,377,434
How to set maximum date upto current month only in Datepicker?<blockquote> <p>I want to set max date upto current month only. But if I use below concept app crashes if date exceeds current month.</p> </blockquote> <pre><code>public void showDateTimePicker() { final Calendar currentDate = Calendar.getInstance();...
<p>No idea about the <code>NullPointerException</code> you are getting looks like a device specific crash.</p> <p>To restrict user to select date only for current month thecode below should work fine . Also the last argument of constructor is <code>dayOfMonth</code> so u should fix it also it should be <code>currentDat...
How to set maximum date upto current month only in Datepicker?
android
-1
40
1
71,377,774
71,377,774
2
true
2022-03-07T06:59:57.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to set maximum date upto current month only in Datepicker?<blockquote> <p>I want to set max date upto current month only. But if I use below concept app ...
71,415,493
How to group documents for the last 12 months, month wise when you have unix time stored as timeStamp?<p>I have a collection where data is updated daily based on unix epoch time. For example:</p> <pre><code>{ &quot;uID&quot; : &quot;12345678&quot;, &quot;midNightTimeStamp&quot; : NumberInt(1645381800), // 21s...
<p>Maybe this:</p> <pre><code> db.collection.aggregate([ { $group: { _id: { $dateToString: { format: &quot;%Y-%m&quot;, date: { $toDate: { &quot;$multiply&quot;: [ &quot;$midNightTimeStamp&quot;, 1000 ] } } } }, ...
How to group documents for the last 12 months, month wise when you have unix time stored as timeStamp?
node.js|mongodb|mongoose|mongodb-query
-1
39
3
71,416,154
71,416,154
2
true
2022-03-09T20:16:37.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to group documents for the last 12 months, month wise when you have unix time stored as timeStamp?<p>I have a collection where data is updated daily base...
71,196,590
Python text adventure game, ending loop<p>I am stuck on ending my game and breaking the loop. I have tried rephrasing, putting it in different spots, etc. The game-ending parameter is that if you reach the State of Florida <em>with</em> all six items you win, otherwise you lose. Instead, I can get to that final room an...
<p>In this code:</p> <pre><code> if current_room in ['State of Florida']: if len(inventory) == 6: print('You have contracted COVID-19! G A M E O V E R') else: print('You have defeated COVID-19!') print('Thank you for protecting your fellow ...
Python text adventure game, ending loop
python|while-loop|nested-loops
-1
542
1
71,196,683
71,196,683
2
true
2022-02-20T16:50:43.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python text adventure game, ending loop<p>I am stuck on ending my game and breaking the loop. I have tried rephrasing, putting it in different spots, etc. Th...
71,099,729
Calculate the transpose of a list python without using numpy<p>How to calculate the transpose of this without using numpy:</p> <pre><code>t = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] </code></pre>
<p>Just do:</p> <pre><code>t = list(zip(*t)) </code></pre> <p>Output:</p> <pre><code>[(1, 4, 7), (2, 5, 8), (3, 6, 9)] </code></pre>
Calculate the transpose of a list python without using numpy
python
-1
34
1
71,099,747
71,099,747
2
true
2022-02-13T10:21:27.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculate the transpose of a list python without using numpy<p>How to calculate the transpose of this without using numpy:</p> <pre><code>t = [[1, 2, 3], [4,...
71,137,980
Convert three values ​of list dropdowns to a string variable<p>I have three drop-down lists, day, month and year.</p> <p><strong>First:</strong> I want to put a conditional code that if all three is selected, something is done.</p> <p><strong>Second:</strong> I want to store the values ​​of all three in a string variab...
<p>I'm not sure how you would say when they are all three null, based on your code provided, but for the string part you can do.</p> <pre><code>var s = &quot;&quot;; $('.custom-select').change(function() { s = $('.custom-select').map(function() { return $(this).val(); }).get().join(&quot; &quot;); console.log...
Convert three values ​of list dropdowns to a string variable
javascript|jquery
-1
31
1
71,138,236
71,138,236
2
true
2022-02-16T07:45:43.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert three values ​of list dropdowns to a string variable<p>I have three drop-down lists, day, month and year.</p> <p><strong>First:</strong> I want to pu...
71,121,236
summarise() in R by specific observations<p>I am trying to gather summary statistics of a variable (diffdays) when the variable &quot;disease&quot; is equal to Malaria.</p> <p>My code for this is:</p> <p><code>summary(deathdata$diffdays, deathdata$disease == &quot;Malaria&quot;)</code></p> <p>This doesn't seem to be wo...
<p>I don't have access to your data but using the built-in <code>mtcars</code> data I would summarize <code>mpg</code> with <code>summary(mtcars$mpg)</code>. If I wanted to limit my summary to just those cars with six cylinders I'd subset the data in my call to <code>summary</code>: <code>summary(mtcars[mtcars$cyl == 6...
summarise() in R by specific observations
r|summary
-1
32
1
71,121,282
71,121,282
3
true
2022-02-15T04:49:35.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: summarise() in R by specific observations<p>I am trying to gather summary statistics of a variable (diffdays) when the variable &quot;disease&quot; is equal ...
71,325,144
Unable to center h2 on smaller screens<p>It's good on big screens, but when I resize the window to less than 600px, everything aligns on left. I wanted it to break on different lines if the screen size is less + aligned centre. Can you please help, as I am frustrated with this...don't know what am I doing wrong. Also, ...
<p><code>h2</code> is a block level element, whose default <code>text-align</code> is <code>left</code> unless specified.</p> <p>What's happening is that while <code>h2 block</code> is center-aligned, its text content inside is left-aligned. You simply need to add <code>text-align: center;</code> to your <code>h2</code...
Unable to center h2 on smaller screens
html|css|flexbox
-1
38
1
71,325,232
71,325,232
3
true
2022-03-02T15:22:37.977Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to center h2 on smaller screens<p>It's good on big screens, but when I resize the window to less than 600px, everything aligns on left. I wanted it to...
71,424,532
Ruby - undefined local variable or method `_1'<p>I'm getting the error <code>undefined local variable or method '_1' for main:Object</code> when I run the following code. Any idea why I'm getting this error? and how can I store the result in a variable.</p> <pre><code>result=&quot;-e hostname=webserver001 -e username=...
<p>You're probably running an older version of ruby - the numbered parameters for blocks have been available in ruby since 2.7 - see <a href="https://www.bigbinary.com/blog/ruby-2-7-introduces-numbered-parameters-as-default-block-parameters" rel="nofollow noreferrer">https://www.bigbinary.com/blog/ruby-2-7-introduces-n...
Ruby - undefined local variable or method `_1'
ruby
-1
274
1
71,424,815
71,424,815
3
true
2022-03-10T12:58:18.227Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ruby - undefined local variable or method `_1'<p>I'm getting the error <code>undefined local variable or method '_1' for main:Object</code> when I run the f...
71,420,020
Why is my execution being stopped after printing a linked list?<pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; struct node { int data; struct node* link; }; typedef struct node NODE; typedef struct node HEAD; void main() { NODE *head; NODE *node1; node1 = malloc(sizeof(NODE)); n...
<p>Here:</p> <pre class="lang-c prettyprint-override"><code>node1-&gt;link = head; </code></pre> <p>At here, the pointer <code>head</code> is still <strong>uninitialized</strong>, that is neither a block of memory nor <code>NULL</code>. So the linked-list is actually looking like <code>7 -&gt; 6 -&gt; ???</code>. Since...
Why is my execution being stopped after printing a linked list?
c|linked-list|singly-linked-list
-1
44
1
71,420,096
71,420,096
4
true
2022-03-10T07:02:39.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is my execution being stopped after printing a linked list?<pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; struct node { int data; ...
71,332,237
GitLab error to access git lab, but i can access github<p>im having this strange issue and i did't found any answers around.</p> <p>I do pushes on gitHub ok, no problem.</p> <p>In gitLab, i have this problem:</p> <p>$ git push origin development rafael@gitlab.com: Permission denied (publickey,keyboard-interactive). fat...
<p>The commit email address and the git pull/push authentication are not the same thing.</p> <p>You cannot use <code>rafael@gitlab.com</code> for Git push. When pushing to GitLab over SSH, the SSH username is always <code>git</code>, not your username. GitLab identifies you based on the SSH key, not the username.</p> <...
GitLab error to access git lab, but i can access github
git|gitlab
-1
295
1
71,332,253
71,332,253
4
true
2022-03-03T04:43:53.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GitLab error to access git lab, but i can access github<p>im having this strange issue and i did't found any answers around.</p> <p>I do pushes on gitHub ok,...
71,419,402
Find name of column which is non nan<p>I have a Dataframe defined like :</p> <pre><code>df1 = pd.DataFrame({&quot;col1&quot;:[1,np.nan,np.nan,np.nan,2,np.nan,np.nan,np.nan,np.nan], &quot;col2&quot;:[np.nan,3,np.nan,4,np.nan,np.nan,np.nan,5,6], &quot;col3&quot;:[np....
<p>You can <code>stack</code> it:</p> <pre><code>out = (df1.stack().astype(int).droplevel(0) .rename_axis('col_name').reset_index(name='value')) </code></pre> <p>Output:</p> <pre><code> col_name value 0 col1 1 1 col2 3 2 col3 7 3 col2 4 4 col1 2 5 col3 8 6 ...
Find name of column which is non nan
python|pandas|dataframe
-1
43
1
71,419,429
71,419,429
5
true
2022-03-10T05:51:26.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find name of column which is non nan<p>I have a Dataframe defined like :</p> <pre><code>df1 = pd.DataFrame({&quot;col1&quot;:[1,np.nan,np.nan,np.nan,2,np.nan...
71,209,618
Convert template html in django to pdf and download it<p>How I can create a button on my web page using Django to convert the page to PDF and download it ?</p>
<p>Try this.</p> <p>...This document explains how to output PDF files dynamically using Django views. This is made possible by the excellent, open-source ReportLab Python PDF library.</p> <p><a href="https://docs.djangoproject.com/en/4.0/howto/outputting-pdf/" rel="nofollow noreferrer">https://docs.djangoproject.com/en...
Convert template html in django to pdf and download it
python|html|css|django|button
-1
1,046
1
71,209,649
71,209,649
-2
true
2022-02-21T16:16:29.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert template html in django to pdf and download it<p>How I can create a button on my web page using Django to convert the page to PDF and download it ?</...
71,099,253
I have a problem with <button>. I don't know what I'm doing wrong<p>I'm just a beginner and I'm trying to add a button with url to website.</p> <p>It works in browser, but for some reason Dreamweaver keeps giving me error that special characters need to be escaped. Please help, what am I doing wrong?</p> <p>Here's the ...
<p>Try this instead:</p> <pre><code>&lt;button class=&quot;button button2&quot; onclick=&quot;location.href='url.html'&quot;&gt;url_text&lt;/button&gt; </code></pre>
I have a problem with <button>. I don't know what I'm doing wrong
html|css|button
-1
26
1
71,099,296
71,099,296
-1
true
2022-02-13T09:07:12.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I have a problem with <button>. I don't know what I'm doing wrong<p>I'm just a beginner and I'm trying to add a button with url to website.</p> <p>It works i...
71,111,879
@client.event and @client.command<p>So I've been writing a bot using discord.py, and I've found an error I can't seem to be able to fix. First, I have something like this:</p> <pre><code>@client.command() async def ping(ctx): await ctx.send(&quot;Pong!&quot;) </code></pre> <p>Then I added an entire section here:</p> ...
<p>Your commands doesn't work because of on_message. What happens is you are overriding the default <code>on_message</code> and defaut <code>on_message</code> is the one that handles the commands. You can fix it by adding a <code>bot.process_commands(message)</code> line at the end of your <code>on_message</code>.</p> ...
@client.event and @client.command
python|discord|discord.py
-1
295
1
71,112,234
71,112,234
-1
true
2022-02-14T12:24:30.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: @client.event and @client.command<p>So I've been writing a bot using discord.py, and I've found an error I can't seem to be able to fix. First, I have someth...