question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
72,251,689
unable to validate output of this recursive program<p>We have this recursive python program:</p> <pre><code>def tri_recursion(k): if(k &gt; 0): result = k + tri_recursion(k - 1) print(result) else: result = 0 return result print(&quot;\n\nRecursion Example Results&quot;) tri_recursion(6) </code></pre...
<p>Let me first explain what this function does:</p> <p><code>k</code> is the argument of the function, the base condition is when <code>k</code> is 0, result is 0 and nothing is printed, function just returns 0</p> <p>If <code>k</code> is greater than 0, the program calculates tri_recursion(<code>k-1</code>), adds it ...
unable to validate output of this recursive program
python|recursion
0
55
3
72,251,777
72,251,777
1
true
2022-05-15T19:45:38.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: unable to validate output of this recursive program<p>We have this recursive python program:</p> <pre><code>def tri_recursion(k): if(k &gt; 0): result ...
72,252,761
How to return things with newline? (python)<p>I am making a flask project right now and I need to return multiple values from a function. Here is my code:</p> <pre><code>return f&quot;Title: {volume_info['title']}&quot; \ f&quot;Author: {prettify_author}&quot; \ f&quot;Page Count: {volume_info['pageC...
<p>If your output is going to a file or to the console, you can use a newline character:</p> <pre><code>return f&quot;Title: {volume_info['title']}\n&quot; \ f&quot;Author: {prettify_author}\n&quot; \ f&quot;Page Count: {volume_info['pageCount']}\n&quot; \ f&quot;Publication Date: {volume_info[...
How to return things with newline? (python)
python|flask|return
0
55
2
72,252,775
72,252,775
1
true
2022-05-15T23:01:48.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to return things with newline? (python)<p>I am making a flask project right now and I need to return multiple values from a function. Here is my code:<...
72,241,859
Executor pauses and doesn't process pending queues<p>I have a long-running task of creating a bitmap saving it and recreating more bitmaps which I was doing on a single background thread</p> <pre><code>ExecutorService executor = Executors.newSingleThreadExecutor(); Handler handler = new Handler(Looper.getMainLooper());...
<p>Turns out the issue was I was closing the pdf page before recycling the bitmap.</p> <pre><code>page.close(); ..... pageBitmap.recycle(); </code></pre> <p>I moved the <code>page.close()</code> after recycling bitmap and the thread is no longer hanging up</p> <pre><code>pageBitmap.recycle(); page.close(); </code></pre...
Executor pauses and doesn't process pending queues
java|android|multithreading
2
55
2
72,254,904
72,254,904
1
true
2022-05-14T15:54:07.030Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Executor pauses and doesn't process pending queues<p>I have a long-running task of creating a bitmap saving it and recreating more bitmaps which I was doing ...
72,252,830
How to solve a system of ODEs with Scipy when the variables in the equations are autogenerated<p>I'm generating a system of ODEs in the form of a list of equations where the variables are <code>sympy.Symbol()</code>, for example <code>[3*sympy.Symbol('x')**3+sympy.Symbol('y') , sympy.Symbol('x')-sympy.Symbol('y')**4]</...
<p>The reason you are getting that results is because you are overwriting <code>eqs</code> inside <code>kin</code> at each iteration. Also, as mentioned by Lutz, you should use <code>lambdify</code> which is going to convert symbolic expressions to numerical functions so that they can be evaluated by Numpy (much faster...
How to solve a system of ODEs with Scipy when the variables in the equations are autogenerated
python|numpy|scipy|sympy|ode
0
55
1
72,255,832
72,255,832
1
true
2022-05-15T23:19:10.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to solve a system of ODEs with Scipy when the variables in the equations are autogenerated<p>I'm generating a system of ODEs in the form of a list of equ...
72,251,000
Is there the way to change LinearLayout width in recyclerview adapter (Kotlin)<p>I have some diff blocks generated with RecyclerView, according the design the last two blocks should have another text size. I do this programmatically:</p> <pre><code> when(position){ 0 -&gt; { holder.catCard.setCardBa...
<p>To change the last item layout params, you will have to check if the RecyclerView method &quot;onBindViewHolder&quot; has been called in the last item from the list, to do so, in your inner class ViewHolder:</p> <pre><code>inner class ViewHolder(itemView:View): RecyclerView.ViewHolder(itemView), View.OnClickListener...
Is there the way to change LinearLayout width in recyclerview adapter (Kotlin)
android-studio|kotlin|android-recyclerview
0
55
1
72,255,942
72,255,942
1
true
2022-05-15T18:12:32.057Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there the way to change LinearLayout width in recyclerview adapter (Kotlin)<p>I have some diff blocks generated with RecyclerView, according the design th...
72,256,664
which SQL query choose?<p>I want to know if is possible if this kind of make queries has a name and which is the better option?</p> <p><strong>OPTION 1</strong></p> <pre><code>select * from users, tasks where users.id = tasks.user_id and user.name='Lucas' </code></pre> <p><strong>OPTION 2</strong></p> <pre><code>SELECT...
<p>When joining tables, I usually go with the join. (OPTION 3 here)</p> <p>Performance-wise, I don't think there is much difference between options 1 and 3. As for the 2nd option, I'd avoid it in almost every scenario.</p> <p>I think <a href="https://stackoverflow.com/questions/13476029/multiple-table-select-vs-join-pe...
which SQL query choose?
mysql|sql|postgresql
0
55
1
72,256,852
72,256,852
1
true
2022-05-16T09:05:48.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: which SQL query choose?<p>I want to know if is possible if this kind of make queries has a name and which is the better option?</p> <p><strong>OPTION 1</stro...
72,258,400
iOS - How to setup app analytics provided by Apple in Xcode?<p>Someone know how to setup analytics provided by Apple in Xcode? I have a Flutter application and I want to send crashes to app store connect and see this crashes inside it.</p> <p>I can't find a proper documentation to do this. This is the Apple page who &q...
<p>You don't need to set anything up to get the crash logs. Apple will provide you with them after you release the app.</p> <p>They appear about a day (or more in the beginning) after they happen, and you can access them later in Xcode:</p> <pre><code>Menu: &quot;Windows&quot; -&gt; &quot;Organizer&quot; -&gt; &quot;Cr...
iOS - How to setup app analytics provided by Apple in Xcode?
ios|xcode|flutter|analytics
1
55
1
72,258,455
72,258,455
1
true
2022-05-16T11:22:40.640Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: iOS - How to setup app analytics provided by Apple in Xcode?<p>Someone know how to setup analytics provided by Apple in Xcode? I have a Flutter application a...
72,264,228
Including a precompiled header and a non-precompiled header in a .cpp file causes the .cpp file to not recognize the non-precompiled header<p>Visual Studio 2022:</p> <p>I included a simple header to store basic functions like printing text or executing functions to my .cpp file, but after including a precompiled header...
<p>The precompiled header must come first in the include list, because it erases everything that comes before it.</p>
Including a precompiled header and a non-precompiled header in a .cpp file causes the .cpp file to not recognize the non-precompiled header
c++|visual-c++
0
55
1
72,264,321
72,264,321
1
true
2022-05-16T18:53:13.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Including a precompiled header and a non-precompiled header in a .cpp file causes the .cpp file to not recognize the non-precompiled header<p>Visual Studio 2...
72,272,485
Removing line breaks after fixed length<p>I have a text file with thousands of XML strings on each line. However, if any XML string exceeds 32767 characters, then the remaining text is moved to next line. I need to remove such line breaks to ensure each line has a complete XML string.</p> <p>Sample version of the file ...
<ul> <li><kbd>Ctrl</kbd>+<kbd>H</kbd></li> <li>Find what: <code>\R(?!&lt;\?xml)</code></li> <li>Replace with: <code>LEAVE EMPTY</code></li> <li><strong>CHECK</strong> <em>Match case</em></li> <li><strong>CHECK</strong> <em>Wrap around</em></li> <li><strong>CHECK</strong> <em>Regular expression</em></li> <li><kbd>Replac...
Removing line breaks after fixed length
notepad++
0
55
1
72,272,580
72,272,580
1
true
2022-05-17T10:34:30.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Removing line breaks after fixed length<p>I have a text file with thousands of XML strings on each line. However, if any XML string exceeds 32767 characters,...
72,273,262
How to clearInterval correctly using React Native<p>In RN, I have a countdown timer using setInterval that goes from 10 - 0. Once the condition is met of the time === 0 or less than 1, I want the interval to stop. The countdown is working but is repeating continuously, clearInterval not working. What am I doing wrong?<...
<p>ClearInterval should be inside, setTime because useEffect will only trigger once.</p> <p><strong>NOTE: you should also clear on unmount.</strong></p> <pre><code>export default function Timer() { const [time, setTime] = useState(10); useEffect(() =&gt; { var intervalID = setInterval(() =&gt; { setTime(...
How to clearInterval correctly using React Native
reactjs|react-native|react-hooks|use-state|clearinterval
0
55
4
72,273,383
72,273,383
1
true
2022-05-17T11:30:05.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to clearInterval correctly using React Native<p>In RN, I have a countdown timer using setInterval that goes from 10 - 0. Once the condition is met of the...
72,281,408
How to count the number of instances of a word in a Pandas column?<p>I have a Pandas dataframe that contains genres of rated movies. Some movies fall under multiple genres, each genre separated by a &quot;|&quot;. You can see examples of this in the code below.</p> <pre class="lang-py prettyprint-override"><code> impor...
<p>You could use the regex <code>r'\s*\|\s*'</code> or even <code> *[|] *</code> to split your genre column then explode the column and do the count. Note that <code>\s</code> stands for space. and since <code>|</code> is a metacharacter, you need to escape it by a backspace or by placing it in a character class ie <co...
How to count the number of instances of a word in a Pandas column?
python|pandas|count
0
55
1
72,281,574
72,281,574
1
true
2022-05-17T22:38:40.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to count the number of instances of a word in a Pandas column?<p>I have a Pandas dataframe that contains genres of rated movies. Some movies fall under m...
72,283,110
Change value of css in components<p>I am new to React/Javascript and can't really solve this issue for a day.</p> <p>I have object with names of players.</p> <pre><code>let players = {'Amber', 'Thomas', 'Trump', 'Michael', 'Someone'}; </code></pre> <p>Basically players is the input function where users type their names...
<p>In case you want to calculate value based on length of the list in <code>repeat(**value**, 1fr)</code>, you can use CSS values, attached in inline style of wrapper of list elements:</p> <p>Calculate column amount (based on list length and <code>6</code> divider;</p> <pre class="lang-js prettyprint-override"><code>co...
Change value of css in components
css|reactjs
2
55
2
72,284,107
72,284,107
1
true
2022-05-18T04:11:06.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change value of css in components<p>I am new to React/Javascript and can't really solve this issue for a day.</p> <p>I have object with names of players.</p>...
72,289,131
Unable to authenticate using http Dart package to Azure DevOps Rest API<p>I'm trying to call the Azure DevOps REST API with the HTTP DART package to get a list of projects. However, whenever I call the API, I get a 401 error with the message &quot;Unauthorized.&quot; So far, I have tried several different header format...
<pre><code>headers: { HttpHeaders. authorizationHeader: &quot;Basic &quot; + base64Str, } </code></pre> <p><strong>Remove ',' after Basic and try it again</strong></p>
Unable to authenticate using http Dart package to Azure DevOps Rest API
flutter|dart|azure-devops-rest-api
0
55
1
72,289,719
72,289,719
1
true
2022-05-18T12:24:45.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to authenticate using http Dart package to Azure DevOps Rest API<p>I'm trying to call the Azure DevOps REST API with the HTTP DART package to get a li...
72,261,474
Need help using javascript to sort a Kendo Grid column of alphanumeric ages<p>In our grid of user data, we have a field for each user that includes their age calculated as a string, such as 77 years, or 6 months, or 5 days. We need a way to be able to sort the grid by that column and have the ages sort numerically whe...
<p>If you have a property in your data which you can be cast to <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" rel="nofollow noreferrer"><code>Date</code></a> type, you can use it in the <a href="https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/colu...
Need help using javascript to sort a Kendo Grid column of alphanumeric ages
javascript|sorting|kendo-ui|kendo-grid
0
55
1
72,290,494
72,290,494
1
true
2022-05-16T15:10:42.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need help using javascript to sort a Kendo Grid column of alphanumeric ages<p>In our grid of user data, we have a field for each user that includes their age...
72,294,459
How to work with the function that contains this product?<p>How to work with this equation :</p> <pre><code>def f(x,y): return ( (7/10)*x**4 - 8*y**2 + 6*y**2 + cos(x*y) - 8*x) x = np.linspace(-3.1416,3.1416,100) y = np.linspace(-3.1416,3.1416,100) x,y = np.meshgrid(x,y) z = f(x,y) TypeError: only size-1...
<p>Your x and y that you're passing to your function are likely not ints/floats, which based upon how you're using cos in the function they should be ints/floats. Just check that your x and y are actually what you expect them to be by printing them out. If they do end up being lists just iterate across the lists and ca...
How to work with the function that contains this product?
python|numpy
0
55
2
72,294,677
72,294,677
1
true
2022-05-18T18:43:22.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to work with the function that contains this product?<p>How to work with this equation :</p> <pre><code>def f(x,y): return ( (7/10)*x**4 - 8*y**2...
72,296,458
Remove excess space in ggplot when x axis has dates<p>My problem is that with ggplot, when the x-axis contains dates a little too muuch excess space is given in the plot on the left side<br /> Is there any possibility for the red space to be removed? so that the whole curve and x-axis is shifted to the left.</p> <pre><...
<p>Add the <code>expand =c(0,0)</code> parameter in the <code>scale_x_date</code></p> <p><a href="https://i.stack.imgur.com/eUWen.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eUWen.png" alt="enter image description here" /></a></p>
Remove excess space in ggplot when x axis has dates
r|ggplot2|plot
0
55
1
72,296,590
72,296,590
1
true
2022-05-18T21:59:33.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove excess space in ggplot when x axis has dates<p>My problem is that with ggplot, when the x-axis contains dates a little too muuch excess space is given...
72,297,523
Remove all label tags inside a string<p>I want to remove all label tags from a string.</p> <p>This is the input string.</p> <pre><code>&lt;p&gt; &lt;title&gt;Contact Us&lt;/title&gt; &lt;/p&gt; &lt;table dropzone=&quot;copy&quot;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class=&quot;label&quot; style=...
<p>This regex could work, you can use the <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-7.2#replacement-operator" rel="nofollow noreferrer"><code>-replace</code> operator</a> instead of the call to <a href="https://docs.microsoft.c...
Remove all label tags inside a string
regex|powershell|powershell-2.0|powershell-3.0|powershell-4.0
1
55
2
72,297,646
72,297,646
1
true
2022-05-19T01:00:31.243Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove all label tags inside a string<p>I want to remove all label tags from a string.</p> <p>This is the input string.</p> <pre><code>&lt;p&gt; &lt;title&gt...
72,279,875
Hyperparameters not changing results from random forest regression trees<p>I am trying to tune the hyperparameters of a random forest regression model and all of the accuracy measures are exactly the same, regardless of changes to hyperparameters. I've tested the same code on the &quot;diamonds&quot; dataset and have b...
<p>This seems to be an issue with your cross-validation folds. When I run your code and look at the results of <code>model</code> it says:</p> <pre><code>Summary of sample sizes: 1, 1, 1, 1, 1, 1, ... </code></pre> <p>indicating that each fold only has a sample size of 1.</p> <p>I think if you define <code>folds</code>...
Hyperparameters not changing results from random forest regression trees
r|random-forest|r-caret|r-ranger
1
55
1
72,301,275
72,301,275
1
true
2022-05-17T19:48:00.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hyperparameters not changing results from random forest regression trees<p>I am trying to tune the hyperparameters of a random forest regression model and al...
72,312,858
R rowwise replace the first instance of the minimum<p>How can I do the following:</p> <ol> <li>replace all values &lt; 6 with NA,</li> <li>if there is only one NA in the row, replace the first instance of the minimum value with -99?</li> </ol> <p>Some data that includes an ID variable and a total column:</p> <pre><code...
<p>If you're willing to pivot rather than work rowwise, then this solution will work.</p> <pre><code>library(dplyr) df %&gt;% pivot_longer(names_to = 'col', values_to = 'val', -c(id, total)) %&gt;% group_by(id) %&gt;% mutate(val2 = rank(val, ties.method = 'first'), val = if...
R rowwise replace the first instance of the minimum
r|replace|conditional-statements|minimum|rowwise
2
55
2
72,313,632
72,313,632
1
true
2022-05-20T02:11:36.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R rowwise replace the first instance of the minimum<p>How can I do the following:</p> <ol> <li>replace all values &lt; 6 with NA,</li> <li>if there is only o...
72,304,408
PhpStorm deployment successful but does not update remote file<p>I am using a shared hosting platform to host my website and I am using PhpStorm as my IDE.</p> <p>I have configured PhpStorm for deployment which connects successfully to the server.</p> <p>When I deploy my file to the server the file transfer terminal sh...
<p>The deployment seems to work fine: if it says uploaded then it did.</p> <p>You can use &quot;Compare with Deployed...&quot; on such a file (or &quot;Synchronize with Deployed...&quot; on a folder) to see if it will show any differences: if it shows the difference then we have an issue; otherwise it's a misconfigurat...
PhpStorm deployment successful but does not update remote file
phpstorm|cpanel
0
55
1
72,316,564
72,316,564
1
true
2022-05-19T12:18:40.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PhpStorm deployment successful but does not update remote file<p>I am using a shared hosting platform to host my website and I am using PhpStorm as my IDE.</...
72,319,256
Clashing types, crossterm::Result and core::Result error[E0107]:<p>I know the issue is that I have two <code>Result</code> types from different libraries but can't find how to fix it.</p> <pre><code>[dependencies] crossterm = &quot;0.23&quot; time = &quot;0.3.9&quot; tokio = { version = &quot;1&quot;, features = [&quot...
<p>You have <code>crossterm ::Result</code> in scope, so you would have to disambiguate the result you want to return, otherwise it just thinks you want to return the <code>crossterm</code> type:</p> <pre class="lang-rust prettyprint-override"><code>fn main() -&gt; std::result::Result&lt;(), Box&lt;dyn std::error::Erro...
Clashing types, crossterm::Result and core::Result error[E0107]:
rust
-1
55
1
72,319,347
72,319,347
1
true
2022-05-20T12:53:09.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Clashing types, crossterm::Result and core::Result error[E0107]:<p>I know the issue is that I have two <code>Result</code> types from different libraries but...
72,325,993
Pressing enter while focused on input causes sibling button to fire<p>In a react app, there's a form with some buttons and input as below:</p> <pre><code>&lt;form&gt; &lt;div&gt; { ['1', '10', '100'].map(val =&gt; ( &lt;button onClick={() =&gt; console.log(val)}&gt; {val} &lt;/butt...
<p>Yes, that's right, there is <code>type</code> property in the button element - <a href="https://www.w3schools.com/jsref/prop_pushbutton_type.asp" rel="nofollow noreferrer">https://www.w3schools.com/jsref/prop_pushbutton_type.asp</a> Also, you can get noticed the default <code>type</code> property is <code>submit</co...
Pressing enter while focused on input causes sibling button to fire
reactjs|forms|event-bubbling
3
55
1
72,326,171
72,326,171
1
true
2022-05-21T01:13:05.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pressing enter while focused on input causes sibling button to fire<p>In a react app, there's a form with some buttons and input as below:</p> <pre><code>&lt...
72,329,568
Not getting the updated value of an rxjs BehaviorSubject in a component<p>I'm working on this photo editor app where changes are auto-saved in the db. Now I'm trying to add a toast that would display when the editor data is saved to db successfully. So I'm using RxJS's <code>BehaviorSubject</code> to achieve that.</p> ...
<p>this 'if block' should be in subscribe block I guess!</p> <pre><code>if ( this.isToast ) { console.log( 'Log 2: ', this.isToast ); this.successMessage = 'Saved successfully!; this.ref.detectChanges(); this.toast.show(); this.dataProcessService.changeToastState( false ); } </code></p...
Not getting the updated value of an rxjs BehaviorSubject in a component
angular|rxjs
1
55
1
72,330,005
72,330,005
1
true
2022-05-21T12:30:45.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Not getting the updated value of an rxjs BehaviorSubject in a component<p>I'm working on this photo editor app where changes are auto-saved in the db. Now I'...
72,330,379
Airflow init in Docker creates empty directories<p>One of the projects I am working on is using airflow. So, I used <a href="https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html" rel="nofollow noreferrer">airflow's</a> documentation to install airflow with docker compose.</p> <p>I wanted the <code>da...
<p>Thanks to @EDG956 for the help.</p> <p>There is a <code>volumes</code> field inside the <code>airflow-init</code> service that I completely missed. You can change the volume mount from</p> <pre><code>volumes: - .:/sources </code></pre> <p>to:</p> <pre><code>volumes: - ./airflow/:/sources </code></pre> <p...
Airflow init in Docker creates empty directories
docker|docker-compose|airflow
0
55
1
72,330,543
72,330,543
1
true
2022-05-21T14:16:58.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Airflow init in Docker creates empty directories<p>One of the projects I am working on is using airflow. So, I used <a href="https://airflow.apache.org/docs/...
72,331,961
How can I make this regex relative URL extraction work in grep?<p>Have this string in a file and want to just extract the relative link:</p> <pre><code>&lt;a href=&quot;/FreeCAD/FreeCAD-Bundle/releases/download/weekly-builds/FreeCAD_weekly-builds-28909-2022-05-20-conda-Linux-x86_64-py39.AppImage&quot; rel=&quot;nofollo...
<p>You need to use <code>[^&quot;]*</code> instead of <code>[^]*</code>:</p> <pre class="lang-sh prettyprint-override"><code>grep -o '/FreeCAD/[^&quot;]*AppImage' somefile </code></pre> <p><code>/FreeCAD/[^]*AppImage</code> works online because you test the pattern against the ECMAScript engine, but <code>grep -E</code...
How can I make this regex relative URL extraction work in grep?
regex|grep
0
55
1
72,332,344
72,332,344
1
true
2022-05-21T17:47:16.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I make this regex relative URL extraction work in grep?<p>Have this string in a file and want to just extract the relative link:</p> <pre><code>&lt;a...
72,331,838
Powershell regex group : how do I get all subgroups 2<p>I want to extract file1, file2 I know how to do this in javascript, I'm lost in Powershell, I can only extract the whole second match following that tut <a href="https://devblogs.microsoft.com/scripting/regular-expressions-regex-grouping-regex/" rel="nofollow nore...
<p>An example of using <code>-match</code> and the <code>$matches</code> automatic variable to retrieve capture group values:</p> <pre><code>$data = @' &quot;C:\test\file1.txt&quot; &quot;C:\test\file2.txt&quot; '@ $data -match '\\([^.\\]+)\.[\s\S]+?\\([^.\\]+)\.' write-host $matches[1] # file1 write-host $matches...
Powershell regex group : how do I get all subgroups 2
powershell
1
55
3
72,332,430
72,332,430
1
true
2022-05-21T17:30:19.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Powershell regex group : how do I get all subgroups 2<p>I want to extract file1, file2 I know how to do this in javascript, I'm lost in Powershell, I can onl...
72,333,663
How to count the amount of 1s in one of the rows in a matrix?<p>I am currently trying to input a matrix and have the python code be able to go row by row to count how many 1s there are in that row. Then I would have all the data be outputted in a row. But right now, I am kind of stumped on how to collect the data and o...
<p>Your code has a few issues. For one, it would be good to tell a (human) user what they need to enter - an automated user won't care about it either way:</p> <pre><code>print('Enter the number of rows and the length of each row, separated by a space:') n, m = map(int, input().split()) </code></pre> <p>(or you can do ...
How to count the amount of 1s in one of the rows in a matrix?
python|matrix
0
55
1
72,333,843
72,333,843
1
true
2022-05-21T22:34:48.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to count the amount of 1s in one of the rows in a matrix?<p>I am currently trying to input a matrix and have the python code be able to go row by row to ...
72,343,515
Is there a code where it prompts the user to enter specific numbers?<p>I'm practicing Python and I am having a few issues with my code. I am trying to define the main function and prompt the user to enter three specific numbers. The program is supposed to find the average of these three numbers and compare the average ...
<p>There seem to be several problems with your code.</p> <ol> <li><p>You call no functions but the main. The main function has only function definitions in it but no function call. You must place the function calls in the main function and then call the main function. At best, you also place your function definitions a...
Is there a code where it prompts the user to enter specific numbers?
python|function|loops|if-statement|iteration
-2
55
3
72,343,605
72,343,605
1
true
2022-05-23T05:12:57.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a code where it prompts the user to enter specific numbers?<p>I'm practicing Python and I am having a few issues with my code. I am trying to define...
72,344,511
Vuetify/VueJS - Multiple conditions on md/lg/xl<p>I'm struggling here applying conditions on the breakpoints in Vue/Vuetify</p> <p>Basically, I want to say... if the length of the array is divisible by 2, then MD=6, if it is divisible by 3 then MD=12</p> <pre><code>&lt;v-col cols=&quot;12&quot; :md=&quot;module.pla...
<p>You can make computed property:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>new Vue({ el: '#app', vuetify: new Vuetify(), data() { return { module: {id: ...
Vuetify/VueJS - Multiple conditions on md/lg/xl
javascript|vue.js|vuejs2|vuetify.js
0
55
2
72,344,660
72,344,660
1
true
2022-05-23T07:10:47.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Vuetify/VueJS - Multiple conditions on md/lg/xl<p>I'm struggling here applying conditions on the breakpoints in Vue/Vuetify</p> <p>Basically, I want to say.....
72,256,501
AnyLogic. How to count the average queue size?<p>I built the model of packets transmission through two networks in multipath scenario. Each packet is presented as an agent. The Logic is the following: firstly, packets are transmited into the Network1 (if it has enough resources), if resources are not enough in Network...
<p>Create a cyclic event that regularly computes <code>queue.size()</code>. You decide on the interval.</p> <p>The event then adds this value to a new <code>Statistics</code> object and you can retrieve the mean and other stats from that (use <code>myStatisticsObject.add(queue.size())</code> in the event)</p>
AnyLogic. How to count the average queue size?
queue|anylogic
0
55
1
72,345,685
72,345,685
1
true
2022-05-16T08:52:23.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AnyLogic. How to count the average queue size?<p>I built the model of packets transmission through two networks in multipath scenario. Each packet is present...
72,347,577
Pandas delete rows after condition in column "A" until confition in column "B"<p>How do you remove each row after each &quot;close_condition&quot; == 1 until you reach a &quot;open_condition&quot; == 1 row?</p> <p>No row with &quot;open_condition&quot; == 1 is to be deleted</p> <pre><code> open_condition close_condi...
<p>You could create a &quot;running close flag&quot; that resets to <code>0</code> every time it encounters an <code>open_condition</code></p> <pre class="lang-py prettyprint-override"><code>df['rcf'] = [c if o else np.nan for (o, c) in zip(df['open_condition'], df['close_condition'])] df['rcf'] = df['rcf'].fillna(meth...
Pandas delete rows after condition in column "A" until confition in column "B"
python|pandas
0
55
1
72,349,951
72,349,951
1
true
2022-05-23T11:12:03.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas delete rows after condition in column "A" until confition in column "B"<p>How do you remove each row after each &quot;close_condition&quot; == 1 until...
72,349,493
How to properly mock named export children components with jest<p>So, here is a simplified version of both my component and my test.</p> <pre><code>export const VerifyPositionsDialog = () =&gt; { return ( &lt;BaseVerifyPositionsDialog&gt; &lt;PositionsArea /&gt; &lt;/BaseVerifyPositionsDialog&gt; ); }...
<p>You should mock the component using <code>jest.fn</code> returning the mocked div:</p> <pre class="lang-js prettyprint-override"><code>jest.mock('../VerifyPositionsDialog/PositionsArea', () =&gt; jest.fn(() =&gt; &lt;div&gt;Mocked&lt;/div&gt;), ); describe('Test', () =&gt; { it('Mock Component Test', () =&gt; {...
How to properly mock named export children components with jest
reactjs|typescript|unit-testing|mocking|react-testing-library
0
55
1
72,350,108
72,350,108
1
true
2022-05-23T13:33:51.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to properly mock named export children components with jest<p>So, here is a simplified version of both my component and my test.</p> <pre><code>export co...
72,359,432
java.sql.SQLException:with infinite loop<p>In my project &quot;Student Attendance Management System&quot; , after giving the subject name and number of roll nos present, my project start adding the &quot;1&quot; to the given subject infinitely,and it also shows error:</p> <blockquote> <p>java.sql.SQLException: Before s...
<p>Inside <code>update_attendance_btnActionPerformed</code> you are directly accessing data from <code>ResultSet</code> even before calling <code>rs.next()</code>.</p> <pre><code>//calculate updated attendance percentage ResultSet rs= stmt.executeQuery(&quot;select * from attendance where Roll_no=&quot;+rno[cnt]); int...
java.sql.SQLException:with infinite loop
java|mysql|jdbc|resultset
1
55
1
72,359,585
72,359,585
1
true
2022-05-24T08:15:34.300Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: java.sql.SQLException:with infinite loop<p>In my project &quot;Student Attendance Management System&quot; , after giving the subject name and number of roll ...
72,360,268
Creating new rows when specific terms within complex strings are recognised<p>I have a dataframe containing strings with various formats (words, cases, special characters, spaces, hyphen, overlapping words). These were selected by surveyors from a pre-defined list. But the surveyor could select multiple terms for each ...
<p>One way in <em>base</em> might be to find the matches using <code>grepl</code> and then expand the Surveyor_df using <code>col</code> and the Pre_defined_pressures using <code>row</code>.</p> <pre><code>. &lt;- t(sapply(Pre_defined_pressures, grepl, Surveyor_df$Pressure, fixed=TRUE)) . &lt;- cbind(Surveyor_df[col(.)...
Creating new rows when specific terms within complex strings are recognised
r|string|dataframe|dplyr
1
55
3
72,361,690
72,361,690
1
true
2022-05-24T09:16:28.573Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating new rows when specific terms within complex strings are recognised<p>I have a dataframe containing strings with various formats (words, cases, speci...
72,364,211
Required specifics to ensure migration rollback<p>For proper migration rollback (either through errors or manual operation), does one need to implement specific things in the migration to ensure this can be done?</p> <p>For instance, if I only have <code>change()</code>, which has updates, how will it know how to do th...
<p>This is mentioned in the docs here:</p> <blockquote> <p>Phinx 0.2.0 introduced a new feature called reversible migrations. This feature has now become the default migration method. With reversible migrations, you only need to define the up logic, and Phinx can figure out how to migrate down automatically for you. Fo...
Required specifics to ensure migration rollback
php|cakephp|cakephp-4.x|phinx
0
55
1
72,364,647
72,364,647
1
true
2022-05-24T13:54:35.983Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Required specifics to ensure migration rollback<p>For proper migration rollback (either through errors or manual operation), does one need to implement speci...
72,363,061
Proper way of adding a canvas to a label<p>I'm posting this because I want to add a canvas behind, inside, on top, I don't know, I want a background for the labels, and I have found out that I need a canvas to do that, but I don't know how to do it. I have been able to add a canvas as a background for a label, but sinc...
<p>In order to have a label with some background color and use it dynamically you can create a dynamic class inherited from <code>Label</code>. You can also create any desired prop. for advanced usage.</p> <p>First define a class in <code>.py</code> inherited from <code>Label</code>,</p> <pre class="lang-py prettyprint...
Proper way of adding a canvas to a label
python|canvas|kivy|label|kivy-language
0
55
1
72,365,893
72,365,893
1
true
2022-05-24T12:39:59.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Proper way of adding a canvas to a label<p>I'm posting this because I want to add a canvas behind, inside, on top, I don't know, I want a background for the ...
72,366,692
React Native: Counter not showing correct updated state<p>Im trying to put together a simple counter which changes the quantity of an item. Using Hooks to manage its state, i update the value on screen correctly. However, the value the state holds when i console log is always one less than the value on the screen.</p> ...
<p>Setters from <code>useState</code> are async.</p> <p>You could log it this way</p> <pre><code>useEffect(()=&gt;{ console.log(quantity) }, [quantity] </code></pre> <p>This means: when dependency <code>[quantity]</code> change, execute the <code>function</code> passed as first param</p> <p>To avoid stale closure (h...
React Native: Counter not showing correct updated state
javascript|typescript|react-native
2
55
2
72,368,617
72,368,617
1
true
2022-05-24T16:54:29.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Native: Counter not showing correct updated state<p>Im trying to put together a simple counter which changes the quantity of an item. Using Hooks to ma...
72,370,714
Symfony 5 Syntax for FrameworkBundle:Redirect:redirect?<p>I upgraded my env from symfony 4.4 to 5.4, and after this I get now the following error:</p> <blockquote> <p>The controller for URI &quot;/&quot; is not callable: Controller &quot;FrameworkBundle:Redirect:redirect&quot; does neither exist as service nor as class...
<p>The preferred way in Symfony 5 is documented here:</p> <p><a href="https://symfony.com/doc/5.4/routing.html#redirecting-to-urls-and-routes-directly-from-a-route" rel="nofollow noreferrer">https://symfony.com/doc/5.4/routing.html#redirecting-to-urls-and-routes-directly-from-a-route</a></p> <p>In your case:</p> <pre c...
Symfony 5 Syntax for FrameworkBundle:Redirect:redirect?
symfony|symfony5
-1
55
1
72,372,267
72,372,267
1
true
2022-05-25T00:11:51.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Symfony 5 Syntax for FrameworkBundle:Redirect:redirect?<p>I upgraded my env from symfony 4.4 to 5.4, and after this I get now the following error:</p> <block...
72,373,335
Calling child function using parent<p>Hey guys got an architecture problem, I will explain the structure first</p> <p>Service:</p> <ul> <li>TestService</li> </ul> <p>Classes:</p> <ul> <li>InterfaceClass</li> <li>ParentClass</li> <li>FirstChildClass</li> <li>SecondChildClass</li> <li>ThirdChildClass</li> </ul> <p>The Pa...
<p>You will need a generalized reference variable(of the base superclass) in your <code>Service</code> class constructor to achieve this. It is called generalization and widening. In programming terms, we call it <a href="https://stackoverflow.com/questions/12159601/why-do-we-assign-a-parent-reference-to-the-child-obje...
Calling child function using parent
php|architecture|structure
0
55
1
72,374,337
72,374,337
1
true
2022-05-25T07:15:17.893Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calling child function using parent<p>Hey guys got an architecture problem, I will explain the structure first</p> <p>Service:</p> <ul> <li>TestService</li> ...
72,350,678
Getting error after copying 8086 code from book<p>I am having troubles running this 8086 programs that take one letter input from keyboard and outputs &quot;the letter you typed is _&quot;</p> <p>I just started reading my college book on this and trying to run some code from the book on my computer but got stuck here.<...
<p>umm so after giving up for 2 days I referenced another book, and in there they weren't using segments. So I removed segments and the program ran flawlessly here is the new code:</p> <pre><code>ORG 100H MOV AH, 08H ; Read Keyboard INT 21H MOV BL, AL ; Save input MOV AH, 09H ; Display first...
Getting error after copying 8086 code from book
x86-16|emu8086
0
55
1
72,379,149
72,379,149
1
true
2022-05-23T14:58:10.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting error after copying 8086 code from book<p>I am having troubles running this 8086 programs that take one letter input from keyboard and outputs &quot;...
72,379,650
How to count unique items in field in Access query and group them by [feildname]?<p>[Given Table]</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Code</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td>AXYZ</td> <td>Success</td> </tr> <tr> <td>AXYZ</td> <td>Success</td> </tr> <tr> <td>AXY...
<p>If you bust it into two groupings you can get the output you want</p> <pre><code>SELECT t1.Code, Count(t1.Code) AS NumStatus FROM (SELECT [Sheet1$].Code, [Sheet1$].Status FROM [Sheet1$] GROUP BY [Sheet1$].Code, [Sheet1$].Status) AS t1 GROUP BY t1.Code; </code></pre> <p><a href="https://i.stack.imgur.co...
How to count unique items in field in Access query and group them by [feildname]?
sql|ms-access|distinct-values
0
55
4
72,381,794
72,381,794
1
true
2022-05-25T14:37:00.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to count unique items in field in Access query and group them by [feildname]?<p>[Given Table]</p> <div class="s-table-container"> <table class="s-table">...
72,796,086
Send several JSON objects in one request<p>I have been trying to conduct a multi-search (where I am able to send several json objects at once) but have failed so far.</p> <p>This request is going to an Elasticsearch server but even if you don't know what that is you can still help.</p> <p>I want to have a request body ...
<p>When you have a vector of json requests, instead of encoding that into a json string, you can directly obtain what you want:</p> <pre class="lang-rust prettyprint-override"><code>let mut request_pieces = Vec::new(); for name in names { request_pieces.push(json!({&quot;index&quot;: &quot;superheroes&quot;}).to_str...
Send several JSON objects in one request
elasticsearch|rust
0
55
2
72,796,203
72,796,203
1
true
2022-06-29T05:16:05.963Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Send several JSON objects in one request<p>I have been trying to conduct a multi-search (where I am able to send several json objects at once) but have faile...
72,796,739
How do I display a html webpage by giving the link with rocket.rs<p>I am able to make a html webpage but with the html code in my .rs file. How do I separate it giving a link to the file to be displayed to rocket.rs?</p> <p>My code:</p> <pre><code>use rocket::*; use rocket::response::content::RawHtml; #[get(&quot;/&qu...
<p>If you want the HTML document compiled in to your program so that it has no dependencies on external files, you can use the standard <a href="https://doc.rust-lang.org/std/macro.include_str.html" rel="nofollow noreferrer"><code>include_str!</code></a> macro:</p> <pre><code>RawHtml(include_str!(&quot;index.html&quot;...
How do I display a html webpage by giving the link with rocket.rs
web|rust|rocket
0
55
1
72,797,559
72,797,559
1
true
2022-06-29T06:32:20.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I display a html webpage by giving the link with rocket.rs<p>I am able to make a html webpage but with the html code in my .rs file. How do I separate...
72,798,894
Generate same random number based on string parameter<p>I'm trying to create a function that will generate the same random number on each execution if the string is the same.</p> <pre><code>function generateRandom(maxInt, stringParam) { //generate random based on stringParam //output int number from 0 to maxInt } <...
<p>This isn't really random. I would say this is a kind of encryption. Hopefully, it works for your requirement.</p> <p>First, get the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt" rel="nofollow noreferrer">Unicode</a> from each character in the string. Sum...
Generate same random number based on string parameter
javascript|math|random|numbers|formula
1
55
2
72,799,117
72,799,117
1
true
2022-06-29T09:19:33.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Generate same random number based on string parameter<p>I'm trying to create a function that will generate the same random number on each execution if the st...
72,800,339
How to convert dot notation string array into an object JavaScript and render to table?<p>I have this data:</p> <pre><code>const data = [ { _id: '1', status: 'active', user: { email: 'one@mail.com', provider: 'google', profile: { image: 'https://example.com/image1.jpg', }, ...
<p>here is my way to achieve your desire output.<br /> use this function</p> <pre><code>function getDeepObjValue (item, s) { return s.split('.').reduce((p, c) =&gt; { p = p[c]; return p; }, item); }; </code></pre> <p>use it like this</p> <pre><code>data.map((item) =&gt; { return ( &lt;tr...
How to convert dot notation string array into an object JavaScript and render to table?
javascript|reactjs
0
55
2
72,800,896
72,800,896
1
true
2022-06-29T11:06:13.223Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert dot notation string array into an object JavaScript and render to table?<p>I have this data:</p> <pre><code>const data = [ { _id: '1', ...
72,805,301
authentication error trying to send Outlook email from Python<p>I'm testing out a simple script to send an Outlook email from Python 3 (using Spyder).</p> <pre><code>import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart username = 'my_username@my_company.com' password = 'my...
<p>The error indicates that SMTP authentication is disabled. Read more about that on the page at <a href="https://aka.ms/smtp_auth_disabled" rel="nofollow noreferrer">https://aka.ms/smtp_auth_disabled</a>. The link explains how to enable SMTP AUTH for the whole organization or only for some mailboxes.</p> <p>Also take ...
authentication error trying to send Outlook email from Python
python-3.x|email|authentication|outlook
0
55
1
72,805,446
72,805,446
1
true
2022-06-29T17:05:21.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: authentication error trying to send Outlook email from Python<p>I'm testing out a simple script to send an Outlook email from Python 3 (using Spyder).</p> <p...
72,805,795
Equivalent of C++ std::setprecision(n) using printf in C<p>I want to set custom precision using printf()</p> <p>like for example:</p> <pre><code>double pi = 3.14159265358979323846; cin&gt;&gt;n; cout&lt;&lt;setprecision(n)&lt;&lt;pi; </code></pre> <p>I want to implement this same functionality using printf()</p>
<p>From <a href="https://en.cppreference.com/w/c/io/fprintf" rel="nofollow noreferrer"><code>printf</code></a>:</p> <blockquote> <p>(optional) <code>.</code> followed by integer number or <code>*</code>, or neither that specifies precision of the conversion. In the case when <code>*</code> is used, the precision is spe...
Equivalent of C++ std::setprecision(n) using printf in C
c|printf
-3
55
1
72,805,888
72,805,888
1
true
2022-06-29T17:47:54.060Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Equivalent of C++ std::setprecision(n) using printf in C<p>I want to set custom precision using printf()</p> <p>like for example:</p> <pre><code>double pi = ...
72,805,897
How to display api call response in Reactjs<p>I am new in Reactjs and i am working with nextjs, i tried to integrate &quot;newsletter&quot;, I created a component for this which is working fine but i am unable to display &quot;success&quot; or &quot;error&quot; message in screen/WebsitePage,i am getting &quot;success&q...
<p>Actually, you have not taken the value from JSON properly. I have posted a demo code that is working exactly as you wanted.</p> <p>Also, you have not used <code>===</code> operator for comparing string <code>true</code>. The status value of JSON is not in boolean it's a string.</p> <pre><code>import &quot;./styles.c...
How to display api call response in Reactjs
javascript|reactjs|next.js
0
55
2
72,806,486
72,806,486
1
true
2022-06-29T17:55:44.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display api call response in Reactjs<p>I am new in Reactjs and i am working with nextjs, i tried to integrate &quot;newsletter&quot;, I created a comp...
72,811,163
How to add elements to different <li><p>I have this code where there is a question and many options. I have an unordered list <code>ul</code> and I am trying to all in that list many <code>li</code> where each one will contain a option name and a checkbox.</p> <p>My code for the moment add the <code>li</code> but it ad...
<p>You should call <code>appendChild</code> on <code>option</code> instead of <code>q</code></p> <pre><code>var option = document.createElement('li'); var checkbox = document.createElement('input'); var label = document.createElement('label') var checkBoxId = &quot;checkbox&quot; + &quot;&quot; ...
How to add elements to different <li>
javascript|html
1
55
2
72,811,216
72,811,216
1
true
2022-06-30T06:26:45.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add elements to different <li><p>I have this code where there is a question and many options. I have an unordered list <code>ul</code> and I am trying...
72,810,777
getting error Failed to execute 'fetch' on 'Window': Invalid name<p>I am trying to publish API in wso2 API Manager. But I am using basic security with my authorization key. I am getting a type error: Failed to execute 'fetch' on 'Window': Invalid name. I tried to change the swagger file. But didn't get the required res...
<p>If you are trying to send a header to your backend through APIM, you have define it as a header under resources in the Publisher portal.</p> <p>However, if the name of your header is Authorization you will have to use some sort of a mediation to send this to your backend. For example,</p> <pre><code>&lt;sequence xml...
getting error Failed to execute 'fetch' on 'Window': Invalid name
windows|api|wso2|typeerror|wso2-api-manager
0
55
1
72,811,830
72,811,830
1
true
2022-06-30T05:40:28.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: getting error Failed to execute 'fetch' on 'Window': Invalid name<p>I am trying to publish API in wso2 API Manager. But I am using basic security with my aut...
72,811,997
Continous data generator from Azure Databricks to Azure Event Hubs using Spark with Kafka API but no data is streamed<p>I'm trying to implement a continuous data generator from Databricks to an Event Hub.</p> <p>My idea was to generate some data in a <code>.csv</code> file and then create a data frame with the data. In...
<p>The problem is that you're using <code>readStream</code> to get the CSV data, so it will wait until new data will be pushed to the directory with CSV files. But really, you don't need to use <code>readStream</code>/<code>writeStream</code> - Kafka connector works just fine in batch mode, so your code should be:</p>...
Continous data generator from Azure Databricks to Azure Event Hubs using Spark with Kafka API but no data is streamed
apache-spark|pyspark|azure-databricks|azure-eventhub|data-stream
1
55
1
72,812,663
72,812,663
1
true
2022-06-30T07:41:49.613Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Continous data generator from Azure Databricks to Azure Event Hubs using Spark with Kafka API but no data is streamed<p>I'm trying to implement a continuous ...
72,794,683
Strange behavior of DiffEqUncertainty.jl and Quadrature.jl<p>In Julia, I added two packages DiffEqUncertainty.jl and Quadrature.jl. However, I could not have both newest versions of them.</p> <p>When I first added them by <code>] add DiffEqUncertainty, Quadrature</code>, by default, the version I got for DiffEqUncertai...
<p>DiffEqUncertainty just needs an update to its own versioning. A major update to the package is coming with <a href="https://github.com/SciML/DiffEqUncertainty.jl/pull/55" rel="nofollow noreferrer">https://github.com/SciML/DiffEqUncertainty.jl/pull/55</a> so it just hasn't been updated in awhile.</p>
Strange behavior of DiffEqUncertainty.jl and Quadrature.jl
julia
1
55
1
72,813,890
72,813,890
1
true
2022-06-29T01:02:57.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Strange behavior of DiffEqUncertainty.jl and Quadrature.jl<p>In Julia, I added two packages DiffEqUncertainty.jl and Quadrature.jl. However, I could not have...
72,814,675
split a string and concatenate values from a list<p>lstA looks like this:</p> <pre><code>[&quot;y1&quot;,&quot;y2&quot;,&quot;y3&quot;] </code></pre> <p>and lstB looks like this:</p> <pre><code>[&quot;xx5, folder, 20-1-1&quot;, &quot;xx6, appPath, 20-1-1&quot;, &quot;xx7, Resolve, 23-1-4&quot;] </code></pre> <p>All ite...
<p>very simplified method if you're new to programming.</p> <ul> <li>code:</li> </ul> <pre><code>a = [&quot;y1&quot;,&quot;y2&quot;,&quot;y3&quot;] b = [&quot;xx5, folder, 20-1-1&quot;, &quot;xx6, appPath, 20-1-1&quot;, &quot;xx7, Resolve, 23-1-4&quot;] List = [] for i in range(len(a)): temp = b[i].split(',') t...
split a string and concatenate values from a list
python|python-3.x|list|numpy|str-replace
0
55
4
72,814,889
72,814,889
1
true
2022-06-30T11:04:18.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: split a string and concatenate values from a list<p>lstA looks like this:</p> <pre><code>[&quot;y1&quot;,&quot;y2&quot;,&quot;y3&quot;] </code></pre> <p>and ...
72,816,329
Asking for admin permissions in Windows using bash script<p>I'm trying to alter my <code>hosts file</code> in Windows using a <strong>bash script</strong>.</p> <p>It looks like this:</p> <pre class="lang-bash prettyprint-override"><code>echo &quot;&lt;ip_address&gt; &lt;replacement&gt;&quot; &gt;&gt; C:\\Windows\\Syst...
<p>It is unfortunately very complicated to achieve this without external tools.</p> <p>I recommend this very useful tool: <a href="https://github.com/gerardog/gsudo" rel="nofollow noreferrer">https://github.com/gerardog/gsudo</a> - it works like <code>sudo</code> but for Windows.</p> <p>Note however that <code>gsudo ec...
Asking for admin permissions in Windows using bash script
windows|bash|permissions|admin|hosts
0
55
1
72,816,879
72,816,879
1
true
2022-06-30T13:04:05.500Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Asking for admin permissions in Windows using bash script<p>I'm trying to alter my <code>hosts file</code> in Windows using a <strong>bash script</strong>.</...
72,817,153
Xamarin forms get font size setting<p>Can I get this font size setting in my main Xamarin project. I like to set this RowHeight value for just the Android's.</p> <p>xaml</p> <pre><code>&lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height=&quot;{Binding RowHeight}&quot;&gt;&lt;/RowDefinition&gt; &lt;/Grid.RowDefinit...
<p>So you can, you need to account for the platform variations by using the</p> <pre><code>Device.GetNamedSize </code></pre> <p>method, which takes a NamedSize enum to designate the font size, and then the type which could be label, or other view that could be handled. So if you want to base this off of a label with m...
Xamarin forms get font size setting
xamarin|xamarin.forms
0
55
1
72,818,421
72,818,421
1
true
2022-06-30T13:59:54.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xamarin forms get font size setting<p>Can I get this font size setting in my main Xamarin project. I like to set this RowHeight value for just the Android's....
72,820,723
Simplifying SQL query<p>I'm using the Bixi public dataset found at <a href="https://www.bixi.com/en/open-data" rel="nofollow noreferrer">https://www.bixi.com/en/open-data</a> and have been asked to find &quot;the average number of trips a day for each year-month combination in the dataset&quot;. Here's an example of th...
<p>Use conditional aggregation:</p> <pre><code>SELECT ROUND(SUM(YEAR(start_date) = 2016) / COUNT(DISTINCT CASE WHEN YEAR(start_date) = 2016 THEN DAY(start_date) END), 0) AS avg_daily_trips_2016, ROUND(SUM(YEAR(start_date) = 2017) / COUNT(DISTINCT CASE WHEN YEAR(start_date) = 2017 THEN DAY(start_date) END), 0) ...
Simplifying SQL query
mysql|sql|database|group-by|count
1
55
2
72,821,761
72,821,761
1
true
2022-06-30T18:51:19.500Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Simplifying SQL query<p>I'm using the Bixi public dataset found at <a href="https://www.bixi.com/en/open-data" rel="nofollow noreferrer">https://www.bixi.com...
72,821,775
SwiftUI: does modifier create a new view or return a modified view?<p>I'm reading SwiftUI materials and it's said that view modifiers for example:</p> <pre class="lang-swift prettyprint-override"><code>struct ByeView: View { var body: some View { Text(&quot;Bye bye, world!&quot;) .font(.headline...
<p>First, note that an implementation such as</p> <pre><code>func font(_ font: UIFont) -&gt; Text { self.font = font return self } </code></pre> <p>does not compile. <code>font</code> would need to be <code>mutating</code> for this to work, but it isn't <code>mutating</code>. That said, this would have compiled...
SwiftUI: does modifier create a new view or return a modified view?
ios|swift|swiftui
1
55
2
72,822,310
72,822,310
1
true
2022-06-30T20:41:15.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SwiftUI: does modifier create a new view or return a modified view?<p>I'm reading SwiftUI materials and it's said that view modifiers for example:</p> <pre c...
72,824,547
strategy.position_size alerting the wrong value when used with {{strategy.order.alert_message}}<p>Is there any way to access {{strategy.market_position_size}} from inside pine script to generate a strategy alert in order to creat a POST message? I tried using the pine script variable strategy.position_size inside the s...
<p>You can use the <code>{{strategy.position_size}}</code> placeholder in your alert message.</p> <pre><code>//Order execution and alert strategy.entry(id=alertID, direction=strategy.long, when = EntryCondition, alert_message='{'+POSTmessage+', &quot;order_contratcs&quot;: '+ '{{strategy.position_size}}'+'}') strategy....
strategy.position_size alerting the wrong value when used with {{strategy.order.alert_message}}
pine-script|pinescript-v5
0
55
1
72,825,369
72,825,369
1
true
2022-07-01T05:00:53.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: strategy.position_size alerting the wrong value when used with {{strategy.order.alert_message}}<p>Is there any way to access {{strategy.market_position_size}...
72,823,924
How to delete file in my database Laravel<p>How do I delete files in the database, because when I click delete the data in the folder is deleted, but the data in the <code>file_rekap</code> tables don't want to be deleted, but the ones in the <code>rekap</code> table are deleted</p> <p><code>RekapController</code>:</p>...
<p>If you want to work with other developers in the future, make sure to work to common coding standards, such as using upper camel case for classes. Also consider the correct indentation.</p> <p>Anyway, you don't actually delete the database record when deleting files</p> <pre><code> $files = file_rekap::where(&qu...
How to delete file in my database Laravel
php|mysql|laravel
0
55
2
72,827,314
72,827,314
1
true
2022-07-01T02:54:18.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to delete file in my database Laravel<p>How do I delete files in the database, because when I click delete the data in the folder is deleted, but the dat...
72,830,071
Can't get GetX work with Widget that do not have direct access to controller<p>GetX works fine and update data if element have controller. But how to get it work if we have not direct to controller and widget done in way of changing date with <code>onChange</code>.</p> <p>I created small copy-paste example:</p> <pre><c...
<p>I experienced similar problems and solved them desribed as below.</p> <p>It seems WebDatePicker does not process the value change. Try putting it in its own <code>StatelessWidget</code>:</p> <pre class="lang-dart prettyprint-override"><code>class MyWebDatePicker extends StatelessClass { final DateTime dt; var ct...
Can't get GetX work with Widget that do not have direct access to controller
flutter|dart|flutter-getx
0
55
1
72,830,495
72,830,495
1
true
2022-07-01T13:31:43.313Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't get GetX work with Widget that do not have direct access to controller<p>GetX works fine and update data if element have controller. But how to get it ...
72,831,102
I want to get a href link from a tag using beautiful soup from HTML website<p>I am scraping this product page: <a href="https://www.hugoboss.com/us/interlock-cotton-t-shirt-with-exclusive-artwork/hbna50487153_739.html" rel="nofollow noreferrer">https://www.hugoboss.com/us/interlock-cotton-t-shirt-with-exclusive-artwork...
<p>The following CSS expression with bs4 will grab the desired links</p> <pre><code>[class=&quot;stage__left-wrapper&quot;] div nav a') </code></pre> <p>Full working code:</p> <pre><code>import time from selenium import webdriver from bs4 import BeautifulSoup from selenium.webdriver.chrome.service import Service from w...
I want to get a href link from a tag using beautiful soup from HTML website
python|html|selenium|web-scraping|beautifulsoup
0
55
2
72,831,482
72,831,482
1
true
2022-07-01T14:55:05.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I want to get a href link from a tag using beautiful soup from HTML website<p>I am scraping this product page: <a href="https://www.hugoboss.com/us/interlock...
72,832,711
Insert values to a pandas column containing list alternatively from other column containing list<p>Posting minimal reproducible example</p> <p>Lets say I have a dataframe</p> <pre><code> combined values 0 [0, 0, 0, 0, 0, 0, 0, 0] [1, 2, 3, 4] 1 [0, 0, 0, 0, 0, 0, 0, 0] [5, 6, 7, 8]...
<p>Try:</p> <pre class="lang-py prettyprint-override"><code>for a, b in zip(df[&quot;combined&quot;], df[&quot;values&quot;]): a[::2] = b print(df) </code></pre> <p>Prints:</p> <pre class="lang-none prettyprint-override"><code> combined values 0 [1, 0, 2, 0, 3, 0, 4, 0] [1, 2, 3, 4] 1 [...
Insert values to a pandas column containing list alternatively from other column containing list
python|pandas|list|slice
1
55
2
72,834,331
72,834,331
1
true
2022-07-01T17:19:12.407Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Insert values to a pandas column containing list alternatively from other column containing list<p>Posting minimal reproducible example</p> <p>Lets say I hav...
72,838,044
How to skip top key of json?<p>There is JSON with root key <code>playlist</code> that fetch from Retrofit Interface. <code>Gson</code> library can't parse it to data class. Is there way to do &quot;step into&quot; playlist key before create model?</p> <pre class="lang-json prettyprint-override"><code>{ playlist: { ...
<p>You can use that website <a href="https://jsonformatter.org/json-to-kotlin" rel="nofollow noreferrer">json to Kotlin</a>, it's very useful specially with long json data. For your case you have two objects, the main object and playlist object, so you need two data classes:</p> <pre><code>data class PlaylistResponse (...
How to skip top key of json?
json|kotlin|gson
1
55
2
72,838,104
72,838,104
1
true
2022-07-02T09:40:14.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to skip top key of json?<p>There is JSON with root key <code>playlist</code> that fetch from Retrofit Interface. <code>Gson</code> library can't parse it...
72,838,243
What's the difference between using observedAttributes() vs MutationObserver<p>With a custom component, you can use the <code>static get observedAttributes()</code> in your web component to specify what attribute changes trigger the <code>attributeChangedCallback()</code> lifecycle method.</p> <p>However, it seems you ...
<p>Yes, minor functional differences.</p> <p>But MutationObserver takes a lot more boilerplate, and you can't ask the MO which attributes are observed.</p> <p>It is kinda like saying Why do we need Map, when everything can be done by extending Array</p> <p>I don't have data, but would say <code>observedAttributes</code...
What's the difference between using observedAttributes() vs MutationObserver
javascript|html|web-component
1
55
1
72,839,205
72,839,205
1
true
2022-07-02T10:12:02.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What's the difference between using observedAttributes() vs MutationObserver<p>With a custom component, you can use the <code>static get observedAttributes()...
72,838,855
Does GitHub use bare repositories under the hood?<p>Recently, I discovered that git could be initialized with a <code>--bare</code> flag (e.g. <a href="https://git-scm.com/docs/git-init#Documentation/git-init.txt---bare" rel="nofollow noreferrer"><code>git init --bare</code></a>). It creates a local repository without ...
<p>Answering my own question</p> <blockquote> <p>Do GitHub and similar services use &quot;bare repositories&quot; under the hood?</p> </blockquote> <p>Yes</p> <p>It looks like bare git repositories were designed to be used as remote instances and GitHub has to use them to get it to work.</p> <p>P.S.</p> <hr /> <p><a hr...
Does GitHub use bare repositories under the hood?
github
1
55
2
72,840,021
72,840,021
1
true
2022-07-02T11:58:21.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does GitHub use bare repositories under the hood?<p>Recently, I discovered that git could be initialized with a <code>--bare</code> flag (e.g. <a href="https...
72,839,917
Wordpress - Work separate files (php, css and js), or merge them all into one file?<p>I am working on my wordpress website and I want to keep a very low number of plugins. So I only write codes that I need. I was wondering what is the best practice of working with php, css and javascript files? I'll explain...</p> <p>A...
<p>Option 1 would be the accepted method if you are coding everything yourself. You will have a performance hit because of it slowing down the page render though. If you are planning to only load scripts and styles on the pages needed would offset performance hit.</p> <p>Personally I load enqueue scripts on pages I nee...
Wordpress - Work separate files (php, css and js), or merge them all into one file?
javascript|php|html|css|wordpress
0
55
1
72,841,322
72,841,322
1
true
2022-07-02T14:39:33.223Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Wordpress - Work separate files (php, css and js), or merge them all into one file?<p>I am working on my wordpress website and I want to keep a very low numb...
72,841,167
SwiftUI: Conditional Context Menu Shown Unexpectedly<p>In the following SwiftUI view, why does the conditional <code>.contextMenu</code> not work correctly?</p> <p>Steps:</p> <ol> <li>Long press the list item</li> <li>Tap Edit</li> <li>Long press the list item again</li> </ol> <p>On the second long press the context me...
<p>Works fine with Xcode 14 / iOS 16</p> <p>Here is possible workaround for older versions (it is possible to try different places for <code>.id</code> modifier to have appropriate, acceptable, UI feedback)</p> <p>Tested with Xcode 13.4 / iOS 15.5</p> <pre><code>Text(&quot;Long press me. Editing: \((editMode?.wrappedVa...
SwiftUI: Conditional Context Menu Shown Unexpectedly
swiftui|editmode
1
55
1
72,841,802
72,841,802
1
true
2022-07-02T17:34:22.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SwiftUI: Conditional Context Menu Shown Unexpectedly<p>In the following SwiftUI view, why does the conditional <code>.contextMenu</code> not work correctly?<...
72,842,636
setValues after the last non-empty row of a specific column in all possible scenarios<p>Let's say the column of interest is Column <code>A</code> and I always want to add values in the first row after the last row with values or in the first row if there are no values in the column of interest..</p> <p>Spreadsheets can...
<p>Try getColumnHeight() plus one</p> <pre><code>function getColumnHeight(col, sh, ss) { var ss = ss || SpreadsheetApp.getActive(); var sh = sh || ss.getActiveSheet(); var col = col || sh.getActiveCell().getColumn(); var rcA = []; if (sh.getLastRow()){ rcA = sh.getRange(1, col, sh.getLastRow(), 1).getValues()...
setValues after the last non-empty row of a specific column in all possible scenarios
google-apps-script
0
55
1
72,842,856
72,842,856
1
true
2022-07-02T21:47:13.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: setValues after the last non-empty row of a specific column in all possible scenarios<p>Let's say the column of interest is Column <code>A</code> and I alway...
72,837,457
paypal subscription button and storing to db flow<p>I'm attempting a Paypal subscription flow in Node, bug all of the various SDKs seem to be deprecated now, and I'm struggling to find a current example of implementing a subscription button and then validating the subscription and updating the user's status in local db...
<p>The onApprove callback already receives data indicating the subscription has been approved. This is sufficient for client-side presentment of the result (not to be used for database operations, as it is client-side).</p> <p>For storing the result in a database, listen for the webhook PAYMENT.SALE.COMPLETED. This web...
paypal subscription button and storing to db flow
node.js|paypal|paypal-subscriptions|paypal-webhooks
0
55
1
72,843,134
72,843,134
1
true
2022-07-02T07:57:36.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: paypal subscription button and storing to db flow<p>I'm attempting a Paypal subscription flow in Node, bug all of the various SDKs seem to be deprecated now,...
72,772,472
dataframe mergen and make 3d dataframe<p>I have four dfs</p> <pre><code>dfB = pd.DataFrame([[cheapest_brandB[0],wertBereichB]], columns=['brand', 'price'], index= ['cheap']) dfC = pd.DataFrame([[cheapest_brandC[0],wertBereichC]], columns=['brand', 'price'], index= ['cheap']) dfG = pd.DataFrame([[cheapest...
<p>With the dataframes you provided:</p> <pre class="lang-py prettyprint-override"><code>import pandas as pd dfs = [ pd.DataFrame( {&quot;brand&quot;: [&quot;ASUS&quot;], &quot;price&quot;: [{&quot;gte&quot;: 821.84, &quot;lte&quot;: 1200.91}]}, index=[&quot;cheap&quot;] ), pd.DataFrame( {&...
dataframe mergen and make 3d dataframe
python|pandas|dataframe|3d|data-science
1
55
1
72,848,546
72,848,546
1
true
2022-06-27T12:55:42.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: dataframe mergen and make 3d dataframe<p>I have four dfs</p> <pre><code>dfB = pd.DataFrame([[cheapest_brandB[0],wertBereichB]], columns=['brand', 'price'], i...
72,850,876
Emplace with primitive types<p>Since in C++, primitive types destructors do nothing <a href="https://stackoverflow.com/a/60007687/18272383">[Do Primitive Types in C++ have destructors?]</a>, is it safe to rely on the value of <code>int a</code> to be the same <strong>after a call to <code>queue::emplace</code></strong>...
<p>The parameters in the shown code are all lvalues.</p> <p>For the emplaced primitive type, as is the case here: an lvalue that gets passed to <code>emplace()</code> does not get modified. If the container contains a class with a constructor, that emplace ends up invoking, for a &quot;well-behaved&quot; constructor th...
Emplace with primitive types
c++|stl|destructor|primitive-types
2
55
1
72,850,951
72,850,951
1
true
2022-07-04T00:59:29.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Emplace with primitive types<p>Since in C++, primitive types destructors do nothing <a href="https://stackoverflow.com/a/60007687/18272383">[Do Primitive Typ...
72,834,436
TypeError: tuple indices must be integers or slices, not str, facing this error in keras model<p>I am running a keras model, <a href="https://keras.io/examples/nlp/nl_image_search/" rel="nofollow noreferrer">LINK IS HERE</a>. I have just changed the dataset for this model and when I run my model it throwing this error ...
<p>The dataset (<code>train_dataloader</code>) seems to return a tuple of items: <a href="https://github.com/coursat-ai/MultiCheXNet/blob/master/data_loader/indiana_dataloader.py#L161" rel="nofollow noreferrer">link</a>. In particular, model input is a tuple (<code>images</code>, <code>x_batch_input</code>).</p> <p>How...
TypeError: tuple indices must be integers or slices, not str, facing this error in keras model
tensorflow|keras|deep-learning|nlp|computer-vision
0
55
1
72,851,055
72,851,055
1
true
2022-07-01T20:40:32.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TypeError: tuple indices must be integers or slices, not str, facing this error in keras model<p>I am running a keras model, <a href="https://keras.io/exampl...
72,851,112
BUILD FAILED in 9s Exception: Gradle task assembleDebug failed with exit code 1<p>I work on VScode Flutter project with bloc i was working normally and restart the application and then an error shows up to me in the DEBUGCONSOLE saying 'Error: Not found: 'dart:js''</p> <p><a href="https://i.stack.imgur.com/PiIhl.png" r...
<p>flutter clean</p> <p>Delete pubspec.lock</p> <p>flutter pub get</p> <p>flutter run</p> <p>Please try these. Also please dont add screenshots of error or codes. Copy paste it here.</p>
BUILD FAILED in 9s Exception: Gradle task assembleDebug failed with exit code 1
flutter|dart|visual-studio-code
0
55
2
72,851,174
72,851,174
1
true
2022-07-04T02:02:05.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: BUILD FAILED in 9s Exception: Gradle task assembleDebug failed with exit code 1<p>I work on VScode Flutter project with bloc i was working normally and resta...
72,854,488
How do I display three divs randomly one at a time?<p>I am trying to create a quiz app with three different ways to answer the questions, the questions can be answered by using either a radio, text-input or drop-down. I created three <code>&lt;div&gt;</code> each having the different answering methods, how can I displa...
<p>you may try this solution.</p> <ol> <li>Hide all options initially</li> <li>On clicking the Next button, randomly select an unselected option</li> <li>If a previous option exists, hide that option</li> <li>Make visible the new random option</li> </ol> <p><strong>HTML code:</strong></p> <p><div class="snippet" data-l...
How do I display three divs randomly one at a time?
javascript|html|css|arrays|dom
0
55
2
72,855,245
72,855,245
1
true
2022-07-04T09:25:31.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I display three divs randomly one at a time?<p>I am trying to create a quiz app with three different ways to answer the questions, the questions can b...
72,855,275
How can I check if the current date today is even or odd?<p>I really dont know how and I couldnt find a question about it so here I am. I'm very much a beginner so excuse me if this is an obvious question</p>
<p>You could use</p> <pre><code>var oddDate = (DateTime.Now.Day % 2) == 1; </code></pre>
How can I check if the current date today is even or odd?
c#|date
-1
55
1
72,855,337
72,855,337
1
true
2022-07-04T10:26:35.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I check if the current date today is even or odd?<p>I really dont know how and I couldnt find a question about it so here I am. I'm very much a begin...
72,859,826
How to move AntD Menu Submenu Arrow to the front to the menu name<p>How can I move the submenu expand arrow showing in the below image to the front?</p> <p><a href="https://i.stack.imgur.com/L3QJT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L3QJT.png" alt="enter image description here" /></a></p>
<p>To override <code>antd</code> styles, 1st we need to inspect the elements and identify which styles/classNames applied. Then override these styles as we want.</p> <p>In this scenario, Wrap your <code>&lt;Menu/&gt;</code> component from a <code>div</code> as below and apply below styles to <code>div</code>.</p> <pre>...
How to move AntD Menu Submenu Arrow to the front to the menu name
reactjs|antd
0
55
1
72,860,993
72,860,993
1
true
2022-07-04T16:40:12.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to move AntD Menu Submenu Arrow to the front to the menu name<p>How can I move the submenu expand arrow showing in the below image to the front?</p> <p><...
72,861,030
C Empty Struct Pointer on Stack<p>I would like to initialize a struct with all fields as zero and immediately assign it to a pointer. The struct will only need to be used within static functions whose lifetime is completely contained within the calling function.</p> <p>This is the line I currently have</p> <pre><code>m...
<p>Your compound ;literal defines a null pointer instead of an object of the structure type</p> <pre><code>move_stats *mv_s = (move_stats *){0}; </code></pre> <p>Instead write</p> <pre><code>move_stats *mv_s = &amp;(move_stats){0}; </code></pre>
C Empty Struct Pointer on Stack
c|pointers|struct|declaration|compound-literals
1
55
1
72,861,181
72,861,181
1
true
2022-07-04T19:02:09.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C Empty Struct Pointer on Stack<p>I would like to initialize a struct with all fields as zero and immediately assign it to a pointer. The struct will only ne...
72,865,799
Convert SVG image to PNG image by python<p>I have use svglib with this code :</p> <pre><code>from svglib.svglib import svg2rlg from reportlab.graphics import renderPM drawing = svg2rlg('''E:/img/1926_S1_style_1_0_0.svg''') renderPM.drawToFile(drawing, 'image.jpg', fmt='jpg') </code></pre> <p>But what i receive <a href...
<p>try using <a href="http://cairosvg.org/" rel="nofollow noreferrer">cairosvg</a></p> <pre class="lang-py prettyprint-override"><code>from cairosvg import svg2png svg_code = &quot;&quot;&quot; &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&q...
Convert SVG image to PNG image by python
python|svg
0
55
1
72,865,894
72,865,894
1
true
2022-07-05T07:49:39.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert SVG image to PNG image by python<p>I have use svglib with this code :</p> <pre><code>from svglib.svglib import svg2rlg from reportlab.graphics import...
72,867,013
Read non-specified format file data<p>I have a problem reading file data packed as binary resource. I have something like this</p> <pre><code>7ë?Vý˝‹ĺ”&gt;˙†J˙l$í?źÔ=ć$ľ&gt;˙†J˙(çî?Yý˝ć$ľ&gt;˙†J˙'Šč?[ý˝&quot;6?˙†J˙KÓć?[YČ=&quot;6?˙†J˙…?Ů?[ý˝fË$?˙†J˙4Ą×?ĄŰŞ=fË$?˙†J˙ĚúĹ?[ý˝n8?˙†J˙r„Ä?s˛…=n8?˙†J˙Ôž°?[ý˝.2??˙†J˙?š?$&gt;Í&l...
<p>If your data is the binary representation of IEEE 754 floating point numbers, which it looks like it is, you can <code>memcpy</code> that data into a float variable.</p> <p>You may need to do endianness conversion, depending on the platform you're compiling for.</p> <p><a href="https://godbolt.org/#z:OYLghAFBqd5QCxA...
Read non-specified format file data
c++
-1
55
1
72,867,691
72,867,691
1
true
2022-07-05T09:26:35.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Read non-specified format file data<p>I have a problem reading file data packed as binary resource. I have something like this</p> <pre><code>7ë?Vý˝‹ĺ”&gt;˙†...
72,874,926
How to scroll to the beginning of a text in TextInput Expo (React Native)<p>I'm trying to make something similar to a creator's comment under a post on Instagram. If the text is longer, only the first line will be visible. You can read the rest by clicking the three dots or read more. In this case, I am using <code>Tex...
<p>Try add this: <code>selection={{ start: 0 }}</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-html lang-html prettyprint-override"><code>&lt;TextInput value={text} multiline={extend} ...
How to scroll to the beginning of a text in TextInput Expo (React Native)
android|reactjs|react-native|expo|textinput
1
55
1
72,875,054
72,875,054
1
true
2022-07-05T20:00:22.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to scroll to the beginning of a text in TextInput Expo (React Native)<p>I'm trying to make something similar to a creator's comment under a post on Insta...
72,873,132
Issue creation in jira using Xray python module<p>How to read a HTML file and create test steps in TEST issue on Jira using Xray python ? Also, do I need to convert HTML file to JSON file for creating TEST using Xray python module ??</p>
<p>HTML is not a data format suitable for structuring information in a machine readable way; it's meant to present information in a readable way for humans. Whenever a tool generates an HTML report with some information, such as test cases, it doesn't follow a well-know, machine friendly syntax/schema.</p> <p>My recomm...
Issue creation in jira using Xray python module
python-3.x|automation|ui-automation|jira-xray
0
55
1
72,875,283
72,875,283
1
true
2022-07-05T17:02:55.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Issue creation in jira using Xray python module<p>How to read a HTML file and create test steps in TEST issue on Jira using Xray python ? Also, do I need to ...
72,876,317
How do you add one object to a Django Model that has a ManyToManyField?<p>I am trying to create a social media type site that will allow a user to follow and unfollow another user. <code>followers</code> has a ManyToManyField because a <code>user</code> can have many followers.</p> <p>models.py</p> <pre><code>class Fol...
<p>The <code>*</code> in the arguments converts a list to individual args. For example-</p> <pre class="lang-py prettyprint-override"><code>lst = [1,2,3,4,5] function(*lst) </code></pre> <p>can be just read as</p> <pre class="lang-py prettyprint-override"><code>function(1,2,3,4,5) </code></pre> <p>You have used <code>...
How do you add one object to a Django Model that has a ManyToManyField?
python|django|django-models
0
55
1
72,876,330
72,876,330
1
true
2022-07-05T22:51:35.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you add one object to a Django Model that has a ManyToManyField?<p>I am trying to create a social media type site that will allow a user to follow and...
72,877,401
MUI Alert Uncaught TypeError: Cannot read properties of undefined (reading 'light')<p>I have created a login form by using MUI. I am now trying to notify the user in case the login is unsuccessful by using a MUI Alert component.</p> <pre><code>import Alert from '@mui/material/Alert'; </code></pre> <p>The Code is the fo...
<p>First of all, I don't recommend you use <code>CssVarsProvider</code> at this point unless you are experimenting with stuff and know what you are doing. <code>CssVarsProvider</code> is still experimental and unstable. Take a look at <code>ThemeProvider</code> instead.</p> <p>As for your original question, you are sup...
MUI Alert Uncaught TypeError: Cannot read properties of undefined (reading 'light')
javascript|reactjs|firebase|authentication|material-ui
0
55
1
72,878,603
72,878,603
1
true
2022-07-06T02:40:10.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MUI Alert Uncaught TypeError: Cannot read properties of undefined (reading 'light')<p>I have created a login form by using MUI. I am now trying to notify the...
72,870,634
ScyllaDB: Can I have multi DC cluster with different Scylla versions?<p>Currently I have a single DC cluster with 3 nodes running 4.1.7 version of Scylla. This setup has been running for a long time and I don't want to make changes to this DC, if possible. Now I have a requirement to add another DC cluster with 3 nodes...
<p>Scylla supports <strong>rolling upgrades</strong>, which means you can indeed upgrade just some of the nodes in the cluster while the rest are still running the older version. The cluster should be able to fully work in this state - including the communication between old and new nodes. Not all upgrade paths are equ...
ScyllaDB: Can I have multi DC cluster with different Scylla versions?
scylla
0
55
2
72,879,283
72,879,283
1
true
2022-07-05T13:53:50.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ScyllaDB: Can I have multi DC cluster with different Scylla versions?<p>Currently I have a single DC cluster with 3 nodes running 4.1.7 version of Scylla. Th...
72,880,811
Update values over time in R<p>So i have a complexe problem where I have to simulate the change of statu over time (25 years) my dataframe presented like this:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: center;">age</th> <th style="text-align: center;">sex</th> <th s...
<p>You can try this:</p> <pre><code># Number of years y &lt;- 25 # Create a list evol &lt;- list() # Make &quot;y&quot; copies of your df for (i in 1:y){evol[[i]] &lt;- df} # At each step (strting in the second element) evaluate the changes for (i in 2:y){ # Logical vector (including the positions of ro...
Update values over time in R
r|database|dataframe|variables|var
0
55
2
72,881,380
72,881,380
1
true
2022-07-06T09:14:08.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Update values over time in R<p>So i have a complexe problem where I have to simulate the change of statu over time (25 years) my dataframe presented like thi...
72,879,657
Django - model.objects.all.exists() vs model.objects.exists()<p>Which one would be the standardised way to check if any record exists in a table? We can use either <code>model.objects.all().exists()</code> or <code>model.objects.exists()</code>. But which one should be the standard practice?</p>
<p>i would prefer <code>model.objects.exists()</code> because it's less code to write. As mentioned in comment - both produce the same query</p>
Django - model.objects.all.exists() vs model.objects.exists()
python-3.x|django|django-views
0
55
1
72,881,457
72,881,457
1
true
2022-07-06T07:44:59.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django - model.objects.all.exists() vs model.objects.exists()<p>Which one would be the standardised way to check if any record exists in a table? We can use ...
72,881,410
'if else statement' doesn't work properly when importing data as props in React<p><code>if else</code> statement inside <code>useEffect</code> doesn't work as expected. <code>else</code> is executed before the code inside the <code>if</code> is executed completely. I've commented out what I'm expecting in the code. <co...
<p>You need to move effect in dedicated <code>async</code> function, in order to <code>await</code> part of the execution. In your current solution your effect is synchronous and IIFE you declared will be executed synchronously thus can cause unexpected behaviour of effect.</p> <p>Rewrite to this(in order to await code...
'if else statement' doesn't work properly when importing data as props in React
javascript|reactjs
1
55
2
72,881,788
72,881,788
1
true
2022-07-06T09:54:31.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 'if else statement' doesn't work properly when importing data as props in React<p><code>if else</code> statement inside <code>useEffect</code> doesn't work a...
72,880,182
'libxslt not found' when build nginx with 'nginx-dav-ext-module' on windows<p>I want to build nginx for windows with webdav module, so I followed the doc <a href="http://nginx.org/en/docs/howto_build_on_win32.html" rel="nofollow noreferrer">http://nginx.org/en/docs/howto_build_on_win32.html</a></p> <p><strong>Enviromen...
<p>The funny thing, I tried to do almost the same not less than a day ago. My conditions were somewhat different, I was (re)building an OpenResty bundle due to the need of the <a href="http://nginx.org/en/docs/http/ngx_http_xslt_module.html" rel="nofollow noreferrer"><code>ngx_http_xslt_module</code></a>. I also used m...
'libxslt not found' when build nginx with 'nginx-dav-ext-module' on windows
windows|nginx|webdav|msys2|libxslt
0
55
1
72,886,358
72,886,358
1
true
2022-07-06T08:27:30.427Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 'libxslt not found' when build nginx with 'nginx-dav-ext-module' on windows<p>I want to build nginx for windows with webdav module, so I followed the doc <a ...
72,869,443
Read content of IMAGE attributes outside of GeneXus<p>In GeneXus I store an image in an Image type attribute, in SQL Server that field is VARBINARY(MAX) and the content is:</p> <p>&quot;0x89504E470D0A1A0A000000...&quot;</p> <p>I understand that it is the HEXA of the binary. What I want to do is to be able to raise that...
<p>Fixed!</p> <pre><code>&lt;?php // Value of Image Data Type $imagen = '0x89504E470D0A1A0A0000000D49484...'; ?&gt; &lt;img src=&quot;data:image/png;base64,&lt;?php echo base64_encode(pack('H*',substr($imagen, 2)));?&gt;&quot; /&gt; </code></pre> <p>Cheers</p>
Read content of IMAGE attributes outside of GeneXus
php|genexus
0
55
1
72,886,554
72,886,554
1
true
2022-07-05T12:28:22.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Read content of IMAGE attributes outside of GeneXus<p>In GeneXus I store an image in an Image type attribute, in SQL Server that field is VARBINARY(MAX) and ...
72,881,361
Next.js Build fails. window is not defined<p>I'm building a next.js app and it works perfect in development mode. While deploying to production it fails with the following error:</p> <pre><code>[ ] info - Generating static pages (0/6)/home/ec2-user/groot-dashboard/node_modules/next-auth/react/index.js:220 ...
<p>It is very hard to help you when you are not showing the code that causes the error ...</p> <p>When I guess I think you are using window.* in your code and this is not available at build time so one way is to check if it is existing with</p> <pre><code>if (typeof window == 'undefined') { // Client-side-only cod...
Next.js Build fails. window is not defined
next.js|server-side-rendering|next-auth
-1
55
1
72,886,733
72,886,733
1
true
2022-07-06T09:50:28.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Next.js Build fails. window is not defined<p>I'm building a next.js app and it works perfect in development mode. While deploying to production it fails with...
72,884,583
Ansible, junja2 and setting single quotes around a value with ansible.builtin.replace<p>I want to make sure there are single quotes around the relation_regex defined regular expression (configuring datadog postgres module with ansible).</p> <p>This is what I am aiming at:</p> <h2>conf.yml:</h2> <pre><code>instances: - ...
<p>You omitted the <strong>next</strong> line of that &quot;diff&quot; output that would have been a dead giveaway of the problem:</p> <pre><code>- - relation_regex: .* + - relation_regex: '.* +' </code></pre> <p>which indicates that your &quot;any character except <code>'</code>&quot; needs to be more specific, ...
Ansible, junja2 and setting single quotes around a value with ansible.builtin.replace
regex|ansible|jinja2
0
55
2
72,888,973
72,888,973
1
true
2022-07-06T13:39:18.613Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ansible, junja2 and setting single quotes around a value with ansible.builtin.replace<p>I want to make sure there are single quotes around the relation_regex...
72,877,910
How to deal with NotImplementedError in training Unet model?<pre><code>def train_fn(data_loader, model, optimizer): model.train() total_loss = 0.0 for images, masks in tqdm(data_loader): images = images.to(DEVICE) masks = masks.to(DEVICE) optimizer.zero_grad() logits, loss = model(images,masks) loss.backw...
<p>Looking at the link you provided in the comment, your model definition looks like this:</p> <pre><code>class SegmentationModel(nn.Module): def __init__(self): super(SegmentationModel,self).__init__() self.arc = smp.Unet( encoder_name = ENCODER, encoder_weights = WEIGHTS, in_channe...
How to deal with NotImplementedError in training Unet model?
python|tensorflow|machine-learning|image-segmentation
0
55
1
72,889,660
72,889,660
1
true
2022-07-06T04:18:04.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to deal with NotImplementedError in training Unet model?<pre><code>def train_fn(data_loader, model, optimizer): model.train() total_loss = 0.0 for imag...
72,886,875
Python/ Openpyxl: Formatting a row across multiple columns based on criteria<p>I'm using openpyxl and I would like to format the borders across a row if column A is in my words list.</p> <p>My Code:</p> <pre><code>header_style = Font(bold = True) gone = Side(border_style = 'none') thick = Side(border_style = 'thick') ...
<p>The issue is in the selection of cells you want to update. As you are only selecting column A, that is the only one that is getting updated. In the original code you have provided, replace the last 5 lines with this...</p> <pre><code>words = ['Assets', 'Current Assets', 'Liabilities'] for r_idx, row in enumerate(ws...
Python/ Openpyxl: Formatting a row across multiple columns based on criteria
python|openpyxl
-1
55
1
72,892,258
72,892,258
1
true
2022-07-06T16:18:34.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python/ Openpyxl: Formatting a row across multiple columns based on criteria<p>I'm using openpyxl and I would like to format the borders across a row if colu...
72,898,308
How to dynamically update data in chart.js<p>How to update the data to the chart that I define when I mount?</p> <p>I think that I fail to properly reference the chart?</p> <p>It is the data() function that fails, with &quot;Could not find linechart&quot;, but how do I specify linechart?</p> <p>I have made <a href="htt...
<p>You should define your variable to hold the <code>Chart</code> outside the <code>mounted</code> function in order to be visible to the other methods.</p> <p>So instead use this</p> <pre><code>let linechart; export default { name: &quot;line-plot&quot;, mounted() { const ctx = document.getElementById(&quot;l...
How to dynamically update data in chart.js
vue.js|chart.js|nuxt.js
0
55
1
72,898,447
72,898,447
1
true
2022-07-07T13:01:48.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to dynamically update data in chart.js<p>How to update the data to the chart that I define when I mount?</p> <p>I think that I fail to properly reference...
72,898,594
How to create custom event with the shortest way?<p>There is <code>CustomWebViewClient</code> with override function <code>onPageFinished</code>. What is the shortest way to notify <code>MainViewModel</code> about the function triggered? I mean some event.</p> <p>I suppose that can use <code>StateFlow</code>, something...
<p>You can add lambda parameter into CustomWebViewClient constructor that will get called once page is finished.</p> <pre><code>class MainViewModel : ViewModel() { init { val client = CustomWebViewClient({handle the event}) } } class CustomWebViewClient(onPageFinished: () -&gt; Unit) : WebViewClient()...
How to create custom event with the shortest way?
android|kotlin|event-handling|kotlin-coroutines|kotlin-stateflow
0
55
2
72,899,770
72,899,770
1
true
2022-07-07T13:20:27.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create custom event with the shortest way?<p>There is <code>CustomWebViewClient</code> with override function <code>onPageFinished</code>. What is the...
72,893,093
Firebase: Cross-origin redirection to (url) denied by Cross-Origin Resource Sharing policy:Status code: 301<p>I am trying to deploy a firebase function and call the function from a nextjs app. The function works when it runs on firebase emulator, and when it is deployed I am able to call the function from postman. Howe...
<p>The problem was not with the firebase function but with the api call on nextjs. I was importing the function and making the call from a component. Instead I found the solution on this post: <a href="https://stackoverflow.com/questions/65058598/nextjs-cors-issue">NextJs CORS issue</a>.</p> <p>The solution that worked...
Firebase: Cross-origin redirection to (url) denied by Cross-Origin Resource Sharing policy:Status code: 301
http|next.js|google-cloud-functions|cors|fetch-api
-1
55
1
72,903,779
72,903,779
1
true
2022-07-07T06:19:50.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase: Cross-origin redirection to (url) denied by Cross-Origin Resource Sharing policy:Status code: 301<p>I am trying to deploy a firebase function and c...
72,907,526
How to get an array from appsettings.json file in .Net 6?<p>I've read this excellent SO <a href="https://stackoverflow.com/questions/65110479/how-to-get-values-from-appsettings-json-in-a-console-application-using-net-core">post</a> on how to get access to the <code>appsettings.json</code> file in a .Net 6 console app.<...
<p>To access the <code>logFilePaths</code> as an array, you want to use the <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.configuration.configurationbinder.get?view=dotnet-plat-ext-6.0#microsoft-extensions-configuration-configurationbinder-get-1(microsoft-extensions-configuration-iconfigurat...
How to get an array from appsettings.json file in .Net 6?
arrays|json|console-application|.net-6.0
0
55
2
72,907,638
72,907,638
1
true
2022-07-08T06:34:45.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get an array from appsettings.json file in .Net 6?<p>I've read this excellent SO <a href="https://stackoverflow.com/questions/65110479/how-to-get-valu...
72,909,874
How to remove or increase selected decoration in NavigationBar<p>How can I remove or increase the decoration of the selected item in the NavigationBar in flutter?</p> <pre><code>NavigationBar( elevation: 0, selectedIndex: navIndex, onDestinationSelected: (index) =&gt; setState(() { nav...
<p>Typically, the NavigationDestination icon has to be an Icon() widget. But in your case, it's text. That's why the text exceeds the highlighted area.</p> <pre><code>NavigationDestination( icon: &lt;This has to be a Icon&gt; label: '', ), </code></pre> <p>Icon will use 'NavigationBarThemeData.iconTheme...
How to remove or increase selected decoration in NavigationBar
flutter|dart|flutter-layout|navbar
2
55
2
72,913,161
72,913,161
1
true
2022-07-08T10:11:09.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove or increase selected decoration in NavigationBar<p>How can I remove or increase the decoration of the selected item in the NavigationBar in flu...
72,910,159
Three.js - How to fill Float32Array with equal number of points for different geometries<p>I have a project that loads various models (.obj, can be anything) and generates particles from the geometry position using Float23Array's.</p> <p>Given the geometries of each model are completely different, this causes the numbe...
<p>You normally handle this use case by allocating a large enough buffer and then use <a href="https://threejs.org/docs/index.html?q=bufferge#api/en/core/BufferGeometry.setDrawRange" rel="nofollow noreferrer">BufferGeometry.setDrawRange()</a> to decide which part of the data you want to draw. The values of vertices out...
Three.js - How to fill Float32Array with equal number of points for different geometries
three.js|float32
1
55
1
72,913,492
72,913,492
1
true
2022-07-08T10:35:35.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Three.js - How to fill Float32Array with equal number of points for different geometries<p>I have a project that loads various models (.obj, can be anything)...
72,871,758
how to get Description metadata of an image?<p>I need to get <code>Description</code> metadata of an image</p> <pre><code>$exif = exif_read_data('img.jpg', 0, true); foreach ($exif as $key =&gt; $section) { foreach ($section as $name =&gt; $val) { echo &quot;$key.$name: $val&lt;br /&gt;\n&quot;; } } </c...
<h1>Different formats</h1> <p>(Without any link to the file you tested, I assume that...)</p> <p>The reason is that <a href="https://en.wikipedia.org/wiki/Exif" rel="nofollow noreferrer">Exif (Exchangeable image file format)</a> is not the only metadata format <strong>and</strong> that it does not know any item for des...
how to get Description metadata of an image?
php|exif
1
55
1
72,916,826
72,916,826
1
true
2022-07-05T15:12:55.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to get Description metadata of an image?<p>I need to get <code>Description</code> metadata of an image</p> <pre><code>$exif = exif_read_data('img.jpg', 0...