qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,588,468
<p><a href="https://i.stack.imgur.com/gwSbH.png" rel="nofollow noreferrer">Image of code</a></p> <p>With this i am not able to convert a string which cointains symbols like (+ , - , / , *) to double or integer .</p> <p>I am expecting to get the answer as integer and all with all solving inputed in the string.</p> <p>Yo...
[ { "answer_id": 74588711, "author": "Hatem Darwish", "author_id": 13634409, "author_profile": "https://Stackoverflow.com/users/13634409", "pm_score": -1, "selected": false, "text": "implementation 'io.apisense:rhino-android:1.1.1' \n Object result = null;\n\nScriptEngine engine = new Scri...
2022/11/27
[ "https://Stackoverflow.com/questions/74588468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20612557/" ]
74,588,470
<p>I have data like this,</p> <p><a href="https://i.stack.imgur.com/iZY6y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iZY6y.png" alt="enter image description here" /></a></p> <p>and I need output like this</p> <p><a href="https://i.stack.imgur.com/5OaKo.png" rel="nofollow noreferrer"><img src="ht...
[ { "answer_id": 74588711, "author": "Hatem Darwish", "author_id": 13634409, "author_profile": "https://Stackoverflow.com/users/13634409", "pm_score": -1, "selected": false, "text": "implementation 'io.apisense:rhino-android:1.1.1' \n Object result = null;\n\nScriptEngine engine = new Scri...
2022/11/27
[ "https://Stackoverflow.com/questions/74588470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4057692/" ]
74,588,491
<p>I got stuck in my code , I am creating a dynamic form on age and put unobtrusive client-side validation. validation is working but not working row-wise, its working like when I change first-row validation then it removes other rows validation.</p> <p>This is my code:</p> <p><div class="snippet" data-lang="js" data...
[ { "answer_id": 74588711, "author": "Hatem Darwish", "author_id": 13634409, "author_profile": "https://Stackoverflow.com/users/13634409", "pm_score": -1, "selected": false, "text": "implementation 'io.apisense:rhino-android:1.1.1' \n Object result = null;\n\nScriptEngine engine = new Scri...
2022/11/27
[ "https://Stackoverflow.com/questions/74588491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20598752/" ]
74,588,498
<p>I have a string like &quot;Hello world!&quot;.</p> <p>At the finish I want to see like this: H e l l o    w o r l d !</p> <p>And <strong>ref</strong> element for every letter 1 2 3 4 5    6 7 8 9 10 11</p> <pre><code> {&quot;Hello world!&quot;.split(&quot; &quot;).map((word, index) =&gt; { return ( ...
[ { "answer_id": 74588539, "author": "Sachila Ranawaka", "author_id": 6428638, "author_profile": "https://Stackoverflow.com/users/6428638", "pm_score": 2, "selected": true, "text": "itemsRef.current[index * word.length + i] = el;" }, { "answer_id": 74588558, "author": "Alex Sht...
2022/11/27
[ "https://Stackoverflow.com/questions/74588498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3178479/" ]
74,588,501
<p>There is a rather typical task of sorting two arrays simultaneously, assuming that same indexed elements of the arrays form virtual pairs, which are sorted. Such questions appear at least 10 years ago: <a href="https://stackoverflow.com/questions/9343846/boost-zip-iterator-and-stdsort">boost zip_iterator and std::so...
[ { "answer_id": 74588733, "author": "Ted Lyngmo", "author_id": 7582247, "author_profile": "https://Stackoverflow.com/users/7582247", "pm_score": 4, "selected": true, "text": "std::ranges::sort(std::views::zip(x, y), [](auto&& a, auto&& b) {\n return std::tie(std::get<0>(a), std::get<1>...
2022/11/27
[ "https://Stackoverflow.com/questions/74588501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7325599/" ]
74,588,520
<p>So i have written this code where i want the computer to open a file and write in it what the user have answered to the question i asked him but when ever i open the txt file its empty.</p> <pre><code>import os Welcome = input(&quot;Hi my name is Steve. Do you have an account at Steve? ANSWER WITH JUST A YES OR NO...
[ { "answer_id": 74588554, "author": "GaryMBloom", "author_id": 3159059, "author_profile": "https://Stackoverflow.com/users/3159059", "pm_score": 0, "selected": false, "text": "register() return f\"{name} {last_name}\"\n register() if Welcome == \"no\" or \"No\": if Welcome.lower() == \"no...
2022/11/27
[ "https://Stackoverflow.com/questions/74588520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17560156/" ]
74,588,534
<p>I want to push my data (in <code>key:value</code> pair) into my Realtime Database. This is my code:</p> <pre><code>DatabaseReference pay_details = database.getReference(&quot;pay/0/0/&quot;); pay_details.push( { &quot;Actual amount&quot;:arr.get(i).get(9), &quot;Current reading&quot;:arr.get...
[ { "answer_id": 74588554, "author": "GaryMBloom", "author_id": 3159059, "author_profile": "https://Stackoverflow.com/users/3159059", "pm_score": 0, "selected": false, "text": "register() return f\"{name} {last_name}\"\n register() if Welcome == \"no\" or \"No\": if Welcome.lower() == \"no...
2022/11/27
[ "https://Stackoverflow.com/questions/74588534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
74,588,544
<p>I want to make my character jump by drawing lines.</p> <p>But while my code is going towards the x-axis direction in 2D, when I switch to 3D, it always turns upwards regardless of the direction of the line. There is no change in the X-axis. My code is as follows:</p> <pre class="lang-cs prettyprint-override"><code>i...
[ { "answer_id": 74588554, "author": "GaryMBloom", "author_id": 3159059, "author_profile": "https://Stackoverflow.com/users/3159059", "pm_score": 0, "selected": false, "text": "register() return f\"{name} {last_name}\"\n register() if Welcome == \"no\" or \"No\": if Welcome.lower() == \"no...
2022/11/27
[ "https://Stackoverflow.com/questions/74588544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20198876/" ]
74,588,595
<p>So I have the following table:</p> <pre><code>Name Value A 10 ABC 5 A 8 ABC 3 AB 2 </code></pre> <p>And I want this result:</p> <pre><code>Name Value A 28 AB 10 ABC 8 </code></pre> <p>So I don't want to group by exact match with Name,...
[ { "answer_id": 74589011, "author": "SQLpro", "author_id": 12659872, "author_profile": "https://Stackoverflow.com/users/12659872", "pm_score": -1, "selected": false, "text": "SELECT LEFT(\"Name\", \"value\") AS STRING, SUM(\"Value\") AS TOTAL\nFROM SoIHaveTheFollowingTable\n CROSS...
2022/11/27
[ "https://Stackoverflow.com/questions/74588595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11651728/" ]
74,588,605
<p>I have eight screens. The first 7 screen has data to be sent to the last screen how do I go arouund this??</p> <p>I tried passinng it through from one parent to another but that is too much work</p>
[ { "answer_id": 74588750, "author": "Amirali_Eric_J", "author_id": 8388842, "author_profile": "https://Stackoverflow.com/users/8388842", "pm_score": 2, "selected": false, "text": "provider class ExpampleClass extends ChangeNotifier {\n\nString? _yourData;\n\nvoid setYourData(String? newDa...
2022/11/27
[ "https://Stackoverflow.com/questions/74588605", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13866959/" ]
74,588,632
<p>I started writing web security in my application without WebSecurityConfigurerAdapter, I have used springboot3 internally which uses spring 6 with this set up I am getting errors like Cannot resolve method 'antMatchers' in 'ExpressionInterceptUrlRegistry' from the below code</p> <pre><code>.authorizeRequests() ...
[ { "answer_id": 74610835, "author": "Andreas Roither", "author_id": 20631046, "author_profile": "https://Stackoverflow.com/users/20631046", "pm_score": 0, "selected": false, "text": ".antMatchers AuthorizationManagerRequestMatcherRegistry .requestMatchers(\"/register\") http.authorizeHttp...
2022/11/27
[ "https://Stackoverflow.com/questions/74588632", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16354724/" ]
74,588,655
<p>I am haviing issue in including file in php</p> <pre><code>`&lt;?php include &quot;../../db/db_connection.php&quot;;` </code></pre> <p>Error</p> <pre><code>Warning: include(../../db/db_connection.php): Failed to open stream: No such file or directory in /var/www/html/practice/Blogs/actions/accounts/general.php on l...
[ { "answer_id": 74610835, "author": "Andreas Roither", "author_id": 20631046, "author_profile": "https://Stackoverflow.com/users/20631046", "pm_score": 0, "selected": false, "text": ".antMatchers AuthorizationManagerRequestMatcherRegistry .requestMatchers(\"/register\") http.authorizeHttp...
2022/11/27
[ "https://Stackoverflow.com/questions/74588655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18799908/" ]
74,588,657
<p>Getting error in title whilst trying to make a table in Lua, as such:</p> <pre><code>MyTable = {} table.insert(MyTable, function MyFunction() end) </code></pre> <p>Any ideas on what is going on?</p> <p>Thanks, MakePrint0</p>
[ { "answer_id": 74610835, "author": "Andreas Roither", "author_id": 20631046, "author_profile": "https://Stackoverflow.com/users/20631046", "pm_score": 0, "selected": false, "text": ".antMatchers AuthorizationManagerRequestMatcherRegistry .requestMatchers(\"/register\") http.authorizeHttp...
2022/11/27
[ "https://Stackoverflow.com/questions/74588657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20612818/" ]
74,588,659
<p>I want to only get complete words from acronyms with ( ) around them.</p> <p>For example, there is a sentence 'Lung cancer screening (LCS) reduces NSCLC mortality'; -&gt;I want to get 'Lung cancer screening' as a result.</p> <p>How can I do it with regex?</p> <hr /> <p>original question: I want to remove repeated up...
[ { "answer_id": 74610835, "author": "Andreas Roither", "author_id": 20631046, "author_profile": "https://Stackoverflow.com/users/20631046", "pm_score": 0, "selected": false, "text": ".antMatchers AuthorizationManagerRequestMatcherRegistry .requestMatchers(\"/register\") http.authorizeHttp...
2022/11/27
[ "https://Stackoverflow.com/questions/74588659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19152563/" ]
74,588,661
<p>I want to have a function that grabs something from an object; one of the function arguments is used as a key for that object. It seems like when an object has a dynamic property, keyof will not limit what a key is based on that property, but accepts all strings.</p> <p>For example (a very simple one), this makes a...
[ { "answer_id": 74588757, "author": "line88", "author_id": 1816407, "author_profile": "https://Stackoverflow.com/users/1816407", "pm_score": 0, "selected": false, "text": " function makeObjectExtractor(\n ) {\n const toExtractFrom = {\n // keyA is no longer dynamic; keyo...
2022/11/27
[ "https://Stackoverflow.com/questions/74588661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/773210/" ]
74,588,674
<p>This problem that I'm facing is common for me and I want to learn for about best practices.</p> <p>My problem is:</p> <p>I have to wait a text which has an attribute of &quot;.title&quot; class and the text involves the statement of: &quot;Hello&quot;. Before triggering this element to come to surface, we have an el...
[ { "answer_id": 74594074, "author": "Chloe", "author_id": 20617867, "author_profile": "https://Stackoverflow.com/users/20617867", "pm_score": 3, "selected": true, "text": ".title .contains() cy.contains('.title', 'Hello').should('be.visible')\n" } ]
2022/11/27
[ "https://Stackoverflow.com/questions/74588674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14560201/" ]
74,588,678
<p>I am a newbie programmer, so there are some problems. The program displays only 3 positive elements in a one-dimensional array, although there may be many more in a two-dimensional array.</p> <p>here is my code</p> <pre><code>using System; namespace task_2 { class arrays { public int[,] A = new int[...
[ { "answer_id": 74589729, "author": "hossein sabziani", "author_id": 4301195, "author_profile": "https://Stackoverflow.com/users/4301195", "pm_score": 2, "selected": true, "text": "zero to be displayed instead of negative //B[i] = A[i, j];\n B[i*3+j] = A[i, j];\n negative n...
2022/11/27
[ "https://Stackoverflow.com/questions/74588678", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20575717/" ]
74,588,720
<p>When I was learning C# generics, some articles mentioned using generics is type-safe during execution by preventing the usage of data whose type is different from the one used in the declaration. <a href="https://www.techopedia.com/definition/25616/generics-c-sharp" rel="nofollow noreferrer">Link</a> I dont get why ...
[ { "answer_id": 74588838, "author": "Link", "author_id": 1892523, "author_profile": "https://Stackoverflow.com/users/1892523", "pm_score": 1, "selected": false, "text": "void DoSomething<T>(T foo) where T : FooBase { }\n var myBar = new Bar(); // Does not inherit from FooBase\nDoSomething...
2022/11/27
[ "https://Stackoverflow.com/questions/74588720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15891918/" ]
74,588,746
<p>I'm relatively new to bash and I have tried multiples solutions that I could find here but none of them seem to be working in my case. It's pretty simple, I have a folder that looks like this:</p> <pre><code>- images/ - 0_image_1.jpg - 0_image_2.jpg - 0_image_3.jpg - 1_image_1.jpg - 1_image_2.jpg -...
[ { "answer_id": 74589030, "author": "oguz ismail", "author_id": 10248678, "author_profile": "https://Stackoverflow.com/users/10248678", "pm_score": 2, "selected": false, "text": "for src in *_*.jpg; do\n dest=images_${src%%_*}/\n echo mkdir -p \"$dest\"\n echo mv -- \"$src\" \"$dest\"\...
2022/11/27
[ "https://Stackoverflow.com/questions/74588746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6624157/" ]
74,588,784
<p>I have two python programs which one of them connects to a bluetooth device(socket package), it receives and saves data from device, and another one read the stored data and draw a real time plot. I should make one application from these two programs.</p> <p>I tried to mix these two python programs, but since blueto...
[ { "answer_id": 74589030, "author": "oguz ismail", "author_id": 10248678, "author_profile": "https://Stackoverflow.com/users/10248678", "pm_score": 2, "selected": false, "text": "for src in *_*.jpg; do\n dest=images_${src%%_*}/\n echo mkdir -p \"$dest\"\n echo mv -- \"$src\" \"$dest\"\...
2022/11/27
[ "https://Stackoverflow.com/questions/74588784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4806877/" ]
74,588,792
<p>My problem is to count words having alphabet 'a' at second position in a string Eg : banana in a bag o/p banana bag</p> <pre><code>for i in re: if i[1]== 'a': print(i) </code></pre> <p>It was showing index out of range error due to word &quot;a&quot; in a sentence I want output without error can anyone s...
[ { "answer_id": 74589030, "author": "oguz ismail", "author_id": 10248678, "author_profile": "https://Stackoverflow.com/users/10248678", "pm_score": 2, "selected": false, "text": "for src in *_*.jpg; do\n dest=images_${src%%_*}/\n echo mkdir -p \"$dest\"\n echo mv -- \"$src\" \"$dest\"\...
2022/11/27
[ "https://Stackoverflow.com/questions/74588792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20612927/" ]
74,588,837
<p>I have a method (shown below) which works fine. The purpose of this method is to confirm if a specific item is available in a shop, with a return value of true or false.</p> <p>I have a second method, which returns a description, but I can't see to work out how to get this method to pull through the first method res...
[ { "answer_id": 74588866, "author": "M_S", "author_id": 19915660, "author_profile": "https://Stackoverflow.com/users/19915660", "pm_score": 1, "selected": false, "text": "public String isFree(){\n return sweet.isEmpty() ? \"True\" : \"False\";\n}`\n\npublic void information(){\n System.o...
2022/11/27
[ "https://Stackoverflow.com/questions/74588837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17273353/" ]
74,588,871
<p>`</p> <pre><code>gcc *.c In file included from get_next_line.h:16, from get_next_line.c:13: /usr/local/Cellar/gcc/12.2.0/lib/gcc/current/gcc/x86_64-apple-darwin20/12/include-fixed/stdio.h:78:10: fatal error: _stdio.h: No such file or directory 78 | #include &lt;_stdio.h&gt; | ^~~~~...
[ { "answer_id": 74595483, "author": "abu_bua", "author_id": 9008235, "author_profile": "https://Stackoverflow.com/users/9008235", "pm_score": 0, "selected": false, "text": "#include <stdio.h>\n _stdio.h #ifndef _STDIO_H_\n #error error \"Never use <secure/_stdio.h> directly; include <stdi...
2022/11/27
[ "https://Stackoverflow.com/questions/74588871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20323391/" ]
74,588,877
<p>I have a variable in the component:</p> <p><code>showModal: boolean</code></p> <p>And this in the template:</p> <pre><code>&lt;div (mouseover)=&quot;handleHover('hover')&quot;&gt; </code></pre> <p><code>handleHover()</code> changes the value of <code>showModal</code>.</p> <p>Should I use a <code>handleHover()</code>...
[ { "answer_id": 74588948, "author": "Selaka Nanayakkara", "author_id": 4672460, "author_profile": "https://Stackoverflow.com/users/4672460", "pm_score": 2, "selected": false, "text": "template-driven-forms handleHover() (mouseover)" }, { "answer_id": 74588982, "author": "nate-...
2022/11/27
[ "https://Stackoverflow.com/questions/74588877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14315323/" ]
74,588,893
<p>`I'm trying to write code that starts with a question asking the user if they want to encode or decode to/from morse. Based on their response (1 or 2), it runs through an if statement, and will call the required function(s).</p> <p>It will take a user's input via user_input() and either return it in morse code, or r...
[ { "answer_id": 74588948, "author": "Selaka Nanayakkara", "author_id": 4672460, "author_profile": "https://Stackoverflow.com/users/4672460", "pm_score": 2, "selected": false, "text": "template-driven-forms handleHover() (mouseover)" }, { "answer_id": 74588982, "author": "nate-...
2022/11/27
[ "https://Stackoverflow.com/questions/74588893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20612961/" ]
74,588,927
<p>I'm trying to create a python script that prints a different statement on every day of December leading up to Christmas.</p> <p>Below is what I've tried so far as a test but it doesn't work :/</p> <pre><code>from datetime import date today = date.today() nov_27 = 2022-11-27 nov_28 = 2022-11-28 if today == nov_27:...
[ { "answer_id": 74588948, "author": "Selaka Nanayakkara", "author_id": 4672460, "author_profile": "https://Stackoverflow.com/users/4672460", "pm_score": 2, "selected": false, "text": "template-driven-forms handleHover() (mouseover)" }, { "answer_id": 74588982, "author": "nate-...
2022/11/27
[ "https://Stackoverflow.com/questions/74588927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613120/" ]
74,588,932
<p>I was using ffmpeg to convert Line sticker from apng file to webm file. And the result is weird, some of them was converted successed and some of them failed. not sure what happend with these failed convert.</p> <p>Here is my c# code to convert Line sticker to webm, and I use CliWrap to run ffmpeg command line.</p> ...
[ { "answer_id": 74612794, "author": "Rotem", "author_id": 4926757, "author_profile": "https://Stackoverflow.com/users/4926757", "pm_score": 2, "selected": true, "text": "apng_pipe type 397189868@2x.png | ffmpeg.exe -i pipe: -pix_fmt yuva420p -c:v libvpx-vp9 -y test.webm os.mkfifo apng_pip...
2022/11/27
[ "https://Stackoverflow.com/questions/74588932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5511771/" ]
74,588,940
<p>I'm on Postgres 13 and have a table like this</p> <pre><code>| key | from | to ------------------------------------------- | A | 2022-11-27T08:00 | 2022-11-27T09:00 | B | 2022-11-27T09:00 | 2022-11-27T10:00 | C | 2022-11-27T08:30 | 2022-11-27T10:30 </code></pre> <p>I want to calculate the duration...
[ { "answer_id": 74589293, "author": "Luuk", "author_id": 724039, "author_profile": "https://Stackoverflow.com/users/724039", "pm_score": 3, "selected": true, "text": "select \n key,\n fromDT,\n toDT,\n (toDT-fromDT)::interval -\n COALESCE((SELECT SUM(LEAST(te2.toDT,te1.toDT)-GRE...
2022/11/27
[ "https://Stackoverflow.com/questions/74588940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/228370/" ]
74,588,945
<p>i have an action inside of users and i want that action to return the user to another action in another controller but not in the router parameter, Here is a sample</p> <pre><code> public IActionResult LoginCheck(UserForm user) { AuthUser auth = new AuthUser(_context); var result = aut...
[ { "answer_id": 74589293, "author": "Luuk", "author_id": 724039, "author_profile": "https://Stackoverflow.com/users/724039", "pm_score": 3, "selected": true, "text": "select \n key,\n fromDT,\n toDT,\n (toDT-fromDT)::interval -\n COALESCE((SELECT SUM(LEAST(te2.toDT,te1.toDT)-GRE...
2022/11/27
[ "https://Stackoverflow.com/questions/74588945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613156/" ]
74,588,958
<p>Im working on a big project and I have a lot of errno macros.<br /> I want to write a helper functions for the logger that stringify each of these errno to a string. i decided to use x-macros but Im getting compilation errors</p> <p>in the first place the code was like this:</p> <pre><code>// project_errno.h #define...
[ { "answer_id": 74589293, "author": "Luuk", "author_id": 724039, "author_profile": "https://Stackoverflow.com/users/724039", "pm_score": 3, "selected": true, "text": "select \n key,\n fromDT,\n toDT,\n (toDT-fromDT)::interval -\n COALESCE((SELECT SUM(LEAST(te2.toDT,te1.toDT)-GRE...
2022/11/27
[ "https://Stackoverflow.com/questions/74588958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20612285/" ]
74,588,972
<p>I have a function on my views.py file that connects to a mail server and then appends to my Django model the email addresses of the recipients. The script works good.</p> <p>In Django, I'm displaying the model with a table, and I'd like to include a button that says Get Emails and runs this function and it then relo...
[ { "answer_id": 74589007, "author": "Sunderam Dubey", "author_id": 17562044, "author_profile": "https://Stackoverflow.com/users/17562044", "pm_score": 0, "selected": false, "text": "{% url 'getemails' %} <button type=\"submit\" onclick=\"location.href='{% url 'getemails' %}'\" class=\"b...
2022/11/27
[ "https://Stackoverflow.com/questions/74588972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13887772/" ]
74,588,983
<p>I typed this program from Boris Allen's book C programming: principles &amp; practice on pg18 using Dev-C++ 5.11, its supposed to produce the following output text:</p> <pre><code>Size of whoCount is 2 Size of newCount is 2 Size of Printf() is 2 </code></pre> <p>I don't know how to fix this error.</p> <pre><code>err...
[ { "answer_id": 74589027, "author": "0___________", "author_id": 6110094, "author_profile": "https://Stackoverflow.com/users/6110094", "pm_score": 2, "selected": false, "text": "printf() sizeof(&printf) sizeof(printf(\"hello\")) sizeof(printf) size_t main main int int main(void)\n{\n i...
2022/11/27
[ "https://Stackoverflow.com/questions/74588983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20612556/" ]
74,588,985
<p>We are looking for a user in the database by <code>'_id'</code></p> <pre class="lang-json prettyprint-override"><code> &quot;_id&quot;: &quot;6381e7c6bf8892cf05c7c798&quot;, &quot;username&quot;: &quot;Teacher&quot;, &quot;email&quot;: &quot;teacher@gmail.com&quot;, &quot;role&quot;: &quot;teacher&quot...
[ { "answer_id": 74598761, "author": "kumol", "author_id": 13299299, "author_profile": "https://Stackoverflow.com/users/13299299", "pm_score": 1, "selected": false, "text": "_id courseId $ User.update({\n _id: userId,\n \"myCourses.course\": courseId\n},\n{\n $set: {\n \"myCourses.$....
2022/11/27
[ "https://Stackoverflow.com/questions/74588985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613106/" ]
74,589,008
<p>Say I have two tables:</p> <p>tb1:</p> <pre><code>id name date 1 John 01/01/2012 1 John 01/02/2012 2 James 02/02/2020 </code></pre> <p>tb2:</p> <pre><code>id name date 1 John 01/01/2013 1 John 01/01/2012 </code></pre> <p>The uniqueness of both <code>tb1</code> and <code>tb2</code> comes from the combination of <code...
[ { "answer_id": 74589071, "author": "SQLpro", "author_id": 12659872, "author_profile": "https://Stackoverflow.com/users/12659872", "pm_score": 0, "selected": false, "text": "INSERT INTO tb1 (id,name,date) \nSELECT * \nFROM tb2 \nWHERE NOT EXISTS(SELECT * \n FROM tb1 ...
2022/11/27
[ "https://Stackoverflow.com/questions/74589008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8176763/" ]
74,589,026
<p>Require to write a Python function to perform the subtraction operation on multiple numbers (left to right direction) given as arguments.</p> <p>User should be able to give a variable number of arguments to that function.</p> <p>For eg, subt(a, b, c…) must return the value of a-b-c-… where a, b, c are the numbers gi...
[ { "answer_id": 74589173, "author": "Cpt.Hook", "author_id": 20599896, "author_profile": "https://Stackoverflow.com/users/20599896", "pm_score": 0, "selected": false, "text": "*args def subt(*num):\n diff = num[0]\n for i in range(1,len(num)):\n diff = diff - num[i]\n retu...
2022/11/27
[ "https://Stackoverflow.com/questions/74589026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20549546/" ]
74,589,043
<p>I just compiled <strong>Ruby</strong> from source and it is located into <code>/usr/local/ruby</code></p> <p>In order to access Ruby's executables I edited <code>~/.zshenv</code> adding <code>/usr/local/ruby/bin</code> to the <code>export PATH</code> directive:</p> <pre><code>export PATH=/usr/local/ruby/bin:/usr/loc...
[ { "answer_id": 74589173, "author": "Cpt.Hook", "author_id": 20599896, "author_profile": "https://Stackoverflow.com/users/20599896", "pm_score": 0, "selected": false, "text": "*args def subt(*num):\n diff = num[0]\n for i in range(1,len(num)):\n diff = diff - num[i]\n retu...
2022/11/27
[ "https://Stackoverflow.com/questions/74589043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1579327/" ]
74,589,046
<p>Recently I've been trying to do some webscraping, however I am utterly unable to run Selenium's webdriver.</p> <p>I am trying to run this basic boilerplate code:</p> <pre><code>import pandas as pd import requests from bs4 import BeautifulSoup from selenium import webdriver import time web = webdriver.Chrome(service...
[ { "answer_id": 74589173, "author": "Cpt.Hook", "author_id": 20599896, "author_profile": "https://Stackoverflow.com/users/20599896", "pm_score": 0, "selected": false, "text": "*args def subt(*num):\n diff = num[0]\n for i in range(1,len(num)):\n diff = diff - num[i]\n retu...
2022/11/27
[ "https://Stackoverflow.com/questions/74589046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18530228/" ]
74,589,091
<p>I am meeting a rails problem.</p> <p>I created a rails folder by this command</p> <pre><code>rails new airbnb-clone -T -d postgresql --css tailwindcss </code></pre> <p>And it gave me these problems</p> <p>1st</p> <pre><code>rails turbo:install stimulus:install rails aborted! </code></pre> <p>Second</p> <pre><code>r...
[ { "answer_id": 74589626, "author": "spickermann", "author_id": 2483313, "author_profile": "https://Stackoverflow.com/users/2483313", "pm_score": 1, "selected": false, "text": "tailwind tailwindcss rails new airbnb-clone -T -d postgresql --css tailwind\n" }, { "answer_id": 7459596...
2022/11/27
[ "https://Stackoverflow.com/questions/74589091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15347191/" ]
74,589,095
<p>I use</p> <pre><code>git remote set-url origin https://ooker777@github.com/QuaCau-TheSphere/LandofSpheres.git </code></pre> <p>But why can't I push?</p> <pre><code>git push remote: Permission to QuaCau-TheSphere/LandofSpheres.git denied to ooker777. fatal: unable to access 'https://github.com/QuaCau-TheSphere/Landof...
[ { "answer_id": 74593188, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 3, "selected": true, "text": "git config --global credential.helper\n manager-core printf \"host=github.com\\nprotocol=https\\nusername=ooker777\" | git cre...
2022/11/27
[ "https://Stackoverflow.com/questions/74589095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3416774/" ]
74,589,124
<p><a href="https://i.stack.imgur.com/qVwsI.png" rel="nofollow noreferrer">Dataset image</a></p> <p>Please help, I have a dataset in which I have columns Country, Gas and Year from 2019 to 1991. Also attaching the snapshot of the dataset. I want to answer a question that I want to add all the values of a country column...
[ { "answer_id": 74593188, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 3, "selected": true, "text": "git config --global credential.helper\n manager-core printf \"host=github.com\\nprotocol=https\\nusername=ooker777\" | git cre...
2022/11/27
[ "https://Stackoverflow.com/questions/74589124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19402713/" ]
74,589,150
<p>I'm writing a method to realize bubble sort with recursion, and my base case is &quot;the length of array&quot;, in that case, I have to recursively call the function from &quot;0&quot; to <code>array.length-1</code>, however, as I went through the codes from other people, I found them all using the base case &quot;...
[ { "answer_id": 74593188, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 3, "selected": true, "text": "git config --global credential.helper\n manager-core printf \"host=github.com\\nprotocol=https\\nusername=ooker777\" | git cre...
2022/11/27
[ "https://Stackoverflow.com/questions/74589150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20591456/" ]
74,589,171
<p>I have the following type of strings: &quot;CanadaUnited States&quot;, &quot;GermanyEnglandSpain&quot;</p> <p>I want to split them into the countries' names, i.e.:</p> <p>['Canada', 'United States'] ['Germany', 'England', 'Spain']</p> <p>I have tried using the following regex:</p> <pre><code>text = &quot;GermanyEngl...
[ { "answer_id": 74589196, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 3, "selected": true, "text": "re.findall inp = \"CanadaUnited States\"\ncountries = re.findall(r'[A-Z][a-z]+(?: [A-Z][a-z]+)*', inp)\nprint...
2022/11/27
[ "https://Stackoverflow.com/questions/74589171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14702047/" ]
74,589,198
<p>I am trying to make a loop for a string that contains 16 numbers, idea is to multiply *2 all the pair digits, but while doing that, I get an error of a string. I tried several ways but not succeeding.</p> <pre><code>cardNumber = input(&quot;Enter a 16-digit card number:&quot;) cardNumber = int(cardNumber.replace(&qu...
[ { "answer_id": 74589196, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 3, "selected": true, "text": "re.findall inp = \"CanadaUnited States\"\ncountries = re.findall(r'[A-Z][a-z]+(?: [A-Z][a-z]+)*', inp)\nprint...
2022/11/27
[ "https://Stackoverflow.com/questions/74589198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14918931/" ]
74,589,200
<p>Can anyone point me in the right direction please? My C and Python skills are limited, but I have set up a R-pi3b to run a python program at boot and it is fine. I have also added a script to shut it down easily using GPIO3.</p> <p>My problem is that once running, the keyboard is ineffective and I cannot get out of...
[ { "answer_id": 74589196, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 3, "selected": true, "text": "re.findall inp = \"CanadaUnited States\"\ncountries = re.findall(r'[A-Z][a-z]+(?: [A-Z][a-z]+)*', inp)\nprint...
2022/11/27
[ "https://Stackoverflow.com/questions/74589200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613319/" ]
74,589,261
<p>I want to extract data from a tag to simply retrieve the text. Unfortunately I can't extract just the text, I always have links in this one.</p> <p>Is it possible to remove all of the <code>&lt;img&gt;</code> and <code>&lt;a href&gt;</code> tags from my text?</p> <pre><code>&lt;div class=&quot;xxx&quot; data-handler...
[ { "answer_id": 74589334, "author": "HedgeHog", "author_id": 14460824, "author_profile": "https://Stackoverflow.com/users/14460824", "pm_score": 0, "selected": false, "text": "<a> previous_siblings NavigableString ' '.join(\n [s for s in soup.select_one('.xxx a').previous_siblings if i...
2022/11/27
[ "https://Stackoverflow.com/questions/74589261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613500/" ]
74,589,299
<p>I need to write a Python program in which the user enters two numbers and receives the LCM and HCF of those numbers. I tried it, and my LCM was correct, but my HCF was not, so could anyone assist me in locating the HCF? Thank you!</p> <pre><code>num1 = int(input('Enter your first number: ')) num2 = int(input('Enter ...
[ { "answer_id": 74589352, "author": "evanstjabadi", "author_id": 13271830, "author_profile": "https://Stackoverflow.com/users/13271830", "pm_score": 1, "selected": false, "text": "num1 = 36\nnum2 = 60\nhcf = 1\n\nfor i in range(1, min(num1, num2)):\n if num1 % i == 0 and num2 % i == 0:...
2022/11/27
[ "https://Stackoverflow.com/questions/74589299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20237989/" ]
74,589,331
<p><a href="https://i.stack.imgur.com/x2YQn.png" rel="nofollow noreferrer">I tried everything I could but somehow it still doesnt work can anyone help?</a></p>
[ { "answer_id": 74589352, "author": "evanstjabadi", "author_id": 13271830, "author_profile": "https://Stackoverflow.com/users/13271830", "pm_score": 1, "selected": false, "text": "num1 = 36\nnum2 = 60\nhcf = 1\n\nfor i in range(1, min(num1, num2)):\n if num1 % i == 0 and num2 % i == 0:...
2022/11/27
[ "https://Stackoverflow.com/questions/74589331", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19337513/" ]
74,589,346
<p>If I have a list of variables and each variable is assigned to an equation, how can I print the variable itself from the list not the result of the equation</p> <p>For example:</p> <pre><code>x = 1 + 1 y = 2 + 2 z = 3 + 3 list = [x, y, z] print(list[0]) print(list[1]) print(list[2]) </code></pre> <p>Should print o...
[ { "answer_id": 74589407, "author": "Emilia Zero", "author_id": 20434184, "author_profile": "https://Stackoverflow.com/users/20434184", "pm_score": 1, "selected": false, "text": "x = 1 + 1\ny = 2 + 2\nz = 3 + 3\n x = \"x\"\ny = \"y\"\nz = \"z\"\n" }, { "answer_id": 74589539, "...
2022/11/27
[ "https://Stackoverflow.com/questions/74589346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613506/" ]
74,589,392
<p>I am just learning python and making a calculator and the tutorial says float instead of int. what is a floating number</p> <p>Why not just use int</p>
[ { "answer_id": 74589407, "author": "Emilia Zero", "author_id": 20434184, "author_profile": "https://Stackoverflow.com/users/20434184", "pm_score": 1, "selected": false, "text": "x = 1 + 1\ny = 2 + 2\nz = 3 + 3\n x = \"x\"\ny = \"y\"\nz = \"z\"\n" }, { "answer_id": 74589539, "...
2022/11/27
[ "https://Stackoverflow.com/questions/74589392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613677/" ]
74,589,398
<p>I'm trying to implement a login form in a Spring boot application. It has an email and a password field. The email field failed to get user input, here is the form:</p> <pre><code> &lt;form th:action=&quot;@{/login}&quot; method=&quot;get&quot; th:object=&quot;${loginForm}&quot; style=&quot;max-width: 600px; margin...
[ { "answer_id": 74589407, "author": "Emilia Zero", "author_id": 20434184, "author_profile": "https://Stackoverflow.com/users/20434184", "pm_score": 1, "selected": false, "text": "x = 1 + 1\ny = 2 + 2\nz = 3 + 3\n x = \"x\"\ny = \"y\"\nz = \"z\"\n" }, { "answer_id": 74589539, "...
2022/11/27
[ "https://Stackoverflow.com/questions/74589398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8720421/" ]
74,589,431
<p>Need help:</p> <p>I have a number (let's say 550) and need to create a perfect distributed SEQUENCE of length N where SUM of numbers will give this number (550).</p> <p>Something like: 10, 20, 30, 40, 50, 60, 70, 80, 90, 100</p> <p>The only input I have is the length of sequence and the final sum of it's numbers.</p...
[ { "answer_id": 74590217, "author": "player0", "author_id": 5632629, "author_profile": "https://Stackoverflow.com/users/5632629", "pm_score": 0, "selected": false, "text": "x y =INDEX(SEQUENCE(B1, 1)*A1/B1)\n =INDEX(SEQUENCE(B1, 1, 0)*A1/(B1-1))\n" }, { "answer_id": 74591824, ...
2022/11/27
[ "https://Stackoverflow.com/questions/74589431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613659/" ]
74,589,437
<p>I have a table with the columns as below -</p> <p><a href="https://i.stack.imgur.com/nHv9f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nHv9f.png" alt="enter image description here" /></a></p> <p>There are rows showing the allocation of various people under various project. The months (columns)...
[ { "answer_id": 74590217, "author": "player0", "author_id": 5632629, "author_profile": "https://Stackoverflow.com/users/5632629", "pm_score": 0, "selected": false, "text": "x y =INDEX(SEQUENCE(B1, 1)*A1/B1)\n =INDEX(SEQUENCE(B1, 1, 0)*A1/(B1-1))\n" }, { "answer_id": 74591824, ...
2022/11/27
[ "https://Stackoverflow.com/questions/74589437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10599073/" ]
74,589,441
<p>I'm trying to pull data from tables in a Word document to Excel. I'm able to pull it as text but I don't know how to pull the numbers as numbers.</p> <pre><code>Sub extractData() Dim wd As New Word.Application Dim doc As Word.Document Dim sh As Worksheet wd.Visible = True Set doc = wd.Document...
[ { "answer_id": 74590217, "author": "player0", "author_id": 5632629, "author_profile": "https://Stackoverflow.com/users/5632629", "pm_score": 0, "selected": false, "text": "x y =INDEX(SEQUENCE(B1, 1)*A1/B1)\n =INDEX(SEQUENCE(B1, 1, 0)*A1/(B1-1))\n" }, { "answer_id": 74591824, ...
2022/11/27
[ "https://Stackoverflow.com/questions/74589441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10007174/" ]
74,589,500
<p>I have a problem regarding of mini program that will return me the exit status of my child process in case of error occuring during execve.</p> <pre><code>#include &lt;unistd.h&gt; #include &lt;stdio.h&gt; #include &lt;sys/types.h&gt; #include &lt;sys/wait.h&gt; #include &lt;stdlib.h&gt; int main () { char *...
[ { "answer_id": 74590217, "author": "player0", "author_id": 5632629, "author_profile": "https://Stackoverflow.com/users/5632629", "pm_score": 0, "selected": false, "text": "x y =INDEX(SEQUENCE(B1, 1)*A1/B1)\n =INDEX(SEQUENCE(B1, 1, 0)*A1/(B1-1))\n" }, { "answer_id": 74591824, ...
2022/11/27
[ "https://Stackoverflow.com/questions/74589500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16715270/" ]
74,589,512
<p>Here is the code:</p> <pre><code>list_a = [3,2,5,7,4,1] def insertion_sort(list_a): indexing_length = range(1,len(list_a)) for i in indexing_length: value_to_sort = list_a[i] while list_a[i-1] &gt; value_to_sort and i&gt;0: list_a[i], list_a[i-1] = list_a[i-1], list_a[i] i = i - 1 r...
[ { "answer_id": 74590217, "author": "player0", "author_id": 5632629, "author_profile": "https://Stackoverflow.com/users/5632629", "pm_score": 0, "selected": false, "text": "x y =INDEX(SEQUENCE(B1, 1)*A1/B1)\n =INDEX(SEQUENCE(B1, 1, 0)*A1/(B1-1))\n" }, { "answer_id": 74591824, ...
2022/11/27
[ "https://Stackoverflow.com/questions/74589512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19930097/" ]
74,589,566
<p>I have a table that is something like this:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>amount</th> <th>status</th> <th>timestamp</th> </tr> </thead> <tbody> <tr> <td>10</td> <td>A</td> <td>0</td> </tr> <tr> <td>10</td> <td>B</td> <td>1</td> </tr> <tr> <td>15</td> <td>B</td> <td>2</t...
[ { "answer_id": 74589897, "author": "p3consulting", "author_id": 4956336, "author_profile": "https://Stackoverflow.com/users/4956336", "pm_score": 1, "selected": true, "text": "with data(ord, amount, status) as (\n select 1, 10, 'A' from dual union all\n select 2, 10, 'B' from dual ...
2022/11/27
[ "https://Stackoverflow.com/questions/74589566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/129750/" ]
74,589,582
<p>The project is ASP.NET Core MVC, .NET 6. I'm trying to seed a role if it's not there yet and create a user that will have this role. I tried every way to twist the code and it doesn't work. When I run the app for the first time, the following error appears on the line where the user is added to the role:</p> <blockq...
[ { "answer_id": 74615748, "author": "FadoBagi", "author_id": 14364144, "author_profile": "https://Stackoverflow.com/users/14364144", "pm_score": 2, "selected": true, "text": "test123 Test123+" } ]
2022/11/27
[ "https://Stackoverflow.com/questions/74589582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14364144/" ]
74,589,647
<p>I had an excel script to search for files in a command.</p> <p>I found this example on the forum, the statement says that to search for a file by name, you need to write down the name and send (*) but when requested, it does not find anything</p> <pre><code>Get-ChildItem -Path &quot;C:\\Folder\\test\*&quot; </code><...
[ { "answer_id": 74615748, "author": "FadoBagi", "author_id": 14364144, "author_profile": "https://Stackoverflow.com/users/14364144", "pm_score": 2, "selected": true, "text": "test123 Test123+" } ]
2022/11/27
[ "https://Stackoverflow.com/questions/74589647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14735028/" ]
74,589,652
<p>Since the <code>std::forward_list</code> is implemented as a single-linked list, its iterator should be just a pointer to the underlying element ± some offset.</p> <p>Is there a way to convert a pointer to an element on a list to the iterator to this element without iterating through the entire list?</p> <pre class=...
[ { "answer_id": 74615748, "author": "FadoBagi", "author_id": 14364144, "author_profile": "https://Stackoverflow.com/users/14364144", "pm_score": 2, "selected": true, "text": "test123 Test123+" } ]
2022/11/27
[ "https://Stackoverflow.com/questions/74589652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3052438/" ]
74,589,665
<p>Can ANSI escape code SGR 38 - Set foreground color with argument 2;r;g;b be used with print function? Example of use with code 33 is of course</p> <pre><code>OKBLUE = '\033[94m' </code></pre> <p>I would like to use 038 instead to be able to use any RGB color. Is that posible?</p> <p>I tried</p> <pre><code>GREEN = '...
[ { "answer_id": 74589877, "author": "su yong kim", "author_id": 20612454, "author_profile": "https://Stackoverflow.com/users/20612454", "pm_score": -1, "selected": false, "text": "print('\\033[90m' + 'hello' + '\\033[96m' + ' there?' )\n" }, { "answer_id": 74601731, "author": ...
2022/11/27
[ "https://Stackoverflow.com/questions/74589665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3963267/" ]
74,589,702
<p>I am working on project which is asp.net mvc core. I want to replace string list of duplicate values to one with comma separated,</p> <pre><code>List&lt;string&gt; stringList = surveylist.Split('&amp;').ToList(); </code></pre> <p>I have string list This generate following output:</p> <pre><code>7=55 6=33 5=MCC 4=GHI...
[ { "answer_id": 74589877, "author": "su yong kim", "author_id": 20612454, "author_profile": "https://Stackoverflow.com/users/20612454", "pm_score": -1, "selected": false, "text": "print('\\033[90m' + 'hello' + '\\033[96m' + ' there?' )\n" }, { "answer_id": 74601731, "author": ...
2022/11/27
[ "https://Stackoverflow.com/questions/74589702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613852/" ]
74,589,728
<p>Calculus exam results are announced and your result is above the announced average. You want to have an idea about the letter grade you will get, and to do this you ask everyone you know about their exam results. You want to calculate the median of the results, which will give you some more idea about the distributi...
[ { "answer_id": 74589877, "author": "su yong kim", "author_id": 20612454, "author_profile": "https://Stackoverflow.com/users/20612454", "pm_score": -1, "selected": false, "text": "print('\\033[90m' + 'hello' + '\\033[96m' + ' there?' )\n" }, { "answer_id": 74601731, "author": ...
2022/11/27
[ "https://Stackoverflow.com/questions/74589728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15963929/" ]
74,589,759
<p>How can I get the local time in my country Indonesia?</p> <pre><code>var date = new Date(); var local = date.getLocal(); </code></pre> <p>I know the above code doesn't work, how do I retrieve it? I want to take (WIB) western Indonesian time / Waktu Indonesia Barat.</p> <p>Please help me, all answers are like precio...
[ { "answer_id": 74589788, "author": "raiyan22", "author_id": 9550867, "author_profile": "https://Stackoverflow.com/users/9550867", "pm_score": 0, "selected": false, "text": "worldtimeapi.org/ function getTime(url) {\n return new Promise((resolve, reject) => {\n const req = new X...
2022/11/27
[ "https://Stackoverflow.com/questions/74589759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20491248/" ]
74,589,770
<p>I'm trying to render the string array <code>keys</code> into a React component. <code>keys</code> are the keys that the user presses (but I just hard-coded them for the sake of this example).</p> <pre><code>import { useState } from &quot;react&quot;; import * as ReactDOM from &quot;react-dom&quot;; let keys = [&quo...
[ { "answer_id": 74589885, "author": "Ed de Almeida", "author_id": 5021963, "author_profile": "https://Stackoverflow.com/users/5021963", "pm_score": 0, "selected": false, "text": "setKeyState useState keyState setState const [keyState, setKeyState] = useState([\"a\",\"b\"]);\n keyState [\"...
2022/11/27
[ "https://Stackoverflow.com/questions/74589770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122536/" ]
74,589,771
<p>So, I have a method called 'room' in my views.py file.</p> <p>I can only access this room on my room.html page as I'm returning it there but I would like to use this data on my index page as well.</p> <p>How can I do that?</p> <p>Views.py</p> <pre><code>def room(request): rooms = Rooms.objects.all() photos =...
[ { "answer_id": 74589885, "author": "Ed de Almeida", "author_id": 5021963, "author_profile": "https://Stackoverflow.com/users/5021963", "pm_score": 0, "selected": false, "text": "setKeyState useState keyState setState const [keyState, setKeyState] = useState([\"a\",\"b\"]);\n keyState [\"...
2022/11/27
[ "https://Stackoverflow.com/questions/74589771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14680196/" ]
74,589,773
<p>If I have a list of strings such as this:</p> <pre><code>names = [&quot;Alice&quot;, &quot;Bob&quot;, &quot;Charlie&quot;, &quot;Darren&quot;] </code></pre> <p>How would I find how many of these strings contain the letter 'a'?</p> <p>I tried using the count function</p> <pre><code>names.count(&quot;a&quot;) </code><...
[ { "answer_id": 74589790, "author": "Khaled DELLAL", "author_id": 15852600, "author_profile": "https://Stackoverflow.com/users/15852600", "pm_score": 0, "selected": false, "text": "loop names = [\"Alice\", \"Bob\", \"Charlie\", \"Darren\"]\n\ncount=0\n\nfor i in range(len(names)):\n if...
2022/11/27
[ "https://Stackoverflow.com/questions/74589773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20614004/" ]
74,589,824
<p>I wrote a function that generates a table after feeding it a list.</p> <p>It is part of a web scraping script I'm working on.</p> <p>The function works (not the best but good enough for its purpose) but is there a better way to achieve better/similar/same result?</p> <p>For example, here's a list I would want to tur...
[ { "answer_id": 74590068, "author": "Khaled DELLAL", "author_id": 15852600, "author_profile": "https://Stackoverflow.com/users/15852600", "pm_score": 3, "selected": true, "text": "list comprehensions zip def MakeTable(listings):\n\n hour_idx = [i for i, item in enumerate(listings) if r...
2022/11/27
[ "https://Stackoverflow.com/questions/74589824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20002373/" ]
74,589,825
<p>I had tried to imitate to this below tips to display the IconButton the same as below image:</p> <p><a href="https://i.stack.imgur.com/aHW8m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aHW8m.png" alt="enter image description here" /></a></p> <p>These are links I had made reference to: <a href=...
[ { "answer_id": 74590068, "author": "Khaled DELLAL", "author_id": 15852600, "author_profile": "https://Stackoverflow.com/users/15852600", "pm_score": 3, "selected": true, "text": "list comprehensions zip def MakeTable(listings):\n\n hour_idx = [i for i, item in enumerate(listings) if r...
2022/11/27
[ "https://Stackoverflow.com/questions/74589825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20582783/" ]
74,589,833
<p>I have an array of objects as</p> <pre><code>const arr = [ { &quot;id&quot;: 2, &quot;key&quot;: &quot;cc_edit&quot; }, { &quot;id&quot;: 4, &quot;key&quot;: &quot;cc_upload&quot; }, { &quot;id&quot;: 4, ...
[ { "answer_id": 74589845, "author": "Majed Badawi", "author_id": 7486313, "author_profile": "https://Stackoverflow.com/users/7486313", "pm_score": 2, "selected": false, "text": "Array#reduce const arr = [ { \"id\": 2, \"key\": \"cc_edit\" }, { \"id\": 4, \"key\": \"cc_upload\" }, { \"id\"...
2022/11/27
[ "https://Stackoverflow.com/questions/74589833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5951227/" ]
74,589,841
<p>i have two dataframes, i wanna iterate through the first one, and if a condition is checked, I move to the second dataframe and see if another condition is checked (in the same rowxcolumn as the first dataframe)</p> <p>this would be dataframe 1</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr>...
[ { "answer_id": 74589845, "author": "Majed Badawi", "author_id": 7486313, "author_profile": "https://Stackoverflow.com/users/7486313", "pm_score": 2, "selected": false, "text": "Array#reduce const arr = [ { \"id\": 2, \"key\": \"cc_edit\" }, { \"id\": 4, \"key\": \"cc_upload\" }, { \"id\"...
2022/11/27
[ "https://Stackoverflow.com/questions/74589841", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20521289/" ]
74,589,860
<p>I'm trying to create a leaderboard system by using a merge sort algorithm that sorts the scores in ascending order and then sorts the usernames by their score. I then use a for loop that displays the scores in descending order. The code in the image works perfectly fine when each user has a unique score and duplicat...
[ { "answer_id": 74589845, "author": "Majed Badawi", "author_id": 7486313, "author_profile": "https://Stackoverflow.com/users/7486313", "pm_score": 2, "selected": false, "text": "Array#reduce const arr = [ { \"id\": 2, \"key\": \"cc_edit\" }, { \"id\": 4, \"key\": \"cc_upload\" }, { \"id\"...
2022/11/27
[ "https://Stackoverflow.com/questions/74589860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613987/" ]
74,589,883
<p>I have array of array double but it won't add element after using <code>.plusElement</code>or <code>.plus</code>. code below inside from view model that returns it.data which is a list of object</p> <h3>Code</h3> <pre><code>var ageEntry : Int val dataObject : Array&lt;Array&lt;Double&gt;&gt; = arrayOf() for (dataWe...
[ { "answer_id": 74590934, "author": "Irgi Ahmad Maulana", "author_id": 7354428, "author_profile": "https://Stackoverflow.com/users/7354428", "pm_score": -1, "selected": false, "text": "fun <T> appendArray(arr: Array<T>, element: T): Array<T?> {\n val array = arr.copyOf(arr.size + 1...
2022/11/27
[ "https://Stackoverflow.com/questions/74589883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7354428/" ]
74,589,913
<p>I am trying to perform a search in the XML file in order to check if a specific group policy is linked to a few OUs.</p> <p>The format of the OU is <strong>&quot;OU=XXXXX-Name,OU=DEMO OU,dc=domain,dc=local&quot;</strong></p> <p>I managed to get the full distinguishedname property of each OU and i kept only the first...
[ { "answer_id": 74590934, "author": "Irgi Ahmad Maulana", "author_id": 7354428, "author_profile": "https://Stackoverflow.com/users/7354428", "pm_score": -1, "selected": false, "text": "fun <T> appendArray(arr: Array<T>, element: T): Array<T?> {\n val array = arr.copyOf(arr.size + 1...
2022/11/27
[ "https://Stackoverflow.com/questions/74589913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20601902/" ]
74,589,991
<p>I want to create a plot that looks like this: <a href="https://i.stack.imgur.com/jrTCX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jrTCX.png" alt="enter image description here" /></a></p> <pre><code>x=1:20 y=sample(20) df &lt;- tibble(x=x,y=y) ggplot(df,aes(x,y))+ geom_smooth()+ geom_poin...
[ { "answer_id": 74590934, "author": "Irgi Ahmad Maulana", "author_id": 7354428, "author_profile": "https://Stackoverflow.com/users/7354428", "pm_score": -1, "selected": false, "text": "fun <T> appendArray(arr: Array<T>, element: T): Array<T?> {\n val array = arr.copyOf(arr.size + 1...
2022/11/27
[ "https://Stackoverflow.com/questions/74589991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17878237/" ]
74,590,053
<p>Probably a stupid question but I have no idea how to do this.</p> <p>Consider the following game, in which a balanced die with six sides numbered from 1 to 6 is rolled. If a 4 or 1 is rolled, you lose 50 euros. If you roll 2 or 3, nothing happens. If you roll 5, you win 50 euros. If you roll 6, you win 16×50 euros.<...
[ { "answer_id": 74590073, "author": "Vinícius Félix", "author_id": 9696037, "author_profile": "https://Stackoverflow.com/users/9696037", "pm_score": 1, "selected": false, "text": "#Simulation of the dice roll\nset.seed(990);dice_roll <- sample(1:6,5649,replace = TRUE)\n\nlibrary(dplyr)\n\...
2022/11/27
[ "https://Stackoverflow.com/questions/74590053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20357700/" ]
74,590,058
<p>I want to change the</p> <pre><code>id=&quot;navbar&quot; </code></pre> <p>font color while the page is in dark mode, and make the font color back when the page switches to light mode. The switch is made with js:</p> <pre><code>const onClick = () =&gt; { theme.value = theme.value === 'light' ? 'dark' : 'li...
[ { "answer_id": 74590073, "author": "Vinícius Félix", "author_id": 9696037, "author_profile": "https://Stackoverflow.com/users/9696037", "pm_score": 1, "selected": false, "text": "#Simulation of the dice roll\nset.seed(990);dice_roll <- sample(1:6,5649,replace = TRUE)\n\nlibrary(dplyr)\n\...
2022/11/27
[ "https://Stackoverflow.com/questions/74590058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12245970/" ]
74,590,080
<p>The firebase Sveltekit client app and server api use a google cloud run hosting container. This works fine when I use the cloud run url: <code>https://app...-4ysldefc4nq-uc.a.run.app/</code></p> <p>But when I use firebase rewriting the client works fine using: <code>https://vc-ticker.web.app/...</code> but receives ...
[ { "answer_id": 74590073, "author": "Vinícius Félix", "author_id": 9696037, "author_profile": "https://Stackoverflow.com/users/9696037", "pm_score": 1, "selected": false, "text": "#Simulation of the dice roll\nset.seed(990);dice_roll <- sample(1:6,5649,replace = TRUE)\n\nlibrary(dplyr)\n\...
2022/11/27
[ "https://Stackoverflow.com/questions/74590080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/675006/" ]
74,590,090
<p>i have such data (the data is given as an example, so both groups have the same values)</p> <pre class="lang-r prettyprint-override"><code> dat=structure(list(sku = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), period = c(&quot;30.09.2021&quot;, &quot...
[ { "answer_id": 74590073, "author": "Vinícius Félix", "author_id": 9696037, "author_profile": "https://Stackoverflow.com/users/9696037", "pm_score": 1, "selected": false, "text": "#Simulation of the dice roll\nset.seed(990);dice_roll <- sample(1:6,5649,replace = TRUE)\n\nlibrary(dplyr)\n\...
2022/11/27
[ "https://Stackoverflow.com/questions/74590090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4529548/" ]
74,590,091
<pre><code>const combinations = [{rolledOnes: true, scoredOnes:false}, {rolledTwos: true, scoredTwos:false}]; </code></pre> <p>I am fairly new to Javascript. So, my actual array is larger than this. I want to set rolledOnes and rolledTwos to false, without affecting scoredOnes and scoredTwos. So...
[ { "answer_id": 74590112, "author": "flyingfox", "author_id": 3176419, "author_profile": "https://Stackoverflow.com/users/3176419", "pm_score": 1, "selected": false, "text": "Array.forEach() Object.keys() let combinations = [{rolledOnes: true, scoredOnes:false}, \n {r...
2022/11/27
[ "https://Stackoverflow.com/questions/74590091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20614322/" ]
74,590,120
<p>I'm trying to create a betting API, and I've now discovered a way to minimize the code rework with Mapper, but I'm not understanding the problem I'm having in the code.</p> <p>ERROR:</p> <pre><code>*************************** APPLICATION FAILED TO START *************************** Description: Parameter 1 of const...
[ { "answer_id": 74592828, "author": "Rustam", "author_id": 15322661, "author_profile": "https://Stackoverflow.com/users/15322661", "pm_score": 2, "selected": true, "text": "bet betResquetToEntity @Mapping(target = \"bet.id\", source = \"betId\") @Mapping(target = \"id\", source = \"betRe...
2022/11/27
[ "https://Stackoverflow.com/questions/74590120", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12406838/" ]
74,590,199
<p>I am using a Triggered Trapezoid block within Modelica Logical Blocks. I am using it on a variable in my model, to eliminate the peaks that occur to this variable, because this variable is triggered by a boolean named ON, and when this boolean is equal to 1 the first seconds the variable records Peaks as it figures...
[ { "answer_id": 74622957, "author": "Akhil Nandan", "author_id": 16020568, "author_profile": "https://Stackoverflow.com/users/16020568", "pm_score": 1, "selected": false, "text": "model Test\n Modelica.Blocks.Nonlinear.SlewRateLimiter slewRateLimiter(Td = 0.5) annotation(\n Placement...
2022/11/27
[ "https://Stackoverflow.com/questions/74590199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11214365/" ]
74,590,220
<p>I am trying to calculate the Net Income based on a given Gross Income Value. The rules are this :</p> <ol> <li>If grossValue is lower or equal to 1000, no tax is applied</li> <li>10% Tax is applied to the exess amout</li> </ol> <p>Example : Given a gross value of 3400, we apply 10% tax to the exess so 10% out of 240...
[ { "answer_id": 74590262, "author": "jmcilhinney", "author_id": 584183, "author_profile": "https://Stackoverflow.com/users/584183", "pm_score": 2, "selected": true, "text": "int int int 10 / 100 double 10.0 / 100.0" }, { "answer_id": 74590333, "author": "Sachith Wickramaarachc...
2022/11/27
[ "https://Stackoverflow.com/questions/74590220", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20614392/" ]
74,590,255
<p>EDIT: Command <code>lista = [int(i) for i in input(&quot;Podaj Liczby: &quot;).split(&quot;,&quot;)]</code> still doesn't sort. When I try to enter numbers, it does not sort them for me Even if i use &quot;,&quot; still doesn't sort. Here's code:</p> <pre><code>lista = [int(i) for i in input(&quot;Podaj Liczby: &qu...
[ { "answer_id": 74590262, "author": "jmcilhinney", "author_id": 584183, "author_profile": "https://Stackoverflow.com/users/584183", "pm_score": 2, "selected": true, "text": "int int int 10 / 100 double 10.0 / 100.0" }, { "answer_id": 74590333, "author": "Sachith Wickramaarachc...
2022/11/27
[ "https://Stackoverflow.com/questions/74590255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18717371/" ]
74,590,260
<p>I have a dataset like following :</p> <pre><code> link from_node to_node 1 412300044 100923 100185 2 412300047 100190 100198 3 412300057 100197 100198 4 412300058 100198 100199 5 412300076 100190 100199 ... ... ... ... </code></p...
[ { "answer_id": 74590506, "author": "Allan Cameron", "author_id": 12500315, "author_profile": "https://Stackoverflow.com/users/12500315", "pm_score": 2, "selected": false, "text": "set.seed(1234)\n\ndf <- data.frame(link = sample(30, 10) + 412300040,\n from_node = sam...
2022/11/27
[ "https://Stackoverflow.com/questions/74590260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19743121/" ]
74,590,267
<p>Hey currently I'm trying to program a quadratic programming algorithm with Python.</p> <p><strong>My goal:</strong> I want to program a function where the given parameters are one vector c, and a matrix G. They are connected through the function Phi = 0.5 *(x^T * G * x) + c^T *x (x^T in this context means vector x t...
[ { "answer_id": 74603632, "author": "MannyC", "author_id": 12008379, "author_profile": "https://Stackoverflow.com/users/12008379", "pm_score": 2, "selected": true, "text": "import sympy\nfrom sympy import symbols\n\n### First we initialize some Symbol objects\n\n# this does essentially wh...
2022/11/27
[ "https://Stackoverflow.com/questions/74590267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20614501/" ]
74,590,306
<p>I need to check if the String word can be added on the array length, without lose any character out of bounds. Right now when I add some String words it goes out of the length and I don't know how to fix that.</p> <p>Right now I fill an 2D array with (*) and I want to add words like <em>&quot;schedule&quot;</em> but...
[ { "answer_id": 74603632, "author": "MannyC", "author_id": 12008379, "author_profile": "https://Stackoverflow.com/users/12008379", "pm_score": 2, "selected": true, "text": "import sympy\nfrom sympy import symbols\n\n### First we initialize some Symbol objects\n\n# this does essentially wh...
2022/11/27
[ "https://Stackoverflow.com/questions/74590306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13084927/" ]
74,590,309
<p>I learnt about Inheritance in C++. Then to check that I've understood the concept correctly, I have written the below given program that is rejected by clang but accepted by gcc and msvc. <a href="https://godbolt.org/z/hs18KxGM3" rel="nofollow noreferrer">Live Demo</a></p> <pre><code>#include &lt;array&gt; #include ...
[ { "answer_id": 74590383, "author": "Jason Liam", "author_id": 12002570, "author_profile": "https://Stackoverflow.com/users/12002570", "pm_score": 2, "selected": false, "text": "T object ( arg ); (1) \n Derived Derived d(1); Derived Derived d(1); 1" }, { "answer_id": 7459...
2022/11/27
[ "https://Stackoverflow.com/questions/74590309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20562802/" ]
74,590,373
<p>I have controller for changing website language, saving cookie and returning url.</p> <p>`</p> <pre><code>using Microsoft.AspNetCore.Localization; using Microsoft.AspNetCore.Mvc; namespace Website.Controllers; public class CultureController : Controller { [HttpPost] public IActionResult SetCulture(string cu...
[ { "answer_id": 74590383, "author": "Jason Liam", "author_id": 12002570, "author_profile": "https://Stackoverflow.com/users/12002570", "pm_score": 2, "selected": false, "text": "T object ( arg ); (1) \n Derived Derived d(1); Derived Derived d(1); 1" }, { "answer_id": 7459...
2022/11/27
[ "https://Stackoverflow.com/questions/74590373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20614393/" ]
74,590,381
<p>I'm still learning Flutter, so I need some help.</p> <p>The following page layout is in portrait mode:</p> <p><a href="https://i.stack.imgur.com/SWyGD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SWyGD.png" alt="enter image description here" /></a></p> <p>I want it to change to the following la...
[ { "answer_id": 74590383, "author": "Jason Liam", "author_id": 12002570, "author_profile": "https://Stackoverflow.com/users/12002570", "pm_score": 2, "selected": false, "text": "T object ( arg ); (1) \n Derived Derived d(1); Derived Derived d(1); 1" }, { "answer_id": 7459...
2022/11/27
[ "https://Stackoverflow.com/questions/74590381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11878615/" ]
74,590,430
<p>How to transform data frame, given dataset assume this is a large dataset</p> <pre class="lang-r prettyprint-override"><code>datestamp &lt;- c(&quot;2020-04-26 17:45:14&quot;,&quot;2020-04-17 17:08:54&quot;,&quot;2020-04-01 17:54:13&quot;,&quot;2020-04-07 12:50:19&quot;,&quot;2020-04-18 10:22:59&quot;) member_casual...
[ { "answer_id": 74590383, "author": "Jason Liam", "author_id": 12002570, "author_profile": "https://Stackoverflow.com/users/12002570", "pm_score": 2, "selected": false, "text": "T object ( arg ); (1) \n Derived Derived d(1); Derived Derived d(1); 1" }, { "answer_id": 7459...
2022/11/27
[ "https://Stackoverflow.com/questions/74590430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20614727/" ]
74,590,439
<p>Want to read numbers from a file and add them to <code>List&lt;Integer&gt;</code>. But the problem happens to be that two-digit numbers are also split into 2 separate numbers when reading the file.</p> <p>Text file example:</p> <pre><code>2, 7 1, 0, 24, 2 3, 0, 6, 3 4, 0, 2, 1 </code></pre> <p>My code:</p> <pre clas...
[ { "answer_id": 74590383, "author": "Jason Liam", "author_id": 12002570, "author_profile": "https://Stackoverflow.com/users/12002570", "pm_score": 2, "selected": false, "text": "T object ( arg ); (1) \n Derived Derived d(1); Derived Derived d(1); 1" }, { "answer_id": 7459...
2022/11/27
[ "https://Stackoverflow.com/questions/74590439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16661931/" ]
74,590,474
<p>i m having two objects previous and new one, i trying to compare and get difference for those objects, send to as patch payload from patch api,</p> <p>compare each properties in object if any of the property has any difference i want all those difference in new object as payload</p> <p>How can i achieve this please...
[ { "answer_id": 74590383, "author": "Jason Liam", "author_id": 12002570, "author_profile": "https://Stackoverflow.com/users/12002570", "pm_score": 2, "selected": false, "text": "T object ( arg ); (1) \n Derived Derived d(1); Derived Derived d(1); 1" }, { "answer_id": 7459...
2022/11/27
[ "https://Stackoverflow.com/questions/74590474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15366349/" ]
74,590,496
<p>I want to check (using VBA) if a folder path exists.</p> <pre><code>saveLocation = &quot;G:\documents\&quot; </code></pre> <p>If the folder exists then I want to save to this location.</p> <p>I am currently saving as a PDF using the following code.</p> <pre><code> saveLocation = saveLocation &amp; &quot;myfile.pdf&q...
[ { "answer_id": 74590594, "author": "FaneDuru", "author_id": 2233308, "author_profile": "https://Stackoverflow.com/users/2233308", "pm_score": 1, "selected": false, "text": "Sub testFolderIfExists()\n Dim saveLocation As String\n \n saveLocation = \"G:\\documents\\\"\n\n If Dir(sa...
2022/11/27
[ "https://Stackoverflow.com/questions/74590496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2013720/" ]
74,590,516
<p>I am copying a model object to another, but I want that it doesn’t copy the relations</p> <p>For example, assume you have a model like this:</p> <pre><code>class Dish(models.Model): name = models.CharField(max_length=100) description = models.CharField(max_length=500) category = models.ForeignKey(Categor...
[ { "answer_id": 74590594, "author": "FaneDuru", "author_id": 2233308, "author_profile": "https://Stackoverflow.com/users/2233308", "pm_score": 1, "selected": false, "text": "Sub testFolderIfExists()\n Dim saveLocation As String\n \n saveLocation = \"G:\\documents\\\"\n\n If Dir(sa...
2022/11/27
[ "https://Stackoverflow.com/questions/74590516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1353914/" ]
74,590,579
<p>I want to create 12 instantiations of a class and pass a random value as its parameter. The random values should only range from 1 to 6 BUT I need each value from the range to be distributed twice among the 12 instances of the class.</p> <p>The constructor of the Class is as follows:</p> <pre><code>Die(int numSide){...
[ { "answer_id": 74590594, "author": "FaneDuru", "author_id": 2233308, "author_profile": "https://Stackoverflow.com/users/2233308", "pm_score": 1, "selected": false, "text": "Sub testFolderIfExists()\n Dim saveLocation As String\n \n saveLocation = \"G:\\documents\\\"\n\n If Dir(sa...
2022/11/27
[ "https://Stackoverflow.com/questions/74590579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17505578/" ]
74,590,616
<p>I need to create a memory game in Python. I need to print a 5x4 (4 rows, 5 elements in a line) field in the console and the fields should have names like a1, b1, c1... in the next row a2, b2, c2 etc. We've already got a list of symbols, which should be used in the game (list1). One of the instructions we have is to ...
[ { "answer_id": 74590688, "author": "Martijn Pieters", "author_id": 100297, "author_profile": "https://Stackoverflow.com/users/100297", "pm_score": 2, "selected": false, "text": "row col row col col, row = interpret_reference(reference)\ncard = grid[row][col]\n reference grid[row] grid[ro...
2022/11/27
[ "https://Stackoverflow.com/questions/74590616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20614841/" ]
74,590,624
<p>i have a text file i want to add its data to priority queue and then print out 5 items with max value each line first has a name then a date then a value i want to print 5 max values with name and date</p> <pre><code>Queue&lt;String&gt; queue = new PriorityQueue&lt;String&gt;(); String file = &quot;file&quot;; Strin...
[ { "answer_id": 74590688, "author": "Martijn Pieters", "author_id": 100297, "author_profile": "https://Stackoverflow.com/users/100297", "pm_score": 2, "selected": false, "text": "row col row col col, row = interpret_reference(reference)\ncard = grid[row][col]\n reference grid[row] grid[ro...
2022/11/27
[ "https://Stackoverflow.com/questions/74590624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9207957/" ]
74,590,632
<p><strong>Context</strong></p> <p>I have a generic SwiftUI view called <code>ComponentRow</code> and would like to use it in different places inside my app. However, my model only returns the <code>Component</code> as <code>(any Component)?</code>, which is why I used a <code>Switch</code> to bridge between <code>any<...
[ { "answer_id": 74590688, "author": "Martijn Pieters", "author_id": 100297, "author_profile": "https://Stackoverflow.com/users/100297", "pm_score": 2, "selected": false, "text": "row col row col col, row = interpret_reference(reference)\ncard = grid[row][col]\n reference grid[row] grid[ro...
2022/11/27
[ "https://Stackoverflow.com/questions/74590632", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13345744/" ]
74,590,670
<p>From my understanding of OOP in Python, if there is no attribute named <code>xyz</code> on an object <code>a</code>, then invoking <code>a.xyz</code> raises &quot;AttributeError.&quot; But in beautifulsoup, if we call any arbitrary attribute on an object of type <code>Tag</code>, we always get some output. For insta...
[ { "answer_id": 74590826, "author": "Daniil Fajnberg", "author_id": 19770795, "author_profile": "https://Stackoverflow.com/users/19770795", "pm_score": 2, "selected": false, "text": "class Tag(PageElement):\n ...\n\n def __getattr__(self, tag):\n \"\"\"Calling tag.subtag is t...
2022/11/27
[ "https://Stackoverflow.com/questions/74590670", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17954536/" ]
74,590,695
<p>I'm seeing this kind of assignment:</p> <pre><code>info-&gt;table = &amp;_ttable_full[0]; </code></pre> <p>Why not directly use this:</p> <pre><code>info-&gt;table = _ttable_full; </code></pre> <p>Is there any advantage? Or is it just the author's style?</p>
[ { "answer_id": 74591164, "author": "Eric Postpischil", "author_id": 298225, "author_profile": "https://Stackoverflow.com/users/298225", "pm_score": 2, "selected": true, "text": "A &A[0] A+j &A[j] A &A[0] sizeof A sizeof &A[0] &A &&A[0] &&" } ]
2022/11/27
[ "https://Stackoverflow.com/questions/74590695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5739532/" ]