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,919,310
How to minimize duplicate code in Go Mux when always trying to return same response structure?<p>I have tons of code similar to the following code snippet that I just try to fill my response struct, json marshal the output, set status code and return the result:</p> <pre><code>if err := json.NewDecoder(r.Body).Decode(&...
<p>Minimize code duplication by moving the decode call and error handling to a reusable function:</p> <pre><code>// Decode returns true if the request body is successfully decoded // to the value pointed to by pv. Otherwise, decode writes an error // response and returns false. func decode(rw http.ResponseWriter, r *ht...
How to minimize duplicate code in Go Mux when always trying to return same response structure?
json|go|request|mux
1
64
2
72,922,335
72,922,335
0
true
2022-07-09T06:02:17.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to minimize duplicate code in Go Mux when always trying to return same response structure?<p>I have tons of code similar to the following code snippet th...
72,929,792
Bootstrap 5 navbar dropdown links don't work on small screens <576px<p>I'm new to this. I have a working navbar with dropdown that has 3 links. After expansion, the dropdown links display a card upon clicking (cards show contact info), and all works fine...except for when I go to mobile view below &lt;576px.</p> <p>I...
<p><strong>Remove the &quot;fixed-top&quot; class from nav and header tags</strong>, removing this class makes the tags rendered one-after the other in the default &quot;static&quot; positioning way.</p> <pre><code> &lt;nav class=&quot;navbar navbar-expand-md navbar-dark&quot;&gt; &lt;header class=&quot;container tex...
Bootstrap 5 navbar dropdown links don't work on small screens <576px
javascript|navbar|bootstrap-5|bootstrap-cards
0
64
1
72,930,183
72,930,183
0
true
2022-07-10T15:45:46.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bootstrap 5 navbar dropdown links don't work on small screens <576px<p>I'm new to this. I have a working navbar with dropdown that has 3 links. After expan...
72,934,964
How to update specific column table value after create migrations Laravel?<p>currently I want to update my existing table by adding new column. Let's say the column name is <code>is_active</code> with default value is true. I create new migrations for this.</p> <p>Then I want to update specific item within this table s...
<p>Use <a href="https://laravel.com/docs/8.x/migrations#creating-columns" rel="nofollow noreferrer">migrations</a> to add a column to your table:</p> <pre><code>Schema::table('your_table', function (Blueprint $table) { $table-&gt;boolean('is_active'); }); </code></pre> <p>Then you can <a href="https://laravel.com/d...
How to update specific column table value after create migrations Laravel?
php|laravel|laravel-8
2
64
2
72,935,310
72,935,310
0
true
2022-07-11T07:19:08.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to update specific column table value after create migrations Laravel?<p>currently I want to update my existing table by adding new column. Let's say the...
72,905,356
Spring Boot Kafka suppress exception<p>I have a kafka listener where if implementation throws exceptions, it will retry a few times. When exception is thrown, it is logged as error. This pollutes our Sentry log. I would like to change Kafka's consumers error level to warn level.</p> <p>Details:</p> <p>I have a Kafka li...
<p>It turns out retryable topic will not log errors as exception until it hits dead letter topic, so no action was needed.</p>
Spring Boot Kafka suppress exception
java|spring-boot|apache-kafka
0
64
1
72,945,279
72,945,279
0
true
2022-07-07T23:55:06.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spring Boot Kafka suppress exception<p>I have a kafka listener where if implementation throws exceptions, it will retry a few times. When exception is thrown...
72,949,382
typedef vs extend classes<p>I have a base class</p> <pre><code>abstract class Repository&lt;T&gt; { Future&lt;List&lt;T&gt;&gt; getAll(); Future&lt;T&gt; getByID(int id); } </code></pre> <p>Then I would extend it just to specify type. But Dart has interesting syntax <code>typedef ... = ...</code>. What is better?</...
<p>You should use inheritance, because typedef required for creating aliases.</p> <pre><code>abstract class Repository&lt;T&gt; { Future&lt;List&lt;T&gt;&gt; getAll(); Future&lt;T&gt; getByID(int id); } // with alias typedef UserRepository = Repository&lt;User&gt;; class UserRepositoryImpl extends UserRepository...
typedef vs extend classes
flutter|dart
0
64
1
72,950,772
72,950,772
0
true
2022-07-12T08:42:05.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: typedef vs extend classes<p>I have a base class</p> <pre><code>abstract class Repository&lt;T&gt; { Future&lt;List&lt;T&gt;&gt; getAll(); Future&lt;T&gt;...
72,960,020
How to make a text right below an icon in BottomAppBar in flutter?<p>So I have a BottomAppBar and i'm trying to have a text right below the icon button, I have tried using Column with mainaxissize set to min and I have also tried to use wrap with the lowest spacing i can do but none of these methods put the text right ...
<p>Change the IconButton widget as follows</p> <pre><code> Wrap( crossAxisAlignment: WrapCrossAlignment.center, direction: Axis.vertical, children: [ IconButton( icon: Icon( Icons.home_outlined, ...
How to make a text right below an icon in BottomAppBar in flutter?
android|ios|flutter|dart|flutter-layout
0
64
2
72,960,108
72,960,108
0
true
2022-07-13T01:40:31.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a text right below an icon in BottomAppBar in flutter?<p>So I have a BottomAppBar and i'm trying to have a text right below the icon button, I ha...
72,964,730
Failed to load one or more resources error when moving resources to different subscription<p>I am performing move operation for resources in one subscription to another subscription. I have resources like storage accounts, Key vaults etc in my subscription.</p> <p>All resources are moving without any error except Data ...
<blockquote> <p><strong>Please <strong>note</strong> that, you cannot perform move operation on <code>Data Lake accounts </code> as mentioned in this <a href="https://docs.microsoft.com/en-gb/azure/azure-resource-manager/management/move-support-resources#microsoftdatalake" rel="nofollow noreferrer"><strong>MsDoc</stron...
Failed to load one or more resources error when moving resources to different subscription
azure-storage-account|azure-rbac
0
64
1
72,965,699
72,965,699
0
true
2022-07-13T10:26:46.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Failed to load one or more resources error when moving resources to different subscription<p>I am performing move operation for resources in one subscription...
72,965,365
I need to check is there any duplicate array exist or not<p>var myarray = [ { &quot;msf&quot;: &quot;3.98&quot;, &quot;ptc&quot;: &quot;5.00&quot; }, { &quot;msf&quot;: &quot;3.98&quot;, &quot;ptc&quot;: &quot;1.00&quot; }, { &quot;msf&quot;: &quot;3.98&quot;, &quot;ptc&quot;: &quot;1.00&quot; } ]</p> <p>Expect answer ...
<p>If you only want to know <em>if</em> there are duplicates, not caring which they are, you can use a 'Set' to see if the number of unique elements is less than the original array:</p> <pre><code>const hasduplicates = new Set(myarray.map(JSON.stringify)).size &lt; myarray.length; </code></pre> <p>POC to play around wi...
I need to check is there any duplicate array exist or not
javascript|jquery
0
64
3
72,966,136
72,966,136
0
true
2022-07-13T11:17:15.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I need to check is there any duplicate array exist or not<p>var myarray = [ { &quot;msf&quot;: &quot;3.98&quot;, &quot;ptc&quot;: &quot;5.00&quot; }, { &quot...
72,968,410
Label doesn't transform on input focus<p>I want to transform a label of an input when someone clicks on the input. But it doesn't transform.</p> <p>If I do <code>.user-input:focus, .user-input:valid</code> it changes the input which means it should work with the label.</p> <p><div class="snippet" data-lang="js" data-hi...
<ul> <li><strong>in css we can only select next sibling, we cannot select sibling that comes before selector sibling in DOM</strong>.</li> <li>so, I have just placed <code>label</code> after <code>input</code>.</li> <li>Use below css to keep label before input in view.</li> </ul> <pre class="lang-css prettyprint-overri...
Label doesn't transform on input focus
html|css
0
64
2
72,968,692
72,968,692
0
true
2022-07-13T14:57:35.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Label doesn't transform on input focus<p>I want to transform a label of an input when someone clicks on the input. But it doesn't transform.</p> <p>If I do <...
72,867,820
Error while Installing kimimaro 3.2.1 for Python<p>I am a newbie running pip version 22.1.2, Python 3.10 on Windows 11 (I also have Visual Studio Build Tools 2022). I am trying to install the following Python Package: kimimaro 3.2.1 (<a href="https://pypi.org/project/kimimaro/" rel="nofollow noreferrer">https://pypi.or...
<p>Ok, I managed to solve the issue with the help of one of kimimaro's creators. DracoPy had an installation problem for python 3.10. It worked fine on python 3.9, which also allowed for a successful kimimaro installation : )</p>
Error while Installing kimimaro 3.2.1 for Python
python|python-3.x|python-packaging|python-wheel
0
64
1
72,969,029
72,969,029
0
true
2022-07-05T10:24:43.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error while Installing kimimaro 3.2.1 for Python<p>I am a newbie running pip version 22.1.2, Python 3.10 on Windows 11 (I also have Visual Studio Build Tools...
72,981,891
Angular Error: Type 'AbstractControl | null' is not assignable to type 'AbstractControl'<p>I tried to fix this problem with an $any(), but I don't think I did it correctly. Could someone help me with this error, please?</p> <p>The error occurs on these lines of code:</p> <p>get email(): AbstractControl { return this.lo...
<pre><code>get email(): AbstractControl { return this.loginForm.get('email'); } </code></pre> <p><code>this.loginForm.get('email');</code> returns <code>AbstractControl&lt;ɵGetProperty&lt;TRawValue, P&gt;&gt; | null</code>, so it can be <code>AbstractControl</code> or <code>null</code>. See <a href="https://angular...
Angular Error: Type 'AbstractControl | null' is not assignable to type 'AbstractControl'
angular|angular-reactive-forms|angular2-forms|angular-abstract-control
-1
64
1
72,982,435
72,982,435
0
true
2022-07-14T14:07:25.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular Error: Type 'AbstractControl | null' is not assignable to type 'AbstractControl'<p>I tried to fix this problem with an $any(), but I don't think I di...
72,984,304
What is an STG Region in Azure?<p>Found in locations/regions appended by <code>STG</code> when running <code>az vm list-skus --size &quot;Standard_A&quot; --resource-type &quot;virtualMachines&quot; --output table</code>. Example <code>SouthCentralUSSTG</code>.</p> <p>Not sure what does it mean. Is this a valid region ...
<p>I have tried to list the all-region in azure i didn't found any region like STG AFAIK, it's not valid to use in azure</p>
What is an STG Region in Azure?
azure|azure-virtual-machine|region
0
64
1
72,984,600
72,984,600
0
true
2022-07-14T17:12:30.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is an STG Region in Azure?<p>Found in locations/regions appended by <code>STG</code> when running <code>az vm list-skus --size &quot;Standard_A&quot; --...
72,984,915
changing style of mui stepper<p>I would like to change the following code to meet my needs</p> <p>I need to change the icon step from <a href="https://i.stack.imgur.com/dtPHU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dtPHU.png" alt="enter image description here" /></a></p> <p>to this : <a href=...
<p>The idea is to this solution is to add a <code>padding</code> to the active icon, then drawing a round <code>border</code> around that.</p> <pre><code>&quot;.MuiSvgIcon-root.Mui-active&quot;: { padding: &quot;3px&quot;, borderRadius: &quot;50%&quot;, border: &quot;1px solid #1976d2&quot;, marginY: &quot;-4px...
changing style of mui stepper
css|reactjs|material-ui|stepper
0
64
2
72,985,452
72,985,452
0
true
2022-07-14T18:05:40.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: changing style of mui stepper<p>I would like to change the following code to meet my needs</p> <p>I need to change the icon step from <a href="https://i.stac...
72,937,566
What is the true getrusage resolution?<p>I'm trying to measure <a href="https://man7.org/linux/man-pages/man2/getrusage.2.html" rel="nofollow noreferrer">getrusage</a> resolution via simple program:</p> <pre><code>#include &lt;cstdio&gt; #include &lt;sys/time.h&gt; #include &lt;sys/resource.h&gt; #include &lt;cassert&g...
<p>The publicly defined tick interval is nothing more than a common reference point for the default time-slice that each process gets to run. When its tick expires the process loses its assigned CPU which then begins executing some other task, which is given another tick-long timeslice to run.</p> <p>But that does not ...
What is the true getrusage resolution?
c++|c|linux|getrusage
1
64
1
72,987,189
72,987,189
0
true
2022-07-11T11:07:25.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the true getrusage resolution?<p>I'm trying to measure <a href="https://man7.org/linux/man-pages/man2/getrusage.2.html" rel="nofollow noreferrer">get...
72,994,120
How to install h3-py (from uber) with mamba?<p>I have recently switched to mamba as a package installer and am now trying to install h3-py into an environment. I have tried several ways, first using:</p> <pre><code>mamba install h3-py </code></pre> <p>but then it says</p> <pre><code>encountered problems while solving: ...
<p>The Conda Forge <a href="https://github.com/conda-forge/h3-py-feedstock" rel="nofollow noreferrer"><code>h3-py</code> feedstock</a> is not yet building a version for the <strong>osx-arm64</strong> platform. <a href="https://github.com/conda-forge/h3-py-feedstock/pull/32" rel="nofollow noreferrer">Auto-migration fail...
How to install h3-py (from uber) with mamba?
python|conda|h3|mamba
1
64
1
72,998,121
72,998,121
0
true
2022-07-15T12:38:16.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to install h3-py (from uber) with mamba?<p>I have recently switched to mamba as a package installer and am now trying to install h3-py into an environmen...
72,963,775
User(Serializable) must not be accessed before initialization symfony<p>When i try to connect as a user (my user entity implement UserInterface), i always get this error:</p> <blockquote> <p>Typed property Symfony\Component\Security\Core\Exception\AccountStatusException::$user must not be accessed before initialization...
<p>I just need to update all my bundle. Like my last edit suggested: Somes of my bundles was too old.</p>
User(Serializable) must not be accessed before initialization symfony
symfony
0
64
1
72,998,891
72,998,891
0
true
2022-07-13T09:17:09.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: User(Serializable) must not be accessed before initialization symfony<p>When i try to connect as a user (my user entity implement UserInterface), i always ge...
73,002,112
How to match and extract string matching regular expression<p>This is main string:</p> <blockquote> <p><code>MR HI Government He PIHe9 Hanumana Ji 3-� fafer/ DOB : 01/01/1959 989 / Male 2094 7051 9541 ������ - ��� ����� �� 3�1���</code></p> </blockquote> <p>I want to match and extract <code>2094 7051 9541</code> using ...
<p>You can use</p> <pre class="lang-js prettyprint-override"><code>const regex = /\b[2-9]\d{3}\s\d{4}\s\d{4}\b/; </code></pre> <p>See the <a href="https://regex101.com/r/BgeGnk/1" rel="nofollow noreferrer">regex demo</a>. Note the use of a regex literal that helps avoid double escaping backslashes.</p> <p><em>Details</...
How to match and extract string matching regular expression
javascript|regex|pattern-matching
-2
64
1
73,002,131
73,002,131
0
true
2022-07-16T06:46:41.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to match and extract string matching regular expression<p>This is main string:</p> <blockquote> <p><code>MR HI Government He PIHe9 Hanumana Ji 3-� fafer/...
73,014,535
[Solved by rewrite]Problem with passing pointer and recursive function<p>I'm really newbie to c programing, and I have no idea how can I make it work. I want to make sort function that sorting array of integers by using 2 argument. I want to use recursive on sort function. and sorting from end of array to first. by asc...
<p>In the first approach, you did improper when calling API again:</p> <pre><code> void ft_recure(int *a, int *b, int j, int k) { if (--j &gt;= 0) { if (a[k] &lt; b[j]) { a[k] = b[j]; } else { ft_recure...
[Solved by rewrite]Problem with passing pointer and recursive function
arrays|c|pointers|integer
1
64
1
73,016,606
73,016,606
0
true
2022-07-17T18:55:35.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: [Solved by rewrite]Problem with passing pointer and recursive function<p>I'm really newbie to c programing, and I have no idea how can I make it work. I want...
73,016,843
Parsing Json data from a file<p>I am building a Node JS application that reads file that contains array of Json objects, and displays it on a table. I need to parse the JSON data array. sample json data:</p> <pre><code>[{&quot;name&quot;:&quot;Ken&quot;, &quot;Age&quot;:&quot;25&quot;},{&quot;name&quot;:&quot;Pulsar&qu...
<pre><code>const fs = require('fs'); // Thanks to: https://nodejs.dev/learn/reading-files-with-nodejs try { const data = fs.readFileSync('test.txt', 'utf8'); console.log(data); const json = JSON.parse(data); console.log(json); } catch (err) { console.error(err); } </code></pre>
Parsing Json data from a file
javascript|node.js|json|express
1
64
3
73,016,898
73,016,898
0
true
2022-07-18T02:49:34.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parsing Json data from a file<p>I am building a Node JS application that reads file that contains array of Json objects, and displays it on a table. I need t...
73,007,825
My env variable works on localhost but is undefined when deployed on Netlify<p>Having trouble getting an axios GET request to work on Netlify because the env variable that defines my api key comes up as undefined on Netlify. I have already set the env variable with 'Site settings &gt; Build &amp; deploy &gt; Environmen...
<p>So I found out all I had to do was define a variable in my function and set it as the environment variable. I still don't understand why this works and just taking <code>process.env.API_KEY</code> directly doesn't.</p> <pre><code>const apiKey = process.env.API_KEY; axios.get(`${BASE_URL_FIVE_DAY_FORECAST}?q=${city}&...
My env variable works on localhost but is undefined when deployed on Netlify
javascript|axios|get|environment-variables|netlify
1
64
1
73,016,921
73,016,921
0
true
2022-07-16T21:40:35.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My env variable works on localhost but is undefined when deployed on Netlify<p>Having trouble getting an axios GET request to work on Netlify because the env...
73,015,940
How can i get the newest currentTime in wavesurfer.js?<p>I have problem. This code adds a click event to the wavebar.</p> <p><code>wavesurfer.drawer.on(&quot;click&quot;, () =&gt; {console.log(wavesurfer.getCurrentTime())})</code></p> <p>When i click on the wave bar, i get the time where the cursor was in! For example ...
<p>i fixed my problem. i wanted to get the time of where i clicked on. the event handler runs before the time gets update. and in this situation, i should have a delay to get the time of where i clicked. so i should use <code>setTimeout</code> method.</p> <pre><code>wavesurfer.drawer.on(&quot;click&quot;, (e) =&gt; { ...
How can i get the newest currentTime in wavesurfer.js?
javascript|wavesurfer.js
0
64
1
73,019,136
73,019,136
0
true
2022-07-17T23:03:12.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i get the newest currentTime in wavesurfer.js?<p>I have problem. This code adds a click event to the wavebar.</p> <p><code>wavesurfer.drawer.on(&quot...
73,018,829
Socket.IO https/ssl in iOS and Python App Engine<p>I've built an GCP App Engine service in Python 3.7 using Flask and an iOS app in Swift.. the apps are using Socket.IO to connect and transfer data.</p> <p>Everything works great with a local deployment, however when deploying to GCP the SocketIO connection is never upg...
<p>If this is Standard env, it could be due to the fact that Standard env doesn't support websockets. See <a href="https://cloud.google.com/appengine/docs/the-appengine-environments" rel="nofollow noreferrer">documentation</a>, <a href="https://groups.google.com/g/google-appengine/c/cDR1Ru2ak88" rel="nofollow noreferre...
Socket.IO https/ssl in iOS and Python App Engine
python|ios|ssl|google-app-engine|socket.io
0
64
1
73,019,533
73,019,533
0
true
2022-07-18T07:44:28.983Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Socket.IO https/ssl in iOS and Python App Engine<p>I've built an GCP App Engine service in Python 3.7 using Flask and an iOS app in Swift.. the apps are usin...
73,023,285
Using a string variable in a SQL query with Groovy<p>I’m trying to run a sql query with a variable defined elsewhere in the script. When the query is ran against the database it only uses the value <code>?</code>, instead of the expected value which is defined as a String earlier in the script.</p> <p>I'm roughly tryin...
<p>V1</p> <p>Convert quickFilterQuery to string before executing it. This approach has sql-injection problem - it will not work if CUSTOM_FIELD_NAME contains quote <code>'</code> char</p> <pre><code>def CUSTOM_FIELD_NAME = &quot;Ontology&quot; def quickFilterQuery = &quot;&quot;&quot; SELECT &quo...
Using a string variable in a SQL query with Groovy
groovy
0
64
1
73,032,158
73,032,158
0
true
2022-07-18T13:40:06.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using a string variable in a SQL query with Groovy<p>I’m trying to run a sql query with a variable defined elsewhere in the script. When the query is ran aga...
72,966,749
Create Term (group) in Term store using Microsoft Graph API<p>I want to create a new term group in the SharePoint Term group using the Microsoft Graph API</p> <p>Reading term groups via get request works using the following permission in Azure Active Directory: &quot;TermStore.ReadWrite.All - Application - Read and wri...
<p>found the solution, You have to add app@sharepoint as a termstore admin</p> <p><a href="https://docs.microsoft.com/en-us/answers/questions/466322/azure-ad-application-permission-for-sharepoint-ter.html" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/answers/questions/466322/azure-ad-application-permissio...
Create Term (group) in Term store using Microsoft Graph API
python-3.x|azure-active-directory|microsoft-graph-api
0
64
2
73,048,004
73,048,004
0
true
2022-07-13T12:58:28.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create Term (group) in Term store using Microsoft Graph API<p>I want to create a new term group in the SharePoint Term group using the Microsoft Graph API</p...
73,022,998
How to delete files from Firebase Storage and Table View - Swift<p>I'm creating a Customer Management app for iOS. I'm using Firebase Firestore and Storage. There is a part of my app when the user can attach document to each customer. I upload and then download the file in local folder to be able to display the file na...
<p><strong>UPDATE</strong> This is how i managed to solve my issue for deleting files in Storage the reference in Firestore and the downloaded file also i remove from the table directly.</p> <p>This help me: <a href="https://stackoverflow.com/questions/47480661/swift-firestore-delete-table-cell-and-remove-document-from...
How to delete files from Firebase Storage and Table View - Swift
ios|arrays|swift|firebase|firebase-storage
0
64
1
73,048,981
73,048,981
0
true
2022-07-18T13:20:53.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to delete files from Firebase Storage and Table View - Swift<p>I'm creating a Customer Management app for iOS. I'm using Firebase Firestore and Storage. ...
72,964,646
Unrecognized name when joining 2 tables in Google Big Query<p>I want to join two tables from different datasets. It is possible to <code>INNER JOIN</code> these two datasets but it does not work with a regular <code>JOIN</code>.</p> <p>I want to join a Google Analytics 4 (GA4) item id on the item id of the datawarehous...
<p>Alright, I figured it out. It took a lot of trial and error but I got it:</p> <pre><code>WITH ga as ( SELECT event_date as ga4_date, ga4_items.item_id as id, ga4_items.item_name, ga4_items.price FROM `name-ga4-dataset` as ga4, UNNEST(ga4.items) as ga4_items ), dwh as ...
Unrecognized name when joining 2 tables in Google Big Query
sql|join|google-cloud-platform|google-bigquery|left-join
-2
64
2
73,065,533
73,065,533
0
true
2022-07-13T10:20:47.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unrecognized name when joining 2 tables in Google Big Query<p>I want to join two tables from different datasets. It is possible to <code>INNER JOIN</code> th...
72,812,037
How CPython handles multiline input in REPL?<p>Python's REPL reads input line by line. However, function definitions consist from multiple lines.</p> <p>For example:</p> <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; def answer(): ... return 42 ... &gt;&gt;&gt; answer() 42 </code></pre> <p>How does CPyt...
<p><strong>TLDR</strong>: Digging into source code of CPython, I figured out that lazy <strong>lexer</strong> outputs <code>&gt;&gt;&gt;</code> and <code>...</code> promts.</p> <ol> <li>Entry point for REPL is <a href="https://github.com/python/cpython/blob/47e75a0025529fa538bc24d55b27ae4823d3df9d/Modules/main.c#L526" ...
How CPython handles multiline input in REPL?
python|parsing|read-eval-print-loop|cpython|language-implementation
0
64
3
73,132,935
73,132,935
0
true
2022-06-30T07:45:02.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How CPython handles multiline input in REPL?<p>Python's REPL reads input line by line. However, function definitions consist from multiple lines.</p> <p>For ...
72,842,853
Python bytearray with struct and sending via serial communucation<p>I wrote a code for byte reciever program and asked for help at <a href="https://stackoverflow.com/questions/72826477/python-float-and-integer-values-to-bytearray/72826759?noredirect=1">Python float and integer values to bytearray</a></p> <p>and it work...
<p>The code that someone helped who named &quot;rndpkt&quot; in Python Discord Server and the problem was solved</p> <pre><code>import struct import time import serial array1 = bytearray(78) array1[0:4] = bytes.fromhex('FFFF5452') array1[76:78] = bytes.fromhex('0d0a') altitude = float(input(&quot;altitude: &quot;)) ...
Python bytearray with struct and sending via serial communucation
python|arrays|struct
2
64
1
73,165,844
73,165,844
0
true
2022-07-02T22:37:49.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python bytearray with struct and sending via serial communucation<p>I wrote a code for byte reciever program and asked for help at <a href="https://stackover...
72,962,924
How to extract relevant info from the body of http response with Arduino?<p>I am currently doing a project with Arduino MKR WiFi 1010 and I send a GET request to the server and it sends me back a response contains &quot;clientId&quot;. The only info I desire is this client ID. But I am pretty struggling with obtaining ...
<p>If I understand it well, you retrieve it in a String. So the easiest way to find your client ID is to find the String &quot;clientID&quot; with a provided Arduino's function <strong>indexOf</strong>, this will give you the index in the String. So on and on you retrieve the string between <em>&quot;clientId&quot;:&qu...
How to extract relevant info from the body of http response with Arduino?
c++|http|arduino
0
64
1
72,963,089
72,963,089
0
true
2022-07-13T08:11:08.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to extract relevant info from the body of http response with Arduino?<p>I am currently doing a project with Arduino MKR WiFi 1010 and I send a GET reques...
72,986,071
Undo / Redo Bitmap is not properly working<p>I have been stuck on this for a few days now and it's really beyond me why I can't get something so simple to work. I have a small drawing applicaiton, quite similiar to the Android FingerPaint demo, but I am saving each Bitmap after a drawing happens. This is because I plan...
<p>If your drawing works fine it doesn't seem like there's a rendering problem - it's all calling <code>loadSurfaceBitmap()</code> the same way, right? I don't know if handling a touch event makes a difference and if you need to call <code>invalidate()</code> otherwise - I've never poked at surface canvases like this.<...
Undo / Redo Bitmap is not properly working
java|android|canvas|bitmap
0
64
1
72,987,976
72,987,976
0
true
2022-07-14T20:01:55.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Undo / Redo Bitmap is not properly working<p>I have been stuck on this for a few days now and it's really beyond me why I can't get something so simple to wo...
72,948,670
Excel Index Match Find Row Where Column Meets Criteria and Greater than 0<p>I have a data set in Excel that represents names and job IDs on the Y-axis, and days of the week on the X-axis. Occasionally a name will float to other job IDs but a name will never have more than one job ID per day. I am attempting to find the...
<p>Below you can find a working formula (though not too elegant):</p> <pre><code>=INDEX(B2:B9,MATCH(1,(J2=A2:A9)*(0&lt;IFS(J3=C1,C2:C9,J3=D1,D2:D9,J3=E1,E2:E9,J3=F1,F2:F9,J3=G1,G2:G9)),0)) </code></pre> <p><a href="https://exceljet.net/formula/index-and-match-with-multiple-criteria" rel="nofollow noreferrer">Here</a> i...
Excel Index Match Find Row Where Column Meets Criteria and Greater than 0
excel|indexing|match|multiple-columns
0
64
2
72,952,366
72,952,366
0
true
2022-07-12T07:40:32.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel Index Match Find Row Where Column Meets Criteria and Greater than 0<p>I have a data set in Excel that represents names and job IDs on the Y-axis, and d...
72,872,744
poster quality publication chart<p>OK, I have the following data, that I needed to plot bar chart with.</p> <pre><code>import pandas as pd import matplotlib.pyplot as plt data1 = {'Mode': ['foot', 'bike', 'bus', 'car', 'metro'], 'Segments': [4443, 306, 1070, 5947, 322]} data2 = {'Mode': ['foot', 'bike', 'bus...
<p>You can specify the styles you want with <code>plt.rcParams</code>. First, define the actual size these graphs should be. For example, if your poster has 1m of width, two columns, and you're placing two barplots side by side, then their widths would be about 9x8 inches. Then, you can set the labels and ticks and so ...
poster quality publication chart
python|matplotlib|data-visualization|bar-chart
0
64
1
72,873,011
72,873,011
0
true
2022-07-05T16:27:24.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: poster quality publication chart<p>OK, I have the following data, that I needed to plot bar chart with.</p> <pre><code>import pandas as pd import matplotlib....
72,818,105
How to target ".switch-field input:checked" to make changes in CSS properties with JavaScript<p>How can Javascript change CSS properties of <code>input:checked</code></p> <p><strong>CSS</strong></p> <pre><code> .switch-field input:checked + label { background-color: #018786; color:white; box-shadow: none;...
<h2>Explanation</h2> <p>Basically the steps you need to follow are</p> <ol> <li>Clear all the label background style property</li> <li>Select all the <code>input:checked + label</code> (thats the element which has the background color property)</li> <li>Loop through all the fetched labels</li> <li>Change the background...
How to target ".switch-field input:checked" to make changes in CSS properties with JavaScript
javascript|html|css|input|checked
0
64
2
72,818,408
72,818,408
0
true
2022-06-30T15:06:59.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to target ".switch-field input:checked" to make changes in CSS properties with JavaScript<p>How can Javascript change CSS properties of <code>input:check...
72,833,547
Is there a R function to strsplit specifc rows under one column based on another column?<p>I am having a data frame (for example as below:</p> <pre><code>name student_id age gender Sam 123_abc_ABC 20 F John 234_bcd_BCD 18 M Mark 345_cde_CDE 20 M Ram xyz_111_XYZ 19 M Hari uvw_444_UVW 23 M </cod...
<p>You only need <code>str_extract</code>:</p> <pre><code>library(tidyverse) df %&gt;% mutate(student_id_by_govt = str_extract(student_id, &quot;\\d+&quot;)) # A tibble: 5 × 3 Name student_id student_id_by_govt &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; 1 Sam 123_abc_ABC 123 2 John ...
Is there a R function to strsplit specifc rows under one column based on another column?
r|lapply|strsplit
0
64
5
72,833,864
72,833,864
0
true
2022-07-01T18:52:17.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a R function to strsplit specifc rows under one column based on another column?<p>I am having a data frame (for example as below:</p> <pre><code>nam...
72,945,994
How do you use win32.WriteFile() the same way as Windows WriteFile API in python?<p>I have a PCI card that uses a pipeline handle and in order to write to its buffers I need to write to its location. I am unfortunately not a software guy but instead have the code given to me in Tcl which my team asked me to convert int...
<p>Listing:</p> <ol> <li><p><a href="https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-writefile" rel="nofollow noreferrer">[MS.Docs]: WriteFile function (fileapi.h)</a></p> <blockquote> <pre class="lang-c prettyprint-override"><code>BOOL WriteFile( [in] HANDLE hFile, [in] ...
How do you use win32.WriteFile() the same way as Windows WriteFile API in python?
python|pywin32|deviceiocontrol
1
64
1
72,952,031
72,952,031
0
true
2022-07-12T00:54:41.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you use win32.WriteFile() the same way as Windows WriteFile API in python?<p>I have a PCI card that uses a pipeline handle and in order to write to it...
72,893,419
org.openqa.selenium.ElementNotInteractableException even after element is identified using Selenium and Testng through Java with Jenkins<p>I just editied on the xpath.click option and now when I build my project there a crash at the same line where I just have updated my xpath(<code>xpath: //span[normalize-space()='400...
<p>As the element is successfully identified but raises:</p> <pre><code>org.openqa.selenium.ElementNotInteractableException </code></pre> <p>Ideally to <a href="https://stackoverflow.com/a/70077251/7429447"><em>click()</em></a> on the element you need to induce <a href="https://stackoverflow.com/a/48990165/7429447">Web...
org.openqa.selenium.ElementNotInteractableException even after element is identified using Selenium and Testng through Java with Jenkins
java|selenium|maven|jenkins|jenkins-cli
1
64
1
72,903,109
72,903,109
0
true
2022-07-07T06:51:07.303Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: org.openqa.selenium.ElementNotInteractableException even after element is identified using Selenium and Testng through Java with Jenkins<p>I just editied on ...
73,022,925
ORA-01460: unimplemented or unreasonable conversion (after conversion of a docx to pdf and uploading to db) VisualBasic (VB)<p>i'm a junior developer and i started working recently.</p> <p>They put me on this LEGACY program and asked me to try and resolve this problem. They strictly forbid me of using CLOB.</p> <pre><c...
<p>We finally found an answer, we had to put everything inside a TRANSACTION:</p> <pre><code>Public Function InsertComunications(ByVal pIdComunicationType As Integer, ByVal pAwaitingStatus As Integer, ByVal pRequestingUser As String, ByVal pIdSr As String, ByVal pItem As String,...
ORA-01460: unimplemented or unreasonable conversion (after conversion of a docx to pdf and uploading to db) VisualBasic (VB)
oracle|vb.net|file-upload|visual-studio-2019|file-conversion
0
64
1
73,137,630
73,137,630
0
true
2022-07-18T13:16:03.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ORA-01460: unimplemented or unreasonable conversion (after conversion of a docx to pdf and uploading to db) VisualBasic (VB)<p>i'm a junior developer and i s...
72,822,021
How to set light/dark mode across multiple pages?<p>I am trying to use localStorage to keep my theme consistent over page changes but I can't seem to get it to work.</p> <p>This is what my html looks like:</p> <pre class="lang-html prettyprint-override"><code>&lt;body onload=&quot;checkLightMode()&quot;&gt; &lt;li&gt;...
<p>I was able to get it to work! Here is what did the trick. It ended up being quite simple, and I didn't need the onload function.</p> <pre class="lang-js prettyprint-override"><code>const buttons = document.querySelectorAll('.mode-toggle') buttons.forEach(button =&gt; { button.addEventListener('click', function ()...
How to set light/dark mode across multiple pages?
javascript|html|local-storage|onload|darkmode
0
64
3
72,823,368
72,823,368
0
true
2022-06-30T21:05:45.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to set light/dark mode across multiple pages?<p>I am trying to use localStorage to keep my theme consistent over page changes but I can't seem to get it ...
72,942,530
Unicode error while increment variable value<p>When I work with static variables it works absolutely fine. But when I try to use dynamic it does not work.</p> <p>The playbook:</p> <pre class="lang-yaml prettyprint-override"><code>--- - hosts: Swi1 vars: NewOne: 0 provider: host: &quot;192.168.0.30&quot...
<p>It seems you are trying to implement a loop counter with a programming paradigm, which isn't plain possible in that way since Ansible is not a programming language but a <a href="https://www.ansible.com/use-cases/configuration-management" rel="nofollow noreferrer">Configuration Management Tool</a> in which you decla...
Unicode error while increment variable value
ansible|ansible-facts
2
64
2
72,942,968
72,942,968
0
true
2022-07-11T17:33:45.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unicode error while increment variable value<p>When I work with static variables it works absolutely fine. But when I try to use dynamic it does not work.</p...
72,861,371
How to dipslay subcategories list on category page. Woocommerce<p>Is there a way I can edit woocommmerce category page without any pugins?</p> <p>I need to display child categories with photos, and just then below the categories I would like to display all products of the parent category.</p> <p>Can this be done?</p> <...
<p>I figured it out.</p> <p>You just need to use this function:</p> <pre><code> function woocommerce_product_category( $args = array() ) { $woocommerce_category_id = get_queried_object_id(); $args = array( 'parent' =&gt; $woocommerce_category_id ); $terms = get_terms( 'product_cat', $args ); if ( $...
How to dipslay subcategories list on category page. Woocommerce
php|wordpress|woocommerce
-1
64
1
72,885,886
72,885,886
0
true
2022-07-04T19:43:47.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to dipslay subcategories list on category page. Woocommerce<p>Is there a way I can edit woocommmerce category page without any pugins?</p> <p>I need to d...
72,782,208
having trouble getting the sum of multiples below an inputted number?<p>recently i got this question on codewar and was trying to solve it: &quot; If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Finish the solution so that it returns the ...
<p>if you put</p> <pre><code>multiplesOfThree.reduce(reducer, 0) + multiplesOfFive.reduce(reducer, 0) - intersectionResult.reduce(reducer, 0) </code></pre> <p>in your code you should fix your error</p> <p>but I think that the approach below is more appropriate</p> <p><div class="snippet" data-lang="js" data-hide="fals...
having trouble getting the sum of multiples below an inputted number?
javascript|arrays
0
64
4
72,782,582
72,782,582
0
true
2022-06-28T07:19:36.440Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: having trouble getting the sum of multiples below an inputted number?<p>recently i got this question on codewar and was trying to solve it: &quot; If we list...
72,784,162
How to use Javascript Function in all Tags of html with Shuffle and random text<p>please help me to fixed this problem. I want to add javascript in tag html but its only work 1 times, why can't 2 or more times?</p> <p>This is my code : <strong>JS</strong></p> <pre><code>// Array of words var words = [&quot;Andre&quot;...
<p>It's better to use <code>class=&quot;text word&quot;</code>, because the HTML id attribute is used to specify a unique id for an HTML element. You cannot have more than one element with the same id in an HTML document.</p> <p><strong>JS</strong>:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-cons...
How to use Javascript Function in all Tags of html with Shuffle and random text
javascript|html|jquery|css|shuffle
-4
64
2
72,784,588
72,784,588
0
true
2022-06-28T09:43:03.327Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use Javascript Function in all Tags of html with Shuffle and random text<p>please help me to fixed this problem. I want to add javascript in tag html ...
72,824,004
How to display the microcharacter letter of the popupCharacters next to the actual key letter?<p>I'm trying to make a keyboard in Android. I already made it but I don't know how to display the microcharacter letter for the <strong>popupCharacters</strong> next to the actual key letter, like this:</p> <p><img src="https...
<p>I understood it from several sources and I will attach it below</p> <p>The solution was using overriding the onDraw() method.</p> <pre><code>public class MyKeyboardView extends KeyboardView { @Override public void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(); ...
How to display the microcharacter letter of the popupCharacters next to the actual key letter?
java|android|android-layout|view|keyboard
0
64
1
72,850,118
72,850,118
0
true
2022-07-01T03:09:02.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display the microcharacter letter of the popupCharacters next to the actual key letter?<p>I'm trying to make a keyboard in Android. I already made it ...
72,826,540
How to get date difference between subdocuments in mongodb?<p>Below is the array</p> <pre><code> { &quot;CDF&quot;: { &quot;UTILITYTYPE&quot;: { &quot;D1&quot;: { &quot;G1&quot;: &quot;12387835&quot;, &quot;G22&quot;: { &quot;NAME&quot;: &quot;...
<p>One option is:</p> <ol> <li>Format the time</li> <li>Divide the events into to arrays according to the status</li> <li>Merge them back as couples.</li> <li>Keep only couples with time difference greater than 1 hour</li> </ol> <pre><code>db.collection.aggregate([ { $project: { EVENT: { $map: { ...
How to get date difference between subdocuments in mongodb?
mongodb|mongodb-query
1
64
1
72,828,192
72,828,192
0
true
2022-07-01T08:35:28.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get date difference between subdocuments in mongodb?<p>Below is the array</p> <pre><code> { &quot;CDF&quot;: { &quot;UTILITYTYPE&quot;: { ...
72,830,514
How to implement cascade deleting in SQLAlchemy Oracle?<p>I'm doing an API service and trying to do cascade deleting for Attachments class. All the time I get integiry error ((cx_Oracle.IntegrityError) ORA-02292:)when trying to delete a post. I've tried backref/back_populates, played with cascade='all, delete-orphan' e...
<p>The output from <code>insp.get_foreign_keys(&quot;crm_post_attachments&quot;)</code> shows that the actual table in the database does not match your ORM model. The model specifies</p> <pre class="lang-py prettyprint-override"><code> post_id = Column( Integer, ForeignKey(&quot;crm_post.id&quot;, ondelete=&...
How to implement cascade deleting in SQLAlchemy Oracle?
python|oracle|sqlalchemy
0
64
1
72,848,394
72,848,394
0
true
2022-07-01T14:07:03.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to implement cascade deleting in SQLAlchemy Oracle?<p>I'm doing an API service and trying to do cascade deleting for Attachments class. All the time I ge...
72,992,162
In python how i convert a txt file in a xlsx and put in eache cell only the block of rows before "$" and the rest block in the other cell?<p><strong>For example i have:</strong></p> <p>a b c d e$fghi l m n o</p> <p>I want to have the first block (until the $) in one cell and the rest in the other one (and again if i ha...
<p>Here is the code that should do what you need. Note that everything till the first <code>$</code> sign will be added to the first column (A). From there, it will move the next section to the second column (B). This will be done using a list, so there will not be any gaps, as you requested. For testing, I have used m...
In python how i convert a txt file in a xlsx and put in eache cell only the block of rows before "$" and the rest block in the other cell?
python
0
64
1
73,006,177
73,006,177
0
true
2022-07-15T09:50:17.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In python how i convert a txt file in a xlsx and put in eache cell only the block of rows before "$" and the rest block in the other cell?<p><strong>For exam...
72,941,880
Import text documents to graph database through RDF triples<p>I have a list of documents (summary text and full document link). I am using <a href="https://nlp.stanford.edu/software/openie.html" rel="nofollow noreferrer"><code>OpenIE</code></a> on the summary text to get RDF triples.</p> <p>How can I import the RDF tri...
<p>As OpenIE seems to &quot;produce relation triples in a tab separated format&quot;, you could save it as a <a href="https://en.wikipedia.org/wiki/Tab-separated_values" rel="nofollow noreferrer">TSV</a> file, which can be imported into GraphDB: <a href="https://i.stack.imgur.com/kztm6.png" rel="nofollow noreferrer">&q...
Import text documents to graph database through RDF triples
python|rdf|stanford-nlp|graphdb
-1
64
1
73,048,729
73,048,729
0
true
2022-07-11T16:40:25.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Import text documents to graph database through RDF triples<p>I have a list of documents (summary text and full document link). I am using <a href="https://n...
72,944,877
How to implement abstract factory in js?<p>I want to implement very simple abstract factory pattern but I am facing this error. Also am I doing something wrong with my code? How can I improve this to make it work properly?</p> <p>Must call super constructor in derived class before accessing 'this' or returning from der...
<p>You need to call <code>super()</code> inside constructor:</p> <pre><code>class MakeMeatPizza extends MakePizza { constructor() { super(); super.createPizza(&quot;meat&quot;); } } </code></pre> <p>So thanks to <a href="https://stackoverflow.com/a/31079103">this beautiful answer</a>:</p> <block...
How to implement abstract factory in js?
javascript|design-patterns
1
64
1
72,947,698
72,947,698
0
true
2022-07-11T21:31:42.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to implement abstract factory in js?<p>I want to implement very simple abstract factory pattern but I am facing this error. Also am I doing something wro...
72,983,603
Why aren't my if statements and MessageBox's not getting hit or displayed when I run my Windows form applications?<p>I've researched several common issue, like the message box displaying behind the form window, trying different wat to call them, however nothing seems to display them. I'm sure it's something simple I'm ...
<p>Instead of having your <code>Dialogs</code> class subscribe to its own events like <code>Load</code> and <code>FormClosing</code> it's cleaner (and may be less error-prone) to simply override the <code>OnLoad</code> and <code>OnFormClosing</code> methods that are causing the events to be fired in the first place. I ...
Why aren't my if statements and MessageBox's not getting hit or displayed when I run my Windows form applications?
c#|winforms|windows-forms-designer|microsoft-forms
-1
64
2
72,984,728
72,984,728
0
true
2022-07-14T16:11:23.917Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why aren't my if statements and MessageBox's not getting hit or displayed when I run my Windows form applications?<p>I've researched several common issue, li...
72,782,632
Set orientation of object in python using quaternions with pyglet, pywavefront and OpenGL<p>I want to set the orientation of an object in python using quaternions. I get my quaternions periodically via a serial port (this part works). My goal is to create a program similar to the following javascript project : <a href=...
<p>I was able to solve it.</p> <p>I use the squaternion library to store the quaternion. It comes with build-in methods for quaternion multiplication and converting to rotation matrix. The rotation matrix is 3x3 and needs to be converted to a 4x4 rotation-translation matrix and converted to Column-major order.</p> <p>F...
Set orientation of object in python using quaternions with pyglet, pywavefront and OpenGL
python|opengl|quaternions|pyglet|pywavefront
0
64
1
72,929,491
72,929,491
0
true
2022-06-28T07:53:21.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Set orientation of object in python using quaternions with pyglet, pywavefront and OpenGL<p>I want to set the orientation of an object in python using quater...
72,921,394
Regular expressions to exclude a specific format from a list of strings<p>I started recently working with regular expressions and they are not very clear to me at the moment.</p> <p>I have a list of strings:</p> <pre><code>l = ['1P', '2.2', '1.2MP', '1.2P', '1.2.3', '1.2.3 P', '4.5.6'] </code></pre> <p>How can i exclud...
<pre><code>import re pattern = &quot;\d+\.\d+\.\d+&quot; # 3 digits separated by two dots, each one with 1 or more digit l = ['1P', '2.2', '1.2MP', '1.2P', '1.2.3', '1.2.3 P', '4.5.6'] matched = [item for item in l if not re.search(pattern, item)] # matched = ['1P', '2.2', '1.2MP', '1.2P'] </code></pre> <p><a href="ht...
Regular expressions to exclude a specific format from a list of strings
python|regex
-2
64
2
72,921,460
72,921,460
0
true
2022-07-09T12:34:21.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regular expressions to exclude a specific format from a list of strings<p>I started recently working with regular expressions and they are not very clear to ...
73,013,397
how get new data from database in reactjs<p>My projct is a note app where you can can add notes and delete notes. I want to get data from the database and show it but I have to delete note twice, add note or reload page to show the new data.</p> <p><strong>notesList.jsx</strong><br /> this is my main component<br /> i ...
<p>You didn't update state after sending the respective <code>add</code> and <code>delete</code> request, that's why you need to refresh to get the updated data. This is the fix:</p> <pre><code> const handleAddNote = async (tasktext) =&gt; { const addNoteInformation = { email: localStorage.getItem(&quot;toke...
how get new data from database in reactjs
javascript|html|reactjs|frontend
0
64
1
73,013,723
73,013,723
0
true
2022-07-17T16:13:05.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how get new data from database in reactjs<p>My projct is a note app where you can can add notes and delete notes. I want to get data from the database and sh...
72,774,099
Need to identify the ancestor of the mentioned web element<p>New to Selenium. Been doing some activity but getting stuck every now and then. Plus if there is any error, at times it is not showing me the error. Below is my query.</p> <p>Address Book is a page that stores address.</p> <p>URL: <a href="http://webapps.teks...
<p>Code according to the comments. Screenshot with result is here <a href="https://i.imgur.com/7lVtDjI.png" rel="nofollow noreferrer">image link</a>:</p> <pre><code>import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver;...
Need to identify the ancestor of the mentioned web element
selenium|selenium-webdriver|xpath|ancestor|qwebelement
1
64
1
72,787,307
72,787,307
0
true
2022-06-27T14:49:52.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need to identify the ancestor of the mentioned web element<p>New to Selenium. Been doing some activity but getting stuck every now and then. Plus if there is...
72,882,013
VBA to copy certain column from active row, copy and paste if cell value multiple times<p><a href="https://i.stack.imgur.com/HHs9X.png" rel="nofollow noreferrer">enter image description here</a><a href="https://i.stack.imgur.com/bWaOS.jpg" rel="nofollow noreferrer">enter image description here</a>I am a newbie to VBA. ...
<pre><code>Sub CopyInsertPaste() Dim Rng As Range Dim RowNum As Integer RowNum = ActiveCell.Row Set Rng = Range(&quot;A&quot; &amp; RowNum &amp; &quot;:Z&quot; &amp; RowNum) With Rng .Offset(1, 0).EntireRow.Insert .Copy Range(&quot;A&quot; &amp; RowNum + 1) End With Dim BCell1 As Range Set BCell1 = Range(&...
VBA to copy certain column from active row, copy and paste if cell value multiple times
vba
-3
64
1
72,882,527
72,882,527
0
true
2022-07-06T10:34:30.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VBA to copy certain column from active row, copy and paste if cell value multiple times<p><a href="https://i.stack.imgur.com/HHs9X.png" rel="nofollow norefer...
72,815,015
call a method only if the previous one returned a value<p>I am looking for a specific string in text, and want to get it only if found.</p> <p>I can write it as followד and it works:</p> <pre class="lang-py prettyprint-override"><code>if re.search(&quot;Counter=(\d+)&quot;, line): total = int(re.search(&quot;Counter=...
<p>When using <a href="https://docs.python.org/2.7/library/re.html#re.findall" rel="nofollow noreferrer"><code>re.findall</code></a> it will return a list with groups or empty. Then you can conditionally assign based on this list using a <a href="https://stackoverflow.com/questions/394809/does-python-have-a-ternary-con...
call a method only if the previous one returned a value
python
1
64
3
72,815,661
72,815,661
0
true
2022-06-30T11:30:54.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: call a method only if the previous one returned a value<p>I am looking for a specific string in text, and want to get it only if found.</p> <p>I can write it...
73,019,155
Display api json data as ionic accordion<p>I have to display the api json data(nested object response) as an ion-accordion. How can I achieve it? Below is the code of the component.ts and service file</p> <p>component.ts code:</p> <pre><code>import { Component, OnInit } from '@angular/core'; import { DataService } from...
<p>It will depend on how &quot;this.users&quot; is formated. But you can use *ngFor to create your accordion.</p> <p>For example if in your TS file you have users data :</p> <pre><code>users = [{name: 'Michel', isPremium: true}, {name: 'Jean', isPremium: true}, {name: 'John', isPremium: false}]; </code></pre> <p>In you...
Display api json data as ionic accordion
angular|ionic-framework
0
64
1
73,098,117
73,098,117
0
true
2022-07-18T08:10:16.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display api json data as ionic accordion<p>I have to display the api json data(nested object response) as an ion-accordion. How can I achieve it? Below is th...
72,940,874
WPF MVVM Button from View control interface<p>I'm pretty new to WPF and MVVM concept and i'm trying to solve probably stupid issue. I have MainViewModel where I control what should be seen on the screen according to pressed buttons in the menu.</p> <pre><code> class MainViewModel : ObservableObject { public RelayC...
<p>I see that <code>SettingsView</code> class extends the <code>UserControl</code> class. This is problematic because</p> <ul> <li>you say you want to follow the MVVM design pattern but your user control code (<code>SettingsView</code>) has a reference to your database connection (<code>HSQLTestConnection</code>) in th...
WPF MVVM Button from View control interface
c#|wpf|mvvm|view|command-line-interface
0
64
1
72,941,993
72,941,993
0
true
2022-07-11T15:19:45.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WPF MVVM Button from View control interface<p>I'm pretty new to WPF and MVVM concept and i'm trying to solve probably stupid issue. I have MainViewModel wher...
73,017,113
.NET MAUI WebAuthenticatorResult not working for Strava<p>I am creating a .NET MAUI app that is going to get some data from the Strava API. When I try to use the WebAuthenticatorResult class to get the access token, passing the URI and the callbackURI I get the following error:</p> <p><a href="https://i.stack.imgur.com...
<p>If you check part <a href="https://docs.microsoft.com/en-us/xamarin/essentials/web-authenticator?tabs=android#get-started" rel="nofollow noreferrer">Get started</a> of document <a href="https://docs.microsoft.com/en-us/xamarin/essentials/web-authenticator?tabs=android" rel="nofollow noreferrer">Xamarin.Essentials: W...
.NET MAUI WebAuthenticatorResult not working for Strava
c#|.net|maui|.net-maui|strava
0
64
1
73,032,215
73,032,215
0
true
2022-07-18T03:48:28.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: .NET MAUI WebAuthenticatorResult not working for Strava<p>I am creating a .NET MAUI app that is going to get some data from the Strava API. When I try to use...
72,971,573
Singleton Class factory<p>to create Singleton u can do this:</p> <pre><code>class Klass: def __new__(cls, args): if not hasattr(cls, 'instance'): cls.instance = Blah(args) return cls.instance </code></pre> <p>is there a way to create Singleton-classes on demand i.e:</p> <pre><code> Sin...
<p>here is my solution,</p> <pre><code>def singleton(new_klass, klass): def new(cls, *args, **kvargs): if not hasattr(cls, 'instance'): cls.instance = klass(*args, **kvargs) return cls.instance globals()[new_klass] = type(new_klass, (object,), {'__new__' : new}) #return type(...
Singleton Class factory
python|singleton|factory
0
64
1
72,974,166
72,974,166
0
true
2022-07-13T19:22:22.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Singleton Class factory<p>to create Singleton u can do this:</p> <pre><code>class Klass: def __new__(cls, args): if not hasattr(cls, 'instance')...
72,775,224
tailwind elements showing on hover but not normally when placed at top left and right<p>I am trying to make a card that expands on hover and shows some extra elements, but some of the elements I want before the hover are not showing up but they do on hover?</p> <pre><code>import { CashIcon, ArrowRightIcon } from '@hero...
<p>Assuming that it is the badges (timeLeft, isExpired), you need to add position relative to list items, so that the badges are contained in the list item.</p> <pre><code>import { CashIcon, ArrowRightIcon } from '@heroicons/react/solid' import {ClockIcon} from '@heroicons/react/outline' import { BsTelegram, BsTwitter ...
tailwind elements showing on hover but not normally when placed at top left and right
javascript|html|css|tailwind-css
0
64
1
72,775,649
72,775,649
1
true
2022-06-27T16:12:01.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: tailwind elements showing on hover but not normally when placed at top left and right<p>I am trying to make a card that expands on hover and shows some extra...
72,775,065
How to find unique keys, tabel storage size in CosmosDB container?<p>I am learning <code>CosmosDB</code> (coming from <code>AWS Dynamo</code>) and struggling to find some base info about the container from UI, such as following. I am looking into <a href="https://docs.microsoft.com/en-us/azure/cosmos-db/index-overview"...
<p>The Azure Portal doesn't show everything for a container unfortunately.</p> <p>The best way to get all the information for a container is to use PowerShell or Azure CLI. Example below</p> <pre><code>az cosmosdb sql container show -g myResourceGroup -a mycosmosaccount -d myDatabase -n myContainer </code></pre> <p>Thi...
How to find unique keys, tabel storage size in CosmosDB container?
azure-cosmosdb
0
64
1
72,777,804
72,777,804
1
true
2022-06-27T15:59:23.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find unique keys, tabel storage size in CosmosDB container?<p>I am learning <code>CosmosDB</code> (coming from <code>AWS Dynamo</code>) and struggling...
72,770,917
Can we use the Select query to get the vertex data using JDBC Driver in Java<p>I am trying to run select statement for tigerGraph using JDBC Driver for JAVA but getting java.sql.SQLException: Unsupported dbtable: InfectionCase Error. Is select statement supported by tigerGraph using JDBC or is there any other way to ex...
<p>To fetch vertex instances from TigerGraph you need to use a different syntax as the <code>SELECT</code> statement is not supported in the JDBC driver:</p> <pre><code>try (Connection con = getConnection()) { String query = &quot;get vertex(InfectionCase, \&quot;Hansarang Convalescent Hospital\&quot;)&quot;; &...
Can we use the Select query to get the vertex data using JDBC Driver in Java
java|jdbc|tigergraph
0
64
1
72,778,416
72,778,416
1
true
2022-06-27T10:53:45.440Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can we use the Select query to get the vertex data using JDBC Driver in Java<p>I am trying to run select statement for tigerGraph using JDBC Driver for JAVA ...
72,778,092
Open one accordion section at a time. (Svelte)<p>I'd like to ask someone who can figure out how to allow this accordion component to open only one section at a time.</p> <p>It means that if a new accordion is open the previous one has to close automatically.</p> <p>In the ideal situation, this function could be optiona...
<p>For this one would usually use a <a href="https://svelte.dev/docs#run-time-svelte-setcontext" rel="nofollow noreferrer">context</a>. The context can then manage the current accordion (or a key representing it) or dispatch events to other accordion instances.</p> <p>As an example of storing the current accordion:</p>...
Open one accordion section at a time. (Svelte)
javascript|html|accordion|svelte
0
64
1
72,778,653
72,778,653
1
true
2022-06-27T20:44:20.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Open one accordion section at a time. (Svelte)<p>I'd like to ask someone who can figure out how to allow this accordion component to open only one section at...
72,779,321
Weighted Median with Groupby and Aggregate in Python<p>I'm trying to find the weighted median of a column based on multiple columns. Here is an example:</p> <pre><code>Date | Item | BetterPrice | TotalCost | Location ------------------------------------------------------------------------- 2022-0...
<p>Here is a way to do it. To get the weighted median, you can get the <code>np.median</code> of the <code>np.repeat</code> values in Location with TotalCost. Do this per group. Then <code>concat</code> the result with the sum on the other column per group as well.</p> <pre><code>gr = df.groupby(['Date', 'Item']) res ...
Weighted Median with Groupby and Aggregate in Python
python|pandas|numpy|group-by|aggregate
3
64
1
72,780,257
72,780,257
1
true
2022-06-27T23:41:05.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Weighted Median with Groupby and Aggregate in Python<p>I'm trying to find the weighted median of a column based on multiple columns. Here is an example:</p> ...
72,779,877
Do something as soon as UIViewRepresentable is instantiated<p>This seems like a straightforward question, but I have not been able to find any solutions in the Swift docs. When I was programming in Kotlin, it was common to use the <code>init()</code> method of a class to perform some work in order to get the class set ...
<p>It is possible but would be not correct (so I will not tell even how), instead use it</p> <pre><code>struct OverlayMapView: UIViewRepresentable { @StateObject private var viewModel = MapViewModel() func makeUIView(context: Context) -&gt; MKMapView { viewModel.safeCreateLocationManager() // &lt...
Do something as soon as UIViewRepresentable is instantiated
ios|swift|swiftui|uiviewrepresentable|swift-structs
1
64
1
72,780,737
72,780,737
1
true
2022-06-28T01:45:43.310Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Do something as soon as UIViewRepresentable is instantiated<p>This seems like a straightforward question, but I have not been able to find any solutions in t...
72,775,428
Fail to start Mongock CLI with Spring Boot, NullPointerException: Cannot invoke buildRunner<p>I've tried using Mongock for DB migrations and it's a really good tool. It activates when main application is launched. Recently I found out that there is Mongock CLI, and it suits better for my aims. Unfortunately, I fail to ...
<p>That seems to happen because you are not passing the parameter -aj to provide your uber jar.</p> <p>The command should be something like this:</p> <pre><code>java -jar mongock-cli-5.0.26.jar --cli-spring-jar lib/mongock-cli-springboot-5.0.26.jar --cli-core-jar lib/mongock-cli-core-5.0.26.jar --mongock-core-jar lib/m...
Fail to start Mongock CLI with Spring Boot, NullPointerException: Cannot invoke buildRunner
java|spring-boot|mongock
0
64
1
72,785,297
72,785,297
1
true
2022-06-27T16:27:26.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fail to start Mongock CLI with Spring Boot, NullPointerException: Cannot invoke buildRunner<p>I've tried using Mongock for DB migrations and it's a really go...
72,787,167
setAttribute "value" returns undefined<p>I am dynamically (but not async) building html elements with js and encounter an error upon setting the &quot;value&quot; attribute. Simplified code:</p> <pre><code> let tag = document.createElement(&quot;div&quot;); tag.innerHTML = `${item}`; tag.setAttribute(&quot;...
<p><code>div</code> element doesn't have <code>value</code> property. only few elements such as <code>input</code>, <code>textarea</code> have <code>value</code> <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes<...
setAttribute "value" returns undefined
javascript
-1
64
3
72,787,217
72,787,217
1
true
2022-06-28T13:18:31.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: setAttribute "value" returns undefined<p>I am dynamically (but not async) building html elements with js and encounter an error upon setting the &quot;value&...
72,788,051
Converting .xlsb to .xlsx using pandas changes dates to random numbers<p>I have a .xlsb document that I'm converting to .xlsx using this:</p> <pre><code>df = read_excel('excels/TEF.xlsb, engine = 'pyxlsb') df.to_excel('.\excels\TEF.xlsx') </code></pre> <p>Conversion(albeit slow) works for everything except dates.</p> ...
<p>These &quot;random numbers&quot; are days since 01.01.1900. You wil have to convert them after loading the xlsb.</p>
Converting .xlsb to .xlsx using pandas changes dates to random numbers
python|excel|pandas|converters
1
64
1
72,788,213
72,788,213
1
true
2022-06-28T14:13:05.177Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Converting .xlsb to .xlsx using pandas changes dates to random numbers<p>I have a .xlsb document that I'm converting to .xlsx using this:</p> <pre><code>df =...
72,828,547
Powershell: Two questions about Get-AppxPackage and the -PackageTypeFilter parameter<p>I am making a list of app packages installed on my system. In this specific case the ZuneMusic packages. I use the following command:</p> <pre><code>Get-AppxPackage -AllUsers -PackageTypeFilter Main, Bundle, Resource, Framework | ...
<p>why dont you just do <code>get-appxpackage -name *zunemusic* -allusers | remove-appxpackage</code>?</p> <ol> <li>dont use -packagetypefilter</li> <li>the pipeline will get all the returned apps named <code>*zunemusic*</code> and remove them - however, if it floats your boat, specify each package individually</li> </...
Powershell: Two questions about Get-AppxPackage and the -PackageTypeFilter parameter
powershell|powershell-3.0
0
64
1
73,250,214
73,250,214
0
true
2022-07-01T11:25:40.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Powershell: Two questions about Get-AppxPackage and the -PackageTypeFilter parameter<p>I am making a list of app packages installed on my system. In this spe...
72,241,013
Finding distance between 2 coordinates in solidity<p>It is said that distance is equal to the following formula:</p> <pre><code>distance = sqrt( (x2 - x1)**2 + (y2 - y1)**2 ) </code></pre> <p>I do this exact formula in the function below. However, the problem I run into is when <code>x2</code> is less than <code>x1</co...
<p>Instead of using uint256 use int256 so you can accept negative number</p>
Finding distance between 2 coordinates in solidity
solidity
0
64
1
72,241,566
72,241,566
0
true
2022-05-14T14:12:49.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Finding distance between 2 coordinates in solidity<p>It is said that distance is equal to the following formula:</p> <pre><code>distance = sqrt( (x2 - x1)**2...
72,241,743
Adding HTML in a if-statement<p>I want the html to open when the password is right and I have tried .js, document.write, .html, href, div, document.getElementById and nothing is working when it's inside the if condition but I need it in there so it opens when the condition is right.</p> <pre><code>&lt;script&gt; functi...
<p>You can create the html element in this page and give this element display none and when the password is correct change display example:</p> <pre><code> if(pass==&quot;password&quot;) { alert(&quot;Logged In&quot;); document.getElementById(&quot;page&quot;).style.display=&quot;block&quot;;} </code></pre>
Adding HTML in a if-statement
html|loops|if-statement|script
0
64
1
72,241,834
72,241,834
0
true
2022-05-14T15:40:23.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adding HTML in a if-statement<p>I want the html to open when the password is right and I have tried .js, document.write, .html, href, div, document.getElemen...
72,249,480
Uncaught ReferenceError: Pjax is not defined at MutationObserver.<anonymous><p>I have had to use some js code in order to make a plugin work correctly with my word press website that uses ajax to load pages. The code allows the search plugin to be used without reloading pages when clicking a result (the search uses aja...
<p>There's no object called Pjax provided in the core JavaScript API. So if you're trying to use a function defined in another script make sure that the script is loaded first before you try to invoke any function from it.</p>
Uncaught ReferenceError: Pjax is not defined at MutationObserver.<anonymous>
javascript|ajax|pjax
0
64
1
72,249,595
72,249,595
0
true
2022-05-15T15:02:42.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Uncaught ReferenceError: Pjax is not defined at MutationObserver.<anonymous><p>I have had to use some js code in order to make a plugin work correctly with m...
72,254,696
I am getting a NullReferenceException with unity collisions<p>This is my code that is receiving the error on the playerScore increment line. The code is in a prefab that is generated many times, and if it hits the player, it is destroyed and the player's score is incremented. Currently the code will destroy on collisio...
<p>This is because you are using <code>GetComponent</code> in a class that does not have it and should find <code>GameMechanics</code> in it, but the result is <code>null</code>.</p> <pre class="lang-cs prettyprint-override"><code>GetComponent&lt;GameMechanics&gt;().playerScore++; // GameMechanics dosen't found.. </cod...
I am getting a NullReferenceException with unity collisions
c#|unity3d|collision|nullreferenceexception
0
64
2
72,254,985
72,254,985
0
true
2022-05-16T05:59:46.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I am getting a NullReferenceException with unity collisions<p>This is my code that is receiving the error on the playerScore increment line. The code is in a...
72,238,926
Latex algorithm cross-column typesetting<p>How to use latex to implement the multi-column algorithm in the link below, thank you very much. <a href="https://i.stack.imgur.com/ftwNr.png" rel="nofollow noreferrer">multi-column algorithm</a></p>
<p>Thanks to your suggestions, I finally solved it using &quot;\begin{multicols}{n}&quot; and &quot;\end{multicols}&quot;.</p> <pre><code>\usepackage{multicol} \begin{algorithm*}[h] \begin{multicols}{3} //three columns // your code } \end{multicols} \end{algorithm*} </code></pre>
Latex algorithm cross-column typesetting
algorithm|latex|multiple-columns
-2
64
1
72,258,653
72,258,653
0
true
2022-05-14T09:29:43.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Latex algorithm cross-column typesetting<p>How to use latex to implement the multi-column algorithm in the link below, thank you very much. <a href="https://...
72,271,573
How to show placeholder on left side of TextField with centered HintText/Text Flutter<p>Im trying to make a TextField with placeholder starting on the left of it, and still have the text and hint text centered.</p> <p>Here's my code to get the placeholder on the left of my textField :</p> <pre><code> Column( ...
<p>Try this:</p> <pre><code>TextField( controller: _textController, textAlign: (_textController?.text ?? '').isEmpty ? TextAlign.start : TextAlign.center, decoration: InputDecoration( hintText: &quot;hint text&quot;,), onChanged: (value){ setState(() {}); } ) </code></pre>
How to show placeholder on left side of TextField with centered HintText/Text Flutter
flutter|textfield|placeholder
0
64
1
72,271,896
72,271,896
0
true
2022-05-17T09:36:22.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to show placeholder on left side of TextField with centered HintText/Text Flutter<p>Im trying to make a TextField with placeholder starting on the left o...
72,277,580
Check how many times a value in an array appears in another array<p>I am trying to see how many times a value in one array appears in another. This was one thing I but it didn't work.</p> <pre><code>arr1 = [1, 2, 3, 4, 5]; arr2 = [1, 7, 8, 9, 10]; count = 0; for (x in arr2){ for (y in arr1){ ...
<p>x and y will be the indexes of the loops when using this syntax. So get what you are after you could do it like this.</p> <pre><code> const arr1 = [1, 2, 3, 4, 5]; const arr2 = [1, 7, 8, 9, 10]; count = 0; for (x in arr2){ for (y in arr1){ if (arr2[x] === arr1[y]){ ...
Check how many times a value in an array appears in another array
javascript|arrays
0
64
4
72,277,772
72,277,772
0
true
2022-05-17T16:24:57.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Check how many times a value in an array appears in another array<p>I am trying to see how many times a value in one array appears in another. This was one t...
72,277,785
Unprotect a range in a Protected Sheet<p>I have a protected worksheet with 7 range exceptions that are not protected. I'd like to remove protection from one more range (a cell) on the sheet, for a total of 8 unprotected ranges. I've read several examples in SO but so far none seem to work.</p> <p>Here's my code</p> <pr...
<p>Try the following script:</p> <pre><code>function myfunction() { var ss=SpreadsheetApp.openById('ID'); // get sheet var range = ss.getSheetByName('Sheet1').getRange(4,2,1,1); // gets the specific range you are trying to unprotect. ss.getSheetByName('Sheet1').protect().setUnprotectedRanges([range]); //adds the ...
Unprotect a range in a Protected Sheet
google-apps-script|google-sheets
0
64
1
72,280,410
72,280,410
0
true
2022-05-17T16:41:30.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unprotect a range in a Protected Sheet<p>I have a protected worksheet with 7 range exceptions that are not protected. I'd like to remove protection from one ...
72,287,251
Mutate pandas dataframe cell values<p>I want to mutate column <code>c</code> at a specific row by adding that row and another row.</p> <pre><code>df = pd.DataFrame({ 'A': [0,1,2,3], 'B': [0,1,2,3], 'C': [10,10,10,10] }) mask1 = df['A']==1 mask2 = df['B']==2 df.loc[mask1, 'C'] = df.loc[mask1, 'C'] + df.loc[...
<p>IIUC use select first value from <code>Series</code> by <code>df.loc[mask2, 'C']</code></p> <pre><code>df.loc[mask1, 'C'] = df.loc[mask1, 'C'] + df.loc[mask2, 'C'].iat[0] df.loc[mask1, 'C'] = df.loc[mask1, 'C'] + df.loc[mask2, 'C'].to_numpy()[0] </code></pre> <p>If possible <code>mask2</code> return all <code>False...
Mutate pandas dataframe cell values
python|pandas|dataframe
1
64
1
72,287,285
72,287,285
0
true
2022-05-18T10:13:38.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mutate pandas dataframe cell values<p>I want to mutate column <code>c</code> at a specific row by adding that row and another row.</p> <pre><code>df = pd.Dat...
72,291,440
get PythonManager working in Toon Boom Harmony v20<p>I am unable to get the PythonManager class working for <strong>Toon Boom Harmony v20 (20.0.4)</strong></p> <p>According to the documentation the <a href="https://docs.toonboom.com/help/harmony-20/scripting/extended/module-PythonManager.html" rel="nofollow noreferrer"...
<p>I solved this by updating Python to version <a href="https://www.python.org/downloads/release/python-2715/" rel="nofollow noreferrer">2.7.15</a></p> <p>The Python version was 2.7.9 when I was experiencing the error.</p>
get PythonManager working in Toon Boom Harmony v20
python
0
64
1
72,291,441
72,291,441
0
true
2022-05-18T14:52:13.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: get PythonManager working in Toon Boom Harmony v20<p>I am unable to get the PythonManager class working for <strong>Toon Boom Harmony v20 (20.0.4)</strong></...
72,293,510
POST Request does not show any value in node JS<p>I'm trying to send a post request to my node js server through google app script, but the received data is {}.</p> <p>I tried sending a Post through zapier and postman, zapier will work if I set the payload type to &quot;form&quot; and postman will work if I set the bod...
<p>In your script, how about the following modification?</p> <h3>From:</h3> <pre><code>var requestOptions = { &quot;method&quot; : &quot;post&quot;, &quot;contentType&quot; : &quot;application/x-www-form-urlencoded&quot;, &quot;body&quot; : payload //&quot;body&quot; : payload, } </code></pre> <h3>To:</h3> <pr...
POST Request does not show any value in node JS
node.js|express|google-apps-script
1
64
2
72,298,886
72,298,886
0
true
2022-05-18T17:23:49.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: POST Request does not show any value in node JS<p>I'm trying to send a post request to my node js server through google app script, but the received data is ...
72,314,143
Does res.end() not ends the http.createServer() callback function?<p>I have question about res.end() method available with require(&quot;http).createServer(). So the tutorial I was watching the following worked:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true"> <div cla...
<p><code>res.end()</code> is JUST a function call like any other function call. It does not affect the Javascript flow of control in your function at all. It terminates the http request, but not the function you're in. If there are lines of code after it in the function, they will execute. If you want to terminate t...
Does res.end() not ends the http.createServer() callback function?
node.js|http
0
64
1
72,314,184
72,314,184
0
true
2022-05-20T05:54:26.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does res.end() not ends the http.createServer() callback function?<p>I have question about res.end() method available with require(&quot;http).createServer()...
72,285,936
TeamCity VCS issue<p>We have an old version of TeamCity 9.0.2 (build 32195) that is running a build with a VCS root that has a fetch URL hosted in Azure DevOps. Without making changes we started seeing the following error when trying to run a build:</p> <p><a href="https://i.stack.imgur.com/w6GOJ.png" rel="nofollow nor...
<p>After updating the build agent's version of Java <em>and</em> the TeamCity service's version of Java to 1.8.0_333 (the latest version) the build could connect to the repository hosted in Azure DevOps.</p>
TeamCity VCS issue
java|devops|teamcity|tls1.2|teamcity-9.0
0
64
1
72,320,577
72,320,577
0
true
2022-05-18T08:45:50.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TeamCity VCS issue<p>We have an old version of TeamCity 9.0.2 (build 32195) that is running a build with a VCS root that has a fetch URL hosted in Azure DevO...
72,320,571
Mongodb project inside array of object with array of object<p>MongoDB</p> <p>I have data like:-</p> <pre><code>[ { review: [ { title: &quot;Title1&quot;, professor: [ { id: &quot;1&quot;, accept: false }, { id: &quot;2&quot;, ...
<p><a href="https://mongoplayground.net/p/HBrE-eRQlwK" rel="nofollow noreferrer">Playground</a></p> <p>Unwind stage could help you.</p> <pre><code>db.collection.aggregate([ { &quot;$match&quot;: { review: { $elemMatch: { professor: { $elemMatch: { id: &quot;1&quot...
Mongodb project inside array of object with array of object
mongodb|mongodb-query|aggregation-framework
1
64
1
72,320,771
72,320,771
0
true
2022-05-20T14:25:58.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mongodb project inside array of object with array of object<p>MongoDB</p> <p>I have data like:-</p> <pre><code>[ { review: [ { title: &qu...
72,324,792
How to convert a string/value in a file to a proper JSON and add a new key?<p>I have a JSON file that contains a string. I want to update my JSON file with key-value pair such that I can add a key corresponding to that string. I want to do this if only a string/value is there.</p> <p>At the same time, I want to add a n...
<p>To work with JSON data and files in Python, you use the <a href="https://docs.python.org/3/library/json.html" rel="nofollow noreferrer"><code>json</code> module</a>. It has methods for:</p> <ul> <li><a href="https://docs.python.org/3/library/json.html#json.load" rel="nofollow noreferrer"><code>load</code></a>-ing JS...
How to convert a string/value in a file to a proper JSON and add a new key?
python|json
0
64
1
72,326,375
72,326,375
0
true
2022-05-20T21:07:35.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert a string/value in a file to a proper JSON and add a new key?<p>I have a JSON file that contains a string. I want to update my JSON file with k...
72,325,741
deleting a post in django<p>hi ive read some of similar posts but couldn't find same problem. i wrote a code to delete post and when i press delete it shows 404 error but when back to home post is still there views:</p> <pre><code>def delete_music_view(request,music_id): # view for deleting music my_object = ad...
<p>Since the <code>delete_music_view</code> method is going to handle the <code>POST</code> request there's no need to use the form attribute <code>action</code>. You have:</p> <pre><code>&lt;form action=&quot;.&quot; method='POST'&gt; {% csrf_token %} &lt;p&gt;&lt;input type=&quot;submit&quot; name=&quot;delet...
deleting a post in django
python|django|django-views|django-forms
0
64
1
72,326,541
72,326,541
0
true
2022-05-21T00:03:03.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: deleting a post in django<p>hi ive read some of similar posts but couldn't find same problem. i wrote a code to delete post and when i press delete it shows ...
72,339,915
Run Spring Boot Project with base directory - localhost:8080/demo/<p>I have setup a run configuration in eclipse but it's running in localhost:8080 but I want it to run in localhost:8080/demo/ but it's not working. I have attached the run configuration and application properties file <a href="https://i.stack.imgur.com/...
<p>I think that you can just add this to your properties file</p> <pre><code>server.servlet.context-path=/demo </code></pre>
Run Spring Boot Project with base directory - localhost:8080/demo/
java|spring|eclipse|spring-boot
0
64
2
72,340,011
72,340,011
0
true
2022-05-22T17:36:59.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Run Spring Boot Project with base directory - localhost:8080/demo/<p>I have setup a run configuration in eclipse but it's running in localhost:8080 but I wan...
72,346,991
How to pass an object with private variables from Laravel to Inertia<p>Im new using laravel with inertia <br /> Version of my laravel is: 9.10.1, Inertia version: 0.11 and Vue: 3.2<br /> I have my class RefundManager</p> <pre><code>class RefundManager { private int $id; private string $refund; public funct...
<p>To convert a PHP object to a JS object, you need to convert it to a string with json format.</p> <p>Laravel does it automatically when you send an object to the view by trying to call <code>toJson()</code> if defined in the class (by default it is present in Model classes)</p> <p>So add these two function (will not ...
How to pass an object with private variables from Laravel to Inertia
laravel|vue.js|domain-driven-design|inertiajs|vue-props
0
64
1
72,349,048
72,349,048
0
true
2022-05-23T10:26:26.457Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass an object with private variables from Laravel to Inertia<p>Im new using laravel with inertia <br /> Version of my laravel is: 9.10.1, Inertia ver...
72,266,318
How to check for existing parent?<p>In general, I've been looking for how to properly check that an object is assigned.<br /> In this particular case, it is the parent property.<br /> I have forms that sometimes have a parent, and have slightly different behavior on resizing.</p> <p>But this code</p> <pre><code>If (Not...
<p>If you know the name of form(s) that form could be installed on as subform, can either loop through Forms collection and test if one equals &quot;parent&quot; form name (see @Gustav answer) or use IsLoaded method to test if a specific form is open in Forms collection (<code>If CurrentProject.AllForms(&quot;DataBitum...
How to check for existing parent?
vba|ms-access
1
64
2
72,353,525
72,353,525
0
true
2022-05-16T22:36:50.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check for existing parent?<p>In general, I've been looking for how to properly check that an object is assigned.<br /> In this particular case, it is ...
72,358,402
BeutifulSoup Output giving an empty list<p>I am trying to scrape the texts from a website with BeutifulSoup + python-requests. But it is only getting <code>[]</code> as an output.</p> <pre><code>from bs4 import BeautifulSoup import requests import urllib.request page = requests.get(&quot;https://www.adsbhub.org/statio...
<p>Take into account <code>nd</code> parameter is a Unix Time <code>1653375896726</code>, you can not specify it during the request to get up to date data.</p> <pre class="lang-py prettyprint-override"><code>import pandas as pd import requests import json def main(url): params = { &quot;cmd&quot;: &quot;1...
BeutifulSoup Output giving an empty list
python|beautifulsoup
-2
64
1
72,358,693
72,358,693
0
true
2022-05-24T06:56:04.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: BeutifulSoup Output giving an empty list<p>I am trying to scrape the texts from a website with BeutifulSoup + python-requests. But it is only getting <code>[...
72,360,002
Bootstrap grid layout - how to split page into 3 devision<p>I'd to split html page into 3 devision : 1st : contain text , table ... 2nd : this part will contain form for user submit 3nd : contain hyperlink or sth like that</p> <p>my code likes below:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt...
<p>Here you go...</p> <ol> <li><strong>You are missing a <code>&lt;div&gt;</code> closing tag!</strong></li> <li>Optional: Change <code>col</code> to <code>col-md-4 col-12</code>.</li> <li>Optional: You can remove <code>style=&quot;width: 50%;&quot;</code>.</li> <li>Optional: Add <code>d-flex justify-content-</code> cl...
Bootstrap grid layout - how to split page into 3 devision
html|bootstrap-4
-1
64
2
72,361,446
72,361,446
0
true
2022-05-24T08:57:49.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bootstrap grid layout - how to split page into 3 devision<p>I'd to split html page into 3 devision : 1st : contain text , table ... 2nd : this part will cont...
72,361,850
Time to process a file is very long without import<p>My code is as follows:</p> <pre><code>import re def get_filename(): &quot;&quot;&quot;gets the file&quot;&quot;&quot; filename = input(&quot;Please enter filename: &quot;) return filename def get_words_from_file(filename): &quot;&quot;&quot;gett...
<p>From what I see I would assume that</p> <pre class="lang-py prettyprint-override"><code> for word in words: total =words.count(word) all_times.append(total) </code></pre> <p>is the problem, because its runtime is O(len(words)**2). What about changing this to</p> <pre class="lang-py prettyprint-ove...
Time to process a file is very long without import
python|file|runtime
0
64
3
72,362,191
72,362,191
0
true
2022-05-24T11:11:28.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Time to process a file is very long without import<p>My code is as follows:</p> <pre><code>import re def get_filename(): &quot;&quot;&quot;gets the file...
72,362,396
Pyspark SQL : Converting a string to timestamp custom format<p>I want to convert a input of string datatype (which is MMYYYY format - has only month &amp; year) to a custom format in timestamp.</p> <p>In the output the input string should be converted into timestamp having 00 hours, 00 minutes, 00 seconds and 000 milli...
<p>try</p> <pre><code>select date_format(to_timestamp('072022','MMyyyy'),'yyyy-MM-dd HH:mm:ss.SSS') </code></pre> <p>replace the 072022 with your column</p>
Pyspark SQL : Converting a string to timestamp custom format
pyspark|apache-spark-sql
-2
64
1
72,362,579
72,362,579
0
true
2022-05-24T11:50:35.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pyspark SQL : Converting a string to timestamp custom format<p>I want to convert a input of string datatype (which is MMYYYY format - has only month &amp; ye...
72,392,003
java NullPointer Exception<p>Currently developing a mobile app using java with android studio. (Beginner) I have 3 fragments (ToDo,Doing,Done) with on top a tablayout(ToDo,Ongoing,Finished) and a toolbar with an add button.</p> <p>The add button should create a list allowing the user to modify the content of each <code...
<p>Sorry, I didn't fully understand your code. So, without checking your complete code. My guess is that you haven't used <code>LayoutManager</code> to show your <code>listKanban</code>. So add <code>layoutManager</code> code and run again.</p> <p>Add the below code inside your <code>onCreateView</code>.</p> <pre><code...
java NullPointer Exception
android|android-recyclerview
0
64
1
72,413,228
72,413,228
0
true
2022-05-26T12:42:34.573Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: java NullPointer Exception<p>Currently developing a mobile app using java with android studio. (Beginner) I have 3 fragments (ToDo,Doing,Done) with on top a ...
72,349,739
Symfony to "proxy" a webservice?<p>I'm struggling a bit with the following: I have a symfony web-application which calls a webservice (hosted on another server). The webservice returns a JSON object with calendar data, and in my symfony controller this data is saved in an array. For the visualisation of the calendar to...
<p>The symfony documentation link is, in my mind, the best answer to be given to this question -&gt; symfony.com/doc/current/frontend/encore/server-data.html</p>
Symfony to "proxy" a webservice?
javascript|symfony|web-services|fullcalendar|fullcalendar-4
-1
64
1
72,429,544
72,429,544
0
true
2022-05-23T13:51:52.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Symfony to "proxy" a webservice?<p>I'm struggling a bit with the following: I have a symfony web-application which calls a webservice (hosted on another serv...
72,356,795
How to add text inside existing lines<p>So I already know how to open / read from a file line.. for example here's what I wrote so far.</p> <pre><code>a=0 file_paths = sys.argv[1:] for path in file_paths: a=1 if(a==0): while True: print('\nSpecify where the path of the code is') print('Examp...
<p>There are a few ways you can do this. One simple way is to split each line by spaces and put in the surrounding text in a print statement:</p> <pre class="lang-py prettyprint-override"><code>for line in src: line_parts = line.split() print(f'!{line_parts[0]} - 234 !{line_parts[1]}') </code></pre> <p>This obvious...
How to add text inside existing lines
python
1
64
1
72,356,910
72,356,910
0
true
2022-05-24T03:09:13.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add text inside existing lines<p>So I already know how to open / read from a file line.. for example here's what I wrote so far.</p> <pre><code>a=0 fi...
72,238,970
Cognito throwing Username should be an email<p>I am attempting to build a lambda function connected to an API gateway POST method that will allow users to create and register cognito users within a given pool:</p> <pre><code>def lambda_handler(event, context): username = json.dumps(event[&quot;body&quot;]) try: ...
<p><code>json.dumps</code> converts object -&gt; JSON. <br /> <code>json.loads</code> converts JSON -&gt; object.</p> <p>If the <code>event</code> is JSON, you want to convert JSON -&gt; object so try <code>username = json.loads(event[&quot;body&quot;])</code> instead.</p> <p>If it isn't and you're just passing the use...
Cognito throwing Username should be an email
python|amazon-web-services|amazon-cognito
0
64
1
72,239,045
72,239,045
0
true
2022-05-14T09:37:26.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cognito throwing Username should be an email<p>I am attempting to build a lambda function connected to an API gateway POST method that will allow users to cr...
72,263,265
Loading an object across multiple files<p>I'm making a game in Python, and I have an object to store all of the user's preferences in, referred to as <code>gameSettings</code>.</p> <p>When running functions in a seperate file (<code>functions.py</code>) I have to create a new local <code>gameSettings</code> var in ever...
<p>How do you see this solution? Using a shared dictionary. From my experience, I'd store that settings as a .json file and load it when you start the game.</p> <p>main.py</p> <pre><code>from func1 import Func1 from func2 import Func2 class GameSettings(): def __init__(self, printX=False, printZ=False): self.set...
Loading an object across multiple files
python
0
64
2
72,263,621
72,263,621
0
true
2022-05-16T17:26:55.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Loading an object across multiple files<p>I'm making a game in Python, and I have an object to store all of the user's preferences in, referred to as <code>g...
72,398,324
How to get a new column count number of time appear of a date<p>I have this dataframe with this datatypes</p> <pre><code> Date Time 0 2022-05-20 17:07:00 1 2022-05-20 09:14:00 2 2022-05-19 18:56:00 3 2022-05-19 13:53:00 4 2022-05-19 13:52:00 ... ... ... 81 2022-04-22 09:53:00 82 2022-04-20 ...
<p>you can merge the count by dates to the original DF. Does that help?</p> <pre><code>df2=df.groupby(['Date'])['Date'].count().reset_index(name='count') df3=df.merge(df2, on='Date', how='left') df3.set_index('Date', inplace=True) df3 </code></pre> <pre><code> Time count Date ...
How to get a new column count number of time appear of a date
python|pandas|dataframe|date
0
64
2
72,398,472
72,398,472
0
true
2022-05-26T21:42:40.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get a new column count number of time appear of a date<p>I have this dataframe with this datatypes</p> <pre><code> Date Time 0 2022-05-20 ...
72,320,388
Interrupt and Reset set Timeout - Javascript<p>I have the following issue: I am currently working on a Chatbot that is supposed to simulate an exam situation. Therefore I let it ask questions and the User should have an x amount of time in order to answer the question. Once the time is up, the Bot is supposed to ask th...
<ol> <li>timer needs to be outside the function</li> <li>test needs to be its own function</li> </ol> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>let timer; const test = () =&g...
Interrupt and Reset set Timeout - Javascript
javascript|settimeout|event-listener|cleartimeout
0
64
1
72,320,512
72,320,512
0
true
2022-05-20T14:14:46.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Interrupt and Reset set Timeout - Javascript<p>I have the following issue: I am currently working on a Chatbot that is supposed to simulate an exam situation...
72,297,594
Union all inside the Left outer Join is not fetching all the values, it is just pulling values outside the sub-query (which PRJ_elements)<p>I have a question regarding the use of UNION ALL and Left Outer Join. What I am trying to achieve is Get the Project Total costs along with few other fields but at the same time I ...
<blockquote> <p>it's not fetching the columns wrapped inside the Join.</p> </blockquote> <p>You didn't SELECT them in the outer query.</p> <p>SQL operates on blocks of data. A table is a block of data that is fed into a FROM. The output of a query is also a block of data that can be fed into a FROM.</p> <p>Person table...
Union all inside the Left outer Join is not fetching all the values, it is just pulling values outside the sub-query (which PRJ_elements)
sql|left-join|union-all
-1
64
1
72,297,797
72,297,797
0
true
2022-05-19T01:14:38.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Union all inside the Left outer Join is not fetching all the values, it is just pulling values outside the sub-query (which PRJ_elements)<p>I have a question...