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,322,022 | QWizardPage designed in Qt Creater can not set geometry correctly when title is set<p>I am trying to design QWizardPage using Qt Creater.</p>
<p>Everything goes fine if I don't set the title of the wizardpage.</p>
<p>However, when I set the title, the wizard I got is strange. <strong>The title takes a large space and t... | <p>You must use <a href="https://doc.qt.io/qt-5/layout.html" rel="nofollow noreferrer">layout managers</a>. Right click on an empty area of the wizard page, and select a vertical or horizontal layout from the "Lay out" submenu.</p> | QWizardPage designed in Qt Creater can not set geometry correctly when title is set | qt|pyqt5|qt-creator|pyuic|qwizardpage | 0 | 71 | 1 | 72,970,003 | 72,970,003 | 0 | true | 2022-05-20T16:23:15.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
QWizardPage designed in Qt Creater can not set geometry correctly when title is set<p>I am trying to design QWizardPage using Qt Creater.</p>
<p>Everything g... |
72,984,427 | How to resolve the Error in anaconda start up?<p>Few days ago, Anaconda Navigator used to work fine but now it won't open; I've even reinstalled the navigator but still getting the same issue.</p>
<p>Here is the error message</p>
<p>Navigator Error:</p>
<pre><code>An unexpected error occurred on Navigator start-up
</co... | <p>According to github the problem lies with "config.yaml" file in C:\Users\axith.continuum\anaconda-client\config.yaml , rename it to config.old or delete it</p> | How to resolve the Error in anaconda start up? | python|anaconda | 0 | 71 | 1 | 72,984,535 | 72,984,535 | 0 | true | 2022-07-14T17:24:24.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to resolve the Error in anaconda start up?<p>Few days ago, Anaconda Navigator used to work fine but now it won't open; I've even reinstalled the navigato... |
72,985,304 | Tic-Tac-Toe game board pieces are being shifted between turns<p>I am trying to make a simple python tic tac toe game.</p>
<p>My issue is that the X's and O's move between turns</p>
<p>Example</p>
<pre><code>Tic Tac Toe
This is a 2 player game.
What is player one's name:A
Hi Alfred
What is player two's name:B
Hi Aid... | <p>When you update the board, you're inserting a new value into the list with the insert(value, position) function.</p>
<pre><code> b = [0, 1, 2, 3, 4]
# The following line puts 0 at the 1st position
b.insert(0, 1)
# b is now [1, 0, 1, 2, 3, 4]
</code></pre>
<p>Instead, you should index the list with []... | Tic-Tac-Toe game board pieces are being shifted between turns | python|tic-tac-toe | -1 | 71 | 4 | 72,985,446 | 72,985,446 | 0 | true | 2022-07-14T18:43:21.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tic-Tac-Toe game board pieces are being shifted between turns<p>I am trying to make a simple python tic tac toe game.</p>
<p>My issue is that the X's and O's... |
72,985,985 | Documenting name / email of author of Go file<p>How is the author of a go file documented?</p>
<p>The <a href="https://go.dev/doc/comment" rel="nofollow noreferrer">Go Doc</a> does not say a word about this. In Java there is a special <code>@author</code> tag where all contributors can be listed. Not acceptable is to r... | <p>Go doesn't have this thing.
You can see the source repository from the import string though, also go.mod contains all the dependencies.
Adding a readme file on the repository is your best bet.</p> | Documenting name / email of author of Go file | go|documentation | -3 | 71 | 1 | 72,986,139 | 72,986,139 | 0 | true | 2022-07-14T19:53:50.310Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Documenting name / email of author of Go file<p>How is the author of a go file documented?</p>
<p>The <a href="https://go.dev/doc/comment" rel="nofollow nore... |
72,987,237 | How can you make a python histogram percentage sum to 100%?<p>I am struggling to make a histogram plot where the total percentage of events sums to 100%. Instead, for this particular example, it sums to approximately 3%. Will anyone be able to show me how I make the percentages of my events sum to 100% for any array us... | <p>One way of doing it is to get the bin heights that <code>plt.hist</code> returns, then re-set the patch heights to the normalized height you want. It's not <em>that</em> involved if you know what to do, but not that ideal. Here's your case:</p>
<pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot... | How can you make a python histogram percentage sum to 100%? | python|matplotlib | 0 | 71 | 1 | 72,988,020 | 72,988,020 | 0 | true | 2022-07-14T22:25:23.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can you make a python histogram percentage sum to 100%?<p>I am struggling to make a histogram plot where the total percentage of events sums to 100%. Ins... |
72,987,321 | Should tokens be part of AST Nodes<h2>Some background why I ask this question.</h2>
<p>I'm reading Writing An Interpreter In Go, in the book, <code>Token</code> struct is inside of AST Nodes. Node is a type that can be fulfilled by implementing <code>tokenLiteral()</code> and <code>String()</code></p>
<pre class="lang-... | <p>The exact nature of the AST is an implementation detail of the compiler (or parsing library) and different AST implementations will have different fields, even different AST implementations for the same language.</p>
<p>It is almost always the case that there will be some mechanism for extracting source location inf... | Should tokens be part of AST Nodes | go|compilation|compiler-construction | 2 | 71 | 1 | 72,988,305 | 72,988,305 | 0 | true | 2022-07-14T22:36:19.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Should tokens be part of AST Nodes<h2>Some background why I ask this question.</h2>
<p>I'm reading Writing An Interpreter In Go, in the book, <code>Token</co... |
72,991,748 | Angular - Add free solid icons<p>I'm trying to use free font awesome icons in my app, but for some reason I can't add them. This is the code I'm using:</p>
<p>My package.json</p>
<pre><code> "@fortawesome/angular-fontawesome": "^0.7.0",
"@fortawesome/fontawesome-svg-core": "^6.1.1&qu... | <p>If I'm not wrong faMousePointer is not in free-solid-svg-icons.</p>
<p><a href="https://github.com/FortAwesome/Font-Awesome/tree/master/js-packages/%40fortawesome/free-solid-svg-icons" rel="nofollow noreferrer">https://github.com/FortAwesome/Font-Awesome/tree/master/js-packages/%40fortawesome/free-solid-svg-icons</... | Angular - Add free solid icons | angular|icons|font-awesome | 0 | 71 | 1 | 72,991,857 | 72,991,857 | 0 | true | 2022-07-15T09:18:09.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular - Add free solid icons<p>I'm trying to use free font awesome icons in my app, but for some reason I can't add them. This is the code I'm using:</p>
<... |
72,996,109 | SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; PDO<p>I am writing some software right now. Reader's digest version: users select a package, and enter their name, email, and desired subdomain. A subdomain is then checked to see if someone already registered it and if it is ... | <p>String field types need to be specified with the keyword <code>VARCHAR</code></p>
<pre class="lang-sql prettyprint-override"><code>CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
email VARCHAR(2... | SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; PDO | php | 0 | 71 | 1 | 72,996,171 | 72,996,171 | 0 | true | 2022-07-15T15:13:57.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; PDO<p>I am writing some software right now. Reader's digest ver... |
72,975,253 | CircleCI Lint Test fails after I lint code locally<p>I am new to CircleCI and working on a project that runs CirclCI on GitHub whenever code is pushed to the remote repo.</p>
<p>Before pushing, I run <code>yarn lint</code> and I still get a failing test from CircleCI.
<a href="https://i.stack.imgur.com/GsQIX.png" rel="... | <p>Run <code>yarn prettier --check .</code> to solve this problem.</p> | CircleCI Lint Test fails after I lint code locally | continuous-integration|circleci | 3 | 71 | 1 | 72,996,191 | 72,996,191 | 0 | true | 2022-07-14T04:37:23.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CircleCI Lint Test fails after I lint code locally<p>I am new to CircleCI and working on a project that runs CirclCI on GitHub whenever code is pushed to the... |
73,009,036 | Trying to stop a Do-While Loop for an application<p>I'm creating an application for a homework, the problem is that I am trying to create a do-while loop to exit the application (Using the question "Do you want to exit (Y/N)"). To work with the do-while loop, I created a method to store the app and then calle... | <blockquote>
<p>the problem is that I am trying to create a do-while loop to exit the application</p>
</blockquote>
<p>You already have that in your program.</p>
<blockquote>
<p>so that when I try to stop the loop, the method loops once more...</p>
</blockquote>
<p>That doesn't fit the goal of your program.</p>
<blockq... | Trying to stop a Do-While Loop for an application | java|loops|methods|java.util.scanner|do-while | 0 | 71 | 4 | 73,009,085 | 73,009,085 | 0 | true | 2022-07-17T03:17:38.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to stop a Do-While Loop for an application<p>I'm creating an application for a homework, the problem is that I am trying to create a do-while loop to ... |
72,893,186 | why this program gives segmentation fault heap-use-after-free on address<p>Program tries to create multiple webrtcbin elements to receive media from different sources
same program works fine on windows but in mac it gives segmentation fault.
on mac if the for loop iterates more than one time then I am getting segmentat... | <p>I was using libsoup for socket connection. It was failing I have changed the library and It works fine now</p> | why this program gives segmentation fault heap-use-after-free on address | c|memory-management|segmentation-fault|gstreamer|glib | 0 | 71 | 1 | 73,011,222 | 73,011,222 | 0 | true | 2022-07-07T06:30:06.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why this program gives segmentation fault heap-use-after-free on address<p>Program tries to create multiple webrtcbin elements to receive media from differen... |
73,008,093 | How can I determine the route of the application through deep linking based on the link<p>This is my code
<code>App.js</code> :</p>
<pre><code>function App() {
const getInitialURL = async () => {
const url = await Linking.getInitialURL();
console.log('This is url',url)
if (url !== null) {
ret... | <p>Well, I found the solution myself</p>
<p>1- I had to make changes in the code in order to be able to access the app both through app:// and through various link models (with http without http - with https without https - with www without www).</p>
<p>In <code>AndroidManifest.xml</code> file :</p>
<pre><code><inte... | How can I determine the route of the application through deep linking based on the link | react-native|deep-linking|react-navigation-v6 | 0 | 71 | 1 | 73,014,703 | 73,014,703 | 0 | true | 2022-07-16T22:38:20.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I determine the route of the application through deep linking based on the link<p>This is my code
<code>App.js</code> :</p>
<pre><code>function App... |
73,019,654 | How to replace only first instance of a value in a list which consists of multiple groups?<p>I have 2 lists and I want to change the elements of 2nd list based on groups of 1st list. Example I have:-</p>
<pre><code>a=[1,1,1,2,2,2,2,3,3,3,4,4,4,5,5]
b=['','','l2','22','','','','','l3','l5','','l4','','','']
</code></pre... | <p>IIUC, use a simple test:</p>
<pre><code>a=[1,1,1,2,2,2,2,3,3,3,4,4,4,5,5]
b=['','','l2','l3','','','','','l3','l5','','l4','','','']
from itertools import groupby
g = groupby(a)
i = 0
for group, data in g:
if not b[i]:
b[i] = 'value' # or b[i] = group if you want the value in a
i += len(list(data)... | How to replace only first instance of a value in a list which consists of multiple groups? | python|arrays|list|indexing|replace | 2 | 71 | 2 | 73,019,943 | 73,019,943 | 0 | true | 2022-07-18T08:52:36.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to replace only first instance of a value in a list which consists of multiple groups?<p>I have 2 lists and I want to change the elements of 2nd list bas... |
73,020,529 | How to remove borders for ListTile leading icon in Flutter?<p>I want to use <code>ListTile</code> with borders. But I want to hide borders above and below leading icon. To do something like this.</p>
<p><a href="https://i.stack.imgur.com/5CFKN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5CFKN.png... | <p>This UI is grouping item. There are others way of doing it. Here are three items(<code>itemCount:3</code>) and It is inside <code>ListView.separated</code>. Every Item(group) have border Radius.</p>
<p>A single item can be Wrapped with Column to contain children and again wrapped with another widget</p>
<pre class="... | How to remove borders for ListTile leading icon in Flutter? | flutter|dart | 0 | 71 | 1 | 73,020,859 | 73,020,859 | 0 | true | 2022-07-18T10:05:15.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove borders for ListTile leading icon in Flutter?<p>I want to use <code>ListTile</code> with borders. But I want to hide borders above and below le... |
72,831,418 | Connecting to git remote from Laravel devcontainer on VSC on windows<p>I'm using a devcontainer in Visaul Studio Code on Windows.
I built this devcontainer with the laravel sail helper. It runs on Docker desktop and WSL2.</p>
<p>This is the devcontainer json:</p>
<pre><code>// https://aka.ms/devcontainer.json
{
&qu... | <p>I gave up on this approach and instead called a git pull from the production site, after figuring out how to access the terminal</p> | Connecting to git remote from Laravel devcontainer on VSC on windows | windows|visual-studio-code|ssh|git-remote|devcontainer | 0 | 71 | 1 | 73,027,976 | 73,027,976 | 0 | true | 2022-07-01T15:21:02.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Connecting to git remote from Laravel devcontainer on VSC on windows<p>I'm using a devcontainer in Visaul Studio Code on Windows.
I built this devcontainer w... |
73,030,845 | Removing a key in a list of dictionary with if value condition in python<p>Here's my sample data, I want to remove the keys with "N/A" values using python.</p>
<pre><code>Data = [
{
"Area": "Los Angeles",
"Idle": "N/A",
"Downtime": "N/A"... | <p>you can try:</p>
<pre><code>Data = [{key: value for key, value in entry.items() if value != "N/A"} for entry in Data]
</code></pre> | Removing a key in a list of dictionary with if value condition in python | python|python-3.x|list|python-2.7|dictionary | -2 | 71 | 2 | 73,030,879 | 73,030,879 | 0 | true | 2022-07-19T03:41:13.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Removing a key in a list of dictionary with if value condition in python<p>Here's my sample data, I want to remove the keys with "N/A" values using... |
72,932,830 | Saving image captured from webcam<p>I'm building a Django project in which I need to take a picture from webcam, and then store it in my database and as a file. I'm saving the source in the database, but I'm having some trouble saving it as a file.
Here is my code:</p>
<p>html:</p>
<pre><code><form method="POST... | <p>If your js/html code works, you will receive a raw image data encoded to base64 in your view 'takePhoto'. Try
<code>print(img)</code> to see something like <code>"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAADwCAYAA...."</code></p>
<p>Maybe you will see just <code>"iVBORw0KGgoAAAANSUhEUgAAAUAAA... | Saving image captured from webcam | python|django|image|python-imaging-library | 0 | 71 | 1 | 72,933,274 | 72,933,274 | 0 | true | 2022-07-11T00:55:26.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Saving image captured from webcam<p>I'm building a Django project in which I need to take a picture from webcam, and then store it in my database and as a fi... |
73,031,160 | Is there any keyboard shortcut to select/copy the auto highlighted text in VS Code?<p>When I place my cursor at any position inside a text like the string in this photo, vs code automatically mildly highlights the entire string. Is there any shortcut key for selecting and copying this entire text highlighted by vs code... | <p>There's not a single, builtin keyboard shortcut for the behavior you described, but you can use a combination of two to achieve the result you want:</p>
<p>The first is called "Expand Selection" in the VS Code app, and <a href="https://code.visualstudio.com/docs/getstarted/keybindings#:%7E:text=editor.acti... | Is there any keyboard shortcut to select/copy the auto highlighted text in VS Code? | visual-studio-code|keyboard-shortcuts | 0 | 71 | 2 | 73,031,450 | 73,031,450 | 0 | true | 2022-07-19T04:34:21.883Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there any keyboard shortcut to select/copy the auto highlighted text in VS Code?<p>When I place my cursor at any position inside a text like the string in... |
72,809,356 | Extract json data inside array to rows in Spark<p>I'm working with Azure Databricks to parse over a large number of small (4kb) JSON files containing information from a remote monitoring station with the following schema:</p>
<pre><code>root
|-- Body: struct (nullable = true)
| |-- telemetry: struct (nullable = tr... | <p>Per your <code>printSchema</code> output, the <code>body</code>, <code>telemetry</code> and <code>element</code> are structs whereas <code>temp</code> is an array. So you need to work on that first.Below are the samples you can test it out.</p>
<pre><code> df = spark.read.json("./test_data.json")
d... | Extract json data inside array to rows in Spark | python|json|apache-spark|pyspark|apache-spark-sql | 0 | 71 | 1 | 72,812,533 | 72,812,533 | 0 | true | 2022-06-30T01:20:37.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract json data inside array to rows in Spark<p>I'm working with Azure Databricks to parse over a large number of small (4kb) JSON files containing informa... |
72,897,979 | How can I select an item in a ListView in Xamarin.Forms with XAML<p>I am currently trying to select an item in a ListView in Xamarin.Forms with XAML. When I push the Add-button the label gets the right value, the new value is added to the ListView but I can't manage it to select the new value in the ListView. Anyone an... | <p>Like <code>FreakyAli</code> said, you need to change the <code>selecteditem</code> property first. And then change the <code>Binding Modes</code> on <code>SelectedItem</code> property of <code>ListView</code>.</p>
<p>Xaml:</p>
<pre><code> <ListView ItemsSource="{Binding numbers}" SelectedItem="{Bi... | How can I select an item in a ListView in Xamarin.Forms with XAML | c#|xaml|listview|xamarin | 0 | 71 | 2 | 72,907,048 | 72,907,048 | 0 | true | 2022-07-07T12:40:39.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I select an item in a ListView in Xamarin.Forms with XAML<p>I am currently trying to select an item in a ListView in Xamarin.Forms with XAML. When I ... |
72,796,495 | Flutter Tab bar can't take all space<p>I want to make a custom tab widget and set a list of this widgets to a tab bar. But tab bar can't take all space and some space will remain. I try to wrap it with PreferredSize but it doesn't work .
The tab bar (ScrollTabBar) :</p>
<pre><code>Widget build(BuildContext context) {
... | <p>To make the <a href="https://api.flutter.dev/flutter/material/TabBar-class.html" rel="nofollow noreferrer">TabBar</a> use the maximum width of the screen you should remove the <a href="https://api.flutter.dev/flutter/material/TabBar/isScrollable.html" rel="nofollow noreferrer">isScrollable</a> property or set it to ... | Flutter Tab bar can't take all space | flutter|tabs|stack|space|tabbar | 2 | 71 | 2 | 72,798,829 | 72,798,829 | 0 | true | 2022-06-29T06:05:07.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter Tab bar can't take all space<p>I want to make a custom tab widget and set a list of this widgets to a tab bar. But tab bar can't take all space and s... |
72,922,864 | How to write nested loop and avoid that it overwrites data?<h2>I don't get it</h2>
<p>Hi all,
I'm trying to get the recent tweets from multiple users.
There for i created a nested Loop, but my problem is that it overwrites "berlintweets".
So the Loop works, but it should add the data instead of overwriting it... | <p>It should be possible to append to <code>berlintweet</code>, just as you append to your other lists, such as <code>tweet_id_list</code>:</p>
<pre><code> page = tweepy.Paginator(
client.get_users_tweets,
id=user_name,
exclude=["replies", "retweets"],
tweet_fie... | How to write nested loop and avoid that it overwrites data? | python|pandas|for-loop|nested-loops|tweepy | 0 | 71 | 1 | 72,922,954 | 72,922,954 | 0 | true | 2022-07-09T16:03:08.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to write nested loop and avoid that it overwrites data?<h2>I don't get it</h2>
<p>Hi all,
I'm trying to get the recent tweets from multiple users.
There ... |
72,893,489 | Linux socket use SO_BINDTODEVICE but with specified IP address<p>I got a program which does</p>
<pre><code> ...
/* Only rx/tx packets on the interface */
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name))) {
...
}
...
</code></pre>
<p>for each given ethernet interface and use... | <p>You can't bind a socket to an interface and an IP at the same time, only one or the other. If an interface is bound, its IP gets used. If an IP is bound, its interface gets used.</p>
<p>And, you can't use <code>bind()</code> to set a source IP that does not belong to the bound interface.</p>
<p>On some platforms (Li... | Linux socket use SO_BINDTODEVICE but with specified IP address | c|linux|sockets|networking | -1 | 71 | 2 | 72,905,767 | 72,905,767 | 0 | true | 2022-07-07T06:58:15.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Linux socket use SO_BINDTODEVICE but with specified IP address<p>I got a program which does</p>
<pre><code> ...
/* Only rx/tx packets on the interface... |
72,965,922 | How to persuade the React/MUI Theme Engine to namespace all MUI CSS rules?<p>We've got a problem with React Apps, imported as microfrontends. A Landingpage (written in React/MUI) imports a number of Apps (written in React/MUI v4 or v5, also need to be able to run standalone, therefore they have their own themes). The p... | <p>We now did find a solution to our problem. Its slightly different to our first idea outlined in the question.</p>
<p>This solution puts a namespace/scope on all MUI CSS classes. Per default, all MUI elements have classes like:</p>
<pre><code><div class="MuiGrid-container"></div>
</code></pre>
<... | How to persuade the React/MUI Theme Engine to namespace all MUI CSS rules? | css|reactjs|material-ui|themes | 0 | 71 | 2 | 72,993,680 | 72,993,680 | 0 | true | 2022-07-13T11:59:35.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to persuade the React/MUI Theme Engine to namespace all MUI CSS rules?<p>We've got a problem with React Apps, imported as microfrontends. A Landingpage (... |
72,895,274 | How can I display matplotlib figure on Sense Hat 8x8 LED Matrix<p>I am fetching two variables from a website and taking four instances of each like as I have shown below</p>
<pre><code>Date a
x 180
y 16.57
Date b
x 140.17
y 149
Date c
x 254.71
y 200
Date d
x 248.42
y 168
</code></pre>
<p>Next I am trying to disp... | <p>You can make an 8x8 png by:</p>
<pre><code>import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure(dpi=100, figsize=(8/100, 8/100))
ax = fig.add_axes([0, 0, 1, 1])
ax.plot(np.arange(10), linewidth=0.12)
ax.axis('off')
fig.savefig('Test8x8.png', dpi=100)
</code></pre>
<p>you will probably want to change t... | How can I display matplotlib figure on Sense Hat 8x8 LED Matrix | python|matplotlib|raspberry-pi|led | 1 | 71 | 1 | 72,896,557 | 72,896,557 | 0 | true | 2022-07-07T09:19:02.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I display matplotlib figure on Sense Hat 8x8 LED Matrix<p>I am fetching two variables from a website and taking four instances of each like as I have... |
72,787,235 | python int object is not iterable<p>I am trying to find a duplicate number in the python program, but I am getting an error int object is not iterable</p>
<pre><code>class Solution:
def duplicates(self, arr, n):
for i in arr:
a = arr.count(i)
if a >= 2:
return i
else:
ret... | <p><strong>Note:</strong> I'm assuming this is a programming exercise. This is by far not the most efficient nor the fastest-to-code way to figure out if there are duplicate items in a list.</p>
<p>The error occurs in this for loop:</p>
<pre><code>res = Solution().duplicates(arr, n)
for i in res:
print(i,end="... | python int object is not iterable | python|arrays|object|duplicates|integer | 0 | 71 | 1 | 72,821,482 | 72,821,482 | 0 | true | 2022-06-28T13:22:53.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python int object is not iterable<p>I am trying to find a duplicate number in the python program, but I am getting an error int object is not iterable</p>
<p... |
72,981,929 | Trying to Build a Sandwich Making Simulator<p>First time using Stackoverflow.</p>
<p>I'm a total noob with <strong>Python</strong> so I need a little help. I'm trying to make a choice based text adventure game and in the middle of it is going to be a sandwich making simulator <em>(don't ask how my mind works)</em> and ... | <p>Is better to put the list of ingredients in a dictionary, so you can easily add or substract ingredients, and you have a relation between the number and the ingredient.</p>
<p>Strip is a function call, so it has to be written .strip()</p>
<p>Is better to not add the response directly to the set of ingredients, becau... | Trying to Build a Sandwich Making Simulator | python | 0 | 71 | 1 | 72,982,739 | 72,982,739 | 0 | true | 2022-07-14T14:10:37.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to Build a Sandwich Making Simulator<p>First time using Stackoverflow.</p>
<p>I'm a total noob with <strong>Python</strong> so I need a little help. I... |
72,989,764 | How to update a single post in an array of posts<p>How do I give a rating for a single post but not have to refetch all the posts.</p>
<p>Currently I have an array of posts that I map through. I am giving a rating for one post but have to refetch all the posts each time. Is there a way to only refetch the post I am giv... | <p>If you want to trigger re-render you could declare the <code>likePost</code> function in the parent component and pass it to the <code>Post</code> component as a prop.<br>
Doing this, you will be able to access the <code>setPosts</code> method and trigger re-render.</p>
<p>In the parent component:</p>
<pre><code> ... | How to update a single post in an array of posts | javascript|reactjs|mongodb | 0 | 71 | 2 | 72,990,473 | 72,990,473 | 0 | true | 2022-07-15T06:18:50.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update a single post in an array of posts<p>How do I give a rating for a single post but not have to refetch all the posts.</p>
<p>Currently I have an... |
72,995,014 | Visual Studio Code: Incremental numbers at different position in hex and other forms<p>I am looking for a method where I place cursors at different positions, and then place numbers at those positions in hex form such that numbers are ranging from 8 to 10, in two digit format, as following:</p>
<pre><code>case_
case_
c... | <p>With extension <a href="https://marketplace.visualstudio.com/items?itemName=rioj7.regex-text-gen" rel="nofollow noreferrer">Regex Text Generator</a> v1.13.0 you can generate numbers in any radix (2..36).</p>
<p>It is handy to define the setting:</p>
<pre><code> "regexTextGen.predefined": {
"Gener... | Visual Studio Code: Incremental numbers at different position in hex and other forms | visual-studio-code | 0 | 71 | 2 | 72,996,964 | 72,996,964 | 0 | true | 2022-07-15T13:46:05.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Visual Studio Code: Incremental numbers at different position in hex and other forms<p>I am looking for a method where I place cursors at different positions... |
72,873,234 | Why java member variable initialization can use “this ” keyword<p>When I read spring source code, class "AbstractApplicationContext" has a field:</p>
<pre><code>private String id = ObjectUtils.identityToString(this);
</code></pre>
<p>I have a doubt, method <code>identityToString(this)</code> is executed befor... | <p>There are different stages in class loading and object instantiating. Let's look at the latter, because this is interesting for you.</p>
<p>The following steps are executed:</p>
<ol>
<li>A memory area is allocated for the object. It has a reference, it will be associated with the newly created object. It is the <cod... | Why java member variable initialization can use “this ” keyword | java | 0 | 71 | 1 | 72,873,387 | 72,873,387 | 0 | true | 2022-07-05T17:12:12.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why java member variable initialization can use “this ” keyword<p>When I read spring source code, class "AbstractApplicationContext" has a field:</... |
72,864,040 | how use shareReplay(1) in angular?<p><a href="https://i.stack.imgur.com/qMV73.jpg" rel="nofollow noreferrer">picture of error</a>I have Error when use shareReplay(1) in angular13
my code is</p>
<pre><code>import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import ... | <p>Problem is likely coming as well from the import, it should be :
<code>import { shareReplay } from 'rxjs/operators';</code></p>
<p>Here is an example working:
<a href="https://stackblitz.com/edit/angular-ivy-rzbd1v?file=src/app/app.service.ts" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-ivy-rzbd1v?... | how use shareReplay(1) in angular? | javascript|angular|rxjs|httprequest|rxjs6 | 0 | 71 | 1 | 72,864,162 | 72,864,162 | 0 | true | 2022-07-05T04:32:17.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how use shareReplay(1) in angular?<p><a href="https://i.stack.imgur.com/qMV73.jpg" rel="nofollow noreferrer">picture of error</a>I have Error when use shareR... |
72,838,572 | How can I force only two selection out of 5 available on slicer visual?<p>Can someone please help me get a fix for this please.</p>
<p><a href="https://i.stack.imgur.com/zbmT5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zbmT5.png" alt="enter image description here" /></a></p>
<p>I want to let peo... | <p>This would be a feature of a slicer visual, but I don't know of any built-in or custom slicer visual that does this.</p>
<p>As a workaround you can show a warning and instruction to select two items, eg a big Card visual with red text and a transparent background in front of your other visuals displaying a measure l... | How can I force only two selection out of 5 available on slicer visual? | powerbi|dax|powerquery|powerbi-desktop | 0 | 71 | 2 | 72,839,315 | 72,839,315 | 0 | true | 2022-07-02T11:09:00.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I force only two selection out of 5 available on slicer visual?<p>Can someone please help me get a fix for this please.</p>
<p><a href="https://i.sta... |
72,904,345 | Databricks - Writing CSV as a Parquet folder even when specified as a CSV file<p>I have some code performing some ETL which is working perfectly fine with Databricks. However I have a colleague who wants the data in a CSV format so they can ingest the information into their local SQL database.</p>
<p>Currently I write ... | <ul>
<li><p>Using Pyspark <code>DataFrame.write()</code> <strong>always creates a folder</strong> and within are the required files. Your data (when large) is often repartitioned and written as multiple files inside this folder and these are called <code>part files</code>.</p>
</li>
<li><p>So, to write data as a single... | Databricks - Writing CSV as a Parquet folder even when specified as a CSV file | python|pyspark|azure-databricks | 0 | 71 | 1 | 72,905,626 | 72,905,626 | 0 | true | 2022-07-07T21:18:55.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Databricks - Writing CSV as a Parquet folder even when specified as a CSV file<p>I have some code performing some ETL which is working perfectly fine with Da... |
72,984,193 | Airflow Elasticsearch Provider doesn't work with HTTPS schema<p>When creating a new connection in Airflow 2.3.3 with the elasticsearch 7.17.2 provider the 'test' is never successful when using https, but if enable HTTP access to my elastic cluster it works fine. I added the root CA cert to the the docker containers via... | <p>You can install the pre-release version (4.1.0rc1) of the elasticsearch provider which allows an <code>es_conn_args</code> option that can be used to configure the location of the CA certificate for secure connections to Elastic search.</p>
<pre class="lang-py prettyprint-override"><code>import certifi
from airflow.... | Airflow Elasticsearch Provider doesn't work with HTTPS schema | docker|elasticsearch|airflow | 0 | 71 | 1 | 72,986,491 | 72,986,491 | 0 | true | 2022-07-14T17:00:45.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Airflow Elasticsearch Provider doesn't work with HTTPS schema<p>When creating a new connection in Airflow 2.3.3 with the elasticsearch 7.17.2 provider the 't... |
72,769,629 | JQuery expand and collapse row div<p>I ve a div based table which is loading data dynamically in rows. I m trying to apply Expand and Collapse feature to make view more user friendly and easy to ready which is required.</p>
<p>But i am having some issue. Onclicking Black row which contains New, Confirm etc hide only 1s... | <p>It's because <code>$content = $header.next();</code> targets only first next sibling, not all of them.</p>
<p>I would suggest re-structure your HTML, so that header and content would be wrapped together by <code>.pointer</code></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-bab... | JQuery expand and collapse row div | html|jquery|css | 0 | 71 | 2 | 72,769,942 | 72,769,942 | 0 | true | 2022-06-27T09:14:17.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JQuery expand and collapse row div<p>I ve a div based table which is loading data dynamically in rows. I m trying to apply Expand and Collapse feature to mak... |
72,782,219 | how to convert python requests http to flutter?<p><a href="https://i.stack.imgur.com/WBBKM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WBBKM.jpg" alt="enter image description here" /></a>
In python, this code is running and get response like screen shot.</p>
<p>I need this code in flutter. so i w... | <p>It seems that the api end point only accepts data in the <code>multipart/formdata</code> format.</p>
<pre><code>import 'dart:covert';
...
String paramList = json.encode({
"MethodName": "GetPlaySequence",
"channelType": "HO",
"osType": "W",
... | how to convert python requests http to flutter? | python|flutter|http | 0 | 71 | 1 | 72,782,482 | 72,782,482 | 0 | true | 2022-06-28T07:20:20.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to convert python requests http to flutter?<p><a href="https://i.stack.imgur.com/WBBKM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com... |
72,963,272 | How do I properly create a Library in Java?<p>I have just created a library that will store and add elements into Hashmap.
I have generated a jar file , and placed it into the Desktop. How can i use my library and work with it , i have already placed it into library folder , but what next, how can i work with it ?
any... | <p>A library is essentially an extension to your codebase. Any classes that you add to it would be accessible in the rest of the project, where it was imported.</p>
<p>Simply, Create your class, as you normally would in your main file, then just copy it over to your library file. Name the class the same as the file, to... | How do I properly create a Library in Java? | java|lib | -1 | 71 | 1 | 72,963,862 | 72,963,862 | 0 | true | 2022-07-13T08:41:03.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I properly create a Library in Java?<p>I have just created a library that will store and add elements into Hashmap.
I have generated a jar file , and ... |
72,876,932 | How to convert swagger.json to openapi3 spec<p>I'm looking for a solution of converting swagger.json (generated by swagger2) to openapi3 json file in my CI/CD process (Git Actions).</p>
<p>I'm doing my job with Java, and I found some ways like:</p>
<ol>
<li>Swagger inspector -> I guess it works in web env only.</li>... | <p>Renew) I solved it completely, with using Swagger-parser</p>
<p><a href="https://github.com/swagger-api/swagger-parser" rel="nofollow noreferrer">https://github.com/swagger-api/swagger-parser</a></p>
<p>example code is here:</p>
<pre><code>@Test
public void parsingTest() throws Exception {
String outputDir = Sys... | How to convert swagger.json to openapi3 spec | swagger | 0 | 71 | 1 | 72,878,887 | 72,878,887 | 0 | true | 2022-07-06T00:59:55.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert swagger.json to openapi3 spec<p>I'm looking for a solution of converting swagger.json (generated by swagger2) to openapi3 json file in my CI/C... |
72,769,342 | How to use Lambda function in Android<p>In my application I have <code>RecyclerView</code> adapter and I want when <strong>click</strong> on Items, send some data to parent.<br>
I want send <strong>model</strong> and <strong>string</strong>.<br>
I write below codes, but after use show me error and I can't use this!<br>... | <p>If you need access to both the objects i.e. <code>NoteEntity</code> & the <code>String</code> in the same listener, use like this :</p>
<pre class="lang-kotlin prettyprint-override"><code>private var onItemClickListener: ((UserEntity, String) -> Unit)? = null
fun setOnItemClickListener(listener: (UserEntity,... | How to use Lambda function in Android | android|kotlin|lambda | 0 | 71 | 1 | 72,769,514 | 72,769,514 | 1 | true | 2022-06-27T08:50:01.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use Lambda function in Android<p>In my application I have <code>RecyclerView</code> adapter and I want when <strong>click</strong> on Items, send some... |
72,771,202 | How to Remove Column from Laravel Collection variable<p>I am trying to move values from temp table to main table after approval.</p>
<p>But, I don't have status, cancelled, and cancelled by columns in main table it's only available in the temp table. So, if I try to move all the fields from temp table to main table, it... | <p>You must <code>unset()</code> the key you want to remove. In your case you must do</p>
<pre><code>unset($mpd->cancelledby);
</code></pre>
<p>And it should be removed from the collection.</p> | How to Remove Column from Laravel Collection variable | php|laravel | -1 | 71 | 2 | 72,771,447 | 72,771,447 | 1 | true | 2022-06-27T11:17:49.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Remove Column from Laravel Collection variable<p>I am trying to move values from temp table to main table after approval.</p>
<p>But, I don't have sta... |
72,780,596 | How to turn dictionary values into lists?<p>I keep searching for the answer to this but I can't find it. Forewarning I'm new to Python so apologies in advance for noobiness :D.</p>
<p>Here's the dictionary I have:</p>
<pre><code>dict = {'test_key': 'test_value', 'test_key2': 'test_value2'}
</code></pre>
<p>And here's t... | <p>You can loop through the items of the dictionary and assign them lists.</p>
<pre><code>for key, value in dict.items():
dict[ key ] = [ value ]
</code></pre> | How to turn dictionary values into lists? | python|list|dictionary | 0 | 71 | 4 | 72,780,618 | 72,780,618 | 1 | true | 2022-06-28T03:58:11.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to turn dictionary values into lists?<p>I keep searching for the answer to this but I can't find it. Forewarning I'm new to Python so apologies in advanc... |
72,782,903 | Is there a way to stop Event Grid from emitting empty records in Azure Data explorer?<p>I am seeing multiple ingestion failures in our ADX, as most of our parquet files in data lake are empty.</p>
<p><strong>Error</strong>: BadRequest_InvalidBlob: BadRequest_NoRecordsOrWrongFormat</p>
<p>Event grid is configured with e... | <p>If you can't control the way your blobs are written (or your architecture), you can filter the events in the EventGrid by the size of the blobs.</p>
<p>If your event is:</p>
<pre><code>[{
"topic": "/subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my... | Is there a way to stop Event Grid from emitting empty records in Azure Data explorer? | azure-data-explorer|azure-eventgrid | 0 | 71 | 2 | 72,784,704 | 72,784,704 | 1 | true | 2022-06-28T08:11:11.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to stop Event Grid from emitting empty records in Azure Data explorer?<p>I am seeing multiple ingestion failures in our ADX, as most of our pa... |
72,788,914 | how do I display different data by clicking two buttons in react?<p>I have a layout with two buttons. I want to be able to click on each button to display its content. Also each button should be a toggle to either display the contents or not.</p>
<pre><code>
function Update() {
const [showFirst, setShowFirst] = us... | <p>You seem to trying the following.</p>
<pre><code>function Update() {
const [showFirst, setShowFirst] = useState(false);
const [showSecond, setShowSecond] = useState(false);
return (
<Wrapper>
<main>
<h3>CHANGE FACILITY</h3>
... | how do I display different data by clicking two buttons in react? | reactjs|react-hooks | 1 | 71 | 2 | 72,790,060 | 72,790,060 | 1 | true | 2022-06-28T15:05:33.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how do I display different data by clicking two buttons in react?<p>I have a layout with two buttons. I want to be able to click on each button to display it... |
72,787,512 | Attempt to trickshoot for building a Select Expression using reflection<p>I'm trying to build a select expression in reflection from string. My beginning is good and my select expression is built correctly from this source:</p>
<pre><code>Type entityType = Type.GetType("NameSpacePath.MyEntity");
ParameterExpr... | <p>You can simply use <code>Install-Package System.Linq.Dynamic.Core</code></p>
<pre><code>Type entityType = Type.GetType("NameSpacePath.MyEntity");
ParameterExpression xParameter = Expression.Parameter(entityType, "x");
LambdaExpression e = DynamicExpressionParser.ParseLambda(
new Parameter... | Attempt to trickshoot for building a Select Expression using reflection | c#|.net-core|lambda|reflection|expression | 1 | 71 | 2 | 72,790,272 | 72,790,272 | 1 | true | 2022-06-28T13:40:27.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Attempt to trickshoot for building a Select Expression using reflection<p>I'm trying to build a select expression in reflection from string. My beginning is ... |
73,007,409 | Freezegun's freeze_time throws odd transformers error when used<p>I have a test that seems to throw an odd error when <code>freeze_time</code> is called. Reading the stacktrace, it's most likely interacting with another dependency in an odd way, but I don't have enough experience with python to understand what the prob... | <p>This is what I needed to add to fix this problem:</p>
<p><code>freezegun.configure(extend_ignore_list=['transformers'])</code></p>
<p>If anyone could explain why this was needed, I would appreciate it.</p> | Freezegun's freeze_time throws odd transformers error when used | pytest|freezegun | 0 | 71 | 1 | 73,614,538 | 73,614,538 | 0 | true | 2022-07-16T20:20:09.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Freezegun's freeze_time throws odd transformers error when used<p>I have a test that seems to throw an odd error when <code>freeze_time</code> is called. Rea... |
72,912,747 | AWS SAM Accelerate fails to resolve dependencies when building application<p>I'm trying to use <a href="https://aws.amazon.com/blogs/compute/accelerating-serverless-development-with-aws-sam-accelerate/" rel="nofollow noreferrer">SAM Accelerate</a> as recommended by AWS. However, the <code>sam sync</code> command is fai... | <p>Unfortunately no one was able to assist here, so I opened an <a href="https://github.com/aws/aws-sam-cli/issues/4054" rel="nofollow noreferrer">issue on GitHub</a>.</p>
<p>Eventually the issue became clear and it's not actually an issue with SAM. The problem is that I use an AWS BuildArtifact feed, so any <code>sam ... | AWS SAM Accelerate fails to resolve dependencies when building application | amazon-web-services|aws-sam|requirements.txt|aws-sam-cli | 0 | 71 | 1 | 73,699,704 | 73,699,704 | 0 | true | 2022-07-08T14:16:24.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AWS SAM Accelerate fails to resolve dependencies when building application<p>I'm trying to use <a href="https://aws.amazon.com/blogs/compute/accelerating-ser... |
72,959,215 | How to find the Build Bundles ID with Appstore Connect APIs<p>Need to get the size of the build using appstore connect API call.
Trying to find the what exactly is the ID mentioned here in the below endpoint.</p>
<p><a href="https://developer.apple.com/documentation/appstoreconnectapi/list_all_file_sizes_for_a_build_bu... | <p>I found the solution.</p>
<h3>first</h3>
<p>you need get the builds detail from <code>https://developer.apple.com/documentation/appstoreconnectapi/list_builds</code></p>
<p>and the most important is the parameters <code> "include": "buildBundles"</code></p>
<p>the you can find the response includ... | How to find the Build Bundles ID with Appstore Connect APIs | ios|swift|app-store-connect|testflight|fastlane | 2 | 71 | 1 | 73,582,689 | 73,582,689 | 1 | true | 2022-07-12T23:03:01.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find the Build Bundles ID with Appstore Connect APIs<p>Need to get the size of the build using appstore connect API call.
Trying to find the what exac... |
72,935,615 | CycleErrors in graphlib<p>I'm currently learning the <a href="https://docs.python.org/3/library/graphlib.html" rel="nofollow noreferrer">graphlib</a> of python 3.9.
And I want to generate a CycleError but when I run the following code:</p>
<pre><code>#!/usr/bin/python3
from graphlib import TopologicalSorter
ts = Topol... | <p><code>TopologicalSorter.static_order()</code> is generator; function body contains <code>yield</code> statement, then the return value of function call is iterator.</p>
<p>Function body won't executed at all before very first attempt of extracting element from the iterator.</p> | CycleErrors in graphlib | python-3.x|exception|error-handling|topological-sort | 0 | 71 | 1 | 73,823,148 | 73,823,148 | 1 | true | 2022-07-11T08:23:30.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CycleErrors in graphlib<p>I'm currently learning the <a href="https://docs.python.org/3/library/graphlib.html" rel="nofollow noreferrer">graphlib</a> of pyth... |
72,250,323 | show values of lollipop-chart<p>Im new to visualizing data and im trying to make a lollipop-chart just as this one:
<a href="https://stats.stackexchange.com/questions/423735/what-is-the-name-of-this-plot-that-has-rows-with-two-connected-dots/423861#423861">https://stats.stackexchange.com/questions/423735/what-is-the-na... | <pre><code>import matplotlib.pyplot as plt
x3 = ["Alter: 0-29","Alter: 30-59","Alter: 60+"]
y3_new =[20, 44, 34]
y2_new =[13, 43, 43]
plt.figure()
plt.hlines(y=x3, xmin = y3_new , xmax = y2_new, color='skyblue', alpha=0.4)
plt.scatter(y2_new, x3, color='#0096d7', s=50, label='Jazzmusiker... | show values of lollipop-chart | python|matplotlib|data-visualization | 0 | 71 | 1 | 72,256,361 | 72,256,361 | 0 | true | 2022-05-15T16:51:41.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
show values of lollipop-chart<p>Im new to visualizing data and im trying to make a lollipop-chart just as this one:
<a href="https://stats.stackexchange.com/... |
72,264,756 | How to sending email in C# without entering password?<p>How do you send an email without entering a password?</p>
<p>I made this:</p>
<pre><code>client.Port = 587;
client.Host = "smtp.gmail.com";
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = true;
client.EnableSsl = true;
... | <blockquote>
<p>Is it possible to send an email to Gmail without an authorization?</p>
</blockquote>
<p>No</p>
<blockquote>
<p>If not, are there any better alternatives?</p>
</blockquote>
<p>As Mason mentions in the comments, the main alternatives are:</p>
<ol>
<li>Use a mailto-link to open the users default email prog... | How to sending email in C# without entering password? | c# | -1 | 71 | 1 | 72,265,478 | 72,265,478 | 0 | true | 2022-05-16T19:41:37.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to sending email in C# without entering password?<p>How do you send an email without entering a password?</p>
<p>I made this:</p>
<pre><code>client.Port ... |
72,267,744 | Delay in useEffect setting the setState value<p>I have this component that renders the number of people that liked the book, however I cant get consistent result in my states.</p>
<p>Heres my code:</p>
<pre><code>
///this is for getting the book details
const {id} = useParams();
const dispatch = useDispatch();
con... | <p>Have you tried using setTimeout?</p>
<pre><code>useEffect( () => {
const tmr = setTimeout( () => {
const bookData = { id: id }
dispatch( openBook(bookData) )
}, 500)
return () => clearTimeout(tmr);
}, [])
useEffect( () => {
const tmr = setTimeout( () => {
if (openbook.noOfLikes... | Delay in useEffect setting the setState value | javascript|reactjs | 1 | 71 | 3 | 72,268,928 | 72,268,928 | 0 | true | 2022-05-17T03:04:05.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Delay in useEffect setting the setState value<p>I have this component that renders the number of people that liked the book, however I cant get consistent re... |
72,273,903 | How to insert a row into a table with a composite foreign key referencing a composite primary key<p>I have a table called BB:</p>
<pre><code>CREATE TABLE BB (
SID INTEGER PRIMARY KEY,
FName TEXT,
LName TEXT
);
</code></pre>
<p>And a table called QR that contains a composite foreign key referencing the FName... | <p>The problem with your code is that the combination of <code>FName</code> and <code>LName</code> of the parent table <code>BB</code> is not defined as <code>UNIQUE</code>.<br/>
With this change:</p>
<pre><code>CREATE TABLE BB (
SID INTEGER PRIMARY KEY,
FName TEXT,
LName TEXT,
UNIQUE(FName, LName)
);
... | How to insert a row into a table with a composite foreign key referencing a composite primary key | sql|sqlite|foreign-keys|sql-insert|db-browser-sqlite | 1 | 71 | 1 | 72,274,103 | 72,274,103 | 0 | true | 2022-05-17T12:16:46.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to insert a row into a table with a composite foreign key referencing a composite primary key<p>I have a table called BB:</p>
<pre><code>CREATE TABLE BB ... |
72,269,854 | Google Maps shortened street names and addresses causing for unreliable code<p><strong>PHP Version 7.4</strong></p>
<p>I am currently working on a small php program to take certain shipments and optimize the order of them to the most efficient route. So far so good, it works with the google maps api the following way:<... | <p>After trying for a while and asking some friends I arrived at the solution of using the <a href="https://www.placekey.io/blog/fuzzy-logic-address-matching" rel="nofollow noreferrer">fuzzy logic to match addresses</a>. Luckily there is already an implementation of a method of this logic which is called <code>levensht... | Google Maps shortened street names and addresses causing for unreliable code | php|curl|google-maps-api-3 | 0 | 71 | 1 | 72,274,799 | 72,274,799 | 0 | true | 2022-05-17T07:32:18.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google Maps shortened street names and addresses causing for unreliable code<p><strong>PHP Version 7.4</strong></p>
<p>I am currently working on a small php ... |
72,274,442 | OpenACC: reduction operation on arrays<p>Is it possible to use the reduction operation "or" on the static array <code>flag[nx3_tot][nx2_tot][nx1_tot]</code> ?
here <code>FLAG_HLL=4</code> and <code>FLAG_MINMOD=1</code>. Without the reduction the results of this function running with or without OpenACC are dif... | <p>I wouldn't recommend using reductions in this case. Each thread would need it's own private copy of the array which would be quite a bit of memory given it's 3D, plus there's the overhead of performing the final reduction.</p>
<p>Instead, I'd recommend using atomic operations. Since there will very few collisions ... | OpenACC: reduction operation on arrays | openacc | 0 | 71 | 1 | 72,277,190 | 72,277,190 | 0 | true | 2022-05-17T12:54:19.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OpenACC: reduction operation on arrays<p>Is it possible to use the reduction operation "or" on the static array <code>flag[nx3_tot][nx2_tot][nx1_to... |
72,267,112 | Aframe camera disconnects from rig when page is loaded<p>I am new to Aframe and I came to one problem which I cant solve. When my Glitch page is loaded, the camera sometimes somehow disconnects from rig (player) head. I was looking for what could possibly cause this problem and I only saw this happening when I added re... | <p>You're probably hitting <a href="https://github.com/aframevr/aframe/issues/3921" rel="nofollow noreferrer">this issue</a>, where <code><template></code> or <code><script></code> tags between the <code><a-scene></code> and the <code>camera</code> entity interfere with the intended behaviour.</p>
<p>... | Aframe camera disconnects from rig when page is loaded | javascript|aframe | 1 | 71 | 1 | 72,279,385 | 72,279,385 | 0 | true | 2022-05-17T00:57:53.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Aframe camera disconnects from rig when page is loaded<p>I am new to Aframe and I came to one problem which I cant solve. When my Glitch page is loaded, the ... |
72,283,706 | Python/ploty - How to reverse axis direction in a Parallel Coordinates plot?<p>I'm trying to make a Parallel Coordinates plot with plotly.graph_objs
Here is my code.</p>
<pre><code>'''
import plotly.graph_objs as go
layout = go.Layout( autosize=False, width=800, height=600)
fig = go.Figure(data =
go.Parcoords(
... | <p>If I understood correctly you could just reverse the <code>range</code> parameter:</p>
<pre><code>import plotly.graph_objs as go
layout = go.Layout( autosize=False, width=800, height=600)
fig = go.Figure(data =
go.Parcoords(
# Reversed ranges.
dimensions = list([
dict(range = [9, 1],... | Python/ploty - How to reverse axis direction in a Parallel Coordinates plot? | python|plotly|reverse|axis|parallel-coordinates | 2 | 71 | 1 | 72,283,856 | 72,283,856 | 0 | true | 2022-05-18T05:38:05.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python/ploty - How to reverse axis direction in a Parallel Coordinates plot?<p>I'm trying to make a Parallel Coordinates plot with plotly.graph_objs
Here is ... |
72,276,509 | Rearrange columns as per column headers - Run-time error 9: Subscript out of range<p>I want to rearrange columns as per column headers. I found the below macro on this platform.</p>
<p>I get the error at this line code.</p>
<pre><code>If cel.value=correctOrder(col - 1) Then
</code></pre>
<p>This is the error</p>
<block... | <p>The issue is when your <strong>Base</strong> worksheet has more than <strong>12</strong> columns.</p>
<p>For example if the worksheet has 13 columns.<br />
The <strong>lastCol</strong> variable is set to 13.<br />
It is passed into the <strong>col</strong> variable and when it reaches 13 and is used in <code>correct... | Rearrange columns as per column headers - Run-time error 9: Subscript out of range | excel|vba|vba7 | 0 | 71 | 1 | 72,286,296 | 72,286,296 | 0 | true | 2022-05-17T15:11:51.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rearrange columns as per column headers - Run-time error 9: Subscript out of range<p>I want to rearrange columns as per column headers. I found the below mac... |
72,288,041 | How to draw a line over image C#<p><a href="https://i.stack.imgur.com/XIV7e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XIV7e.png" alt="enter image description here" /></a>I have a PictureBox which display an image and I want to draw some lines on this image like this , and save it after the draw... | <p>The simplest option would be to use <a href="https://docs.microsoft.com/en-us/dotnet/api/system.drawing.graphics.fromimage?view=dotnet-plat-ext-6.0" rel="nofollow noreferrer">Graphics.FromImage</a>. I.e.</p>
<ol>
<li>Create a new bitmap</li>
<li>Create a graphics object</li>
<li>Draw the original image</li>
<li>Draw... | How to draw a line over image C# | c#|winforms | 1 | 71 | 1 | 72,288,436 | 72,288,436 | 0 | true | 2022-05-18T11:06:55.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to draw a line over image C#<p><a href="https://i.stack.imgur.com/XIV7e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XIV7e.png" alt... |
72,293,223 | When to use MassTransit IRequestClient and when IBus.Send<p>I'm using <code>MassTransit</code> with <code>MediatR</code> library.</p>
<p>in the controller I'm using mediator to send message</p>
<pre><code>List<Car> cars = await _mediator.Send(new GetCarDataQuery());
</code></pre>
<p>GetCarDataQuery will end up in... | <p>If you need a response, you should use <code>IRequestClient<T></code>.</p>
<p>If you need to fire-and-forget a message, use <code>Publish</code>.</p>
<p>The <a href="https://masstransit-project.com/usage/mediator.html" rel="nofollow noreferrer">MassTransit Mediator</a> is documented, and you can watch various ... | When to use MassTransit IRequestClient and when IBus.Send | .net-core|masstransit | 0 | 71 | 1 | 72,293,269 | 72,293,269 | 0 | true | 2022-05-18T16:59:43.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When to use MassTransit IRequestClient and when IBus.Send<p>I'm using <code>MassTransit</code> with <code>MediatR</code> library.</p>
<p>in the controller I'... |
72,242,973 | iText 7 - How to send to an API and receive/render on the other end<p>I am trying to send a PDF that will be created in memory from one API to another API which will then render it in an HTML page. Info about my technologies:</p>
<ul>
<li>Springboot</li>
<li>Microservices Architecture (with Eureka)</li>
<li>Java</li>
<... | <p>It seems I got my answer. Make sure you return in your controller that performs the conversions a <code>byte[]</code> or even better <code>ResponseEntity<byte[]></code>. Then, you should add headers to your request like so:</p>
<pre><code> return ResponseEntity.ok()
.header(headerKey, headerVal... | iText 7 - How to send to an API and receive/render on the other end | java|spring-boot|thymeleaf|microservices|itext7 | 0 | 71 | 1 | 72,296,743 | 72,296,743 | 0 | true | 2022-05-14T18:34:00.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
iText 7 - How to send to an API and receive/render on the other end<p>I am trying to send a PDF that will be created in memory from one API to another API wh... |
72,285,630 | crud operation with dynamic data with 3 level hierarchy in json file in asp .net core web api<p>I want to do get, post, put and delete in it using asp.net core Web API. But I should not use database to store the data instead I need to store the dynamic data in controller using method and also in json file list of user(... | <p>I create a sample demo for you, and I suggest you don't use json file.</p>
<p><strong>Why:</strong></p>
<ol>
<li><p>When you use json files, IO operations are required, and there will be a problem of exclusive use of files.</p>
</li>
<li><p>In addition, when adding, deleting, modifying and checking the content of th... | crud operation with dynamic data with 3 level hierarchy in json file in asp .net core web api | json|asp.net-core | 0 | 71 | 1 | 72,300,969 | 72,300,969 | 0 | true | 2022-05-18T08:26:10.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
crud operation with dynamic data with 3 level hierarchy in json file in asp .net core web api<p>I want to do get, post, put and delete in it using asp.net co... |
72,300,954 | Why do I need to click twice on the TouchableOpacity?<p>I want to create a button where if you click on it you copy the color of the said button.
But I need to click twice in order to copy my color (the first time I copy nothing)
Can someone help me or tell me where I made the error?
Here is my code :</p>
<pre><code> ... | <p>You need to do 2 things:</p>
<pre><code> <TouchableOpacity
onPress={() => {
setCouleur("#black");
}}
>
</code></pre>
<p>as well as add an UseEffect at the beggining:</p>
<pre><code> useEffect(() => {
if (couleur !== "") {
cop... | Why do I need to click twice on the TouchableOpacity? | reactjs|react-native|view|touchableopacity | 0 | 71 | 1 | 72,301,637 | 72,301,637 | 0 | true | 2022-05-19T08:15:47.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why do I need to click twice on the TouchableOpacity?<p>I want to create a button where if you click on it you copy the color of the said button.
But I need ... |
72,301,007 | Problem generate new component -> Angular cli<p>I have this problem ng generate app1/probangif An unhandled exception occurred: Schematic "app1/probangif" not found in collection "@ngrx/schematics"</p> | <p>you need to specify what you want to generate after 'generate':
ng generate module 'name of module'</p>
<p>or for a new project:</p>
<p>ng new 'name of project'</p>
<p>Learn to google stuff, you'll need to, everyone does. waiting for answers on stackoverflow hinders your ability to be productive. Cheers.</p> | Problem generate new component -> Angular cli | angular | -1 | 71 | 1 | 72,301,982 | 72,301,982 | 0 | true | 2022-05-19T08:19:07.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem generate new component -> Angular cli<p>I have this problem ng generate app1/probangif An unhandled exception occurred: Schematic "app1/probangi... |
72,275,664 | custom function for scatterplot in bokeh not running<p>dataset i am working on:
<a href="https://www.kaggle.com/code/gauravsahani/housing-in-london-for-beginners/data" rel="nofollow noreferrer">https://www.kaggle.com/code/gauravsahani/housing-in-london-for-beginners/data</a></p>
<p>i am using bokeh and have produced th... | <pre><code>def scatter(source,x,y,xlabel=None,ylabel=None,size=5,alpha=1,legend_field=str(None),fill_color=None):
p=figure(sizing_mode='stretch_width',
toolbar_location=None,
height=500,
x_axis_label=xlabel,
y_axis_label=ylabel)
p.xgrid.grid_line_color=None
p.xaxis.formatter = BasicTickF... | custom function for scatterplot in bokeh not running | python|pandas|bokeh|scatter-plot|scatter | 0 | 71 | 1 | 72,302,061 | 72,302,061 | 0 | true | 2022-05-17T14:16:23.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
custom function for scatterplot in bokeh not running<p>dataset i am working on:
<a href="https://www.kaggle.com/code/gauravsahani/housing-in-london-for-begin... |
72,304,478 | Get individual sentences from TF-IDF<p>so I used tf-idf on a bunch of sentence, but now I would like to get the TF-IDF vector for an individual sentence back. This is my code. How do I now get the first item in the text matrix?</p>
<pre><code>tfidf = TfidfVectorizer(
min_df = 5,
max_df = 0.95,
max_features = 8000
)
tf... | <p>You have already called fit with <code>tfidf.fit(df_m_a['text_final'])</code>. Hence the variable <code>tfidf</code> contains the TF-IDF vectorizer, with the last part of code <code>text = tfidf.transform(df_m_a['text_final'])</code> you will get the transformed vector, you should get what you want with <code>text[0... | Get individual sentences from TF-IDF | python|tf-idf | 0 | 71 | 1 | 72,304,621 | 72,304,621 | 0 | true | 2022-05-19T12:23:48.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get individual sentences from TF-IDF<p>so I used tf-idf on a bunch of sentence, but now I would like to get the TF-IDF vector for an individual sentence back... |
72,321,439 | Get the top value row of a table without id<p>So i have this table:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: center;"><strong>req_num</strong></th>
<th style="text-align: center;"><strong>number</strong></th>
<th style="text-align: center;"><strong>status</strong><... | <p>You can use <code>window</code> functions to accomplish this - you can partition your data by <code>req_num</code> and then take the item in each partition with the highest <code>order</code>.</p>
<p>The docs: <a href="https://dev.mysql.com/doc/refman/8.0/en/window-functions-frames.html" rel="nofollow noreferrer">ht... | Get the top value row of a table without id | mysql|greatest-n-per-group | 1 | 71 | 2 | 72,323,175 | 72,323,175 | 0 | true | 2022-05-20T15:30:32.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get the top value row of a table without id<p>So i have this table:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-... |
72,330,723 | Best practices for importing multiple components from react-bootstrap?<p>For performance reasons the <strong>React-Bootstrap</strong> documentation suggests importing individual components rather than the whole library. So:</p>
<pre class="lang-js prettyprint-override"><code>import Button from 'react-bootstrap/Button';... | <p>Just use named imports and tree shake not used code. For example with Create-React-App tree shaking is automatically configured. Then using</p>
<pre><code>import { Alert, Row, Col, ProgressBar, Popover, OverlayTrigger, Button, Badge } from 'react-bootstrap';
</code></pre>
<p>is in the end the same as</p>
<pre><code>... | Best practices for importing multiple components from react-bootstrap? | react-bootstrap | 1 | 71 | 1 | 72,331,005 | 72,331,005 | 0 | true | 2022-05-21T15:04:12.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best practices for importing multiple components from react-bootstrap?<p>For performance reasons the <strong>React-Bootstrap</strong> documentation suggests ... |
72,332,796 | get query value from url VueJs<p>I'm new vuejs learner and I want to get the query value from url to use it in the vue method as explained below.</p>
<p>This is the route:</p>
<pre><code>{
path: "/FetchData/:query?",
name: "FetchData",
component: FetchData,
}
</code></pre>
<p>And this is... | <p>if you're using vuejs 2 you can access query using: <code>this.$route.query</code> <br/>
but if you're using v3 it should be something like:</p>
<pre><code>import { useRoute } from 'vue-router'
import { computed } from 'vue';
export default {
setup() {
const route = useRoute()
return {
query: comp... | get query value from url VueJs | javascript|vue.js|asp.net-core | 0 | 71 | 1 | 72,334,024 | 72,334,024 | 0 | true | 2022-05-21T19:53:18.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
get query value from url VueJs<p>I'm new vuejs learner and I want to get the query value from url to use it in the vue method as explained below.</p>
<p>This... |
72,338,805 | checkbox in php with switch statement<p>Why deos it return 2 when I check both checkboxes? How can I return a different response when both checkboxes are turn on?</p>
<p>html:</p>
<pre><code><form action="form3.php" method="POST">
<fieldset>
<legend> select your team </legend... | <p>Use separate name attribute values for each checkbox and use if conditions instead of a switch (or use the radio button if you have required only one value) example:</p>
<p><strong>HTML:</strong></p>
<pre><code><form action="form3.php" method="POST">
<fieldset>
<legend> selec... | checkbox in php with switch statement | php|html|forms | 0 | 71 | 1 | 72,339,528 | 72,339,528 | 0 | true | 2022-05-22T15:11:23.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
checkbox in php with switch statement<p>Why deos it return 2 when I check both checkboxes? How can I return a different response when both checkboxes are tur... |
72,290,227 | Stale custom hook state property on callback<p>I have a custom hook in my React app that exposes a function (<code>hookFn</code>) to calculate a <code>value</code>. Once the value has been updated (state change, triggering useEffect), the hook alerts the app via a callback function. Here's the issue: in my callback fun... | <p>It turns out <code>hook.value</code> is stale because <code>hook</code> is stale when I access it from <code>hookCallback</code>. Each time there is a state change within my custom hook, <code>useCustomHook</code> will generate a new object.</p>
<p>The complex solution, then, is to to create a <code>ref</code> for <... | Stale custom hook state property on callback | reactjs|react-hooks | 0 | 71 | 1 | 72,349,128 | 72,349,128 | 0 | true | 2022-05-18T13:34:18.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Stale custom hook state property on callback<p>I have a custom hook in my React app that exposes a function (<code>hookFn</code>) to calculate a <code>value<... |
72,352,169 | java.lang.NoClassDefFoundError: com/datastax/spark/connector/ColumnSelector while building a jar<p>Am using maven project with spark, and a cassandra as a database.
Am able to execute the code with 0 error, and getting the result that I want, but I can't submit the project with the jar file:
here is my pom.xml :</p>
<p... | <p>You need either:</p>
<ol>
<li>create an <a href="https://maven.apache.org/plugins/maven-assembly-plugin/usage.html" rel="nofollow noreferrer">assembly jar</a> for your project that will include all dependencies (make sure you declare Spark dependencies as <code>provided</code>)</li>
<li>or specify Spark Cassandra Co... | java.lang.NoClassDefFoundError: com/datastax/spark/connector/ColumnSelector while building a jar | maven|apache-spark|cassandra|datastax|spark-cassandra-connector | 1 | 71 | 1 | 72,358,334 | 72,358,334 | 0 | true | 2022-05-23T16:52:31.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
java.lang.NoClassDefFoundError: com/datastax/spark/connector/ColumnSelector while building a jar<p>Am using maven project with spark, and a cassandra as a da... |
72,306,411 | MPI Domain Decomposition and Block Tridiagonal Matrix<p>I need some advice regarding how to build a block tri-diagonal matrix having decomposed a 2D domain with MPI.
Let me explain, I need to solve a heat diffusion like equation in 2D, and to do so I decomposed the domain in blocks with MPI using the virtual Cartesian ... | <p>Following the suggestion of Victor, I reordered the global indexing of my matrix following a "local" column major ordering.
Now the physical domain is mapped as:
<a href="https://i.stack.imgur.com/XIHES.png" rel="nofollow noreferrer">click</a>
where the 4 top left elements belong to the process with rank 0... | MPI Domain Decomposition and Block Tridiagonal Matrix | matrix|fortran|mpi | 0 | 71 | 2 | 72,360,903 | 72,360,903 | 0 | true | 2022-05-19T14:29:15.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MPI Domain Decomposition and Block Tridiagonal Matrix<p>I need some advice regarding how to build a block tri-diagonal matrix having decomposed a 2D domain w... |
72,346,288 | Copy a selection of files to a server using Azure Devops<p>I am trying to copy a <em>selection</em> of files to a destination folder on a target machine.</p>
<p>In my first version, I can already copy <em>all</em> files to the destination. Therefore, I use the following task to build an artifact.</p>
<pre><code> ste... | <p>The way I fixed it for now was</p>
<pre><code> - task: Bash@3
inputs:
targetType: 'inline'
script: "HN=$(hostname | head -c 3) \n cd /opt/myfolder/files/ \n rm -r $(ls -I \"$HN*.*\")"
</code></pre>
<p>It does its job, but I am open to mark ... | Copy a selection of files to a server using Azure Devops | azure-devops | 1 | 71 | 1 | 72,361,626 | 72,361,626 | 0 | true | 2022-05-23T09:34:56.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Copy a selection of files to a server using Azure Devops<p>I am trying to copy a <em>selection</em> of files to a destination folder on a target machine.</p>... |
72,362,840 | Why javascript 'if else' statement seems looping over<p>I am writing some javascript code called account register. The requirement is showing information inputted on the screen when clicked the register button, and each row can be deleted by clicking the delete button on the left.</p>
<p>My problem is when the first ti... | <p>Only one tuikaBtn.onclick is needed. Also no need of counter</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>document.getElementById("tuikaBtn").onclick = function() {
con... | Why javascript 'if else' statement seems looping over | javascript | 0 | 71 | 1 | 72,363,272 | 72,363,272 | 0 | true | 2022-05-24T12:24:06.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why javascript 'if else' statement seems looping over<p>I am writing some javascript code called account register. The requirement is showing information inp... |
72,371,122 | How to decode "state" request parameter sent by AWS Cognito?<p>A couple of months ago, I had been using the <code>state</code> request parameter that AWS Cognito sent when requesting <code>/authorize</code> of my authorization server. I had used it for sending extra information from AWS Cognito to my authorization serv... | <p>After some investigation, I figured out that Cognito sends state in the <code>STRING1.STRING2.STRING3</code> format. <code>String1</code> is encoded with <code>base64url</code>. After decoding <code>STRING1</code> from <code>base64url</code>, it turned out that it is a <code>gzip</code> binary. Unzipping that result... | How to decode "state" request parameter sent by AWS Cognito? | amazon-web-services|authorization|amazon-cognito | 0 | 71 | 1 | 72,371,549 | 72,371,549 | 0 | true | 2022-05-25T01:35:52.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to decode "state" request parameter sent by AWS Cognito?<p>A couple of months ago, I had been using the <code>state</code> request parameter that AWS Cog... |
72,369,144 | Iterate an array from json using jsoncpp<p>I have the following json:</p>
<pre class="lang-json prettyprint-override"><code>{
"laureates": [{
"id": "1",
"firstname": "Wilhelm Conrad",
"surname": "Röntgen",
"bo... | <blockquote>
<p>I can't realize how to iterate and show the values without hardcoded it.</p>
</blockquote>
<p>I think the problem is that you don't have a great handle on recursion or the key->value nature of JSON, because when you have an array like "prizes", you could have a nested Json object, such as a... | Iterate an array from json using jsoncpp | c++|json|jsoncpp | -1 | 71 | 1 | 72,371,888 | 72,371,888 | 0 | true | 2022-05-24T20:33:00.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Iterate an array from json using jsoncpp<p>I have the following json:</p>
<pre class="lang-json prettyprint-override"><code>{
"laureates": [{
... |
72,370,071 | MongoDb nodejs getting count of items belonging to each category<p>I have 2 collections, Items and Categories, and I'm trying to get a count of how many items are in each category.</p>
<p>An example of what each collection looks like is</p>
<pre><code>Item = [
{
name: "item1",
category: ObjectId("... | <p>You need to use two aggregation pipelines to achieve result you want.</p>
<pre class="lang-js prettyprint-override"><code>
Item.aggregate([
{
$group: {
_id: "$category", count: { $sum: 1}
}
}
])
</code></pre>
<p>In the result <code>_id</code> will be the id used to group fields which wi... | MongoDb nodejs getting count of items belonging to each category | node.js|mongodb|express|mongoose | 0 | 71 | 1 | 72,371,999 | 72,371,999 | 0 | true | 2022-05-24T22:22:24.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MongoDb nodejs getting count of items belonging to each category<p>I have 2 collections, Items and Categories, and I'm trying to get a count of how many item... |
72,365,023 | Angular - cannot use patchvalue for form editing<p>I am working on a form where I need to be able to edit the form entry once submitted.
As you will see in the code, the form works well, each entry appears well as a line below the form.
However, I cannot manage to modify each form entry. If I split the task, it would b... | <p>You can pass, futhermore the index the "whole" persona to your edititem function</p>
<pre><code><button mat-flat-button (click)="edititem(i,persona )" >
</code></pre>
<p>Then use a variable "indexEdited" -at last equal to -1, and change your function update like</p>
<pre><code>ind... | Angular - cannot use patchvalue for form editing | angular|typescript | 0 | 71 | 1 | 72,374,124 | 72,374,124 | 0 | true | 2022-05-24T14:49:24.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular - cannot use patchvalue for form editing<p>I am working on a form where I need to be able to edit the form entry once submitted.
As you will see in t... |
72,382,129 | Trying to generate a string that becomes a variable name in Freemarker or a "derived variable name"<p>I'm using a data-directive or list to pull in several values, of which, I don't know how many there will be, and I want to try and list through them, and create several variables in the list if you will.</p>
<pre><code... | <p>As FreeMarker can't assign to elements of collections (but you can <code>?map(it -> ...)</code> a collection to another), the only way is via <code>?interpret</code>:</p>
<pre><code><#list 1..10 as x>
<#-- the next line doesn't work, but what i'm trying to fix -->
<@'<#assign VAR${x?c} = rand(10... | Trying to generate a string that becomes a variable name in Freemarker or a "derived variable name" | freemarker|assign | 0 | 71 | 2 | 72,382,899 | 72,382,899 | 0 | true | 2022-05-25T17:43:59.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to generate a string that becomes a variable name in Freemarker or a "derived variable name"<p>I'm using a data-directive or list to pull in several v... |
72,385,727 | Creating a recursive function that removes odd digits of an integer<p>I just started working with recursive functions and I have to create a function that receives an integer and returns a new number that contains only the even digits. For example if it receives <code>23456</code>, it should return <code>246</code>. Th... | <p>Your issue is that you have no condition to stop recursion - every call to <code>newInt</code> results in another call. One way to stop would be to check if <code>n</code> is less than 10 and then just return <code>n</code> if it is even. For example:</p>
<pre><code>def newInt(n):
if n < 10:
return n ... | Creating a recursive function that removes odd digits of an integer | python|recursion | 1 | 71 | 5 | 72,385,795 | 72,385,795 | 0 | true | 2022-05-26T01:31:43.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Creating a recursive function that removes odd digits of an integer<p>I just started working with recursive functions and I have to create a function that re... |
72,386,987 | Copy and paste while incrementing row number<p>I made this script by using the Record Macro command in Excel.</p>
<pre class="lang-vb prettyprint-override"><code>Sub Collecting()
'
' Collecting Macro
'
Range("A1:L1").Copy
Windows("Calculations.xlsx").Activate
Range("W44").Selec... | <p>You need a loop - google 'vba loop' to see examples and syntax and so on. An example might be</p>
<pre><code>Dim rownum as long
For rownum = 1 to 30
Range("A" & rownum & ":L" & rownum).copy
'etc
Next
</code></pre>
<p>The above code would copy columns A:L incrementing from row ... | Copy and paste while incrementing row number | excel|vba | 0 | 71 | 1 | 72,387,345 | 72,387,345 | 0 | true | 2022-05-26T05:14:53.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Copy and paste while incrementing row number<p>I made this script by using the Record Macro command in Excel.</p>
<pre class="lang-vb prettyprint-override"><... |
72,392,876 | React: onClick vs OnKeyDown<p>I'm fairly new to React coding, but looking to understand some curious behaviour in code I've inherited. The following snippet drives the closure of a pane/panel in an application I'm seeking to understand, but operates differently when invoked via a mouse click vs 'Enter key'.</p>
<pre><c... | <p>Try this</p>
<pre><code>onKeyDown={(e) => {
if (e.code === "Enter") {
e.preventDefault();
onClose();
}
}}
</code></pre> | React: onClick vs OnKeyDown | reactjs | 0 | 71 | 2 | 72,392,980 | 72,392,980 | 0 | true | 2022-05-26T13:45:47.793Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React: onClick vs OnKeyDown<p>I'm fairly new to React coding, but looking to understand some curious behaviour in code I've inherited. The following snippet ... |
72,397,670 | How to update radio button checked status with keyboard in real time JS<p>So I have an accordion with invisible radio buttons. Everything works fine and well, until I try to get the status of the radio button. I have 4 rows of the following code for each accordion radio button:</p>
<pre class="lang-js prettyprint-overr... | <p>You can listen for <code>input</code> event.</p>
<p>Example:</p>
<pre class="lang-html prettyprint-override"><code><input type="radio" name="value" id="inp">
<input type="radio" name="value" id="inp2">
<script>
const inp = document.getEle... | How to update radio button checked status with keyboard in real time JS | javascript|html | 0 | 71 | 2 | 72,398,360 | 72,398,360 | 0 | true | 2022-05-26T20:25:30.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update radio button checked status with keyboard in real time JS<p>So I have an accordion with invisible radio buttons. Everything works fine and well... |
72,270,777 | how to use frontend code (html , css) alongside jax-rs in eclipse?<p>I want to write the backend code of a web application which is going to interact with users (registering users, logging them into their panel, and ...).</p>
<p>my question is that how can I interact with the frontend code? for example, when the user h... | <p>the answer is found. it is done by adding specific attributes to HTML tags.</p> | how to use frontend code (html , css) alongside jax-rs in eclipse? | java|eclipse|frontend|jax-rs|backend | -1 | 71 | 2 | 72,444,555 | 72,444,555 | 0 | true | 2022-05-17T08:39:23.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to use frontend code (html , css) alongside jax-rs in eclipse?<p>I want to write the backend code of a web application which is going to interact with us... |
72,346,596 | Copy files from Azure File Shares to a specific OneDrive or SharePoint location with Java<p>I have a scenario which we use a Azure File Share storage to store large files and need to copy those files to another location such as OneDrive or Share Point. Copying files will be selected based on some criteria and I need to... | <ul>
<li><em>Here is the Sample code where you can create an Azure file share using Java Application.</em></li>
</ul>
<pre><code>public static Boolean createFileShare(String connectStr, String shareName)
{
try
{
ShareClient shareClient = new ShareClientBuilder()
.connectionString(connectStr)... | Copy files from Azure File Shares to a specific OneDrive or SharePoint location with Java | java|spring-boot|azure|sharepoint|storage-file-share | -1 | 71 | 1 | 72,483,728 | 72,483,728 | 0 | true | 2022-05-23T09:56:23.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Copy files from Azure File Shares to a specific OneDrive or SharePoint location with Java<p>I have a scenario which we use a Azure File Share storage to stor... |
72,378,132 | How to get/return max_depth parameter from xgboost (XGBClassifier)?<p>I trained naive XGBClassifier(). After fitting my classifier has params:</p>
<pre><code>XGBClassifier(base_score=0.5, booster='gbtree', callbacks=None,
colsample_bylevel=1, colsample_bynode=1, colsample_bytree=1,
early_sto... | <p>That should be correct, if your model name is xgbc_naive and training went well</p>
<p>These should all show the max_depth</p>
<pre><code>model.get_params
model.get_xgb_params
model.max_depth # should show max_depth used
</code></pre>
<p>Did you train with :</p>
<pre><code>xgbc_naive = XGBClassifier(etc, etc)
... | How to get/return max_depth parameter from xgboost (XGBClassifier)? | python|machine-learning|xgboost | 0 | 71 | 1 | 72,417,571 | 72,417,571 | 0 | true | 2022-05-25T12:59:43.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get/return max_depth parameter from xgboost (XGBClassifier)?<p>I trained naive XGBClassifier(). After fitting my classifier has params:</p>
<pre><code... |
72,267,762 | SQL - Combine different rows into a single row with different ID<p>The table from different id needs to combine into a single row</p>
<pre><code> +-----+-----+-----+-----+
| Id | Col1| Col2| Col3|
+-----+-----+-----+-----+
| 1 | | 1 | |
| 2 | | 2 | |
... | <p>Your data</p>
<pre><code>create table test(
Id INTEGER NOT NULL
,Col1 INTEGER
,Col2 INTEGER
,Col3 INTEGER
);
INSERT INTO test
(Id,Col1,Col2,Col3)
VALUES
(1,NULL,1,NULL),
(2,NULL,2,NULL),
(3,3,NULL,NULL),
(4,4,NULL,NULL),
(5,NULL,NULL,5),
(6,NULL,NULL,6);
</code></pre>
<p><code>UNION</code> the result ... | SQL - Combine different rows into a single row with different ID | sql|sql-server | 0 | 71 | 1 | 72,268,611 | 72,268,611 | 0 | true | 2022-05-17T03:07:21.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL - Combine different rows into a single row with different ID<p>The table from different id needs to combine into a single row</p>
<pre><code> +---... |
72,290,587 | Get path of file that is called<p>Suppose I've got following folder structure</p>
<pre><code>/dir/dir2/dir3/program.exe
</code></pre>
<p>I want to obtain <code>program.exe</code> file path as it is called. E.g.</p>
<pre><code>// program.exe
#include <iostream>
#include <filesystem>
int main(int argc, char*... | <p>You are looking for a folder with the working executable. Current path giving your a <a href="https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getcurrentdirectory" rel="nofollow noreferrer">process current directory</a></p>
<p>To obtain executable path</p>
<p>For Windows you can use <a href="htt... | Get path of file that is called | c++|c++17 | 0 | 71 | 1 | 72,290,885 | 72,290,885 | 0 | true | 2022-05-18T13:58:51.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get path of file that is called<p>Suppose I've got following folder structure</p>
<pre><code>/dir/dir2/dir3/program.exe
</code></pre>
<p>I want to obtain <co... |
72,357,728 | how to retrieve all matched data from database in node.js from query string?<p>I am building a bus ticket booking app in node.js. I have created 4 tables. 1 - users table, 2 - bus table, 3 - booking table, 4 - route table.</p>
<p>here's the trip model:</p>
<pre><code>const routeSchema = new mongoose.Schema({
depart... | <p>You can <code>filter</code> the data using the <code>find</code> function:</p>
<pre><code>router.get('/trips', async (req, res) => {
if (!req.query.departure || !req.query.arrival || !req.query.date) {
return res.send({
error: 'Please enter the data to get the trip',
});
}
let departure = req.... | how to retrieve all matched data from database in node.js from query string? | node.js|mongodb|express|mongoose|query-string | 1 | 71 | 1 | 72,358,889 | 72,358,889 | 0 | true | 2022-05-24T05:46:19.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to retrieve all matched data from database in node.js from query string?<p>I am building a bus ticket booking app in node.js. I have created 4 tables. 1 ... |
72,238,255 | Why can't I declare object in my local class in Java?<p>I started learning programming recently. I know it can look meaningless, but I want to know reason why I can't declare my object in my local class. I can declare it on the second class that I create, but can't declare in the main one.</p>
<p>Here is my code :</p>
... | <p>The error that your IDE is giving you, It's about your statement</p>
<p><code>student.name = "Jack";</code></p>
<p>You can declare a <code>User</code>, as you're doing here</p>
<p><code>User student = new User();</code></p>
<p>It will be interpreted as an attribute of your <code>User</code> class. However,... | Why can't I declare object in my local class in Java? | java|eclipse | 0 | 71 | 1 | 72,238,294 | 72,238,294 | 0 | true | 2022-05-14T07:42:33.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why can't I declare object in my local class in Java?<p>I started learning programming recently. I know it can look meaningless, but I want to know reason wh... |
72,384,913 | Modifying source code to pass failing junit test regarding element order in a collection<p>I have a test class called <code>LibraryTest</code>. The junit test defined in this class is failing. I want to pass the failing junit test by only modifying my source code and without changing anything in the junit test.</p>
<p>... | <p>According your constraints you need to make your <code>Book</code> class <code>comparable</code> in a very particular way.</p>
<p><em>Book.java</em></p>
<pre class="lang-java prettyprint-override"><code>import java.util.Arrays;
public class Book implements Comparable<Book> {
static String specialOrder[] =... | Modifying source code to pass failing junit test regarding element order in a collection | java|junit|collections|java-8 | 0 | 71 | 1 | 72,385,785 | 72,385,785 | 0 | true | 2022-05-25T22:51:24.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Modifying source code to pass failing junit test regarding element order in a collection<p>I have a test class called <code>LibraryTest</code>. The junit tes... |
72,257,678 | How to add google map markers based on <select> element entries when user changes it<p>I am a student who learns web development. I want to add google map markers based on <em>select</em> element entries. So I have created following HTML code to create dropdown list.</p>
<pre><code><select name="city" clas... | <p>There is no need to spam the <code>window</code> superglobal variable - but you do need some means of relating the <code>City 1</code>, <code>City 2</code> etc etc names to the actual locations. That can easily be done by assigning the relevant details within an object literal ( or JSON variable ) with the CityName ... | How to add google map markers based on <select> element entries when user changes it | javascript|html|google-maps | 0 | 71 | 1 | 72,260,177 | 72,260,177 | 0 | true | 2022-05-16T10:22:31.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add google map markers based on <select> element entries when user changes it<p>I am a student who learns web development. I want to add google map ma... |
72,358,553 | ChartJS autoskip:False not working on line chart<p>I have a line chart created using ChartJs. I have added a <strong>AutoSkip: false</strong> in the Y-axis under scales in my javascript as I want to show every single dates from the labels on Y-axis but some of my dates are being skipped.</p>
<p>The dates start from 202... | <p>The time scale by default generates <code>nice</code> ticks because time can be verry far appart. If you want to show all the ticks you will need to set the <code>source</code> in the ticks to <code>'data'</code>. After that the autoskip property will work.</p>
<pre class="lang-js prettyprint-override"><code>scales:... | ChartJS autoskip:False not working on line chart | javascript|html|chart.js | 1 | 71 | 2 | 72,358,716 | 72,358,716 | 0 | true | 2022-05-24T07:06:23.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ChartJS autoskip:False not working on line chart<p>I have a line chart created using ChartJs. I have added a <strong>AutoSkip: false</strong> in the Y-axis u... |
72,240,066 | Why my Akka main actor stops even though behavior doesn't change?<p>I have written a small application, but there is a problem that my app doesn't wait for my actors to stop, and stops them before their actions are completed.</p>
<p>I tried to make minimal ActorSystem looking like this:</p>
<pre><code>object Main exten... | <p>Okay, I found out what the problem was.
I was missing <code>fork := true</code> in my build.sbt file.
But I still don't understand why it was the problem.</p> | Why my Akka main actor stops even though behavior doesn't change? | scala|akka|akka-typed | 0 | 71 | 1 | 72,241,060 | 72,241,060 | 1 | true | 2022-05-14T12:11:41.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why my Akka main actor stops even though behavior doesn't change?<p>I have written a small application, but there is a problem that my app doesn't wait for m... |
72,241,140 | How do I allocate space for elements in vector for type T?<pre><code>fn test<T>(arr: &mut [T]) {
let vector=vec![] //what can I do here so that I have vector as vec with same size as arr and of type T.
}
fn main() {
let xs = vec![1, 2, 3, 4, 5, 6];
test(&mut xs);
}
</code></pre>
<p>Is there... | <p>There's a few ways to do this. If you can enforce that <code>T: Default</code> you can use <a href="https://doc.rust-lang.org/std/vec/struct.Vec.html#method.resize_with" rel="nofollow noreferrer"><code>resize_with</code></a></p>
<pre><code>fn test<T: Default>(arr: &mut [T]) {
let v: Vec<T> = Vec:... | How do I allocate space for elements in vector for type T? | rust | 1 | 71 | 3 | 72,241,589 | 72,241,589 | 1 | true | 2022-05-14T14:30:39.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I allocate space for elements in vector for type T?<pre><code>fn test<T>(arr: &mut [T]) {
let vector=vec![] //what can I do here so tha... |
72,245,706 | is there a way to tell at run time which type of app c# code is running in?<p>In a Visual Studio 2022 .sln there are 2 projects. One is Windows Service, another one is ASP.NET 6.0. Both use a shared code to retrieve xml data such as SQL server instance name, database name, etc. from app.config file.</p>
<p>For logging ... | <p>You cannot get the <em>Application Type</em>, but you can get the targeted framework, which I believe would solve your problem.</p>
<pre><code> Assembly currentAssembly = Assembly.GetExecutingAssembly();
var attribute = currentAssembly.GetCustomAttribute<System.Runtime.Versioning.TargetFrameworkAt... | is there a way to tell at run time which type of app c# code is running in? | c#|runtime | 0 | 71 | 1 | 72,246,908 | 72,246,908 | 1 | true | 2022-05-15T05:25:04.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
is there a way to tell at run time which type of app c# code is running in?<p>In a Visual Studio 2022 .sln there are 2 projects. One is Windows Service, anot... |
72,249,966 | Plot daily data of a stock<p>I'm a little unsure where to ask this question but hope I got it right! If not, please correct me.</p>
<p>I am doing a lab in R Markdown (in school) where I have downloaded the historical (daily) values of the prices of one stock for a period that covers ten years, and then I am going to pl... | <p>Usually stock price is referred <em>Adj Close</em> since it takes into account events like stock splits and dividends.</p>
<p>So basically, if you see line chart of stock prices, you usually see something like that under the hood:</p>
<pre><code>plot(x = my_data$Date, y = my_data$`Adj Close`, type = 'l')
</code></pr... | Plot daily data of a stock | r-markdown|stock | 1 | 71 | 1 | 72,250,048 | 72,250,048 | 1 | true | 2022-05-15T16:04:14.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Plot daily data of a stock<p>I'm a little unsure where to ask this question but hope I got it right! If not, please correct me.</p>
<p>I am doing a lab in R ... |
72,253,557 | How to parse Optional Json to String variables<p>I am trying to get data from my database using Firebase. I am unsure how to unwrap and assign the variables. I am trying to have a title on the top of the screen based on the name imported, likes, and playing the video.</p>
<p>When I print the variable jdata it prints th... | <p>based on the data you show, you could try this (untested) approach:</p>
<pre><code>root.observeSingleEvent(of: .value, with: { snapshot in
if let data = snapshot.value as? [String: Any],
let jdata = data["urls"] as? [String: Any] {
if let key = jdata.keys.first,
let result = ... | How to parse Optional Json to String variables | swift|swiftui | 0 | 71 | 1 | 72,254,420 | 72,254,420 | 1 | true | 2022-05-16T02:09:06.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to parse Optional Json to String variables<p>I am trying to get data from my database using Firebase. I am unsure how to unwrap and assign the variables.... |
72,254,375 | How to change id column type already registered in the database<p>I'm trying to change my Id column type from int to bigInt because the records are too big and I'm getting an error if I try to store more records but I'm not sure if it's safe to just alter the table like this:</p>
<pre><code> alter table the_table
... | <p>Why can't you just do this?</p>
<pre><code>ALTER TABLE tableName ALTER COLUMN ID bigint
</code></pre>
<p>I guess try it in a test environment first but this always works for me</p> | How to change id column type already registered in the database | java|mysql|spring-boot|jdbc | 2 | 71 | 2 | 72,254,444 | 72,254,444 | 1 | true | 2022-05-16T05:06:49.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change id column type already registered in the database<p>I'm trying to change my Id column type from int to bigInt because the records are too big a... |
72,261,004 | Mapping count of unique IDs per project<p>I am receiving an Array of Objects like so</p>
<pre><code>[
{
"payload":{
"correlation":{
"metadata":{
"customerId":"12345",
"project":"Project One... | <p>If you use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce" rel="nofollow noreferrer"><code>reduce()</code></a> to create an object with the <code>project</code> as key, and the value as an array containing the <code>customerId</code>, we can use <code>includes(... | Mapping count of unique IDs per project | javascript|ecmascript-6 | 0 | 71 | 3 | 72,261,219 | 72,261,219 | 1 | true | 2022-05-16T14:40:20.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mapping count of unique IDs per project<p>I am receiving an Array of Objects like so</p>
<pre><code>[
{
"payload":{
"corr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.