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,780,599 | How to create a custom container with sharp edges in flutter?<p>I'm trying to create a custom container with sharp edges, but I can't make the corners sharp.</p>
<p><a href="https://i.stack.imgur.com/lzkmk.png" rel="nofollow noreferrer">How the container should look like</a></p> | <p>Use ClipPath and Custom Clipper Like this And use this <a href="https://shapemaker.web.app/#/" rel="nofollow noreferrer">Shape Maker</a> website to design such Layout and you will get path code</p>
<pre><code>ClipPath(
clipper: CustomClipPath(),
child: Container(
height: 12.h,
color: Colors.blue,
),
... | How to create a custom container with sharp edges in flutter? | flutter|dart | 0 | 72 | 2 | 72,781,160 | 72,781,160 | 0 | true | 2022-06-28T03:59:22.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a custom container with sharp edges in flutter?<p>I'm trying to create a custom container with sharp edges, but I can't make the corners sharp.... |
72,776,076 | Cannot disable logging on flask_socketio and eventlet server<p>I have a flask_socketio app with eventlet that runs on Windows, but I can't figure out how to disable the large amounts of log messages. So far I've looked at <a href="https://stackoverflow.com/questions/43487264/disabling-logger-in-flask-socket-io">Disabli... | <p>Okay, I figured out why I couldn't disable logging. I accidentally had two different deployments running.</p>
<p>When <code>run.bat</code> calls <code>flask run</code>, it started a server on Werkzeug on port 8000, and never runs <code>app.py</code>, which starts a server on Eventlet on port 5000.</p>
<p>All of the ... | Cannot disable logging on flask_socketio and eventlet server | python|logging|flask-socketio|eventlet | 1 | 72 | 1 | 72,805,760 | 72,805,760 | 0 | true | 2022-06-27T17:20:41.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot disable logging on flask_socketio and eventlet server<p>I have a flask_socketio app with eventlet that runs on Windows, but I can't figure out how to ... |
72,806,611 | WebRTC does not work on different network/cellular data<p>I am facing a problem. I can connect by webrtc in local network (using wifi), but not being able to connect to different netowrk. How can I solve this problem?</p>
<pre><code>new RTCPeerConnection({
iceServers: [
{ urls: "stun:stun.l.google.com:19... | <p>By the logs you provided I can tell your turn server is not accessible as there are no <code>relay</code> candidates on both ends.</p>
<p>The easiest way to check it is via <a href="https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/" rel="nofollow noreferrer">trickle ice</a> page. It might be t... | WebRTC does not work on different network/cellular data | javascript|webrtc | 0 | 72 | 1 | 72,806,914 | 72,806,914 | 0 | true | 2022-06-29T19:06:11.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
WebRTC does not work on different network/cellular data<p>I am facing a problem. I can connect by webrtc in local network (using wifi), but not being able to... |
72,812,397 | How to conditionally render a component in react.js?<p>I am new to React and for my first project I'm trying to build an expense-tracker, by <a href="https://www.youtube.com/watch?v=XuFDcZABiDQ&list=PLillGF-RfqbY3c2r0htQyVbDJJoBFE6Rb&ab_channel=TraversyMedia" rel="nofollow noreferrer">Traversy Media</a> on YT.<... | <p>Few approaches you can consider doing in this case.</p>
<ol>
<li><p>change the structure of transactions to be grouped by date and have another component inside <code>TransactionList</code> which can render the group of <code>ExpenseDate </code> and <code>Transaction</code></p>
</li>
<li><p>Another approach is, if d... | How to conditionally render a component in react.js? | javascript|reactjs|react-hooks|use-context|conditional-rendering | -1 | 72 | 3 | 72,814,647 | 72,814,647 | 0 | true | 2022-06-30T08:14:19.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to conditionally render a component in react.js?<p>I am new to React and for my first project I'm trying to build an expense-tracker, by <a href="https:/... |
72,815,489 | Error with inheriting one form to another<p>I'm new to Windows Forms and have a problem with inheriting forms.
So I created one base form with multiple controls and events and one form which inherits from the base form. After building the solution and I try to open the designer of the inherited form, I get this error m... | <p>All form controls must have a unique name. The designer doesn't allow adding or naming controls after controls that already exists but if you make manual changes to it such as making it inherit another form by editing the Designer.cs file, you can temporarily bypass these safety measures, but when you try to use the... | Error with inheriting one form to another | c#|forms|winforms|user-interface|designer | -1 | 72 | 1 | 72,820,233 | 72,820,233 | 0 | true | 2022-06-30T12:03:43.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error with inheriting one form to another<p>I'm new to Windows Forms and have a problem with inheriting forms.
So I created one base form with multiple contr... |
72,825,680 | how to arrange the widget based on left and top value in flutter<p>From response data i am getting left, top, width, height, type and rotate values.
Based on that data we have to show the widget.</p>
<p>type 0 -> circle
type 1 -> square
type 2-> rectangle.</p>
<p>Based on left and top values we have to show t... | <p>You can try using Stack with positioned widget to achieve your positioning of widgets, Positioned Widget provides top, left, bottom, right parameters to arrange widgets accordingly.</p>
<p>Use Transform.rotate widget to rotate widgets, it has an angle property which takes angles in radians so you'll have to adjust a... | how to arrange the widget based on left and top value in flutter | flutter|dart|flutter-layout | 0 | 72 | 1 | 72,836,970 | 72,836,970 | 0 | true | 2022-07-01T07:21:51.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to arrange the widget based on left and top value in flutter<p>From response data i am getting left, top, width, height, type and rotate values.
Based on... |
72,840,773 | SwiftUI: Instance member 'enableFilter' cannot be used on type 'ContentView'; did you mean to use a value of this type instead?<p>I'm a beginner with SwiftUI and I wanted to create a dynamic list with the birthdays of people. I also wanted to integrate a filter that facilitates to find birthdays. But in the lines:</p>
... | <p>You can use another Computed property which will get the data based on some another property's value. i.e <code>enableFilter</code>.</p>
<pre><code>@State var people: [person] = {
guard let data = UserDefaults.standard.data(forKey: "people") else { return [] }
if let json = try? JSONDecode... | SwiftUI: Instance member 'enableFilter' cannot be used on type 'ContentView'; did you mean to use a value of this type instead? | json|swift|swiftui|swiftui-list|swiftui-state | 0 | 72 | 1 | 72,841,847 | 72,841,847 | 0 | true | 2022-07-02T16:39:45.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SwiftUI: Instance member 'enableFilter' cannot be used on type 'ContentView'; did you mean to use a value of this type instead?<p>I'm a beginner with SwiftUI... |
72,809,534 | Invalid characters passed for attempted conversion when using base_convert on Codeigniter 4<p>I have a problem with base_convert function on PHP,
I'm trying to make a unique ID for my primary key,</p>
<p>here is my code</p>
<pre><code>base_convert(microtime(false), 10, 36)
</code></pre>
<p>but always showing error like... | <p>Thanks for your responses,
I already fix it using</p>
<pre><code>$cleanNumber = preg_replace( '/[^0-9]/', '', microtime(false));
base_convert($cleanNumber, 10, 36)
</code></pre> | Invalid characters passed for attempted conversion when using base_convert on Codeigniter 4 | php|codeigniter-4 | -2 | 72 | 1 | 72,851,614 | 72,851,614 | 0 | true | 2022-06-30T01:55:57.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Invalid characters passed for attempted conversion when using base_convert on Codeigniter 4<p>I have a problem with base_convert function on PHP,
I'm trying ... |
72,828,321 | How to calculate an average value from categorical data?<p>I have a survey data looks like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>No. of Respondents</th>
<th>Reported height</th>
</tr>
</thead>
<tbody>
<tr>
<td>40</td>
<td><165</td>
</tr>
<tr>
<td>77</td>
<td>166-170</td>
... | <p>This is indeed a very subtle question. Let me first discuss my thoughts and solution before posting the code.</p>
<ul>
<li>As expected, there will be quite some respondents with a reported height of more than 180cm (I hope I'm interpreting the question correctly and these are heights in cm). For about a third of the... | How to calculate an average value from categorical data? | excel|statistics|average|survey | 0 | 72 | 1 | 72,858,816 | 72,858,816 | 0 | true | 2022-07-01T11:07:27.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to calculate an average value from categorical data?<p>I have a survey data looks like this:</p>
<div class="s-table-container">
<table class="s-table">
... |
72,861,522 | Discord.js Animated Emojis<p>I have a bot, and I want to use it to send a animated emoji.
I have the emoji ID, <code><:rgb_lego:993606148580184154></code>
but whenever I make it send the message, it just says</p>
<pre><code>Pong! The round trip took 76ms. ⚡:rgb_lego:
</code></pre>
<p>what am I doing wrong?</p> | <p>It depends on what server (guild) you sent it and how exactly you do it.</p>
<p>Guess you need to check & fetch the requested custom emojie from server and then sent it.</p>
<p>You might wanna <a href="https://discord.js.org/#/docs/discord.js/stable/class/Emoji" rel="nofollow noreferrer">check Discord.js</a> doc... | Discord.js Animated Emojis | discord.js|emoji | 0 | 72 | 1 | 72,861,547 | 72,861,547 | 0 | true | 2022-07-04T20:03:10.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Discord.js Animated Emojis<p>I have a bot, and I want to use it to send a animated emoji.
I have the emoji ID, <code><:rgb_lego:993606148580184154></co... |
72,870,870 | Application insights profiling NodeJs application using Docker image<p>I want to know if Azure App insights support profiling for Nodejs Apps. If not the case, is there any alternative for that?</p>
<p>Thanks</p> | <blockquote>
<p>I want to know if Azure App insights support profiling for Nodejs Apps.</p>
</blockquote>
<p>Yes, you can perform profiling for Node.js apps using Azure Application Insights.</p>
<p>According to <a href="https://docs.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-enable?tabs=nodejs" rel="nofo... | Application insights profiling NodeJs application using Docker image | node.js|azure|docker|azure-application-insights | 0 | 72 | 1 | 72,878,214 | 72,878,214 | 0 | true | 2022-07-05T14:09:27.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Application insights profiling NodeJs application using Docker image<p>I want to know if Azure App insights support profiling for Nodejs Apps. If not the cas... |
72,858,181 | PHP imap_open: SSL negotiation failed - only in docker<p>When opening an IMAP connection from PHP in a docker container, I get the following error:</p>
<blockquote>
<p>imap_open(): Couldn't open stream {webmail.domain.tld}INBOX
Unknown: TLS/SSL failure for webmail.domain.tld: SSL negotiation failed (errflg=2)</p>
</blo... | <p>Managed to solve this by switching from a Debian image, to an Alpine image.
I was able to connect to some other mail servers, just not to some specific ones. My guess is combination of a badly configured mail server and a bug in either Debian or some package.</p> | PHP imap_open: SSL negotiation failed - only in docker | php|docker|ssl|imap | 1 | 72 | 1 | 72,885,240 | 72,885,240 | 0 | true | 2022-07-04T14:17:54.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP imap_open: SSL negotiation failed - only in docker<p>When opening an IMAP connection from PHP in a docker container, I get the following error:</p>
<bloc... |
72,885,580 | How to hide and display inline element using javascript<p>I have a inline element. I am trying to hide and show it using button. But when I click <code>document.getElementById('').style.display = 'inline';</code> I'm getting block elements. How to get the element inline as it was set before.
my code looks like;</p>
<p>... | <p>You are using <code>display:flex</code> so you have to set it back.
Also, you don't need js to hide or show your sections, you can use <code>:target</code>.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lan... | How to hide and display inline element using javascript | javascript|html|css | 0 | 72 | 3 | 72,885,829 | 72,885,829 | 0 | true | 2022-07-06T14:45:31.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to hide and display inline element using javascript<p>I have a inline element. I am trying to hide and show it using button. But when I click <code>docum... |
72,887,640 | Change Icon when nuxt-link is active?<p>I have 3 links in navbar and each link contains 2 icons (lets say icon-1 and icon-2), but i want to show only 1 icon at a time.</p>
<hr />
<p>icon-1 when nuxt-link is active and hovered</p>
<hr />
<p>icon-2 when nuxt-link is inactive</p>
<p>this is my code</p>
<pre><code> <... | <p>First of all you need to set active state in every link object:</p>
<pre><code> {
title: 'Link 1',
path: '/',
inactive: './Icons/home-icon-1.svg',
active: './Icons/home-icon-2.svg',
isActive: false,
},
</code></pre>
<p>then you must set two native event listeners on nuxt link and... | Change Icon when nuxt-link is active? | vue.js|nuxt.js | 0 | 72 | 1 | 72,888,138 | 72,888,138 | 0 | true | 2022-07-06T17:24:33.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change Icon when nuxt-link is active?<p>I have 3 links in navbar and each link contains 2 icons (lets say icon-1 and icon-2), but i want to show only 1 icon ... |
72,845,595 | Extract rotated rectangle from raster in Python<p>I'm using GDAL in Python to work with GeoTIFF rasters. I use the following code to extract small rectangular patches from the entire raster:</p>
<pre class="lang-py prettyprint-override"><code>data_file = gdal.Open("path/to/raster.tiff")
data = data_file.Read... | <p>I created a solution to this by following <a href="https://mmas.github.io/image-affine-mapping-numpy" rel="nofollow noreferrer">this excellent post</a> about how to implement affine transforms.</p>
<p>My solution works by:</p>
<ol>
<li>Using <code>ReadAsArray</code> to read a section of the full raster that fully co... | Extract rotated rectangle from raster in Python | geometry|gis|gdal|gdal-python-bindings | 0 | 72 | 1 | 72,888,958 | 72,888,958 | 0 | true | 2022-07-03T10:07:41.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract rotated rectangle from raster in Python<p>I'm using GDAL in Python to work with GeoTIFF rasters. I use the following code to extract small rectangul... |
72,892,270 | ReactJS: convert date to a hours/minutes ago or day/hours ago<p>someone can help me, i have a date of coment with result:</p>
<blockquote>
<p>June 10, 2022, 3:29 PM</p>
</blockquote>
<p>i want to convert if the date coment same with the day now, value:</p>
<blockquote>
<p>14 hours, 27 minutes ago</p>
</blockquote>
<p>w... | <p>Check out <code>date-fns</code> library. It is lightweight.</p>
<p><a href="https://date-fns.org/docs/Getting-Started" rel="nofollow noreferrer">https://date-fns.org/docs/Getting-Started</a></p>
<p>some examples</p>
<pre><code>import { format, formatDistance, formatRelative, subDays } from 'date-fns'
format(new Dat... | ReactJS: convert date to a hours/minutes ago or day/hours ago | javascript|reactjs|typescript|next.js | 0 | 72 | 3 | 72,893,457 | 72,893,457 | 0 | true | 2022-07-07T04:25:29.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ReactJS: convert date to a hours/minutes ago or day/hours ago<p>someone can help me, i have a date of coment with result:</p>
<blockquote>
<p>June 10, 2022, ... |
72,920,649 | Route non-www domain to www in EKS ingress<p>I want to redirect my domain from non-www to www. I am using EKS and ALB ingress controllers. Following is my ingress file.</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: test
name: test
annotations:
alb.ingress.kubernetes.io/sch... | <p>Try creating a new rule, which matches <code>www.test.com</code> and move the <code>dashboard</code> service description in that rule. This way, the redirections will work, and when an <code>https://www.test.com/</code> request will be received, the second rule will be invoked, forwarding it to the dashboard service... | Route non-www domain to www in EKS ingress | kubernetes|kubernetes-ingress|amazon-eks | 0 | 72 | 1 | 72,924,246 | 72,924,246 | 0 | true | 2022-07-09T10:35:04.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Route non-www domain to www in EKS ingress<p>I want to redirect my domain from non-www to www. I am using EKS and ALB ingress controllers. Following is my in... |
72,954,792 | How to use params.(key) to get specific data for each route?<p>I want to build a car list app that will show a list of cars, and when I click on a car's details button, it will route it to another component/page that will show the details of cars.
I can get the key (vin for me) but I want to get the details of the car ... | <p>I would suggest moving the car data fetching into a layout route and pass the <code>cars</code> state down in an <code>Outlet</code> context.</p>
<p>Example:</p>
<p>Cars - Handles fetching the car data and passes the <code>cars</code> state along to nested routes via the <code>Outlet</code> component's context.</p>
... | How to use params.(key) to get specific data for each route? | javascript|reactjs|react-hooks|react-router|react-router-dom | 1 | 72 | 1 | 72,955,223 | 72,955,223 | 0 | true | 2022-07-12T15:26:37.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use params.(key) to get specific data for each route?<p>I want to build a car list app that will show a list of cars, and when I click on a car's deta... |
72,972,755 | Modify google app script for whole column A<p>I have a File that contains a list of Google Drive File's IDs in column A. In column B I have emails. And column C a list of roles (you know when you share a google sheet with someone)</p>
<p>So I have many rows that contain different file IDs, emails and roles. And I need ... | <p>The reason your script is only sharing to the first ID is because on the line <code>const fileId = sheet.getRange(2, 1).getvalue();</code> you are only getting the first ID. So you need to modify this to <code>getRange(2, 1, sheet.getLastRow() - 1, 1).getValues()</code> so it will get all the IDs from your Column A.... | Modify google app script for whole column A | google-apps-script|google-sheets | -2 | 72 | 2 | 72,974,446 | 72,974,446 | 0 | true | 2022-07-13T21:19:40.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Modify google app script for whole column A<p>I have a File that contains a list of Google Drive File's IDs in column A. In column B I have emails. And colum... |
72,982,751 | How to handle numbers embedded in text during NLP pre-processing?<p>I am trying to run the LDA algorithm on a data set of news articles.
I understand that numbers must be removed during the pre-processing step, and I have written a simple regex code to replace numbers with blanks.</p>
<pre><code>df['number_removed'] = ... | <p>What is sometimes done in similar situations is to replace numbers with a dummy token, such as <code><NUMBER></code>, so that the fact that there was a number in the original text is preserved, but without disturbing the syntactic context. The actual value is usually not that important for generalisations.</p>... | How to handle numbers embedded in text during NLP pre-processing? | python|nlp|lda | 0 | 72 | 1 | 72,983,044 | 72,983,044 | 0 | true | 2022-07-14T15:06:41.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to handle numbers embedded in text during NLP pre-processing?<p>I am trying to run the LDA algorithm on a data set of news articles.
I understand that nu... |
72,989,599 | React break .map() in condition rendering<p>How can I use <code>break</code> to break a <code>.map()</code> function when condition rendering is true ?</p>
<p>This is my example code</p>
<pre><code> {messages.length >= 1 ? (
<div>
{messages.reverse().map((e) => (
e.senderName[0] == displayName... | <p>you can't use break to stop .map() method. I see that you are trying to render messages if message belongs to current user.</p>
<p>I can recommend you to filter the messages first, then render the filtered array with mapping. Like:</p>
<pre><code>const usersMessages = messages.reverse().filter((e) => (e.senderNam... | React break .map() in condition rendering | javascript|reactjs | -1 | 72 | 1 | 72,991,496 | 72,991,496 | 0 | true | 2022-07-15T05:56:34.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React break .map() in condition rendering<p>How can I use <code>break</code> to break a <code>.map()</code> function when condition rendering is true ?</p>
<... |
72,994,719 | Cucumber adding # encoding: iso-8859-1 to feature file not working<p>I am trying to change the encoding on my feature file so that it takes in account accents (like 'réunion').
So i have added the <code>#encoding: iso-8859-1</code> tag on top of my feature file :</p>
<pre><code># encoding: iso-8859-1
# language: fr
Fo... | <p>I think your feature file is encoded with <code>UTF-8</code> or something else but not <code>iso-8859-1</code>.</p>
<p><strong>Convert your gherkin file to <code>iso-8859-1</code> encoding</strong> and see if it still working.</p>
<p>Most software source code is encoded with UTF-8. You will not have problems with Fr... | Cucumber adding # encoding: iso-8859-1 to feature file not working | java|cucumber | 0 | 72 | 1 | 72,995,405 | 72,995,405 | 0 | true | 2022-07-15T13:23:44.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cucumber adding # encoding: iso-8859-1 to feature file not working<p>I am trying to change the encoding on my feature file so that it takes in account accent... |
72,995,769 | Using Boost Python 3.10 and C++ Classes<p>I'm really confused with initialzing C++ classes when usign <code>boost::python</code>. When compiling the follwing code with CMake I get no error, warning or something else at all:</p>
<pre class="lang-cpp prettyprint-override"><code>#include <boost/python.hpp>
#include ... | <p>Just use a constructor and destructor like:</p>
<pre class="lang-cpp prettyprint-override"><code>#include <boost/python.hpp>
#include <iostream>
class Test {
public:
Test(int x) {}; // Change
~Test() {}; // Change
};
void greet() {
Test test(10);
std::cout << "Test" &l... | Using Boost Python 3.10 and C++ Classes | python|c++|boost|cmake|boost-python | 0 | 72 | 1 | 72,995,950 | 72,995,950 | 0 | true | 2022-07-15T14:45:56.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Boost Python 3.10 and C++ Classes<p>I'm really confused with initialzing C++ classes when usign <code>boost::python</code>. When compiling the follwing... |
73,008,712 | How to get the minimum value between 2 conditions<p>Starts when the <code>start</code> column is <code>True</code> and ends when the <code>end</code> column is <code>True</code>.</p>
<p>The obtained result is assigned to the <code>result</code> column.</p>
<p>Input:</p>
<pre class="lang-py prettyprint-override"><code>i... | <p>We may need to create the <code>groupby</code> key with <code>cumsum</code> , then <code>transform</code> the <code>min</code> of each group and <code>shift</code> it</p>
<pre><code>df.loc[df.end,'new'] = (df.groupby([df['start'].cumsum(),df['end'].cumsum()]).
A.transform('min').shift())
df['... | How to get the minimum value between 2 conditions | python|python-3.x|pandas|dataframe | 0 | 72 | 2 | 73,008,925 | 73,008,925 | 0 | true | 2022-07-17T01:30:51.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the minimum value between 2 conditions<p>Starts when the <code>start</code> column is <code>True</code> and ends when the <code>end</code> column ... |
73,014,192 | (JAVA)Why we got an integer when we print number in hexadecimal notation?<p><a href="https://i.stack.imgur.com/L1miE.png" rel="nofollow noreferrer">enter image description here</a>Example:
sout(OxBD);
Output: 189</p>
<p>I don't really understand why does compiler converts different representation of a number to integer... | <p>"0xBD" is an integer, which explains why it's converted to hexadecimal by Java. You can't convert to boolean, as 189 isn't something that can be converted to boolean (which can store only two values, 0 and 1).</p>
<p>189 <em>can</em> be stored as a char though; what you get is the ASCII character represent... | (JAVA)Why we got an integer when we print number in hexadecimal notation? | java | -3 | 72 | 1 | 73,014,255 | 73,014,255 | 0 | true | 2022-07-17T18:04:43.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
(JAVA)Why we got an integer when we print number in hexadecimal notation?<p><a href="https://i.stack.imgur.com/L1miE.png" rel="nofollow noreferrer">enter ima... |
72,940,149 | How to let typescript know the variable must be a string, but not undefine without faking?<p>I have a <code>state</code>, <code>interface</code> , and a <code>function</code> that process the API data</p>
<ul>
<li><code>const [series, setSeries] = useState<ISeries[]>([])</code></li>
</ul>
<hr />
<pre><code>export... | <p>You may cast it like this:</p>
<pre><code>name: (s.status_desc || s.keyword_language) as string,
</code></pre>
<p>The understanding of the || here is a bit different from traditional understanding.</p>
<p>for your reference:
<a href="https://stackoverflow.com/questions/2100758/javascript-or-variable-assignment-expla... | How to let typescript know the variable must be a string, but not undefine without faking? | javascript|typescript | 0 | 72 | 4 | 73,050,494 | 73,050,494 | 0 | true | 2022-07-11T14:27:00.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to let typescript know the variable must be a string, but not undefine without faking?<p>I have a <code>state</code>, <code>interface</code> , and a <cod... |
72,867,022 | How to display mutiple underline color by css (instead of one color)<p>I would like to display mutiple underline color to a certain text</p>
<p>I know that text-decoration-color is to set underline color.</p>
<p>But I want to have sth like below</p>
<p><a href="https://i.stack.imgur.com/T0Fmf.png" rel="nofollow norefer... | <p>You may try to apply different span with different style</p>
<pre><code>.doubleHightlight{
box-shadow:
0px 2px yellow,
0px 10px orange;
}
.singleHightlight{
box-shadow:
0px 2px yellow,
}
</code></pre> | How to display mutiple underline color by css (instead of one color) | html|css | 2 | 72 | 5 | 73,050,873 | 73,050,873 | 0 | true | 2022-07-05T09:27:33.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to display mutiple underline color by css (instead of one color)<p>I would like to display mutiple underline color to a certain text</p>
<p>I know that t... |
73,023,050 | Loading an ontology from string in Python<p>We have a Pyspark pair RDD which stores the path of <code>.owl</code> files as key and the file contents as value.</p>
<p>I wish to carry out reasoning using Owlready2. To load an ontology from OWL files, the <code>get_ontology()</code> function is used. However, the given fu... | <p>Answering my own question.</p>
<p>The <code>load()</code> function in Owlready2 has a couple of more arguments which are not mentioned anywhere in the documentation. The function definitions of the package can be seen <a href="https://github.com/pwin/owlready2/blob/master/namespace.py" rel="nofollow noreferrer">here... | Loading an ontology from string in Python | python|apache-spark|pyspark|ontology|owlready | 1 | 72 | 1 | 73,052,844 | 73,052,844 | 0 | true | 2022-07-18T13:24:43.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Loading an ontology from string in Python<p>We have a Pyspark pair RDD which stores the path of <code>.owl</code> files as key and the file contents as value... |
73,025,254 | Only display current y-value on ToolTip in chart.js<p>I am working on a developing a chart using Chart.js and I want to only display te y-axis value in the tool-tip. Currently it displays:</p>
<p>date
name_of_line: measurement</p>
<p>ex.
Jan 1, 2020, 8:00:00 AM
5th Percentile: 100 oz.</p>
<p>And this is what I want it ... | <p>I ended up figuring out how to get this to work.</p> | Only display current y-value on ToolTip in chart.js | javascript|html|chart.js|tooltip | 0 | 72 | 2 | 73,082,776 | 73,082,776 | 0 | true | 2022-07-18T15:57:38.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Only display current y-value on ToolTip in chart.js<p>I am working on a developing a chart using Chart.js and I want to only display te y-axis value in the t... |
72,881,946 | How to create an JDBC SQL view with graphdb REST API in python<p>I am working with GraphDB on a knowledge graph and would like to dynamically generate JDBC SQL views using the REST API :</p>
<p><a href="https://graphdb.ontotext.com/documentation/10.0/devhub/rest-api/curl-commands.html?%20api#repository-management" rel=... | <p>By using devtools on GraphDDB and looking at the network activity while creating an sql view I found out I was missing \n before and after the #!filter
so at the end I'd have WHERE{ ... \n #!filter \n }</p>
<p>and as it was mentioned to me by someone it is in fact important to keep the same name in column_name and... | How to create an JDBC SQL view with graphdb REST API in python | rest|sparql|graph-databases|graphdb | 1 | 72 | 1 | 73,101,043 | 73,101,043 | 0 | true | 2022-07-06T10:30:25.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create an JDBC SQL view with graphdb REST API in python<p>I am working with GraphDB on a knowledge graph and would like to dynamically generate JDBC S... |
72,944,081 | Spotfire: Call a data function from IronPython and update a column with the results<p>I am using an IronPython script to call a Data Function. The result of the function is a Column, and I would like to update the column in place with the results (similar to the 'Replace columns on update' option on the output paramet... | <p>Re-added as answer: If the column is already defined in the data function, you can simply call the data function via Execute. You don't need to define the new column in Iron Python.</p> | Spotfire: Call a data function from IronPython and update a column with the results | ironpython|spotfire|tibco | 0 | 72 | 1 | 73,104,720 | 73,104,720 | 0 | true | 2022-07-11T20:05:31.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spotfire: Call a data function from IronPython and update a column with the results<p>I am using an IronPython script to call a Data Function. The result of... |
72,992,732 | Pass pointer of a non static member function to another non static member object<p><strong>NOTE:</strong> In this context, the term "ISR" is not really addressing ISR vectors. There are a lot of tricks in the drivers. One of them is handling with the interrupts generated by the radio tranceiver chip. SX1276_L... | <p>As @Wutz stated in his third comment, the correct way is using <code>mbed::Callback</code>. Here is my new constructor:</p>
<pre><code>ProtoTelecom::ProtoTelecom(LoRaRadio *Radio, c_TC_Manager *tcm) : manageCommands()
{
this->Radio = Radio;
this->tcm = tcm;
//Inizialize the radio
newRadioEvent... | Pass pointer of a non static member function to another non static member object | c++|c++11|pointers|embedded|mbed | -1 | 72 | 1 | 73,139,976 | 73,139,976 | 0 | true | 2022-07-15T10:39:43.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass pointer of a non static member function to another non static member object<p><strong>NOTE:</strong> In this context, the term "ISR" is not re... |
72,792,000 | Facebook js api - "unsupported get request" error<p>I'm trying to get some (I think allowed) information in my app. I have an access token that has the following info:</p>
<pre><code>App ID: <my app id> : iHOUSEListingPoster - Test 001
Type: User
App-Scoped User ID: <user id> : Joe Webb
Valid: True
Sco... | <p>Ok, I finally figured out what the problem is/was here (sheepish face). We have a couple of Facebook accounts here at the company. One is the container for my app and it's test app, the other is a more general company account. I was logged into the general company account. When I tried my app, it grabbed some rando... | Facebook js api - "unsupported get request" error | facebook-javascript-sdk|facebook-access-token | 0 | 72 | 2 | 73,142,225 | 73,142,225 | 0 | true | 2022-06-28T19:12:38.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Facebook js api - "unsupported get request" error<p>I'm trying to get some (I think allowed) information in my app. I have an access token that has the follo... |
72,967,089 | Not enough memory to run HAXM on ubuntu<p><a href="https://i.stack.imgur.com/jP9Wb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jP9Wb.png" alt="HAXM issue" /></a></p>
<p>Recently I installed Ubuntu instead of Windows and now I was trying to run an android emulator when I faced this issue.
I have 1... | <p>I fixed the bug by switching from Ubuntu 22.04 to Ubuntu 20.04</p> | Not enough memory to run HAXM on ubuntu | android|android-studio|emulation|virtualization|haxm | -2 | 72 | 1 | 73,177,443 | 73,177,443 | 0 | true | 2022-07-13T13:25:29.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not enough memory to run HAXM on ubuntu<p><a href="https://i.stack.imgur.com/jP9Wb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jP9Wb.p... |
72,955,199 | Azure Data Factory - pipeline runs slow - monitoring<p>Azure data factory</p>
<p>Pipeline runs (on debug mode)</p>
<p>Source: MSSQL (CDC enabled)</p>
<p>Target: Snowflake</p>
<p>Each pipeline run is going through a number of activities for each DB and each table that was included in the metadata:</p>
<p>RunLoadConditio... | <blockquote>
<p>would there be a better monitoring way to filter through the queries that are taking the most time and get their details in an excel?</p>
</blockquote>
<p>Unfortunately, we cannot get each activities run time for every pipeline in one place through monitor.</p>
<p>To get Activities which are taking more... | Azure Data Factory - pipeline runs slow - monitoring | azure-pipelines|azure-data-factory | 0 | 72 | 1 | 73,203,946 | 73,203,946 | 0 | true | 2022-07-12T16:00:00.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure Data Factory - pipeline runs slow - monitoring<p>Azure data factory</p>
<p>Pipeline runs (on debug mode)</p>
<p>Source: MSSQL (CDC enabled)</p>
<p>Targ... |
72,844,183 | Pull data from firestore using useEffect works on re-render only<p>Here is my code:</p>
<pre><code>import React, { useEffect, useState } from 'react';
import { getDocs, collection } from 'firebase/firestore';
import { db } from '../firebase-config';
const Home = () => {
const [postList, setPostList] = useStat... | <p>Setting state in react is asynchronous, so the data is loaded and the state is set but the <code>console.log</code> statement is executed before the setting state async operation is complete</p>
<p>To make it a bit more clear this is how it works step by step</p>
<ol>
<li>Component is rendered and <code>postList</co... | Pull data from firestore using useEffect works on re-render only | reactjs|google-cloud-firestore | 0 | 72 | 1 | 72,844,194 | 72,844,194 | 0 | true | 2022-07-03T05:49:26.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pull data from firestore using useEffect works on re-render only<p>Here is my code:</p>
<pre><code>import React, { useEffect, useState } from 'react';
import... |
72,868,388 | Streamlit python variable declaration<p>I wrote some dummy code to replicate my problem. I need to do some simple computations in Streamlit, but I can't seem to find out how they handle variables and how to store info
Here is my example:</p>
<pre><code>import streamlit as st
sidebarOption = st.sidebar.radio('Options',... | <p>The question has nothing to do with Streamlit, the variables are just not defined. Let me rewrite your code without the Streamlit part and with added comments to see if that clarifies things:</p>
<pre class="lang-py prettyprint-override"><code>option = 'C'
if option == 'A':
foo = 1 # this line is not executed, ... | Streamlit python variable declaration | python|streamlit | 0 | 72 | 2 | 72,870,333 | 72,870,333 | 0 | true | 2022-07-05T11:07:17.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Streamlit python variable declaration<p>I wrote some dummy code to replicate my problem. I need to do some simple computations in Streamlit, but I can't seem... |
72,802,623 | Recursively loop through object to display key/value pairs<p>I am facing a difficulty to loop through an object (the object also contains array in different layers) with at least 6 layers and show key/value pairs. , I tried to use For...In statement or recursion to loop through it. Sadly, it was not successful. Could a... | <p>I believe you are almost there.</p>
<p>When comparing typeof val === "object", please note that <code>null</code> is also treated as a object type in Javascript. So please make sure you do a null check on your solution.
If you try to do <code>Object.entries(null)</code>, it gives <code>Uncaught TypeError: ... | Recursively loop through object to display key/value pairs | javascript | -6 | 72 | 1 | 72,803,447 | 72,803,447 | 0 | true | 2022-06-29T13:54:32.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Recursively loop through object to display key/value pairs<p>I am facing a difficulty to loop through an object (the object also contains array in different ... |
72,832,310 | Why does this exception throw when calling a local variable in a where clause of a linq expression?<p>I want to execute this LINQ query, but since I've changed a hardcoded <code>5</code> to <code>firNr</code> (a local variable) in a <code>where</code> clause, I'm getting the following error:</p>
<pre><code>System.Aggre... | <p>EF Core sill has limitstion in GroupJoin trnslating. It works only for simple LEFT JOIN, but it fails when query become complex.
I have rewritten your problematic part using <a href="https://docs.microsoft.com/en-us/ef/core/querying/complex-query-operators#collection-selector-references-outer-in-a-where-clause" rel=... | Why does this exception throw when calling a local variable in a where clause of a linq expression? | c#|linq|entity-framework-core|linq-to-entities | 0 | 72 | 1 | 72,840,713 | 72,840,713 | 0 | true | 2022-07-01T16:38:06.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does this exception throw when calling a local variable in a where clause of a linq expression?<p>I want to execute this LINQ query, but since I've chang... |
72,843,811 | Datatable Editable: Cell Color Resetting after Sorting<p>I am trying to have a cell in a Datatable change its background color once it is edited. While <a href="https://stackoverflow.com/questions/66949053/change-backgorund-color-of-cell-of-data-table-while-its-value-is-edited-in-rshin">Stéphane's solution</a> works to... | <p>The problem is that you are coloring the visible row, which need not to correspond with the physical row.</p>
<p>One possible solution is to do the coloring on the <strong>server</strong> side, like this:</p>
<pre class="lang-r prettyprint-override"><code>library(shiny)
library(DT)
library(dplyr)
library(functional)... | Datatable Editable: Cell Color Resetting after Sorting | r|shiny|datatables | 1 | 72 | 1 | 73,195,461 | 73,195,461 | 0 | true | 2022-07-03T03:53:08.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Datatable Editable: Cell Color Resetting after Sorting<p>I am trying to have a cell in a Datatable change its background color once it is edited. While <a hr... |
73,005,511 | Metrics using batches v/s metrics using full dataset<p>I am using training an image classification model using the pre-trained mobile network. During training, I am seeing very high values (more than 70%) for Accuracy, Precision, Recall, and F1-score on both the training dataset and validation dataset.<br />
<a href="h... | <p>After spending many hours, I found the issue was due to the shuffle function. I was using the below function to shuffle, batch and prefetch the dataset.</p>
<pre><code>def shuffle_batch_prefetch(dataset, prefetch_size=1, batch_size=16,
shuffle_buffer_size=None,
... | Metrics using batches v/s metrics using full dataset | tensorflow|keras|deep-learning|mobilenet|custom-training | 2 | 72 | 2 | 73,013,819 | 73,013,819 | 0 | true | 2022-07-16T15:38:38.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Metrics using batches v/s metrics using full dataset<p>I am using training an image classification model using the pre-trained mobile network. During trainin... |
72,844,097 | how to make cin only accept a single character and int accept only numbers?<p>How can I make cin accept only a single letter in char datatypes and numbers only in double/int datatypes.</p>
<pre><code>#include <iostream>
using namespace std;
int main (){
char opt;
int num1, num2, sum;
cout << &q... | <p>By definition, <code>operator>></code> reading into a <code>char</code> will read in exactly 1 character, leaving any remaining input in the buffer for subsequent reading. You have to validate the read is successful and the character is what you are expecting before using it.</p>
<p>And likewise, <code>operato... | how to make cin only accept a single character and int accept only numbers? | c++|cin | 0 | 72 | 1 | 72,844,480 | 72,844,480 | 0 | true | 2022-07-03T05:23:16.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to make cin only accept a single character and int accept only numbers?<p>How can I make cin accept only a single letter in char datatypes and numbers on... |
72,769,182 | ValueError: ('Lengths must match to compare', (120,), (1,))<p>How to display the data based on the value which inserted in the<code>dcc.Dropdown(...value=['01/01/2022])</code>?</p>
<p>Currently, there is no data displayed in the chart based on the value inserted and come out error message as per below:</p>
<p>Error mes... | <p>Answer:</p>
<p>Remove the [ ]</p>
<p>example: value= '01/01/2022'</p>
<pre><code>date_category = list(df['Date'].unique())
app.layout = dbc.Container([
dbc.Row([
dcc.Dropdown(id='date_drdn', multi=False, value= '01/01/2022',
options = [{'label':x, 'value':x}
for x i... | ValueError: ('Lengths must match to compare', (120,), (1,)) | python|plotly|dashboard | 0 | 72 | 1 | 72,779,829 | 72,779,829 | 0 | true | 2022-06-27T08:35:38.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ValueError: ('Lengths must match to compare', (120,), (1,))<p>How to display the data based on the value which inserted in the<code>dcc.Dropdown(...value=['0... |
72,912,362 | AttributeError: 'NoneType' object has no attribute 'configure'<pre class="lang-py prettyprint-override"><code>Frame(w, width = 427, height = 250, bg = '#272727').place(x = 0, y = 0)
label1 = Label(w, text = 'APP', fg = 'white', bg = '#272727').place(x = 0, y = 0)
label1.configure(font =("Game of Squids", 24... | <p>This should work.</p>
<pre><code>import tkinter as tk
w = tk.Tk()
tk.Frame(w, width = 427, height = 250, bg = '#272727').place(x = 0, y = 0)
label1 = tk.Label(w, text = 'APP', fg= 'white', bg = '#272727')
label1.place(x = 0, y = 0)
label1.config(font =("Game of Squids", 24,"bold"))
w.mainloop... | AttributeError: 'NoneType' object has no attribute 'configure' | python|tkinter | -1 | 72 | 2 | 72,912,521 | 72,912,521 | 0 | true | 2022-07-08T13:45:08.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AttributeError: 'NoneType' object has no attribute 'configure'<pre class="lang-py prettyprint-override"><code>Frame(w, width = 427, height = 250, bg = '#2727... |
72,919,084 | Need help returning expected JSON output<p>I am trying to append authorIds into the post map. I am not sure if this is possible to do since I have close to no experience with Ruby. I have tried using multiple methods on the post map, such as merge, store, and others, however, nothing seems to work. I would appreciate a... | <p>For the most part of your <code>update</code> method, you deal with an instance of <code>Post</code> and not with a hash object. When you just want to return a value in the response then you need to add it to the object that will be returned as close to the end as possible.</p>
<p>Because the translation from an ins... | Need help returning expected JSON output | json|ruby-on-rails|ruby | -1 | 72 | 1 | 72,926,817 | 72,926,817 | 0 | true | 2022-07-09T05:06:20.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need help returning expected JSON output<p>I am trying to append authorIds into the post map. I am not sure if this is possible to do since I have close to n... |
72,837,135 | VBA Code To Use Macro.A In Workbook.A On Workbook.B.WorkSheet1 Without 'Opening' It<p><a href="https://1drv.ms/u/s!AsImeLMHQa7l-kzG8TxPzIXgWz-h?e=m1YEaa" rel="nofollow noreferrer">Link To Files</a></p>
<p>The First File ConvertToMacroEnabledWorkbook.xlsm because initially I though is was because the file originally com... | <p><strong>Updated after checking the files</strong></p>
<p>There is no need to use <code>Application.Run</code> to run a code from the same workbook. Just <code>Call</code> the <code>Sub</code> you need, just don't forget to activate the target workbook that needs be formatted first.</p>
<pre><code>Sub Open_External_W... | VBA Code To Use Macro.A In Workbook.A On Workbook.B.WorkSheet1 Without 'Opening' It | excel|vba | 0 | 72 | 1 | 72,839,983 | 72,839,983 | 0 | true | 2022-07-02T07:06:00.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VBA Code To Use Macro.A In Workbook.A On Workbook.B.WorkSheet1 Without 'Opening' It<p><a href="https://1drv.ms/u/s!AsImeLMHQa7l-kzG8TxPzIXgWz-h?e=m1YEaa" rel... |
73,018,270 | C++ Google Type-Parameterized and Value-Parameterized Tests combined?<p>I would like to be able to parameterize my tests for various types through the following code snippet:</p>
<pre><code>template <typename T>
class MyTestSuite : public testing::TestWithParam<tuple<T, vector<vector<T>>, T, T&g... | <p>Decided to use a template base test fixture class with parameterized tests:</p>
<pre><code>template <typename T>
class MyTestFixture
{
protected:
void SetUp(...) {}
T _var;
};
class MyTestSuite1 : public MyTestFixture<size_t>, public testing::TestWithParam<tuple<size_t, vector<vector<si... | C++ Google Type-Parameterized and Value-Parameterized Tests combined? | c++|c++20|googletest|parameterized-unit-test | 0 | 72 | 1 | 73,047,050 | 73,047,050 | 0 | true | 2022-07-18T06:48:42.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C++ Google Type-Parameterized and Value-Parameterized Tests combined?<p>I would like to be able to parameterize my tests for various types through the follow... |
72,801,444 | Move first array element one row down<p>I am trying to implement the same python code for the following r code:</p>
<pre><code>nm <- c("Sepal.Length" ,"Sepal.Width" , "Petal.Length", "Petal.Width", "Species")
nm_data <-
sapply(1:length(nm), function(i)
c(nm[... | <p>You overcomplicated it - you need only</p>
<pre><code>data = [nm[x:] + nm[:x] for x in range(1, len(nm)+1)]
</code></pre>
<p>And eventually later you can convert it to <code>DataFrame</code></p>
<hr />
<p>Minimal working code</p>
<pre><code>import pandas as pd
nm = ["Sepal.Length" ,"Sepal.Width"... | Move first array element one row down | python|pandas|numpy | 0 | 72 | 1 | 72,803,607 | 72,803,607 | 0 | true | 2022-06-29T12:27:35.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Move first array element one row down<p>I am trying to implement the same python code for the following r code:</p>
<pre><code>nm <- c("Sepal.Length&... |
72,826,782 | Checkboxs leading to a fetch call to produce data<p>As a user when I submit this form
I want a fetch call for each checkbox that is checked
So that I can load information from the API depending on what the selections are.</p>
<p>Using Materialize framework and jquery or plain javascript is fine. Hard question to explai... | <p>Edit : this snippet fetch every checked element and send a request for each one.</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><script lang="js" >
document.getE... | Checkboxs leading to a fetch call to produce data | javascript|fetch-api | -2 | 72 | 1 | 72,826,804 | 72,826,804 | 0 | true | 2022-07-01T08:56:26.390Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Checkboxs leading to a fetch call to produce data<p>As a user when I submit this form
I want a fetch call for each checkbox that is checked
So that I can loa... |
72,778,444 | String Interpolation a json object with %<p>I am trying to send a custom payload to a String in Java. In this case, a JSON Object.</p>
<p>ordinarily, if I wanted to send a decimal to a string I might do something like this</p>
<pre><code>String myDecimal = "my decimal is %d";
System.out.println(String.format(... | <p>As far as I know, you cannot pass an object. so far, my best solution has been passing strings formatted to be like a JSON object, then parsing it into a JSON Object.</p>
<p>Example</p>
<pre><code>class Main {
private static String EXT_EVENT = "{" +
" \"version\": \"1.0... | String Interpolation a json object with % | java|string|string-interpolation | 0 | 72 | 1 | 72,832,748 | 72,832,748 | 0 | true | 2022-06-27T21:23:21.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
String Interpolation a json object with %<p>I am trying to send a custom payload to a String in Java. In this case, a JSON Object.</p>
<p>ordinarily, if I wa... |
72,982,940 | Regex pattern that matches that first pattern of the file<p>I'm having a hard time getting the regex pattern that can get the 123456abcde_ and it's also optional on the filename? I'm using the preg_replace and one of the requirements is the pattern
that can get the 123456abcde_ and replace it with an empty string, btw ... | <p>Based on your comments to this and the other answers and the assumption, that the code you want to extract, can not contain any space characters, I came up with this pattern, that works for all the examples you posted in your question and at the regex101 site:</p>
<pre><code>$filenames = "123456abcde_get-thisVa... | Regex pattern that matches that first pattern of the file | php|regex | 0 | 72 | 3 | 72,983,449 | 72,983,449 | 0 | true | 2022-07-14T15:21:24.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex pattern that matches that first pattern of the file<p>I'm having a hard time getting the regex pattern that can get the 123456abcde_ and it's also opti... |
73,027,699 | How to ignore files with invalid schema Azure Data Factory?<p>I am new to Azure Data Factory. Currently, I am trying to copy some data from files in blob storage to Azure Data Explorer.</p>
<p>The pipeline reads multiple files from a specific cosmos root directory and copies the data to ADE. Currently, the pipeline suc... | <ul>
<li><p>You can use <code>ForEach</code> activity to achieve this requirement. The <strong>ForEach activity</strong> (in this case) can be used to copy each source file into destination. In case the schema don't match, the copy activity usually fails.</p>
</li>
<li><p>But when a copy activity inside foreach fails, ... | How to ignore files with invalid schema Azure Data Factory? | azure|azure-data-factory | 0 | 72 | 1 | 73,031,339 | 73,031,339 | 0 | true | 2022-07-18T19:34:36.150Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to ignore files with invalid schema Azure Data Factory?<p>I am new to Azure Data Factory. Currently, I am trying to copy some data from files in blob sto... |
72,915,696 | Proc compare loop through multiple datasets in a folder SAS<p>I have two folders containing numerous datasets. Each folder contains identical datasets and I'd like to compare to ensure they are similar. Is it possible to loop through each folder and compare each dataset?</p>
<pre><code>%macro compare(dpath=, cpath=,);
... | <p>Point librefs to the "folders". Get the lists of datasets. Use the list to drive the code generation.</p>
<pre><code>%macro compare(dpath,cpath);
libname left "&dpath";
libname right "&cpath";
proc contents data=left._all_ noprint out=contents;
run;
data _null_;
set content... | Proc compare loop through multiple datasets in a folder SAS | macos|loops|sas | 0 | 72 | 2 | 72,916,006 | 72,916,006 | 0 | true | 2022-07-08T18:39:22.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Proc compare loop through multiple datasets in a folder SAS<p>I have two folders containing numerous datasets. Each folder contains identical datasets and I'... |
72,938,373 | Cant find what's wrong in the code... Repeat and missing Number<p><strong>Question</strong></p>
<p>You are given a read only array of <code>n</code> integers from <code>1 to n</code>.</p>
<p>Each integer appears exactly once except <code>A</code> which appears <strong>twice</strong> and <code>B</code> which is <strong>... | <p>This could be a solution. It runs in <em>O(2n)</em></p>
<pre><code>my_list = [3, 1, 2, 5, 3]
new_list = []
length = len(my_list)
for x in range(1,length+1):
new_list.append(x)
for x in range(1,length+1):
try:
my_list.remove(x)
except:
missing_number = x
double_number = my_list[0]
print(missing... | Cant find what's wrong in the code... Repeat and missing Number | python|arrays | -2 | 72 | 2 | 72,938,480 | 72,938,480 | 0 | true | 2022-07-11T12:10:25.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cant find what's wrong in the code... Repeat and missing Number<p><strong>Question</strong></p>
<p>You are given a read only array of <code>n</code> integers... |
72,775,222 | Loop through webpages via BeautifulSoup and download all images<p>I would like to go through the below web pages and save the respective images using python:</p>
<p>Examples (total of 10.000 websites):</p>
<pre><code>https://cryptopunks.app/cryptopunks/cryptopunk0001.png
https://cryptopunks.app/cryptopunks/cryptopunk00... | <p>I have gone ahead and used only requests, os, the images will be save in the New folder (or any folder you name it). How ever it is rather a slow method to download 9999 images so you can use threading (threads to carry out the calling of the function faster).</p>
<pre><code>import requests
import os
import threadin... | Loop through webpages via BeautifulSoup and download all images | python|image|loops|web|beautifulsoup | 0 | 72 | 2 | 72,776,008 | 72,776,008 | 0 | true | 2022-06-27T16:11:57.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Loop through webpages via BeautifulSoup and download all images<p>I would like to go through the below web pages and save the respective images using python:... |
72,783,439 | how to convert a hook into class based component<p>I have a functional component which i used to detect outside click of the component and once that done i do some logic... now i had to use this inside a class based component</p>
<p>My Hook useComponentVisible</p>
<pre><code>import { useState, useEffect, useRef } from ... | <p>A class-based component cannot use hooks, which are only designed for function-based components.</p>
<p>I'd suggest that you should convert your component to a function-based component or use a wrapper to handle hooks.</p>
<p>Here is how we're using a wrapper to handle your case</p>
<pre><code>class CurrencyDropdown... | how to convert a hook into class based component | javascript|reactjs|react-hooks|react-class-based-component | 0 | 72 | 4 | 72,783,542 | 72,783,542 | 0 | true | 2022-06-28T08:51:07.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to convert a hook into class based component<p>I have a functional component which i used to detect outside click of the component and once that done i d... |
72,838,564 | How to explode multiple columns that contain a string?<p>I have a dataset that includes different types of tags. Each column has a string that contains a list of tags.
How am I supposed to explode selected columns at the same time ?</p>
<pre><code> Unnamed: id Tag1 Tag2
0 A a,b,c d,e
1 ... | <p>First, split the string values of each <code>Tag</code> column into lists, using <code>Series.apply</code> + <code>Series.str.split</code>. I'm using <code>DataFrame.filter</code> to select only the columns which starts with <code>'Tag'</code>.</p>
<p>Then, use <code>DataFrame.explode</code> in a loop to explode seq... | How to explode multiple columns that contain a string? | python|pandas|dataframe|data-mining | 0 | 72 | 1 | 72,838,597 | 72,838,597 | 0 | true | 2022-07-02T11:07:45.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to explode multiple columns that contain a string?<p>I have a dataset that includes different types of tags. Each column has a string that contains a lis... |
72,789,292 | Pyspark Dataframe Iterate Array Columns<p>In PySpark, I have a dataframe I'm trying to parse multiple columns with arrays. The last two rows in the dataframe contains multiple values I would like to parse into separate rows.</p>
<pre class="lang-none prettyprint-override"><code>+-------------+---------------+---------... | <pre class="lang-py prettyprint-override"><code>array_cols = ['WB-OIL-CODE', 'WB-OIL-LSE-NBR', 'WB-OIL-DIST', 'WB-GAS-CODE', 'WB-GAS-RRC-ID', 'WB-GAS-DIS']
other_cols = [c for c in df.columns if c not in array_cols]
df = df.select(
*other_cols,
F.expr(f"inline(arrays_zip({'`' + '`,`'.join(array_cols) + '`'... | Pyspark Dataframe Iterate Array Columns | arrays|dataframe|apache-spark|pyspark|apache-spark-sql | 0 | 72 | 1 | 72,790,183 | 72,790,183 | 0 | true | 2022-06-28T15:28:57.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pyspark Dataframe Iterate Array Columns<p>In PySpark, I have a dataframe I'm trying to parse multiple columns with arrays. The last two rows in the datafram... |
72,955,504 | Save Toggle View State using Local Storage in Vanilla JavaScript<p>I am toggling between two views using LocalStorage. I can see the my set key and value in localstorage when I click the toggle button. But when I refresh, I lose the current view. What changes can I make to the code to save view in localStorage?</p>
<pr... | <p>I have refactored your code so that you can achieve to render the current view:</p>
<p>script.js</p>
<pre class="lang-js prettyprint-override"><code>// The new states will be saved as such:
// table -> to display the dataTable element
// graph -> to display the dataGraph element
// Separate the render from th... | Save Toggle View State using Local Storage in Vanilla JavaScript | javascript|local-storage|storage | 0 | 72 | 1 | 72,957,614 | 72,957,614 | 0 | true | 2022-07-12T16:26:27.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Save Toggle View State using Local Storage in Vanilla JavaScript<p>I am toggling between two views using LocalStorage. I can see the my set key and value in ... |
72,988,963 | How to set different font-size within one cell by using openpyxl?<p>Here is I using now, but I hope it can set different font-size within one cell.</p>
<p>For example:</p>
<pre><code>from openpyxl import Workbook
from openpyxl.styles import Font
wb = Workbook('test.xlsx')
sheet = wb.active
sheet['A1'].value = 'Apple ... | <p><a href="https://foss.heptapod.net/openpyxl/openpyxl/-/tree/branch/3.1" rel="nofollow noreferrer">Branch 3.1</a> has support for rich text. Of course, it's a dev branch so don't rely on it. It could change before it's released.</p>
<pre class="lang-py prettyprint-override"><code>import sys
# The directory below sho... | How to set different font-size within one cell by using openpyxl? | python|fonts|openpyxl | -2 | 72 | 2 | 72,989,540 | 72,989,540 | 0 | true | 2022-07-15T04:11:47.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to set different font-size within one cell by using openpyxl?<p>Here is I using now, but I hope it can set different font-size within one cell.</p>
<p>Fo... |
72,788,782 | How to Partition an array into 2 arrays with equal sums<p>we have an array of integers that has to be partitioned into 2 arrays. My goal is not just to say it's possible or not, it has to return the 2 arrays as an output.</p>
<p>Input = [ 1, 2, 3, 4, 6]</p>
<p>output = [1, 3, 4] [2, 6]</p>
<p>Both the arrays need to ha... | <p>One approach is to use knapsack algorithm. The knapsack has to hold a weight of Total Sum/2. Get the items whose weight is (Total Sum)/2.the remaining items will have same weight.</p>
<p>Other approach is backtracking. Just run through the list to get a combination of numbers summing to Total Sum/2, once found a lis... | How to Partition an array into 2 arrays with equal sums | python|arrays|list | 0 | 72 | 1 | 72,788,920 | 72,788,920 | 0 | true | 2022-06-28T14:57:39.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Partition an array into 2 arrays with equal sums<p>we have an array of integers that has to be partitioned into 2 arrays. My goal is not just to say i... |
72,770,655 | why does the loop execute just one time?<p>I would like to know why the loop below just execute one time?
Here is my code.</p>
<pre><code>for(i=0;i<MAX;i++)
{
printf("name:");
gets(student[i].name);
printf("math score:");
scanf(" %d",student[i].math);
fflush(stdin); ... | <p>At least the code contains a typo. You have to write</p>
<pre><code>scanf(" %d", &student[i].math);
^^^
</code></pre>
<p>Also this call</p>
<pre><code>fflush(stdin);
</code></pre>
<p>has undefined behavior.</p>
<p>And the function <code>gets</code> is unsafe and is not supported by... | why does the loop execute just one time? | c|for-loop|scanf|undefined-behavior | -1 | 72 | 1 | 72,770,728 | 72,770,728 | 1 | true | 2022-06-27T10:34:24.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why does the loop execute just one time?<p>I would like to know why the loop below just execute one time?
Here is my code.</p>
<pre><code>for(i=0;i<MAX;i+... |
72,776,154 | bson cannot Decode to nil value with bson:"omitempty" struct tag<p>I have a struct:</p>
<pre><code>type User struct {
ID primitive.ObjectID `json:"id" bson:"_id,omitempty"`
Username *string `json:"username" bson:"username,omitempty"`
FirstName *stri... | <p>updatedUser is what cannot be nil, you need to give it an empty struct at least to decode into.</p> | bson cannot Decode to nil value with bson:"omitempty" struct tag | go | 1 | 72 | 2 | 72,776,501 | 72,776,501 | 1 | true | 2022-06-27T17:27:00.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
bson cannot Decode to nil value with bson:"omitempty" struct tag<p>I have a struct:</p>
<pre><code>type User struct {
ID primitive.ObjectID `json:... |
72,779,118 | Unexpected token error when parsing token stream with syn::parse2<p>I'm attempting to parse a simple Rust file that looks like:</p>
<pre class="lang-rust prettyprint-override"><code>use std::result::Result;
fn init() {
}
</code></pre>
<p>In my <code>main</code> function, I read the file to a string, parse it, and then... | <p>The reason your program throws an error is because your input code has two items (<code>use</code> and <code>fn</code>) but you're attempting to parse the whole thing as a single <code>Item</code> with the <code>syn::parse2</code> line. This also explains why it works if you remove either the <code>use</code> or the... | Unexpected token error when parsing token stream with syn::parse2 | rust | 0 | 72 | 1 | 72,779,340 | 72,779,340 | 1 | true | 2022-06-27T23:04:51.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unexpected token error when parsing token stream with syn::parse2<p>I'm attempting to parse a simple Rust file that looks like:</p>
<pre class="lang-rust pre... |
72,778,944 | Serial.write() not received by Arduino<p>I am trying to get an LED to respond to a python program (using python 3.8), and it is not receiving anything. When I connect to the port, the led blinks to indicate it is connected, but then does nothing. Here is my code:</p>
<pre><code>import serial
ser=serial.Serial('/dev/cu... | <p>The problem seems to be due to the wrong band speed you are using for the serial port. <code>ser=serial.Serial('/dev/cu.usbmodem1411', 2000000, timeout=1)</code> The value <code>2000000</code> here can never be true. There is no such value. The default is <code>9600</code>, but I'll share a photo showing you the ban... | Serial.write() not received by Arduino | python|python-3.x|arduino|arduino-uno | 0 | 72 | 1 | 72,780,784 | 72,780,784 | 1 | true | 2022-06-27T22:36:17.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Serial.write() not received by Arduino<p>I am trying to get an LED to respond to a python program (using python 3.8), and it is not receiving anything. When ... |
72,770,688 | How can I create a basic Soap server with spyne in django<p>I want to create a server which uses Django and make and take response as SOAP, so I try to use spyne for this reason but I can't run the given code</p>
<pre><code>class HelloWorldService(ServiceBase):
@rpc(Unicode, Integer, _returns=Iterable(Unicode))
... | <p>Remove validator='lxml' option in in_protocol</p>
<p>I don't know the reason, the validator took a long time response or did not work.</p>
<p>And add import statements</p>
<pre><code>from spyne import Application, rpc, ServiceBase, Iterable, Integer, Unicode
from spyne.protocol.soap import Soap11
from spyne.server.... | How can I create a basic Soap server with spyne in django | django|soap|spyne | 1 | 72 | 1 | 73,368,392 | 73,368,392 | 0 | true | 2022-06-27T10:36:32.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I create a basic Soap server with spyne in django<p>I want to create a server which uses Django and make and take response as SOAP, so I try to use s... |
72,853,807 | Is it possible to skip launchscreen.storyboard file when running a multiplatform SwiftUI app on macOS?<p>I selected <code>Multiplatform</code> template when creating a <code>SwiftUI</code> app in <strong>Xcode</strong> (it's Xcode 14.0 beta, in case it matters). My purpose is to run the app on iOS. I selected <code>Mul... | <p>I've found that this works for a multiplatform app:</p>
<ol>
<li>Go to Build Phases -> Copy Bundle Resources</li>
<li>Click on the dropdown for the storyboard resources</li>
<li>Select iOS only</li>
</ol>
<p>(Screenshot is from XCode 14 beta)</p>
<p><a href="https://i.stack.imgur.com/DEvTM.png" rel="nofollow nore... | Is it possible to skip launchscreen.storyboard file when running a multiplatform SwiftUI app on macOS? | ios|macos|swiftui|multiplatform|launch-screen | -1 | 72 | 2 | 73,571,712 | 73,571,712 | 0 | true | 2022-07-04T08:32:19.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to skip launchscreen.storyboard file when running a multiplatform SwiftUI app on macOS?<p>I selected <code>Multiplatform</code> template when ... |
72,897,172 | Shapely installation with pip<p>I just created my virtual environment inside my project with the following command: <code>python -m virtualenv venv', and I activated it. I tried to install files from the requirements.txt file with the command </code>pip install -r requirements.txt'. I tried in both cases with venv on o... | <p>Try downloading the geos_c.dll file from here: <a href="https://www.dll-files.com/geos_c.dll.html" rel="nofollow noreferrer">https://www.dll-files.com/geos_c.dll.html</a> and then extract the zip file in your pc system directory (e.g. C:\Windows\System32 for windows from XP on).
Add then the system directory to the ... | Shapely installation with pip | python|pip | 0 | 72 | 2 | 73,743,928 | 73,743,928 | 1 | true | 2022-07-07T11:40:50.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shapely installation with pip<p>I just created my virtual environment inside my project with the following command: <code>python -m virtualenv venv', and I a... |
72,270,692 | Rust. GTK3. get_screen() method not found in `gtk::Window`<p>I want to use css for my window using "add_provider_for_screen" method.</p>
<pre><code>pub fn add_provider_for_screen(screen: &gdk::Screen, provider: &impl IsA<StyleProvider>, priority: u32)
</code></pre>
<p>To do this, I need to conv... | <p>From the documentation, from a Widgnet, use method <a href="https://gtk-rs.org/gtk3-rs/stable/latest/docs/gtk/prelude/trait.WidgetExt.html#tymethod.screen" rel="nofollow noreferrer"><code>WidgetExt::screen</code></a>:</p>
<blockquote>
<p>Get the gdk::Screen from the toplevel window associated with this
widget. This ... | Rust. GTK3. get_screen() method not found in `gtk::Window` | rust|gtk3|gdk | 0 | 72 | 1 | 72,270,910 | 72,270,910 | 0 | true | 2022-05-17T08:33:38.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rust. GTK3. get_screen() method not found in `gtk::Window`<p>I want to use css for my window using "add_provider_for_screen" method.</p>
<pre><code... |
72,276,266 | Error when executing service method 'getStats'<p>Im trying to do a client-server streaming and when I try to stream from the client to the server this error logs in server console: Error when executing service method 'getStats'.
System.InvalidOperationException: Unable to resolve service for type 'System.Object' while ... | <p>In your <code>Program.cs</code>, add:</p>
<pre class="lang-cs prettyprint-override"><code>// Add services to the container.
builder.Services.AddHttpClient();
</code></pre>
<p>In your <code>HotelStatService</code> class, change the constructor to:</p>
<pre class="lang-cs prettyprint-override"><code>private readonly I... | Error when executing service method 'getStats' | c#|grpc | 0 | 72 | 1 | 72,277,536 | 72,277,536 | 0 | true | 2022-05-17T14:56:28.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error when executing service method 'getStats'<p>Im trying to do a client-server streaming and when I try to stream from the client to the server this error ... |
72,284,748 | How to update data from Firestore in Flutter?<p>I want to use update method in FirebaseFirestore instance but it is not working.
I have intialized id as String i.e String Id in the stateful widget</p>
<p><strong>This is ViewData Page which has a button Widget</strong></p>
<pre><code>class ViewData extends StatefulWidge... | <p>You need to add "SetOptions(merge: true)" as below.</p>
<pre><code> Future<void> setData({
required String path,
required Map<String, dynamic> data,
}) async {
final reference = FirebaseFirestore.instance.doc(path);
return reference
.set(data, SetOptions(merge: true))... | How to update data from Firestore in Flutter? | flutter | 1 | 72 | 3 | 72,288,556 | 72,288,556 | 0 | true | 2022-05-18T07:21:09.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update data from Firestore in Flutter?<p>I want to use update method in FirebaseFirestore instance but it is not working.
I have intialized id as Stri... |
72,302,938 | How do I update state through a React context?<p>Here's a trivial example using a React context:</p>
<pre><code>type MyState = { counter: number };
const MyContext = createContext<[MyState, () => void]|undefined>(undefined);
class MyComponent extends Component<any, MyState> {
constructor(props: any) ... | <p>I think you should not put <code>this</code> as the value of the context on your provider.</p>
<p>When you're passing <code>() => this.setState({ counter: this.state.counter + 1 })]}</code> you're passing an anonymous function (<code>() => {}</code>) that runs your <code>this.setState()</code>. As it is an arr... | How do I update state through a React context? | reactjs|typescript | 0 | 72 | 1 | 72,305,050 | 72,305,050 | 0 | true | 2022-05-19T10:29:20.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I update state through a React context?<p>Here's a trivial example using a React context:</p>
<pre><code>type MyState = { counter: number };
const My... |
72,305,889 | Get sum of length of nested array in an object<p>I have an object like this</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const obj = {
name: "abc",
arr: [{
key1: "va... | <p>this is the simplest implementation I can think of using <code>reduce</code></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const obj = {
name: "abc",
arr: [{
key1:... | Get sum of length of nested array in an object | javascript|node.js | -1 | 72 | 3 | 72,308,478 | 72,308,478 | 0 | true | 2022-05-19T13:55:53.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get sum of length of nested array in an object<p>I have an object like this</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" ... |
72,308,868 | Trying to send a image as byte[] from Spring backend to Angular frontend but:<p>The backend code:</p>
<pre><code>@GetMapping("datamatrix")
public ResponseEntity<byte[]> generarDataMatrix(Long id) throws IOException {
byte[] dataMatrixEnBytes = dataMatrix.generarDataMatrixImagen(id.toString(), id);
... | <p>I have done the two solutions that D M has proposed to me and it has worked!</p>
<p>Pretty sure the default Content-Type header is application/json which is why Angular's HttpClient is trying to parse the byte array as JSON. You can set the HttpHeaders for the request manually to the correct Content-Type for the res... | Trying to send a image as byte[] from Spring backend to Angular frontend but: | arrays|angular|spring|rest|request | 0 | 72 | 1 | 72,310,199 | 72,310,199 | 0 | true | 2022-05-19T17:34:22.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to send a image as byte[] from Spring backend to Angular frontend but:<p>The backend code:</p>
<pre><code>@GetMapping("datamatrix")
public R... |
72,306,225 | Sending email without Java in R<p>How to send HTML format email in R, without the need for Java?</p>
<p>The package mailR is no longer usable as it is dependent on Java. What are the alternate packages?</p>
<p>Note:
The following worked well with mailR and trying to replicate the same.</p>
<pre><code>send.mail(from = f... | <p>The following works.</p>
<pre><code>library(sendmailR)
msg = mime_part(bodyToSend)
msg[["headers"]][["Content-Type"]] = "text/html"
sendmail(mailFrom,mailTo,subject, msg, control=list(smtpServer= "smtpserver"))
</code></pre> | Sending email without Java in R | r|email | 0 | 72 | 2 | 72,310,529 | 72,310,529 | 0 | true | 2022-05-19T14:17:10.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sending email without Java in R<p>How to send HTML format email in R, without the need for Java?</p>
<p>The package mailR is no longer usable as it is depend... |
72,301,346 | APIM cache-lookup-value with external Redis - Key is always prefixed by '2_'<p>I am trying to access an existing Azure Cache for Redis instance from a GET operation on APIM.</p>
<p>The cache content looks like this:
<a href="https://i.stack.imgur.com/l3230.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.... | <p>The format of Redis cache key and its name are not documented and should not be relied upon. At the moment it is prefixed to achieve better reliability and cache performance when internal cache implementation changes and effectively denotes format of the data.</p>
<p>If you need to manipulate cache context of active... | APIM cache-lookup-value with external Redis - Key is always prefixed by '2_' | caching|azure-api-management|azure-redis-cache | 0 | 72 | 1 | 72,311,666 | 72,311,666 | 0 | true | 2022-05-19T08:45:06.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
APIM cache-lookup-value with external Redis - Key is always prefixed by '2_'<p>I am trying to access an existing Azure Cache for Redis instance from a GET op... |
72,313,581 | Passing result-list from Multiprocessing Manager outside scope<p>I'm trying to scan domain for pentesting purposes, the program use Multiprocessing with the result-list got passed from Processes; back to main function.</p>
<p>I have tried to use Global Variables mentioned in <code>global</code> also in a <code>class</c... | <p>The problem to this that i had to explicitly convert the <code>manager.list()</code> as another normal list by setting a new variable and use <code>global</code> to make it usable in another function. I know that it's dirty, havent tried using <code>Queue()</code> but for now, atleast it's working.</p>
<pre><code>de... | Passing result-list from Multiprocessing Manager outside scope | python|python-3.x|multiprocessing|python-multiprocessing | 0 | 72 | 2 | 72,319,937 | 72,319,937 | 0 | true | 2022-05-20T04:23:41.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Passing result-list from Multiprocessing Manager outside scope<p>I'm trying to scan domain for pentesting purposes, the program use Multiprocessing with the ... |
72,319,774 | Is it possible to disable null values from firebase events in Big Query?<p>Is it possible to disable or completely ignore the null values in BigQuery that come from firebase events of a (mobile) app?</p>
<p><em><strong>Example:</strong></em></p>
<p><em>key =></em> <code>my_custom_firebase_event:</code></p>
<p><em>va... | <p>You can use the functions <a href="https://cloud.google.com/bigquery/docs/reference/standard-sql/arrays#flattening_arrays" rel="nofollow noreferrer">UNNEST</a> to save into an array and <a href="https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#unnest_and_with_offset" rel="nofollow noreferre... | Is it possible to disable null values from firebase events in Big Query? | firebase|google-cloud-platform|events | 1 | 72 | 1 | 72,326,377 | 72,326,377 | 0 | true | 2022-05-20T13:30:21.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to disable null values from firebase events in Big Query?<p>Is it possible to disable or completely ignore the null values in BigQuery that co... |
72,332,568 | Output several strings as a marquee separated by 9 characters<p>I've been following this post <a href="https://stackoverflow.com/questions/35533350/how-to-output-a-string-in-a-marquee-fashion">How to output a string in a marquee fashion?</a> to output a marquee.</p>
<p>My problem is that I have a string composed of sev... | <p>You have something to play with. It worked with the same size strings. Try to modify it to work with any size strings (+border cases)</p>
<pre><code>#define MAX(a,b) ((a) > (b) ? (a) : (b))
void foo(char *words[], size_t distance)
{
size_t s1len = strlen(words[0]);
size_t s2len = strlen(words[1]);
f... | Output several strings as a marquee separated by 9 characters | c|string | 1 | 72 | 1 | 72,333,284 | 72,333,284 | 0 | true | 2022-05-21T19:15:20.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Output several strings as a marquee separated by 9 characters<p>I've been following this post <a href="https://stackoverflow.com/questions/35533350/how-to-ou... |
72,337,036 | Use an Saga action as condition for an if statement<p>I'm actually trying to implement redux-saga into my app. To keep it easy in the beginning, I tried to add saga into my login component first.</p>
<p>But I'm struggling rn by adding an if statement which redirects the UI to an page if my login action <code>loginSucce... | <p>You would handle the "loginSuccess" action in your reducer to change your state, or possibly by another saga listening for the loginSuccess action to perform various other actions when the user logs in. e.g. fetching user data, redirecting the location, etc.</p> | Use an Saga action as condition for an if statement | reactjs|typescript|react-redux|react-router-dom|redux-saga | 0 | 72 | 1 | 72,338,055 | 72,338,055 | 0 | true | 2022-05-22T11:11:41.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use an Saga action as condition for an if statement<p>I'm actually trying to implement redux-saga into my app. To keep it easy in the beginning, I tried to a... |
72,355,180 | Display value from async pipe next to corresponding input in FormArray<p>I need to display an employee name next to the corresponding employee number for "x" number of employees.</p>
<p>A parent form will provide the total number of employees required.</p>
<p>As each employee number is entered an http get wil... | <p>The observable <code>employeeName$</code> is contains only one name.
The observable <code>employeeName$</code> is duplicated as the number of the <code>ngFor</code> number of loop.</p> | Display value from async pipe next to corresponding input in FormArray | angular|rxjs|formarray|async-pipe | 0 | 72 | 1 | 72,355,715 | 72,355,715 | 0 | true | 2022-05-23T21:54:17Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display value from async pipe next to corresponding input in FormArray<p>I need to display an employee name next to the corresponding employee number for &qu... |
72,383,559 | is there Material increment/decrement Button implementation for Android?<p>is there by any chance a Material design implementation for increment/decrement button ? <a href="https://i.stack.imgur.com/H4hgj.jpg" rel="nofollow noreferrer">image for illustration</a></p> | <p>No, but it's quite simple to implement, you only need a linear layout with horizontal orientation, containing a button, a textview and another button.
Have an internal value to count and then associate a callback to your buttons, where you add/substract your counter and update the textview, like this:</p>
<pre><code... | is there Material increment/decrement Button implementation for Android? | android|material-design | 0 | 72 | 1 | 72,383,638 | 72,383,638 | 0 | true | 2022-05-25T20:02:22.047Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
is there Material increment/decrement Button implementation for Android?<p>is there by any chance a Material design implementation for increment/decrement bu... |
72,386,597 | how to add object in nested array of objects without mutating original source<p>I have multi nested array of objects, in which I need to merge objects in the grandChildren based on the id <strong>without mutation</strong></p>
<p>Details ......</p>
<p>###Example</p>
<pre><code> let arr1 = {
"initiateLevel"... | <p>Use <code>Array.prototype.map</code> instead, <code>forEach</code> gets no returns</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>let newobj = [
{
id: 22,
reason:... | how to add object in nested array of objects without mutating original source | javascript|arrays|json|object | -5 | 72 | 1 | 72,388,124 | 72,388,124 | 0 | true | 2022-05-26T04:10:54.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to add object in nested array of objects without mutating original source<p>I have multi nested array of objects, in which I need to merge objects in the... |
72,396,305 | Does IF statement executes whenever condition is met or it is just once?<p>how does the "if" statement works in javascript? Does it check for conditions only once? or it executes whenever the condition is met doesn't matter if initially, the condition was false but later it became true.</p>
<p>For example, if... | <p>JavaScript runs linearly, with the exception of asynchronous code. Asynchronous code is something like a promise .then chain or async/await or callback functions. These are the only pieces of code that will run at a later time and not immediately upon interpretation. An if statement will run if the condition bein... | Does IF statement executes whenever condition is met or it is just once? | javascript|node.js | -2 | 72 | 3 | 72,396,344 | 72,396,344 | 0 | true | 2022-05-26T18:15:35.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does IF statement executes whenever condition is met or it is just once?<p>how does the "if" statement works in javascript? Does it check for condi... |
72,399,796 | How do I enqueue a stylesheet in WordPress for custom taxonomy archives?<p>How do I enqueue a stylesheet for custom taxonomy archives? I've created an ACF select field for project_category_css, and set field location to show if Taxonomy is equal to "Project Category". The select field values are:</p>
<ul>
<l... | <p>Your conditional for <code>is_tax()</code> is correct, and should be working.</p>
<p>If your ACF field is on the Taxonomy Term admin page, then you need to specify the Term's Object in the <code>get_field</code> - This is explained in the docs - <a href="https://www.advancedcustomfields.com/resources/adding-fields-t... | How do I enqueue a stylesheet in WordPress for custom taxonomy archives? | php|wordpress|wordpress-theming|advanced-custom-fields|acfpro | 0 | 72 | 1 | 72,403,897 | 72,403,897 | 0 | true | 2022-05-27T02:19:36.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I enqueue a stylesheet in WordPress for custom taxonomy archives?<p>How do I enqueue a stylesheet for custom taxonomy archives? I've created an ACF se... |
72,398,023 | Spring Boot session management - combined solution PostgreSQL + Redis<p>So, I would like to implement complex session management in my application. Essentially, I would like to store user sessions both in the postgre and Redis.</p>
<p>So, the algorithm should be the following:</p>
<ol>
<li><p>A request is sent to the a... | <p>So, I watched this video - <a href="https://www.youtube.com/watch?v=TggWLDAXmb4" rel="nofollow noreferrer">https://www.youtube.com/watch?v=TggWLDAXmb4</a></p>
<p>And I was able to get a gist of how basic security mechanisms work in Spring and implement the workflow described above;</p>
<p>Basically, you will need to... | Spring Boot session management - combined solution PostgreSQL + Redis | spring-boot|session | 0 | 72 | 1 | 72,419,270 | 72,419,270 | 0 | true | 2022-05-26T21:08:57.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spring Boot session management - combined solution PostgreSQL + Redis<p>So, I would like to implement complex session management in my application. Essential... |
72,261,195 | body_add_img with custom image size<p>I want to add images to a serie of docx.files.
But I do not want to change their size - each image has different width and height. How can I specify this for every imagine in:</p>
<pre><code> sample_doc %>% body_add_img(paste0(data_base$Skizze[[x]],".JPG"),width = 5.5,... | <p>You could read each file with <code>readJPEG</code> from <code>jpeg</code> and use <code>dim</code>:</p>
<pre><code>library(jpeg)
img <- readJPEG("pic.jpg")
dim(img)
</code></pre>
<p>The first two elements are the pixels, the third is always 3 (R, B, G). Now you divide the pixels by 96 and you have the... | body_add_img with custom image size | r|image|jpeg|docx|officer | 0 | 72 | 1 | 72,435,599 | 72,435,599 | 0 | true | 2022-05-16T14:53:01.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
body_add_img with custom image size<p>I want to add images to a serie of docx.files.
But I do not want to change their size - each image has different width ... |
72,269,933 | How to prevent ✳ symbol converting to emoji<p>I have a problem where my ✳ (Eight-Spoked Asterisk) symbol is converting to emoji on iOS/android devices..</p>
<p><a href="https://hotemoji.com/eight-spoked-asterisk-emoji.html#:%7E:text=%E2%9C%B3%EF%B8%8F%20Meaning%20%E2%80%93%20Eight%2DSpoked%20Asterisk,a%20list%20as%20bu... | <p>Solved it like this for anyone who is wondering!</p>
<pre><code>//Force ✳︎ to never be parsed as emoji with variation selector \u{FE0E}!
const textSymbol = '\u{2733}\u{FE0E}';
</code></pre> | How to prevent ✳ symbol converting to emoji | javascript|typescript|unicode|emoji|converters | -1 | 72 | 1 | 72,445,169 | 72,445,169 | 0 | true | 2022-05-17T07:37:44.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to prevent ✳ symbol converting to emoji<p>I have a problem where my ✳ (Eight-Spoked Asterisk) symbol is converting to emoji on iOS/android devices..</p>
... |
72,356,490 | rsyslogd using 100% CPU Utilization on all RHEL EC2 Instances<p>Since past two days, rsyslogd is using 100% CPU Utilization on all RHEL EC2 Instances in my environment. I Stopped and started rsyslog service but still issue persists.
This is first time we are facing this kind of behaviour in multiple servers.
There is s... | <p>Issue is due to cert expiry for rsyslog. Observed a lot of connection retry errors in system messages for all clients. Post renewing certs in rsyslog, cpu went down.</p> | rsyslogd using 100% CPU Utilization on all RHEL EC2 Instances | amazon-web-services|server|virtual-machine|rhel | 0 | 72 | 1 | 72,484,375 | 72,484,375 | 0 | true | 2022-05-24T02:09:04.670Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
rsyslogd using 100% CPU Utilization on all RHEL EC2 Instances<p>Since past two days, rsyslogd is using 100% CPU Utilization on all RHEL EC2 Instances in my e... |
72,249,052 | How to use the pretrained model in an application?<p>I dont understand how to use the trained model.</p>
<p>For example I trained the model using the code from <a href="https://towardsdatascience.com/what-is-a-recurrent-neural-network-and-implementation-of-simplernn-gru-and-lstm-models-in-keras-f7247e97c405" rel="nofol... | <p>Before you make predictions you have to convert your text to input format.</p>
<p>For example, to make a prediction of "He is a bad cat." you have to tokenize the sentence.</p>
<pre><code>#tokenizing the prediction data
sentence=['He is a bad cat.']
sequences=tokenizer.texts_to_sequences(sentence)
</code><... | How to use the pretrained model in an application? | tensorflow|nlp|lstm | 0 | 72 | 1 | 72,574,356 | 72,574,356 | 0 | true | 2022-05-15T14:14:33.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use the pretrained model in an application?<p>I dont understand how to use the trained model.</p>
<p>For example I trained the model using the code fr... |
72,287,183 | How to assign a default parameter to a function aside of map parameter in dart<p>Any idea how to assign a default parameter to a function aside of <code>Map</code> parameter in dart?</p>
<pre><code>static Future functionName(
bool isDone,
[
Map<String, String> params,
]
) async {
....
}
</code></pre... | <p>A friend helped me with this and figured out that function args can take default values have to be given inside [] or {}, so this is how we pass it:</p>
<pre><code>static Future functionName(
[
Map<String, String> params,
bool isDone = false,
]
) async {
....
}
</code></pre>
<p>And call it like... | How to assign a default parameter to a function aside of map parameter in dart | flutter|dart | 0 | 72 | 2 | 72,287,818 | 72,287,818 | 0 | true | 2022-05-18T10:10:02.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to assign a default parameter to a function aside of map parameter in dart<p>Any idea how to assign a default parameter to a function aside of <code>Map<... |
72,387,804 | I am unable to open the excel file with pandas,<p>it displays the following error
<a href="https://i.stack.imgur.com/vX0wG.png" rel="nofollow noreferrer">this is the error</a>
well i have already tried with diffrent file but it doesnt work</p>
<pre><code>data1=pd.read_excel('second.xlsx',sheet_name="Sheet1")
... | <p>have you tried passing <code>engine="openpyxl"</code> argument?</p>
<p>P.S this is where I found the answer <a href="https://stackoverflow.com/a/50815107">https://stackoverflow.com/a/50815107</a></p> | I am unable to open the excel file with pandas, | excel|pandas|data-science | 0 | 72 | 1 | 72,387,928 | 72,387,928 | 0 | true | 2022-05-26T06:45:28.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I am unable to open the excel file with pandas,<p>it displays the following error
<a href="https://i.stack.imgur.com/vX0wG.png" rel="nofollow noreferrer">thi... |
72,274,381 | CAPL COM server (VBnet) - CANalyzer failed to open<p>i have issue when i try to run CANalyzer from vb.net more precisely at this point <code>canApp = New CANalyzer.Application</code>. visual basic display this :</p>
<p><em>System.InvalidCastException : 'Unable to cast COM object of type 'System.__ComObject' to interfac... | <p>in case you have installed several versions of CANAlyzer, VStudio will probably mismatch the keys for an interface identifier (IID); You have two or more keys for a same ID . In this case you have to delete the keys that doesn't match your CANalyzer version.</p>
<p>The steps to know the proper key and delete the wro... | CAPL COM server (VBnet) - CANalyzer failed to open | vb.net|capl|canalyzer | 0 | 72 | 1 | 72,287,110 | 72,287,110 | 0 | true | 2022-05-17T12:49:59.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CAPL COM server (VBnet) - CANalyzer failed to open<p>i have issue when i try to run CANalyzer from vb.net more precisely at this point <code>canApp = New CAN... |
72,252,258 | Cannot get React.js page to load and cannot figure out why<p>I know the handleChange and handleSubmit are not done but that is not the problem as even with removing those elements I can not get it to load. I am working through an older tutorial and some things are deprecated but I can not figure the problem with this p... | <pre><code>import React, {useState} from 'react';
</code></pre>
<p>There's an syntax error in React import</p> | Cannot get React.js page to load and cannot figure out why | javascript|reactjs|react-hooks|stripe-payments|deprecated | 1 | 72 | 2 | 72,252,574 | 72,252,574 | 0 | true | 2022-05-15T21:19:37.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot get React.js page to load and cannot figure out why<p>I know the handleChange and handleSubmit are not done but that is not the problem as even with r... |
72,383,621 | column clickable lambda block is not invoked on tap - jetpack compose<pre><code>Column(
Modifier
.padding(0.dp).clickable {
expanded = !expanded
}) {
OutlinedTextField(
value = selectedText,
readOnly = true,
onValueChange = {
selectedText = it
... | <p>The OutlinedTextField "steals" the tap event. Instead of using a click event, you can use the interactionSource to handle the event of that TextField.</p>
<p>Declare the interactionSource within the code where you want to catch the event and pass it to the OutlinedTextField.</p>
<pre><code>var expanded by ... | column clickable lambda block is not invoked on tap - jetpack compose | android|kotlin|android-layout|android-jetpack-compose|android-jetpack | 0 | 72 | 1 | 72,384,135 | 72,384,135 | 0 | true | 2022-05-25T20:09:26.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
column clickable lambda block is not invoked on tap - jetpack compose<pre><code>Column(
Modifier
.padding(0.dp).clickable {
expanded ... |
72,392,029 | Regex for capturing all the urls in a paragraph except for a specific domain<p>I need to capture all the urls in a paragraph apart from the urls from a specific domain/ sub domain.For example in the below paragraph I need to capture all the urls apart from example.com</p>
<p>"This is a paragraph name.url.com it co... | <p>This should be sufficient for your use case:</p>
<pre><code>/(?<!\S)(?:https?:\/\/)?(?:(?:(?!example)\w+[.-])+[a-z]{2,11})(?!\S)/gi
</code></pre>
<p>See <a href="https://regex101.com/r/NdOxKt/1" rel="nofollow noreferrer">https://regex101.com/r/NdOxKt/1</a> for a demonstration of the regex at work. Below is a roug... | Regex for capturing all the urls in a paragraph except for a specific domain | javascript|php|regex | 1 | 72 | 2 | 72,392,318 | 72,392,318 | 0 | true | 2022-05-26T12:44:39.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex for capturing all the urls in a paragraph except for a specific domain<p>I need to capture all the urls in a paragraph apart from the urls from a speci... |
72,367,320 | Add HSTS header to my domain but NOT add the header if the request is an API::P request<p>I used the Negated Regular Expressions in location but it does add the header but removes everything else that existed before. Even if I add it doesn’t consider the rest only hsts. I am not sure what is the best way to do this. ad... | <p>Because of performance considerations, avoid using regex whenever possible. Either use two locations duplicating everything else that cannot be moved one level up:</p>
<pre class="lang-none prettyprint-override"><code>location / {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains&quo... | Add HSTS header to my domain but NOT add the header if the request is an API::P request | nginx|nginx-config | 0 | 72 | 1 | 72,367,478 | 72,367,478 | 0 | true | 2022-05-24T17:49:04.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add HSTS header to my domain but NOT add the header if the request is an API::P request<p>I used the Negated Regular Expressions in location but it does add ... |
72,354,933 | bar plot in 3d following a given line<p>I want to draw a bar plot in 3d. I know how to do that using the following code:</p>
<pre><code>from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure(figsize=(10,10))
ax = fig.add_subplot(111, projection='3d')
nbins = 50
# for... | <p>One way to achieve that is by using <code>Poly3DCollection</code>: the idea is to compute the coordinates and orientation of each bar, then add it to the plot.</p>
<p>The position and orientation of each bar can be computed starting from a rectangle in 3D space and applying the appropriate transformation matrix.</p>... | bar plot in 3d following a given line | python|matplotlib|plot|3d|statistics | 0 | 72 | 1 | 72,360,492 | 72,360,492 | 0 | true | 2022-05-23T21:22:42.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
bar plot in 3d following a given line<p>I want to draw a bar plot in 3d. I know how to do that using the following code:</p>
<pre><code>from mpl_toolkits.mpl... |
72,309,637 | How to make a test case ignore the constructor in xUnit?<p>I have a test class that is using In Memory DB. So in the constructor we create the db context and pass it to the service constructor so that we can use this service instance in every test case:</p>
<pre><code>private readonly IService _service;
private readonl... | <p>There is <a href="https://stackoverflow.com/questions/16484839/get-name-of-running-test-in-xunit">no proper way to get a TestContext that would let you know which test it's for within the constructor</a>.</p>
<p>Best thing you can do is put another Test Class alongside (could even be in the same file) that houses th... | How to make a test case ignore the constructor in xUnit? | .net|unit-testing|xunit|xunit.net | 0 | 72 | 1 | 72,313,989 | 72,313,989 | 0 | true | 2022-05-19T18:43:44.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make a test case ignore the constructor in xUnit?<p>I have a test class that is using In Memory DB. So in the constructor we create the db context and... |
72,332,904 | print specific part of an array in java<p>I want to print part of an array where a number is given as the end of that array.
It's hard to explain with words so let me get straight to the point.
Let's say I have an array {1,...,6,...,9}. I want to return elements only from 1 to 6.
These numbers are not the indexes they ... | <p>You need to determine the position of your value in the array.
Then you can take the subarray from the start index to that position.
Plus one to include the searched value.</p>
<p>Unfortunately, there is no <code>indexOf</code> method for arrays and <code>Arrays.binarySearch</code> works only on sorted arrays. There... | print specific part of an array in java | java|arrays | -2 | 72 | 1 | 72,333,063 | 72,333,063 | 0 | true | 2022-05-21T20:10:13.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
print specific part of an array in java<p>I want to print part of an array where a number is given as the end of that array.
It's hard to explain with words ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.