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,254,618 | How to make changes to global object attribute with Kivy TextInput and have it save for later use?<p>My app currently has 10 "players" with a name, offensive rating, and defensive rating. I want to give the user the opportunity to change the names of the players before running my game simulation code, but it ... | <p>It would kinda look the same. Depending on how exactly you wanna keep the 10 different players.</p>
<pre><code>class Player():
def __init__(self, name, off, deff):
self.name = name
self.off = off
self.deff = deff
self.stats = 0
player = [Player('', 0, 0)] * 10
class SecondWindo... | How to make changes to global object attribute with Kivy TextInput and have it save for later use? | python|kivy|global-variables | 0 | 78 | 1 | 72,255,426 | 72,255,426 | 0 | true | 2022-05-16T05:47:35.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make changes to global object attribute with Kivy TextInput and have it save for later use?<p>My app currently has 10 "players" with a name,... |
72,321,622 | How to update value in previous screen in SwiftUI?<p>i am navigating from one screen to another and passing data using <em>@Binding</em> but I am alo trying to update value back to first screen when its updating in second screen.</p>
<pre><code>struct FirstView: View {
@State private var valueToPass : Int = 0
v... | <p>You are quite close.</p>
<p>Just add a buttons in the second view to increment the value</p>
<pre><code>struct SecondView: View {
@Binding var valueToGet: Int
var body: some View {
VStack {
Text("Show value \(valueToGet)")
Button("Incremen... | How to update value in previous screen in SwiftUI? | ios|swift|swiftui | 0 | 78 | 1 | 72,321,731 | 72,321,731 | 0 | true | 2022-05-20T15:47:45.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update value in previous screen in SwiftUI?<p>i am navigating from one screen to another and passing data using <em>@Binding</em> but I am alo trying ... |
72,388,944 | How to print a report list of all the buyers and their purchases<p>I am trying to print a list of all of the buyers and what they bought from the shop.
The list only shows one buyer and the item he bought as the first list item and all of the other items that other buyers bought, but it won't show who bought the other ... | <p>I had to change [ != ] to [ == ] to print all buyers:</p>
<pre><code>if( i == 0 || Model.PirktosPrekes[i].PirkejoId **==** Model.PirktosPrekes[i- 1].PirkejoId )
</code></pre>
<p>and to print the sum of each buyer from [ != ] to [ == ], the value of an item times price of an item:</p>
<pre><code>if( i == Model.Pirkto... | How to print a report list of all the buyers and their purchases | c# | 0 | 78 | 1 | 72,461,687 | 72,461,687 | 0 | true | 2022-05-26T08:30:43.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to print a report list of all the buyers and their purchases<p>I am trying to print a list of all of the buyers and what they bought from the shop.
The l... |
72,245,860 | I wanna bucket fill an image but getting how to do it<p>I am able to color the house but the problem is when i try to color a different section pervious color is being disappear. but the color is being removed when i try to color in different section. I have tried everything i could think of but i am not able to get it... | <hr />
<h2>PROBLEM:</h2>
<p>When you change Shape color you do not hold this value. Then you select another shape and old shape goes to default color.</p>
<hr />
<h2>ADVISE:</h2>
<p>I assume that, you select color by button, then click shapes and fill those shapes with selected color. And if you click second times to s... | I wanna bucket fill an image but getting how to do it | flutter|flutter-custompaint | 0 | 78 | 1 | 72,251,826 | 72,251,826 | 0 | true | 2022-05-15T05:57:54.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I wanna bucket fill an image but getting how to do it<p>I am able to color the house but the problem is when i try to color a different section pervious colo... |
72,254,316 | Python Using Windwos API DevicePowerEnumDevices Returning is always 0<p>Python Using Windwos API <code>DevicePowerEnumDevices</code> Returning is always 0
I can't find the reason
<a href="https://docs.microsoft.com/zh-TW/windows/win32/api/powrprof/nf-powrprof-devicepowerenumdevices" rel="nofollow noreferrer">https://do... | <p>Your buffer is too small. From your <a href="https://docs.microsoft.com/zh-TW/windows/win32/api/powrprof/nf-powrprof-devicepowerenumdevices" rel="nofollow noreferrer">linked documentation</a>:</p>
<blockquote>
<p><code>[out, optional] pReturnBuffer</code></p>
<p>Pointer to a buffer that receives the requested infor... | Python Using Windwos API DevicePowerEnumDevices Returning is always 0 | python|ctypes | 0 | 78 | 1 | 72,255,601 | 72,255,601 | 0 | true | 2022-05-16T04:58:42.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python Using Windwos API DevicePowerEnumDevices Returning is always 0<p>Python Using Windwos API <code>DevicePowerEnumDevices</code> Returning is always 0
I ... |
72,385,295 | How do I prevent a duplicate random number when using setInterval? (javascript)<p>I've been wanting to generate random numbers through a function and then use setInterval to repeat that function and give me a new number every time.</p>
<pre><code>function randNum(prevNum) {
let randNum = Math.round(Math.random() *... | <p>When you use <code>prevNum</code> as a <code>setInterval()</code> argument, you're always passing the original value of the variable to the callback function. You should just use the global variable directly rather than passing it as a parameter.</p>
<p>You also have a typo, <code>randColor</code> should be <code>ra... | How do I prevent a duplicate random number when using setInterval? (javascript) | javascript|random|setinterval | 2 | 78 | 3 | 72,385,359 | 72,385,359 | 0 | true | 2022-05-25T23:59:52.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I prevent a duplicate random number when using setInterval? (javascript)<p>I've been wanting to generate random numbers through a function and then us... |
72,319,315 | Why my jaxrs APIs has the application name as application path?<p>I created a simple version API with rest-easy and wildfly, everything should works but the application path has the name of my project:</p>
<ul>
<li><p>My version API return the version number from my <code>pom.xml</code>: The URI should be <code>http://... | <p>Jboss wildfly use the Web module name (projectName.war) as default context root. To set it you need to:</p>
<ul>
<li>Add the <code>WEB-INF/jboss-web.xml</code> file in your Web module:
<br>
(if you don't package your app in an EAR file)</li>
</ul>
<pre class="lang-xml prettyprint-override"><code><jboss-web xmlns=... | Why my jaxrs APIs has the application name as application path? | java|jax-rs|wildfly|openapi|resteasy | 0 | 78 | 1 | 72,330,644 | 72,330,644 | 0 | true | 2022-05-20T12:57:39.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why my jaxrs APIs has the application name as application path?<p>I created a simple version API with rest-easy and wildfly, everything should works but the ... |
72,335,388 | How should I pass values to openSCAD in command line?<p>I want to apply a certain modification on a bunch of stl files. So I wrote an openSCAD program and wanted to script from the command line, but it doesn't work and I can't figure out why.</p>
<p>According to the man page, I thought the following command would work ... | <p>Ok, Got it :</p>
<p>The problem comes from the fact that openSCAD wants to receive string with the quotation marks. However, the shell will try to eat them. So, the correct calling syntax will be :</p>
<pre><code>MyPrompt> ./Téléchargements/OpenSCAD-2021.01-x86_64.AppImage -o 'test.stl' 'test.scad' -D filename1='... | How should I pass values to openSCAD in command line? | command-line|batch-processing|openscad | 0 | 78 | 1 | 72,335,700 | 72,335,700 | 0 | true | 2022-05-22T06:50:14.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How should I pass values to openSCAD in command line?<p>I want to apply a certain modification on a bunch of stl files. So I wrote an openSCAD program and wa... |
72,245,411 | How to get all children of object recursive with level set to go through?<pre><code>using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class GetChilds : MonoBehaviour
{
public List<Transform> allChildren = new List<Transform>();
// Start is cal... | <p>I made a simple script for you.</p>
<p>Invoke <code>IterateOverChild</code> method with target transform, 0 as current level param and desired depth.</p>
<pre><code> public class TranformIterator : MonoBehaviour
{
void Start()
{
IterateOverChild(transform, 0, 2);
}
... | How to get all children of object recursive with level set to go through? | c#|unity3d | 0 | 78 | 1 | 72,246,661 | 72,246,661 | 1 | true | 2022-05-15T03:53:11.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get all children of object recursive with level set to go through?<pre><code>using System.Collections;
using System.Collections.Generic;
using System.... |
72,268,740 | Merge Multiple Arrays Of The Same ID Into One Object<p>if two objects in the data array contains same id the first will be picked and the other(s) discarded. multiple assets of same id should be in one object.</p>
<pre><code>const myMap = cardDetails.map((card) => {
return {
id: card.id,
amount... | <p>it's not clear what you mean with multiple assets</p>
<p>I assume that you want some key to be merge together</p>
<p>You can achieve that easily using <code>reduce</code> and <code>Object.values</code></p>
<p>like this</p>
<pre><code>const myData = Object.values(cardDetails.reduce((res, {id,...card}) => {
const... | Merge Multiple Arrays Of The Same ID Into One Object | javascript|reactjs | 0 | 78 | 2 | 72,269,453 | 72,269,453 | 1 | true | 2022-05-17T05:47:15.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Merge Multiple Arrays Of The Same ID Into One Object<p>if two objects in the data array contains same id the first will be picked and the other(s) discarded.... |
72,285,126 | Bash Script how to create a directory for a user which username consist of two words<p>I have a bash script that asks for a username and a password. Based on the provided name and the password the script will create a user directory in /home for the user. Inside the directory a user file is also created.</p>
<p><strong... | <p>Whenever you expect an input string to contain spaces and you want to treat it as a single string, try to enclose it in double-quotes.</p>
<pre><code>mkdir "${u_name}_d"
</code></pre> | Bash Script how to create a directory for a user which username consist of two words | linux|bash|ubuntu | 0 | 78 | 1 | 72,285,479 | 72,285,479 | 1 | true | 2022-05-18T07:49:54.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bash Script how to create a directory for a user which username consist of two words<p>I have a bash script that asks for a username and a password. Based on... |
72,286,040 | Fetching nested data with NEO4J in Family Tree<p>First of all, I'm new to NEO4J and to CYPHER. So I'm twerking here and there to figure out to get the result I want.</p>
<p>Below is my graph. Let's say it's a simple family tree.</p>
<p><a href="https://i.stack.imgur.com/HzTNa.png" rel="nofollow noreferrer"><img src="ht... | <p>One way to approach it is using apoc.convert.toTree (using the plugin apoc).
This can create the tree structure that you are looking for. But, since your tree is bottom-up, the result will be same, meaning each node will point its parent. If you want to get the results as you want, using this method, you will have t... | Fetching nested data with NEO4J in Family Tree | neo4j|cypher|family-tree | 0 | 78 | 1 | 72,293,815 | 72,293,815 | 1 | true | 2022-05-18T08:53:56.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fetching nested data with NEO4J in Family Tree<p>First of all, I'm new to NEO4J and to CYPHER. So I'm twerking here and there to figure out to get the result... |
72,295,492 | ListView.builder inside a Column inside a SingleChildScrollView<p>all. I am trying to add a <code>ListView.builder</code> to a <code>Column</code> that is inside a <code>SingleChildScrollView</code>. However, I am getting an exception, likely due to the fact that there is no constraint for the <code>ListView.builder</c... | <p>In the column widget add <code>mainAxisSize:MainAxisSize.min</code> and in List view.builder add <code>shrinkWrap:true</code> and <code>physics:NeverScrollablePhysics()</code>. That should solve the issue and instead of center widget use SafeArea or a container with specific height.</p> | ListView.builder inside a Column inside a SingleChildScrollView | flutter|dart|listview | 0 | 78 | 2 | 72,295,704 | 72,295,704 | 1 | true | 2022-05-18T20:21:30.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ListView.builder inside a Column inside a SingleChildScrollView<p>all. I am trying to add a <code>ListView.builder</code> to a <code>Column</code> that is in... |
72,289,038 | Converting a hist() and boxplot() object into a ggplot() object to align my plots using plot_grid() in the Cowplot Package in R<p>I am checking my data for normality and I have created boxplots - <code>boxplot()</code>, histograms - <code>hist()</code>, and <code>ggqqplots()</code> (using the <code>ggpubr</code> packag... | <p><strong>Answer:</strong></p>
<p>To convert base objects such as hist() and boxplot() into ggplot objects to arrange using the plot_grid() function, you can use the function as.ggplot().</p>
<pre><code>#Box plots
Low_Freq_Box<-as.ggplot(~boxplot(New_Acoustic_Parameters$Low.Freq))
High_Freq_Box<-as.ggplot(~boxpl... | Converting a hist() and boxplot() object into a ggplot() object to align my plots using plot_grid() in the Cowplot Package in R | r|ggplot2|histogram|boxplot|cowplot | 1 | 78 | 2 | 72,301,405 | 72,301,405 | 1 | true | 2022-05-18T12:18:37.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Converting a hist() and boxplot() object into a ggplot() object to align my plots using plot_grid() in the Cowplot Package in R<p>I am checking my data for n... |
72,295,073 | Error while multi threading API queries in Python<p>I'm performing queries in a server with Open Source Routing Machine (OSRM) deployed. I send a set of coordinates and obtain a n x n matrix of network distances over a streets network.</p>
<p>In order to improve the speed of the computations, I want to use "Thread... | <p>I was guided in the right direction by someone outside Stack Overflow.</p>
<p>The trick was to point the workers of the pool to a request Session. The function to send the queries was re-worked as follows:</p>
<pre><code>def osrm_query(url_input, session):
'Send request'
response = session.get(url_input)
... | Error while multi threading API queries in Python | python|parallel-processing|request|osrm | 1 | 78 | 1 | 72,306,520 | 72,306,520 | 1 | true | 2022-05-18T19:39:08.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error while multi threading API queries in Python<p>I'm performing queries in a server with Open Source Routing Machine (OSRM) deployed. I send a set of coor... |
72,316,140 | How to use Powershell to replace text in Word which is in single line and different line?<p>So I want to edit a .docx file using PowerShell: First Name, Last Name, Address, Salary, Starting Day etc.
I am a <strong>beginner</strong> in PowerShell so I'm not too sure about the code; so, firstly I wanted to run something ... | <p>Found a workaround seems to be working now perfectly well.
Hope this helps to someone</p>
<pre><code>$objWord = New-Object -ComObject word.application
$objWord.Visible = $True
$objDoc = $objWord.Documents.Open("Path")
$objSelection = $objWord.Selection
function wordSearch($currentValue, $replaceValue){
... | How to use Powershell to replace text in Word which is in single line and different line? | powershell | 0 | 78 | 1 | 72,316,855 | 72,316,855 | 1 | true | 2022-05-20T08:54:56.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use Powershell to replace text in Word which is in single line and different line?<p>So I want to edit a .docx file using PowerShell: First Name, Last... |
72,327,765 | How to apply a CSS file in the Google Apps Script project to an HTML file returned by doPost()?<p>I created a web form using Google Apps Script, where form visitors would see <code>result.html</code> after data submission. However, an external css file <code>css.html</code> in the same project of this <code>result.html... | <p>When I saw your <code>result.html</code>, <code>css.html</code> is added using <code><?!= include('css'); ?></code> and your showing current image. In this case, how about the following modification?</p>
<h3>From:</h3>
<pre><code>return HtmlService.createHtmlOutputFromFile("result");
</code></pre>
<h... | How to apply a CSS file in the Google Apps Script project to an HTML file returned by doPost()? | html|css|forms|google-apps-script | 2 | 78 | 1 | 72,328,055 | 72,328,055 | 1 | true | 2022-05-21T08:07:52.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to apply a CSS file in the Google Apps Script project to an HTML file returned by doPost()?<p>I created a web form using Google Apps Script, where form v... |
72,332,731 | Cannot read file with PyCharm<p>I'm trying to upload example from dash documentation.
When I try (with PyCharm)</p>
<pre class="lang-py prettyprint-override"><code>df = pd.read_csv(
'https://raw.githubusercontent.com/plotly/datasets/master/solar.csv'
)
</code></pre>
<p>I get these errors.
But when I try the same co... | <p>I think you should check whether you're using the same Python interpreter and Pandas version in both Jupyter and PyCharm.</p>
<p>Find Jupyter interpreter: <a href="https://stackoverflow.com/questions/40694528/how-to-know-which-python-is-running-in-jupyter-notebook">How to know which Python is running in Jupyter note... | Cannot read file with PyCharm | python|pandas|pycharm | -1 | 78 | 1 | 72,332,801 | 72,332,801 | 1 | true | 2022-05-21T19:43:04.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot read file with PyCharm<p>I'm trying to upload example from dash documentation.
When I try (with PyCharm)</p>
<pre class="lang-py prettyprint-override"... |
72,335,386 | How to get response with this request in python?<p>Hi I have a request as so</p>
<pre><code>GET https://dropezy.goadda.in/master/v1/id/products/search?q=buah&storeId=619e02f0f580166d48277fc0&sortBy=relevance HTTP/2.0
accept: application/json
enro-api-key: rhcvwcdd-7aza-zvv7qskyu-4b8jm8kwppkf
cache-control: max-... | <p>The two requests aren't the same. The first is a <code>GET</code> request, but the second is a <code>POST</code>.</p>
<p>Use <code>requests.get</code> to make a <code>GET</code> request.</p>
<p>If you need to supply headers in a request, yes, you can do that: <a href="https://docs.python-requests.org/en/latest/user/... | How to get response with this request in python? | python|python-requests | 0 | 78 | 1 | 72,335,426 | 72,335,426 | 1 | true | 2022-05-22T06:50:02.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get response with this request in python?<p>Hi I have a request as so</p>
<pre><code>GET https://dropezy.goadda.in/master/v1/id/products/search?q=buah... |
72,280,607 | CSS transform-origin on SVG not working as expected<p>I'm trying to create a clickable map. The idea is that clicking on a region starts a zoom animation pointed to that specific area.
So far i managed to calcuate the center of each SVG rectangle that contain a region with <code>getBBox()</code>. This is visualized as ... | <p>IMO you have three main issues here.</p>
<ol>
<li><p>The "sway" during zooming is caused by the fact that you are moving the <code>transform-origin</code> at the same time you are zooming. You can fix that by ensuring that only the transform is affected by the <code>transition</code> setting.</p>
<pre><co... | CSS transform-origin on SVG not working as expected | javascript|html|css|svg | 0 | 78 | 2 | 72,347,077 | 72,347,077 | 1 | true | 2022-05-17T20:57:40.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CSS transform-origin on SVG not working as expected<p>I'm trying to create a clickable map. The idea is that clicking on a region starts a zoom animation poi... |
72,370,992 | Radio Buttons and ListView - Flutter<p><a href="https://i.stack.imgur.com/3ejQ4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3ejQ4.jpg" alt="" /></a>I have a long list of radio buttons using <code>RadioListTile</code>. The problem is that the list is very long and overflows at the bottom of the pa... | <p>Try below code, and Wrap your <a href="https://api.flutter.dev/flutter/widgets/Column-class.html" rel="nofollow noreferrer"><strong><code>Column</code></strong></a> inside <a href="https://api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html" rel="nofollow noreferrer"><strong><code>SingleChildScrollView<... | Radio Buttons and ListView - Flutter | flutter|dart|flutter-listview | 0 | 78 | 3 | 72,372,190 | 72,372,190 | 1 | true | 2022-05-25T01:09:15.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Radio Buttons and ListView - Flutter<p><a href="https://i.stack.imgur.com/3ejQ4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3ejQ4.jpg"... |
72,368,528 | Office Add-in Taskpane can't find html file<p>Developing an office web add-in for Outlook. I Followed this <a href="https://docs.microsoft.com/en-us/office/dev/add-ins/quickstarts/outlook-quickstart?tabs=yeomangenerator" rel="nofollow noreferrer">tutorial</a> to start my project.</p>
<p>I tried implementing a new taskp... | <p>Found my problem, I was doing almost everything right. I was typing the full path, but I only needed to specify the filename like this: <code>https://localhost:3000/taskpane.html</code></p> | Office Add-in Taskpane can't find html file | outlook|office-js|outlook-addin|office-addins|outlook-web-addins | 0 | 78 | 1 | 72,377,634 | 72,377,634 | 1 | true | 2022-05-24T19:33:30.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Office Add-in Taskpane can't find html file<p>Developing an office web add-in for Outlook. I Followed this <a href="https://docs.microsoft.com/en-us/office/d... |
72,377,530 | Pandas: Rolling mean using only the last update based on another column<p>I would like to perform a rolling mean while the mean excludes duplicates found in another column. Let me provide an example dataframe:</p>
<pre><code>Date Warehose Value
10-01-1998 London 10
13-01-1998 London ... | <p>It's a bit tricky. As <code>rolling.apply</code> works on Series only and you need both "Wharehose" and "Value" to perform the computation, you need to access the complete dataframe using a function (and a "global" variable, which is not super clean IMO):</p>
<pre><code>df['Date'] = pd.... | Pandas: Rolling mean using only the last update based on another column | python|pandas|rolling-computation | 2 | 78 | 1 | 72,377,953 | 72,377,953 | 1 | true | 2022-05-25T12:19:25.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas: Rolling mean using only the last update based on another column<p>I would like to perform a rolling mean while the mean excludes duplicates found in ... |
72,382,733 | How to configure kubectl to act as a service account?<p>I wish to run a <a href="https://www.drone.io/" rel="nofollow noreferrer">Drone</a> CI/CD pipeline on a Raspberry Pi, including a stage to update a Kubernetes Deployment. Unfortunately, all the pre-built solutions that I've found for doing so (<a href="https://git... | <p>It appears you have used <code>| base64</code> instead of <code>| base64 --decode</code></p> | How to configure kubectl to act as a service account? | kubernetes | 0 | 78 | 1 | 72,386,794 | 72,386,794 | 1 | true | 2022-05-25T18:42:39.670Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to configure kubectl to act as a service account?<p>I wish to run a <a href="https://www.drone.io/" rel="nofollow noreferrer">Drone</a> CI/CD pipeline on... |
72,390,304 | Toggle class(or change style) of element when element in clicked, Vuejs<p>The way i am getting data is little bit complicated. I have "tweets" array where data is stored and each tweet is a card where i successfully change style when card is clicked(markTweet function), but there are also replies for each twe... | <p>If I understood you correctly try like following snippet:</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 app = Vue.createApp({
data() {
return {
tweets: [... | Toggle class(or change style) of element when element in clicked, Vuejs | javascript|vue.js|class|toggle|vuejs3 | 1 | 78 | 2 | 72,390,656 | 72,390,656 | 1 | true | 2022-05-26T10:23:06.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Toggle class(or change style) of element when element in clicked, Vuejs<p>The way i am getting data is little bit complicated. I have "tweets" arra... |
72,790,112 | Simple JWT Usage<p>I have my Django backend authentication working (tested using curl and postman), but something eludes me. When sending test requests, the <a href="https://django-rest-framework-simplejwt.readthedocs.io/en/latest/getting_started.html#usage" rel="nofollow noreferrer">docs</a> show username and password... | <p>I think you define the two fields when you create your custom user model by inheriting from the <code>AbstractUser</code> model.</p>
<pre><code>class CustomUser(AbstractUser):
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = ['email']
</code></pre> | Simple JWT Usage | python|django|django-rest-framework|django-rest-framework-simplejwt | 0 | 78 | 1 | 72,798,215 | 72,798,215 | 1 | true | 2022-06-28T16:27:38.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Simple JWT Usage<p>I have my Django backend authentication working (tested using curl and postman), but something eludes me. When sending test requests, the ... |
72,817,968 | Check if a column exists and if not add it<p>I have a series of dataframes that are noncumulative. During the cleaning process I want to loop through the dataframe and check if certain columns exists and if they aren't present create them. I can't for the life of me figure out a method to do this. I am not package shy ... | <p>You can use this dummy data <code>df</code> and <code>colToAdd</code> columns to check if not exists to add</p>
<pre><code>df <- data.frame(A = rnorm(5) , B = rnorm(5) , C = rnorm(5))
colToAdd <- c("B" , "D")
</code></pre>
<p>then apply the check if the column exists <code>NULL</code> pro... | Check if a column exists and if not add it | r|dplyr | 0 | 78 | 1 | 72,818,152 | 72,818,152 | 1 | true | 2022-06-30T14:57:22.793Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check if a column exists and if not add it<p>I have a series of dataframes that are noncumulative. During the cleaning process I want to loop through the dat... |
72,821,999 | auto-conversion from struct to long in liinux C++?<p>I'm converting a C++ Linux program (I don't know what compiler) to Visual C++ 2019. I'm seeing some strange code.</p>
<p>Today's example is:</p>
<pre><code>long offset = timezone;
</code></pre>
<p>I also see:</p>
<pre><code>offset = timezone - 3600;
</code></pre>
<p>... | <p>The <code>struct timezone</code> you are showing is a Linux/glibc-specific type defined in <code><sys/time.h></code>. See <a href="https://www.man7.org/linux/man-pages/man2/gettimeofday.2.html" rel="nofollow noreferrer"><code>man gettimeofday</code></a>.</p>
<p>There is also a variable named <code>timezone</co... | auto-conversion from struct to long in liinux C++? | c++|linux | -1 | 78 | 4 | 72,822,874 | 72,822,874 | 1 | true | 2022-06-30T21:04:11.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
auto-conversion from struct to long in liinux C++?<p>I'm converting a C++ Linux program (I don't know what compiler) to Visual C++ 2019. I'm seeing some stra... |
72,828,892 | Exclude some rows in datatable from ViewData list<p>I'm loading some data from a ViewData list, how can i hide/exlude a specific row "" from table body if one or any from the list ViewData has 0 data or count = 0?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="f... | <p>Work with <em>System.Linq</em> <code>.Any()</code>.</p>
<p><code>.Any()</code> is equivalent with <code>.Count > 0</code> which check the list must have at least an item.</p>
<p>While would suggest using <code>as</code> to safe cast the <code>ViewDataDictionary</code> to specific type.</p>
<pre><code>@using Syste... | Exclude some rows in datatable from ViewData list | c#|asp.net|asp.net-mvc|asp.net-core|razor | 0 | 78 | 1 | 72,829,015 | 72,829,015 | 1 | true | 2022-07-01T11:54:54.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Exclude some rows in datatable from ViewData list<p>I'm loading some data from a ViewData list, how can i hide/exlude a specific row "" from table... |
72,836,426 | In Typescript, how can I pass an array of (keyof Object) without having to hardcode it every time? How on earth can this be so complicated?<p>So I have the following very simple <code>User</code> interface and <code>getUserById()</code> method that retrieves a type-safe user that includes only the specified fields/prop... | <pre><code>const DEFAULT_USER_FIELDS: ('_id' | 'username')[] = ['_id', 'username'];
</code></pre>
<p>The reason <code>getUserById</code> ever works in the first place is because <code>Field</code> will be inferred to the union of the elements of <code>fields</code>, which will be more specific than just <code>keyof Use... | In Typescript, how can I pass an array of (keyof Object) without having to hardcode it every time? How on earth can this be so complicated? | typescript|generics|types|constants|keyof | 1 | 78 | 2 | 72,836,477 | 72,836,477 | 1 | true | 2022-07-02T04:23:48.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Typescript, how can I pass an array of (keyof Object) without having to hardcode it every time? How on earth can this be so complicated?<p>So I have the f... |
72,848,632 | How to index a newly created column name inside a loop<p>I am using the data set <code>mtcars</code> as my example. The goal is to:</p>
<ul>
<li>Step 1: Use a loop to run regressions with changing outcome, while the independent variables stay the same for each model.</li>
<li>Step 2: Transform the residuals from each m... | <p>Simply remove the <code>get()</code></p>
<pre class="lang-r prettyprint-override"><code># Step 2: Transform the residuals and save them as new columns with the suffix '.invn'
mtcars[, paste0(i, ".invn")] =
qnorm((rank(mtcars[,paste0(i,".res")],na.last="keep")-0.5)/sum(!is.na(mtcar... | How to index a newly created column name inside a loop | r|loops | 0 | 78 | 2 | 72,848,700 | 72,848,700 | 1 | true | 2022-07-03T17:37:15.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to index a newly created column name inside a loop<p>I am using the data set <code>mtcars</code> as my example. The goal is to:</p>
<ul>
<li>Step 1: Use ... |
72,832,060 | Combining subranges of a vector efficiently to iterate through<h1>Combining subranges of a vector efficiently</h1>
<h2>The Process</h2>
<p>I have some numerical data stored in vector, <em>v</em>. Vector <em>v</em> is composed of many subranges of valid/invalid data with unpredictable lengths according to some predicate... | <p>I guess the ranges library offers ways to write your code in a much simpler way. However, you already have the code to filter and if we just consider the question</p>
<blockquote>
<p>How can I smoothly iterate through the valid indices of v across subranges?</p>
</blockquote>
<p>Then the answer is rather simple and ... | Combining subranges of a vector efficiently to iterate through | c++|visual-c++|c++20 | 1 | 78 | 2 | 72,861,999 | 72,861,999 | 1 | true | 2022-07-01T16:14:06.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Combining subranges of a vector efficiently to iterate through<h1>Combining subranges of a vector efficiently</h1>
<h2>The Process</h2>
<p>I have some numeri... |
72,866,437 | Conditional object declaration in javascript<p>I have an object that can have 2 attributes, "a" and "b". Attributes "a" === "fixed", always, while "b" must be set depending on some variables values. These variables are "c" (boolean) and "d" (string).... | <p>You could take a nested conditional operator.</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 getObject = (c, d) => ({
a: 'fixed',
b: c
? d
... | Conditional object declaration in javascript | javascript|conditional-statements | 2 | 78 | 3 | 72,866,827 | 72,866,827 | 1 | true | 2022-07-05T08:41:43.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Conditional object declaration in javascript<p>I have an object that can have 2 attributes, "a" and "b". Attributes "a" === &qu... |
72,865,737 | Colorbar adjustment in heatmap using matplotlib<p>I am generating a heatmap based on array <code>T</code>. However, there is one value (<code>1e-9</code>) which is much lower than the rest (ignoring <code>NaN</code>). How do I adjust the colorbar so that I can see the minor changes in the remaining values of the array ... | <p>You can use <code>vmin</code> and <code>vmax</code> to set a range for the color map. The extreme low values can be indicated via a 'lower' color in the color map together with <code>extend='min'</code> in the colorbar.</p>
<pre class="lang-py prettyprint-override"><code>import numpy as np
import matplotlib.pyplot ... | Colorbar adjustment in heatmap using matplotlib | python|numpy|matplotlib | 0 | 78 | 1 | 72,867,249 | 72,867,249 | 1 | true | 2022-07-05T07:44:56.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Colorbar adjustment in heatmap using matplotlib<p>I am generating a heatmap based on array <code>T</code>. However, there is one value (<code>1e-9</code>) wh... |
72,869,185 | flutter web WhatsApp web won't open<p>I have a button when the button is clicked it should open WhatsApp on whatsAppW Web with the given phone number, and I'm using <a href="https://pub.dev/packages/url_launcher" rel="nofollow noreferrer">url_luancher</a></p>
<p>here i want to navigate to whatsApp Url but when i click... | <p>To open via <code>whatsapp web</code> you can use whatsapp <code>api</code> call and use <code>url_launcher</code> to open it in browser</p>
<pre><code>https://api.whatsapp.com/send?phone=+00000000000000&text=iwanttotestit
</code></pre> | flutter web WhatsApp web won't open | flutter|flutter-layout|flutter-dependencies|flutter-web | 0 | 78 | 1 | 72,869,309 | 72,869,309 | 1 | true | 2022-07-05T12:08:02.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
flutter web WhatsApp web won't open<p>I have a button when the button is clicked it should open WhatsApp on whatsAppW Web with the given phone number, and I... |
72,870,822 | Python Requests HTML - Result of found item doesn't return content<p>Hi im scraping a webpage with my script, the problem is only one item (title) can be found correctly, other items only throw back html when grabbed like that:</p>
<pre><code>[<Element 'div' class=('rd-product-description__top-accordion-content-desc... | <p>The data you see on the page is stored inside <code><script></code> and processed by JavaScript. To get price, description, etc. you can use <a href="https://pypi.org/project/Js2Py/" rel="nofollow noreferrer"><code>js2py</code></a> module. For example:</p>
<pre class="lang-py prettyprint-override"><code>import... | Python Requests HTML - Result of found item doesn't return content | python|html|python-3.x|web-scraping|python-requests-html | 2 | 78 | 1 | 72,871,528 | 72,871,528 | 1 | true | 2022-07-05T14:05:52.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python Requests HTML - Result of found item doesn't return content<p>Hi im scraping a webpage with my script, the problem is only one item (title) can be fou... |
72,859,275 | GBQ - Get around the Exceeded rate limits issue<p>i have questions about Exceeded rate limits issue in Google Big Query. I need to compare two tables (about 30k rows) and find unique people in first table and find unique people in the other one. I need to insert these "new" people into another tables and get ... | <p>For your first question, yes, it is possible by making use of the compare query that I am sharing below:</p>
<pre><code>#standardSQL
SELECT IFNULL(table1.key1, table2.key1) key1,
IFNULL(table1.key2, table2.key2) key2
FROM `table1` AS table1
FULL OUTER JOIN `table2` AS table2
ON table1.key1 = table2.key1
AND tab... | GBQ - Get around the Exceeded rate limits issue | python|sql|database|google-bigquery|rate-limiting | 1 | 78 | 1 | 72,873,067 | 72,873,067 | 1 | true | 2022-07-04T15:47:25.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GBQ - Get around the Exceeded rate limits issue<p>i have questions about Exceeded rate limits issue in Google Big Query. I need to compare two tables (about ... |
72,864,863 | How i can link my domain to my Heroku app?<p>I have free domain from freenom.com. I create custom domain in app settings on Heroku and setup given me 'DNS target' on my domain DNS settings on Freenom. But even after several days, website not accessible via my domain. What am I doing wrong?</p>
<p>Domain from freenom.co... | <p>This isn't DNS issue.</p>
<p>The browser error message shows that you are trying to access the site over HTTPS (not HTTP), and is displaying an SSL error. Have you set up a certificate for your custom domain, e.g. via <a href="https://devcenter.heroku.com/articles/automated-certificate-management" rel="nofollow nore... | How i can link my domain to my Heroku app? | heroku|dns|custom-domain | 0 | 78 | 2 | 72,876,416 | 72,876,416 | 1 | true | 2022-07-05T06:30:25.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How i can link my domain to my Heroku app?<p>I have free domain from freenom.com. I create custom domain in app settings on Heroku and setup given me 'DNS ta... |
72,886,236 | get a value of a specific key in a dictionary in C#<p>I have a dictionary like this:</p>
<pre><code>Dictionary<string, List<string>> mydict = new Dictionary<string, List<string>>();
I have tried:
foreach(var value in mydict.Keys)
{
List<string> key
key.Add();
}
</code></pre>
<p>I be... | <p>You have a <code>Dictionary<string, List<string>></code>. A dictionary have a key and a value. In your case, the key is a <code>string</code> and the value is a <code>List<string></code>.</p>
<p>If you want get the value of a concrete key, you can use:</p>
<pre><code>myDict.TryGetValue("TheVal... | get a value of a specific key in a dictionary in C# | c#|dictionary | 0 | 78 | 1 | 72,886,453 | 72,886,453 | 1 | true | 2022-07-06T15:27:55.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
get a value of a specific key in a dictionary in C#<p>I have a dictionary like this:</p>
<pre><code>Dictionary<string, List<string>> mydict = new... |
72,889,385 | Permission issue in connecting a serverless VPC connector to Cloud Run in host project<p>I have a service in Cloud Run in project <code>x</code> that needs to access a VM instance, which I am allowing access to using a serverless VPC connector (created in a <em>host</em> project). My problem, while following <a href="h... | <p>It is very important to closely read the documentation found <a href="https://cloud.google.com/run/docs/configuring/shared-vpc-host-project" rel="nofollow noreferrer">here</a>, specifically <a href="https://cloud.google.com/run/docs/configuring/shared-vpc-host-project#grant_roles_on_the_host_project" rel="nofollow n... | Permission issue in connecting a serverless VPC connector to Cloud Run in host project | google-cloud-platform|google-cloud-run|google-vpc | 1 | 78 | 1 | 72,889,386 | 72,889,386 | 1 | true | 2022-07-06T20:16:28.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Permission issue in connecting a serverless VPC connector to Cloud Run in host project<p>I have a service in Cloud Run in project <code>x</code> that needs t... |
72,883,457 | Why do we need to give default value inside getBoolean() in kotlin?<p>I'm trying to put some data whose key: "isLoggedIn" and a value: true inside a shared preference file.
I do it this way...</p>
<pre><code>sharedPreferences=getSharedPreferences(getString(R.string.preference_file_name), Context.MODE_PRIVATE)... | <p>There's also the <code>contains</code> function which checks if the key exists in the prefs (i.e. whether you've written a value for it or not) which can be useful if <em>not set</em> needs to be handled as a separate case. Maybe you need to be able to tell the difference between <em>not set</em> and a saved value o... | Why do we need to give default value inside getBoolean() in kotlin? | android|android-studio|kotlin | 0 | 78 | 2 | 72,890,692 | 72,890,692 | 1 | true | 2022-07-06T12:19:48.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why do we need to give default value inside getBoolean() in kotlin?<p>I'm trying to put some data whose key: "isLoggedIn" and a value: true inside ... |
72,888,891 | Vaadin - print grid with CSS<p>Inside <strong>vaadin-grid.css</strong> I managed to get the #table element which contains the grid's rows</p>
<p><a href="https://i.stack.imgur.com/eAysG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eAysG.jpg" alt="enter image description here" /></a></p>
<p>and wit... | <p>Because apparently you can't access the shadow dom from CSS when there's no 'part' tag on the element,as is the case with this <em>table</em>,I got it by using Javascript as in :</p>
<pre><code>UI.getCurrent().getPage().executeJs("const tabledom = document.querySelector(\"#viewfgrid\").shadowRoot.quer... | Vaadin - print grid with CSS | html|css|vaadin|shadow-dom | 0 | 78 | 3 | 72,895,203 | 72,895,203 | 1 | true | 2022-07-06T19:25:05.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vaadin - print grid with CSS<p>Inside <strong>vaadin-grid.css</strong> I managed to get the #table element which contains the grid's rows</p>
<p><a href="htt... |
72,891,181 | Isolated Azure Function missing authentication header?<p>I have created a new .NET 6 Isolated Azure Function followed by this great article:
<a href="https://joonasw.net/view/azure-ad-jwt-authentication-in-net-isolated-process-azure-functions" rel="nofollow noreferrer">https://joonasw.net/view/azure-ad-jwt-authenticati... | <p><em>Thank you @<em>jack.pop</em> ,For the solution ,Posting the same as answer so that other community members can beneficial for similar issue.</em></p>
<p><em><strong>WORKAROUND:-</strong></em></p>
<blockquote>
<p><em><strong>Please make sure to set the authorization level to <a href="https://docs.microsoft.com/en... | Isolated Azure Function missing authentication header? | azure-functions|dotnet-isolated | 0 | 78 | 1 | 72,896,521 | 72,896,521 | 1 | true | 2022-07-07T00:44:45.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Isolated Azure Function missing authentication header?<p>I have created a new .NET 6 Isolated Azure Function followed by this great article:
<a href="https:/... |
72,898,996 | Is there a way in Java to pop an Integer object out of an arrayList and then place it in another arrayList?<p>For example, myArrayList is [1, 1, 1], is there a function which removes a 1 from myArray and then places it in myArrayList2 so that:</p>
<p>myArrayList [1, 1]<br />
myArrayList2 [1]</p> | <p>There are multiple ways to do this. For any <em>mutable</em> <code>List</code>, you could use the <code>listIterator()</code>:</p>
<p>To remove from the front:</p>
<pre class="lang-java prettyprint-override"><code>private static void moveGeneralList() {
List<Integer> list1 = new ArrayList<>(Arrays.as... | Is there a way in Java to pop an Integer object out of an arrayList and then place it in another arrayList? | java|list|arraylist | 0 | 78 | 1 | 72,899,964 | 72,899,964 | 1 | true | 2022-07-07T13:47:21.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way in Java to pop an Integer object out of an arrayList and then place it in another arrayList?<p>For example, myArrayList is [1, 1, 1], is there... |
72,896,743 | assembly aarch64 get current unix timestamp<p>I expect I can get current nanosecond or microsecond unix timestamp from syscall then stored into a register for example register <code>x0</code>.</p>
<p>I read this <a href="https://thog.github.io/syscalls-table-aarch64/latest.html" rel="nofollow noreferrer">arch64 syscall... | <p>As @PeterCordes mention, you can use <code>times</code> or <code>clock_gettime</code>.</p>
<p>But I prefer <code>clock_gettime</code> with kernel convention <code>0x71</code> in register <code>x8</code> according your refference table.</p>
<p>Here is my code, note that I'm using modular programming assembly so <code... | assembly aarch64 get current unix timestamp | linux|assembly|arm64 | 0 | 78 | 1 | 72,906,197 | 72,906,197 | 1 | true | 2022-07-07T11:08:19.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
assembly aarch64 get current unix timestamp<p>I expect I can get current nanosecond or microsecond unix timestamp from syscall then stored into a register fo... |
72,903,738 | Pass sensitive data as argument using docker in Golang<p>I have created a program in <strong>Go</strong> which receives to arguments, <code>project_id</code> and <code>private_token</code>. Basically that is how I do it:</p>
<pre class="lang-golang prettyprint-override"><code>project_id := flag.String("project&quo... | <p>There are different ways to store and use sensitive data inside your Go application with docker. Every method has its pros and cons.</p>
<p><strong>1. Hard-code the secrets inside the code</strong>.<em>(never do this)</em></p>
<pre><code>const (
PROJECT_NAME = "MyProject"
PRIVATE_TOKEN="kjdnio... | Pass sensitive data as argument using docker in Golang | docker|go|environment-variables | 3 | 78 | 2 | 72,906,774 | 72,906,774 | 1 | true | 2022-07-07T20:16:20.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass sensitive data as argument using docker in Golang<p>I have created a program in <strong>Go</strong> which receives to arguments, <code>project_id</code>... |
72,863,244 | PyQt styling with QSS & @pyqtProperty<p>As a simple example, suppose I have a <code>QPushButton</code> that has some basic styling applied to it using <code>button.setStyleSheet()</code>. Additionally, I want some parts of the style (background color) to change in response to events triggered by the user.</p>
<p>I cou... | <p>The documentation about the <a href="https://doc.qt.io/qt-5/stylesheet-syntax.html#selector-types" rel="nofollow noreferrer">QSS property selector</a> says:</p>
<blockquote>
<p>You may use this selector to test for any Qt property that supports QVariant::toString()</p>
</blockquote>
<p>The QSS parser code is quite c... | PyQt styling with QSS & @pyqtProperty | css|qt|pyqt|qtstylesheets | 0 | 78 | 1 | 72,918,574 | 72,918,574 | 1 | true | 2022-07-05T01:44:32.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PyQt styling with QSS & @pyqtProperty<p>As a simple example, suppose I have a <code>QPushButton</code> that has some basic styling applied to it using <code... |
72,927,143 | how to extract genes from genbank file in R<p>I ask this question because I don't really know how to do it.</p>
<p>I have a genome in a gb format (YJ016_I.gb) so I want to import in R and then export all the genes in nucleotide format, or just take one of the sequence using the name of the gene.</p>
<pre><code>library(... | <p>I do not have access to your specific file, so I am using the example file provided by the <code>genbankr</code> package. You will need <code>Biostrings</code> to write the sequence as fasta file. To only write the sequence(s) of a particular locus_tag, just subset GENES to that particular one (e.g. <code>subset(GEN... | how to extract genes from genbank file in R | r|bioinformatics|genbank | 0 | 78 | 1 | 72,928,714 | 72,928,714 | 1 | true | 2022-07-10T08:28:36.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to extract genes from genbank file in R<p>I ask this question because I don't really know how to do it.</p>
<p>I have a genome in a gb format (YJ016_I.gb... |
72,932,916 | Replace only one property of a model when passing as an argument<p>I want to register a user, and my controller will accept a user model with their password, which I am hashing before saving.
Obviously there are a bunch of other properties of the model that I don't want to manually assign to an inline object.
Something... | <p>The cleanest and most scalable approach is to use a view-model for getting data from the user, and manually build your model object in the action method.</p>
<p>View-model class:</p>
<pre><code>public class UserViewModel
{
public string Username { get; set;}
// You can add validation for this property for p... | Replace only one property of a model when passing as an argument | c#|asp.net | 1 | 78 | 1 | 72,933,707 | 72,933,707 | 1 | true | 2022-07-11T01:22:51.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace only one property of a model when passing as an argument<p>I want to register a user, and my controller will accept a user model with their password,... |
72,927,800 | How to pass file(Image) via NextJS API Routes to external API?<p>I use NextJS (combined: SSR and SPA for authorized dashboard) with Django Rest FW on the backend. For auth I use JWT token, which is stored in cookies. For that reason, I need a middleware at /pages/api/* for each request to append from cookie access toke... | <p>the solution was raiser simple. Just passed everything I received and appended token to headers/</p>
<pre><code>export default async (req, res) => {
// all extra validation
const apiRes = await fetch(`${LOCAL_API_URL}/upload/`, {
method: "POST",
headers: { ...req.headers, ...{ "Authoriz... | How to pass file(Image) via NextJS API Routes to external API? | javascript|reactjs|next.js | 0 | 78 | 2 | 72,934,494 | 72,934,494 | 1 | true | 2022-07-10T10:32:11.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass file(Image) via NextJS API Routes to external API?<p>I use NextJS (combined: SSR and SPA for authorized dashboard) with Django Rest FW on the bac... |
72,938,981 | Convert CGImage? to an Image I can show in my view (swiftUI)<p>I am working with EFQRCode library and am trying to generate a QR-code on my apple watch.
The result of <code>EFQRCode.generate(for: "test")</code>
is a <strong>CGImage</strong>. If I print the line above I get something like this:</p>
<blockquote... | <p>It is possible to create <code>Image</code> via <code>UIImage</code> created with <code>CGImage</code>, like</p>
<pre><code>if let cgImage = EFQRCode.generate(for: "test") {
Image(uiImage: UIImage(cgImage: cgImage))
}
</code></pre> | Convert CGImage? to an Image I can show in my view (swiftUI) | ios|swiftui|qr-code|apple-watch|watchos | 0 | 78 | 1 | 72,939,132 | 72,939,132 | 1 | true | 2022-07-11T12:57:01.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert CGImage? to an Image I can show in my view (swiftUI)<p>I am working with EFQRCode library and am trying to generate a QR-code on my apple watch.
The ... |
72,917,500 | NodeJS Twitter API get liked tweets count<p>I'm trying to get the number of tweets a user has ever liked in NodeJs using twitter-api-v2, but I can't seem to find the solution. I tried to use the "public_metrics" property but it looks like it only contains the following properties:</p>
<ul>
<li>followers count... | <p>If you have an elevated access, you can use the <code>favourites_count</code> field in the <code>User</code> objects from the Twitter API V1. But there is unfortunately no way to do so with the Twitter API V2.</p> | NodeJS Twitter API get liked tweets count | node.js|api|twitter|twitter-api-v2|twitter-api-v1 | 0 | 78 | 1 | 72,939,822 | 72,939,822 | 1 | true | 2022-07-08T22:13:38.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NodeJS Twitter API get liked tweets count<p>I'm trying to get the number of tweets a user has ever liked in NodeJs using twitter-api-v2, but I can't seem to ... |
72,934,114 | Problem converting xsi:nil="true" to NUll by OpenXML<p>I am sending data from a C# Windows forms application as XML to SQL
The problem is that NULL values are converted and sent as xsi:nil="true".
And when read by OpenXML it encounters an error
Thank you all</p>
<p><strong>Sample Query :</strong></p>
<pre><... | <p>Microsoft proprietary <code>OPENXML()</code> and its companions <code>sp_xml_preparedocument</code> and <code>sp_xml_removedocument</code> are kept just for backward compatibility with the obsolete SQL Server 2000. Their use is diminished just to very few fringe cases.
Starting from SQL Server 2005 onwards, it is st... | Problem converting xsi:nil="true" to NUll by OpenXML | xml|null|sql-openxml | 0 | 78 | 1 | 72,942,956 | 72,942,956 | 1 | true | 2022-07-11T05:32:28.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem converting xsi:nil="true" to NUll by OpenXML<p>I am sending data from a C# Windows forms application as XML to SQL
The problem is that NULL values ... |
72,942,064 | Fill height css flexbox with many nested containers<p>I'm using AdminLTE, and in 1 particular page, I need the body of the card to stretch the whole available height.</p>
<p>There are a bunch of nested containers which I cannot delete.
HTML:</p>
<pre><code><div class="content-wrapper" style="min-heigh... | <p>It takes 'getting used to', but it is often convenient to simply turn all elements for a 'cardlist' into <em>flexbox containers (FBL)</em>.</p>
<p>steps to follow:</p>
<ul>
<li>make <code>html</code> and <code>body</code> fill the full viewport</li>
<li>make the cardlist and cards flexbox column containers</li>
<li>... | Fill height css flexbox with many nested containers | css|flexbox | 0 | 78 | 3 | 72,953,650 | 72,953,650 | 1 | true | 2022-07-11T16:56:01.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fill height css flexbox with many nested containers<p>I'm using AdminLTE, and in 1 particular page, I need the body of the card to stretch the whole availabl... |
72,934,107 | How to use Additional Module Dependencies in C++20<p>I created a TestModule.ixx in one folder and I want to use <code>import TestModule</code> in my cpp project(in different folder).</p>
<p>I tried <code>TestModule=E:\XXX\TestModule.ixx.ifc;</code> in properties-> Additional Module Dependencies, but got error lnk20... | <p>In the build parameters we need to add it as an option.</p>
<p>When it comes to visual studio below is the way worked. Similarly there will a build option for other compilers.</p>
<p>In Visual studio (for MSVC) - Project properties--"C/C++"--Command Line--Additional options</p>
<p><a href="https://docs.mic... | How to use Additional Module Dependencies in C++20 | c++|c++20|c++-modules | 2 | 78 | 1 | 72,959,805 | 72,959,805 | 1 | true | 2022-07-11T05:31:16.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use Additional Module Dependencies in C++20<p>I created a TestModule.ixx in one folder and I want to use <code>import TestModule</code> in my cpp proj... |
72,970,762 | Springboot filter executed in case of permitAll urls as well<p>I am new to springboot and trying to implement security where no filters are applied to my login, signup and home urls.</p>
<p>I am using springboot 2.7.1</p>
<p>I am expecting <code>antMatchers("/**/signup").permitAll()</code> to remain free of a... | <p>When you use <code>permitAll()</code> you are not disabling the filters, you are just specifying that you do not want to apply any authentication/authorization checks for that <code>RequestMatcher</code>. All the filters will still work.</p>
<p>The <code>AuthorizationFilter</code> will be invoked but since you confi... | Springboot filter executed in case of permitAll urls as well | spring-boot|authentication|spring-security|api-authorization | -2 | 78 | 1 | 72,971,406 | 72,971,406 | 1 | true | 2022-07-13T18:06:31.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Springboot filter executed in case of permitAll urls as well<p>I am new to springboot and trying to implement security where no filters are applied to my log... |
72,968,424 | Is Serverless VPC connector a solution to connect my app engine to a VM within the same project in GCP?<p>I want to access a REST server that is hosted locally in a windows virtual machine (VM) in a GCP project. Also, the VPC network within my GCP project has a VPN tunnel with an external client. I plan to host my proj... | <p>Short answer: Yes</p>
<p>When you create a VPC Connector and associate it to you App Engine service you're able to talk to <a href="https://cloud.google.com/vpc/docs/serverless-vpc-access" rel="nofollow noreferrer">resources living in the VPC where the connector was created</a>.</p>
<p>So the real condition here is ... | Is Serverless VPC connector a solution to connect my app engine to a VM within the same project in GCP? | google-app-engine|google-cloud-platform|google-api|google-cloud-networking | 0 | 78 | 1 | 72,973,839 | 72,973,839 | 1 | true | 2022-07-13T14:58:29.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is Serverless VPC connector a solution to connect my app engine to a VM within the same project in GCP?<p>I want to access a REST server that is hosted local... |
72,993,015 | Tidyverse filter outliers - in one pipe<p>I want to filter outliers in the tidyverseframe work in one pipe.
Outlier for this example is just defined as <code>Q1 - 1.5 * IQR</code> and <code>Q3 + 1.5 * IQR</code>.
Q1 being the 25 percentile and Q3 the 75% percentile. And IQR the interquartile range, <code>IQR = Q3 - Q1<... | <p>Use <code>mutate</code> instead of <code>summarize</code>, and then <code>filter</code>:</p>
<pre class="lang-r prettyprint-override"><code>iris %>%
group_by(Species) %>%
mutate(IQR = IQR(Sepal.Length),
O_upper = quantile(Sepal.Length, probs=c( .75), na.rm = FALSE)+1.5*IQR,
O_lo... | Tidyverse filter outliers - in one pipe | r|outliers | 0 | 78 | 1 | 72,993,086 | 72,993,086 | 1 | true | 2022-07-15T11:04:56.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tidyverse filter outliers - in one pipe<p>I want to filter outliers in the tidyverseframe work in one pipe.
Outlier for this example is just defined as <code... |
73,002,652 | Check if app's in foreground or background<p>I want to update user status in firestore to online and offline according to whether the app runs in the background or foreground. I'm using <strong>LifecycleObserver</strong> for it, but the <strong>problem is I have to call it in every single activity for it to work</stron... | <p>Try this</p>
<p>your build.gradle file:</p>
<pre><code>dependencies {
implementation "android.arch.lifecycle:extensions:1.1.0"
}
</code></pre>
<p>Then in your Application class,add :</p>
<pre><code>class ArchLifecycleApp : Application(), LifecycleObserver {
override fun onCreate() {
super.... | Check if app's in foreground or background | android|kotlin|google-cloud-firestore | 0 | 78 | 1 | 73,002,765 | 73,002,765 | 1 | true | 2022-07-16T08:17:48.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check if app's in foreground or background<p>I want to update user status in firestore to online and offline according to whether the app runs in the backgro... |
72,990,776 | shell script, What happens when you use '-o' option and only one variable?<p>For example, when you run the following shell script:</p>
<pre><code>foo="example"
if [ -o $foo ]; then
foo="true"
echo $foo
fi
</code></pre>
<p>The result is false and nothing is returned.</p>
<p>but If ... | <p>Some facts:</p>
<ul>
<li>In bash, <code>-o</code> in <code>[ -o OPTION ]</code> is an operator to test if shell option OPTION is enabled.</li>
<li><code>[ STRING ]</code> tests if STRING is not empty.</li>
<li>Inside <strong>single brackets (<code>[ ]</code>)</strong>, if <code>$foo</code> is unquoted it undergoes <... | shell script, What happens when you use '-o' option and only one variable? | bash|shell | 0 | 78 | 3 | 73,005,035 | 73,005,035 | 1 | true | 2022-07-15T07:55:54.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
shell script, What happens when you use '-o' option and only one variable?<p>For example, when you run the following shell script:</p>
<pre><code>foo="e... |
73,005,107 | How to resolve 400 Client Error when mapping uniprot IDs programatically?<p>Here's the code:</p>
<pre><code>API_URL = "https://rest.uniprot.org"
def submit_id_mapping(from_db, to_db, ids):
request = requests.get(
f"{API_URL}/idmapping/run",
data={"from": from_db, "... | <p>Try to change <code>.get</code> to <code>.post</code>:</p>
<pre class="lang-py prettyprint-override"><code>import requests
API_URL = "https://rest.uniprot.org"
def submit_id_mapping(from_db, to_db, ids):
data = {"from": from_db, "to": to_db, "ids": ids}
request = re... | How to resolve 400 Client Error when mapping uniprot IDs programatically? | python-3.x|rest|python-requests|programmatically | 2 | 78 | 1 | 73,005,871 | 73,005,871 | 1 | true | 2022-07-16T14:42:34.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to resolve 400 Client Error when mapping uniprot IDs programatically?<p>Here's the code:</p>
<pre><code>API_URL = "https://rest.uniprot.org"
d... |
72,998,766 | Minimize constant of a definite integral using Scipy<p>I am trying to optimize the following problem using Scipy</p>
<p><img src="https://i.stack.imgur.com/98sMa.png" alt="formula" /></p>
<p>Currently I have defined my equations and attempted to use the quad function and minimize to solve the equation.</p>
<pre><code>i... | <p>Both <code>quad</code> and <code>minimize</code> expect a function with signature <code>fun(x, *args)</code>. Thus, you either need to wrap the function by a lambda expression or use the <code>args</code> parameter. Note also that <code>quad</code> doesn't return a scalar, so you need to extract the integral value f... | Minimize constant of a definite integral using Scipy | python|optimization|scipy | 1 | 78 | 1 | 73,009,932 | 73,009,932 | 1 | true | 2022-07-15T19:24:50.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Minimize constant of a definite integral using Scipy<p>I am trying to optimize the following problem using Scipy</p>
<p><img src="https://i.stack.imgur.com/9... |
73,017,223 | Best way to create list [ [1,2,3], [4,5,6] ] in Python<p>I want to generate the list of list <code>[[1,2,3],[4,5,6]]</code></p>
<p>I have attached some python codes but I do not know what to pick among them in terms of efficiency:</p>
<pre><code>[[y + x for x in range(3)] for y in [1,4]]
[[y for y in range(z, z + 3)] f... | <pre><code>[[y + x for x in range(3)] for y in [1,4]]
</code></pre>
<p>In this code, Giving the value 4 is not the best way because in order to print a list like this</p>
<pre><code>[[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15], [16, 17, 18], [19, 20, 21], [22, 23, 24], [25, 26, 27], [28, 29, 30]]
</code... | Best way to create list [ [1,2,3], [4,5,6] ] in Python | python|list | 0 | 78 | 1 | 73,017,309 | 73,017,309 | 1 | true | 2022-07-18T04:08:40.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best way to create list [ [1,2,3], [4,5,6] ] in Python<p>I want to generate the list of list <code>[[1,2,3],[4,5,6]]</code></p>
<p>I have attached some pytho... |
72,999,837 | Why/how is (-1) ** 0.5 inaccurate?<p>Python computes the <a href="https://mathworld.wolfram.com/i.html" rel="nofollow noreferrer">imaginary unit</a> <em>i</em> = sqrt(-1) inaccurately:</p>
<pre><code>>>> (-1) ** 0.5
(6.123233995736766e-17+1j)
</code></pre>
<p>Should be exactly <code>1j</code> (Python calls it ... | <p>When complex arithmetic is required, your Python implementation likely calculates <em>x</em><sup><em>y</em></sup> as <em>e</em><sup><em>y</em> ln <em>x</em></sup>, as might be done with the complex C functions <code>cexp</code> and <code>clog</code>. Those are in turn likely calculated with real functions including ... | Why/how is (-1) ** 0.5 inaccurate? | python|floating-point|complex-numbers|floating-accuracy | 3 | 78 | 1 | 73,030,377 | 73,030,377 | 1 | true | 2022-07-15T21:40:21.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why/how is (-1) ** 0.5 inaccurate?<p>Python computes the <a href="https://mathworld.wolfram.com/i.html" rel="nofollow noreferrer">imaginary unit</a> <em>i</e... |
72,997,252 | Flutter Bloc: log out from any place when using Navigator + Bloc<p>I am new to Fluter and trying to tackle the navigation part using Bloc.</p>
<p>I would like to add the possibility to log out from any place in the application.</p>
<p>Details:</p>
<p>I am working on the Notes application (just for learning), and have w... | <p>you can listen for the logout event using bloc listener and then call the navigator function</p> | Flutter Bloc: log out from any place when using Navigator + Bloc | flutter|bloc|flutter-bloc | 2 | 78 | 2 | 73,031,657 | 73,031,657 | 1 | true | 2022-07-15T16:43:58.670Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter Bloc: log out from any place when using Navigator + Bloc<p>I am new to Fluter and trying to tackle the navigation part using Bloc.</p>
<p>I would lik... |
73,031,043 | How to prevent html form refresh on submit?<p>Hello after searching and trying a lot , i am not able to find the issue so that I am seeking your help to solve my issue.</p>
<p>Here I have a form while clicking on submit button it should call the javascript function and <strong>should <strong>not redirect or refresh the... | <p>You have two problems.</p>
<h1>Typo</h1>
<p>The first is a typo and is highlighted by the browser telling you:</p>
<blockquote>
<p>Uncaught SyntaxError: missing } after property list note: { opened at line 24, column 19</p>
</blockquote>
<p>This exception is preventing the function from being created, so the <code>o... | How to prevent html form refresh on submit? | javascript|html|jquery|forms | 1 | 78 | 2 | 73,032,885 | 73,032,885 | 1 | true | 2022-07-19T04:14:42.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to prevent html form refresh on submit?<p>Hello after searching and trying a lot , i am not able to find the issue so that I am seeking your help to solv... |
72,969,556 | R Shiny JS jump to last page conflicting with auto generate value in new row<p>I have a <code>Shiny</code> app that allows the user to enter their project details to the database. This is achieved by the <code>Add Project Details</code> Button that adds an empty row to the table. When the add button is clicked the app ... | <p>@Stéphane Laurent deserves all credit for this. Essentially I just used the original posters code and updated it with the answer from Stéphane Laurent. There are certain things like the <code>observeEvent()</code> that don't work as originally posted without the user of the <code>addRow()</code>. Anyways, this shou... | R Shiny JS jump to last page conflicting with auto generate value in new row | javascript|r|shiny|datatables|dt | 1 | 78 | 2 | 73,043,001 | 73,043,001 | 1 | true | 2022-07-13T16:21:49.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R Shiny JS jump to last page conflicting with auto generate value in new row<p>I have a <code>Shiny</code> app that allows the user to enter their project de... |
72,984,930 | How to serialize to the given TextWriter instance using System.Text.Json?<p>I know how to serialize to a <code>Stream</code>, but is it possible to serialize to a <code>TextWriter</code>?</p>
<p>The problem is that <code>TextWriter</code> does not expose a <code>Stream</code> object.</p>
<p>It seems there is no such op... | <p>There is no built-in way to serialize directly to a <code>TextWriter</code> using System.Text.Json as of .NET 6. For confirmation:</p>
<ol>
<li><p>In <a href="https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-apis/" rel="nofollow noreferrer"><em>Try the new System.Text.Json APIs</em></a>, Immo Land... | How to serialize to the given TextWriter instance using System.Text.Json? | .net-core|system.text.json | 0 | 78 | 1 | 73,060,269 | 73,060,269 | 1 | true | 2022-07-14T18:07:20.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to serialize to the given TextWriter instance using System.Text.Json?<p>I know how to serialize to a <code>Stream</code>, but is it possible to serialize... |
73,145,097 | dict 'type' object is not subscriptable when declaring a dict type variable<p>I am trying to define a dictionary that will hold a list:</p>
<pre class="lang-py prettyprint-override"><code>import numpy as np
def processing_stitch_visual_outputs(
saved_visual_outputs: dict[str, np.ndarray],
nrow: int,
ncol... | <p>To solve this error you want to make use of the <code>Dict</code> class from the <code>typing</code> module as follows:</p>
<pre class="lang-py prettyprint-override"><code>from typing import Dict
import numpy as np
def processing_stitch_visual_outputs(
saved_visual_outputs: Dict[str, np.ndarray],
nrow: int... | dict 'type' object is not subscriptable when declaring a dict type variable | python|python-3.x|numpy|python-typing | 0 | 78 | 1 | 73,145,098 | 73,145,098 | 1 | true | 2022-07-16T12:54:10.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
dict 'type' object is not subscriptable when declaring a dict type variable<p>I am trying to define a dictionary that will hold a list:</p>
<pre class="lang-... |
72,870,386 | why the destructor is called only one time when the constructor is called 5 times?<p>I'm trying to learn more about C++ ,int this code I'm allocating an array of A's (5 in this case), what I understand that 5 A's will be allocated ...so the compiler will call 5 times the constructer , but in case of deleting that arra... | <p>You need to use <code>delete[] a</code> to delete an array of things allocated with <code>new[]</code>. If you do that, you'll see the correct output:</p>
<pre class="lang-none prettyprint-override"><code>IM in C'tor
IM in C'tor
IM in C'tor
IM in C'tor
IM in C'tor
IM in De'tor
IM in De'tor
IM in De'tor
IM in De'tor
... | why the destructor is called only one time when the constructor is called 5 times? | c++|constructor|dynamic-memory-allocation|destructor|new-operator | 0 | 78 | 1 | 72,870,456 | 72,870,456 | 1 | true | 2022-07-05T13:35:54.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why the destructor is called only one time when the constructor is called 5 times?<p>I'm trying to learn more about C++ ,int this code I'm allocating an arra... |
73,013,605 | How to make SwiftUI Picker Wrap Text<p>When using a <code>Picker</code> with <code>.pickerStyle(WheelPickerStyle())</code>, the horizontal space that the picker takes up is seemingly fixed. In the image below, the Picker frame (which is seen by its lighter color) is larger than it needs to be for its elements.</p>
<p><... | <p>A solution appears a bit complicated because Picker is not native SwiftUI control, but has <code>UIPickerView</code> at backend, so we need combination of already mentioned one <a href="https://stackoverflow.com/a/72627822/12299030">to get rid of compression contains</a> and another one <a href="https://stackoverflo... | How to make SwiftUI Picker Wrap Text | swift|swiftui|uipickerview | 2 | 78 | 1 | 73,013,967 | 73,013,967 | 1 | true | 2022-07-17T16:41:23.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make SwiftUI Picker Wrap Text<p>When using a <code>Picker</code> with <code>.pickerStyle(WheelPickerStyle())</code>, the horizontal space that the pic... |
72,990,156 | Question about reference return type in C++<p>I write the following code:</p>
<pre><code>const string& combine(string &s1,string &s2)
{
return s1+s2;
}
</code></pre>
<p>but when I pass two strings to this function, the result I use "std::cout" to print is the empty string.I don't know what th... | <p>The behaviour of your code is undefined. This is because <code>s1 + s2</code> is an <em>anonymous temporary</em> and you are attempting to <em>bind</em> that to a reference return type.</p>
<p>The output you observe is a manifestation of that undefined behaviour.</p>
<p>Changing the return type of the function to a ... | Question about reference return type in C++ | c++ | 0 | 78 | 1 | 72,990,369 | 72,990,369 | 1 | true | 2022-07-15T07:02:06.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Question about reference return type in C++<p>I write the following code:</p>
<pre><code>const string& combine(string &s1,string &s2)
{
retu... |
73,025,814 | Spring Boot unable to scan MongoRepository<p>I have a persistance interface that implements <code>MongoRepository</code> interface that looks as follows:</p>
<pre><code>package org.prithvidiamond1.DB.Repositories;
import org.prithvidiamond1.DB.Models.SomeModel;
import org.springframework.data.mongodb.repository.MongoR... | <p>The problem is that you are using the primary source class(<code>BotApplication.class</code>) for executing custom code during start-up.</p>
<pre class="lang-java prettyprint-override"><code> public static void main(String[] args) {
ApplicationContext AppContext = SpringApplication.run(BotApplication.clas... | Spring Boot unable to scan MongoRepository | java|spring|spring-boot | 1 | 78 | 4 | 73,058,334 | 73,058,334 | 1 | true | 2022-07-18T16:44:22.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spring Boot unable to scan MongoRepository<p>I have a persistance interface that implements <code>MongoRepository</code> interface that looks as follows:</p>... |
72,814,517 | How to filter the strings without using regex?<p>I'm filtering the array of strings with a matching character. The task is to get the strings with the character "o" from first part of the word.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="sni... | <p>Depending on your strings in your array, using a regular expression (I know you said you were reluctant to use them as you feel you may go wrong, but I thought I'd show some examples) may be enough. Here we match on a word boundary <code>\b</code>, followed by an <code>o</code>:
<div class="snippet" data-lang="js" d... | How to filter the strings without using regex? | javascript|arrays|string | 0 | 78 | 4 | 72,814,882 | 72,814,882 | 1 | true | 2022-06-30T10:51:14.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to filter the strings without using regex?<p>I'm filtering the array of strings with a matching character. The task is to get the strings with the charac... |
72,887,944 | Cannot convert nested JSON to POJO using Resttemplate in Spring Boot<p>I have the following JSON, from which I want to store specific fields in database.</p>
<p><strong>JSON OBJECT</strong></p>
<pre><code>{
"data": [
{
"screen_ID": "23",
"screen_dat... | <p>Problem is that you are trying to deserilize your response as array :</p>
<pre><code> ResponseEntity<List<BitPayRates>> postEntity = restTemplate.exchange(
url,
HttpMethod.GET,
request,
new ParameterizedTypeReference<>... | Cannot convert nested JSON to POJO using Resttemplate in Spring Boot | java|json|spring|spring-boot|hibernate | 0 | 78 | 2 | 72,890,309 | 72,890,309 | 1 | true | 2022-07-06T17:52:32.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot convert nested JSON to POJO using Resttemplate in Spring Boot<p>I have the following JSON, from which I want to store specific fields in database.</p>... |
72,828,127 | How to remove all before for empty list?<p>Can not figure out how to produce the result with function:</p>
<pre><code>remove_all_before([],0) == []
</code></pre>
<p>I tried using <code>bool()</code>, <code>len()</code>, and <code>if not</code>, but nothing worked for me</p>
<pre class="lang-py prettyprint-override"><co... | <p>This is what I'm thinking, since the <code>border</code> is an <code>int</code> but not the index of the list, using the <code>index()</code> method of the give list to mark where to slice the whole list (<em>as I've said in my preliminary comment</em>) . It would of course find the first element in the list and inc... | How to remove all before for empty list? | python|list | 0 | 78 | 3 | 72,828,356 | 72,828,356 | 1 | true | 2022-07-01T10:48:26.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove all before for empty list?<p>Can not figure out how to produce the result with function:</p>
<pre><code>remove_all_before([],0) == []
</code></... |
72,810,207 | Encoding problem in C# decrypting in bouncycastle from openssl<p>I'm trying to decrypt in c#, using bouncycastle, the result of the following php code:</p>
<pre class="lang-php prettyprint-override"><code><?php
$plaintext = 'The quick brown fox jumps over the lazy dog';
$cipher = "AES-128-CTR";
... | <p>AES-128 uses a 16 bytes key. In the PHP code, however, a 32 bytes key is used, which PHP <em>implicitly</em> truncates by considering only the first 16 bytes.</p>
<p>So the fix is to shorten the key in the C# code accordingly, i.e. use <code>F5UgsDQddWGdgjdd</code>.<br>
Alternatively, change the AES variant in the ... | Encoding problem in C# decrypting in bouncycastle from openssl | c#|encryption|openssl|bouncycastle|php-openssl | 1 | 78 | 1 | 72,811,370 | 72,811,370 | 1 | true | 2022-06-30T04:09:45.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Encoding problem in C# decrypting in bouncycastle from openssl<p>I'm trying to decrypt in c#, using bouncycastle, the result of the following php code:</p>
<... |
72,988,067 | Feature Image on Wordpress 6.0.1 says it’s too small<p>Here’s an issue that I wonder if other Wordpress users are struggling with ever since the latest update 6.0.1.</p>
<p>I’ve a client that used to upload feature images as he saw fit taking in account the weight of the file and not letting the images be too small but... | <p>Often this is due to an issue with an AMP plugin. Confirm that any AMP plugins you have installed are functioning correctly.</p> | Feature Image on Wordpress 6.0.1 says it’s too small | wordpress | 0 | 78 | 1 | 73,021,780 | 73,021,780 | 1 | true | 2022-07-15T01:06:09.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Feature Image on Wordpress 6.0.1 says it’s too small<p>Here’s an issue that I wonder if other Wordpress users are struggling with ever since the latest updat... |
72,844,878 | php merge one file pdf size a6 into a4 size<p>i have one pdf file size A6. In that file have multiple page. i want merge/convert/combine that file into A4 paper size pdf.</p>
<p>Example on A6 size pdf (one file only) have <strong>7</strong> pages. Then i want convert to A4 size let it became one file have 2 page. On A4... | <p>Ghostscript is the all platform GoTo application for command line PDF processing.</p>
<p>Recent versions 9.54+ have improved N-Up imposition, you will need to experiment with settings. If you require more complex control say for booklet production with folds that require inversion, you may need to consider other com... | php merge one file pdf size a6 into a4 size | php | -1 | 78 | 1 | 72,850,245 | 72,850,245 | 1 | true | 2022-07-03T08:09:39.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
php merge one file pdf size a6 into a4 size<p>i have one pdf file size A6. In that file have multiple page. i want merge/convert/combine that file into A4 pa... |
72,831,602 | How to check if localhost python server is running?<p>I'm sending data via sockets between godot and python like this:</p>
<p>godot:</p>
<pre><code>var socket = PacketPeerUDP.new()
socket.set_dest_address("127.0.0.1", 6000)
var data={...}
socket.put_packet(JSON.print(data).to_ascii())
</code... | <p>This is UDP we are talking about. So there isn't really a session or connection established. Also there isn't really an acknowledged package. So at the end the only solution is to implement your own reliability protocol on top of it (e.g. have the server respond and the client wait for the response). Try <a href="ht... | How to check if localhost python server is running? | python|sockets|udp|godot|gdscript | 1 | 78 | 1 | 72,832,051 | 72,832,051 | 1 | true | 2022-07-01T15:36:37.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check if localhost python server is running?<p>I'm sending data via sockets between godot and python like this:</p>
<p>godot:</p>
<pre><code>var socke... |
72,937,001 | Is there any way to validate whether a file is passed as extra vars in ansible-playbook<p>I have an ansible playbook which requires a JSON file to be passed as a <code>--extra-vars</code> (or <code>-e</code> ) from the command line. I would like to know if there is any way that I can add a validation task in my playboo... | <p>Even if it is not possible to find out where and when a variable was defined, it might be possible to check the content of the CLI option(s).</p>
<p>Whereby for the CLI options <code>--tags</code>, <code>--skip-tags</code> and <code>--limit</code> the <a href="https://docs.ansible.com/ansible/latest/reference_append... | Is there any way to validate whether a file is passed as extra vars in ansible-playbook | ansible|ansible-facts | 2 | 78 | 2 | 72,939,226 | 72,939,226 | 1 | true | 2022-07-11T10:18:26.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there any way to validate whether a file is passed as extra vars in ansible-playbook<p>I have an ansible playbook which requires a JSON file to be passed ... |
72,884,720 | Create Ebay Connector using Syncari SDk<p>i'm trying to create a connector inside Syncari SDK to get Orders from Ebay using this SDK</p>
<p><a href="https://pypi.org/project/syncari-sdk/" rel="nofollow noreferrer">https://pypi.org/project/syncari-sdk/</a></p>
<p>in ebay am using Production environment using <strong>Aut... | <p>The synapse_info info method is meant to be used to declare the Synapse’s UI elements and authentication options and not to add headers and tokens directly. The method returns a SynapseInfo object that defines fields in the Syncari’s UI. It is possible later in the framework to access those defined fields from the c... | Create Ebay Connector using Syncari SDk | python|python-3.x|xml|sdk | 0 | 78 | 1 | 73,059,137 | 73,059,137 | 1 | true | 2022-07-06T13:47:55.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create Ebay Connector using Syncari SDk<p>i'm trying to create a connector inside Syncari SDK to get Orders from Ebay using this SDK</p>
<p><a href="https://... |
72,918,165 | Call different functions with multiple choice of items in a combobox, and print text in textbox<p>For study reasons, as the title suggests, I would like to recall the functions by selecting the items in a combobox.</p>
<p>For example, if I select <code>Item1</code> in the combobox, I would like to call <code>function_i... | <p>An easy way is not to create alot of functions and pollute the namespace, rather just create the required functions and put it all inside a main function. This way you will avoid the extra function <code>print</code>, that you just defined.</p>
<p><strong>Method 1:</strong></p>
<pre><code>def function_item1():
r... | Call different functions with multiple choice of items in a combobox, and print text in textbox | python|python-3.x|function|tkinter|combobox | 0 | 78 | 1 | 72,918,762 | 72,918,762 | 1 | true | 2022-07-09T00:42:48.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Call different functions with multiple choice of items in a combobox, and print text in textbox<p>For study reasons, as the title suggests, I would like to r... |
72,983,552 | How do I coalesce Pandas columns only where the beginnings of the columns don't match?<p>I have a table with some company information that we're trying to clean up. In the first column is a clean company name, but not necessarily the correct one. In the second column, there is the correct company name, but often not ve... | <p>You can start by creating another column that contains the length of your <code>Name</code> column. This is really straight-forward. Let us call the new column <code>Slicers</code>. What you can then do is to create a function that slices a string by a certain number and map this function to your columns <code>Info<... | How do I coalesce Pandas columns only where the beginnings of the columns don't match? | python|pandas | 1 | 78 | 1 | 72,990,569 | 72,990,569 | 1 | true | 2022-07-14T16:08:18.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I coalesce Pandas columns only where the beginnings of the columns don't match?<p>I have a table with some company information that we're trying to cl... |
72,970,489 | KQL how able to slice the data in smaller chunks<p>I have this query but the output returns 106K records, what I need to add to the query do smaller chunks for data extract and export on CSV.</p>
<pre><code>Resources
| where type == 'microsoft.compute/virtualmachines'
| extend
JoinID = toupper(id),
... | <p>You can extend a row number and filter by that field to paginate (offset), then you take (or limit) the amount of records you want.</p>
<pre><code>Resources
...
| serialize
| extend row_number = row_number()
| where row_number > 10000
| take 5000
</code></pre>
<p>This query returns 5000 records from 10... | KQL how able to slice the data in smaller chunks | azure|kql|azure-resource-graph | 1 | 78 | 1 | 72,997,245 | 72,997,245 | 1 | true | 2022-07-13T17:40:54.837Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
KQL how able to slice the data in smaller chunks<p>I have this query but the output returns 106K records, what I need to add to the query do smaller chunks f... |
73,006,506 | Add values between a date range<p>Trying to write a program where I have some data of holdings in between date ranges in database. There might be two rows or three rows in between that date range. Each row has a holding value and I need to add each value in that date range. Can anyone suggest to me the solution? I trie... | <p>I have recreated what I believe to be your situation. I am using a <code>record</code> for the Holdings.</p>
<pre><code>public class SumDateRange {
record Holdings(long getHoldings) {
}
public static void main(String[] args) {
List<Holdings> listHoldingsDBRecords =
Lis... | Add values between a date range | java | 0 | 78 | 2 | 73,006,745 | 73,006,745 | 1 | true | 2022-07-16T17:54:41.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add values between a date range<p>Trying to write a program where I have some data of holdings in between date ranges in database. There might be two rows or... |
72,861,511 | Using Pandas to drop the extra rows after satisfying a condition<p>My sample <code>df</code> looks like this</p>
<pre><code>id year success
1 2000 N
1 2001 N
1 2002 Y
1 2003 N
1 2004 N
2 2000 N
2 2001 N
2 2002 N
3 2000 N
3 2001 N
3 ... | <p>First check <code>success</code> column against value <code>Y</code>, which gives you True value where <code>success=Y</code>; To mark all values after first <code>Y</code> as drop, we can further use <code>cummax</code> on this condition; Finally use the negated condition to filter the data frame:</p>
<pre><code>df... | Using Pandas to drop the extra rows after satisfying a condition | pandas | 0 | 78 | 2 | 72,861,665 | 72,861,665 | 1 | true | 2022-07-04T20:02:02.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Pandas to drop the extra rows after satisfying a condition<p>My sample <code>df</code> looks like this</p>
<pre><code>id year success
1 2000 ... |
72,859,105 | How to get no. of characters of files ending with .docx and .doc from a directory and divide each file's characters by 65 and save them to an xlsx<p>I have a folder of many word document files ending with .doc and .docx.</p>
<p>This code is working only for .docx
I want this for .doc also</p>
<pre><code>import docx
imp... | <p>Here is an update to the code in your question which will do what I believe you have asked:</p>
<pre class="lang-py prettyprint-override"><code># uses python-docx package
import docx
import os
# uses pywin32 package
import win32com.client as win32
from win32com.client import constants
app = win32.gencache.EnsureDis... | How to get no. of characters of files ending with .docx and .doc from a directory and divide each file's characters by 65 and save them to an xlsx | python|python-3.x|excel|python-docx|doc | 2 | 78 | 1 | 72,860,040 | 72,860,040 | 1 | true | 2022-07-04T15:31:50.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get no. of characters of files ending with .docx and .doc from a directory and divide each file's characters by 65 and save them to an xlsx<p>I have a... |
72,982,537 | How to execute scroll function every 3 seconds with useEffect React<p>I am trying to build a component that auto scrolls through some list, forwards and then backwards.</p>
<pre><code> const [clicks, setClicks] = useState(numOfClicks)
const [goingUp, setGoingUp] = useState(true)
const scroll = () => {
if (... | <p><code>clearInterval</code> is causing the <code>setInterval</code> to stop after <code>3 sec</code> , <code>it only run once</code> , put your <code>clearInterval</code> inside a condition which will specify when you want this to stop</p>
<pre><code>useEffect(() => {
const interval = setInterval(() => {
... | How to execute scroll function every 3 seconds with useEffect React | reactjs|use-effect | 0 | 78 | 1 | 72,982,820 | 72,982,820 | 1 | true | 2022-07-14T14:52:05.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to execute scroll function every 3 seconds with useEffect React<p>I am trying to build a component that auto scrolls through some list, forwards and then... |
72,954,695 | What condition should I supply for a custom cross join in an Azure Data Factory dataflow?<p>In a dataflow, I have two datasets with one column each. Let's say dataset a with column a and dataset b with column b.</p>
<p>I want to cross join them, but when I select the custom cross join option it asks me to specify a con... | <p>The cross join in a <code>join</code> transformation of azure data factory dataflow requires a condition on which the join has to be applied. I have done the following to demonstrate how do cross join on the example that you have given.</p>
<ul>
<li>I have two datasets (one column each). Dataset A has one column <co... | What condition should I supply for a custom cross join in an Azure Data Factory dataflow? | azure|azure-data-factory|azure-data-flow | 0 | 78 | 1 | 72,955,167 | 72,955,167 | 1 | true | 2022-07-12T15:20:11.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What condition should I supply for a custom cross join in an Azure Data Factory dataflow?<p>In a dataflow, I have two datasets with one column each. Let's sa... |
72,781,857 | how to stop redirect to signUp page once in dashboard- reactjs<p>I'm trying to restrict the user to prevent back to signup page once moved to dashboard.
created one signup page and dashboard page.
once the user signUp done it should navigate to dashboard and if the user clicks on back button we should block the user to... | <p>I think the issue is that you are trying to render multiple routes for the same path. In other words, you've some duplicate route paths. It looks like the <code>"/Dashboard"</code> route redirects to itself which will certainly cause a render loop.</p>
<p>It looks like you are trying to create some form of... | how to stop redirect to signUp page once in dashboard- reactjs | javascript|reactjs|react-router-dom | 1 | 78 | 1 | 72,789,901 | 72,789,901 | 1 | true | 2022-06-28T06:49:28.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to stop redirect to signUp page once in dashboard- reactjs<p>I'm trying to restrict the user to prevent back to signup page once moved to dashboard.
crea... |
72,957,179 | How to fix scrapy resetting connection<p>I keep getting an error when trying to scrapy several urls with scrapy when using Selenium Middleware.</p>
<p>Middleware.py:</p>
<pre><code>class SeleniumMiddleWare(object):
def __init__(self):
path = "G:/Downloads/chromedriver.exe"
options = uc.Ch... | <p><code>the target machine actively refused it</code> means that the server responds, but the specified port (52304) is closed. Could you check if you can access it? Maybe it is a local firewall that is blocking it?</p>
<p>UPD: it looks like you're calling <code>self.driver.quit()</code> in each <code>process_request<... | How to fix scrapy resetting connection | python|scrapy | 0 | 78 | 1 | 72,957,244 | 72,957,244 | 1 | true | 2022-07-12T18:59:27.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix scrapy resetting connection<p>I keep getting an error when trying to scrapy several urls with scrapy when using Selenium Middleware.</p>
<p>Middle... |
72,397,677 | how to make generic component in react native?<p>I want to make a generic component but how can I make it ?</p>
<p>Model:</p>
<pre><code>export interface ISelectOptionsRLV<T, C> {
data: T[];
onPress: (option: C[]) => void;
}
</code></pre>
<p>GenericComponentList:</p>
<pre><code>import { StyleSheet, Text, V... | <p>Try this:</p>
<ul>
<li>GenericComponentList:</li>
</ul>
<pre><code>import { StyleSheet, Text, View, FlatList } from 'react-native'
import React from 'react'
import { ISelectOptionsRLV } from './Model'
const SelectOptionsRLV = <T, C>({ data, onPress }: ISelectOptionsRLV<T, C>) => {
return (
<... | how to make generic component in react native? | reactjs|typescript|react-native|expo | 0 | 78 | 1 | 72,397,809 | 72,397,809 | 1 | true | 2022-05-26T20:26:18.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to make generic component in react native?<p>I want to make a generic component but how can I make it ?</p>
<p>Model:</p>
<pre><code>export interface ISe... |
72,323,019 | Spring AMQP: How to specify no arguments for headers exchange binding<p>I'm trying to create a binding to a headers exchange with Spring AMQP but don't want to specify any arguments so that it will forward all messages</p>
<p>I have tried <code>whereAll</code> or <code>whereAny</code> but both requires non-empty map.</... | <p>Don't use the <code>BindingBuilder</code>, just use <code>new Binding(...)</code>.</p> | Spring AMQP: How to specify no arguments for headers exchange binding | rabbitmq|spring-amqp | 0 | 78 | 1 | 72,449,352 | 72,449,352 | 1 | true | 2022-05-20T17:54:04.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spring AMQP: How to specify no arguments for headers exchange binding<p>I'm trying to create a binding to a headers exchange with Spring AMQP but don't want ... |
72,337,052 | How to perform a $match with $or inside $switch statement in Mongo<p>Hi I am trying to get multiple searches inside switch so i want to do if one of the following <strong>user:search_data||com:search_data||fruit:serch_data</strong> matches return search results.
i want to do,</p>
<pre><code>$match:{
$or:[{ u... | <p>Query</p>
<ul>
<li>if type is all check the regex in all</li>
<li>else check in each based on type</li>
</ul>
<p>*you know the type before sending the query, so you can do this switch case on application code, and have 4 queries, so based on the type to send one of them (the bellow does this on the server and query ... | How to perform a $match with $or inside $switch statement in Mongo | mongodb|aggregation-framework|spring-data-mongodb|nosql-aggregation | 0 | 78 | 1 | 72,337,654 | 72,337,654 | 1 | true | 2022-05-22T11:15:27.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to perform a $match with $or inside $switch statement in Mongo<p>Hi I am trying to get multiple searches inside switch so i want to do if one of the foll... |
72,349,410 | Multiplication Table in Javascript space between numbers?<pre><code> var numbers = "";
for (var i = 1; i <= 13; i++){
for (var j = 1; j<= 13; j++){
numbers += (i*j) + '';
}
numbers += '<br>';
}
element.innerHTML = numbers;
</code></pre>
<p>how can i make a s... | <p>You can use <<a href="https://developer.mozilla.org/docs/Web/HTML/Element/table" rel="nofollow noreferrer">table</a>> for that to structure your text:</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... | Multiplication Table in Javascript space between numbers? | javascript | 0 | 78 | 4 | 72,349,552 | 72,349,552 | 1 | true | 2022-05-23T13:27:56.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multiplication Table in Javascript space between numbers?<pre><code> var numbers = "";
for (var i = 1; i <= 13; i++){
for (var j = 1;... |
72,324,782 | TextField input won't print to console?<p>I'm trying to use a custom TextField widget in my AddNoteScreen. I don't know why it's not printing the TextField input or how to get it to work. I thought having the TextEditingController was all it needed.. I'm new.. sorry to post so much code I don't know how else to explain... | <p>I believe you are storing an empty note, which is the reason why the result from the database is empty.</p>
<p>This line:</p>
<pre><code>if (notesController.text.isNotEmpty) // show error message
</code></pre>
<p>should become this:</p>
<pre><code>if (notesController.text.isEmpty) // show error message
</code></pre>... | TextField input won't print to console? | firebase|flutter|dart | 0 | 78 | 1 | 72,329,355 | 72,329,355 | 1 | true | 2022-05-20T21:06:18.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TextField input won't print to console?<p>I'm trying to use a custom TextField widget in my AddNoteScreen. I don't know why it's not printing the TextField i... |
72,302,921 | Fading a 3D object into the background, using D3D9, SH3 & HLSL<p>I have a simple program that renders a couple of 3D objects, using DirectX 3D 9 and HLSL. I'm just starting off with HLSL, I have no experience with 3D rendering.</p>
<p>I am able to change the texture & color of the models and fade between two textur... | <p>After a long grind, I finally found a very good workaround for my problem, and I will try to explain my understanding of it for anyone else that has a smillar issue. Thanks to Alexander Stewart for suggesting that there may be an in-built way to do it.</p>
<hr />
<p><strong>Method Description</strong></p>
<p>Instead... | Fading a 3D object into the background, using D3D9, SH3 & HLSL | directx|hlsl|directx-9 | 0 | 78 | 2 | 72,317,384 | 72,317,384 | 1 | true | 2022-05-19T10:28:22.403Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fading a 3D object into the background, using D3D9, SH3 & HLSL<p>I have a simple program that renders a couple of 3D objects, using DirectX 3D 9 and HLSL. I'... |
72,383,275 | How can i fix this error that occurs when I use arcpy in Pycharm?<p>first off let me state I am not a programmer. My knowledge of programming is occasionally using R to help with data at my job. Recently I have been attempting to use python in order to automate several ArcGIS functions.</p>
<pre><code>import arcpy
arc... | <p>I figured out how to make it work, but I am not entirely sure why.... If anyone could provide some clarification it would be appreciated. Until then I will explain to the best of my ability.</p>
<p>The Python interpreter I was using was <code>C:\Python27\ArcGIS10.6</code> I thought that would work because after swit... | How can i fix this error that occurs when I use arcpy in Pycharm? | python|pycharm|arcgis|arcpy | 1 | 78 | 1 | 72,396,117 | 72,396,117 | 1 | true | 2022-05-25T19:37:04.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i fix this error that occurs when I use arcpy in Pycharm?<p>first off let me state I am not a programmer. My knowledge of programming is occasionally... |
72,401,576 | how to split one line with customized separator and assign to variables in BASH?<p>First I was using IFS and read, but then I found -- IFS can only support single character as separator and sometimes I need a string to be the separator.
Then, I was thinking maybe use awk and eval can do it. So I have a try --</p>
<pre>... | <p>I would suggest using shell arrays for storing individual field values and slightly different <code>awk</code> for this:</p>
<pre class="lang-bash prettyprint-override"><code>IFS=$'\03' read -ra arr < <(awk -F'#\\$' -v OFS='\03' '{$1=$1}1' file)
# check array content
declare -p arr
declare -a arr='([0]="... | how to split one line with customized separator and assign to variables in BASH? | bash|awk|eval | 1 | 78 | 2 | 72,401,778 | 72,401,778 | 1 | true | 2022-05-27T06:56:07.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to split one line with customized separator and assign to variables in BASH?<p>First I was using IFS and read, but then I found -- IFS can only support s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.