qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,415,983
<p>I am creating a windows forms app (C#) and I want to make a little rpg style battle game where you can perform 1 action per turn: Attack, block, use item, or run. I am new to these kinds of apps however, so can someone explain how I can only let the user hit 1 of the 4 buttons per turn?</p> <p>I attempted to use .Cl...
[ { "answer_id": 74416091, "author": "Slonsoid", "author_id": 20474992, "author_profile": "https://Stackoverflow.com/users/20474992", "pm_score": 0, "selected": false, "text": "private void button2_Click(object sender, EventArgs e)\n{\n // action is being performed here\n // ...\n ...
2022/11/12
[ "https://Stackoverflow.com/questions/74415983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18386975/" ]
74,415,989
<p>I use below code but when I login via Microsoft account I don't receive refresh_token. Someone can explain why?</p> <pre><code>$login = 'https://login.microsoftonline.com/xxxxxxxxxxxxxxxxxxxxxxxxx/oauth2/v2.0/authorize?'.http_build_query([ 'client_id' =&gt; $id, 'scope' =&gt...
[ { "answer_id": 74418038, "author": "Dmitry Streblechenko", "author_id": 332059, "author_profile": "https://Stackoverflow.com/users/332059", "pm_score": 1, "selected": false, "text": "offline_access" } ]
2022/11/12
[ "https://Stackoverflow.com/questions/74415989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19818308/" ]
74,416,000
<p>My java version in terminal is different from the version in IntelliJ.</p> <p>When I typed 'java -version' in the terminal, the version is 13.0.2, but when I set the SDK in the IntelliJ IDEA, the version is 11.0.4. I typed ' usr/libexec/java_home' in the terminal, but get the result 'zsh: no such file or directory: ...
[ { "answer_id": 74418038, "author": "Dmitry Streblechenko", "author_id": 332059, "author_profile": "https://Stackoverflow.com/users/332059", "pm_score": 1, "selected": false, "text": "offline_access" } ]
2022/11/12
[ "https://Stackoverflow.com/questions/74416000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488116/" ]
74,416,060
<p>I have this window function appled that looks like this:</p> <pre><code>SUM(value) OVER ( PARTITION BY product, service, site ORDER BY region, site, service, product, year, week ASC ROWS BETWEEN 12 PRECEDING AND 0 PRECEDING ) AS value </code></pre> <p>The Query is working fine but I want to understand ...
[ { "answer_id": 74416267, "author": "Martin Smith", "author_id": 73226, "author_profile": "https://Stackoverflow.com/users/73226", "pm_score": 1, "selected": false, "text": "PARTITION BY product, service, site PARTITION BY site, service, product PARTITION BY product, service, site \nORDER...
2022/11/12
[ "https://Stackoverflow.com/questions/74416060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9250452/" ]
74,416,071
<p>I've been trying to learn Laravel by myself and some features are bugging my mind. I'm trying to display a simple login form with just inputs and a button, so should I use function create and return a view or just declare Route::view on web.php to show a blade form?</p> <p>OBS: I noticed that if the blade expect an...
[ { "answer_id": 74416267, "author": "Martin Smith", "author_id": 73226, "author_profile": "https://Stackoverflow.com/users/73226", "pm_score": 1, "selected": false, "text": "PARTITION BY product, service, site PARTITION BY site, service, product PARTITION BY product, service, site \nORDER...
2022/11/12
[ "https://Stackoverflow.com/questions/74416071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488128/" ]
74,416,082
<p>I want to create a text animation, in which the text is automatically and constantly moving from one side to the other side of the website. Like a text would do on a ticker display. Does anybody know about a simple css code I can use to animate the text in this way?</p> <p>Thanks in advance!</p> <p>I have tried it o...
[ { "answer_id": 74416144, "author": "Noel Maróti", "author_id": 20150565, "author_profile": "https://Stackoverflow.com/users/20150565", "pm_score": 1, "selected": false, "text": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compati...
2022/11/12
[ "https://Stackoverflow.com/questions/74416082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17202472/" ]
74,416,085
<p>I can write something like the following and it works just as it should (it yields 10):</p> <pre><code>import cats.effect.IO import cats.effect.unsafe.implicits.global val zz: fs2.Stream[IO, Int] = fs2.Stream.iterate[IO, Int](1)(_+1).map(_*2) val qq: IO[Int] = zz.dropWhile(_ &lt; 10).take(1).compile.toList.map(_.hea...
[ { "answer_id": 74416253, "author": "Luis Miguel Mejía Suárez", "author_id": 4111404, "author_profile": "https://Stackoverflow.com/users/4111404", "pm_score": 3, "selected": true, "text": "def dropWhileEval[A](sa: Stream[IO, A])(p: A = IO[Boolean]): Stream[IO, A] =\n sa.evalMap(a => p(a)...
2022/11/12
[ "https://Stackoverflow.com/questions/74416085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221410/" ]
74,416,097
<p>I made a website for fun &amp; testing but it doesn't look well on mobile as it works on desktop, especially images and specially positioned stuff got out of page. I tried</p> <pre><code> &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt; </code></pre> <p>but it still look...
[ { "answer_id": 74416167, "author": "Noel Maróti", "author_id": 20150565, "author_profile": "https://Stackoverflow.com/users/20150565", "pm_score": 1, "selected": false, "text": "img {\nmax-width: 100%\n}\n" }, { "answer_id": 74416302, "author": "Skeirys", "author_id": 108...
2022/11/12
[ "https://Stackoverflow.com/questions/74416097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488055/" ]
74,416,105
<p>I have all my <code>&lt;a&gt;</code> tags with <code>:focus</code>, <code>:hover</code> and <code>:active</code> styled like this:</p> <pre><code>a:hover, a:active, a:focus { background: rgba(225, 225, 225, 0.35) !important; } </code></pre> <p>But the problem is, they don't work. I have to click like 2 times to see...
[ { "answer_id": 74420755, "author": "Maryam Sobhanian", "author_id": 12153475, "author_profile": "https://Stackoverflow.com/users/12153475", "pm_score": 0, "selected": false, "text": "const {Link} = ReactRouterDOM\n\n\nconst Example = () => {\n return(\n <ReactRouterDOM.HashRouter>\n ...
2022/11/12
[ "https://Stackoverflow.com/questions/74416105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19223350/" ]
74,416,122
<p>Suppose I have the following 2 matrices</p> <pre><code>A &lt;- matrix(nrow = 5, ncol = 3, byrow = TRUE, c( 5, 1, 2, 3, 1, 5, 5, 1, 3, 7, 2, 8, 2, 4, 2 )) B &lt;- matrix(nrow = 5, ncol = 2, byrow = TRUE, c( 2, 1, 3, 5, 1, 4, 3, 3, 3, 4 )) </code></pre> <p>and I want to create an array</p> <pr...
[ { "answer_id": 74420755, "author": "Maryam Sobhanian", "author_id": 12153475, "author_profile": "https://Stackoverflow.com/users/12153475", "pm_score": 0, "selected": false, "text": "const {Link} = ReactRouterDOM\n\n\nconst Example = () => {\n return(\n <ReactRouterDOM.HashRouter>\n ...
2022/11/12
[ "https://Stackoverflow.com/questions/74416122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488098/" ]
74,416,136
<p>Hello I am working with Snowflake and am creating a SQL stored procedure (CDS_EXTRACT). Within CDS_EXTRACT, I have to execute other stored procedures (CDS_EXTRACT_NEW_LOG_ENTRY). The arguments for CDS_EXTRACT_NEW_LOG_ENTRY need to come from variables I declared CDS_EXTRACT. Does anyone know how I can reference varia...
[ { "answer_id": 74420755, "author": "Maryam Sobhanian", "author_id": 12153475, "author_profile": "https://Stackoverflow.com/users/12153475", "pm_score": 0, "selected": false, "text": "const {Link} = ReactRouterDOM\n\n\nconst Example = () => {\n return(\n <ReactRouterDOM.HashRouter>\n ...
2022/11/12
[ "https://Stackoverflow.com/questions/74416136", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13711883/" ]
74,416,142
<p>I need to make a table with more tables, but i dont know how to put this tables inside <a href="https://i.stack.imgur.com/tRGlb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tRGlb.png" alt="enter image description here" /></a> It should look like this</p> <p><strong>i need to do this without CSS...
[ { "answer_id": 74416216, "author": "patrick", "author_id": 73804, "author_profile": "https://Stackoverflow.com/users/73804", "pm_score": -1, "selected": false, "text": " <table>\n\n<tr>\n <td style=\"border:1px solid black;\">\n Spaltenweise\n </td>\n <td style=\"border:1px solid b...
2022/11/12
[ "https://Stackoverflow.com/questions/74416142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488230/" ]
74,416,182
<pre><code>library(data.table) table1 &lt;- data.table(id1 = c(1324, 2324, 29, 29, 1010, 1010), type = c(1, 1, 2, 1, 1, 1), class = c(&quot;A&quot;, &quot;A&quot;, &quot;B&quot;, &quot;D&quot;, &quot;D&quot;, &quot;A&quot;), number = c(1, 98, 100, 100, 70,...
[ { "answer_id": 74416216, "author": "patrick", "author_id": 73804, "author_profile": "https://Stackoverflow.com/users/73804", "pm_score": -1, "selected": false, "text": " <table>\n\n<tr>\n <td style=\"border:1px solid black;\">\n Spaltenweise\n </td>\n <td style=\"border:1px solid b...
2022/11/12
[ "https://Stackoverflow.com/questions/74416182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3391549/" ]
74,416,190
<p>Suppose we have a Stream of Animals.</p> <p>We have different Subclasses of Animals, and we want to apply a filter on the stream to only have the Zebras of the Stream. We now still have a Stream of Animals, but only containing Zebras. To get a stream of Zebras we still need to cast.</p> <pre class="lang-java prettyp...
[ { "answer_id": 74416358, "author": "Alexander Ivanchenko", "author_id": 17949945, "author_profile": "https://Stackoverflow.com/users/17949945", "pm_score": 4, "selected": true, "text": "mapMulti() Consumer Stream<Animal> animalStream = Stream.of();\n\nStream<Zebra> zebraStream = animalSt...
2022/11/12
[ "https://Stackoverflow.com/questions/74416190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17133024/" ]
74,416,247
<p>I am going to make the <code>imageView</code> and <code>textView</code> side by side in a <code>cardView</code>. It looks good when in design but behaves weird when I run the app.</p> <p>My <code>item_offer_list.xml</code> file is as below:</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&...
[ { "answer_id": 74416653, "author": "Pavel Startsev", "author_id": 11160418, "author_profile": "https://Stackoverflow.com/users/11160418", "pm_score": 2, "selected": true, "text": "ImaveView item_offer_list.xml android:layout_width=\"wrap_content\"\nandroid:layout_height=\"wrap_content\"\...
2022/11/12
[ "https://Stackoverflow.com/questions/74416247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13147529/" ]
74,416,248
<p>I have been assigned a task, and I cannot seem to figure out how I should proceed with it. It seemed relatively easy, but I must be doing something wrong, I would love it if someone could give me guidance. The code I have so far is:</p> <pre><code>infile = open(&quot;dataset.txt&quot;, &quot;r&quot;) outfile = open(...
[ { "answer_id": 74416367, "author": "great_pan", "author_id": 20200173, "author_profile": "https://Stackoverflow.com/users/20200173", "pm_score": 0, "selected": false, "text": "import re\n\nEMAIL_PATTERN = r'([a-zA-Z0-9_\\-\\.]+@[a-zA-Z0-9_\\-\\.]+\\.[a-zA-Z]{2,5})'\n\ndef main():\n with...
2022/11/12
[ "https://Stackoverflow.com/questions/74416248", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9223978/" ]
74,416,265
<p>I have the following code. I am trying to select the 4th (index) item from a list at a given index location of the dataframe 'df'.</p> <pre><code>trialoutcomes = [] for j in range(0,len(df.columns)): for i in range(5,len(df)): trialoutcome = df.loc[i,j] trialoutcomes.append(trialoutcome[4]) </co...
[ { "answer_id": 74416538, "author": "Bushmaster", "author_id": 15415267, "author_profile": "https://Stackoverflow.com/users/15415267", "pm_score": 2, "selected": true, "text": "a=['trial', '2:7|2:8|4:1|4:2|8:3|8:4|', '4:7', '4:7', 'fullMiss', '5.828', '11', '37', '66']\n\nprint(a[4]) #ful...
2022/11/12
[ "https://Stackoverflow.com/questions/74416265", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12985497/" ]
74,416,272
<p><strong>Update</strong>: as chepner points out in the comments, creating the class in the function is a bad idea, it performs ten to eighty times slower than other solutions. See the performance comparison in my self-answer, which also shows how to do the typing.</p> <hr /> <p>I do this:</p> <pre class="lang-py pret...
[ { "answer_id": 74416538, "author": "Bushmaster", "author_id": 15415267, "author_profile": "https://Stackoverflow.com/users/15415267", "pm_score": 2, "selected": true, "text": "a=['trial', '2:7|2:8|4:1|4:2|8:3|8:4|', '4:7', '4:7', 'fullMiss', '5.828', '11', '37', '66']\n\nprint(a[4]) #ful...
2022/11/12
[ "https://Stackoverflow.com/questions/74416272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1658543/" ]
74,416,273
<p>How can I make an SQL query to select records that do not have at least one child element?</p> <p>I have 3 tables: <em>article</em> (~40K rows), <em>calendar</em> (~450K rows) and <em>calendar_cost</em> (~500K rows).</p> <p>It is necessary to select such entries of the <em>article</em> table:</p> <ol> <li>there are ...
[ { "answer_id": 74416398, "author": "Bohemian", "author_id": 256196, "author_profile": "https://Stackoverflow.com/users/256196", "pm_score": 3, "selected": true, "text": "calendar_cost calendar null count() null calendar_cost select a.id\nfrom article a\nleft join calendar c on c.article_...
2022/11/12
[ "https://Stackoverflow.com/questions/74416273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4289313/" ]
74,416,280
<p>I have a parent component with a handler function:</p> <pre><code> const folderRef = useRef(); const handleCollapseAllFolders = () =&gt; { folderRef.current.handleCloseAllFolders(); }; </code></pre> <p>In the parent, I'm rendering multiple items (folders):</p> <pre><code> {folders &amp;&amp; ...
[ { "answer_id": 74416384, "author": "kind user", "author_id": 6695924, "author_profile": "https://Stackoverflow.com/users/6695924", "pm_score": 3, "selected": true, "text": "ref Folder export default function App() {\n const ref = useRef([]);\n\n const content = data.map(({ id }, idx) =...
2022/11/12
[ "https://Stackoverflow.com/questions/74416280", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15637129/" ]
74,416,329
<p>I have all my rules in the Validation config file, like the documentation suggest: <a href="https://codeigniter4.github.io/userguide/libraries/validation.html#saving-sets-of-validation-rules-to-the-config-file" rel="nofollow noreferrer">https://codeigniter4.github.io/userguide/libraries/validation.html#saving-sets-o...
[ { "answer_id": 74417753, "author": "steven7mwesigwa", "author_id": 7376590, "author_profile": "https://Stackoverflow.com/users/7376590", "pm_score": 1, "selected": false, "text": "app/Validation app/Validation/UserRules.php <?php\n\nnamespace App\\Validation;\n\nclass UserRules\n{\n p...
2022/11/12
[ "https://Stackoverflow.com/questions/74416329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1815054/" ]
74,416,341
<p>If I have a function:</p> <pre><code>def chars(str1: str, str2: str, str3: str) -&gt; str: </code></pre> <p>What should I put inside this so that it returns a new string where the character at index i is str1[i] if str3[i] is 0 and str2[i] if str3[i] is 1.</p> <p>for example, if I had:</p> <pre><code>chars('dog', 'c...
[ { "answer_id": 74417753, "author": "steven7mwesigwa", "author_id": 7376590, "author_profile": "https://Stackoverflow.com/users/7376590", "pm_score": 1, "selected": false, "text": "app/Validation app/Validation/UserRules.php <?php\n\nnamespace App\\Validation;\n\nclass UserRules\n{\n p...
2022/11/12
[ "https://Stackoverflow.com/questions/74416341", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20343843/" ]
74,416,350
<p>Create a program that will keep track of items for a shopping list. The program should keep asking for new items until nothing is entered (no input followed by enter key). The program should then display the full shopping list</p> <p>How do I write the condition so it works?</p> <p>The code I'm writing looks like th...
[ { "answer_id": 74417753, "author": "steven7mwesigwa", "author_id": 7376590, "author_profile": "https://Stackoverflow.com/users/7376590", "pm_score": 1, "selected": false, "text": "app/Validation app/Validation/UserRules.php <?php\n\nnamespace App\\Validation;\n\nclass UserRules\n{\n p...
2022/11/12
[ "https://Stackoverflow.com/questions/74416350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20486946/" ]
74,416,359
<p>Im trying to run docker inside jenkins container, i used this command to create jenkins container</p> <p><code>docker run -p 8080:8080 -p 50000:50000 -d -v jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker jenkins/jenkins:latest</code></p> <p>then this com...
[ { "answer_id": 74417753, "author": "steven7mwesigwa", "author_id": 7376590, "author_profile": "https://Stackoverflow.com/users/7376590", "pm_score": 1, "selected": false, "text": "app/Validation app/Validation/UserRules.php <?php\n\nnamespace App\\Validation;\n\nclass UserRules\n{\n p...
2022/11/12
[ "https://Stackoverflow.com/questions/74416359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5736821/" ]
74,416,420
<p>I have a data that was identified as having JSON format. The data is in a *.txt file and the following is a snapshot from the text:</p> <pre><code>{&quot;company_number&quot;:&quot;09145694&quot;,&quot;data&quot;:{&quot;address&quot;:{&quot;address_line_1&quot;:&quot;St. Andrews Road&quot;,&quot;country&quot;:&quot;...
[ { "answer_id": 74417753, "author": "steven7mwesigwa", "author_id": 7376590, "author_profile": "https://Stackoverflow.com/users/7376590", "pm_score": 1, "selected": false, "text": "app/Validation app/Validation/UserRules.php <?php\n\nnamespace App\\Validation;\n\nclass UserRules\n{\n p...
2022/11/12
[ "https://Stackoverflow.com/questions/74416420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6740849/" ]
74,416,426
<p>i try to modify a background div when i hover a child div. Please notice that i have more than one child and here is my solution.</p> <p>But i'm pretty sure that there is a better way to achieve that who will of course be visible by all navigators (I.E, Firefox, Safari, Opera, Chrome...) That's why i didn't use the ...
[ { "answer_id": 74417753, "author": "steven7mwesigwa", "author_id": 7376590, "author_profile": "https://Stackoverflow.com/users/7376590", "pm_score": 1, "selected": false, "text": "app/Validation app/Validation/UserRules.php <?php\n\nnamespace App\\Validation;\n\nclass UserRules\n{\n p...
2022/11/12
[ "https://Stackoverflow.com/questions/74416426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488448/" ]
74,416,443
<p>Can I erase last byte or bytes in file without creating new file and changing names?</p> <p>For example, file contains &quot;00 00 AB&quot; and i need erase &quot;AB&quot;. At the end, file contains only &quot;00 00&quot;.</p>
[ { "answer_id": 74417753, "author": "steven7mwesigwa", "author_id": 7376590, "author_profile": "https://Stackoverflow.com/users/7376590", "pm_score": 1, "selected": false, "text": "app/Validation app/Validation/UserRules.php <?php\n\nnamespace App\\Validation;\n\nclass UserRules\n{\n p...
2022/11/12
[ "https://Stackoverflow.com/questions/74416443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488473/" ]
74,416,460
<p>How can I get the number of unique words from a <code>&lt;textarea&gt;</code> in JavaScript?</p> <p>Not sure how to approach this problem, I can seem to get all the different letters used but don't know how I would get all the unique words.</p> <pre><code>function uniqueWordCount(text) { var distinctWords = []; ...
[ { "answer_id": 74416531, "author": "Konrad", "author_id": 5089567, "author_profile": "https://Stackoverflow.com/users/5089567", "pm_score": 2, "selected": false, "text": "const textarea = document.querySelector('textarea')\nconst count = document.querySelector('p')\n\nhandleInput()\n\nte...
2022/11/12
[ "https://Stackoverflow.com/questions/74416460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20085772/" ]
74,416,471
<p>I am trying to create an iterative DFS but I can't seem to add items to the visited set? After, I will try to do a recursive DFS. I'm not uite sure what I am doing wrong here. Assistance would be greatly appreciated. &lt;3</p> <pre><code>const adjList = { 1: [2, 5], 2: [1, 3, 5], 3: [2, 4], 4: [3, 5, 6], 5...
[ { "answer_id": 74416531, "author": "Konrad", "author_id": 5089567, "author_profile": "https://Stackoverflow.com/users/5089567", "pm_score": 2, "selected": false, "text": "const textarea = document.querySelector('textarea')\nconst count = document.querySelector('p')\n\nhandleInput()\n\nte...
2022/11/12
[ "https://Stackoverflow.com/questions/74416471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19677744/" ]
74,416,494
<p>So I was given a computer science problem to write a function which accepts two natural numbers and returns their product. The rules are that I am only allowed to use the addition of 1 (variable + 1), assigning and comparison operation. I end up with this code in python:</p> <pre><code>def multiplication_of_ab(a, b)...
[ { "answer_id": 74416562, "author": "trincot", "author_id": 5459839, "author_profile": "https://Stackoverflow.com/users/5459839", "pm_score": 1, "selected": false, "text": "def multiply(a, b):\n c = 0\n for i in range(a):\n for j in range(b):\n c += 1\n return c...
2022/11/12
[ "https://Stackoverflow.com/questions/74416494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11313947/" ]
74,416,496
<p>I need to return the count of first N natural numbers using a while loop.</p> <p>My code is:</p> <pre><code>def count_until(seconds): cnt=seconds while(cnt): cnt-=1 return str(cnt) print(count_until(10)) </code></pre> <p>It is returning <code>9</code> but I want the result to be like this: <...
[ { "answer_id": 74416532, "author": "Kedar U Shet", "author_id": 13542152, "author_profile": "https://Stackoverflow.com/users/13542152", "pm_score": 1, "selected": false, "text": "def count_until(seconds):\n cnt=seconds\n out = \"\"\n while(cnt-1):\n cnt-=1\n out+=\...
2022/11/12
[ "https://Stackoverflow.com/questions/74416496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488468/" ]
74,416,517
<p>I have created a simple demo page for learning firebase,</p> <p>here I have a textfield, searchbutton and StreamBuilder for showing all records</p> <p>I have placed a condition for showing all records when textfield is empty...</p> <p>here I have used a button which just rebuild...just used setState inside it onpres...
[ { "answer_id": 74416675, "author": "Gwhyyy", "author_id": 18670641, "author_profile": "https://Stackoverflow.com/users/18670641", "pm_score": 3, "selected": true, "text": "TextField onChanged CustomTextField onChanged TextField(\n onChanged: (value) { SetState(() {})},\n \...
2022/11/12
[ "https://Stackoverflow.com/questions/74416517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18817235/" ]
74,416,557
<p>When I recall this function, its output is zero. The x in output should be a vector containing 365 values based on timepoints from 1 to 365. Maybe there is something wrong with the function definition or returning values.</p> <pre><code>vax_fun = function(timepoint, parms1){ with ( as.list (parms1), { ...
[ { "answer_id": 74418565, "author": "dcarlson", "author_id": 1580645, "author_profile": "https://Stackoverflow.com/users/1580645", "pm_score": 0, "selected": false, "text": "y <- NULL\nfor (timepoint in 1:365){\n x = vax_fun(timepoint, parms1)\n y <- c(y, x)\n}\nstr(y)\n# num [1:365] 0...
2022/11/12
[ "https://Stackoverflow.com/questions/74416557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488525/" ]
74,416,561
<p>The program receives an input of a number containing 6 symbols, and if the sum of the first three digits is the same as the sum of the second three digits, then the number is considered lucky.</p> <p>This is the code I have now, and it works with every number except those that start with 0 and I'm not sure how to fi...
[ { "answer_id": 74418565, "author": "dcarlson", "author_id": 1580645, "author_profile": "https://Stackoverflow.com/users/1580645", "pm_score": 0, "selected": false, "text": "y <- NULL\nfor (timepoint in 1:365){\n x = vax_fun(timepoint, parms1)\n y <- c(y, x)\n}\nstr(y)\n# num [1:365] 0...
2022/11/12
[ "https://Stackoverflow.com/questions/74416561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20352757/" ]
74,416,563
<p>I have the following DF</p> <pre><code>Cod Category N 1 A 1 1 A 2 1 A 3 1 B 1 1 B 2 1 B 3 1 B 4 1 B 5 2 D 1 3 Z 1 3 Z 2 3 Z 3 3 Z 4 </code></pre> <p>I need to filter this ...
[ { "answer_id": 74416657, "author": "vinsce", "author_id": 3811895, "author_profile": "https://Stackoverflow.com/users/3811895", "pm_score": 3, "selected": true, "text": "N w = Window.partitionBy(\"Cod\", \"Category\")\n\ndf = df.withColumn(\"max_N_in_category\", F.max(\"N\").over(w))\n\n...
2022/11/12
[ "https://Stackoverflow.com/questions/74416563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16459035/" ]
74,416,643
<p>Im developing a website and one of the requests is a division with an image, like below: <a href="https://i.stack.imgur.com/3ylVj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3ylVj.png" alt="" /></a></p> <p>But this is what i got: <a href="https://i.stack.imgur.com/AzsH6.png" rel="nofollow nore...
[ { "answer_id": 74416657, "author": "vinsce", "author_id": 3811895, "author_profile": "https://Stackoverflow.com/users/3811895", "pm_score": 3, "selected": true, "text": "N w = Window.partitionBy(\"Cod\", \"Category\")\n\ndf = df.withColumn(\"max_N_in_category\", F.max(\"N\").over(w))\n\n...
2022/11/12
[ "https://Stackoverflow.com/questions/74416643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20427057/" ]
74,416,646
<p>I'm working on a Cypress test for the Polish Wikipedia plugin, and I have this code in my cypress test:</p> <pre class="lang-js prettyprint-override"><code>Cypress.Commands.overwrite('visit', (orig, path, options) =&gt; { return orig(`https://pl.wikipedia.org/${path}`); }); Cypress.Commands.add('login', (pass) =&...
[ { "answer_id": 74416899, "author": "TesterDick", "author_id": 18366749, "author_profile": "https://Stackoverflow.com/users/18366749", "pm_score": 1, "selected": false, "text": "Cypress.Commands.overwrite('visit') '/wiki/Dyskusja_wikipedysty:<username>' https://pl.wikipedia.org/${path} ht...
2022/11/12
[ "https://Stackoverflow.com/questions/74416646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/387194/" ]
74,416,667
<p>I am trying to integrate a second click listener on recyclerview but I could not do it.</p> <p>I am developing a checklist and I created recyclerview. Inside the recyclerview, there are a checkbox and textview. I can handle the click listener on textview or on itemclick.</p> <p>But I can not handle the checkbox, che...
[ { "answer_id": 74416899, "author": "TesterDick", "author_id": 18366749, "author_profile": "https://Stackoverflow.com/users/18366749", "pm_score": 1, "selected": false, "text": "Cypress.Commands.overwrite('visit') '/wiki/Dyskusja_wikipedysty:<username>' https://pl.wikipedia.org/${path} ht...
2022/11/12
[ "https://Stackoverflow.com/questions/74416667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9645476/" ]
74,416,686
<p><a href="https://i.stack.imgur.com/ZThtq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZThtq.png" alt="error" /></a></p> <p>I keep getting the name error repeatedly, though I do not understand what I should do further please help</p> <p>Edit: <a href="https://i.stack.imgur.com/zcFF2.png" rel="no...
[ { "answer_id": 74416709, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "image_numbers = range(len(os.listdir(“YOUR_DIR”)))\n" } ]
2022/11/12
[ "https://Stackoverflow.com/questions/74416686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488648/" ]
74,416,689
<p>How can I regroup all the symbols like <code>&quot;!@#$%^&amp;*()_+[]{}'\&quot;|./?&gt;&lt;&quot;</code> and use them, if the variable contains the symbols it will return <code>False</code>?</p> <p>I'm trying to create a code for the password, and if the password contains only symbols like <code>&quot;!@#$%^&amp;*()...
[ { "answer_id": 74416709, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "image_numbers = range(len(os.listdir(“YOUR_DIR”)))\n" } ]
2022/11/12
[ "https://Stackoverflow.com/questions/74416689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488647/" ]
74,416,690
<p>I am creating a <code>tf.data.Dataset</code> where I start with <code>list_files</code> to get all paths to my images. The annotations are stored on disc as json files. The structure of the json file is</p> <pre><code>{ &quot;img1.png&quot;: { data ... }, &quot;img2.png&quot;: ....
[ { "answer_id": 74416709, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "image_numbers = range(len(os.listdir(“YOUR_DIR”)))\n" } ]
2022/11/12
[ "https://Stackoverflow.com/questions/74416690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2225895/" ]
74,416,693
<p>If I have a Python3 <code>xml.etree.Element</code> (<a href="https://docs.python.org/3.6/library/xml.etree.elementtree.html#element-objects" rel="nofollow noreferrer">doc</a>), is it possible to get a list (or iterable, or whatever) of child elements to that <code>Element</code>, but <strong><em>only</em></strong> o...
[ { "answer_id": 74416709, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "image_numbers = range(len(os.listdir(“YOUR_DIR”)))\n" } ]
2022/11/12
[ "https://Stackoverflow.com/questions/74416693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11274086/" ]
74,416,707
<p>Given a string that can only be <strong>a single ASCII character</strong> or <strong>an emoji char sequence</strong>. How can I tell one from another?</p> <p>The idea is to separate emojis from plain text, by the spec if you are given a string of chars mixed with emojis then by doing <code>for (..of)</code> you can ...
[ { "answer_id": 74416709, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "image_numbers = range(len(os.listdir(“YOUR_DIR”)))\n" } ]
2022/11/12
[ "https://Stackoverflow.com/questions/74416707", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139667/" ]
74,416,710
<p>I try to deploy <strong>debian containers</strong> to allow users to connect to them over SSH (for students for exemple).</p> <p>I managed to do this but when I am connected to the container I have a <strong>pseudo-TTY</strong> and it's not the expected result I want. I want to have a complete interactive shell like...
[ { "answer_id": 74416709, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "image_numbers = range(len(os.listdir(“YOUR_DIR”)))\n" } ]
2022/11/12
[ "https://Stackoverflow.com/questions/74416710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488534/" ]
74,416,720
<p>I want to make automated login to router web GUI, but if I use input_tags.send_keys(&quot;PASSWORD&quot;), then I get error</p> <blockquote> <p>AttributeError: 'list' object has no attribute 'send_keys'.</p> </blockquote> <p>Here is my code example</p> <pre><code>#imports import time from selenium import webdriver f...
[ { "answer_id": 74416709, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "image_numbers = range(len(os.listdir(“YOUR_DIR”)))\n" } ]
2022/11/12
[ "https://Stackoverflow.com/questions/74416720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488583/" ]
74,416,729
<p>I’m sure many have come across this problem because I can’t be the only one.</p> <p>In Visual Studio code I work with Kubernetes and Azure Devops YAML. Both have complete different formatting. To work with each I find I have to uninstall the others extension.</p> <p>Has anyone worked out, how to have both together w...
[ { "answer_id": 74462369, "author": "flyx", "author_id": 347964, "author_profile": "https://Stackoverflow.com/users/347964", "pm_score": 0, "selected": false, "text": "\"files.associations\"" }, { "answer_id": 74464686, "author": "Jason", "author_id": 15469962, "author...
2022/11/12
[ "https://Stackoverflow.com/questions/74416729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15469962/" ]
74,416,758
<p>I want end=&quot;&quot; to stop after it has removed all the spaces between integers.</p> <p>The result I get is this:</p> <pre><code>106111104110word </code></pre> <p>but I want to get this:</p> <pre><code>106111104110 word </code></pre> <p>Code:</p> <pre><code>name = 'john' for char in name: print(ord(char),...
[ { "answer_id": 74416775, "author": "Khaled DELLAL", "author_id": 15852600, "author_profile": "https://Stackoverflow.com/users/15852600", "pm_score": 1, "selected": false, "text": "\\n name = 'john' \n\nfor char in name:\n print(ord(char), end=\"\")\nprint(\"\\nword\")\n" }, { ...
2022/11/12
[ "https://Stackoverflow.com/questions/74416758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15179155/" ]
74,416,770
<p>can anybody help me to create a Dataframe in python with for loop: I want to create a Dataframe from two lists: list1 and list of lists (list2) where the length of list1 = the number of sublists in list2: an example: list1= [&quot;A&quot;, &quot;B&quot;, &quot;C&quot;, &quot;D&quot;] list2= [[1, 2, 3, 4], [1, 3, 4, ...
[ { "answer_id": 74416793, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 2, "selected": true, "text": "list1 = [\"A\", \"B\", \"C\", \"D\"]\nlist2 = [[1, 2, 3, 4], [1, 3, 4, 6, 7], [2, 3, 4, 5, 6], [2, 4, 5, 7, 8...
2022/11/12
[ "https://Stackoverflow.com/questions/74416770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12861707/" ]
74,416,827
<p>So, I am trying to output folder &amp; file structure to a txt file, using the below code. But I want to get relative paths outputed instead of absolute paths.</p> <pre><code> import os absolute_path = os.path.dirname(__file__) with open(&quot;output.txt&quot;, &quot;w&quot;, newline='') as a: for path, subdir...
[ { "answer_id": 74416793, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 2, "selected": true, "text": "list1 = [\"A\", \"B\", \"C\", \"D\"]\nlist2 = [[1, 2, 3, 4], [1, 3, 4, 6, 7], [2, 3, 4, 5, 6], [2, 4, 5, 7, 8...
2022/11/12
[ "https://Stackoverflow.com/questions/74416827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488737/" ]
74,416,833
<p>file <strong>tools.h</strong>:</p> <pre><code>//some macro definitions struct name; //other function prototypes </code></pre> <hr /> <p>file <strong>tools.c</strong>:</p> <pre><code>#include &quot;tools.h&quot; struct name { FILE *src; int value; } //definitions of functions declared in tools.h </code><...
[ { "answer_id": 74416942, "author": "0___________", "author_id": 6110094, "author_profile": "https://Stackoverflow.com/users/6110094", "pm_score": 3, "selected": true, "text": "#ifndef TOOLS_H\n#define TOOLS_H\n\n#include <stdio.h>\n\nstruct name\n{\n FILE *src;\n int value;\n};\n\n...
2022/11/12
[ "https://Stackoverflow.com/questions/74416833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20333834/" ]
74,416,862
<pre><code>listdict = { 'list_1' : ['1'], 'list_2' : ['1','2'], 'list_3' : ['2'], 'list_4' : ['1', '2', '3', '4'] } print(len(listdict)) </code></pre> <p>This is my code for example. I want it to print:</p> <pre><code>8 </code></pre> <p>I have tried length as u can see but it prints 4 of course the amount...
[ { "answer_id": 74416942, "author": "0___________", "author_id": 6110094, "author_profile": "https://Stackoverflow.com/users/6110094", "pm_score": 3, "selected": true, "text": "#ifndef TOOLS_H\n#define TOOLS_H\n\n#include <stdio.h>\n\nstruct name\n{\n FILE *src;\n int value;\n};\n\n...
2022/11/12
[ "https://Stackoverflow.com/questions/74416862", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20323201/" ]
74,416,867
<p>I searched the web for this very simple question but I didn´t find a simple answer.</p> <p>Tried next lines with error but I´d like to know if there is a simplest way.</p> <pre><code>List&lt;string&gt; listaStr = new List&lt;string&gt; {&quot;cero&quot;,&quot;uno&quot;,&quot;dos&quot;,&quot;tres&quot;,&quot;cuatro&q...
[ { "answer_id": 74416907, "author": "Gabriel Stancu", "author_id": 8187400, "author_profile": "https://Stackoverflow.com/users/8187400", "pm_score": 2, "selected": true, "text": " List<string> listaStr = new List<string> {\"cero\",\"uno\",\"dos\",\"tres\",\"cuatro\"};\n List<int> in...
2022/11/12
[ "https://Stackoverflow.com/questions/74416867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20373528/" ]
74,416,886
<p>I have a problem of the form:</p> <p>min (x1 - k1) + (x2 -k2) + ...</p> <p>k are constants</p> <p>with linear constraints:</p> <p>A*x = B</p> <p>B's size is 3x1, A is 3xn and x is nx1</p> <p>I also have linear bounds inequalities in the form</p> <p>l1 &lt;= x1 &lt;= u1</p> <p>l2 &lt;= x2 &lt;= u2 ...etc</p> <p>I'm t...
[ { "answer_id": 74416907, "author": "Gabriel Stancu", "author_id": 8187400, "author_profile": "https://Stackoverflow.com/users/8187400", "pm_score": 2, "selected": true, "text": " List<string> listaStr = new List<string> {\"cero\",\"uno\",\"dos\",\"tres\",\"cuatro\"};\n List<int> in...
2022/11/12
[ "https://Stackoverflow.com/questions/74416886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488787/" ]
74,416,892
<p>I have a class for a general Shape, my arguments would be 'name', 'sides' and 'length, and then I have a Square class which is an instance of Shape. it is supposed that a square has 4 equals sides, so I am trying to define in my Square class a constructor with the only argument of length, because a rectangle with th...
[ { "answer_id": 74416923, "author": "CertainPerformance", "author_id": 9515207, "author_profile": "https://Stackoverflow.com/users/9515207", "pm_score": 2, "selected": false, "text": "sideLength constructor(_name, _sides, _sideLength){\n super(_sideLength); class Shape {\n constructor(_n...
2022/11/12
[ "https://Stackoverflow.com/questions/74416892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18758297/" ]
74,416,896
<p>I am trying to shade every other group of visiable cells.</p> <p>Each row of my data contains information on a given Order and there can be multiple rows for each order, e.g. Order 1 many have 3 rows while order 2 may have 1 row, etc. The data is sorted by Order Number so all rows for a given order are contiguous.</...
[ { "answer_id": 74416923, "author": "CertainPerformance", "author_id": 9515207, "author_profile": "https://Stackoverflow.com/users/9515207", "pm_score": 2, "selected": false, "text": "sideLength constructor(_name, _sides, _sideLength){\n super(_sideLength); class Shape {\n constructor(_n...
2022/11/12
[ "https://Stackoverflow.com/questions/74416896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10508937/" ]
74,416,913
<p>I got a problem with one fromula.</p> <p>Two sheets:</p> <ul> <li><p><a href="https://docs.google.com/spreadsheets/d/1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4/edit#gid=0" rel="nofollow noreferrer">1st Sheet</a></p> </li> <li><p><a href="https://docs.google.com/spreadsheets/d/1QGnFhtWaMUhvvFJFOXzX8UpzgRfkFLbF05F_t...
[ { "answer_id": 74417026, "author": "Martín", "author_id": 20363318, "author_profile": "https://Stackoverflow.com/users/20363318", "pm_score": 2, "selected": true, "text": "=IFERROR(INDEX(Importrange(\"1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4\",\"Sheet1!A:A\"),MATCH($A2,Importrange(\"...
2022/11/12
[ "https://Stackoverflow.com/questions/74416913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19611595/" ]
74,416,915
<p>I am currently learning python and my instructor is telling me to open a text file using the open() meathod. I get the following error each time:</p> <p><code>FileNotFoundError: [Errno 2] No such file or directory: 'movies.txt'</code></p> <p>I have tried using online guides but all I could find was for .csv files, w...
[ { "answer_id": 74417026, "author": "Martín", "author_id": 20363318, "author_profile": "https://Stackoverflow.com/users/20363318", "pm_score": 2, "selected": true, "text": "=IFERROR(INDEX(Importrange(\"1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4\",\"Sheet1!A:A\"),MATCH($A2,Importrange(\"...
2022/11/12
[ "https://Stackoverflow.com/questions/74416915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20432831/" ]
74,416,925
<p><strong>PROBLEM STATEMENT:</strong></p> <p>I'm trying to join multiple pandas data frame columns, based on row index, to a single column already in the data frame. Issues seem to happen when the data in a column is read in as np.nan.</p> <p><strong>EXAMPLE:</strong></p> <p><strong>Original Data frame</strong></p> <d...
[ { "answer_id": 74417026, "author": "Martín", "author_id": 20363318, "author_profile": "https://Stackoverflow.com/users/20363318", "pm_score": 2, "selected": true, "text": "=IFERROR(INDEX(Importrange(\"1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4\",\"Sheet1!A:A\"),MATCH($A2,Importrange(\"...
2022/11/12
[ "https://Stackoverflow.com/questions/74416925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10097026/" ]
74,416,981
<p>When I try to build for production, this error comes up. I'm using React Native Firebase. This error happens on android.</p> <p>Here is the error</p> <pre><code>* What went wrong: Execution failed for task ':react-native-firebase_app:generateReleaseRFile'. &gt; Could not resolve all files for configuration ':react-n...
[ { "answer_id": 74432935, "author": "karim elsaidy", "author_id": 8553678, "author_profile": "https://Stackoverflow.com/users/8553678", "pm_score": 0, "selected": false, "text": " \"react-native\": \"0.70.5\"\n" }, { "answer_id": 74470449, "author": "Pranavan", "author_id"...
2022/11/12
[ "https://Stackoverflow.com/questions/74416981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19354777/" ]
74,417,007
<p>I just realized that Git is ignoring whitespaces during merge by default. However, I would like that Git would consider whitespace during merge. Is there someone that knows how can I configure it?</p> <p>I tried to install older versions, but I could not find. The steps to install older version on Ubuntu would be ni...
[ { "answer_id": 74417835, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 3, "selected": true, "text": "-Xignore-all-space git merge diff merge -s recursive" }, { "answer_id": 74423427, "author": "GLEIPH GHIOTTO LIMA D...
2022/11/12
[ "https://Stackoverflow.com/questions/74417007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20488885/" ]
74,417,019
<p>I would like to chain strings together. This is my code:</p> <pre><code>let mut string_to_send = String::new(); string_to_send.push_str(&quot;&lt;hi,&quot;); string_to_send.push_str(&amp;some_int.to_string()); string_to_send.push_str(&quot;,&quot;); string_to_send.push_str(&amp;another_int.to_string()); string_to_se...
[ { "answer_id": 74417036, "author": "Lee", "author_id": 152602, "author_profile": "https://Stackoverflow.com/users/152602", "pm_score": 4, "selected": true, "text": "format! let mut string_to_send = format!(\"<hi,{},{}>\", some_int, another_int);\n let mut string_to_send = format!(\"<hi,{...
2022/11/12
[ "https://Stackoverflow.com/questions/74417019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13419097/" ]
74,417,078
<p>I'm trying to return the teacher's name based on what classroom the students name is in. teacher[0] is responsible for rooms[0] and teacher[1] is responsible for rooms[1] and so on.</p> <pre><code>let teachers = [&quot;Arrington&quot;, &quot;Kincart&quot;, &quot;Alberts&quot;, &quot;Pickett&quot;] </code></pre> <pre...
[ { "answer_id": 74417095, "author": "LeoDog896", "author_id": 7589775, "author_profile": "https://Stackoverflow.com/users/7589775", "pm_score": 3, "selected": true, "text": "let teachers = [\"Arrington\", \"Kincart\", \"Alberts\", \"Pickett\"]\n\n\nlet rooms = [\n [\"Andy\", \"Rodolfo\",...
2022/11/12
[ "https://Stackoverflow.com/questions/74417078", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
74,417,085
<p>I'm looking for some guidance here. I have a project and I'm looking to sort a char vector inside a struct.</p> <p>I have the next struct and the main:</p> <pre class="lang-cpp prettyprint-override"><code>struct employee { long Id; char name[20] }; int main () { employee data[5] for(int i=0; i&lt;5; i++) ...
[ { "answer_id": 74417236, "author": "AdamSE", "author_id": 20489090, "author_profile": "https://Stackoverflow.com/users/20489090", "pm_score": 0, "selected": false, "text": "#include <string>\n#include <vector>\n#include <algorithm>\n\nstruct Test\n{\n int id;\n std::string name;\n}...
2022/11/12
[ "https://Stackoverflow.com/questions/74417085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16079517/" ]
74,417,087
<p>This has been giving me a headache, im just trying to put a Textfield on the bottom of my screen. I have the following code, trying to wrap it in a Positioned:</p> <pre><code>return Scaffold( //set a textField to add a reply appBar: TopAppBar(title: 'bruh'), body: SingleCh...
[ { "answer_id": 74417352, "author": "Gwhyyy", "author_id": 18670641, "author_profile": "https://Stackoverflow.com/users/18670641", "pm_score": 1, "selected": false, "text": " return Scaffold(\n //set a textField to add a reply\n\n appBar: TopAppBar(title: 'bruh'),\n body: Stack(\n c...
2022/11/12
[ "https://Stackoverflow.com/questions/74417087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19097292/" ]
74,417,135
<p>Write a function that changes letters given in an array to '*' in a given string.</p> <p>'Irisk' ['i','k'] -&gt; *r * s *</p> <p>I have tried using:</p> <pre><code>def filter(word, lett): new_word = '' for c in word: if c == lett: new_word += '*' else: new_word += c ...
[ { "answer_id": 74417167, "author": "Dodo", "author_id": 20488733, "author_profile": "https://Stackoverflow.com/users/20488733", "pm_score": 0, "selected": false, "text": "def filter(word, lett):\n new_word = \"\"\n for c in word:\n if c in lett:\n new_word += \"*\...
2022/11/12
[ "https://Stackoverflow.com/questions/74417135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18702533/" ]
74,417,151
<p>I have a bitmap image, myImage.png say. The png has been saved with pixel format Format8bppIndexed, which is something I specifically chose to do. But when I open it in C# using new Bitmap(&quot;myImage.png&quot;), I find that it is provided to me as a bitmap in format Format32bppRgb. This isn't what I want, which i...
[ { "answer_id": 74417167, "author": "Dodo", "author_id": 20488733, "author_profile": "https://Stackoverflow.com/users/20488733", "pm_score": 0, "selected": false, "text": "def filter(word, lett):\n new_word = \"\"\n for c in word:\n if c in lett:\n new_word += \"*\...
2022/11/12
[ "https://Stackoverflow.com/questions/74417151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340819/" ]
74,417,170
<p>This answer <a href="https://emacs.stackexchange.com/questions/28981/finding-files-by-names">https://emacs.stackexchange.com/questions/28981/finding-files-by-names</a> mentions</p> <p>&quot;If you are running Dired with a 'ls' implemented in elisp, 'ls-lisp' or 'eshell-ls', then you can recursively list all the file...
[ { "answer_id": 74417167, "author": "Dodo", "author_id": 20488733, "author_profile": "https://Stackoverflow.com/users/20488733", "pm_score": 0, "selected": false, "text": "def filter(word, lett):\n new_word = \"\"\n for c in word:\n if c in lett:\n new_word += \"*\...
2022/11/12
[ "https://Stackoverflow.com/questions/74417170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2767348/" ]
74,417,195
<p>I have a section of code that used to utilize Optional&lt;Department&gt;, but due to some errors I worked out I am now converting it to List&lt;Department&gt;. Obviously this means I now have to change the return types and other method calls. Here are my questions:</p> <ul> <li><p>I changed my returns to &quot;new L...
[ { "answer_id": 74417235, "author": "Christoph Dahlen", "author_id": 20370596, "author_profile": "https://Stackoverflow.com/users/20370596", "pm_score": 0, "selected": false, "text": "new LinkedList<>() List.emptyList() isPresent() get(department_ID) if(!(existing == null || existing.isEm...
2022/11/12
[ "https://Stackoverflow.com/questions/74417195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20489017/" ]
74,417,204
<p>Is there a way in notepad ++ to delete all rows which contain 2 or more @ characters on the same row? I have a big list of email addresses. Some email addresses are incorrect because there are multiple @ characters in it. I want to delete these lines from the file.</p> <p>If not possible, is this maybe possible in a...
[ { "answer_id": 74417235, "author": "Christoph Dahlen", "author_id": 20370596, "author_profile": "https://Stackoverflow.com/users/20370596", "pm_score": 0, "selected": false, "text": "new LinkedList<>() List.emptyList() isPresent() get(department_ID) if(!(existing == null || existing.isEm...
2022/11/12
[ "https://Stackoverflow.com/questions/74417204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5953578/" ]
74,417,212
<p>I have a list of lists <code>property_lists</code> which is structured as follows:</p> <pre><code>property_lists = [['Semi-Detached', '|', '', '2', '|', '', '2'], ['Detached', '|', '', '5', '|', '', '3'], ['Detached', '|', '', '5', '|', '', '5']] </code></pre> <p>and so on.</p> <p>I am attempting list indexing in or...
[ { "answer_id": 74417235, "author": "Christoph Dahlen", "author_id": 20370596, "author_profile": "https://Stackoverflow.com/users/20370596", "pm_score": 0, "selected": false, "text": "new LinkedList<>() List.emptyList() isPresent() get(department_ID) if(!(existing == null || existing.isEm...
2022/11/12
[ "https://Stackoverflow.com/questions/74417212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6562240/" ]
74,417,215
<p>How to get the rows of the longest consecutive same value?</p> <p>Table <code>Learning</code>:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>rowID</th> <th>values</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>1</td> </tr> <tr> <td>2</td> <td>1</td> </tr> <tr> <td>3</td> <td>0</td> </...
[ { "answer_id": 74417285, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 2, "selected": true, "text": "WITH cte AS (\n SELECT *, ROW_NUMBER() OVER (ORDER BY rowID) rn1,\n ROW_NUMBER() OVER (PARTIT...
2022/11/12
[ "https://Stackoverflow.com/questions/74417215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20381410/" ]
74,417,268
<p>I'm trying to create a pascal's triangle generator, but for some reason it's not giving me the correct output. I should get:</p> <pre><code>[1, 1] [1, 2, 1] [1, 3, 3, 1] [1, 4, 6, 4, 1] </code></pre> <p>But instead I'm getting:</p> <pre><code>[1, 1] [1, 2, 1] [1, 3, 4, 1] [1, 4, 8, 9, 1] </code></pre> <p>Here's the ...
[ { "answer_id": 74417285, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 2, "selected": true, "text": "WITH cte AS (\n SELECT *, ROW_NUMBER() OVER (ORDER BY rowID) rn1,\n ROW_NUMBER() OVER (PARTIT...
2022/11/12
[ "https://Stackoverflow.com/questions/74417268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15323416/" ]
74,417,270
<p>I have a laravelapi that fetches posts from the database and another one that fetches upvotes. Now I want to display posts on my react component and show the length of upvotes for every particular post.</p> <p>Here is how I have tried it out. But im getting the value as undefined on the console. Please help. Here is...
[ { "answer_id": 74417285, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 2, "selected": true, "text": "WITH cte AS (\n SELECT *, ROW_NUMBER() OVER (ORDER BY rowID) rn1,\n ROW_NUMBER() OVER (PARTIT...
2022/11/12
[ "https://Stackoverflow.com/questions/74417270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19223350/" ]
74,417,331
<p>In Visual Studio 2019 I have two C++ projects contained in the same Solution: <code>ProjectA</code> and <code>ProjectB</code>.</p> <p>How to define a <code>C/C++ Preprocessor Definition</code> in <code>ProjectB</code> ( let's call it: <code>THE_OTHER_FILE_NAME</code> ), which <strong>is equal to</strong> the string...
[ { "answer_id": 74417636, "author": "Abdallah", "author_id": 19486032, "author_profile": "https://Stackoverflow.com/users/19486032", "pm_score": -1, "selected": false, "text": "#define _CRT_SECURE_NO_WARNINGS\n#include <stdio.h>\n#include <Windows.h>\n#include \"../p2/Header.h\"\nint main...
2022/11/12
[ "https://Stackoverflow.com/questions/74417331", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20137151/" ]
74,417,383
<p>I am trying to make a type guard that narrows the <code>string</code> type but doesn't narrow it all the way to an explicit list of strings.</p> <p>Here is an example of the type of code I am writing:</p> <pre class="lang-js prettyprint-override"><code> type Node = { type: string, content: string }; type Macro exten...
[ { "answer_id": 74417466, "author": "Dimava", "author_id": 5734961, "author_profile": "https://Stackoverflow.com/users/5734961", "pm_score": 0, "selected": false, "text": "function hasPrefix<P extends string>(str: string, prefix: P): str is `${P}${string}` {\n return typeof str === 'st...
2022/11/12
[ "https://Stackoverflow.com/questions/74417383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2016529/" ]
74,417,408
<p>I am using os.system(&quot;python game2.py&quot;) to run different parts of my code.</p> <p>Every time I try this it gives me an import error for example &quot;no module named pygame&quot; even though when I game2 itself, it works fine.</p> <p>What can I do?</p>
[ { "answer_id": 74417466, "author": "Dimava", "author_id": 5734961, "author_profile": "https://Stackoverflow.com/users/5734961", "pm_score": 0, "selected": false, "text": "function hasPrefix<P extends string>(str: string, prefix: P): str is `${P}${string}` {\n return typeof str === 'st...
2022/11/12
[ "https://Stackoverflow.com/questions/74417408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20489210/" ]
74,417,476
<p>The goal is to get all the news articles from this page by clicking the load more button programmatically: <a href="https://money.tmx.com/en/quote/AMK/news" rel="nofollow noreferrer">https://money.tmx.com/en/quote/AMK/news</a></p> <p>Here's what I have tried so far:</p> <pre><code>from bs4 import BeautifulSoup impo...
[ { "answer_id": 74418637, "author": "Smooth Carlito", "author_id": 9151446, "author_profile": "https://Stackoverflow.com/users/9151446", "pm_score": 0, "selected": false, "text": "//button[contains(., 'LOAD MORE')] //button[contains(., 'Load more')]" }, { "answer_id": 74419433, ...
2022/11/13
[ "https://Stackoverflow.com/questions/74417476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9875416/" ]
74,417,478
<p>I have two numpy arrays which look like this:</p> <pre><code>x = [v1, v2, v3, ..., vm] y = [w1, w2, w3, ..., wn] </code></pre> <p>where <code>vi, wj</code> are numpy arrays of length 3.</p> <p>I want to perform a pairwise <em>summation</em> of v's and w's and get a final array</p> <pre><code>z = [v1+w1, v1+w2,...,v1...
[ { "answer_id": 74418637, "author": "Smooth Carlito", "author_id": 9151446, "author_profile": "https://Stackoverflow.com/users/9151446", "pm_score": 0, "selected": false, "text": "//button[contains(., 'LOAD MORE')] //button[contains(., 'Load more')]" }, { "answer_id": 74419433, ...
2022/11/13
[ "https://Stackoverflow.com/questions/74417478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11833842/" ]
74,417,493
<p>I'm trying to make a basic interest income calculator using GUI tkinker in Python. However, after entering all the values, the label at the end doesn't update.</p> <p><strong>Please note that calculations is just printing the variables for now</strong></p> <pre><code>import tkinter as tk frame = tk.Tk() frame.title(...
[ { "answer_id": 74417715, "author": "Jimpsoni", "author_id": 18195201, "author_profile": "https://Stackoverflow.com/users/18195201", "pm_score": 2, "selected": true, "text": "command = func() def sum():\n return 1 + 1\n\nexample1 = sum\nexample2 = sum()\n\n# -> example1 is a function obj...
2022/11/13
[ "https://Stackoverflow.com/questions/74417493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19439374/" ]
74,417,495
<p>In the pandas package of python, how would one do the following the most easily?</p> <pre><code>df = pd.DataFrame({'Animal': ['Falcon', 'Falcon', 'Parrot', 'Parrot'], 'Max Speed': [380., 370., 24., 26.]}) </code></pre> <p>Resulting in:</p> <pre><code> Animal Max S...
[ { "answer_id": 74417715, "author": "Jimpsoni", "author_id": 18195201, "author_profile": "https://Stackoverflow.com/users/18195201", "pm_score": 2, "selected": true, "text": "command = func() def sum():\n return 1 + 1\n\nexample1 = sum\nexample2 = sum()\n\n# -> example1 is a function obj...
2022/11/13
[ "https://Stackoverflow.com/questions/74417495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20489277/" ]
74,417,512
<p>I am creating a solution in TypeScript/Javascript with an extension mechanism. The extensions will all be classes extending a provided abstract class and a configuration file will contain the class name and JSON to pass to the constructor. The extensions to be loaded will be defined in a configuration file.</p> <p>H...
[ { "answer_id": 74417561, "author": "pilchard", "author_id": 13762301, "author_profile": "https://Stackoverflow.com/users/13762301", "pm_score": 2, "selected": false, "text": "class Class1 {\n constructor(val) {\n this.val = val;\n }\n}\n\nconst classes = {\n Class1\n}\n\nconst clas...
2022/11/13
[ "https://Stackoverflow.com/questions/74417512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2281159/" ]
74,417,530
<p>After updating to Xcode 14.0 (happens still for 14.0.1, and 14.1) I felt massive slowdown in incremental build times even if changing just a single property. For my project it's 3x, but read about 10x or more.</p>
[ { "answer_id": 74417531, "author": "dziobaczy", "author_id": 5892635, "author_profile": "https://Stackoverflow.com/users/5892635", "pm_score": 3, "selected": true, "text": "SWIFT_USE_INTEGRATED_DRIVER NO" } ]
2022/11/13
[ "https://Stackoverflow.com/questions/74417530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5892635/" ]
74,417,532
<p>I'm trying to host a Node.js/Express server for the first time, and I'm currently attempting to use Digital Ocean's App Platform. I have it up and running, but my routes aren't working correctly. Digital Ocean allows me to set HTTP Request Routes, and I have &quot;/&quot; and &quot;/test&quot; set for two of them. N...
[ { "answer_id": 74417560, "author": "O. Jones", "author_id": 205608, "author_profile": "https://Stackoverflow.com/users/205608", "pm_score": 0, "selected": false, "text": "/ /test /" } ]
2022/11/13
[ "https://Stackoverflow.com/questions/74417532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20489238/" ]
74,417,534
<p>I'm trying to create a row of images and I have a container that uses half the width of the page and each image takes up a quarter of that half like this:</p> <pre class="lang-html prettyprint-override"><code>&lt;div key={index} class=&quot;w-full mt-10 mb-16 md:mt-0 md:absolute md:top-[50%] md:-translate-y-[50%] md...
[ { "answer_id": 74417560, "author": "O. Jones", "author_id": 205608, "author_profile": "https://Stackoverflow.com/users/205608", "pm_score": 0, "selected": false, "text": "/ /test /" } ]
2022/11/13
[ "https://Stackoverflow.com/questions/74417534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19366108/" ]
74,417,544
<p>I'm using activeadmin and in a form associated with a model I would need to add a checkbox that is not tied to any of the model attributes. It should be just a checkbox that won't allow to submit the form until it's checked - I'll also add some Javascript to achieve this.</p> <p>I've checked the documentation of Act...
[ { "answer_id": 74417560, "author": "O. Jones", "author_id": 205608, "author_profile": "https://Stackoverflow.com/users/205608", "pm_score": 0, "selected": false, "text": "/ /test /" } ]
2022/11/13
[ "https://Stackoverflow.com/questions/74417544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1387241/" ]
74,417,582
<p>I want to create a procedure that receives two ids, makes two selects in a table and returns the data, after that I want to perform an update in another table using the result that was returned to me earlier, how to do that?</p> <p>This is an example of how it is at the moment</p> <pre><code>create or replace proced...
[ { "answer_id": 74423606, "author": "kofemann", "author_id": 1356883, "author_profile": "https://Stackoverflow.com/users/1356883", "pm_score": 2, "selected": true, "text": "declare\n id_user_origin int;\nbegin\n select id into id_user_origin from users where id = origin ;\n \n ...
2022/11/13
[ "https://Stackoverflow.com/questions/74417582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17235816/" ]
74,417,590
<p>I have the template code like this:</p> <pre><code>treatment.colors &lt;- unlist(lapply(GSE8823.qc.rma$status, function (x) {if (x == &quot;smoker&quot;) &quot;red&quot; else &quot;navy&quot;})) </code></pre> <p>This code makes the two groups: smoker and non-smoker into different colo...
[ { "answer_id": 74417651, "author": "SpikyClip", "author_id": 16745699, "author_profile": "https://Stackoverflow.com/users/16745699", "pm_score": 2, "selected": false, "text": "dplyr case_when library(dplyr)\n\nstatus = GSE8823.qc.rma$status\n\ntreatment.colors = case_when(\n status ==...
2022/11/13
[ "https://Stackoverflow.com/questions/74417590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16808528/" ]
74,417,619
<p>For instance, whenever my count is equal to 4294967295 + 1 I want that the count restart from 0. Basically I`m trying to simulate a unsigned 32 bits in java that has range [0, 4294967295]. The methods that I'm trying to create is ADD and MULTIPLE.</p> <p>For example, if I have the number 4294967295 and I multiple by...
[ { "answer_id": 74417815, "author": "WJS", "author_id": 1552534, "author_profile": "https://Stackoverflow.com/users/1552534", "pm_score": 2, "selected": false, "text": "4294967295 -1 1 0 int s = -1;\n// prints 4294967295\nSystem.out.println(((long)s)&0xffff_ffffL);\n\n Integer.MAX_VALUE c...
2022/11/13
[ "https://Stackoverflow.com/questions/74417619", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16075374/" ]
74,417,624
<p>I admit the answer to this may be 'some very specific magic', but I'm kind of shocked by what I've observed here. I was wondering if anyone had insight to how these types of optimizations work. I find compiler design to be quite interesting, and I really can't imagine how this works. I'm sure the answer is somewhere...
[ { "answer_id": 74419103, "author": "Nate Eldredge", "author_id": 634919, "author_profile": "https://Stackoverflow.com/users/634919", "pm_score": 4, "selected": false, "text": "sum_squares n-1 n(n-1)(2n-1)/6 orr w9, w9, #0x2 add w9, w9, #0x2 mul w9, w8, w8 w9 w8 w9 w9 | 2 w9 + 2 0x5555555...
2022/11/13
[ "https://Stackoverflow.com/questions/74417624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4897973/" ]
74,417,631
<p>How can I print Cypress base Url in the <code>Git bash CLI console</code> while running the Cypress test ? Could someone please advise ?</p>
[ { "answer_id": 74417767, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 0, "selected": false, "text": "console.log(Cypress.config().baseUrl) cy.config().baseUrl" }, { "answer_id": 74418589, "author": "TesterDick", ...
2022/11/13
[ "https://Stackoverflow.com/questions/74417631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4826215/" ]
74,417,729
<p>Let's say I have the following two classes:</p> <pre><code>class Literal: pass class Expr: pass class MyClass: def __init__(self, Type:OneOf(Literal, Expr)): pass </code></pre> <p>How would I make the type one of the <code>Expr</code> or <code>Literal</code> class? The full example of what I'm ...
[ { "answer_id": 74417751, "author": "Carcigenicate", "author_id": 3000206, "author_profile": "https://Stackoverflow.com/users/3000206", "pm_score": 2, "selected": true, "text": "Union from typing import Union\n\ndef __init__(self, Key: str, Type: Union[Array, Struct, PrimitiveType]):\n\n#...
2022/11/13
[ "https://Stackoverflow.com/questions/74417729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/651174/" ]
74,417,740
<p>Trying to find the respondent in the list g.list with the most words in their response (g.list is a list of respondents with their IDs). However, g.list contains lists within it with the actual response which leads to the lapply(length) giving length 1. I'm struggling to deal with this. I'd ideally like to do this u...
[ { "answer_id": 74418030, "author": "SpikyClip", "author_id": 16745699, "author_profile": "https://Stackoverflow.com/users/16745699", "pm_score": 2, "selected": true, "text": "[[1]] strsplit() length # create data\ng.list = list(\n `1590553444` = \"Nothing\",\n `1590610566` = \"Coul...
2022/11/13
[ "https://Stackoverflow.com/questions/74417740", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8277973/" ]
74,417,757
<p>I had the following error in Nov 13th 2022</p> <pre><code>end = datetime.strptime(&quot;2022-11-16&quot;, &quot;%Y-%d-%m&quot;) Traceback (most recent call last): File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt; File &quot;/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/_strptime.py&...
[ { "answer_id": 74417773, "author": "John Gordon", "author_id": 494134, "author_profile": "https://Stackoverflow.com/users/494134", "pm_score": 0, "selected": false, "text": "datetime.strptime(\"2022-11-16\", \"%Y-%d-%m\")\n" }, { "answer_id": 74417775, "author": "Maxwell D. D...
2022/11/13
[ "https://Stackoverflow.com/questions/74417757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12758069/" ]
74,417,779
<p>Assume that we have a string like:XYYX. I want to get YXXY.How do I do that in python?</p> <p>couldnt think of anything</p>
[ { "answer_id": 74417773, "author": "John Gordon", "author_id": 494134, "author_profile": "https://Stackoverflow.com/users/494134", "pm_score": 0, "selected": false, "text": "datetime.strptime(\"2022-11-16\", \"%Y-%d-%m\")\n" }, { "answer_id": 74417775, "author": "Maxwell D. D...
2022/11/13
[ "https://Stackoverflow.com/questions/74417779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20489565/" ]
74,417,791
<p>Here's what I'm trying to do: When a button is clicked, one paragraph element is replaced by another paragraph element. I'd like it to be seamless, where the one paragraph element just disappears, and the other paragraph element appears in its place.</p> <p>But no matter what I try I can't seem to get the other para...
[ { "answer_id": 74417773, "author": "John Gordon", "author_id": 494134, "author_profile": "https://Stackoverflow.com/users/494134", "pm_score": 0, "selected": false, "text": "datetime.strptime(\"2022-11-16\", \"%Y-%d-%m\")\n" }, { "answer_id": 74417775, "author": "Maxwell D. D...
2022/11/13
[ "https://Stackoverflow.com/questions/74417791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20200247/" ]
74,417,797
<p>I want to create a c program that executes commands in a txt file. I read each value of my txt file and put them in an array and then I want to run them one by one using a fork function. Thank you for your help</p> <p>I hope a charitable help to tell me where the problem is. I enclose a part of my code and my data f...
[ { "answer_id": 74417831, "author": "cyberbisson", "author_id": 7257958, "author_profile": "https://Stackoverflow.com/users/7257958", "pm_score": 1, "selected": false, "text": "execvp man fork execvp wait fork exec int do_fork_exec(void) {\n /* Just something to exec... */\n static ...
2022/11/13
[ "https://Stackoverflow.com/questions/74417797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20489494/" ]
74,417,800
<p>I have a string variable which is a point, such as m=&quot;(2, 5)&quot; or m=&quot;(-6, 7)&quot;. I want to extract the x coordinate and y coordinate and store them in different variables. Could someone provide some code in Python for how I could do this? Thanks!</p>
[ { "answer_id": 74417832, "author": "lckcorsi", "author_id": 20252725, "author_profile": "https://Stackoverflow.com/users/20252725", "pm_score": -1, "selected": false, "text": "def coords(m):\n for i in range(2, len(m) - 2):\n if m[i] == ',':\n return m[1:i],m[(i+1),(len(m)-1)]\n...
2022/11/13
[ "https://Stackoverflow.com/questions/74417800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19386408/" ]
74,417,814
<p>I have the following code where I am trying to group the dataframe 'newdata' by the first column and then find the mean of the column '0_happy'.</p> <p>However, the output is producing me with e numbers, which seem too big/small to be mean values.</p> <p>I would be so grateful if anybody could point out where I may ...
[ { "answer_id": 74417870, "author": "Panda Kim", "author_id": 20430449, "author_profile": "https://Stackoverflow.com/users/20430449", "pm_score": 0, "selected": false, "text": "float format pd.options.display.float_format = '{:.2f}'.format\n" }, { "answer_id": 74417931, "autho...
2022/11/13
[ "https://Stackoverflow.com/questions/74417814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12985497/" ]
74,417,827
<p>I am writing a language dictionary using Flutter with Firestore. I have database named ‘Spanish’ and 2 documents ‘easy’ and ‘difficult’. Each document is a set pairs - a key is original Spanish word and the value is translation of this word.</p> <p>I want to find which keys (original Spanish words) appears in both ‘...
[ { "answer_id": 74417870, "author": "Panda Kim", "author_id": 20430449, "author_profile": "https://Stackoverflow.com/users/20430449", "pm_score": 0, "selected": false, "text": "float format pd.options.display.float_format = '{:.2f}'.format\n" }, { "answer_id": 74417931, "autho...
2022/11/13
[ "https://Stackoverflow.com/questions/74417827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20373986/" ]
74,417,872
<p>Getting some trouble with a function in C that basically creates and allocates a temporary array with help of the length of the name parameter + extension length.</p> <pre><code>int my_func(char *name) { char *extension = &quot;.db&quot;; size_t tmp_size = strlen(name) + strlen(extension); char tmp_name[...
[ { "answer_id": 74417883, "author": "dbush", "author_id": 1687119, "author_profile": "https://Stackoverflow.com/users/1687119", "pm_score": 4, "selected": true, "text": "tmp_name" }, { "answer_id": 74417889, "author": "Maxwell D. Dorliea", "author_id": 12906648, "autho...
2022/11/13
[ "https://Stackoverflow.com/questions/74417872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16891224/" ]