qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,654,757
<p>I need a formula to calculate between two date and time excluding lunch time, holidays, weekend and between 09:00 and 18:00 work hours.</p> <p>For example, 25/07/2022 12:00 and 29/07/2022 10:00 and answer has to be 1 day, 06:00</p> <p>Thanks in advance.</p> <p>I had a formula but it didn't work when hours bigger tha...
[ { "answer_id": 74654851, "author": "abokey", "author_id": 16120011, "author_profile": "https://Stackoverflow.com/users/16120011", "pm_score": 3, "selected": true, "text": "abs pandas.DataFrame.sort_values out = df.sort_values(by=\"Score\", key=abs)\n print(out)\n\n Name Score\n3 ma...
2022/12/02
[ "https://Stackoverflow.com/questions/74654757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20665202/" ]
74,654,766
<p>I faced an error using StoreModule.forRoot() in angular project with NgRX. I will attach a picture of my error if anyone can help with a solution for it.</p> <p>I was trying to implement reducers in angular using ngrx/store but I faced a problem while importing it in app.module. <a href="https://i.stack.imgur.com/fS...
[ { "answer_id": 74654851, "author": "abokey", "author_id": 16120011, "author_profile": "https://Stackoverflow.com/users/16120011", "pm_score": 3, "selected": true, "text": "abs pandas.DataFrame.sort_values out = df.sort_values(by=\"Score\", key=abs)\n print(out)\n\n Name Score\n3 ma...
2022/12/02
[ "https://Stackoverflow.com/questions/74654766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20665566/" ]
74,654,775
<p>`i want to show event on my fullcalendar by filtring by id_service</p> <p>here is my concontroller, i convert the event to array and get them by callendrier`</p> <pre><code>&gt; public function callendrier($id_service) { $services= Service::all(); if($id_service==0){ $conge = Conge::a...
[ { "answer_id": 74654851, "author": "abokey", "author_id": 16120011, "author_profile": "https://Stackoverflow.com/users/16120011", "pm_score": 3, "selected": true, "text": "abs pandas.DataFrame.sort_values out = df.sort_values(by=\"Score\", key=abs)\n print(out)\n\n Name Score\n3 ma...
2022/12/02
[ "https://Stackoverflow.com/questions/74654775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20546281/" ]
74,654,788
<p>I have this format of json</p> <pre><code>{ &quot;Toyota&quot;: [&quot;Vitz&quot;, &quot;Corolla&quot;], &quot;Mazda&quot;: [&quot;Demio&quot;, &quot;SUV&quot;], &quot;Mitsubishi&quot;: [&quot;FH&quot;, &quot;FRR&quot;] } </code></pre> <p>That i wish to return. In my code i have this</p> <pre><code> pu...
[ { "answer_id": 74655131, "author": "O. Jones", "author_id": 205608, "author_profile": "https://Stackoverflow.com/users/205608", "pm_score": 2, "selected": true, "text": "$data_structure = [\n 'Toyota' => ['Vitz', 'Corolla'],\n 'Mazda' => ['Demio', 'SUV'],\n 'Mitsubis...
2022/12/02
[ "https://Stackoverflow.com/questions/74654788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/492293/" ]
74,654,795
<p>I have the following dataset:</p> <pre><code>id test date 1 A 2000-01-01 1 B 2000-01-01 1 C 2000-01-08 2 A 2000-01-01 2 A 2000-01-01 2 B 2000-01-08 3 A 2000-01-01 3 C 2000-01-01 3 B 2000-01-08 4 A 2000-01-01 4 B 2000-01-01 4 C 2000-01-01 5 A 2000-01-01 5 B ...
[ { "answer_id": 74655131, "author": "O. Jones", "author_id": 205608, "author_profile": "https://Stackoverflow.com/users/205608", "pm_score": 2, "selected": true, "text": "$data_structure = [\n 'Toyota' => ['Vitz', 'Corolla'],\n 'Mazda' => ['Demio', 'SUV'],\n 'Mitsubis...
2022/12/02
[ "https://Stackoverflow.com/questions/74654795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5510540/" ]
74,654,931
<p>I have a view that has context data and it extends base.html but as I want the context data to be displayed in all templates that extend from base.html and not only the view with the context data I am doing custom template tags with the context inside but I get an error.</p> <p>view with and without context data:</p...
[ { "answer_id": 74655131, "author": "O. Jones", "author_id": 205608, "author_profile": "https://Stackoverflow.com/users/205608", "pm_score": 2, "selected": true, "text": "$data_structure = [\n 'Toyota' => ['Vitz', 'Corolla'],\n 'Mazda' => ['Demio', 'SUV'],\n 'Mitsubis...
2022/12/02
[ "https://Stackoverflow.com/questions/74654931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19881162/" ]
74,654,963
<p>I've seen follow code and i think that it is a wrong way to cache tempview in Spark. What do you think?</p> <pre><code>spark.sql( s&quot;&quot;&quot; |... &quot;&quot;&quot;.stripMargin).createOrReplaceTempView(s&quot;temp_view&quot;) spark.table(s&quot;temp_view&quot;).cache() </code></pr...
[ { "answer_id": 74655131, "author": "O. Jones", "author_id": 205608, "author_profile": "https://Stackoverflow.com/users/205608", "pm_score": 2, "selected": true, "text": "$data_structure = [\n 'Toyota' => ['Vitz', 'Corolla'],\n 'Mazda' => ['Demio', 'SUV'],\n 'Mitsubis...
2022/12/02
[ "https://Stackoverflow.com/questions/74654963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11653949/" ]
74,654,996
<p>I am calling one function through <code>setInterval</code> but function go to infinite loop and my applicaiton get stuck. It's happen it on android, Could someone please help me how to resolve this issue.</p> <p>Thanks</p> <pre><code> useEffect(() =&gt; { const interval = setInterval(() =&gt; { sendCoordi...
[ { "answer_id": 74655131, "author": "O. Jones", "author_id": 205608, "author_profile": "https://Stackoverflow.com/users/205608", "pm_score": 2, "selected": true, "text": "$data_structure = [\n 'Toyota' => ['Vitz', 'Corolla'],\n 'Mazda' => ['Demio', 'SUV'],\n 'Mitsubis...
2022/12/02
[ "https://Stackoverflow.com/questions/74654996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20588409/" ]
74,655,009
<p>So I'm trying to install yasm on Windows 11 with Chocolatey, but an error occurs, does anyone know how to solve this error?</p> <pre><code>PS C:\WINDOWS\system32&gt; choco install yasm Chocolatey v1.2.0 Installing the following packages: yasm By installing, you accept licenses for the packages. Progress: Downloading...
[ { "answer_id": 74655131, "author": "O. Jones", "author_id": 205608, "author_profile": "https://Stackoverflow.com/users/205608", "pm_score": 2, "selected": true, "text": "$data_structure = [\n 'Toyota' => ['Vitz', 'Corolla'],\n 'Mazda' => ['Demio', 'SUV'],\n 'Mitsubis...
2022/12/02
[ "https://Stackoverflow.com/questions/74655009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20146868/" ]
74,655,073
<p>I wonder if there is an effective (without loops) method of joining two lists by names of their elements. I checked <a href="https://stackoverflow.com/q/36665492/5043424">here</a> but this did not help me as well as tried to access names from <code>sapply()</code> as on the answer from <a href="https://stackoverflow...
[ { "answer_id": 74655181, "author": "harre", "author_id": 4786466, "author_profile": "https://Stackoverflow.com/users/4786466", "pm_score": 3, "selected": true, "text": "list c base keys <- unique(c(names(mylist1), names(mylist2)))\nsetNames(mapply(list, mylist1[keys], mylist2[keys], SIMP...
2022/12/02
[ "https://Stackoverflow.com/questions/74655073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5043424/" ]
74,655,075
<p>I am building a Rails 5.2 app. In this app I got three objects:</p> <p><strong>User</strong></p> <ul> <li>Id</li> <li>Firstname</li> <li>Lastname</li> </ul> <p><strong>Conversation</strong></p> <ul> <li>Id</li> <li>Entity_type</li> <li>Entity_subtype</li> </ul> <p><strong>Assignment</strong></p> <ul> <li>Id</li> <li...
[ { "answer_id": 74656875, "author": "dileep nandanam", "author_id": 1547872, "author_profile": "https://Stackoverflow.com/users/1547872", "pm_score": 1, "selected": false, "text": "user_ids = [\"cdd3c6be-ac78-46f2-a7ae-7f2299b6fedb\", \"32117e53-9b2f-49c6-8cc8-3a9eb9003a2e\"]\n\nConversat...
2022/12/02
[ "https://Stackoverflow.com/questions/74655075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/339067/" ]
74,655,092
<p>I have a templated class, say:</p> <pre class="lang-cpp prettyprint-override"><code>template &lt;class C, int I&gt; class A { A() {}; someMethod(){...}; }; </code></pre> <p>Now, let's say I have several objects of this class used in my code with different template parameters (classes B,C, and D are some defi...
[ { "answer_id": 74655349, "author": "463035818_is_not_a_number", "author_id": 4117728, "author_profile": "https://Stackoverflow.com/users/4117728", "pm_score": 3, "selected": true, "text": "A<B,1> A<B,2> A<B,3> Foo Bar Moo any variant class A_base {\n virtual void someMethod() = 0;\n ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11617772/" ]
74,655,103
<p>A sequence of data about applicants nameList of type Entrant is given. Each element of the sequence includes the fields School number, Year of entering, Last name. Get data (list of YearSchoolStat values) about the number of different schools that applicants graduated from for each year present in the source data. T...
[ { "answer_id": 74655230, "author": "Roman Ryzhiy", "author_id": 7592390, "author_profile": "https://Stackoverflow.com/users/7592390", "pm_score": 1, "selected": true, "text": "var result = nameList\n .GroupBy(c => c.Year)\n .Select(ss => new YearSchoolStat()\n {\n Year = ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20569938/" ]
74,655,125
<p>I am a new learner to Java; I want to run a class method inside a function thats not within the class scope inside VSC. However, my compiler tells me I have to remove the last curly braces from the class and require to instantiate the function as a method inside the class.</p> <p>How do I use these in a dependent wa...
[ { "answer_id": 74655230, "author": "Roman Ryzhiy", "author_id": 7592390, "author_profile": "https://Stackoverflow.com/users/7592390", "pm_score": 1, "selected": true, "text": "var result = nameList\n .GroupBy(c => c.Year)\n .Select(ss => new YearSchoolStat()\n {\n Year = ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18248287/" ]
74,655,135
<p>I am using <a href="https://camelot-py.readthedocs.io/en/master/" rel="nofollow noreferrer">Camelot</a> to extract tables from PDF files. While this works very well, it extracts the text only, it does not extract the hyperlinks that are embedded in the tables.</p> <p>Is there a way of using Camelot or a similar pack...
[ { "answer_id": 74655230, "author": "Roman Ryzhiy", "author_id": 7592390, "author_profile": "https://Stackoverflow.com/users/7592390", "pm_score": 1, "selected": true, "text": "var result = nameList\n .GroupBy(c => c.Year)\n .Select(ss => new YearSchoolStat()\n {\n Year = ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10744269/" ]
74,655,138
<p>I have this list:</p> <pre class="lang-dart prettyprint-override"><code>List&lt;dynamic&gt; activityDays = []; </code></pre> <p>And this code:</p> <pre><code>getItems(AsyncSnapshot&lt;QuerySnapshot&gt; snapshot) { if (widget.user.uid.isNotEmpty) { // ignore: missing_return snapshot.data.documents.map&lt;Column...
[ { "answer_id": 74655230, "author": "Roman Ryzhiy", "author_id": 7592390, "author_profile": "https://Stackoverflow.com/users/7592390", "pm_score": 1, "selected": true, "text": "var result = nameList\n .GroupBy(c => c.Year)\n .Select(ss => new YearSchoolStat()\n {\n Year = ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4517263/" ]
74,655,141
<p>I have a c# program that converts/re-interpret unmanaged type to <code>ulong</code> on x64 machine:</p> <pre><code>public static unsafe ulong ToUInt64&lt;T&gt;(T value) where T : unmanaged { if(sizeof(T) &gt; sizeof(ulong)) throw new InvalidOperationException(&quot;Can't convert this type to UInt64&quot;); r...
[ { "answer_id": 74655597, "author": "shingo", "author_id": 6196568, "author_profile": "https://Stackoverflow.com/users/6196568", "pm_score": 2, "selected": true, "text": "static void Main()\n{\n var j = Test(0x12345678);\n ulong b = ToUInt64((byte)123);\n Console.WriteLine(b); //...
2022/12/02
[ "https://Stackoverflow.com/questions/74655141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19458156/" ]
74,655,168
<p>I have a column with timestamps formatted like this printing one row it looks like this for example:</p> <pre><code>&quot;2022-09-21 02:02:03 UTC&quot; </code></pre> <p>There are many rows that have the same timestamp, but I want another column with the first timestamp after a specific times based on a vector that l...
[ { "answer_id": 74655597, "author": "shingo", "author_id": 6196568, "author_profile": "https://Stackoverflow.com/users/6196568", "pm_score": 2, "selected": true, "text": "static void Main()\n{\n var j = Test(0x12345678);\n ulong b = ToUInt64((byte)123);\n Console.WriteLine(b); //...
2022/12/02
[ "https://Stackoverflow.com/questions/74655168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17143533/" ]
74,655,184
<p>I have a simple function to return True or False when a condition is met. But the return statement is not functioning as I expected. Could anyone help me out to point out the mistake I am making.</p> <pre><code>graph = { 'f': ['g', 'i'], 'g': ['h'], 'h': [], 'i': ['g', 'k'], 'j': ['i'], 'k': [] } def hasPath(graph,...
[ { "answer_id": 74655341, "author": "Agni", "author_id": 8106804, "author_profile": "https://Stackoverflow.com/users/8106804", "pm_score": 3, "selected": true, "text": "hasPath arr des arr print return False False hasPath return True arr hasPath def hasPath(graph, source, des):\n arr =...
2022/12/02
[ "https://Stackoverflow.com/questions/74655184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15051878/" ]
74,655,193
<p>I have a dictionary with lists as values and i want to concatenate lists of certain keys to one and store it in another dictionary.</p> <p>Right now i always do this:</p> <pre><code>plot_history = {} for key in history.keys(): plot_key = key[3:] if plot_key in scores: if plot_key in plot_history.keys...
[ { "answer_id": 74655391, "author": "RJ Adriaansen", "author_id": 11380795, "author_profile": "https://Stackoverflow.com/users/11380795", "pm_score": 2, "selected": true, "text": "plot_history = {score: [history[f\"tl_{score}\"], history[f\"ft_{score}\"]] for score in scores}\n" }, { ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20665761/" ]
74,655,223
<p>I´m using flutter version 3.4.0 with cloud_firestore version ^4.1.0 and I´m getting this error: `Execution failed for task ':app:processDebugMainManifest'</p> <blockquote> <p>Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:cloud_firestore]`</p> </blockquote>...
[ { "answer_id": 74655391, "author": "RJ Adriaansen", "author_id": 11380795, "author_profile": "https://Stackoverflow.com/users/11380795", "pm_score": 2, "selected": true, "text": "plot_history = {score: [history[f\"tl_{score}\"], history[f\"ft_{score}\"]] for score in scores}\n" }, { ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14448339/" ]
74,655,251
<p>I am designing a string based game where the real time positions of characters are represented as a <em>string</em> as follows: <code> -----A-----o-----</code> I am changing the position of the character &quot;A&quot; based upon user keyboard inputs eg: updated position: <code> --------A--o-----</code></p> <p>...
[ { "answer_id": 74655391, "author": "RJ Adriaansen", "author_id": 11380795, "author_profile": "https://Stackoverflow.com/users/11380795", "pm_score": 2, "selected": true, "text": "plot_history = {score: [history[f\"tl_{score}\"], history[f\"ft_{score}\"]] for score in scores}\n" }, { ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20615351/" ]
74,655,261
<p>I use PostgreSQL</p> <p>I can run a single query per day, but it will take a long time to go through every day.</p> <p>The &quot;zone&quot; and &quot;reader&quot; also changes, so to run single queries every time will keep me up until late. If at best I can only change the &quot;reader&quot; and &quot;zone&quot; eve...
[ { "answer_id": 74655391, "author": "RJ Adriaansen", "author_id": 11380795, "author_profile": "https://Stackoverflow.com/users/11380795", "pm_score": 2, "selected": true, "text": "plot_history = {score: [history[f\"tl_{score}\"], history[f\"ft_{score}\"]] for score in scores}\n" }, { ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20665852/" ]
74,655,327
<p>On my website, I show some products with a condition - if the product has a <code>test</code> tag:</p> <pre><code>{% if product.tags contains 'test' %} // render product {% endif %} </code></pre> <p>And this way I get only some products, but the native product filter still displays the count of all products. I'll...
[ { "answer_id": 74655391, "author": "RJ Adriaansen", "author_id": 11380795, "author_profile": "https://Stackoverflow.com/users/11380795", "pm_score": 2, "selected": true, "text": "plot_history = {score: [history[f\"tl_{score}\"], history[f\"ft_{score}\"]] for score in scores}\n" }, { ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13573444/" ]
74,655,357
<p>I want to do a search in my Database, that gives me the id of all fields, that a given string would contain. So if I have the string &quot;a, b, c&quot; and the fields a and b i want them to be shown. Is there an easy way to do it with SQL? My mind seems to be stuck right now.</p> <p>I could use the LIKE operator on...
[ { "answer_id": 74655391, "author": "RJ Adriaansen", "author_id": 11380795, "author_profile": "https://Stackoverflow.com/users/11380795", "pm_score": 2, "selected": true, "text": "plot_history = {score: [history[f\"tl_{score}\"], history[f\"ft_{score}\"]] for score in scores}\n" }, { ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17020331/" ]
74,655,384
<p>i need to delete the object real-time from frontend as well as backend my, The object gets deleted from the backend instantly but it do not reflects in the frontend till the page is refreshed</p> <p>//delete component</p> <pre><code>deleteStory(id : string){ console.log(id) this.storyapiService.deleteStory(id).s...
[ { "answer_id": 74656713, "author": "dacx", "author_id": 11264793, "author_profile": "https://Stackoverflow.com/users/11264793", "pm_score": 0, "selected": false, "text": "deleteStory()" } ]
2022/12/02
[ "https://Stackoverflow.com/questions/74655384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20622036/" ]
74,655,392
<p>suppose i have a dataframe</p> <blockquote> <p>df = pd.DataFrame({&quot;age&quot; : [0, 5, 10, 15, 20], &quot;income&quot;: [5, 13, 23, 18, 12]})</p> <pre><code> age income 0 0 5 1 5 13 2 10 23 3 15 18 4 20 12 </code></pre> </blockquote> <p>i want to iterate through df[&quot;i...
[ { "answer_id": 74655585, "author": "AschenAI", "author_id": 20665111, "author_profile": "https://Stackoverflow.com/users/20665111", "pm_score": 0, "selected": false, "text": "sumproducts = [income[x] + income[x+1] * (age[x] - age[x+1]) + income[x+2] * (age[x] - age[x+2]) + income[x+3] * ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20339178/" ]
74,655,399
<p>Using the below SQL but getting error in case statement inside where clause.</p> <pre><code>create procedure MyProcedure @ApprovalFilter as nvarchar(50), @BothPendingAndApproved as nvarchar(50) Select * from myTable Where data = &quot;A&quot; and case @BothPendingAndApproved ...
[ { "answer_id": 74655585, "author": "AschenAI", "author_id": 20665111, "author_profile": "https://Stackoverflow.com/users/20665111", "pm_score": 0, "selected": false, "text": "sumproducts = [income[x] + income[x+1] * (age[x] - age[x+1]) + income[x+2] * (age[x] - age[x+2]) + income[x+3] * ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4025652/" ]
74,655,428
<p>I'm woriking on a site, and trying to make a sidebar in which I put my image before some text in</p> <pre><code>&lt;a&gt; &lt;/a&gt; tags </code></pre> <p>I've made a new empty project to test if I messed up something in my previous one, but no Even in a new empty one background image won't show itself here is the c...
[ { "answer_id": 74655504, "author": "Salketer", "author_id": 1620194, "author_profile": "https://Stackoverflow.com/users/1620194", "pm_score": 3, "selected": true, "text": "<span style=\"background:red;\"></span>\n\n<span style=\"background:lightblue;\">Test</span> display:inline-block di...
2022/12/02
[ "https://Stackoverflow.com/questions/74655428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20585137/" ]
74,655,458
<p>I could not comprehend in Kafka documentation is what is the exact need of partitioning a topic? What is the issue if it were only one topic with no partition (or one partition only).</p>
[ { "answer_id": 74655504, "author": "Salketer", "author_id": 1620194, "author_profile": "https://Stackoverflow.com/users/1620194", "pm_score": 3, "selected": true, "text": "<span style=\"background:red;\"></span>\n\n<span style=\"background:lightblue;\">Test</span> display:inline-block di...
2022/12/02
[ "https://Stackoverflow.com/questions/74655458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20135226/" ]
74,655,545
<p>I have object CartItem and Product. I need to make one List&lt;&gt; from these 2 objects.</p> <p>Tried: <code>List&lt;(CartItem,Product)&gt; product = new List&lt;(CartItem,Product)&gt;();</code></p> <p>Code:</p> <pre><code> public async Task&lt;IActionResult&gt; Index() { var username = Use...
[ { "answer_id": 74655641, "author": "Ascyt", "author_id": 16234971, "author_profile": "https://Stackoverflow.com/users/16234971", "pm_score": 0, "selected": false, "text": "struct EntireProduct\n{\n CartItem cartItem;\n Product product;\n}\n List<EntireProduct> product = new List<En...
2022/12/02
[ "https://Stackoverflow.com/questions/74655545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20261764/" ]
74,655,549
<p>Here I have this code:</p> <p>N = int(input())</p> <p>Tmp=n</p> <p>While tmp&gt;0 :</p> <p>Print(n)</p> <p>Tmp-=1</p> <p>But for ex: when I have:</p> <p>3</p> <p>2</p> <p>1</p> <p>0</p> <p>As entered nums, it just prints:</p> <p>3</p> <p>3</p> <p>3</p> <p>But I need to print:</p> <p>3</p> <p>3</p> <p>3</p> <p>2</p> ...
[ { "answer_id": 74655587, "author": "rymanso", "author_id": 6716421, "author_profile": "https://Stackoverflow.com/users/6716421", "pm_score": 1, "selected": false, "text": "print(tmp) print(n) n = int(input())\n\ntmp=n\n\nwhile tmp > 0:\n for _ in range(tmp)\n print(tmp)\n tmp -= 1\n...
2022/12/02
[ "https://Stackoverflow.com/questions/74655549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17721501/" ]
74,655,565
<p>I have a table &quot;products&quot; with a column called &quot;store_id&quot;. This table has a lot af products from many stores. I need to select 4 random products from 4 specific stores (id: 1, 34, 45, 100). How can I do that?</p> <p>I've tried to like this:</p> <pre><code>SELECT * FROM products WHERE store_id IN ...
[ { "answer_id": 74655587, "author": "rymanso", "author_id": 6716421, "author_profile": "https://Stackoverflow.com/users/6716421", "pm_score": 1, "selected": false, "text": "print(tmp) print(n) n = int(input())\n\ntmp=n\n\nwhile tmp > 0:\n for _ in range(tmp)\n print(tmp)\n tmp -= 1\n...
2022/12/02
[ "https://Stackoverflow.com/questions/74655565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17171093/" ]
74,655,574
<p>I have a column called DOB which has dates formatted 31.07.1983 for example.</p> <p>My data frame is named users_pd.</p> <p>I want to add a column that has the current age of the customer based off the existing DOB column.</p> <p>from datetime import date, timedelta</p> <p>users_pd[&quot;Age&quot;] = (date.today() -...
[ { "answer_id": 74655587, "author": "rymanso", "author_id": 6716421, "author_profile": "https://Stackoverflow.com/users/6716421", "pm_score": 1, "selected": false, "text": "print(tmp) print(n) n = int(input())\n\ntmp=n\n\nwhile tmp > 0:\n for _ in range(tmp)\n print(tmp)\n tmp -= 1\n...
2022/12/02
[ "https://Stackoverflow.com/questions/74655574", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20408318/" ]
74,655,607
<p>I have a file that does dangerous jobs and must be used as CLI with <code>node</code> command directly. How can I be sure no developer ever imports it as module with <code>import 'file.js'</code> syntax in current project?</p>
[ { "answer_id": 74655587, "author": "rymanso", "author_id": 6716421, "author_profile": "https://Stackoverflow.com/users/6716421", "pm_score": 1, "selected": false, "text": "print(tmp) print(n) n = int(input())\n\ntmp=n\n\nwhile tmp > 0:\n for _ in range(tmp)\n print(tmp)\n tmp -= 1\n...
2022/12/02
[ "https://Stackoverflow.com/questions/74655607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13689893/" ]
74,655,650
<p>How to loop through an array of object got similar key and different value for Example if,</p> <pre><code>arrayOfObjects = [ { parent: 'relatedParty', child: 'role === CEO', andOr = '&amp;&amp;' } { parent: 'relatedParty', child: 'name === Arun' , andOr = '||'} { parent: 'relatedParty', child: ' id === 123', andOr =...
[ { "answer_id": 74655587, "author": "rymanso", "author_id": 6716421, "author_profile": "https://Stackoverflow.com/users/6716421", "pm_score": 1, "selected": false, "text": "print(tmp) print(n) n = int(input())\n\ntmp=n\n\nwhile tmp > 0:\n for _ in range(tmp)\n print(tmp)\n tmp -= 1\n...
2022/12/02
[ "https://Stackoverflow.com/questions/74655650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19423607/" ]
74,655,653
<p>How to incorporate proof aspects into the specification so that every function and procedure has a Post aspect and, if required, a Pre aspect that outlines the proper behaviour of the code below:</p> <pre><code>package Stack with SPARK_Mode is pragma Elaborate_Body; Stack_Size : constant := 100; type Pointer_...
[ { "answer_id": 74655587, "author": "rymanso", "author_id": 6716421, "author_profile": "https://Stackoverflow.com/users/6716421", "pm_score": 1, "selected": false, "text": "print(tmp) print(n) n = int(input())\n\ntmp=n\n\nwhile tmp > 0:\n for _ in range(tmp)\n print(tmp)\n tmp -= 1\n...
2022/12/02
[ "https://Stackoverflow.com/questions/74655653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20261045/" ]
74,655,661
<p>I need to convert this javascript code to jquery. How to do it?</p> <pre class="lang-js prettyprint-override"><code>import lightGallery from &quot;https://cdn.skypack.dev/lightgallery@2.0.0-beta.4&quot;; import lgThumbnail from &quot;https://cdn.skypack.dev/lightgallery@2.0.0-beta.4/plugins/thumbnail&quot;; const ...
[ { "answer_id": 74655587, "author": "rymanso", "author_id": 6716421, "author_profile": "https://Stackoverflow.com/users/6716421", "pm_score": 1, "selected": false, "text": "print(tmp) print(n) n = int(input())\n\ntmp=n\n\nwhile tmp > 0:\n for _ in range(tmp)\n print(tmp)\n tmp -= 1\n...
2022/12/02
[ "https://Stackoverflow.com/questions/74655661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18764312/" ]
74,655,670
<p>A friend asked me for a way to untrack a file from a time point on for the future - but being able to git checkup to a state where the file was still tracked by git. Aim is to keep the file locally but prevent for future commits</p> <p>I googled in the past for this - and read several stackoverflow answers to simila...
[ { "answer_id": 74655904, "author": "Brandon Kauffman", "author_id": 14256876, "author_profile": "https://Stackoverflow.com/users/14256876", "pm_score": 1, "selected": false, "text": "git rm file_name" }, { "answer_id": 74656163, "author": "matt", "author_id": 341994, ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655670", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9690090/" ]
74,655,676
<p>I am trying to get sprite from Image in Unity but I am facing an issue. I am using this code:</p> <pre><code>void Start () { Sprite sprite = this.gameObject.GetComponent&lt;Image&gt; ().sprite; if (sprite == null) { Debug.Log (&quot;NULL&quot;); } else { Debug.Log (&quot;NO...
[ { "answer_id": 74655904, "author": "Brandon Kauffman", "author_id": 14256876, "author_profile": "https://Stackoverflow.com/users/14256876", "pm_score": 1, "selected": false, "text": "git rm file_name" }, { "answer_id": 74656163, "author": "matt", "author_id": 341994, ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17561671/" ]
74,655,686
<p>I'm currently learning the flexbox CSS concept, and I'm trying to create a navbar with it.</p> <p>I want to make my search bar like <a href="https://i.stack.imgur.com/cRAAG.png" rel="nofollow noreferrer">this</a></p> <p>And this is the picture of what I'm working on <a href="https://i.stack.imgur.com/N0Oub.png" rel=...
[ { "answer_id": 74655774, "author": "Jaswinder Kaur", "author_id": 15258737, "author_profile": "https://Stackoverflow.com/users/15258737", "pm_score": 3, "selected": true, "text": ".search-bar {\n background: #fff;\n border-radius: 50px;\n padding-right: 17px;\n}\n.fa.fa-search {...
2022/12/02
[ "https://Stackoverflow.com/questions/74655686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20665984/" ]
74,655,705
<p>I am having trouble adding the Ports field in <code>ServiceSpec</code>. What am I doing wrong?</p> <pre class="lang-golang prettyprint-override"><code>import ( corev1 &quot;k8s.io/api/core/v1&quot; metav1 &quot;k8s.io/apimachinery/pkg/apis/meta/v1&quot; ) port := corev1.ServicePort{} port.Port = 844...
[ { "answer_id": 74655774, "author": "Jaswinder Kaur", "author_id": 15258737, "author_profile": "https://Stackoverflow.com/users/15258737", "pm_score": 3, "selected": true, "text": ".search-bar {\n background: #fff;\n border-radius: 50px;\n padding-right: 17px;\n}\n.fa.fa-search {...
2022/12/02
[ "https://Stackoverflow.com/questions/74655705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3263650/" ]
74,655,715
<p>If I pass in &quot;largest countries&quot; as an argument, I want it to return the respective string in the condition and all the countries in this array [&quot;China&quot;, &quot;India&quot;, &quot;USA&quot;]. If I pass in &quot;best fruits&quot; as an argument, I want it to return the respective string in the cond...
[ { "answer_id": 74655772, "author": "David", "author_id": 328193, "author_profile": "https://Stackoverflow.com/users/328193", "pm_score": 2, "selected": false, "text": "Array.prototype.join let sentenceC = document.getElementById(\"constructed\")\n\nfunction generateSentence(desc, arr) {\...
2022/12/02
[ "https://Stackoverflow.com/questions/74655715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18722715/" ]
74,655,734
<p>I have an array of items. <code>const inputArray = [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;,&quot;f&quot;]</code></p> <p>I want to determine whether the entries are coming from an odd pair or an even pair. It should look something like this:</p> <pre><code>doesEntryComeFromOddPair(input...
[ { "answer_id": 74655772, "author": "David", "author_id": 328193, "author_profile": "https://Stackoverflow.com/users/328193", "pm_score": 2, "selected": false, "text": "Array.prototype.join let sentenceC = document.getElementById(\"constructed\")\n\nfunction generateSentence(desc, arr) {\...
2022/12/02
[ "https://Stackoverflow.com/questions/74655734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19248527/" ]
74,655,743
<p>I would like to use node (in my backend) to convert a large PDF with many (hundreds!) of pages to individual jpgs to store them in a database for further purposes.</p> <p>For this I have chosen the npm package &quot;gm&quot; which uses &quot;graphicsmagick&quot; in the background.</p> <p>I have encountered several b...
[ { "answer_id": 74655772, "author": "David", "author_id": 328193, "author_profile": "https://Stackoverflow.com/users/328193", "pm_score": 2, "selected": false, "text": "Array.prototype.join let sentenceC = document.getElementById(\"constructed\")\n\nfunction generateSentence(desc, arr) {\...
2022/12/02
[ "https://Stackoverflow.com/questions/74655743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15791388/" ]
74,655,748
<p>I have string(nvarchar) from db data and I would like to transfer it to numbers only. I was searching on Google for solution but I didnt find anything. I found something similiar here on StackOverflow but everything was removing characters only from left side, but if there is any character on right side or between n...
[ { "answer_id": 74656107, "author": "Stu", "author_id": 15332650, "author_profile": "https://Stackoverflow.com/users/15332650", "pm_score": 0, "selected": false, "text": "select Replace(Translate('4710000 text', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', Replicate('*', 26)), '*', '');\n 26" }, { ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17654495/" ]
74,655,756
<p>I have a numpy array of pixel data, something like</p> <pre><code>0 0 0 0 0 0 0 0 1 3 4 6 1 0 0 2 3 5 2 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 </code></pre> <p>I would like to get a new array which excludes any outer rows/columns with zeroes, so I just end up with only the non-zero values (that works for any given array) i...
[ { "answer_id": 74656220, "author": "Jiya", "author_id": 12017533, "author_profile": "https://Stackoverflow.com/users/12017533", "pm_score": 0, "selected": false, "text": "[[ 0 0 0 ... 0 0 0]\n [ 0 0 0 ... 0 0 0]\n [ 0 0 1872 ... 1765 0 0]\n .....
2022/12/02
[ "https://Stackoverflow.com/questions/74655756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2047830/" ]
74,655,757
<p>I have a nested tabs navigator inside a stack navigator.</p> <ul> <li>When I navigate from Tab Screen A to Stack Screen B, B's useEffect is called, all good.</li> <li>When I navigate from Stack Screen C to also Stack Screen B, B's useEffect is NOT called. I dont understand why. -I am able to navigate to Screen B fro...
[ { "answer_id": 74655917, "author": "JSONCMD", "author_id": 20629269, "author_profile": "https://Stackoverflow.com/users/20629269", "pm_score": 1, "selected": false, "text": "navigation.replace(\"SearchResults\", null, null)\n" }, { "answer_id": 74656018, "author": "NAZIR HUSS...
2022/12/02
[ "https://Stackoverflow.com/questions/74655757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6377312/" ]
74,655,783
<p>I don't know how to select, in proc sql, the min for positive values of diff (to have the 25/11/2022) and the max for negatives diff (to have the 11/11/2022).</p> <p><a href="https://i.stack.imgur.com/5kyF1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5kyF1.png" alt="enter image description her...
[ { "answer_id": 74655917, "author": "JSONCMD", "author_id": 20629269, "author_profile": "https://Stackoverflow.com/users/20629269", "pm_score": 1, "selected": false, "text": "navigation.replace(\"SearchResults\", null, null)\n" }, { "answer_id": 74656018, "author": "NAZIR HUSS...
2022/12/02
[ "https://Stackoverflow.com/questions/74655783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14002405/" ]
74,655,786
<p>For my database I need to create a new column based on a condition. In a seperate file I have add all the conditions like this:</p> <pre><code>conditions = [{year: 2016, price: 30000, fuel: Petrol, result: 12}, {year: 2017, price: 45000, fuel: Elektricity, result: 18}, {year: 2018, price:...
[ { "answer_id": 74655917, "author": "JSONCMD", "author_id": 20629269, "author_profile": "https://Stackoverflow.com/users/20629269", "pm_score": 1, "selected": false, "text": "navigation.replace(\"SearchResults\", null, null)\n" }, { "answer_id": 74656018, "author": "NAZIR HUSS...
2022/12/02
[ "https://Stackoverflow.com/questions/74655786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13680411/" ]
74,655,798
<p>I'm using Firebase Realtime database to add chat features to my app. In the database I have the following data:</p> <pre><code>{ events: { &quot;event-uuid1&quot;: { &quot;chat-uuid1&quot;: { &quot;message&quot;: &quot;hey&quot; }, &quot;chat-uuid2&quot...
[ { "answer_id": 74656020, "author": "GrahamD", "author_id": 10376604, "author_profile": "https://Stackoverflow.com/users/10376604", "pm_score": 1, "selected": true, "text": "eventDbRef.onChildAdded" }, { "answer_id": 74656081, "author": "Delwinn", "author_id": 16714498, ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6327846/" ]
74,655,807
<p>I need to sort array of objects by 2 conditions</p> <ol> <li>sort by value</li> <li>if names are the same show them next to each other in value order</li> </ol> <p>Example example: <a href="https://codesandbox.io/s/relaxed-dhawan-sfryng?file=/src/index.js" rel="nofollow noreferrer">https://codesandbox.io/s/relaxed-...
[ { "answer_id": 74655851, "author": "AschenAI", "author_id": 20665111, "author_profile": "https://Stackoverflow.com/users/20665111", "pm_score": 1, "selected": false, "text": "Array.prototype.sort() function sortByValueAndName(a, b) {\n // If the values are different, sort by value\n if...
2022/12/02
[ "https://Stackoverflow.com/questions/74655807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17126247/" ]
74,655,823
<p>I have an application written in the electron module. When I add a script from a JS file to an html file or enter a script between &lt;script&gt; tags and define a new module, I get an error: <strong>ReferenceError: require is not defined</strong></p> <p>This is my HTML script: <code>&lt;script src=&quot;../scripts/...
[ { "answer_id": 74655851, "author": "AschenAI", "author_id": 20665111, "author_profile": "https://Stackoverflow.com/users/20665111", "pm_score": 1, "selected": false, "text": "Array.prototype.sort() function sortByValueAndName(a, b) {\n // If the values are different, sort by value\n if...
2022/12/02
[ "https://Stackoverflow.com/questions/74655823", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20557852/" ]
74,655,835
<p>I implemented a progress bar but I'm having problems.</p> <p>The progress bar to complete should take 5 seconds. My problem is that the value is updated from second to second and I would like it to be continuous, without any kind of stops.</p> <p><a href="https://stackblitz.com/edit/angular-devextreme-sandbox-t66yne...
[ { "answer_id": 74655851, "author": "AschenAI", "author_id": 20665111, "author_profile": "https://Stackoverflow.com/users/20665111", "pm_score": 1, "selected": false, "text": "Array.prototype.sort() function sortByValueAndName(a, b) {\n // If the values are different, sort by value\n if...
2022/12/02
[ "https://Stackoverflow.com/questions/74655835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12460041/" ]
74,655,844
<p>I have the following problem: I've have created a repository and made changes to it, and commited them in git. Now, I've realized that the name of the repository is wrong, and I have created another with the right name, and I wonder if there is a way to import all the code (together with the changes I've made) in th...
[ { "answer_id": 74655851, "author": "AschenAI", "author_id": 20665111, "author_profile": "https://Stackoverflow.com/users/20665111", "pm_score": 1, "selected": false, "text": "Array.prototype.sort() function sortByValueAndName(a, b) {\n // If the values are different, sort by value\n if...
2022/12/02
[ "https://Stackoverflow.com/questions/74655844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20666361/" ]
74,655,864
<p>I have the following pipeline and html template, but the app always displays <code>#noMatch</code> and doesn't logs <code>&quot;in the pipe&quot;</code> in the <code>reduce</code> function. I feel it's a matter of timing but I'm not able to fix it.</p> <p><strong>ts</strong></p> <pre><code>user$: Observable&lt;User&...
[ { "answer_id": 74656129, "author": "Salketer", "author_id": 1620194, "author_profile": "https://Stackoverflow.com/users/1620194", "pm_score": 3, "selected": true, "text": "user$: Observable<User> = new Observable<User>();\nmatches$: Observable<User[]> = this.user$.pipe(\n switchMap((use...
2022/12/02
[ "https://Stackoverflow.com/questions/74655864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16807584/" ]
74,655,872
<p>I am loading fonts from my local for website. @font-face doesnt work properly. Some font weights doesnt work. Only work bold ones. When I changed font weight for light,lighter,400-500 etc it doesnt work. I'm stuck completely. Anybody help?</p> <p>My Network: <a href="https://i.stack.imgur.com/wCM4Q.jpg" rel="nofoll...
[ { "answer_id": 74657415, "author": "pier farrugia", "author_id": 19996700, "author_profile": "https://Stackoverflow.com/users/19996700", "pm_score": 0, "selected": false, "text": "@font-face {\n font-family: \"Gotham Narrow\";\n src: url(\"assets-new/font/GothamNarrow-Book.eot\") ;\n ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17768986/" ]
74,655,880
<p>I want to convert only numbers in this str</p> <pre><code>&quot;ABC234TSY65234525erQ&quot; </code></pre> <p>I tried to change only areas with numbers to the * sign</p> <p>This is what I wanted</p> <pre><code>&quot;ABC*TSY*erQ&quot; </code></pre> <p>But when I actually did it, it came out like this</p> <pre><code>&qu...
[ { "answer_id": 74657415, "author": "pier farrugia", "author_id": 19996700, "author_profile": "https://Stackoverflow.com/users/19996700", "pm_score": 0, "selected": false, "text": "@font-face {\n font-family: \"Gotham Narrow\";\n src: url(\"assets-new/font/GothamNarrow-Book.eot\") ;\n ...
2022/12/02
[ "https://Stackoverflow.com/questions/74655880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10304086/" ]
74,655,906
<p>I have a Vue project and need to search an array with nested objects for a specific object and then return it. The user has a text input field for searching and the search should target &quot;title&quot;.</p> <p>The data looks like this:</p> <pre><code>const data = [{ &quot;catId&quot;: &quot;1&quot;, &quot...
[ { "answer_id": 74655945, "author": "AschenAI", "author_id": 20665111, "author_profile": "https://Stackoverflow.com/users/20665111", "pm_score": 0, "selected": false, "text": "Array.prototype.find() const data = [\n {\n catId: \"1\",\n catTitle: \"a\",\n exampleArray: [\n {...
2022/12/02
[ "https://Stackoverflow.com/questions/74655906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20666131/" ]
74,655,908
<p>I have a validated JSON file with all the languages of the world. I am trying to populate a list on a Vue 3 app but cannot seem to get it right. My lack of experience forces me to ask how do I access the inner parts of an object.</p> <p>JSON file (shortened):</p> <pre><code>[ { &quot;code&quot;: &quot;ab&quot;, ...
[ { "answer_id": 74655945, "author": "AschenAI", "author_id": 20665111, "author_profile": "https://Stackoverflow.com/users/20665111", "pm_score": 0, "selected": false, "text": "Array.prototype.find() const data = [\n {\n catId: \"1\",\n catTitle: \"a\",\n exampleArray: [\n {...
2022/12/02
[ "https://Stackoverflow.com/questions/74655908", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9361135/" ]
74,655,911
<p>I'm trying to extract text from <BR> tag. But unfortunately nothing worked for me.</p> <pre><code>&lt;div id=&quot;sign_in&quot; class=&quot;sign_in&quot;&gt; &lt;h4&gt;usernames lists:&lt;/h4&gt; user_1 &lt;br&gt; user_2 &lt;br&gt; user_3 &lt;br&gt; user_4 &lt;br&gt; &lt;/div&gt;...
[ { "answer_id": 74655945, "author": "AschenAI", "author_id": 20665111, "author_profile": "https://Stackoverflow.com/users/20665111", "pm_score": 0, "selected": false, "text": "Array.prototype.find() const data = [\n {\n catId: \"1\",\n catTitle: \"a\",\n exampleArray: [\n {...
2022/12/02
[ "https://Stackoverflow.com/questions/74655911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20666408/" ]
74,655,919
<p>I have the following code.</p> <p>I want to go through the 'outlierdataframe' dataframe <strong>row by row</strong> and <strong>explode the values</strong> in the 'x' and 'y' columns.</p> <p>For each exploded row, I then want to store this exploded row as its own <strong>dataframe</strong>, with <strong>columns 'new...
[ { "answer_id": 74656105, "author": "Caledonian26", "author_id": 12985497, "author_profile": "https://Stackoverflow.com/users/12985497", "pm_score": 0, "selected": false, "text": "individualframe = outlierdataframe.iloc[0]\nindividualoutliers1 = individualframe[['x']].explode('x')\nindivi...
2022/12/02
[ "https://Stackoverflow.com/questions/74655919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12985497/" ]
74,655,952
<p>I want to use Redis through docker for the cache but got this error.</p> <pre class="lang-none prettyprint-override"><code>django.core.cache.backends.base.InvalidCacheBackendError: Could not find backend 'django.core.cache.backends.redis.RedisCache': No module named 'django.core.cache.backends.redis' </code></pre> <...
[ { "answer_id": 74656019, "author": "lucutzu33", "author_id": 8770336, "author_profile": "https://Stackoverflow.com/users/8770336", "pm_score": 0, "selected": false, "text": "django-redis" }, { "answer_id": 74656401, "author": "scūriolus", "author_id": 12236313, "autho...
2022/12/02
[ "https://Stackoverflow.com/questions/74655952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20613517/" ]
74,655,963
<p>In my project, I am working with the redux store and that data will store in local storage. On every new update, local storage will update and as per local storage, my component will render with forEach method.</p> <p>With the below code, I am getting the data from local storage.</p> <pre><code>const ShowMyFlashcard...
[ { "answer_id": 74656019, "author": "lucutzu33", "author_id": 8770336, "author_profile": "https://Stackoverflow.com/users/8770336", "pm_score": 0, "selected": false, "text": "django-redis" }, { "answer_id": 74656401, "author": "scūriolus", "author_id": 12236313, "autho...
2022/12/02
[ "https://Stackoverflow.com/questions/74655963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19317459/" ]
74,655,983
<p>How would I align the <code>&lt;a&gt;</code> element, containing the Button with the string <code>Push Me</code> to the right side of the <code>&lt;div&gt;</code> (<code>&lt;Paper&gt;</code>)?</p> <p><a href="https://codesandbox.io/s/eager-noyce-j356qe" rel="nofollow noreferrer">https://codesandbox.io/s/eager-noyce-...
[ { "answer_id": 74656019, "author": "lucutzu33", "author_id": 8770336, "author_profile": "https://Stackoverflow.com/users/8770336", "pm_score": 0, "selected": false, "text": "django-redis" }, { "answer_id": 74656401, "author": "scūriolus", "author_id": 12236313, "autho...
2022/12/02
[ "https://Stackoverflow.com/questions/74655983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3935035/" ]
74,656,004
<p>I have several category dummies that are mutually exclusive</p> <pre><code>id cat1 cat2 cat3 A 0 0 1 B 1 0 0 C 1 0 0 D 0 0 1 E 0 1 0 F 0 0 1 .. </code></pre> <p>I want to create a new column that contains all categories</p> <pre><code>id cat1 cat2 cat3 type A ...
[ { "answer_id": 74656035, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 2, "selected": true, "text": "pandas.from_dummies filter df['type'] = pd.from_dummies(df.filter(like='cat'))\n id cat1 cat2 cat3 type\n0 A ...
2022/12/02
[ "https://Stackoverflow.com/questions/74656004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14790056/" ]
74,656,012
<pre><code>int a = 5; int b = a; //error, a is not a constant expression int main(void) { static int c = a; //error, a is not a constant expression int d = a; //okay, a don't have to be a constant expression return 0; } </code></pre> <ol> <li><p>I don't understand what happens when a C compiler handles those va...
[ { "answer_id": 74656125, "author": "Eric Postpischil", "author_id": 298225, "author_profile": "https://Stackoverflow.com/users/298225", "pm_score": 2, "selected": false, "text": "int a = 5; int b = a; a b a int b = a; b int b = a; main int b = a; main b main" }, { "answer_id": 74...
2022/12/02
[ "https://Stackoverflow.com/questions/74656012", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20142751/" ]
74,656,116
<p>As you can see in my index.html page, I am adding two javascript file in a single page, one is for menu drop down and another is for readmore option.i'm new to javascript please help.when i add both last one file is work only first file cannot work .</p> <pre><code> &quot;index.html&quot; &lt;!DOCTYPE html&gt; &lt;...
[ { "answer_id": 74660423, "author": "Tiddo", "author_id": 532901, "author_profile": "https://Stackoverflow.com/users/532901", "pm_score": 1, "selected": false, "text": "myFunction myFunction" }, { "answer_id": 74660671, "author": "Keke675", "author_id": 18931610, "auth...
2022/12/02
[ "https://Stackoverflow.com/questions/74656116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20519479/" ]
74,656,132
<p>Is it possible to get data of sub-documents by reading only the main document in Firestore? Basically, the Firebase <code>listCollections()</code> method gives the id of subcollections, but how can we get their data?</p> <p>I have tried for <code>listCollections()</code> to get the id of sub-collections, but have no...
[ { "answer_id": 74657117, "author": "renaud H", "author_id": 7032224, "author_profile": "https://Stackoverflow.com/users/7032224", "pm_score": 0, "selected": false, "text": "snapshot.forEach(doc =>{\nconsole.log(doc.id)\nconsole.log(doc.data())\n})\n\n" } ]
2022/12/02
[ "https://Stackoverflow.com/questions/74656132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18890260/" ]
74,656,137
<p>I'm trying to estimate the gradient of my graph.</p> <pre><code>#define the function def gradient(y1,y2,x1,x2): gradient = ((y1 - y2)/(x2 - x1)) y1 = 1.07 y2 = 1.39 x1 = 283 x2 = 373 print('The gradient of this graph is', gradient) </code></pre> <p>All it prints is</p> <pre><code>The gradient of ...
[ { "answer_id": 74657117, "author": "renaud H", "author_id": 7032224, "author_profile": "https://Stackoverflow.com/users/7032224", "pm_score": 0, "selected": false, "text": "snapshot.forEach(doc =>{\nconsole.log(doc.id)\nconsole.log(doc.data())\n})\n\n" } ]
2022/12/02
[ "https://Stackoverflow.com/questions/74656137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20618730/" ]
74,656,148
<p>I have an out from a tool, which is almost json.</p> <pre class="lang-json prettyprint-override"><code> {&quot;acquired&quot;: None, &quot;avail&quot;: True, &quot;cls&quot;: &quot;NetworkService&quot;, &quot;params&quot;: {&quot;address&quot;: &quot;192.168.7.193&quot;, &quot;password&quot;: &quot;root&qu...
[ { "answer_id": 74656324, "author": "jpseng", "author_id": 16332641, "author_profile": "https://Stackoverflow.com/users/16332641", "pm_score": 3, "selected": true, "text": "yq --input-format yaml --output-format json file.json\n {\n \"acquired\": \"None\",\n \"avail\": true,\n \"cls\":...
2022/12/02
[ "https://Stackoverflow.com/questions/74656148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1809810/" ]
74,656,156
<p>I'm trying to use the below command. Whenever I use this, memory usage is extremely high. Is there a way to lower memory usage while completing the same task?</p> <pre><code>Get-ChildItem -Path &quot;C:\&quot; -Recurse | sort -descending -property length | select -first 20 fullname, @{Name=&quot;Gigabytes&quot;...
[ { "answer_id": 74657999, "author": "Santiago Squarzon", "author_id": 15339544, "author_profile": "https://Stackoverflow.com/users/15339544", "pm_score": 2, "selected": false, "text": "SortedSet<T> IComparable IEquatable<T> $sorted.Count -lt 20 class SimpleFile : System.IComparable, Syste...
2022/12/02
[ "https://Stackoverflow.com/questions/74656156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10778022/" ]
74,656,186
<p>I have 2 directories, A and B. In A, I have subdirectories 1, 2, 3, 4 while in B I have 1 and 3. How can I highlight 2 and 4 easily? The contents of the subdirectories are the same, respectively, so I just want to compare the names.</p> <p>Mark -&gt; Compare Directories only compare files, but not directories.</p>
[ { "answer_id": 74660479, "author": "albina", "author_id": 20666497, "author_profile": "https://Stackoverflow.com/users/20666497", "pm_score": 1, "selected": false, "text": " $ diff A/ B/\n Common subdirectories: A/1 and B/1\n Only in A/: 2\n Common subdirectories: A/3 and B/3...
2022/12/02
[ "https://Stackoverflow.com/questions/74656186", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2354702/" ]
74,656,214
<pre><code>#include &lt;stdio.h&gt; struct dog { int name[10]; char breed[10]; int age; char color[10]; }; int main() { struct dog frodo; struct dog **ptr=&amp;frodo.name; for(int i=0;i&lt;10;i++) frodo.name[i]=i; for(int i=0;i&lt;10;i++) printf(&quot; frodo.name[%d]%d\n&quot;,i,frodo.name[i]); for...
[ { "answer_id": 74656255, "author": "tstanisl", "author_id": 4989451, "author_profile": "https://Stackoverflow.com/users/4989451", "pm_score": 1, "selected": false, "text": "ptr frodo.name int ptr int* int *ptr=&frodo.name[0];\n" }, { "answer_id": 74657521, "author": "Tim-Scha...
2022/12/02
[ "https://Stackoverflow.com/questions/74656214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20666363/" ]
74,656,225
<p>I have a use case in which i use linkedserver in my database sql server but i would like to handle this in wso2 instead of using linkedserver is it possible ? my use case that i have inner join between two table in different database server.</p> <p>My actual LinkedServer Query</p> <pre><code>SELECT local.name AS Loc...
[ { "answer_id": 74656255, "author": "tstanisl", "author_id": 4989451, "author_profile": "https://Stackoverflow.com/users/4989451", "pm_score": 1, "selected": false, "text": "ptr frodo.name int ptr int* int *ptr=&frodo.name[0];\n" }, { "answer_id": 74657521, "author": "Tim-Scha...
2022/12/02
[ "https://Stackoverflow.com/questions/74656225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17243183/" ]
74,656,240
<p>I have created a service to which i am subscribed to in my component, however, the div is not rendering at all when i use ngFor.</p> <p>Component.TS file</p> <pre><code> import { Component, OnInit } from '@angular/core'; import {FormBuilder, Validators} from '@angular/forms'; import { PlansService } from 'src/app/se...
[ { "answer_id": 74656255, "author": "tstanisl", "author_id": 4989451, "author_profile": "https://Stackoverflow.com/users/4989451", "pm_score": 1, "selected": false, "text": "ptr frodo.name int ptr int* int *ptr=&frodo.name[0];\n" }, { "answer_id": 74657521, "author": "Tim-Scha...
2022/12/02
[ "https://Stackoverflow.com/questions/74656240", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20231075/" ]
74,656,258
<p>ɵrenderComponent not found in в @angular/core v 15 How can I use this method in @angular/core v 15 ?</p> <pre><code>import { ɵrenderComponent, ɵdetectChanges, ɵLifecycleHooksFeature } from &quot;@angular/core&quot;; import { CompileComponent } from &quot;./compile-component.decorator&quot;; import &quot;./style.css&...
[ { "answer_id": 74656255, "author": "tstanisl", "author_id": 4989451, "author_profile": "https://Stackoverflow.com/users/4989451", "pm_score": 1, "selected": false, "text": "ptr frodo.name int ptr int* int *ptr=&frodo.name[0];\n" }, { "answer_id": 74657521, "author": "Tim-Scha...
2022/12/02
[ "https://Stackoverflow.com/questions/74656258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14606358/" ]
74,656,291
<p>I have this data frame where I sliced columns from the original data frame:</p> <pre><code>Type 1 Attack Grass 62 Grass 82 Dragon 100 Fire 52 Rock 100 </code></pre> <p>I want to create each Pokemon’s adjusted attack attribute against grass Pokemon based on ‘Type 1’ where;...
[ { "answer_id": 74656255, "author": "tstanisl", "author_id": 4989451, "author_profile": "https://Stackoverflow.com/users/4989451", "pm_score": 1, "selected": false, "text": "ptr frodo.name int ptr int* int *ptr=&frodo.name[0];\n" }, { "answer_id": 74657521, "author": "Tim-Scha...
2022/12/02
[ "https://Stackoverflow.com/questions/74656291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20585881/" ]
74,656,297
<p>I am very new to SQL. I have three tables, transactions, products, and customers. I want to know how many products have been sold with profit.</p> <pre><code>SELECT t.product_id, p.id, sum(t.total_price / t.quantity) - p.price As profit From transactions as t , products As p INNER JOIN transactions on t.product_i...
[ { "answer_id": 74656632, "author": "Javohir Xoldorov", "author_id": 16870814, "author_profile": "https://Stackoverflow.com/users/16870814", "pm_score": 0, "selected": false, "text": "SELECT t.product_id,sum(t.total_price / t.quantity - p.price) as profit\n FROM transactions as t\n I...
2022/12/02
[ "https://Stackoverflow.com/questions/74656297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19198536/" ]
74,656,303
<p>Despite the number of similar questions on Stackoverflow, I can't come up with a solution for the following Producer-Consumer problem:</p> <p>My program has three threads:</p> <ul> <li><p><em>One writer thread</em> that reads from a file, saves data into a <code>sensor_data_t</code> struct, and <strong>writes it int...
[ { "answer_id": 74656632, "author": "Javohir Xoldorov", "author_id": 16870814, "author_profile": "https://Stackoverflow.com/users/16870814", "pm_score": 0, "selected": false, "text": "SELECT t.product_id,sum(t.total_price / t.quantity - p.price) as profit\n FROM transactions as t\n I...
2022/12/02
[ "https://Stackoverflow.com/questions/74656303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11206079/" ]
74,656,346
<p>For readability purposes, I want to extract the NavigationBar composable in another function. Same with PreviousButton. Therefore I want to pass the mutableState of index to a these functions. But passing index as a parameter does not work, because I cannot update the state. What can I do?</p> <pre><code>@Composable...
[ { "answer_id": 74656632, "author": "Javohir Xoldorov", "author_id": 16870814, "author_profile": "https://Stackoverflow.com/users/16870814", "pm_score": 0, "selected": false, "text": "SELECT t.product_id,sum(t.total_price / t.quantity - p.price) as profit\n FROM transactions as t\n I...
2022/12/02
[ "https://Stackoverflow.com/questions/74656346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11120671/" ]
74,656,353
<p>I am struggling with window functions in SQL Server. I have a table that is tracking how many records were transferred. I wrote a query to sum how many rows are transferred for each parameter. However, at some point records had to be resend (they were dropped from the final location and resend). So, if I continue wi...
[ { "answer_id": 74656601, "author": "Giridhar R", "author_id": 20666700, "author_profile": "https://Stackoverflow.com/users/20666700", "pm_score": 0, "selected": false, "text": "SELECT\n parameter, \n SUM(rows) AS rows, \n MIN(min_id) AS min_id,\n MAX(max_id) AS max_id,\n MAX(cr...
2022/12/02
[ "https://Stackoverflow.com/questions/74656353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17159874/" ]
74,656,377
<p>I have code in postgresql transform to sql server In postgresql while inserting in table with data type timestamp with time zone in UTC format, it inserted with time zone</p> <pre><code>create table public.testt123 (tz timestamp with time zone) insert into public.testt123 select now() at time zone 'utc' select * ...
[ { "answer_id": 74656466, "author": "Dan Guzman", "author_id": 3711162, "author_profile": "https://Stackoverflow.com/users/3711162", "pm_score": 0, "selected": false, "text": "SYSDATETIMEOFFSET() datetimeoffset AT TIME ZONE 'UTC' datetimeoffset SYSDATETIMEOFFSET() AT TIME ZONE 'UTC'\n" ...
2022/12/02
[ "https://Stackoverflow.com/questions/74656377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20666592/" ]
74,656,407
<p>Is it possible to make a conditional that does not check part of the string when is not needed?</p> <p>For example:</p> <p>Regex: <code>^[a-zA-Z]+.*#[0-9]+$</code></p> <p>Example text: <code>feature: My name is Oliver #9123</code></p> <p>I would like to when the text being:</p> <p><code>release: My name is oliver</c...
[ { "answer_id": 74656476, "author": "Carsten Massmann", "author_id": 2610061, "author_profile": "https://Stackoverflow.com/users/2610061", "pm_score": 1, "selected": true, "text": "| const tests=[\"My name is Oliver #9123\",\n \"release: My name is oliver\",\n \"th...
2022/12/02
[ "https://Stackoverflow.com/questions/74656407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18484082/" ]
74,656,455
<p>I want to concatenate all 2 dimensional values in a dictionary.</p> <p>The number of rows of these values is always the same.</p> <pre class="lang-py prettyprint-override"><code>D = {'a': [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]], 'b': [[1, 1], [1, 1], [1, 1...
[ { "answer_id": 74656609, "author": "Will", "author_id": 12829151, "author_profile": "https://Stackoverflow.com/users/12829151", "pm_score": 0, "selected": false, "text": "from itertools import chain \nl = []\nfor i in range(len(D)):\n t = [ D[k][i] for k in D ] \n l.append( list...
2022/12/02
[ "https://Stackoverflow.com/questions/74656455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19106705/" ]
74,656,498
<p>I have input like this. I tried some solutions. But it doesn't work. I need to merge same <code>invoice_nr</code> objects to one array. Also I need other objects another array. All arrays must be another array.</p> <pre><code>const result = [ { invoice_nr: 16, order_id: 5577, color: 'red' }, { ...
[ { "answer_id": 74656585, "author": "Asraf", "author_id": 20361860, "author_profile": "https://Stackoverflow.com/users/20361860", "pm_score": 2, "selected": false, "text": ".reduce() invoice_nr const result = [ { invoice_nr: 16, order_id: 5577, color: 'red' }, { invoice_nr: 16, order_id: ...
2022/12/02
[ "https://Stackoverflow.com/questions/74656498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15863302/" ]
74,656,532
<p>I want to add a newline to the last element of an array I have tried this:</p> <pre><code>$array[-1] .= &quot;\n&quot;; </code></pre> <p>but I get the following error message:</p> <pre><code>Modification of non-creatable array value attempted, subscript -1 </code></pre> <p>I have tried a few other methods as well (w...
[ { "answer_id": 74656585, "author": "Asraf", "author_id": 20361860, "author_profile": "https://Stackoverflow.com/users/20361860", "pm_score": 2, "selected": false, "text": ".reduce() invoice_nr const result = [ { invoice_nr: 16, order_id: 5577, color: 'red' }, { invoice_nr: 16, order_id: ...
2022/12/02
[ "https://Stackoverflow.com/questions/74656532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4279387/" ]
74,656,689
<p>Hello so I've been trying to solve this problem but cant find anything I tried dictionaries and exec. How can I use string value as a variable name? I have a problem when I define a variable name in a string and try to make a button with the image it shows error - _tkinter.TclError: image &quot;score6&quot; doesn't ...
[ { "answer_id": 74656585, "author": "Asraf", "author_id": 20361860, "author_profile": "https://Stackoverflow.com/users/20361860", "pm_score": 2, "selected": false, "text": ".reduce() invoice_nr const result = [ { invoice_nr: 16, order_id: 5577, color: 'red' }, { invoice_nr: 16, order_id: ...
2022/12/02
[ "https://Stackoverflow.com/questions/74656689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19164904/" ]
74,656,745
<p>I am solving a pattern problem in python, i need to print a pattern in such a way it consists of <code>X</code> and the numbers are filled first in increasing order and then after reaching mid number, they go to decreasing order,</p> <p>basically i did what, i find out the area where the <code>X</code> will display...
[ { "answer_id": 74656585, "author": "Asraf", "author_id": 20361860, "author_profile": "https://Stackoverflow.com/users/20361860", "pm_score": 2, "selected": false, "text": ".reduce() invoice_nr const result = [ { invoice_nr: 16, order_id: 5577, color: 'red' }, { invoice_nr: 16, order_id: ...
2022/12/02
[ "https://Stackoverflow.com/questions/74656745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20666897/" ]
74,656,777
<p>I'm trying to remove outliers from a dataset, where an outlier is if the difference between one item and the next one is larger than 3 * the uncertainty on the item</p> <pre><code>def remove_outliers(data): for i in data: x = np.where(abs(i[1] - (i+1)[1]) &gt; 3( * data[:,2])) data_outliers_remo...
[ { "answer_id": 74656585, "author": "Asraf", "author_id": 20361860, "author_profile": "https://Stackoverflow.com/users/20361860", "pm_score": 2, "selected": false, "text": ".reduce() invoice_nr const result = [ { invoice_nr: 16, order_id: 5577, color: 'red' }, { invoice_nr: 16, order_id: ...
2022/12/02
[ "https://Stackoverflow.com/questions/74656777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20667026/" ]
74,656,782
<p>I have a dataframe like this:</p> <pre><code>df &lt;- data.frame(ID = c(1,2,3,4,5), Total = c(1,1,2,1,2), Ma = c(1,2,1,2,1), Mb = c(1,2,1,2,2), Md = c(1,2,1,2,1), Me = c(1,1,1,2,2)) </code></pre> <p>I'd like to add a column to ...
[ { "answer_id": 74656816, "author": "Sotos", "author_id": 5635580, "author_profile": "https://Stackoverflow.com/users/5635580", "pm_score": 2, "selected": false, "text": "apply(df[-1], 1, function(i)max(prop.table(table(i))))\n#[1] 1.0 0.6 0.8 0.8 0.6\n" }, { "answer_id": 74656825...
2022/12/02
[ "https://Stackoverflow.com/questions/74656782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16331793/" ]
74,656,885
<p>I'm coding project with codewars and have a trouble. This function has to check if parentheses in string are valid. My problem is when i assign i = 0 in function valid pair it's doesnt work . I tried assign it below if statement and then my loop is infinite. My idea is valid pairs and then start over and over while ...
[ { "answer_id": 74656816, "author": "Sotos", "author_id": 5635580, "author_profile": "https://Stackoverflow.com/users/5635580", "pm_score": 2, "selected": false, "text": "apply(df[-1], 1, function(i)max(prop.table(table(i))))\n#[1] 1.0 0.6 0.8 0.8 0.6\n" }, { "answer_id": 74656825...
2022/12/02
[ "https://Stackoverflow.com/questions/74656885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16881950/" ]
74,656,897
<p>if any of the webpage elements has <strong>is-open</strong> class, add <strong>open</strong> class to another div. doesn't work</p> <p><strong>is-open</strong> is added to div's each time a modal or tab is opened on the page.</p> <pre><code>&lt;script&gt; if($(&quot;.is-open&quot;).length){ $(&quot;.blur-screen&quot...
[ { "answer_id": 74656816, "author": "Sotos", "author_id": 5635580, "author_profile": "https://Stackoverflow.com/users/5635580", "pm_score": 2, "selected": false, "text": "apply(df[-1], 1, function(i)max(prop.table(table(i))))\n#[1] 1.0 0.6 0.8 0.8 0.6\n" }, { "answer_id": 74656825...
2022/12/02
[ "https://Stackoverflow.com/questions/74656897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9062202/" ]
74,656,931
<p>I am trying to build a battleship game and using functions. I wish to create and randomise 1 &amp; 0 in my array every time I run the function as seen in the array below</p> <p>Since it is a battlefield game, is there any way to make the 1s be in a row /column of 4/3/2/1? , to mimic the different sizes of the battle...
[ { "answer_id": 74657321, "author": "Salketer", "author_id": 1620194, "author_profile": "https://Stackoverflow.com/users/1620194", "pm_score": 0, "selected": false, "text": "continue; let battlefield = new Array(10*10).fill(0);\nplaceShip(3);\nplaceShip(4);\nplaceShip(4);\nplaceShip(5);\n...
2022/12/02
[ "https://Stackoverflow.com/questions/74656931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20667049/" ]
74,656,967
<p>I am learning Jetpack compose of Android Development.</p> <p>Sometimes, I use</p> <p>MaterialTheme.colors MaterialTheme.coloScheme</p> <p>because one of them shows red.</p> <p>For example,</p> <pre><code>Surface( color = MaterialTheme.colorScheme.primary, modifier = Modifier.padding(vertical = 4.dp, ...
[ { "answer_id": 74657216, "author": "Code Poet", "author_id": 5513788, "author_profile": "https://Stackoverflow.com/users/5513788", "pm_score": 0, "selected": false, "text": " Surface(\n color = MaterialTheme.colors.surface,\n contentColor = contentColorFor(color),\n // ...\n\...
2022/12/02
[ "https://Stackoverflow.com/questions/74656967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7877391/" ]
74,656,968
<p>I have a component that needs to be rendered under the <code>Home</code> page component. Now I have nested, but the component is not rendered. Although if you do without nesting, then everything works. How can I do this?</p> <pre><code>export default function App() { return ( &lt;div className=&quot;App&quot;&...
[ { "answer_id": 74657216, "author": "Code Poet", "author_id": 5513788, "author_profile": "https://Stackoverflow.com/users/5513788", "pm_score": 0, "selected": false, "text": " Surface(\n color = MaterialTheme.colors.surface,\n contentColor = contentColorFor(color),\n // ...\n\...
2022/12/02
[ "https://Stackoverflow.com/questions/74656968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20592580/" ]
74,656,973
<p>I have an array of objects that I get from an api, I get the data but I want to remove the ones that have a finish status after x time.</p> <p>First I must show all the records, after a certain time the records with FINISH status must be deleted</p> <p><strong>I am using vue.</strong></p> <p>This is the response I g...
[ { "answer_id": 74657051, "author": "Valerij Dobler", "author_id": 7082956, "author_profile": "https://Stackoverflow.com/users/7082956", "pm_score": 1, "selected": false, "text": "filter setInterval return data.filter(turn -> turn.status !== 'FINISHED');\n" }, { "answer_id": 74657...
2022/12/02
[ "https://Stackoverflow.com/questions/74656973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11429778/" ]
74,656,987
<p>So I have a JSON File with multiple arrays &quot;ID&quot; that I want to extract.</p> <pre><code>[ { &quot;ID&quot;: 318, &quot;Type&quot;: 0, &quot;Value&quot;: 3, }, { &quot;ID&quot;: 580, &quot;Type&quot;: 5, &quot;Value&quot;: 8, }, { &quot;ID&quot;: 23, &quot;Type...
[ { "answer_id": 74660004, "author": "David Ranieri", "author_id": 1606345, "author_profile": "https://Stackoverflow.com/users/1606345", "pm_score": 1, "selected": false, "text": "var result = json.map(({ ID }) => ID);\n return JSON.stringify(result);\n return JSON.stringify(result).slice(...
2022/12/02
[ "https://Stackoverflow.com/questions/74656987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20667017/" ]
74,656,999
<p>I am very VERY new to all things coding, and I have run into a bit of trouble. I have this method that generates a random number between 1 - 6 (its supposed to simulate a dice roll), and what I want to do is through an input enable the user to change how many sides the dices has (The second parameter of the int nr i...
[ { "answer_id": 74657121, "author": "kopagl", "author_id": 19689833, "author_profile": "https://Stackoverflow.com/users/19689833", "pm_score": 1, "selected": false, "text": "static int RullaTärning(Random slumpObjekt, int sides)\n{\n int nr = slumpObjekt.Next(1, sides);\n return nr;...
2022/12/02
[ "https://Stackoverflow.com/questions/74656999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20667139/" ]
74,657,022
<p>I have a circle after clicking on which a popup appears . This popup has a button to close it. But it doesn't work the way I want it to. I want the popup to close but not reload the page.</p> <p>I tried using onclick=&quot;this.parentNode.parentNode.remove(); return false;&quot; . But it doesn't work correctly. Plea...
[ { "answer_id": 74657108, "author": "Dylan Delobel", "author_id": 8338464, "author_profile": "https://Stackoverflow.com/users/8338464", "pm_score": -1, "selected": false, "text": "window.close() window.close() <button onclick=\"window.close()\">Close Window</button>\n button onclick windo...
2022/12/02
[ "https://Stackoverflow.com/questions/74657022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20601932/" ]