question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
71,213,824 | Toogle state react react hooks<p>I'm trying to do a conditional rendering using hooks.
I use different component for each screen, and I would like to be able to toggle the state from the "parent" component using hooks.
How can I do this ?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-conso... | <p>First of all instead of this:</p>
<pre><code>const toogleHasAccount = () => {
setHasAccount((hasAccount) => !hasAccount)};
</code></pre>
<p>You dont have to use function inside so do this:</p>
<pre><code>const toogleHasAccount = () => {
setHasAccount(!hasAccount)};
</code></pre>
<p>If you want to use ... | Toogle state react react hooks | reactjs|react-hooks | 0 | 26 | 1 | 71,213,951 | 71,213,951 | 1 | true | 2022-02-21T22:36:04.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Toogle state react react hooks<p>I'm trying to do a conditional rendering using hooks.
I use different component for each screen, and I would like to be able... |
71,214,609 | Plotting financial/investment values over time<p>I am trying to compute the TPVI [(current value+dividends)/invested] over time of several companies in a dataframe.</p>
<p>My dataframe looks like this (dates in this example are not exact)</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th styl... | <p>One way to easily perform calculations on the different <code>Metric</code>s is to fist <code>tidyr::pivot_wider()</code> so they're each a separate column and then use your formula to make a new column with <code>dplyr::mutate()</code>. If you also supply <code>.keep = "unused"</code> to <code>mutate()</c... | Plotting financial/investment values over time | r|dataframe|dplyr|time-series|finance | 0 | 25 | 1 | 71,214,725 | 71,214,725 | 1 | true | 2022-02-22T00:35:05.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Plotting financial/investment values over time<p>I am trying to compute the TPVI [(current value+dividends)/invested] over time of several companies in a dat... |
71,214,675 | tkinter/datetime/weekday/dictionary/ type error : strptime() argument 1 must be str, not entry<ol>
<li><p>In function (def wky(event)), without 'global ab', it happens next error
message : 'UnboundLocalError'. And then, I used that words(global ab).
But, I wonder that that words is necessary? Without declare the globa... | <p>As the error said, <code>ab</code> is an <code>Entry</code> widget that cannot be used in <code>strptime()</code>. You need to use the value in the <code>Entry</code> widget instead.</p>
<p>Also better use another local variable to store the result of <code>strptime()</code> instead of using <code>ab</code>:</p>
<pr... | tkinter/datetime/weekday/dictionary/ type error : strptime() argument 1 must be str, not entry | dictionary|datetime|tkinter|global|weekday | 0 | 28 | 1 | 71,214,772 | 71,214,772 | 1 | true | 2022-02-22T00:49:19.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
tkinter/datetime/weekday/dictionary/ type error : strptime() argument 1 must be str, not entry<ol>
<li><p>In function (def wky(event)), without 'global ab', ... |
71,215,179 | Pulling in distinct vlaues for multiple columns<p>I have the following simple query. I am trying to have this query only pull distinct values for country,cost_Center,org_leader,and org_owner. The goal is to see how many unique instances of these occur as there are instances where there are multiple org owners for some ... | <p>The keyword <code>DISTINCT</code> will eliminate duplicates so the following query will return each combination present once.</p>
<pre><code>select DISTINCT
country,cost_center,
org_leader,
org_owner,
gearing_ratio_ref
from
wbr_na.hc_gearing_ratio_na
</code></pre>
<p>We can then use this query with a... | Pulling in distinct vlaues for multiple columns | sql | 0 | 23 | 3 | 71,215,289 | 71,215,289 | 1 | true | 2022-02-22T02:14:48.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pulling in distinct vlaues for multiple columns<p>I have the following simple query. I am trying to have this query only pull distinct values for country,cos... |
71,216,754 | rename the get_field_display in django serializer<p>i am trying to use the get_field_display function in Django in my serializer but I want to rename it to something else(consider it worker_role).
what should I do?</p>
<pre><code>class AdminUnsubscriberListSerializer(serializers.ModelSerializer):
worker_role= "... | <p>You could write it as
<code>worker_role = serializers.CharField(source="get_role_display")</code></p>
<p>also it supports nested lookups for example</p>
<p><code>worker_role = serializers.CharField(source="worker.get_role_display")</code></p> | rename the get_field_display in django serializer | django|django-rest-framework|django-serializer | 0 | 38 | 1 | 71,216,806 | 71,216,806 | 1 | true | 2022-02-22T06:25:08.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
rename the get_field_display in django serializer<p>i am trying to use the get_field_display function in Django in my serializer but I want to rename it to s... |
71,213,358 | Conditionally perform assertion<p>I would like to perform an assertion on a sampler only if certain conditions are met (i.e. variables and parameters have a specific value). The assertion should be ignored if the conditions are not met, not fail.</p>
<p>What are my options?</p>
<p>An if controller does not seem to work... | <p>I can only think of using <a href="https://jmeter.apache.org/usermanual/component_reference.html#JSR223_Assertion" rel="nofollow noreferrer">JSR223 Assertion</a> which allows you executing arbitrary <a href="https://groovy-lang.org/" rel="nofollow noreferrer">Groovy</a> code providing maximum flexibility.</p>
<p>Her... | Conditionally perform assertion | jmeter | 0 | 32 | 1 | 71,216,926 | 71,216,926 | 1 | true | 2022-02-21T21:41:32.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Conditionally perform assertion<p>I would like to perform an assertion on a sampler only if certain conditions are met (i.e. variables and parameters have a ... |
71,216,894 | Asp.Net Core - Control empty Excel cells to enter information in the database?<p>I use the EPPlus plugin to get information from Excel.The following code works perfectly, but how to control it when it gets an error after it reaches the empty Excel cell?</p>
<pre><code> public async Task<IActionResult> AddExcellHo... | <p>I assume you run into a null reference exception, because the cell value is null, then .ToString() cannot be called.</p>
<p>You could wrap everything in a seperate if-block:</p>
<pre class="lang-cs prettyprint-override"><code>if(worksheet.Cells[i, 1].Value != null)
{
MicrochipCode = worksheet.Cells[i, 1].Value.... | Asp.Net Core - Control empty Excel cells to enter information in the database? | asp.net-core | 0 | 28 | 1 | 71,216,991 | 71,216,991 | 1 | true | 2022-02-22T06:40:41.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Asp.Net Core - Control empty Excel cells to enter information in the database?<p>I use the EPPlus plugin to get information from Excel.The following code wor... |
71,217,462 | How to use the if else conditional loop?<p>I need some help in this conditional code.
In order to store the required data to the variable <code>paw</code>, I have three conditions.</p>
<ol>
<li>If <code>nameu</code> is not blank or empty and <code>empidu</code> is blank or empty, it should store the <code>Title : nameu... | <p>You should use logical AND operator (&&) to evaluate multiple expressions instead of bitwise AND (&)</p> | How to use the if else conditional loop? | reactjs|loops|if-statement|printing | 0 | 35 | 2 | 71,217,558 | 71,217,558 | 1 | true | 2022-02-22T07:34:49.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use the if else conditional loop?<p>I need some help in this conditional code.
In order to store the required data to the variable <code>paw</code>, I... |
71,217,650 | How to revert changes to deleted and then recreated file with same content in git to it's state in origin branch?<p>How to revert changes to deleted and then recreated file in git branch? I want these changes not to appear in <code>git diff</code> with <code>main</code> branch I've diverged from.</p>
<p>My steps were t... | <p>When you added the file you did not just undo an earlier removal. Notice these two lines in the provided output:</p>
<pre><code>deleted file mode 120000
</code></pre>
<p>and</p>
<pre><code>new file mode 100644
</code></pre>
<p>They mean that you deleted a symbolic link and added a regular file.</p>
<p>To undo the ea... | How to revert changes to deleted and then recreated file with same content in git to it's state in origin branch? | git | 0 | 21 | 1 | 71,217,740 | 71,217,740 | 1 | true | 2022-02-22T07:52:35.147Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to revert changes to deleted and then recreated file with same content in git to it's state in origin branch?<p>How to revert changes to deleted and then... |
71,217,607 | Utility for copying bucket data from one project to another in NodeJs<p>I need to copy data from one bucket in Project A in gCloud to another bucket in Project B. Any utility if present in NodeJs to do this?</p> | <p>You can use the <a href="https://cloud.google.com/storage/docs/copying-renaming-moving-objects#copy" rel="nofollow noreferrer">Cloud Storage Client Libraries</a>. To copy an object in one of your Cloud Storage buckets, see this sample code:</p>
<pre><code>const srcBucketName = 'your-source-bucket';
const srcFilename... | Utility for copying bucket data from one project to another in NodeJs | node.js|google-cloud-platform|google-cloud-storage | 0 | 256 | 2 | 71,218,003 | 71,218,003 | 1 | true | 2022-02-22T07:48:27.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Utility for copying bucket data from one project to another in NodeJs<p>I need to copy data from one bucket in Project A in gCloud to another bucket in Proje... |
71,213,743 | How does regex capture groups work on this particular log statement<p>I have constructed the regex for the below log statement and trying to add capture groups so that I can assign each group to a variable and print them. I am getting null values when I added parentheses as capture blocks. Is there away I can add captu... | <p>Try this:</p>
<pre><code>[0-9 ,.:-]+ [A-Z]{3}\|[0-9 ,.:-]+ [A-Z]{3} ([0-9a-f]+) \[(\w+) *].*?=([0-9a-f-]+).*?=(\w+).*?\] ([\w.]+).*?=([0-9-]+ [0-9:]+)
</code></pre>
<p>See <a href="https://rubular.com/r/ecR3QbqwfUfjLD" rel="nofollow noreferrer">live demo</a>.</p>
<hr />
<p>More readable format:</p>
<blockquote>
<p><... | How does regex capture groups work on this particular log statement | regex|regex-group | 0 | 36 | 2 | 71,218,348 | 71,218,348 | 1 | true | 2022-02-21T22:25:23.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does regex capture groups work on this particular log statement<p>I have constructed the regex for the below log statement and trying to add capture grou... |
71,177,370 | Directory Website - Use JS array to alphabetize then display in separate divs<p>I am trying to replace a directory website that we currently use Wix for. Whenever we have to add or remove a staff member it's a nightmare to re-sort/alphabetize the whole site manually.</p>
<p>What I am hoping to do is store everything in... | <p>You can achieve this via using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort" rel="nofollow noreferrer">Array.sort()</a> method and for the display cards you can use grid layout.</p>
<p><strong>Working Demo :</strong></p>
<p><div class="snippet" data-lang="js" d... | Directory Website - Use JS array to alphabetize then display in separate divs | javascript|css|arrays|json|directory | 0 | 13 | 2 | 71,218,386 | 71,218,386 | 1 | true | 2022-02-18T17:11:09.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Directory Website - Use JS array to alphabetize then display in separate divs<p>I am trying to replace a directory website that we currently use Wix for. Whe... |
71,211,615 | GCP GKE Kubernetes HPA: horizontal-pod-autoscaler failed to get memory utilization: missing request for memory. How to fix it?<p>I have a cluster in the Google Kubernetes Engine and want to make one of the deployments auto scalable by memory.</p>
<p>After doing a deployment, I check the horizontal scalation with the fo... | <p>When using the HPA with memory or CPU, you need to set resource requests for whichever metric(s) your HPA is using. See <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#how-does-a-horizontalpodautoscaler-work" rel="nofollow noreferrer">How does a HorizontalPodAutoscaler work</a>, s... | GCP GKE Kubernetes HPA: horizontal-pod-autoscaler failed to get memory utilization: missing request for memory. How to fix it? | kubernetes|google-cloud-platform|memory|google-kubernetes-engine|hpa | 0 | 536 | 1 | 71,218,597 | 71,218,597 | 1 | true | 2022-02-21T18:56:43.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GCP GKE Kubernetes HPA: horizontal-pod-autoscaler failed to get memory utilization: missing request for memory. How to fix it?<p>I have a cluster in the Goog... |
71,217,877 | what does the latin letter 'updown e' mean used in LSTM formular?<p>I come cross with formular contains such symbol a lot when I was reading articls about machine learning, it is a 'updown e' does anyone know what does it mean?</p>
<p>this one I got is from a artical about LSTM</p>
<p>I assume it is someting like delta... | <p>Oh, it is the symbol for a partial derivative if you have a function of with multiple variables, e.g. E=f(ω1,ω2,...). Check <a href="https://en.wikipedia.org/wiki/Partial_derivative#:%7E:text=In%20mathematics%2C%20a%20partial%20derivative,vector%20calculus%20and%20differential%20geometry" rel="nofollow noreferrer">h... | what does the latin letter 'updown e' mean used in LSTM formular? | machine-learning|lstm|bilstm | 0 | 21 | 1 | 71,218,601 | 71,218,601 | 1 | true | 2022-02-22T08:11:51.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what does the latin letter 'updown e' mean used in LSTM formular?<p>I come cross with formular contains such symbol a lot when I was reading articls about ma... |
71,177,169 | Markups Core enterEditMode() returning false<pre><code>function newMarkupGUI(viewer, options) {
Autodesk.Viewing.Extension.call(this, viewer, options);
thisViewerId = options.id;
this.viewer.loadExtension("Autodesk.Viewing.MarkupsCore").then(() => {
let extension = this.viewer.getExtension("... | <p>I think your problem is related to the <strong>viewer</strong> reference. You don't need to use <code>this.viewer</code> if you have your <code>viewer</code> as function parameter.</p>
<p>When using <code>viewer.loadExtension().then()</code> the loaded extension is returned in the promise.
You can do something like ... | Markups Core enterEditMode() returning false | autodesk-forge|autodesk-viewer|autodesk | 0 | 33 | 1 | 71,219,320 | 71,219,320 | 1 | true | 2022-02-18T16:54:00.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Markups Core enterEditMode() returning false<pre><code>function newMarkupGUI(viewer, options) {
Autodesk.Viewing.Extension.call(this, viewer, options);
... |
71,219,003 | discord bot isn't moving people when they deafen<p>Basically, I'm trying to get my bot to move people to afk as soon as they deafen but nothing happens when I test it. I have used console.log when someone deafens but still nothing.</p>
<p>code:</p>
<pre><code>const Discord = require("discord.js");
const clie... | <p>I originally thought that your question may have been a simple intents issue, however, upon further investigation it is an issue regarding your use of <code>newState.member.selfDeaf</code>. The corrected code is below with a short explanation:</p>
<p>Taking a look at the official Discord.js Documntation regarding <a... | discord bot isn't moving people when they deafen | discord.js | 0 | 41 | 1 | 71,219,824 | 71,219,824 | 1 | true | 2022-02-22T09:44:42.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
discord bot isn't moving people when they deafen<p>Basically, I'm trying to get my bot to move people to afk as soon as they deafen but nothing happens when ... |
71,214,867 | How do I get MeshResource.generateText() to anchor to something other than the camera using RealityKit?<p>I'm using RealityKit and SwiftUI to place 3DText on iOS but I can't get the text to anchor to a position. I stripped the project down to the bare essentials below and it still doesn't work. The box will anchor and ... | <p>After it's anchored, try printing out the bounding sphere of the text entity relative to the world space, to see if that's changing at all. Maybe print it a few times while moving around using a screen tap gesture etc.</p>
<p>I suspect the text object you're making is bigger than it looks and further away, making it... | How do I get MeshResource.generateText() to anchor to something other than the camera using RealityKit? | ios|swift|swiftui|augmented-reality|realitykit | 0 | 262 | 1 | 71,220,278 | 71,220,278 | 1 | true | 2022-02-22T01:20:39.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I get MeshResource.generateText() to anchor to something other than the camera using RealityKit?<p>I'm using RealityKit and SwiftUI to place 3DText on... |
71,220,330 | Delete registration after 24 hours if not confirmed (Rails, Devise)<p>Is there a way, maybe implemented and not seen by me, or somehow for gem 'Devise', to remove registrations of users that haven't confirmed their account for 24 hours?</p> | <p>Create your own async task and use <a href="https://github.com/javan/whenever" rel="nofollow noreferrer">Whenever</a> to plan it every minute to scope your users with something like</p>
<pre class="lang-rb prettyprint-override"><code>User.where(confirmed_at: nil).where('created_at < ?', 1.day.ago).destroy_all
</c... | Delete registration after 24 hours if not confirmed (Rails, Devise) | ruby-on-rails|devise | 0 | 19 | 1 | 71,220,450 | 71,220,450 | 1 | true | 2022-02-22T11:16:33.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Delete registration after 24 hours if not confirmed (Rails, Devise)<p>Is there a way, maybe implemented and not seen by me, or somehow for gem 'Devise', to r... |
71,219,767 | How to change font-size of vscode developer tool<p>The default font size of vscode developer tool (ctrl+shift+i) is too small for high dpi monitor and I want to make it bigger.
I do not find exact solution for it and I tried following related operations, but none of them works:</p>
<h4>1. Set Window: Zoom Level</h4>
<p... | <p>maybe you can try this.
...\Microsoft VS Code\resources\app\out\vs\workbench\workbench.desktop.main.css,
modify the font-size which is 11px to what you want .
(but it just effects the fonts in interface, not the variables in debug)</p>
<p>and is that ctrl+'+' not useful?
<a href="https://i.stack.imgur.com/U1jpt.png"... | How to change font-size of vscode developer tool | visual-studio-code|vscode-debugger | 0 | 537 | 1 | 71,220,600 | 71,220,600 | 1 | true | 2022-02-22T10:39:20.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change font-size of vscode developer tool<p>The default font size of vscode developer tool (ctrl+shift+i) is too small for high dpi monitor and I want... |
71,219,594 | Django OneToOneField Structure<p>I have been researching and looking through all the docs but I am still a bit confused, I think maybe because there are multiple ways to use the OnToOneField.</p>
<p>I have 4 models, Pregame, Ingame, Postgame and Game. And I want 'Game' to contain the other three models.</p>
<p>As of ri... | <p>First of all, you don't have to set <code>game_id</code> on the *game entities. You can just add <code>related_name</code>:</p>
<pre><code>class Game(models.Model):
game_id = models.CharField(max_length=10)
pregame = models.OneToOneField(
Pregame, on_delete=models.CASCADE, null=True, related_name=&qu... | Django OneToOneField Structure | python|django|postgresql|model|one-to-one | 0 | 30 | 1 | 71,220,842 | 71,220,842 | 1 | true | 2022-02-22T10:27:39.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django OneToOneField Structure<p>I have been researching and looking through all the docs but I am still a bit confused, I think maybe because there are mult... |
71,221,469 | build simple object from deeply nested array of objects<p>I'm having a hard time with this seemingly simple problem.
I understand that I can map through the main array and then map again through the items array but when I log the simpleObject variable I don't get anything returned.</p>
<p>I have an array of objects lik... | <p>An example using <code>flatMap</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 data = [ { id: 131186, name: "Section", items: [ { id: 40455, categories: [ { id:... | build simple object from deeply nested array of objects | javascript|arrays | 0 | 31 | 1 | 71,221,557 | 71,221,557 | 1 | true | 2022-02-22T12:38:12.803Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
build simple object from deeply nested array of objects<p>I'm having a hard time with this seemingly simple problem.
I understand that I can map through the ... |
71,221,540 | iteration trough the nested array with v-for<p>I have a question regarding v-for. I have an object like below:
<a href="https://i.stack.imgur.com/wNguk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wNguk.png" alt="enter image description here" /></a></p>
<p>and in dev console it look likes that:
<a... | <p><strong>Demo :</strong></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>new Vue({
el:"#app",
data:{
items: [{
messageSettings: [{
userOne: '1',
... | iteration trough the nested array with v-for | javascript|vue.js|google-cloud-firestore|quasar-framework | 0 | 26 | 1 | 71,221,896 | 71,221,896 | 1 | true | 2022-02-22T12:43:20.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
iteration trough the nested array with v-for<p>I have a question regarding v-for. I have an object like below:
<a href="https://i.stack.imgur.com/wNguk.png" ... |
71,221,738 | How to make a Plotly scatter plot without marker dots?<p>I am trying to create a series of hatched square PNGs - similarly to the swatches shown <a href="https://riccardoscalco.it/textures/" rel="nofollow noreferrer">here</a> towards the end of the page.</p>
<p>These are not for use on the web - so I think using textur... | <p>To plot without lines and without markers</p>
<pre class="lang-py prettyprint-override"><code>fig = go.Figure(go.Scatter(x=[ co[0] for co in xy ], y=[ co[1] for co in xy ],
fill="toself", mode='text'
))
</code></pre>
<p>To plot without markers but with lines</p>
<pre class="lang-... | How to make a Plotly scatter plot without marker dots? | python|plotly | 0 | 803 | 3 | 71,222,010 | 71,222,010 | 1 | true | 2022-02-22T12:57:35.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make a Plotly scatter plot without marker dots?<p>I am trying to create a series of hatched square PNGs - similarly to the swatches shown <a href="htt... |
71,221,785 | Polymorphic relationship with other polymorphic realtion?<p>I have <code>order</code> and <code>return</code> tables which have a <code>created_by</code> and <code>accepted_by</code> field where the corresponding user id is stored.
But now I would like to have multiple types for created_by and accepted_by instead of on... | <p>It would be 1:N polymorphic relationships so no need for an extra table. The structure can be found in <a href="https://laravel.com/docs/8.x/eloquent-relationships#one-to-many-polymorphic-relations" rel="nofollow noreferrer">the documentation</a></p>
<p>Your <code>Order</code> and <code>Return</code> model need to h... | Polymorphic relationship with other polymorphic realtion? | laravel | 0 | 17 | 1 | 71,222,080 | 71,222,080 | 1 | true | 2022-02-22T13:00:23.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Polymorphic relationship with other polymorphic realtion?<p>I have <code>order</code> and <code>return</code> tables which have a <code>created_by</code> and... |
71,221,818 | copy a file 10 times in jMeter<p>In order to copy an xml-file for my jMeter-test I created this groovy-script within a loop-controller named <code>LC</code></p>
<pre><code>number = (vars.get("__jm__LC__idx") as int) + 1; // get the current iteration and add 1
target = vars.get("fileName") + number;
... | <p>I don't know what <code>cp</code> is, if it's some custom function make sure that the class providing this function is in <a href="https://jmeter.apache.org/usermanual/get-started.html#classpath" rel="nofollow noreferrer">JMeter Classpath</a></p>
<p>If you don't have this <code>cp</code> implementation - the easiest... | copy a file 10 times in jMeter | groovy|jmeter|jmeter-5.0 | 0 | 32 | 1 | 71,222,204 | 71,222,204 | 1 | true | 2022-02-22T13:02:21.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
copy a file 10 times in jMeter<p>In order to copy an xml-file for my jMeter-test I created this groovy-script within a loop-controller named <code>LC</code><... |
71,220,763 | Best practice to limit DB text field just to prevent harm<p>There are some blog-articles in project I work, and,
I guess, its <code>text</code> field should be limited somehow
(probably it would be a JSON field one day)</p>
<p>There are no limitations in sense of domain -
user can write as much as he wants, but,
just t... | <p>This is an interesting question. If I understand correctly you are working on an application where the DB entry will essentially be a blog post (typically 500-1000 words based on most blogs I read).</p>
<p>You are storing the blog post as a text field in your database. You are quite reasonably worried about what hap... | Best practice to limit DB text field just to prevent harm | database|security|text | 0 | 42 | 1 | 71,222,373 | 71,222,373 | 1 | true | 2022-02-22T11:48:08.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best practice to limit DB text field just to prevent harm<p>There are some blog-articles in project I work, and,
I guess, its <code>text</code> field should ... |
71,222,460 | How to return blank and not 0, while mapping through a 2D array using GAS?<p>Right now, the code does divides each element by 100, so I can get it in the correct % format.
However, when the element iterated is blank, it gives me 0 while this would have to be blank and I can't seem to make it right:</p>
<p>The data in a... | <p>So add a check in the map to see if it has a value either with a truthy check</p>
<pre><code>return v[5] ? [v[5]/100] : '';
</code></pre>
<p>or check if it is undefined if the value can be zero.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-c... | How to return blank and not 0, while mapping through a 2D array using GAS? | javascript|google-apps-script|google-sheets|multidimensional-array|filter | 0 | 22 | 2 | 71,222,549 | 71,222,549 | 1 | true | 2022-02-22T13:49:37.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to return blank and not 0, while mapping through a 2D array using GAS?<p>Right now, the code does divides each element by 100, so I can get it in the cor... |
71,222,512 | How to create a column that returns the result of a function?<p>on a dataframe that contains the bitcoin price, I want to measure the strength of buyers and sellers.</p>
<p>For the uninitiated in trading, I use a price representation called 'Japanese candle' which takes into account the opening, closing, highest and lo... | <p>You are quite close. You can do this in a variety of ways in pandas, but one way would be:</p>
<pre><code> df['low_shadow'] = df.apply(lambda row: row['Open'] - row['Low']
if row['Close'] > row['Open']
else None,
axis=1)
</co... | How to create a column that returns the result of a function? | python|pandas | 0 | 272 | 3 | 71,222,802 | 71,222,802 | 1 | true | 2022-02-22T13:52:31.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a column that returns the result of a function?<p>on a dataframe that contains the bitcoin price, I want to measure the strength of buyers and ... |
71,218,338 | How to pass an onMouseEnter function into child component<p>I would like to update my parent component's state when hovering over a child component. Basically, this parent component consists of an <code>h1</code> and four components called <code>Box</code>. Each component has a <code>title</code> prop, which the compon... | <p>I created <a href="https://codesandbox.io/s/quirky-babbage-qefq5r?file=/src/App.js:51-1147" rel="nofollow noreferrer">codesendbox</a> where you can check the solution.</p>
<p>There were couple of issues in your code that I fixed there. Your <code>state</code> was not being displayed properly as title and there were ... | How to pass an onMouseEnter function into child component | reactjs | 0 | 26 | 1 | 71,223,618 | 71,223,618 | 1 | true | 2022-02-22T08:50:59.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass an onMouseEnter function into child component<p>I would like to update my parent component's state when hovering over a child component. Basicall... |
71,223,431 | How to type SubmitEvent so that event.target.children is known?<p>I have the following form:</p>
<pre><code><form id="search" method="post">
<input type="text" name="query" id="search-field"/>
</form>
</code></pre>
<p>And I want to attach a submit even... | <p>Since the event can happen on any HTML element it is tricky for TS to figure out on which element the event was triggered. You can help it by using a type assertion, it is not fancy and it feels "forced" but it works if you know that your event will be triggered only on a given HTML element.</p>
<p>With th... | How to type SubmitEvent so that event.target.children is known? | typescript | 0 | 15 | 1 | 71,223,685 | 71,223,685 | 1 | true | 2022-02-22T14:51:58.350Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to type SubmitEvent so that event.target.children is known?<p>I have the following form:</p>
<pre><code><form id="search" method="post&... |
71,222,366 | Reactive form validation for dynamic and hidden fields<p>First off, I have an Angular reactive form that has a button that can add another <code>FormArray</code> to the form. All validation good and working as expected. Things have gotten a little tricky when introducing another dynamic control to the already dynamic f... | <p>the best way to "clear/add Validators" really is enabled or disabled the formControls. Remember a formControl has as status one of this:</p>
<pre><code> type FormControlStatus = 'VALID' | 'INVALID' | 'PENDING' | 'DISABLED';
</code></pre>
<p>So we can simple enabled/disabled the FormControl. Futhermore, whe... | Reactive form validation for dynamic and hidden fields | javascript|angular|typescript|validation|angular-reactive-forms | 0 | 813 | 2 | 71,223,876 | 71,223,876 | 1 | true | 2022-02-22T13:41:48.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reactive form validation for dynamic and hidden fields<p>First off, I have an Angular reactive form that has a button that can add another <code>FormArray</c... |
71,212,473 | Displaying MSI version parts at the Wix Burn Bundle level (to display in title / caption)<p>I've discovered how to access the parts within the MSI/Product tag. But my goal was to set the caption of the burn installer based on the Major/Minor version number.</p>
<p>This code below is the summary of what I tried to do, b... | <p><code>!(bind.property.ProductVersion.Major)</code> is a bind variable when building an MSI, not a bundle. The available bind variables are documented at <a href="https://wixtoolset.org/documentation/manual/v3/overview/light.html" rel="nofollow noreferrer">https://wixtoolset.org/documentation/manual/v3/overview/light... | Displaying MSI version parts at the Wix Burn Bundle level (to display in title / caption) | wix|windows-installer|burn|wix3.11 | 0 | 36 | 1 | 71,224,780 | 71,224,780 | 1 | true | 2022-02-21T20:11:58.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Displaying MSI version parts at the Wix Burn Bundle level (to display in title / caption)<p>I've discovered how to access the parts within the MSI/Product ta... |
71,224,709 | Count the number of clients that have bought in different stores in my dataframe<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>client</th>
<th>product</th>
<th>store</th>
</tr>
</thead>
<tbody>
<tr>
<td>001</td>
<td>toy1</td>
<td>10</td>
</tr>
<tr>
<td>001</td>
<td>toy2</td>
<td>20</td>
</tr>
... | <p>Try this:</p>
<pre><code>new_df = df.groupby('client')['store'].count().value_counts().to_frame().sort_index().T.add_suffix(' store').reset_index(drop=True)
</code></pre>
<p>Output:</p>
<pre><code>>>> new_df
1 store 2 store 3 store
0 1 1 1
</code></pre> | Count the number of clients that have bought in different stores in my dataframe | python|pandas|dataframe | 0 | 29 | 2 | 71,224,810 | 71,224,810 | 1 | true | 2022-02-22T16:18:32.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Count the number of clients that have bought in different stores in my dataframe<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>clie... |
71,224,561 | Append 1st occurence of x to a list and break loop. However, if y occurs before x, append 1st occurrence of y, then ignore y until 1st occurence of x<p>I am iterating through a column in multiple dataframes <code>df1['values']</code>, <code>df2['values']</code>, and so on. The elements in <code>['values']</code> look l... | <p>You could do it like this:</p>
<pre><code>u = df['values'].unique()
u = u[u >= 3]
u = u[:(u == 4).argmax()+1]
</code></pre>
<p>Output (using first list):</p>
<pre><code>>>> u
array([3, 4])
</code></pre>
<p>Output (using second list):</p>
<pre><code>>>> u
array([4])
</code></pre> | Append 1st occurence of x to a list and break loop. However, if y occurs before x, append 1st occurrence of y, then ignore y until 1st occurence of x | python|pandas|dataframe|loops | 0 | 30 | 1 | 71,224,938 | 71,224,938 | 1 | true | 2022-02-22T16:09:32.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Append 1st occurence of x to a list and break loop. However, if y occurs before x, append 1st occurrence of y, then ignore y until 1st occurence of x<p>I am ... |
71,225,238 | Excel - Using start_date and end_date values with {=SUM(IF ...)}<p>I am trying to count data in a range named 'democracy' based on a date start and date end. I have attempted to get this done, but can't seem to fit the pieces together</p>
<p><strong>Component 1</strong></p>
<p>In the SumIf I have:</p>
<pre><code>{=SUM(... | <p>You could use SUMPRODUCT - something like:</p>
<pre><code>=SUMPRODUCT(SIGN(((democracy_highlighted=1)+(democracy_shown=1)))*(DateList>=$B$3)*( DateList<=$B$4))
</code></pre> | Excel - Using start_date and end_date values with {=SUM(IF ...)} | excel|excel-formula | 0 | 29 | 1 | 71,225,409 | 71,225,409 | 1 | true | 2022-02-22T16:54:20.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Excel - Using start_date and end_date values with {=SUM(IF ...)}<p>I am trying to count data in a range named 'democracy' based on a date start and date end.... |
71,218,445 | Formik Storybook: Objects are not valid as a React child<p>I am trying to add a storybook story for a TextFormField, the input field used in a form. I receive an error that reads <code>Objects are not valid as a React child (found: object with keys {}). If you meant to render a collection of children, use an array inst... | <p>Add this to Default.args:</p>
<pre><code>name: 'name'
</code></pre> | Formik Storybook: Objects are not valid as a React child | reactjs|react-hooks|formik|storybook | 0 | 289 | 1 | 71,225,510 | 71,225,510 | 1 | true | 2022-02-22T09:00:32.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Formik Storybook: Objects are not valid as a React child<p>I am trying to add a storybook story for a TextFormField, the input field used in a form. I receiv... |
71,225,305 | Combine 3 IF statements into one line (w/Index-Match)<p>I'm looking to have all 3 formulas combined into one single line. I'm having a hard time simplifying this without getting an error:</p>
<pre><code>=IF(C2="Products", IFERROR(INDEX('MMA Product List'!$A:$A,MATCH(E2, 'MMA Product List'!$B:$B,0)), "Not... | <p>You'll need to "nest" these <code>if</code> formulas, so that the third parameter instead of being "Not Found" is the next <code>If</code> formula. Something like:</p>
<pre><code>=IF(C2="Products", IFERROR(INDEX('MMA Product List'!$A:$A,MATCH(E2, 'MMA Product List'!$B:$B,0)), "Not ... | Combine 3 IF statements into one line (w/Index-Match) | excel|excel-formula | 0 | 22 | 1 | 71,225,514 | 71,225,514 | 1 | true | 2022-02-22T16:58:35.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Combine 3 IF statements into one line (w/Index-Match)<p>I'm looking to have all 3 formulas combined into one single line. I'm having a hard time simplifying ... |
71,225,638 | Trying to remove item from a list of pd.Series using pop but not working properly<p>I'm trying to make a class to find outliers in a dataset using statistics methods like interquantile range and zscore. I would like to know why some outliers get removed from my list of pd.Series and some not given the empty condition.<... | <p>In <code>remove_empty_items</code> you are modifying the <code>self.outliers</code> list while iterating over it. This causes undefined behaviour. Your code should create a new list instead of modifying the current one in place:</p>
<pre class="lang-py prettyprint-override"><code> def remove_empty_items(self):
... | Trying to remove item from a list of pd.Series using pop but not working properly | python|pandas|list|class|series | 0 | 20 | 1 | 71,225,827 | 71,225,827 | 1 | true | 2022-02-22T17:22:20.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to remove item from a list of pd.Series using pop but not working properly<p>I'm trying to make a class to find outliers in a dataset using statistics... |
71,223,807 | Return validity status for mobile numbers in Google Sheets<p>I've made a good attempt at creating a formula in Google Sheets, which returns one of four statuses based on the assessment of the mobile number provided in a column.</p>
<p>The four statues are:</p>
<ul>
<li>Valid [when number length matches lookup table val... | <p>Try this:</p>
<pre><code>=ARRAYFORMULA(
IF(
A2:A = "",,
REGEXMATCH(
REGEXEXTRACT(A2:A, "\s+(\d+)"),
"^\d{"
& VLOOKUP(
REGEXEXTRACT(A2:A, "\d+"),
FILTER(
{
TO_TEXT(Lookup!B2:B),
... | Return validity status for mobile numbers in Google Sheets | google-sheets|google-sheets-formula | 0 | 30 | 1 | 71,225,904 | 71,225,904 | 1 | true | 2022-02-22T15:17:40.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Return validity status for mobile numbers in Google Sheets<p>I've made a good attempt at creating a formula in Google Sheets, which returns one of four statu... |
71,225,070 | Listbox with Grid as ItemPanelTemplate: Problem with SharedSizeGroup<p>I have set up a <code>ListBox</code> where the items are another <code>ListBox</code>.
This allows me to bind an observable collection that contains a list.</p>
<p>I used an horizontal <code>StackPanel</code>as the <code>ItemsPanelTemplate</code> of... | <p>You have an outer <code>ListBox</code> that contains items which are itself <code>ListBox</code>es, which have a <code>Grid</code> as <code>ItemsPanel</code>. This <code>Grid</code> defines shared size groups. Putting the <code>Grid.IsSharedSizeScope="True"</code> attached property on the inner <code>ListB... | Listbox with Grid as ItemPanelTemplate: Problem with SharedSizeGroup | wpf|xaml|listbox|sharedsizegroup|issharedsizescope | 0 | 42 | 1 | 71,226,569 | 71,226,569 | 1 | true | 2022-02-22T16:41:06.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Listbox with Grid as ItemPanelTemplate: Problem with SharedSizeGroup<p>I have set up a <code>ListBox</code> where the items are another <code>ListBox</code>.... |
71,226,181 | How To Remove Brotli Compression and Gzip Compression from a Directory with .htaccess<p>My hosting plan is cPanel with OpenLiteSpeed instead of Apache. I turned on Compress All Content setting in cPanel. This appears to use gzip in some places, brotli in others. Now I need to prevent some directories from having this c... | <blockquote>
<p>cPanel with OpenLiteSpeed instead of Apache.</p>
</blockquote>
<p>I assume you mean the LiteSpeed Enterprise , as OpenLiteSpeed won't work with cPanel</p>
<pre><code><IfModule LiteSpeed>
SetEnv no-brotli
SetEnv no-gzip 1
</IfModule>
</code></pre>
<p>try this to <code>.htaccess</code> s... | How To Remove Brotli Compression and Gzip Compression from a Directory with .htaccess | apache|.htaccess|litespeed|brotli|openlitespeed | 0 | 268 | 1 | 71,226,916 | 71,226,916 | 1 | true | 2022-02-22T18:00:17.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How To Remove Brotli Compression and Gzip Compression from a Directory with .htaccess<p>My hosting plan is cPanel with OpenLiteSpeed instead of Apache. I tur... |
71,223,414 | credit note not appearing in dashboard but appears under contacts<p>I am trying to create a credit note via the api. I can do this successfully and i can see the response it creates the record. How ever this does not appear in the business under invoices but i can see it under the contact. How can i fix this so it appe... | <p>It looks to me like you are creating the wrong type of credit note. "ACCPAYCREDIT" would show up under "bills to pay" rather than invoices. You would want to be creating an "ACCRECCREDIT" for it to show up under invoices</p> | credit note not appearing in dashboard but appears under contacts | xero-api | 0 | 28 | 1 | 71,227,122 | 71,227,122 | 1 | true | 2022-02-22T14:50:25.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
credit note not appearing in dashboard but appears under contacts<p>I am trying to create a credit note via the api. I can do this successfully and i can see... |
71,220,209 | Menu Shortcut with two letters Ctrl+F+A<p>I know is possible to have a menu shortcut like Ctrl+Shift+F but I do not find a way to make something like Ctrl+F+A work. Is it even possible?</p> | <p>I don't believe so.<br />
If you look at the ´wx.AcceleratorEntry` you'll find:</p>
<blockquote>
<p>AcceleratorEntry(flags=0, keyCode=0, cmd=0, item=None)</p>
</blockquote>
<blockquote>
<p>flags (int) – A combination of the wx.AcceleratorEntryFlags values, which indicates which modifier keys are held down.</p>
</blo... | Menu Shortcut with two letters Ctrl+F+A | menu|wxpython | 0 | 17 | 1 | 71,227,230 | 71,227,230 | 1 | true | 2022-02-22T11:07:40.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Menu Shortcut with two letters Ctrl+F+A<p>I know is possible to have a menu shortcut like Ctrl+Shift+F but I do not find a way to make something like Ctrl+F+... |
71,226,086 | Websoket program in java is not responding<p>I'm practising WebSocket in java and wrote two simple programs which one of them is a server that starts listening in port 9090 and receives a string as input from the client then makes a string uppercase and returns back to the client.</p>
<p>The program has no error but fo... | <p>The server side is waiting to read a line from the client, it should work if you <strong>flush</strong> the <strong>PrintWriter</strong> on the client side:</p>
<pre><code>// Sent the input string to the server using 'out'
out.println(line);
out.flush();
</code></pre> | Websoket program in java is not responding | java|spring | 0 | 38 | 1 | 71,227,280 | 71,227,280 | 1 | true | 2022-02-22T17:53:04.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Websoket program in java is not responding<p>I'm practising WebSocket in java and wrote two simple programs which one of them is a server that starts listeni... |
71,207,980 | How to use environment variables with HarperDB cloud functions?<p>How to make use of environment variables in HarperDB cloud functions? I have a secret value that I need to save secretly as an env variable. Adding a <code>.env</code> file and using <code>dotenv</code> library to read the value doesn't seem to work in t... | <p>The Custom Function server is managed by HarperDB, so it looks for a <code>.env</code> file located at HarperDB's root.</p>
<p>The solution is to set the <code>path</code> value when you invoke <code>dotenv</code>config :</p>
<pre><code>require('dotenv').config({ path: '/path/to/hdb/custom_functions/myproject/.env' ... | How to use environment variables with HarperDB cloud functions? | javascript | 0 | 38 | 1 | 71,227,893 | 71,227,893 | 1 | true | 2022-02-21T14:26:53.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use environment variables with HarperDB cloud functions?<p>How to make use of environment variables in HarperDB cloud functions? I have a secret value... |
71,221,552 | How do I clear the print area in Office.js?<p>Is there a way to clear the print area in Office.js? I have already tried setPrintArea(null) to do this, but that doesn't work.</p> | <p>Try to pass an empty string to the <a href="https://docs.microsoft.com/en-us/javascript/api/excel/excel.pagelayout?view=excel-js-preview#excel-excel-pagelayout-setprintarea-member(1)" rel="nofollow noreferrer">setPrintArea</a> method.</p> | How do I clear the print area in Office.js? | javascript|printing|office-js|office-addins | 0 | 25 | 1 | 71,228,175 | 71,228,175 | 1 | true | 2022-02-22T12:43:58.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I clear the print area in Office.js?<p>Is there a way to clear the print area in Office.js? I have already tried setPrintArea(null) to do this, but th... |
71,227,972 | Updating height of widgets in React through class name available in DOM<p>I am using a widget in my React app which does not have a height attribute. However, I can edit the div that shows up in my DOM to fit my needs. I can not access that div thorough my code to adjust the height.
This is my widget:</p>
<pre><code>&l... | <p>To overwrite css that is in a <code>style</code> attribute you need to use <code>!important</code>
try this:</p>
<pre class="lang-css prettyprint-override"><code>.tv-lightweight-charts {
height: 22px !important;
}
</code></pre> | Updating height of widgets in React through class name available in DOM | javascript|reactjs | 0 | 23 | 2 | 71,228,388 | 71,228,388 | 1 | true | 2022-02-22T20:35:38.310Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Updating height of widgets in React through class name available in DOM<p>I am using a widget in my React app which does not have a height attribute. However... |
71,228,010 | Plotting two counter objects on one with matplotlib<p>I have two counter objects and I want to plot them onto one histogram. I have this code:</p>
<pre><code>func1_list = ['intronic', 'exonic', 'intronic', 'intronic','exonic', 'intronic', 'intronic']
func2_list = ['intronic', 'intronic','exonic', 'intronic','intronic',... | <p>I ran your code. I turns out that <code>df</code> looks like</p>
<pre><code> intronic exonic
intronic 5 2
exonic 5 2
</code></pre>
<p>and <code>df2</code> is similar, just with <code>6</code> in the first column instead of <code>5</code>. I'm not sure why each DataFrame would ... | Plotting two counter objects on one with matplotlib | python|matplotlib | 0 | 39 | 1 | 71,228,828 | 71,228,828 | 1 | true | 2022-02-22T20:39:27.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Plotting two counter objects on one with matplotlib<p>I have two counter objects and I want to plot them onto one histogram. I have this code:</p>
<pre><code... |
71,207,898 | Represent postal addresses in Cloud Spanner<p>How would one represent postal addresses in Cloud Spanner so that they are consistent with the proto defined in <a href="https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto" rel="nofollow noreferrer">postal_address.proto</a>? I want to read... | <p>It sounds like your use case is a good fit for JSON type which Cloud Spanner now supports. You should be able to create a corresponding JSON representation for the <a href="https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto" rel="nofollow noreferrer">postal_address.proto</a> that y... | Represent postal addresses in Cloud Spanner | google-cloud-platform|google-cloud-spanner | 0 | 24 | 1 | 71,228,899 | 71,228,899 | 1 | true | 2022-02-21T14:22:09.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Represent postal addresses in Cloud Spanner<p>How would one represent postal addresses in Cloud Spanner so that they are consistent with the proto defined in... |
71,228,523 | How do I hide the headline when the content underneath it is not visible<p>I have an application in JavaScript with a very long list of 'Day-items', separated by a header specifying the month, like so:</p>
<pre><code><h3>January 2022</h3>
<div class="item" data-visitors='1'>2022-01-01</di... | <p>You might traverse the items from the bottom to the top, checking if all of the group after <code>h3</code> were hidden, then hide the <code>h3</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 p... | How do I hide the headline when the content underneath it is not visible | javascript|html|dom | 0 | 42 | 2 | 71,228,978 | 71,228,978 | 1 | true | 2022-02-22T21:27:50.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I hide the headline when the content underneath it is not visible<p>I have an application in JavaScript with a very long list of 'Day-items', separate... |
71,229,476 | Monitoring for the spark-jobserver<p>I'm currently working with spark-jobserver, and when the spark-jobserver goes down my app just stop working but I don't get notified</p>
<p>There is a health check to spark-jobserver?</p> | <p>If the service goes down, it also wouldn't notify. Therefore, there isn't a built-in option for this.</p>
<p>Ideally you'd use external monitoring like Prometheus Blackbox exporter, Nagios, or simply <code>cron</code> to <code>curl</code>/<code>netcat</code> your service.</p> | Monitoring for the spark-jobserver | apache-spark|spark-jobserver | 0 | 14 | 1 | 71,229,500 | 71,229,500 | 1 | true | 2022-02-22T23:15:06.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Monitoring for the spark-jobserver<p>I'm currently working with spark-jobserver, and when the spark-jobserver goes down my app just stop working but I don't ... |
71,229,600 | How to merge next rows' start with current rows' end in Python<p>For example if I have a DataFrame that looks like this</p>
<p><a href="https://i.stack.imgur.com/Ttkkk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ttkkk.png" alt="enter image description here" /></a></p>
<p>For the same id and Categ... | <p>You could use <code>groupby</code> + <code>agg</code> where you call <a href="https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.GroupBy.first.html" rel="nofollow noreferrer"><code>first</code></a> on "start" and <a href="https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.GroupB... | How to merge next rows' start with current rows' end in Python | python|pandas|dataframe|pandas-groupby|data-manipulation | 0 | 39 | 1 | 71,229,621 | 71,229,621 | 1 | true | 2022-02-22T23:32:26.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to merge next rows' start with current rows' end in Python<p>For example if I have a DataFrame that looks like this</p>
<p><a href="https://i.stack.imgur... |
71,227,631 | Kafka Connect: When sinking happens?<p>Suppose I have a topic named <code>orders</code> which has two consumer groups and I want to sink it to a MySQL database. Does sink connector waits for those two consumers to finish their job then sink the data or it doesn't care and starts the sink?</p> | <p>Sink connectors create their own consumer group.</p>
<p>Consumer groups are independent of one another; there is no waiting.</p> | Kafka Connect: When sinking happens? | apache-kafka|apache-kafka-connect | 0 | 41 | 1 | 71,229,622 | 71,229,622 | 1 | true | 2022-02-22T20:03:20.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kafka Connect: When sinking happens?<p>Suppose I have a topic named <code>orders</code> which has two consumer groups and I want to sink it to a MySQL databa... |
71,229,586 | Pandas: Finding maxima of 2d data (integers) in Dataframe<p>I have a 2d data set of <code>(x,y)</code>. <code>x</code> and <code>y</code> are integer values.</p>
<p>How can I use only Pandas code to find all <code>x</code> values where <code>y</code> reaches its maximum values (there are multiple and same absolute maxi... | <p>Get the <code>Axes</code> returned by <code>df.plot</code> and reuse it to plot the maxima values:</p>
<pre><code>ax = df.plot(x='x', y='y', figsize=(8, 4), ylabel='y', legend=False, style=['b-'])
df_ymax.plot.scatter(x='x', y='y', color='r', ax=ax)
</code></pre>
<p><a href="https://i.stack.imgur.com/7SENu.png" rel=... | Pandas: Finding maxima of 2d data (integers) in Dataframe | python|pandas|numpy | 0 | 33 | 1 | 71,229,631 | 71,229,631 | 1 | true | 2022-02-22T23:30:34Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas: Finding maxima of 2d data (integers) in Dataframe<p>I have a 2d data set of <code>(x,y)</code>. <code>x</code> and <code>y</code> are integer values.... |
71,229,241 | Passing full bus with high impedance on some lines VS passing part of the bus<p>Do these codes are the same (in terms of functionality and number of gates) ?</p>
<pre><code>module Test1(
input enable,
output [1:0] bus
);
assign bus[1:0] = (enable) ? 2'b0 : 2'bZ;
endmodule
</code></pre>
<p>And... | <p>Unconditionally assigning <code>'bZ</code> to a net is essentially a NOP. So the two modules are identical in functionalty.</p> | Passing full bus with high impedance on some lines VS passing part of the bus | verilog | 0 | 38 | 1 | 71,229,849 | 71,229,849 | 1 | true | 2022-02-22T22:43:43.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Passing full bus with high impedance on some lines VS passing part of the bus<p>Do these codes are the same (in terms of functionality and number of gates) ?... |
71,227,389 | Increase vCPUS/RAM if needed<p>I have create a AWS EC2 instance to run a computation routine that works for most cases, however every now and then I get an user that needs to run a computation routine that crashes my program due to lack of RAM.</p>
<p>Is it possible to scale the EC2 instance's RAM and or vCPUs if requi... | <p>It is not possible to adjust the amount of vCPUs or RAM on an Amazon EC2 instance.</p>
<p>Instead, you must:</p>
<ul>
<li><strong>Stop</strong> the instance</li>
<li>Change the <strong>Instance Type</strong></li>
<li><strong>Start</strong> the instance</li>
</ul>
<p>The virtual machine will be provisioned on a diffe... | Increase vCPUS/RAM if needed | amazon-web-services|amazon-ec2 | 0 | 43 | 1 | 71,229,925 | 71,229,925 | 1 | true | 2022-02-22T19:43:34.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Increase vCPUS/RAM if needed<p>I have create a AWS EC2 instance to run a computation routine that works for most cases, however every now and then I get an u... |
71,229,524 | Splitting xml document based on a child node<p>I want to split an xml document using an XSLT (version 2.0/3.0 supported), based on a child node. in the example provided below, it should be based on Item node.</p>
<p>Basically, when we split, the Item node will carry all the ancestors above it, but not the root element... | <p>You basically want</p>
<pre><code><xsl:template match="Order">
<List>
<xsl:copy-of select="../Header">
<xsl:copy-of select=".">
</List>
</xsl:template>
</code></pre>
<p>plus a top-level rule to construct the <code>Root</code> element.</p>
... | Splitting xml document based on a child node | xslt | 0 | 34 | 1 | 71,230,116 | 71,230,116 | 1 | true | 2022-02-22T23:22:28.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Splitting xml document based on a child node<p>I want to split an xml document using an XSLT (version 2.0/3.0 supported), based on a child node. in the exam... |
71,224,706 | Allow user for color selection in rshiny plots<p>My shinyApp generates boxplots for one continous and one categorical variable.
I would like the user to be able to select the colors of the boxplots.</p>
<p>To do this, the approach was to generate a color picker based on the number of categories of the categorical varia... | <p>There are a couple of issues here. If the <code>pickerInput()</code> is hidden your color selection is null at the beginning and therefore you cannot use the colors in your plot. In addition, as <code>multiple = T</code> from a list of choices, you need to use <code>input$colorvar1[[1]]</code> and not <code>input$... | Allow user for color selection in rshiny plots | r|plot|shiny | 0 | 43 | 1 | 71,230,289 | 71,230,289 | 1 | true | 2022-02-22T16:18:16.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Allow user for color selection in rshiny plots<p>My shinyApp generates boxplots for one continous and one categorical variable.
I would like the user to be a... |
71,229,737 | Making a grouped barchart with matplotlib,<p>I want to make a bar chart where netwrok is in the x axis and spend is in the y axis, but I also want to group the bar chart of the same network together, even if they have the same month, how can i do this? some of the networks do not have spend one whole month This will be... | <p>You can try to pivot your dataframe and then plot. Consider this code: </p>
<pre><code>import pandas as pd
import matplotlib.pyplot as plt
d = {'month': [9,9,10,9,9], 'network': ['CNBC', 'BBC', 'BBC', 'Com', 'BLOM'], 'spend': [24,10,10,10,10]}
df = pd.DataFrame(data=d)
df = df.pivot(index='network', columns='month... | Making a grouped barchart with matplotlib, | python|sql|pandas | 0 | 23 | 1 | 71,230,375 | 71,230,375 | 1 | true | 2022-02-22T23:49:35.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Making a grouped barchart with matplotlib,<p>I want to make a bar chart where netwrok is in the x axis and spend is in the y axis, but I also want to group t... |
71,230,758 | How to convert print output to pyspark dataframe (no pandas allowed)<p>The usual code</p>
<pre><code>print((sparkdf.count(), len(sparkdf.columns)))
</code></pre>
<p>Since I using HDFS system that fully on HDFS, no pandas allowed, The output I need</p>
<pre><code>|-------|-------|
|row |columns|
|-------|-------|
|15... | <p>Just use <code>spark.createDataFrame</code> and pass the values as a list of tuple:</p>
<pre><code>spark.createDataFrame([(sparkdf.count(), len(sparkdf.columns))], schema=['rows', 'columns'])
</code></pre> | How to convert print output to pyspark dataframe (no pandas allowed) | dataframe|pyspark | 0 | 35 | 1 | 71,230,938 | 71,230,938 | 1 | true | 2022-02-23T02:41:20.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert print output to pyspark dataframe (no pandas allowed)<p>The usual code</p>
<pre><code>print((sparkdf.count(), len(sparkdf.columns)))
</code></... |
71,231,535 | Bash regex extract value inside a quotes after a specific string<p>I'd like to extract the value of "job" inside a console text taken from curl, it's : <code>ix90CvhtaWfMhNiIy3RDbr2lJ2pRzGxBqHSiDq5OcI</code></p>
<pre><code>95 28.2M 0 0 95 27.0M 0 1091k 0:00:26 0:00:25 0:00:01 2910k
100 28.2... | <p>No need for grep if you are using awk, try this:</p>
<pre><code>curl -v --silent 'link-to-consoleText' 2>/dev/null | awk -F'"' '/job/ {print $4}'
</code></pre> | Bash regex extract value inside a quotes after a specific string | regex|bash | 0 | 25 | 2 | 71,231,576 | 71,231,576 | 1 | true | 2022-02-23T04:51:51.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bash regex extract value inside a quotes after a specific string<p>I'd like to extract the value of "job" inside a console text taken from curl, it... |
71,226,673 | Concourse: Option to run all taks regardless of failure state<p>Wanted to know if there is any flag/option for concourse tasks inside a single job so that all tasks gets executed regardless of any task failing.</p>
<p>Thanks!</p> | <p>Totally. By default, tasks run sequentially. If you want them to run independently of the sequence place them in the <code>in_parallel</code> key, like in the following pipeline:</p>
<pre><code>jobs:
- name: parallel-tasks
plan:
- in_parallel:
- task: failing-task
config:
platform: ... | Concourse: Option to run all taks regardless of failure state | concourse|concourse-pipeline|concourse-task | 0 | 290 | 1 | 71,231,738 | 71,231,738 | 1 | true | 2022-02-22T18:39:16.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Concourse: Option to run all taks regardless of failure state<p>Wanted to know if there is any flag/option for concourse tasks inside a single job so that al... |
71,224,502 | How to get href from a class containing a specific text using CSS selector (Scrapy)<p>I am working with the following web site: <a href="https://inmuebles.mercadolibre.com.mx/venta/" rel="nofollow noreferrer">https://inmuebles.mercadolibre.com.mx/venta/</a>, and I am trying to get the link from "ver_todos" bu... | <p>I think xpath is easier to select the target elements in most cases:</p>
<h2>Code:</h2>
<pre class="lang-py prettyprint-override"><code>xpath = "//div[contains(text(), 'Inmueble')]/following-sibling::ul//a[contains(@class,'ui-search-modal__link')]/@href"
url = response.xpath(xpath).extract()[0]
</code></pr... | How to get href from a class containing a specific text using CSS selector (Scrapy) | python|css|regex|web-scraping|scrapy | 0 | 272 | 2 | 71,231,739 | 71,231,739 | 1 | true | 2022-02-22T16:05:49.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get href from a class containing a specific text using CSS selector (Scrapy)<p>I am working with the following web site: <a href="https://inmuebles.me... |
71,231,903 | Merging two dataframes with a common and uncommon keys in Pandas<p>I have the below dataframes that I would like to merge. Merge df2 to df1.</p>
<pre><code>df1 = {'ID1': ['A12', 'A13', 'A14','A15'], 'ArrivalDateTime': ["2021-09-20", "2021-09-21", "2021-09-26","2022-01-20"]}
df2... | <p>Use <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.merge_asof.html" rel="nofollow noreferrer"><code>merge_asof</code></a> first:</p>
<pre><code>df = pd.merge_asof(df1,
df2.sort_values('ArrivalDateCap'),
left_by='ID1',
right_by='ID... | Merging two dataframes with a common and uncommon keys in Pandas | python|pandas | 0 | 30 | 1 | 71,232,035 | 71,232,035 | 1 | true | 2022-02-23T05:45:38.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Merging two dataframes with a common and uncommon keys in Pandas<p>I have the below dataframes that I would like to merge. Merge df2 to df1.</p>
<pre><code>d... |
71,230,365 | What is the most efficient way to grab and store part of a given string between keywords with python?<p>I have an array of keywords:</p>
<p><code>keyword_list = ['word1', 'anotherWord', 'wordup', 'word to your papa']</code></p>
<p>I have a string of text:</p>
<p><code>string_of_text = 'So this is a string of text. I w... | <p>you could try something like this:</p>
<pre><code>keyword_list = ['word1', 'anotherWord', 'wordup', 'word to your papa']
string_of_text = """So this is a string of text. I want to talk about anotherWord...\
and then I'm going to say something I've been meaning to say "wordup&q... | What is the most efficient way to grab and store part of a given string between keywords with python? | python|string|list|loops | 0 | 30 | 1 | 71,232,084 | 71,232,084 | 1 | true | 2022-02-23T01:36:45.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the most efficient way to grab and store part of a given string between keywords with python?<p>I have an array of keywords:</p>
<p><code>keyword_lis... |
71,231,555 | Querying Dynamics 365 for all salesorderdetails associated with a particular salesorder<p>I'm trying to get all <code>salesorderdetails</code> associated with a particular <code>salesorder</code> by sending a GET request to the following path:</p>
<pre><code>$"{orgname}/api/data/v9.1/salesorderdetails?$select=sale... | <p>The correct syntax in your case would be:</p>
<p><code>$"{orgname}/api/data/v9.1/salesorderdetails?$select=salesorderdetailid&$filter=_salesorderid_value eq {salesOrderId}";</code></p>
<p>because <code>salesorderid</code> is a lookup.</p>
<p>You can also use my tool <a href="https://github.com/GuidoPre... | Querying Dynamics 365 for all salesorderdetails associated with a particular salesorder | dynamics-crm | 0 | 32 | 1 | 71,232,120 | 71,232,120 | 1 | true | 2022-02-23T04:54:26.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Querying Dynamics 365 for all salesorderdetails associated with a particular salesorder<p>I'm trying to get all <code>salesorderdetails</code> associated wit... |
71,227,964 | Why are cached images from Firebase Storage slower than others?<p>I was experimenting with getting images from Firebase Storage as opposed to hosting them as an asset alongside my Angular project. I am hosting the project with Firebase as well.</p>
<p>I found that after an image is cached, it still takes upwards of 400... | <p>It is expected that it is longer for Firebase Storage because the Firebase access is doing more work, and it does an authorization check to make sure that it has a token that proves the access was allowed by the Security Rules. Additionally, you can check on <a href="https://cloud.google.com/storage/docs/metadata#ca... | Why are cached images from Firebase Storage slower than others? | firebase|caching|google-cloud-storage|firebase-storage|browser-cache | 0 | 301 | 1 | 71,233,035 | 71,233,035 | 1 | true | 2022-02-22T20:34:44.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why are cached images from Firebase Storage slower than others?<p>I was experimenting with getting images from Firebase Storage as opposed to hosting them as... |
71,233,672 | getting first value of the groups in Pandas<p>I have a DataFrame and want to generate a report on it.</p>
<p>Sample data</p>
<pre><code>data = {
'Date': {0: '2021-01-04 10:45:00',
1: '2021-01-04 10:45:00',
2: '2021-01-05 11:15:00',
3: '2021-01-05 11:15:00',
4: '2021-01-06 12:15:00',
5: '2021-01-06 12:15:00'}... | <p>If magic function count new columns from multiple input columns then <code>agg</code> is not possible use.</p>
<p>Then select first value by indexing:</p>
<pre><code>def magic(x):
result = {
'Action' : x['Action'].iat[0]
'Profit': x['Profit'].sum()
}
return pd.Series(result)
</code></pre> | getting first value of the groups in Pandas | python|pandas|dataframe|pandas-groupby | 0 | 31 | 2 | 71,233,747 | 71,233,747 | 1 | true | 2022-02-23T08:37:24.513Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
getting first value of the groups in Pandas<p>I have a DataFrame and want to generate a report on it.</p>
<p>Sample data</p>
<pre><code>data = {
'Date': {0:... |
71,233,818 | Ignore Turkish Characters On Firestore Query<p>I have a .net app that uses Firestore as a database and It's using Firestore Query to find some data. The problem is data fields that include Turkish characters but if someone uses my app and wants to search for data and if don't use Turkish characters, the query can not f... | <p>Firestore queries always return documents where a particular field holds a perfect match. If you want to be able to search for "Ertuğrul" as well as for "Ertugrul", then besides the "NameSurname" field you should consider adding a new field called "NameSurnameWithoutSpecialCharacte... | Ignore Turkish Characters On Firestore Query | firebase|google-cloud-platform|google-cloud-firestore | 0 | 40 | 1 | 71,234,067 | 71,234,067 | 1 | true | 2022-02-23T08:49:54.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ignore Turkish Characters On Firestore Query<p>I have a .net app that uses Firestore as a database and It's using Firestore Query to find some data. The prob... |
71,232,402 | Is there a numpy way of looping/getting sub arrays of an array to extract info?<p>First of all, thank you for the time you took to answer me.</p>
<p>To give <strong>a little example</strong>, I have a huge dataset (n instances, 3 features) like that:</p>
<p><code>data = np.array([[7.0, 2.5, 3.1], [4.3, 8.8, 6.2], [1.1,... | <p>You could start from and easier variant of this problem:</p>
<p><em><strong>Given <code>arr</code> and its label, could you find a minimum and maximum values of <code>arr</code> items in each group of labels?</strong></em></p>
<p>For instance:</p>
<pre><code>arr = np.array([55, 7, 49, 65, 46, 75, 4, 54, 43, 54])
l... | Is there a numpy way of looping/getting sub arrays of an array to extract info? | python-3.x|numpy | 0 | 38 | 2 | 71,234,115 | 71,234,115 | 1 | true | 2022-02-23T06:45:22.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a numpy way of looping/getting sub arrays of an array to extract info?<p>First of all, thank you for the time you took to answer me.</p>
<p>To give ... |
71,234,144 | Input tag not giving correct output<p>What I want is, on button click the sum of value in two input texts should be consoled, but for Any value for two input texts that I give, it always gives 0,0 as output, what am I doing wrong? And since both of them are 0, their sum is also becoming 0.
<strong>HTML</strong></p>
<p... | <p>You need to get the latest value of the input on click of the button</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>document.getElementById("add").addEventListener("click",... | Input tag not giving correct output | javascript|html|css | 0 | 22 | 2 | 71,234,179 | 71,234,179 | 1 | true | 2022-02-23T09:11:57.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Input tag not giving correct output<p>What I want is, on button click the sum of value in two input texts should be consoled, but for Any value for two input... |
71,234,182 | I want to write regex that starts and end with numbers and letters only but can have special character hyphen, underscore and space in between<p>I tried writing this: ^[A-Za-z0-9-<em>][A-Za-z0-9-</em> ]{1,30}$
But the regex should not start and end with a special character or space.</p>
<p>Sample values It should allow... | <p>One option would be to use:</p>
<pre><code>^(?!.{31})[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$
</code></pre>
<p>See an online <a href="https://regex101.com/r/Kvj0pP/1" rel="nofollow noreferrer">demo</a>. The negative lookahead will prevent over 30 characters while the non-capture group allows for multiple groups of charac... | I want to write regex that starts and end with numbers and letters only but can have special character hyphen, underscore and space in between | regex | 0 | 29 | 2 | 71,234,232 | 71,234,232 | 1 | true | 2022-02-23T09:14:10.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to write regex that starts and end with numbers and letters only but can have special character hyphen, underscore and space in between<p>I tried writ... |
71,232,919 | How to implement an override method of implemented interfaces with the same signature in java. And give different implementations for each interface<p>Let's say I have two interfaces InterfaceA and InterfaceB with the same method signature.
InterfaceA:</p>
<pre><code>public interface InterfaceA {
void printInterfac... | <p>Since the method is not aware of the context (a.printInterfaceName() or b.printInterfaceName()), it will not be possible to distinguish between both of them and print <em>INTERFACE-A</em> or <em>INTERFACE-B</em>.</p>
<p>As far as I know, neither reflection nor instanceof can do the trick. Having default Methods in t... | How to implement an override method of implemented interfaces with the same signature in java. And give different implementations for each interface | java|interface|multiple-inheritance | 0 | 38 | 1 | 71,234,378 | 71,234,378 | 1 | true | 2022-02-23T07:36:59.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to implement an override method of implemented interfaces with the same signature in java. And give different implementations for each interface<p>Let's ... |
71,233,745 | 2 permission requests appear one after another?<p>My code is supposed to ask two permission right after another but some how it show 2 permission requests one after another.</p>
<p>What do I have to do to fix this?</p>
<pre><code>Future<void> checkContactPermission() async {
var status = await Permission.contac... | <p>You are checking the outdated status here</p>
<pre><code>if (status.isDenied) {
PermissionStatus permissionStatus = await Permission.contacts.request();
}
</code></pre>
<p>Refresh the status before using checking again</p>
<pre><code>Future<void> checkContactPermission() async {
var status = await Permissi... | 2 permission requests appear one after another? | flutter|flutter-packages | 0 | 26 | 1 | 71,234,894 | 71,234,894 | 1 | true | 2022-02-23T08:43:45.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
2 permission requests appear one after another?<p>My code is supposed to ask two permission right after another but some how it show 2 permission requests on... |
71,235,493 | Converting data type of values in a column of dataframe<p>I have implemented ANN regression on a dataset. The actual values and results are present in a dataframe. I want to calculate bias for each observation. However, the predictions are collected as given below.
Consider df (after adding the results i.e., column pre... | <p>If in case you ANN is giving you a result as a list strings <code>predicted=['[11.14]','[33.6]','[66.7]']</code> then you will need to use <code>ast</code> to convert list of strings to literal list of lists.</p>
<pre><code>import pandas as pd
import ast
actual=[[11.4],[32.46],[66.37]]
df = pd.DataFrame(actual,colum... | Converting data type of values in a column of dataframe | python|pandas|dataframe | 0 | 33 | 1 | 71,235,767 | 71,235,767 | 1 | true | 2022-02-23T10:46:38.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Converting data type of values in a column of dataframe<p>I have implemented ANN regression on a dataset. The actual values and results are present in a data... |
71,235,895 | R: Add new column in dataframe based on values in another dataframe column with repetitive values<p>My Dataframe1 looks like this, with Pattern and Name as my column headings:</p>
<pre><code>Pattern Name
Floral Rose
Vector Jess
Medieval Monica
Victorian Marta
Floral Jane
... | <p>Data:</p>
<pre><code>df1 <- tribble(
~Pattern, ~Name,
"Floral", "Rose",
"Vector", "Jess",
"Medieval" , "Monica",
"Victorian", "Marta",
"Floral", "Jane",
"Vector"... | R: Add new column in dataframe based on values in another dataframe column with repetitive values | r | 0 | 27 | 2 | 71,236,000 | 71,236,000 | 1 | true | 2022-02-23T11:15:13.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R: Add new column in dataframe based on values in another dataframe column with repetitive values<p>My Dataframe1 looks like this, with Pattern and Name as m... |
71,236,161 | How to edit data in CSV with equations to convert to new values?<p>I've been trying to find a solution. But most of all, I found only a few lines of csv editing. But the data that I have and have to solve consists of thousands of lines. </p>
<p>The data that I use is the value from the sensor-read. but it comes out in ... | <p>Did you have a look at the <a href="https://pandas.pydata.org/docs/" rel="nofollow noreferrer">pandas library</a> ?
It allows you to manipulate any kind of data.</p>
<p>Here is an example for your case:</p>
<pre class="lang-py prettyprint-override"><code>import pandas as pd
# Reading your csv file:
df = pd.read_csv... | How to edit data in CSV with equations to convert to new values? | python|csv | 0 | 43 | 4 | 71,236,356 | 71,236,356 | 1 | true | 2022-02-23T11:33:45.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to edit data in CSV with equations to convert to new values?<p>I've been trying to find a solution. But most of all, I found only a few lines of csv edit... |
71,235,921 | Accessing tkinter GUI from another python script<p>Imagine that i have a tkinter application with three buttons TestA, TestB, TestC which when pressed show the message "Test Status: Running Test A" (or ...B, ...C) and for some reason i want to create a second script from where when pressed these buttons, thre... | <p>There is circular import issue. Better design is to pass <code>statusBar</code> as an argument of those functions in <code>testsUnity.py</code>:</p>
<pre class="lang-py prettyprint-override"><code># no need to import gui_trial
#import gui_trial
def runTestA(statusBar):
statusBar.config(text='Test Status: Runni... | Accessing tkinter GUI from another python script | python-3.x|tkinter | 0 | 29 | 1 | 71,236,407 | 71,236,407 | 1 | true | 2022-02-23T11:17:19.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Accessing tkinter GUI from another python script<p>Imagine that i have a tkinter application with three buttons TestA, TestB, TestC which when pressed show t... |
71,237,027 | PostgreSQL: COUNT, GROUP and MIN date_part data to get first interaction<p>I have a list of emails and the dates of interaction over multiple campaigns, I'm attempting to consolidate these dates by year and find the first interaction by an email and which year it fell in.</p>
<pre><code>SELECT date_part('year', MIN(x.c... | <p>Just nest your query inside yet another sub-query. That allows you to do two distinct levels of aggregations...</p>
<pre><code>SELECT
years,
COUNT(*)
FROM
(
SELECT
date_part('year', MIN(x.created_at)) as years
FROM
(
SELECT email, created_at FROM s_subscribers_491 UNION ALL
SELECT email, creat... | PostgreSQL: COUNT, GROUP and MIN date_part data to get first interaction | sql|postgresql | 0 | 26 | 1 | 71,237,063 | 71,237,063 | 1 | true | 2022-02-23T12:34:42.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PostgreSQL: COUNT, GROUP and MIN date_part data to get first interaction<p>I have a list of emails and the dates of interaction over multiple campaigns, I'm ... |
71,231,016 | How to factor exponential terms in Sympy Python?<p>How do I transform an expression like this:</p>
<p>y = [x*e^(x/2) + e^x + e^(x/2)]^2</p>
<p>in this:</p>
<p>y = {e^(x/2)*[x + e^(x/2) + 1]}^2</p>
<p>using Sympy??</p> | <p>It seems that the factoring doesn't recognize the exponential as well as a power. So convert the <code>exp(x/2) -> y</code>, factor, then back substitute:</p>
<pre><code>>>> eq
(x*exp(x/2) + exp(x/2) + exp(x))**2
>>> factor(eq.subs(exp(x/2),y)).subs(y,exp(x/2))
(x + exp(x/2) + 1)**2*exp(x)
</cod... | How to factor exponential terms in Sympy Python? | python|spyder|sympy | 0 | 26 | 1 | 71,237,424 | 71,237,424 | 1 | true | 2022-02-23T03:21:01.650Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to factor exponential terms in Sympy Python?<p>How do I transform an expression like this:</p>
<p>y = [x*e^(x/2) + e^x + e^(x/2)]^2</p>
<p>in this:</p>
<... |
71,237,476 | Laravel Relation for Triple ID<p>I got three tables, and one matching table.</p>
<p>tournaments,
seasons,
teams</p>
<p>and</p>
<p>seasons_tournaments_teams</p>
<p>table.</p>
<p>And I had another table named 'games' and I put 'season_tournament_team_id' to that table.</p>
<p>So that,
I want to write a relation to get Te... | <blockquote>
<p>And I had another table named 'games' and I put 'season_tournament_team_id' to that table.</p>
</blockquote>
<p>You can make a <code>belongsTo</code> relationship to that model then.</p>
<pre class="lang-php prettyprint-override"><code># Game model
public function season_tournament_team()
{
return $... | Laravel Relation for Triple ID | laravel | 0 | 19 | 1 | 71,237,832 | 71,237,832 | 1 | true | 2022-02-23T13:04:37.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel Relation for Triple ID<p>I got three tables, and one matching table.</p>
<p>tournaments,
seasons,
teams</p>
<p>and</p>
<p>seasons_tournaments_teams</... |
71,236,426 | How to plot geographic data with customized legend?<p>Having the geographic points with values, I would like to encode the values with colormap and customize the legend position and colormap range.</p>
<p>Using geopandas, I have written the following function:</p>
<pre><code>def plot_continuous(df, column_values, title... | <p>This gets far simpler if you use <strong>geopandas</strong> customisation of <code>plot()</code></p>
<p>This is documented: <a href="https://geopandas.org/en/stable/docs/user_guide/mapping.html" rel="nofollow noreferrer">https://geopandas.org/en/stable/docs/user_guide/mapping.html</a></p>
<p>Below I show MWE using y... | How to plot geographic data with customized legend? | python|gis|geopandas|geography | 0 | 26 | 1 | 71,237,991 | 71,237,991 | 1 | true | 2022-02-23T11:51:25.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to plot geographic data with customized legend?<p>Having the geographic points with values, I would like to encode the values with colormap and customize... |
71,233,390 | Defects4j: what is run.dev.tests referencing to?<p>I am trying to understand what is run.dev.tests referencing to.</p>
<p>When i run test command in Defects4j it compiles and run tests. run_tests subroutine which is called from Project.pm is executed.</p>
<p>run_tests subroutine is called and returns _ant_call_comp sub... | <p><code>run.dev.tests</code> (or generally the target parameter in the _ant_call) subroutine is referring to a target in <a href="https://github.com/rjust/defects4j/blob/master/framework/projects/defects4j.build.xml#L106" rel="nofollow noreferrer">Defects4J's top-level build file</a>.</p>
<p>Defects4J's top-level buil... | Defects4j: what is run.dev.tests referencing to? | ant | 0 | 24 | 1 | 71,238,331 | 71,238,331 | 1 | true | 2022-02-23T08:18:52.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Defects4j: what is run.dev.tests referencing to?<p>I am trying to understand what is run.dev.tests referencing to.</p>
<p>When i run test command in Defects4... |
71,238,160 | Retrieving value from Mongoose Promise as a callback<p>Having trouble pulling the data from a mongoose promise. I want to find a set of users from mongoose using an appropriate ID and passing the result along a promise chain.</p>
<p>The query is pulling the right data from the database. When I nest the query inside of ... | <p>You function add item seem a bit strange you should do this instead:</p>
<pre><code>addItem(guildId, items, timeCreated) {
return new Promise((resolve, reject) => {
// other functionality omitted for brevity
resolve(guildId, items, timeCreated);
}).then((guild, predict, timeCreate) => {... | Retrieving value from Mongoose Promise as a callback | javascript|node.js|asynchronous|mongoose|promise | 0 | 34 | 1 | 71,238,474 | 71,238,474 | 1 | true | 2022-02-23T13:52:54.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Retrieving value from Mongoose Promise as a callback<p>Having trouble pulling the data from a mongoose promise. I want to find a set of users from mongoose u... |
71,238,581 | Using a managed identity with Azure Service Bus<p>I want to use a managed identity to connect to Azure Service Bus. In the docs they mention the DefaultAzureCredentialBuilder. I don't really get how this would use my managed identity to authenticate to the Service Bus.</p>
<p>Does anyone know this?</p> | <p><code>DefaultAzureCredential</code> is a chained credential; internally it considers multiple authorization sources, including managed identities. More information can be found in the <a href="https://docs.microsoft.com/java/api/overview/azure/identity-readme?view=azure-java-stable#defaultazurecredential" rel="nof... | Using a managed identity with Azure Service Bus | java|azureservicebus|azure-managed-identity | 0 | 263 | 1 | 71,239,037 | 71,239,037 | 1 | true | 2022-02-23T14:17:46.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using a managed identity with Azure Service Bus<p>I want to use a managed identity to connect to Azure Service Bus. In the docs they mention the DefaultAzure... |
71,238,902 | Mutate with ifelse multiple conditions in R<p>I have dataframe like below</p>
<pre><code>monkey = data.frame(girl = 1:10, kn = NA, boy = 5)
</code></pre>
<p>And i want to understand the following code meaning step by step</p>
<pre><code>monkey %>%
mutate(t = ifelse(is.na(kn),.[,grepl('a',names(.))],ll))
</code></p... | <p>In my opinion, this is not good code, but I'll try to explain what it is doing.</p>
<ul>
<li><p><code>is.na(kn)</code> (in the context of <code>monkey</code>) returns a logical vector of whether each value in that column is <code>NA</code>,</p>
<pre class="lang-r prettyprint-override"><code>with(monkey, is.na(kn))
#... | Mutate with ifelse multiple conditions in R | r|if-statement|mutated | 0 | 289 | 1 | 71,239,112 | 71,239,112 | 1 | true | 2022-02-23T14:36:35.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mutate with ifelse multiple conditions in R<p>I have dataframe like below</p>
<pre><code>monkey = data.frame(girl = 1:10, kn = NA, boy = 5)
</code></pre>
<p>... |
71,227,595 | Do Mach-O shared libraries (`.dylib`s) support symbol versioning?<p>I'm running into some segfaults that seem to be resolved on linux platforms by <a href="https://maskray.me/blog/2020-11-26-all-about-symbol-versioning" rel="nofollow noreferrer">symbol versioning</a> inside the ELF dynamic libraries. But I'm still get... | <p>Not really, but you can kinda roll your own.</p>
<p>To serve as an example, Apple has actually done some kind of symbol versioning to the <code>stat()</code> family of functions. Depending on macro definitions, the declaration of <code>stat</code> will expand to either this:</p>
<pre class="lang-c prettyprint-overri... | Do Mach-O shared libraries (`.dylib`s) support symbol versioning? | shared-libraries|dylib|dynamic-library|mach-o | 0 | 36 | 1 | 71,239,539 | 71,239,539 | 1 | true | 2022-02-22T20:00:11.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Do Mach-O shared libraries (`.dylib`s) support symbol versioning?<p>I'm running into some segfaults that seem to be resolved on linux platforms by <a href="h... |
71,236,145 | Is there a Firebase analytics API?<p>Is there an API for getting access to the data from Firebase analytics for my app? I would like to get programmatic access to users by country so that I can display it on my site but I have not found a way to do it.</p>
<p>I appreciate any help!</p> | <p>The <a href="https://developers.google.com/analytics/devguides/reporting/data/v1" rel="nofollow noreferrer">Google Analytics Data API</a> gives programmatic access to users by country.</p>
<p>In Data API requests, you'll need to identify your Google Analytics 4 (GA4) property by it's ID; this ID is different from th... | Is there a Firebase analytics API? | firebase|firebase-analytics | 0 | 295 | 1 | 71,239,875 | 71,239,875 | 1 | true | 2022-02-23T11:32:53.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a Firebase analytics API?<p>Is there an API for getting access to the data from Firebase analytics for my app? I would like to get programmatic acce... |
71,239,500 | Can't evaluate the heat transfer coefficient of a straight pipe in OpenModelica<p>I'm trying to get used to the <code>Modelica.Fluid.Dissipation</code>. I want to evaluate the heat transfer coefficient of a straight pipe using the function <code>kc_overall</code>. I tried to followthe <code>UsersGuide</code> example. I... | <p>The function <code>kc_overall</code> only takes two arguments — the records <code>IN_con</code> and <code>IN_var</code>. The mass flow rate must be specified through <code>IN_var</code> so your code should be:</p>
<pre><code>model Heat_tranfer_calcul
Modelica.SIunits.MassFlowRate M_FLOW=0.3 "input mass flow r... | Can't evaluate the heat transfer coefficient of a straight pipe in OpenModelica | fluid|modelica|openmodelica | 0 | 43 | 1 | 71,240,058 | 71,240,058 | 1 | true | 2022-02-23T15:12:36.350Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't evaluate the heat transfer coefficient of a straight pipe in OpenModelica<p>I'm trying to get used to the <code>Modelica.Fluid.Dissipation</code>. I wa... |
71,240,865 | Using Javascript methods append and appendChild to insert row and cells into a HTML table<p>Right. So guys, I'm stuck with a simple problem that I can't for the life of me figure out. I'm trying to insert a new row (using response data from an AJAX call) at the end of a Bootstrap table using JavaScript. I'm using a sim... | <p>You are creating 3 references for a one and same <code>Element</code> in this line:</p>
<pre><code>td_id = td_ba = td_code = td_num = document.createElement('td');
</code></pre>
<p>Meaning, the only <code>document.createElement('td')</code> created here can be called with <code>td_id</code>, <code>td_ba</code> and <... | Using Javascript methods append and appendChild to insert row and cells into a HTML table | javascript|html-table|append|appendchild | 0 | 771 | 2 | 71,241,305 | 71,241,305 | 1 | true | 2022-02-23T16:42:28.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Javascript methods append and appendChild to insert row and cells into a HTML table<p>Right. So guys, I'm stuck with a simple problem that I can't for ... |
71,241,836 | In Pandas, combine dictionary with a single value for output dataframe<p>If I have a number of dictionaries, how could I best combine them into a single pandas DataFrame? I would also like to have an added column, with a given value for each "batch" of dictionaries.</p>
<p>Example inputs:</p>
<pre><code>
# De... | <p>You can create a dataframe for each diciontary an then use:</p>
<pre><code>df = pd.concat([dict1, dict2, dict3, dict4, dict5, dict6], keys=[dict1, dict2, dict3, dict4, dict5, dict6])
</code></pre>
<p>Then:</p>
<pre><code>df.reset_index(inplace=True)
</code></pre> | In Pandas, combine dictionary with a single value for output dataframe | python|pandas|dataframe|dictionary | 0 | 41 | 2 | 71,241,942 | 71,241,942 | 1 | true | 2022-02-23T17:51:40.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Pandas, combine dictionary with a single value for output dataframe<p>If I have a number of dictionaries, how could I best combine them into a single pand... |
71,237,202 | lldb - is there a way to not stop on breakpoints and print that they've been hit instead<p>So I am using Qt Creator with LLDB as debugger.
To debug stuff I add breakpoints and when the code hits the breakpoint it stops and I can see the back trace and all and that's useful. However, sometimes I don't want to stop and I... | <p>All the <code>break set</code> commands take a <code>--auto-continue</code> option (one-letter: <code>-G</code>) that will instruct lldb to continue after stopping for the breakpoint (and running any of its commands).</p>
<p>You can run lldb commands when a breakpoint is hit (e.g. to do a backtrace or print some loc... | lldb - is there a way to not stop on breakpoints and print that they've been hit instead | debugging|lldb | 0 | 260 | 1 | 71,242,304 | 71,242,304 | 1 | true | 2022-02-23T12:46:09.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
lldb - is there a way to not stop on breakpoints and print that they've been hit instead<p>So I am using Qt Creator with LLDB as debugger.
To debug stuff I a... |
71,242,665 | SQL Server: use all the words of a string as separate LIKE parameters (and all words should match)<p>I have a string containing a certain number of words (it may vary from 1 to many) and I need to find the records of a table which contains ALL those words in any order.</p>
<p>For instances, suppose that my input string... | <p>First, put that XML junk in a function:</p>
<pre><code>CREATE FUNCTION dbo.SplitThem
(
@List NVARCHAR(MAX),
@Delimiter NVARCHAR(255)
)
RETURNS TABLE
WITH SCHEMABINDING
AS
RETURN ( SELECT Item = y.i.value(N'(./text())[1]', N'nvarchar(4000)')
FROM ( SELECT x = CONVERT(XML, '<i>'
... | SQL Server: use all the words of a string as separate LIKE parameters (and all words should match) | string|sql-server-2012|sql-like | 0 | 41 | 2 | 71,243,141 | 71,243,141 | 1 | true | 2022-02-23T18:59:16.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Server: use all the words of a string as separate LIKE parameters (and all words should match)<p>I have a string containing a certain number of words (it... |
71,242,173 | Higher Testing Accuracy and Lower Trainning Accuracy<p>I am rather new to the process of NLP, and I am running into a situation where my training accuracy is around 70% but my test accuracy is 80%. I have roughly 6000 entries from 2020 to be used as training data and 300 entires from first quarter of 2021 to be used as... | <p>I am not really familiar with the model you use and might be mising something here, but it might be that your test set is not representative of the data. Perhaps there is something in the 2021 data that causes it to be easier to predict.</p>
<p>You might want to try something like sklearn's <code>train_test_split()<... | Higher Testing Accuracy and Lower Trainning Accuracy | python|scikit-learn|nlp|nltk | 0 | 31 | 1 | 71,243,256 | 71,243,256 | 1 | true | 2022-02-23T18:16:53.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Higher Testing Accuracy and Lower Trainning Accuracy<p>I am rather new to the process of NLP, and I am running into a situation where my training accuracy is... |
71,243,140 | How to display the most Recent/Latest Value in Power Bi<p>My table looks something like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">Location</th>
<th style="text-align: center;">TimeSlot</th>
<th style="text-align: center;">Mean Rate</th>
<th style="text-... | <p>Try this <strong>measure</strong>:</p>
<pre><code>Most Recent Max Rate =
VAR ThisLocation =
MIN( Table1[Location] )
VAR LatestTimeSlot =
CALCULATE(
MAX( Table1[TimeSlot] ),
Table1[Location] = ThisLocation
)
VAR LatestMaxRate =
LOOKUPVALUE(
Table1[Max Rate],
Table1[Loca... | How to display the most Recent/Latest Value in Power Bi | powerbi | 0 | 2,317 | 1 | 71,243,525 | 71,243,525 | 1 | true | 2022-02-23T19:44:51.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to display the most Recent/Latest Value in Power Bi<p>My table looks something like this:</p>
<div class="s-table-container">
<table class="s-table">
<th... |
71,243,187 | CGContext 'addPath' to the existing drawing<p>I have a CGPath drawn in a custom UIView as follows. There is a refresh button that is supposed to add new line to the path already drawn.</p>
<pre><code> private func refresh() {
self.setNeedsDisplay()
}
override func draw(_ rect: CGRect){
guard let context = UIGr... | <p>You need to keep on hand a CGMutablePath, or a collection of CGPaths, so that you can keep accumulating new path parts in an actual CGPath.</p>
<p>When <code>draw</code> is called, it has a <code>rect</code>. You are ignoring that parameter. Don't ignore it. You only need to supply the part of the drawing that is in... | CGContext 'addPath' to the existing drawing | ios|uiview|uikit|cgcontext | 0 | 42 | 1 | 71,243,667 | 71,243,667 | 1 | true | 2022-02-23T19:49:13.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CGContext 'addPath' to the existing drawing<p>I have a CGPath drawn in a custom UIView as follows. There is a refresh button that is supposed to add new line... |
71,243,661 | Which method for accessing a 2D array in C is most effective? (Using Pointers)<p>If you have a function that takes the pointer of an array, would there be any use in using pointers to each element in the array, or is it redundant? For example:</p>
<pre><code>int sum(int(*arr)[3]) {
int i,j, sum = 0;
for (i =0; ... | <p><code>arr[i]</code> is required by the standard to be equivalent to <code>*(arr + i)</code> so no, there is no point in not using <code>arr[i]</code> which is more readable.</p>
<p>Speeding up 2d array access is a complex topic. There are some techniques for performance improvement, but those take hardware architect... | Which method for accessing a 2D array in C is most effective? (Using Pointers) | arrays|c|pointers|matrix|multidimensional-array | 0 | 22 | 1 | 71,243,722 | 71,243,722 | 1 | true | 2022-02-23T20:28:38.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Which method for accessing a 2D array in C is most effective? (Using Pointers)<p>If you have a function that takes the pointer of an array, would there be an... |
71,243,816 | rename a duplicated IDs pandas<p>I think it is stupid question but couldn't think of the answer d:</p>
<p>I have a family ID which is duplicated for all family members, it looks like:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">Fam_ID</th>
<th style="text-align... | <p>Easy:</p>
<pre><code>for ix, fam in enumerate(df.Fam_ID.unique()):
df.loc[df.Fam_ID==fam, 'fmily_label'] = f'family{ix+1}'
</code></pre> | rename a duplicated IDs pandas | pandas|dataframe | 0 | 19 | 1 | 71,244,082 | 71,244,082 | 1 | true | 2022-02-23T20:45:21.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
rename a duplicated IDs pandas<p>I think it is stupid question but couldn't think of the answer d:</p>
<p>I have a family ID which is duplicated for all fami... |
71,244,413 | How can I change my postgresql WAL file size?<p>How can I change my PostgreSQL WAL file size as my wish. By default at <strong>pg_wal</strong> directory postgres generate 16MB WAL files. I try to change using max_wal_size, min_wal_size parameter. But I think it is not right parameter to change. Necessary details given ... | <p>With an old and outdated version like 9.4, your only option is to build PostgreSQL from source and configure it with</p>
<pre class="lang-sh prettyprint-override"><code>./configure --with-wal-segsize=1024
</code></pre>
<p>Then you have to dump and restore the cluster to that new installation.</p>
<p>With current ver... | How can I change my postgresql WAL file size? | postgresql|database-administration|postgresql-9.4 | 0 | 539 | 1 | 71,244,470 | 71,244,470 | 1 | true | 2022-02-23T21:45:51.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I change my postgresql WAL file size?<p>How can I change my PostgreSQL WAL file size as my wish. By default at <strong>pg_wal</strong> directory post... |
71,245,546 | Remove part of query if a tuple contains null<pre><code>create table customers (
id int primary key,
first_name varchar2(30) not null,
addresses varchar2(30)
);
create table items (
item_id int primary key,
seller varchar2(30) not null,
description varchar2(30) not null,
weight int,
price numeric(100,2),
quantity int ... | <p>Most aggregate functions will ignore nulls, so you need to do a NULL check and then aggregate the result. If the count of nulls is greated than 0, show null, else show the total price</p>
<pre><code>SELECT c.id, c.first_name, c.addresses,
case when count(case when i.price is null then 1 end) > 0
t... | Remove part of query if a tuple contains null | sql|oracle | 0 | 33 | 2 | 71,245,782 | 71,245,782 | 1 | true | 2022-02-24T00:13:31.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Remove part of query if a tuple contains null<pre><code>create table customers (
id int primary key,
first_name varchar2(30) not null,
addresses varchar2(30)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.