question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
72,920,714
jinja2.exceptions.TemplateNotFound: templates/index.html<p><a href="https://i.stack.imgur.com/VFTcF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VFTcF.png" alt="enter image description here" /></a>I am facing this issue: jinja2.exceptions.TemplateNotFound: templates/index.html</p> <p>Although I ha...
<p>Try this:</p> <pre class="lang-py prettyprint-override"><code>return render_template(&quot;index.html&quot;) </code></pre>
jinja2.exceptions.TemplateNotFound: templates/index.html
python|flask
1
55
1
72,920,804
72,920,804
1
true
2022-07-09T10:45:16.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: jinja2.exceptions.TemplateNotFound: templates/index.html<p><a href="https://i.stack.imgur.com/VFTcF.png" rel="nofollow noreferrer"><img src="https://i.stack....
72,924,757
Change array elements<p>There is an array</p> <pre><code>[ [ 'Alex', '167%' ], [ 'Benjamin', '127%' ], [ 'Elijah', '117%' ], [ 'Liam', '136%' ], [ 'Theodore', '135%' ], [ 'Mia', '128%' ] ] </code></pre> <p>I need to make it look like this</p> <pre><code>[ 'Alex 167%', 'Benjamin ...
<p>You could use a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="nofollow noreferrer">map</a> combined with <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd" rel="nofollow noreferrer">padEnd</a></p> <p><di...
Change array elements
javascript|arrays
-4
55
1
72,924,785
72,924,785
1
true
2022-07-09T21:30:14.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change array elements<p>There is an array</p> <pre><code>[ [ 'Alex', '167%' ], [ 'Benjamin', '127%' ], [ 'Elijah', '117%' ], [ 'Liam', '136%' ], [ 'T...
72,924,192
Different Processes between websocket datastream and computational code<p>I have a datastream from multiple websockets and convert the necessary data to two lists(this whole part uses asyncio). I end up creating, updating and returning the lists like this:</p> <pre><code>class A: def __init__(self): self.li...
<p>I would consider something along these lines. Move the functionality of class A into a separate process. Add the calculation to class A.</p> <p>Pass the raw data to the subprocess using a multiprocessing.Queue. The second process loops to collect new data and hand if to class A for analysis.</p> <p>When the main ...
Different Processes between websocket datastream and computational code
python|websocket|process|multiprocessing|python-asyncio
0
55
1
72,925,661
72,925,661
1
true
2022-07-09T19:49:59.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Different Processes between websocket datastream and computational code<p>I have a datastream from multiple websockets and convert the necessary data to two ...
72,928,732
GENERATED ALWAYS AS at MariaDB<p>I have already used <code>GENERATED ALWAYS AS</code> when creating new tables. However, when I try to <code>UPDATE TABLE</code> an already existing table with this computed/generated column I keep on getting a 1064 error. I have also tried with the <code>ALTER TABLE</code> option, but h...
<p>If you are trying to add a computed column to an existing table, the syntax is:</p> <pre><code>ALTER TABLE crecimiento_pib ADD COLUMN País varchar(200) GENERATED ALWAYS AS (CONCAT(CountryName, ' ', CountryCode)); </code></pre> <p>with an appropriate size defined by the length of the <code>CountryName</code> and <cod...
GENERATED ALWAYS AS at MariaDB
mysql|sql|mariadb
1
55
1
72,928,812
72,928,812
1
true
2022-07-10T13:11:50.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GENERATED ALWAYS AS at MariaDB<p>I have already used <code>GENERATED ALWAYS AS</code> when creating new tables. However, when I try to <code>UPDATE TABLE</co...
72,933,995
How to not allow conversion from temporary shared_ptr to weak_ptr for derived types<p>I have asked this question for <a href="https://stackoverflow.com/questions/72920343/how-to-ensure-a-weak-ptr-is-not-created-from-a-temporary-shared-ptr">concrete types</a>. The provided solution is sufficient for those, but when it c...
<p>One of the possible solutions - overload <code>use_weak_ptr</code> for all <code>std::shared_ptr</code>.</p> <pre><code>template &lt;typename T&gt; void use_weak_ptr(std::shared_ptr&lt;T&gt;&amp;&amp;) = delete; </code></pre> <p><a href="https://godbolt.org/z/Tj1a134bd" rel="nofollow noreferrer">https://godbolt.org/...
How to not allow conversion from temporary shared_ptr to weak_ptr for derived types
c++|inheritance|c++20|weak-ptr
-2
55
1
72,934,095
72,934,095
1
true
2022-07-11T05:15:12.247Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to not allow conversion from temporary shared_ptr to weak_ptr for derived types<p>I have asked this question for <a href="https://stackoverflow.com/quest...
72,935,886
Regex [0-9]* matches empty string on "(2434525)"<p>I was trying to match all numbers in a string, this is an example code:</p> <pre class="lang-py prettyprint-override"><code>re.search(r'[0-9]*', '(123)').group() # outputs: '' re.search(r'[0-9]*', '123)').group() # outputs: '123' re.search(r'[0-9]+', '(123)').group()...
<p>In your case <code>re.search</code> will stop on first match.</p> <p><code>re.search(r'[0-9]*', '(123)').group()</code> - will search for digits starting from empty string to infinity long string, and since first char is <code>(</code>, it marches empty string.</p> <p><code>re.search(r'[0-9]*', '123)').group()</code...
Regex [0-9]* matches empty string on "(2434525)"
python|regex
-1
55
1
72,936,015
72,936,015
1
true
2022-07-11T08:50:01.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex [0-9]* matches empty string on "(2434525)"<p>I was trying to match all numbers in a string, this is an example code:</p> <pre class="lang-py prettyprin...
72,935,746
Mat-Dialog passing value and populate to the input fields<p>I was creating a mat-dialog with table and once i clicked the first row it will populate the input fields that you selected.</p> <p><a href="https://i.stack.imgur.com/3OlTV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3OlTV.png" alt="ente...
<p>I have forked your <a href="https://stackblitz.com/edit/mat-dialog-example-wctvne?file=app%2Fapp.component.ts" rel="nofollow noreferrer">stackblitz sample</a>.</p> <p>First, modify <code>this.dialogRef.close(row)</code> to <code>this.dialogRef.close(row.name)</code>.</p> <p><strong>alter-dialog.component.ts</strong>...
Mat-Dialog passing value and populate to the input fields
angular|typescript|rxjs
0
55
1
72,936,105
72,936,105
1
true
2022-07-11T08:36:05.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mat-Dialog passing value and populate to the input fields<p>I was creating a mat-dialog with table and once i clicked the first row it will populate the inpu...
72,936,004
Replace OUTER APPLY<p>I want to replace some OUTER APPLYs in my SQL because they seem to be a little bit slow and eating resources () on a poor VPS. I have no idea what to use instead? LEFT OUTER JOIN (??)</p> <p>Here's my code</p> <pre><code>SELECT e.Id, Decision.Comment, Decision.DATE, Decision.IsRejected...
<p>You can add a ROW_NUMBER to your subquery (and remove the TOP 1). Then you can use a LEFT JOIN.</p> <p>Something like this:</p> <pre><code>SELECT e.Id, Decision.Comment, Decision.DATE, Decision.IsRejected, Decision.CommentedBy FROM core.Event e LEFT JOIN ( SELECT ESH.Event_StatusHistory_Comment ...
Replace OUTER APPLY
sql|sql-server|query-planner|outer-apply
0
55
1
72,936,135
72,936,135
1
true
2022-07-11T09:00:48.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace OUTER APPLY<p>I want to replace some OUTER APPLYs in my SQL because they seem to be a little bit slow and eating resources () on a poor VPS. I have n...
72,936,060
Left join add matched rows in child table to an array in parent row (as JSON format)<p>I have the following two tables:</p> <pre><code>+----------------------------+ | Parent Table | +----------------------------+ | uuid (PK) | | caseId | | param |...
<p>You can use nested <code>FOR JSON</code> clauses to achieve this.</p> <pre class="lang-sql prettyprint-override"><code>SELECT p.uuid, p.caseId, childRows = ( SELECT c.uuid, c.parentUuid FROM Child_table c WHERE c.parentUuid = p.uuid FOR JSON PATH ) FROM Parent_table p WHERE p.case...
Left join add matched rows in child table to an array in parent row (as JSON format)
sql|json|sql-server|join|left-join
1
55
2
72,936,604
72,936,604
1
true
2022-07-11T09:05:40.673Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Left join add matched rows in child table to an array in parent row (as JSON format)<p>I have the following two tables:</p> <pre><code>+---------------------...
72,941,926
Flattening nested Results with different Err types<p>Following <a href="https://stackoverflow.com/a/59029485/4896472">this answer</a>, how does one flatten results when they have different Error types.</p> <p>Here's what I'm trying to achieve:</p> <pre class="lang-rust prettyprint-override"><code>let length: usize = st...
<p>You can use <a href="https://doc.rust-lang.org/std/result/enum.Result.html#method.ok" rel="nofollow noreferrer"><code>Result::ok()</code></a> to transform the <code>Result</code> into an <code>Option</code>, discarding the <code>Err</code> and replacing it with a <code>None</code>:</p> <pre class="lang-rust prettypr...
Flattening nested Results with different Err types
rust
0
55
2
72,943,111
72,943,111
1
true
2022-07-11T16:44:13.987Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flattening nested Results with different Err types<p>Following <a href="https://stackoverflow.com/a/59029485/4896472">this answer</a>, how does one flatten r...
72,942,617
plt.legend only adds first element to scatter plot<p>I am trying to add a legend to my scatter plot with 13 classes, however, with my code below, I am only able to get the first label. Can you assist me in generating the full list to show up in the legend of the scatter plot?</p> <p>Here is my example code:</p> <pre><...
<p>You can do that by replacing the <code>plt.legend(classes)</code> in your code by this line... I hope this is what you are looking for. I am using matplotlib 3.3.4.</p> <pre><code>plt.legend(handles=scatter.legend_elements()[0], labels=classes) </code></pre> <p><strong>Output plot</strong></p> <p><a href="https://i....
plt.legend only adds first element to scatter plot
python-3.x|scatter-plot|legend-properties
0
55
1
72,946,003
72,946,003
1
true
2022-07-11T17:42:15.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: plt.legend only adds first element to scatter plot<p>I am trying to add a legend to my scatter plot with 13 classes, however, with my code below, I am only a...
72,946,860
Why cant you have multiple links on the same extern block?<p>I have multiple C libraries that I want to link to my Rust project. To do this I use multiple link attributes on the same extern block.</p> <pre><code>use libc::{c_int}; #[link(name = &quot;zlib&quot;, kind = &quot;static&quot;)] #[link(name = &quot;libpng&q...
<p>Somnium was correct, in mentioning that the order the link attributes are defined in, can fix this problem.</p>
Why cant you have multiple links on the same extern block?
rust|ffi
0
55
1
72,948,243
72,948,243
1
true
2022-07-12T03:56:08.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why cant you have multiple links on the same extern block?<p>I have multiple C libraries that I want to link to my Rust project. To do this I use multiple li...
72,950,795
Why doesn't the edit box dialog fill in initial value when I use Jetpack Compose?<p>I use the following code to show a edit box dialog with initial value on which a use can input a new description and save it.</p> <p>I think that the initial value <em>&quot;Hello&quot;</em> will be shown on <em>TextField</em> when I ...
<pre><code>var mText by remember { mutableStateOf(editFieldContent) } </code></pre> <p>it doesn't get updated when <code>editFieldContent</code> changes because remember{} stores value on composition or when keys change.</p> <p>Then you change mText via delegation or <code>using mText.value = newValue</code> if you don...
Why doesn't the edit box dialog fill in initial value when I use Jetpack Compose?
android|android-jetpack-compose
1
55
1
72,951,199
72,951,199
1
true
2022-07-12T10:25:58.070Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why doesn't the edit box dialog fill in initial value when I use Jetpack Compose?<p>I use the following code to show a edit box dialog with initial value o...
72,953,811
Add/remove style after click label/input[radio] problem<p>I have a problem with a function that selects active items. There are some input/label fields with sectoins ( one section - one active/clicked element ) It only works when I double-click. If I click one time then no result. I can set setTimeout for that code and...
<p>Not sure if this is what you need, but here's an example of toggling the <code>active</code> class when the checked input changes:</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">...
Add/remove style after click label/input[radio] problem
javascript
0
55
4
72,954,177
72,954,177
1
true
2022-07-12T14:15:36.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add/remove style after click label/input[radio] problem<p>I have a problem with a function that selects active items. There are some input/label fields with ...
72,944,715
How can to create a curved Text Button<p>I'm beginner in jetpack compose, especially in Canvas.</p> <p>I want to create this with Canvas:</p> <p><a href="https://i.stack.imgur.com/wTnH8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wTnH8.jpg" alt="enter image description here" /></a></p> <p>But I d...
<p>The answer mentioned in the comments above is mine. I did some adjustments in order to give you some direction. The code is listed below:</p> <pre class="lang-kotlin prettyprint-override"><code>@Composable fun ButtonWithCurvedText( @DrawableRes icon: Int, text: String, iconSize: Dp, onClick: () -&gt;...
How can to create a curved Text Button
kotlin|android-jetpack-compose|android-canvas|android-jetpack
1
55
1
72,954,381
72,954,381
1
true
2022-07-11T21:11:41.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can to create a curved Text Button<p>I'm beginner in jetpack compose, especially in Canvas.</p> <p>I want to create this with Canvas:</p> <p><a href="htt...
72,954,339
How to modify an array by link inside function?<p>I have the following function:</p> <pre><code> public recursiveFilterLayers(node: LayerNode[]): LayerNode[] { const validItem = node.filter( (i) =&gt; i.visible === true || i.visible === undefined ); validItem.forEach((i) =&gt; { if (i.children...
<p><code>Array.filter</code> returns a copy, so you can't mutate the original array with it. Instead, you will need to explicitly iterate over the array using a loop.</p> <p>It's tempting to use <code>splice</code> to remove individual values, but this has O(n²) behaviour because <code>splice</code> has to copy all sub...
How to modify an array by link inside function?
javascript|typescript
0
55
2
72,954,674
72,954,674
1
true
2022-07-12T14:54:01.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to modify an array by link inside function?<p>I have the following function:</p> <pre><code> public recursiveFilterLayers(node: LayerNode[]): LayerNode[...
72,955,674
How to change text to all in v-table vuetify?<p>Currently I can change the number of options but what I don't know is how to change all to <code>Todos</code>, What can I do to change it ?</p> <p><a href="https://i.stack.imgur.com/nbzm9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nbzm9.png" alt="i...
<p>You can add one more property in <code>:footer-props</code> attribute value object.</p> <pre><code>'items-per-page-all-text':'Todos' </code></pre> <p>Live Demo <strong>:</strong></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class...
How to change text to all in v-table vuetify?
vue.js|vuetify.js|v-data-table|vuetify-datatable
0
55
1
72,955,878
72,955,878
1
true
2022-07-12T16:39:49.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change text to all in v-table vuetify?<p>Currently I can change the number of options but what I don't know is how to change all to <code>Todos</code>...
72,956,973
saving csv file but it no seperate per columns<pre><code>expcsv = {'PREDICTION OF' : ['CUTTING TEMPERATURE :','SURFACE ROUGHNESS :','CUTTING FORCE X :', 'CUTTING FORCE Y :','CUTTING FORCE Z :'], 'VALUE' : [out_arrct,out_arrra,out_arrfx,out_arrfy,out_arrfz], '...
<p>You should use pandas <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html" rel="nofollow noreferrer"><code>to_csv</code></a> utility:</p> <pre class="lang-py prettyprint-override"><code>import pandas as pd out_arrct, out_arrra, out_arrfx, out_arrfy, out_arrfz = 1, 2, 3, 4, 5 expcsv =...
saving csv file but it no seperate per columns
python|pandas|string|dataframe|multiple-columns
1
55
1
72,957,109
72,957,109
1
true
2022-07-12T18:39:40.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: saving csv file but it no seperate per columns<pre><code>expcsv = {'PREDICTION OF' : ['CUTTING TEMPERATURE :','SURFACE ROUGHNESS :','CUTTING FORCE X :', ...
72,956,223
cancelling a suspend function in kotlin if the same function is called again<p>I want to cancel the function i created which simply increments a counter value. For example, if the specific function is triggered by click, I only want to display the log for the last uninterrupted click within 2 seconds. Basically, i want...
<p>This kind of event processing is usually handled using reactive streams and is often named the <strong>debounce</strong> operator. It exists in both ReactiveX (<a href="https://reactivex.io/documentation/operators/debounce.html" rel="nofollow noreferrer">Debounce</a>) and in Kotlin flows (<a href="https://kotlinlang...
cancelling a suspend function in kotlin if the same function is called again
android|function|kotlin|counter|suspend
0
55
2
72,957,302
72,957,302
1
true
2022-07-12T17:28:26.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: cancelling a suspend function in kotlin if the same function is called again<p>I want to cancel the function i created which simply increments a counter valu...
72,957,006
Mapping a type to a function of that type in c++<p>Let's suppose I have a character that can have 1 out of 3 states at a time(crouching, jumping and walking). For each of the 3 states I have a function of type void() that does whatever they are assigned to. I also have an enum that stores the different states and a num...
<p>You need to do what the compiler tells you - use the <code>&amp;</code> operator to get a pointer to a member method. You will also have to specify the class the methods belong to, eg:</p> <pre><code>class Player { private: std::unordered_map&lt;State, void(Player::*)()&gt; stateToFunc; void playerJump(){ /* ...
Mapping a type to a function of that type in c++
c++|function|class|unordered-map
0
55
1
72,957,990
72,957,990
1
true
2022-07-12T18:42:59.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mapping a type to a function of that type in c++<p>Let's suppose I have a character that can have 1 out of 3 states at a time(crouching, jumping and walking)...
72,954,966
Change color of absolutely positioned element when overlapping with another<p>I am trying to build a component where you can visualize on what section are you in and allows you to easily move sections on the page.</p> <p>My page is structured like this</p> <pre><code>&lt;SectionManager /&gt; // the absolutely positione...
<p>I solved the issue!</p> <p>I ended up getting all the sections on my page using <code>querySelector</code> and using an <code>IntersectionObserver</code> to get the section that is in viewPort and get its background color, then passing the background color to my component using <code>data-section-bg</code>.</p> <p>H...
Change color of absolutely positioned element when overlapping with another
html|css|reactjs|sass
0
55
1
72,958,137
72,958,137
1
true
2022-07-12T15:40:00.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change color of absolutely positioned element when overlapping with another<p>I am trying to build a component where you can visualize on what section are yo...
72,967,110
How to read data from Firebase Database? - Java<p>I'm making a game, if the player wins, then the victory is added to the database. How can I read the data from here?</p> <p><a href="https://i.stack.imgur.com/rmmRW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rmmRW.png" alt="enter image descriptio...
<p>To be able to read the data under the <code>jjjj</code> node, please use the following lines of code:</p> <pre><code>DatabaseReference db = FirebaseDatabase.getInstance().getReference(); DatabaseReference nameRef = db.child(&quot;players&quot;).child(&quot;jjjj&quot;); nameRef.get().addOnCompleteListener(new OnCompl...
How to read data from Firebase Database? - Java
java|android|firebase|google-cloud-platform|firebase-realtime-database
-1
55
2
72,967,485
72,967,485
1
true
2022-07-13T13:26:56.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to read data from Firebase Database? - Java<p>I'm making a game, if the player wins, then the victory is added to the database. How can I read the data f...
72,973,635
How to properly check keys in a map c++<p>I have been using maps lately and wanted to know how to check for existing keys in a map. This is how I would add/update keys:</p> <pre><code>map&lt;int&gt; my_map; my_map[key] = value; </code></pre> <p>The [] operator adds a new key if one doesn't exists. If I were to check fo...
<p>In C++20, there is <a href="https://en.cppreference.com/w/cpp/container/map/contains" rel="nofollow noreferrer"><code>std::map::contains</code></a>, which returns a <code>bool</code>.</p> <pre><code>if ( my_map.contains(key) ) { ... } </code></pre> <p>Before C++20, there is also <a href="https://en.cppreference.com/...
How to properly check keys in a map c++
c++|dictionary|key|code-cleanup
0
55
1
72,973,874
72,973,874
1
true
2022-07-13T23:21:50.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to properly check keys in a map c++<p>I have been using maps lately and wanted to know how to check for existing keys in a map. This is how I would add/u...
72,976,577
Compare Column A of Row 1 with Column B of Row 2 in Same table<p>I have a table name 'Table A' where I need to get the all values based on two columns 'AdviserBusinessId' and 'ClientcontactGuid' having count &gt; 1. I am able to achieve this using self join as below query.</p> <pre><code>select gc.AdviserBusinessId,gc....
<p>Use analytic functions:</p> <pre class="lang-sql prettyprint-override"><code>SELECT AdviserBusinessId, ClientContactGuid, PlanStartDate, PlanEndDate, ClientEngagementGuid, RenewalGuid, rn FROM ( SELECT AdviserBusinessId, ClientContactGuid, PlanStartDate...
Compare Column A of Row 1 with Column B of Row 2 in Same table
sql|sql-server|tsql
0
55
3
72,977,054
72,977,054
1
true
2022-07-14T07:11:13.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Compare Column A of Row 1 with Column B of Row 2 in Same table<p>I have a table name 'Table A' where I need to get the all values based on two columns 'Advis...
72,978,888
How to use VueCompositionAPI with Vue 3?<p>I updated all the packages in my project. And upgrade vue 3. After the done with updates there is a problem in my code. I cannot use <code>Vue.use(VueCompositionAPI);</code> In the old version of the project I call it from import VueCompositionAPI from '@vue/composition-api'; ...
<p>Look, vue 2 is build on the options API. Vue 3 is build on composition API.</p> <p>In order to use composition API in your Vue 2 app, you needed the @vue/composition-api package to run it.</p> <p>What you did is: You upgraded to 3 (wich is by default composition API) and try to use the @vue/composition-api wich is o...
How to use VueCompositionAPI with Vue 3?
node.js|vue.js|npm|vuejs3
-1
55
1
72,979,005
72,979,005
1
true
2022-07-14T10:16:17.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use VueCompositionAPI with Vue 3?<p>I updated all the packages in my project. And upgrade vue 3. After the done with updates there is a problem in my ...
72,979,118
Is it possible to have a mouse left click after 2 seconds of inactivity - Tkinter<p>I am making a GUI in Tkinter, python, which can be navigated using a mouse cursor but no buttons/keys.</p> <p>I am trying to solve a current problem of having the mouse left click without anyone pressing the physical mouse button or a k...
<p>As you already seem to be confirming the option with <code>tk.Button().invoke()</code> you can use <code>tk.Button.bind('&lt;Enter&gt;', _onhover)</code> to detect the mouse over your button and <code>tk.Button.bind('&lt;Leave&gt;', _onleave)</code></p> <p>Define two functions like that:</p> <pre><code>def _onhover(...
Is it possible to have a mouse left click after 2 seconds of inactivity - Tkinter
python|user-interface|tkinter
1
55
1
72,980,653
72,980,653
1
true
2022-07-14T10:34:51.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to have a mouse left click after 2 seconds of inactivity - Tkinter<p>I am making a GUI in Tkinter, python, which can be navigated using a mous...
72,979,715
Cannot convert value of type 'UnsafeRawBufferPointer' to expected argument type 'UnsafeMutableRawPointer?'<p>I was followed <a href="https://stackoverflow.com/a/25755864">this</a> answer to encrypt the data. The encryption is success. But I am stuck with the decrypting the data. I've lot of datas are encrypted. But I u...
<p>Your code needs a little refactoring and you're good to go.</p> <pre><code> let cryptStatus: CCCryptorStatus = clearData.withUnsafeBytes {cryptBytes in data.withUnsafeBytes {dataBytes in keyData.withUnsafeMutableBytes {keyBytes in return CCCrypt(CCOperation(kCCDecrypt), ...
Cannot convert value of type 'UnsafeRawBufferPointer' to expected argument type 'UnsafeMutableRawPointer?'
ios|swift|encryption|commoncrypto
0
55
1
72,981,011
72,981,011
1
true
2022-07-14T11:21:59.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot convert value of type 'UnsafeRawBufferPointer' to expected argument type 'UnsafeMutableRawPointer?'<p>I was followed <a href="https://stackoverflow.co...
72,984,927
Save image from CGContext on background<p><strong>Context</strong></p> <p>The user is sketching with straight lines on a canvas in the current CGContext. The user can draw straight lines, scale(pinch), and translate(pan) the whole drawing. Once the user leaves the drawing scene, the app saves into a data structure all ...
<p>You could save it (to docs or temp directory) when the user finishes drawing, then load it to upload / display, etc.</p> <p>Or, use <code>UIGraphicsImageRenderer</code> to generate a <code>UIImage</code> using your saved data structure.</p> <p>Here's a quick, very simple example.</p> <p>We create an array of points,...
Save image from CGContext on background
ios|swift|core-graphics|cgcontext
0
55
1
72,985,505
72,985,505
1
true
2022-07-14T18:06:49.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Save image from CGContext on background<p><strong>Context</strong></p> <p>The user is sketching with straight lines on a canvas in the current CGContext. The...
72,986,955
How to fix bad encodings in a string?<p>I need to correct bad encodings from a string.</p> <p>This is an example of what it should be \u00c3\u00ba=ú, \u00c3\u00b1=ñ, \u00c3\u00b3=ó</p> <p>This is the string:</p> <pre><code>x = '[{&quot;op&quot;: &quot;core/column-reorder&quot;, &quot;columnNames&quot;: [&quot;\u00ef\u0...
<p>Use the right encoding when reading the file, and use <code>ensure_ascii=False</code> when writing the JSON to see human-readable non-ASCII characters. It is still valid JSON as ASCII it is just a visual issue:</p> <pre class="lang-py prettyprint-override"><code>import json with open('get-operations.json', encodin...
How to fix bad encodings in a string?
python|json|encoding|utf-8|decoding
0
55
1
72,988,369
72,988,369
1
true
2022-07-14T21:44:23.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fix bad encodings in a string?<p>I need to correct bad encodings from a string.</p> <p>This is an example of what it should be \u00c3\u00ba=ú, \u00c3\...
72,976,858
Xamarin iOS only crash physical iPhone when you open an app<p>I'm facing a strange error. App only crashes on <strong>physical</strong> device. But iOS simulator does not. It working fine.</p> <p>The strange thing is it crashes when you open an app and <code>FinishedLaunching(UIApplication app, NSDictionary options)</c...
<p>One of the third-party iOS library (nuget package) was configured to iOS-Simulator. not physical iOS.</p> <p>After the package author released hot-fix, it resolved.</p>
Xamarin iOS only crash physical iPhone when you open an app
xamarin|xamarin.ios
0
55
2
72,988,516
72,988,516
1
true
2022-07-14T07:37:17.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xamarin iOS only crash physical iPhone when you open an app<p>I'm facing a strange error. App only crashes on <strong>physical</strong> device. But iOS simul...
72,995,362
Django - what is wrong with my If statement?<p>I inserted an if statement in my template - I only want the form to appear if the product category is &quot;Champagne&quot;.</p> <p>For some reason, the product does not appear for champagne products.</p> <p>Here is the code</p> <p><strong>Models.py</strong></p> <pre><code...
<p>You have to use 4 insted of &quot;Champagne&quot; 4 is value and &quot;Champagne&quot; is label</p> <p><strong>HTML</strong></p> <pre><code>{% if product.category == 4 %} &lt;div class=&quot;d-flex flex-column mt-4&quot;&gt; &lt;a class=&quot;btn btn-outline-secondary btn-sm&quot; href=&quot;{% url 'ElderFlowerRevi...
Django - what is wrong with my If statement?
python|django|django-models|django-forms
0
55
1
72,995,464
72,995,464
1
true
2022-07-15T14:13:31.410Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django - what is wrong with my If statement?<p>I inserted an if statement in my template - I only want the form to appear if the product category is &quot;Ch...
73,001,469
How to use matplotlib to animate bubble plot along with years<p>The following dataset needs to be animated with years as a bubble plot. With the year, Life Expectancy(X-Axis) and GDP(Y-Axis) need to be changed.</p> <pre><code>df.head() </code></pre> <p><a href="https://i.stack.imgur.com/S3Rxg.png" rel="nofollow norefer...
<p>You need to tie <code>i</code> in <code>animate_</code> to the <code>Year</code> by filtering <code>df</code></p> <p>try <code>df[df['Year'] == some_function(i)]</code></p> <p>where <code>some_function(i)</code> maps the frame count to the year selected</p>
How to use matplotlib to animate bubble plot along with years
python|matplotlib|data-visualization|scatter-plot|matplotlib-animation
2
55
2
73,001,887
73,001,887
1
true
2022-07-16T04:15:02.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use matplotlib to animate bubble plot along with years<p>The following dataset needs to be animated with years as a bubble plot. With the year, Life E...
73,003,543
"error CS0103: The name 'targetAngle' does not exist in the current context" in unity 3d while was trying to make a 3rd person camera<p>So, I've been trying to make a third-person camera for the game I'm making in Unity 3D. I'm new to game dev(but I understand some things in this because I tried to make games earlier a...
<p>You define <code>targetAngle</code> in this if statement:</p> <pre><code>if(direction.magnitude &gt;= 0.1f) { float targetAngle = Mathf.Atan2(direction.x, direction.z) * Mathf.Rad2Deg + cam.eulerAngles.y; float angle = Mathf.SmoothDampAngle(transform.eulerAngles.y, targetAngle, ref turnSmoothVelocity, turnS...
"error CS0103: The name 'targetAngle' does not exist in the current context" in unity 3d while was trying to make a 3rd person camera
c#|unity3d|game-development
0
55
1
73,003,668
73,003,668
1
true
2022-07-16T10:48:28.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: "error CS0103: The name 'targetAngle' does not exist in the current context" in unity 3d while was trying to make a 3rd person camera<p>So, I've been trying ...
73,003,154
Every button changes at once in listview builder but i want to operate specifically or single how can i do that?<p>Every button changes at once in listview builder but i want to operate specifically or single how can i do that?</p> <p><a href="https://i.stack.imgur.com/y69wP.gif" rel="nofollow noreferrer">This is wha...
<p>It seems that you have the <code>isPlaying</code> state inside the stateful widget which builds the listview. So that one state is applied to all buttons.</p> <p>You need to control the state for each list item separately.</p> <p>You might include it into your <code>radioDetail</code> object.</p> <p>(Guessing what y...
Every button changes at once in listview builder but i want to operate specifically or single how can i do that?
flutter|radio-button|iconbutton
1
55
1
73,003,875
73,003,875
1
true
2022-07-16T09:44:08.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Every button changes at once in listview builder but i want to operate specifically or single how can i do that?<p>Every button changes at once in listview b...
73,004,316
How to initialize globally redux store with data from server?<p>I have the following Root reducer file:</p> <pre><code>const rootReducer = combineReducers&lt;IAppState&gt;({ auth: authReducer, alert: alertReducer, trees: TreeReducer }); let initialState = {} as IAppState; (async () =&gt; { initialState...
<p>You would usually just not do that - imagine that request takes 10 seconds or fails - the user will just see a white screen in the meantime because you can't really render your application before your store exists.</p> <p>Initialize your store with a sane &quot;placeholder&quot; value, show a &quot;loading&quot; scr...
How to initialize globally redux store with data from server?
javascript|reactjs|typescript|redux|create-react-app
0
55
1
73,004,488
73,004,488
1
true
2022-07-16T12:43:05.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to initialize globally redux store with data from server?<p>I have the following Root reducer file:</p> <pre><code>const rootReducer = combineReducers&lt...
73,006,536
Middleware to protect an endpoint in express<p>I wrote a middleware function that should protect one of my endpoints. I want to allow only a few ip addresses to call that endpoint. This is the middleware:</p> <pre><code>const ipAddressCheck = async (req, res, next) =&gt; { const ip = req.socket.remoteAddress; ...
<p>In general, I would recommend doing it in the load-balancing/reverse-proxy level (NGINX or something else).</p> <p>In case you are having trouble/want keeping it at the app level: Need to pay attention that if you indeed use LB you will need to specify to pass the IP address (since you will always get the IP of the ...
Middleware to protect an endpoint in express
node.js|middleware|access-token
0
55
1
73,006,715
73,006,715
1
true
2022-07-16T18:00:38.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Middleware to protect an endpoint in express<p>I wrote a middleware function that should protect one of my endpoints. I want to allow only a few ip addresses...
73,006,782
How to change background image in winforms based off of text box?<p>Below is my current code for my winforms app. Here the user will click the button and then the system will land on a specific index to an array and then print to the text box the contents of that index in the array. The &quot;if&quot; statement is wher...
<p>In your if statement, you're attempting to assign the string &quot;Woods&quot; to <code>Map_Name</code>, which is the reason you're getting CS0029 (which means that the compiler can't implicitly convert the two types.)</p> <p>Additionally, you'd need to check the <code>Text</code> property of <code>Map_Name</code> i...
How to change background image in winforms based off of text box?
c#|winforms
-1
55
1
73,006,874
73,006,874
1
true
2022-07-16T18:36:48.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change background image in winforms based off of text box?<p>Below is my current code for my winforms app. Here the user will click the button and the...
72,985,129
Union of functions without parameter intersection<p>EDIT: I have updated the entire question based on the discussions in the comments.</p> <p>I'm trying to create a type for a function that looks like: <code>(eventName: EventNames, ...params: [ParamsTypeForEventName]) =&gt; void</code></p> <p>I want the eventName to be...
<p>The conventional way to do this is to make the <code>func</code> method <a href="https://www.typescriptlang.org/docs/handbook/2/generics.html" rel="nofollow noreferrer">generic</a> in the type of the <code>name</code> parameter which should be <a href="https://www.typescriptlang.org/docs/handbook/2/generics.html#gen...
Union of functions without parameter intersection
typescript
1
55
1
73,006,917
73,006,917
1
true
2022-07-14T18:26:19.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Union of functions without parameter intersection<p>EDIT: I have updated the entire question based on the discussions in the comments.</p> <p>I'm trying to c...
73,008,357
why my code doesnt work? i need to make a password generator,<p>when i chose 2 letters, 2 symbols and two numbers it works, but when i chose per example 40 numbers, 40 sybmols and 40 numbers, it doesnt work, say that</p> <p>when i chose 2 letters, 2 symbols and two numbers it works, but each number dont work</p> <p>say...
<p>Yeah, you're issue is a tiny quirk of the <code>random.randint()</code> function. <code>random.randint()</code> chooses a random integer between <em>and including</em> the first and second parameters that you give it, meaning that it could actually choose the second parameter that you give it as an output. Seeing th...
why my code doesnt work? i need to make a password generator,
python
0
55
3
73,008,391
73,008,391
1
true
2022-07-16T23:46:47.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why my code doesnt work? i need to make a password generator,<p>when i chose 2 letters, 2 symbols and two numbers it works, but when i chose per example 40 n...
73,010,786
mixin and append it to psuedo element using scss<p>I have below mixin created in mixins.scss file. working example of cheveron-circle-right as per <a href="https://codepen.io/devvue/pen/gOegwJj" rel="nofollow noreferrer">codepen</a></p> <pre><code>@mixin custom-cheveron-cirle-right { display: inline-block; widt...
<p>You have two problems:</p> <ul> <li>you are missing <code>content:'';</code> in the <code>::after</code> inside mixin</li> <li>you are including your mixin (<code>@include</code>) inside <code>::before</code>, instead of the parent, which then generate invalid CSS <code>li::before::after</code></li> </ul> <p><strong...
mixin and append it to psuedo element using scss
css|scss-mixins
1
55
1
73,011,557
73,011,557
1
true
2022-07-17T09:51:55.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mixin and append it to psuedo element using scss<p>I have below mixin created in mixins.scss file. working example of cheveron-circle-right as per <a href="h...
73,012,526
Error in TradingView Pine script: Could not find function or function reference 'iff'<p>I want to write a script that plot a moving average.<br /> I want the color to be dynamic (green when rising, red when falling).<br /> I tried to use the <a href="https://kodify.net/tradingview/operators/iff-function/" rel="nofollow...
<p>You can use a ternary instead in Pine @version 5:</p> <pre><code>smaColor = smaValue[0] &gt;= smaValue[1] ? color.green : color.red </code></pre>
Error in TradingView Pine script: Could not find function or function reference 'iff'
pine-script|tradingview-api
1
55
1
73,012,561
73,012,561
1
true
2022-07-17T14:13:37.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error in TradingView Pine script: Could not find function or function reference 'iff'<p>I want to write a script that plot a moving average.<br /> I want the...
73,012,758
Uncaught (in promise) Error: Infinite redirect in navigation guard<p>I have a vue3 router defined with the following routes</p> <pre><code>const routes = [ { path: &quot;/&quot;, name: &quot;home&quot;, component: HomeView, }, { path: &quot;/about&quot;, name: &quot;about&quot;, component:...
<p>It's a mistake to do <code>next({ name: &quot;cms&quot; })</code> when <code>cms</code> is already current route. It should be <code>next()</code>, then <code>else if</code> becomes redundant:</p> <pre><code> if (!store.state.loggedIn &amp;&amp; to.name === &quot;cms&quot;) { return next({ name: &quot;login&quo...
Uncaught (in promise) Error: Infinite redirect in navigation guard
javascript|vue.js|google-cloud-platform|vuejs3|vue-router
1
55
1
73,012,847
73,012,847
1
true
2022-07-17T14:45:33.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Uncaught (in promise) Error: Infinite redirect in navigation guard<p>I have a vue3 router defined with the following routes</p> <pre><code>const routes = [ ...
73,011,549
Golang cassandra gocql transaction need a delay time to executed<p>This block of code does not delete the data, I don't know why.</p> <pre><code>s.Query( &quot;INSERT INTO smth (id, name) VALUES (?,?)&quot;, data.ID data.Name ).ScanCAS(nil, nil, nil) s.Query( &quot;DELETE FROM smth WHER...
<p><a href="https://pkg.go.dev/github.com/gocql/gocql#hdr-Executing_multiple_queries_concurrently" rel="nofollow noreferrer">Gocql queries are executed asynchronously</a> so there are no guarantees that your <code>DELETE</code> is executed <em>after</em> the <code>INSERT</code>.</p> <p>In any case, your test case is in...
Golang cassandra gocql transaction need a delay time to executed
go|cassandra|cql|gocql
1
55
1
73,016,565
73,016,565
1
true
2022-07-17T11:56:31.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Golang cassandra gocql transaction need a delay time to executed<p>This block of code does not delete the data, I don't know why.</p> <pre><code>s.Query( ...
73,000,523
azuredevops YAML setting step property from system variable<p>I'm trying to set this step's &quot;enabled&quot; property in YAML but it keeps on setting it to false. The rule is simple: Set to false on any rerun. So basically, this is only enabled on the first attempt.</p> <p>Here is what i have so far:</p> <pre><code>...
<p>You probably want to use the <code>condition:</code> property, not the <code>enabled:</code> one if you want to skip the task completely.</p> <p>The condition looks fine, though you may want to put <code>gt(... , 1)</code> to make sure the job is skipped in a 3rd or 4th attempt as well.</p> <p>You probably also want...
azuredevops YAML setting step property from system variable
azure-devops|yaml|azure-pipelines-release-pipeline
0
55
2
73,019,022
73,019,022
1
true
2022-07-15T23:43:57.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: azuredevops YAML setting step property from system variable<p>I'm trying to set this step's &quot;enabled&quot; property in YAML but it keeps on setting it t...
73,020,271
@Version field in entity class not increased during JPA test even though I updated it<p>I have a simple Repository:</p> <pre><code>public interface ReviewRepository extends CrudRepository&lt;ReviewEntity, Integer&gt; { @Transactional(readOnly = true) List&lt;ReviewEntity&gt; findByProductId(int productId); } </cod...
<p>If you look at the default implementation of <code>save</code> method in <code>CrudRepository</code> interface in the <code>SimpleJpaRepository</code> class you will see <code>save</code> method is implemented like:</p> <pre><code>@Transactional @Override public &lt;S extends T&gt; List&lt;S&gt; saveAll(Iterable&lt;...
@Version field in entity class not increased during JPA test even though I updated it
java|spring|spring-boot
2
55
1
73,020,412
73,020,412
1
true
2022-07-18T09:45:15.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: @Version field in entity class not increased during JPA test even though I updated it<p>I have a simple Repository:</p> <pre><code>public interface ReviewRep...
73,020,895
event problem using addEventListener in a React functional component<p>I have an input in a React component. I'm looking to add a character autocompletion feature. If the user enters <code>&quot;</code> or <code>'</code> a second identical character is added and the mouse cursor is put between the two new quotes create...
<p>If you know the <code>target</code> is an input element you can use typescript casting</p> <pre class="lang-js prettyprint-override"><code>(e.target as HTMLInputElement).value </code></pre>
event problem using addEventListener in a React functional component
javascript|reactjs|typescript|input|keyboard-events
1
55
1
73,021,371
73,021,371
1
true
2022-07-18T10:32:17.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: event problem using addEventListener in a React functional component<p>I have an input in a React component. I'm looking to add a character autocompletion fe...
73,015,652
How to handle the intersection of the XOR operation<h2>Context</h2> <p>I'm trying to recreate an effect used on photoshop called satin effect, which creates stainy texture by creating a satin texture (or structure) and applying a blur-like effect.<br> <br><strong>Example :</strong><br></p> <p><a href="https://i.stack.i...
<p>The fuzzy logic version of the Boolean <code>or</code> operator is the <code>max</code> operator, and that of the <code>and</code> is <code>min</code>.</p> <p>For XOR, the most logical equivalent is <code>max(x-y, y-x)</code>, more efficiently written as <code>abs(x-y)</code>. <a href="https://doi.org/10.1016/j.entc...
How to handle the intersection of the XOR operation
python|opencv|image-processing|signal-processing
2
55
1
73,025,282
73,025,282
1
true
2022-07-17T22:02:09.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to handle the intersection of the XOR operation<h2>Context</h2> <p>I'm trying to recreate an effect used on photoshop called satin effect, which creates ...
73,028,127
Adding coordinates as points to a map in R<p>I have a dataframe of sightings and objects with their latitudes and longitudes:</p> <pre><code>object = c(&quot;yacht&quot;, &quot;fishingboat&quot;, &quot;whale&quot;) long = c(-123.02676, -123.39763, -123.25103) lat = c(38.22033, 38.05059, 38.32280) df = cbind.data.frame(...
<p>You need to reproject these points, then you can use standard <code>geom_point</code> and <code>geom_text</code>. Your points are far too close together to see them all separately on a world map though:</p> <pre class="lang-r prettyprint-override"><code>df &lt;- sf::sf_project(&quot;+proj=longlat +datum=WGS84 +ellp...
Adding coordinates as points to a map in R
r|ggplot2|ggmap|stamen-maps|rnaturalearth
0
55
1
73,028,515
73,028,515
1
true
2022-07-18T20:15:46.233Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adding coordinates as points to a map in R<p>I have a dataframe of sightings and objects with their latitudes and longitudes:</p> <pre><code>object = c(&quot...
73,026,727
How use handle function that return window.location.pathname in cypress?<p>I have some function that return windows.location.pathname, then I transform this function and based on result make some data transformation, but when I run cypress tests, instead of windows.location.pathname I get some cypress object, so If I w...
<p>It looks like you have the location from the wrong window.</p> <p>The <code>history</code> variable gives you the test runner location (hence <code>__cypress</code> in URL), but the app under test is in an <code>&lt;iframe&gt;</code> so it has a different set of global <code>window</code>, <code>location</code>, etc...
How use handle function that return window.location.pathname in cypress?
reactjs|cypress
1
55
2
73,028,987
73,028,987
1
true
2022-07-18T18:05:45.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How use handle function that return window.location.pathname in cypress?<p>I have some function that return windows.location.pathname, then I transform this ...
73,030,667
__init__.py for hy modules with relative imports<p>How do I <code>require</code> all functions in a <code>hy</code> module in an <code>__init__.py</code>? I tried to use a similar model as in the <a href="https://github.com/hylang/hyrule/blob/master/hyrule/__init__.py" rel="nofollow noreferrer"><code>hyrule __init__.py...
<p>The real answer is that <code>hy.macros.require</code> and <code>hy.macros.require_reader</code> are private functions, which could disappear or get backwards-incompatibly changed without notice. There's no official way to <code>require</code> macros from Python. For plain macros, the thing to do is just delegate to...
__init__.py for hy modules with relative imports
hy
0
55
1
73,053,978
73,053,978
1
true
2022-07-19T03:05:49.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: __init__.py for hy modules with relative imports<p>How do I <code>require</code> all functions in a <code>hy</code> module in an <code>__init__.py</code>? I ...
72,954,833
Azure: Installing Python feed packages to Pipeline<p>I have an Azure Artifacts feed with a Python package called py-data (This is an alias). This can be installed on my local machine from the feed, however, I am trying to install it as a dependency for a build pipeline.</p> <p>My YAML code looks like the following:</p>...
<p>I was banging my head over this same issue. What solved it for me was to add the name of the project before the name of artifact feed, like so:</p> <pre><code>- task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: artifactFeeds: 'YOUR-PROJECT/foo-packages' onlyAddExtraIndex: true </code></pr...
Azure: Installing Python feed packages to Pipeline
python|azure-devops
1
55
1
73,062,845
73,062,845
1
true
2022-07-12T15:30:04.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure: Installing Python feed packages to Pipeline<p>I have an Azure Artifacts feed with a Python package called py-data (This is an alias). This can be inst...
73,013,860
Filtering based on a value from a different column but also from a different row<p>I'm quite new to VBA, so I'm guessing this is way above my head at the moment, but I've been having this procedure in mind for quite some time and the fact that I can't figure out anything that even remotely resembles a solution is killi...
<p>If you dispose of Excel version MS365 and its <code>UNIQUE()</code> function, you might try the following procedure <code>Examplecall</code> together with the user defined help functions <code>GetFormula()</code> and <code>IsValid()</code>. <em>(If not there are many examples at SO how to get unique values in versio...
Filtering based on a value from a different column but also from a different row
excel|vba|duplicates|filtering|unique
1
55
1
73,101,668
73,101,668
1
true
2022-07-17T17:18:07.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filtering based on a value from a different column but also from a different row<p>I'm quite new to VBA, so I'm guessing this is way above my head at the mom...
73,000,698
Is there an alternative for '<Button-1>' with bind() function in Tkinter ?- Python<p>Drag and Click aren't the same thing so I was thinking maybe there is an alternative to <code>'&lt;Button-1&gt;'</code> for saying drag when the right click is pressed. Because in my project I can't display a menu (when I click on the ...
<p>Yes you can bind a single button to perform two actions using Boolean values True and False. Look at the example below where I have used space bar key to change background color.</p> <pre><code>import tkinter class ChangeColor(tkinter.Tk): change = False def __init__(self): super().__init__() ...
Is there an alternative for '<Button-1>' with bind() function in Tkinter ?- Python
python|python-3.x|tkinter
0
55
1
73,166,896
73,166,896
1
true
2022-07-16T00:25:31.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there an alternative for '<Button-1>' with bind() function in Tkinter ?- Python<p>Drag and Click aren't the same thing so I was thinking maybe there is an...
72,877,318
Scrapping name from JavaScript based table using Selenium<p>Hello Everyone I am trying to scrap a table from a Javascript based website. It is however quite strange as the table is split up into different table tags. I cannot share the website as its on an internal server but have attached some html code below:</p> <pr...
<ol> <li>Find all tables.</li> </ol> <pre class="lang-py prettyprint-override"><code>tables = driver.find_elements(By.XPATH, '//table[@class=&quot;dojoxGridRowTable&quot;]') </code></pre> <ol start="2"> <li><p>For loop these tables find first td.</p> <p>(<code>tables[1:]</code> will skip first table which are column na...
Scrapping name from JavaScript based table using Selenium
python|selenium
0
55
1
72,878,998
72,878,998
1
true
2022-07-06T02:25:49.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Scrapping name from JavaScript based table using Selenium<p>Hello Everyone I am trying to scrap a table from a Javascript based website. It is however quite ...
72,911,844
How can I display an image to me (as an user) and select a section of that image?<p>I will explain myself better, the point is that I want to develop a code that displays an image to me, <em><strong>then with the mouse</strong></em> as the image is displayed I can select or crop it as I want.</p> <p>So, for example, as...
<p>The comments I received from <a href="https://stackoverflow.com/users/2836621/mark-setchell">Mark Setchell</a> and <a href="https://stackoverflow.com/users/9705687/bfris">bfris</a> enlightened me, one with a C++ code and another one with a recommendation of OpenCV.</p> <p>But in addition to their comments, I found t...
How can I display an image to me (as an user) and select a section of that image?
python
1
55
1
72,915,421
72,915,421
1
true
2022-07-08T13:03:15.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I display an image to me (as an user) and select a section of that image?<p>I will explain myself better, the point is that I want to develop a code ...
72,783,661
{FIXED} Golang RESTAPI returns wrong data<p>When i use the debugger the <code>metricId</code> returns the Metric Object with all <code>0 or null</code> values (same as the output).</p> <p><em>what am i doing wrong here?</em></p> <p><code>The Database connection works.</code></p> <pre><code>func GetMetricById(c *gin.Con...
<p>[ANSWER]</p> <pre><code>func GetMetricsByDataId(c *gin.Context) { queryParams := c.Request.URL.Query() conn := config.DatabaseConnect() var metrObject []models.Metric rows, _ := conn.Query(&quot;SELECT * FROM Metric WHERE data_id = ?&quot;, queryParams.Get(&quot;data_id&quot;)) defer rows....
{FIXED} Golang RESTAPI returns wrong data
sql|rest|go|mariadb|go-gin
-1
55
2
72,784,154
72,784,154
1
true
2022-06-28T09:07:37.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: {FIXED} Golang RESTAPI returns wrong data<p>When i use the debugger the <code>metricId</code> returns the Metric Object with all <code>0 or null</code> value...
73,022,930
DateTimeFormatter with parseDefaulting throwing exception<p>I have</p> <pre><code>private static final DateTimeFormatter DATE_PATTERN = new DateTimeFormatterBuilder() .appendPattern(&quot;yyyy-MM-dd[ ]['T'][HH:mm:ss][.SSSSSS][.SSSSS][.SSSS][.SSS][.SS][.S][X]&quot;) .parseDefaulting(ChronoField.HOUR_OF_DAY, 0) ...
<p>Note that the <code>S</code> pattern specifier corresponds to the <code>NANO_OF_SECOND</code> field. <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/format/DateTimeFormatter.html" rel="nofollow noreferrer">Documentation</a></p> <div class="s-table-container"> <table class="s-table"> <...
DateTimeFormatter with parseDefaulting throwing exception
java|datetimeformatter|datetimeparseexception
1
55
2
73,023,460
73,023,460
1
true
2022-07-18T13:16:11.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DateTimeFormatter with parseDefaulting throwing exception<p>I have</p> <pre><code>private static final DateTimeFormatter DATE_PATTERN = new DateTimeFormatter...
72,926,874
Python on VSC (MacOs) running line of code with root/sudo permission (using Scapy)<p>I'm running a port scanner algorithm on Python 3 using VSC on Mac. When running the Scapy function, or any other type of scanner, I get the following error: Scapy_Exception: Permission denied: could not open /dev/bpf0. Make sure to be ...
<p>Just run this script as root user.</p> <pre><code>sudo python script.py </code></pre> <p>do install scapy as root user.</p>
Python on VSC (MacOs) running line of code with root/sudo permission (using Scapy)
python|visual-studio-code|scapy
0
55
1
72,926,937
72,926,937
1
true
2022-07-10T07:36:56.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python on VSC (MacOs) running line of code with root/sudo permission (using Scapy)<p>I'm running a port scanner algorithm on Python 3 using VSC on Mac. When ...
73,001,420
How to make the height of a TextField and a search button equal in Flutter?<p>I'm creating a Flutter app. The app has a <code>TextField</code> and an <code>IconButton</code>, I want to make their height equal. Here is the current code:</p> <pre class="lang-dart prettyprint-override"><code>import 'package:flutter/materi...
<p>It works by removing extra padding from Top and Bottom of TextField, and now both are the same size</p> <pre><code>Row( children: [ const Expanded( child: TextField( decoration: InputDecoration( contentPadding: EdgeInsets.only(left: ...
How to make the height of a TextField and a search button equal in Flutter?
flutter
0
55
2
73,001,529
73,001,529
1
true
2022-07-16T04:00:39.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make the height of a TextField and a search button equal in Flutter?<p>I'm creating a Flutter app. The app has a <code>TextField</code> and an <code>I...
72,781,822
Find the size/level of a node from its position within an quadtree<p>I have a quadtree. The root node (level 0) is positioned at <code>0,0</code> by its centre. It has a width of 16, so its corners are at <code>-8,-8</code> and <code>8,8</code>. Since it's a quadtree, the root contains four children, each of which cont...
<p>Observe that the coordinate values for the centre of each node are always +/- <strong>odd multiples of a power-of-2</strong>, the latter being related to the node size:</p> <pre><code>Node size | Allowed centre coordinates | Factor ----------------------------------------------------- 2 | 1, 3, 5, 7, 9, 11 ....
Find the size/level of a node from its position within an quadtree
math|quadtree
0
55
1
72,786,539
72,786,539
1
true
2022-06-28T06:46:25.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find the size/level of a node from its position within an quadtree<p>I have a quadtree. The root node (level 0) is positioned at <code>0,0</code> by its cent...
72,946,158
Swift Scope - Returning if and for results from a function<p>How do i get the result of of <code>i</code> to return from the function here? I can return it from inside the if { } but then I get an error there’s no global return (for the function). My goal is to write a function that accepts an Integer and returns the...
<p>A couple of things are swapped around, and something (anything) needs to be returned from the function. The framing of the question only allows solutions that don't work if the input is not an integer with a square root.</p> <p><strong>List of Specifics:</strong></p> <ul> <li>The function argument name <code>userIn...
Swift Scope - Returning if and for results from a function
swift
0
55
2
72,988,959
72,988,959
1
true
2022-07-12T01:32:05.893Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Swift Scope - Returning if and for results from a function<p>How do i get the result of of <code>i</code> to return from the function here? I can return it ...
73,026,651
Coq: Implementation of splitstring and proof that nothing gets deleted<p>after working for a whole day on this with no success, I might get some help here. I implemented a splitString function in Coq: It takes a String (In my case a <code>list ascii</code>) and a function <code>f: ascii-&gt;bool</code>. I want to retur...
<p>Here is a proof of your theorem:</p> <pre><code>Goal forall p l buf, rev buf ++ l = concat (split_string p buf l). Proof. induction l as [ | a l IHl]. - intro; now cbn. - cbn; case_eq (p a); intro Ha. + intro buf; repeat rewrite concat_cons; now rewrite &lt;- IHl. + intro buf; rewrite &lt;- IHl; cbn; ...
Coq: Implementation of splitstring and proof that nothing gets deleted
coq|proof|induction
1
55
2
73,033,161
73,033,161
1
true
2022-07-18T17:59:33.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Coq: Implementation of splitstring and proof that nothing gets deleted<p>after working for a whole day on this with no success, I might get some help here. I...
72,979,686
Authentification in the DHL-SOAP API<p>I would like to make a CreateShipmentOrderRequest call, unfortunately I always get back a response &quot;login failed&quot;.</p> <p>I think the authentication that is specified within the XML header is missing:</p> <pre><code> &lt;soapenv:Header&gt; &lt;cis:Auth...
<p>Benjamin Müller gives the answer to your question under the following link.A few objects (actually only names) still have to be adjusted.</p> <p><a href="https://stackoverflow.com/questions/52767373/java-wsdl-dhl-classes">Java WSDL DHL Classes</a></p> <p>The two lines below the following line must be used, otherwise...
Authentification in the DHL-SOAP API
java|xml|spring-boot|soap|dhl
1
55
1
73,033,431
73,033,431
1
true
2022-07-14T11:20:00.303Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Authentification in the DHL-SOAP API<p>I would like to make a CreateShipmentOrderRequest call, unfortunately I always get back a response &quot;login failed&...
72,961,301
div element is not being displayed even though the element is present<p>I want to build a section like this:</p> <p><a href="https://i.stack.imgur.com/XEyfR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XEyfR.png" alt="enter image description here" /></a></p> <p>So, I built a <code>div</code> havin...
<p>Try this code.</p> <p>keep the <code>img</code> tag inside <code>div.small-red-box</code>. position absolute is not needed in this case. so I have removed it from CSS.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-c...
div element is not being displayed even though the element is present
html|css
0
55
1
72,961,934
72,961,934
1
true
2022-07-13T05:24:42.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: div element is not being displayed even though the element is present<p>I want to build a section like this:</p> <p><a href="https://i.stack.imgur.com/XEyfR....
72,823,579
How to get the file directory for a custom cmdlet<p>The way our business is set up, our custom cmdlets are spread out across the network in several different larger files. We refer to these files in the usual &quot;Microsoft.PowerShell_profile.ps1&quot;</p> <p>Is there something I can run within Powershell to find wher...
<p><code>Get-Command</code> is what you need. That being said, depending on the command you are testing and the type of the command (external application, function, cmdlet, profile function), the command path won't always be assigned to the same property / subproperty.</p> <p>Here's a way to get the path no matter wher...
How to get the file directory for a custom cmdlet
powershell
1
55
1
72,823,750
72,823,750
1
true
2022-07-01T01:36:17.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get the file directory for a custom cmdlet<p>The way our business is set up, our custom cmdlets are spread out across the network in several different...
72,960,287
How to align form to the right and have an image on the right of the div?<p>Currently, this is like this: <a href="https://i.stack.imgur.com/kJuMy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kJuMy.png" alt="enter image description here" /></a></p> <p>How can I make it look like this? <a href="htt...
<p><b>Disclaimer, I've used Bootstrap 5 as a few styling were coming out clunky, probably cause you were using a beta release of Bootstrap 4 (I would recommend switching to a stable version)</b></p> <p>This is how I would do it, I split the image and the input fields into their own columns using Grid System.</p> <p>I r...
How to align form to the right and have an image on the right of the div?
html|bootstrap-4
0
55
3
72,965,886
72,965,886
1
true
2022-07-13T02:32:59.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to align form to the right and have an image on the right of the div?<p>Currently, this is like this: <a href="https://i.stack.imgur.com/kJuMy.png" rel="...
72,971,324
Dependency injection using go interface<p>Im trying to use some dependency injection via go interface after reading some docs about it.</p> <p>I’ve two methods which should implement one interface</p> <pre><code>type Shooter interface { Spec(ev v1alpha1.Ev) (v1beta1.Shoot, error) } type Project struct { Name s...
<blockquote> <p>But it doesn’t works</p> </blockquote> <p>It is not specified, but I assume that Dependency Injection does not work.</p> <p>Injection requires at least two different entity types. One is injected and the second on is a target receiving that injection.</p> <p>In your case, you have only one - Injection i...
Dependency injection using go interface
go|dependency-injection|interface
1
55
1
72,971,613
72,971,613
1
true
2022-07-13T18:57:55.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dependency injection using go interface<p>Im trying to use some dependency injection via go interface after reading some docs about it.</p> <p>I’ve two metho...
72,999,708
Passing a vector pointer and looping it to change its value<p>I'm trying to pass a vector to a function, loop over it, and modify the values before sending it back, but I'm having a very hard time with the <code>pointer</code> and <code>reference</code> to make it work:</p> <p>I understand that <code>itr</code> is a po...
<p>For starters the first parameter of the function <code>changeResourceValue</code> is declared with the qualifier <code>const</code></p> <pre><code>void changeResourceValue(const vector&lt;asset&gt;* resources, asset value){ </code></pre> <p>It means that you may not change elements of the vector pointed to by the p...
Passing a vector pointer and looping it to change its value
c++|compiler-errors|reference|stdvector|assignment-operator
1
55
2
72,999,808
72,999,808
1
true
2022-07-15T21:20:02.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Passing a vector pointer and looping it to change its value<p>I'm trying to pass a vector to a function, loop over it, and modify the values before sending i...
72,930,989
Ternary operator in Typescript based Reactjs does not work as I expected<p>I am newbie in TypeScript+ReactJS In my code Ternary operator does not work as I expect. This is my code:</p> <pre><code>import React, { SyntheticEvent,useRef,useState } from &quot;react&quot;; import Result from './Result'; //main application c...
<p>you need to change <code>searchResult===[]</code> to <code>searchResult.length === 0</code></p> <p>When you compare arrays using <code>===</code> you are actually checking whether the two arrays are the same array. It does not check whether the two arrays have the same content.</p> <p>Here's a short program that ill...
Ternary operator in Typescript based Reactjs does not work as I expected
reactjs|typescript|conditional-operator
1
55
2
72,931,015
72,931,015
1
true
2022-07-10T18:40:46.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ternary operator in Typescript based Reactjs does not work as I expected<p>I am newbie in TypeScript+ReactJS In my code Ternary operator does not work as I e...
73,021,189
Stata drop if equivalent for string variable in ggplot (R)<p>I am trying to produce a graph for a categorical variable with three sub-groups, but I would like to strictly present the results for two groups. In Stata, this can be done while producing a graph by adding something like, but I am not sure if there is an R e...
<p>You can do some version of this via piping to ggplot or using filter in the data argument</p> <pre class="lang-r prettyprint-override"><code>library(tidyverse) library(palmerpenguins) penguins &lt;- penguins penguins |&gt; drop_na() |&gt; filter(species != &quot;Adelie&quot;) |&gt; ggplot(aes(x = bill_...
Stata drop if equivalent for string variable in ggplot (R)
r|ggplot2|data-visualization
0
55
2
73,023,810
73,023,810
1
true
2022-07-18T10:53:53.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stata drop if equivalent for string variable in ggplot (R)<p>I am trying to produce a graph for a categorical variable with three sub-groups, but I would lik...
73,015,458
Counting occurrences of multiple characters in a string, with python<p>I'm trying to create a function that -given a string- will return the count of non-allowed characters ('error_char'), like so: 'total count of not-allowed / total length of string'.</p> <p>So far I've tried:</p> <pre><code>def allowed_characters(s):...
<p>Whenever it comes to do quicker <em>counting</em> - it's always good to think about <em>Counter</em> You can try to simplify your code like this:</p> <p><strong>Notes</strong> - please don't change your Problem Description during the middle of people's answering posts. That make it very hard to keep in-sync.</p> <...
Counting occurrences of multiple characters in a string, with python
python|string
1
55
2
73,015,559
73,015,559
1
true
2022-07-17T21:22:32.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Counting occurrences of multiple characters in a string, with python<p>I'm trying to create a function that -given a string- will return the count of non-all...
72,775,063
Split a single row from column in into as many rows as words are in the string<p>I have a column with some Events names.I need to split one of the names into as many rows as words are in that name. Lets say 'The UK declares war on Germany' have to become</p> <pre class="lang-none prettyprint-override"><code>1.The 2.UK...
<p>If you want to to use <code>STRING_SPLIT</code> wit a column from anoter table, you need some more code for it</p> <blockquote> <pre><code>CREATE TABLE test_table(id int, name varchar(100)) GO </code></pre> </blockquote> <blockquote> <pre><code>INSERT INTO test_table VALUEs (1,'Test text'), (3,'The UK declares war...
Split a single row from column in into as many rows as words are in the string
sql|tsql
0
55
1
72,775,623
72,775,623
1
true
2022-06-27T15:59:19.227Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Split a single row from column in into as many rows as words are in the string<p>I have a column with some Events names.I need to split one of the names into...
72,778,145
SQL: finding (multiple) best students of a professor by grade<p>I have to find the students with the best grade of each professor with this given table &quot;x&quot;:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Prof</th> <th>Student</th> <th>Grade</th> </tr> </thead> <tbody> <tr> <td>A<...
<p>You ave two possibilities</p> <p>Once you select the minimum of grades for every professor and use tat as resilset fpr an IN clause.</p> <pre><code>SELECT Prof, Student, Grade FROM x WHERE (Prof, Grade) IN (SELECT Prof, MIN(Grade) FROM x GROUP BY Prof) </code></pre> <p>Or as joined table, which is on big table u...
SQL: finding (multiple) best students of a professor by grade
sql|group-by
1
55
1
72,778,238
72,778,238
1
true
2022-06-27T20:49:45.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL: finding (multiple) best students of a professor by grade<p>I have to find the students with the best grade of each professor with this given table &quot...
73,002,951
How to update some values only in bulk in elasticsearch?<p>In elasticsearch I have data something like <code>post_en</code> as index and multiple posts saved in that which has fields like <code>id, title, description, price, status</code>.</p> <p>Now how I can update specific fields only for each post with the use of b...
<p>You possibly will have to do update as opposed to insert (doc_as_upsert option)</p> <p>Quoting the documentation here</p> <p><a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html#bulk-update" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/current/d...
How to update some values only in bulk in elasticsearch?
php|elasticsearch|logstash|elastic-stack|elk
0
55
1
73,003,553
73,003,553
1
true
2022-07-16T09:11:23.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to update some values only in bulk in elasticsearch?<p>In elasticsearch I have data something like <code>post_en</code> as index and multiple posts saved...
73,027,189
ZonedDateTime localized format<p>I want to display ZonedDateTime in format like</p> <blockquote> <p>11.10.2022 13:30 (GMT+2) / 11.10.2022 01:30 PM (GMT+2)</p> </blockquote> <p>depending on device settings. So far I have done something similar using formatDateTime function from DateUtils class, but this function doesn't...
<p>Use <code>DateTimeFormatter</code> helper from <code>java.time.format</code> to format <code>ZonedDateTime</code>, for example:</p> <pre class="lang-kotlin prettyprint-override"><code>val time = ZonedDateTime.now() val formatter = DateTimeFormatter.ofPattern(&quot;dd.MM.yyyy HH:mm (O)&quot;) formatter.format(time) /...
ZonedDateTime localized format
java|android|kotlin|date|zoneddatetime
0
55
1
73,027,779
73,027,779
1
true
2022-07-18T18:46:48.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ZonedDateTime localized format<p>I want to display ZonedDateTime in format like</p> <blockquote> <p>11.10.2022 13:30 (GMT+2) / 11.10.2022 01:30 PM (GMT+2)</p...
72,970,386
Constraining optaplanner's choices based on the result of different choices - Constraint Propagation / Local Consistency<p>I have an optimization problem that I'm working on in which the optimizer's decision for one variable needs to constrain the available choices for another variable, and I'm wondering about the suit...
<p>Both 1 and 2 should be possible; 2 being the straightforward way.</p> <p>Another option would be to use <a href="https://www.optaplanner.org/docs/optaplanner/latest/move-and-neighborhood-selection/move-and-neighborhood-selection.html#filteredMoveSelection" rel="nofollow noreferrer">filtered move selection</a> to ski...
Constraining optaplanner's choices based on the result of different choices - Constraint Propagation / Local Consistency
optaplanner|constraint-programming
0
55
1
72,970,714
72,970,714
1
true
2022-07-13T17:31:05.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Constraining optaplanner's choices based on the result of different choices - Constraint Propagation / Local Consistency<p>I have an optimization problem tha...
73,001,411
Pandas GroupBy Total Row for Days of the Week, then sum only on one column<p>I attempted this by:</p> <pre><code>df = { 'inc_date':['06-Jul-2020','06-Jul-2020','06-Jul-2020','07-Jul-2020','08-Jul-2020','08-Jul-2020','09-Jul-2020',], } df = pd.DataFrame(dict(df)) df['inc_Day_of_Week'] = pd.DatetimeIndex(df['inc_date'])....
<p>Replacing <code>NaN</code> values with <code>&quot;&quot;</code> should solve your query. After you add the <code>Total</code> row to the <code>dfTemp</code> DataFrame, add this line of code</p> <p><strong>CODE</strong></p> <pre><code>dfTemp.fillna(value=&quot;&quot;, inplace=True) </code></pre> <p>If you want to av...
Pandas GroupBy Total Row for Days of the Week, then sum only on one column
python|pandas|group-by
0
55
2
73,001,815
73,001,815
1
true
2022-07-16T03:59:15.477Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas GroupBy Total Row for Days of the Week, then sum only on one column<p>I attempted this by:</p> <pre><code>df = { 'inc_date':['06-Jul-2020','06-Jul-202...
72,945,445
WORDLE - Read .txt file but if a word repeats dont use it again<p>im doing a simple Wordle clone in C. I already finished it but im adding some little things that i think make it nicer and that let me practice more since im still new to programming.</p> <p>Anyways, the problem is, i use a .txt file to get the &quot;ran...
<p>Have a table in memory of the words used so far, since you specify a max of 8 its very simple.</p> <p>this function returns true (1) if it remembered the word, false (0) if the word was already used</p> <pre><code> int rememberWord(char* word) { static int used_word_count = 0; static char* used_words[8][6];...
WORDLE - Read .txt file but if a word repeats dont use it again
c|file
0
55
2
72,945,560
72,945,560
1
true
2022-07-11T22:57:19.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WORDLE - Read .txt file but if a word repeats dont use it again<p>im doing a simple Wordle clone in C. I already finished it but im adding some little things...
72,833,957
map a dictionary on a list of dictionaries. How to optimize this without for loops?<p>So I have a list of objects with attributes, but they can be treated as a dictionary.</p> <p>So category_objects:</p> <pre><code>category_objects = [{&quot;power&quot;: 10, &quot;speed&quot;:2, &quot;control&quot;:3}, {&quot;power&quo...
<p>Since you mention that you <em>are</em> already using Pandas to put these data into a dataframe, you might as well take advantage of Pandas in the first place. You likely won't beat the performance by much, but it's fewer steps, which itself is an improvement in maintainability:</p> <pre class="lang-py prettyprint-o...
map a dictionary on a list of dictionaries. How to optimize this without for loops?
python|numpy|dictionary|for-loop
-1
55
2
72,834,157
72,834,157
1
true
2022-07-01T19:39:43.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: map a dictionary on a list of dictionaries. How to optimize this without for loops?<p>So I have a list of objects with attributes, but they can be treated as...
72,938,731
One Step Ahead Forecasting in R<p>I am using these minor data points to forecast the following intervals via one-step ahead Forecasting. For that, I have built a custom function to execute this but whenever I try to print the next interval it won't prints the value for 2022. I would appreciate it if someone would help ...
<p>you do not see 2022 as you do not have this number/year in your dataframe (Ad1), which you use go extract the info from.</p> <p>So you need to twist your code a little, mainly generating a corresponding sequence of years. Instead of <code>dplyr::slice</code> I used directly the index selection method for dataframes ...
One Step Ahead Forecasting in R
r|forecasting|arima
0
55
1
72,941,133
72,941,133
1
true
2022-07-11T12:37:31.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: One Step Ahead Forecasting in R<p>I am using these minor data points to forecast the following intervals via one-step ahead Forecasting. For that, I have bui...
72,925,913
How do I access data from a js file?<p>Test.vue</p> <pre><code>&lt;template&gt; &lt;div&gt; &lt;button @click=&quot;test()&quot;&gt;test&lt;/button&gt; &lt;/div&gt; &lt;/template&gt; &lt;script&gt; import logs from './data.js' export default { data () { return { ...
<p>You have to make a functional call.</p> <pre><code>&lt;script&gt; import logs from './data.js' export default { data () { return { logitems1: logs.data().infomation, logitems2: { log1d: 1, logDetail: &quot;This is some log detail f...
How do I access data from a js file?
javascript|vue.js
0
55
1
72,925,978
72,925,978
1
true
2022-07-10T03:12:12.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I access data from a js file?<p>Test.vue</p> <pre><code>&lt;template&gt; &lt;div&gt; &lt;button @click=&quot;test()&quot;&gt;test&lt;/bu...
73,021,619
My web site's links are not working (404 NOT FOUND) on my server<p>My web site's links are not working.</p> <p>My site : <a href="https://overlap.ulb.be/public/" rel="nofollow noreferrer">https://overlap.ulb.be/public/</a></p> <p>When I click on a link, I have a 404 NOT FOUND (on any link)</p> <p>If I click on the link...
<p>your issue was not loading your asset correctly. you can put the full URL of styles and javascript in your app layout including the public or you can use the asset function to generate a URL for an asset using the current scheme of the :</p> <pre class="lang-html prettyprint-override"><code>&lt;link rel=&quot;styles...
My web site's links are not working (404 NOT FOUND) on my server
laravel|apache|.htaccess|laravel-8
0
55
1
73,024,416
73,024,416
1
true
2022-07-18T11:29:10.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My web site's links are not working (404 NOT FOUND) on my server<p>My web site's links are not working.</p> <p>My site : <a href="https://overlap.ulb.be/publ...
72,956,746
SQL Server => How to use "case when" on multiple column to show a formula result based on a condition in the same line<p>I'm trying to provide an overall result of a formula ([CALCULATION]) and then in two extra columns ([NO_TENURE] &amp; [TENURE]) the same calculation but using &quot;CASE WHEN&quot; to filter the info...
<p>You have TENURE in your GROUP BY, which means that each different tenure in your source data will get a different row in the output.</p> <p>If you take TENURE out of there, you'll get the one row you want. The your CASE expression won't work, because it should be INSIDE the aggregate functions...</p> <pre><code>SELE...
SQL Server => How to use "case when" on multiple column to show a formula result based on a condition in the same line
sql|sql-server|group-by|case
1
55
1
72,958,150
72,958,150
1
true
2022-07-12T18:16:18.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL Server => How to use "case when" on multiple column to show a formula result based on a condition in the same line<p>I'm trying to provide an overall res...
72,965,223
How to cut and paste or move each footnote content next to footnote mark in ms-word<p>I am new to VBA. I need help. How to cut and paste (or move) the each footnote content next to the respective footnote indicator in Body Text. While placing the text, i need to place in between XML Tag <code>&lt;Footnote&gt;..&lt;/Foo...
<p>For example:</p> <pre><code>Sub MoveFootNotes() Application.ScreenUpdating = False Dim RngSrc As Range, RngTgt As Range, f As Long With ActiveDocument For f = .Footnotes.Count To 1 Step -1 With .Footnotes(f) Set RngSrc = .Range Set RngTgt = .Reference With RngTgt .Collapse wdCollapseS...
How to cut and paste or move each footnote content next to footnote mark in ms-word
vba|ms-word
-1
55
1
72,974,838
72,974,838
1
true
2022-07-13T11:04:13.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to cut and paste or move each footnote content next to footnote mark in ms-word<p>I am new to VBA. I need help. How to cut and paste (or move) the each f...
72,775,922
Fill NA and update columns from another dataframe<p>I want to conditionally fill the missing and update the value from another dataframe.</p> <p>I want to fill missing and update the data on column <em>values</em> in dataframe <strong>smalldf</strong>.</p> <p>The condition is, if the value in <em>B</em> column (<stron...
<p>In SQL your problem would look like:</p> <pre class="lang-sql prettyprint-override"><code>SELECT df1.RoadNo, df1.Range_FROM, df1.Range_TO, MIN(df2.values) FROM df1 LEFT JOIN df2 ON df1.RoadNo = df2.RoadNo AND df2.B &gt;= df1.Range_FROM AND df2.B &lt;= df1.Range_TO GROUP BY df1.RoadNo, df1.Range_FROM, df...
Fill NA and update columns from another dataframe
python|sql|pandas|dataframe
0
55
2
72,777,048
72,777,048
1
true
2022-06-27T17:09:49.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fill NA and update columns from another dataframe<p>I want to conditionally fill the missing and update the value from another dataframe.</p> <p>I want to fi...
72,922,900
Authorization failed error when trying to download from an anchor tag<p>When I try it in PostMan I can download the file by adding the token to the header. I can't find a way to add the token on the header. Is that something that should be in the frontend or in the backend?</p> <p>React js</p> <pre><code>&lt;a href={...
<p>Downloading a resource with pure HTML (an <code>&lt;a&gt;</code> anchor or a <code>&lt;form&gt;</code>) produces only requests with &quot;standard&quot; headers like <code>Accept-Language</code> or <code>Accept-Encoding</code>, <em>never</em> with a token header. So what you try is impossible with pure HTML.</p> <p>...
Authorization failed error when trying to download from an anchor tag
node.js|reactjs|express|authentication
0
55
2
72,923,833
72,923,833
1
true
2022-07-09T16:09:23.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Authorization failed error when trying to download from an anchor tag<p>When I try it in PostMan I can download the file by adding the token to the header. I...
72,981,035
sklearn random forest plot interpretation<p>can you please help me to understand the plot below. what is Gini? what the meaning that the values of the Glucose are [66,72]? what the diffrent betweeen the colors (blue,white,pink)?</p> <p>data based on diabetes.csv (google it)</p> <pre class="lang-py prettyprint-overri...
<p>From <a href="https://scikit-learn.org/stable/auto_examples/tree/plot_iris_dtc.html" rel="nofollow noreferrer">this example</a>:</p> <blockquote> <p>For each pair of features, the decision tree learns decision boundaries made of combinations of simple thresholding rules inferred from the training samples.</p> </bloc...
sklearn random forest plot interpretation
scikit-learn|random-forest|sklearn-pandas
1
55
1
72,987,363
72,987,363
1
true
2022-07-14T13:07:15.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: sklearn random forest plot interpretation<p>can you please help me to understand the plot below. what is Gini? what the meaning that the values of the Glu...
72,911,698
MomentJS - Showing the wrong time for Pacific Timezone<p>I did not write the code involving Moment. But I'm tying to convert it to plain JavaScript.</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 prettyp...
<p>I think the key point here is to avoid using the internal <code>_d</code> variable.</p> <p>See <a href="https://momentjs.com/guides/#/lib-concepts/internal-properties/" rel="nofollow noreferrer"><code>Moment Internal Properties</code></a> for details.</p> <p>These values will not give the expected result:</p> <block...
MomentJS - Showing the wrong time for Pacific Timezone
javascript|datetime|momentjs|moment-timezone
1
55
2
72,913,661
72,913,661
1
true
2022-07-08T12:50:22.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MomentJS - Showing the wrong time for Pacific Timezone<p>I did not write the code involving Moment. But I'm tying to convert it to plain JavaScript.</p> <p><...
72,825,019
How can I count occurrences of different types from my table using a raw query?<p>I have a table named <code>partner</code>. In the <code>partner</code> table I have one column named <code>type</code> where I store the type of partner: either yearly, monthly, or weekly.</p> <p>I want to count the types of partner. For ...
<p>I am not sure about the structure of Partner table . If the column type is varchar and you actual store 'Yearly' or 'Monthly' or 'Weekly' then you do not need <code>DB::raw</code> , just</p> <pre><code>foreach ($type as $key =&gt; $value) { $partner[] = Partner::where('type',$value)-&gt;count(); ...
How can I count occurrences of different types from my table using a raw query?
php|sql|laravel|database
-2
55
1
72,826,019
72,826,019
1
true
2022-07-01T06:04:23.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I count occurrences of different types from my table using a raw query?<p>I have a table named <code>partner</code>. In the <code>partner</code> tabl...
72,950,160
PostgreSQL NULL value cannot be found<p>select * from test;</p> <p><a href="https://i.stack.imgur.com/Jfmbb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jfmbb.png" alt="enter image description here" /></a></p> <p>select * from test where name not in ('amtf');</p> <p><a href="https://i.stack.imgur....
<p>As others have said, the problem here is, that you're comparing against a <code>null</code> value, so it returns nothing, because it considers it as <code>false</code>, and I'll go even further that even if you say <code>where name &lt;&gt; 'admf'</code> it wont work, and even if you add more rows it will ignore the...
PostgreSQL NULL value cannot be found
sql|postgresql|sql-null
0
55
2
72,956,293
72,956,293
1
true
2022-07-12T09:38:16.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PostgreSQL NULL value cannot be found<p>select * from test;</p> <p><a href="https://i.stack.imgur.com/Jfmbb.png" rel="nofollow noreferrer"><img src="https://...
72,782,128
Angular Material Tooltip - is it possible to embed an image in a mat-tooltip?<p>I'm currently trying to find the best way to display an corresponding image when hovering some sort of text in Angular. I thought about embedding the image in a mat-tooltip but couldn't figure out if it is possible to do it this way.</p> <p...
<p>You would need to implement custom template, which material tooltip doesn't support out of the box. There are workarounds if you look around though.</p> <p>A simpler way would be to use package, that supports templates however.</p> <p><a href="https://ng-matero.github.io/extensions/components/tooltip/overview" rel="...
Angular Material Tooltip - is it possible to embed an image in a mat-tooltip?
angular|angular-material
0
55
1
72,782,805
72,782,805
1
true
2022-06-28T07:13:19.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular Material Tooltip - is it possible to embed an image in a mat-tooltip?<p>I'm currently trying to find the best way to display an corresponding image w...
72,772,128
How to convert the elasticsearch query to aggregationbuilder<p>I am trying to write a query using elasticsearch where response should be sum of a column with condition of other fields. I'm able to do it using elasticsearch query but unable to do is using elasticsearch aggregationbuilder in elasticsearch api. Anyone ple...
<p>You can use below code in java. This code is in ES 7.X version but same or with minor change it will work.</p> <pre class="lang-java prettyprint-override"><code>SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); BoolQueryBuilder qb = QueryBuilders.boolQuery() .must(QueryBuilders.ma...
How to convert the elasticsearch query to aggregationbuilder
elasticsearch|elastic-stack|elasticsearch-5
0
55
1
72,772,426
72,772,426
1
true
2022-06-27T12:28:53.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert the elasticsearch query to aggregationbuilder<p>I am trying to write a query using elasticsearch where response should be sum of a column with...
72,875,232
How to specify the rendering order in React<p>I have a .tsx file that renders two component:</p> <pre><code>export default observer(function MyModule(props: MyModuleProps) { .... return ( &lt;div&gt; &lt;TopPart&gt;&lt;/TopPart&gt; &lt;LowerPart&gt;&lt;/LowerPart&gt; ...
<p>Disclaimer: this is a hack.</p> <p>If the problem is server side, this is easy for react. Just throw up a placeholder while data is loading, then save it in state when loading finishes and render.</p> <p>The following answer assumes this is a rendering performance problem. If it is, then you look at that rendering p...
How to specify the rendering order in React
javascript|reactjs|typescript
0
55
1
72,876,090
72,876,090
1
true
2022-07-05T20:33:03.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to specify the rendering order in React<p>I have a .tsx file that renders two component:</p> <pre><code>export default observer(function MyModule(props: ...
73,019,684
SQL syntax error at or near "order" using Postgres<p>Here is my query.</p> <p>I'm trying to delete the last N rows.</p> <pre><code>DELETE from Employee order by EmployeeID desc limit 3; </code></pre> <blockquote> <p>ERROR: syntax error at or near &quot;order&quot;<BR> LINE 1: DELETE from Employee order by EmployeeID d...
<p>Try this:</p> <pre><code>DELETE from Employee -- target table where EmployeeID in (SELECT EmployeeID from Employee order by EmployeeID desc limit 3); -- subquery in condition </code></pre> <p>You should follow <a href="https://www.w3schools.com/sql/sql_d...
SQL syntax error at or near "order" using Postgres
sql|postgresql
0
55
2
73,019,774
73,019,774
1
true
2022-07-18T08:55:56.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL syntax error at or near "order" using Postgres<p>Here is my query.</p> <p>I'm trying to delete the last N rows.</p> <pre><code>DELETE from Employee order...
72,825,313
Can a JS object's properties be overwritten in a loop?<p>I have this piece of code that combines the output of two APIs keeping only the data I require. I am aware this may not be the most efficient way of doing this, the biggest factor to that is why do I not just use the odds API by itself, the answer being that the ...
<p>The problem is here:</p> <pre><code> bookmaker.markets[0].outcomes.forEach(outcome =&gt; { matchesAndOdds[i].odds[bookmaker.title] = {}; </code></pre> <p>This resets the <code>odds[bookmaker.title]</code> object in every iteration over <code>outcomes</code>. This will destroy the results from the previous i...
Can a JS object's properties be overwritten in a loop?
javascript
0
55
2
72,825,536
72,825,536
1
true
2022-07-01T06:45:33.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can a JS object's properties be overwritten in a loop?<p>I have this piece of code that combines the output of two APIs keeping only the data I require. I am...
72,852,832
Teacher(s) teaching the most students<p>I'm trying to write a query that shows which teacher(s) are teaching the most number of students but I can't seem to get past a syntax error.</p> <p>When I run the code in the CTE only it appears to work fine.</p> <p>Below is my test CASE and problem query. Can someone show me h...
<p>Please find the answer below</p> <pre><code> WITH teacher_student_rankings AS ( SELECT t.teacher_id , t.first_name , t.last_name , COUNT(DISTINCT sc.student_id) AS teacher_student_count , RANK() OVER (ORDER BY COUNT(DISTINCT sc.student_id) DESC) AS teacher_studen...
Teacher(s) teaching the most students
oracle|rank
0
55
1
72,860,034
72,860,034
1
true
2022-07-04T06:59:58.457Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Teacher(s) teaching the most students<p>I'm trying to write a query that shows which teacher(s) are teaching the most number of students but I can't seem to ...
72,933,000
Why og:image / og:url can not be followed?<p>Got this error in Facebook Graph API Explorer, for scrape:</p> <pre><code>{ &quot;error&quot;: { &quot;message&quot;: &quot;Invalid parameter&quot;, &quot;type&quot;: &quot;OAuthException&quot;, &quot;code&quot;: 100, &quot;error_subcode&quot;: 1611071, ...
<p>The tag with <code>og:url</code> is supposed to be readable and providing OG tags. Your gif is not readable, it's got a binary mime-type.</p> <p><a href="https://developers.facebook.com/docs/sharing/webmasters/getting-started/versioned-link/?locale=en_US" rel="nofollow noreferrer">https://developers.facebook.com/doc...
Why og:image / og:url can not be followed?
amazon-web-services|amazon-s3|facebook-opengraph|facebook-sharer
0
55
1
72,994,493
72,994,493
1
true
2022-07-11T01:41:20.303Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why og:image / og:url can not be followed?<p>Got this error in Facebook Graph API Explorer, for scrape:</p> <pre><code>{ &quot;error&quot;: { &quot;mes...
72,923,903
How to dynamically create a nested tree with depth 10 in JavaScript using a loop<p>I have a general tree class with: myTree = new Tree(string), appendChildNode(node), createChildNode(string), myTree.print() functions and myTree.name, myTree.children, etc attributes.</p> <p>I know, I can create a tree depth (10) by hand...
<p>Just loop, adding child to a node, and updating node to be the child and so on. Tested :-)</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>var myTree = new Tree('Diagrams') ...
How to dynamically create a nested tree with depth 10 in JavaScript using a loop
javascript|loops|tree|nested
0
55
3
72,923,931
72,923,931
1
true
2022-07-09T18:55:35.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to dynamically create a nested tree with depth 10 in JavaScript using a loop<p>I have a general tree class with: myTree = new Tree(string), appendChildNo...
72,830,667
Regular Expression to Search Quantity in Human Written Descriptions<p>Hello and thank you in advance,</p> <p>I buy items that have a variety of human written listings on auction sites and forums. Often times, the quantity is clear to a person, but extracting it has been a real challenge. I'm using google sheets and REG...
<p>You can use</p> <pre><code>=IFNA(INT(REGEXEXTRACT(REGEXREPLACE(LOWER(A27), &quot;\d{2,}|(x\d)|(\dx)|[^\W\d]+\d\w*|\d+[^\W\d]\w*&quot;, &quot;$1$2&quot;), &quot;(\d)&quot;)), 1) </code></pre> <p>Here,</p> <ul> <li><code>REGEXREPLACE(LOWER(A27), &quot;\d{2,}|(x\d)|(\dx)|[^\W\d]+\d\w*|\d+[^\W\d]\w*&quot;, &quot;$1$2&qu...
Regular Expression to Search Quantity in Human Written Descriptions
regex|google-sheets|google-sheets-formula
0
55
1
72,831,283
72,831,283
1
true
2022-07-01T14:20:15.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regular Expression to Search Quantity in Human Written Descriptions<p>Hello and thank you in advance,</p> <p>I buy items that have a variety of human written...
72,956,644
How to return a value in NodeJS inside of an Async function?<p>I have the following code:</p> <pre><code>async function myPromiseFunction() { return &quot;test&quot;; }; function processComment(params) { (async () =&gt; { console.log(await myPromiseFunction()); })(); } exports.main = processCommen...
<p>I think updating your <code>processComment()</code> method like this would do the trick. Please let me know if that doesn't work so I can update this answer :D</p> <pre class="lang-js prettyprint-override"><code>function processComment(params) { return (async () =&gt; { var data = await myPromiseFuncti...
How to return a value in NodeJS inside of an Async function?
javascript|node.js
0
55
1
72,956,892
72,956,892
1
true
2022-07-12T18:05:26.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to return a value in NodeJS inside of an Async function?<p>I have the following code:</p> <pre><code>async function myPromiseFunction() { return &quot;...