qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,640,085
<p>Regarding best practice in creating routes in Node.Js Express.Js. For example, if I have 4 roles, namely headmaster, student and teacher, then I have a route called <code>/sliders</code>, which in the application these sliders can be seen by both teacher, student, and administrator only.</p> <p>When creating routes ...
[ { "answer_id": 74648879, "author": "Valentin Marguerie", "author_id": 15522586, "author_profile": "https://Stackoverflow.com/users/15522586", "pm_score": 0, "selected": false, "text": "canGet<Controller name> switch(userRole): \n case 'teacher':\n next();\n break;\n case 'user':...
2022/12/01
[ "https://Stackoverflow.com/questions/74640085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8402887/" ]
74,640,086
<p>I'm doing my thing in my normal view blade file, but when i edit my code and save it, it doesn't update. I found out that the view cache stored in /storage/framework/views keeps interrupting. Whatever i change in my normal blade file doesn't change the output. It only reacts to my cache, which doesn't update. I've a...
[ { "answer_id": 74642807, "author": "keepyourmouthshut", "author_id": 10408643, "author_profile": "https://Stackoverflow.com/users/10408643", "pm_score": -1, "selected": false, "text": "php artisan cache:clear\n" }, { "answer_id": 74648272, "author": "Ed McDarwin", "author...
2022/12/01
[ "https://Stackoverflow.com/questions/74640086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20357346/" ]
74,640,107
<p>Hi I want to get underline for only 2 letters but getting for full text how to get underline only for first 2 letters, Below is the code i have used to get underline for text.</p> <pre><code>&lt;Text style={{ textDecorationLine: &quot;underline&quot;, textDecoratio...
[ { "answer_id": 74641173, "author": "Ragnar", "author_id": 9608873, "author_profile": "https://Stackoverflow.com/users/9608873", "pm_score": 3, "selected": true, "text": "<Text>\nyour rest of the text\n <Text\n style={{\n textDecorationLine: \"underline\",\n text...
2022/12/01
[ "https://Stackoverflow.com/questions/74640107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19614803/" ]
74,640,111
<p>I am using Angular material, this is the html code:</p> <pre><code>&lt;mat-card&gt; &lt;mat-card-header *ngFor=&quot;let club of result[0]&quot;&gt; &lt;mat-card-title&gt;{{club.clubName}}&lt;/mat-card-title&gt; &lt;mat-card-subtitle&gt;Club&lt;/mat-card-subtitle&gt; &lt;/mat-card-header&gt; &lt;/m...
[ { "answer_id": 74641173, "author": "Ragnar", "author_id": 9608873, "author_profile": "https://Stackoverflow.com/users/9608873", "pm_score": 3, "selected": true, "text": "<Text>\nyour rest of the text\n <Text\n style={{\n textDecorationLine: \"underline\",\n text...
2022/12/01
[ "https://Stackoverflow.com/questions/74640111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17384995/" ]
74,640,121
<p>I have a HTML page with a table on it (attached to this)</p> <p>I am trying to hide one of the columns at runtime. I know the JS is firing as I am outputting some text to the page and thats working (see div id <code>poo</code>)</p> <p><a href="https://pastebin.com/iqMnYGgu" rel="nofollow noreferrer">https://pastebin...
[ { "answer_id": 74640600, "author": "yunzen", "author_id": 476951, "author_profile": "https://Stackoverflow.com/users/476951", "pm_score": 0, "selected": false, "text": "targetElement if (targetElements) {\n // ...\n}\n function sortOutTotals() {\n document.getElementById(\"poo\").text...
2022/12/01
[ "https://Stackoverflow.com/questions/74640121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/405764/" ]
74,640,141
<p>I'm using the Mustache template engine in a project, and I've run in to an issue where I have the same attribute name in different contexts, and I'm wondering if there is a way to specify only the attribute from the local context, without changing the name of the attribute.</p> <p><strong>Consider having this data:<...
[ { "answer_id": 74640600, "author": "yunzen", "author_id": 476951, "author_profile": "https://Stackoverflow.com/users/476951", "pm_score": 0, "selected": false, "text": "targetElement if (targetElements) {\n // ...\n}\n function sortOutTotals() {\n document.getElementById(\"poo\").text...
2022/12/01
[ "https://Stackoverflow.com/questions/74640141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9242634/" ]
74,640,187
<p>I want to read <a href="https://github.com/shrikant-temburwar/Wine-Quality-Dataset/blob/master/winequality-white.csv" rel="nofollow noreferrer"><code>winequality-white.csv</code></a> data using <code>pandas.read_html()</code> function.</p> <p>Here is my code:</p> <pre class="lang-py prettyprint-override"><code>impor...
[ { "answer_id": 74642647, "author": "amirhm", "author_id": 4529589, "author_profile": "https://Stackoverflow.com/users/4529589", "pm_score": -1, "selected": false, "text": "import pandas as pd\nimport requests\nimport io\nurl = \"https://raw.githubusercontent.com/shrikant-temburwar/Wine-Q...
2022/12/01
[ "https://Stackoverflow.com/questions/74640187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20263244/" ]
74,640,198
<p>I thought you had to use fetch to get the latest version of a branch from the remote repository. If you do this as the person who wrote the article, don't you create a new feature branch from the &quot;develop&quot; branch that you had stored locally, in other words from a possibly outdated branch?</p> <p>I have the...
[ { "answer_id": 74640880, "author": "kosist", "author_id": 6917446, "author_profile": "https://Stackoverflow.com/users/6917446", "pm_score": 2, "selected": true, "text": "git-fetch git-pull" }, { "answer_id": 74647734, "author": "torek", "author_id": 1256452, "author_p...
2022/12/01
[ "https://Stackoverflow.com/questions/74640198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9038154/" ]
74,640,209
<p>Is there a shortcut in replacing characters in a string? My string is like this:</p> <pre><code>string x = &quot;[\r\n \&quot;TEST\&quot;,\r\n \&quot;GREAT\&quot;\r\n]&quot;; </code></pre> <p>I want to have an output of only</p> <pre><code>TEST,GREAT </code></pre> <p>Right now I'm formatting it like: x..Replace(&q...
[ { "answer_id": 74640426, "author": "Palle Due", "author_id": 5516339, "author_profile": "https://Stackoverflow.com/users/5516339", "pm_score": 0, "selected": false, "text": "public static class RemoveExtensions\n{\n public static string RemoveMultiple(this string str, params string[] ...
2022/12/01
[ "https://Stackoverflow.com/questions/74640209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2353329/" ]
74,640,246
<p>What command do I run to get the container ID of an image?</p> <p>I would think docker ps -a something...</p> <pre><code>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 17ef697da46d local_django &quot;/...
[ { "answer_id": 74640426, "author": "Palle Due", "author_id": 5516339, "author_profile": "https://Stackoverflow.com/users/5516339", "pm_score": 0, "selected": false, "text": "public static class RemoveExtensions\n{\n public static string RemoveMultiple(this string str, params string[] ...
2022/12/01
[ "https://Stackoverflow.com/questions/74640246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20593303/" ]
74,640,259
<p>For days I am trying to archive my ios app, i set up provisioning and everything right, but when I run this command:</p> <p>sudo dotnet publish -f:net6.0-ios -c:Release -r ios-arm64 --self-contained</p> <p>I get three errors:</p> <p>1)</p> <pre><code> error NETSDK1032: The RuntimeIdentifier platform 'ios-arm64' and ...
[ { "answer_id": 74653051, "author": "Alexandar May - MSFT", "author_id": 9644964, "author_profile": "https://Stackoverflow.com/users/9644964", "pm_score": 1, "selected": false, "text": ".NET command line interface .ipa dotnet publish -f:net6.0-ios -c:Release /p:ArchiveOnBuild=true /p:_Dot...
2022/12/01
[ "https://Stackoverflow.com/questions/74640259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14569809/" ]
74,640,272
<p>I am at the verge of loosing my mind over trying to fix an Email Regex i built:</p> <p>It is almost perfect for what i need. It works in 99.9% of all cases.</p> <p>But there is one case which causes a catastrophic backtracking error and i cannot fix my regex for it.</p> <p>The &quot;Email&quot; causing a catastrophi...
[ { "answer_id": 74640332, "author": "Wiktor Stribiżew", "author_id": 3832970, "author_profile": "https://Stackoverflow.com/users/3832970", "pm_score": 2, "selected": true, "text": "^(?!_)\\w+(?:[.-]\\w+)*(?<!_)@[^\\W_]+(?>[.-]?\\w*[^\\W_])*\\.[^\\W_]{2,}$\n (?>[.-]?\\w*[^\\W_])* @ (?!_)\\...
2022/12/01
[ "https://Stackoverflow.com/questions/74640272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3564869/" ]
74,640,301
<p>I am developing a paid application in Python. I do not want the users to see the source code or decompile it. How can I accomplish this task of hiding the source code from the user, but running the code perfectly with the same performance?</p>
[ { "answer_id": 74640385, "author": "DiMithras", "author_id": 8489602, "author_profile": "https://Stackoverflow.com/users/8489602", "pm_score": 1, "selected": false, "text": ".pyc .py" }, { "answer_id": 74640409, "author": "noah", "author_id": 19745277, "author_profile...
2022/12/01
[ "https://Stackoverflow.com/questions/74640301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12976945/" ]
74,640,366
<p>Implemented the example from the camera package here:</p> <p><a href="https://pub.dev/packages/camera/example" rel="nofollow noreferrer">https://pub.dev/packages/camera/example</a></p> <p>While testing on the physical device (running iOS 16), the app builds and runs fine, however the phone does not ask for any permi...
[ { "answer_id": 74640601, "author": "Cenk YAGMUR", "author_id": 4659987, "author_profile": "https://Stackoverflow.com/users/4659987", "pm_score": 0, "selected": false, "text": "Map<Permission, PermissionStatus> statuses = await [\n Permission.camera,\n Permission.microphone,\n].request(...
2022/12/01
[ "https://Stackoverflow.com/questions/74640366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1423089/" ]
74,640,372
<p>I am working in one inventory project I use bootsrap modal for inserting and updating records the problem that I am facing is that when I am editing the record the jquery validation only applied on first row not on any other row can any one help me in this matter.</p> <p><strong>index page is like below</strong></p>...
[ { "answer_id": 74646206, "author": "Nur'Azim Zahurin", "author_id": 11482131, "author_profile": "https://Stackoverflow.com/users/11482131", "pm_score": 0, "selected": false, "text": "name=\"mobile_no1<?php $supplier-id ?>\"" }, { "answer_id": 74648043, "author": "Mark Schulth...
2022/12/01
[ "https://Stackoverflow.com/questions/74640372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8701694/" ]
74,640,391
<p>compare array of object with array of keys, filter array of object with array keys.</p> <p>Input:</p> <pre><code>let a = ['aa']; let b = [{ aa: 1, bb: 2, c: 30 },{ aa: 2, bb: 3, c: 40}]; </code></pre> <p>output:</p> <pre><code>b = [{bb: 2, c: 30 },{bb: 3, c: 40}]; original array should be mutate. </code></pre>
[ { "answer_id": 74640455, "author": "Disco", "author_id": 11196441, "author_profile": "https://Stackoverflow.com/users/11196441", "pm_score": 0, "selected": false, "text": "let keysToRemove = ['aa'];\nlet array = [{ aa: 1, bb: 2, c: 30 },{ aa: 2, bb: 3, c: 40}];\nlet result = array.map((i...
2022/12/01
[ "https://Stackoverflow.com/questions/74640391", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16108399/" ]
74,640,404
<p>I want to create an extended component with some additional functions added.</p> <p>Let's say I have an ExtendedButton component which has a button that is forwardRef:ed, but which also has a doubleClick method. I know this is a silly example, but something like this:</p> <pre class="lang-js prettyprint-override"><c...
[ { "answer_id": 74640560, "author": "Sachila Ranawaka", "author_id": 6428638, "author_profile": "https://Stackoverflow.com/users/6428638", "pm_score": 1, "selected": true, "text": "useImperativeHandle const ExtendedButton = forwardRef<HTMLButtonElement, React.HTMLAttributes<HTMLButtonEl...
2022/12/01
[ "https://Stackoverflow.com/questions/74640404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1644471/" ]
74,640,410
<p>I am looking for a function or gem that gives me the cyclomatic complexity of a function.</p> <p>For example, using rubocop, If I write</p> <pre class="lang-rb prettyprint-override"><code>def my_func(foo) foo.details['errors'].each do |attr, message| case attr when 1 then foo.errors.add(:err1, :format) ...
[ { "answer_id": 74640560, "author": "Sachila Ranawaka", "author_id": 6428638, "author_profile": "https://Stackoverflow.com/users/6428638", "pm_score": 1, "selected": true, "text": "useImperativeHandle const ExtendedButton = forwardRef<HTMLButtonElement, React.HTMLAttributes<HTMLButtonEl...
2022/12/01
[ "https://Stackoverflow.com/questions/74640410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9428538/" ]
74,640,414
<p>What is the best practice to return null for:</p> <blockquote> <p>Unhandled exception: RangeError (index): Invalid value: Not in inclusive range 0..2</p> </blockquote> <p>My code:</p> <pre><code>late final int? element; try { element = l[index]; } catch(e) { element = null; } </code></pre> <p>Looking for a short...
[ { "answer_id": 74641414, "author": "HIMANI KANETKAR", "author_id": 20069049, "author_profile": "https://Stackoverflow.com/users/20069049", "pm_score": 0, "selected": false, "text": "final int? element = (index == null || index.clamp(0,l.length - 1) != index) ? null : l[index];\n" }, ...
2022/12/01
[ "https://Stackoverflow.com/questions/74640414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12695188/" ]
74,640,477
<p>I am trying to create a search bar for a blog, which is working fine if i am logged in, but not when i am not logged out. As logged out user, it returns a empty array with succesed code 200. i shall really appreciated if someone can help me</p> <p>here is my PHP file</p> <p>`</p> <pre><code>function get_ajax_posts()...
[ { "answer_id": 74641414, "author": "HIMANI KANETKAR", "author_id": 20069049, "author_profile": "https://Stackoverflow.com/users/20069049", "pm_score": 0, "selected": false, "text": "final int? element = (index == null || index.clamp(0,l.length - 1) != index) ? null : l[index];\n" }, ...
2022/12/01
[ "https://Stackoverflow.com/questions/74640477", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20465797/" ]
74,640,483
<p>I'm getting all active countries via the service id <code>country.repository</code></p> <pre><code>public function getCountries(Context $context): EntityCollection { $criteria = new Criteria(); $criteria-&gt;addFilter(new EqualsFilter('active', true)); return $this-&gt;countryRepository-&gt;search($crit...
[ { "answer_id": 74640606, "author": "Stone Vo", "author_id": 780427, "author_profile": "https://Stackoverflow.com/users/780427", "pm_score": -1, "selected": false, "text": "public function test($context): array\n{\n $countries = $this->getCountries($context);\n $ids = [];\n forea...
2022/12/01
[ "https://Stackoverflow.com/questions/74640483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7952913/" ]
74,640,495
<p>I have a dataset with 100,000 rows and 300 columns</p> <p>Here is the sample dataset:</p> <pre><code> EVENT_DTL 0 8. Background : no job / living with marriage_virgin 9. Social status : doing pretty well with his family 1 8. Background : Engineer / living with his mom marriage_married </code></pre> <...
[ { "answer_id": 74640718, "author": "abokey", "author_id": 16120011, "author_profile": "https://Stackoverflow.com/users/16120011", "pm_score": 3, "selected": true, "text": "pandas.Series.str \"\\s+\" df[\"EVENT_DTL\"]= df[\"EVENT_DTL\"].str.replace(\"\\s+\", \" \", regex=True)\n print(df)...
2022/12/01
[ "https://Stackoverflow.com/questions/74640495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20376341/" ]
74,640,591
<p>I want to <code>echo</code> files that does not contain a substring &quot;cds&quot; or &quot;rna&quot; in their filenames.</p> <p>I use the following code:</p> <pre><code>for genome in * do if [ ! &quot;$genome&quot; == *&quot;cds&quot;* ] || [ ! &quot;$genome&quot; == *&quot;rna&quot;* ] then echo $genome fi do...
[ { "answer_id": 74640718, "author": "abokey", "author_id": 16120011, "author_profile": "https://Stackoverflow.com/users/16120011", "pm_score": 3, "selected": true, "text": "pandas.Series.str \"\\s+\" df[\"EVENT_DTL\"]= df[\"EVENT_DTL\"].str.replace(\"\\s+\", \" \", regex=True)\n print(df)...
2022/12/01
[ "https://Stackoverflow.com/questions/74640591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1945881/" ]
74,640,623
<p>I am trying to get time entries through ClickUp API using the google apps scripts.</p> <pre><code>function getTime() { const query = new URLSearchParams({ start_date: '0', end_date: '0', assignee: '0', include_task_tags: 'true', include_location_names: 'true', space_id: '0', folder_id: '0', list_id: ...
[ { "answer_id": 74640718, "author": "abokey", "author_id": 16120011, "author_profile": "https://Stackoverflow.com/users/16120011", "pm_score": 3, "selected": true, "text": "pandas.Series.str \"\\s+\" df[\"EVENT_DTL\"]= df[\"EVENT_DTL\"].str.replace(\"\\s+\", \" \", regex=True)\n print(df)...
2022/12/01
[ "https://Stackoverflow.com/questions/74640623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20338118/" ]
74,640,632
<p>i am making a chess game i have a div as a block and in that div there is a button and a pawn-div, i have given each button an onclick to move my pawn, now to kill a pawn i want to give another onclick to the button but for some reason i can't do please help</p> <p>my code</p> <pre><code>function hlblp(a) { let pawn...
[ { "answer_id": 74640718, "author": "abokey", "author_id": 16120011, "author_profile": "https://Stackoverflow.com/users/16120011", "pm_score": 3, "selected": true, "text": "pandas.Series.str \"\\s+\" df[\"EVENT_DTL\"]= df[\"EVENT_DTL\"].str.replace(\"\\s+\", \" \", regex=True)\n print(df)...
2022/12/01
[ "https://Stackoverflow.com/questions/74640632", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20545624/" ]
74,640,651
<p>I have the following code:</p> <pre class="lang-py prettyprint-override"><code>from typing import List, NewType MultiList = NewType(&quot;MultiList&quot;, List[List[int]]) def myfunc(): multi: MultiList = [] # More stuff here </code></pre> <p>The code works fine, it's just my IDE (PyCharm) doesn't like the ins...
[ { "answer_id": 74640693, "author": "user2357112", "author_id": 2357112, "author_profile": "https://Stackoverflow.com/users/2357112", "pm_score": 1, "selected": false, "text": "MultiList = List[List[int]]\n MultiList = NewType(\"MultiList\", List[List[int]])\nmulti: MultiList = MultiList(...
2022/12/01
[ "https://Stackoverflow.com/questions/74640651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5734324/" ]
74,640,655
<p>I spent hours trying to figure this out. I have four binary values that I want to combine into a single number. I got it working with two numbers but I need to get it working with four.</p> <pre><code>int Index = ((Bitplane0_ROW[p] &amp; (1 &lt;&lt; N)) &gt;&gt; N) | (((Bitplane1_ROW[p] &amp; (1 &lt;&lt; N)) &gt;&gt...
[ { "answer_id": 74640824, "author": "bitmask", "author_id": 430766, "author_profile": "https://Stackoverflow.com/users/430766", "pm_score": 3, "selected": true, "text": "std::bitset #include <bitset>\n\n// ...\nstd::bitset<4> bs;\nbs.set(0, (Bitplane0_ROW[p] >> N) & 1);\nbs.set(1, (Bitpla...
2022/12/01
[ "https://Stackoverflow.com/questions/74640655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13144883/" ]
74,640,676
<p>Below is my sample data</p> <p><a href="https://i.stack.imgur.com/3YMyB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3YMyB.png" alt="enter image description here" /></a></p> <p>Here is the output i want using an sql query. The concatenated string should hold unique values in the order of their ...
[ { "answer_id": 74641236, "author": "ufosnowcat", "author_id": 1728208, "author_profile": "https://Stackoverflow.com/users/1728208", "pm_score": 1, "selected": false, "text": "select sub.issue, STRING_AGG(sub.type, ', ') within group (order by sub.orderField) [Types]\n, count(sub.[type])...
2022/12/01
[ "https://Stackoverflow.com/questions/74640676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9478438/" ]
74,640,683
<p>I'm running two instances of <code>CompletableFuture</code>, which wait 1 second and print something to the console. The first one I interrupt after 0.5 seconds. So I expect only the second one to print, but in fact both do. What's going on here?</p> <p>Here's the code:</p> <pre><code>CompletableFuture&lt;Void&gt; c...
[ { "answer_id": 74641236, "author": "ufosnowcat", "author_id": 1728208, "author_profile": "https://Stackoverflow.com/users/1728208", "pm_score": 1, "selected": false, "text": "select sub.issue, STRING_AGG(sub.type, ', ') within group (order by sub.orderField) [Types]\n, count(sub.[type])...
2022/12/01
[ "https://Stackoverflow.com/questions/74640683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259288/" ]
74,640,687
<p>I am working on a flutter project where I want a function that returns the Document ID. The only thing availabe is document field that is email or name.</p> <p><a href="https://i.stack.imgur.com/MG9iq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MG9iq.png" alt="Firestore Database." /></a></p> <...
[ { "answer_id": 74641236, "author": "ufosnowcat", "author_id": 1728208, "author_profile": "https://Stackoverflow.com/users/1728208", "pm_score": 1, "selected": false, "text": "select sub.issue, STRING_AGG(sub.type, ', ') within group (order by sub.orderField) [Types]\n, count(sub.[type])...
2022/12/01
[ "https://Stackoverflow.com/questions/74640687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10535413/" ]
74,640,726
<p>I have two random lists of strings. The length of two lists won't be necessarily equal all the time. There is no repetition of the elements within a list.</p> <pre><code>list1=['A', 'A-B', 'B', 'C'] list2=['A', 'A-B', 'B', 'D'] </code></pre> <p>I want to compare the two lists, and the final output should be two list...
[ { "answer_id": 74640778, "author": "Will", "author_id": 12829151, "author_profile": "https://Stackoverflow.com/users/12829151", "pm_score": 1, "selected": false, "text": "set1.intersection(set2) set1.union(set2)" }, { "answer_id": 74640830, "author": "Luke Delves", "autho...
2022/12/01
[ "https://Stackoverflow.com/questions/74640726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11021252/" ]
74,640,733
<p>Im new in android and i do not know many things. I have a problem making a function inside two ore more buttons and place it in the <strong>onCreate</strong> method. For example:</p> <pre><code>public class gameActivity extends AppCompatActivity { private int num = 0; @Override protected void onCreate(...
[ { "answer_id": 74640856, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 1, "selected": false, "text": "onCreate public class gameActivity extends AppCompatActivity {\n\n private int num = 0;\n\n @Override\n prote...
2022/12/01
[ "https://Stackoverflow.com/questions/74640733", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15427573/" ]
74,640,743
<p>I just cant figure out a solution for my problem. I have CSS file and HTML, I had to create ChatBot where all the styling is located in CSS.</p> <p>I am trying to make the Scrollbar go down when all screen is filled with messages and show the newest one. Messages are starting from top and then filling down til botto...
[ { "answer_id": 74640856, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 1, "selected": false, "text": "onCreate public class gameActivity extends AppCompatActivity {\n\n private int num = 0;\n\n @Override\n prote...
2022/12/01
[ "https://Stackoverflow.com/questions/74640743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20655285/" ]
74,640,785
<p>I cannot understand the problem in my code. The book where I got my algorithm is: <strong>Introduction to Algorithms, Third Edition</strong></p> <p>I understand how the algorithm works but while coding it, my program only sorts the first 4 numbers.</p> <h3>Code</h3> <pre><code>#include &lt;stdio.h&gt; void sortArr(...
[ { "answer_id": 74641003, "author": "VLL", "author_id": 2527795, "author_profile": "https://Stackoverflow.com/users/2527795", "pm_score": 0, "selected": false, "text": "printf(\"%d %d %d\\n\", k, i, j); n1 = n2 = 4 i" }, { "answer_id": 74641635, "author": "Paul Hankin", "a...
2022/12/01
[ "https://Stackoverflow.com/questions/74640785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19655633/" ]
74,640,822
<p>I have a problem while I was trying to use the $user variable, I'm pretty new to laravel but from what I can gather my controller file isn't able to pass the variable $user to my blade file. I have tried many solutions but I'm still not able to solve this problem. These are the files that I use:</p> <p>Blade file:</...
[ { "answer_id": 74641028, "author": "scorpions78", "author_id": 15328662, "author_profile": "https://Stackoverflow.com/users/15328662", "pm_score": -1, "selected": false, "text": "compact($user) with('user', $user) return view('profile')->with('user', $user);\n $user->update([\n ...
2022/12/01
[ "https://Stackoverflow.com/questions/74640822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12845523/" ]
74,640,843
<p>I have a nested object and an array of objects (<a href="http://jsfiddle.net/9phkbgqe/" rel="nofollow noreferrer">http://jsfiddle.net/9phkbgqe/</a>):</p> <pre><code>let data1 = { &quot;fields&quot;: { &quot;Main&quot;: { &quot;Personal Details&quot;: { &quot;Surname&quot;: &q...
[ { "answer_id": 74641065, "author": "analayze", "author_id": 16986336, "author_profile": "https://Stackoverflow.com/users/16986336", "pm_score": 0, "selected": false, "text": "// get the value of key \"Name\" in data 2\nconst nameVal = data2[0]['name'] \n\n// once you have the value you c...
2022/12/01
[ "https://Stackoverflow.com/questions/74640843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2402389/" ]
74,640,889
<p>I am given some school task, I am using React js and tailwindcss tools, I want to make a table that shows data.</p> <p>I am using some sources I found on youtube, but not all the data was inserted into the table.</p> <p>App.js code:</p> <pre><code>import React, {useState} from &quot;react&quot;; import &quot;./App.c...
[ { "answer_id": 74641065, "author": "analayze", "author_id": 16986336, "author_profile": "https://Stackoverflow.com/users/16986336", "pm_score": 0, "selected": false, "text": "// get the value of key \"Name\" in data 2\nconst nameVal = data2[0]['name'] \n\n// once you have the value you c...
2022/12/01
[ "https://Stackoverflow.com/questions/74640889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20563760/" ]
74,640,892
<p>I have the array as below;</p> <p><a href="https://i.stack.imgur.com/bjTT7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bjTT7.png" alt="enter image description here" /></a></p> <p>I'd like to insert each <code>name</code> keys into <code>tableName</code> and get the inserted id. For the <code>s...
[ { "answer_id": 74641171, "author": "Tghosh", "author_id": 10321719, "author_profile": "https://Stackoverflow.com/users/10321719", "pm_score": 2, "selected": false, "text": "foreach($request->instructions as $key => $val){\n$id = Instruction::insertGetId(\n ['recipe_id' => session()->g...
2022/12/01
[ "https://Stackoverflow.com/questions/74640892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12390764/" ]
74,640,911
<p><img src="https://i.stack.imgur.com/BjfN7.png" alt="example" /></p> <p>How can i insert multiple values into one row?</p> <p>My query</p> <pre class="lang-sql prettyprint-override"><code>insert into table_RekamMedis values ('RM001', '1999-05-01', 'D01', 'Dr Zurmaini', 'S11', 'Tropicana', 'B01', 'Sulfa', '3dd1'); </c...
[ { "answer_id": 74641171, "author": "Tghosh", "author_id": 10321719, "author_profile": "https://Stackoverflow.com/users/10321719", "pm_score": 2, "selected": false, "text": "foreach($request->instructions as $key => $val){\n$id = Instruction::insertGetId(\n ['recipe_id' => session()->g...
2022/12/01
[ "https://Stackoverflow.com/questions/74640911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20655447/" ]
74,640,926
<p>How to start executing a block of code after changing the value of MutableLiveData when using .observeAsState()?</p> <p>Example: MutableLiveData changes and after need to call Toast.</p> <p>This code returns error «Composable calls are not allowed inside the calculation parameter of inline fun remember(calculation:...
[ { "answer_id": 74641007, "author": "Thracian", "author_id": 5457853, "author_profile": "https://Stackoverflow.com/users/5457853", "pm_score": 0, "selected": false, "text": "LocalContext.current requires @Composable\nfun TextInfo() {\n val isSuccess by remember { viewModel.isSuccess.ob...
2022/12/01
[ "https://Stackoverflow.com/questions/74640926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17766330/" ]
74,640,941
<p><a href="https://i.stack.imgur.com/4R2UT.png" rel="nofollow noreferrer">enter image description here</a> I'm making a registration code, and it keeps saying error. What should I change?</p> <p>I tried substituting it with every combination possible. I even took the space out, and yes there's a if code above. <a href...
[ { "answer_id": 74641007, "author": "Thracian", "author_id": 5457853, "author_profile": "https://Stackoverflow.com/users/5457853", "pm_score": 0, "selected": false, "text": "LocalContext.current requires @Composable\nfun TextInfo() {\n val isSuccess by remember { viewModel.isSuccess.ob...
2022/12/01
[ "https://Stackoverflow.com/questions/74640941", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20655442/" ]
74,640,956
<p>I try bring the snackbar to the foremost ui.</p> <p>My case is</p> <ol> <li>Open internet_connectiviity popup(modal) with Settings.panel.ACTION_INTERNET_CONNECTIVITY</li> <li>When user enable wifi, my app shows an alert to close this modal.</li> <li><strong>However, snackbar shows, or appears behind system ui(intern...
[ { "answer_id": 74642747, "author": "Shyam Sunder", "author_id": 18542740, "author_profile": "https://Stackoverflow.com/users/18542740", "pm_score": 0, "selected": false, "text": "View view onCreate() function(View view) SnackBar view" } ]
2022/12/01
[ "https://Stackoverflow.com/questions/74640956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8281218/" ]
74,641,009
<p>I'm trying to copy certain columns from a sheet to another (around 15).</p> <p>My current method is less than ideal (I think).</p> <pre><code>Sheets(2).Range(&quot;A:A&quot;).Value = Sheets(1).Range(&quot;C:C&quot;).Value Sheets(2).Range(&quot;C:C&quot;).Value = Sheets(1).Range(&quot;G:G&quot;).Value Sheets(2).Range...
[ { "answer_id": 74642747, "author": "Shyam Sunder", "author_id": 18542740, "author_profile": "https://Stackoverflow.com/users/18542740", "pm_score": 0, "selected": false, "text": "View view onCreate() function(View view) SnackBar view" } ]
2022/12/01
[ "https://Stackoverflow.com/questions/74641009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20197062/" ]
74,641,021
<p>I have read that with TDD we should approach the entity (function, class etc.) under test from the perspective of the user/caller of the entity. The gist being focusing on the public &quot;interface&quot;. This in turn would drive the design and help reason about the design earlier.<br /> But when we need to introdu...
[ { "answer_id": 74642747, "author": "Shyam Sunder", "author_id": 18542740, "author_profile": "https://Stackoverflow.com/users/18542740", "pm_score": 0, "selected": false, "text": "View view onCreate() function(View view) SnackBar view" } ]
2022/12/01
[ "https://Stackoverflow.com/questions/74641021", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2566775/" ]
74,641,023
<p>I'm trying to write some code that will deserialize JSON into <em>somebody elses class</em>. That is, I don't own the target class so I can't annotate it.</p> <p>In particular, this class has some helper methods that are complicating the deserialization process. Something like this:</p> <pre class="lang-java prettyp...
[ { "answer_id": 74641366, "author": "Nikos Paraskevopoulos", "author_id": 2764255, "author_profile": "https://Stackoverflow.com/users/2764255", "pm_score": 2, "selected": true, "text": "@JsonIgnoreProperties({ \"id\" })\npublic class ResultMixin {\n // nothing else required!\n}\n ObjectM...
2022/12/01
[ "https://Stackoverflow.com/questions/74641023", "https://Stackoverflow.com", "https://Stackoverflow.com/users/59724/" ]
74,641,044
<p>Using playwright C# I've been trying to work with multiple elements that use the same locator.</p> <p>Is there any functionality in playwright which is equivalent to the FindElements method from selenium? This method allows us to store multiple elements of the same locator in a collection which can then be used to a...
[ { "answer_id": 74641576, "author": "AJG", "author_id": 12347635, "author_profile": "https://Stackoverflow.com/users/12347635", "pm_score": 1, "selected": false, "text": "var rows = page.GetByRole(AriaRole.Listitem);\nvar count = await rows.CountAsync();\nfor (int i = 0; i < count; ++i)\n...
2022/12/01
[ "https://Stackoverflow.com/questions/74641044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5611422/" ]
74,641,057
<p>As a part of my journey of creating own realization of drag&amp;drop I faced with the problem of autoscrolling while dragging item. For now I just try to realize primitive autoscrolling: when mouse enters the bottom-trigger area the page should start scrolling slowly, but it's scrolled by 10px and stopped, while I l...
[ { "answer_id": 74641576, "author": "AJG", "author_id": 12347635, "author_profile": "https://Stackoverflow.com/users/12347635", "pm_score": 1, "selected": false, "text": "var rows = page.GetByRole(AriaRole.Listitem);\nvar count = await rows.CountAsync();\nfor (int i = 0; i < count; ++i)\n...
2022/12/01
[ "https://Stackoverflow.com/questions/74641057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17351021/" ]
74,641,071
<p>I have three <code>CSV</code> files:</p> <p><code>doctors.csv</code></p> <pre><code>1,John,Smith,Internal Med 2,Jone,Smith,Pediatrics 3,Jone,Carlos,Cardiology </code></pre> <p><code>patients.csv</code></p> <pre><code>1,Sara,Smith,20,07012345678,B1234 2,Mike,Jones,37,07555551234,L22AB 3,Daivd,Smith,15,07123456789,C1A...
[ { "answer_id": 74641576, "author": "AJG", "author_id": 12347635, "author_profile": "https://Stackoverflow.com/users/12347635", "pm_score": 1, "selected": false, "text": "var rows = page.GetByRole(AriaRole.Listitem);\nvar count = await rows.CountAsync();\nfor (int i = 0; i < count; ++i)\n...
2022/12/01
[ "https://Stackoverflow.com/questions/74641071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20357735/" ]
74,641,135
<p>im trying to make the background of a parent div change when hovering over a li in its child.. i did that but now i want to display a different img when hovering over a different li inside the same child div... i cant seem to do that and cant find anyone else having the same problem.. and if it needs JavaScript also...
[ { "answer_id": 74641576, "author": "AJG", "author_id": 12347635, "author_profile": "https://Stackoverflow.com/users/12347635", "pm_score": 1, "selected": false, "text": "var rows = page.GetByRole(AriaRole.Listitem);\nvar count = await rows.CountAsync();\nfor (int i = 0; i < count; ++i)\n...
2022/12/01
[ "https://Stackoverflow.com/questions/74641135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20655479/" ]
74,641,137
<p>I've published 5 versions of my repository so far without any issues. With version 1.0.5 I'm getting an error:</p> <blockquote> <p><code>Execution failed for task ':publishMavenJavaPublicationToOSSRHRepository'.</code></p> <blockquote> <p><code>&gt; Failed to publish publication 'mavenJava' to repository 'OSSRH'</co...
[ { "answer_id": 74641576, "author": "AJG", "author_id": 12347635, "author_profile": "https://Stackoverflow.com/users/12347635", "pm_score": 1, "selected": false, "text": "var rows = page.GetByRole(AriaRole.Listitem);\nvar count = await rows.CountAsync();\nfor (int i = 0; i < count; ++i)\n...
2022/12/01
[ "https://Stackoverflow.com/questions/74641137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13361997/" ]
74,641,148
<p>So this is WPF + MVVM + .NET 4.8 + WCT.</p> <p>I have an <code>AsyncRelayCommand</code> in my VM class defined like this:</p> <pre><code>private AsyncRelayCommand _StartSyncCommand; public AsyncRelayCommand StartSyncCommand { get { _StartSyncCommand ??= new AsyncRelayCommand(Pump, () =&gt; !_StartSyncCommand...
[ { "answer_id": 74650902, "author": "Stephen Cleary", "author_id": 263693, "author_profile": "https://Stackoverflow.com/users/263693", "pm_score": 2, "selected": true, "text": "async ExecutionTask = execute();\nIsRunning = true;\n execute Pump Pump await ExecutionTask await Task.Yield(); ...
2022/12/01
[ "https://Stackoverflow.com/questions/74641148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1137199/" ]
74,641,237
<p>I want to print specific row and column from a csv file. csv file look like,</p> <p>R,IMSI,DATE FIRST EVENT,TIME FIRST EVENT,DATE LAST EVENT,TIME LAST EVENT,DC(HHMMSS),NC,VOLUME,SDR R C,634012007277489,20221122,150025,20221122,150025,711,1,0,294 C,634012031576061,20221122,150859,20221122,151738,905,3,0,1597 C,634012...
[ { "answer_id": 74641273, "author": "Triceratops", "author_id": 13440165, "author_profile": "https://Stackoverflow.com/users/13440165", "pm_score": 1, "selected": false, "text": "pandas pip install pandas import pandas as pd\n\ndf = pd.read_csv(fullpath.csv)\nx = df[column_name].iloc[row_...
2022/12/01
[ "https://Stackoverflow.com/questions/74641237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20346620/" ]
74,641,272
<pre><code> def is_Data_Valid(): emp_df.withColumn( &quot;ValidationErrors&quot;, f.when( f.col(&quot;Name&quot;).rlike(&quot;^[a-zA-Z]+$&quot;) &amp; f.col(&quot;Age&quot;).cast(&quot;int&quot;).isNotNull() &amp; f.col( &quot;Experience&quot;).cast(&quot;int&quot;).isNot...
[ { "answer_id": 74641273, "author": "Triceratops", "author_id": 13440165, "author_profile": "https://Stackoverflow.com/users/13440165", "pm_score": 1, "selected": false, "text": "pandas pip install pandas import pandas as pd\n\ndf = pd.read_csv(fullpath.csv)\nx = df[column_name].iloc[row_...
2022/12/01
[ "https://Stackoverflow.com/questions/74641272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20642042/" ]
74,641,295
<p>Given a number i.e (<code>0xD5B8</code>), what is the <strong>most</strong> efficient way in Python to subset across the bits over a sliding window using only native libraries?</p> <p>A method might look like the following:</p> <pre><code>def window_bits(n,w, s): ''' n: the number w: the window size ...
[ { "answer_id": 74642768, "author": "Tomerikoo", "author_id": 6045800, "author_profile": "https://Stackoverflow.com/users/6045800", "pm_score": 1, "selected": false, "text": "bin(n)[2:] def window_bits(n, w, step_size):\n offset = n.bit_length() - w # the initial shift to get the MSB ...
2022/12/01
[ "https://Stackoverflow.com/questions/74641295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2155614/" ]
74,641,296
<p>Let's say I have a line looking like this:</p> <pre><code>/Users/random/354765478/Tests/StoreTests/Base64Tests.swift </code></pre> <p>In this example, I would like to get the result:</p> <pre><code>Tests/StoreTests/Base64Tests.swift </code></pre> <p>How can I do if I want to get everything before the first pattern m...
[ { "answer_id": 74641358, "author": "RavinderSingh13", "author_id": 5866580, "author_profile": "https://Stackoverflow.com/users/5866580", "pm_score": 2, "selected": false, "text": "grep /Sources /Tests grep -oP '^.*?\\/\\K(Sources|Tests)\\/.*' Input_file\n" }, { "answer_id": 74641...
2022/12/01
[ "https://Stackoverflow.com/questions/74641296", "https://Stackoverflow.com", "https://Stackoverflow.com/users/408193/" ]
74,641,301
<p>I was inspired by an intro logo and want to try implementing it in the website UI. However the more i tried, the more i realized i was just a beginner in website.</p> <p><a href="https://i.stack.imgur.com/DNM8W.png" rel="nofollow noreferrer">This is the image</a></p> <pre><code>function getCursorPosition(event) { ...
[ { "answer_id": 74641374, "author": "RenokK", "author_id": 2377357, "author_profile": "https://Stackoverflow.com/users/2377357", "pm_score": 0, "selected": false, "text": "document.elementFromPoint(x, y);\n" }, { "answer_id": 74641712, "author": "o1dskoo1", "author_id": 47...
2022/12/01
[ "https://Stackoverflow.com/questions/74641301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20655181/" ]
74,641,326
<p>Take this mockup dataframe for example:</p> <pre><code>CustomerID Number of Purchases ABC 5 DEF 24 GHI 85 JKL 2 MNO 100 </code></pre> <p>Assume this dataframe is first sorted by <strong>Number of Purchases</strong> (descending)....
[ { "answer_id": 74641374, "author": "RenokK", "author_id": 2377357, "author_profile": "https://Stackoverflow.com/users/2377357", "pm_score": 0, "selected": false, "text": "document.elementFromPoint(x, y);\n" }, { "answer_id": 74641712, "author": "o1dskoo1", "author_id": 47...
2022/12/01
[ "https://Stackoverflow.com/questions/74641326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14661648/" ]
74,641,344
<p>I have a dataframe where the <strong>rows have been shifted horizontally</strong> by an unknown amount. <strong>Each and every row has shifted by a different amount</strong> as shown below:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Heading 1</th> <th>Heading 2</th> <th>Unnamed: 1</...
[ { "answer_id": 74641438, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 0, "selected": false, "text": "isna cummin sum clip df.isna().cummin(axis=1).sum(axis=1).clip(upper=2)\n 0 1\n1 0\n2 2\n3 2\ndtype: in...
2022/12/01
[ "https://Stackoverflow.com/questions/74641344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18567298/" ]
74,641,350
<p>i've created an azure video indexer that is related to a media service account. Add to it i've created a storage account to media service. I've uploaded the video in it but when i go on azure video indexer portal the video is not exist. How they share the storage (video indexer and media services)?</p> <p>Thanks for...
[ { "answer_id": 74641438, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 0, "selected": false, "text": "isna cummin sum clip df.isna().cummin(axis=1).sum(axis=1).clip(upper=2)\n 0 1\n1 0\n2 2\n3 2\ndtype: in...
2022/12/01
[ "https://Stackoverflow.com/questions/74641350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13606315/" ]
74,641,351
<p>I want to perform a column-wise operation in R on column pairs. <strong>The function I actually want to use is not the one shown here, because it would complicate this example.</strong></p> <p>I have a dataframe:</p> <pre><code>df &lt;- data.frame(p1 = c(-5, -4, 2, 0, -2, 1, 3, 4, 2, 7) ,p2 = c(0, 1...
[ { "answer_id": 74641438, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 0, "selected": false, "text": "isna cummin sum clip df.isna().cummin(axis=1).sum(axis=1).clip(upper=2)\n 0 1\n1 0\n2 2\n3 2\ndtype: in...
2022/12/01
[ "https://Stackoverflow.com/questions/74641351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9283607/" ]
74,641,390
<p>I am wondering here by the parameter passing in the <strong>new</strong> Laravel Mail class. My IDE (VSCode) also underlines the parameter and throws the following error: <code>syntax error, unexpected ':', expecting ')'</code></p> <pre><code>public function envelope() { return new Envelope( subject: 'Su...
[ { "answer_id": 74641438, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 0, "selected": false, "text": "isna cummin sum clip df.isna().cummin(axis=1).sum(axis=1).clip(upper=2)\n 0 1\n1 0\n2 2\n3 2\ndtype: in...
2022/12/01
[ "https://Stackoverflow.com/questions/74641390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14807111/" ]
74,641,450
<p>I have an AngularForm which binds the formControlName to an input field that is of type <code>number</code>.</p> <p>I would like to accept numbers and dots only. Unfortunately the HTML attribute tag <code>number</code> also accepts dashes. This is something that I would like to prevent. Is there another attribute th...
[ { "answer_id": 74641438, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 0, "selected": false, "text": "isna cummin sum clip df.isna().cummin(axis=1).sum(axis=1).clip(upper=2)\n 0 1\n1 0\n2 2\n3 2\ndtype: in...
2022/12/01
[ "https://Stackoverflow.com/questions/74641450", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8836786/" ]
74,641,457
<p>When I fetch data from my PostgreSQL database, it comes in the following format: <code>2022-11-30T21:00:00.000Z</code> and it's not a string; it's in the form of a date object.</p> <p>The library that I'm using to work with dates is <code>dayjs</code>. So here is the issue.</p> <p>When I call the format method, I ge...
[ { "answer_id": 74641438, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 0, "selected": false, "text": "isna cummin sum clip df.isna().cummin(axis=1).sum(axis=1).clip(upper=2)\n 0 1\n1 0\n2 2\n3 2\ndtype: in...
2022/12/01
[ "https://Stackoverflow.com/questions/74641457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6137017/" ]
74,641,461
<p>i'm trying to merge two array of object based on key. two array of object like this,</p> <pre><code> let array1 = [ { name: &quot;Deepak&quot;, age: 20 }, { name: &quot;John&quot;, age: 30 } ] </code></pre> <pre><code> let array2 = [ { name: &quot;Deepak&qu...
[ { "answer_id": 74641500, "author": "flyingfox", "author_id": 3176419, "author_profile": "https://Stackoverflow.com/users/3176419", "pm_score": 2, "selected": true, "text": "Array.map() Array.find() let array1 = [\n {\n name: \"Deepak\",\n age: 20\n },\n {\n name: ...
2022/12/01
[ "https://Stackoverflow.com/questions/74641461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20647233/" ]
74,641,464
<p>Please help me to write a Select :)</p> <p>I need to return data from two tables: values from table X, but only these which also have value from table Y. For example in table X values are:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Column A</th> <th>Column B</th> <th>----</th> </tr>...
[ { "answer_id": 74641500, "author": "flyingfox", "author_id": 3176419, "author_profile": "https://Stackoverflow.com/users/3176419", "pm_score": 2, "selected": true, "text": "Array.map() Array.find() let array1 = [\n {\n name: \"Deepak\",\n age: 20\n },\n {\n name: ...
2022/12/01
[ "https://Stackoverflow.com/questions/74641464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20655652/" ]
74,641,473
<p>I have this .ejs page which contains a table. In that table, there are 4 columns which contain numbers. I want to display an average of each of these columns on the same page.</p> <p>I have managed to get the averages, but it is very inefficient and is taking up a lot of space in the .ejs file.</p> <p>This is what t...
[ { "answer_id": 74641500, "author": "flyingfox", "author_id": 3176419, "author_profile": "https://Stackoverflow.com/users/3176419", "pm_score": 2, "selected": true, "text": "Array.map() Array.find() let array1 = [\n {\n name: \"Deepak\",\n age: 20\n },\n {\n name: ...
2022/12/01
[ "https://Stackoverflow.com/questions/74641473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20572636/" ]
74,641,498
<p>I want to remove entire rows if all columns except the one is empty. So, imagine that my DataFrame is</p> <pre><code>df = pd.DataFrame({&quot;col1&quot;: [&quot;s1&quot;, &quot;s2&quot;, &quot;s3&quot;, &quot;s4&quot;, &quot;s5&quot;, &quot;s6&quot;], &quot;col2&quot;: [41, np.nan, np.nan, np.nan,...
[ { "answer_id": 74641535, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 2, "selected": true, "text": "thresh N = 1\ndf.dropna(thresh=N+1)\n N N = 1\nout = df[df.isna().sum(axis=1).ne(df.shape[1]-N)]\n col1 col2 col...
2022/12/01
[ "https://Stackoverflow.com/questions/74641498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20655582/" ]
74,641,510
<p>Maybe someone has already asked, but I didn't find the right answer. I need group arrays by <code>mpn</code> and <code>product_id</code> key values and count it's quantities. my array:</p> <pre><code> [0] =&gt; Array ( [product] =&gt; Product HTC [mpn] =&gt; [quantity...
[ { "answer_id": 74641838, "author": "Juan", "author_id": 6510866, "author_profile": "https://Stackoverflow.com/users/6510866", "pm_score": 3, "selected": true, "text": "// For Each Element\nforeach ($myList as $myKey => $myValue)\n{\n // Define New Key\n $newKey = $myValue[\"mpn\"];...
2022/12/01
[ "https://Stackoverflow.com/questions/74641510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2675139/" ]
74,641,521
<p>How to split a single variable into multiple arguments?</p> <p>In fish shell, one can use</p> <pre><code>set my_var (echo 'line1 line2 line3' | string split '\n') ./my_command $my_var </code></pre> <p>this is equivalent to</p> <pre><code>./my_command line1 line2 line3 </code></pre> <p>so a single variable acting as...
[ { "answer_id": 74641838, "author": "Juan", "author_id": 6510866, "author_profile": "https://Stackoverflow.com/users/6510866", "pm_score": 3, "selected": true, "text": "// For Each Element\nforeach ($myList as $myKey => $myValue)\n{\n // Define New Key\n $newKey = $myValue[\"mpn\"];...
2022/12/01
[ "https://Stackoverflow.com/questions/74641521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10347663/" ]
74,641,523
<p>I want to do a margin style for <code>mat-slide-toggle-bar</code> which is in a specific parent element <code>mat-slide-toggle</code> with class name <code>parent-element</code>.</p> <p>Here my Html:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="sni...
[ { "answer_id": 74641838, "author": "Juan", "author_id": 6510866, "author_profile": "https://Stackoverflow.com/users/6510866", "pm_score": 3, "selected": true, "text": "// For Each Element\nforeach ($myList as $myKey => $myValue)\n{\n // Define New Key\n $newKey = $myValue[\"mpn\"];...
2022/12/01
[ "https://Stackoverflow.com/questions/74641523", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10238495/" ]
74,641,528
<p>I would like to replace the captured group from my regex with <code>XXX</code> (captured group), but it is only replacing it with XXX and deleting the word captured by the regex.</p> <pre class="lang-r prettyprint-override"><code>search &lt;- &quot;[a-z]{5,}&quot; gsub(search, &quot;xxx\\1&quot;, texts$text) </code>...
[ { "answer_id": 74641630, "author": "Wiktor Stribiżew", "author_id": 3832970, "author_profile": "https://Stackoverflow.com/users/3832970", "pm_score": 1, "selected": false, "text": "text <- \"wonderful\"\n\nsearch <- \"\\\\b([a-z]{5,})\\\\b\"\ngsub(search, \"XXX\\\\1\", text, perl=TRUE)\n...
2022/12/01
[ "https://Stackoverflow.com/questions/74641528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20647358/" ]
74,641,579
<p>I am not the Powershell pro so I need some help.</p> <p>What I have now is for example:</p> <p><strong>somelongname_08-01-01_someotherlongname.pdf</strong></p> <p>and I want a rename to</p> <p><strong>somelongname_2008-01-01_someotherlongname.pdf</strong></p> <p>In short changing two digit year format to four digit ...
[ { "answer_id": 74641630, "author": "Wiktor Stribiżew", "author_id": 3832970, "author_profile": "https://Stackoverflow.com/users/3832970", "pm_score": 1, "selected": false, "text": "text <- \"wonderful\"\n\nsearch <- \"\\\\b([a-z]{5,})\\\\b\"\ngsub(search, \"XXX\\\\1\", text, perl=TRUE)\n...
2022/12/01
[ "https://Stackoverflow.com/questions/74641579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20655598/" ]
74,641,588
<p>What method can I use for reach this:</p> <p>If my String is: <strong>mailSPA</strong>: I want <strong>mail_spa</strong></p> <p>If my String is: <strong>mailSPAOther</strong> -&gt; <strong>mail_spaother</strong></p> <p>I tried this method:</p> <pre><code>public static String camelToUnderscore(String input) { ...
[ { "answer_id": 74641703, "author": "evren", "author_id": 16635445, "author_profile": "https://Stackoverflow.com/users/16635445", "pm_score": 2, "selected": true, "text": "public static String camelToUnderscore(String input) {\n if (input == null) {\n return \"\";\n }\n String regex...
2022/12/01
[ "https://Stackoverflow.com/questions/74641588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18772237/" ]
74,641,624
<p>My client app uses socket as http connections, meaing one-time send,receive, and close, i considered using a single persistent connection, instead of separate connection, each time, but problem was, sometimes the server received 2 packets of 32 kiB, while a single packet of 64kiB, the other times, and somtimes even ...
[ { "answer_id": 74641703, "author": "evren", "author_id": 16635445, "author_profile": "https://Stackoverflow.com/users/16635445", "pm_score": 2, "selected": true, "text": "public static String camelToUnderscore(String input) {\n if (input == null) {\n return \"\";\n }\n String regex...
2022/12/01
[ "https://Stackoverflow.com/questions/74641624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17965276/" ]
74,641,647
<p>Let's assume my <code>DataFrame</code> <code>df</code> has a column called <code>col</code> of type <code>string</code>. What is wrong with the following code line?</p> <pre><code>df['col'].filter(str.isnumeric) </code></pre>
[ { "answer_id": 74641703, "author": "evren", "author_id": 16635445, "author_profile": "https://Stackoverflow.com/users/16635445", "pm_score": 2, "selected": true, "text": "public static String camelToUnderscore(String input) {\n if (input == null) {\n return \"\";\n }\n String regex...
2022/12/01
[ "https://Stackoverflow.com/questions/74641647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2706344/" ]
74,641,651
<p>I'm still learning MongoDB and I'm having a difficulty on my current problem. How can I get the most used category in collection, so in this <code>JSON</code>, my most used category is <code>CIES</code>. so what I want to do is it to the front end.</p> <pre><code>[ { &quot;_id&quot;: &quot;63888d85674a07...
[ { "answer_id": 74642006, "author": "Hugo Dias", "author_id": 20656032, "author_profile": "https://Stackoverflow.com/users/20656032", "pm_score": 0, "selected": false, "text": "router.get('/top', async (req, res) => {\n \n try {\n const order = await Order.aggregate([\n ...
2022/12/01
[ "https://Stackoverflow.com/questions/74641651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18478430/" ]
74,641,687
<p>CustomerController.java</p> <pre><code>@RequestMapping(value=&quot;/customer/delete&quot;,method = {RequestMethod.DELETE,RequestMethod.GET}) public String deleteCustomer(Long id) { customerService.deleteCustomer(id); return &quot;redirect:/customer&quot;; } </code></pre> <p>CustomerService.java</p>...
[ { "answer_id": 74642006, "author": "Hugo Dias", "author_id": 20656032, "author_profile": "https://Stackoverflow.com/users/20656032", "pm_score": 0, "selected": false, "text": "router.get('/top', async (req, res) => {\n \n try {\n const order = await Order.aggregate([\n ...
2022/12/01
[ "https://Stackoverflow.com/questions/74641687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20572638/" ]
74,641,705
<p>I am very new to python. I have a folder which contains many .png files (which are scatter plots I previously made in python). I want to write a script that turns these files into a movie.</p> <p>My files are named 0.png 1.png 2.png .... 49.png</p> <p>I tried the following</p> <pre><code> frames = [] for i in...
[ { "answer_id": 74642006, "author": "Hugo Dias", "author_id": 20656032, "author_profile": "https://Stackoverflow.com/users/20656032", "pm_score": 0, "selected": false, "text": "router.get('/top', async (req, res) => {\n \n try {\n const order = await Order.aggregate([\n ...
2022/12/01
[ "https://Stackoverflow.com/questions/74641705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20623945/" ]
74,641,706
<p>This is a parking app which refresh the available parking slots every 30 seconds WITHOUT refreshing page.</p> <p>This is my .py with the route and render template</p> <pre><code>@views.route('/') def home(): while True: try: token=getToken() if(token!='null' or token!=''): ...
[ { "answer_id": 74642006, "author": "Hugo Dias", "author_id": 20656032, "author_profile": "https://Stackoverflow.com/users/20656032", "pm_score": 0, "selected": false, "text": "router.get('/top', async (req, res) => {\n \n try {\n const order = await Order.aggregate([\n ...
2022/12/01
[ "https://Stackoverflow.com/questions/74641706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20538016/" ]
74,641,722
<p>I have an Inventory DBone which has around 4000 servers.<br /> There are two groups Windows and Linux. Linux has around 2000 servers.</p> <p>So in my template I kept as below:<br /> Invnetory name: DBone<br /> Limit: Linux</p> <p>So the Ansible job will run in 2000 linux servers.<br /> But the linux servers has many...
[ { "answer_id": 74643333, "author": "DavidL", "author_id": 4656551, "author_profile": "https://Stackoverflow.com/users/4656551", "pm_score": 0, "selected": false, "text": "[windows] [linux] - name: run play on linux servers\n hosts: linux\n tasks: ...\n -i" }, { "answer_id": 746...
2022/12/01
[ "https://Stackoverflow.com/questions/74641722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11399171/" ]
74,641,763
<p>I have this application which needs some initialization before starting. I'm using the recommended way, with the APP_INITIALIZER, the factory function, etc. along with the syntax in the factory function that allows the use of observables instead of promises.</p> <p><strong>init.service.ts</strong></p> <pre><code>......
[ { "answer_id": 74642059, "author": "zeroquaranta", "author_id": 2867242, "author_profile": "https://Stackoverflow.com/users/2867242", "pm_score": 0, "selected": false, "text": "public init(): Observable<any>{\n let obs this.http.get(url);\n obs.subscribe((data) => {\n // save data i...
2022/12/01
[ "https://Stackoverflow.com/questions/74641763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2867242/" ]
74,641,768
<p>that's what i need to find where the error is (. Make a scatter plot of Nsteps versus starting number. You should adjust your marker symbol and size such that you can discern patterns in the data, rather than just seeing a solid mass of points.)</p> <p>*** basically this is my code:***</p> <p><strong>#in[]</strong><...
[ { "answer_id": 74642059, "author": "zeroquaranta", "author_id": 2867242, "author_profile": "https://Stackoverflow.com/users/2867242", "pm_score": 0, "selected": false, "text": "public init(): Observable<any>{\n let obs this.http.get(url);\n obs.subscribe((data) => {\n // save data i...
2022/12/01
[ "https://Stackoverflow.com/questions/74641768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20623369/" ]
74,641,792
<p>The code:</p> <pre><code>df = pd.DataFrame({ 'MNumber':['M03400001','M00000021','M10450001','M00003420','M02635915','M51323275','M63061229','M63151022'], 'GPA':[3.01, 4.00, 2.95, 2.90, 3.50, 3.33, 2.99, 3.98], 'major':['IS','BANA','IS','IS','IS','BANA','IS', 'BANA'], 'internship':['P&amp;G', 'IBM', '...
[ { "answer_id": 74641816, "author": "cavalcantelucas", "author_id": 5114495, "author_profile": "https://Stackoverflow.com/users/5114495", "pm_score": 0, "selected": false, "text": "x IBM print(x)\n print(x.columns)\n" }, { "answer_id": 74641829, "author": "timgeb", "author...
2022/12/01
[ "https://Stackoverflow.com/questions/74641792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1169091/" ]
74,641,899
<p>Here is my code, how can i solve that? <a href="https://i.stack.imgur.com/aeUKn.png" rel="nofollow noreferrer">enter image description here</a></p> <p><a href="https://i.stack.imgur.com/xL9ID.png" rel="nofollow noreferrer">enter image description here</a> <a href="https://i.stack.imgur.com/KZfr0.png" rel="nofollow n...
[ { "answer_id": 74641816, "author": "cavalcantelucas", "author_id": 5114495, "author_profile": "https://Stackoverflow.com/users/5114495", "pm_score": 0, "selected": false, "text": "x IBM print(x)\n print(x.columns)\n" }, { "answer_id": 74641829, "author": "timgeb", "author...
2022/12/01
[ "https://Stackoverflow.com/questions/74641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20624219/" ]
74,641,937
<p>Adobe After Effects supports Javascript and provides a hany method of <code>time</code>.</p> <p>It provides a floating point number of current time of the composition and can be used in numerous ways.</p> <pre><code>60 - time // Starts the countdown timer from 60. </code></pre> <p><strong>I'm trying to create countd...
[ { "answer_id": 74641816, "author": "cavalcantelucas", "author_id": 5114495, "author_profile": "https://Stackoverflow.com/users/5114495", "pm_score": 0, "selected": false, "text": "x IBM print(x)\n print(x.columns)\n" }, { "answer_id": 74641829, "author": "timgeb", "author...
2022/12/01
[ "https://Stackoverflow.com/questions/74641937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/797819/" ]
74,641,938
<p>I have a sheet with 3 columns: <code>player_a</code>, <code>player_b</code>, <code>result</code> Where player_a and player_b are normalised strings representing the different players in the tournament, and result is either 'W' or 'L'</p> <p>I would like to create a sheet with the following data:</p> <p><code>player...
[ { "answer_id": 74641816, "author": "cavalcantelucas", "author_id": 5114495, "author_profile": "https://Stackoverflow.com/users/5114495", "pm_score": 0, "selected": false, "text": "x IBM print(x)\n print(x.columns)\n" }, { "answer_id": 74641829, "author": "timgeb", "author...
2022/12/01
[ "https://Stackoverflow.com/questions/74641938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20656225/" ]
74,641,988
<p>I am using a pandas data-frame and for some reason when trying to access one entry after another in a for loop it does gives me an error.</p> <p>Here is my (simplified) code snippet:</p> <pre><code> df_original = pd.read_csv(csv_dataframe_filename, sep='\t', header=[0, 1], encoding_errors=&quot;replace&quot;) df_ori...
[ { "answer_id": 74641816, "author": "cavalcantelucas", "author_id": 5114495, "author_profile": "https://Stackoverflow.com/users/5114495", "pm_score": 0, "selected": false, "text": "x IBM print(x)\n print(x.columns)\n" }, { "answer_id": 74641829, "author": "timgeb", "author...
2022/12/01
[ "https://Stackoverflow.com/questions/74641988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19726928/" ]
74,642,016
<p>I'm using MikroOrm inside nestJs, and I added the following script inside <code>package.json</code></p> <pre><code>&quot;orm&quot;: &quot;npx mikro-orm&quot;, </code></pre> <p>and these are the configurations</p> <pre><code>seeder: { path: 'src/misc/db/', defaultSeeder: 'DatabaseSeeder', glob: '!(*.d).{js,ts}'...
[ { "answer_id": 74642094, "author": "Martin Adámek", "author_id": 3665878, "author_profile": "https://Stackoverflow.com/users/3665878", "pm_score": 1, "selected": false, "text": "--class npm run mikro-orm \"orm\": \"npx mikro-orm\" npx npx mikro-orm seeder:run --class=ClassNameSeeder\n --...
2022/12/01
[ "https://Stackoverflow.com/questions/74642016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14810505/" ]
74,642,053
<p>hello i am writing basic calculator. everytime i use 90 degrees on cos function it gives -0 as result</p> <pre><code> int deg; float rad,result; printf(&quot;\ndegree\n&quot;); scanf(&quot;%d&quot;,&amp;deg); rad = deg * (M_PI/180); result=cos(rad); printf(&quot;\nresult= %f&quot;,result);...
[ { "answer_id": 74642166, "author": "Adrian Maire", "author_id": 903651, "author_profile": "https://Stackoverflow.com/users/903651", "pm_score": 3, "selected": true, "text": "3.141593... 3.1415926 float double printf std::setprecision" }, { "answer_id": 74642712, "author": "vi...
2022/12/01
[ "https://Stackoverflow.com/questions/74642053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20654747/" ]
74,642,124
<p>I am trying to write a function based on this formula.</p> <pre><code>(x − x0)^ r+ = { (x-x0)^r if x&gt;x0 0 otherwise </code></pre> <p>what I understood from above is;</p> <p>y= (x-x0)^r unless x&lt;= x0</p> <p>so for each element of, identify if greater and x0 if so return y that equ...
[ { "answer_id": 74642189, "author": "Rui Barradas", "author_id": 8245406, "author_profile": "https://Stackoverflow.com/users/8245406", "pm_score": 2, "selected": false, "text": "ifelse tp <- function(x, x0, r) {\n ifelse(x > x0, (x - x0)^r, 0)\n}\n\nx0 <- 2\ntp(-2:5, x0, r = 2)\n#> [1] 0...
2022/12/01
[ "https://Stackoverflow.com/questions/74642124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20585881/" ]
74,642,138
<p>I have this data in MongoDB.</p> <pre><code>{ _id: &quot;abc*hello*today*123&quot;, &quot;value&quot;: 123 }, { _id: &quot;abc*hello*today*999&quot;, &quot;value&quot;: 999 }, { _id: &quot;xyz*hello*tomorrow*123&quot;, &quot;value&quot;: 123 } </code></pre> <p>What I want is to group by the first part before &quot;*...
[ { "answer_id": 74642509, "author": "Yong Shun", "author_id": 8017690, "author_profile": "https://Stackoverflow.com/users/8017690", "pm_score": 2, "selected": true, "text": ".*(?=\\*\\d+)\n $set firstPart $getField match $regexFind _id $group firstPart $unset results.firstPart db.collecti...
2022/12/01
[ "https://Stackoverflow.com/questions/74642138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19256727/" ]
74,642,156
<p>I am using Vue (<code>vuetify</code>) <code>v-data-table</code> to show some data, Its working fine, in the same time I am trying to show some data from another api, So I need to know how to push a items inside of a array of object.</p> <pre><code>axiosThis.tableDataFinal[i].push(axiosThis.printsumget[i]) </code></p...
[ { "answer_id": 74642509, "author": "Yong Shun", "author_id": 8017690, "author_profile": "https://Stackoverflow.com/users/8017690", "pm_score": 2, "selected": true, "text": ".*(?=\\*\\d+)\n $set firstPart $getField match $regexFind _id $group firstPart $unset results.firstPart db.collecti...
2022/12/01
[ "https://Stackoverflow.com/questions/74642156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16896963/" ]
74,642,159
<p>I am doing advent of code, which is a collection of 25 programming problems, one for each of day of the advent.</p> <p>I structure each day in it's own separate file/module, so for example year 2021 day 7 would be at <code>src/years/year2021/day07.rs</code>. So <code>src/years/year2021/mod.rs</code> ends up being ju...
[ { "answer_id": 74642617, "author": "pigeonhands", "author_id": 2691759, "author_profile": "https://Stackoverflow.com/users/2691759", "pm_score": 3, "selected": true, "text": "let years_path = path::Path::new(\"./src/years\");\nlet mut mod_file = fs::File::create(years_path.join(\"mod.rs\...
2022/12/01
[ "https://Stackoverflow.com/questions/74642159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2974775/" ]
74,642,172
<p>current code:</p> <pre><code>list = [1,2,3,4,5] for i in list: Dev.step(2) if i == 2 or 1 or 0: Dev.turnLeft() Dev.step(Dev.x-Item[i].x) Dev.step(Dev.x-15) Dev.turnRight() else: Dev.turnRight() Dev.step(Item[i].x-Dev.x) Dev.step(15-Dev.x) D...
[ { "answer_id": 74642222, "author": "Effie", "author_id": 11060338, "author_profile": "https://Stackoverflow.com/users/11060338", "pm_score": 2, "selected": false, "text": "if i in {0, 1, 2}:\n #do logic\n" }, { "answer_id": 74642224, "author": "brenodacosta", "author_i...
2022/12/01
[ "https://Stackoverflow.com/questions/74642172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20591508/" ]
74,642,178
<pre><code>public postForObjecty(endpoint: any, data: any) { return new Promise((resolve, reject) =&gt; { let url = this.createBasicUrl(endpoint); let _data = this.arrangeData(data); let headers: any = new Headers() let token = `Bearer ${RestProvider.BEARER_TOKEN}...
[ { "answer_id": 74642249, "author": "Philipp Meissner", "author_id": 3686898, "author_profile": "https://Stackoverflow.com/users/3686898", "pm_score": 1, "selected": false, "text": "map .pipe public postForObjecty(endpoint: any, data: any) {\n return new Promise((resolve, reject) => ...
2022/12/01
[ "https://Stackoverflow.com/questions/74642178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20426315/" ]
74,642,185
<p>I'm trying to create a new object that only contains the a product array with the seller I req. I have an order object that has a product array. I'd like to return a specific seller. I tried:</p> <pre><code>const newOrders = orders.map((element) =&gt; { return { ...element, product: elem...
[ { "answer_id": 74642249, "author": "Philipp Meissner", "author_id": 3686898, "author_profile": "https://Stackoverflow.com/users/3686898", "pm_score": 1, "selected": false, "text": "map .pipe public postForObjecty(endpoint: any, data: any) {\n return new Promise((resolve, reject) => ...
2022/12/01
[ "https://Stackoverflow.com/questions/74642185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17127423/" ]
74,642,219
<p>I have recently read &quot;Clean Architecture&quot; by Bob Martin. Even though the principles he explains there apply to all languages it is harder for me to grasp those concepts around JavaScript (functional languages in general).</p> <p>I have a React application where I have applied React Redux but now when I hav...
[ { "answer_id": 74642249, "author": "Philipp Meissner", "author_id": 3686898, "author_profile": "https://Stackoverflow.com/users/3686898", "pm_score": 1, "selected": false, "text": "map .pipe public postForObjecty(endpoint: any, data: any) {\n return new Promise((resolve, reject) => ...
2022/12/01
[ "https://Stackoverflow.com/questions/74642219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11342139/" ]
74,642,228
<p>I would like to return a http-response status 200 to http-requests which are send on port 8883. The port is used for mqtt but we would like to catch http-requests on it.</p> <p>The configuration I have now is (Haproxy 2.2) :</p> <pre><code>frontend smqtt bind :8883 mode tcp use_backend port_check if HTTP...
[ { "answer_id": 74642249, "author": "Philipp Meissner", "author_id": 3686898, "author_profile": "https://Stackoverflow.com/users/3686898", "pm_score": 1, "selected": false, "text": "map .pipe public postForObjecty(endpoint: any, data: any) {\n return new Promise((resolve, reject) => ...
2022/12/01
[ "https://Stackoverflow.com/questions/74642228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3097526/" ]
74,642,232
<p>I want to remove predefined parts of the strings in the following table and save the values in an array. For some reason I get an error stating that I'm outside of the index. The lengths of the strings in the table can vary.</p> <pre><code>Sub New_1() Dim i, j, k As Integer Dim Endings As Variant k = 0 Endings...
[ { "answer_id": 74642249, "author": "Philipp Meissner", "author_id": 3686898, "author_profile": "https://Stackoverflow.com/users/3686898", "pm_score": 1, "selected": false, "text": "map .pipe public postForObjecty(endpoint: any, data: any) {\n return new Promise((resolve, reject) => ...
2022/12/01
[ "https://Stackoverflow.com/questions/74642232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11535108/" ]
74,642,250
<p>I have recently learnt about incomplete types and that under certain conditions they can be used as template arguments. In particular, like <code>void</code>, <code>struct incomplete;</code> are both incomplete types. Then I wrote the following program that works with gcc but not with msvc and clang. <a href="https:...
[ { "answer_id": 74642460, "author": "Jason Liam", "author_id": 12002570, "author_profile": "https://Stackoverflow.com/users/12002570", "pm_score": 2, "selected": false, "text": "C<incomplete> constexpr inline C<incomplete> constexpr inline" } ]
2022/12/01
[ "https://Stackoverflow.com/questions/74642250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20562802/" ]