qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,365,495
<p>I am porting the Matlab code to Python. In Matlab, indices start at 1, but in python, they start at 0. Is there any way to set the first index as 1 through a command line flag?</p> <p>It will be very useful for programming during index iteration.</p>
[ { "answer_id": 74365544, "author": "zccafa3", "author_id": 20435907, "author_profile": "https://Stackoverflow.com/users/20435907", "pm_score": -1, "selected": false, "text": "for i in range(1, end + 1):\n" }, { "answer_id": 74365683, "author": "jsbueno", "author_id": 1082...
2022/11/08
[ "https://Stackoverflow.com/questions/74365495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13646589/" ]
74,365,565
<p>I'm opening a discord channel and busy looping reading messages from it with the below statement to get the elements:</p> <pre><code>List&lt;org.openqa.WebElement&gt; ret = driver.findElement(By.tagName(&quot;main&quot;)) // driver = WebDriver .findElements(By.tagName(&quot;li&quot;)) .stream...
[ { "answer_id": 74371671, "author": "Easty77", "author_id": 2070127, "author_profile": "https://Stackoverflow.com/users/2070127", "pm_score": 2, "selected": true, "text": "List<WebElement> ret = driver.findElements(By.xpath(\"//main//li[contains(@id,'chat-messages')]\"));\n" }, { ...
2022/11/08
[ "https://Stackoverflow.com/questions/74365565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/474323/" ]
74,365,569
<p>I have a dataset that looks like this in R:</p> <pre><code>name = c(&quot;john&quot;, &quot;john&quot;, &quot;john&quot;, &quot;alex&quot;, &quot;alex&quot;, &quot;peter&quot;, &quot;peter&quot;, &quot;peter&quot;, &quot;peter&quot;) year = c(2010, 2011, 2015, 2014, 2016, 2010, 2011, 2012, 2013) age = c(21, 21, 21, ...
[ { "answer_id": 74371671, "author": "Easty77", "author_id": 2070127, "author_profile": "https://Stackoverflow.com/users/2070127", "pm_score": 2, "selected": true, "text": "List<WebElement> ret = driver.findElements(By.xpath(\"//main//li[contains(@id,'chat-messages')]\"));\n" }, { ...
2022/11/08
[ "https://Stackoverflow.com/questions/74365569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13203841/" ]
74,365,599
<p>I have a pandas dataframe, df defined as follows:</p> <pre><code>df = pd.DataFrame({'Year':[1,2,3,...],'A':[2000,4000,6000,...],'B':[200,400,600,...]}) </code></pre> <p>where 'Year' goes from 1-40 but it can be any integer n. I want to calculate a new column as follows</p> <pre><code>df['C'] = 0.06*(df.A + df.B] </c...
[ { "answer_id": 74365636, "author": "Naveed", "author_id": 3494754, "author_profile": "https://Stackoverflow.com/users/3494754", "pm_score": 0, "selected": false, "text": "years = [3,5,7,10]\n# filter rows matching the year, and calculate C\n\ndf.loc[df['Year'].isin(years), 'C']=0.06*(df....
2022/11/08
[ "https://Stackoverflow.com/questions/74365599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14145480/" ]
74,365,629
<p>I have this perl command:</p> <pre class="lang-bash prettyprint-override"><code># Result: o # echo foo | perl -pe 's/f(o)o/$1/' </code></pre> <p>I'd like the replacement expression to be passed via env variable:</p> <pre class="lang-bash prettyprint-override"><code>echo foo | REPLACE='$1' perl -pe 's/f(o)o/$ENV{REPL...
[ { "answer_id": 74365753, "author": "mob", "author_id": 168657, "author_profile": "https://Stackoverflow.com/users/168657", "pm_score": 2, "selected": false, "text": "eval echo foo | REPLACE='$1' perl -pe 's/f(o)o/$ENV{REPLACE}/ee'\n" }, { "answer_id": 74366059, "author": "ike...
2022/11/08
[ "https://Stackoverflow.com/questions/74365629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210029/" ]
74,365,638
<p>I have informations about companies presented in a table. One of the field of this table is the mean value of each note the company received ('note_moyenne' in models.FicheIdentification). By clicking on a button, people are able to submit a new note for the company ('note' in models.EvaluationGenerale). I want the ...
[ { "answer_id": 74365753, "author": "mob", "author_id": 168657, "author_profile": "https://Stackoverflow.com/users/168657", "pm_score": 2, "selected": false, "text": "eval echo foo | REPLACE='$1' perl -pe 's/f(o)o/$ENV{REPLACE}/ee'\n" }, { "answer_id": 74366059, "author": "ike...
2022/11/08
[ "https://Stackoverflow.com/questions/74365638", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20452537/" ]
74,365,641
<p>I have a button and a region. When the button is pressed, I want it to show the region if the region is hidden, and hide the region if the region is shown. I'm trying to do this with a JavaScript condition. Here are the button and the region in the rendering pane:</p> <p><a href="https://i.stack.imgur.com/Ft38k.png"...
[ { "answer_id": 74365753, "author": "mob", "author_id": 168657, "author_profile": "https://Stackoverflow.com/users/168657", "pm_score": 2, "selected": false, "text": "eval echo foo | REPLACE='$1' perl -pe 's/f(o)o/$ENV{REPLACE}/ee'\n" }, { "answer_id": 74366059, "author": "ike...
2022/11/08
[ "https://Stackoverflow.com/questions/74365641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14451198/" ]
74,365,665
<p>I am using a List with a selection Binding. My expectation is that clearing the selection should update the List to not have any selected rows but the row UI remains selected.</p> <p>Here is the example code:</p> <pre><code>struct ContentView: View { @State private var selection: String? let names = [ ...
[ { "answer_id": 74368833, "author": "Guillermo Jiménez", "author_id": 14096169, "author_profile": "https://Stackoverflow.com/users/14096169", "pm_score": 2, "selected": true, "text": "import SwiftUI\n\n struct listSelection: View {\n \n @State private var sele...
2022/11/08
[ "https://Stackoverflow.com/questions/74365665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1684508/" ]
74,365,708
<p>I currently am writing a Powershell script that remotely removes users from a local admin group on a list of servers. The CSV headers are Computer and Name. For each entry of user (name), matches the server (computer).</p> <p>Ex.</p> <pre class="lang-none prettyprint-override"><code>Computer,Name Server1,User1 Serve...
[ { "answer_id": 74368833, "author": "Guillermo Jiménez", "author_id": 14096169, "author_profile": "https://Stackoverflow.com/users/14096169", "pm_score": 2, "selected": true, "text": "import SwiftUI\n\n struct listSelection: View {\n \n @State private var sele...
2022/11/08
[ "https://Stackoverflow.com/questions/74365708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13357839/" ]
74,365,734
<p>I'm trying to read some data from a text file I created into a list, but keep getting the &quot;TypeError: 'str' object is not callable&quot; error when i try to do this.</p> <p>Here is the code</p> <pre class="lang-py prettyprint-override"><code>class Weather(): &quot;&quot;&quot; Weather Class &quot;&quot;...
[ { "answer_id": 74368833, "author": "Guillermo Jiménez", "author_id": 14096169, "author_profile": "https://Stackoverflow.com/users/14096169", "pm_score": 2, "selected": true, "text": "import SwiftUI\n\n struct listSelection: View {\n \n @State private var sele...
2022/11/08
[ "https://Stackoverflow.com/questions/74365734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20332337/" ]
74,365,736
<p>I'm trying to stop my program when the Warrior are Priest are both with 0 or &lt; 0 or the vampire goes to 0 our &lt; 0 if not they will not advance for the next round and just finish the battle that way, and set up a winner.</p> <pre><code>while (warrior[0] and priest[0]) &gt; 0 or vampire[0] &gt; 0: #Loop until al...
[ { "answer_id": 74365807, "author": "Kedar U Shet", "author_id": 13542152, "author_profile": "https://Stackoverflow.com/users/13542152", "pm_score": 2, "selected": true, "text": " while (warrior[0] > 0 or priest[0] > 0) and vampire[0] > 0:\n" }, { "answer_id": 74365843, "autho...
2022/11/08
[ "https://Stackoverflow.com/questions/74365736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20442012/" ]
74,365,737
<p>Prior to <strong>Isolated</strong> Azure Functions, one could create an <strong>Output binding queue</strong> like so: <code>[Queue(...)] CloudQueue outputQueue</code></p> <p>Then, we could add a new message with the ability to add a Visibility Delay like so:</p> <pre><code>var cloudQueueMessage = new CloudQueueMess...
[ { "answer_id": 74365807, "author": "Kedar U Shet", "author_id": 13542152, "author_profile": "https://Stackoverflow.com/users/13542152", "pm_score": 2, "selected": true, "text": " while (warrior[0] > 0 or priest[0] > 0) and vampire[0] > 0:\n" }, { "answer_id": 74365843, "autho...
2022/11/08
[ "https://Stackoverflow.com/questions/74365737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/248925/" ]
74,365,745
<p>In <code>Android Studio</code> (version: Android Studio Dolphin 2021.3.1 Patch 1) before downloading virtual image with Android 12 (API 33, <code>Tiramisu</code>) I had to agree to the license agreement that start with the following worrying me statement:</p> <blockquote> <p>To get started with the Android SDK Previ...
[ { "answer_id": 74367381, "author": "Anton Samokat", "author_id": 1455694, "author_profile": "https://Stackoverflow.com/users/1455694", "pm_score": 0, "selected": false, "text": "Tiramisu" } ]
2022/11/08
[ "https://Stackoverflow.com/questions/74365745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1455694/" ]
74,365,747
<p>i have been working on the leetcode problems these days but i always get stuck with the problems where the solutions have the .next syntax. normally i used to run the solutions in my VScode console to see what it happens. but my Vscode console doesn't recognize the .next syntax so...</p> <p>can someone explain me by...
[ { "answer_id": 74367318, "author": "Scott Sauyet", "author_id": 1243641, "author_profile": "https://Stackoverflow.com/users/1243641", "pm_score": 1, "selected": true, "text": "/**\n * Definition for singly-linked list.\n * function ListNode(val, next) {\n * this.val = (val===undefine...
2022/11/08
[ "https://Stackoverflow.com/questions/74365747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20323181/" ]
74,365,763
<p>I'm working on a Django middleware to store all requests/responses in my main database (Postgres / SQLite). But it's not hard to guess that the overhead will be crazy, so I'm thinking to use Redis to queue the requests for an amount of time and then send them slowly to my database. e.g. receiving 100 requests, stori...
[ { "answer_id": 74367318, "author": "Scott Sauyet", "author_id": 1243641, "author_profile": "https://Stackoverflow.com/users/1243641", "pm_score": 1, "selected": true, "text": "/**\n * Definition for singly-linked list.\n * function ListNode(val, next) {\n * this.val = (val===undefine...
2022/11/08
[ "https://Stackoverflow.com/questions/74365763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1930464/" ]
74,365,772
<p>I have app with 3 entity models</p> <pre><code>public class Project { public Guid ProjectId { get; set; } public string ProjectName { get; set; } public string ProjectInfo { get; set; } public Guid DepartMentId { get; set; } public ICollection&lt;Employee&gt; Employees { get; set; } = new List&l...
[ { "answer_id": 74367318, "author": "Scott Sauyet", "author_id": 1243641, "author_profile": "https://Stackoverflow.com/users/1243641", "pm_score": 1, "selected": true, "text": "/**\n * Definition for singly-linked list.\n * function ListNode(val, next) {\n * this.val = (val===undefine...
2022/11/08
[ "https://Stackoverflow.com/questions/74365772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19727965/" ]
74,365,788
<p>How would i check to see if the ID exists within the localStorage object key array</p> <p>i am currenty using this and it does not work</p> <pre><code>if (favorites.includes(theid)) { alert('You Allready Added this Listing'); } </code></pre> <p>Also how do i pull the indivdual object array apart into ID , image , ti...
[ { "answer_id": 74367318, "author": "Scott Sauyet", "author_id": 1243641, "author_profile": "https://Stackoverflow.com/users/1243641", "pm_score": 1, "selected": true, "text": "/**\n * Definition for singly-linked list.\n * function ListNode(val, next) {\n * this.val = (val===undefine...
2022/11/08
[ "https://Stackoverflow.com/questions/74365788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20082467/" ]
74,365,794
<p>I encountered this bash script and wanted to know what <code>sed -i</code> is doing and what's up with the <code>/s</code> and <code>/g</code>? I looked at the manpages and it says text <code>sed</code> is used to transform text and the <code>i</code> flag is used to do it in place. But in the context of this script...
[ { "answer_id": 74365896, "author": "markp-fuso", "author_id": 7366100, "author_profile": "https://Stackoverflow.com/users/7366100", "pm_score": 0, "selected": false, "text": "bash SENTINEL_QUORUM=some_value\n sed -i \"s/some_value/some_value/g\" /redis/sentinel.conf\n some_value some_val...
2022/11/08
[ "https://Stackoverflow.com/questions/74365794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14307345/" ]
74,365,810
<pre><code>UPDATE Team SET Team_name = CONCAT((SELECT Team_name FROM Team INNER JOIN Coach ON Team.Coach_id = Coach.Coach_id WHERE Coach_name = 'Sidny Jonson'), '_nure') ; </code></pre> <blockquote> <p>ORA-01427: single-row subquery returns mor...
[ { "answer_id": 74365896, "author": "markp-fuso", "author_id": 7366100, "author_profile": "https://Stackoverflow.com/users/7366100", "pm_score": 0, "selected": false, "text": "bash SENTINEL_QUORUM=some_value\n sed -i \"s/some_value/some_value/g\" /redis/sentinel.conf\n some_value some_val...
2022/11/08
[ "https://Stackoverflow.com/questions/74365810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20452808/" ]
74,365,816
<p>I have the following tibble</p> <pre><code>structure(list(blockLabel = structure(c(1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L), .Label = c(&quot;auditory_only&quot;, &quot;bimodal_focus_auditory&quot;, &quot;bimodal_focus_visual&quot;, &q...
[ { "answer_id": 74365870, "author": "akrun", "author_id": 3732271, "author_profile": "https://Stackoverflow.com/users/3732271", "pm_score": 3, "selected": true, "text": "select split list list map pivot_wider flextable library(dplyr)\nlibrary(tidyr)\nlibrary(purrr)\nlibrary(flextable)\nli...
2022/11/08
[ "https://Stackoverflow.com/questions/74365816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14712320/" ]
74,365,910
<p>How can I ensure an array is passed a certain number of parameter in a function apart from using a tuple</p> <p>I have a function in typescript which takes an array as a parameter and when the function is called i want a certain number of elements to be passed in the array how can I achieve this apart from using a t...
[ { "answer_id": 74366049, "author": "caTS", "author_id": 18244921, "author_profile": "https://Stackoverflow.com/users/18244921", "pm_score": 2, "selected": true, "text": "Array<number> interface TupleOfTwoNumbers extends Array<number> {\n length: 2;\n 0: number;\n 1: number;\n}\n...
2022/11/08
[ "https://Stackoverflow.com/questions/74365910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15156582/" ]
74,365,914
<p>I want my image to float to the right. But if I use the float: right; write a command, it also takes the section with it. See image. The picture is already so far to the right because it is so big. (the rest is transparent).</p> <p><a href="https://i.stack.imgur.com/5RV7j.png" rel="nofollow noreferrer"><img src="htt...
[ { "answer_id": 74366107, "author": "Adam", "author_id": 12571484, "author_profile": "https://Stackoverflow.com/users/12571484", "pm_score": 0, "selected": false, "text": "div {\n display: flex;\n}\n\n#second {\n flex-grow: 1; /* added this */\n background-color: black;\n}\n\n.orange {...
2022/11/08
[ "https://Stackoverflow.com/questions/74365914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20452788/" ]
74,365,918
<p>I am trying to solve this question for 2 days but unable to solve it, gets really frustrated. I hope anyone can help me to get rid out of this problem.</p> <p>Write a program for given an integer list where each number represents the number of hops you can make in hopscotch game, determine whether you can reach to t...
[ { "answer_id": 74366081, "author": "Domi", "author_id": 16217518, "author_profile": "https://Stackoverflow.com/users/16217518", "pm_score": 2, "selected": false, "text": "sample1 = [2,3,1,1,4]\nsample2 = [3,2,1,0,4]\n\ndef hopscotch(sample):\n last_index = len(sample) - 1\n current...
2022/11/08
[ "https://Stackoverflow.com/questions/74365918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16613519/" ]
74,365,933
<p>The .NET v7 framework introduced the concept of Route Groups to group mapped endpoints together based on a common prefix in the path:</p> <pre class="lang-cs prettyprint-override"><code>app.MapGroup(&quot;/public/todos&quot;).MapTodosApi(); </code></pre> <p>Now, in order to return an absolute path for the <code>Crea...
[ { "answer_id": 74408319, "author": "pfx", "author_id": 9200675, "author_profile": "https://Stackoverflow.com/users/9200675", "pm_score": 3, "selected": true, "text": "GetPathByRouteValues GetUriByRouteValues routeName Todo var group = app.MapGroup(\"todos\");\ngroup\n .MapGet(\"/{id}\...
2022/11/08
[ "https://Stackoverflow.com/questions/74365933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777928/" ]
74,365,971
<p>I created a scatter plot using the <a href="https://en.wikipedia.org/wiki/Ggplot2" rel="nofollow noreferrer">ggplot2</a> package for my data. Since my data has a large number of points, I will explain my problem with already available small dataset. Consider this scatter plot:</p> <pre><code>ggplot(mtcars, aes(x=wt,...
[ { "answer_id": 74366063, "author": "stefan", "author_id": 12993861, "author_profile": "https://Stackoverflow.com/users/12993861", "pm_score": 2, "selected": false, "text": "ggforce::geom_mark_ellipse library(ggplot2)\nlibrary(ggforce)\n\nkm.mtcars <- kmeans(scale(mtcars), centers = 3)\n\...
2022/11/08
[ "https://Stackoverflow.com/questions/74365971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3138373/" ]
74,365,978
<p>I have three folders folder1, folder2, and folder3. They have data frames as follows:</p> <pre><code>folder1/ df1.csv df4.csv df5.csv folder2/ df1.csv df3.csv df4.csv folder3/ df4.csv </code></pre> <p>I am confused about how to contact the data frames using <code>pandas.concat()</code> with the same names in all t...
[ { "answer_id": 74366122, "author": "maxxel_", "author_id": 17575465, "author_profile": "https://Stackoverflow.com/users/17575465", "pm_score": 2, "selected": true, "text": "from os import listdir\nimport pandas as pd\n\nfolder_paths = ['put all the folder paths here']\ndf_dict = {'folder...
2022/11/08
[ "https://Stackoverflow.com/questions/74365978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13021743/" ]
74,365,987
<p>I would like to run a powershell script that can be supplied a directory name by the user and then it will check the directory, sub directories, and all file contents of those directories to compare if they are identical to each other. There are 8 servers that should all have identical files and contents. The below ...
[ { "answer_id": 74366122, "author": "maxxel_", "author_id": 17575465, "author_profile": "https://Stackoverflow.com/users/17575465", "pm_score": 2, "selected": true, "text": "from os import listdir\nimport pandas as pd\n\nfolder_paths = ['put all the folder paths here']\ndf_dict = {'folder...
2022/11/08
[ "https://Stackoverflow.com/questions/74365987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20452783/" ]
74,365,997
<p>I'm Getting some arrays from some wordpress custom fields:</p> <pre><code>$content = array(get_post_meta($postId, 'content')); $media = array(get_post_meta($postId, 'media')); $yt = array(get_post_meta($postId, 'youtube')); </code></pre> <p>I then need to have it printing in sequence, like:</p> <blockquote> <p>media...
[ { "answer_id": 74368282, "author": "leighboz", "author_id": 1807307, "author_profile": "https://Stackoverflow.com/users/1807307", "pm_score": -1, "selected": false, "text": "for for ($i = 0; $i < count($media); $i++) {\n for ($j = 0; $j < count($media[$i]); $j++) {\n echo '<li>...
2022/11/08
[ "https://Stackoverflow.com/questions/74365997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1018804/" ]
74,366,003
<p>Component:</p> <pre><code>const MyComponent = props =&gt; { const {price} = props; const result1 = useResult(price); return ( &lt;div&gt;...&lt;/div&gt; ) } </code></pre> <p>Custom Hook:</p> <pre><code>export const useResult = (price) =&gt; { const [result, setResult] = useState([]); useEffect...
[ { "answer_id": 74394417, "author": "Letincel", "author_id": 4735563, "author_profile": "https://Stackoverflow.com/users/4735563", "pm_score": -1, "selected": false, "text": "The test will have to be async: it('should ...', async() => { ....\n\nawait screen.findByText('whatever');\nThis ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366003", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1642344/" ]
74,366,009
<p><strong>React-native Android Platform building issue</strong></p> <blockquote> <p>The minCompileSdk (31) specified in a dependency's AAR metadata (<code>META-INF/com/android/build/gradle/aar-metadata.properties</code>) is greater than this module's compileSdkVersion (android-30). Dependency: androidx.appcompat:appco...
[ { "answer_id": 74366062, "author": "Jemish Rajpara", "author_id": 14434481, "author_profile": "https://Stackoverflow.com/users/14434481", "pm_score": 1, "selected": false, "text": "allprojects {\n configurations.all {\n resolutionStrategy {\n force 'com.facebook.react:...
2022/11/08
[ "https://Stackoverflow.com/questions/74366009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14434481/" ]
74,366,053
<p>While debugging any iOS application, Xcode builds and run successfully, also launches a simulator but it is not able to attach debugger from Xcode 14 to Simulator iOS app.</p> <p>It throws an error in Xcode:</p> <p><a href="https://i.stack.imgur.com/MtNSd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgu...
[ { "answer_id": 74384803, "author": "Wilson", "author_id": 6933737, "author_profile": "https://Stackoverflow.com/users/6933737", "pm_score": 1, "selected": false, "text": "sudo DevToolsSecurity -enable\n" } ]
2022/11/08
[ "https://Stackoverflow.com/questions/74366053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/775896/" ]
74,366,102
<p>I have the below rule for aws dms replication task. It copies rateattribute table from Test schema to target db sync-test schema. But it doesn't add a new column.</p> <pre><code>{ &quot;rules&quot;: [ { &quot;rule-type&quot;: &quot;transformation&quot;, &quot;rule-id&quot;: &quot;929406550&quot;, ...
[ { "answer_id": 74384803, "author": "Wilson", "author_id": 6933737, "author_profile": "https://Stackoverflow.com/users/6933737", "pm_score": 1, "selected": false, "text": "sudo DevToolsSecurity -enable\n" } ]
2022/11/08
[ "https://Stackoverflow.com/questions/74366102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17991267/" ]
74,366,132
<p>I need a type/interface to define a property that can be object or an array. The problem with typescript <code>|</code> operator is that if I use it I will have to explicitly check each time if the variable is array or not but I always know if its an object or an array. So instead I ended up using <code>as SomeType<...
[ { "answer_id": 74366793, "author": "Lesiak", "author_id": 1570854, "author_profile": "https://Stackoverflow.com/users/1570854", "pm_score": 2, "selected": false, "text": "satisfies const order1 = {\n main: { meat: 'beef' }\n} satisfies order;\n function makeOrder<T extends order>(o: T...
2022/11/08
[ "https://Stackoverflow.com/questions/74366132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20452864/" ]
74,366,166
<p>I've been researching like mad and have used this property before, but it is just not working for me. It just displays as already rotated.</p> <p>I suspect it's an issue with my browser, but just wanted to check that my code was ok.</p> <p>Thanks!</p> <p><div class="snippet" data-lang="js" data-hide="false" data-con...
[ { "answer_id": 74366238, "author": "Justinas", "author_id": 1346234, "author_profile": "https://Stackoverflow.com/users/1346234", "pm_score": 2, "selected": false, "text": "@keyframes .logosmall {\n width: 50%;\n border-radius: 50%;\n animation: .3s ease-in-out 0s 1 rotateImage forwar...
2022/11/08
[ "https://Stackoverflow.com/questions/74366166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5936256/" ]
74,366,179
<p>I'm developing a custom shell. In this assignment, I need to implement uniq-like command. Given sorted lines, <em>uniq</em> should be able to print all unique values and (their number of occurences if the command is <strong>uniq -c</strong>). Example code is stated at the very end.</p> <p>I have no problem with the ...
[ { "answer_id": 74366238, "author": "Justinas", "author_id": 1346234, "author_profile": "https://Stackoverflow.com/users/1346234", "pm_score": 2, "selected": false, "text": "@keyframes .logosmall {\n width: 50%;\n border-radius: 50%;\n animation: .3s ease-in-out 0s 1 rotateImage forwar...
2022/11/08
[ "https://Stackoverflow.com/questions/74366179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18747531/" ]
74,366,194
<p>I'm using react and context: When I fetch items and there is no data, I send null. null becomes undefined (within res.send). In my reducer, I use spread operator when new items are being added. That results in an err as I'm trying to spread undefined (when there is no items yet and later added its first undefined).<...
[ { "answer_id": 74366212, "author": "caTS", "author_id": 18244921, "author_profile": "https://Stackoverflow.com/users/18244921", "pm_score": 4, "selected": true, "text": "[action.payload, ...(state.items ?? [])]\n state.items null undefined [] state.items state.items" }, { "answer...
2022/11/08
[ "https://Stackoverflow.com/questions/74366194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6377312/" ]
74,366,204
<p>I have a list of items containing unique and repeating IDs, I want to sum the prices and display the number of the repeating IDs</p> <pre><code>class Model{ int id,price,count; Model(this.id,this.price,this.count); } List&lt;Model&gt; list1 = [ Model(1,5000,10), Model(2,1000,20), Model(1,5000,5), Model(...
[ { "answer_id": 74366444, "author": "Gwhyyy", "author_id": 18670641, "author_profile": "https://Stackoverflow.com/users/18670641", "pm_score": 1, "selected": false, "text": "void main() {\n int sum = 0;\n\n List<Model> list1 = [\n Model(1, 5000, 10),\n Model(2, 1000, 20),\n Mod...
2022/11/08
[ "https://Stackoverflow.com/questions/74366204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12034196/" ]
74,366,207
<p>Objective: From a time-series df, make a plot of each occurrence of a particular state (or factor level) with x timepoints before, and y timepoints after, the onset (i.e. first row) of that state. The graph should be centered on zero (on the x-axis), such that the x timepoints before the event are negative values, a...
[ { "answer_id": 74366444, "author": "Gwhyyy", "author_id": 18670641, "author_profile": "https://Stackoverflow.com/users/18670641", "pm_score": 1, "selected": false, "text": "void main() {\n int sum = 0;\n\n List<Model> list1 = [\n Model(1, 5000, 10),\n Model(2, 1000, 20),\n Mod...
2022/11/08
[ "https://Stackoverflow.com/questions/74366207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3448338/" ]
74,366,230
<p>I often get a list of names I need to update in a table from an Excel list, and I end up creating a SSIS program to reads the file into a staging table and doing it that way. But is there I way I could just copy and past the names into a table from Management Studio directly? Something like this:</p> <pre><code>crea...
[ { "answer_id": 74366291, "author": "Stu", "author_id": 15332650, "author_profile": "https://Stackoverflow.com/users/15332650", "pm_score": 1, "selected": false, "text": "create table #temp (personID int identity(1,1), userName varchar(15))\ninsert into #temp (userName)\nselect n from (va...
2022/11/08
[ "https://Stackoverflow.com/questions/74366230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2410605/" ]
74,366,239
<p>If you're using JS, the documentation works well. But in case of angular I would prefer to handle observables instead of promises. The problem is that this kind of promise has a handler. I tried many approaches listed below but nothing seems to work.</p> <pre><code>from(listen(&quot;click&quot;, v =&gt; v)) </code><...
[ { "answer_id": 74366345, "author": "Tobias S.", "author_id": 8613630, "author_profile": "https://Stackoverflow.com/users/8613630", "pm_score": 2, "selected": true, "text": "Observable new Observable const obs$ = new Observable((subscriber) => {\n const unlisten = listen(\"click\", v => ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13203815/" ]
74,366,252
<p>I am attempting to build a script that will request information (Hostname, MAC, IP, Caption (os version), and serial number using a list of computers pulled from AD.</p> <p>This works but it creates multiple lines/rows when instead I need all this information on one row. Yes I am a noob at this.. I can write a scrip...
[ { "answer_id": 74366345, "author": "Tobias S.", "author_id": 8613630, "author_profile": "https://Stackoverflow.com/users/8613630", "pm_score": 2, "selected": true, "text": "Observable new Observable const obs$ = new Observable((subscriber) => {\n const unlisten = listen(\"click\", v => ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453039/" ]
74,366,263
<p>I have an array that stores the ID and Placeholder title of a new component every time the button &quot;Create a list&quot; is clicked. I am trying to make sure that there are no duplicated ID's. Essentially I just want check that the ID doesn't already exist, and if it does; to create a new one.</p> <p>My code is b...
[ { "answer_id": 74366345, "author": "Tobias S.", "author_id": 8613630, "author_profile": "https://Stackoverflow.com/users/8613630", "pm_score": 2, "selected": true, "text": "Observable new Observable const obs$ = new Observable((subscriber) => {\n const unlisten = listen(\"click\", v => ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20422283/" ]
74,366,264
<p>I'm creating a Vue3 web app and I was wondering what is the best way to pass data from parent to nested components (more specific, from parent to child of children).</p> <p>Let's say I have this schema:</p> <pre><code> Card | | CardHeader CardBody | ...
[ { "answer_id": 74366333, "author": "Mina", "author_id": 11887902, "author_profile": "https://Stackoverflow.com/users/11887902", "pm_score": 0, "selected": false, "text": "Vuex pinia provide/inject provide inject export default {\n provide: {\n message: 'hello!'\n }\n}\n export defau...
2022/11/08
[ "https://Stackoverflow.com/questions/74366264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453029/" ]
74,366,274
<p>I'm trying to create a github action but I need to use an internal nuget package</p> <pre><code> - name: &quot;Setup Internal Packages&quot; run: | dotnet nuget add source ${{ secrets.artifactory_url }} \ -n myinternalpack \ -u ${{ secrets.artifactory_user }} \ -p ${{ secrets.artifactory_...
[ { "answer_id": 74366333, "author": "Mina", "author_id": 11887902, "author_profile": "https://Stackoverflow.com/users/11887902", "pm_score": 0, "selected": false, "text": "Vuex pinia provide/inject provide inject export default {\n provide: {\n message: 'hello!'\n }\n}\n export defau...
2022/11/08
[ "https://Stackoverflow.com/questions/74366274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15056431/" ]
74,366,280
<p>Here is a Rest Api method that sets the user rating. The database table contains the composite primary key: <code>user_id</code> + <code>rate_id</code>.</p> <p>When user tries to set the same rating the framework throws an exception. I catch it and return response.</p> <p>How to handle such these cases and make the...
[ { "answer_id": 74366333, "author": "Mina", "author_id": 11887902, "author_profile": "https://Stackoverflow.com/users/11887902", "pm_score": 0, "selected": false, "text": "Vuex pinia provide/inject provide inject export default {\n provide: {\n message: 'hello!'\n }\n}\n export defau...
2022/11/08
[ "https://Stackoverflow.com/questions/74366280", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20452649/" ]
74,366,293
<p>How to plot graph for 1:8 attributes using altair? Here is the <a href="http://archive.ics.uci.edu/ml/machine-learning-databases/00292/Wholesale%20customers%20data.csv" rel="nofollow noreferrer">link</a> to the dataset. I want to plot an interactive mark_point() graph for various attributes like fresh, frozen, etc,...
[ { "answer_id": 74366333, "author": "Mina", "author_id": 11887902, "author_profile": "https://Stackoverflow.com/users/11887902", "pm_score": 0, "selected": false, "text": "Vuex pinia provide/inject provide inject export default {\n provide: {\n message: 'hello!'\n }\n}\n export defau...
2022/11/08
[ "https://Stackoverflow.com/questions/74366293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453099/" ]
74,366,298
<p>Sorry my English is not good) So I was repeating after tutorial and the tutor wrote a:link and gave a property color:red; but when i did so it didn't change it's color here is html:</p> <pre><code>&lt;nav class=&quot;clearfix&quot;&gt; &lt;ul class=&quot;navigation&quot;&gt; &lt;li&gt;&lt;a href=&quot;&quot; c...
[ { "answer_id": 74366385, "author": "Emile Youssef FEGHALI EL", "author_id": 19603779, "author_profile": "https://Stackoverflow.com/users/19603779", "pm_score": -1, "selected": true, "text": "href #" }, { "answer_id": 74366389, "author": "Tymon Jasiukiewicz", "author_id": ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366298", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20381377/" ]
74,366,350
<p>I'm trying to get the version of the app from the jenkins log to send it to email.</p> <p>The log (part of it) is:</p> <pre><code>[INFO] Image 03127cdb479b: Layer already exists [INFO] Image 9c742cd6c7a5: Layer already exists [INFO] Image 1f8a8b50f407: Pushing [INFO] Image 1f8a8b50f407: Pushed [INFO] 4.2.3-202211071...
[ { "answer_id": 74366385, "author": "Emile Youssef FEGHALI EL", "author_id": 19603779, "author_profile": "https://Stackoverflow.com/users/19603779", "pm_score": -1, "selected": true, "text": "href #" }, { "answer_id": 74366389, "author": "Tymon Jasiukiewicz", "author_id": ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1959257/" ]
74,366,357
<p>I just updated my Visual Studio instance from 17.3.6 to 17.4.0. Then I tried a clean build of my solution. Suddenly one of my projects gives me linker errors</p> <pre><code>8&gt;pch.obj : error LNK2001: unresolved external symbol __imp___tls_index_?init@?1??lazy_init_num_threads@internal@at@@YAXXZ@4_NA 8&gt;pch.o...
[ { "answer_id": 74400482, "author": "MSalters", "author_id": 15416, "author_profile": "https://Stackoverflow.com/users/15416", "pm_score": 2, "selected": true, "text": "at::internal::lazy_init_num_threads" }, { "answer_id": 74437172, "author": "Armen Poghosov", "author_id"...
2022/11/08
[ "https://Stackoverflow.com/questions/74366357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5869304/" ]
74,366,371
<p>As I can tell it's not possible to just assign delete keycode to another key, so I tried to recreate its functionality, but I can't figure out how to do it properly.</p> <p>I tried to do it with slice, and it actually does what it should for the first time, but then any key I press triggers delete.</p> <p><div class...
[ { "answer_id": 74400482, "author": "MSalters", "author_id": 15416, "author_profile": "https://Stackoverflow.com/users/15416", "pm_score": 2, "selected": true, "text": "at::internal::lazy_init_num_threads" }, { "answer_id": 74437172, "author": "Armen Poghosov", "author_id"...
2022/11/08
[ "https://Stackoverflow.com/questions/74366371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10267441/" ]
74,366,373
<p>I've ready many stackoverflow answer, watched youtube videos and read many articles, and I still can't completely understand why we need two tokens. Here are my assumptions, please tell me where I am going wrong:</p> <p>Access Token:</p> <ol> <li><p>Result of some oauth flow, where an application requests for access...
[ { "answer_id": 74485915, "author": "Takahiko Kawasaki", "author_id": 1174054, "author_profile": "https://Stackoverflow.com/users/1174054", "pm_score": 0, "selected": false, "text": "openid" } ]
2022/11/08
[ "https://Stackoverflow.com/questions/74366373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5384098/" ]
74,366,377
<p>How do I add color to the header (i.e the column names) of my data frame using the <code>gt()</code> function in R</p> <pre><code>gt_Head &lt;- gt_Head %&gt;% tab_header( title = md(&quot;**Table of First 10 Observations**&quot;) )%&gt;% tab_style( style = cell_text(weight = &quot;bold&quot;), loca...
[ { "answer_id": 74366499, "author": "Julian", "author_id": 14137004, "author_profile": "https://Stackoverflow.com/users/14137004", "pm_score": 3, "selected": true, "text": "column_labels.background.color library(gt)\nhead(mtcars, 10) |> \n gt() |> \n tab_header(\n title = md(\"**Tabl...
2022/11/08
[ "https://Stackoverflow.com/questions/74366377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6686671/" ]
74,366,379
<pre><code>interface GetAmountProps { value: undefined | string } const getAmount = (value: GetAmountProps): string =&gt; { if (value === undefined) return '(0)'; return value; }; export default getAmount; </code></pre> <p>Why do I have an error on the line with <code>return value;</code>?</p> <blockquote> <p>...
[ { "answer_id": 74366418, "author": "Samathingamajig", "author_id": 12101554, "author_profile": "https://Stackoverflow.com/users/12101554", "pm_score": 2, "selected": true, "text": "value {\n value: \"banana\"\n}\n string type GetAmountProps = undefined | string;\n const getAmount = ({va...
2022/11/08
[ "https://Stackoverflow.com/questions/74366379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18942316/" ]
74,366,421
<p>Working with a Java client/server application and no access to source code.</p> <p>The client application uses the URLConnection object when making calls to the server. Most of the time it works but sporadically it fails with the following error.</p> <pre><code>java.net.BindException:Address already in use </code></...
[ { "answer_id": 74366418, "author": "Samathingamajig", "author_id": 12101554, "author_profile": "https://Stackoverflow.com/users/12101554", "pm_score": 2, "selected": true, "text": "value {\n value: \"banana\"\n}\n string type GetAmountProps = undefined | string;\n const getAmount = ({va...
2022/11/08
[ "https://Stackoverflow.com/questions/74366421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3601445/" ]
74,366,426
<p>how can I exclude numbers from a range without creating a giant list?</p> <p>How would I get all the numbers from 1, 100, for example, but exclude every nth number?</p> <p>And what about with multiple n's? Exclude every 3rd and every 11th number, for example.</p> <p>What's the best way to do this?</p> <p>It's easy ...
[ { "answer_id": 74366456, "author": "Cory Kramer", "author_id": 2296458, "author_profile": "https://Stackoverflow.com/users/2296458", "pm_score": 1, "selected": false, "text": ">>> import numpy as np\n>>> values = np.arange(100)\n>>> values[values % 3 != 0]\narray([ 1, 2, 4, 5, 7, 8,...
2022/11/08
[ "https://Stackoverflow.com/questions/74366426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453054/" ]
74,366,429
<p>I have this query to fetch most recent conversations grouped by phone number, however the query time is too slow. How can it be faster?</p> <pre><code>SELECT * from messages WHERE id IN (SELECT max(id) from messages GROUP BY phone) AND chat = :ch AND status = :st AND seller_id = :seller ORDER BY created_at DESC </co...
[ { "answer_id": 74366456, "author": "Cory Kramer", "author_id": 2296458, "author_profile": "https://Stackoverflow.com/users/2296458", "pm_score": 1, "selected": false, "text": ">>> import numpy as np\n>>> values = np.arange(100)\n>>> values[values % 3 != 0]\narray([ 1, 2, 4, 5, 7, 8,...
2022/11/08
[ "https://Stackoverflow.com/questions/74366429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9137983/" ]
74,366,436
<p>I am training a multi-task transformer for a project and would like to switch my data structure over to TFRecords because my training is bottle-necked by on-the-fly data generation. I am currently structuring a single sample of data as a dictionary of tensors, like this:</p> <p><code>{'continuous_input': tf.Tensor(...
[ { "answer_id": 74366456, "author": "Cory Kramer", "author_id": 2296458, "author_profile": "https://Stackoverflow.com/users/2296458", "pm_score": 1, "selected": false, "text": ">>> import numpy as np\n>>> values = np.arange(100)\n>>> values[values % 3 != 0]\narray([ 1, 2, 4, 5, 7, 8,...
2022/11/08
[ "https://Stackoverflow.com/questions/74366436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14011525/" ]
74,366,438
<p>Is there a way in C++ to define a function so that I could do things like this:</p> <pre><code>foo( &quot;Error on line &quot; &lt;&lt; iLineNumber ); foo( &quot;name &quot; &lt;&lt; strName &lt;&lt; &quot; is Invalid&quot; ); </code></pre> <p>as it is now, I'm having to declare an ostringstream object before I call...
[ { "answer_id": 74366598, "author": "François Andrieux", "author_id": 7359094, "author_profile": "https://Stackoverflow.com/users/7359094", "pm_score": 4, "selected": true, "text": "std::ostringstream #include <sstream>\n#include <string>\n\nvoid foo(std::ostringstream osstr)\n{\n // U...
2022/11/08
[ "https://Stackoverflow.com/questions/74366438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2179289/" ]
74,366,479
<p>We have a DNN site and I noticed on our home page that the dev tools show an error with an events.js file that is trying to call &quot;analytics.tiktok.com&quot;. It is being blocked. I don't know if this is purposeful and I've searched our DNN modules code but haven't found an such reference.</p> <p>The other devs ...
[ { "answer_id": 74366598, "author": "François Andrieux", "author_id": 7359094, "author_profile": "https://Stackoverflow.com/users/7359094", "pm_score": 4, "selected": true, "text": "std::ostringstream #include <sstream>\n#include <string>\n\nvoid foo(std::ostringstream osstr)\n{\n // U...
2022/11/08
[ "https://Stackoverflow.com/questions/74366479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/323425/" ]
74,366,497
<p>After enabling the Middle East (Bahrain &amp; UAE) regions. when using the AWS CLI I received this error even though I've enabled STS in Regional endpoints.</p> <p><img src="https://i.stack.imgur.com/w98QA.png" alt="image1" /></p> <p><img src="https://i.stack.imgur.com/AWj7Q.png" alt="image4" /></p>
[ { "answer_id": 74366598, "author": "François Andrieux", "author_id": 7359094, "author_profile": "https://Stackoverflow.com/users/7359094", "pm_score": 4, "selected": true, "text": "std::ostringstream #include <sstream>\n#include <string>\n\nvoid foo(std::ostringstream osstr)\n{\n // U...
2022/11/08
[ "https://Stackoverflow.com/questions/74366497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12181518/" ]
74,366,541
<p>My tables:</p> <p>questions</p> <pre><code>id: serial content: text </code></pre> <p>tags</p> <pre><code>id: serial name: text </code></pre> <p>questions_tags</p> <pre><code>question_id integer tag_id integer </code></pre> <p>I need to select all questions with tag 'css', but don't remove all other tags from JSON fr...
[ { "answer_id": 74367412, "author": "GMB", "author_id": 10676716, "author_profile": "https://Stackoverflow.com/users/10676716", "pm_score": 2, "selected": true, "text": "where having SELECT q.id, jsonb_agg(to_jsonb(t)) AS tags\nFROM questions q\nINNER JOIN questions_tags qt ON qt.question...
2022/11/08
[ "https://Stackoverflow.com/questions/74366541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17685412/" ]
74,366,553
<p>I'm starting to work on a react components library and I want to reuse some SCSS code we share with other non-react projects.</p> <p>To accomplish that, I'm trying to use <a href="https://css-tricks.com/introducing-sass-modules/" rel="nofollow noreferrer">SASS modules</a> into react component.</p> <p>The simple use ...
[ { "answer_id": 74367877, "author": "Beatriz Infante", "author_id": 7773975, "author_profile": "https://Stackoverflow.com/users/7773975", "pm_score": 2, "selected": true, "text": "<button className={`${styles.button} ${styles[variant]}`}>\n" }, { "answer_id": 74368131, "author...
2022/11/08
[ "https://Stackoverflow.com/questions/74366553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1883581/" ]
74,366,559
<p>This is just a conceptual question to test if I understand how X works.</p> <p>Let's I have an X server running on machine A. If I make a new directory called <code>/tmp/.X11-unix</code> on on machine B, and use sshfs to mount <code>root@A:/tmp/.X11-unix</code> to <code>root@B:/tmp/.X11-unix</code>, would I be able ...
[ { "answer_id": 74368283, "author": "Philippe", "author_id": 2125671, "author_profile": "https://Stackoverflow.com/users/2125671", "pm_score": 1, "selected": false, "text": "socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CONNECT:/tmp/.X11-unix/X0\n mkdir /tmp/.X11-unix\nsocat UNIX-LISTEN:/tmp/...
2022/11/08
[ "https://Stackoverflow.com/questions/74366559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5693890/" ]
74,366,565
<p>I have a folder and inside has a list of subfolders/files Folders</p> <ul> <li>2022</li> <li>20221101</li> <li>20221103</li> <li>20221107</li> <li>20221108</li> <li>test123</li> <li>results</li> <li>test.txt</li> </ul> <p>Using Powershell</p> <ol> <li>How do get the list of folders that are dates.</li> <li>How do I ...
[ { "answer_id": 74366715, "author": "Santiago Squarzon", "author_id": 15339544, "author_profile": "https://Stackoverflow.com/users/15339544", "pm_score": 4, "selected": true, "text": "TryParseExact DateTime Sort-Object Select-Object -Directory -Filter \"2022????\" 2022 $ref = [ref] [datet...
2022/11/08
[ "https://Stackoverflow.com/questions/74366565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19582384/" ]
74,366,585
<p>I am working on a project that has a GUI and tanks that move. While tanks move fine, I am not able to figure out how to move/rotate them individually. I also need to clean my code as I feel I have a lot of extra stuff going on.</p> <p>Here is some code, and here's what I tried.</p> <p>I have four classes. <em>Missil...
[ { "answer_id": 74366745, "author": "Hovercraft Full Of Eels", "author_id": 522444, "author_profile": "https://Stackoverflow.com/users/522444", "pm_score": 2, "selected": false, "text": "java.util.List<Tank>" }, { "answer_id": 74366853, "author": "MadProgrammer", "author_i...
2022/11/08
[ "https://Stackoverflow.com/questions/74366585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15831176/" ]
74,366,603
<p>I have written a piece of code that I am using to research the behavior of different libraries and functions. And doing so, I stumbled upon some strange behavior with sscanf.</p> <p>I have a piece of code that reads an input into a buffer, then tries to put that value into a numeric variable.</p> <p>When I call ssca...
[ { "answer_id": 74366745, "author": "Hovercraft Full Of Eels", "author_id": 522444, "author_profile": "https://Stackoverflow.com/users/522444", "pm_score": 2, "selected": false, "text": "java.util.List<Tank>" }, { "answer_id": 74366853, "author": "MadProgrammer", "author_i...
2022/11/08
[ "https://Stackoverflow.com/questions/74366603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4269730/" ]
74,366,613
<p>I have a button placed in the center using centerXAnchor of superview, but now I have to change the position of the button from centerX to align leading from code. However, it's not moving to the left. Instead, it gets full width button.</p> <pre class="lang-swift prettyprint-override"><code>buttonView!.translatesAu...
[ { "answer_id": 74366745, "author": "Hovercraft Full Of Eels", "author_id": 522444, "author_profile": "https://Stackoverflow.com/users/522444", "pm_score": 2, "selected": false, "text": "java.util.List<Tank>" }, { "answer_id": 74366853, "author": "MadProgrammer", "author_i...
2022/11/08
[ "https://Stackoverflow.com/questions/74366613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11260762/" ]
74,366,624
<p>I have the next data in my Mongo DB</p> <pre><code>{ sucursal: 1 productos: [ { producto: 1, kilos: 50 } ] }, { sucursal: 2 productos: [ { producto: 1, kilos: 30 }, { producto: 2, kilos: 50 } ] }, { sucursal: 1 productos: [ { produ...
[ { "answer_id": 74366745, "author": "Hovercraft Full Of Eels", "author_id": 522444, "author_profile": "https://Stackoverflow.com/users/522444", "pm_score": 2, "selected": false, "text": "java.util.List<Tank>" }, { "answer_id": 74366853, "author": "MadProgrammer", "author_i...
2022/11/08
[ "https://Stackoverflow.com/questions/74366624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13002388/" ]
74,366,649
<p>I've been using <code>graphql-codegen</code> for several month, it's a great tool.<br /> I've always used it with <code>@tanstack/react-query</code> <code>useQuery</code> &amp; <code>useMutation</code> hooks.</p> <p>Today, I would like to use it with <code>useQueries</code> (<a href="https://tanstack.com/query/v4/do...
[ { "answer_id": 74366745, "author": "Hovercraft Full Of Eels", "author_id": 522444, "author_profile": "https://Stackoverflow.com/users/522444", "pm_score": 2, "selected": false, "text": "java.util.List<Tank>" }, { "answer_id": 74366853, "author": "MadProgrammer", "author_i...
2022/11/08
[ "https://Stackoverflow.com/questions/74366649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6939540/" ]
74,366,653
<p>How to group a pandas (or dask) dataframe and get the min, max and some operation, only when the diference between the grouped rows are 1 second?</p> <p><strong>MY DATA:</strong></p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>DT</th> <th>VALOR</th> </tr> </thead> <tbody> <tr...
[ { "answer_id": 74366869, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 3, "selected": true, "text": "df[\"DT\"] = pd.to_timedelta(df[\"DT\"])\n\ntmp = df.groupby(\"ID\", group_keys=False)[\"DT\"].apply(\n la...
2022/11/08
[ "https://Stackoverflow.com/questions/74366653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19505881/" ]
74,366,671
<p>I want to calculate the running difference of column ['Values'] based on a binary condition in another column ['Conditions']. If condition is 0 then it calculates the difference of the current row and preceding row. If condition is 1 then it calculates the difference of the current row and the previous row where the...
[ { "answer_id": 74366811, "author": "Ben.T", "author_id": 9274732, "author_profile": "https://Stackoverflow.com/users/9274732", "pm_score": 1, "selected": false, "text": "diff m = df['Condition'].astype(bool)\ndf['res'] = df['Values'].diff()\ndf.loc[m, 'res'] = df.loc[m, 'Values'].diff()\...
2022/11/08
[ "https://Stackoverflow.com/questions/74366671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19872294/" ]
74,366,672
<p>I need to get the latest row of each combinations of sender_id &amp; receiver_id</p> <p>my <code>messaging</code> table:</p> <pre><code>CREATE TABLE messaging ( msg_id SERIAL, sender_id BIGINT NOT NULL , receiver_id varchar(255) NOT NULL , msg text default NULL, media_link TEXT DEFAULT NULL, sent_time T...
[ { "answer_id": 74366811, "author": "Ben.T", "author_id": 9274732, "author_profile": "https://Stackoverflow.com/users/9274732", "pm_score": 1, "selected": false, "text": "diff m = df['Condition'].astype(bool)\ndf['res'] = df['Values'].diff()\ndf.loc[m, 'res'] = df.loc[m, 'Values'].diff()\...
2022/11/08
[ "https://Stackoverflow.com/questions/74366672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14677428/" ]
74,366,695
<p>I have a dataset like this:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: center;">Date</th> <th style="text-align: center;">Account</th> <th style="text-align: center;">Spend</th> </tr> </thead> <tbody> <tr> <td style="text-align: center;">1/2/21</td> <td style="tex...
[ { "answer_id": 74366811, "author": "Ben.T", "author_id": 9274732, "author_profile": "https://Stackoverflow.com/users/9274732", "pm_score": 1, "selected": false, "text": "diff m = df['Condition'].astype(bool)\ndf['res'] = df['Values'].diff()\ndf.loc[m, 'res'] = df.loc[m, 'Values'].diff()\...
2022/11/08
[ "https://Stackoverflow.com/questions/74366695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8941248/" ]
74,366,698
<p>anyone has an idea what causes the ff issue and how do we address this one . property) closeEmail: (email: IEmail) =&gt; string</p> <p>Ideas would be much appreciated</p> <p>I was tracing the type EmailSelection but the issue indicates on that part ...</p> <p><a href="https://i.stack.imgur.com/QLMpq.png" rel="nofoll...
[ { "answer_id": 74366811, "author": "Ben.T", "author_id": 9274732, "author_profile": "https://Stackoverflow.com/users/9274732", "pm_score": 1, "selected": false, "text": "diff m = df['Condition'].astype(bool)\ndf['res'] = df['Values'].diff()\ndf.loc[m, 'res'] = df.loc[m, 'Values'].diff()\...
2022/11/08
[ "https://Stackoverflow.com/questions/74366698", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19053255/" ]
74,366,707
<p>I'm working on the Library App as part of the Odin Project self-taught full stack course. Nearly done, just trying to get my data to show up as a table.</p> <p><strong>What I expect:</strong> When I hit &quot;submit book&quot;, I want the data to populate the table, even if no table currently exists. (see line 98-99...
[ { "answer_id": 74366788, "author": "Chris", "author_id": 19681343, "author_profile": "https://Stackoverflow.com/users/19681343", "pm_score": 2, "selected": true, "text": "<div id=\"table-container\" class=\"l2\">\n </table>\n</div>\n </table>" }, { "answer_id": 74366887, "...
2022/11/08
[ "https://Stackoverflow.com/questions/74366707", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11309195/" ]
74,366,709
<p>So I am trying to test if I understand lifetimes, and wanted to create a scenario that would fail at compile time. The code I came up with is below:</p> <pre><code>#[test] fn lifetime() { struct Identity&lt;'a&gt; { first_name: &amp;'a str } let name: Identity; { let first: &am...
[ { "answer_id": 74366836, "author": "isaactfa", "author_id": 11423104, "author_profile": "https://Stackoverflow.com/users/11423104", "pm_score": 4, "selected": true, "text": "first name first 'static #[test]\nfn lifetime() {\n struct Identity<'a> {\n first_name: &'a str\n }\n...
2022/11/08
[ "https://Stackoverflow.com/questions/74366709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12303851/" ]
74,366,726
<pre><code>struct ContentView: View { @State var error: Error? func ok() { error = nil } var body: some View { VStack {}.alert(&quot;Error&quot;, isPresented: error != nil) { Button(&quot;OK&quot;, action: ok) } message: { Text(error?.localizedDescription ?? &quot;&quot;) } } </code>...
[ { "answer_id": 74368647, "author": "whiteio", "author_id": 19222466, "author_profile": "https://Stackoverflow.com/users/19222466", "pm_score": 1, "selected": false, "text": "struct ContentView: View {\n @State var error: Error?\n @State var shouldShowModal = false\n\n func ok() {\n ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/414415/" ]
74,366,747
<p>I've looked into Heap's algorithm for generating permutations, and all the numerous results on here for similar questions.</p> <p>But they all seem to want every permutation where the input can be shuffled around as much as it wants to be.</p> <p>I'd like a function that returns all possible substrings where the ord...
[ { "answer_id": 74366805, "author": "trincot", "author_id": 5459839, "author_profile": "https://Stackoverflow.com/users/5459839", "pm_score": 3, "selected": true, "text": "function* getAllSubstrings(s) {\n for (let len = 1; len <= s.length; len++) {\n for (let i = 0; i + len <= ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15067728/" ]
74,366,752
<p>I have a matrix that shows flight data and travellers names, with totals to show how many passengers are on each flight. I need to be able to filter this table down by the row totals so that only those with 2+ travellers are shown, but I cannot figure out how to do so since the count will always show as 1 for each l...
[ { "answer_id": 74366965, "author": "Strictly Funk", "author_id": 13366191, "author_profile": "https://Stackoverflow.com/users/13366191", "pm_score": 2, "selected": true, "text": "Summary Table = SUMMARIZE(Flights,Flights[Flight Number], \"Travelers\", Count(Flights[Traveler]))\n" }, ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13799997/" ]
74,366,759
<p>I am trying to build a Spring Boot API using Spring Data JPA, Spring Web, and MySQL. I've done everything I am supposed to, it connects to the database, but Postman ALWAYS returns 404, &quot;Not Found&quot; error, no matter what I try. Spring Boot initializes succcesfully:</p> <pre><code> [0;39m [36mc.cg.TestProject...
[ { "answer_id": 74366965, "author": "Strictly Funk", "author_id": 13366191, "author_profile": "https://Stackoverflow.com/users/13366191", "pm_score": 2, "selected": true, "text": "Summary Table = SUMMARIZE(Flights,Flights[Flight Number], \"Travelers\", Count(Flights[Traveler]))\n" }, ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453187/" ]
74,366,770
<p>I am trying to use component MatSelect from Angular Material, on the iteration part i am using an array of objects that comes from a function</p> <p>Simple scenario that i got from Angular Material Website</p> <p>html file</p> <pre><code>&lt;h4&gt;Basic mat-select&lt;/h4&gt; &lt;mat-form-field appearance=&quot;fill&...
[ { "answer_id": 74367246, "author": "Ignacio Ovidio Muñoz Nicolás", "author_id": 20123929, "author_profile": "https://Stackoverflow.com/users/20123929", "pm_score": 0, "selected": false, "text": "[value]=\"food.value\" food.value food" }, { "answer_id": 74369374, "author": "pa...
2022/11/08
[ "https://Stackoverflow.com/questions/74366770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9028115/" ]
74,366,772
<p>I have a column <strong>number</strong> containing number and NaN. I want to add a column <strong>label</strong> identifying by 1 and 0 the &quot;zones&quot; where we have a number: the zone includes adjacents (above and below) rows.</p> <p>The result should look like below:</p> <pre><code>Number Label Nan 0 ...
[ { "answer_id": 74367146, "author": "Steinn Hauser Magnusson", "author_id": 13819183, "author_profile": "https://Stackoverflow.com/users/13819183", "pm_score": 0, "selected": false, "text": "label == 1 import pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame({\n \"Number\": [pd.NA,...
2022/11/08
[ "https://Stackoverflow.com/questions/74366772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5248243/" ]
74,366,808
<p>The title is mostly self-explanatory. I'm trying to create a program that opens a text file based on the title a user inputs in python. However, the program doesn't print anything - it's not taking time to compute and print out the text, but instead doesn't do anything.</p> <p>I've tried re-wording the program to no...
[ { "answer_id": 74366872, "author": "quamrana", "author_id": 4834, "author_profile": "https://Stackoverflow.com/users/4834", "pm_score": 0, "selected": false, "text": "0 stdin def get_filename():\n return input(\"Give a file name: \")\n\n\ndef process_file(filename):\n with open(fil...
2022/11/08
[ "https://Stackoverflow.com/questions/74366808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17468209/" ]
74,366,812
<p>I know this will cause memory leak because there is no unsubscription</p> <pre><code>interval(100).subscribe(console.log); </code></pre> <p>question is: If I do not pass any observer into subscribe method, is it still causing memory leak? thanks</p> <pre><code>interval(100).subscribe(); </code></pre>
[ { "answer_id": 74366872, "author": "quamrana", "author_id": 4834, "author_profile": "https://Stackoverflow.com/users/4834", "pm_score": 0, "selected": false, "text": "0 stdin def get_filename():\n return input(\"Give a file name: \")\n\n\ndef process_file(filename):\n with open(fil...
2022/11/08
[ "https://Stackoverflow.com/questions/74366812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19776366/" ]
74,366,827
<p>I have a dataset like this:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: center;">Date</th> <th style="text-align: center;">Account</th> <th style="text-align: center;">Spend</th> </tr> </thead> <tbody> <tr> <td style="text-align: center;">2/1/21</td> <td style="tex...
[ { "answer_id": 74367231, "author": "GMB", "author_id": 10676716, "author_profile": "https://Stackoverflow.com/users/10676716", "pm_score": 2, "selected": true, "text": "calendar(date) cross join left join select c.date, a.account, coalesce(t.spend, 0) spend\nfrom (\n select account, m...
2022/11/08
[ "https://Stackoverflow.com/questions/74366827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8941248/" ]
74,366,841
<p>I want to implement a function which takes a key k :: Either a b, and a list of pairs. I want the keys to have two shapes. One of the shape Left l, which will perform a lookup on the left half of the pairs, and one for the right half. Both shall return the other half of the first matching pair in the list. If no mat...
[ { "answer_id": 74366984, "author": "Chris", "author_id": 15261315, "author_profile": "https://Stackoverflow.com/users/15261315", "pm_score": 3, "selected": true, "text": "bidirectionalLookup Maybe (Either a b) lookupLhs lookupRhs Maybe bidirectionalLookup :: (Eq b, Eq a) => Either a b ->...
2022/11/08
[ "https://Stackoverflow.com/questions/74366841", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20272631/" ]
74,366,843
<p>I'm trying to add a json file's name as a key to the file structure itself. For example:</p> <p>Input:</p> <pre><code>test.json {} </code></pre> <p>Output:</p> <pre><code>test.json { &quot;test&quot;: {} } </code></pre> <p>These are the commands I'm trying:</p> <pre><code>output=`cat $file` | jq --arg fn &quot;...
[ { "answer_id": 74366918, "author": "pmf", "author_id": 2158479, "author_profile": "https://Stackoverflow.com/users/2158479", "pm_score": 3, "selected": true, "text": "input_filename rtrimstr jq '.[input_filename | rtrimstr(\".json\")] = {}' test.json\n --arg jq --arg fn \"test\" '.[$fn] ...
2022/11/08
[ "https://Stackoverflow.com/questions/74366843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9030977/" ]
74,366,870
<p>This is what I'm doing:</p> <pre><code>$content = array(get_post_meta($postId, 'content')); $media = array(get_post_meta($postId, 'media')); $yt = array(get_post_meta($postId, 'youtube')); $max = max(count($content), count($media), count($yt)); $combined = []; for($i = 0; $i &lt;= $max; $i++) { if(isset($content...
[ { "answer_id": 74367059, "author": "IT goldman", "author_id": 3807365, "author_profile": "https://Stackoverflow.com/users/3807365", "pm_score": 3, "selected": true, "text": "$single $content = array(get_post_meta($postId, 'content', true));\n $content = get_post_meta($postId, 'content');...
2022/11/08
[ "https://Stackoverflow.com/questions/74366870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1018804/" ]
74,366,889
<p>new bee in Kotlin and I am trying to compile a very simple thing. I'd like to initialize an array of lists with one line of code. But I get stuck in always have to uses mutable objects and inserts unto the list.</p> <p>Here what I have which <em>I don't like</em>. It is too complicated and many lines of code, the ar...
[ { "answer_id": 74367059, "author": "IT goldman", "author_id": 3807365, "author_profile": "https://Stackoverflow.com/users/3807365", "pm_score": 3, "selected": true, "text": "$single $content = array(get_post_meta($postId, 'content', true));\n $content = get_post_meta($postId, 'content');...
2022/11/08
[ "https://Stackoverflow.com/questions/74366889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3657747/" ]
74,366,926
<p>I'd like to create a dropdown in an html form that will dynamically list the next four upcoming Saturdays. The idea is that when someone is signing up they can choose which of the four upcoming Saturdays they'd like to come in to visit our space, so we can keep track and send automated email responses. The time is t...
[ { "answer_id": 74367059, "author": "IT goldman", "author_id": 3807365, "author_profile": "https://Stackoverflow.com/users/3807365", "pm_score": 3, "selected": true, "text": "$single $content = array(get_post_meta($postId, 'content', true));\n $content = get_post_meta($postId, 'content');...
2022/11/08
[ "https://Stackoverflow.com/questions/74366926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453475/" ]
74,366,934
<p>I have data with several infrequent levels in each column. Find the <code>dput()</code> of a small portion of data at the bottom of the question. Here's how the data is structured;</p> <pre><code> AppointmentMonth DayofWeek AppointmentHour EncounterType 1 Sep Mon 16 Office Vis...
[ { "answer_id": 74367005, "author": "MarcusCodrescu", "author_id": 20331897, "author_profile": "https://Stackoverflow.com/users/20331897", "pm_score": 0, "selected": false, "text": "data |>\n dplyr::add_count(\n AppointmentHour\n ) |>\n dplyr::filter(\n n < 3\n )\n#> Appointme...
2022/11/08
[ "https://Stackoverflow.com/questions/74366934", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9264869/" ]
74,367,007
<p>I was using RN V0.63.3 until <a href="https://github.com/facebook/react-native/issues/35210" rel="nofollow noreferrer">this </a>build failures happenings. I change my version to 0.63.5 and build done successfully. <strong>Now my application is being crashed instantly after build in development mode.</strong></p> <p>...
[ { "answer_id": 74367005, "author": "MarcusCodrescu", "author_id": 20331897, "author_profile": "https://Stackoverflow.com/users/20331897", "pm_score": 0, "selected": false, "text": "data |>\n dplyr::add_count(\n AppointmentHour\n ) |>\n dplyr::filter(\n n < 3\n )\n#> Appointme...
2022/11/08
[ "https://Stackoverflow.com/questions/74367007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3080525/" ]
74,367,019
<p>I'm trying to extract a certain character from a buffer that isn't ASCII. I'm reading in a file that contains movie names that have some non ASCII character sprinkled in it like so.</p> <pre class="lang-none prettyprint-override"><code>1|Tóy Story (1995) 2|GoldenEye (1995) 3|Four Rooms (1995) 4|Gét Shorty (1995) </c...
[ { "answer_id": 74367099, "author": "knittl", "author_id": 112968, "author_profile": "https://Stackoverflow.com/users/112968", "pm_score": 0, "selected": false, "text": "Map<Character, Character> charMap = new HashMap<>();\ncharMap.put('ó','o');\ncharMap.put('é','e');\ncharMap.put('ï','i'...
2022/11/08
[ "https://Stackoverflow.com/questions/74367019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453486/" ]
74,367,021
<p>Is there any way to search only the first line of a Multiline Textbox without knowing exactly at what position the text is you're looking for?</p> <p>If I knew the position of the text I was looking for I could do something like:</p> <pre><code>Dim myNotes As String = &quot;The book has a lot of text&quot; Dim myTex...
[ { "answer_id": 74367176, "author": "Jonathan Wood", "author_id": 522663, "author_profile": "https://Stackoverflow.com/users/522663", "pm_score": 2, "selected": true, "text": "int pos = text.IndexOfAny('\\r', '\\n');\nif (pos >= 0)\n text = text.SubString(0, pos);\n\n// text now contai...
2022/11/08
[ "https://Stackoverflow.com/questions/74367021", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7201774/" ]
74,367,046
<pre><code>students = ['Ally',100, 'Emo',88, 'Stefan',70, 'George',60, 'Alex',45, 'Vasil',32, 'Daniel',0] passed_students = list(filter(lambda x: x &gt;= 60, students)) print(passed_students) </code></pre> <p>What did I do wrong,I also added 'str' before...
[ { "answer_id": 74367100, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 1, "selected": false, "text": "students # convert students list to a dictionary:\nstudents = dict(zip(students[::2], students[1::2]))\n\n# ...
2022/11/08
[ "https://Stackoverflow.com/questions/74367046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453509/" ]
74,367,070
<p>I have written a super small logger in a typescript class and placed it in a file call <code>Log.ts</code>. The file also contains a type definition. I would like to reference it as a library so that I can create an instance of that class in the script lab script. How do I do that?</p> <p>I have placed the <code>Log...
[ { "answer_id": 74367100, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 1, "selected": false, "text": "students # convert students list to a dictionary:\nstudents = dict(zip(students[::2], students[1::2]))\n\n# ...
2022/11/08
[ "https://Stackoverflow.com/questions/74367070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18944680/" ]
74,367,084
<p>I have a list that looks like this:</p> <pre><code>lst = [(1,'X1', 256),(1,'X2', 356),(2,'X3', 223)] </code></pre> <p>The first item of each tuple is an ID and I want to marge the items of each tuple where the ID is the same. For example I want the list to look like this:</p> <pre><code>lst = [(1,('X1','X2'),(256,35...
[ { "answer_id": 74367100, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 1, "selected": false, "text": "students # convert students list to a dictionary:\nstudents = dict(zip(students[::2], students[1::2]))\n\n# ...
2022/11/08
[ "https://Stackoverflow.com/questions/74367084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453405/" ]
74,367,090
<p>I want to implement an algorithm that basically moves every value(besides the last one) one place to the left, as in the first element becomes the second element, and so on.</p> <p>I have already implemented it like this:</p> <pre><code>for(int i = 0; i &lt; vct.size() - 1; i++){ vct[i] = vct[i + 1]; } </code></...
[ { "answer_id": 74367243, "author": "Ahmed AEK", "author_id": 15649230, "author_profile": "https://Stackoverflow.com/users/15649230", "pm_score": 1, "selected": false, "text": "std::move_backwards <algorithms> std::move std::move_backward(vct.begin(),vct.end()-1,vct.end());\n std::move st...
2022/11/08
[ "https://Stackoverflow.com/questions/74367090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16400339/" ]
74,367,143
<p>Please, help. I'm use scrapingant for bypass cloudflare. The task to develop a real-time data parser, stuck at the request stage... :(</p> <p>`</p> <pre><code>headers = { &quot;accept&quot;: &quot;*/*&quot;, &quot;accept-encoding&quot;: &quot;gzip, deflate, br&quot;, &quot;accept-language&quot;: &quot;ru...
[ { "answer_id": 74367243, "author": "Ahmed AEK", "author_id": 15649230, "author_profile": "https://Stackoverflow.com/users/15649230", "pm_score": 1, "selected": false, "text": "std::move_backwards <algorithms> std::move std::move_backward(vct.begin(),vct.end()-1,vct.end());\n std::move st...
2022/11/08
[ "https://Stackoverflow.com/questions/74367143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453548/" ]
74,367,163
<p>I'm trying to make this design:</p> <p><a href="https://i.stack.imgur.com/yrOzK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yrOzK.jpg" alt="enter image description here" /></a></p> <p>What I do is this:</p> <p><a href="https://i.stack.imgur.com/OnU0l.jpg" rel="nofollow noreferrer"><img src="ht...
[ { "answer_id": 74367243, "author": "Ahmed AEK", "author_id": 15649230, "author_profile": "https://Stackoverflow.com/users/15649230", "pm_score": 1, "selected": false, "text": "std::move_backwards <algorithms> std::move std::move_backward(vct.begin(),vct.end()-1,vct.end());\n std::move st...
2022/11/08
[ "https://Stackoverflow.com/questions/74367163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18003111/" ]