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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72,274,876 | Time limit exceeded in hackerearth exercise<p>I'm trying to solve <a href="https://www.hackerearth.com/practice/basic-programming/implementation/basics-of-implementation/practice-problems/algorithm/tin-and-creatures-2f60b404/" rel="nofollow noreferrer">this exercise</a> in HackerEarth.
But I have an error of <em><stron... | <p>Your solution is a little bit slow because of the bad implementation.
I rewrote your solution in better implementation with the same logic and time complexity of your solution and get <em>Accepted</em> and none of the test cases exceeded <strong>.8 second</strong></p>
<pre><code>import java.util.*;
class TestClass... | Time limit exceeded in hackerearth exercise | java|algorithm | 0 | 74 | 1 | 72,275,522 | 72,275,522 | 0 | true | 2022-05-17T13:25:37.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Time limit exceeded in hackerearth exercise<p>I'm trying to solve <a href="https://www.hackerearth.com/practice/basic-programming/implementation/basics-of-im... |
72,263,990 | How to convert auxiliary coordinates to dimension coordinates in a cube in iris?<p>I am pretty new to using NetCDF Jules output files. I am trying to write a routine to create multiple plots visualising the output from my simulations.</p>
<p>After reading in the cubes I have the following format:</p>
<pre><code>filenam... | <p>some functions to which helped my specific problem.</p>
<p><a href="https://code.metoffice.gov.uk/trac/utils/browser/smstress_jpeg/trunk/jules.py#L629" rel="nofollow noreferrer">https://code.metoffice.gov.uk/trac/utils/browser/smstress_jpeg/trunk/jules.py#L629</a></p> | How to convert auxiliary coordinates to dimension coordinates in a cube in iris? | python|netcdf|cube|python-iris | 0 | 74 | 1 | 72,288,603 | 72,288,603 | 0 | true | 2022-05-16T18:30:34.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert auxiliary coordinates to dimension coordinates in a cube in iris?<p>I am pretty new to using NetCDF Jules output files. I am trying to write a... |
72,298,266 | laravel eloquent migrations<p>In laravel eloquent relationship, is it still necessary to make migration even though there's an existing database? beginners here.</p>
<p>I create a one-to-one eloquent relationship inside my model to get the specific column from another table's record and fetch to the datatable, but it d... | <p>No. Migrations are not necessary. Defining relationships on both sides is also not necessary, if you don't need them both. (You can have only belongsTo, without having hasOne or hasMany in the opposite model.)</p>
<p>First, make sure you are using the right object (Directorystatus::class / Directoryuser:class - I se... | laravel eloquent migrations | laravel|eloquent | 0 | 74 | 1 | 72,298,949 | 72,298,949 | 0 | true | 2022-05-19T03:22:54.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
laravel eloquent migrations<p>In laravel eloquent relationship, is it still necessary to make migration even though there's an existing database? beginners h... |
72,306,294 | Calculate weighted average of dataframe rows with missing values<p>I have a similar situation to the one described in <a href="https://stackoverflow.com/questions/67433044/pyspark-calculate-row-wise-weighted-average-with-null-entries">this question</a>. The difference is I'm not working in Pyspark, just with pandas, nu... | <p>Implementing the idea in my comment above. which is simpler than I thought because the <code>DataFrame.sum</code> method seems to do <code>fillna=0</code> automatically:</p>
<pre><code>(df*w).sum(axis=1)/(~pd.isnull(df)*w).sum(axis=1)
</code></pre>
<p>will perform this operation in a vectorized way on all rows.</p> | Calculate weighted average of dataframe rows with missing values | python | 0 | 74 | 1 | 72,308,279 | 72,308,279 | 0 | true | 2022-05-19T14:21:56.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate weighted average of dataframe rows with missing values<p>I have a similar situation to the one described in <a href="https://stackoverflow.com/ques... |
72,316,346 | Problem with react hooks, cant create a chatroom<p>I'm trying to create a chatroom using mutation and react hooks. I cant find the solution to the error i'm getting. The error is: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:<... | <p>The function named <code>helper</code> calls <code>useSelector</code>. As per the <a href="https://reactjs.org/docs/hooks-rules.html" rel="nofollow noreferrer">rules of hooks</a>, Hooks can only be called:</p>
<ul>
<li>from functional components</li>
<li>from custom hooks</li>
</ul>
<p>A custom hook is a function th... | Problem with react hooks, cant create a chatroom | react-native|react-hooks|react-query | 0 | 74 | 1 | 72,321,067 | 72,321,067 | 0 | true | 2022-05-20T09:09:27.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem with react hooks, cant create a chatroom<p>I'm trying to create a chatroom using mutation and react hooks. I cant find the solution to the error i'm ... |
72,322,100 | Replacing a nested array inside an array of objects with new array of objects<p>This is the structure of my data document</p>
<pre><code>{
"_id": "6287a6c5975a25cc25e095b0",
"userName": "Robot",
"projectName": "TestProject",
"projectTypeName": "... | <p>You can simply achieve that by iterating <code>versions</code> array <strong>:</strong></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 data = {
versions: [{
ver... | Replacing a nested array inside an array of objects with new array of objects | javascript|node.js|arrays|mongodb|mongoose | 0 | 74 | 1 | 72,331,191 | 72,331,191 | 0 | true | 2022-05-20T16:30:20.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replacing a nested array inside an array of objects with new array of objects<p>This is the structure of my data document</p>
<pre><code>{
"_id": &... |
72,334,597 | how to convert this (month/day/year ) date format to actual timestamp in rails<p>I have date in this format <strong>month/day/year</strong>. How i can convert this date to actual timestamp. in ruby on rails.</p>
<p>e.g.</p>
<p>date = 6/21/2021</p> | <p>I think you just need format that string to valid format to convert to date, something like this:</p>
<pre><code>old_format = '6/21/2021'.split('/')
old_format[0], old_format[1] = old_format[1], old_format[0]
old_format.join('/').to_date
</code></pre> | how to convert this (month/day/year ) date format to actual timestamp in rails | ruby-on-rails|ruby | 0 | 74 | 1 | 72,334,765 | 72,334,765 | 0 | true | 2022-05-22T03:26:22.523Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to convert this (month/day/year ) date format to actual timestamp in rails<p>I have date in this format <strong>month/day/year</strong>. How i can conver... |
72,334,921 | Python - While Loop not ending<p>first time posting!</p>
<p>My program is not ending after typing "X" at the menu. It seems <code>While</code> is not breaking and continuing to loop. The program works properly other than the exit feature. Goal is to type x (lower or upper case) and end program.</p>
<p>Any ide... | <p>Your while loop depends on the param <code>mainmenu</code>:</p>
<pre><code>while mainmenu != "x":
</code></pre>
<p>But you get <code>x</code> as the input for variable <code>menu</code>:</p>
<pre><code>menu = input("\n""Type number of category: " "\n")
</code></pre> | Python - While Loop not ending | python|python-3.x|python-2.7|while-loop | 1 | 74 | 4 | 72,334,946 | 72,334,946 | 0 | true | 2022-05-22T05:01:16.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python - While Loop not ending<p>first time posting!</p>
<p>My program is not ending after typing "X" at the menu. It seems <code>While</code> is n... |
72,334,218 | EMR Notebook Access HDFS<p>If I am in an EMR notebook and save a model like .save('model.sav') where does it save and how would I reference it with hdfs dfs commands (the hdfs path)?</p> | <p>You could give an absolute save path instead but by default, it should go under the HDFS /home folder for the user account running the notebook</p> | EMR Notebook Access HDFS | apache-spark|hadoop|amazon-emr | 0 | 74 | 1 | 72,348,787 | 72,348,787 | 0 | true | 2022-05-22T01:25:39.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
EMR Notebook Access HDFS<p>If I am in an EMR notebook and save a model like .save('model.sav') where does it save and how would I reference it with hdfs dfs ... |
72,332,552 | VB.net copying and pasting a column from one sheet to another sheet<p>I have been working on opening an existing workbook, while creating two new sheets inside that workbook. After that is done, I am trying to copy an entire column from an existing sheet in the workbook to one of the new sheets I have created then remo... | <p>Finally figured it out after multiple, multiple tries.</p>
<pre><code>trace.Range("E:E").Copy()
unique_numbers.Range("A:A").PasteSpecial(Excel.XlPasteType.xlPasteAll)
unique_numbers.Range("A:A").RemoveDuplicates(Columns:=1,Header:=Excel.XlYesNoGuess.xlYes)
</code></pre> | VB.net copying and pasting a column from one sheet to another sheet | excel|vb.net|vb.net-2010 | 0 | 74 | 1 | 72,355,023 | 72,355,023 | 0 | true | 2022-05-21T19:13:30.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VB.net copying and pasting a column from one sheet to another sheet<p>I have been working on opening an existing workbook, while creating two new sheets insi... |
72,328,755 | Not progressing from Nuxt loading screen<p>We are using Nuxt.</p>
<p>The <code>ssr </code> and <code>target </code> of the <code>nuxt.config.js</code> are set as follows</p>
<pre><code>export default {
ssr: false,
target: 'static',
}
</code></pre>
<p>Our site is working almost exactly as expected.
However, when we ... | <p>After all, our phenomenon seems to be the same problem as theirs.
<a href="https://github.com/nuxt/nuxt.js/issues/6442" rel="nofollow noreferrer">https://github.com/nuxt/nuxt.js/issues/6442</a></p>
<p>If I may reiterate the condition they describe, it occurs when multiple tabs are used in Chirome. These do not seem ... | Not progressing from Nuxt loading screen | vue.js|nuxt.js | -1 | 74 | 1 | 72,360,171 | 72,360,171 | 0 | true | 2022-05-21T10:35:29.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not progressing from Nuxt loading screen<p>We are using Nuxt.</p>
<p>The <code>ssr </code> and <code>target </code> of the <code>nuxt.config.js</code> are se... |
72,387,169 | How to drop rows from a dataframe based on condition in python?<p>So I have a CSV file that has data in the following manner:</p>
<pre><code>|Variable |Time |Value|
|A1 |Jan | 33 |
| |Feb | 21 |
| |Mar | 08 |
| |Apr | 17 |
| |May | 04 |
| |Jun |... | <p>Assuming your data is arranged as you described, with some extrapolation as below
<a href="https://i.stack.imgur.com/tbLl6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tbLl6.png" alt="enter image description here" /></a></p>
<p>Use pandas' <code>ffill()</code> to impute the variable column to f... | How to drop rows from a dataframe based on condition in python? | python|pandas|csv | -1 | 74 | 2 | 72,387,811 | 72,387,811 | 0 | true | 2022-05-26T05:37:33.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to drop rows from a dataframe based on condition in python?<p>So I have a CSV file that has data in the following manner:</p>
<pre><code>|Variable |Time ... |
72,383,309 | How to keep original color in logs for grep | docker | act<p>I have started working with <a href="https://github.com/nektos/act" rel="nofollow noreferrer">nektos/act</a> repository to run my Github Actions locally and what I want to do is to display the <strong>original color</strong> logs only for the steps in my work... | <p>The reason this happens is that programs usually only print terminal control sequences (colours) if the output file is a terminal device. Control sequences usually aren't printed if output is piped or redirected to a regular file.</p>
<p>If the command doesn't have an option to force colours (like <code>--color=alwa... | How to keep original color in logs for grep | docker | act | linux|docker|grep | 0 | 74 | 1 | 72,391,631 | 72,391,631 | 0 | true | 2022-05-25T19:40:03.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to keep original color in logs for grep | docker | act<p>I have started working with <a href="https://github.com/nektos/act" rel="nofollow noreferrer">ne... |
72,378,655 | Install the same file to all subdirectories in Inno Setup<p>I am newbie with Inno Setup and I have been reading some threads but could not find how to do the following.</p>
<p>I simply would like to search for folders within a directory and in each folder detected install the same file with no selection of wizard page ... | <p>Thanks a lot Martin! I did it another way that may be of help to other users.
I set a file for every potential folder I want to detect (it was only for four).</p>
<pre><code>[Files] Source: "C:\Users\XXXXX\dll\*"; DestDir: "{commonappdata}\XXXX\2023"; Check:CheckDir2023;
</code></pre>
<p>Then I u... | Install the same file to all subdirectories in Inno Setup | installation|inno-setup|pascalscript | 2 | 74 | 2 | 72,394,271 | 72,394,271 | 0 | true | 2022-05-25T13:35:09.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Install the same file to all subdirectories in Inno Setup<p>I am newbie with Inno Setup and I have been reading some threads but could not find how to do the... |
72,389,169 | How to convert in kotlin view model factory to property delegation?<p>I have this base class for view model factory :</p>
<pre><code>class BaseViewModelFactory<T>(val creator: () -> T) : ViewModelProvider.Factory {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
return cr... | <p>Here's a way to do that:</p>
<pre><code>class LazyViewModelDelegate<T: ViewModel>(
private val viewModelClass: Class<T>,
private val viewModelProducer: () -> T) {
lateinit var provider: ViewModelProvider
operator fun getValue(owner: ViewModelStoreOwner, property: KProperty<*>):... | How to convert in kotlin view model factory to property delegation? | android|kotlin|generics | 0 | 74 | 1 | 72,486,627 | 72,486,627 | 0 | true | 2022-05-26T08:49:49.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert in kotlin view model factory to property delegation?<p>I have this base class for view model factory :</p>
<pre><code>class BaseViewModelFacto... |
72,336,948 | %pre section doesn't work in kickstart installation<p>During kickstart installation i try to configure network in %pre section but it doesn't work.</p>
<p>When i configure network in main body of kickstart file it works (as below):</p>
<pre><code>firewall --disabled
network --device=ens3f1 --hostname=foo --bootproto=st... | <p>Ok, if someone wants to make network work in %pre section of kickstart file, a runtime image should be added in ISO and inst.stage2 should point to that image.</p>
<p>If I'm not wrong commands in kickstart's main body is taken in consideration in stage1. But the commands/scripts in %pre run in stage2. As the install... | %pre section doesn't work in kickstart installation | linux|centos|redhat|fedora | 0 | 74 | 1 | 72,591,754 | 72,591,754 | 0 | true | 2022-05-22T10:59:04.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
%pre section doesn't work in kickstart installation<p>During kickstart installation i try to configure network in %pre section but it doesn't work.</p>
<p>Wh... |
72,294,409 | How to download a file from TLS1.3 enabled web site on Windows 10 using webclient or httpclient in C#<p>I am trying to download a file from UK government official site using WebClient and HttpClient in C#
Following is the site which i guess is using <strong>TLS1.3</strong></p>
<p><a href="https://www.gov.uk/government/... | <p>Finally I was successful in doing so, using following HttpClient but it is not applicable to all sites.</p>
<pre><code>var httpClient = new System.Net.Http.HttpClient();
var httpResult = httpClient.GetAsync(fileUrl);
httpResult.Wait();
using (var resultStream = httpResult.Result.Content.Read... | How to download a file from TLS1.3 enabled web site on Windows 10 using webclient or httpclient in C# | c#|webclient|dotnet-httpclient|tls1.3|system.net.httpwebrequest | 0 | 74 | 1 | 72,634,222 | 72,634,222 | 0 | true | 2022-05-18T18:39:24.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to download a file from TLS1.3 enabled web site on Windows 10 using webclient or httpclient in C#<p>I am trying to download a file from UK government off... |
72,324,440 | Relatively positioned <div> preventing absolutely positioned elements from displaying with no apparent overlap<p>So I have this page: <a href="https://i.stack.imgur.com/DrzBO.png" rel="nofollow noreferrer">Image of page</a> the lines on the left are supposed to be behind (or on top of, I don't care) the text box. The ... | <p>Updated per comment:</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-css lang-css prettyprint-override"><code>.headerLarge {
position: relative;
padding-top: 1.5rem;
padding-bottom: 0px;
margin: 0 16px;
... | Relatively positioned <div> preventing absolutely positioned elements from displaying with no apparent overlap | javascript|html|css | 2 | 74 | 1 | 72,324,516 | 72,324,516 | 0 | true | 2022-05-20T20:22:38.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Relatively positioned <div> preventing absolutely positioned elements from displaying with no apparent overlap<p>So I have this page: <a href="https://i.stac... |
72,262,404 | Error "Index: 0, Size: 0" while using AWSUtility::CloudFormation::CommandRunner in cloud formation template<p>We are trying to run few bash commands in cloud formation template in AWS.</p>
<p>We followed the following blog of AWS to run CommandRunner utilty in cloud formation template.
<a href="https://aws.amazon.com/b... | <p>When contacted AWS Supported team, they gave the following response.</p>
<blockquote>
<p>The Index: 0, Size: 0 error usually happens because you may not have a
default VPC in the eu-west-2 region (P.S.: I am not able to verify
this since I do not have access to your account).</p>
<p>In general, CommandRunner uses th... | Error "Index: 0, Size: 0" while using AWSUtility::CloudFormation::CommandRunner in cloud formation template | amazon-web-services|aws-cloudformation-custom-resource | 0 | 74 | 1 | 72,262,405 | 72,262,405 | 0 | true | 2022-05-16T16:19:02.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error "Index: 0, Size: 0" while using AWSUtility::CloudFormation::CommandRunner in cloud formation template<p>We are trying to run few bash commands in cloud... |
72,368,390 | How Java JPA Specification works with bit operations<p>I'm trying to run some bit operations in the specification but there is few documentations.</p>
<p>For instance, I have a table <code>tb_user</code> with a bit(32) field <code>roles</code>. I'm trying to search for records that has specific flipped bits (bit = 1). ... | <p>On my end</p>
<pre><code>builder.function("&", Integer.class, root.get("role"), 4);
</code></pre>
<p>would trigger an error</p>
<pre><code>java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right synta... | How Java JPA Specification works with bit operations | java|jpa | 0 | 74 | 2 | 72,398,765 | 72,398,765 | 0 | true | 2022-05-24T19:20:48.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How Java JPA Specification works with bit operations<p>I'm trying to run some bit operations in the specification but there is few documentations.</p>
<p>For... |
72,353,199 | How can I add a class to an anchor in a list item?<p>I am building a website in Wordpress and need to add a class to the anchor element that is inside a list item. The list item has a unique ID. The class I need to add will give me smooth scrolling on the anchor link.</p>
<p>I do not want to alter the theme, that is wh... | <p>There is a missing closure on your list item (or was)</p>
<pre class="lang-html prettyprint-override"><code><nav class="top-bar-nav">
<ul id="menu-topbalk">
<li id="menu-item-318"> <!-- missing ">" here -->
<a href="#contactgegev... | How can I add a class to an anchor in a list item? | javascript|jquery|wordpress|href | 0 | 74 | 1 | 72,353,439 | 72,353,439 | 0 | true | 2022-05-23T18:21:57.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I add a class to an anchor in a list item?<p>I am building a website in Wordpress and need to add a class to the anchor element that is inside a list... |
72,325,433 | Round the corners of a button in Window.Resources WPF<p>I am very new to WPF. I've familiarized myself with <code>ControlTemplate</code>, <code>ContentPresenter</code>, and some other pieces, but I am struggling to create a button with rounded corners as defined from <code>Window.Resources</code> (or potentially a sepa... | <p>The Border in your ControlTemplate is not visible, because you have neither set its Background, nor its BorderBrush.</p>
<p>You could have something like shown below. Note however that with a simple ControlTemplate like this a Button loses all the visualizations of its states, like <em>focused</em>, <em>mouse-over</... | Round the corners of a button in Window.Resources WPF | wpf | -1 | 74 | 1 | 72,325,664 | 72,325,664 | 0 | true | 2022-05-20T22:55:26.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Round the corners of a button in Window.Resources WPF<p>I am very new to WPF. I've familiarized myself with <code>ControlTemplate</code>, <code>ContentPresen... |
72,344,527 | Having a hard time building an aggregate SQL query<p>I am new at SQL and have a pretty good knowledge of basic stuff but I am stuck with my request.</p>
<p>My request gets me te following table (except for the last column on the right end side):</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<... | <p>I was not content with the previous answer, with OUTER APPLY, as understood from further reading. So had to do a bit of further grinding and this is what I came up with (Now for Postgres 13).</p>
<p>It is cleaner and does the job in a conciser fashion. I've also added a <a href="https://www.db-fiddle.com/f/mmDFMRHat... | Having a hard time building an aggregate SQL query | sql|request|aggregation | 0 | 74 | 1 | 72,344,747 | 72,344,747 | 0 | true | 2022-05-23T07:12:21.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Having a hard time building an aggregate SQL query<p>I am new at SQL and have a pretty good knowledge of basic stuff but I am stuck with my request.</p>
<p>M... |
72,396,223 | get values from an html table<p>I need to write a website that calculates the inverse matrix. I have a table. I also wrote a function to resize the table. I need the entered values to be read into a two-dimensional array (arr), and I can use this array as a function argument (PrintMatrix(arr)). I'm new to this and I'm ... | <p>If you want a function that returns a matrix with the input of your user, based on your code, you can use a more simple approach using the <code>id</code>s that you've set, with something like this:</p>
<pre class="lang-js prettyprint-override"><code>function getInputByMatrix() {
const rows = document.getElement... | get values from an html table | javascript|html | 1 | 74 | 1 | 72,408,002 | 72,408,002 | 0 | true | 2022-05-26T18:08:01.510Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
get values from an html table<p>I need to write a website that calculates the inverse matrix. I have a table. I also wrote a function to resize the table. I ... |
72,348,328 | how to fix on devc++ collect2.exe [Error] ld returned 1 exit status<p>It tells me error id returned 1 exit status when I try to run the code and have search it up from what i have seen is that you mostly get this error from misspelling main() function but that is not the case here.</p>
<pre><code>#include <iostream&... | <p>One of the mistakes you've made is that you haven't properly declared or defined you're functions. If you want to take the declare then define approach, you'll want to move you're declaration to the global scope and out of the <code>main()</code> function. Also because they don't return anything they should be decla... | how to fix on devc++ collect2.exe [Error] ld returned 1 exit status | c++ | 0 | 74 | 2 | 72,348,648 | 72,348,648 | 0 | true | 2022-05-23T12:11:58.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to fix on devc++ collect2.exe [Error] ld returned 1 exit status<p>It tells me error id returned 1 exit status when I try to run the code and have search ... |
72,282,797 | Convert ASCII to hex<p>I want convert ASCII values to hex. In Java, I often use the function:</p>
<pre><code>private static String asciiToHex(String asciiStr) {
char[] chars = asciiStr.toCharArray();
StringBuilder hex = new StringBuilder();
for (char ch : chars) {
hex.append(Integer.toHexString((int... | <p>The equivalent of <code>Integer.toHexString</code> would be to call <a href="https://api.dart.dev/stable/2.17.0/dart-core/int/toRadixString.html" rel="nofollow noreferrer">.toRadixString(16)</a> on an integer value.</p>
<p>The <code>asciiToHex</code> function can be translated to dart like so:</p>
<pre class="lang-d... | Convert ASCII to hex | string|flutter|dart|hex | 2 | 74 | 2 | 72,282,899 | 72,282,899 | 0 | true | 2022-05-18T03:09:46.340Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert ASCII to hex<p>I want convert ASCII values to hex. In Java, I often use the function:</p>
<pre><code>private static String asciiToHex(String asciiStr... |
72,311,779 | How to programmatically provision temporary IoT Certificates<p>Using Javascript/Nodejs how does one programmatically get a temporary provisioning claim certificate to send to the IoT device by a trusted user/installer? I have a Provisioning Template already created in my IoT Core and I can manually add it to the device... | <h3>Overview</h3>
<ol>
<li><p>Create a user with appropriate access on AWS</p>
</li>
<li><p>Obtain user’s <code>aws_access_key_id</code> and <code>aws_secret_access_key</code></p>
</li>
<li><p>Configure, Build, and Run Javascript AWS SDK</p>
</li>
<li><p>Get the Temporary Provisioning Certificate</p>
</li>
</ol>
<h1><s... | How to programmatically provision temporary IoT Certificates | amazon-web-services|aws-iot|aws-sdk-js|aws-sdk-nodejs | -1 | 74 | 1 | 72,311,835 | 72,311,835 | 0 | true | 2022-05-19T22:37:39.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to programmatically provision temporary IoT Certificates<p>Using Javascript/Nodejs how does one programmatically get a temporary provisioning claim certi... |
72,258,332 | Add legend to NetworkX graph (using matplotlib) based on node attribute<p>I'm having trouble adding a legend to a NetworkX graph (have checked for previous questions but the q's & a's so far have been specific to only semi-related issues).</p>
<p>I'd like to be able to map my network and color the nodes according t... | <p>Try adding these lines before <code>plt.show()</code>:</p>
<pre><code>import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
legend_elements = [Line2D([0], [0], marker='o', color='blue', label='Female', lw=0,
markerfacecolor='blue', markersize=10),
Line2D([0... | Add legend to NetworkX graph (using matplotlib) based on node attribute | python|matplotlib|networkx | 1 | 74 | 1 | 72,258,425 | 72,258,425 | 0 | true | 2022-05-16T11:16:53.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add legend to NetworkX graph (using matplotlib) based on node attribute<p>I'm having trouble adding a legend to a NetworkX graph (have checked for previous q... |
72,393,549 | Pandas Groupby integer with margin of error<p>I have a dataframe with two integer columns that represent the start and end of a string of text. I'd like to group my rows by length of text (end - start), but with a margin of error of +- 5 characters so that something like this would happen:</p>
<pre><code> start end
... | <p>I ended up solving the problem by rounding the length of my text.</p>
<pre><code>df['rounded_length'] = (df['end'] - df['start']).round(-1)
df = df.groupby('rounded_length')
</code></pre>
<p>All my values become multiples of 10, and I can group them this way.</p> | Pandas Groupby integer with margin of error | pandas|dataframe|pandas-groupby | 0 | 74 | 1 | 72,394,620 | 72,394,620 | 0 | true | 2022-05-26T14:36:25.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas Groupby integer with margin of error<p>I have a dataframe with two integer columns that represent the start and end of a string of text. I'd like to g... |
72,254,442 | How work with soap in Spring boot like an object?<p>I got soap project, thats works with xsd file. But I no idea how to work with soap.
How i can work with xsd file like an object?
What I need, get some data from database, set values to object, map to xsd file and sent to request with xsd file body
XSD:</p>
<pre><code>... | <p>Oh .. I see xroad :). use maven-jaxb2-plugin to generate pojo models from xsd. Grab data from database, map it to pojo generated previously and pass it to the ws client</p>
<p>Beware that some xsd schemas of xroad are insufficient.</p>
<p>You'd better to hide authentication details from your question.</p> | How work with soap in Spring boot like an object? | java|xml|soap | 0 | 74 | 1 | 72,254,576 | 72,254,576 | 0 | true | 2022-05-16T05:20:33.377Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How work with soap in Spring boot like an object?<p>I got soap project, thats works with xsd file. But I no idea how to work with soap.
How i can work with x... |
72,253,437 | Outputting a Linked List<p>I can't quite figure out how I'm supposed to get to the next value. Sofar I figured out how to get the first given value but not the remaining. Overall this is meant to be done using recursion. I mainly am trying to get a better understanding of how to go through the values given to IntNode c... | <p>Replace the <code>printLinkedList</code> function with below code:</p>
<pre><code>public static void printLinkedList(IntNode headNode) {
//check if the node is null or not
if (headNode != null) {
headNode.printData();
printLinkedList(headNode.getNext()); // recursively call the method with ne... | Outputting a Linked List | java | 0 | 74 | 1 | 72,253,506 | 72,253,506 | 1 | true | 2022-05-16T01:43:24.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Outputting a Linked List<p>I can't quite figure out how I'm supposed to get to the next value. Sofar I figured out how to get the first given value but not t... |
72,247,290 | JSON schema, check for object existence depending on member value<p>I have a few JSON files that look like as follow:</p>
<p><strong>data_A.json</strong></p>
<pre><code>{
"data": {
"params_id": "data_A",
"params": {
"A_params": {
... | <p>As you say, a nested <code>if-then-else</code> (in combination with a <code>const</code> to check for the value) is the usual way to do this with the current JSON Schema specification. This is possible if the number of variations is limited.</p>
<p>The <a href="https://json-schema.org/understanding-json-schema/refer... | JSON schema, check for object existence depending on member value | json|jsonschema | -1 | 74 | 1 | 72,255,807 | 72,255,807 | 1 | true | 2022-05-15T10:08:22.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JSON schema, check for object existence depending on member value<p>I have a few JSON files that look like as follow:</p>
<p><strong>data_A.json</strong></p>... |
72,256,978 | How to modify tensor inside custom layer tensorflow?<p>I have this custom layer that I get an error when I use it inside the model.</p>
<pre><code>class NormalLayer(tf.keras.layers.Layer):
def __init__(self, color_space):
super(NormalLayer, self).__init__()
self.color_space = color_space
def call(self, ima... | <p>Try something like this:</p>
<pre><code>import numpy as np
import tensorflow as tf
class NormalLayer(tf.keras.layers.Layer):
def __init__(self, color_space):
super(NormalLayer, self).__init__()
self.color_space = color_space
def call(self, image):
if self.color_space=="HSV":
retur... | How to modify tensor inside custom layer tensorflow? | python|tensorflow|keras|model|normalization | 1 | 74 | 1 | 72,259,394 | 72,259,394 | 1 | true | 2022-05-16T09:29:07.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to modify tensor inside custom layer tensorflow?<p>I have this custom layer that I get an error when I use it inside the model.</p>
<pre><code>class Norm... |
72,259,651 | How to modify the Dockerfile of a pulled docker image?<p>I have to pull the latest image from <a href="https://catalog.ngc.nvidia.com/orgs/nvidia/containers/tensorflow" rel="nofollow noreferrer">https://catalog.ngc.nvidia.com/orgs/nvidia/containers/tensorflow</a></p>
<pre><code>docker pull nvcr.io/nvidia/tensorflow:22.... | <p>Create a new dockerfile like so:</p>
<p>this should to the trick</p>
<p><a href="https://docs.docker.com/engine/reference/builder/#from" rel="nofollow noreferrer">https://docs.docker.com/engine/reference/builder/#from</a></p>
<pre><code>FROM nvcr.io/nvidia/tensorflow:22.04-tf2-py3
RUN apt-get update
RUN apt install ... | How to modify the Dockerfile of a pulled docker image? | docker|dockerfile | 0 | 74 | 1 | 72,259,761 | 72,259,761 | 1 | true | 2022-05-16T13:00:30.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to modify the Dockerfile of a pulled docker image?<p>I have to pull the latest image from <a href="https://catalog.ngc.nvidia.com/orgs/nvidia/containers/... |
72,267,542 | error: member access into incomplete type''; note: forward declaration of ''<p>Here is a struct MAIN which have member struct A and struct B, the code is like below</p>
<pre><code>// a.hpp
#ifndef _A_HPP_
#define _A_HPP_
struct A
{
int mem1;
};
#endif
</code></pre>
<pre><code>// b.hpp
#ifndef _B_HPP_
#define _B_HPP... | <p>The definition of the constructor <code>B::B</code> inside the struct definition references members of <code>MAIN</code>, but the latter hasn't been fully defined yet.</p>
<p>You need to move the body of constructor <code>B::B</code> into a separate file, i.e. b.cpp, and link with main.cpp when building the executab... | error: member access into incomplete type''; note: forward declaration of '' | c++|struct | 0 | 74 | 1 | 72,267,606 | 72,267,606 | 1 | true | 2022-05-17T02:28:43.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
error: member access into incomplete type''; note: forward declaration of ''<p>Here is a struct MAIN which have member struct A and struct B, the code is lik... |
72,282,042 | Get every combination (order is important) in vector with given size and elements<p>I want to create every possible coloring in a vector for a given size of the vector (amount of vertices) and given possible elements (possible colors)</p>
<p>as an example:</p>
<p>for a graph with 3 vertices and I want to color it with ... | <p>This is definitely possible. Refer to the below code. It also works with all the other ASCII characters. You can modify it in order to meet your demands:</p>
<pre><code>#include <iostream>
#include <vector>
#include <string>
inline std::vector<std::string> GetCombinations(const char min_dig,... | Get every combination (order is important) in vector with given size and elements | c++|combinations | 1 | 74 | 1 | 72,282,873 | 72,282,873 | 1 | true | 2022-05-18T00:34:12.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get every combination (order is important) in vector with given size and elements<p>I want to create every possible coloring in a vector for a given size of ... |
72,287,920 | PySpark: how to get all combinations of columns<p>I have a DF with combinations of batches, inputs and outputs and I would like to be able to add their "unique combinations" back to the DataFrame. A simple representation of the data looks like this:</p>
<div class="s-table-container">
<table class="s-table">
... | <p>Create a list of inputs, classify by that list, find consecutive differences and use them create values to cummulatively sum over the entire df</p>
<pre><code>w=Window.partitionBy("Batch","Output").orderBy("Batch")
df1=(df.withColumn('Combination',collect_set("Input").over(w)... | PySpark: how to get all combinations of columns | python|pyspark | 2 | 74 | 1 | 72,296,522 | 72,296,522 | 1 | true | 2022-05-18T10:57:51.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PySpark: how to get all combinations of columns<p>I have a DF with combinations of batches, inputs and outputs and I would like to be able to add their "... |
72,297,731 | Unable to create an object of type 'AppContext'. Using verbose but<p>I tried to do my first migration and I got this error.</p>
<p>I used:</p>
<pre><code>dotnet ef migrations add initial --project AppProject.Core --verbose
</code></pre>
<p>The error:</p>
<pre><code>Finding application service provider in assembly 'Ap... | <p>Try to specify both options <code>--project</code> and <code>--startup-project</code></p>
<h2><code>-p|--project <PROJECT></code></h2>
<p>This is the project that <code>DbContext</code> is sitting in.</p>
<h2><code>-s|--startup-project <PROJECT></code></h2>
<p>This is the project with Depenedency Injecti... | Unable to create an object of type 'AppContext'. Using verbose but | asp.net|asp.net-mvc|entity-framework|entity-framework-core|asp.net-identity | 0 | 74 | 1 | 72,297,925 | 72,297,925 | 1 | true | 2022-05-19T01:40:57.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to create an object of type 'AppContext'. Using verbose but<p>I tried to do my first migration and I got this error.</p>
<p>I used:</p>
<pre><code>dot... |
72,300,422 | How can I POST canvas data in javascript?<p>I built a simple project using javascript and FastAPI. I would like to POST canvas image data in javascript to the server(FastAPI).</p>
<p>But, I get the 422 Unprocessable Entity error</p>
<pre><code># FastAPI
@app.post("/post")
async def upload_files(input_data: Up... | <p><code>UploadFile</code> expects a file being posted to the endpoint in the <code>multipart/form-data</code> format - i.e. as a regular POST with a bit of added metadata.</p>
<p>Since you're retrieving the image data and submitting it as JSON body, that won't match the expected format. You <a href="https://stackoverf... | How can I POST canvas data in javascript? | javascript|python|http|fetch|fastapi | -1 | 74 | 2 | 72,300,850 | 72,300,850 | 1 | true | 2022-05-19T07:33:54.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I POST canvas data in javascript?<p>I built a simple project using javascript and FastAPI. I would like to POST canvas image data in javascript to th... |
72,306,707 | Summation of 2 floating point values gives incorrect result with higher precision<p>The sum of 2 floating values in postgres gives the result with higher precision.
<strong>Expected:</strong></p>
<pre><code>669.05 + 1.64 = 670.69
</code></pre>
<p><strong>Actual:</strong></p>
<pre><code>SELECT CAST(669.05 AS FLOAT) + CA... | <p>As per postgresql documentation, float uses inexact precision. Better to use <code>DECIMAL</code> or <code>NUMERIC</code>, which supports exact user specified precision.</p>
<pre><code>SELECT CAST(669.05 AS numeric) + CAST(1.64 AS numeric)
</code></pre>
<p><a href="https://www.postgresql.org/docs/14/datatype-numeric... | Summation of 2 floating point values gives incorrect result with higher precision | sql|postgresql|casting|floating-point | 0 | 74 | 1 | 72,307,328 | 72,307,328 | 1 | true | 2022-05-19T14:49:13.523Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Summation of 2 floating point values gives incorrect result with higher precision<p>The sum of 2 floating values in postgres gives the result with higher pre... |
72,315,153 | Render Form Elements Individually in Django<p>I'm trying to figure out how to render my form elements individually, since I think it's the best way for my file as I have several parent CSS classes.
I want to replace pretty much every <code>label</code> and <code>input</code> you see with my <code>forms.py</code> form m... | <p>From <a href="https://docs.djangoproject.com/en/4.0/topics/forms/#rendering-fields-manually" rel="nofollow noreferrer"><code>Django-doc</code></a>, you can implement rendering of individual fields, their labels, and the errors as well in the following way:</p>
<p>Try this:</p>
<pre class="lang-py prettyprint-overrid... | Render Form Elements Individually in Django | python|django|django-views|django-forms|django-templates | 1 | 74 | 1 | 72,316,430 | 72,316,430 | 1 | true | 2022-05-20T07:34:33.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Render Form Elements Individually in Django<p>I'm trying to figure out how to render my form elements individually, since I think it's the best way for my fi... |
72,315,838 | How to get how much requests units consumed by cosmos query in Python SDK API<p>How to check how many Request units consumed for each requests in Azure comsos DB query using python sdk.</p>
<p>Below code only prints output of the response from particular ReadItem, I also interested in how many request units consumed by... | <p>You need to <a href="https://github.com/Azure-Samples/azure-cosmos-db-python-getting-started/blob/9d28e9544580a90ddb352ce67c86a829487b546f/cosmos_get_started.py" rel="nofollow noreferrer">access container.client_connection</a> not the client,</p>
<pre><code>request_charge = container.client_connection.last_response_... | How to get how much requests units consumed by cosmos query in Python SDK API | python|azure|azure-cosmosdb|azure-api-apps | 1 | 74 | 1 | 72,318,968 | 72,318,968 | 1 | true | 2022-05-20T08:31:40.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get how much requests units consumed by cosmos query in Python SDK API<p>How to check how many Request units consumed for each requests in Azure comso... |
72,314,134 | Custom JsonConverter is failing after changing the ContractResolver in the default settings<p>I've made a custom JsonConvert for NewtonSoft JSON... fully tested and working fine for some time now. But than someone said the properties need to be camelCased instead of PascalCased.</p>
<p>So, ok... I changed the NamingStr... | <p><a href="https://www.newtonsoft.com/json/help/html/M_Newtonsoft_Json_Linq_JObject_GetValue.htm" rel="nofollow noreferrer"><code>JObject.GetValue(String)</code></a> is case sensitive, so if you just want to mimic the serializer's ordinal case insensitivity, you can call <a href="https://www.newtonsoft.com/json/help/h... | Custom JsonConverter is failing after changing the ContractResolver in the default settings | c#|json.net | 1 | 74 | 1 | 72,318,987 | 72,318,987 | 1 | true | 2022-05-20T05:53:35.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Custom JsonConverter is failing after changing the ContractResolver in the default settings<p>I've made a custom JsonConvert for NewtonSoft JSON... fully tes... |
72,330,176 | Call async await in parallel with an indeterminate amount of calls?<p>So I have an indeterminate amount of calls I wish to run in parallel in any example I have seen the amount of promises are known from the start.</p>
<pre><code>await Promise.allSettled([someCall(), anotherCall()]);
</code></pre>
<p>My issue is I don'... | <p>make it like this instead, there are problems in a way you write your function.</p>
<pre><code>async function myFunction() {
let qq = await bulk([1,2,3,4,5]);
console.log('last');
async function bulk(array){
const promiseArray = [];
for (const delay of array) {
promiseArray.push(bulkQuery(dela... | Call async await in parallel with an indeterminate amount of calls? | node.js|typescript|asynchronous | 0 | 74 | 2 | 72,331,123 | 72,331,123 | 1 | true | 2022-05-21T13:52:37.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Call async await in parallel with an indeterminate amount of calls?<p>So I have an indeterminate amount of calls I wish to run in parallel in any example I h... |
72,302,628 | Map two dataframes, count events where timestamps in second dataframe are within the date-time ranges of the first dataframe<p>I have a dataframe <code>df</code> that records the movement of people from one location to another. I have a second dataframe <code>df2</code> that records events at certain timeframes. For ea... | <p>Here is one way to do it (I've left intermediate print-outs to help better understand what's happening at each step):</p>
<pre class="lang-py prettyprint-override"><code># Setup
df["start_ts"] = pd.to_datetime(df["start_ts"], format="%Y-%m-%d %H:%M:%s")
df["end_ts"] = pd.to_da... | Map two dataframes, count events where timestamps in second dataframe are within the date-time ranges of the first dataframe | python|pandas|dataframe|group-by | 1 | 74 | 1 | 72,331,710 | 72,331,710 | 1 | true | 2022-05-19T10:06:57.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Map two dataframes, count events where timestamps in second dataframe are within the date-time ranges of the first dataframe<p>I have a dataframe <code>df</c... |
72,354,195 | WinHTTP causes Apache web server (localhost) to respond with http status 400 on Windows Vista<p>I'm trying to send a request to an apache web server using WinHTTP. My code is working from Windows 7 to Windows 11, but on Windows Vista I receive an error 400 from the server after sending the request. My code looks as fol... | <pre><code>$ echo -n 'Content-Type: application/x-www-form-urlencoded' | wc -c
47
$
</code></pre>
<p>Argument length for <code>lpszHeaders</code> (parameter <code>dwHeadersLength</code>) is one too long. It probably sent that null up the socket and Apache was not happy.</p>
<p>Clearly changing the length to <code>-1</c... | WinHTTP causes Apache web server (localhost) to respond with http status 400 on Windows Vista | c|windows|apache|winapi|winhttp | 1 | 74 | 1 | 72,356,086 | 72,356,086 | 1 | true | 2022-05-23T19:58:51.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
WinHTTP causes Apache web server (localhost) to respond with http status 400 on Windows Vista<p>I'm trying to send a request to an apache web server using Wi... |
72,356,982 | PageView is causing unbounded height error<pre><code>class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePag... | <p>PageView must have a height in flutter, usually it takes the biggest part of the screen but in your case you are showing it inside a bottomsheet, I assume that your bottomsheet should be almost full screen, so try to give it a height</p>
<pre><code>final size = MediaQuery.of(context).size;
……
SizedBox(
height: s... | PageView is causing unbounded height error | flutter | 0 | 74 | 2 | 72,357,122 | 72,357,122 | 1 | true | 2022-05-24T03:44:14.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PageView is causing unbounded height error<pre><code>class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(ke... |
72,360,719 | Vue js image v-bind src not working because of incorrect path when receiving the dynamic value from an API call wiht axios<p>I'm having a problem displaying images whose paths I want to get from an SQL database that I have then display them on my website project. This is the way in which I'm trying to make it work:</p>... | <p>You can change <code>pictureLink</code> to just a name:</p>
<pre><code>testItem.pictureLink = 'b1q2v1'
</code></pre>
<p>then create method for getting images:</p>
<pre><code>methods: {
getImage(img) {
return require(`@/assets/${img}.png`);
}
}
</code></pre>
<p>and call that method from template:</p>
<pre><co... | Vue js image v-bind src not working because of incorrect path when receiving the dynamic value from an API call wiht axios | javascript|vue.js|vuejs3 | 0 | 74 | 1 | 72,361,234 | 72,361,234 | 1 | true | 2022-05-24T09:46:38.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vue js image v-bind src not working because of incorrect path when receiving the dynamic value from an API call wiht axios<p>I'm having a problem displaying ... |
72,359,283 | IntelliSense VSCode show "name must be a namespace nameC/C++(725)" on "using namespace nvcuda;"<p>Hi everyone actually I'm programming on Cuda and I'm testing a simple tensor core example, but i have a problem with intelliSense, practically its show me errore on this commands (see image) and I dont know why, because wh... | <p>Set <strong><strong>CUDA_ARCH</strong></strong> variable in <strong>c_cpp_properties</strong> as follow:</p>
<pre class="lang-json prettyprint-override"><code>{
"configurations": [
{
"name": "Linux",
"includePath": [
"${... | IntelliSense VSCode show "name must be a namespace nameC/C++(725)" on "using namespace nvcuda;" | c++|visual-studio-code|cuda|intellisense | 0 | 74 | 1 | 72,366,191 | 72,366,191 | 1 | true | 2022-05-24T08:03:51.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
IntelliSense VSCode show "name must be a namespace nameC/C++(725)" on "using namespace nvcuda;"<p>Hi everyone actually I'm programming on Cuda and I'm testin... |
72,343,566 | Is Cassandra suitable for Aggregate Queries?<p>I have read that Columnar databases are apt for Aggregate Queries and Cassandra is a columnar database. I am trying to use count( values 'between' or '>=' for a specific partition) in Cassandra. Is this performance intensive?</p> | <p>It's a common misconception that Cassandra is a columnar database. I think it comes from the old terminology "column family" for tables. Data is stored in rows containing columns of key-value pairs which is why the tables used to be called column families.</p>
<p>A major difference compared to traditional ... | Is Cassandra suitable for Aggregate Queries? | database|cassandra|aggregate | 1 | 74 | 3 | 72,373,132 | 72,373,132 | 1 | true | 2022-05-23T05:23:49.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is Cassandra suitable for Aggregate Queries?<p>I have read that Columnar databases are apt for Aggregate Queries and Cassandra is a columnar database. I am t... |
72,370,895 | Calculating the value of the objective function for a manual input in Gurobi<p>I have a complex model and I want to calculate the objective function value for different options (not just the optimal solution).</p>
<p>I created the toy example below:</p>
<pre><code>import gurobipy as gp
from gurobipy import GRB
import n... | <p>A pretty simple idea: You could fix all the variables in the model by setting the lower and upper bounds to your given inputs and then solve the model. Then, the <a href="https://www.gurobi.com/documentation/9.5/refman/objval.html#attr:ObjVal" rel="nofollow noreferrer"><code>model.objVal</code></a> attribute contain... | Calculating the value of the objective function for a manual input in Gurobi | python|optimization|gurobi|objective-function | 0 | 74 | 1 | 72,374,715 | 72,374,715 | 1 | true | 2022-05-25T00:47:13.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculating the value of the objective function for a manual input in Gurobi<p>I have a complex model and I want to calculate the objective function value fo... |
72,377,009 | Get SRID of geometry column in exasol (ST_SRID equivalent)<p>It seems that there is no <code>ST_SRID</code> function in <a href="https://docs.exasol.com/db/latest/sql_references/geospatialdata/geospatialdata_overview.htm" rel="nofollow noreferrer"><code>exasol</code></a> like in other DBMS: <code>SELECT ST_SRID(geom) F... | <p>There is no specific function for this in Exasol.</p>
<p>Besides using <code>EXA_USER_COLUMNS</code> you can also use <a href="https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/typeof.htm" rel="nofollow noreferrer">TYPEOF</a> if you are using Exasol 7.1. This is a scalar function t... | Get SRID of geometry column in exasol (ST_SRID equivalent) | sql|spatial|spatial-query|exasolution|exasol | 1 | 74 | 1 | 72,377,469 | 72,377,469 | 1 | true | 2022-05-25T11:44:16.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get SRID of geometry column in exasol (ST_SRID equivalent)<p>It seems that there is no <code>ST_SRID</code> function in <a href="https://docs.exasol.com/db/l... |
72,368,051 | Java string to query a varbinary(64) column<p>For a unit test, I need to query a MySQL table for a specific value in a varbinary(64) column. The data is loaded from a csv using jooq.</p>
<pre><code>VARBIN_VALS,...
0001,...
0002,...
</code></pre>
<p>I see the value 0001 when I select on the table after loading the test ... | <p>I think what's happening here is: If your column is of some <code>byte[]</code> type (e.g. <code>VARBINARY</code>), then the <code>Loader</code> API will attempt to decode base64 encoded binary data, see <a href="https://github.com/jOOQ/jOOQ/issues/5858" rel="nofollow noreferrer">https://github.com/jOOQ/jOOQ/issues/... | Java string to query a varbinary(64) column | java|mysql|jooq | 1 | 74 | 2 | 72,390,134 | 72,390,134 | 1 | true | 2022-05-24T18:49:55.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java string to query a varbinary(64) column<p>For a unit test, I need to query a MySQL table for a specific value in a varbinary(64) column. The data is load... |
72,793,840 | How Do You Edit a Second (Non-Main) C# Form Window In Visual Studio Designer?<p>I am writing a C# Windows Forms program in Visual Studio. I have a button that creates and shows (opens) a new Form (window) called VideoWindow. I can edit the MainWindow in the Design workspace in Visual Studio which allows me to visually ... | <p>You can customize a new form, and then create the corresponding object after modification. Here are the relevant steps:</p>
<p>1.Create a new form <code>videoform</code>
<a href="https://i.stack.imgur.com/uLaEe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uLaEe.png" alt="enter image description... | How Do You Edit a Second (Non-Main) C# Form Window In Visual Studio Designer? | c#|.net|visual-studio|winforms|designer | -4 | 74 | 2 | 72,795,045 | 72,795,045 | 1 | true | 2022-06-28T22:33:08.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How Do You Edit a Second (Non-Main) C# Form Window In Visual Studio Designer?<p>I am writing a C# Windows Forms program in Visual Studio. I have a button tha... |
72,795,676 | Add or subtract a number based on the combination of columns/conditions<p>I would like to adjust <code>hdl</code>, <code>ldl</code>, and <code>trig</code> by adding or subtracting a constant based on the combination of the dummy variable columns. The constants are:</p>
<div class="s-table-container">
<table class="s-ta... | <p>It's messy but I believe it works.</p>
<pre><code>library(dplyr)
d <- as.data.frame(data)
df: Comparison dataframe
med hdl ldl trig
1 med1 -3.5 34.5 20.1
2 med2 -6.3 24.7 0.0
3 med3 -5.0 42.3 12.0
4 med4 0.0 23.0 22.0
5 med5 -2.1 12.0 22.2
d |>
rowwise() |>
mutate(across(ldl:trig, ~ .x + max(... | Add or subtract a number based on the combination of columns/conditions | r | 0 | 74 | 1 | 72,796,509 | 72,796,509 | 1 | true | 2022-06-29T04:04:19.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add or subtract a number based on the combination of columns/conditions<p>I would like to adjust <code>hdl</code>, <code>ldl</code>, and <code>trig</code> by... |
72,797,103 | How can i sum array elements as an array in laravel<p>i have two arrays and i want to make calculations with the elements in these arrays.</p>
<pre><code>$result1=DB::where('elements',$elements)->get();
$result2=DB::where('otherElements',$otherElements)->get();
</code></pre>
<p>for example; $result1 = [5,7,9] an... | <p>You can use <code>array_map</code> same as :</p>
<pre><code>$result3 = array_map(function($v1, $v2){
return $v1 + $v2;
}, $result1, $result2);
$result4 = array_map(function($v1, $v2){
return $v1 * $v2;
}, $result1, $result2);
</code></pre>
<p>Code online in <a href="https://onlinephp.io?s=s7EvyCjg5VIpSi0uzS... | How can i sum array elements as an array in laravel | php|arrays|laravel|laravel-blade | 0 | 74 | 2 | 72,797,269 | 72,797,269 | 1 | true | 2022-06-29T07:04:26.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i sum array elements as an array in laravel<p>i have two arrays and i want to make calculations with the elements in these arrays.</p>
<pre><code>$re... |
72,805,265 | Touch .env Won't Work, Touch anything.js Does<p>The Title pretty much sums this issue up, I am trying to create an .env file on my deployed EC2 instance by running <code>touch .env</code> in the CLI for the deployment. The command returns no errors, indicating it created the file, but I cannot <code>cd</code> into it, ... | <p><code>touch</code> is for creating an empty file, or updating the access and modification times of an existing file.</p>
<p><code>cd</code> is for changing to a directory. Don't try to <code>cd</code> into a file, because that is never going to work.</p>
<p><code>ls</code> without <code>-a</code> does not show any f... | Touch .env Won't Work, Touch anything.js Does | linux|amazon-ec2|command-line-interface | 0 | 74 | 1 | 72,805,375 | 72,805,375 | 1 | true | 2022-06-29T17:01:49.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Touch .env Won't Work, Touch anything.js Does<p>The Title pretty much sums this issue up, I am trying to create an .env file on my deployed EC2 instance by r... |
72,805,213 | Change the background color of a row on selection<p>I am new to Google Apps Script. I need advice.</p>
<p>I would need to create a script that changes the color of the row above which the cursor is hovering. If this isn't possible, it would be enough for me to change the background color of the entire row after clickin... | <p>The best you can do with this problem is click on the first cell in the row you want to change and set up a <code>onSelectionChange(e)</code> function.</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 p... | Change the background color of a row on selection | google-apps-script|google-sheets|spreadsheet | -1 | 74 | 1 | 72,805,928 | 72,805,928 | 1 | true | 2022-06-29T16:58:28.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change the background color of a row on selection<p>I am new to Google Apps Script. I need advice.</p>
<p>I would need to create a script that changes the co... |
72,794,621 | Bundle Install runs twice<p>Bundle install runs twice on Mac</p>
<pre class="lang-bash prettyprint-override"><code>➜ k_rails_template git:(main) ✗ bundle install
Using Local GEMs
Using Local GEMs <----
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/......... | <p><code>bundle install</code> is not running twice. It is the internal bundler logic that does the second fetch.</p>
<pre><code># Gemfile
source "https://rubygems.org"
gem "guard-bundler"
</code></pre>
<p>For example, using bundler <em>v2.2.6</em> the above <em>Gemfile</em> will make bundler run t... | Bundle Install runs twice | ruby-on-rails|ruby|bundler | 1 | 74 | 1 | 72,807,892 | 72,807,892 | 1 | true | 2022-06-29T00:49:59.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bundle Install runs twice<p>Bundle install runs twice on Mac</p>
<pre class="lang-bash prettyprint-override"><code>➜ k_rails_template git:(main) ✗ bundle in... |
72,785,556 | I need to affected row count in PostgreSQL Python or Django when run same query 2 or more time<p>I need to get all affected row count in PostgreSQL . If i run update query then got right row count but if i run again same query then i also get same row count but i think second time no row affected so in this case row co... | <p>Your statement <em>no data will be updated</em> is wrong in fact <strong>the exact same rows will be updated again, even though it is to the same value</strong>. The value of column <code>balance</code> will not change but the rows will be updated. The <code>update</code> statement does not look at existing values,... | I need to affected row count in PostgreSQL Python or Django when run same query 2 or more time | python|django|postgresql | 0 | 74 | 1 | 72,820,464 | 72,820,464 | 1 | true | 2022-06-28T11:24:39.430Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I need to affected row count in PostgreSQL Python or Django when run same query 2 or more time<p>I need to get all affected row count in PostgreSQL . If i ru... |
72,814,454 | React native firebase handling payment flow<p>I am integrating payment api, I'm using firebase cloud functions as my backend and react-native in frontend, so right now i have the following code:</p>
<p>In react-native side:</p>
<pre class="lang-js prettyprint-override"><code>const PaymentScreen = () => {
setLoadin... | <p>I don't think there is one definite answer to your question, But here is what I think:</p>
<p>For managing network connection status in React Native you can use
<code>NetInfo</code> for information about network connection and <code>Axios</code> to make network requests to a public API as per <a href="https://blog.l... | React native firebase handling payment flow | javascript|firebase|react-native|google-cloud-functions | 1 | 74 | 1 | 72,824,752 | 72,824,752 | 1 | true | 2022-06-30T10:46:37.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React native firebase handling payment flow<p>I am integrating payment api, I'm using firebase cloud functions as my backend and react-native in frontend, so... |
72,825,683 | WM_GETMINMAXINFO in WinUI 3 with C#?<h3>Problem</h3>
<p>Since <strong>WinUI 3</strong> currently has no function to set the minimum size, I have to use <code>WM_GETMINMAXINFO</code>.</p>
<h3>Question</h3>
<p>How can I specify <code>WM_GETMINMAXINFO</code> minimum or maximum window size with <strong>C#</strong> in a <st... | <p>Check out <a href="https://github.com/ghost1372/SettingsUI/blob/main/src/SettingsUI/Tools/Helpers/WindowHelper/WindowHelper.ReSizeWindow.cs" rel="nofollow noreferrer">this</a> example on GitHub.</p>
<p>Here is a full example of a WinUI 3 window with a specified min and max width and height:</p>
<pre><code>public sea... | WM_GETMINMAXINFO in WinUI 3 with C#? | c#|xaml|uwp-xaml|winui-3|winui | 0 | 74 | 2 | 72,829,193 | 72,829,193 | 1 | true | 2022-07-01T07:22:08.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
WM_GETMINMAXINFO in WinUI 3 with C#?<h3>Problem</h3>
<p>Since <strong>WinUI 3</strong> currently has no function to set the minimum size, I have to use <code... |
72,832,920 | round() not rounding?<p>I am trying to use <code>round()</code> to round a numeric vector to 2 decimal places so I have consistent decimal places between different plots. I've seen people answer that I should use <code>round()</code> to do so and this was my first instinct as well. However, <code>round()</code> isn't r... | <p>I think <a href="https://stackoverflow.com/users/2554330/user2554330">@user2554330</a> is right. This has to do with how RStudio displays the values in the console.</p>
<p>For example:</p>
<pre><code>num_vec <- c(0.00,
0.53333,
1.00,
1.50,
2.00,
... | round() not rounding? | r | 0 | 74 | 1 | 72,835,645 | 72,835,645 | 1 | true | 2022-07-01T17:41:46.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
round() not rounding?<p>I am trying to use <code>round()</code> to round a numeric vector to 2 decimal places so I have consistent decimal places between dif... |
72,837,261 | Redirect programatically using Regex in next.config.js<p>My website is changing URL structure and I have 1000s of pages. For SEO I would like to set up a Regex redirect in my next.config.js file, but the official documentation doesn't really help my case because my pages have the following structure:</p>
<pre><code>/pr... | <p>I resolved this using middleware since it doesn't seem to be possible to modify the parameter of the redirect destination in next.config.js.</p>
<pre><code>import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'
export function middleware(request: NextRequest) {
if (request.nextU... | Redirect programatically using Regex in next.config.js | reactjs|next.js | 0 | 74 | 1 | 72,839,324 | 72,839,324 | 1 | true | 2022-07-02T07:25:46.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Redirect programatically using Regex in next.config.js<p>My website is changing URL structure and I have 1000s of pages. For SEO I would like to set up a Reg... |
72,807,632 | Angular - The type 'Observable<unknown>' is not assignable to type 'Observable<HttpEvent<any>>'<p>I just copied this code from a tutorial</p>
<pre class="lang-js prettyprint-override"><code> import { Injectable } from '@angular/core';
import {
HttpInterceptor,
HttpRequest,
HttpHandler,
Ht... | <p>I tried to analyze your code, however I was unable to understand the reason. If you are looking for a solution, you can add the return type <code>Observable<HttpEvent<any>></code> to the function signature as follows:</p>
<pre><code>private handleAuthErrors(req: HttpRequest<any>, next: HttpHandler)... | Angular - The type 'Observable<unknown>' is not assignable to type 'Observable<HttpEvent<any>>' | angular|typescript | 2 | 74 | 3 | 72,840,077 | 72,840,077 | 1 | true | 2022-06-29T20:43:36.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular - The type 'Observable<unknown>' is not assignable to type 'Observable<HttpEvent<any>>'<p>I just copied this code from a tutorial</p>
<pre class="lan... |
72,840,909 | Function composition chain with a pure macro in Rust<p>I've read</p>
<p><a href="https://stackoverflow.com/questions/45786955/how-to-compose-functions-in-rust">How to compose functions in Rust?</a></p>
<p><a href="https://stackoverflow.com/questions/72597835/function-composition-chain-in-rust">Function composition chai... | <p>Yes, you can do that only using macros:</p>
<pre><code>macro_rules! compose {
($($rest:ident),+) => {
|x| { compose!(expand x, $($rest),*) }
};
(expand $inner:expr, $function:ident, $($rest:ident),*) => {
compose!(expand $function($inner), $($rest),*)
};
(expand $inner:expr,... | Function composition chain with a pure macro in Rust | rust|macros|function-composition | 1 | 74 | 1 | 72,841,246 | 72,841,246 | 1 | true | 2022-07-02T17:00:53.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Function composition chain with a pure macro in Rust<p>I've read</p>
<p><a href="https://stackoverflow.com/questions/45786955/how-to-compose-functions-in-rus... |
72,841,776 | Python how to know which 3 points are a line<p>I've found some solutions using the triangle area to find lines but It's not what I need because in further steps will not be a solution for my problem.</p>
<p>I've been working on a nested loop where I see the slope between point 0 and 1 and gives me a projection for next... | <p>You can do this:</p>
<pre class="lang-py prettyprint-override"><code>coords = list(zip(test['index'], test.High))
slope = pd.DataFrame([[(coly - rowy)/(colx - rowx) if colx > rowx else None for colx, coly in coords] for rowx, rowy in coords], columns=coords, index=coords)
pointsAndCandidate = [(i, j, k) for i in ... | Python how to know which 3 points are a line | python|loops|line | -1 | 74 | 1 | 72,842,390 | 72,842,390 | 1 | true | 2022-07-02T19:06:42.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python how to know which 3 points are a line<p>I've found some solutions using the triangle area to find lines but It's not what I need because in further st... |
72,824,849 | Feathers js how to customize get service endpoint<p>So I want to attach a url to my user requests which is in another service. How to customize get request?</p>
<pre class="lang-js prettyprint-override"><code>const { Service } = require('feathers-sequelize')
exports.Users = class Users extends Service {
get(id, para... | <p>You retrieve the value from <code>super</code> and return a new object:</p>
<pre class="lang-js prettyprint-override"><code>const { Service } = require('feathers-sequelize')
exports.Users = class Users extends Service {
async get(id, params) {
// how to add custom data into to the get result?
const data =... | Feathers js how to customize get service endpoint | javascript|node.js|express|sequelize.js|feathersjs | 0 | 74 | 1 | 72,842,514 | 72,842,514 | 1 | true | 2022-07-01T05:42:13.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Feathers js how to customize get service endpoint<p>So I want to attach a url to my user requests which is in another service. How to customize get request?<... |
72,843,003 | How to reference one apps script file from another<p>I have multiple files in my apps script project. Some of them are library files that provide utility functions for a larger app. How can I import them into my main file?</p>
<p>For example, in Node, I would be able to import <code>update-cell-1.gs</code> and <code>up... | <p>Unlike <a href="/questions/tagged/node.js" class="post-tag" title="show questions tagged 'node.js'" rel="tag">node.js</a> or js web frameworks, You can call any function in any file in the same script project directly without exporting or importing anything. However, <a href="https://developers.google.com/ap... | How to reference one apps script file from another | google-apps-script|google-sheets | 0 | 74 | 2 | 72,844,996 | 72,844,996 | 1 | true | 2022-07-02T23:15:22.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to reference one apps script file from another<p>I have multiple files in my apps script project. Some of them are library files that provide utility fun... |
72,845,949 | first() vs. where('id', '=', 1)->first()<p>Is there any <strong>difference</strong> between these three:</p>
<pre><code>someModel::where('id', 1)->first();
</code></pre>
<pre><code>someModel::where('id', '=', 1)->first();
</code></pre>
<pre><code>someModel::first()
</code></pre>
<p>what about these two?</p>
<pre>... | <ol>
<li><p>These are same:</p>
<pre class="lang-php prettyprint-override"><code>Model::where('id', 1)->first();
Model::where('id', '=', 1)->first();
</code></pre>
<p>But this may give you result if model with id 1 was deleted:</p>
<pre class="lang-php prettyprint-override"><code>Model::first();
</code></pre>
</l... | first() vs. where('id', '=', 1)->first() | laravel|eloquent|multi-tenant | 0 | 74 | 2 | 72,846,352 | 72,846,352 | 1 | true | 2022-07-03T11:04:56.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
first() vs. where('id', '=', 1)->first()<p>Is there any <strong>difference</strong> between these three:</p>
<pre><code>someModel::where('id', 1)->first()... |
72,858,435 | How to decode base64 from each line in file in bash?<p>I have a file that contains many lines of base64 encoded text. I usually use <code>base64 -d</code> command to decode a single base64 string, but can I apply this command to each line in a file? Of course I can write a simple python script for this purpose, but I'm... | <p><code>base64 -d</code> will do what you want out of the box on my system:</p>
<pre><code>$ echo one | base64 > file.txt
$ echo two | base64 >> file.txt
$ echo three | base64 >> file.txt
$ cat file.txt
b25lCg==
dHdvCg==
dGhyZWUK
$ cat file.txt | base64 -d
one
two
three
$
</code></pre>
<p>Alternat... | How to decode base64 from each line in file in bash? | bash|shell|base64 | 0 | 74 | 1 | 72,858,530 | 72,858,530 | 1 | true | 2022-07-04T14:38:11.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to decode base64 from each line in file in bash?<p>I have a file that contains many lines of base64 encoded text. I usually use <code>base64 -d</code> co... |
72,865,082 | LDAP search takes too long<p>I'm trying to get more than 50.000 records from LDAP (with python-ldap and page control tools).</p>
<p>I have searching filter, which is</p>
<pre><code>(|(field=value_1) (field=value_2)...(field=value_50000)
</code></pre>
<p>But this request taking more than 15 minutes. I'm taking 10 attrib... | <p>You should refine your search base, and make it the closet possible to what you are searching for, for example, instead of querying <code>dc=company,dc=com</code> use <code>ou=people,dc=company,dc=com</code>.</p>
<p>You can also build an index of the field you are searching for, and you can also enable cache for you... | LDAP search takes too long | python|ldap|ldap-query|python-ldap | 0 | 74 | 1 | 72,867,120 | 72,867,120 | 1 | true | 2022-07-05T06:52:15.703Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
LDAP search takes too long<p>I'm trying to get more than 50.000 records from LDAP (with python-ldap and page control tools).</p>
<p>I have searching filter, ... |
72,869,835 | How to allow some User only access his own data in endpoint in Spring Boot / Spring Security with pagination?<p>I have a question related to the limiting of the products list to specific User in my application. Ive got an API: "/api/v1/{userId}/products" and I want to use pagination in my UserRestController w... | <p>It is already implemented into <code>Spring-Secutiry</code> and <code>Spring-Data</code>.</p>
<p>In config, you need to add a @Bean to provide your <code>principal</code> into the queriing :</p>
<pre><code>@Configuration
public class Conf{
// `principal` provider for the Spring-Data JPQL requests
@Bean
p... | How to allow some User only access his own data in endpoint in Spring Boot / Spring Security with pagination? | java|spring|spring-boot|spring-security|pagination | 0 | 74 | 1 | 72,870,018 | 72,870,018 | 1 | true | 2022-07-05T12:57:25.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to allow some User only access his own data in endpoint in Spring Boot / Spring Security with pagination?<p>I have a question related to the limiting of ... |
72,870,411 | What do you call the application running in a pod in Kubernetes?<p>In a typical theoretical system, I would call the different applications that make up the system <em>nodes</em>. However this is confusing in a Kubernetes cluster system for two reasons:</p>
<ol>
<li>"Node.js" is often shortened to "node&... | <p>Pods contain one (or rarer more) application(s):</p>
<blockquote>
<p>A Pod models an application-specific "logical host": it contains one or more application containers which are relatively tightly coupled.</p>
</blockquote>
<p><a href="https://kubernetes.io/docs/concepts/workloads/pods/" rel="nofollow nor... | What do you call the application running in a pod in Kubernetes? | kubernetes|architecture | 0 | 74 | 2 | 72,870,551 | 72,870,551 | 1 | true | 2022-07-05T13:37:55.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What do you call the application running in a pod in Kubernetes?<p>In a typical theoretical system, I would call the different applications that make up the ... |
72,880,580 | Subplot with two panels (plot and pie)<p>I would like to merge two graphs or panels using subplot. I tried using thisi script, but I didn't get that I would like. I have one plot and one pie. On the image, the plot should be to left and pie to right. How can I do?</p>
<pre><code>import matplotlib.pyplot as plt
import s... | <p>Few things to note:</p>
<ol>
<li>To plot 2 subplots next to each other, the subplots should be <code>1,2</code> as that represents the <code># rows, # columns</code>.</li>
<li>The <code>ax1</code> will be broken into <code>ax1[0], ax1[1]</code> for the two plots. I have just used ax instead of ax1</li>
<li>As you ar... | Subplot with two panels (plot and pie) | python|plot|merge|pie-chart|subplot | 0 | 74 | 1 | 72,886,878 | 72,886,878 | 1 | true | 2022-07-06T08:56:28.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Subplot with two panels (plot and pie)<p>I would like to merge two graphs or panels using subplot. I tried using thisi script, but I didn't get that I would ... |
72,890,167 | How can I retrieve the result value from stripe.redirectToCheckout()?<p>I am trying to get the result value from
a stripe.redirectToCheckout(). It is said to return a Promise <a href="https://stripe.com/docs/js/checkout/redirect_to_checkout" rel="nofollow noreferrer">https://stripe.com/docs/js/checkout/redirect_to_chec... | <p>Both client-only Checkout and <code>redirectToCheckout</code> are no longer recommended.</p>
<p>Instead you can use <a href="https://stripe.com/docs/payments/payment-links" rel="nofollow noreferrer">Payment Links</a> (if you need a client-only solution) or you can create Checkout Sessions on your server and send peo... | How can I retrieve the result value from stripe.redirectToCheckout()? | javascript|stripe-payments | 0 | 74 | 3 | 72,890,267 | 72,890,267 | 1 | true | 2022-07-06T21:41:38.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I retrieve the result value from stripe.redirectToCheckout()?<p>I am trying to get the result value from
a stripe.redirectToCheckout(). It is said to... |
72,878,412 | Python Ray seems to copy objects for every remote function call<p>This should be a simple one.</p>
<p>I have a <strong>huge dataset</strong> and I need to run a simulation multiple times, going through this dataset over and over again, <strong>read-only</strong>. I wanted to run these simulations in parallel and as I c... | <p>Ray can support zero copy serialization when the object created by ray.put is numeric numpy array (See <a href="https://docs.ray.io/en/master/ray-core/objects/serialization.html#numpy-arrays" rel="nofollow noreferrer">https://docs.ray.io/en/master/ray-core/objects/serialization.html#numpy-arrays</a>), or other zero ... | Python Ray seems to copy objects for every remote function call | python|pycharm|shared-memory|ray | 0 | 74 | 1 | 72,890,618 | 72,890,618 | 1 | true | 2022-07-06T05:39:55.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python Ray seems to copy objects for every remote function call<p>This should be a simple one.</p>
<p>I have a <strong>huge dataset</strong> and I need to ru... |
72,888,706 | How do I highlight the marker on the map when click on matching carousel corresponding to the marker to the map?<p>Say the first carousel slide is Los Angeles California and when click on it, the red dot marker on the map will change its color to like blue on Los Angeles, CA coordinate. When click on the 2nd slide the ... | <p>if you can add some data attributes to the</p>
<pre class="lang-js prettyprint-override"><code>return '<div data-unique-identifier class="hoverinfo">' + data.name + '</div>';
</code></pre>
<p>then with the carousel divs wire up a mouse over event and then you can use the data attributes to matc... | How do I highlight the marker on the map when click on matching carousel corresponding to the marker to the map? | javascript|jquery|json|slick.js|datamaps | 0 | 74 | 2 | 72,891,517 | 72,891,517 | 1 | true | 2022-07-06T19:04:52.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I highlight the marker on the map when click on matching carousel corresponding to the marker to the map?<p>Say the first carousel slide is Los Angele... |
72,891,957 | How to add and save a new image with Gaussian noise<p>In this bit of code, I am trying to add Gaussian noise to a PIL image and write it to an image file:</p>
<pre><code>import os, skimage
from PIL import Image
images = os.listdir('/home/onur/Downloads/datasets/LFW-a/lfw2/')
for img in images:
image = Image.open(... | <p>I had some trouble recreating your issue so I ended up using io from skimage to open the file. Assuming you want the result saved as an image in PIL format, try this.</p>
<pre><code>import os, skimage
from PIL import Image
images = os.listdir('/home/onur/Downloads/datasets/LFW-a/lfw2/')
import numpy as np
from skim... | How to add and save a new image with Gaussian noise | python|image-processing|python-imaging-library|scikit-image|gaussian | 0 | 74 | 1 | 72,892,042 | 72,892,042 | 1 | true | 2022-07-07T03:22:59.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add and save a new image with Gaussian noise<p>In this bit of code, I am trying to add Gaussian noise to a PIL image and write it to an image file:</p... |
72,893,547 | TYPO3: Run scheduler task from extbase controller in frontend<p>The scheduler task is normally executed via the command line script /typo3/sysext/core/bin/typo3 scheduler:run.</p>
<p>Is it possible to call the task inside/with a frontend controller from an extbase extension?
(as it is, from the backend module "Sch... | <p>The scheduler run script is a Symfony Command Controller. You can run it in your Controller using the following code:</p>
<pre class="lang-php prettyprint-override"><code>$schedulerCommand = new \TYPO3\CMS\Scheduler\Command\SchedulerCommand();
$schedulerInput = new \Symfony\Component\Console\Input\ArrayInput([]);
$s... | TYPO3: Run scheduler task from extbase controller in frontend | typo3|scheduler|typo3-extensions | 0 | 74 | 1 | 72,894,327 | 72,894,327 | 1 | true | 2022-07-07T07:02:52.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TYPO3: Run scheduler task from extbase controller in frontend<p>The scheduler task is normally executed via the command line script /typo3/sysext/core/bin/ty... |
72,906,637 | When a specific product is added to WooCommerce cart, empty cart THEN add product<p>This code currently works to clear cart before adding a product to cart.</p>
<pre class="lang-php prettyprint-override"><code>// Empty cart when product is added to cart, so we can't have multiple products in cart
add_action( 'woocommer... | <p>The <code>woocommerce_add_cart_item_data</code> hook contains 3 arguments versus 1,
and since <code>$product_id</code> is the 2nd it can be used to answer your question:</p>
<pre class="lang-php prettyprint-override"><code>function filter_woocommerce_add_cart_item_data( $cart_item_data, $product_id, $variation_id ) ... | When a specific product is added to WooCommerce cart, empty cart THEN add product | wordpress|woocommerce|product|cart|hook-woocommerce | 1 | 74 | 1 | 72,907,338 | 72,907,338 | 1 | true | 2022-07-08T04:25:42.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When a specific product is added to WooCommerce cart, empty cart THEN add product<p>This code currently works to clear cart before adding a product to cart.<... |
72,907,038 | Cost of deploying a TensorFlow model in GCP?<p>I'm thinking of deploying a TensorFlow model using Vertex AI in GCP. I am almost sure that the cost will be directly related to the number of queries per second (QPS) because I am going to use automatic scaling. I also know that the type of machine (with GPU, TPU, etc.) wi... | <p>Autoscaling depends on the CPU and GPU utilization which directly correlates to the QPS, as you have said. To estimate the cost based on the QPS, you can deploy a custom prediction container to a Compute Engine instance directly, then benchmark the instance by making prediction calls until the VM hits 90+ percent CP... | Cost of deploying a TensorFlow model in GCP? | tensorflow|google-cloud-platform|google-cloud-vertex-ai | 0 | 74 | 1 | 72,911,416 | 72,911,416 | 1 | true | 2022-07-08T05:32:59.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cost of deploying a TensorFlow model in GCP?<p>I'm thinking of deploying a TensorFlow model using Vertex AI in GCP. I am almost sure that the cost will be di... |
72,910,461 | SQL Query to find start date time, end date time, time difference and last row of a particular ID<p>I have a table as below</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>ID</th>
<th>DateTime</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2022-06-21 19:03:30.783</td>
<td>... | <p>Try this:</p>
<pre><code>SELECT
t1.id,
MIN(t1.[datetime]) AS [Starttime],
MAX(t1.[datetime]) AS [Endtime],
MAX(t2.summary) AS [Summary]
FROM Table t1, Table t2
WHERE t1.id = t2.id
AND t2.[datetime] = (SELECT
MAX([datetime])
FROM Table t3
... | SQL Query to find start date time, end date time, time difference and last row of a particular ID | sql|sql-server | -3 | 74 | 1 | 72,911,634 | 72,911,634 | 1 | true | 2022-07-08T11:03:15.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Query to find start date time, end date time, time difference and last row of a particular ID<p>I have a table as below</p>
<div class="s-table-container... |
72,306,076 | AppleScript execution sometimes crashes. Can I separate it from the main app?<p>I'm building an application for macOS and for some of it's functionality I rely on calling AppleScript:</p>
<pre><code>let appleScript = NSAppleScript(source: theScriptIWantToExecute)
var errorDict: NSDictionary? = nil
let possibleResult = ... | <p>You can do this using an <a href="https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingXPCServices.html" rel="nofollow noreferrer">XPC service</a>. In fact "stability" is one of the two key reasons Apple created XPC services. So if this instability is... | AppleScript execution sometimes crashes. Can I separate it from the main app? | swift|cocoa|applescript|xpc | 0 | 74 | 1 | 72,912,773 | 72,912,773 | 1 | true | 2022-05-19T14:08:00.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AppleScript execution sometimes crashes. Can I separate it from the main app?<p>I'm building an application for macOS and for some of it's functionality I re... |
72,930,806 | exporting a Record<K,T> as a named type or interface in ts<p>I am pretty new to TypeScript so bear with me. I am aware of using Record<K, T> Utility Type, my question is, Is there any way to export my Record<K, T> as another interface/type or anything that can be used in other files and modules.</p> | <pre><code>// Create and export custom types using Record
export type SomeKeyValue = Record<string, boolean>;
// Use it in another file
// import SomeKeyValue from ...
const something: SomeKeyValue = {
'first': true,
'second': false,
};
</code></pre> | exporting a Record<K,T> as a named type or interface in ts | typescript|record|typescript-utility | 1 | 74 | 1 | 72,931,127 | 72,931,127 | 1 | true | 2022-07-10T18:15:05.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
exporting a Record<K,T> as a named type or interface in ts<p>I am pretty new to TypeScript so bear with me. I am aware of using Record<K, T> Utility Ty... |
72,937,292 | How do I convert 'Future<String?>' to 'Future<String>?' in Flutter?<p>So basically Iam working with the <a href="https://pub.dev/packages/network_info_plus" rel="nofollow noreferrer">network_info_plus</a> package to read the current connected Wifiname of the device. I want to use a <code>FutureBuilder</code> to get the... | <p>If you look at the internal implementation of the getWifiName() function</p>
<pre><code> /// Obtains the wifi name (SSID) of the connected network
///
/// Please note that it DOESN'T WORK on emulators (returns null).
///
/// From android 8.0 onwards the GPS must be ON (high accuracy)
/// in order to be ab... | How do I convert 'Future<String?>' to 'Future<String>?' in Flutter? | flutter|dart|dart-async | 0 | 74 | 1 | 72,937,508 | 72,937,508 | 1 | true | 2022-07-11T10:42:58.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I convert 'Future<String?>' to 'Future<String>?' in Flutter?<p>So basically Iam working with the <a href="https://pub.dev/packages/network_info_plus" ... |
72,938,337 | Is it correct way of use LSP in PHP?<pre><code><?php
class AnimalFood
{
public function prepare(): string
{
return 'Prepare animal food.'."\n";
}
}
class PetFood extends AnimalFood
{
public function prepare(): string
{
return 'Prepare pet food.'."\n";
}
... | <p><em>Converting my comment to a answer</em></p>
<p>Introducing a function/method that takes a type and returns a narrower version is technically following LSP, however if no additional work is done, this kind of code is really only doing it to make a static analysis happy, and there is no cast happening. Instead, you... | Is it correct way of use LSP in PHP? | php|liskov-substitution-principle | 2 | 74 | 1 | 72,939,602 | 72,939,602 | 1 | true | 2022-07-11T12:07:39.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it correct way of use LSP in PHP?<pre><code><?php
class AnimalFood
{
public function prepare(): string
{
return 'Prepare animal food.'... |
72,961,678 | Add object to a list in clojure and return<p>I am new to functional programming and have a use case where I have a list of Books, I want to iterate over it, do some mapping and return a new List.
My code</p>
<pre><code>(defn map-book [books]
((doseq [x books]
(let [lst (create-response x)]
(println "... | <p>If you want to return new list (or vector), you should avoid <a href="https://clojuredocs.org/clojure.core/doseq" rel="nofollow noreferrer"><code>doseq</code></a> (which is for side effects- for example, printing, and always returns <code>nil</code>) and use <a href="https://clojuredocs.org/clojure.core/map" rel="no... | Add object to a list in clojure and return | clojure|clojure-java-interop | 0 | 74 | 1 | 72,962,318 | 72,962,318 | 1 | true | 2022-07-13T06:13:54.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add object to a list in clojure and return<p>I am new to functional programming and have a use case where I have a list of Books, I want to iterate over it, ... |
72,961,474 | Passing Multiple Values in Select Option in React<p>I am having issues passing in two values in my select component and working in React. I am currently passing in the correct id value in the selected options.. however when I am passing to the body in newCapabilities, it is receiving a the id value (agent.agentId) inst... | <p>You can <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find" rel="nofollow noreferrer">find</a> the selected agent and get the name value</p>
<pre><code>const newCapabilities = {
agent: agents.find(a => a.agentId == form.agent)?.agent
}
</code></pre> | Passing Multiple Values in Select Option in React | javascript|reactjs|arrays|object|select | 1 | 74 | 1 | 72,963,001 | 72,963,001 | 1 | true | 2022-07-13T05:48:07.207Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Passing Multiple Values in Select Option in React<p>I am having issues passing in two values in my select component and working in React. I am currently pass... |
72,972,362 | Select record from List Box and GoTo That Record in the form<p>I have a bound form to a SQL Server table. On that same form I have a listbox that gets distinct loan numbers from that table. The listbox has 2 columns, the PK and the loan number. I used the following code to display the record on the bound form they s... | <p>Try this:</p>
<pre><code>Private Sub lst_LocalLoanNumberList_Click()
Dim pk_index As Integer
pk_index = Me.lst_LocalLoanNumberList.Column(0)
With Form_frm_LocalLoanInfo.Recordset
.FindFirst "ID_name =" & pk_index
Form_frm_LocalLoanInfo.SetFocus
... | Select record from List Box and GoTo That Record in the form | vba|ms-access | 0 | 74 | 1 | 72,978,740 | 72,978,740 | 1 | true | 2022-07-13T20:37:07.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Select record from List Box and GoTo That Record in the form<p>I have a bound form to a SQL Server table. On that same form I have a listbox that gets disti... |
72,984,150 | Disable pagination tooltip buttons (first, last, page numbers(1, 2, 3)) in Tabulator JS<p>I need only the <strong>previous and next buttons</strong> on my table for pagination. I don't need (first, last, page numbers(1, 2, 3)) buttons. Is there any way to disable these pagination buttons similar to enabling/disabling p... | <ul>
<li>To disable paginationButtonCount, simply set it to 0.</li>
<li>To disable the First and Last buttons take the CSS approach and set display as none
for these two buttons.</li>
</ul>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre c... | Disable pagination tooltip buttons (first, last, page numbers(1, 2, 3)) in Tabulator JS | javascript|pagination|tabulator | 1 | 74 | 1 | 72,986,842 | 72,986,842 | 1 | true | 2022-07-14T16:57:09.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Disable pagination tooltip buttons (first, last, page numbers(1, 2, 3)) in Tabulator JS<p>I need only the <strong>previous and next buttons</strong> on my ta... |
72,988,364 | Cannot find Django admin static file (404 not found)<p>My Django project deployed on EC2 instance. Everything is fine except static files. Here is my project directory path tree</p>
<pre><code>my_project
└─admin
├── admin
│ ├── admin
│ ├── keywords
│ ├── manage.py
│ └... | <p>Assuming your BASE_DIR is the same as /usr/share/nginx/html, and the BASE_DIR/myproject/static exists and has content, try</p>
<pre><code>location /static/ {
root /myproject/;
}
</code></pre>
<p>(Using root rather than alias as the end directories are the same, as per <a href="https://nginx.org/en/docs/http/ngx_... | Cannot find Django admin static file (404 not found) | python|django|nginx|centos | 1 | 74 | 1 | 72,988,780 | 72,988,780 | 1 | true | 2022-07-15T02:02:32.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot find Django admin static file (404 not found)<p>My Django project deployed on EC2 instance. Everything is fine except static files. Here is my project... |
72,989,696 | Positioning the FFPlay window on the screen at a specific location<p>My goal is to set the position of the <a href="https://ffmpeg.org/ffplay.html" rel="nofollow noreferrer">ffplay</a> window to some specific coordinates (e.g. 200 x 400).</p>
<p>Initially, I tried using <a href="https://ffmpeg.org/ffplay.html#toc-Main-... | <p>On the command line you can use the options:</p>
<pre><code>-left nnn
</code></pre>
<p>and</p>
<pre><code>-top nnn
</code></pre>
<p>which position the top-left corner of the output - space providing, depending on your screen size.</p> | Positioning the FFPlay window on the screen at a specific location | c#|ffmpeg | 0 | 74 | 1 | 72,990,446 | 72,990,446 | 1 | true | 2022-07-15T06:09:34.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Positioning the FFPlay window on the screen at a specific location<p>My goal is to set the position of the <a href="https://ffmpeg.org/ffplay.html" rel="nofo... |
72,967,144 | c++ get indices of duplicating rows in 2D array<p>The task is following: find indices of duplicating rows of 2D array. Rows considered to be duplicated if 2nd and 4th elements of one row are equal to 2nd and 4th elements of another row.The simplest way to do it is something like that:</p>
<pre><code>std::unordered_set... | <p>You could take advantage of the properties of a `std::unordered_set.</p>
<p>A small helper class will further ease up things.</p>
<p>So, we can store in a class the 2nd and 4th value and use a comparision function to detect duplicates.</p>
<p>The <a href="https://en.cppreference.com/w/cpp/container/unordered_set" re... | c++ get indices of duplicating rows in 2D array | c++|algorithm|multidimensional-array|stl | 0 | 74 | 1 | 72,991,974 | 72,991,974 | 1 | true | 2022-07-13T13:29:06.147Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
c++ get indices of duplicating rows in 2D array<p>The task is following: find indices of duplicating rows of 2D array. Rows considered to be duplicated if 2... |
72,995,849 | Statically build and linking with CMake<p>I'm trying to wrap my head around statically linking c++ applications using CMake.</p>
<p>I have built <code>libcurl</code> statically:</p>
<pre><code>./buildconf
./configure --disable-shared --with-openssl
make -j$(nproc)
make install
</code></pre>
<p>Which produces a static <... | <p>For libraries, like CURL, that have first-class CMake package support, you should use it. Here is how I linked to CURL statically.</p>
<p>First, we download and build CURL:</p>
<pre><code>$ git clone git@github.com:curl/curl.git
$ cmake -G Ninja -S curl/ -B _build/curl -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=... | Statically build and linking with CMake | c++|cmake|static-libraries|libcurl|static-linking | 1 | 74 | 1 | 72,996,088 | 72,996,088 | 1 | true | 2022-07-15T14:52:11.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Statically build and linking with CMake<p>I'm trying to wrap my head around statically linking c++ applications using CMake.</p>
<p>I have built <code>libcur... |
72,866,634 | How to make user install same version of depency A as depency B is using?<p>I used the variables in the title of this topics, but I also have the live example.</p>
<p>The alpha version <strong>1.5.0-alpha.0</strong> of the package <strong>@yamato-daiwa/es-extensions-localization-japanese</strong> depends on version <st... | <p>As you noted - you have 2 installations <code>@yamato-daiwa/es-extensions</code> - in main app's <code>node_modules</code> and in <code>@yamato-daiwa/es-extensions-localization-japanese</code> <code>node_modules</code>. Your application uses the package from its <code>node_modules</code> folder, but the localization... | How to make user install same version of depency A as depency B is using? | node.js|npm | 0 | 74 | 1 | 73,000,175 | 73,000,175 | 1 | true | 2022-07-05T08:57:18.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make user install same version of depency A as depency B is using?<p>I used the variables in the title of this topics, but I also have the live exampl... |
73,013,917 | beautifulsoup not returning complete html of the page in python<p>I have taken help to extract data from the package BeautifulSoup, but unfortunately, it does not give me the output of the complete HTM file.</p>
<pre><code> from bs4 import BeautifulSoup
import requests
url = 'https://www.digikala.com/search/ca... | <p>This page is loading data from an API. You can see this by inspecting Network tab in Chrome Dev Tools, reloading the page.</p>
<p>The following code will return a json with all items from page 1:</p>
<pre><code>from bs4 import BeautifulSoup
import requests
url = 'https://api.digikala.com/v1/categories/mobile-phone/... | beautifulsoup not returning complete html of the page in python | python|web-scraping|beautifulsoup | 1 | 74 | 1 | 73,013,993 | 73,013,993 | 1 | true | 2022-07-17T17:27:43.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
beautifulsoup not returning complete html of the page in python<p>I have taken help to extract data from the package BeautifulSoup, but unfortunately, it doe... |
73,003,424 | Adding spacing between BottomNavigationItem's icon & label<p>I'm trying to build out my Bottom navigation like this:</p>
<pre><code>@Composable
fun BottomNavBar(navController: NavController) {
Column(
Modifier.background(colorResource(id = R.color.pastel_orange_white))
) {
BottomNavigation(
... | <p>I don't think you can do it using a <code>BottomNavigationItem</code>. The Material Design Library for Compose follows the Material Design Specification as you can see <a href="https://material.io/components/bottom-navigation#specs" rel="nofollow noreferrer">here</a>.</p>
<p>But you don't need to use a <code>BottomN... | Adding spacing between BottomNavigationItem's icon & label | android|kotlin|android-jetpack-compose | 1 | 74 | 1 | 73,016,923 | 73,016,923 | 1 | true | 2022-07-16T10:27:04.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding spacing between BottomNavigationItem's icon & label<p>I'm trying to build out my Bottom navigation like this:</p>
<pre><code>@Composable
fun BottomNav... |
72,959,652 | unkown cause of pyModbusTCP timeout<p>I have a device connected via ethernet cable to the network. Its manual says it accepts modbusTCP communication protocol and indeed nmap in the configured port shows that a modbus service is open (nmap output at the end).
I am no modbus expert but i found the <a href="https://pymod... | <p>Turns out it was a problem with the netmask. The equipment's netmask was configured to 24 but i was trying to access it from an I.P. out of that range.</p>
<p>In my case, i was trying to access the I.P. 10.20.41.90 from a computer with an I.P. of 10.0.X.Y.</p>
<p>I configured the netmask to 8 and it all worked.</p> | unkown cause of pyModbusTCP timeout | python|tcp|modbus|pymodbustcp | 0 | 74 | 1 | 73,073,252 | 73,073,252 | 1 | true | 2022-07-13T00:25:45.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
unkown cause of pyModbusTCP timeout<p>I have a device connected via ethernet cable to the network. Its manual says it accepts modbusTCP communication protoco... |
72,855,848 | Depth issue with infinite grid in opengl 3.3 with glsl<p>I'm following this <a href="https://asliceofrendering.com/scene%20helper/2020/01/05/InfiniteGrid/" rel="nofollow noreferrer">article</a>, using <a href="https://github.com/floooh/sokol" rel="nofollow noreferrer">sokol_gfx</a> with opengl core 3.3 profile. The gr... | <p>I had the same issue. The problem is that the article is written for Vulkan, which handles the depth differently from OpenGL.
After reading <a href="https://stackoverflow.com/questions/10264949/glsl-gl-fragcoord-z-calculation-and-setting-gl-fragdepth">GLSL gl_FragCoord.z Calculation and Setting gl_FragDepth</a> I ma... | Depth issue with infinite grid in opengl 3.3 with glsl | c|opengl|glsl | -1 | 74 | 1 | 73,124,554 | 73,124,554 | 1 | true | 2022-07-04T11:15:33.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Depth issue with infinite grid in opengl 3.3 with glsl<p>I'm following this <a href="https://asliceofrendering.com/scene%20helper/2020/01/05/InfiniteGrid/" r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.