question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
71,304,746 | Data in Oracle apex<p>If I want to take data for today from 00:00 until currently hour how can I do it ???
I have this table</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>datetime</th>
<th>hourly</th>
<th>clientchannel</th>
<th>servicename</th>
<th>service_count</th>
</tr>
</thead>
<tbody... | <p>Presuming that <code>datetime</code> column's datatype is <code>DATE</code> (should be), then</p>
<pre><code>select *
from your_table
where datetime between trunc(sysdate) and trunc(sysdate, 'hh24')
</code></pre>
<p>because</p>
<pre><code>SQL> alter session set nls_date_format = 'dd.mm.yyyy hh24:mi:ss';
Session ... | Data in Oracle apex | sql|oracle|date|oracle-apex | 0 | 35 | 1 | 71,304,799 | 71,304,799 | 1 | true | 2022-03-01T06:55:32.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Data in Oracle apex<p>If I want to take data for today from 00:00 until currently hour how can I do it ???
I have this table</p>
<div class="s-table-containe... |
71,305,505 | Trying to change text color when hovering over container<p>I am trying to style read more buttons in a Divi blog here:</p>
<p><a href="https://ourspirit.tempurl.host/whats-happening-across-b-c/" rel="nofollow noreferrer">https://ourspirit.tempurl.host/whats-happening-across-b-c/</a></p>
<p>The client wants the buttons ... | <p>Select parent to parent class for overwrite the 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-code-css lang-css prettyprint-override"><code>body div.post-content .blog-button-background:hover .blog-button-text ... | Trying to change text color when hovering over container | jquery|css|wordpress|divi | 0 | 34 | 1 | 71,305,915 | 71,305,915 | 1 | true | 2022-03-01T08:17:56.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to change text color when hovering over container<p>I am trying to style read more buttons in a Divi blog here:</p>
<p><a href="https://ourspirit.temp... |
71,306,464 | Get mean and reduce channels of feature maps<p>I have a feature map of size 1 x 5 x 5 x 32 and I would like reduce the feature maps channels from 1 x 5 x 5 x 32 to 1 x 5 x 5 x 1 ( from 32 channels reduce to 1 channel ). The only channel is the mean value of the original 32 channels, how can I do that?</p>
<p>Below is m... | <p>Try:</p>
<pre><code>import tensorflow as tf
x = tf.random.normal((1, 5, 5, 32))
x = tf.reduce_mean(x, axis=-1, keepdims=True)
print(x.shape)
# (1, 5, 5, 1)
</code></pre> | Get mean and reduce channels of feature maps | python|tensorflow|deep-learning | 0 | 35 | 1 | 71,306,526 | 71,306,526 | 1 | true | 2022-03-01T09:43:19.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get mean and reduce channels of feature maps<p>I have a feature map of size 1 x 5 x 5 x 32 and I would like reduce the feature maps channels from 1 x 5 x 5 x... |
71,307,180 | How to remove a substring from a string according to data inside<p>I have this string:</p>
<pre><code> row = <line><a>111</a><b>222</b><c>333</c></line><line><a>444</a><b></b><c>555</c></line>
</code></pre>
<p>If <code><... | <p>Using <code>re.sub</code> we can try:</p>
<pre class="lang-py prettyprint-override"><code>row = '<line><a>111</a><b>222</b><c>333</c></line><line><a>444</a><b></b><c>555</c></line>'
output = re.sub(r'<line>(?:(?!<... | How to remove a substring from a string according to data inside | python|string | 0 | 27 | 1 | 71,307,304 | 71,307,304 | 1 | true | 2022-03-01T10:40:08.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove a substring from a string according to data inside<p>I have this string:</p>
<pre><code> row = <line><a>111</a><b>222... |
71,307,175 | Rotation of view goes backwards with drag gesture<p>I have a view that I want to be able to drag around - kind of like a non-free spinning wheel of fortune. The dragging works fine on the y axis and at the bottom of the wheel, but with the x - the view rotates in the wrong direction when dragging the top of the wheel.<... | <p>Something I wrote for UIKit that may be adapted to SwiftUI :</p>
<pre><code>// rotation from point lPrevPoint to lTouchPoint
let lDeltaDirectionX = Double((lTouchPoint.x - lPrevPoint.x) / 2.0)
let lDeltaDirectionY = Double((lTouchPoint.y - lPrevPoint.y) / 2.0)
// only do 1 direction at a time ( the o... | Rotation of view goes backwards with drag gesture | swiftui|view|rotation|draggesture | 0 | 45 | 1 | 71,307,442 | 71,307,442 | 1 | true | 2022-03-01T10:39:50.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rotation of view goes backwards with drag gesture<p>I have a view that I want to be able to drag around - kind of like a non-free spinning wheel of fortune. ... |
71,291,705 | Groovy create 2 dim array [][] from string<pre><code>string = """
name:bla1-service,
version:Sprint-91.0.0
name:bla2-service,
version:Sprint-93.0.0
name:cbla3-service,
version:Sprint-93.0.0
name:bla4-service,
version:Sprint-93.0.0
"""
</code></pre>
<p>end result s... | <p>Something straight-forward with regex:</p>
<pre><code>String string = """
name:bla1-service,
version:Sprint-91.0.0
name:bla2-service,
version:Sprint-93.0.0
name:cbla3-service,
version:Sprint-93.0.0
name:bla4-service,
version:Sprint-93.0.0
"""
def res = []
stri... | Groovy create 2 dim array [][] from string | arrays|string|groovy | 0 | 23 | 1 | 71,307,711 | 71,307,711 | 1 | true | 2022-02-28T07:22:30.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Groovy create 2 dim array [][] from string<pre><code>string = """
name:bla1-service,
version:Sprint-91.0.0
name:bla2-service,
version... |
71,310,218 | CircularFifoBuffer .avg() calculation fails<p>I have the following dummy code which saves a list of doubles in a hasmap to a specific key, I want to be able to use this buffer to calculate average values over each key.</p>
<pre><code> final int bufferSize = 5;
HashMap<Integer, List<Double>> testmap ... | <p><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-3.2.2/org/apache/commons/collections/buffer/CircularFifoBuffer.html" rel="nofollow noreferrer">CircularFifoBuffer</a> is not generic, it use the fixed <code>Object</code> type:</p>
<pre><code>public boolean add(Object element)
</code></pre>
... | CircularFifoBuffer .avg() calculation fails | java|hashmap|fifo|circular-buffer | 0 | 27 | 1 | 71,310,418 | 71,310,418 | 1 | true | 2022-03-01T14:41:52.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CircularFifoBuffer .avg() calculation fails<p>I have the following dummy code which saves a list of doubles in a hasmap to a specific key, I want to be able ... |
71,309,247 | conditional execution path on static class trait<p>I have problems finding an adequate solution in the attempt to implement an new API alternative to an existing API, which I still want to support for backwards-compatibility;</p>
<p>let this be my old API:</p>
<pre><code>typedef int[3] Node;
template <class T>
... | <p>I don't know a way to solve this problem with a single type-traits that receive the name of the method (decode or decode_new_api) as argument.</p>
<p>But, if you accept different tests for different methods, a possible solution is a couple of declared (no need to define) functions to test "declare"</p>
<pr... | conditional execution path on static class trait | c++|class|sfinae|typetraits | 0 | 36 | 1 | 71,310,482 | 71,310,482 | 1 | true | 2022-03-01T13:30:51.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
conditional execution path on static class trait<p>I have problems finding an adequate solution in the attempt to implement an new API alternative to an exis... |
71,305,130 | Attempting to set a custom key and value in a Realtime Database<p>I'm attempting to do the following in Firebase Real Time Database.
Set a key and value:</p>
<pre><code>/authUsers/
{uidSetByMe: 'Custom value"}
</code></pre>
<p>The code I'm attempting it with is:</p>
<pre><code>var admin = require("firebase-ad... | <p>You can pass the value you want to a <code>child</code> call:</p>
<pre><code>admin.database().ref('authUsers').child(userRecord.uid).set(userData.uid);
</code></pre> | Attempting to set a custom key and value in a Realtime Database | javascript|firebase|firebase-realtime-database | 0 | 36 | 1 | 71,310,668 | 71,310,668 | 1 | true | 2022-03-01T07:39:02.703Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Attempting to set a custom key and value in a Realtime Database<p>I'm attempting to do the following in Firebase Real Time Database.
Set a key and value:</p>... |
71,284,375 | Is it possible to to create an auto complete feature using JS using the yfinance liberary?<p>I am creating a Flask web application for fun and learning, and I would like to see if I can create a search.html that on input of string will auto complete the ticker symbol and show it as a dropdown list.</p>
<p>I think that ... | <p>It is not possible to extract all the symbols from a stock exchange using yfinance. There are some threads about it, and a few libraries, check this link:</p>
<p><a href="https://quant.stackexchange.com/questions/26162/where-can-i-get-a-list-of-all-yahoo-finance-stocks-symbols?newreg=4f53f54f75aa4816ac33b78a3be02f7b... | Is it possible to to create an auto complete feature using JS using the yfinance liberary? | yfinance | 0 | 38 | 1 | 71,310,802 | 71,310,802 | 1 | true | 2022-02-27T11:28:28.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to to create an auto complete feature using JS using the yfinance liberary?<p>I am creating a Flask web application for fun and learning, and ... |
71,310,708 | Factorial of a number in pl/sql (Not showing the correct output)<p>I have written down a code in pl/sql but output is not showing
having trouble with this code.</p>
<pre><code>declare
num number(20):= 0;
val number(10):= 5;
temp number(10):= 0;
function factorial (n1 in number)
return number
is
fact number(10):= 1;
... | <p>The line:</p>
<pre><code>if fact <=0 then
</code></pre>
<p>should be:</p>
<pre><code>if temp <=0 then
</code></pre>
<p>You don't really need the 'else' part, because the 'if' exits the loop anyway; so you could do:</p>
<pre><code>loop
if temp <=0 then
exit;
end if;
fact := fact *temp;
temp:=tem... | Factorial of a number in pl/sql (Not showing the correct output) | plsql|oracle10g | 0 | 34 | 2 | 71,310,815 | 71,310,815 | 1 | true | 2022-03-01T15:17:59.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Factorial of a number in pl/sql (Not showing the correct output)<p>I have written down a code in pl/sql but output is not showing
having trouble with this co... |
71,310,880 | Cannot read property of null when extracting data from state<p>I'm trying to display a navigation item when a flag is true, but the problem is, when I try to get the following data from it, it returned me undefined, I created the following for that:</p>
<pre><code>let navigate = useNavigate();
const userSignin = use... | <p>Firstly you are passing checkAdmin in useEffect inside an array, but it is a function. According to my knowledge you can only pass state or props to refresh the component or re-render.</p>
<p>I am not sure what exactly the ask was but, according to me.</p>
<pre><code>
let navigate = useNavigate();
const userSignin ... | Cannot read property of null when extracting data from state | javascript|reactjs|react-hooks | 0 | 44 | 1 | 71,311,074 | 71,311,074 | 1 | true | 2022-03-01T15:29:24.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot read property of null when extracting data from state<p>I'm trying to display a navigation item when a flag is true, but the problem is, when I try to... |
71,308,430 | Jump into `SignalHandler` right after a call instruction<p>I'm doing a debug on a program which report:</p>
<pre><code>Thread 1 "test.out" received signal SIGSEGV, Segmentation fault.
</code></pre>
<p>I then gdbed the program and found out that the program jump into a <code>SignalHandler</code> function right... | <blockquote>
<p>I then gdbed the program and found out that the program jump into a SignalHandler function right after a call instruction call 0x401950.</p>
</blockquote>
<p>You didn't say which processor and OS you are using. Guessing Linux and <code>x86_64</code>, you have a stack overflow.</p>
<p>The <code>CALL</cod... | Jump into `SignalHandler` right after a call instruction | debugging|segmentation-fault|gdb|signals | 0 | 23 | 1 | 71,311,553 | 71,311,553 | 1 | true | 2022-03-01T12:21:45.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Jump into `SignalHandler` right after a call instruction<p>I'm doing a debug on a program which report:</p>
<pre><code>Thread 1 "test.out" received... |
71,311,629 | Frequency plot for different categories<p>I have this input:</p>
<pre><code>structure(list(Topic = structure(c(1L, 2L, 3L, 1L, 2L, 3L), .Label = c("1",
"2", "3"), class = "factor"), Sex = structure(c(1L, 1L, 1L, 2L,
2L, 2L), .Label = c("Female", "Male"), cla... | <p>What about this?</p>
<pre class="lang-r prettyprint-override"><code>dat %>%
ggplot(aes(Topic, Count)) +
geom_bar(aes(fill = Sex), stat = "identity", position = "dodge")
</code></pre>
<p><a href="https://i.stack.imgur.com/QxZ8Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgu... | Frequency plot for different categories | r|ggplot2 | 0 | 33 | 1 | 71,311,712 | 71,311,712 | 1 | true | 2022-03-01T16:25:52.670Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Frequency plot for different categories<p>I have this input:</p>
<pre><code>structure(list(Topic = structure(c(1L, 2L, 3L, 1L, 2L, 3L), .Label = c("1&qu... |
71,302,397 | How can I remove the redundant nested array in my generated Avro message?<p>I have an Avro schema, part of which looks like this:</p>
<pre><code>{
"name": "products",
"type": [
"null",
{
"type": "array",
... | <blockquote>
<p>change my schema so that I can get rid of the intermediate array key</p>
</blockquote>
<p>Don't make it a union type / nullable.</p>
<pre><code>{
"name": "products",
"type": {
"type": "array",
...
</code></pre>
<p>You can use an empty... | How can I remove the redundant nested array in my generated Avro message? | avro | 0 | 44 | 1 | 71,311,798 | 71,311,798 | 1 | true | 2022-03-01T00:07:02.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I remove the redundant nested array in my generated Avro message?<p>I have an Avro schema, part of which looks like this:</p>
<pre><code>{
&q... |
71,311,874 | Firestore security rules: get() returns different result than the expected one<p>I have a firestore collection of <code>usernames</code> where each individual username acts as a document id. Each individual document has two fields only - <code>uid</code> (the uid of the owner) and <code>createdAt</code>. Thats all. I w... | <p>You don't have to use <code>get()</code> when trying to read data from the document being accessed/updated. Try using <a href="https://firebase.google.com/docs/firestore/security/rules-conditions#data_validation" rel="nofollow noreferrer"><code>resource.data</code></a> instead:</p>
<pre><code>match /usernames/{usern... | Firestore security rules: get() returns different result than the expected one | google-cloud-firestore|firebase-security | 0 | 34 | 1 | 71,311,957 | 71,311,957 | 1 | true | 2022-03-01T16:44:02.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Firestore security rules: get() returns different result than the expected one<p>I have a firestore collection of <code>usernames</code> where each individua... |
71,311,824 | Error bars for barplot only in one direction, but for the last one in the opposite direction<p>This very useful <a href="https://stackoverflow.com/questions/27585776/error-bars-for-barplot-only-in-one-direction">post</a> shows how to display error bars in one direction only with <code>ggplot</code>. To do this, the <co... | <p>The solution in the linked question will actually produce this result. You just need to make sure that the standard error is subtracted instead of added when the bar points down:</p>
<pre class="lang-r prettyprint-override"><code>limits <- aes(ymax = resp + se * sign(resp))
</code></pre>
<p>Now your plotting code... | Error bars for barplot only in one direction, but for the last one in the opposite direction | r|ggplot2|plot|data-visualization|bar-chart | 0 | 23 | 1 | 71,312,178 | 71,312,178 | 1 | true | 2022-03-01T16:40:26.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error bars for barplot only in one direction, but for the last one in the opposite direction<p>This very useful <a href="https://stackoverflow.com/questions/... |
71,300,453 | Capture which li a class is attached to<p>I am not sure if this is possible, but is there a way for sass to identify which li a particular class is attached to?</p>
<p>If I had:</p>
<pre><code> <ul>
<li></li>
<li></li>
<li class="Selected"></li>
<li><... | <p>This should be doable with <code>nth-of-type</code>. Something like this:</p>
<pre><code>@mixin bg-mixin($Names){
@each $bg-url in $Names{
$i: index($Names, $bg-url );
&:nth-of-type(#{$i}).Selected { background: url($bg-url); }
}
}
</code></pre>
<p>and used like this:</p>
<pre><code>ul li... | Capture which li a class is attached to | sass|mixins | 0 | 21 | 1 | 71,312,378 | 71,312,378 | 1 | true | 2022-02-28T19:57:20.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Capture which li a class is attached to<p>I am not sure if this is possible, but is there a way for sass to identify which li a particular class is attached ... |
71,311,417 | I get System.Windows.Style as text of the ToolTip of the header in a DataGrid<p>I want to define a style for the datagrid columns that get the text of the tooltip through an attached property. But I get the text <code>System.Windows.Style</code> instead of the text.</p>
<p>The code is this. XML resource file that defin... | <blockquote>
<p>I get the text System.Windows.Style instead of the text.</p>
</blockquote>
<p>This is expected, since you assigned a style to the <code>ToolTip</code> property instead of content. The <code>ToolTip</code> does not have any idea how to display a <code>Style</code>, so it calls <code>ToString()</code>.</p... | I get System.Windows.Style as text of the ToolTip of the header in a DataGrid | c#|wpf|xaml|data-binding|datagrid | 0 | 36 | 1 | 71,312,500 | 71,312,500 | 1 | true | 2022-03-01T16:10:02.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I get System.Windows.Style as text of the ToolTip of the header in a DataGrid<p>I want to define a style for the datagrid columns that get the text of the to... |
71,312,463 | Using the value from a property in a JS object as the value for form input<p>I am trying to input 18 scores for 18 different holes in a golf app, currently The input field name is dynamically updated and when you click the <code>next</code> or <code>prev</code> button the holeIndex is incremented by 1 or reduced by1.</... | <p>I believe you can access the prop <code>h1Score</code>, <code>h2Score</code>, <code>h3Score</code> dynamically using the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_accessors" rel="nofollow noreferrer">bracket notation</a>:</p>
<pre class="lang-js prettyprint-overrid... | Using the value from a property in a JS object as the value for form input | javascript|template-literals | 0 | 34 | 1 | 71,312,626 | 71,312,626 | 1 | true | 2022-03-01T17:33:07.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using the value from a property in a JS object as the value for form input<p>I am trying to input 18 scores for 18 different holes in a golf app, currently T... |
71,312,524 | Vue prop is sent from a component is undefined<p>I have a Kanban board inside my dashboard which displays issues of a project. I added a menu to allow the user to filter the kanban board by project such that only one project's issue are visible at once. The default view is the issues of all the projects.<br />
In my Da... | <p>Probably it's because in KanBanBoard.vue you defined your prop as project_id and in Dashboard.vue you're passing it like this:</p>
<pre><code><KanBanBoard :projectid="project_id"></KanBanBoard>
</code></pre>
<p>instead do:</p>
<pre><code><KanBanBoard :project_id="project_id"><... | Vue prop is sent from a component is undefined | javascript|vue.js|vuejs2|axios|vuex | 0 | 34 | 1 | 71,313,505 | 71,313,505 | 1 | true | 2022-03-01T17:38:00.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vue prop is sent from a component is undefined<p>I have a Kanban board inside my dashboard which displays issues of a project. I added a menu to allow the us... |
71,312,748 | Pass PL/SQL parameter as SCHEMA NAME<p>I'm trying to send variable schema name to cursor via procedure input
Here is my lame try, but you can see what I want to do:</p>
<pre><code>CREATE OR REPLACE PROCEDURE HOUSEKEEPING
(SCHEMANAME in varchar2)
IS
CURSOR data_instances IS select table_name
from SCHEMANAME.table_... | <p>There is a way; you'll need some kind of <em>dynamic</em> SQL because you can't use schema (or object) names like that. For example, you could use refcursor instead.</p>
<p>Sample table:</p>
<pre><code>SQL> create table table_name as
2 select 'EMP' table_name, 'PERMANENT' type from dual union all
3 select '... | Pass PL/SQL parameter as SCHEMA NAME | oracle|stored-procedures|plsql | 0 | 256 | 1 | 71,313,660 | 71,313,660 | 1 | true | 2022-03-01T17:59:02.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass PL/SQL parameter as SCHEMA NAME<p>I'm trying to send variable schema name to cursor via procedure input
Here is my lame try, but you can see what I want... |
71,313,822 | Oracle inserting with different position of attributes<p>Please let me know whether Oracle insert statement works if we place the attributes in a different sequence in terms of attribute positions. I am not able to test in dev environment so need expert opinion before I promote changes in PROD directly. Please help.</p... | <p>Both will work. It doesn't matter in which order you insert them, as long as you specify column names (in <code>insert into</code>) and match them in <code>select</code> that follows.</p>
<pre><code>SQL> create sequence my_seq;
Sequence created.
SQL> create table tablea (deptno number, job varchar2(10), seq ... | Oracle inserting with different position of attributes | oracle|select|insert|distinct|nextval | 0 | 30 | 1 | 71,313,911 | 71,313,911 | 1 | true | 2022-03-01T19:41:38.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Oracle inserting with different position of attributes<p>Please let me know whether Oracle insert statement works if we place the attributes in a different s... |
71,314,018 | XSLT - Refer HREF elements<p>I have a XML in the below format</p>
<pre><code><Envelope>
<Body>
<Ref id="ref1">
<user>Test1</user>
<company>Comp1</company>
<message href="#ref3" />
</Ref>
<Ref id="ref2">
<user>Test2</user&... | <p>I would create an <code>xsl:key</code> for the <code>Ref</code> elements, using the <code>@id</code> as the lookup key.</p>
<p>A template for the <code>message/@href</code> that uses it's value as the key to lookup a message, and another empty template for the <code>Ref</code> elements that only have messages to sup... | XSLT - Refer HREF elements | xml|xslt|xslt-grouping | 0 | 30 | 1 | 71,314,178 | 71,314,178 | 1 | true | 2022-03-01T19:59:56.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
XSLT - Refer HREF elements<p>I have a XML in the below format</p>
<pre><code><Envelope>
<Body>
<Ref id="ref1">
<user>Test1&... |
71,313,900 | Counting the number of overlapping periods for a given date_range<p>I have the following dataframe</p>
<pre><code>df = pd.DataFrame({'user':[0,1,2,3,4], 'start':['2021-01-01 09:52:37',
'2021-01-01 11:45:34','2021-01-01 12:04:50', '2021-01-01 12:07:19','2021-01-01 12:14:59'],
'end':['2021-01-01 10:52:37', '2021-01-01 12... | <p>IIUC, do you want?</p>
<pre><code>df = pd.DataFrame({'user':[0,1,2,3,4], 'start':['2021-01-01 09:52:37',
'2021-01-01 11:45:34','2021-01-01 12:04:50', '2021-01-01 12:07:19','2021-01-01 12:14:59'],
'end':['2021-01-01 10:52:37', '2021-01-01 12:47:34','2021-01-01 12:57:50',
'2021-01-01 13:40:19','2021-01-01 13:53:59']})... | Counting the number of overlapping periods for a given date_range | pandas|time-series | 0 | 34 | 1 | 71,314,593 | 71,314,593 | 1 | true | 2022-03-01T19:49:48.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Counting the number of overlapping periods for a given date_range<p>I have the following dataframe</p>
<pre><code>df = pd.DataFrame({'user':[0,1,2,3,4], 'sta... |
71,315,212 | Delete/Hide last X amount of characters in <p> tag<p>I'm using a WP plugin and had no luck exploring source code specific to the plugin (Blog Filter Premium). It is automatically adding an ellipsis to the end of my description in a <code><p></code> tag, however, I don't believe it is using any CSS to do this as t... | <p>I suppose you could split the string by the delimeter ('...'), remove the last item, then join it back together again.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let sr... | Delete/Hide last X amount of characters in <p> tag | javascript|css|css-selectors|hide|ellipsis | 0 | 42 | 1 | 71,315,490 | 71,315,490 | 1 | true | 2022-03-01T22:12:33.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Delete/Hide last X amount of characters in <p> tag<p>I'm using a WP plugin and had no luck exploring source code specific to the plugin (Blog Filter Premium)... |
71,315,584 | What would be the best way to purge/clean all null values in a Guava cache?<p>I'm currently working with a <a href="https://guava.dev/releases/18.0/api/docs/com/google/common/cache/Cache.html" rel="nofollow noreferrer">Guava cache</a> generated by <a href="https://guava.dev/releases/18.0/api/docs/com/google/common/cach... | <p>There is nothing much better than what you describe, but I challenge the assumption that it's necessarily expensive to iterate through all the keys, especially, as you describe, doing it in a background task.</p>
<p>You could, of course, have your cache's "values" store your current values and a time they ... | What would be the best way to purge/clean all null values in a Guava cache? | java|caching|guava | 0 | 38 | 1 | 71,315,661 | 71,315,661 | 1 | true | 2022-03-01T23:01:49.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What would be the best way to purge/clean all null values in a Guava cache?<p>I'm currently working with a <a href="https://guava.dev/releases/18.0/api/docs/... |
71,315,436 | Regex from stringified-array<p>How do you extract regex values from a stringified-array?</p>
<p>Sample data:</p>
<pre><code>with data as (select 1 as id, '["abc_def_123","uvw_xyz_456"]'::string as my_field)
select * from data
</code></pre>
<p><code>my_field</code> could have up to 4 items (if import... | <p>Try below:</p>
<pre><code>with data as (
select 1 as id, '["abc_def_123","uvw_xyz_456"]'::string as my_field
),
json_data as (
select id, parse_json(my_field) as json from data
),
flattened_data as (
SELECT id, split(f.value::string, '_') as splitted_c
FROM json_data,
lateral ... | Regex from stringified-array | snowflake-cloud-data-platform | 0 | 25 | 1 | 71,315,725 | 71,315,725 | 1 | true | 2022-03-01T22:42:12.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex from stringified-array<p>How do you extract regex values from a stringified-array?</p>
<p>Sample data:</p>
<pre><code>with data as (select 1 as id, '[&... |
71,315,876 | Grouping items and setting a flag<p>I have a table structured as follows:</p>
<pre><code>order_yr acct_id indv_id age
2019 323 01 38
2019 323 02 37
2019 323 03 16
2019 323 04 5
2019 325 01 38
2019 326 01 64
2019 32... | <p>You have some options here. One is using a subquery to find out if a row exists that belongs to a group and meets your condition:</p>
<pre><code>select *
, case
when exists (select *
from #data sub
where sub.order_yr = d.order_yr
... | Grouping items and setting a flag | sql-server|rank|row-number | 0 | 30 | 1 | 71,315,945 | 71,315,945 | 1 | true | 2022-03-01T23:45:24.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Grouping items and setting a flag<p>I have a table structured as follows:</p>
<pre><code>order_yr acct_id indv_id age
2019 323 01 38
2019 ... |
71,313,736 | How to log redis pub/sub time?<p>I try to use redis for pub/sub by two systems and one of them is now ours (other company maintain it). I would like to have time stamp when I publish something in redis channel. Can someone help with this idea?</p>
<ol>
<li><p>I already user redis log with <em>debug</em> level of inform... | <p>You cannot achieve the goal with pubsub.</p>
<p>You might want to try <a href="https://redis.io/topics/streams-intro" rel="nofollow noreferrer">Redis Streaming</a>. For each streaming message, the first part of the automatically generated ID is the Unix timestamp when the ID is generated, i.e. the message is receive... | How to log redis pub/sub time? | redis | 0 | 273 | 1 | 71,316,108 | 71,316,108 | 1 | true | 2022-03-01T19:33:47.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to log redis pub/sub time?<p>I try to use redis for pub/sub by two systems and one of them is now ours (other company maintain it). I would like to have ... |
71,310,633 | Python find and replace multiple comment lines in array with parsed single line comment<p>Let's say that we've read a python file with multiple lines of comments and then some code. This is stored in <code>data</code> as a <code>list</code> or <code>np.ndarray</code></p>
<pre class="lang-py prettyprint-override"><code>... | <p>You can assign to a list slice in Python, which can replace multiple elements with one:</p>
<pre class="lang-python prettyprint-override"><code> ...
# make a copy of the original list, so we can replace the comments
output_lines = filedata.copy()
# iterate backwards so the indices line up
for comm... | Python find and replace multiple comment lines in array with parsed single line comment | python|numpy | 0 | 43 | 1 | 71,316,155 | 71,316,155 | 1 | true | 2022-03-01T15:11:25.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python find and replace multiple comment lines in array with parsed single line comment<p>Let's say that we've read a python file with multiple lines of comm... |
71,316,449 | How to join the elements of an array such that the first letter is capital for all elements in JavaScript?<p>I want to join the elements of an array separated by commas and the first letter of each element to be capital, this should not affect the object values itself.</p>
<p>For example:</p>
<p>obj= ["apple"... | <p>Here is the code:</p>
<pre><code>let a = ['apple', 'orange', 'lemon'];
let res = a.map(fruit => fruit.charAt(0).toUpperCase() + fruit.slice(1));
console.log(res); // [ "Apple", "Orange", "Lemon" ]
</code></pre> | How to join the elements of an array such that the first letter is capital for all elements in JavaScript? | javascript|arrays | 0 | 30 | 2 | 71,316,547 | 71,316,547 | 1 | true | 2022-03-02T01:26:36.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to join the elements of an array such that the first letter is capital for all elements in JavaScript?<p>I want to join the elements of an array separate... |
71,316,457 | Removing x-goog headers from Google Cloud Storage responses<p>The response headers for an object stored in a Google Cloud Storage bucket include Google-specific headers like <code>x-guploader-uploadid</code>, <code>x-goog-generation</code>, and <code>x-goog-storage-class</code>. The GCP console doesn't appear to have a... | <p>There are two APIs: XML and JSON.</p>
<p>AFAIK only the XML API provides those extension headers. The JSON API does not. You cannot control which headers are returned in HTTP responses. Some of those headers can be used in request header match conditions.</p>
<p>The headers are documented here:</p>
<ul>
<li><a href=... | Removing x-goog headers from Google Cloud Storage responses | google-cloud-platform|google-cloud-storage | 0 | 260 | 1 | 71,316,806 | 71,316,806 | 1 | true | 2022-03-02T01:28:09.573Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Removing x-goog headers from Google Cloud Storage responses<p>The response headers for an object stored in a Google Cloud Storage bucket include Google-speci... |
71,317,478 | Rebalance tasks in postgresql<p>I have a moderation table that stores which post is assigned to which moderator. I want to periodically rebalance this table. Rebalancing means that all available moderators should have roughly equal number of unmoderated posts assigned to them. Moderation table has following format.</p>... | <p>If you want to make it in <code>Database level</code>, you can use <code>Postgresql Trigger</code>. There django implemented library - <a href="https://django-pgtrigger.readthedocs.io" rel="nofollow noreferrer">Django PgTrigger</a>.</p>
<blockquote>
<p>And there method for what you want. <a href="https://django-pgtr... | Rebalance tasks in postgresql | python|postgresql|django-models | 0 | 39 | 1 | 71,317,836 | 71,317,836 | 1 | true | 2022-03-02T04:28:59.803Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rebalance tasks in postgresql<p>I have a moderation table that stores which post is assigned to which moderator. I want to periodically rebalance this table.... |
71,318,396 | How do I make the output of the collatz look like a list and labled?<pre class="lang-py prettyprint-override"><code>#I want this code to output....
def Collatz(n):
while n != 1:
print(n, end = ', ')
if n & 1:
n = 3 * n + 1
else:
n = n // 2
print... | <p>You can use an extra variable, here <code>i</code>, to print lables.</p>
<p>Also, I removed <code>end</code> parameter so that it print line by line. In addition, I used <code>f-string</code> for printing format. For more detail, please see <a href="https://realpython.com/python-f-strings/" rel="nofollow noreferrer"... | How do I make the output of the collatz look like a list and labled? | python|if-statement|while-loop | 0 | 28 | 1 | 71,318,457 | 71,318,457 | 1 | true | 2022-03-02T06:40:07.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I make the output of the collatz look like a list and labled?<pre class="lang-py prettyprint-override"><code>#I want this code to output....
def C... |
71,318,383 | New dates are not created when the project is running<p>When the project is running, data is uploaded from the database, which is then formed into excel files and recorded with dates at the time of uploading.
Locally the project works correctly. But on the server, dates are set only at the time of deployment. This shou... | <p>As a spring bean is a singleton <code>fileDate2</code> and <code>fileDate3</code> will be initialized with the bean, exactly one time. move it into your saveExcel.</p>
<pre><code>@Component
public class SaveProviders {
@Autowired
private ProviderService providerService;
private static final DateFormat ... | New dates are not created when the project is running | spring|spring-boot|docker | 0 | 19 | 1 | 71,318,462 | 71,318,462 | 1 | true | 2022-03-02T06:38:36.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
New dates are not created when the project is running<p>When the project is running, data is uploaded from the database, which is then formed into excel file... |
71,295,172 | XAML set an initial value for a textbox that can also be changed<p>I have a textbox in my XAML that shows the current working directory. The XAML code looks like this:</p>
<pre><code><StackPanel x:Name="StackCurrentPath" Orientation="Vertical" Margin="25,25,25,5">
<StackPanel ... | <p>change</p>
<pre><code>txtboxCurrentPath.Text = currentDir;
</code></pre>
<p>to</p>
<pre><code>txtboxCurrentPath.Text = string.IsNullOrEmpty(MyConfigurations.CurrentPath) ? currentDir : MyConfigurations.CurrentPath;
</code></pre>
<p>but I think your design is not correct</p> | XAML set an initial value for a textbox that can also be changed | c#|xaml | 0 | 31 | 1 | 71,318,920 | 71,318,920 | 1 | true | 2022-02-28T12:39:27.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
XAML set an initial value for a textbox that can also be changed<p>I have a textbox in my XAML that shows the current working directory. The XAML code looks ... |
71,319,146 | MongoDB - Iterate to Array of objects and update the field as array<p>I am new to MongoDB. I have a collection that has multiple documents in which a particular document has a nested array structure. I need to iterate through this nested array and change the data type of the value of the iterated field.</p>
<p>Nested A... | <p>A bit complex. Expect that you need to achieve it by <a href="https://docs.mongodb.com/manual/tutorial/update-documents-with-aggregation-pipeline/" rel="nofollow noreferrer">update with aggregation pipeline</a>.</p>
<p><strong>Concept:</strong></p>
<ol>
<li>Update whole <code>hasIdentifier</code> array by <em>1.1</e... | MongoDB - Iterate to Array of objects and update the field as array | arrays|json|mongodb|object|mongodb-query | 0 | 779 | 1 | 71,319,453 | 71,319,453 | 1 | true | 2022-03-02T07:53:09.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MongoDB - Iterate to Array of objects and update the field as array<p>I am new to MongoDB. I have a collection that has multiple documents in which a particu... |
71,319,791 | comparing two columns of a row in python dataframe<p>I know that one can compare a whole column of a dataframe and making a list out of all rows that contain a certain value with:</p>
<pre class="lang-py prettyprint-override"><code>values = parsedData[parsedData['column'] == valueToCompare]
</code></pre>
<p>But is ther... | <p>It is completely possible, but I have never tried using <code>and</code> in order to mask the dataframe, rather using <code>&</code> would be of interest in this case. Note that, if you want your code to be more clear, use <code>( )</code> in each statement:</p>
<pre class="lang-py prettyprint-override"><code>va... | comparing two columns of a row in python dataframe | python|dataframe | 0 | 30 | 1 | 71,319,826 | 71,319,826 | 1 | true | 2022-03-02T08:48:50.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
comparing two columns of a row in python dataframe<p>I know that one can compare a whole column of a dataframe and making a list out of all rows that contain... |
71,319,690 | How can I get public variable value inside @input decorator of type function?<p>I have a dropdown component which has <code>@Input</code> decoration having function with arguments and it returns boolean value</p>
<p><strong>dropdown-abstract.component.ts</strong></p>
<pre class="lang-js prettyprint-override"><code> ... | <p>That is happening in your case because the <code>itemDisabled</code> is being called from another context (and another <code>this</code>).</p>
<p>To resolve it you need to:</p>
<ul>
<li>Either change the function to an <code>arrow</code> function instead of a normal function:</li>
</ul>
<pre><code>public itemDisable... | How can I get public variable value inside @input decorator of type function? | angular|typescript|angular-decorator | 0 | 33 | 2 | 71,319,953 | 71,319,953 | 1 | true | 2022-03-02T08:40:21.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I get public variable value inside @input decorator of type function?<p>I have a dropdown component which has <code>@Input</code> decoration having f... |
71,320,054 | Hover menu in Sidebar<p>I'm struggling how can i adjust my hover in the right side.</p>
<p>I have successfully hover the content i like but cant adjust the content.</p>
<p>This is my CSS</p>
<pre><code>.dropdown .dropbtn {
text-decoration: none;
color: black;
}
.dropdown-content {
display: none;
min-width: 160px;
... | <pre><code>.dropdown{
position:relative;
}
.dropdown-content{
position:absolute;
top:0;
right:10px;
}
</code></pre>
<p>Add these two in your css file . There might be small fixes still left , you just have to change top and right values in dropdown-content , that's all .</p> | Hover menu in Sidebar | css|bootstrap-4 | 0 | 267 | 1 | 71,320,124 | 71,320,124 | 1 | true | 2022-03-02T09:09:31.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Hover menu in Sidebar<p>I'm struggling how can i adjust my hover in the right side.</p>
<p>I have successfully hover the content i like but cant adjust the c... |
71,318,605 | how to display date from and date to according to the selected<p><a href="https://i.stack.imgur.com/QCDlF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QCDlF.png" alt="view" /></a></p>
<p>my view</p>
<pre><code><tr>
<th colspan="4" class="text-center"> {{Carbon\... | <p>You can use <a href="https://carbon.nesbot.com/docs/#api-period" rel="nofollow noreferrer">CarbonPeriod</a> to get the range from two dates. Here, I am providing you with an example, so you can get the idea.</p>
<pre><code> $requestFromDate = '02/25/2022';
$requestToDate = '03/03/2022';
$fromDate = \Carb... | how to display date from and date to according to the selected | php|laravel | 0 | 33 | 1 | 71,321,184 | 71,321,184 | 1 | true | 2022-03-02T07:02:53.310Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to display date from and date to according to the selected<p><a href="https://i.stack.imgur.com/QCDlF.png" rel="nofollow noreferrer"><img src="https://i.... |
71,317,127 | Customize No Record template in ejs-grid with angular 13<p>Using <code>ejs-grid</code> with angular and trying to customize the <code>No Records data</code> template couldn't do it</p>
<pre><code><ejs-grid #assetGrid id="asset_grid" class="scrollable-body-grid"
(dataBoun... | <p>Currently the Syncfusion EJ2 Grid does not have support for empty record template. However, we have already logged feature task for this requirement as <strong>“Need to provide support for empty record template”</strong> and added it to our feature request database. At the planning stage for every release cycle, we ... | Customize No Record template in ejs-grid with angular 13 | javascript|angular|syncfusion|ej2-syncfusion | 0 | 774 | 1 | 71,321,442 | 71,321,442 | 1 | true | 2022-03-02T03:28:31.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Customize No Record template in ejs-grid with angular 13<p>Using <code>ejs-grid</code> with angular and trying to customize the <code>No Records data</code> ... |
71,321,168 | clear messages from rabbitMQ queue in mule 3<p>My requirement is to clear all the messages from queue before processing the flow or publishing anything in the queue.
We are using rabbitMQ and due to some reason messages are stucked in the queue and because of that we are facing some issue when we are counting the queue... | <p>Mule 3 has a generic AMQP connector. It does not support administrative commands from a specific implementation like RabbitMQ, so you can't use the connector.</p>
<p>You could use RabbitMQ REST API and call it using the HTTP Request connector. See this previous answer to see how to delete queues with Curl, then impl... | clear messages from rabbitMQ queue in mule 3 | rabbitmq|mule|mule-studio|mulesoft|mule-component | 0 | 45 | 1 | 71,322,071 | 71,322,071 | 1 | true | 2022-03-02T10:32:42.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
clear messages from rabbitMQ queue in mule 3<p>My requirement is to clear all the messages from queue before processing the flow or publishing anything in th... |
71,321,961 | jQuery if there is just one item fades it out, which is wrong<p>I have this code:</p>
<pre><code>function fadeLi(elem) {
elem
.delay()
.fadeIn()
.delay(5000)
.fadeOut(1000, function () {
if (elem.next().length > 0) {
fadeLi(elem.next());
} else {
fadeLi(elem.siblings(&qu... | <p>You can do it like this:</p>
<pre><code>if (elem.siblings().length == 0) {
elem.show()
} else {...
</code></pre>
<p>This will show the element if it does not have any siblings.</p>
<p><strong>Demo</strong></p>
<p><div class="snippet" data-lang="js" data-hide="true" data-console="true" data-babel="false">
<div clas... | jQuery if there is just one item fades it out, which is wrong | jquery | 0 | 22 | 1 | 71,322,236 | 71,322,236 | 1 | true | 2022-03-02T11:32:02.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
jQuery if there is just one item fades it out, which is wrong<p>I have this code:</p>
<pre><code>function fadeLi(elem) {
elem
.delay()
.fadeIn()
... |
71,321,751 | How to make a worker to setvalue in Firebase Database when app is closed and internet recovered?<p>Now in my app, if I have persistence disk enabled... if I setvalue while offline and close app, the value sets only when I reopen it. But I want to set it when internet connection recovers. Any solution?
I use firebase fo... | <p>You cannot keep your app always in sync with the Firebase servers, while the app is in the background because the Android OS will eventually close it in favor of other apps.</p>
<p>When you enable offline persistence, it means your app writes the data locally to the device so you can continue to work with it <strong... | How to make a worker to setvalue in Firebase Database when app is closed and internet recovered? | java|android|firebase|firebase-realtime-database | 0 | 41 | 1 | 71,322,313 | 71,322,313 | 1 | true | 2022-03-02T11:17:08.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make a worker to setvalue in Firebase Database when app is closed and internet recovered?<p>Now in my app, if I have persistence disk enabled... if I ... |
71,322,423 | How do i fix the result without reloading the site?<p>Whenever I am writing <code>apple</code> or <code>samsung</code>, It is showing results, but if I don't refresh the page for the second time, it gives me error. However, If I reload the website, then it is showing me the results of <code>samsung</code> or <code>oppo... | <p>It is because of this line, you don't really clear the search field :</p>
<pre class="lang-js prettyprint-override"><code>// clear search field
searchBox.value = ' ';
</code></pre>
<p>You should either assign the empty string value <code>''</code> or call the method <a href="https://developer.mozilla.org/fr/docs/We... | How do i fix the result without reloading the site? | javascript | 0 | 43 | 1 | 71,322,825 | 71,322,825 | 1 | true | 2022-03-02T12:07:06.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do i fix the result without reloading the site?<p>Whenever I am writing <code>apple</code> or <code>samsung</code>, It is showing results, but if I don't... |
71,322,949 | How to solve the problem of button flickering caused by css transition?<p>I have seen some solutions but they actually affect the design intended.
Is there any way to stop this flicker without altering the design?
I understand that the problem is that While hovering over a moving (or animated) element, it may just un-h... | <p>I would add an ::after pseudo element on your .button:hover, that will be slightly bigger than your actual button's area. As a result while you're hovering, the pseudo element will 'jump' under the cursor, that will prevent flickering - <code>.button</code> will not escape from your mouse :)</p>
<p>The below additio... | How to solve the problem of button flickering caused by css transition? | html|css | 0 | 279 | 2 | 71,323,278 | 71,323,278 | 1 | true | 2022-03-02T12:46:34.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to solve the problem of button flickering caused by css transition?<p>I have seen some solutions but they actually affect the design intended.
Is there a... |
71,323,058 | Refresh Token with JWT - JWTUtils Cannot set user authentication because "this.jwtUtils" is null<p>I have a problem about fix the error in my Refresh Token with JWT in Spring Boot Application.</p>
<p>My issue is related with validating JWT Token.</p>
<p>Even if I defined @Component annotation in JWTUtil class, the issu... | <p>The problem is with this</p>
<pre><code>@Bean
public AuthTokenFilter authenticationJwtTokenFilter() {
return new AuthTokenFilter();
}
</code></pre>
<p>You are using the wrong constructor to create a bean, and expecting that the dependency injection will do its magic afterwards - it's not how it works.</p>
<p>Bas... | Refresh Token with JWT - JWTUtils Cannot set user authentication because "this.jwtUtils" is null | java|spring-boot|jwt|refresh-token | 0 | 530 | 1 | 71,323,673 | 71,323,673 | 1 | true | 2022-03-02T12:55:16.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Refresh Token with JWT - JWTUtils Cannot set user authentication because "this.jwtUtils" is null<p>I have a problem about fix the error in my Refresh Token w... |
71,322,110 | Need to remove underline on hover and on focus MUI TimePicker<p>Cannot find a way to remove underline when using material-ui TimePicker and overriding styles.</p>
<p>Here is how i am overriding styles:</p>
<pre><code>const muiTimePickerStyle = createTheme({
overrides: {
MuiTextField: {
root: {
... | <p>Here's what you are looking for. I've added the after effect too if you wanted to remove the blue line when active.</p>
<pre><code> underline: {
'&:hover:not(.Mui-disabled):before': {
borderBottom: 'none'
},
'&:after': {
borde... | Need to remove underline on hover and on focus MUI TimePicker | reactjs|material-ui | 0 | 265 | 1 | 71,324,110 | 71,324,110 | 1 | true | 2022-03-02T11:42:53.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need to remove underline on hover and on focus MUI TimePicker<p>Cannot find a way to remove underline when using material-ui TimePicker and overriding styles... |
71,323,994 | Best way to find the angle between two nodes in an lattice graph?<p>If I have a lattice graph which looks like this:</p>
<pre><code>0:0 0:1 0:2 0:3
1:0 1:1 1:2 1:3
2:0 2:1 2:2 2:3
3:0 3:1 3:2 3:3
</code></pre>
<p>, what is the best way to find an angle between two nodes?<br />
Example:</p>
<pre><code>angle(0:0, 0:1) = ... | <p>Assuming x:y format, and an angle measured clockwise from the horizontal:</p>
<pre><code>angle(x1:y1, x2:y2) = arctan((x2-x1)/(y2-y1))
</code></pre> | Best way to find the angle between two nodes in an lattice graph? | c++|math|graph | 0 | 43 | 1 | 71,324,120 | 71,324,120 | 1 | true | 2022-03-02T14:00:32.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best way to find the angle between two nodes in an lattice graph?<p>If I have a lattice graph which looks like this:</p>
<pre><code>0:0 0:1 0:2 0:3
1:0 1:1 1... |
71,324,645 | Capture Storyboard Segue from application menu<p>Is there a way to capture a segue generated from the menu in Application Scene? My searches have not been forthcoming.</p>
<p>I have a Preferences menu item that is under the App name like most other Apple macOS applications, but unlike other segues, that segue is not f... | <p>A reliable way is:</p>
<ol>
<li>Connect the segue from the main view controller to the Preferences controller.</li>
<li>In the main view controller create an <code>IBAction</code>. In the action call <code>performSegue</code></li>
<li>Connect the menu item to the First Responder of the application scene (red cube). ... | Capture Storyboard Segue from application menu | swift|macos|storyboard|appkit | 0 | 33 | 1 | 71,324,866 | 71,324,866 | 1 | true | 2022-03-02T14:47:44.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Capture Storyboard Segue from application menu<p>Is there a way to capture a segue generated from the menu in Application Scene? My searches have not been f... |
71,324,886 | Binding a WPF ComboBox to a List in new Window<p>I am new to WPF...</p>
<p>I am trying to bind a List to a combobox in a new Window.</p>
<p>The List is in the following class:</p>
<pre><code>public class TestClass
{
public List<string> ComboBoxItems = new List<string>
{
"Item 1", &... | <p><code>ComboBoxItems</code> needs to be a property rather than a field to be the source of DataBinding</p>
<pre><code>public List<string> ComboBoxItems { get; } = new List<string>
{
"Item 1", "Item2"
};
</code></pre> | Binding a WPF ComboBox to a List in new Window | c#|wpf | 0 | 26 | 1 | 71,324,975 | 71,324,975 | 1 | true | 2022-03-02T15:03:26.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Binding a WPF ComboBox to a List in new Window<p>I am new to WPF...</p>
<p>I am trying to bind a List to a combobox in a new Window.</p>
<p>The List is in th... |
71,317,552 | Dataframe merging with src and dst keys<p>I have three dataframes</p>
<pre><code>df1 = pd.DataFrame({'src': ['src1', 'src2', 'src3'],
'dst': ['dst1', 'dst2', 'dst3']})
df2 = pd.DataFrame({'src': ['dst1', 'dst1', 'dst3'],
'dst': ['dstDst1', 'dstDst2', 'dstDst3']})
df3 = pd.DataFrame({... | <p>You can avoid the nested for loops by the following code.</p>
<h2>Code:</h2>
<pre class="lang-py prettyprint-override"><code>import pandas as pd
# Create the sample dataframes
df1 = pd.DataFrame({'src': ['src1', 'src2', 'src3'], 'dst': ['dst1', 'dst2', 'dst3']})
df2 = pd.DataFrame({'src': ['dst1', 'dst1', 'dst3'], ... | Dataframe merging with src and dst keys | python|pandas|dataframe | 0 | 40 | 1 | 71,326,273 | 71,326,273 | 1 | true | 2022-03-02T04:42:25.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dataframe merging with src and dst keys<p>I have three dataframes</p>
<pre><code>df1 = pd.DataFrame({'src': ['src1', 'src2', 'src3'],
'dst': [... |
71,326,482 | how can I convert a json object and pass to a pandas dataframe?<p>I am using the Kucoin api to get all the tickers that they currently offer. I then want to pass parts of the JSON object to a pandas dataframe. One ticker JSON object (of hundreds) looks like this:</p>
<pre><code>data = {
"time":16028320920... | <p>Use <code>json_normalize</code> with <code>record_path</code> and <code>meta</code> parameters:</p>
<pre><code>out = pd.json_normalize(data, record_path='ticker', meta='time')[['time', 'symbol', 'buy', 'sell', 'high', 'low', 'averagePrice']]
</code></pre>
<p>Output:</p>
<pre><code> time symbol buy... | how can I convert a json object and pass to a pandas dataframe? | python|json|pandas|dataframe | 0 | 31 | 1 | 71,326,509 | 71,326,509 | 1 | true | 2022-03-02T17:02:47.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how can I convert a json object and pass to a pandas dataframe?<p>I am using the Kucoin api to get all the tickers that they currently offer. I then want to ... |
71,326,586 | SQL outer join on two columns, returning null in one column if only the other matches<p>I couldn't find exactly what I'm looking for in another thread.</p>
<p>Let's say I have these two tables:</p>
<p>left:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>x</th>
<th>left_y</th>
</tr>
</thead... | <p>You can use <code>coalesce</code>:</p>
<pre><code>select coalesce(l.x, r.x) as x,
left_y,
right_y
from l full outer join r
on l.x = r.x
and l.left_y = r.right_y
</code></pre>
<p><a href="https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=686bbe7c1975f846205b27803d7ea70b" rel="nofollow noreferrer">Fiddle</a></p> | SQL outer join on two columns, returning null in one column if only the other matches | sql | 0 | 29 | 1 | 71,326,664 | 71,326,664 | 1 | true | 2022-03-02T17:11:12.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL outer join on two columns, returning null in one column if only the other matches<p>I couldn't find exactly what I'm looking for in another thread.</p>
<... |
71,314,027 | Closure Compiler: force 100% type coverage<p>When I run the closure compiler to type-check my code, it shows me the type coverage (but only when there's an error), e.g.:</p>
<pre><code>1 error(s), 0 warning(s), 90.8% typed
</code></pre>
<p>Is there a flag to enforce that all code be typed?</p>
<p>(Addendum: Is there a ... | <p>This doesn't appear to be well documented, but <code>reportUnknownTypes</code> is listed here:
<a href="https://github.com/google/closure-compiler/wiki/Flags-and-Options" rel="nofollow noreferrer">https://github.com/google/closure-compiler/wiki/Flags-and-Options</a></p>
<p>Enabling this diagnostic groups should repo... | Closure Compiler: force 100% type coverage | google-closure-compiler | 0 | 37 | 1 | 71,326,931 | 71,326,931 | 1 | true | 2022-03-01T20:00:31.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Closure Compiler: force 100% type coverage<p>When I run the closure compiler to type-check my code, it shows me the type coverage (but only when there's an e... |
71,325,557 | Ignite 'Streamer is closed with error, Invalid request op code: 8000' when using Data Streaming<p>I am trying out the Data Streaming feature of Ignite (see <a href="https://ignite.apache.org/docs/latest/data-streaming" rel="nofollow noreferrer">https://ignite.apache.org/docs/latest/data-streaming</a>) but even when I a... | <p>The error message indicates that the feature is not supported by the server node. Thin client data streamer is available since Ignite 2.11 - please make sure to use that or a later version.</p> | Ignite 'Streamer is closed with error, Invalid request op code: 8000' when using Data Streaming | ignite | 0 | 39 | 1 | 71,326,990 | 71,326,990 | 1 | true | 2022-03-02T15:52:55.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ignite 'Streamer is closed with error, Invalid request op code: 8000' when using Data Streaming<p>I am trying out the Data Streaming feature of Ignite (see <... |
71,320,100 | UWP TileControl with direction right to left<p>By default <a href="https://docs.microsoft.com/en-us/windows/communitytoolkit/controls/tilecontrol" rel="nofollow noreferrer">UWP TileControl</a> allows animate itself from left to right.</p>
<p>It is unclear how to get it working in the opposite direction from right to le... | <p>You specify a negative value for the AnimationStep Properties.</p>
<pre><code><controls:TileControl x:Name="Tile1" AnimationStepX="-1" AnimationStepY="-1" OffsetX="-10" OffsetY="10" IsAnimated="True"
ScrollViewerContainer="{x:Bind FlipView}"... | UWP TileControl with direction right to left | uwp|uwp-xaml | 0 | 34 | 1 | 71,327,660 | 71,327,660 | 1 | true | 2022-03-02T09:12:43.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
UWP TileControl with direction right to left<p>By default <a href="https://docs.microsoft.com/en-us/windows/communitytoolkit/controls/tilecontrol" rel="nofol... |
71,325,284 | How to pass parameters to dynamic screen in React Native?<p>Assume I have several screens as A,B,C,D.....
I am going to conditionally render these screens and need to pass some same params to all of them.
Can I pass a variable to them after deciding which one to render?
for now, I can do,</p>
<pre><code>let screen;
if(... | <p>You can use <code>React.createElement</code> to create the component from the dynamically-chosen view:</p>
<pre><code>if(condition1) screen = A;
if(condition2) screen = B;
if(condition3) screen = C;
const component = React.createElement(screen,params);
return component;
</code></pre> | How to pass parameters to dynamic screen in React Native? | reactjs|react-native | 0 | 43 | 1 | 71,327,808 | 71,327,808 | 1 | true | 2022-03-02T15:34:08.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass parameters to dynamic screen in React Native?<p>Assume I have several screens as A,B,C,D.....
I am going to conditionally render these screens an... |
71,327,585 | Changing a side by side bar graph with centre<p>How can i change this code so that the Continent labels appear in the centre with one variable to the left and one to the right. Can this be done in one or would 2 plots have to be combined?</p>
<pre><code>life_bar %>%
ggplot() +
geom_col(aes(Continent, mn), fill ... | <p>You can use this code:</p>
<pre><code>library(grid)
g.mid<-ggplot(life_bar,aes(x=1,y=Continent))+geom_text(aes(label=Continent))+
geom_segment(aes(x=0.94,xend=0.96,yend=Continent))+
geom_segment(aes(x=1.04,xend=1.065,yend=Continent))+
ggtitle("")+
ylab(NULL)+
scale_x_continuous(expand=c(0,0),l... | Changing a side by side bar graph with centre | r | 0 | 27 | 2 | 71,327,871 | 71,327,871 | 1 | true | 2022-03-02T18:34:23.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing a side by side bar graph with centre<p>How can i change this code so that the Continent labels appear in the centre with one variable to the left an... |
71,328,271 | Find the location of a cell that matches a string in the entire worksheet<p>Suppose I want to find the cell that contains the string "XYXY" in the entire worksheet (say it is in cells(100,35)) and change the value of the cell next to it in the next column (e.g. cells(100,36)). How can this be done efficiently... | <p>You don't need to know <code>CellPV</code>'s address on the worksheet.</p>
<p>Just use <a href="https://docs.microsoft.com/en-us/office/vba/api/excel.range.offset" rel="nofollow noreferrer"><code>Range.Offset</code></a>:</p>
<pre><code>If Not CellPV Is Nothing Then 'Test if Find was successful
CellPV.Offset(,1).V... | Find the location of a cell that matches a string in the entire worksheet | excel|vba | 0 | 32 | 1 | 71,328,308 | 71,328,308 | 1 | true | 2022-03-02T19:38:51.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find the location of a cell that matches a string in the entire worksheet<p>Suppose I want to find the cell that contains the string "XYXY" in the ... |
71,328,551 | how to plot a stacked bar with the following dataframe<p>dataframe is below</p>
<pre><code> tata4 <- data.frame(Subtype = c("Prostate", "Oesophagus", "Lung"),
alive = c(88, 22, 100), dead = c(12, 55, 17),
uncertain = c(10, 2, 2), total = c(186,46,202))
</code></pre>
<p>what I want... | <p>First you need to bring your data into long format:</p>
<pre><code>tata4 <- pivot_longer(tata4, cols = 2:4, names_to = "Status", values_to = "Count")
</code></pre>
<p>Afterwards you can feed the data to ggplot:</p>
<pre><code>ggplot(tata4, aes(Subtype, Count, fill = fct_rev(Status))) +
geom_... | how to plot a stacked bar with the following dataframe | r|ggplot2 | 0 | 31 | 1 | 71,329,174 | 71,329,174 | 1 | true | 2022-03-02T20:06:41.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to plot a stacked bar with the following dataframe<p>dataframe is below</p>
<pre><code> tata4 <- data.frame(Subtype = c("Prostate", "Oe... |
71,329,049 | Multiprocessing best practice in this case?<p>I currently have a working multiprocessing setup in my code, but I am not exactly pleased with it, and was wondering whether anyone could suggest a better way of doing it.</p>
<pre><code>def fnc_to_parallelize(args):
file, arg1, arg2, arg3, arg4, arg5 = args
return
... | <p>Use the <a href="https://docs.python.org/3/library/concurrent.futures.html" rel="nofollow noreferrer"><code>concurrent.futures</code></a> module instead,which provides a higher level API for making use of multiprocessing pools:</p>
<pre><code>import concurrent.futures
import time
import random
def fnc_to_paralleli... | Multiprocessing best practice in this case? | python|optimization|multiprocessing | 0 | 39 | 1 | 71,329,212 | 71,329,212 | 1 | true | 2022-03-02T20:58:08.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multiprocessing best practice in this case?<p>I currently have a working multiprocessing setup in my code, but I am not exactly pleased with it, and was wond... |
71,329,810 | What's the correct use of variadic function template here?<p>I happen to compute the elapsed running time of various functions and algorithms in my research project, so, I decided to define an <code>elapsed_time</code> function which might take various type of functions with various number of arguments(if any) and also... | <p>I recommend the following approach</p>
<pre><code>template<typename Func, typename... Args>
void elapsed_time(Func f, Args&&... args)
{
std::chrono::time_point<std::chrono::high_resolution_clock> start_;
std::chrono::time_point<std::chrono::high_resolution_clock> end_;
start_ =... | What's the correct use of variadic function template here? | c++|function-pointers|variadic-functions | 0 | 45 | 1 | 71,329,965 | 71,329,965 | 1 | true | 2022-03-02T22:14:37.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What's the correct use of variadic function template here?<p>I happen to compute the elapsed running time of various functions and algorithms in my research ... |
71,329,438 | Reposition Colorbar plotly express / graph object Maps<p>I am trying to move / reposition the colorbar. I overlay multiple layers of spatial data on the map, and the colorbar overlaps with eachother. I'd like to be able to reposition the colorbars.</p>
<p>I am using the US counties GeoJSON file from: <a href="https://e... | <ul>
<li>I found a few issues with your sample code
<ol>
<li><code>to_json()</code> does not return <em>geojson</em>. Used <code>__geo_interface__</code> instead</li>
<li>related to 1. <strong>locations</strong> needs to link to <em>id</em> in <em>geojson</em>. Used <code>set_index()</code> as well to make it consist... | Reposition Colorbar plotly express / graph object Maps | python|plotly|mapbox|plotly-dash | 0 | 260 | 1 | 71,330,220 | 71,330,220 | 1 | true | 2022-03-02T21:35:39.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reposition Colorbar plotly express / graph object Maps<p>I am trying to move / reposition the colorbar. I overlay multiple layers of spatial data on the map,... |
71,330,211 | Convert summary data (cumulative cases) to daily cases pandas<p>I have case data that is presented as a time series. They are summed for each following day, what can be used to turn them into daily case count data?</p>
<p>My dataframe in pandas:</p>
<pre><code> data sum_cases (cumulative)
0 2020-05-02 4.... | <p>If indeed your DF has has the data in date order, then you might be able to get away with:</p>
<pre><code>df['daily_cases'] = df['sum_cases'] - df['sum_cases'].shift(fill_value=0)
</code></pre> | Convert summary data (cumulative cases) to daily cases pandas | python|pandas | 0 | 29 | 1 | 71,330,293 | 71,330,293 | 1 | true | 2022-03-02T23:03:52.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert summary data (cumulative cases) to daily cases pandas<p>I have case data that is presented as a time series. They are summed for each following day, ... |
71,330,222 | I need help accessing a value in a tibble by name<p>I need to use the value from count() by name and not by position due to the dynamic nature of the source data.</p>
<p>I am trying to estimate the labor cost to re-ip devices based on existing ip assignment state.</p>
<p>Example:
a device with a state of Active will be... | <p>You can create a named list. With the sample data</p>
<pre><code>temp_dhcp_count <- read.table(text="
AddressState quantity
Active 6323
ActiveReservation 1222
Declined 10
Expired 12
InactiveReservation 287", header=TRUE)
</code></pre>... | I need help accessing a value in a tibble by name | r|tidyverse | 0 | 34 | 2 | 71,330,295 | 71,330,295 | 1 | true | 2022-03-02T23:04:40.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I need help accessing a value in a tibble by name<p>I need to use the value from count() by name and not by position due to the dynamic nature of the source ... |
71,329,517 | MongoDB joining collection to itself with lookup and pipeline, based on date: no results in joined result set<p>I'm trying to join a collection to itself so in one query I can receive the document and the document(s) immediately preceding it. I'm attempting to do this using <code>aggregate</code> and `$lookup'.</p>
<p>... | <p>You cannot use the "simple" form of <code>$match</code> with <code>pipeline</code> <code>$lookup</code>. You must use the <code>$expr</code> form as noted here: <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/" rel="nofollow noreferrer">https://docs.mongodb.com/manual/refere... | MongoDB joining collection to itself with lookup and pipeline, based on date: no results in joined result set | mongodb|aggregation-framework | 0 | 36 | 1 | 71,330,319 | 71,330,319 | 1 | true | 2022-03-02T21:44:15.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MongoDB joining collection to itself with lookup and pipeline, based on date: no results in joined result set<p>I'm trying to join a collection to itself so ... |
71,330,216 | Replace instance method with rspec-mock<p><a href="https://relishapp.com/rspec/rspec-mocks/v/3-10/docs/configuring-responses/calling-the-original-implementation" rel="nofollow noreferrer">The RSpec documentation</a> shows how to mock a class method. How can I replace an instance method instead. Here is a code example u... | <p>Just stub the method on the instance instead of the class:</p>
<pre><code>RSpec.describe "Foo" do
it "mocks foo" do
foo = Foo.new
allow(foo).to receive(:foo).and_return("bar")
expect(foo.foobar).to eq("barbar")
end
end
</code></pre> | Replace instance method with rspec-mock | ruby|rspec|rspec-mocks | 0 | 35 | 1 | 71,330,361 | 71,330,361 | 1 | true | 2022-03-02T23:04:23.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace instance method with rspec-mock<p><a href="https://relishapp.com/rspec/rspec-mocks/v/3-10/docs/configuring-responses/calling-the-original-implementat... |
71,328,628 | Running parallel tasks on Azure using bash<p>I am trying to run parallel commands on Azure using the bash script.
The script is working correctly when all are successful.
When one of them fails, the other processes are properly killed but the step is marked as successful. What am I missing?</p>
<pre class="lang-yaml pr... | <p>Explicitly checking exit status is likely a safer bet. Although "set -eu" may work for the immediate use case, it can have unexpected behavior:</p>
<p><a href="https://mywiki.wooledge.org/BashPitfalls#set_-euo_pipefail" rel="nofollow noreferrer">https://mywiki.wooledge.org/BashPitfalls#set_-euo_pipefail</... | Running parallel tasks on Azure using bash | bash|azure | 0 | 40 | 2 | 71,330,530 | 71,330,530 | 1 | true | 2022-03-02T20:15:11.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Running parallel tasks on Azure using bash<p>I am trying to run parallel commands on Azure using the bash script.
The script is working correctly when all ar... |
71,331,084 | 2 divs overlapping when the top one extends with transition<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code> .flexbox{width:500px;
height:300px;
displ... | <p>You need to remove the fixed <code>height</code> on the <code>.flexbox</code>:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.flexbox {
width: 500px;
/*height: 300px... | 2 divs overlapping when the top one extends with transition | html|css | 0 | 18 | 1 | 71,331,111 | 71,331,111 | 1 | true | 2022-03-03T01:26:00.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
2 divs overlapping when the top one extends with transition<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<... |
71,302,583 | Dynamic paths with apache beam and Runtime parameters<p>I am creating a pipeline TEMPLATE which takes some input file and counts the words on it. All works fine until this point, but the thing is that I need to pass another parameter (from the function where I call the template) that lets me pass the name of the file s... | <p>Unfortunately the WriteToText transform can't be used for this because it currently only supports a fixed destination. So in order to write files to dynamic destinations, you would instead need to use utilities from the <a href="https://beam.apache.org/releases/pydoc/2.36.0/apache_beam.io.fileio.html" rel="nofollow ... | Dynamic paths with apache beam and Runtime parameters | python|google-cloud-platform|pipeline|apache-beam|dataflow | 0 | 295 | 1 | 71,331,521 | 71,331,521 | 1 | true | 2022-03-01T00:42:26.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dynamic paths with apache beam and Runtime parameters<p>I am creating a pipeline TEMPLATE which takes some input file and counts the words on it. All works f... |
71,331,697 | Extract part of text using bash on a large file<p>I have huge log file where I want to extract part of the log which looks like this:<br />
----TEXT NOT NEEDED--- yValues:10 zValues:1254 ----TEXT NOT NEEDED---<br />
----TEXT NOT NEEDED--- yValues:10 zValues:1254 ----TEXT NOT NEEDED---<br />
----TEXT NOT NEEDED--- yVa... | <p><code>grep</code> has a <code>-o</code>/<code>--only-matching</code> option to do what you want:</p>
<pre><code>$ grep --only-matching 'yValues:[0-9]\+' <<EOF
----TEXT NOT NEEDED--- yValues:10 zValues:1254 ----TEXT NOT NEEDED---
----TEXT NOT NEEDED--- yValues:10 zValues:1254 ----TEXT NOT NEEDED---
----TEXT NOT... | Extract part of text using bash on a large file | bash | 0 | 35 | 1 | 71,331,726 | 71,331,726 | 1 | true | 2022-03-03T03:11:58.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract part of text using bash on a large file<p>I have huge log file where I want to extract part of the log which looks like this:<br />
----TEXT NOT NEED... |
71,319,423 | KSQL Query for check value completeness<p>I have a Stream consisting of below sample value,</p>
<p>correlation_id and event_type</p>
<p>Example<br />
aud-103 trigger<br />
aud-104 trigger<br />
aud-109 mitigation<br />
aud-103 mitigation</p>
<p>If an event with same correlation_id detected AND latest event_type is miti... | <p>I kinda like your solution; it is readable.</p>
<p>As some alternatives, you could probably use a series of functions like <code>collect_list</code>, <code>array_intersect</code>, and <code>array_length</code> to gather the <code>event_type</code>s, and check if both <code>mitigation</code> and <code>trigger</code> ... | KSQL Query for check value completeness | apache-kafka|ksqldb | 0 | 31 | 1 | 71,332,036 | 71,332,036 | 1 | true | 2022-03-02T08:20:22.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
KSQL Query for check value completeness<p>I have a Stream consisting of below sample value,</p>
<p>correlation_id and event_type</p>
<p>Example<br />
aud-103... |
71,332,526 | how to execute mongosearch query on elasticsearch in java?<p>I am working on elasticsearch.</p>
<p>The thing is the method I am implementing takes in a mongosearch query but I need to execute it on elasticsearch.</p>
<p>so far the mongosearch query will contain the criterias based on which i need to look.</p>
<p>is the... | <p>Elasticsearch comes with its own DSL(Domain specific language), Hence MongoDB query will not work on the Elasticsearch, Although as Elasticsearch is built on top of Lucene, So for its <a href="https://www.elastic.co/guide/en/elasticsearch/reference/8.0/query-dsl-query-string-query.html#query-dsl-query-string-query" ... | how to execute mongosearch query on elasticsearch in java? | java|elasticsearch | 0 | 32 | 1 | 71,332,695 | 71,332,695 | 1 | true | 2022-03-03T05:33:51.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to execute mongosearch query on elasticsearch in java?<p>I am working on elasticsearch.</p>
<p>The thing is the method I am implementing takes in a mongo... |
71,196,111 | .NET 6 Razor Page Partial tag helper - Model throws 'System.NullReferenceException'<p>I have a pretty simple Partial View:</p>
<pre><code>@page
@using IlgQueries.Common.Interfaces;
@model IlgQueries.Common.Interfaces.ProsByArea;
<ul class="pros-list">
@foreach (ProByGeoAreaData pro in Model.Pros)
... | <blockquote>
<pre><code>@page
@using IlgQueries.Common.Interfaces;
@model IlgQueries.Common.Interfaces.ProsByArea;
<ul class="pros-list">
@foreach (ProByGeoAreaData pro in Model.Pros)
{
<li>@pro.FullName - @Model.ProCategoryName - <strong>@pro.City</strong> @pro.Postal... | .NET 6 Razor Page Partial tag helper - Model throws 'System.NullReferenceException' | c#|asp.net-core|razor-pages | 0 | 278 | 1 | 71,332,836 | 71,332,836 | 1 | true | 2022-02-20T15:57:48.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
.NET 6 Razor Page Partial tag helper - Model throws 'System.NullReferenceException'<p>I have a pretty simple Partial View:</p>
<pre><code>@page
@using IlgQue... |
71,332,690 | Opening file with js<p>I'm trying to make a discord.js bot which whenever someone types a certain command on Discord, it opens a program on my PC:</p>
<pre><code>client.on("message", (message) => {
if (message.content == "!ping") {
//here I want to open a program on my pc
}
});
<... | <p>Assuming you are using Node you can include the execFile function from the child_process package and just call it from the command line.</p>
<pre><code>const { execFile } = require("child_process");
client.on("message", (message) => {
if(message.content == "!ping") {
exe... | Opening file with js | javascript|discord|discord.js | 0 | 26 | 1 | 71,333,486 | 71,333,486 | 1 | true | 2022-03-03T05:56:24.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Opening file with js<p>I'm trying to make a discord.js bot which whenever someone types a certain command on Discord, it opens a program on my PC:</p>
<pre><... |
71,331,003 | Inherit attributes in component definition<p>I have a basic <code>image</code> component and within it there is an <code>img</code> element. Is there a way to pass the native <code>img</code> attributes to <code>image</code> without having to define them all, such as <code>alt</code> and have them all applied to the <c... | <p>Yeah, this can be done (if it's what you're after ..)</p>
<pre class="lang-js prettyprint-override"><code>@Component({
selector: 'image',
template: '<img #imgRef [src]="src">'
})
export class ImageComponent {
@ViewChild('imgRef') imgRef: ElementRef<HtmlElement>;
@Input() attrs;
ngAft... | Inherit attributes in component definition | javascript|angular | 0 | 28 | 2 | 71,333,899 | 71,333,899 | 1 | true | 2022-03-03T01:11:10.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Inherit attributes in component definition<p>I have a basic <code>image</code> component and within it there is an <code>img</code> element. Is there a way t... |
71,333,843 | How do you structure python code to avoid long import statements?<p>example directory structure and code:</p>
<pre><code>root/
├─ main.py
├─ library/
│ ├─ __init__.py
│ ├─ library_code.py
│ ├─ utilities/
│ │ ├─ __init__.py
│ │ ├─ utils_one.py
│ │ ├─ utils_two.py
</code></pre>
<pre><code># main.py
import libra... | <p>The simplest is to just use a relative import. For example in utils_one.py you can do</p>
<pre class="lang-py prettyprint-override"><code>from . import utils_two
from .utils_two import function_one
</code></pre>
<p>You can also use <code>..</code> to go up a hierarchy just like with a file system</p> | How do you structure python code to avoid long import statements? | python|import|structure | 0 | 39 | 2 | 71,333,918 | 71,333,918 | 1 | true | 2022-03-03T08:05:09.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you structure python code to avoid long import statements?<p>example directory structure and code:</p>
<pre><code>root/
├─ main.py
├─ library/
│ ├─ _... |
71,333,217 | Join time series dataset with static dataset<p>I'm working on reporting dashboards where I need to display different time-series metrics.</p>
<p>My data storage is Google Spreadsheets.</p>
<p>Timeseries data is pretty straightforward: it is the set of responses on daily basis. But I need to join the master dataset (all... | <p>Assuming you have a key to join on, in the spreadsheet world you should be using either <code>VLOOKUP()</code> or <code>INDEX(MATCH())</code> to achieve a left join.</p>
<p>Check <a href="https://www.benlcollins.com/spreadsheets/vlookup-function/" rel="nofollow noreferrer">this</a> resource for more info on how to u... | Join time series dataset with static dataset | sql|google-sheets | 0 | 28 | 1 | 71,334,668 | 71,334,668 | 1 | true | 2022-03-03T07:01:38.430Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Join time series dataset with static dataset<p>I'm working on reporting dashboards where I need to display different time-series metrics.</p>
<p>My data stor... |
71,334,667 | Can I finish an animation without the animating itself<p>If I have an animation like this</p>
<p><code>textView.animate().translationY(-translationY * 0.32f).scaleX(0.7f).scaleY(0.7f);</code></p>
<p>is it possible to directly "end" the animation so that the user won't see the movement of the textview but its ... | <p>You can directly set the required properties on the <code>View</code> without starting an animation:</p>
<pre><code>textView.setTranslationY(-translationY * 0.32f);
textView.setScaleX(0.7f);
textView.setScaleY(0.7f);
</code></pre>
<p>Or you can set the duration to a very small value:</p>
<pre><code>textView.animate(... | Can I finish an animation without the animating itself | android|animation | 0 | 19 | 1 | 71,335,064 | 71,335,064 | 1 | true | 2022-03-03T09:16:46.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I finish an animation without the animating itself<p>If I have an animation like this</p>
<p><code>textView.animate().translationY(-translationY * 0.32f)... |
71,322,712 | AWS Codebuild knows my secret values, but won't inject them into my commands<p>I have a situation where I have a secret <code>important_secret</code> stored in secrets manager with a secret value of</p>
<pre><code>{
"tf_cloud_token": "super_secret"
}
</code></pre>
<p>In the codebuild console, I ... | <p>Fix the string interpolation: <code>"echo blah \"$SECRET_TF_CLOUD_TOKEN\" > ~/.terraformrc"</code></p>
<pre class="lang-sh prettyprint-override"><code>SECRET_TF_CLOUD_TOKEN="my-secret"
echo blah \"$SECRET_TF_CLOUD_TOKEN\" > ~/.terraformrc
cat ~/.terraformrc
# -> bla... | AWS Codebuild knows my secret values, but won't inject them into my commands | amazon-web-services|aws-codepipeline|aws-codebuild|aws-secrets-manager | 0 | 270 | 1 | 71,335,150 | 71,335,150 | 1 | true | 2022-03-02T12:28:28.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AWS Codebuild knows my secret values, but won't inject them into my commands<p>I have a situation where I have a secret <code>important_secret</code> stored ... |
71,334,842 | Pandas- plot results in sub results given a column name in a barplot and put value on top of each bar<p>I have the very simple dataset in a csv file</p>
<pre><code>condition,method,error
Normalized,LinfPGD,100
Integer,LinfPGD,100
Print+Scan(U),LinfPGD,59
Print+Scan(P),LinfPGD,9
Normalized,LinfBasicInteractive,100
Integ... | <p>You can create a seaborn barplot directly from the original dataframe:</p>
<pre class="lang-py prettyprint-override"><code>from matplotlib import pyplot as plt
import seaborn as sns
import pandas as pd
from io import StringIO
data_str = '''condition,method,error
Normalized,LinfPGD,100
Integer,LinfPGD,100
Print+Scan... | Pandas- plot results in sub results given a column name in a barplot and put value on top of each bar | python|pandas|matplotlib|seaborn | 0 | 33 | 2 | 71,335,266 | 71,335,266 | 1 | true | 2022-03-03T09:30:27.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas- plot results in sub results given a column name in a barplot and put value on top of each bar<p>I have the very simple dataset in a csv file</p>
<pre... |
71,331,724 | How to use grep or awk to get the time difference between 2 reads in the log<p>Hi I basically want to know the time difference between transactions. Below is an example:</p>
<pre><code>1000 mem_rd
1100 mem_wr
1200 mem_rd
1300 mem_wr
1500 mem_rd
1650 mem_rd
</code></pre>
<p>The first column is time and 2nd is transactio... | <p>Here's a one-line solution:</p>
<pre><code>cat file.txt | awk 'BEGIN {t0=0}; /mem_rd/ {t1=$1; if(t0==0) t0=t1; printf("%-3d %s\n", t1-t0, $2); t0=t1}'
</code></pre>
<p>Or the same thing, but written in a script file to make it more readable:</p>
<pre><code>$ cat script.awk
BEGIN {t0=0}
/mem_rd/ {
t1=$1;
... | How to use grep or awk to get the time difference between 2 reads in the log | linux|awk|grep | 0 | 34 | 1 | 71,335,268 | 71,335,268 | 1 | true | 2022-03-03T03:17:36.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use grep or awk to get the time difference between 2 reads in the log<p>Hi I basically want to know the time difference between transactions. Below is... |
71,336,369 | Table with one row ignoring number of columns<p>I want to create a table where the rows are clickable. When a row is clicked, I want to show input fields.</p>
<p><a href="https://codesandbox.io/s/crazy-mountain-oye5rw?file=/src/App.js" rel="nofollow noreferrer">https://codesandbox.io/s/crazy-mountain-oye5rw?file=/src/A... | <p>For row click you need to add click event handler for each row like,</p>
<pre><code><tr key={el.id} data-rowid={el.id} onClick={() => { showInputHandler(el.id) }}>
</code></pre>
<p>Then you need to check the selected id and store it in the state like,</p>
<pre><code> const showInputHandler = (id) => {
... | Table with one row ignoring number of columns | reactjs | 0 | 17 | 1 | 71,336,526 | 71,336,526 | 1 | true | 2022-03-03T11:25:17.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Table with one row ignoring number of columns<p>I want to create a table where the rows are clickable. When a row is clicked, I want to show input fields.</p... |
71,337,196 | Why `ln -s scripts/hooks/prepare-commit-msg .git/hooks/` does not work?<p>Why <code>ln -s scripts/hooks/prepare-commit-msg .git/hooks/</code> does not create a proper working link? <code>scripts/hooks/prepare-commit-msg</code> exists.</p> | <p>Let's look at the symlink you created with that <code>ln</code> command:</p>
<pre><code>$ ls -l .git/hooks/prepare-commit-msg
lrwxrwxrwx. 1 lars lars 32 Mar 3 07:35 .git/hooks/prepare-commit-msg -> scripts/hooks/prepare-commit-msg
</code></pre>
<p>There is no path <code>scripts/hooks/prepare-commit-msg</code> av... | Why `ln -s scripts/hooks/prepare-commit-msg .git/hooks/` does not work? | bash|git | 0 | 34 | 1 | 71,337,350 | 71,337,350 | 1 | true | 2022-03-03T12:24:47.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why `ln -s scripts/hooks/prepare-commit-msg .git/hooks/` does not work?<p>Why <code>ln -s scripts/hooks/prepare-commit-msg .git/hooks/</code> does not create... |
71,337,707 | Using OR inside click function<p>Can you in jQuery do something like <code>(a || b).click()</code>?</p>
<p>I am trying to have something happen when either a or b is clicked. In the sample below, I want wherever it says <code>button[i]</code>, for it to have a <code>menubutton[i]</code> next to it, so that everything c... | <pre><code>$('.class1, .class2').on('click', some_function);
</code></pre>
<p>Or:</p>
<pre><code>$('.class1').add('.class2').on('click', some_function);
</code></pre>
<p>This also works with existing objects:</p>
<pre><code>const $class1 = $('.class1');
const $class2 = $('.class2');
$class1.add($class2).on('click', som... | Using OR inside click function | jquery | 0 | 37 | 2 | 71,337,758 | 71,337,758 | 1 | true | 2022-03-03T13:06:12.147Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using OR inside click function<p>Can you in jQuery do something like <code>(a || b).click()</code>?</p>
<p>I am trying to have something happen when either a... |
71,329,584 | WPF ListViewItem - Switch focusable and IsMouseOver background values<p>I am trying to display a list with different object types (in the example dogs and cats). The types should be visually different (in the example realized by red and blue font in the DataTemplate in MainWindow.xaml).</p>
<p>Additionally I want that ... | <p>You could set the <code>IsHitTestVisible</code> property of the <code>ListViewItem</code> containers for the <code>Cat</code> objects to <code>false</code>:</p>
<pre><code><ListView ItemsSource="{Binding AnimalCollection}">
<ListView.ItemContainerStyle>
<Style TargetType="Li... | WPF ListViewItem - Switch focusable and IsMouseOver background values | c#|wpf|mvvm | 0 | 38 | 1 | 71,338,373 | 71,338,373 | 1 | true | 2022-03-02T21:51:20.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
WPF ListViewItem - Switch focusable and IsMouseOver background values<p>I am trying to display a list with different object types (in the example dogs and ca... |
71,339,843 | Have MariaDB built-in function to get the integer value using specified base for the conversion?<p>Have MariaDB an built-in analog of PHP <a href="https://www.php.net/manual/en/function.intval.php" rel="nofollow noreferrer">intval()</a> or Golang <a href="https://pkg.go.dev/strconv@go1.17.7#FormatInt" rel="nofollow nor... | <p>Guess you looking for <code>CONV()</code> ?</p>
<p><a href="https://mariadb.com/kb/en/conv/" rel="nofollow noreferrer">https://mariadb.com/kb/en/conv/</a></p>
<pre><code>SELECT CONV(99999999999999, 10, 36) AS `converted` FROM DUAL;
</code></pre> | Have MariaDB built-in function to get the integer value using specified base for the conversion? | mariadb | 0 | 26 | 1 | 71,339,903 | 71,339,903 | 1 | true | 2022-03-03T15:41:19.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Have MariaDB built-in function to get the integer value using specified base for the conversion?<p>Have MariaDB an built-in analog of PHP <a href="https://ww... |
71,339,842 | Choose lowest value in each row R<p>I have the df below.</p>
<pre><code> Postcode A B C D E
1 4251 45.8 55.1 70.2 79.5 102
2 4254 41.7 51.0 66.1 75.3 97.9
3 4255 45.5 48.7 63.9 73.1 95.6
4 4681 114 100 96.4 ... | <pre class="lang-r prettyprint-override"><code>library(dplyr)
library(tidyr)
df |>
pivot_longer(cols = A:E, names_to = "Location", values_to = "Dis") |>
group_by(Postcode) |>
filter(Dis == min(Dis))
+ # A tibble: 4 × 3
# Groups: Postcode [4]
Postcode Location Dis
<chr&... | Choose lowest value in each row R | r|dataframe|minimum | 0 | 26 | 1 | 71,339,956 | 71,339,956 | 1 | true | 2022-03-03T15:41:17.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Choose lowest value in each row R<p>I have the df below.</p>
<pre><code> Postcode A B C D E
1 4251 45.8 55.1 70.2 ... |
71,338,670 | Strange Loop behaviour with delays (jQuery)<p>I build a simple Loop in jQuery but the "price" pops up randomly.
I think there's some trouble with the delays but i want it to stay for like 4-5 seconds.</p>
<pre><code>setInterval(function(){loop()}, 16000);
function loop(){
$('.popup').fadeIn('1000');
$... | <p>If you add a count, you can see better whats happening:</p>
<pre><code>var now = Date.now();
function secondsCount(){
return Math.floor((Date.now() - now)/1000);
}
setInterval(function(){
console.log("Loop", secondsCount());
loop();
}, 10000);
function loop(){
console.log("Trigger FadeIn&q... | Strange Loop behaviour with delays (jQuery) | jquery|loops|jquery-ui|jquery-animate|delay | 0 | 41 | 1 | 71,340,335 | 71,340,335 | 1 | true | 2022-03-03T14:17:58.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Strange Loop behaviour with delays (jQuery)<p>I build a simple Loop in jQuery but the "price" pops up randomly.
I think there's some trouble with t... |
71,340,708 | Remove row in form SwiftUI<p>I have a form where if a user doesn't provide adaquate credentials to the email and password fields a prompt will show up. Issue is the prompts are creating an extra row where they are present (under email and password).</p>
<p><a href="https://i.stack.imgur.com/WpmrR.png" rel="nofollow nor... | <p>The simplest approach would be a conditional:</p>
<pre><code>if userInformation.passwordPrompt != "" {
Text(userInformation.passwordPrompt)
.font(.caption).italic().foregroundColor(.red)
}
</code></pre>
<p>This will conditionally remove it from the view. You can also animate the appearance/disa... | Remove row in form SwiftUI | swift|xcode|forms|swiftui | 0 | 42 | 1 | 71,340,934 | 71,340,934 | 1 | true | 2022-03-03T16:43:23.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Remove row in form SwiftUI<p>I have a form where if a user doesn't provide adaquate credentials to the email and password fields a prompt will show up. Issue... |
71,340,734 | MySQL UPDATE records referenced by another table<p>I need to update a specific column of all records whose primary key is referenced by a specific column in another table. (The foreign key relationship is already set up.)
An analog to what I'm trying to do would be this:</p>
<p>Table 1: Sandwiches</p>
<div class="s-ta... | <pre><code>Update SANDWICHES JOIN REQUESTS ON SANDWICHES.SANDWICH = REQUESTS.SANDWICH set SANDWICHES.REQUESTED = 1 WHERE SANDWICHES.REQUESTED = NULL
</code></pre> | MySQL UPDATE records referenced by another table | mysql|join | 0 | 45 | 2 | 71,341,405 | 71,341,405 | 1 | true | 2022-03-03T16:45:57.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL UPDATE records referenced by another table<p>I need to update a specific column of all records whose primary key is referenced by a specific column in ... |
71,341,302 | Why does this case_when command do the command for all cases?<p>4 in column 1 represents an answer that means "other". Column 2 represents what that "other" is. I want everything that doesn't have answer 4 in column 1 to have NA in column 2. Using case_when does not give the result I expect.</p>
<p>... | <p>The issue is that your <code>case_when</code> has no case for <code>col2 == 4</code>. Therefore NA is returned. According to the docs:</p>
<blockquote>
<p>If no cases match, NA is returned.</p>
</blockquote>
<p>To fix that add a default value via <code>TRUE ~ col2</code> to your case_when:</p>
<pre class="lang-r pre... | Why does this case_when command do the command for all cases? | r|case|multiple-columns|data-wrangling | 0 | 24 | 1 | 71,341,411 | 71,341,411 | 1 | true | 2022-03-03T17:28:37.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does this case_when command do the command for all cases?<p>4 in column 1 represents an answer that means "other". Column 2 represents what tha... |
71,326,491 | MathJax add multiple packages<p>I want to add multiple packages to MathJax.
i used the line.</p>
<pre><code>packages: {'[+]': ['img'],'[+]': ['physics']}
</code></pre>
<p>but this don't works. image is not rendered in output box.
showing the same thing \img[][200px][200px]{http://www.math.union.edu/~dpvc/math/courses/M... | <p>Use</p>
<pre class="lang-js prettyprint-override"><code>packages: {'[+]': ['img', 'physics']}
</code></pre>
<p>That's why the value of the key <code>[+]</code> in this object is an array.</p> | MathJax add multiple packages | javascript|mathjax | 0 | 44 | 1 | 71,341,421 | 71,341,421 | 1 | true | 2022-03-02T17:03:26.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MathJax add multiple packages<p>I want to add multiple packages to MathJax.
i used the line.</p>
<pre><code>packages: {'[+]': ['img'],'[+]': ['physics']}
</c... |
71,341,309 | Comparing the sums of categorical and individual data in the same column in R<p>I have this dataset of almost half a million rows. To summarize, it looks like this</p>
<pre><code>ages totals year sex subcounty county
0-4 500 2015 M subcounty1 county1
0 100 2015 M subcounty1 county1
1 150 201... | <p>This should filter out any groups with issues. It assumes the first row of each age group has the range in <code>ages</code>, and looks for a <code>"-"</code> character in <code>ages</code> to tell when a new group starts---you may need to adjust that logic if your data doesn't always match that pattern (e... | Comparing the sums of categorical and individual data in the same column in R | r | 0 | 33 | 1 | 71,341,637 | 71,341,637 | 1 | true | 2022-03-03T17:28:58.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Comparing the sums of categorical and individual data in the same column in R<p>I have this dataset of almost half a million rows. To summarize, it looks lik... |
71,332,285 | How to merge many reactions into one<p>I have many reactions, and all reactions are calling the same function.</p>
<pre><code>late List<ReactionDisposer> _disposers;
_disposers = [
reaction((_) => gameMode, (_) => _apply),
reaction((_) => level, (_) => _apply),
reaction((_) => round, (_) =>... | <p>I think you can use this code:</p>
<pre class="lang-dart prettyprint-override"><code>final _disposers = [
gameMode,
level,
round,
timeoutInSec,
hostage,
uptime,
].map((func) =>
reaction((_) => func, (_) => apply))
.toList();
</code></pre> | How to merge many reactions into one | dart|mobx | 0 | 42 | 1 | 71,342,098 | 71,342,098 | 1 | true | 2022-03-03T04:52:30.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to merge many reactions into one<p>I have many reactions, and all reactions are calling the same function.</p>
<pre><code>late List<ReactionDisposer&g... |
71,342,071 | Parse values using BeautifulSoup<p>I want to get <code>src</code> url from all this html using python.</p>
<p>I had this code to get text:</p>
<pre><code>avatar = html.find(class_ = "image-container image-container-player image-container-bigavatar")
print(avatar)
</code></pre>
<pre><code><div class="i... | <p>Assuming you only want to find images, add <code>"img"</code> as the first argument to <code>find()</code>.</p>
<p>Then you can look at the <code>["src"]</code> attribute directly:</p>
<pre><code>avatar = html.find("img", class_="...")
print(avatar["src"])
</code></p... | Parse values using BeautifulSoup | python|html|parsing|beautifulsoup | 0 | 29 | 1 | 71,342,211 | 71,342,211 | 1 | true | 2022-03-03T18:29:26.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parse values using BeautifulSoup<p>I want to get <code>src</code> url from all this html using python.</p>
<p>I had this code to get text:</p>
<pre><code>ava... |
71,342,889 | Blazor onchange for datepicker not firing<p>I have a small component that takes three date values and saves them. On the front end when the start date is chosen I want my preview date to change to two days before the start date. Here is what I have written.</p>
<p>My Class:</p>
<pre><code> public class AdDate
{
... | <p>You are using a 3rd party component: <code>RadzenDatePicker</code>, not a native element.<br />
From its <a href="https://www.radzen.com/documentation/blazor/datepicker/#a-ideventsdatepicker-eventsa" rel="nofollow noreferrer">documentation</a>, it doesn't expose an <em><strong>onchange</strong></em> callback, but <e... | Blazor onchange for datepicker not firing | c#|blazor | 0 | 543 | 1 | 71,342,929 | 71,342,929 | 1 | true | 2022-03-03T19:40:32.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Blazor onchange for datepicker not firing<p>I have a small component that takes three date values and saves them. On the front end when the start date is cho... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.