qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,401,209
<p>I've this code in the snippet. It's an intersection Observer that tracks visible headers and adds an &quot;active&quot; class to the corresponding anchor tag in the top nav.</p> <p>I would like to know if it's possible for the 'li' element with class &quot;active&quot; to also be scrolled into view.</p> <p>I have tr...
[ { "answer_id": 74428886, "author": "Jonas Weinhardt", "author_id": 16500604, "author_profile": "https://Stackoverflow.com/users/16500604", "pm_score": 2, "selected": true, "text": "active currentActiveElement.scrollIntoView() active window.addEventListener('DOMContentLoaded', () => {\n...
2022/11/11
[ "https://Stackoverflow.com/questions/74401209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7346175/" ]
74,401,212
<p>I want to aggregate a <code>pandas.Series</code> with an hourly <code>DatetimeIndex</code> to monthly values - while considering the offset to midnight.</p> <h2>Example</h2> <p>Consider the following (uniform) timeseries that spans about 1.5 months.</p> <pre class="lang-py prettyprint-override"><code>import pandas a...
[ { "answer_id": 74620786, "author": "Haleemur Ali", "author_id": 2570261, "author_profile": "https://Stackoverflow.com/users/2570261", "pm_score": 1, "selected": false, "text": "months = hours.resample('D', offset='06:00:00').sum().resample('MS').sum()\n freq MS hours.resample('MS', offse...
2022/11/11
[ "https://Stackoverflow.com/questions/74401212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2302262/" ]
74,401,221
<p>I am wondering is it possible to do voting for classification tasks. I have seen plenty of blogs explaining how to use voting for regression purposes.As given below.</p> <pre><code># initializing all the model objects with default parameters model_1 = LinearRegression() model_2 = xgb.XGBRegressor() model_3 = RandomF...
[ { "answer_id": 74410055, "author": "Dulangi_Kanchana", "author_id": 12017769, "author_profile": "https://Stackoverflow.com/users/12017769", "pm_score": 3, "selected": true, "text": "# initializing all the model objects with default parameters\n\nmodel_1= svm.SVC(kernel='rbf')\nmodel_2 = ...
2022/11/11
[ "https://Stackoverflow.com/questions/74401221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14372590/" ]
74,401,226
<p>Have a bunch of values from csv file, with column looking like this:</p> <pre><code>shouston cgonzalez bbrown hlader kpesavento jbloom polson bcharlow bcharlow bkalt </code></pre> <p>Need to find duplicates and modify them.</p> <pre><code># Grab CSV file $inputFile = Import-Csv -Path $filePath $text = (Get-Culture)....
[ { "answer_id": 74401313, "author": "Vasil Nikolov", "author_id": 4131695, "author_profile": "https://Stackoverflow.com/users/4131695", "pm_score": 2, "selected": false, "text": "Group-Object $val=@(\n'**name**',\n'shouston',\n'cgonzalez',\n'bbrown',\n'hlader',\n'kpesavento',\n'jbloom',\n...
2022/11/11
[ "https://Stackoverflow.com/questions/74401226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10009512/" ]
74,401,252
<p>I have an array of objects like this</p> <pre><code>const data = [{ &quot;id&quot;: 1, &quot;content&quot;: { &quot;type&quot;: &quot;img&quot;, &quot;state&quot;: &quot;rejected&quot; }, &quot;entity&quot;: { &quot;type&quot;: &quot;student&quot;, &quot;studentID&quot;: [ ...
[ { "answer_id": 74401464, "author": "flyingfox", "author_id": 3176419, "author_profile": "https://Stackoverflow.com/users/3176419", "pm_score": 3, "selected": true, "text": "let result = data.map(d =>{\n let stu = students.find(i => d.entity.studentID.includes(i.student_id))\n return {....
2022/11/11
[ "https://Stackoverflow.com/questions/74401252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18711972/" ]
74,401,289
<p>We had implemented modern OAuth implementation for reading mails from outlook mail boxes. The code we used is whatever is available on the microsoft offical website. But it throws &quot;The request failed. The remote server returned an error: (403) Forbidden.&quot; . But the authentication token is getting correctly...
[ { "answer_id": 74401464, "author": "flyingfox", "author_id": 3176419, "author_profile": "https://Stackoverflow.com/users/3176419", "pm_score": 3, "selected": true, "text": "let result = data.map(d =>{\n let stu = students.find(i => d.entity.studentID.includes(i.student_id))\n return {....
2022/11/11
[ "https://Stackoverflow.com/questions/74401289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16487509/" ]
74,401,301
<p>Hi I am trying to extract the surname from a list of initials and names it is ok for one inital but 2 I just cant seem to get it right</p> <pre><code>SELECT NAMES, REGEXP_SUBSTR(NAMES,'(\s.+$)') FROM PEOPLE </code></pre> <p>this gets me this top table. I have faffed about online for hours now trying to get to work w...
[ { "answer_id": 74401464, "author": "flyingfox", "author_id": 3176419, "author_profile": "https://Stackoverflow.com/users/3176419", "pm_score": 3, "selected": true, "text": "let result = data.map(d =>{\n let stu = students.find(i => d.entity.studentID.includes(i.student_id))\n return {....
2022/11/11
[ "https://Stackoverflow.com/questions/74401301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10001788/" ]
74,401,317
<p>I have a task and I will try to explain it clearly. There is a file with [0; 1000] lines. Each line contains 6 columns.</p> <p>The first two columns contain <em>string</em> with [1; 20] characters. Characters could be <em>letters, numbers, and whitespaces</em>.</p> <p>3-5 columns contain integers in the range <em>[-...
[ { "answer_id": 74401464, "author": "flyingfox", "author_id": 3176419, "author_profile": "https://Stackoverflow.com/users/3176419", "pm_score": 3, "selected": true, "text": "let result = data.map(d =>{\n let stu = students.find(i => d.entity.studentID.includes(i.student_id))\n return {....
2022/11/11
[ "https://Stackoverflow.com/questions/74401317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12652243/" ]
74,401,325
<p>if I may, could you please help me get this sorted out? I created a circle using HTML and CSS, and inside the circle, I added text. I have other texts that need to be placed on the right side of the circle. Right now, the texts are on the right side but they are like right justified. There's too much gap. I was hopi...
[ { "answer_id": 74401464, "author": "flyingfox", "author_id": 3176419, "author_profile": "https://Stackoverflow.com/users/3176419", "pm_score": 3, "selected": true, "text": "let result = data.map(d =>{\n let stu = students.find(i => d.entity.studentID.includes(i.student_id))\n return {....
2022/11/11
[ "https://Stackoverflow.com/questions/74401325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7270651/" ]
74,401,357
<p>I am a bit puzzled by separating columns using the separate function in tidyr:</p> <p>My data frame looks like this</p> <pre class="lang-r prettyprint-override"><code>library(tidyverse) df=tibble(col1 = c(&quot;2397_A_run379_CTTGTACT_S119_L004_R1_001&quot;, &quot;3779_A_run535_TTATAGCC_S91_L003_...
[ { "answer_id": 74401497, "author": "stefan", "author_id": 12993861, "author_profile": "https://Stackoverflow.com/users/12993861", "pm_score": 2, "selected": true, "text": "tidyr::extract library(tidyverse)\n\ndf |>\n extract(col1, into = c(\"col1\", \"col2\"), \"^(.*?)_(.*)$\")\n#> # A ...
2022/11/11
[ "https://Stackoverflow.com/questions/74401357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7179299/" ]
74,401,366
<p>I want to select columns from a dataframe,</p> <p>however, I want to get the names and aliases from a config file and keep it variable. The config.json file give me a dict like</p> <pre><code>conf &quot;data&quot;: { &quot;a&quot;:&quot;a&quot;, &quot;b&quot;:&quot;great&quot;, &quot;c&quot;:&quot;examp...
[ { "answer_id": 74401497, "author": "stefan", "author_id": 12993861, "author_profile": "https://Stackoverflow.com/users/12993861", "pm_score": 2, "selected": true, "text": "tidyr::extract library(tidyverse)\n\ndf |>\n extract(col1, into = c(\"col1\", \"col2\"), \"^(.*?)_(.*)$\")\n#> # A ...
2022/11/11
[ "https://Stackoverflow.com/questions/74401366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6510273/" ]
74,401,380
<p>I am sending an HTTP request using XMLHttpRequest (<a href="https://developer.mozilla.org/es/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest" rel="nofollow noreferrer">https://developer.mozilla.org/es/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest</a>).</p> <p>The code is as follows:</p> <pre><code>var xhr = new ...
[ { "answer_id": 74401477, "author": "David", "author_id": 4601803, "author_profile": "https://Stackoverflow.com/users/4601803", "pm_score": 2, "selected": true, "text": "const textToken = 'string';\ntry{\n const j = JSON.parse(textToken);\n} catch {\n console.log('Hi! im a string')\n}" ...
2022/11/11
[ "https://Stackoverflow.com/questions/74401380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19672488/" ]
74,401,389
<p>I'm finally trying to learn templates and I created a template function that will return an <code>std::vector</code> with a generic type.</p> <p>When compiling I get an error:</p> <blockquote> <p>error: no matching function for call to ‘std::vector::push_back(std::string&amp;)’</p> </blockquote> <p>Is there a way to...
[ { "answer_id": 74401507, "author": "VLL", "author_id": 2527795, "author_profile": "https://Stackoverflow.com/users/2527795", "pm_score": 3, "selected": true, "text": "std::is_same template<typename T> std::vector<T> getData()\n{\n std::vector<T> entries;\n\n int i_value;\n doubl...
2022/11/11
[ "https://Stackoverflow.com/questions/74401389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4296075/" ]
74,401,399
<p>I just wonder if it's possible to print the duplicate values from a dictionary.</p> <p>For exemple I have this dictonary:</p> <pre><code>responses={ 'greet':'Hello! How can I help you?', 'types':'Our coffee types are: light roasted, medium roasted, medium dark roasted, dark roasted.', 'light':'Coffee Bro...
[ { "answer_id": 74401580, "author": "Fra93", "author_id": 4952549, "author_profile": "https://Stackoverflow.com/users/4952549", "pm_score": 3, "selected": true, "text": "import argparse\nparser = argparse.ArgumentParser()\nparser.add_argument(\"key1\",)\nparser.add_argument(\"key2\")\n\nc...
2022/11/11
[ "https://Stackoverflow.com/questions/74401399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11236416/" ]
74,401,411
<p>I'm trying to create logic but return #N/A as mentioned in the title, what did I do wrong?</p> <p><code>=IF(AND(I4=B4,I4=B5,I4=B6),CONCATENATE(B4,&quot;;&quot;,B5,&quot;;&quot;,D6),IF(AND(I4=B4,I4=B5),CONCATENATE(D4,&quot;;&quot;,D5)),IF(I4=B4,D4)), but got error. </code></p>
[ { "answer_id": 74401727, "author": "player0", "author_id": 5632629, "author_profile": "https://Stackoverflow.com/users/5632629", "pm_score": 0, "selected": false, "text": "=IF(AND(I4=B4,I4=B5,I4=B6), B4&\";\"&B5&\";\"&D6, \n IF(AND(I4=B4,I4=B5), D4&\";\"&D5, IF(I4=B4, D4, )))\n" }, {...
2022/11/11
[ "https://Stackoverflow.com/questions/74401411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6050935/" ]
74,401,426
<p>I don't know is there any difference between <strong>CoroutineScope(Dispatchers.Main).launch</strong> and <strong>runOnUiThread</strong>, I think both will run on Main thread.</p> <p>but still confusion is any difference there.?</p> <p>Thanks.</p>
[ { "answer_id": 74405780, "author": "Steyrix", "author_id": 7221362, "author_profile": "https://Stackoverflow.com/users/7221362", "pm_score": 3, "selected": true, "text": "runOnUiThread Activity runOnUiThread CoroutineScope(Dispatchers.Main).launch runOnUiThread" }, { "answer_id":...
2022/11/11
[ "https://Stackoverflow.com/questions/74401426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14682570/" ]
74,401,434
<p>What is the difference between this</p> <pre><code>const authController = require(&quot;../controller/authController&quot;); </code></pre> <p>and this</p> <pre><code>const { authController } = require(&quot;../controller/authController&quot;); </code></pre> <p>my code doesnt work when i call a function like authCont...
[ { "answer_id": 74405780, "author": "Steyrix", "author_id": 7221362, "author_profile": "https://Stackoverflow.com/users/7221362", "pm_score": 3, "selected": true, "text": "runOnUiThread Activity runOnUiThread CoroutineScope(Dispatchers.Main).launch runOnUiThread" }, { "answer_id":...
2022/11/11
[ "https://Stackoverflow.com/questions/74401434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18609846/" ]
74,401,454
<p>I am practicing with C # Lists in Unity and I have encountered a problem. My test script, instantiates 5 prefabs which are added in a gameobject list. I then wrote a code that generates a random int and from that number moves the prefab instantiated with that index (indexof). Everything works correctly, but the meth...
[ { "answer_id": 74401790, "author": "shingo", "author_id": 6196568, "author_profile": "https://Stackoverflow.com/users/6196568", "pm_score": 1, "selected": false, "text": "NPC0, NPC1, NPC2 NpcEvent ListCOntroller.cubeList.IndexOf(gameObject) randNpcValue NPC0, NPC2 NpcEvent ListCOntroller...
2022/11/11
[ "https://Stackoverflow.com/questions/74401454", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12761431/" ]
74,401,478
<p>I'm trying to split a string by curly brackets but ignore nested brackets. E.g given the following:</p> <pre class="lang-none prettyprint-override"><code>hello {world} this is some text. {split me {but not me} thanks} heaps! </code></pre> <p>split into:</p> <pre class="lang-js prettyprint-override"><code>[ 'hello...
[ { "answer_id": 74401750, "author": "pilchard", "author_id": 13762301, "author_profile": "https://Stackoverflow.com/users/13762301", "pm_score": 2, "selected": true, "text": "const str = 'hello {world} this is some text. {split me {but not me} thanks} heaps!';\n\nconst result = [];\nlet c...
2022/11/11
[ "https://Stackoverflow.com/questions/74401478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2052581/" ]
74,401,487
<p><code>value_counts</code> can't count values in list.</p> <p>Hi, Some of the <code>columns</code> in my <code>dataframe</code> have a <code>list</code>.</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>X</th> <th>Y</th> </tr> </thead> <tbody> <tr> <td>101</td> <td><code>['A']</code></td>...
[ { "answer_id": 74401750, "author": "pilchard", "author_id": 13762301, "author_profile": "https://Stackoverflow.com/users/13762301", "pm_score": 2, "selected": true, "text": "const str = 'hello {world} this is some text. {split me {but not me} thanks} heaps!';\n\nconst result = [];\nlet c...
2022/11/11
[ "https://Stackoverflow.com/questions/74401487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9903557/" ]
74,401,499
<p>I am writing a driver model using C++ and Python to compare the performance. The simulation gives data like width, position, speed, etc. and the driver model does some calculations to decide if it needs to brake or not. Both models have the same variables and calculations, but after looping over 500 times first dive...
[ { "answer_id": 74601293, "author": "MSalters", "author_id": 15416, "author_profile": "https://Stackoverflow.com/users/15416", "pm_score": 0, "selected": false, "text": "sqrt arctan" }, { "answer_id": 74648566, "author": "joergbrech", "author_id": 12173376, "author_pro...
2022/11/11
[ "https://Stackoverflow.com/questions/74401499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17129042/" ]
74,401,503
<p>I want to make some basic math stuff like Sum in Diagrams.net (old Draw.io).Is it possible ?</p> <p>Exemple : I create a new parameter on a shape, like &quot;Elec : T16&quot; and make several copy on this shape. Is it possible to have a Text which can give me the total of the shape with this parameter ?</p> <p>Best ...
[ { "answer_id": 74601293, "author": "MSalters", "author_id": 15416, "author_profile": "https://Stackoverflow.com/users/15416", "pm_score": 0, "selected": false, "text": "sqrt arctan" }, { "answer_id": 74648566, "author": "joergbrech", "author_id": 12173376, "author_pro...
2022/11/11
[ "https://Stackoverflow.com/questions/74401503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477068/" ]
74,401,537
<p>I have a Pandas dataframe with the following structure:</p> <pre><code>A B C a b 1 a b 2 a b 3 c d 7 c d 8 c d 5 c d 6 c d 3 e b 4 e b 3 e b 2 e b 1 </code></pre...
[ { "answer_id": 74401567, "author": "jezrael", "author_id": 2901002, "author_profile": "https://Stackoverflow.com/users/2901002", "pm_score": 5, "selected": true, "text": "GroupBy.cumcount pandas.Series.add DataFrame.pivot DataFrame.add_prefix DataFrame.rename_axis MultiIndex DataFrame.re...
2022/11/11
[ "https://Stackoverflow.com/questions/74401537", "https://Stackoverflow.com", "https://Stackoverflow.com/users/903051/" ]
74,401,557
<p>How can I stop a game object box collider triggering underneath a dropdown box UI element?</p> <p>When I select a dropdown list item, it also sends a click through to the game object beneath the dropdown list.</p> <p>Obviously we only want one UI element getting clicked in this case.</p> <p><a href="https://i.stack....
[ { "answer_id": 74403734, "author": "Horothenic", "author_id": 9855648, "author_profile": "https://Stackoverflow.com/users/9855648", "pm_score": 1, "selected": false, "text": "IPointerClick UnityEngine.EventsSystems PhysicsRaycaster" }, { "answer_id": 74411283, "author": "Ratb...
2022/11/11
[ "https://Stackoverflow.com/questions/74401557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10627282/" ]
74,401,561
<p>I'm trying to get the dates from the soup that is scraping the google NEWS page</p> <pre><code>date_section = soup.find_all('div', {&quot;class&quot;: &quot;OSrXXb ZE0LJd YsWzw&quot;}) print(date_section) </code></pre> <p>output:</p> <pre><code>[&lt;div class=&quot;OSrXXb ZE0LJd YsWzw&quot; style=&quot;bottom:0px&qu...
[ { "answer_id": 74403734, "author": "Horothenic", "author_id": 9855648, "author_profile": "https://Stackoverflow.com/users/9855648", "pm_score": 1, "selected": false, "text": "IPointerClick UnityEngine.EventsSystems PhysicsRaycaster" }, { "answer_id": 74411283, "author": "Ratb...
2022/11/11
[ "https://Stackoverflow.com/questions/74401561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19102371/" ]
74,401,584
<p>What is &quot;BYTE&quot; and &quot;PBYTE&quot; used for?.I couldn't find any information on the internet.</p> <pre><code>#include &lt;iostream&gt; #include &lt;Windows.h&gt; using namespace std; BYTE by='a'; PBYTE pby= &amp;by; int main(){ cout&lt;&lt;&quot;by : &quot;&lt;&lt;by&lt;&lt;endl; cout&lt;&lt;...
[ { "answer_id": 74401878, "author": "imamangoo", "author_id": 16372454, "author_profile": "https://Stackoverflow.com/users/16372454", "pm_score": -1, "selected": false, "text": "BYTE unsigned char PBYTE BYTE * unsigned char * unsigned char unsigned char cout << \"&by : \";\ncout << \"&phy...
2022/11/11
[ "https://Stackoverflow.com/questions/74401584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20448778/" ]
74,401,595
<p>How can I hide the loading spinner after all the data has been fetched from the API? I have a laravel api that outputs paginated data. I am using reactjs to display the data with scroll event. Now I want to hide the spinner when all the data has been fetched. Or add something like <code>No more data</code></p> <p>He...
[ { "answer_id": 74401878, "author": "imamangoo", "author_id": 16372454, "author_profile": "https://Stackoverflow.com/users/16372454", "pm_score": -1, "selected": false, "text": "BYTE unsigned char PBYTE BYTE * unsigned char * unsigned char unsigned char cout << \"&by : \";\ncout << \"&phy...
2022/11/11
[ "https://Stackoverflow.com/questions/74401595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19223350/" ]
74,401,598
<p>I'd like to add a new column to my Options list. The new column would calculate the difference between the last stock price at close and the Option Strike in percentage.</p> <p>Here's my code</p> <p>#Getting Options data and creating an list containing only Puts</p> <pre><code>library(quantmod) Symbols&lt;-c (&quot...
[ { "answer_id": 74401878, "author": "imamangoo", "author_id": 16372454, "author_profile": "https://Stackoverflow.com/users/16372454", "pm_score": -1, "selected": false, "text": "BYTE unsigned char PBYTE BYTE * unsigned char * unsigned char unsigned char cout << \"&by : \";\ncout << \"&phy...
2022/11/11
[ "https://Stackoverflow.com/questions/74401598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9800710/" ]
74,401,612
<p>I have tried <a href="https://stackoverflow.com/questions/71242297/xml-find-elements-by-tag-using-python-and-print-to-console">this</a> approach but it doesn't work for me.</p> <p>I want to get the releaseDate value from the below xml</p> <pre><code>&lt;Product prodID=&quot;bed&quot; lang=&quot;en&quot;&gt; &lt;Pro...
[ { "answer_id": 74402043, "author": "CristiFati", "author_id": 4788546, "author_profile": "https://Stackoverflow.com/users/4788546", "pm_score": 1, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Product prodID=\"bed\" lang=\"en\"> \n <ProductState stateType=\"...
2022/11/11
[ "https://Stackoverflow.com/questions/74401612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13836950/" ]
74,401,626
<p>I need to declare a &quot;global&quot; constant that can be accessed by another contract. Given a very simple Solidity contract as follows:</p> <pre class="lang-js prettyprint-override"><code>pragma solidity ^0.4.17; uint256 constant MY_CONSTANT = 3; contract MyContract { constructor() public {} } </code></pre> ...
[ { "answer_id": 74402043, "author": "CristiFati", "author_id": 4788546, "author_profile": "https://Stackoverflow.com/users/4788546", "pm_score": 1, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Product prodID=\"bed\" lang=\"en\"> \n <ProductState stateType=\"...
2022/11/11
[ "https://Stackoverflow.com/questions/74401626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11806050/" ]
74,401,667
<p>I'm in the process of learning WPF and the MVVM design pattern. Currently the code in my ViewModel for a delete customer command looks like this:</p> <pre><code> public class vmCustomers : INotifyPropertyChanged { ... private ICommand _commandDeleteCustomer = null; ... public ICommand CommandD...
[ { "answer_id": 74402043, "author": "CristiFati", "author_id": 4788546, "author_profile": "https://Stackoverflow.com/users/4788546", "pm_score": 1, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Product prodID=\"bed\" lang=\"en\"> \n <ProductState stateType=\"...
2022/11/11
[ "https://Stackoverflow.com/questions/74401667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6870991/" ]
74,401,676
<p>I setup my django and postgres container on my local machine and all working fine. Local server is running, database running but I am not being able to connect to the created postgres db.</p> <p>docker-compose.yml</p> <pre><code>version: '3' services: web: build: . command: python manage.py runserver 0.0....
[ { "answer_id": 74402144, "author": "scūriolus", "author_id": 12236313, "author_profile": "https://Stackoverflow.com/users/12236313", "pm_score": 2, "selected": true, "text": "my_password docker exec -it container_id psql -U my_user -d my_db --password\n" }, { "answer_id": 7441060...
2022/11/11
[ "https://Stackoverflow.com/questions/74401676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12061655/" ]
74,401,695
<p>I want use Firebase Auth in Flutter project. And I am use <code>provider</code>. Everything is okey but I am facing one issue with <code>provider</code>.</p> <p>My IconButtonWidget:</p> <pre><code>class SocialIconButton extends StatelessWidget { final String socialIcon; const SocialIconButton({Key? key, required...
[ { "answer_id": 74402144, "author": "scūriolus", "author_id": 12236313, "author_profile": "https://Stackoverflow.com/users/12236313", "pm_score": 2, "selected": true, "text": "my_password docker exec -it container_id psql -U my_user -d my_db --password\n" }, { "answer_id": 7441060...
2022/11/11
[ "https://Stackoverflow.com/questions/74401695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477196/" ]
74,401,696
<p>I'm so Newbie in Programming.</p> <p>I'm using Django as backend, React+Typescript as frontend.</p> <p>I'm using Axios to make JWT login function. but stuck in the middle.</p> <p>Because headers/Authorization makes type error.</p> <p><a href="https://i.stack.imgur.com/omJlo.png" rel="nofollow noreferrer"><img src="h...
[ { "answer_id": 74401767, "author": "Disco", "author_id": 11196441, "author_profile": "https://Stackoverflow.com/users/11196441", "pm_score": 3, "selected": true, "text": "null Authorization: localStorage.getItem(\"access_token\") ? \"JWT\" + localStorage.getItem(\"access_token\") : \"\"\...
2022/11/11
[ "https://Stackoverflow.com/questions/74401696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18641007/" ]
74,401,737
<p>I am stuck with a data in excel having the above form and wish to add all the numbers between brackets and finally give its addition after applying the formula.</p> <p>For ex. abc(200), def(300), gijklmno(5000), pqrstuvwx yz(50000) should give 55500 in another cell</p> <p>Trying: abc(200), def(300), gijklmno(5000),...
[ { "answer_id": 74401798, "author": "Mayukh Bhattacharya", "author_id": 8162520, "author_profile": "https://Stackoverflow.com/users/8162520", "pm_score": 1, "selected": false, "text": "B1 =SUM(--BYCOL(TEXTSPLIT(A1,\",\"),LAMBDA(x,TEXTBEFORE(TEXTAFTER(x,\"(\"),\")\"))))\n B1 =SUMPRODUCT(IF...
2022/11/11
[ "https://Stackoverflow.com/questions/74401737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477168/" ]
74,401,746
<p>I am new in Python and trying to write a binary-to-decimal converted function like below</p> <pre><code>def decimaltobinary(n): if n &gt; 1: decimaltobinary(n//2) print(n%2,end='') #return n%2 decimaltobinary(4) </code></pre> <p>This works perfectly fine. Now the question is when I am modifying ...
[ { "answer_id": 74401798, "author": "Mayukh Bhattacharya", "author_id": 8162520, "author_profile": "https://Stackoverflow.com/users/8162520", "pm_score": 1, "selected": false, "text": "B1 =SUM(--BYCOL(TEXTSPLIT(A1,\",\"),LAMBDA(x,TEXTBEFORE(TEXTAFTER(x,\"(\"),\")\"))))\n B1 =SUMPRODUCT(IF...
2022/11/11
[ "https://Stackoverflow.com/questions/74401746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8097395/" ]
74,401,764
<p>I want to collect the associated keys of List of maximum numbers from Map&lt;String,Integer&gt; in Java 8+</p> <p>For example:</p> <pre class="lang-java prettyprint-override"><code>final Map&lt;String, Integer&gt; map = new HashMap&lt;&gt;(); map.put(&quot;first&quot;, 50); map.put(&quot;second&quot;, 10); map.put(&...
[ { "answer_id": 74401856, "author": "Ricola", "author_id": 7424948, "author_profile": "https://Stackoverflow.com/users/7424948", "pm_score": 2, "selected": false, "text": "final Integer maxValue = map.values()\n .stream()\n .max(Comparator.naturalOrder())\n .orElse(null);\n // Bu...
2022/11/11
[ "https://Stackoverflow.com/questions/74401764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4938849/" ]
74,401,768
<p>I have 3 docker containers running in mac os.</p> <ol> <li>backend - port 5055</li> <li>frontend (next.js) - port 3000</li> <li>nginx - port 80</li> </ol> <p>I am getting <strong>net::ERR_FAILED</strong> for backend api requests when I access from browser (http://localhost:80). I can make a request to backend (http:...
[ { "answer_id": 74437871, "author": "zsolt", "author_id": 4223799, "author_profile": "https://Stackoverflow.com/users/4223799", "pm_score": 0, "selected": false, "text": "location /api {\n ...\n proxy_pass http://backend:5055/api;\n}\n" }, { "answer_id": 74440450, "author": ...
2022/11/11
[ "https://Stackoverflow.com/questions/74401768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15557686/" ]
74,401,791
<p>I'm trying to run a datediff. I essentially want to say the number of days between 1st November 2022 and 1st November 2022 is ONE day.</p> <p>When I attempt this, <code>$number_of_days</code> returned is 0. Can someone explain why this is and how to resolve?</p> <pre><code>$end = &quot;2022-11-01&quot;; $start = &qu...
[ { "answer_id": 74401823, "author": "Henryc17", "author_id": 14595300, "author_profile": "https://Stackoverflow.com/users/14595300", "pm_score": 3, "selected": true, "text": "$end = strtotime(\"2022-11-01\");\n$start = strtotime(\"2022-11-01\");\n\n$datediff = (($end - $start)/60/60/24) +...
2022/11/11
[ "https://Stackoverflow.com/questions/74401791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/644978/" ]
74,401,793
<p>I'm trying to find a part in multiple strings, that all strings share in common. For example:</p> <pre class="lang-js prettyprint-override"><code>const string1 = '.bold[_ngcontent=&quot;_kjhafh-asda-qw&quot;] {background:black;}'; const string2 = '[_ngcontent=&quot;_kjhafh-asda-qw&quot;] {background-color:hotpink;}'...
[ { "answer_id": 74401823, "author": "Henryc17", "author_id": 14595300, "author_profile": "https://Stackoverflow.com/users/14595300", "pm_score": 3, "selected": true, "text": "$end = strtotime(\"2022-11-01\");\n$start = strtotime(\"2022-11-01\");\n\n$datediff = (($end - $start)/60/60/24) +...
2022/11/11
[ "https://Stackoverflow.com/questions/74401793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2311557/" ]
74,401,802
<p>My requirement is I have a large dataframe with millions of rows. I encoded all strings to numeric values in order to use <code>numpys</code> vectorization to increase processing speed.</p> <p>So I was looking at a way to quickly check if a number exists in another list column. Previously, I was using list comprehen...
[ { "answer_id": 74401841, "author": "Yevhen Kuzmovych", "author_id": 4727702, "author_profile": "https://Stackoverflow.com/users/4727702", "pm_score": 1, "selected": true, "text": "np.isin dt['col_a'] dt['col_b'] [\n 1 in dt['col_b'],\n 2 in dt['col_b'],\n 5 in dt['col_b'],\n ...\...
2022/11/11
[ "https://Stackoverflow.com/questions/74401802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10722752/" ]
74,401,831
<p>I have created a function to delete multiple records.In our table contain id as type uuid. We get the input is like array of ids.</p> <pre><code> CREATE OR REPLACE FUNCTION public.deletetVersion(item_list uuid[]) RETURNS TABLE(id uuid[]) LANGUAGE 'plpgsql' COST 100 VOLATILE PARALLEL UNSAFE ROWS 1000 AS...
[ { "answer_id": 74401841, "author": "Yevhen Kuzmovych", "author_id": 4727702, "author_profile": "https://Stackoverflow.com/users/4727702", "pm_score": 1, "selected": true, "text": "np.isin dt['col_a'] dt['col_b'] [\n 1 in dt['col_b'],\n 2 in dt['col_b'],\n 5 in dt['col_b'],\n ...\...
2022/11/11
[ "https://Stackoverflow.com/questions/74401831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4899166/" ]
74,401,833
<p>In my angular project I have following task to do.</p> <p><a href="https://i.stack.imgur.com/E5biM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E5biM.png" alt="enter image description here" /></a></p> <p>This is just a design template, not my actual code.</p> <p>So far I have made the right pic...
[ { "answer_id": 74401919, "author": "Noman Yousaf", "author_id": 6547177, "author_profile": "https://Stackoverflow.com/users/6547177", "pm_score": 2, "selected": false, "text": "div{\n position:relative;\n}\n\ndiv:after {\n position: absolute;\n background: rgba(0,0,0,0.3);\n co...
2022/11/11
[ "https://Stackoverflow.com/questions/74401833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14287016/" ]
74,401,839
<p>I am making use of matching a url from a tab to the window.location, but am using secure routes. How do I remove the a part of a string from a selected character, In my case the char is '?' I want to remove everything from the ? to the end of the string. How can this be done with jquery?</p> <pre><code>document.quer...
[ { "answer_id": 74401970, "author": "M.Haris", "author_id": 11509626, "author_profile": "https://Stackoverflow.com/users/11509626", "pm_score": 1, "selected": false, "text": "let link = link.split('?');\nlet required_link = link[0];\n" }, { "answer_id": 74402028, "author": "br...
2022/11/11
[ "https://Stackoverflow.com/questions/74401839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17975884/" ]
74,401,852
<p>Here is the code:</p> <pre class="lang-hs prettyprint-override"><code>import qualified View.TreeWidget as TreeWidget main :: IO () main = do print $ bla &quot;sdfsd&quot; bla someString = case someString of TreeWidget.name -&gt; True &quot;sdfsd&quot; -&gt; False _ -&gt; True </code></pre> <p><code>TreeWid...
[ { "answer_id": 74402110, "author": "Iceland_jack", "author_id": 165806, "author_profile": "https://Stackoverflow.com/users/165806", "pm_score": 3, "selected": true, "text": "_ name -> True\n \"tree_list_name\" -> .. name -> ..\n\nname :: String\nname = \"tree_list_name\"\n TreeWidget...
2022/11/11
[ "https://Stackoverflow.com/questions/74401852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5201222/" ]
74,401,865
<p>i have created a htaccess url rewrite to geht my urls webseite.com/dashboard.php to webseite.com/dashboard.</p> <p>My Problem is, that I am giving parameters (for database data) over my url when I visit certain sites of my website like <code>https://example.com/detail_user.php?id=1</code>.</p> <p>With my rewrite rul...
[ { "answer_id": 74403392, "author": "Richard Leishman", "author_id": 17473064, "author_profile": "https://Stackoverflow.com/users/17473064", "pm_score": 0, "selected": false, "text": "RewriteEngine on\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteCond %{REQUEST_FILENAME}.php -f\nRewriteRul...
2022/11/11
[ "https://Stackoverflow.com/questions/74401865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477309/" ]
74,401,891
<p>In my case, I have a components '1,2,3,....' imported in another main component 'A'. In component 'A' some operation is done and among the components '1,2,3...' one filtered component is returned.</p> <p>I have to send some props to this filtered components and render this filtered component. Am posting my code plea...
[ { "answer_id": 74401966, "author": "Gabriele Petrioli", "author_id": 128165, "author_profile": "https://Stackoverflow.com/users/128165", "pm_score": 3, "selected": true, "text": "find [0] filter const LineItemViewComponent = [\n {\n lineItem: \"AR008\",\n component: AR008Users\n ...
2022/11/11
[ "https://Stackoverflow.com/questions/74401891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18497734/" ]
74,401,910
<p>why it wrong `</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;string.h&gt; void func(char* dest, const char* src) { dest = malloc(strlen(src) + 1); strcpy(dest, src); } int main() { char* name0; char* name1 = &quot;Jam&quot;; func(name0, name1); puts(name0);...
[ { "answer_id": 74401966, "author": "Gabriele Petrioli", "author_id": 128165, "author_profile": "https://Stackoverflow.com/users/128165", "pm_score": 3, "selected": true, "text": "find [0] filter const LineItemViewComponent = [\n {\n lineItem: \"AR008\",\n component: AR008Users\n ...
2022/11/11
[ "https://Stackoverflow.com/questions/74401910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20210785/" ]
74,401,914
<p>Consider:</p> <pre><code>const obj = { w: true, a: true, s: true, d: true }; </code></pre> <p>Can we set all properties at once <strong>without</strong> repeating <code>true</code> every line ?</p> <p>And not something like this:</p> <pre><code>let obj = {}; obj.a = obj.w = obj.d = obj.w = true; </code></pre...
[ { "answer_id": 74402007, "author": "Ben Aston", "author_id": 38522, "author_profile": "https://Stackoverflow.com/users/38522", "pm_score": 2, "selected": true, "text": "Object.fromEntries const o = Object.fromEntries(['w', 'a', 's', 'd'].map((v) => [v, true]))\nconsole.log(o) const setPr...
2022/11/11
[ "https://Stackoverflow.com/questions/74401914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/779111/" ]
74,401,915
<p>I notice there is a macro <code>uint4korr</code> in the MySQL/MariaDB source code.</p> <blockquote> <p>include/byte_order_generic.h</p> </blockquote> <p>I merely understand this macro is correlated with byte order. But I looked for the comments about this macro, found nothing. I don't know the meaning of the suffix ...
[ { "answer_id": 74427774, "author": "Marko Mäkelä", "author_id": 7365572, "author_profile": "https://Stackoverflow.com/users/7365572", "pm_score": 1, "selected": false, "text": "uint4korr() ntohl() memcmp() mach_read_from_4() ntohl() mov bswap movbe" } ]
2022/11/11
[ "https://Stackoverflow.com/questions/74401915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7210223/" ]
74,401,986
<p>I have two tables. First table is</p> <pre><code>Category Date Sales_1 Extra Soft Chew Bottle 67g 2022-02-09 2091847.8100 Eclipse Mint Pocket 17g 2022-02-09 1.6000 Wrigleys Eclipse Gum S/F 4pk 56g 2022-02-09 597003.4900 Eclipse Chewy Mints Bottle 93g ...
[ { "answer_id": 74427774, "author": "Marko Mäkelä", "author_id": 7365572, "author_profile": "https://Stackoverflow.com/users/7365572", "pm_score": 1, "selected": false, "text": "uint4korr() ntohl() memcmp() mach_read_from_4() ntohl() mov bswap movbe" } ]
2022/11/11
[ "https://Stackoverflow.com/questions/74401986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18158837/" ]
74,402,004
<p>We are using the Azure DevOps server 2019 and we created agent pool and configure two agents in single server. Now my problem is when am trying to run the two pipelines on this pool parallel, anyone of them cancelling after few minutes with error: The operation was cancelled without any logs. I don't know why it is ...
[ { "answer_id": 74429298, "author": "Dou Xu-MSFT", "author_id": 20288521, "author_profile": "https://Stackoverflow.com/users/20288521", "pm_score": -1, "selected": false, "text": "System.Debug true" } ]
2022/11/11
[ "https://Stackoverflow.com/questions/74402004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18153277/" ]
74,402,008
<p>I'm looking to name my menu options, it currently looks like this -</p> <pre><code>1) Option 1 2) Option 2 3) Option 3 4) Quit </code></pre> <p>I tried adding menu descriptions by editing the following but it returns no results when you enter a menu number</p> <pre><code>options=(&quot;Option 1 - Search with no date...
[ { "answer_id": 74403729, "author": "user8811698", "author_id": 8811698, "author_profile": "https://Stackoverflow.com/users/8811698", "pm_score": 0, "selected": false, "text": "case case $opt in\n \"Option 1 - Search with no date filter. SLOW!!\")\n \"Option 2 - Search via year\")\...
2022/11/11
[ "https://Stackoverflow.com/questions/74402008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18485470/" ]
74,402,019
<p><a href="https://i.stack.imgur.com/XzVQZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XzVQZ.png" alt="enter image description here" /></a></p> <p>I created a <code>TextFormField</code> forms and not all of them get validated.</p> <p>My code:</p> <pre><code>Form( key: _formKey, child: Te...
[ { "answer_id": 74403729, "author": "user8811698", "author_id": 8811698, "author_profile": "https://Stackoverflow.com/users/8811698", "pm_score": 0, "selected": false, "text": "case case $opt in\n \"Option 1 - Search with no date filter. SLOW!!\")\n \"Option 2 - Search via year\")\...
2022/11/11
[ "https://Stackoverflow.com/questions/74402019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16243078/" ]
74,402,070
<pre><code>&gt; library(zoo) Attaching package: ‘zoo’ The following objects are masked from ‘package:base’: as.Date, as.Date.numeric &gt; z =c(NA,NA,1,2,3) &gt; rollapply(z,width=2,max,fill=NA,align=&quot;r&quot;,na.rm=T) [1] NA -Inf 1 2 3 Warning message: In FUN(data[posns], ...) : no non-missing a...
[ { "answer_id": 74403729, "author": "user8811698", "author_id": 8811698, "author_profile": "https://Stackoverflow.com/users/8811698", "pm_score": 0, "selected": false, "text": "case case $opt in\n \"Option 1 - Search with no date filter. SLOW!!\")\n \"Option 2 - Search via year\")\...
2022/11/11
[ "https://Stackoverflow.com/questions/74402070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2338823/" ]
74,402,072
<p><em>I want to know how can I make An Entry Accept Decimal Numbers ONLY</em></p> <p>python tkinter programming</p>
[ { "answer_id": 74403729, "author": "user8811698", "author_id": 8811698, "author_profile": "https://Stackoverflow.com/users/8811698", "pm_score": 0, "selected": false, "text": "case case $opt in\n \"Option 1 - Search with no date filter. SLOW!!\")\n \"Option 2 - Search via year\")\...
2022/11/11
[ "https://Stackoverflow.com/questions/74402072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17273618/" ]
74,402,087
<p>i am trying to remove the 5th and sixth item of each line of my csv file each line is a list but when i am trying to run it i am getting a (DataFrame constructor not properly called!) error please help <a href="https://i.stack.imgur.com/pu5r2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pu5r2.p...
[ { "answer_id": 74403729, "author": "user8811698", "author_id": 8811698, "author_profile": "https://Stackoverflow.com/users/8811698", "pm_score": 0, "selected": false, "text": "case case $opt in\n \"Option 1 - Search with no date filter. SLOW!!\")\n \"Option 2 - Search via year\")\...
2022/11/11
[ "https://Stackoverflow.com/questions/74402087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477424/" ]
74,402,092
<p>I have the following table (ID column exists but not shown below) :</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Email</th> <th>Course</th> <th>DateComplete</th> </tr> </thead> <tbody> <tr> <td>1@1.com</td> <td>Running</td> <td>01/01/2021</td> </tr> <tr> <td>1@1.com</td> <td>Running</...
[ { "answer_id": 74402196, "author": "Barbaros Özhan", "author_id": 5841306, "author_profile": "https://Stackoverflow.com/users/5841306", "pm_score": 2, "selected": true, "text": "SELECT Email, Course, MAX(DateComplete) AS DateComplete\n INTO [dbo].[new_table]\n FROM [dbo].[current_table...
2022/11/11
[ "https://Stackoverflow.com/questions/74402092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1936588/" ]
74,402,097
<p>I am trying to download some plots as images and these are being downloaded as blank images. The direct download works but the download through the drive shows blank images. ANY HELP WOULD BE HIGHLY APPRECIATED PLEASE.</p> <p>If I try to directly download the image, it is as expected, however, if I try through colla...
[ { "answer_id": 74408523, "author": "Nilesh Kumar", "author_id": 4572293, "author_profile": "https://Stackoverflow.com/users/4572293", "pm_score": 0, "selected": false, "text": "plt.show()" }, { "answer_id": 74416177, "author": "Sehr Malik", "author_id": 12493432, "aut...
2022/11/11
[ "https://Stackoverflow.com/questions/74402097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12493432/" ]
74,402,102
<pre><code>double timespec_delta2milliseconds(struct timespec *last, struct timespec *previous) { return (last-&gt;tv_sec - previous-&gt;tv_sec) + (last-&gt;tv_nsec - previous-&gt;tv_nsec)*pow(10,-3); } </code></pre> <p>This function computes the difference (last - previous) and returns the result expressed in ...
[ { "answer_id": 74402174, "author": "Some programmer dude", "author_id": 440558, "author_profile": "https://Stackoverflow.com/users/440558", "pm_score": 2, "selected": false, "text": "timespec tv_nsec timespec timesepc struct timespec diff_timespec(const struct timespec *time1, const stru...
2022/11/11
[ "https://Stackoverflow.com/questions/74402102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14444540/" ]
74,402,108
<p>I have many snowflake table which multiple columns with datatype TEXT or varchar having NULL values. I wanted to replace all the NULL values to empty string or blank at table level. I am looking for a way apart from NULLIF and COALESCE as they will work at column level and it is not feasible to specify 100's of colu...
[ { "answer_id": 74402174, "author": "Some programmer dude", "author_id": 440558, "author_profile": "https://Stackoverflow.com/users/440558", "pm_score": 2, "selected": false, "text": "timespec tv_nsec timespec timesepc struct timespec diff_timespec(const struct timespec *time1, const stru...
2022/11/11
[ "https://Stackoverflow.com/questions/74402108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10974358/" ]
74,402,113
<p>I want to get middle of the users screen while in activity and I tried to convert DisplayMetrics to Float. The error says &quot;Unresolved reference.&quot; How do I get Float from DisplayPixels? Heres my code:</p> <pre><code>val dpFloat = dp.toFloat() </code></pre> <p>I wanted to get Float from DisplayMetrics.</p>
[ { "answer_id": 74402404, "author": "Ignacio E. Loyola", "author_id": 12893649, "author_profile": "https://Stackoverflow.com/users/12893649", "pm_score": 1, "selected": false, "text": "val scale = resources.displayMetrics.density\nval dpToFloat = (sizeInDp * scale)\n fun Float.dpToFloat()...
2022/11/11
[ "https://Stackoverflow.com/questions/74402113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477469/" ]
74,402,123
<p>I am trying to parse a dataframe column called <code>'tags'</code> that contains a list of dicts and as an output create a list of the values of the key <code>var1</code>:</p> <p>Dataframe column 'tags' example value:</p> <pre><code>[{'var1': 'blue','var2': 123,'var3': 888},{'var1': 'red','var2': 123,'var3': 888},{'...
[ { "answer_id": 74402277, "author": "jezrael", "author_id": 2901002, "author_profile": "https://Stackoverflow.com/users/2901002", "pm_score": 3, "selected": true, "text": "if-else tags df['new'] = [[] if isinstance(x, float) else [y.get('var1') for y in x] for x in df['tags']]\n" }, {...
2022/11/11
[ "https://Stackoverflow.com/questions/74402123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3045351/" ]
74,402,173
<p>I am implementing a checkout page using Laravel and Vue.js. Test cards that don't require 3D Secure work well (e.g. 4242 4242 4242 4242). Test cards that require the customer to complete 3D Secure 2 authentication (e.g. 4000000000003220) also work(The pop up shows up after I call the confirmCardSetup method).</p> <p...
[ { "answer_id": 74402277, "author": "jezrael", "author_id": 2901002, "author_profile": "https://Stackoverflow.com/users/2901002", "pm_score": 3, "selected": true, "text": "if-else tags df['new'] = [[] if isinstance(x, float) else [y.get('var1') for y in x] for x in df['tags']]\n" }, {...
2022/11/11
[ "https://Stackoverflow.com/questions/74402173", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7063248/" ]
74,402,175
<p>Here is the Python code:</p> <pre class="lang-py prettyprint-override"><code>def _get_handler_by_topic_arn(topic_arn: str, event_name: str, event_message: dict): if topic_arn == CONFIG.get(&quot;MT_MAIN_SNS_TOPIC_ARN&quot;): return MT_MAIN_TOPIC_HANDLERS.get(event_name) if topic_arn == CONFIG.get(&qu...
[ { "answer_id": 74402246, "author": "Fra93", "author_id": 4952549, "author_profile": "https://Stackoverflow.com/users/4952549", "pm_score": 1, "selected": false, "text": "def _get_handler_by_topic_arn(topic_arn: str, event_name: str, event_message: dict):\n ret_value = None\n \n ...
2022/11/11
[ "https://Stackoverflow.com/questions/74402175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7123717/" ]
74,402,203
<pre><code>void draw(unsigned char *image) { for (int y = 0; y &lt; HEIGHT; y++) { for (int x = 0; x &lt; WIDTH; x++) { if (someCondition) { int red = x * 256 / WIDTH; int green = 255; ...
[ { "answer_id": 74402295, "author": "463035818_is_not_a_number", "author_id": 4117728, "author_profile": "https://Stackoverflow.com/users/4117728", "pm_score": 3, "selected": true, "text": "unsigned char [ ][ ][ ][ ] ........... [ ]\n\n ^\n |\n image\n image[i] *(image + i) i image[0] ima...
2022/11/11
[ "https://Stackoverflow.com/questions/74402203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5157600/" ]
74,402,206
<p>What will happen when you execute this code snippet?</p> <pre><code>#include &lt;iostream&gt; int main() { float a = 5.51; int b = static_cast&lt;int&gt;(a); std::cout &lt;&lt; b; } </code></pre> <p>Correct answer is:</p> <blockquote> <p>5 will be printed on standard output, with no compilation warnings ge...
[ { "answer_id": 74402295, "author": "463035818_is_not_a_number", "author_id": 4117728, "author_profile": "https://Stackoverflow.com/users/4117728", "pm_score": 3, "selected": true, "text": "unsigned char [ ][ ][ ][ ] ........... [ ]\n\n ^\n |\n image\n image[i] *(image + i) i image[0] ima...
2022/11/11
[ "https://Stackoverflow.com/questions/74402206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11381650/" ]
74,402,219
<p>normal intent isn't working in adapter class for action call. how can I make a call from my adapter class for recyclerview?</p> <pre><code> callButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String phoneNo2 = itemNumber.getText().toString(); In...
[ { "answer_id": 74402301, "author": "Egor", "author_id": 543539, "author_profile": "https://Stackoverflow.com/users/543539", "pm_score": 1, "selected": false, "text": "View Context v.context.startActivity(intent)\n" }, { "answer_id": 74402427, "author": "MAYUR SANCHETI", "...
2022/11/11
[ "https://Stackoverflow.com/questions/74402219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20041390/" ]
74,402,229
<p>I'm not sure what is wrong with this mutate function. When using this line of code, it doesn't change the values to the wanted values.</p> <pre><code>dataADstudies_1639_5cols &lt;- dataADstudies_1639_5cols_2D %&gt;% mutate(Activity = if_else(Parameter == grepl('ANT_L', Parameter), &quot;Phot_Ant_TL&quot;, Activity...
[ { "answer_id": 74402475, "author": "C. Sebastian", "author_id": 16363941, "author_profile": "https://Stackoverflow.com/users/16363941", "pm_score": 0, "selected": false, "text": "dataADstudies_1639_5cols <- dataADstudies_1639_5cols_2D %>%\n mutate(Activity = case_when(substr(Parameter, ...
2022/11/11
[ "https://Stackoverflow.com/questions/74402229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477435/" ]
74,402,231
<p>Help me please.<br /> Tell me how to sum each vector in a two-dimensional vector and write the result into a one-dimensional vector. On C++.<br /> Input:</p> <pre><code>std::vector&lt;std::vector&lt;double&gt;&gt; a = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; </code></pre> <p>Required Output:</p> <blockquote> <p>b = { 9, 12...
[ { "answer_id": 74402318, "author": "rturrado", "author_id": 260313, "author_profile": "https://Stackoverflow.com/users/260313", "pm_score": 1, "selected": false, "text": "b v a b fmt #include <fmt/ranges.h>\n#include <vector>\n\nint main() {\n std::vector<std::vector<double>> a = { { ...
2022/11/11
[ "https://Stackoverflow.com/questions/74402231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477416/" ]
74,402,236
<p>I am new to Programming and got stuck in it. I wanted to calculate the hourly temperature variation of an object throughout the year using some variables, which changes in every hour. The original data contains 60 columns and 8760 rows for the calculation.</p> <p>I got the desired output using the <code>for</code> l...
[ { "answer_id": 74402743, "author": "Santiago", "author_id": 13507658, "author_profile": "https://Stackoverflow.com/users/13507658", "pm_score": 1, "selected": false, "text": "purrr::accumulate2 library(data.table)\nlibrary(purrr)\nlibrary(magrittr)\n\ntable <- data.table(\"A\" = c(1), \"...
2022/11/11
[ "https://Stackoverflow.com/questions/74402236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20476539/" ]
74,402,244
<pre><code>SELECT '1000000' AS number UNION ALL SELECT '541' AS number UNION ALL SELECT '-500' AS number UNION ALL SELECT '100' AS number UNION ALL SELECT number, 'biggest' AS result WHERE number = 1000000 </code></pre> <p>How to make this work? My task is to find the biggest number from those that I added.</p> <pre><...
[ { "answer_id": 74402355, "author": "a_horse_with_no_name", "author_id": 330315, "author_profile": "https://Stackoverflow.com/users/330315", "pm_score": 1, "selected": false, "text": "select *\nfrom (\n SELECT 1000000 AS number\n UNION ALL\n SELECT 541 AS number\n UNION ALL\n SELECT ...
2022/11/11
[ "https://Stackoverflow.com/questions/74402244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477575/" ]
74,402,285
<p>I need to loop through a multidimensional array and extract all the data:</p> <p>PHP code:</p> <pre class="lang-php prettyprint-override"><code>//Loads the data and transforms it into an array $json_data = json_decode(file_get_contents('data.json')); //Loops through the array and returns the values echo '&lt;br&gt;...
[ { "answer_id": 74402355, "author": "a_horse_with_no_name", "author_id": 330315, "author_profile": "https://Stackoverflow.com/users/330315", "pm_score": 1, "selected": false, "text": "select *\nfrom (\n SELECT 1000000 AS number\n UNION ALL\n SELECT 541 AS number\n UNION ALL\n SELECT ...
2022/11/11
[ "https://Stackoverflow.com/questions/74402285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20452902/" ]
74,402,306
<p>How can I avoid doing embarrassing stuff like this when trying to apply multiple regular expressions using the <code>gsub()</code> function in jq?</p> <pre><code>.&quot;values&quot; | tostring | gsub(&quot;\&quot;&quot;;&quot;`&quot;) | gsub(&quot;\\[&quot;;&quot;&quot;) | gsub(&quot;\\]&quot;;&quot;&quot;) | gsub(&...
[ { "answer_id": 74402394, "author": "0stone0", "author_id": 5625547, "author_profile": "https://Stackoverflow.com/users/5625547", "pm_score": 2, "selected": false, "text": "split() = first join() , .values | map(\"`\\(split(\"=\") | first)`\") | join(\",\")\n" }, { "answer_id": 74...
2022/11/11
[ "https://Stackoverflow.com/questions/74402306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2409759/" ]
74,402,327
<p>I have created a click event listener then added a function in it which conatin some parameters, according to that parameters i am creating an audio element, which i play in further steps. Problem arises when i wish to pause that same audio after detecting another click, it never happens because it creates a new aud...
[ { "answer_id": 74402394, "author": "0stone0", "author_id": 5625547, "author_profile": "https://Stackoverflow.com/users/5625547", "pm_score": 2, "selected": false, "text": "split() = first join() , .values | map(\"`\\(split(\"=\") | first)`\") | join(\",\")\n" }, { "answer_id": 74...
2022/11/11
[ "https://Stackoverflow.com/questions/74402327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20214922/" ]
74,402,329
<p>Lets have 2 models:</p> <pre><code>class A(models.Model): f1 = models.CharField() f2 = models.IntegerField() f3 = models.BooleanField() class B(models.Model): f1 = models.CharField() f2 = models.IntegerField() f3 = models.DecimalField() </code></pre> <p>Lets have this data:</p> <pre><code>A...
[ { "answer_id": 74402394, "author": "0stone0", "author_id": 5625547, "author_profile": "https://Stackoverflow.com/users/5625547", "pm_score": 2, "selected": false, "text": "split() = first join() , .values | map(\"`\\(split(\"=\") | first)`\") | join(\",\")\n" }, { "answer_id": 74...
2022/11/11
[ "https://Stackoverflow.com/questions/74402329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6287581/" ]
74,402,346
<p>I have the following data.</p> <p>The column ['time_fall_asleep-minute'] represents the minute within the hour that one falls asleep.</p> <p>The column ['time_fall_asleep-hour'] represents the hour that one falls asleep.</p> <p>I would like to combine the two columns so that it gives an hour and minute reading.</p> ...
[ { "answer_id": 74402394, "author": "0stone0", "author_id": 5625547, "author_profile": "https://Stackoverflow.com/users/5625547", "pm_score": 2, "selected": false, "text": "split() = first join() , .values | map(\"`\\(split(\"=\") | first)`\") | join(\",\")\n" }, { "answer_id": 74...
2022/11/11
[ "https://Stackoverflow.com/questions/74402346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12985497/" ]
74,402,347
<p>I have a question about the function &quot;Analyse in Excel&quot; or &quot;Analyse in Excel&quot; in German when a PBI (Power BI) report has been published.</p> <p><a href="https://i.stack.imgur.com/UykvQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UykvQ.png" alt="enter image description here"...
[ { "answer_id": 74402394, "author": "0stone0", "author_id": 5625547, "author_profile": "https://Stackoverflow.com/users/5625547", "pm_score": 2, "selected": false, "text": "split() = first join() , .values | map(\"`\\(split(\"=\") | first)`\") | join(\",\")\n" }, { "answer_id": 74...
2022/11/11
[ "https://Stackoverflow.com/questions/74402347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8119797/" ]
74,402,361
<p>How can I change my SVG path to width: 7.58 and height: 16.62. (7.58x16.62)?</p> <p>My SVG icon is 19x19px but I'm looking to change the SVG PATH to width: 7.58 and height: 16.62.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre cl...
[ { "answer_id": 74402925, "author": "Dave Pritlove", "author_id": 2005666, "author_profile": "https://Stackoverflow.com/users/2005666", "pm_score": 1, "selected": false, "text": "svg d d=\"M x y L x y L x y\"\n svg {\n border: 1px solid black;\n width: 100%;\n height: 100%;\n}\n\ndiv {...
2022/11/11
[ "https://Stackoverflow.com/questions/74402361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
74,402,364
<p>I got this type of sport activity data in excel: <a href="https://i.stack.imgur.com/WQsMv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WQsMv.png" alt="sports data" /></a> I try to pull just a &quot;calorie&quot; value from column D to another cell. Any suggestions how to pull this data?</p> <p>...
[ { "answer_id": 74402432, "author": "Mayukh Bhattacharya", "author_id": 8162520, "author_profile": "https://Stackoverflow.com/users/8162520", "pm_score": 1, "selected": false, "text": "E1 =TEXTAFTER(TEXTBEFORE(D1,\",\"\"count\"),\"calorie\"\":\")+0\n F1 =REPLACE(LEFT(D1,FIND(\"\"\"count\"...
2022/11/11
[ "https://Stackoverflow.com/questions/74402364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477624/" ]
74,402,385
<p>So i am working with classes and if statements. When the if statement is inside the class def, it seems to be ignored and not sure what i am doing wrong. I want it to raise an exception if the criteria is not met.</p> <p>I tried to change name to __name but that did not seem to help. I also tried to remove def get_n...
[ { "answer_id": 74402432, "author": "Mayukh Bhattacharya", "author_id": 8162520, "author_profile": "https://Stackoverflow.com/users/8162520", "pm_score": 1, "selected": false, "text": "E1 =TEXTAFTER(TEXTBEFORE(D1,\",\"\"count\"),\"calorie\"\":\")+0\n F1 =REPLACE(LEFT(D1,FIND(\"\"\"count\"...
2022/11/11
[ "https://Stackoverflow.com/questions/74402385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20373321/" ]
74,402,458
<p>How can I get an application list like in get_app_list method in classy AdminSite?</p> <p>I try to do it this way, but then I get an empty list.</p> <pre><code>from django.contrib.admin.sites import AdminSite def change_view(self, request): ... context = { ... 'available...
[ { "answer_id": 74402432, "author": "Mayukh Bhattacharya", "author_id": 8162520, "author_profile": "https://Stackoverflow.com/users/8162520", "pm_score": 1, "selected": false, "text": "E1 =TEXTAFTER(TEXTBEFORE(D1,\",\"\"count\"),\"calorie\"\":\")+0\n F1 =REPLACE(LEFT(D1,FIND(\"\"\"count\"...
2022/11/11
[ "https://Stackoverflow.com/questions/74402458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19451391/" ]
74,402,480
<p>I am working on a python script in which i am trying to delete all the files which are there within the given folder , though few errors like below are acting as a road block due to which the code is not able to complete.</p> <pre><code>PermissionError: The process cannot access the file because it is being used by ...
[ { "answer_id": 74402432, "author": "Mayukh Bhattacharya", "author_id": 8162520, "author_profile": "https://Stackoverflow.com/users/8162520", "pm_score": 1, "selected": false, "text": "E1 =TEXTAFTER(TEXTBEFORE(D1,\",\"\"count\"),\"calorie\"\":\")+0\n F1 =REPLACE(LEFT(D1,FIND(\"\"\"count\"...
2022/11/11
[ "https://Stackoverflow.com/questions/74402480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20432746/" ]
74,402,488
<p>I have a question about the 'continue' function in Python. I wolud like to skip 'Antarctic' in the following list:</p> <pre><code>continents = = [&quot;Afrika&quot;, &quot;Antarktic&quot;, &quot;Asien&quot;, &quot;Australia&quot;, &quot;Europe&quot;, &quot;North America&quot;, &quot;South America&quot;] </code></pre...
[ { "answer_id": 74402539, "author": "Maximilian Burszley", "author_id": 8188846, "author_profile": "https://Stackoverflow.com/users/8188846", "pm_score": 0, "selected": false, "text": "continents = [\n \"Afrika\",\n \"Antarktic\",\n \"Asien\",\n \"Australia\",\n \"Europe\",\n \"Nort...
2022/11/11
[ "https://Stackoverflow.com/questions/74402488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477656/" ]
74,402,495
<p>Is there any way to lock the excel cell if it has value and unlock it if it has no value contained?</p> <p>e.g. if Persone updates the excel-sheet and sends it to another person, the second person only allows the update blank cells.</p>
[ { "answer_id": 74402732, "author": "Deevise", "author_id": 19478789, "author_profile": "https://Stackoverflow.com/users/19478789", "pm_score": 0, "selected": false, "text": "Private Sub Worksheet_Change(ByVal Target As Range)\n \n If Not Target.Value = \"\" Then\n ActiveShee...
2022/11/11
[ "https://Stackoverflow.com/questions/74402495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5820330/" ]
74,402,545
<p>I have the following <code>bytearray</code> in Python:</p> <pre><code>bytearray(b'\x02\xcb\x00\n\x02\xcb\x00\n\x02\xcb\x00\n\x02\xcb\x00\n') </code></pre> <p>I want to convert the hexa values of the <code>bytearray</code> to an array of integer values, by converting <code>\x02\xcb\x00</code> to an integer 183040 for...
[ { "answer_id": 74402617, "author": "B. van den Hoek", "author_id": 6125728, "author_profile": "https://Stackoverflow.com/users/6125728", "pm_score": 0, "selected": false, "text": "xs = bytearray(b'\\x02\\xcb\\x00\\n\\x02\\xcb\\x00\\n\\x02\\xcb\\x00\\n\\x02\\xcb\\x00\\n')\n\nresult = []\n...
2022/11/11
[ "https://Stackoverflow.com/questions/74402545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15852840/" ]
74,402,546
<p><strong>Requirement:</strong> Is there any optimal or easy way to filtered out the objects from an array which contains a specific property based on its value without <em>recursion</em>.</p> <p><strong>Problem statement:</strong> We can achieve this requirement using recursion but as data set (array of objects) is v...
[ { "answer_id": 74403071, "author": "Ben Aston", "author_id": 38522, "author_profile": "https://Stackoverflow.com/users/38522", "pm_score": 2, "selected": true, "text": "for..of .then(() => checkForOccupation(children)) (async () => { // i.\n const getFlags = async (arr) => { // ii.\n ...
2022/11/11
[ "https://Stackoverflow.com/questions/74402546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4116300/" ]
74,402,586
<p>Have defined an EventBridge rule, which is disabled by default.</p> <pre><code> new Rule(this, 'EmailRule', { ruleName: 'email-event-rule', description: 'trigger email handler', enabled: false, eventPattern: { detailType: ['email-event-rule-event'] }, targets: [new Lamb...
[ { "answer_id": 74403071, "author": "Ben Aston", "author_id": 38522, "author_profile": "https://Stackoverflow.com/users/38522", "pm_score": 2, "selected": true, "text": "for..of .then(() => checkForOccupation(children)) (async () => { // i.\n const getFlags = async (arr) => { // ii.\n ...
2022/11/11
[ "https://Stackoverflow.com/questions/74402586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17513741/" ]
74,402,595
<p>In List component we have this method.</p> <pre><code> List&lt;Widget&gt; generateList(goalList) { return List.generate( goalList.length, (int index) { return GoalCardBase( goalId: goalList.id, child: GoalCardData(goal: goalList[index]), ); }, ); } </co...
[ { "answer_id": 74402737, "author": "Arijeet", "author_id": 15387120, "author_profile": "https://Stackoverflow.com/users/15387120", "pm_score": 2, "selected": false, "text": " goalList.sort((b, a) => a['startDate'].compareTo(b['startDate']);" }, { "answer_id": 74402896, "autho...
2022/11/11
[ "https://Stackoverflow.com/questions/74402595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20459122/" ]
74,402,605
<p>I'm using the <a href="https://mui.com/material-ui/api/text-field/" rel="nofollow noreferrer">TextField</a> and <a href="https://mui.com/material-ui/api/menu-item/" rel="nofollow noreferrer">MenuItem</a> components in a next.js project.</p> <p>I'm passing the &quot;select&quot; prop in the TextField. This makes the ...
[ { "answer_id": 74402737, "author": "Arijeet", "author_id": 15387120, "author_profile": "https://Stackoverflow.com/users/15387120", "pm_score": 2, "selected": false, "text": " goalList.sort((b, a) => a['startDate'].compareTo(b['startDate']);" }, { "answer_id": 74402896, "autho...
2022/11/11
[ "https://Stackoverflow.com/questions/74402605", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14432154/" ]
74,402,607
<p>I am trying to create a new worksheet in a Google Sheets doc where I need to filter a Master data set based on values in a specific column.</p> <p>I originally did a VLOOKUP in each specific column that I wanted returned but it brough back blank rows for the corresponding rows that did not match, and eventually it b...
[ { "answer_id": 74402737, "author": "Arijeet", "author_id": 15387120, "author_profile": "https://Stackoverflow.com/users/15387120", "pm_score": 2, "selected": false, "text": " goalList.sort((b, a) => a['startDate'].compareTo(b['startDate']);" }, { "answer_id": 74402896, "autho...
2022/11/11
[ "https://Stackoverflow.com/questions/74402607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477127/" ]
74,402,645
<p>Help me out! I Have a column named N_AIH, and I have another column named IDENT, it contains the values 1 and 5.</p> <p>I need to create A new column 'LP' with the following condition: if the same N_AIH value repeats on IDENT 1 and 5.</p> <p>data:</p> <pre><code>N_AIH IDENT 122010 1 122010 ...
[ { "answer_id": 74402789, "author": "ThomasIsCoding", "author_id": 12158757, "author_profile": "https://Stackoverflow.com/users/12158757", "pm_score": 1, "selected": false, "text": "ave var N_AIH IDENT > transform(df, LP = ifelse(is.na(ave(IDENT, N_AIH, FUN = var)), \"NO\", \"YES\"))\n ...
2022/11/11
[ "https://Stackoverflow.com/questions/74402645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477516/" ]
74,402,671
<p>Try to produce subset of object</p> <pre><code>type person = {name: string, age: number, dob: Date}; type p1 = Pick&lt;person, 'name' | 'dob'&gt; </code></pre> <p>but get error (&quot;error dob is missing&quot;) if</p> <pre><code>person1: p1 = {name: 'test1'} </code></pre> <p>I am wondering what is the best way to c...
[ { "answer_id": 74403212, "author": "Giorgi Moniava", "author_id": 3963067, "author_profile": "https://Stackoverflow.com/users/3963067", "pm_score": 2, "selected": false, "text": "type person = {name: string, age: number, dob: Date};\ntype PickOptional<T, K extends keyof T> = {[k in K]?:T...
2022/11/11
[ "https://Stackoverflow.com/questions/74402671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11025517/" ]
74,402,677
<p>I have a single cell that contains several sets of text separated by a semi colon (extracted from another application) for example</p> <p>Cell A1: apple;banana;orange Cell A2: banana;orange;melon</p> <p>I am trying to introduce a formula in an adjacent cell which will return a value for apple if it contains apple, o...
[ { "answer_id": 74403212, "author": "Giorgi Moniava", "author_id": 3963067, "author_profile": "https://Stackoverflow.com/users/3963067", "pm_score": 2, "selected": false, "text": "type person = {name: string, age: number, dob: Date};\ntype PickOptional<T, K extends keyof T> = {[k in K]?:T...
2022/11/11
[ "https://Stackoverflow.com/questions/74402677", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477714/" ]
74,402,690
<p>I have two tables in Laravel, one is the <code>comment</code> table, and the second is the <code>users</code> table. In the comment table, I have this type of data.</p> <p><a href="https://i.stack.imgur.com/JKaQg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JKaQg.png" alt="enter image descripti...
[ { "answer_id": 74403212, "author": "Giorgi Moniava", "author_id": 3963067, "author_profile": "https://Stackoverflow.com/users/3963067", "pm_score": 2, "selected": false, "text": "type person = {name: string, age: number, dob: Date};\ntype PickOptional<T, K extends keyof T> = {[k in K]?:T...
2022/11/11
[ "https://Stackoverflow.com/questions/74402690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9424000/" ]
74,402,695
<p>I have a multi-line template literal. I want to splice it based on line number and character index in the line. For that, I need the number of characters in a given line. How can I get this number?</p> <p>As for what I have tried, well, I pretty much only put random numbers into <code>slice()</code> to see how much ...
[ { "answer_id": 74402893, "author": "0stone0", "author_id": 5625547, "author_profile": "https://Stackoverflow.com/users/5625547", "pm_score": 1, "selected": false, "text": "split() \\n filter() True .length const templateLiteral = `\nHello\nFooBar\nSomething else on this line\n123456789\n...
2022/11/11
[ "https://Stackoverflow.com/questions/74402695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15792934/" ]
74,402,704
<p>I have written a program like so:</p> <pre><code># Author: Evan Gertis # Date : 11/09 # program: Linear Regression # Resource: https://seaborn.pydata.org/generated/seaborn.scatterplot.html import seaborn as sns import pandas as pd import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s - %...
[ { "answer_id": 74402987, "author": "Lucas M. Uriarte", "author_id": 14543462, "author_profile": "https://Stackoverflow.com/users/14543462", "pm_score": 3, "selected": true, "text": "import seaborn as sns\nimport pandas as pd\nimport logging\nlogging.basicConfig(level=logging.INFO, format...
2022/11/11
[ "https://Stackoverflow.com/questions/74402704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3937811/" ]
74,402,717
<p>I am just starting out with OOP and trying to understand the code below. Why is book2 object changing its value even though i am not defining it to something els just using that object to define the values of the objects in books array.</p> <pre><code>Book[] books = new Book[5]; Book book2 = new Book(&quot;test&quot...
[ { "answer_id": 74403183, "author": "ThomasB", "author_id": 15107706, "author_profile": "https://Stackoverflow.com/users/15107706", "pm_score": 1, "selected": true, "text": "class Book {...} var anotherBook = new Book(existingBook);" } ]
2022/11/11
[ "https://Stackoverflow.com/questions/74402717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477876/" ]
74,402,744
<p>For some objects an attribute identifies a special column, for example the geometry column in an <code>sf</code> object. For conducting some calculations in <code>dplyr</code> it would be good to easily identify these columns. I'm searching for a way to create a function that helps identifying this column. In the ex...
[ { "answer_id": 74403168, "author": "Allan Cameron", "author_id": 12500315, "author_profile": "https://Stackoverflow.com/users/12500315", "pm_score": 4, "selected": true, "text": ". .data dplyr geometry_name <- function() {\n .data <- eval(quote(.data), parent.frame())\n nms <- names(ev...
2022/11/11
[ "https://Stackoverflow.com/questions/74402744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7459800/" ]
74,402,746
<p>Say for example, I have the following code</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p class="text-content"&gt; "First part of text" &lt;span id="divider"&gt...
[ { "answer_id": 74402783, "author": "Temba", "author_id": 3593621, "author_profile": "https://Stackoverflow.com/users/3593621", "pm_score": 0, "selected": false, "text": "<p class=\"text-content\">\n\"First part of text\"\n<span id=\"divider\"></span>\n</p>\n" }, { "answer_id": 74...
2022/11/11
[ "https://Stackoverflow.com/questions/74402746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11861581/" ]