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,993,091
Error in fetch response, can't figure out what is happening: React - Flask - SQLAlchemy<p>Thank you to read me at least :)</p> <p>I'm trying to make a login and register system. It was working before but it breaks at somepoint. I can't figure out what is going on here. My backend is doing his work, generate the token. ...
<p>The problem is in the input, I had these attributes that were breaking my code. Why? I don't really know but I commented them and all works fine.</p> <p><a href="https://i.stack.imgur.com/qFdl6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qFdl6.png" alt="enter image description here" /></a></p>
Error in fetch response, can't figure out what is happening: React - Flask - SQLAlchemy
javascript|python|reactjs|flask|sqlalchemy
0
56
4
73,003,430
73,003,430
0
true
2022-07-15T11:11:05.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error in fetch response, can't figure out what is happening: React - Flask - SQLAlchemy<p>Thank you to read me at least :)</p> <p>I'm trying to make a login ...
73,008,071
Unity audio source form external sources not loading<p>For some reason, the audio clip wont play. I even chacked it with <code>Debug.log(audioSource.clip.LoadState);</code> and it returned</p> <blockquote> <p>Loaded</p> </blockquote> <p>. I dont know what goes wrong and prevents the source from playing the clip. Also, ...
<p>Add <code>audioSource.Play();</code> after <code>audioSource.clip = uwrClip;</code> ‘ And remember to check if in your scene there is a audio listener. Check also that the audioSource settings are ok to listen, like the volume, mute, distance...</p>
Unity audio source form external sources not loading
unity3d
0
56
1
73,008,128
73,008,128
0
true
2022-07-16T22:34:35.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unity audio source form external sources not loading<p>For some reason, the audio clip wont play. I even chacked it with <code>Debug.log(audioSource.clip.Loa...
73,008,137
CSS gradients and -webkit-background-clip not allowing a transition<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.nav-content a { color: #000; text-decoration: none; ...
<p>The colors are only visible because they only exist while hovering. Just move your linear-gradient background to <code>.nav-content a</code>.</p> <p>Also, always specify what property to animate (<code>color</code>) to avoid performance issues.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-consol...
CSS gradients and -webkit-background-clip not allowing a transition
javascript|html|css|transition
0
56
2
73,008,182
73,008,182
0
true
2022-07-16T22:49:07.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CSS gradients and -webkit-background-clip not allowing a transition<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="f...
73,006,656
NextJS mongoose schema "Cannot read properties of undefined"<p>I have NextJS project with Mongoose schema inside of it. I keep getting following error on dev environment:</p> <blockquote> <p>TypeError: Cannot read properties of undefined (reading 'Village')</p> </blockquote> <p>My model file is:</p> <pre><code>import m...
<p>Try to add optional chaining to the exported value:</p> <pre><code>// prettier-ignore export default mongoose.models?.Village || mongoose.model(&quot;Village&quot;, VillageSchema); </code></pre>
NextJS mongoose schema "Cannot read properties of undefined"
mongodb|mongoose|next.js
0
56
1
73,010,153
73,010,153
0
true
2022-07-16T18:17:41.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NextJS mongoose schema "Cannot read properties of undefined"<p>I have NextJS project with Mongoose schema inside of it. I keep getting following error on dev...
73,012,828
RANK() over (PARTITION BY) To show only TOP 3 rows for each month<p>I have a question about ranking . (My using Pgadmin for my SQL codes) Mange to get my sum of sales in DESC order and rank 1 to 3 for the month of APR But how can I achieve my result by showing only rank 1 to 3 for the month of Apr , May and June. I nee...
<p>If you just want 3 records you should use <code>row_number</code> instead of rank. for your requirement you can do it in this way:</p> <pre><code>select t.* from ( SELECT restaurant_id, EXTRACT(year FROM submitted_on) AS year, EXTRACT(month FROM submitted_on) AS month, SUM(total_...
RANK() over (PARTITION BY) To show only TOP 3 rows for each month
sql|postgresql|ranking
0
56
1
73,013,116
73,013,116
0
true
2022-07-17T14:57:40.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: RANK() over (PARTITION BY) To show only TOP 3 rows for each month<p>I have a question about ranking . (My using Pgadmin for my SQL codes) Mange to get my sum...
72,869,536
Im trying to read a csv file from GCS bucket using spark and writing as delta lake(path in GCS) but not able to do write operation<p>Im trying in IntelliJ and have added the dependency in <code>pom.xml</code> file.</p> <pre><code> &lt;dependency&gt; &lt;groupId&gt;io.delta&lt;/groupId&gt; ...
<p>Changed the version as 1.0.0 and it fixed the issue.</p> <pre><code> &lt;dependency&gt; &lt;groupId&gt;io.delta&lt;/groupId&gt; &lt;artifactId&gt;delta-core_2.12&lt;/artifactId&gt; &lt;version&gt;1.0.0&lt;/version&gt; &lt;/dependency&gt; </code></pre>
Im trying to read a csv file from GCS bucket using spark and writing as delta lake(path in GCS) but not able to do write operation
maven|apache-spark|intellij-idea|google-cloud-platform|delta-lake
1
56
1
73,020,074
73,020,074
0
true
2022-07-05T12:34:59.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Im trying to read a csv file from GCS bucket using spark and writing as delta lake(path in GCS) but not able to do write operation<p>Im trying in IntelliJ an...
73,020,066
Cast a generic type in input a method to set a specific property in common between two classes<p>My first post here - I hope to give you all info required. I tried to check online anmd in forum but I cannot find the same case - maybe is not possible -.-'</p> <p>This is my situation:</p> <p>I have two classes with same ...
<p><code>input</code> is of type <code>T</code> so you can't cast it to <code>InputA</code> or <code>InputB</code>. You could do something like below but it is not that elegant:</p> <pre><code>private &lt;T&gt; VerifyRequest createVerifyRequest(T input) { VerifyRequest request = new VerifyRequest(); if (input ...
Cast a generic type in input a method to set a specific property in common between two classes
java|generics|casting
1
56
1
73,021,234
73,021,234
0
true
2022-07-18T09:28:13.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cast a generic type in input a method to set a specific property in common between two classes<p>My first post here - I hope to give you all info required. I...
72,980,660
Can I get a list of Google Cloud builds in a Google Cloud function?<p>So in our yaml files we have this Bash script:</p> <pre><code>gcloud builds list --ongoing </code></pre> <p>However I would need this same list in a Google Cloud Function which is just an <code>index.js</code> file with:</p> <pre><code>exports.proces...
<p>Here is the document which has example code for node.js: <a href="https://cloud.google.com/build/docs/api/reference/" rel="nofollow noreferrer">cloud.google.com/build/docs/api/reference/</a></p>
Can I get a list of Google Cloud builds in a Google Cloud function?
google-cloud-platform|google-cloud-functions
0
56
1
73,021,666
73,021,666
0
true
2022-07-14T12:39:17.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I get a list of Google Cloud builds in a Google Cloud function?<p>So in our yaml files we have this Bash script:</p> <pre><code>gcloud builds list --ongo...
73,022,982
Why scipy.integrate shows has no "simpson" attribute?<p>I have some python code which uses function <code>scipy.integrate.simpson</code> So for example I import scipy using <code>import scipy.integrate as scp_int</code> and then use it in following way:</p> <p><code>vol_r = scp_int.simpson(f_integrand_r,dx=_dx1,axis=0)...
<p>I suspect you are using version 1.5 (or an older version) of SciPy. If you don't know which version you have installed, you can check with</p> <pre><code>import scipy print(scipy.__version__) </code></pre> <p><code>simpson</code> was added in 1.6.0; it is the new name for the old function called <code>simps</code>. ...
Why scipy.integrate shows has no "simpson" attribute?
python|scipy|integrate
0
56
1
73,023,793
73,023,793
0
true
2022-07-18T13:19:48.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why scipy.integrate shows has no "simpson" attribute?<p>I have some python code which uses function <code>scipy.integrate.simpson</code> So for example I imp...
73,030,556
Determining size at which to switch from stack to heap allocation for multidimensional arrays<p>I am developing a C++ library focused on multidimensional arrays and relevant operations involving these objects. The data for my &quot;Tensor&lt;T,n&gt;&quot; class (which corresponds to an n-dimensional array whose element...
<p>A <code>std::vector</code> has a constant size and allocates the actual data always on the heap. So no matter what matrix size you have the Matrix class will be constant size and always store data on the heap.</p> <p>If you want a heap-free version then you would have to implement a Matrix with <code>std::array</cod...
Determining size at which to switch from stack to heap allocation for multidimensional arrays
c++|multidimensional-array|memory-management
0
56
1
73,032,427
73,032,427
0
true
2022-07-19T02:43:50.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Determining size at which to switch from stack to heap allocation for multidimensional arrays<p>I am developing a C++ library focused on multidimensional arr...
73,020,198
Why does knex.ref return `not-a-function` error?<p>I have a hard time to use ref in knex - because no matter what I do it returns <code>ref is not a function</code>.</p> <p>knex.js-File</p> <pre class="lang-js prettyprint-override"><code>const database = knex({ client: &quot;pg&quot;, connection: connectionStri...
<p><code>.withSchema(&quot;appschema&quot;)</code> should not be used here, because then you don't get the knex-object. Instead you get a knex query builder.</p>
Why does knex.ref return `not-a-function` error?
javascript|postgresql|knex.js|ref
0
56
1
73,037,799
73,037,799
0
true
2022-07-18T09:39:43.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does knex.ref return `not-a-function` error?<p>I have a hard time to use ref in knex - because no matter what I do it returns <code>ref is not a function...
72,890,752
Forge Viewer 7.71 throws errors when removing and recreating custom meshes in ModelViewer<p>I have an application that adds many custom meshes to the Forge Viewer using the ModelBuilder extension. This application has worked for quite a while but ran into issues with version 7.71 of the viewer.</p> <p>When graphics are...
<p>I'm told it will take some time to implement the fix (ticket id LMV-6757). In the meantime you could stick with <strong>v7.70</strong> or try these workarounds a colleague suggested:</p> <p>1.) If all of the custom geometry is removed, like it is in the example app, it's probably simpler to remove the model entirely...
Forge Viewer 7.71 throws errors when removing and recreating custom meshes in ModelViewer
autodesk-forge|autodesk-viewer
0
56
1
73,051,951
73,051,951
0
true
2022-07-06T23:11:40.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Forge Viewer 7.71 throws errors when removing and recreating custom meshes in ModelViewer<p>I have an application that adds many custom meshes to the Forge V...
72,901,226
Trying to test Wallet instantiation in Solana JS<p>I'm trying to follow some code to test out instantiating a wallet in code. I'm hardcoding private key (will not do this in prod obviously) just to see how everything works. I'm getting this error:</p> <pre><code> throw new Error('bad secret key size'); ^ E...
<p>So the issue here was the encoding. For ease of use, it's best to use the phantom wallet. I tried converting the seed to bs58 but I was still unsuccessful. If you insist on using another wallet and are using the .js web3 library for Solana, you'd probably be better off using</p> <p><code>const wallet = new Wallet(Ke...
Trying to test Wallet instantiation in Solana JS
javascript|solana|solana-web3js
0
56
2
73,055,100
73,055,100
0
true
2022-07-07T16:21:13.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trying to test Wallet instantiation in Solana JS<p>I'm trying to follow some code to test out instantiating a wallet in code. I'm hardcoding private key (wil...
73,023,819
Using the elasticsearch .net Nest client API to get snapshots with query parameters<p>I'm using the Nest client c# API (version 7.0.0.0) to get elasticsearch (8.2.2) snapshots information.</p> <pre><code>response = _elasticClient.Snapshot.Get( &quot;repository_name&quot;, &quot;*&quo...
<p><a href="https://discuss.elastic.co/t/using-the-elasticsearch-net-nest-client-api-to-get-snapshots-with-query-parameters/310021" rel="nofollow noreferrer">Accoring to the elasic team </a>, the high level client is currently missing this functionalty. They will add this in a near release. For now it is possible to us...
Using the elasticsearch .net Nest client API to get snapshots with query parameters
api|elasticsearch|nest|snapshot
0
56
1
73,066,754
73,066,754
0
true
2022-07-18T14:16:32.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using the elasticsearch .net Nest client API to get snapshots with query parameters<p>I'm using the Nest client c# API (version 7.0.0.0) to get elasticsearch...
73,030,400
datetimepicker in datagridview not allowing to enter same date twice<p>hello I am using c# and datagridview is already in place in my application where the columns are bind to another class what I have to do is embed a datetimepicker in my datagridview so that I can select date from it which is then bind to the variabl...
<p>So finally after trying for so many days I get to the root cause of it.. I was not able to enter the same date one after the other but if the date was different I was able to easily enter it so basically if the text is not changed then the date was unable to be added That was because I was using <code>text_changed</...
datetimepicker in datagridview not allowing to enter same date twice
c#|visual-studio|user-interface|datagridview|datetimepicker
-1
56
1
73,132,810
73,132,810
0
true
2022-07-19T02:13:47.070Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: datetimepicker in datagridview not allowing to enter same date twice<p>hello I am using c# and datagridview is already in place in my application where the c...
73,011,034
Android Navigation Error: You must call setGraph() before calling getGraph()<p>I'm trying to make an memo app, and this is my first time with application programming.</p> <p>When I tried to run the code on my device it just dies after showing the IntroActivity and the error log says: &quot;You must call setGraph() befo...
<p>check if the layout contains:</p> <pre><code>app:navGraph=&quot;@navigation/nav_graph&quot; app:defaultNavHost=&quot;true&quot; </code></pre> <p>your nav_host_fragment_content_list must look like:</p> <pre><code>&lt;fragment android:id=&quot;@+id/nav_host_fragment_content_list&quot; android:name=&quot;androidx.n...
Android Navigation Error: You must call setGraph() before calling getGraph()
android|kotlin
1
56
1
73,011,442
73,011,442
0
true
2022-07-17T10:32:53.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android Navigation Error: You must call setGraph() before calling getGraph()<p>I'm trying to make an memo app, and this is my first time with application pro...
72,836,561
How to get ORDER BY clause representation in Relational Algebra?<p>I want to get account related information by using Relational Algebra based on the descending order of the <code>balance</code> attribute.</p> <p>Table: <code>Account (id, account_number, branch_name, balance)</code></p> <p>How to get ORDER BY clause re...
<p>I don't think that is possible; relational algebra is about sets, which don't have an order. In <a href="https://www.oreilly.com/library/view/sql-and-relational/9781449319724/ch07s13.html" rel="nofollow noreferrer">this book on SQL and relation theory</a> it is stated that &quot;ORDER BY isn’t actually part of the r...
How to get ORDER BY clause representation in Relational Algebra?
relational-database|relational-algebra
-1
56
1
72,836,589
72,836,589
0
true
2022-07-02T04:58:11.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get ORDER BY clause representation in Relational Algebra?<p>I want to get account related information by using Relational Algebra based on the descend...
72,895,253
Laravel - Schedule job for each premium users<h2>What I need to do</h2> <p>When user purchase premium, I give him premium money. Every week, I need to give premium money again at subscription time. However, if the user is no longer a subscriber, they should no longer receive their premium money.</p> <h2>Questions</h2> ...
<h2>What i did</h2> <h3>Create table tasks</h3> <pre class="lang-php prettyprint-override"><code> Schema::create('tasks', function (Blueprint $table) { $table-&gt;id(); $table-&gt;string('type'); // optional $table-&gt;string('frequency_function'); $table-&gt;string('frequency_params')-&gt;nullable...
Laravel - Schedule job for each premium users
laravel|scheduled-tasks|job-scheduling
0
56
1
72,898,455
72,898,455
0
true
2022-07-07T09:17:37.573Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel - Schedule job for each premium users<h2>What I need to do</h2> <p>When user purchase premium, I give him premium money. Every week, I need to give p...
72,901,334
How to make zoom out effect with css?<p>In the hero section parallax effect is used, and also a zoom out effect: <a href="http://themes.framework-y.com/codrop/music/" rel="nofollow noreferrer">http://themes.framework-y.com/codrop/music/</a></p> <p>How can I make the zoom out effect?</p> <p>In my implementation, I conve...
<p>He has an initial zoom value of 1.2, then zooms out to 1 in his ken-burn-in animation that spans 10 seconds. Extracted to show below:</p> <pre><code>.ken-burn-center &gt; img { animation: ken-burn-in 10s; transform: scale(1.2); } @keyframes ken-burn-in { 0% { transform: scale(1.2); } 1...
How to make zoom out effect with css?
html|css|reactjs
0
56
2
72,901,495
72,901,495
0
true
2022-07-07T16:29:11.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make zoom out effect with css?<p>In the hero section parallax effect is used, and also a zoom out effect: <a href="http://themes.framework-y.com/codro...
72,937,272
File size check, Linux<p><strong>File size check</strong></p> <pre><code>file_path=&quot;/home/d-vm/&quot; cd $file_path # file_path directory file=($(cat video.txt | xargs ls -lah | awk '{ print $9}')) # get name in video.txt --- two files for example VID_141523.mp4 VID_2_141523.mp4 minimumsize=1 actualsize=$(wc -c &l...
<p>You probably mean - &quot;how to loop instead of this: <code>file=($(cat video.txt | xargs ls -lah | awk '{ print $9}'))</code>&quot; (which is pretty horrible by itself <sup>(*)</sup>).</p> <p>You should just use a <code>while</code> loop:</p> <pre class="lang-bash prettyprint-override"><code>cat video.txt | while ...
File size check, Linux
linux|bash|loops
0
56
2
72,937,413
72,937,413
0
true
2022-07-11T10:40:29.047Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: File size check, Linux<p><strong>File size check</strong></p> <pre><code>file_path=&quot;/home/d-vm/&quot; cd $file_path # file_path directory file=($(cat vi...
72,792,713
php curl_exec returns "HTTP/1.1 100 Continue" followed by "HTTP/1.1 404 Not Found"<p>I am trying to convert the below curl command which gives me JSON response to PHP curl code.</p> <p><code>curl -X POST --tls-max 1.2 --insecure https://xxxxxxxxx.com/getkey --cert client.crt --key client.key --header &quot;Content-Type...
<p>Try to disable sending <code>Expect: 100-continue</code>:</p> <pre><code>$header = array('Expect:', 'Content-Type: application/json'); curl_setopt($curl, CURLOPT_HTTPHEADER, $header); </code></pre> <p>The same for curl for test purposes</p> <pre><code>curl -X POST --tls-max 1.2 --insecure https://xxxxxxxxx.com/getke...
php curl_exec returns "HTTP/1.1 100 Continue" followed by "HTTP/1.1 404 Not Found"
php|curl
1
56
2
72,793,028
72,793,028
0
true
2022-06-28T20:22:04.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: php curl_exec returns "HTTP/1.1 100 Continue" followed by "HTTP/1.1 404 Not Found"<p>I am trying to convert the below curl command which gives me JSON respon...
72,858,081
Assign Click Event to Button in WPF ResourceDictionary<p>I keep my theme file (ResourceDictionary) in a separate project. I'm using the following ControlTemplate structure for the DataGrid in my ResourceDictionary:</p> <pre><code>&lt;Style TargetType=&quot;{x:Type DataGridColumnHeader}&quot;&gt; &lt;Setter Prope...
<p>As <code>Button.Click</code> is a bubbling routed event, you can listen it at the control nearer to the root.</p> <p>For example, assuming you name the Style as &quot;HeaderStyle&quot;, it would be like the following.</p> <pre class="lang-xml prettyprint-override"><code>&lt;DataGrid ColumnHeaderStyle=&quot;{StaticRe...
Assign Click Event to Button in WPF ResourceDictionary
c#|wpf|xaml|data-binding|datagrid
0
56
1
72,860,020
72,860,020
0
true
2022-07-04T14:10:08.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Assign Click Event to Button in WPF ResourceDictionary<p>I keep my theme file (ResourceDictionary) in a separate project. I'm using the following ControlTemp...
72,897,227
Calculate summation of numbers<p>I'm a new python programmer and I want to calculate the sum of H for i from zero to 5 and finally calculate the sum of each of them. The code I wrote is like this, can anyone help me?</p> <pre><code>i=0 he=float(input(&quot;he:&quot;)) while i&lt;6 : summation=0 H1=100-((2*i*150...
<p>You probably want something like this.</p> <pre><code>he = float(input(&quot;he:&quot;)) summation = 0 for i in range(6): H1 = 100 - ((2 * i * 1500) - he) H2 = 120 + ((2 * i * 1200) - he) H3 = 200 - ((2 * i * 1100) + he) H4 = 80 + ((2 * i * 1100) + he) summation += H1 + H2 + H3 + H4 print(f&...
Calculate summation of numbers
python
0
56
1
72,897,295
72,897,295
0
true
2022-07-07T11:44:26.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculate summation of numbers<p>I'm a new python programmer and I want to calculate the sum of H for i from zero to 5 and finally calculate the sum of each ...
72,895,241
Converting Python array into 4-dimensional columns<p>I want to be able to sort a given array into 4-dimensional columns. The ONLY size of this actual array is 2-dimensional <code>[[...], [...]]</code>, but I want to be able to convert any given array into this 2d (4d columns) array.</p> <p>So say I have <code>a</code> ...
<pre><code>import numpy as np from math import ceil data = [x for x in range(1, 9)] required_len = ceil(len(data) / 4) * 4 t_2 = required_len // 4 data = data + [None] * (required_len - len(data)) data = np.array(data ).reshape(4, t_2).T </code></pre> <p>Here I generate an array <code>data</code> of some arbitrary len...
Converting Python array into 4-dimensional columns
python
1
56
3
72,896,454
72,896,454
0
true
2022-07-07T09:16:57.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Converting Python array into 4-dimensional columns<p>I want to be able to sort a given array into 4-dimensional columns. The ONLY size of this actual array i...
72,783,969
Stream logs to event hub<p>Is there a way to send the Cloud Service(extended support) or (classic) diagnostics logs directly to event hub? When I try to enable the diagnostics from Visual Studio the only options available to send the logs are Storage account and Application Insights. <a href="https://i.stack.imgur.com/...
<p>The solution for my case was to export the logs to a storage account and then I created a blob trigger function that ingested the logs into event hub</p>
Stream logs to event hub
azure|logging|cloud|azure-cloud-services|azure-diagnostics
-1
56
1
72,831,170
72,831,170
0
true
2022-06-28T09:30:39.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stream logs to event hub<p>Is there a way to send the Cloud Service(extended support) or (classic) diagnostics logs directly to event hub? When I try to enab...
72,800,352
React Labels not displaying in browser<p>I am new to React and especially formik. I am trying to learn how to create a login form using formik that will display a label called email with the email input. A label called password with the password input and a button called submit.</p> <p>My problem is that only the two i...
<p>I would like to do easily this instead :</p> <pre><code>function FormikControl({ control, id, label, ...rest }) { return ( &lt;&gt; {control === &quot;input&quot; &amp;&amp; &lt;label htmlFor={id}&gt;{label}&lt;/label&gt;} &lt;input id={id} {...rest} /&gt; &lt;/&gt; ); } export default FormikControl;...
React Labels not displaying in browser
reactjs|formik
0
56
1
72,801,162
72,801,162
0
true
2022-06-29T11:07:30.060Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Labels not displaying in browser<p>I am new to React and especially formik. I am trying to learn how to create a login form using formik that will disp...
72,850,824
Return maximum value after K swaps using recursion<p>I am attempting following problem from geeks for geeks, problem link; [enter link description here][1]</p> <p>Here is my python code to solve it;</p> <pre><code>def swap_kdigits(s, k, maximum): if k == 0: return for i in range(0, len(s) - 1): /* fi...
<p>As I don't have a GeeksForGeeks account, I cannot login into the site and see for myself if there's an actual answer to this question. I'm telling this, because I don't know why you came up with a recursive function for the solution.</p> <p>After testing your script and making some modifications, I realized your scr...
Return maximum value after K swaps using recursion
python|recursion
0
56
1
72,851,577
72,851,577
0
true
2022-07-04T00:44:23.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return maximum value after K swaps using recursion<p>I am attempting following problem from geeks for geeks, problem link; [enter link description here][1]</...
72,925,306
How to replace a character with another character in a list of string<p>I have the following list of strings:</p> <pre><code>a = ['1234!zf', '5678!ras', 'abcd!ggt', 'defg!z', 'hijk!', 'lmnk!reom'] </code></pre> <p>I want to replace the 4th character with another character (the character will always be the same in every...
<p>You can use a for-loop to iterate through every index in array 'a', then assign a new string on each position such that <code>new_string_i = prev_string[:4] + &quot;&amp;&quot; + prev_string[5:]</code></p> <p><strong>Code snippet</strong>:</p> <pre class="lang-py prettyprint-override"><code>a = ['1234!zf', '5678!ras...
How to replace a character with another character in a list of string
python|string|replace|immutability
-1
56
2
72,925,333
72,925,333
0
true
2022-07-09T23:42:23.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to replace a character with another character in a list of string<p>I have the following list of strings:</p> <pre><code>a = ['1234!zf', '5678!ras', 'abc...
72,794,993
Unique elements<p>Given a list of numbers, find and print the elements that appear in it only once. Such elements should be printed in the order in which they occur in the original list. So I use sort and use a list to keep track of it order but python say &quot;list index out of range&quot;, how do I fix this?</p> <pr...
<p>The following code should work:</p> <pre><code>a = [int(s) for s in input().split()] sortedLst = sorted(a) unique = [] uniqueOrd = [] for i in range(len(a) - 2): if sortedLst[i + 1] != sortedLst[i] and sortedLst[i + 1] != sortedLst[i + 2]: unique.append(sortedLst[i + 1]) for num in a: if num in unique: ...
Unique elements
python|list
1
56
2
72,795,068
72,795,068
0
true
2022-06-29T02:04:08.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unique elements<p>Given a list of numbers, find and print the elements that appear in it only once. Such elements should be printed in the order in which the...
72,926,127
Evaluating ellipsis (...) in data.table context<p>I am writing a function that pastes arguments and returns empty string if an argument is evaluated with error. It is easy for two arguments:</p> <pre><code>paste_clean_ab &lt;- function(a,b){ a &lt;- tryCatch(a, error = function(cond) {warning(cond); return(NULL);}) ...
<p>You could specify evaluation environment : <code>parent.frame()</code>.<br /> This seems to work with the examples you provided, but isn't fully bulletproof as I got an error instead of the console mode warning using <code>reprex::reprex()</code> to verify my answer.</p> <pre class="lang-r prettyprint-override"><cod...
Evaluating ellipsis (...) in data.table context
r|data.table|lazy-evaluation
0
56
1
72,926,684
72,926,684
0
true
2022-07-10T04:23:30.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Evaluating ellipsis (...) in data.table context<p>I am writing a function that pastes arguments and returns empty string if an argument is evaluated with err...
72,829,057
Remove seconds from dateTime in XQUERY<p>So i have a dateTime like &quot;2022-06-25T03:00:00+02:00&quot; and i have to just remove the seconds and retain everything else.</p> <p>eg: &quot;2022-06-25T03:00+02:00&quot;</p> <p>Below is the input xml, i have to tranform the data to match the eg: that i ahve mentioned above...
<p>The easiest approach is using <code>fn:replace</code> with RegEx:</p> <pre><code>replace(xs:string($file/dateTimeValue),'(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}):\d{2}(\+\d{2}:\d{2})','$1$2') </code></pre> <p>Result is</p> <blockquote> <p>2022-06-25T03:00+02:00</p> </blockquote> <p>You could not convert the resulting string ...
Remove seconds from dateTime in XQUERY
xml|xquery|oracle-ebs
0
56
2
72,830,951
72,830,951
0
true
2022-07-01T12:09:05.247Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove seconds from dateTime in XQUERY<p>So i have a dateTime like &quot;2022-06-25T03:00:00+02:00&quot; and i have to just remove the seconds and retain eve...
73,026,200
Excel - Copy rows from one sheet to another sheet based in a criteria without VBA<p>I have a excel with the next structure in the first sheet</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>Color</th> <th>Size</th> </tr> </thead> <tbody> <tr> <td>001</td> <td>red</td> <td>A</td>...
<p>It is possible without VBA as well if you use additional column in &quot;Sheet1&quot;, for example &quot;D&quot; for your table. In &quot;D1&quot; write &quot;Counter&quot; Then write in &quot;D2&quot;:</p> <pre><code>=IF(B2=&quot;blue&quot;;MAX($D$1:D1)+1;0) </code></pre> <p>and copy to rows below. This is an incre...
Excel - Copy rows from one sheet to another sheet based in a criteria without VBA
excel|excel-formula
0
56
1
73,028,089
73,028,089
0
true
2022-07-18T17:19:34.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel - Copy rows from one sheet to another sheet based in a criteria without VBA<p>I have a excel with the next structure in the first sheet</p> <div class=...
72,847,062
Update the existing xml attributes values (same multiple key-value pairs under one tag)using BeautifulSoup Python?<p>List elements to be appended in XML data:</p> <pre><code>Sorted_TestSpecID: [10860972, 10860972, 10860972, 10860972, 10860972] Sorted_TestCaseID: [16961435, 16961462, 16961739, 16961741, 16961745] Sorted...
<p>Consider adding an <code>attributes</code> level loop after zipping through list elements. Then, conditionally check keys for value assignment:</p> <pre class="lang-py prettyprint-override"><code>soup = BeautifulSoup(xml_data, 'xml') for tc in soup.find_all('tc'): for title, spec, case in zip(Sorted_TestText, ...
Update the existing xml attributes values (same multiple key-value pairs under one tag)using BeautifulSoup Python?
python|xml|beautifulsoup
1
56
1
72,847,925
72,847,925
0
true
2022-07-03T13:55:38.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Update the existing xml attributes values (same multiple key-value pairs under one tag)using BeautifulSoup Python?<p>List elements to be appended in XML data...
72,831,152
How to overcome character display limit in Google Sheets e.g. when using IMPORTXML?<p>Original Title:</p> <p>How to use Google Sheets formula to import data (using e.g. IMPORTXML) without dropping off characters in results?</p> <p>Google Sheet example in thrid update below.</p> <p>I currently use the formula below to p...
<p>try:</p> <pre><code>=REGEXEXTRACT(IMPORTXML(&quot;https://crypto.com/price/nekocoin&quot;, &quot;//h2/span&quot;), &quot;\d+.\d+&quot;) </code></pre>
How to overcome character display limit in Google Sheets e.g. when using IMPORTXML?
javascript|google-sheets|import|google-sheets-formula|limit
1
56
2
72,837,442
72,837,442
0
true
2022-07-01T14:59:08.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to overcome character display limit in Google Sheets e.g. when using IMPORTXML?<p>Original Title:</p> <p>How to use Google Sheets formula to import data ...
72,962,789
xfinium: How To generate PDF with differant orientations<p>I try to create a PdfFlowDocument with header and footer. The page from 1 to 3 in Portrait mode. Page 4 is in Landscape and the rest again in portrait. Following my code code snippet:</p> <pre><code> PdfFlowDocument flowDocument = new PdfFlowDocument(); ...
<p>You handle the PageCreated event and set the page rotation to 90 for landscape based on your specific condition.</p> <pre><code>PdfFlowDocument flowDocument = new PdfFlowDocument(); flowDocument.PageCreated += FlowDocument_PageCreated; //flowDocument.HeadersFooters.EvenPagesHeader = docHeader; //flowDocument.Header...
xfinium: How To generate PDF with differant orientations
c#|visual-studio|winforms|pdf
0
56
1
72,964,117
72,964,117
0
true
2022-07-13T08:00:03.963Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: xfinium: How To generate PDF with differant orientations<p>I try to create a PdfFlowDocument with header and footer. The page from 1 to 3 in Portrait mode. P...
72,993,166
MySQL SELECT INNER JOIN mistaken<p>I am trying to retrieve the 'Roles' sets of a given users.id on a query with INNER JOIN combined with a WHERE condition. But things go wrong.</p> <p>My database has four tables:</p> <pre><code>t_users : id, username, userpass, status, ... t_action: id, id_user, id_role, id_type_role, ...
<p>Use:</p> <pre><code>SELECT u.id AS id, r.libelle AS role, t.libelle AS type FROM users u JOIN action a ON a.id_user = u.id JOIN type_role t ON t.id = a.id_type_role JOIN role r ON r.id = a.id_role WHERE a.id_user =1 AND t.libelle = 'System'; </code></pre> <p><a href="https://dbfiddle.uk/?rdbms=mysql_5...
MySQL SELECT INNER JOIN mistaken
mysql|join
0
56
2
72,993,966
72,993,966
0
true
2022-07-15T11:17:40.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL SELECT INNER JOIN mistaken<p>I am trying to retrieve the 'Roles' sets of a given users.id on a query with INNER JOIN combined with a WHERE condition. B...
72,848,987
Website login loading endlessly when I use find_element()<p>I'm having a problem with Selenium, when fetching an input from a login from a page. For some reason, whenever I store the element in a variable, the site in question, when trying to log in, keeps loading infinitely. However, if I remove that part of the code,...
<p>Have you tried to use only use <code>send_keys()</code>? So, your code will look like:</p> <pre><code>def make_login(browser): sleep(1) login = browser.find_element(By.ID, &quot;txtUsername&quot;) login_text = &quot;User&quot; login.send_keys(login_text) senha = navegador.find_element(By.ID, &quo...
Website login loading endlessly when I use find_element()
python-3.x|selenium
0
56
1
72,849,579
72,849,579
0
true
2022-07-03T18:32:50.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Website login loading endlessly when I use find_element()<p>I'm having a problem with Selenium, when fetching an input from a login from a page. For some rea...
72,931,348
Why does it insert it more than once?<p>Trying to insert &quot; _ &quot; before uppercase letters but it inserts more than once.</p> <p>Instead of [&quot;h&quot;, &quot;e&quot;, &quot;l&quot;, &quot;l&quot;, &quot;o&quot;, &quot; _ &quot;, &quot;W&quot;, &quot;o&quot;, &quot;l&quot;, &quot;r&quot;, &quot;d&quot;] it pr...
<p>In your code, each call to <code>new.insert(i, &quot;_&quot;)</code> changes <code>new</code> so that the uppercase letter that was previously at index <code>i</code> is now at index <code>i + 1</code>, since you have just inserted the character <code>_</code> at index <code>i</code> and pushed he uppercase letter (...
Why does it insert it more than once?
python|list|for-loop
0
56
3
72,931,449
72,931,449
0
true
2022-07-10T19:34:34.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does it insert it more than once?<p>Trying to insert &quot; _ &quot; before uppercase letters but it inserts more than once.</p> <p>Instead of [&quot;h&q...
72,983,234
find DB name which contains "XYZ" in name<p>I want to find databases in SQL server which contains specific word in it. for example DB name = DBNAME_XYZ . I know I can list all DBs using <code>SELECT name FROM master.dbo.sysdatabases</code> but don't know how to fetch DBs which contain &quot;XYZ&quot; . Thanks in advan...
<p>Using below query</p> <pre class="lang-sql prettyprint-override"><code>SELECT NAME FROM SYS.DATABASES WHERE NAME LIKE '%XYZ%' </code></pre>
find DB name which contains "XYZ" in name
sql|sql-server|sql-server-2008
-1
56
1
72,983,906
72,983,906
0
true
2022-07-14T15:41:30.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: find DB name which contains "XYZ" in name<p>I want to find databases in SQL server which contains specific word in it. for example DB name = DBNAME_XYZ . I ...
73,003,919
How do i round off time to nearest hour and minute using Oracle sql query for hcm<p>Input Data is of my</p> <pre><code>14.499 248.589 14.997 -3.7594185 </code></pre> <p>My query is like this which I am trying</p> <pre><code>‘”’ || INTEGER_PART(Accrual_Balance) || ‘:’|| FORMAT_NUMBER(ROUND(DECIMAL_PART(round(Accrual_Ba...
<p>A similar solution:</p> <pre><code>WITH dat AS ( SELECT 14.499 AS Accrual_Balance FROM DUAL UNION ALL SELECT 248.589 FROM DUAL UNION ALL SELECT 14.997 FROM DUAL UNION ALL SELECT -3.7594185 FROM DUAL ) SELECT CASE WHEN ROUND(ABS(60*(Accrual_Balance- TRUNC(Accrual_Balance)))) = 60 THEN TO_CHAR(CEIL(Acc...
How do i round off time to nearest hour and minute using Oracle sql query for hcm
oracle|oracle11g
1
56
1
73,004,313
73,004,313
0
true
2022-07-16T11:46:28.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do i round off time to nearest hour and minute using Oracle sql query for hcm<p>Input Data is of my</p> <pre><code>14.499 248.589 14.997 -3.7594185 </cod...
72,811,952
Fill Value in a Column Based on multiple conditions in Another Columns (Python)<p>I have a problem with deciding which value should I take for a new column in a dataframe that I will create. Here's the requirements:</p> <ol> <li>The value should have length=17</li> <li>The value should contains &quot;MP&quot; and the f...
<p>You can use a regex for that <code>(..MP.{13})</code> (2 characters, MP, 13 characters):</p> <pre><code>df['Serial Number Final'] = df['Serial Number + Keyword'].str.extract(r'(..MP.{13})') </code></pre> <p>or, if the <code>x</code> can only be digits <code>\d\dMP\d{13}</code> (2 digits, MP, 13 digits):</p> <pre><co...
Fill Value in a Column Based on multiple conditions in Another Columns (Python)
python|pandas|dataframe|numpy
2
56
1
72,811,988
72,811,988
0
true
2022-06-30T07:37:19.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fill Value in a Column Based on multiple conditions in Another Columns (Python)<p>I have a problem with deciding which value should I take for a new column i...
72,895,510
XSL filter on Multiple input<p>I am trying to figure out how and where does an XSL filter need to be added to filter out multiple input. Below is my XML:</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;product_list&gt; &lt;brands&gt; &lt;brand id=&quot;A1&quot; name=&quot;ABC&q...
<p>Since you are selecting groups first and then products inside the group, you could put the filtering on line 59:</p> <pre><code> &lt;xsl:apply-templates select=&quot;group&quot;/&gt; </code></pre> <p>by changing it to something like this:</p> <pre><code> &lt;xsl:apply-templates select=&quot;group[$selected...
XSL filter on Multiple input
xml|xslt|xhtml
0
56
1
72,914,537
72,914,537
0
true
2022-07-07T09:34:37.410Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: XSL filter on Multiple input<p>I am trying to figure out how and where does an XSL filter need to be added to filter out multiple input. Below is my XML:</p>...
73,028,648
How to skip to the next link if a site cant be reached with BeautifulSoup?<p>I'm currently coding a Python project which needs to do the following:</p> <p>-the user inputs multiple links to different sites</p> <p>-the script scrapes information from these sites and writes the output in a .txt file</p> <p>The problem I ...
<p>Simply put, let a context manager take care of I/O operations, and place the <code>try</code> block inside the loop. I also added <code>foo()</code>, where you can add further operations on <code>all_div</code>:</p> <pre><code>def foo(x): return ''.join([f&quot;{s.get_text()}\n&quot; for s in x]) def scrape(in...
How to skip to the next link if a site cant be reached with BeautifulSoup?
python|exception|beautifulsoup
0
56
1
73,029,373
73,029,373
0
true
2022-07-18T21:07:54.310Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to skip to the next link if a site cant be reached with BeautifulSoup?<p>I'm currently coding a Python project which needs to do the following:</p> <p>-t...
72,921,785
I have a array like this in laravel , I want to remove the array which is having total greater than 480<pre><code> array ( 0 =&gt; array ( 'user_code' =&gt; '073', 'name' =&gt; 'Ashish', 'email' =&gt; 'ashishm@gmail.com', ), 1 =&gt; array ( 'user_code' =&gt; '073', '...
<p>If I understand you correctly, you have an array that contains 4 entries. Each of those are arrays. You want to remove the one that has <code>total = 915</code>. This would be the resulting array:</p> <pre><code> array ( 0 =&gt; array ( 'user_code' =&gt; '073', 'name' =&gt; 'Ashish', 'ema...
I have a array like this in laravel , I want to remove the array which is having total greater than 480
php|arrays|laravel
0
56
3
72,921,901
72,921,901
0
true
2022-07-09T13:33:41.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I have a array like this in laravel , I want to remove the array which is having total greater than 480<pre><code> array ( 0 =&gt; array ( 'u...
72,911,304
How to upload large files using POST method in Python?<p>I'm uploading a large file (about 2GB) to an API that accepts POST method using <code>requests</code> module of Python, which results in loading the file to the memory first and increasing memory usage significantly. I believe there will be some other ways to str...
<p>When you pass <code>files</code> arg then requests lib makes a multipart form upload. i.e. it is like submitting a form, where the file is passed as a named field (<code>file</code> in your example)</p> <p>I suspect the problem you saw is because when you pass a file object as <code>data</code> arg, as suggested in ...
How to upload large files using POST method in Python?
python|post|optimization|python-requests|stream
0
56
2
72,913,042
72,913,042
0
true
2022-07-08T12:18:09.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to upload large files using POST method in Python?<p>I'm uploading a large file (about 2GB) to an API that accepts POST method using <code>requests</code...
72,936,348
Want to restrict a part of my indicator to certain timeframes than other parts<p>I was just making a combination of indicators i use - vwap, 50ema and imbalance.</p> <p>I want it to show vwap only on 5minutes and below timeframes, whereas Ema on 15minutes and above.</p> <p>Thanks in advance </p>
<p>You can do it in two ways, first one is to check if the timeframe is intraday and multiplier is 5 or less, like this:</p> <pre><code>vwap = ta.vwap(close) ema_50 = ta.ema(close, 50) plot(timeframe.isintraday and timeframe.multiplier &lt;= 5 ? vwap: na, color=color.red) plot(timeframe.isintraday and timeframe.multi...
Want to restrict a part of my indicator to certain timeframes than other parts
pine-script|trading|tradingview-api|indicator
0
56
1
72,937,460
72,937,460
0
true
2022-07-11T09:28:15.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Want to restrict a part of my indicator to certain timeframes than other parts<p>I was just making a combination of indicators i use - vwap, 50ema and imbala...
72,847,657
Some links in fetched with IMAP email are missing<p>I'm extracting the links from the email using <code>imaplib</code> and <code>email</code>, but the result is missing the main link, although the others are there.</p> <pre><code>#Assume that I know the id of an email that I need to parse '599' typ, email_data = mail.f...
<p>The immediate problem seems to be that you are <em>probably</em> extracting links from a MIME part which simply contains only two links. The structure of the message is apparently something like</p> <pre><code>-+ multipart/alternative -- text/plain -+ multipart/related -- text/html -- image/png -- image/png ...
Some links in fetched with IMAP email are missing
python|email|parsing|imap|mime
0
56
1
72,882,542
72,882,542
0
true
2022-07-03T15:17:46.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Some links in fetched with IMAP email are missing<p>I'm extracting the links from the email using <code>imaplib</code> and <code>email</code>, but the result...
72,901,075
How from an array of objects to map the data in a new object based on a latest timestamp<p>I have the following snippet whose functionality is to re-map the mocked data in a new one, with new fields and a total calculation.</p> <p>For simplicity was used a short array and one date.</p> <p>The calculation is about how m...
<p>We can sort based on date then omit the duplicates by overwriting using an object, then evaluate on the result values of the object. Hope that suites your needs.</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...
How from an array of objects to map the data in a new object based on a latest timestamp
javascript
0
56
1
72,901,971
72,901,971
0
true
2022-07-07T16:09:07.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How from an array of objects to map the data in a new object based on a latest timestamp<p>I have the following snippet whose functionality is to re-map the ...
72,773,241
Transform panel data of static values to panel dataset of changes from previous period for several variables<p>I have a panel dataset that looks something like:</p> <pre><code>df &lt;- data.frame(id = c(1:10), income_3 = c(2:11), income_4 = c(3:8, NA, 10:12), income_5 = c(4:13), health_3 = c(NA, 6:14), health_4 = c(7:1...
<p>For my actual dataset I use:</p> <pre><code>vars &lt;- names(df) num&lt;- seq(3, length(vars)-1,1) </code></pre> <p>I start the sequence at 3, because I have two ID variables (that are strings).</p> <pre><code>for (i in num ) { df[paste0(&quot;d_&quot;, vars[i],&quot;_&quot;,vars[i+1])]&lt;-(df[,i+1]/df[,i]-1...
Transform panel data of static values to panel dataset of changes from previous period for several variables
r|transform|panel
1
56
2
72,792,864
72,792,864
0
true
2022-06-27T13:50:25.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Transform panel data of static values to panel dataset of changes from previous period for several variables<p>I have a panel dataset that looks something li...
72,947,752
How to align the Radio button, AutoComplete and Input Base in one row<p>This is how my code looks like. I want the display to be &quot;Watch Movie Yes I agree&quot; in one line/row. How can I achieve the same ?</p> <p><a href="https://codesandbox.io/s/serene-diffie-5fzobp?file=/src/App.js" rel="nofollow noreferrer">htt...
<p>You can use <code>flex</code> and <code>flexDirection: &quot;row&quot;</code> to style your <code>RadioGroup</code> in order to align items horizontally.</p> <pre><code> &lt;RadioGroup style={{ display: &quot;flex&quot;, alignItems: &quot;flex-start&quot;, flexDirection: &quot;row&qu...
How to align the Radio button, AutoComplete and Input Base in one row
reactjs|flexbox|material-ui|grid|styles
0
56
1
72,948,073
72,948,073
0
true
2022-07-12T06:11:19.697Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to align the Radio button, AutoComplete and Input Base in one row<p>This is how my code looks like. I want the display to be &quot;Watch Movie Yes I agre...
72,769,211
Swift defer behaviour<p>what is the output:</p> <pre><code> var x = 5 func increment() -&gt; Int { defer { x += 1 } return x } x = increment() let result = increment() print(x, result, x) </code></pre> <p>the answer is 6 5 6,i don't know why result is 5?</p>
<p>Observe that <code>increment</code> always returns the current value of <code>x</code>. This is because <code>defer</code> is executed after the <code>return</code> statement is.</p> <p>After</p> <pre><code>x = increment() </code></pre> <p><code>x</code> is still 5. <code>increment</code> returns 5, increments <code...
Swift defer behaviour
swift
0
56
1
72,769,402
72,769,402
1
true
2022-06-27T08:38:14.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Swift defer behaviour<p>what is the output:</p> <pre><code> var x = 5 func increment() -&gt; Int { defer { x += 1 } return x } x = increment() let result = ...
72,774,529
How to use lazy services with dependency injection in typo3?<p>Can I use lazy services in typo3 (version 11)?</p> <p>I have installed the package symfony/proxy-manager-bridge with <code>composer require symfony/proxy-manager-bridge</code>. The <a href="https://symfony.com/doc/current/service_container/lazy_services.htm...
<p>TYPO3 does not support this integration for lazy services out of the box like Symfony does. Especially you cannot use Symfony bundles since these are integrations specifically meant for Symfony apps similar to extensions in TYPO3.</p> <p>Within Symfony the <a href="https://github.com/symfony/symfony/blob/47c2da7ab84...
How to use lazy services with dependency injection in typo3?
symfony|dependency-injection|typo3
0
56
1
72,774,763
72,774,763
1
true
2022-06-27T15:18:18.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use lazy services with dependency injection in typo3?<p>Can I use lazy services in typo3 (version 11)?</p> <p>I have installed the package symfony/pro...
72,776,735
Setting a dynamic min and max date in CHARTJS using date-fn adapter<p>I am currently working on an analytic dashboard, and I have chosen Chartjs to visualize the graphs, everything works fine except I do not seem to know how to set the MIN and MAX date of the chartjs time object dynamically. It is been hardcoded like t...
<p>you can just pass a function to the min and max that calculates the min and max for you like so:</p> <pre class="lang-js prettyprint-override"><code>options: { scales: { x: { type: 'time', min: () =&gt; { return calculateMin() } } } } </code></pre>
Setting a dynamic min and max date in CHARTJS using date-fn adapter
javascript|date|chart.js
2
56
1
72,776,913
72,776,913
1
true
2022-06-27T18:19:32.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Setting a dynamic min and max date in CHARTJS using date-fn adapter<p>I am currently working on an analytic dashboard, and I have chosen Chartjs to visualize...
72,782,881
Remove single quote from list of strings in pandas dataframe<p>I have a pandas dataframe that looks like the following. I want to get rid of the single quotes of the strings in the list. Any suggestion is appreciated.</p> <pre><code> name relations 0 mary ['andrew', 'jane'] 1 jack ['priscilla', 'm...
<p>The string becomes an object and displays an error if is not defined. But it should do what you need.</p> <pre><code>df['relations'] = df['relations'].apply(lambda x: list(map(eval,x))) </code></pre>
Remove single quote from list of strings in pandas dataframe
python|pandas|dataframe
0
56
2
72,783,084
72,783,084
1
true
2022-06-28T08:10:05.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove single quote from list of strings in pandas dataframe<p>I have a pandas dataframe that looks like the following. I want to get rid of the single quote...
72,783,270
Add int value in a cell of excel file from python code<p>My excel file contains multiple sheets, I am trying to add value(int:5) in cell(&quot;C5&quot;) in sheet(&quot;sheet_1&quot;) of excel file(&quot;testexcel.xlsx&quot;). I tried many ways, but none of the functions are able to edit the excel file. Excel File eithe...
<p>As suggested by Charlie Clark, if you want to use openpyxl, you can use the below code...</p> <pre><code>import openpyxl wb = openpyxl.load_workbook(&quot;testexcel.xlsx&quot;) ws = wb[&quot;sheet_1&quot;] val = 5 # Giving it separately in case you are getting this from another part of your program ws.cell(row=5, co...
Add int value in a cell of excel file from python code
python|openpyxl|xlrd|xlwt|xlutils
-1
56
2
72,786,401
72,786,401
1
true
2022-06-28T08:38:44.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add int value in a cell of excel file from python code<p>My excel file contains multiple sheets, I am trying to add value(int:5) in cell(&quot;C5&quot;) in s...
72,981,018
How to cancel background noise while playing PCM Audio in STM32?<p>I am trying to play Audio from PCM data in STM32(blackpill_f411ce). I can hear the audio but there is a steep noise also coming with the audio. I am working in PlatformIO with Audrino's framework. The PCM data is defined inside the code as an unsigned c...
<p>In setup, I added analogWriteFrequency(200000) and the problem solved</p> <pre><code>void setup() { analogWriteFrequency(200000); } </code></pre> <p>And also no need to put sine values</p> <pre><code>void playPcmData() { for (size_t i = 0; i &lt; 98216; i++) { int val=int(sample[i]); analogWrite(OUT_PI...
How to cancel background noise while playing PCM Audio in STM32?
c++|stm32|platformio
0
56
1
73,265,624
73,265,624
0
true
2022-07-14T13:05:47.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to cancel background noise while playing PCM Audio in STM32?<p>I am trying to play Audio from PCM data in STM32(blackpill_f411ce). I can hear the audio b...
72,988,213
TypeScript error is not being hightlighted when Vue framework is being used in IntelliJ IDEA IDEs<p>When Vue framework is being used, in the right bottom corner, <strong>Vue</strong> label before <strong>TypeScript 〈version〉</strong> is being displayed:</p> <p><a href="https://i.stack.imgur.com/xijrf.png" rel="nofollow...
<p>The IDE needs to know which <code>tsconfig.json</code> do each TypeScript file obeys. To specify it, either <code>files</code> or <code>include</code> must be filled.</p> <p>In the <strong>files</strong> case, besides specific files we can specify also directories:</p> <pre class="lang-json prettyprint-override"><co...
TypeScript error is not being hightlighted when Vue framework is being used in IntelliJ IDEA IDEs
typescript|vue.js|webstorm
0
56
1
73,608,751
73,608,751
0
true
2022-07-15T01:33:47.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TypeScript error is not being hightlighted when Vue framework is being used in IntelliJ IDEA IDEs<p>When Vue framework is being used, in the right bottom cor...
72,244,580
Change Spinner Text content programmatically<p>I have a spinner, and I want to find a way to change the dropdown for my spinner. I want to change my text content through code, but I'm not sure how to do that.</p> <p>This is the structure of my Spinner:</p> <pre><code>val adapter: ArrayAdapter&lt;String&gt; = ArrayAdapt...
<p>If you want to change the list your adapter is showing you can use <code>clear</code> and <code>addAll</code> to change the data.</p> <p>For this case you will want to make sure not to pass the list in to the constructor of the adapter, otherwise calling <code>clear</code> or <code>addAll</code> will attempt to modi...
Change Spinner Text content programmatically
android|kotlin|spinner
0
56
2
72,244,775
72,244,775
0
true
2022-05-14T23:45:12.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change Spinner Text content programmatically<p>I have a spinner, and I want to find a way to change the dropdown for my spinner. I want to change my text con...
72,269,830
Printing time_t in a vector struct member<p>Sorry, I think this might be a silly question. While trying to use <a href="https://www.cplusplus.com/reference/ctime/ctime/" rel="nofollow noreferrer">ctime</a> to print a time_t inside a vector struct member, the compiler throws me this error <code>argument of type &quot;ti...
<p>Quoting <a href="https://en.cppreference.com/w/cpp/chrono/c/ctime" rel="nofollow noreferrer">cppreference.com</a> on the matter:</p> <blockquote> <p>This function returns a pointer to static data and is not thread-safe. In addition, it modifies the static <code>std::tm</code> object which may be shared with <code>st...
Printing time_t in a vector struct member
c++
0
56
2
72,270,155
72,270,155
0
true
2022-05-17T07:29:56.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Printing time_t in a vector struct member<p>Sorry, I think this might be a silly question. While trying to use <a href="https://www.cplusplus.com/reference/c...
72,270,843
get buttons with xpath with strange attribute<p>in a web page I have to select all the buttons like this :</p> <pre><code>&lt;button :class=&quot;{'complete': isComplete, 'open': open}&quot; :disabled=&quot;orderedEvents.length === 0&quot;&gt;&lt;/button&gt; </code></pre> <p>but with this xpath :</p> <pre><code>//butto...
<p>You can find attributes that contains colons in the name using <code>@*[name()]</code> and find it's value using <code>.</code></p> <pre><code>//button[@*[starts-with(name(),':class') and contains(., \&quot;isComplete, 'open'\&quot;)]] </code></pre>
get buttons with xpath with strange attribute
java|selenium|xpath
0
56
1
72,271,478
72,271,478
0
true
2022-05-17T08:43:47.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: get buttons with xpath with strange attribute<p>in a web page I have to select all the buttons like this :</p> <pre><code>&lt;button :class=&quot;{'complete'...
72,280,381
How to create clean table structure for posting questions in stackoverflow<p>I am trying to understand as to how to post clean data tables in stackoverflow to ask questions. When I try to copy questions from Excel I find it difficult to maintain clean structure and when I try to use the code sample block too I find it ...
<p>Thanks to @Martheen.. The link <a href="https://tabletomarkdown.com/convert-spreadsheet-to-markdown/" rel="nofollow noreferrer">https://tabletomarkdown.com/convert-spreadsheet-to-markdown/</a> helps convert excel and csv file data to proper table structure and it can be copied onto stackoverflow platform for aski...
How to create clean table structure for posting questions in stackoverflow
datatable|nlp-question-answering
0
56
1
72,280,534
72,280,534
0
true
2022-05-17T20:34:37.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create clean table structure for posting questions in stackoverflow<p>I am trying to understand as to how to post clean data tables in stackoverflow t...
72,293,885
Center Headers in Footer to Organize it<p>I was able to find an html and css code to start creating my footer. I was able to make it look a bit the way I want as seen in the following code:</p> <p>However, I wanna be able to center all three headers and I can't seem to find how...</p> <p><div class="snippet" data-lang=...
<p>It makes sense to put all <code>h4</code>'s in a single <code>footer-col</code> div together because you want them grouped in the center. So you can do that, then add <code>display: flex;</code> to <code>footer-col</code> and use <code>justify-content: center;</code> to center them. Then you can add a <code>gap</cod...
Center Headers in Footer to Organize it
html|css|flexbox
1
56
1
72,294,160
72,294,160
0
true
2022-05-18T17:55:47.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Center Headers in Footer to Organize it<p>I was able to find an html and css code to start creating my footer. I was able to make it look a bit the way I wan...
72,277,257
MediaWiki treats CLTF text as RCE<p>Help. I have a weird problem on a MediaWiki 1.37.2 install. We (me &amp; the musician) are trying to get a wiki going for Clan Lord Tune Format music (like midi but with a–g, &quot;.&quot; for flat, &quot;[…]&quot; for chords so &quot;[DFA.]&quot; is a possible chord). However, when ...
<p>Okay. So, We got all the modSec rule IDs exempted that we needed (there we 6 security violations) to by our hosting ISP’s server admin. So ,this case is closed.</p>
MediaWiki treats CLTF text as RCE
mediawiki|mod-security|rce
0
56
2
72,294,627
72,294,627
0
true
2022-05-17T16:00:08.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MediaWiki treats CLTF text as RCE<p>Help. I have a weird problem on a MediaWiki 1.37.2 install. We (me &amp; the musician) are trying to get a wiki going for...
72,300,746
How do I get the file descriptor of a file opened using TextIO.openIn?<p>In Standard ML, I have opened a file using <code>TextIO.openIn &quot;myfile.txt&quot;</code>. This returns a value of type <code>TextIO.instream</code>. How do I get the POSIX file descriptor of type <code>Posix.FileSys.file_desc</code> from this ...
<p>Here's a function which does it, returning a <code>Posix.FileSys.file_desc option</code>.</p> <pre class="lang-ml prettyprint-override"><code>fun instreamToPosixFD (ins: TextIO.instream) : Posix.FileSys.file_desc option = let val (TextPrimIO.RD reader, _) = TextIO.StreamIO.getReader (TextIO.getInstream i...
How do I get the file descriptor of a file opened using TextIO.openIn?
sml|file-descriptor
1
56
1
72,305,923
72,305,923
0
true
2022-05-19T07:58:00.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I get the file descriptor of a file opened using TextIO.openIn?<p>In Standard ML, I have opened a file using <code>TextIO.openIn &quot;myfile.txt&quot...
72,314,735
ssh: dealing with nested strings in bash<p>Im using ssh with a system that has a lot of security settings. The bash command I want to run is:</p> <p>ssh –t user@address su –c ‘echo “user ALL=(ALL) NOPASSWD:ALL” &gt;&gt; /etc/sudoers.d/permissions’</p> <p>This command does not work since su does not recognize the stuff ...
<p>When you pass a command to <code>ssh</code>, it requires quoting both from the local shell and the remote shell.</p> <p>A fix for your case would be to move the first single quote slightly, to prevent the local shell from messing with the command at all. In the internal quoting, we use nested double quotes where the...
ssh: dealing with nested strings in bash
linux|bash|ssh|terminal|sudo
0
56
1
72,318,272
72,318,272
0
true
2022-05-20T06:53:21.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ssh: dealing with nested strings in bash<p>Im using ssh with a system that has a lot of security settings. The bash command I want to run is:</p> <p>ssh –t u...
72,305,683
Typing multiple MUI themes via module augmentation<p>I want to setup two directories in one repository (with one <code>package.json</code> and <code>tsconfig.json</code>) which both will use MUI and TypeScript. Each of these directories will use its own theme (so one <code>ThemeProvider</code> in each root). In the mai...
<p>It is not possible. To achieve a setup like that you have to use multiple <code>tsconfig.json</code>, so the types to not infer with each other.</p>
Typing multiple MUI themes via module augmentation
typescript|material-ui
0
56
1
72,318,282
72,318,282
0
true
2022-05-19T13:43:37.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Typing multiple MUI themes via module augmentation<p>I want to setup two directories in one repository (with one <code>package.json</code> and <code>tsconfig...
72,319,455
Networkx convert graph to tree preserving edge data<p>I have a undirect Graph G containing edge data (a dict). I can see its data with <code>G.edges.data()</code>.</p> <p>I can convert my graph to a tree using <code>networkx.dfs_tree(G)</code> the problem is the edge data is lost.</p> <p>Is it possible to make this con...
<p>Just found myself.</p> <p>Create a undirect Graph that preserves the data (duplicated edges). Then get its edge data attributes creating a dictionary. Use that with <code>nx.set_edge_attributes</code>. Nonexistent edges are ignored per networkx docs.</p> <pre><code>import networkx as nx Gd = nx.DiGraph(G) data = ...
Networkx convert graph to tree preserving edge data
python-3.x|networkx|graph-theory
0
56
1
72,319,846
72,319,846
0
true
2022-05-20T13:08:24.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Networkx convert graph to tree preserving edge data<p>I have a undirect Graph G containing edge data (a dict). I can see its data with <code>G.edges.data()</...
72,326,287
How can a script check if a particular Docker container is running?<p>I would like to have a shell script that checks if a particular container is running.</p> <p>For example, I might want to start the container if it's not already running, or query some piece of information about it like what ports are exposed.</p>
<p>The <a href="https://docs.docker.com/engine/reference/commandline/ps/" rel="nofollow noreferrer"><code>docker ps</code></a> command takes a <code>-f</code> / <code>--filter</code> option to locate the desired container. To test if the container is running by name we might try</p> <pre class="lang-sh prettyprint-over...
How can a script check if a particular Docker container is running?
docker
0
56
1
72,326,288
72,326,288
0
true
2022-05-21T02:42:30.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can a script check if a particular Docker container is running?<p>I would like to have a shell script that checks if a particular container is running.</...
72,327,501
How to create array of pairs of strings?<p>I'm new to C and I have been trying to create and print an array of pairs of strings for a while now but keep getting errors. Here's what I want the array to look like:</p> <pre><code>[[str1, str2], [str3, str4], ...] </code></pre> <p>Here is what I've tried:</p> <pre><code>.....
<h2>Your problem is:</h2> <pre><code>*pairs[i][0] = str1; </code></pre> <p>This copies the reference (and not the value) of <code>str1</code> to <code>pairs[i][0]</code>. If you want to copy the value, You should use <code>strcpy()</code> function in <code>string.h</code> header file. Another solution is the following ...
How to create array of pairs of strings?
arrays|c
-1
56
2
72,327,791
72,327,791
0
true
2022-05-21T07:22:58.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create array of pairs of strings?<p>I'm new to C and I have been trying to create and print an array of pairs of strings for a while now but keep gett...
72,328,923
How do I draw these two shapes below with html CSS?<p>[trying to draw these shapes with HTML and CSS][1]</p> <p>how should I draw them using only HTML and CSS [1]: <a href="https://i.stack.imgur.com/8mvdY.png" rel="nofollow noreferrer">https://i.stack.imgur.com/8mvdY.png</a></p> <p>send me working code if possible</p>
<p>You can replicate those shapes using thick, colored borders.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.shapes{ box-sizing: border-box; width:100px; height:100...
How do I draw these two shapes below with html CSS?
html|css|colors|shapes|square
-3
56
1
72,329,034
72,329,034
0
true
2022-05-21T10:58:45.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I draw these two shapes below with html CSS?<p>[trying to draw these shapes with HTML and CSS][1]</p> <p>how should I draw them using only HTML and CS...
72,336,304
PyPi cannot find distribution for package "winrt", when it is clearly available<p>I've been trying to install the package <code>winrt</code> using pip, but whenever I try to I receive this error: (view image below) <a href="https://i.stack.imgur.com/rK2kC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.c...
<p>The latest version <code>winrt</code> 1.0.21033.1 <a href="https://pypi.org/project/winrt/1.0.21033.1/#files" rel="nofollow noreferrer">provides binary wheels</a> for Python 3.7, 3.8 and 3.9 but not 3.10. Either downgrade your Python or compile from <a href="https://github.com/Microsoft/xlang/tree/master/src/package...
PyPi cannot find distribution for package "winrt", when it is clearly available
python|pypi
1
56
1
72,336,905
72,336,905
0
true
2022-05-22T09:28:49.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PyPi cannot find distribution for package "winrt", when it is clearly available<p>I've been trying to install the package <code>winrt</code> using pip, but w...
72,336,921
Prisma - GroupBy relation (e.g "Most used Hashtags")<p>I would like to show the &quot;Most used Hashtags” in my app.</p> <p>It's just a simple many-to-many relation:</p> <pre><code> model Post { id Int @id @default(autoincrement()) title String @db.VarChar(255) description String ...
<p>Was easier than I thought:</p> <pre><code> return await prisma.hashtag.groupBy({ by: ['name'], _count:{ name: true }, orderBy: { _count: { name: 'desc', } } }) </code></pre>
Prisma - GroupBy relation (e.g "Most used Hashtags")
javascript|mysql|node.js|orm|prisma
0
56
2
72,338,835
72,338,835
0
true
2022-05-22T10:55:49.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Prisma - GroupBy relation (e.g "Most used Hashtags")<p>I would like to show the &quot;Most used Hashtags” in my app.</p> <p>It's just a simple many-to-many r...
72,345,702
WPF make single char bold (TreeViewItem)<p>I have a problem with my C# WPF-Application. For example, I need to make the first letter of the treeViewItem header Bold. Unfortunately I can't find a solution, does anyone know how exactly I can do this?</p> <pre><code>var treeViewItem = new TreeViewItem { ...
<p>You can do this:</p> <pre><code>&lt;TreeViewItem&gt; &lt;TreeViewItem.Header&gt; &lt;TextBlock Loaded=&quot;FrameworkElement_OnLoaded&quot; Text=&quot;This is a test&quot;/&gt; &lt;/TreeViewItem.Header&gt; &lt;/TreeViewItem&gt; </code></pre> <pre><code>private void FrameworkElement_OnLoaded(object se...
WPF make single char bold (TreeViewItem)
c#|.net|wpf|.net-core|frontend
0
56
1
72,346,724
72,346,724
0
true
2022-05-23T08:49:18.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WPF make single char bold (TreeViewItem)<p>I have a problem with my C# WPF-Application. For example, I need to make the first letter of the treeViewItem head...
72,346,793
How to show menu on position of mouse click?<p>I'm trying to show a custom menu on the position of a mouse click within a div but this doesn't seem to be working, the visible logic is working but when I click on the div, the menu only opens under the Typography. Is the Menu meant to be placed somewhere else?</p> <p>Thi...
<p>Can't you just set the position to fixed and use CSS's top and left posititioning according to where the user clicked? Then you set the visibility to true when the user clicks and if the visibility already is true, just hide it and on the next click update it's top and left position.</p> <p>I'm not sure how to do th...
How to show menu on position of mouse click?
javascript|css|reactjs|typescript
0
56
1
72,348,007
72,348,007
0
true
2022-05-23T10:11:20.987Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to show menu on position of mouse click?<p>I'm trying to show a custom menu on the position of a mouse click within a div but this doesn't seem to be wor...
72,370,370
What Would Be a Best Practice to Uniquely specify an Entry With a Boolean Flag in the Database?<p>Let's assume that we have a collection (or table) that is called students, and in our system, we need to persist the best student of all time, which is going to be one and only one among all the students we have. The first...
<p>A simple solution is to create another table:</p> <pre><code>CREATE TABLE BestStudent ( student_id BIGINT PRIMARY KEY, FOREIGN KEY (student_id) REFERENCES Student(student_id) ); </code></pre> <p>This table has just one row, so it must reference only one student. You don't need a new column in the <code>Student</...
What Would Be a Best Practice to Uniquely specify an Entry With a Boolean Flag in the Database?
sql|database-design|nosql|entity-relationship
-2
56
1
72,370,450
72,370,450
0
true
2022-05-24T23:11:03.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What Would Be a Best Practice to Uniquely specify an Entry With a Boolean Flag in the Database?<p>Let's assume that we have a collection (or table) that is c...
72,368,706
why it shows just one of them in activity? discord js v13<p>i have <strong>this code :</strong></p> <pre><code>con.query(`SELECT * FROM count WHERE default = 'true'`, (err, row) =&gt; { activities = [ `${row[0].members} Members`, `${row[0].channels} Channels` ]; }); setIn...
<p>i got it. yeah it's true JavaScript start at <code>0</code> and formula to <strong>get a random element from an array is</strong>: <code>var item = activities[Math.floor(Math.random() * activities.length)];</code> so i had to remove <strong>this :</strong> <code>const newActivity = activities[randomIndex];</code> an...
why it shows just one of them in activity? discord js v13
javascript|discord|discord.js
0
56
2
72,375,660
72,375,660
0
true
2022-05-24T19:49:15.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why it shows just one of them in activity? discord js v13<p>i have <strong>this code :</strong></p> <pre><code>con.query(`SELECT * FROM count WHERE default =...
72,380,121
Excel VBA Last Row / Column Script?<p>I'm trying to get the correct ranges for a program that's supposed to find totals on a given sheet. I'm struggling a little bit here with the syntax.</p> <p>I want to always select one column outside of the last column with data, and then autopopulate that column with data starting...
<p>It is easier to work with <code>Cells</code> here and to avoid using <code>ActiveCell</code> and <code>Select/Selection</code>. Also there is no need to use <code>AutoFill</code>, since you can write a formula to a multi-cell range in one step.</p> <pre><code>With ActiveSheet LastColumn = .Cells.Find(&quot;*&quo...
Excel VBA Last Row / Column Script?
excel|vba|script
0
56
2
72,380,465
72,380,465
0
true
2022-05-25T15:06:52.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel VBA Last Row / Column Script?<p>I'm trying to get the correct ranges for a program that's supposed to find totals on a given sheet. I'm struggling a li...
72,321,166
C++ multithreaded program work fine in windows, throws "resource temporarily unavailable" in Linux<p><strong>Edit:</strong></p> <p>Based on Jonathan's comment, I tried to create a standalone program to reproduce this issue. I was unable to recreate the issue.</p> <p>Then I switched to Jeremy's comment to make sure I re...
<p>Turns out there was a bug in the upstream code which was making repeated calls to setStartTime.</p> <p>The reason why the issue showed up only in Linux is because it is a much faster OS. Windows would probably have the same experience if I let the code run for a few days. (<em>in case anyone's curious, the program t...
C++ multithreaded program work fine in windows, throws "resource temporarily unavailable" in Linux
c++|linux|multithreading
0
56
1
72,381,292
72,381,292
0
true
2022-05-20T15:07:57.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++ multithreaded program work fine in windows, throws "resource temporarily unavailable" in Linux<p><strong>Edit:</strong></p> <p>Based on Jonathan's commen...
72,385,473
How to make a gameObject Follow another game object on the x axis only?<p>I want to figure out how to make this gameobject follow another game object on the x axis only. here is all I have so far.</p> <pre><code>public Transform mouse; private Vector3 offset; // Start is called before the first frame update void Sta...
<p>You almost had it! I might do a bad job explaining this but the reason that doesn't work is because a vector3 has readonly properties, to change it you have to create a new one, so there may be a better way but here's what I always used.</p> <pre><code>new Vector3(mouse.x, transform.position.y, transform.position.z)...
How to make a gameObject Follow another game object on the x axis only?
c#|unity3d
0
56
1
72,385,518
72,385,518
0
true
2022-05-26T00:34:11.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a gameObject Follow another game object on the x axis only?<p>I want to figure out how to make this gameobject follow another game object on the ...
72,349,860
d3 force graph, conditionally rendering nodes depending on amount of connected links<p>I have a force-directed graph with nodes that vary in size depending on how many links they are connected to.</p> <p>What I would like to do is the following : Make nodes render conditionally so that those with &quot;d.weight&quot; u...
<p>Ok so I finally figured out on my own.</p> <p>The trick was to filter the nodes and then append the desired element. In my case, since i wanted to append different elements, I had to filter twice (once per condition)</p> <p>Here is the fixed code below:</p> <pre><code> var node = g .selectAll(&quot;.circle-g...
d3 force graph, conditionally rendering nodes depending on amount of connected links
d3.js
1
56
1
72,389,100
72,389,100
0
true
2022-05-23T14:00:36.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: d3 force graph, conditionally rendering nodes depending on amount of connected links<p>I have a force-directed graph with nodes that vary in size depending o...
72,387,959
create auto increment integer field in django<p>i want to create auto increment integer field. I want to create an ID for each user. I am a beginner and please explain completely and clearly :) I want to automatically assign an ID to each user.</p> <p>my Model:</p> <pre><code>from django.db import models class User_acc...
<p>You did not specify a field with <a href="https://docs.djangoproject.com/en/dev/ref/models/fields/#primary-key" rel="nofollow noreferrer"><strong><code>primary_key=True</code></strong> <sup>[Django-doc]</sup></a>, this means that Django will <em>automatically</em> add a field to your model named <code>id</code>.</p>...
create auto increment integer field in django
django
1
56
1
72,389,614
72,389,614
0
true
2022-05-26T07:00:28.427Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: create auto increment integer field in django<p>i want to create auto increment integer field. I want to create an ID for each user. I am a beginner and plea...
72,300,636
Add sprites with different sizes<p>I need to add sprites of different sizes to my forge viewer project.</p> <p>As far as I know, I cannot call <code>dataVizExtn.addViewables(viewableData)</code> multiple times. Considering that sprite size is set on <code>viewableData</code> level, what is the solution?</p>
<p>The DataViz extensions currently only support a single size setting for all sprites, mainly to keep the rendering of large number of sprites as efficient as possible.</p> <p>If you want more control over the individual sprites, you could use &quot;lower level&quot; primitives instead, and display the sprites with yo...
Add sprites with different sizes
autodesk-forge|autodesk-viewer
0
56
1
72,391,619
72,391,619
0
true
2022-05-19T07:50:20.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add sprites with different sizes<p>I need to add sprites of different sizes to my forge viewer project.</p> <p>As far as I know, I cannot call <code>dataVizE...
72,386,287
Is is possible to change cursor blink rate and cursor movement speed in wpf?<p>I tested both Word 2010 and Word 2019 on the same systems and same Keyboard Properties. I did not change the properties of the Windows Keyboard.</p> <p>Cursor movement and cursor blinking were fast in Word 2010, but very slow in Word 2019.</...
<p>WPF basically respects Windows's control panel settings of the blink rate. So does Word 2019 on my system. If you want to change the rate on your textbox, your only option is to disable the built-in caret (text cursor), and draw it yourself.</p> <p>The following is <strike>shamelessly stolen</strike> inspired by <a ...
Is is possible to change cursor blink rate and cursor movement speed in wpf?
c#|wpf
1
56
1
72,399,716
72,399,716
0
true
2022-05-26T03:15:17.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is is possible to change cursor blink rate and cursor movement speed in wpf?<p>I tested both Word 2010 and Word 2019 on the same systems and same Keyboard Pr...
72,368,588
Why the webrtc android camera stream is rotated at endpoint?<p>I am sending camera video from android to a janus server, but when I check from website, the video is rotated, Do you know why and How should I fix this?</p> <p><img src="https://i.stack.imgur.com/crkdn.png" alt="image demo" /></p>
<p>I had to change something in the room config <a href="https://github.com/meetecho/janus-gateway/issues/1021#issuecomment-335792000" rel="nofollow noreferrer">https://github.com/meetecho/janus-gateway/issues/1021#issuecomment-335792000</a></p>
Why the webrtc android camera stream is rotated at endpoint?
webrtc|android-camera|android-camera2|webrtc-android|janus-gateway
0
56
1
72,425,271
72,425,271
0
true
2022-05-24T19:37:24.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why the webrtc android camera stream is rotated at endpoint?<p>I am sending camera video from android to a janus server, but when I check from website, the v...
72,267,760
How to set up conditionals in Google OR-Tools?<p>I’m trying to use OR-Tools to solve custom nurse scheduling problem - essentially each nurse works exactly two paired shifts, and gives a ranked list of the paired preferences.</p> <p>For example, nurse1 has the following preferences:</p> <ol> <li>shift 1 and shift 7</l...
<p>For each nurse, I ended up creating a new <code>BoolVar</code> for each choice, a <code>BoolAnd</code> for each shift pair, and a <code>BoolOr</code> for all three shift choices.</p> <pre class="lang-py prettyprint-override"><code>first_choice = model.NewBoolVar(&quot;first_choice&quot;) second_choice = model.NewBoo...
How to set up conditionals in Google OR-Tools?
python|or-tools
1
56
2
72,442,278
72,442,278
0
true
2022-05-17T03:07:13.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to set up conditionals in Google OR-Tools?<p>I’m trying to use OR-Tools to solve custom nurse scheduling problem - essentially each nurse works exactly ...
72,396,825
How to add my logic as per my understanding factorial?<p>I am trying to calculate the factorial, like take an example 5!</p> <p>5 * 4 * 3 * 2 * 1 = 120 right</p> <p>20 * 3 * 2 * 1</p> <p>60 * 2 * 1</p> <p>120 * 1</p> <p>120</p> <p>How to apply this logic in code? I tried this:</p> <pre><code>int sum = 0; int num = 5; f...
<pre><code>private int factorial(int n) { if (n &lt; 0) { throw new IllegalArgumentException(&quot;n &lt; 0&quot;); } int sum = 1; for (int i = n; i &gt; 1; i--) { sum *= i; } return sum; } </code></pre>
How to add my logic as per my understanding factorial?
java|logic|factorial
-4
56
3
72,535,988
72,535,988
0
true
2022-05-26T19:07:09.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add my logic as per my understanding factorial?<p>I am trying to calculate the factorial, like take an example 5!</p> <p>5 * 4 * 3 * 2 * 1 = 120 right...
72,288,854
File upload to firebase storage fails, java security exception, permission denied<p>I am trying to write a simple function to register a user to firebase and upload his profile picture to firebase storage.</p> <p>The code I currently have:</p> <pre><code>public static void createNewUser(String email, String username, S...
<p>Found the error, I was using the wrong intent in the file chooser, here's the code snippet:</p> <pre><code>ActivityResultLauncher&lt;Intent&gt; chooserLauncher = registerForActivityResult( new ActivityResultContracts.StartActivityForResult(), result -&gt; { if (result.getResultCode() != Activity.RESU...
File upload to firebase storage fails, java security exception, permission denied
android|firebase|firebase-storage
0
56
1
72,573,827
72,573,827
0
true
2022-05-18T12:04:03.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: File upload to firebase storage fails, java security exception, permission denied<p>I am trying to write a simple function to register a user to firebase and...
72,364,108
How can I enumerate pixels in a one-pixel width numpy binary mask?<p>How can I enumerate pixels in a one-pixel width numpy binary mask? Enumeration should be in one direction (clockwise or opposite). Mask could touch the edge of the image or be in the center.</p> <p>I would like to use pixels numbers for the creation 1...
<p>You can just start from the first pixel and then</p> <ol> <li>remove the pixel from the image (or mark as used)</li> <li>look in the 3x3 neighborhood for another unused pixel</li> <li>move there and repeat from 1</li> </ol> <p>If the path is exactly one pixel wide this algorithm with traverse it and at each intermed...
How can I enumerate pixels in a one-pixel width numpy binary mask?
python|numpy|image-processing|scipy|scikit-image
0
56
1
72,579,756
72,579,756
0
true
2022-05-24T13:48:25.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I enumerate pixels in a one-pixel width numpy binary mask?<p>How can I enumerate pixels in a one-pixel width numpy binary mask? Enumeration should be...
72,335,578
How to apply multiple functions to all sheets and then save as one excel workbook<p>So I imported all sheets from an excel file using <code>pd.read_excel('df.xlsx',sheet_name=None)</code>. I have a dict with key value pairs. In all these sheets there is a table present. I want to make the first column as index and then...
<p>As you have a dict of key, values, where each value is a df, you can iterate over them and first set the index, next create a column based on the other df. Use:</p> <pre><code>for name, df in data.items(): df = df.set_index('info') df['new col'] = another_df['specified col'] </code></pre>
How to apply multiple functions to all sheets and then save as one excel workbook
pandas|dataframe|dictionary
1
56
1
72,335,681
72,335,681
0
true
2022-05-22T07:23:11.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to apply multiple functions to all sheets and then save as one excel workbook<p>So I imported all sheets from an excel file using <code>pd.read_excel('df...
72,322,714
PowerShell GUI - Move line from TextBox 1 to TextBox 2<p>I am developing a script that will ping multiple computers and move the ones that were online to another inputbox. The script below works to ping multiple computers, but I am not sure how to move the computer name to the next inputbox($Inputbox_success).</p> <p>...
<p>As stated in comments, even though this is doable with a <a href="https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.textbox?view=windowsdesktop-6.0" rel="nofollow noreferrer"><code>TextBox</code></a>, this would be easier to accomplish using a <a href="https://docs.microsoft.com/en-us/dotnet/api/syste...
PowerShell GUI - Move line from TextBox 1 to TextBox 2
powershell|user-interface
1
56
2
72,323,914
72,323,914
0
true
2022-05-20T17:28:41.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PowerShell GUI - Move line from TextBox 1 to TextBox 2<p>I am developing a script that will ping multiple computers and move the ones that were online to ano...
72,345,683
Django: URL Path not found jumps into next app<p>I have two apps:</p> <p>backend shop</p> <p>I my urls in main app dir:</p> <pre><code>path('backend/', include('backend.urls')), path('', include('shop.urls')), </code></pre> <p>the problem is if I write in my url: localhost:8000/backend/abc which not exist Django jumps ...
<p>For now I fixed it with</p> <p>shop/views.py</p> <pre><code>if category_slug == 'backend': response = render( request, 'backend/404.html', ) response.status_code = 404 return response else: </code></pre> <p>until I found another solution. It looks like that the URL dispatcher is worki...
Django: URL Path not found jumps into next app
django|django-urls
0
56
2
72,357,816
72,357,816
0
true
2022-05-23T08:47:34.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django: URL Path not found jumps into next app<p>I have two apps:</p> <p>backend shop</p> <p>I my urls in main app dir:</p> <pre><code>path('backend/', inclu...
72,274,996
jQuery HTML Singular / Plural Text based on select multiple<p>I'm trying to get the singular/plural for the text before the array, based on how many options are selected in the array.</p> <p>For example, if only one selected option, it should be <strong>Result in Category 1</strong> <br> if two or more are selected: <s...
<p>You can use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals" rel="nofollow noreferrer">Template literals (Template strings)</a></p> <p>All I have changed is the following line from:</p> <pre><code>$('.asg-heading .dynamicKat').html(&quot;Result in &quot; + humanLang(ausbi...
jQuery HTML Singular / Plural Text based on select multiple
javascript|jquery
0
56
1
72,275,077
72,275,077
0
true
2022-05-17T13:33:26.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: jQuery HTML Singular / Plural Text based on select multiple<p>I'm trying to get the singular/plural for the text before the array, based on how many options ...
72,311,981
How to compress a dataframe so that the row-to-row difference is at least some threshold in magnitude<p>I have a DataFrame containing approximately 7000 rows and 2 columns which looks like this:</p> <pre class="lang-py prettyprint-override"><code> Time Voltage 0 0.0 32.965541 1 0.5 32.914965 2 1.0 32....
<h2>New answer</h2> <p>Okay so after some time, I think I've finally come to understand what you're asking. It seems that you want to essentially &quot;compress&quot; the data so that <em>each chronological time step has a difference in voltage that is at least 1V in magnitude</em>.</p> <p>For example, starting with th...
How to compress a dataframe so that the row-to-row difference is at least some threshold in magnitude
python|pandas|numpy
1
56
1
72,312,103
72,312,103
0
true
2022-05-19T23:11:05.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to compress a dataframe so that the row-to-row difference is at least some threshold in magnitude<p>I have a DataFrame containing approximately 7000 rows...
72,243,158
movie similarity using Word2Vec and deep Convolutional Autoencoders<p>i am new to python and i am trying to create a model that can measure how similar movies are based on the movies description,the steps i followed so far are:</p> <p>1.turn each movie description into a vector of 100*(maximum number of words possible ...
<ol> <li><p>The output of your model is (batch_size, 260, 228, 1), while your targets appear to be (batch_size, 21300). You can solve that problem by either adding a <code>tf.keras.layers.Flatten()</code> layer to the end of your model, or by not flattening your input.</p> </li> <li><p>You probably should not be using ...
movie similarity using Word2Vec and deep Convolutional Autoencoders
tensorflow|keras|deep-learning|word2vec|autoencoder
0
56
1
72,244,349
72,244,349
0
true
2022-05-14T19:03:03.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: movie similarity using Word2Vec and deep Convolutional Autoencoders<p>i am new to python and i am trying to create a model that can measure how similar movie...
72,284,745
Flutter : change bordercolor after validation<p>I want to change the <strong>borderColor</strong> of the <code>TextFormField</code> to a green color on successfull validation. <strong>The color should not fade on losing focus though</strong>. Is there something like <code>successBorder</code> similar to <em>error/focus...
<p><em>Thanks to the answers by <a href="https://stackoverflow.com/a/72285156/15823478">@Timur</a> and <a href="https://stackoverflow.com/a/72285198/15823478">kashif</a></em></p> <p>Here's what i did to <strong>change the borderColor of the <code>TextFormField</code> after validation</strong> :</p> <blockquote> <p>1 - ...
Flutter : change bordercolor after validation
flutter|flutter-layout|textformfield
0
56
3
72,290,927
72,290,927
0
true
2022-05-18T07:21:01.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter : change bordercolor after validation<p>I want to change the <strong>borderColor</strong> of the <code>TextFormField</code> to a green color on succe...
72,285,636
How to use Maple to solve equation normalization coefficient<p>I want to ask for the normalization coefficient of the solution <strong>f(x)</strong>.</p> <p>The implementation method in <strong>Mathematica</strong> is as follows:</p> <pre><code>f[x] := Sin[(n Pi x)/(2 a)]; norm = FullSimplify[1/Integrate[Abs[f[x]]^2, {...
<pre><code>restart; kernelopts(version); Maple 2022.0, X86 64 LINUX, Mar 8 2022, Build ID 1599809 assume(n::posint); f := abs(sin(1/2*n*Pi*x/a))^2: simplify(combine(1/int(convert(f,Heaviside,x), x=0..a))); 2 - a simplify(combine(1/int(f,x=0..a))) assuming a::re...
How to use Maple to solve equation normalization coefficient
maple
1
56
1
72,293,689
72,293,689
0
true
2022-05-18T08:26:24.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use Maple to solve equation normalization coefficient<p>I want to ask for the normalization coefficient of the solution <strong>f(x)</strong>.</p> <p>...
72,331,776
change dataframe pivot_table headers to save it in an excel file<p>I have a nested hearders in a dataframe after pivoting it and I'd like to make it flat, with repeated item on each rows (like in a excel) May you help me ?</p> <pre><code>import pandas as pd data = { &quot;year&quot;: [2022, 2022 , 2021 , 2021 , 2020...
<p>You need to use <code>droplevel(0)</code> which will remove the top level (Sales). Setting <code>columns.name</code> to <code>None</code> will remove the <code>Products</code>. So, after <code>df2</code> is created, add these lines...</p> <pre><code>&gt;&gt; df2.columns = df2.columns.droplevel(0) &gt;&gt; df2.column...
change dataframe pivot_table headers to save it in an excel file
python|pandas|dataframe|pivot-table|flat
0
56
2
72,331,985
72,331,985
0
true
2022-05-21T17:21:32.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: change dataframe pivot_table headers to save it in an excel file<p>I have a nested hearders in a dataframe after pivoting it and I'd like to make it flat, wi...
72,259,363
Is it possible to only store a part of my query results in a variable for stored functions?<p>I'm extremely new to PL/SQL in general and am trying out stored functions and procedures.</p> <p>I have the below select statement:</p> <pre><code>SELECT query1.* FROM ( SELECT o_custkey, COUNT (o_orderkey) AS ordercount ...
<p>From Oracle 12, you can simplify your query to:</p> <pre class="lang-sql prettyprint-override"><code>SELECT o_custkey FROM orders GROUP BY o_custkey ORDER BY COUNT(o_orderkey) DESC FETCH FIRST ROW WITH TIES; </code></pre> <p>Or, before Oracle 12, you can use:</p> <pre class="lang-sql prettyprint-override"><code>SE...
Is it possible to only store a part of my query results in a variable for stored functions?
oracle|plsql
0
56
2
72,260,402
72,260,402
0
true
2022-05-16T12:40:40.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to only store a part of my query results in a variable for stored functions?<p>I'm extremely new to PL/SQL in general and am trying out stored...
72,332,418
Recall the char function<p>I'm very new to programming, and I'm doing a simple bot in C, that has a calculator function. I'm having some trouble in this piece of code:</p> <pre><code>char operation = get_char(&quot;Insert the mathematical operation: &quot;); float x = get_float(&quot;X: &quot;); float y = get_float(&qu...
<p>I don't have CS50, therefore, plain C. The construct you might want to use is a do-while loop.</p> <pre class="lang-c prettyprint-override"><code>#include &lt;stdio.h&gt; #include &lt;math.h&gt; char get_char(char * msg) {char c; printf(&quot;%s&quot;, msg); scanf(&quot; %c&quot;, &amp;c); return c;} float get_floa...
Recall the char function
c|cs50
0
56
1
72,333,750
72,333,750
0
true
2022-05-21T18:54:28.303Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Recall the char function<p>I'm very new to programming, and I'm doing a simple bot in C, that has a calculator function. I'm having some trouble in this piec...
72,286,871
"Error '424' Object required" when trying to display "Temp.jpg" in an Image Box (imgRpts1)<p>The <code>Application</code> I am working on <code>Runs</code> in front of the <code>Excel Workbook</code> so the <code>User</code> has NO direct access to the individual <code>Worksheets</code>. The primary area of concern is ...
<p>Somewhat as a result of a question from @Ambie, I revisited the <code>Module Code</code> for <code>Function DisplayRange</code>. I remembered a similar problem I had when trying to to move <code>Code</code> from the <code>UserForm</code> to a <code>Module</code> and kept getting a <code>Variable Not Defined Error</c...
"Error '424' Object required" when trying to display "Temp.jpg" in an Image Box (imgRpts1)
excel|vba|image|controls|box
-1
56
1
72,288,067
72,288,067
0
true
2022-05-18T09:50:15.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: "Error '424' Object required" when trying to display "Temp.jpg" in an Image Box (imgRpts1)<p>The <code>Application</code> I am working on <code>Runs</code> i...