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,992,698
How do I create a pop up modal on successful form submission?<p>I have an HTML form connected to <a href="https://formsubmit.co/" rel="nofollow noreferrer">formsubmit.co</a> form endpoint.</p> <pre><code> &lt;form action=&quot;https://formsubmit.co/my@email.com&quot; method=&quot;POST&quot; class=&quot;form&quot;&gt; ...
<pre><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css&quot; /&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascrip...
How do I create a pop up modal on successful form submission?
javascript|html|events|dom-events|form-submit
0
66
2
72,992,892
72,992,892
0
true
2022-07-15T10:36:48.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I create a pop up modal on successful form submission?<p>I have an HTML form connected to <a href="https://formsubmit.co/" rel="nofollow noreferrer">f...
72,976,550
Floorcasting not scrolling in raycasting engine?<p>I'm currently working on a raycaster in Java, and so far, I have the floor correctly textured. The problem, however, is that the floor doesn't scroll. In other words, when I move the camera in the projection, the floor stays the same, yet the walls move as expected. I'...
<p>Fixed it on my own. Turns out that, yes, you <em>do</em> have to account for the player's position (shocker!); the source I got the code from just didn't do it correctly.</p> <p>DTPP = distance to projection plane.</p> <pre><code>for every pixel y from wallY + wallHeight + 1 to projectionHeight: double r = y - t...
Floorcasting not scrolling in raycasting engine?
java|game-development|raycasting
2
66
1
73,000,664
73,000,664
0
true
2022-07-14T07:08:44.730Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Floorcasting not scrolling in raycasting engine?<p>I'm currently working on a raycaster in Java, and so far, I have the floor correctly textured. The problem...
73,001,766
Unity Firebase Realtime Database Query Returning Incorrect Values<p><strong>Problem/Background:</strong></p> <p>When users are registered via Firebase Auth, their username, userID, and email are also being stored in Firebase Realtime Database. One of the checks in place upon user registration is to ensure that they can...
<p>Firebase has had this problem for years. In the editor, it sometimes returns the correct values, and. sometimes in the next run no. The only solution is to stop the execution and restart it until Firebaase gives the correct results. I've been looking for a solution for a long time, but this is the only one that work...
Unity Firebase Realtime Database Query Returning Incorrect Values
c#|unity3d|firebase-realtime-database
0
66
1
73,001,828
73,001,828
0
true
2022-07-16T05:32:04.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unity Firebase Realtime Database Query Returning Incorrect Values<p><strong>Problem/Background:</strong></p> <p>When users are registered via Firebase Auth, ...
73,003,265
how do I solved a super(type, obj): obj must be an instance or subtype of type type error?<p>I'm trying to run a test on my app's index.html and here I have:</p> <p><strong>test.py</strong></p> <pre><code>class IndexTest(TestCase): def setUp(self): url = reverse ('index') self.response = self.client_class.get(self...
<p>I don't see that you are setting any not-standard Class, so you should not use <code>self.client_class</code>. Just change it to more standard way:</p> <pre><code>from django.test import Client class IndexTest(TestCase): def setUp(self): url = reverse ('index') self.client = Client() sel...
how do I solved a super(type, obj): obj must be an instance or subtype of type type error?
python|django
0
66
1
73,003,939
73,003,939
0
true
2022-07-16T10:01:24.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how do I solved a super(type, obj): obj must be an instance or subtype of type type error?<p>I'm trying to run a test on my app's index.html and here I have:...
73,008,374
Failed to display data from Http get request in a mat-table<p>I'm fetching data from an API; a Http get request. The returned data that I'm having is Object composed of 02 Strings and 03 Integer. I do receive the data in the console (from the &quot;AuthenticationService&quot;), but I failed displaying them in the mater...
<p>I maintained the Json response as a json (in the backend):</p> <pre><code>public Response fetchV1Devices(.....) { // some code here retrun Response.ok(js).build(); } </code></pre> <p>then I converted it to an Array like this <code>this.dataSource = new Array(data);</code> and of course in the html file <code>&lt;mat...
Failed to display data from Http get request in a mat-table
angular|angular-material
0
66
2
73,014,083
73,014,083
0
true
2022-07-16T23:52:01.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Failed to display data from Http get request in a mat-table<p>I'm fetching data from an API; a Http get request. The returned data that I'm having is Object ...
73,021,062
How to convert blazor web Assembly from .net framework 5.0 to 6.0<p><a href="https://i.stack.imgur.com/NtSre.jpg" rel="nofollow noreferrer">enter image description here</a>I have blazor web Assembly project .net 5.0. I have changed Target .Net Framework 6.0 in visual studio 2022. But I can not application and its shows...
<p>I have been there and I have seen others having same issue.</p> <p>The post here has some steps you can try and see if it works</p> <p><a href="https://stackoverflow.com/questions/70393993/2022-wasm-blazor-webassembly-js-not-found-net5-to-net6-upgrade?noredirect=1#comment124535395_70393993">2022 wasm blazor.webassem...
How to convert blazor web Assembly from .net framework 5.0 to 6.0
.net|blazor-webassembly
0
66
1
73,023,357
73,023,357
0
true
2022-07-18T10:44:05.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert blazor web Assembly from .net framework 5.0 to 6.0<p><a href="https://i.stack.imgur.com/NtSre.jpg" rel="nofollow noreferrer">enter image descr...
73,025,829
Python, Float Data Sorting Problem in Dataframe<p>The code:</p> <pre><code>serie=df[&quot;TUTAR&quot;].apply(lambda x: x.strip(&quot;'&quot;)) df_s=serie.to_frame() df_s.sort_values(by=&quot;Tutar&quot;,ascending=False)[0:50] </code></pre> <p>Hello friends, I have the &quot;TUTAR&quot; (Amount) column, a data frame con...
<pre><code># Max Purchasing Value serie=df[&quot;TUTAR&quot;].apply(lambda x: x.strip(&quot;'&quot;)) serie1=serie.apply(lambda x: x.replace(&quot;,&quot;,&quot;.&quot;)) df_s=serie1.to_frame() df_s1=df_s.astype(&quot;float&quot;) df_s1.sort_values(by=&quot;TUTAR&quot;,ascending=False)[0:50] </code></pre> <p><a href="h...
Python, Float Data Sorting Problem in Dataframe
python-3.x|pandas|dataframe|numpy|series
0
66
1
73,026,401
73,026,401
0
true
2022-07-18T16:45:38.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python, Float Data Sorting Problem in Dataframe<p>The code:</p> <pre><code>serie=df[&quot;TUTAR&quot;].apply(lambda x: x.strip(&quot;'&quot;)) df_s=serie.to_...
73,027,450
mutation reference for Box closure, but not live long enough<p>I'm rather new to rust, I have some problems,I don't know how to describe my problem. I think talk is cheap and I want to show my code, but I must add more detail for post.</p> <pre class="lang-rust prettyprint-override"><code>// programA struct ClosureTest...
<p>To understand what is happening here you'll need to make a little dive into the Rust Book and learn about <a href="https://doc.rust-lang.org/rust-by-example/scope/lifetime.html" rel="nofollow noreferrer">lifetimes</a>.</p> <p>I'll simplify for sake of explanation and comment this:</p> <pre><code>//type Executor = Bo...
mutation reference for Box closure, but not live long enough
rust
0
66
1
73,028,100
73,028,100
0
true
2022-07-18T19:10:48.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mutation reference for Box closure, but not live long enough<p>I'm rather new to rust, I have some problems,I don't know how to describe my problem. I think ...
73,028,030
Deep Learning Model gives inaccurate results in executable file program unlike the same script in python, messing up predictions<p>I made my first deep learning model for cancer detection using infrared image recognition through the Sequential DL model. I am able to run the following code through a GUI python script wi...
<p>Solved the issue. Apparently using an earlier version of OpenCV to remove the recursion error leads to issues in image reading and inputting for the deep learning model involved. Increasing the recursion limit by using the '''--add data''' in pyinstaller command for .exe conversion increases recursion limit to 5000 ...
Deep Learning Model gives inaccurate results in executable file program unlike the same script in python, messing up predictions
python|opencv|deep-learning|pyinstaller|relative-path
-1
66
1
73,032,541
73,032,541
0
true
2022-07-18T20:08:13.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Deep Learning Model gives inaccurate results in executable file program unlike the same script in python, messing up predictions<p>I made my first deep learn...
73,029,013
plotting a graph for 24 hours from a year data<p>I have a dataset of 100 households' electricity consumption over 8760 hours. I have managed to plot the load over the year quite easily. However, I'm struggling to plot a graph showing changes over the 24 hours in a day.</p> <pre><code>householdData = pd.read_excel('/con...
<p>Expanding on my comment, here's how you could use a Pandas groupby to get the data you want.</p> <p>I don't have your data, so I found a temperature dataset, for which I'm going to plot the average temperature and humidity by time of day.</p> <p><a href="https://www.kaggle.com/datasets/kadenswarr/hourly-weather-data...
plotting a graph for 24 hours from a year data
python|pandas|datetime|matplotlib
0
66
1
73,042,753
73,042,753
0
true
2022-07-18T21:53:20.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: plotting a graph for 24 hours from a year data<p>I have a dataset of 100 households' electricity consumption over 8760 hours. I have managed to plot the load...
72,893,874
FM for printing ZPL causes deadlock<p>I did create a ABAP report to print some ZPL which works fine. Now my goal is to transfer that logic into a FM to be able to call it wherever and however I want. Problem is that doing so causes my SAPGUI to deadlock itself for like 10 minutes and show me a message saying &quot;roll...
<p>The problem seems to be the SE37 environment. The fact that I try to write to a printer in a FM. If I call the FM from a normal report then all works out as expected.</p>
FM for printing ZPL causes deadlock
abap|zpl|function-module
0
66
1
73,046,985
73,046,985
0
true
2022-07-07T07:30:49.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: FM for printing ZPL causes deadlock<p>I did create a ABAP report to print some ZPL which works fine. Now my goal is to transfer that logic into a FM to be ab...
73,028,073
flask, neo4j and docker : Unable to retrieve routing information<p>I try to develop a mindmap API with flask and neo4j, i would like to dockerize all my project. All services are started but backend dont want to communicate with noe4J ... I have this error :</p> <pre><code>neo4j.exceptions.ServiceUnavailable: Unable to...
<p>On my web service declaration I change NEO4J_URL from localhost to neo4j ( name of my service )</p> <pre><code>version: '3' services: web: build: ./backend command: flask run --host=0.0.0.0 #gunicorn --bind 0.0.0.0:5000 mindmap_api:app ports: - 5000:5000 environment: - FLASK_APP=mindma...
flask, neo4j and docker : Unable to retrieve routing information
python|docker|flask|docker-compose|neo4j
0
66
1
73,058,395
73,058,395
0
true
2022-07-18T20:11:34.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: flask, neo4j and docker : Unable to retrieve routing information<p>I try to develop a mindmap API with flask and neo4j, i would like to dockerize all my proj...
72,992,548
Jfrog X-RAY API not working for "Get Reports List"<p>Following reference <a href="https://www.jfrog.com/confluence/display/JFROG/Xray+REST+API#XrayRESTAPI-GetReportsList" rel="nofollow noreferrer">Xray REST API - GetReportList</a></p> <p>Below example returns - {&quot;error&quot;:&quot;Failed to parse request paginatio...
<p>So although Gajapathi was partly correct, the pagination parameters were not optional, the issue here was the lack of quotes around the Artifactory URL. Guess this may be a requirement of pagination?</p> <p>The final solution, with a slightly different filter:</p> <pre><code>curl --location --silent --request POST ...
Jfrog X-RAY API not working for "Get Reports List"
api|rest|jfrog-xray
1
66
2
73,064,729
73,064,729
0
true
2022-07-15T10:24:11.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jfrog X-RAY API not working for "Get Reports List"<p>Following reference <a href="https://www.jfrog.com/confluence/display/JFROG/Xray+REST+API#XrayRESTAPI-Ge...
73,026,353
Cross browser SSO with CAS<p>Is there a way to implement a cross browser single sing on using CAS? I'm aware that this isn't a standard workflow and that SSO workflows work on a single browser using session cookies, but we have a specific need that would require to automatically sign in in another browser (e.g. MS Edge...
<p>CAS provides support for token-based authentication on top of JWTs, where an authentication request can be granted an SSO session based on a form of credentials that are JWTs. CAS expects a token parameter (or request header) to be passed along to the /login endpoint as the credential. The parameter value must of co...
Cross browser SSO with CAS
cross-browser|single-sign-on|cas
0
66
1
73,088,214
73,088,214
0
true
2022-07-18T17:33:25.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cross browser SSO with CAS<p>Is there a way to implement a cross browser single sing on using CAS? I'm aware that this isn't a standard workflow and that SSO...
72,840,307
ColdFusion : Record Deletion<p>I have a crypto bot that is working well. But every once in awhile I get a data delete error. It usually occurs when I reload the page or an auto reload happens and the record was deleted just prior I think. And new data was not populated in or it has that #deleted# in table?</p> <p>On...
<p>Created a separate scheduled task 30minutes. Fixed. Does it once... Doesn't loop over deleted records.</p>
ColdFusion : Record Deletion
sql|ms-access|coldfusion|coldfusion-2016
0
66
1
73,100,879
73,100,879
0
true
2022-07-02T15:34:26.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ColdFusion : Record Deletion<p>I have a crypto bot that is working well. But every once in awhile I get a data delete error. It usually occurs when I reloa...
72,931,860
Unity does not read values from the Serial port correctly, help please<p>I am connecting an Arduino to the Unity game engine and I need them to communicate through the serial ports but for some reason, Unity does not read the data correctly and instead gives me random values between 0 and 300. this is only the problem ...
<p>actually what I had to do was put a delay of around 10ms in my void Update() on the Arduino code</p>
Unity does not read values from the Serial port correctly, help please
unity3d|serial-port
0
66
1
73,115,498
73,115,498
0
true
2022-07-10T21:00:01.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unity does not read values from the Serial port correctly, help please<p>I am connecting an Arduino to the Unity game engine and I need them to communicate t...
72,870,586
My android application rejected for using MANAGE_EXTERNAL_STORAGE permission. How to fix it?<p>My app targetting API 30. My app is integrated with <code>com.github.barteksc:android-pdf-viewer:2.8.2</code> which uses InputStream &amp; OutputStream to download &amp; display file in pdfview. Using <code>Environment.getExt...
<p>I tried not to use <code>DIRECTORY_DOCUMENTS</code> but instead used scoped storage which requires only</p> <pre><code>&lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt; &lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot;/&gt; </code></pre> <...
My android application rejected for using MANAGE_EXTERNAL_STORAGE permission. How to fix it?
android|google-play|android-permissions
-1
66
1
73,124,759
73,124,759
0
true
2022-07-05T13:49:59.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My android application rejected for using MANAGE_EXTERNAL_STORAGE permission. How to fix it?<p>My app targetting API 30. My app is integrated with <code>com....
72,929,933
Functional Interfaces in Scala<p>I have been working with Java for a while and now I am trying to learn Scala. I have a hard time understanding how to create a Functional Interface in Scala. I'm trying following code, but it's not working:</p> <pre><code>object Ex3 extends App { trait Printer { def print(s: String):...
<p>Ihor! Nice to meet you there:)</p> <p><code>p(&quot;Hello&quot;)</code> - it means <code>p.apply(&quot;hello&quot;)</code>. But you didn't write <code>apply</code> method.</p> <p>So you can call it like that:</p> <pre><code>p.print(&quot;Hello&quot;) </code></pre>
Functional Interfaces in Scala
scala|function|traits|functional-interface
0
66
3
73,208,193
73,208,193
0
true
2022-07-10T16:07:47.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Functional Interfaces in Scala<p>I have been working with Java for a while and now I am trying to learn Scala. I have a hard time understanding how to create...
72,932,447
To find match element in array json.file and change it [node js]<p>Good afternoon, I have a script that changes the value of the json file</p> <pre><code>const fsp = require('fs').promises; async function udpateTimeInFile() { try { let data = await fsp.readFile('example.json'); let obj = JSON.parse...
<p>You can use the <code>Array#findIndex</code> method to find the index of the first occurrence of <code>2</code>, then you can use the index to change the value to <code>3</code>.</p> <p><strong>DEMO</strong></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div cla...
To find match element in array json.file and change it [node js]
javascript|node.js
0
66
1
72,932,502
72,932,502
0
true
2022-07-10T23:09:56.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: To find match element in array json.file and change it [node js]<p>Good afternoon, I have a script that changes the value of the json file</p> <pre><code>con...
72,927,092
how to get the calculated date and time in java?<p>I have a date say 2022-07-10 as date (YYY/MM/dd) and time as 00:15</p> <p>ie. <code>202207**10*****0015***</code></p> <p>after subtracting <strong>30</strong> mins from above the result must be</p> <p>2022-07-09 and time as 23:45</p> <p>ie. <code>202207**09***2345***</...
<p>You need to use <code>LocalDateTime.minus</code> method:</p> <pre><code>DateTimeFormatter DATEFORMATTER = DateTimeFormatter.ofPattern(&quot;yyyy-MM-dd HH:mm&quot;); LocalDateTime d = LocalDateTime.parse(&quot;2022-07-10 00:10&quot;, DATEFORMATTER); d.atZone(ZoneId.systemDefault()); LocalDateTime d2 = d.minus(Durat...
how to get the calculated date and time in java?
java|date|datetime|time
-2
66
2
72,927,222
72,927,222
0
true
2022-07-10T08:19:40.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to get the calculated date and time in java?<p>I have a date say 2022-07-10 as date (YYY/MM/dd) and time as 00:15</p> <p>ie. <code>202207**10*****0015***...
72,983,803
How to reset after call to QProcess::setStandardOutputFile so that outout is directed to stdout again<p>Here's a snippet of code to explain what I am trying to do</p> <pre><code> QProcess* myProcess = new QProcess(); myProcess-&gt;start(&quot;echo test1&quot;); myProcess-&gt;waitForFinished(); myProcess...
<p>The solution is simply setting the standard output file to an empty string by <code>&quot;&quot;</code>, <code>QString()</code>, <code>{}</code>, etc. It would be helpful if the documentation was explaining that hidden gem. I will submit a merge request later to update the documentation.</p> <p>This code demonstrate...
How to reset after call to QProcess::setStandardOutputFile so that outout is directed to stdout again
qt|qt5|qprocess
1
66
2
72,989,131
72,989,131
0
true
2022-07-14T16:29:13.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to reset after call to QProcess::setStandardOutputFile so that outout is directed to stdout again<p>Here's a snippet of code to explain what I am trying ...
72,982,718
Using a jQuery script in a .php file and adding a condition<p>How can I run the following woodmart theme jquery script based on a php condition?</p> <p>The jQuery script here asks for age validation on the website and restricts the page if there is no validation.</p> <p>I just want to use this code for some category pr...
<p>I copied the jQuery script into the child theme and then <code>&lt;script src='/wp-content/themes/woodmart-child/js/scripts/global/ageVerify.js'&gt;&lt;/script&gt;</code> to show the jQuery script, while doing this I added the conditions with PHP and now it works fine.</p> <p>The final version of the code with PHP i...
Using a jQuery script in a .php file and adding a condition
javascript|php|jquery
1
66
2
72,986,729
72,986,729
0
true
2022-07-14T15:04:24.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using a jQuery script in a .php file and adding a condition<p>How can I run the following woodmart theme jquery script based on a php condition?</p> <p>The j...
72,958,113
kotlin-reflect-1.6.10.pom:2:1: Content is not allowed in prolog<p><strong>VS code</strong> As I am new in Flutter Dart ,When I am trying to build demo flutter app in my Android Phone in Android Studio OR VS code I keep getting this error,</p> <pre><code>FAILURE: Build failed with an exception. * What went wrong: Execu...
<p>Change your kotlin version according you installed and set the gradle plugin match.</p>
kotlin-reflect-1.6.10.pom:2:1: Content is not allowed in prolog
flutter|android-studio|kotlin|gradle|visual-studio-code
1
66
1
72,958,294
72,958,294
0
true
2022-07-12T20:39:12.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: kotlin-reflect-1.6.10.pom:2:1: Content is not allowed in prolog<p><strong>VS code</strong> As I am new in Flutter Dart ,When I am trying to build demo flutte...
72,818,059
Python projects are not supported on Windows Function Apps. Deploy to a Linux Function App instead<p>I have tried to deploy my first Azure Function from VS Code, Python. Windows 10.</p> <p>Although everything else is okay, VS Code says that it is impossible to do it from Windows OS.</p> <p>Is there absolutely no way of...
<p>The right way is Creating the Function App on VS Code in the Windows OS environment and publishing it to Linux Function App in Azure.</p> <p>As of now, Python Azure Functions are not supported in Windows Azure Function App.</p> <p>Refer the <a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-sc...
Python projects are not supported on Windows Function Apps. Deploy to a Linux Function App instead
azure-functions
0
66
1
72,818,643
72,818,643
0
true
2022-06-30T15:03:23.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python projects are not supported on Windows Function Apps. Deploy to a Linux Function App instead<p>I have tried to deploy my first Azure Function from VS C...
72,931,296
ERROR sending file.image Error: ENOENT: no such file or directory<p>Error: ENOENT when I test my route on POSTMAN. Hi so I have an issue with Error: ENOENT when I test my route on POSTMAN. So in this issue I have my image with undefined name at the begining.</p> <p>If someone can help me it would be awesome thank you !...
<p>It solved I change :</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code> image = fs.readFileSync( __dirname + "/images/" + req.file.filename ) </code></pre> </div> </div> ...
ERROR sending file.image Error: ENOENT: no such file or directory
javascript|file|multer
-2
66
1
72,937,613
72,937,613
0
true
2022-07-10T19:27:18.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ERROR sending file.image Error: ENOENT: no such file or directory<p>Error: ENOENT when I test my route on POSTMAN. Hi so I have an issue with Error: ENOENT w...
72,905,220
How to get all roles granted to a user in Trino/Presto?<p>basically what is the equivalent of hive query in trino/presto.</p> <pre><code>show role grant user &lt;username&gt;; </code></pre>
<p>we can get the information from <code>information_schema</code> it is self explanatory but i cannot find document about this system defined schema.</p> <pre><code>SELECT * FROM information_schema.role_authorization_descriptors WHERE grantee = 'a_user'; </code></pre> <p>a more useful query is check whether a user h...
How to get all roles granted to a user in Trino/Presto?
sql|hive|presto|trino
0
66
1
72,914,433
72,914,433
0
true
2022-07-07T23:28:22.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get all roles granted to a user in Trino/Presto?<p>basically what is the equivalent of hive query in trino/presto.</p> <pre><code>show role grant user...
72,779,179
MessageEmbed field values must be non-empty strings gamedig problem<p>Hello i have a problem and its <strong>its if (typeof data !== 'string') throw new error(errorMessage); RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings.</strong></p> <p>i...
<p>Modify your code from your recent:</p> <pre><code>let state = null; let jugadores = 0; setInterval(() =&gt; { Gamedig.query({ type: 'minecraft', host: 'mc.latinplay.net', port: '25565' }) .then((updatedState) =&gt; { state = updatedState; players = state.players.length || &quot;0&quot;;...
MessageEmbed field values must be non-empty strings gamedig problem
javascript|discord|discord.js|gamedig
-1
66
1
72,779,962
72,779,962
0
true
2022-06-27T23:14:43.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MessageEmbed field values must be non-empty strings gamedig problem<p>Hello i have a problem and its <strong>its if (typeof data !== 'string') throw new e...
72,816,565
Two modals with different ID show the same content<p>I'm trying to code a page where, on clicking different areas of a map, different modals with different content pop up. However, when I click on either area, the same content shows up (and the &quot;close&quot; button doesn't work). I gave them different IDs, and they...
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button id="btn1"&gt;button 1&lt;/button&gt; &lt;button id="btn1"&gt;button 2&lt;/button&gt; &lt;script&gt; (function() { ...
Two modals with different ID show the same content
javascript|html|css|simplemodal|close-button
0
66
2
72,818,529
72,818,529
0
true
2022-06-30T13:19:29.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Two modals with different ID show the same content<p>I'm trying to code a page where, on clicking different areas of a map, different modals with different c...
72,838,502
Firebase function timeout when calling external api<p>I'm trying to call an external API in Firebase Functions but i always get a timeout. What can be the issue causing this?</p> <p>Here is my code</p> <pre><code>exports.getCountryData = functions.https.onRequest((request, response) =&gt; { const https = require('http...
<p>It turns out using their Rapid Api url (<strong>api-football-v1.p.rapidapi.com/v3</strong>) was was resulting in a timeout. Using a direct Api url (<strong>v3.football.api-sports.io</strong>) with their domain name in it did the trick for me.</p> <p><strong>Here is my working code.</strong></p> <pre><code>exports.ge...
Firebase function timeout when calling external api
javascript|node.js|firebase|google-cloud-functions
0
66
2
72,872,527
72,872,527
0
true
2022-07-02T10:56:46.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase function timeout when calling external api<p>I'm trying to call an external API in Firebase Functions but i always get a timeout. What can be the is...
72,929,203
How To Get The Number Of Days Between Two Dates In Emeditor<p>In Emeditor, how do i get the number of days between 2 date columns? Example:</p> <ul> <li>Column A: 25/11/2022</li> <li>Column B: 29/11/2022</li> </ul> <p>-&gt; Column C: 4 days</p>
<p>Sample:</p> <pre><code>1/1/2022,1/2/2022, 1/1/2022,2/2/2022, 1/1/2022,3/2/2023, </code></pre> <p>The 3rd column must be an <em>empty</em> column. Assuming the date format is the system date format. In this case, it is the US format (m/d/yyyy).</p> <ol> <li><p>Select the 3rd empty column by clicking the 3rd column he...
How To Get The Number Of Days Between Two Dates In Emeditor
emeditor
0
66
2
73,040,819
73,040,819
0
true
2022-07-10T14:23:48.963Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How To Get The Number Of Days Between Two Dates In Emeditor<p>In Emeditor, how do i get the number of days between 2 date columns? Example:</p> <ul> <li>Colu...
72,895,442
Replace letters in column to generate new column<p>I have a tab-delimited file which contains two columns(ref and alt). I want to make new column by replacing alt column letter in the ref column. But I don't want any replacement for empty rows and letters like TTGA( whose length is more than 1)</p> <p>following is my i...
<p>An Awk solution</p> <p>File <code>./replaceletters.awk</code>:</p> <pre><code>#! /usr/bin/awk -f BEGIN { FS = OFS = &quot;\t&quot; } # First line NR == 1 { print $1,$2 next } # Case: Only one column: # A -&gt; A; empty; A; A; A NF == 1 { print $1,&quot;&quot;,$1,$1,$1 next } # Case: Two columns...
Replace letters in column to generate new column
r|linux|awk
-3
66
1
72,903,621
72,903,621
0
true
2022-07-07T09:30:25.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace letters in column to generate new column<p>I have a tab-delimited file which contains two columns(ref and alt). I want to make new column by replacin...
72,907,330
How to refine python type hints for methods returning a class instance when the class is inherited?<p>I have a parent class with a method that returns an instance of that class. This class has one (or several) children classes.</p> <p>How to provide type hints to indicate that the method call on any child class will re...
<p>You can use <a href="https://peps.python.org/pep-0484/#annotating-instance-and-class-methods" rel="nofollow noreferrer"><code>typing.TypeVar</code> with parameter <code>bound</code></a> to simulate:</p> <pre><code>from random import randint from typing import TypeVar, Type Self = TypeVar('Self', bound='Person') ...
How to refine python type hints for methods returning a class instance when the class is inherited?
python|class|inheritance|mypy
-1
66
1
72,907,798
72,907,798
0
true
2022-07-08T06:14:59.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to refine python type hints for methods returning a class instance when the class is inherited?<p>I have a parent class with a method that returns an ins...
72,826,682
Database scalar function mapping - invocation causes System.NotSupportedException<p>I have an database application and want to use a scalar user defined function in my application. The return value is integer. On invocation</p> <pre><code>int pqs_id = Entities.UFN_QueryForNewPQS_ID(param_SHH_RecordingOrder, param_TillD...
<p>This is the solution:</p> <pre><code>var statisticID = db.TPQS_ProductionQuantityStatistic .Select(pqs =&gt; new { newPQS_ID = Entities.UFN_QueryForNewPQS_ID(paramIntValue, paramDateTimeValueFrom, paramDateTimeVal...
Database scalar function mapping - invocation causes System.NotSupportedException
c#|entity-framework-core|user-defined-functions
0
66
1
72,868,851
72,868,851
0
true
2022-07-01T08:47:05.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Database scalar function mapping - invocation causes System.NotSupportedException<p>I have an database application and want to use a scalar user defined func...
72,938,312
Is accessing the "IEEE new reference window" in Word with VBA possible?<p>With VBA, is it possible to open the window displayed when adding a new IEEE reference in Word (2013-2019), and access the fields' filled in values on closing it?</p> <p>It's the window which asks for the publication type (book, journal...) and b...
<p>Perhaps along these lines (i.e. not working code, just an outline):</p> <pre><code>' Declare some variables Dim result As Long Dim sourceCount As Long Dim mySource As Source ' record the Source count pre-dialog sourceCount = ActiveDocument.Bibliography.Sources.Count ' Set the Bibliographic Style to IEEE ActiveDoc...
Is accessing the "IEEE new reference window" in Word with VBA possible?
vba|ms-word|reference|styles|ieee
0
66
1
72,958,225
72,958,225
0
true
2022-07-11T12:05:41.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is accessing the "IEEE new reference window" in Word with VBA possible?<p>With VBA, is it possible to open the window displayed when adding a new IEEE refere...
72,923,145
Setting UTC timezone with numeric values in JS [UTC+2, UTC+3, UTC-12, etc]<p>How can I create a date with a specific timezone like that [UTC+2, UTC+3, UTC-12, etc] but not with string like that 'America/New York' in js/moment.js? I have a list of all timezones from server in this format [UTC+2, UTC+3, UTC-12, etc], so ...
<blockquote> <p>I tried to use moment.js but...</p> </blockquote> <p>Didn't you come accross those methods: <a href="https://momentjs.com/docs/#/parsing/utc/" rel="nofollow noreferrer">.utc()</a>, <a href="https://momentjs.com/docs/#/manipulating/add/" rel="nofollow noreferrer">.add()</a> and <a href="https://momentjs....
Setting UTC timezone with numeric values in JS [UTC+2, UTC+3, UTC-12, etc]
javascript|date|momentjs|timezone-offset|moment-timezone
-1
66
1
72,923,281
72,923,281
0
true
2022-07-09T16:45:54.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Setting UTC timezone with numeric values in JS [UTC+2, UTC+3, UTC-12, etc]<p>How can I create a date with a specific timezone like that [UTC+2, UTC+3, UTC-12...
73,017,648
Linked list pointer is confusing<pre><code>class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class SinglyLinkedList: def __init__(self): self.head = None self.tail = None def __len__(self): size, temp = 0, self.head while ...
<p>I first want to note that I'd probably have implemented this using something like:</p> <pre><code> def middle(self): steps = len(self) // 2 current = self.head for _ in range(steps): current = current.next return current </code></pre> <p>Here, you use truncating/floor ...
Linked list pointer is confusing
python|data-structures|linked-list|singly-linked-list
0
66
1
73,017,739
73,017,739
0
true
2022-07-18T05:24:39.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Linked list pointer is confusing<pre><code>class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class S...
72,832,857
Get daily stock portfolio from incomplete transaction time series in SQLite<p>I'm trying to come up with an SQL solution for the following problem. I have a table in which stock transactions are saved. As transactions don't occur on a daily basis the time series in the table is incomplete.</p> <p>Table TRANSACTION</p> ...
<p>You are almost there, just expanded on your idea. I have hard-coded end date in below example, but that can be changed as per requirement.</p> <p>The dates CTE is just building dates within the needed range. In the next sub-query (t1), there are two more columns added - column md for max date and column s_shares to ...
Get daily stock portfolio from incomplete transaction time series in SQLite
sqlite
-1
66
1
72,833,986
72,833,986
0
true
2022-07-01T17:35:29.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get daily stock portfolio from incomplete transaction time series in SQLite<p>I'm trying to come up with an SQL solution for the following problem. I have a ...
72,889,633
c# draw directly on screen - wrong coordinates<p>i try to draw rectangle directly on screen with that function:</p> <pre><code>public static void rectOnScreen2(Rectangle rect, int width = 3, Color? kolor = null) { IntPtr desktopPtr = GetDC(IntPtr.Zero); Pen pen = new Pen(new SolidBrush(kolor ?? C...
<p>after reading Jimi comment i read something about DpiAwareness, after that i add to my App.config lines:</p> <pre><code>&lt;System.Windows.Forms.ApplicationConfigurationSection&gt; &lt;add key=&quot;DpiAwareness&quot; value=&quot;PerMonitorV2&quot; /&gt; &lt;/System.Windows.Forms.ApplicationConfigurationSection&gt...
c# draw directly on screen - wrong coordinates
c#|graphics|screen
0
66
1
72,890,579
72,890,579
0
true
2022-07-06T20:41:46.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: c# draw directly on screen - wrong coordinates<p>i try to draw rectangle directly on screen with that function:</p> <pre><code>public static void rectOnScree...
72,989,422
How to use Kafka Streams to only process messages sent less than 3 times per key (UserId) over a given time window<p>I want to limit the number of message sent to the User over a given time period. I have topic of message to be sent and I can get a count of message per key (UserId) over a time window, but if I try and ...
<p>Wrong approach. Used aggregate() to resolve this. join() won't work.</p>
How to use Kafka Streams to only process messages sent less than 3 times per key (UserId) over a given time window
java|apache-kafka|apache-kafka-streams|kafka-join
1
66
1
73,065,513
73,065,513
0
true
2022-07-15T05:30:24.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use Kafka Streams to only process messages sent less than 3 times per key (UserId) over a given time window<p>I want to limit the number of message se...
72,849,627
why does the code execute list in a wrong sequence?<p>I am trying to concatenate two lists based on array (in c++), empty the first over the second, and if the insertion failed (maximum size reached) it will keep each list as it was before insertion. therefor, the code works well, but the problem is that it execute the...
<p>First some nagging:</p> <ul> <li>Stop lying. This is not a list. It's a vector.</li> <li>0 is not a bool, use true/false</li> <li>if you are going to return a bool to say if something failed then actually check the return value</li> <li>don't use out parameters</li> <li>use exceptions, std::optional or std::expected...
why does the code execute list in a wrong sequence?
c++|list|concatenation
0
66
2
72,850,561
72,850,561
0
true
2022-07-03T20:19:14.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why does the code execute list in a wrong sequence?<p>I am trying to concatenate two lists based on array (in c++), empty the first over the second, and if t...
72,849,183
Why do some domains resolve to localhost?<p>So I happened to input &quot;blue.com&quot; into the browser to see if the domain was available. It timed out immediately, which I thought was odd, so I used tracert in the Windows console and saw it was equivalent to inputting localhost (resolves to 127.0.0.1).</p> <p>It may...
<p>Any domain name can be registered to &quot;point&quot; or &quot;resolve&quot; to any IP address. This is done using what is called an &quot;A Record&quot; or &quot;Address Record&quot;. Various other kinds of records can be found <a href="https://simpledns.plus/help/dns-record-types" rel="nofollow noreferrer">here</...
Why do some domains resolve to localhost?
networking|dns|localhost
-1
66
1
72,863,489
72,863,489
0
true
2022-07-03T19:02:45.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why do some domains resolve to localhost?<p>So I happened to input &quot;blue.com&quot; into the browser to see if the domain was available. It timed out imm...
72,882,073
How do I make a shadow appear under the navigation bar when I scroll down the page?<p>I have a navigation bar on my website and I want to set a shadow when the user starts scrolling down the page.</p> <p>How do I make a shadow appear under the navigation bar when I scroll down the page ?</p> <p>So if the user scrolls d...
<p>Just <code>window.onscroll</code> is not sufficient if you want shadow appear under the navigation. Even if you scroll horizontally the <code>window.onscroll</code> will trigger.</p> <p>So must use <code>scrollTop</code> method. This method sets or returns the vertical scrollbar position for the selected elements.</...
How do I make a shadow appear under the navigation bar when I scroll down the page?
javascript|html|css|shadow
0
66
2
72,882,973
72,882,973
0
true
2022-07-06T10:39:33.227Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I make a shadow appear under the navigation bar when I scroll down the page?<p>I have a navigation bar on my website and I want to set a shadow when t...
72,935,231
Statements before multiprocessing main() executed multiple times (Python)<p>I am learning Python and its multiprocessing.</p> <p>I created a project with a <code>mian()</code> in <code>main.py</code> and a <code>a_simulation</code> inside the module <code>simulation.py</code> under the package <code>simulator/</code>.<...
<p>The reason why this happens is because multiprocessing uses start method <code>spawn</code>, by default, on Windows and macOS to start new processes. What this means is that whenever you want to start a new process, the child process is initially created without sharing any of the memory of the parent. However, this...
Statements before multiprocessing main() executed multiple times (Python)
python|multiprocessing|python-multiprocessing
0
66
1
72,938,157
72,938,157
0
true
2022-07-11T07:46:25.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Statements before multiprocessing main() executed multiple times (Python)<p>I am learning Python and its multiprocessing.</p> <p>I created a project with a <...
73,029,263
React + TS: Cannot add private shared project references to react project<p>I have a react project that is fully working and recently I have decided to extract the reusable code into a shared react library.</p> <p><strong>REACT-PROJECT tsconfig.json:</strong></p> <pre><code>&quot;compilerOptions&quot;: { &quot;module...
<p>I found out that the problem was that I created my app using <code>create-react-app</code> and it does a lot of things under the hood that constrict the programmer like not allowing path aliases and forbidding path references that fall outside of the root <code>src</code> folder.</p> <p>I have created a new app usin...
React + TS: Cannot add private shared project references to react project
node.js|reactjs|typescript|shared-libraries|create-react-app
2
66
1
73,039,969
73,039,969
0
true
2022-07-18T22:31:10.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React + TS: Cannot add private shared project references to react project<p>I have a react project that is fully working and recently I have decided to extra...
72,246,792
What is causing the error when I run the "toolchain build python3 openssl kivy" command from the kivy-ios GitHub doc?<p>I am using the <code>$ toolchain build python3 openssl kivy</code> command found on the Kivy-ios documentation page on GitHub: <a href="https://github.com/kivy/kivy-ios" rel="nofollow noreferrer">http...
<p>Looks like you have spaces in your project path and they are not being handled correctly.</p> <blockquote> <p>[DEBUG ] ls: /Users/patrickchong/Desktop/Personal: No such file or directory [DEBUG ] ls: Projects/Text: No such file or directory [DEBUG ] ls: app/kivy-ios/build/freetype/x86_64/freetype-2.5.5: No suc...
What is causing the error when I run the "toolchain build python3 openssl kivy" command from the kivy-ios GitHub doc?
python|kivy
0
66
2
72,764,574
72,764,574
1
true
2022-05-15T08:46:27.427Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is causing the error when I run the "toolchain build python3 openssl kivy" command from the kivy-ios GitHub doc?<p>I am using the <code>$ toolchain buil...
72,772,913
how to convert in python negative value objects in dataframe to float<p>I'd like to create function a which converts objects to float. Tried to find some solution, but always get some errors:</p> <pre><code># sample dataframe d = {'price':['−$13.79', '−$ 13234.79', '$ 132834.79', 'R$ 75.900,00', 'R$ 69.375,12', '- $ 23...
<p>You can extract the numbers on one side, and identify whether there is a minus in the other side, then combine:</p> <pre><code>factor = np.where(df['price'].str.match(r'[−-]'), -1, 1)/100 out = (pd.to_numeric(df['price'].str.replace(r'\D', '', regex=True), errors='coerce') .mul(factor) ) </code></pre...
how to convert in python negative value objects in dataframe to float
python|pandas|string|jupyter-notebook
1
66
4
72,773,133
72,773,133
1
true
2022-06-27T13:27:21.830Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to convert in python negative value objects in dataframe to float<p>I'd like to create function a which converts objects to float. Tried to find some sol...
72,774,028
how to set different minimum order amount wrt different zip code in Woocommerce<p>I have two array's of postal codes with both a different minimum order amount, how could I implement this? If you have two arrays of postal codes with different order amounts. Is that possible? For Pincode 10001 &amp; 10002 = 200 min orde...
<p>You can use <code>woocommerce_checkout_process</code> action hooks which allow you to validate checkout before placing an order.</p> <p>Create an array with postal code and its value like below.</p> <pre><code>$minimum = array( '10001' =&gt; 200, '10002' =&gt; 200, '10003' =&gt; 300, '10004' =&gt; 30...
how to set different minimum order amount wrt different zip code in Woocommerce
woocommerce
0
66
1
72,777,501
72,777,501
1
true
2022-06-27T14:45:27.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to set different minimum order amount wrt different zip code in Woocommerce<p>I have two array's of postal codes with both a different minimum order amou...
72,777,742
HTML form handling with PHP GET method<p>I am new to PHP and I'm doing simple exercises to try to fully understand each thing I learn. I can confidently output data inputted from a form but for this particular exercise I can't see where I am going wrong. The form is currently outputting '1'.</p> <p>I am trying to build...
<p>The only missing part of your source code is to display the result using a echo statement :)</p> <p>Here is your code in a one pager :</p> <pre><code>&lt;?php $bmiSubmitted = isset($_POST['bmi-submitted']); if ($bmiSubmitted) { $weight = $_POST['weight']; $height = $_POST['height']; $output = bmi($wei...
HTML form handling with PHP GET method
php|html|forms|function
2
66
1
72,778,277
72,778,277
1
true
2022-06-27T20:04:36.820Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: HTML form handling with PHP GET method<p>I am new to PHP and I'm doing simple exercises to try to fully understand each thing I learn. I can confidently outp...
72,776,533
C# Windows Forms - MouseDownEvent with PictureBox<p>I want to build an application to visualize searching algorithms (such as DFS, BFS) using C#.<br /> I am using .cs files, and not xaml or xml.<br /> So I made a matrix of 50X50 pictureboxes, each one has its own matrix indexes, and it's location on the gui window. <a ...
<p>I believe you're seeing this behavior because <code>PictureBox</code> tries to <a href="https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control.capture?view=windowsdesktop-6.0" rel="nofollow noreferrer">Capture</a> the mouse on the <code>MouseDown</code> event. This is usually a &quot;good&quot; thi...
C# Windows Forms - MouseDownEvent with PictureBox
c#|winforms|user-interface
0
66
1
72,779,128
72,779,128
1
true
2022-06-27T18:01:35.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# Windows Forms - MouseDownEvent with PictureBox<p>I want to build an application to visualize searching algorithms (such as DFS, BFS) using C#.<br /> I am ...
72,780,761
Center profile photo between top cover and left column<p>I am trying to center the rounded full image between the main cover photo and the left column. For some reason I cannot get it to move from the top left corner and I cannot see what I am doing wrong. I am using Tailwind CSS.</p> <pre><code>&lt;Head :title=&quot;p...
<p>As far as I understood , you want the circle rounded image in the middle of cover and left sidebar vertically and over them.</p> <p>So I had created this ,please verify if you want. Else I would rather suggest you to attach a screenshot of what you want .</p> <p><div class="snippet" data-lang="js" data-hide="false"...
Center profile photo between top cover and left column
tailwind-css
0
66
1
72,781,433
72,781,433
1
true
2022-06-28T04:28:52.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Center profile photo between top cover and left column<p>I am trying to center the rounded full image between the main cover photo and the left column. For s...
72,778,399
How to assign a tensor in Tensorflow like Pytorch?<p>I am trying to convert a Pytorch script into a Tensorflow script. But I am unable to assign a tensor in tensorflow like pytorch.</p> <p><strong>Code:</strong></p> <pre><code>import torch import tensorflow as tf def true_positive(pred, target, num_classes): #number ...
<p>Maybe something like this:</p> <pre><code>import tensorflow as tf def true_positive(pred, target, num_classes): #number of classes out = [] for i in tf.range(num_classes): out.append(tf.reduce_sum(tf.cast((pred == i) &amp; (target == i), dtype=tf.int32))) return tf.stack(out) p = tf.constant([4]...
How to assign a tensor in Tensorflow like Pytorch?
python|tensorflow
1
66
1
72,782,116
72,782,116
1
true
2022-06-27T21:18:00.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to assign a tensor in Tensorflow like Pytorch?<p>I am trying to convert a Pytorch script into a Tensorflow script. But I am unable to assign a tensor in ...
72,978,275
MaxListenersExceededWarning - After migrating from Angular 12 to Angular 13<p>After migrating my angular application from 12 to 13, whenever I am running the app, and if I refresh the page or make a network call, I am getting the below error in the node terminal.</p> <p><a href="https://i.stack.imgur.com/SE1ln.png" rel...
<p>Had same problem after migrating angular 12 to 13, just figured out what was in my case, and looking at the exception it seems that in your case also. In proxy.conf.js I had 25 paths and will create a proxy instance for every &quot;path&quot;. There is an explanation on how to configure proxy config for webpack <a h...
MaxListenersExceededWarning - After migrating from Angular 12 to Angular 13
angular
0
66
2
73,322,247
73,322,247
1
true
2022-07-14T09:29:31.310Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MaxListenersExceededWarning - After migrating from Angular 12 to Angular 13<p>After migrating my angular application from 12 to 13, whenever I am running the...
72,972,512
Enable Global 2sxc Javascript Object for Non-Admins<p>What I am needing help with is getting <code>$2sxc().data().update()</code> [I do have the proper info inside the ()s, just left it out for readability] to function for accounts in roles given view permissions to a page. Everything works when I am logged in with my ...
<p>With these permissions (Anonymous, create/read/delete) should work</p> <p><a href="https://i.stack.imgur.com/MGtGQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MGtGQ.png" alt="enter image description here" /></a></p>
Enable Global 2sxc Javascript Object for Non-Admins
dotnetnuke|2sxc
0
66
1
73,468,464
73,468,464
1
true
2022-07-13T20:51:48.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Enable Global 2sxc Javascript Object for Non-Admins<p>What I am needing help with is getting <code>$2sxc().data().update()</code> [I do have the proper info ...
73,024,945
tabs onUpdated event not detected on Safari extension?<p>I am trying to develop a simple web extension/addon under Safari, which is using the tabs onUpdated event. I used the Safari XCRUN converter: <a href="https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_sa...
<p>After debugging I finally sloved this by noticing that in fact the events were triggered, but missed because of the availability and values of parameters passed into callabck (changeInfo, details) depending on the browser we're on.</p> <p>So I switched from onUpdated to webNavigation.onCompleted API, which is better...
tabs onUpdated event not detected on Safari extension?
xcode|safari|safari-extension
0
66
1
73,637,391
73,637,391
1
true
2022-07-18T15:34:30.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: tabs onUpdated event not detected on Safari extension?<p>I am trying to develop a simple web extension/addon under Safari, which is using the tabs onUpdated ...
72,893,373
I got attribute error while doing convolution<p>I was trying to test my model for making a convolution using MNIST data</p> <pre><code>keep_prob=1.0 ActivatedUnits = convolve1(sampleimage) filters = ActivatedUnits.shape[3] plt.figure(1, figsize=(20,20)) n_columns = 6 n_rows = np.math.ceil(fi...
<p>As Dr. Snoopy said, this error raised due to the sample image isn't a NumPy array. therefore I added a line :</p> <pre><code>sampleimage=np.array(sampleimage) </code></pre> <p>to my code:</p> <pre><code>keep_prob=1.0 ActivatedUnits = convolve1(sampleimage) filters = ActivatedUnits.shape[3...
I got attribute error while doing convolution
python|tensorflow|deep-learning|conv-neural-network|classification
0
66
1
73,272,711
73,272,711
2
true
2022-07-07T06:46:37.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I got attribute error while doing convolution<p>I was trying to test my model for making a convolution using MNIST data</p> <pre><code>keep_prob=1.0 Activate...
72,239,804
How can I extract data from "List <Contact>" of object and paste it into file.txt in C#?<pre><code>static List&lt;Contact&gt; ListOfContact = new List&lt;Contact&gt;(); //Sorce of data: public void SaveContactToFile() //method to save a data { try { FileName = @&quot;contacts.txt&quot;; //...
<p>There's so much missing in your code. Firstly <code>ListOfContact</code> is a list but you're trying to access <code>verbList</code> from it, which doesn't make sense.</p> <p>Here's an example you can use...</p> <pre><code>using System; using System.Collections.Generic; using System.IO; using System.Linq; using Syst...
How can I extract data from "List <Contact>" of object and paste it into file.txt in C#?
c#
0
66
3
72,240,035
72,240,035
0
true
2022-05-14T11:35:05.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I extract data from "List <Contact>" of object and paste it into file.txt in C#?<pre><code>static List&lt;Contact&gt; ListOfContact = new List&lt;Con...
72,254,798
Can't push image - fails with "no basic auth credentials"<p>GitLab CICD Pipeline failed in the development stage, Successfully built and tagged but Failed while push refers to Amazon repository(ECR).</p> <pre><code>*6be90f1a2d3f: Preparing no basic auth credentials Cleaning up project directory and file based variables...
<p>You need to check the value of your GitLab job secrets regarding:</p> <ul> <li><code>AWS_REGISTRY_URL</code></li> <li><code>AWS_DEFAULT_REGION</code></li> <li><code>AWS_ACCESS_KEY_ID</code></li> <li><code>AWS_SECRET_ACCESS_KEY</code></li> </ul> <p>As in <a href="https://community.atlassian.com/t5/Bitbucket-questions...
Can't push image - fails with "no basic auth credentials"
amazon-web-services|gitlab|cicd
1
66
1
72,255,473
72,255,473
0
true
2022-05-16T06:14:59.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't push image - fails with "no basic auth credentials"<p>GitLab CICD Pipeline failed in the development stage, Successfully built and tagged but Failed wh...
72,265,459
Python mapping in pandas dataframe<p>I have a text file with numbers listed, e.g.:</p> <pre><code>XNodes = [4, 4, 16, 21, 21, 26, 27, 35, 44, 45, 55, 76, 79, 92, 100, 108, 120, 126, 132, 139, 151] </code></pre> <p>I have a pandas df &quot;Nodes_2&quot; with 163 rows. I would like the numbers in XNodes to map to Nodes_2...
<p>I assume you want your IntDict to have <code>value</code> (in this case, &quot;1&quot;) instead of list of values.</p> <p>You can achieve them by changing</p> <pre class="lang-py prettyprint-override"><code>IntDict = XNodes.groupby('ID').Values.apply(list).to_dict() </code></pre> <p>to</p> <pre class="lang-py pretty...
Python mapping in pandas dataframe
python|pandas
0
66
1
72,265,615
72,265,615
0
true
2022-05-16T20:48:36.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python mapping in pandas dataframe<p>I have a text file with numbers listed, e.g.:</p> <pre><code>XNodes = [4, 4, 16, 21, 21, 26, 27, 35, 44, 45, 55, 76, 79,...
72,259,053
How to add a vector to a table in backend using dbplyr (R)<p>I created a table from a data source using <code>tbl()</code>. I need to add a column including <code>1:nrow()</code> to my dataset and tried different methods but I didn't succeed. My code is as below:</p> <pre><code>nrow_df1 &lt;- df1 %&gt;% summarise(n = n...
<p>I found the answer. It is to use <code>row_number()</code> but <code>as.numeric</code> is also needed to convert the output from integer64 to numeric:</p> <pre><code>df1 &lt;- df1 %&gt;% mutate(ID = as.numeric(row_number(a column)), step = 1) </code></pre>
How to add a vector to a table in backend using dbplyr (R)
sql|r|dbplyr
0
66
2
72,269,797
72,269,797
0
true
2022-05-16T12:15:06.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add a vector to a table in backend using dbplyr (R)<p>I created a table from a data source using <code>tbl()</code>. I need to add a column including ...
72,283,088
Calculating rolling mean by ID with variable window width<p>I have a repeated measures dataset of vital signs. I'm trying to calculate some summary statistics (mean, min, max, slope, etc) of the patient's prior 24 hours of observations, measured by the Admit_to_Perform variable, <em>excluding</em> the current observati...
<p>Bit of a quick and dirty solution where Resp_Rate is hard-coded into the <code>f()</code>, and it will be slow because it performs the filter on the dataset for every row, but this does what you want.</p> <pre><code>library(tidyverse) df1 &lt;- data.frame(ID = rep(1, 15), Admit_to_Perform = c(1.0...
Calculating rolling mean by ID with variable window width
r|rolling-computation
1
66
1
72,283,802
72,283,802
0
true
2022-05-18T04:07:11.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculating rolling mean by ID with variable window width<p>I have a repeated measures dataset of vital signs. I'm trying to calculate some summary statistic...
72,282,990
Postgresql error: cannot open EXECUTE query as cursor<p>I have written a function to read certain columns from a table below using a dynamic query:</p> <pre><code>CREATE OR REPLACE FUNCTION select_cols () RETURNS SETOF mytable_name LANGUAGE plpgsql AS $$ DECLARE list_of_columns text; BEGIN SELECT ...
<p>You are not returning a set, but you aggreagte the result set for only one table. So, for only one table you can use:</p> <pre><code>CREATE OR REPLACE FUNCTION select_colsx () RETURNS text LANGUAGE plpgsql AS $$ DECLARE list_of_columns text; BEGIN SELECT 'select '||string_agg(trim(cols::t...
Postgresql error: cannot open EXECUTE query as cursor
postgresql|postgresql-8.3
0
66
2
72,285,612
72,285,612
0
true
2022-05-18T03:49:23.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Postgresql error: cannot open EXECUTE query as cursor<p>I have written a function to read certain columns from a table below using a dynamic query:</p> <pre>...
72,291,715
Readding formatted draft.js text from clipboard<p>When I'm clicking on the button the text from the clipboard is pasted without style, but keeps the current style inline, but that's not what I need.</p> <p>My code</p> <pre><code>async function getClipboardContents() { try { const textFromClipboard = await nav...
<p>Text formatting loses after using <code>clipboard.readText()</code>. You should use <code>clipboard.read()</code> instead. It will return array of <a href="https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem" rel="nofollow noreferrer">ClipBoardItem</a>.</p> <p>You can read your initial formatting from thi...
Readding formatted draft.js text from clipboard
javascript|draftjs
0
66
1
72,293,627
72,293,627
0
true
2022-05-18T15:09:49.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Readding formatted draft.js text from clipboard<p>When I'm clicking on the button the text from the clipboard is pasted without style, but keeps the current ...
72,290,590
I don't understand this error : "SequelizeEagerLoadingError"<p>When I test my route with postman I have this error : &quot;SequelizeEagerLoadingError&quot;</p> <p>I have tried to create an extra-setup for my foreign key because I found this solution (<a href="https://forum.freecodecamp.org/t/nodejs-sequelize-eager-load...
<p>In order to get posts along with users as an associated models you need define an association from <code>post</code> model to <code>user</code> model:</p> <pre class="lang-js prettyprint-override"><code>user.hasMany(post, { foreignKey : 'userId', targetKey: 'id' }); post.belongsTo(user, { ...
I don't understand this error : "SequelizeEagerLoadingError"
javascript|html|mysql|node.js|sequelize.js
0
66
2
72,294,952
72,294,952
0
true
2022-05-18T13:58:55.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I don't understand this error : "SequelizeEagerLoadingError"<p>When I test my route with postman I have this error : &quot;SequelizeEagerLoadingError&quot;</...
72,297,227
Python put requests on a CIRCUITPY<p>I have a CIRCUITPY macro board (keybow 2040) that I want to make automatically download a file, but I don't have enough storage space on the board to put all the required libraries for the python requests module. The board's available storage space is 866 KB, which is not nearly eno...
<p>It looks like CircuitPython has its own requests-like library, in the module <code>adafruit_requests</code>: <a href="https://docs.circuitpython.org/projects/requests/en/latest/index.html" rel="nofollow noreferrer">https://docs.circuitpython.org/projects/requests/en/latest/index.html</a></p>
Python put requests on a CIRCUITPY
python|python-requests|adafruit-circuitpython
0
66
1
72,297,317
72,297,317
0
true
2022-05-19T00:02:39.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python put requests on a CIRCUITPY<p>I have a CIRCUITPY macro board (keybow 2040) that I want to make automatically download a file, but I don't have enough ...
72,306,527
Why doesn't the "Quit" event in Outlook VBA run a passed class module?<p>I have a macro that, upon the closing of the Outlook client, a private variable is set to an instance of a class module.</p> <p>The code runs and no errors are thrown. However, the class module that is passed (correct me if I am using the wrong te...
<p>First of all, there is no need to create a new Outlook <code>Application</code> instance in the code to create a new note item Outlook. Instead, you could get an <code>Application</code> instance in the <code>ThisOutlookSession</code> module and pass it to the method.</p> <p>Second, you need to call the ExitApp meth...
Why doesn't the "Quit" event in Outlook VBA run a passed class module?
vba|class|events|outlook
0
66
1
72,309,294
72,309,294
0
true
2022-05-19T14:37:12.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why doesn't the "Quit" event in Outlook VBA run a passed class module?<p>I have a macro that, upon the closing of the Outlook client, a private variable is s...
72,314,485
zipfile.extract throwing CrcError for .7z files<p>the following code I wrote to extract the files from .7z zip file. Code is throwing &quot;Exception has occurred: CrcError&quot;. if I am specifying files one by one code works fine.In for loop it throws CrcError.</p> <pre><code> selective_files = 'folder\abc[1].txt,...
<p>According to the documentation:</p> <blockquote> <p>Once extract() called, the SevenZipFIle object become exhausted and EOF state. If you want to call read(), readall(), extract(), extractall() again, you should call reset() before it.</p> </blockquote>
zipfile.extract throwing CrcError for .7z files
python
0
66
1
72,314,540
72,314,540
0
true
2022-05-20T06:31:18.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: zipfile.extract throwing CrcError for .7z files<p>the following code I wrote to extract the files from .7z zip file. Code is throwing &quot;Exception has occ...
72,333,704
XML file to PostgreSQL with <row> tag<p>I'm trying to import data from an XML file to PostgreSQL. I would like to create columns from the attributes in the <code>&lt;row&gt;</code> tag. The problem is when I use <code>xpath</code> to get text, I get nothing.</p> <p>Here is a sample input <code>testinput.xml</code> file...
<p>Because the values you intend to parse are attributes (not elements), you need to parse with <code>@</code> keyword:</p> <pre class="lang-sql prettyprint-override"><code>SELECT (xpath('//@Id', x))[1]::text as id, (xpath('//@TagName', x))[1]::text as tagName, (xpath('//@Count', x))[1]::text as count, ...
XML file to PostgreSQL with <row> tag
sql|xml|postgresql
1
66
2
72,334,247
72,334,247
0
true
2022-05-21T22:45:15.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: XML file to PostgreSQL with <row> tag<p>I'm trying to import data from an XML file to PostgreSQL. I would like to create columns from the attributes in the <...
72,282,897
How should i properly index the mysql column when dealing with sort?<p>I have a log table, but I find it become very slow when I sort it.</p> <p>Here's my database table structure in short.</p> <pre><code>CREATE TABLE `webhook_logs` ( `ID` bigint(20) UNSIGNED NOT NULL, `event_id` bigint(20) UNSIGNED DEFAULT NULL, ...
<p>You don't need <code>BIGINT</code> for most of those columns. That datatype takes 8 bytes. There are much smaller datatypes. <code>priority</code> could be <code>TINYINT UNSIGNED</code> (1 byte, range of 0..255). <code>status</code> could be changed to a 1-byte <code>ENUM</code>. Such changes will shrink the da...
How should i properly index the mysql column when dealing with sort?
mysql|database|performance|indexing
0
66
2
72,339,694
72,339,694
0
true
2022-05-18T03:30:34.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How should i properly index the mysql column when dealing with sort?<p>I have a log table, but I find it become very slow when I sort it.</p> <p>Here's my da...
72,340,927
Error with linking containers in docker-compose<p>I am trying to build an image and a container of a application with docker compose. However when i try to link the containers it keeps giving the error &quot;Service api has a link to service 'containername' which is undefined&quot;. Does someone know what i am doing wr...
<p>Compose <code>links:</code> are an obsolete feature. In even vaguely modern Compose – any Compose file with a top-level <code>services:</code> block – Compose will automatically create a Docker network for you and attach all of the services to it. You can almost always safely delete <code>links:</code> without los...
Error with linking containers in docker-compose
docker|docker-compose
-1
66
1
72,342,150
72,342,150
0
true
2022-05-22T20:03:12.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error with linking containers in docker-compose<p>I am trying to build an image and a container of a application with docker compose. However when i try to l...
72,361,513
User() got an unexpected keyword argument 'profile_image' when creating user<p>i created a user registration form using <strong>from django.contrib.auth.models import User, auth</strong> but when i try to submit the form instead of creating a new user it's throws me an error like: <strong>TypeError at /register/ User()...
<p>To solve this problem as i said in the comment you can just create an other model</p> <p>1)models.py</p> <pre><code>class Profile(models.Model): user = models.OneToOneField(User,on_delete=models.CASCADE) profile_image = models.ImageField(upload_to=&quot;avatars/&quot;) #you can other fields here if you w...
User() got an unexpected keyword argument 'profile_image' when creating user
django|django-views|django-templates|django-users
-1
66
1
72,361,795
72,361,795
0
true
2022-05-24T10:44:57.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: User() got an unexpected keyword argument 'profile_image' when creating user<p>i created a user registration form using <strong>from django.contrib.auth.mode...
72,364,588
Is there any command to make the math symbol "not equal" appear in a string?<p>For example, to print the greek letter alpha I used <code>\u03B1</code> and the output is:</p> <p><code>α</code></p> <p>Now I want to print not equal like this:</p> <p><code>≠</code></p>
<pre><code>u&quot;\u2260&quot; </code></pre> <p><strong>source</strong>: <a href="https://www.fileformat.info/info/unicode/char/2260/index.htm" rel="nofollow noreferrer">https://www.fileformat.info/info/unicode/char/2260/index.htm</a></p> <p>You could obtain most UTF encodings with a google search :)</p>
Is there any command to make the math symbol "not equal" appear in a string?
python|string|math|printing|ironpython
0
66
2
72,364,824
72,364,824
0
true
2022-05-24T14:20:03.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any command to make the math symbol "not equal" appear in a string?<p>For example, to print the greek letter alpha I used <code>\u03B1</code> and th...
72,373,896
creating security group rules, iteratively from a list of aws_security_groups datasource<p>I am still new on Terraform.</p> <p>I am trying to create a single security group rule in order to whitelist a single IP, onto a set of existing security groups returned by data source &quot;aws_security_groups&quot;.</p> <pre><c...
<p><code>ids</code> is a list. So you can use <code>for_each</code>:</p> <pre><code>resource &quot;aws_security_group_rule&quot; &quot;this&quot; { for_each = toset(data.aws_security_groups.test.ids) type = &quot;ingress&quot; security_group_id = each.key from_port = 1 to_port = 1 protocol = -1 } </code><...
creating security group rules, iteratively from a list of aws_security_groups datasource
amazon-web-services|terraform|terraform-provider-aws
1
66
1
72,373,958
72,373,958
0
true
2022-05-25T07:57:26.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: creating security group rules, iteratively from a list of aws_security_groups datasource<p>I am still new on Terraform.</p> <p>I am trying to create a single...
72,375,044
Swagger: Failed to load API definition. Fetch errorFailed to fetch openconfig-interfaces.yaml<p>Below is my files: <a href="https://i.stack.imgur.com/oDfNT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oDfNT.jpg" alt="enter image description here" /></a> It works fine when opening index.html <a hre...
<p>Seems to be a cross domain issue, Install the live server plugin in vscode, and then open it again</p>
Swagger: Failed to load API definition. Fetch errorFailed to fetch openconfig-interfaces.yaml
yaml|swagger|swagger-ui
0
66
1
72,376,305
72,376,305
0
true
2022-05-25T09:26:14.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Swagger: Failed to load API definition. Fetch errorFailed to fetch openconfig-interfaces.yaml<p>Below is my files: <a href="https://i.stack.imgur.com/oDfNT.j...
72,377,491
How to create a context menu in console Python?<p>I have a list of columns <code>fields</code>: <code>['AGE', 'NAME', 'COUNTRY']</code></p> <p>There is also list of lists:</p> <pre><code>lines = [['A', 'B', 'C'], ['A', 'B', 'C', 'D']] </code></pre> <p>I need to assign to each column a field value. It must be p...
<p>It seems to me that you are on the right track with the loops, so first you go through each of the lines, and then go through each of the columns asking the user to input a specific value for it:</p> <pre><code>fields = [&quot;AGE&quot;, &quot;NAME&quot;, &quot;COUNTRY&quot;, &quot;NONE&quot;] lines = [['A', 'B', 'C...
How to create a context menu in console Python?
python
0
66
1
72,378,238
72,378,238
0
true
2022-05-25T12:16:20.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a context menu in console Python?<p>I have a list of columns <code>fields</code>: <code>['AGE', 'NAME', 'COUNTRY']</code></p> <p>There is also ...
72,377,811
How can I make the layout background of AlertDialog transparent?<p>I'm creating an app in <code>Android Studio</code>. I created an <code>AlertDialog</code> with the background of the layout set to this custom xml:</p> <pre class="lang-java prettyprint-override"><code> &lt;?xml version=&quot;1.0&quot; encoding=&quot...
<p>Since I cant just post a link I will copy the answer too, but I found my answer here: <a href="https://stackoverflow.com/questions/28937106/how-to-make-custom-dialog-with-rounded-corners-in-android">How to make custom dialog with rounded corners in android</a></p> <p>Create an XML file in drawable, say dialog_bg.xml...
How can I make the layout background of AlertDialog transparent?
android|android-alertdialog
0
66
2
72,379,176
72,379,176
0
true
2022-05-25T12:39:19.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I make the layout background of AlertDialog transparent?<p>I'm creating an app in <code>Android Studio</code>. I created an <code>AlertDialog</code> ...
72,388,087
Pyomo find minimal sum of list values<p>I want to have an indexed binary variable so pyomo optimises it to minimise the total sum of the list while picking at least 2 elements. When I remove the (imo redundant) model.q I receive:</p> <blockquote> <p>ValueError: No variables appear in the Pyomo model constraints or obje...
<p>Welcome to the site.</p> <p>You have a couple errors that are causing you problems.</p> <ol> <li><p>when you construct your parameter, you need to pass in a dictionary so that pyomo can associate the items in the set to the values. You cannot pass in a list and assume things happen sequentially... The set could ha...
Pyomo find minimal sum of list values
python|optimization|pyomo
0
66
1
72,394,960
72,394,960
0
true
2022-05-26T07:10:24.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pyomo find minimal sum of list values<p>I want to have an indexed binary variable so pyomo optimises it to minimise the total sum of the list while picking a...
72,399,394
What does "TypeError: connect() got multiple values for argument 'dsn'" with python-oracledb mean?<p>The <a href="https://oracle.github.io/python-oracledb/" rel="nofollow noreferrer">python-oracledb</a> code:</p> <pre><code>import oracledb import os un = os.environ.get(&quot;PYTHON_USERNAME&quot;) pw = os.environ.get(...
<p>The solution is to consistently use keyword parameters:</p> <pre><code>c = oracledb.connect(user=un, password=pw, dsn=cs) </code></pre> <p>or</p> <pre><code>pool = oracledb.create_pool(user=un, password=pw, dsn=cs, min=4, max=4, incr=1) </code></pre> <p>The <code>oracledb.connect()</code> and <code>oracledb.create_p...
What does "TypeError: connect() got multiple values for argument 'dsn'" with python-oracledb mean?
python|database|oracle|python-oracledb
0
66
1
72,399,395
72,399,395
0
true
2022-05-27T00:53:40.730Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does "TypeError: connect() got multiple values for argument 'dsn'" with python-oracledb mean?<p>The <a href="https://oracle.github.io/python-oracledb/" ...
72,396,827
how to include python files in node js build<p>I'm stumped here...</p> <p>I have a node server that calls to a python file for some quick data processing using the <code>spawn</code> approach (<a href="https://stackoverflow.com/questions/23450534/how-to-call-a-python-function-from-node-js">How to call a Python function...
<p>I ended up adding a script to <code>package.json</code> that does the copy, and including it as part of the <code>build</code> script:</p> <pre><code>... &quot;build&quot;: &quot;nest build &amp;&amp; npm run cp:py&quot;, &quot;cp:py&quot;: &quot;cp -n src/python/*.py dist/python&quot; ... </code></pre>
how to include python files in node js build
python|node.js|npm|npm-build
0
66
1
72,400,008
72,400,008
0
true
2022-05-26T19:07:14.047Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to include python files in node js build<p>I'm stumped here...</p> <p>I have a node server that calls to a python file for some quick data processing usi...
72,363,249
java.lang.IllegalArgumentException: Invalid retrievedBook Id:1<p>While I trying delete Book entity with relations from database using this method</p> <pre><code>@Transactional public void deleteBookById(Long id) { List&lt;BookStatus&gt; bookStatuses = bookStatusService.findBookStatusesByBookId(id); if (!bookStat...
<p>For the future people who also may face such a problem. I decided that this problem appears because of Hibernate problem, because I solved it in such way. Firstly a changed my Book entity class</p> <pre><code>@Getter @Setter @Entity @EqualsAndHashCode @NoArgsConstructor @AllArgsConstructor @Builder(toBuilder = true)...
java.lang.IllegalArgumentException: Invalid retrievedBook Id:1
java|spring|postgresql|spring-boot|hibernate
0
66
3
72,408,601
72,408,601
0
true
2022-05-24T12:52:09.953Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: java.lang.IllegalArgumentException: Invalid retrievedBook Id:1<p>While I trying delete Book entity with relations from database using this method</p> <pre><c...
72,392,506
Power shell does not recognize ssh<p>ssh does not work from powershell but working fine with cmd <a href="https://i.stack.imgur.com/ZxnTY.png" rel="nofollow noreferrer">enter image description here</a></p> <p>I've checked environment path seems OK <a href="https://i.stack.imgur.com/yzblh.png" rel="nofollow noreferrer">...
<p>Search for regedit in the Run app in windows and follow this route in the picture:</p> <p><a href="https://i.stack.imgur.com/63Xs5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/63Xs5.png" alt="enter image description here" /></a></p> <p>Add the selected value and it should work , it's a permissi...
Power shell does not recognize ssh
windows|powershell|ssh|openssh
0
66
1
72,413,768
72,413,768
0
true
2022-05-26T13:19:56.370Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Power shell does not recognize ssh<p>ssh does not work from powershell but working fine with cmd <a href="https://i.stack.imgur.com/ZxnTY.png" rel="nofollow ...
72,398,849
Applescripts. How do I add a text_object/code snippet to the end of certain lines in a text document?<p>I'm using an Applescript to find-and-replace certain characters or strings of characters in BBEdit to speed up the process of ripping content out of a Microsoft Word document and wrapping it in html before it goes i...
<p>You can solve this efficiently using BBEdit's built in regular expressions support, like so:</p> <pre><code>tell application &quot;BBEdit&quot; tell text window 1 tell contents replace &quot;^(\\&lt;h3\\&gt;)(.*)$&quot; using &quot;\\1\\2&lt;\\\\h3&gt;&quot; options {search mode:grep, startin...
Applescripts. How do I add a text_object/code snippet to the end of certain lines in a text document?
applescript|bbedit
0
66
2
72,463,888
72,463,888
0
true
2022-05-26T23:00:33.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Applescripts. How do I add a text_object/code snippet to the end of certain lines in a text document?<p>I'm using an Applescript to find-and-replace certain ...
72,340,195
Relationship between primary_key_bytes_in_memory and mark cache size<p>I am trying to understand the metrics around the mark cache on an AggregatingMergeTree on 21.8-altinitystable.</p> <p>What is the difference between these columns on the system.parts table? primary_key_bytes_in_memory and primary_key_bytes_in_memory...
<p>Sorry, for previous answer.</p> <p>I try to explain more details:</p> <blockquote> <p>What is the difference between these columns on the system.parts table? primary_key_bytes_in_memory and primary_key_bytes_in_memory_allocated?</p> </blockquote> <p>According to the source <a href="https://github.com/ClickHouse/Clic...
Relationship between primary_key_bytes_in_memory and mark cache size
clickhouse
0
66
2
72,477,681
72,477,681
0
true
2022-05-22T18:15:23.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Relationship between primary_key_bytes_in_memory and mark cache size<p>I am trying to understand the metrics around the mark cache on an AggregatingMergeTree...
72,254,733
Removing readonly attribute inside 3 divs<p>i am creating a to-do list, i want the user to be able to edit and delete the added tasks, this will be possible by removing <code>readonly</code>attribute from HTML. but i am struggling doing the edit function.</p> <p>Here is my code:</p> <p><div class="snippet" data-lang="j...
<p>I have added some lines to your JS code. Please check.</p> <pre><code> lista.addEventListener('click', (evento)=&gt;{ let parentEl = evento.target.parentNode.parentNode; let input = parentEl.getElementsByTagName('input'); if(evento.target.className==&quot;edit&quot;){ console.log(&quot;Editar&...
Removing readonly attribute inside 3 divs
javascript|html|jquery|dom
0
66
3
72,254,875
72,254,875
0
true
2022-05-16T06:04:56.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Removing readonly attribute inside 3 divs<p>i am creating a to-do list, i want the user to be able to edit and delete the added tasks, this will be possible ...
72,284,735
How do I change the value of the string in C#?<p>Playing around in C# trying to make a name input system but none of the code within my while loop affects the code outside it. First part of the code works perfectly but when entering the loop I cant manage to change any of the values which effectively traps me within it...
<p>In your code above, you have static classes defined when you could just be using a variable.</p> <p>Here is some of your code tidied up (Notice <code>nameTag</code> and <code>nameBool</code> are only defined once):</p> <pre class="lang-cs prettyprint-override"><code>public class Example { public static void Main...
How do I change the value of the string in C#?
c#|string|replace|boolean
-2
66
1
72,284,860
72,284,860
0
true
2022-05-18T07:20:20.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I change the value of the string in C#?<p>Playing around in C# trying to make a name input system but none of the code within my while loop affects th...
72,272,225
Rounded number to a best suitable nearest number so that i can calculate the interval thats are factor of 2, 5 or 10<p>There can be any specified number, then I want to write a function to return the best upper limit number to calculate the interval.</p> <p>To divide the number into 5 intervals, the best numbers are</p...
<p>I suggest defining your interval in some way like this:</p> <p><img src="https://latex.codecogs.com/svg.image?%5Cinline&amp;space;%5Clarge&amp;space;%5Ctext%7BFor&amp;space;a&amp;space;positive&amp;space;input&amp;space;number&amp;space;%7Dn%5Ctext%7B&amp;space;find&amp;space;the&amp;space;minimum&amp;space;interval...
Rounded number to a best suitable nearest number so that i can calculate the interval thats are factor of 2, 5 or 10
javascript|algorithm|math
0
66
1
72,273,959
72,273,959
0
true
2022-05-17T10:18:59.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rounded number to a best suitable nearest number so that i can calculate the interval thats are factor of 2, 5 or 10<p>There can be any specified number, the...
72,257,351
Why cant Pandas replace nan with an array of 0s using masks/replace?<p>I have a series like this</p> <pre class="lang-py prettyprint-override"><code>s = pd.Series([[1,2,3],[1,2,3],np.nan,[1,2,3],[1,2,3],np.nan]) </code></pre> <p>and I simply want the <code>NaN</code> to be replaced by <code>[0,0,0]</code>.</p> <p>I hav...
<p>The <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.fillna.html" rel="nofollow noreferrer">documentation</a> indicates that this value cannot be a <code>list</code>.</p> <blockquote> <p>Value to use to fill holes (e.g. 0), alternately a dict/Series/DataFrame of values specifying whi...
Why cant Pandas replace nan with an array of 0s using masks/replace?
python|arrays|pandas|dataframe|numpy
1
66
3
72,257,943
72,257,943
0
true
2022-05-16T09:56:43.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why cant Pandas replace nan with an array of 0s using masks/replace?<p>I have a series like this</p> <pre class="lang-py prettyprint-override"><code>s = pd.S...
72,398,442
For loop doesn`t work when add [^\n] to a scanf_s<p>This program should ask you to add member (people) to a struct and print them on a file but after the first for loop just stop working and jump over the name part. I just found that thing that allow you to add space to a string, tried it but no success... I tried to r...
<p>Change the call of scanf below for entering strings by inserting a space in the beginning of the format string. For example instead of this call</p> <pre><code>scanf_s(&quot;%[^\n]s&quot;, person.Surname, 100); </code></pre> <p>(where the letter <code>s</code> must be removed from the format string) write</p> <pre><...
For loop doesn`t work when add [^\n] to a scanf_s
c|for-loop|scanf
2
66
2
72,398,517
72,398,517
0
true
2022-05-26T21:58:12.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: For loop doesn`t work when add [^\n] to a scanf_s<p>This program should ask you to add member (people) to a struct and print them on a file but after the fir...
72,330,198
ng server command opens file "open option menu"<p>When I use 'ng' in the Visual Studio terminal or PowerShell, the following window opens. I don't know how to solve it.</p> <p>I cannot create components, schematics.</p> <p>Every time 'ng' is called, the following window pops up:</p> <p><a href="https://i.stack.imgur.co...
<p>The implication is that <strong>in one of the directories listed in your <code>$env:PATH</code> environment variable there is an <em>extension-less</em> file literally named <code>ng</code></strong> and that the same directory doesn't also contain an <code>ng</code> file <em>with a filename extension that marks it a...
ng server command opens file "open option menu"
powershell|visual-studio-code|terminal
1
66
1
72,331,417
72,331,417
0
true
2022-05-21T13:55:36.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ng server command opens file "open option menu"<p>When I use 'ng' in the Visual Studio terminal or PowerShell, the following window opens. I don't know how t...
72,288,337
Azure ethernal orchestration - Cancel timer<p>I'm working with the Azure Ethernal Orchestrations, with a tasks pool. I have many tasks to execute, with some priority. I have a service which give me the top priority task. But sometimes I need to wait until a specific date to execute the next task.</p> <p>So I've made a ...
<p>Ok I've found a way by using the external events :</p> <p>instead of</p> <pre><code> try { await context.CreateTimer(task.NextExecution.Value, tokens[poolName].Token); } catch (OperationCanceledException) { output.Message = &quot;Operation cancelled whil...
Azure ethernal orchestration - Cancel timer
c#|azure-functions|azure-durable-functions
0
66
1
72,289,842
72,289,842
0
true
2022-05-18T11:27:22.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure ethernal orchestration - Cancel timer<p>I'm working with the Azure Ethernal Orchestrations, with a tasks pool. I have many tasks to execute, with some ...
72,277,958
How to print return values inside method of a class in python<p>I was working on an online tutorial on class in python, then I tried to print out the value in the return and getting error.</p> <pre><code>class A: def fun(self): return 5 print(fun()) obj=A() obj.fun() </code></pre> <p>I know that <code>...
<p>Easy, just make <code>fun</code> into a static (non-instance) method:</p> <pre class="lang-py prettyprint-override"><code>class A: @staticmethod def fun(): return 5 print(fun()) obj = A() obj.fun() </code></pre> <p><strong>Edit:</strong> still not sure why, but the above code only works in Pyth...
How to print return values inside method of a class in python
python
-4
66
2
72,278,170
72,278,170
0
true
2022-05-17T16:55:17.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to print return values inside method of a class in python<p>I was working on an online tutorial on class in python, then I tried to print out the value i...
72,382,695
Issue when calling template function that returns a pointer to base class<p>My goal is to create many objects of derived classes and store them in a <code>std::map</code> with a <code>std::string</code> as a key and the pointer to that object as the value. Later in the flow, I access all the keys and values and call so...
<p>Your <code>map</code> expects pointers to free-standing functions, but your <code>createT()</code> is a non-static class method, so it is not compatible (also, your <code>createT()</code> is not actually <code>return</code>'ing anything).</p> <p>When <code>insert()</code>'ing into your <code>map</code>, you are <em>...
Issue when calling template function that returns a pointer to base class
c++|templates
0
66
2
72,383,055
72,383,055
0
true
2022-05-25T18:38:26.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Issue when calling template function that returns a pointer to base class<p>My goal is to create many objects of derived classes and store them in a <code>st...
72,314,939
How to group by and sum an array of objects javascript?<pre class="lang-js prettyprint-override"><code> const array = [ { &quot;data&quot;: { &quot;qty&quot;: &quot;5&quot;, &quot;toy&quot;: { &quot;id&quot;: 3, }, &quot;available&quot;: &quot;yes&quot;, ...
<p>You group the array into an object, where the keys are concatenation of <code>available</code> and <code>id</code> properties and finally transform the object back to an array using <code>Object.values</code>.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div c...
How to group by and sum an array of objects javascript?
javascript|arrays|object|filter|reduce
0
66
4
72,315,038
72,315,038
0
true
2022-05-20T07:13:44.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to group by and sum an array of objects javascript?<pre class="lang-js prettyprint-override"><code> const array = [ { &quot;data&quot;: { ...
72,337,012
What parts of a URL can be URL-encoded?<p>My Chrome version 101 allows me to open</p> <ul> <li><code>https://%65%78%61%6D%70%6C%65%2E%63%6F%6D</code> (<code>https://example.com</code>, encoded except for the <code>https://</code>.)</li> </ul> <p>but not</p> <ul> <li><code>https://%65%78%61%6D%70%6C%65%2E%63%6F%6D%2F%74...
<h1>By the specification</h1> <p>From <a href="https://datatracker.ietf.org/doc/html/rfc3986" rel="nofollow noreferrer">RFC 3986</a>.</p> <hr /> <blockquote> <h3>2.1. Percent-Encoding</h3> <p>….</p> <pre><code>pct-encoded = &quot;%&quot; HEXDIG HEXDIG </code></pre> <p>The uppercase hexadecimal digits “A” through “F” ar...
What parts of a URL can be URL-encoded?
url|urlencode|specifications
-2
66
1
72,343,825
72,343,825
0
true
2022-05-22T11:08:42.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What parts of a URL can be URL-encoded?<p>My Chrome version 101 allows me to open</p> <ul> <li><code>https://%65%78%61%6D%70%6C%65%2E%63%6F%6D</code> (<code>...
72,312,681
datagridview values remove from another datagridview<p>I have two datagridviews. One is dtgridPopulate and is populated with data from the database.</p> <p>dtgridPopulate columns are (checkbox, code, name)</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: center;">checkbox<...
<p>I am not sure “why” you have unsubscribed and then re-subscribed to the event. Typically, this is only needed if the code in the event “changes” something in the grid that would cause the event to re-fire and this is not happening in your current code. Nor is ending the grids edit necessary.</p> <p>Also, your use of...
datagridview values remove from another datagridview
vb.net|datagridview
0
66
1
72,313,628
72,313,628
0
true
2022-05-20T01:34:40.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: datagridview values remove from another datagridview<p>I have two datagridviews. One is dtgridPopulate and is populated with data from the database.</p> <p>d...
72,241,904
guildMember is not defined<p>I was trying to make welcome message when someone gets on my server but I am trying to do so it takes embed from another file. It says guildMember is not defined and I understand that but I don't know how to define it.</p> <p>Note that I am using discord.js version 12.</p> <p>Here is my ind...
<p>You have access to <code>guildMember</code> in the <code>guildMemberAdd</code> event handler, so you should change <code>welcome.wlc</code> to a function that returns a <code>Discord.MessageEmbed()</code> and gets the guildMember as an argument.</p> <p>welcome.js</p> <pre><code>module.exports.wlc = (member) =&gt; { ...
guildMember is not defined
javascript|discord.js
0
66
1
72,242,146
72,242,146
0
true
2022-05-14T15:59:10.310Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: guildMember is not defined<p>I was trying to make welcome message when someone gets on my server but I am trying to do so it takes embed from another file. I...
72,375,442
I made this code where it will display the product of all positive integer inputs inputted by the user, but the output is wrong<p>So we were tasked to create a program that will ask user a positive integer until the user inputted a non-positive number or zero and then display the product of all positive inputs. Using ...
<p>Let's say you input 2 at the beginning of the program. Now you'd expect total to be 2 (2*1 = 2). But with what you're doing, this is not the case:</p> <pre><code>total += product(userNum, total); </code></pre> <p>..substituting values in this case:</p> <pre><code>1 += product(2, 1); </code></pre> <p>..which is 3. Wh...
I made this code where it will display the product of all positive integer inputs inputted by the user, but the output is wrong
c++
1
66
3
72,375,695
72,375,695
0
true
2022-05-25T09:52:28.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I made this code where it will display the product of all positive integer inputs inputted by the user, but the output is wrong<p>So we were tasked to create...
72,270,717
C# Unable to read output from .exe when executing<p>My issue is that i get no output when i execute the given command.<br /> The exe takes quite a while to finish and while it's executing im expecting a continuous flow of data being outputed. But for some reason it seems my program simply ignores the output specificall...
<p>Okay, so i figured out why the output wasn't being recorded. I was simply missing 2 lines of code...</p> <pre><code> cmd.StandardInput.Flush(); cmd.StandardInput.Close(); </code></pre> <p>AND</p> <p>I had to remove <code>runas</code> and instead inherit the admin perms from the application itself. By &quot;inherit ...
C# Unable to read output from .exe when executing
c#|winforms|cmd|exe
0
66
1
72,272,304
72,272,304
0
true
2022-05-17T08:35:25.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# Unable to read output from .exe when executing<p>My issue is that i get no output when i execute the given command.<br /> The exe takes quite a while to f...
72,289,861
Thread synchronizing - almost same expressions but different result<pre><code>public class MythreadM { public static void main(String[] args) { // TODO Auto-generated method stub Msg m = new Msg(); Mythread thread1 = new Mythread(m); thread1.start(); Mythread threa...
<p>It seems like this is example code to demonstrate that when synchronize on an object common to all threads (m), only one thread at a time can use it, as opposed to when you synchronize a method in the thread, which doesn't do anything because each thread is getting it's own lock.</p> <p>To your second question, the ...
Thread synchronizing - almost same expressions but different result
java|multithreading|synchronization|synchronized
0
66
1
72,290,093
72,290,093
0
true
2022-05-18T13:10:14.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Thread synchronizing - almost same expressions but different result<pre><code>public class MythreadM { public static void main(String[] args) { ...
72,317,927
Create a board made of Cells able host a Generic value<p>I'm working on a project(<em>a game</em>) which will have a board to play on.</p> <p>I want to make this board as generic as possible in order to be able to re-use the code for a possible other game.</p> <pre><code>public class Board { private int rows; p...
<blockquote> <p>the ideal for me would be the class <code>Box</code> to be able to host <em><strong>any type</strong></em> of object and return this generic object with <code>getContentAtPos</code> via the <code>Box</code> <code>getContent</code> method</p> </blockquote> <p>I guess you expect your game pieces to declar...
Create a board made of Cells able host a Generic value
java|generics|class-design
1
66
2
72,318,901
72,318,901
0
true
2022-05-20T11:07:11.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create a board made of Cells able host a Generic value<p>I'm working on a project(<em>a game</em>) which will have a board to play on.</p> <p>I want to make ...
72,239,334
How to use dedicated GPU with TF2, given that multiple GPUs are available?<p>As title. I thought these lines would work to use only one GPU:</p> <pre class="lang-py prettyprint-override"><code>_GPU = tf.config.list_physical_devices('GPU')[3] tf.config.experimental.set_memory_growth(_GPU, True) tf.config.set_visible_dev...
<p>These lines should be run first after those <code>import</code>s:</p> <pre class="lang-py prettyprint-override"><code>os.environ[&quot;CUDA_DEVICE_ORDER&quot;]=&quot;PCI_BUS_ID&quot; os.environ[&quot;CUDA_VISIBLE_DEVICES&quot;]=&quot;2&quot; # GPU according to nvidia-smi. </code></pre> <p>After these two commands, y...
How to use dedicated GPU with TF2, given that multiple GPUs are available?
python|gpu|tensorflow2.0
0
66
1
72,240,094
72,240,094
1
true
2022-05-14T10:25:15.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use dedicated GPU with TF2, given that multiple GPUs are available?<p>As title. I thought these lines would work to use only one GPU:</p> <pre class="...