qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,598,380
<p>I am unable to get few of the table columns as it requires <code>recursive query</code> which I am not good at. So basically, if its a direct transfer, then remarks section is likely to be null. And if there is a halt in between origin and destination then I need to add the stations to my remarks column.</p> <pre><c...
[ { "answer_id": 74598510, "author": "Benny Schärer", "author_id": 10445130, "author_profile": "https://Stackoverflow.com/users/10445130", "pm_score": -1, "selected": false, "text": "with base as (\n\n <some initial data select>\n\n UNION ALL\n\n select ...\n from base\n \n)\...
2022/11/28
[ "https://Stackoverflow.com/questions/74598380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20319015/" ]
74,598,383
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>ul{ display: inline; }</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul&gt;hi &l...
[ { "answer_id": 74598448, "author": "CBroe", "author_id": 1427878, "author_profile": "https://Stackoverflow.com/users/1427878", "pm_score": 1, "selected": false, "text": "ul padding-left 40px inline padding-left padding-right inline-block" }, { "answer_id": 74598477, "author":...
2022/11/28
[ "https://Stackoverflow.com/questions/74598383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20589585/" ]
74,598,418
<p>Say I've got a class who has a property called <code>MyClass.name</code>. I'm looping through some data where I want to arrange names to either be <code>MyClass.name</code> or <code>other</code>. I've got a method:</p> <pre><code>def return_name(self, the_name): if the_name == self.name: return the_name ...
[ { "answer_id": 74598448, "author": "CBroe", "author_id": 1427878, "author_profile": "https://Stackoverflow.com/users/1427878", "pm_score": 1, "selected": false, "text": "ul padding-left 40px inline padding-left padding-right inline-block" }, { "answer_id": 74598477, "author":...
2022/11/28
[ "https://Stackoverflow.com/questions/74598418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11350541/" ]
74,598,432
<p>I have a view controller with the below UI layout.</p> <p>There is a header view at the top with 3 labels, a footer view with 2 buttons at the bottom and an uitableview inbetween header view and footer view. The uitableview is dynamically loaded and on average has about 6 tableview cells. One of the buttons in th...
[ { "answer_id": 74598448, "author": "CBroe", "author_id": 1427878, "author_profile": "https://Stackoverflow.com/users/1427878", "pm_score": 1, "selected": false, "text": "ul padding-left 40px inline padding-left padding-right inline-block" }, { "answer_id": 74598477, "author":...
2022/11/28
[ "https://Stackoverflow.com/questions/74598432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20620823/" ]
74,598,438
<p>I have a pandas dataframe with a column named ranking_pos. All the rows of this column look like this: #123 of 12,216.</p> <p>The output I need is only the number of the ranking, so for this example: 123 (as an integer).</p> <p>How do I extract the number after the # and get rid of the of 12,216?</p> <p>Currently th...
[ { "answer_id": 74598471, "author": "DoreenBZ", "author_id": 6054532, "author_profile": "https://Stackoverflow.com/users/6054532", "pm_score": 0, "selected": false, "text": "df.loc[:,\"ranking_pos\"] =df.loc[:,\"ranking_pos\"].str.replace(\"#\",\"\").astype(int)\n" }, { "answer_id...
2022/11/28
[ "https://Stackoverflow.com/questions/74598438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20618564/" ]
74,598,440
<p>I have a table called &quot;employment&quot; which looks like</p> <p><a href="https://i.stack.imgur.com/MTLBR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MTLBR.png" alt="enter image description here" /></a></p> <p>if the boss column is empty it means he/she is the &quot;CEO&quot;</p> <p>and if...
[ { "answer_id": 74598614, "author": "Akina", "author_id": 10138734, "author_profile": "https://Stackoverflow.com/users/10138734", "pm_score": 2, "selected": true, "text": "SELECT name,\n CASE WHEN boss = '' -- or maybe WHEN boss IS NULL \n THEN 'CEO'\n WHEN E...
2022/11/28
[ "https://Stackoverflow.com/questions/74598440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17890063/" ]
74,598,442
<p>I want to get closest date from $search_date if is not same values in $array['date']. If is same value in $array['date'] I want all array.</p> <ul> <li>Format date is 'Y-m-d'.</li> </ul> <p>Example 1:</p> <pre><code>$search_date = '2022-12-08'; $array = [{&quot;price&quot;:&quot;200&quot;,&quot;date&quot;:&quot;2022...
[ { "answer_id": 74598936, "author": "DatIsVinnie", "author_id": 13044558, "author_profile": "https://Stackoverflow.com/users/13044558", "pm_score": 0, "selected": false, "text": "array_search($value, $array); \n $lowest_date = null;\n\nfor ($i = 0; count($i); $i++) {\n if ($array['date...
2022/11/28
[ "https://Stackoverflow.com/questions/74598442", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10033692/" ]
74,598,490
<p><strong>Problem Overview :</strong></p> <ol> <li>Building personal website with a Homepage.js, a Sidebar.js component, and a Project.js component.</li> <li>Project components are mapped on Homepage from a project list array of objects.</li> <li>Sidebar.js component will open and display active project info when a Pr...
[ { "answer_id": 74598629, "author": "Kriss_Vector", "author_id": 20621722, "author_profile": "https://Stackoverflow.com/users/20621722", "pm_score": 2, "selected": false, "text": "|| {} ListOfProjects.find((project) => { return project.title === activeProject; }) {} const {title, liveLink...
2022/11/28
[ "https://Stackoverflow.com/questions/74598490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19838086/" ]
74,598,498
<pre><code> </code></pre> <p>import Cookies from 'universal-cookie'; const cookies = new Cookies();</p> <pre><code> cookies.set('jwt', &quot;chalmeraputt&quot;); console.log(cookies.get(&quot;jwt&quot;)); </code></pre> <p>I have using this code to add cookie but could not get it and also not showed in the browser also....
[ { "answer_id": 74598629, "author": "Kriss_Vector", "author_id": 20621722, "author_profile": "https://Stackoverflow.com/users/20621722", "pm_score": 2, "selected": false, "text": "|| {} ListOfProjects.find((project) => { return project.title === activeProject; }) {} const {title, liveLink...
2022/11/28
[ "https://Stackoverflow.com/questions/74598498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20457014/" ]
74,598,513
<p>This question have been asked multiple times in this community but I couldn't find the correct answers since I am beginner in Python. I got 2 questions actually:</p> <ol> <li>I want to concatenate 3 columns (A,B,C) with its value into 1 Column. Header would be ABC.</li> </ol> <p>import os import pandas as pd</p> <p>...
[ { "answer_id": 74598629, "author": "Kriss_Vector", "author_id": 20621722, "author_profile": "https://Stackoverflow.com/users/20621722", "pm_score": 2, "selected": false, "text": "|| {} ListOfProjects.find((project) => { return project.title === activeProject; }) {} const {title, liveLink...
2022/11/28
[ "https://Stackoverflow.com/questions/74598513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20610995/" ]
74,598,544
<p>I want to get previous and next news order by date. The code below works fine if there is only one news a day. But cannot handle multiple news on the same day.</p> <p><strong>NewsController.php</strong></p> <pre><code>public function detail($slug){ $news = \App\News::active()-&gt;where('slug', $slug)-&gt;firstOr...
[ { "answer_id": 74598619, "author": "Delano van londen", "author_id": 19923550, "author_profile": "https://Stackoverflow.com/users/19923550", "pm_score": 1, "selected": false, "text": "$prev_news = $news->whereDate('date', '>', $news->date)->active()->orderBy('date', 'desc')->get();\n\n$n...
2022/11/28
[ "https://Stackoverflow.com/questions/74598544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7573253/" ]
74,598,555
<p>This is the full script:</p> <pre><code>(venv) ubuntu@ubuntu:~$ pip install wxPython Collecting wxPython Using cached wxPython-4.2.0.tar.gz (71.0 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─&gt; [...
[ { "answer_id": 74598619, "author": "Delano van londen", "author_id": 19923550, "author_profile": "https://Stackoverflow.com/users/19923550", "pm_score": 1, "selected": false, "text": "$prev_news = $news->whereDate('date', '>', $news->date)->active()->orderBy('date', 'desc')->get();\n\n$n...
2022/11/28
[ "https://Stackoverflow.com/questions/74598555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20621727/" ]
74,598,563
<p>How can I do something like this on python :</p> <pre class="lang-py prettyprint-override"><code>class Game: def __init__(self, size: int): self.settings = { 'timeout_turn' = 0 'timeout_match' = 0 'max_memory' = 0 'time_left' = 2147483647 ...
[ { "answer_id": 74598585, "author": "Bas van der Linden", "author_id": 11119684, "author_profile": "https://Stackoverflow.com/users/11119684", "pm_score": 3, "selected": true, "text": "= : , class Game:\n def __init__(self, size: int):\n self.settings = { \n 'timeout_...
2022/11/28
[ "https://Stackoverflow.com/questions/74598563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18326919/" ]
74,598,586
<p>In a tutorial on Laravel (*1) it is said that the controller name should be plural instead of singular. I am surprised because Laravel always generates the controller automatically in singular. There was also the question in 2018 in the Laravel Context here in the SO (*2). Has anything changed here in this regard? I...
[ { "answer_id": 74598968, "author": "keepyourmouthshut", "author_id": 10408643, "author_profile": "https://Stackoverflow.com/users/10408643", "pm_score": 0, "selected": false, "text": "PHP artisan make:model Todo -a php artisan stub:publish" } ]
2022/11/28
[ "https://Stackoverflow.com/questions/74598586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18066399/" ]
74,598,625
<p>HTML and Lists are on a new level for me with this question. I am trying to create a nested list in HTML with related numbering and in the third level a alpa numbering type.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="s...
[ { "answer_id": 74598768, "author": "Kairav Thakar", "author_id": 20447312, "author_profile": "https://Stackoverflow.com/users/20447312", "pm_score": 2, "selected": false, "text": "ol {\n list-style-type: none;\n counter-reset: item;\n margin: 0;\n padding: 0;\...
2022/11/28
[ "https://Stackoverflow.com/questions/74598625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14669927/" ]
74,598,636
<p>I want to get all the positions (indexes) of an element in a string and store them in a dictionary.</p> <p>This is what I've tried:</p> <pre><code>string = &quot;This is an example&quot; test = {letter: pos for pos, letter in enumerate(string)} </code></pre> <p>But this only gives the last position of the let...
[ { "answer_id": 74598678, "author": "Abdul Niyas P M", "author_id": 6699447, "author_profile": "https://Stackoverflow.com/users/6699447", "pm_score": 2, "selected": false, "text": ">>> my_dict = {}\n>>> my_dict['my_val'] = 1 # creating new value\n>>> my_dict\n{'my_val': 1}\n>>> my_dict['m...
2022/11/28
[ "https://Stackoverflow.com/questions/74598636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20279847/" ]
74,598,649
<p>To explain about the program that I am making, it is program that asks the user how many times he would like his coin to flip. In this program, the coin of the head is even, and the odd is the tail.</p> <p>I created a script that randomizes numbers from 1 to 10 based on the number you entered. And also I've made the...
[ { "answer_id": 74598678, "author": "Abdul Niyas P M", "author_id": 6699447, "author_profile": "https://Stackoverflow.com/users/6699447", "pm_score": 2, "selected": false, "text": ">>> my_dict = {}\n>>> my_dict['my_val'] = 1 # creating new value\n>>> my_dict\n{'my_val': 1}\n>>> my_dict['m...
2022/11/28
[ "https://Stackoverflow.com/questions/74598649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20079200/" ]
74,598,654
<p>edit : Sorry gurus, I have to rephrase my question since I forgot there are 3 tables in one query. I have three tables with tbl_goods ,tbl_units and tbl_sat which looks like this :</p> <p>tbl_goods, consists of sold goods</p> <pre><code> +--------+-------+-------+-------+ | goods |code |qty |unit | ...
[ { "answer_id": 74598885, "author": "Jonas Metzler", "author_id": 18794826, "author_profile": "https://Stackoverflow.com/users/18794826", "pm_score": 3, "selected": true, "text": "LEFT JOIN CASE WHEN COALESCE CASE WHEN SELECT g.goods, g.code, g.qty, g.unit, \nCASE WHEN u.conversion IS NUL...
2022/11/28
[ "https://Stackoverflow.com/questions/74598654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13553946/" ]
74,598,656
<p>I have a dataset in excel which looks like this:</p> <p><a href="https://i.stack.imgur.com/Ndulc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ndulc.png" alt="enter image description here" /></a></p> <p>There can be more cells with data. I am trying to extract data from these big cells and paste...
[ { "answer_id": 74598885, "author": "Jonas Metzler", "author_id": 18794826, "author_profile": "https://Stackoverflow.com/users/18794826", "pm_score": 3, "selected": true, "text": "LEFT JOIN CASE WHEN COALESCE CASE WHEN SELECT g.goods, g.code, g.qty, g.unit, \nCASE WHEN u.conversion IS NUL...
2022/11/28
[ "https://Stackoverflow.com/questions/74598656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4700561/" ]
74,598,689
<p>Given a <a href="https://spark.apache.org/docs/3.1.1/api/python/reference/api/pyspark.sql.DataFrame.html" rel="nofollow noreferrer">PySpark DataFrame</a> is it possible to obtain a list of source columns that are being referenced by the DataFrame?</p> <p>Perhaps a more concrete example might help explain what I'm af...
[ { "answer_id": 74611155, "author": "user8523750", "author_id": 8523750, "author_profile": "https://Stackoverflow.com/users/8523750", "pm_score": -1, "selected": false, "text": "for field in df.schema.fields:\n print(field.name +\" , \"+str(field.dataType))\n" }, { "answer_id":...
2022/11/28
[ "https://Stackoverflow.com/questions/74598689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/201657/" ]
74,598,694
<p>I'm building a group of buttons with Angular and Angular Material using the Button component and what I'm trying to achieve is the same behaviour of Button Toggle but with normal Button component, in order to use all the available styles.</p> <p>In my angular component I have an array which is used to create the but...
[ { "answer_id": 74611155, "author": "user8523750", "author_id": 8523750, "author_profile": "https://Stackoverflow.com/users/8523750", "pm_score": -1, "selected": false, "text": "for field in df.schema.fields:\n print(field.name +\" , \"+str(field.dataType))\n" }, { "answer_id":...
2022/11/28
[ "https://Stackoverflow.com/questions/74598694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14655059/" ]
74,598,697
<p>I have 2 columns, one is Country and the other is Value</p> <p>How can I make turn this table into a division table of sorts such that each value is divided by every other value and I would have the Country as rownames and column names, the values would be every possible division value. The picture describes what I'...
[ { "answer_id": 74598752, "author": "Maël", "author_id": 13460602, "author_profile": "https://Stackoverflow.com/users/13460602", "pm_score": 3, "selected": true, "text": "outer x <- c(Argentina = 1.7, Australia = 5.5, Belgium = 0.5, Brazil = 8.7)\nt(outer(x, x, `/`))\n Argentina...
2022/11/28
[ "https://Stackoverflow.com/questions/74598697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20620375/" ]
74,598,698
<p>I'm trying to decode a JSON file from an <a href="http://madlibz.herokuapp.com/api/random" rel="nofollow noreferrer">API</a> that I want to use but the <code>value</code> array contains a bunch of strings and an int at the end. When I specify the data type in the struct as AnyObject, it says that the struct does not...
[ { "answer_id": 74598963, "author": "Sateesh Yemireddi", "author_id": 5519329, "author_profile": "https://Stackoverflow.com/users/5519329", "pm_score": 2, "selected": true, "text": "// MARK: - DataModel\nstruct DataModel: Codable {\n let title: String\n let blanks: [String]\n let...
2022/11/28
[ "https://Stackoverflow.com/questions/74598698", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15184847/" ]
74,598,711
<p>i need to send the post data from angular to DRF through angular form but geeting the error</p> <p>i checked almost all the answers available on the internet but did not found and useful answer.</p> <pre><code> &quot;detail&quot;: &quot;CSRF Failed: CSRF token missing.&quot; </code></pre> <p>//post logic sources.ser...
[ { "answer_id": 74598759, "author": "Ajay K", "author_id": 10782096, "author_profile": "https://Stackoverflow.com/users/10782096", "pm_score": -1, "selected": false, "text": "from django.views.decorators.csrf import csrf_exempt\n @csrf_exempt\ndef index(request):\npass\n" }, { "an...
2022/11/28
[ "https://Stackoverflow.com/questions/74598711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20622036/" ]
74,598,712
<p>I have a dictionary</p> <pre><code>d = {(1,100) : 0.5 , (1,150): 0.7 ,(1,190) : 0.8, (2,100) : 0.5 , (2,120): 0.7 ,(2,150) : 0.8, (3,100) : 0.5 , (3,110): 0.7 ,(4,100) : 0.5 , (4,150): 0.7 ,(4,190) : 0.8,(5,100) : 0.5 , (5,150): 0.7} list = [4,2,1,3,5] for (k1,k2),k3 in d.items(): for k1 in list : print(k1,k2 :...
[ { "answer_id": 74598841, "author": "Orfeas Bourchas", "author_id": 16781682, "author_profile": "https://Stackoverflow.com/users/16781682", "pm_score": 0, "selected": false, "text": "d = {(1, 100): 0.5,\n (1, 150): 0.5,\n (1, 190): 0.8,\n (2, 100): 0.5,\n (2, 120): 0.7,\n ...
2022/11/28
[ "https://Stackoverflow.com/questions/74598712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20621483/" ]
74,598,722
<p>I'm trying to save the customer field on the Test model, I'm not getting any errors but it's not saving the field either, how do I fix it?</p> <p>Models</p> <pre><code>class Test(models.Model): customer = models.ForeignKey(Customer, on_delete=models.SET_NULL, blank=True, null=True) email = models.EmailField(...
[ { "answer_id": 74598913, "author": "lucutzu33", "author_id": 8770336, "author_profile": "https://Stackoverflow.com/users/8770336", "pm_score": 0, "selected": false, "text": "class TestForm(forms.ModelForm):\n\n class Meta:\n model = Test\n fields = [\"email\", ]\n def te...
2022/11/28
[ "https://Stackoverflow.com/questions/74598722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18982716/" ]
74,598,734
<p>I want to search something on Google using Selenium chromedriver and enter it. I can normally do this within the site, but I couldn't type it into google. What code can we use for this?</p> <p>driver.findElement(By.xpath(&quot;//input[@class='desktopOldAutosuggestTheme-UyU36RyhCTcuRs_sXL9b']&quot;)).sendKeys(&quot;H...
[ { "answer_id": 74598804, "author": "Bas van der Linden", "author_id": 11119684, "author_profile": "https://Stackoverflow.com/users/11119684", "pm_score": 1, "selected": false, "text": "german shepards search_bar : WebElement = driver.get_element(By.XPATH, \"//input[@title='Search']\")\n\...
2022/11/28
[ "https://Stackoverflow.com/questions/74598734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20588290/" ]
74,598,788
<p>I'm trying recreate this photo but I have run into an issue that I'm not so sure how to fix! So I need to shrink the width of the container class but I'm no entirely sure how. I've tried all kinds of different flex box strategies. My question is how can I shrink the width of the container class and how can I move al...
[ { "answer_id": 74598804, "author": "Bas van der Linden", "author_id": 11119684, "author_profile": "https://Stackoverflow.com/users/11119684", "pm_score": 1, "selected": false, "text": "german shepards search_bar : WebElement = driver.get_element(By.XPATH, \"//input[@title='Search']\")\n\...
2022/11/28
[ "https://Stackoverflow.com/questions/74598788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9277512/" ]
74,598,794
<p>I have this function that borrows two individual elements from a vector. It works as expected:</p> <pre class="lang-rs prettyprint-override"><code>fn borrow_mut_two&lt;T&gt;(v: &amp;mut [T], i: usize, j: usize) -&gt; (&amp;mut T, &amp;mut T) { assert!(i &lt; j); let (left, right) = v.split_at_mut(j); (&amp;mut...
[ { "answer_id": 74598907, "author": "Joe Clay", "author_id": 5436257, "author_profile": "https://Stackoverflow.com/users/5436257", "pm_score": 3, "selected": true, "text": "fn borrow_mut_two<T>(v: &mut [T], i: usize, j: usize) -> (&mut T, &mut T)\nfn borrow_mut_two<'a, T>(v: &'a mut [T], ...
2022/11/28
[ "https://Stackoverflow.com/questions/74598794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4757175/" ]
74,598,833
<p>So basically this.props.children in my code isn't working. i.e it isn't displaying the content in another js file. There is one file defaullayout.js which has a content section in order to display the layou in a page hompage.js. So i am trying to give {this.prop.children} in content to display the defaltlayout page ...
[ { "answer_id": 74598959, "author": "Hilory", "author_id": 11703584, "author_profile": "https://Stackoverflow.com/users/11703584", "pm_score": 2, "selected": false, "text": "{this.props.children} this props < DefaultLayout/> const DefaultLayout = (props) => {\n...\n<Content className=\"si...
2022/11/28
[ "https://Stackoverflow.com/questions/74598833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20622118/" ]
74,598,839
<p>there are 4 checkbox data in my modal. I want the previously selected data to be selected when the modal is closed and opened. How can I do this?</p> <p>I added the selected data to a list, but unfortunately I could not make it selected.</p> <p>HTML temaplate:</p> <pre><code>&lt;div class=&quot;row&quot;&gt; &lt;d...
[ { "answer_id": 74598959, "author": "Hilory", "author_id": 11703584, "author_profile": "https://Stackoverflow.com/users/11703584", "pm_score": 2, "selected": false, "text": "{this.props.children} this props < DefaultLayout/> const DefaultLayout = (props) => {\n...\n<Content className=\"si...
2022/11/28
[ "https://Stackoverflow.com/questions/74598839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20519481/" ]
74,598,983
<p>I want to create an object with every value as &quot;true&quot; and the length of keys will be same with array length.</p> <p>Example :</p> <pre><code>const myCar = [{name:ford,type:A},{name:opel,type:B}] </code></pre> <p>The output want to be like this below</p> <pre><code>{0:true,1:true} </code></pre> <p>If the l...
[ { "answer_id": 74599038, "author": "AbsoluteZero", "author_id": 20539156, "author_profile": "https://Stackoverflow.com/users/20539156", "pm_score": -1, "selected": false, "text": "Array.prototype.map const myCar = [{\n name: 'ford',\n type: 'A'\n}, {\n name: 'opel',\n type: 'B'\n}];\...
2022/11/28
[ "https://Stackoverflow.com/questions/74598983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16870482/" ]
74,598,985
<p>I have a String, for example <code>ABC_Michael_A_V1.3_Update</code></p> <p>In my SQLite database, i have a table <code>beginnings</code> with 2 columns. The first one is of type String and contains multiple possible beginnings of the string, the second one is of type Integer. for example:</p> <pre><code>StringBeginn...
[ { "answer_id": 74599182, "author": "sharkyenergy", "author_id": 1780761, "author_profile": "https://Stackoverflow.com/users/1780761", "pm_score": -1, "selected": false, "text": "select *, length(StringBeginning) as len from beginnings where instr('ABC_Michael_A_V1.3_Update',StringBeginni...
2022/11/28
[ "https://Stackoverflow.com/questions/74598985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1780761/" ]
74,599,012
<p>I created a heatmap using pheatmap package as follows:</p> <pre><code>test = matrix(rnorm(200), 20, 10) test[1:10, seq(1, 10, 2)] = test[1:10, seq(1, 10, 2)] + 3 test[11:20, seq(2, 10, 2)] = test[11:20, seq(2, 10, 2)] + 2 test[15:20, seq(2, 10, 2)] = test[15:20, seq(2, 10, 2)] + 4 colnames(test) = paste(&quot;Test&q...
[ { "answer_id": 74599375, "author": "Venk Murthy", "author_id": 10604345, "author_profile": "https://Stackoverflow.com/users/10604345", "pm_score": 1, "selected": false, "text": "patchwork" }, { "answer_id": 74599545, "author": "stefan", "author_id": 12993861, "author_...
2022/11/28
[ "https://Stackoverflow.com/questions/74599012", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2110417/" ]
74,599,017
<p>is there a plugin or way that if i press the run button pycharms starts to highlight the code that is currently running step by step so i can see what pycharms is doing</p> <p>I looked into the pycharms editor settings but didnt really find anything that would help me</p>
[ { "answer_id": 74599375, "author": "Venk Murthy", "author_id": 10604345, "author_profile": "https://Stackoverflow.com/users/10604345", "pm_score": 1, "selected": false, "text": "patchwork" }, { "answer_id": 74599545, "author": "stefan", "author_id": 12993861, "author_...
2022/11/28
[ "https://Stackoverflow.com/questions/74599017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20622223/" ]
74,599,102
<p>I have a data frame with dimension 24,523x3,468 and I want to shuffle the entries of this dataframe. For example, I have a simple data frame</p> <pre><code>df &lt;- data.frame(c1=c(1, 1.5, 2, 4), c2=c(1.1, 1.6, 3, 3.2), c3=c(2.1, 2.4, 1.4, 1.7)) df_shuffled = transform(df, c2 = sample(c2)) </code></pre> <p>It works...
[ { "answer_id": 74599180, "author": "B. Christian Kamgang", "author_id": 10848898, "author_profile": "https://Stackoverflow.com/users/10848898", "pm_score": 3, "selected": false, "text": "df[] = lapply(df, sample)\n" }, { "answer_id": 74599743, "author": "r2evans - GO NAVY BEA...
2022/11/28
[ "https://Stackoverflow.com/questions/74599102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13282670/" ]
74,599,103
<p>I would like to find values from one CSV in another and modify/remove the rows accordingly.</p> <p>Removing already works quite well, but I would like to automate this process as much as possible.</p> <p>So my question is how can I put all values from the serachforthat.csv (column [0]) into a kind of array or list a...
[ { "answer_id": 74599196, "author": "Bas van der Linden", "author_id": 11119684, "author_profile": "https://Stackoverflow.com/users/11119684", "pm_score": 0, "selected": false, "text": "search_values = []\nwith open('searchforthat.csv', 'r') as sfile:\n lines = [line.replace(\"\\n\", \...
2022/11/28
[ "https://Stackoverflow.com/questions/74599103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2292490/" ]
74,599,116
<p>I'm trying to use <code>pandas.DataFrame.assign</code> in Pandas 1.5.2. Let's consider this code, for instance:</p> <pre class="lang-py prettyprint-override"><code>df = pd.DataFrame({&quot;col1&quot;:[1,2,3], &quot;col2&quot;: [4,5,6]}) df.assign( test1=&quot;hello&quot;, test2=df.test1 + &quot; world&quot; ...
[ { "answer_id": 74599160, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 2, "selected": true, "text": "assign df = pd.DataFrame({\"col1\":[1,2,3], \"col2\": [4,5,6]})\n\ndf.assign(\n test1=\"hello\",\n test2=lambd...
2022/11/28
[ "https://Stackoverflow.com/questions/74599116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12236313/" ]
74,599,128
<p>here i'm facing some issue in scrolling</p> <p>i have made one custom selection value through drum design with scrolling(that you can see on live code) <strong>issue</strong></p> <p>1.parent div scrolling while selecting the values in child component by scrolling</p> <p><strong>what i tried</strong> <strong>method-1...
[ { "answer_id": 74599846, "author": "Hoargarth", "author_id": 9184970, "author_profile": "https://Stackoverflow.com/users/9184970", "pm_score": 2, "selected": true, "text": "mouseenter wheel e.preventdefault() e.stopPropagation mouseout removeEventListener() function preventScroll() mouse...
2022/11/28
[ "https://Stackoverflow.com/questions/74599128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18055582/" ]
74,599,137
<p>I have a class &quot;SuperBase&quot; with public methods and a class &quot;Base&quot;, that derives from SuperBase, also with public methods. I cannot alter these, as they come from an external project.</p> <p>I want my own class &quot;Derived&quot; to inherit privately from Base, but still keep SuperBase public.</p...
[ { "answer_id": 74599311, "author": "The Dreams Wind", "author_id": 5690248, "author_profile": "https://Stackoverflow.com/users/5690248", "pm_score": 0, "selected": false, "text": "Derived Base Base SuperBase Base class Derived: public SuperBase\n{\n Base imp;\npublic:\n void print()...
2022/11/28
[ "https://Stackoverflow.com/questions/74599137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7506852/" ]
74,599,147
<p>Say I am generating random numbers using <code>Math.random()</code>, maybe 1000 of them, and I want to have them in ascending order (at all times). Is there an algorithm of some variety that can keep them sorted the whole time, without ever having to call a sort routine? The only thing I can think of is a BST? but t...
[ { "answer_id": 74600580, "author": "Dave", "author_id": 2041077, "author_profile": "https://Stackoverflow.com/users/2041077", "pm_score": 2, "selected": false, "text": "/**\n * Generate an sorted list of random numbers sorted from 1 to 0, given the size\n * of the list being requested.\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1223975/" ]
74,599,149
<p>I am trying to sum each year's quantity but I also want to add previous year's closing quantity in this sum.</p> <p>Following is the sample dataset.</p> <pre><code>DROP TABLE IF EXISTS #tmpTable CREATE TABLE #tmpTable ( FinancialYear varchar(max), Date date, ItemName varchar(255), InQTY int, Clos...
[ { "answer_id": 74600580, "author": "Dave", "author_id": 2041077, "author_profile": "https://Stackoverflow.com/users/2041077", "pm_score": 2, "selected": false, "text": "/**\n * Generate an sorted list of random numbers sorted from 1 to 0, given the size\n * of the list being requested.\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1041627/" ]
74,599,158
<p>We have a project in <code>spring-integration</code> that will work with either <code>webflex</code> or <code>servlet</code> implementations and this seems to work pretty well using the <code>spring.main.web-application-type</code> property set as a system property.</p> <p>I'm now looking for how to choose the embed...
[ { "answer_id": 74602298, "author": "Artem Bilan", "author_id": 2756547, "author_profile": "https://Stackoverflow.com/users/2756547", "pm_score": 1, "selected": false, "text": "test FilteredClassLoader @SpringBootApplication.exclude()" }, { "answer_id": 74607255, "author": "al...
2022/11/28
[ "https://Stackoverflow.com/questions/74599158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16750357/" ]
74,599,179
<p>I want to let user to download some file from storage path. In this case will be some backups they have made. So i have a method can create backups and show on vue js table. And now i am trying to downlaod manyally from vue</p> <pre><code>&lt;tr v-show=&quot;backups.length&quot; v-for=&quot;backup in backups&quot; :...
[ { "answer_id": 74599374, "author": "Delano van londen", "author_id": 19923550, "author_profile": "https://Stackoverflow.com/users/19923550", "pm_score": 0, "selected": false, "text": "public function download(Request $request, int $fileId)\n// $fileId is the id from the download button\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19617678/" ]
74,599,202
<p>I have a database with tables ARTIST and SONG. Each song has a number of reproductions, an album associated and the artist_id that owns it. I want to get for each artist, the album that has the highest number of reproductions counting al of its songs. The tables are something like this:</p> <p>Artist:</p> <div class...
[ { "answer_id": 74599374, "author": "Delano van londen", "author_id": 19923550, "author_profile": "https://Stackoverflow.com/users/19923550", "pm_score": 0, "selected": false, "text": "public function download(Request $request, int $fileId)\n// $fileId is the id from the download button\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14936363/" ]
74,599,206
<p>My file is having unwanted Control-M characters at the end of the records and because of this file is not getting processed.</p> <p><strong>Sample file (CSV)</strong> <a href="https://i.stack.imgur.com/fccCA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fccCA.png" alt="Sample file" /></a></p> <p...
[ { "answer_id": 74599334, "author": "Gicu Aftene", "author_id": 18811731, "author_profile": "https://Stackoverflow.com/users/18811731", "pm_score": 1, "selected": true, "text": "csvFileContent.replaceAll(\"\\r\\n\", \"\\n\");\n" } ]
2022/11/28
[ "https://Stackoverflow.com/questions/74599206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18116970/" ]
74,599,250
<p>Based on a passed parameter containing a type I'm looking for a better way to initialize the class based on that type. Currently I'm &quot;solving&quot; it with a switch statement which is feels quite redundant.</p> <p>Bad example showing what the functionality is:</p> <pre><code>protected Quest GenerateQuest(QuestC...
[ { "answer_id": 74599605, "author": "Peter Csala", "author_id": 13268855, "author_profile": "https://Stackoverflow.com/users/13268855", "pm_score": 1, "selected": false, "text": "protected Quest GenerateQuest(QuestConfiguration questConfiguration)\n{\n List<QuestObjective> objectives =...
2022/11/28
[ "https://Stackoverflow.com/questions/74599250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1145747/" ]
74,599,252
<p>I am doing a field validation in Angular component. There is a one field like it should allow to enter either 6 or 8 length of any characters. Usually minLength(6), maxLength(8) will work if it is 6 to 8 in between but length 7 should not allow here. I can do custom validation, but out of curiosity I'm looking is th...
[ { "answer_id": 74599399, "author": "MoxxiManagarm", "author_id": 11011793, "author_profile": "https://Stackoverflow.com/users/11011793", "pm_score": 3, "selected": true, "text": "Validator.pattern myControl: FormControl = new FormControl(undefined, [\n Validators.pattern('^.{6}$|^.{8}...
2022/11/28
[ "https://Stackoverflow.com/questions/74599252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8779864/" ]
74,599,262
<p>let currdate =2022-11-28T10:26:00.949Z</p> <pre><code>I have to convert the date like 28 Nov , 2022 :4:05:33 PM </code></pre> <p>Please suggest , tried some examples but not getting like this</p> <p>Thanks</p>
[ { "answer_id": 74599341, "author": "NAZIR HUSSAIN", "author_id": 20587701, "author_profile": "https://Stackoverflow.com/users/20587701", "pm_score": -1, "selected": false, "text": "moment(\"2022-11-28T10:26:00.949Z\").format(\"DD MMM , yyyy :h:mm:ss A\")\n" }, { "answer_id": 7459...
2022/11/28
[ "https://Stackoverflow.com/questions/74599262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20459903/" ]
74,599,271
<p>Question: How to uniquely identify a record in AS400 database</p> <p>Detailed Question:</p> <p>I have AS400 database and some tables within it. Tables don't have primary key / unique key / composite key defined.</p> <p>Like oracle has concept of ROWID, in same way do we have something for AS400 database. or can we c...
[ { "answer_id": 74599341, "author": "NAZIR HUSSAIN", "author_id": 20587701, "author_profile": "https://Stackoverflow.com/users/20587701", "pm_score": -1, "selected": false, "text": "moment(\"2022-11-28T10:26:00.949Z\").format(\"DD MMM , yyyy :h:mm:ss A\")\n" }, { "answer_id": 7459...
2022/11/28
[ "https://Stackoverflow.com/questions/74599271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20622382/" ]
74,599,304
<p>After upgrading from .net core 6 to 7 and rolling forward all the libraries, after scaffolding the database(we use db first) a lot of the generated properties no longer have setters. These were present before and heavily used. I was looking for options on the scaffold command to include setters or any alternative me...
[ { "answer_id": 74599341, "author": "NAZIR HUSSAIN", "author_id": 20587701, "author_profile": "https://Stackoverflow.com/users/20587701", "pm_score": -1, "selected": false, "text": "moment(\"2022-11-28T10:26:00.949Z\").format(\"DD MMM , yyyy :h:mm:ss A\")\n" }, { "answer_id": 7459...
2022/11/28
[ "https://Stackoverflow.com/questions/74599304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2417808/" ]
74,599,313
<p>I know TailwindCSS have class <code>group</code> to use but that is only use for change styles of child element when the parent element activate some event, but I want it in vise versa.</p> <pre class="lang-html prettyprint-override"><code>&lt;div class=&quot;parent&quot;&gt; &lt;!-- border color should be red when ...
[ { "answer_id": 74599490, "author": "JadBlackstone", "author_id": 15181384, "author_profile": "https://Stackoverflow.com/users/15181384", "pm_score": 0, "selected": false, "text": "<input class=\"child\" type=\"text\" onclick=\"focusFunction()\">\n\n<script>\nfunction focusFunction() {\n ...
2022/11/28
[ "https://Stackoverflow.com/questions/74599313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5513282/" ]
74,599,327
<p>Suppose I have a simple string that I want to parse into array of string:</p> <p><code>&quot;add (multiply (add 1 2) (add 3 4)) (add 5 6)&quot;</code></p> <p>How do I parse it into 3 strings (based on outer parentheses):</p> <pre><code>add (multiply (add 1 2) (add 3 4)) (add 5 6) </code></pre> <p>With my OOP mind, I...
[ { "answer_id": 74599772, "author": "leetwinski", "author_id": 5400548, "author_profile": "https://Stackoverflow.com/users/5400548", "pm_score": 1, "selected": false, "text": "(def s \"add (multiply (add 1 2) (add 3 4)) (add 5 6)\")\n\n(map str (clojure.edn/read-string (str \"(\" s \")\")...
2022/11/28
[ "https://Stackoverflow.com/questions/74599327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11817809/" ]
74,599,360
<p>I am facing these error messages: `Uncaught TypeError: candidate.toLowerCase is not a function. I am using AutoComplete API in the material UI, but when I search in the input field, it will bring me to blank page.</p> <p><a href="https://i.stack.imgur.com/Yv3ZU.png" rel="nofollow noreferrer"><img src="https://i.stac...
[ { "answer_id": 74599424, "author": "Bas van der Linden", "author_id": 11119684, "author_profile": "https://Stackoverflow.com/users/11119684", "pm_score": 0, "selected": false, "text": "getOptionLabel={option => {\nreturn (\n <>\n {option.name.toString()}\n <span className=\"**\">{...
2022/11/28
[ "https://Stackoverflow.com/questions/74599360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14562541/" ]
74,599,371
<p>I want to need multiple array combaine in one array</p> <p>I have array</p> <pre><code>array( 0=&gt; test 1 ) array( 0=&gt; test 2 ) array( 0=&gt; test 3 ) </code></pre> <p>I need expected output</p> <pre><code>`array( 0=&gt;Test1 1=&gt;Test2 2=&gt;test3 )` </code></pre>
[ { "answer_id": 74599480, "author": "Malik", "author_id": 10804565, "author_profile": "https://Stackoverflow.com/users/10804565", "pm_score": 2, "selected": false, "text": "array_merge() array_merge(array ...$arrays): array\n $a1=array(\"red\",\"green\");\n$a2=array(\"blue\",\"yellow\");\...
2022/11/28
[ "https://Stackoverflow.com/questions/74599371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20253641/" ]
74,599,412
<p>I've some processing instructions like the one below at the top of my XML file:</p> <pre><code>&lt;?ID Object=&quot;AUTO_REPORT_OBJECT&quot; Version=&quot;1.0&quot;?&gt; </code></pre> <p>I would like to read Object and Version attributes value using Go libraries. I'm using Go 1.19.</p> <p>My XML file is like this:</...
[ { "answer_id": 74614201, "author": "Hermann12", "author_id": 12621346, "author_profile": "https://Stackoverflow.com/users/12621346", "pm_score": 0, "selected": false, "text": "Go import xml.etree.ElementTree as ET\n\nfor event, elem in ET.iterparse('your.xml', events=(\"pi\")):\n if e...
2022/11/28
[ "https://Stackoverflow.com/questions/74599412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4117563/" ]
74,599,413
<p>i am making a chess game using js html and css what i am trying to do is i have given every pawn an onclick function which gets id of pawns parent div/block and based on that it highlights the blocks where the pawn can go but when i get the id of parent div it gives me id of another div idk why can some one help me<...
[ { "answer_id": 74614201, "author": "Hermann12", "author_id": 12621346, "author_profile": "https://Stackoverflow.com/users/12621346", "pm_score": 0, "selected": false, "text": "Go import xml.etree.ElementTree as ET\n\nfor event, elem in ET.iterparse('your.xml', events=(\"pi\")):\n if e...
2022/11/28
[ "https://Stackoverflow.com/questions/74599413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20545624/" ]
74,599,414
<p>I have a landing file which is in pure HTML. (<code>landing.html</code>) I want the main URL of the website to be this file and the rest of the URLs to go in the React app.</p> <p>For example:</p> <pre><code>example.com -&gt; landing.html example.com/app -&gt; react app example.com/login -&gt; react app </code></pr...
[ { "answer_id": 74614201, "author": "Hermann12", "author_id": 12621346, "author_profile": "https://Stackoverflow.com/users/12621346", "pm_score": 0, "selected": false, "text": "Go import xml.etree.ElementTree as ET\n\nfor event, elem in ET.iterparse('your.xml', events=(\"pi\")):\n if e...
2022/11/28
[ "https://Stackoverflow.com/questions/74599414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13825398/" ]
74,599,419
<p><strong>Can anyone let me know how can I transform this input json I have tried with below transformation but didn't worked.</strong></p> <p>I have tried to used filter function and groupBy function, but for Multiple output it is failing the testCase.</p> <p>tried with this method `</p> <pre><code>%dw 2.0 output app...
[ { "answer_id": 74599544, "author": "StackOverflowed", "author_id": 7255897, "author_profile": "https://Stackoverflow.com/users/7255897", "pm_score": 2, "selected": false, "text": "%dw 2.0\noutput application/json\n---\npayload groupBy ((item, index) -> item.d23) pluck {\n d23: $[0].d2...
2022/11/28
[ "https://Stackoverflow.com/questions/74599419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9169753/" ]
74,599,468
<p>In my ec2 instance I am able to run <code>pm2</code> command.</p> <p><a href="https://i.stack.imgur.com/c5r7l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c5r7l.png" alt="enter image description here" /></a></p> <p>But while deploying application through code deployment I get this error.</p> <p...
[ { "answer_id": 74599544, "author": "StackOverflowed", "author_id": 7255897, "author_profile": "https://Stackoverflow.com/users/7255897", "pm_score": 2, "selected": false, "text": "%dw 2.0\noutput application/json\n---\npayload groupBy ((item, index) -> item.d23) pluck {\n d23: $[0].d2...
2022/11/28
[ "https://Stackoverflow.com/questions/74599468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682525/" ]
74,599,482
<p>I have a 2D list from which I am trying to extract the unique rows example:</p> <pre><code>list = [['16', 'jun', 'jun', '18'], ['jun', '16', 'jun', '18'], ['aug', '16', 'jun', '18'], ['aug', '16', 'jun', '18'], ['sep', '17', 'mar', '18']] </code></pre> <p>should return</p> <pre><code>...
[ { "answer_id": 74599544, "author": "StackOverflowed", "author_id": 7255897, "author_profile": "https://Stackoverflow.com/users/7255897", "pm_score": 2, "selected": false, "text": "%dw 2.0\noutput application/json\n---\npayload groupBy ((item, index) -> item.d23) pluck {\n d23: $[0].d2...
2022/11/28
[ "https://Stackoverflow.com/questions/74599482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2814290/" ]
74,599,505
<p>I'm trying to have my Python code write everything it does to a log, with a timestamp. But it doesn't seem to work.</p> <p>this is my current code:</p> <pre><code>filePath= Path('.') time=datetime.datetime.now() bot_log = [&quot;&quot;,&quot;Set up the file path thingy&quot;] with open ('bot.log', 'a') as f: f.wri...
[ { "answer_id": 74599572, "author": "svfat", "author_id": 2419628, "author_profile": "https://Stackoverflow.com/users/2419628", "pm_score": 3, "selected": true, "text": "filePath= Path('.')\ntime=datetime.datetime.now()\nbot_log = \"%s Set up the file path thingy\\n\"\nwith open ('bot.log...
2022/11/28
[ "https://Stackoverflow.com/questions/74599505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17936283/" ]
74,599,519
<p>I have the following data in Excel, which I'm importing into PowerBI.</p> <p><a href="https://i.stack.imgur.com/p3O6y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p3O6y.png" alt="Original Spreadshet" /></a></p> <p>In the short description, there is a code (immediately after IDN) in each row - I...
[ { "answer_id": 74599677, "author": "David Bacci", "author_id": 18345037, "author_profile": "https://Stackoverflow.com/users/18345037", "pm_score": 2, "selected": false, "text": "let \na = Text.AfterDelimiter([Column1],\"IDN\"),\nb = List.Transform({a}, each Text.Select(_, {\"0\"..\"9\"})...
2022/11/28
[ "https://Stackoverflow.com/questions/74599519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6812673/" ]
74,599,533
<p>I have a view with the list of articles the user add to basket.</p> <p>In each article i have an increment/decrement button to edit the quantity. The increment/decrement buttons are working because it's adding in my array a new Object every time my user change the quantity</p> <p>For now, i just have a &quot;+&quot;...
[ { "answer_id": 74599701, "author": "Amirhossein", "author_id": 11342834, "author_profile": "https://Stackoverflow.com/users/11342834", "pm_score": 2, "selected": true, "text": "const { append, remove, update } = useFieldArray({\n control,\n name: 'Articles',\n}); \n\nconst increment =...
2022/11/28
[ "https://Stackoverflow.com/questions/74599533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19389219/" ]
74,599,600
<p>I have a <code>Products</code> table where prices of products are updated every day.</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>eff_date</th> <th>product_id</th> <th>price</th> </tr> </thead> <tbody> <tr> <td>2022-11-25</td> <td>P1</td> <td>150</td> </tr> <tr> <td>2022-11-25</td> <t...
[ { "answer_id": 74599701, "author": "Amirhossein", "author_id": 11342834, "author_profile": "https://Stackoverflow.com/users/11342834", "pm_score": 2, "selected": true, "text": "const { append, remove, update } = useFieldArray({\n control,\n name: 'Articles',\n}); \n\nconst increment =...
2022/11/28
[ "https://Stackoverflow.com/questions/74599600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3123056/" ]
74,599,601
<p>I have a polynomial like this: <code>3*D*c1*cos_psi**2*p**2*u/(d*k**4*kappa**2) + 3*D*c1*cos_psi*p*q*u/(2*k**4*kappa**2) - 3*D*c1*cos_psi*p*q*u/(d*k**4*kappa**2) - 3*D*c1*u/(2*k**2*kappa**2) - 3*D*c1*p**2*u/(2*k**4*kappa**2) - 3*D*c1*q**2*u/(4*k**4*kappa**2) + 3*D*c1*p**2*u*(1 - cos_psi**2)/(d*k**4*kappa**2) + 3*D*c...
[ { "answer_id": 74599922, "author": "Nikos Pap", "author_id": 9259357, "author_profile": "https://Stackoverflow.com/users/9259357", "pm_score": 0, "selected": false, "text": " expr = collect(simplify(expr),(q,p,p*q))\n" }, { "answer_id": 74605746, "author": "smichr", "a...
2022/11/28
[ "https://Stackoverflow.com/questions/74599601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9259357/" ]
74,599,602
<p>I want to find download URL for the latest version of Cura right now it is (<a href="https://github.com/Ultimaker/Cura/releases/download/5.2.1/Ultimaker-Cura-5.2.1-win64.exe" rel="nofollow noreferrer">https://github.com/Ultimaker/Cura/releases/download/5.2.1/Ultimaker-Cura-5.2.1-win64.exe</a>) and I have written <co...
[ { "answer_id": 74599922, "author": "Nikos Pap", "author_id": 9259357, "author_profile": "https://Stackoverflow.com/users/9259357", "pm_score": 0, "selected": false, "text": " expr = collect(simplify(expr),(q,p,p*q))\n" }, { "answer_id": 74605746, "author": "smichr", "a...
2022/11/28
[ "https://Stackoverflow.com/questions/74599602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18917305/" ]
74,599,631
<p>I have a list of dicts that looks like this:</p> <pre><code>totalList = [ {'sku': '222222', 'title': 'apple', 'quantity': '2', 'price': '3$'}, {'sku': '333333', 'title': 'banana', 'quantity': '1', 'price': '1.5$'}, {'sku': '444444', 'title': 'peach', 'quantity': '5', 'price': '9$'}, {'sku': '12345...
[ { "answer_id": 74599922, "author": "Nikos Pap", "author_id": 9259357, "author_profile": "https://Stackoverflow.com/users/9259357", "pm_score": 0, "selected": false, "text": " expr = collect(simplify(expr),(q,p,p*q))\n" }, { "answer_id": 74605746, "author": "smichr", "a...
2022/11/28
[ "https://Stackoverflow.com/questions/74599631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20622545/" ]
74,599,665
<p>In my python file I always start with the following lines</p> <pre class="lang-py prettyprint-override"><code>import sys import matplotlib as mpl sys.append('C:\\MyPackages') rc_fonts = { &quot;text.usetex&quot;: True, 'font.size': 20, 'text.latex.preamble': r&quot;\usepackage{bm}&quot;, } mpl.rcParams....
[ { "answer_id": 74599922, "author": "Nikos Pap", "author_id": 9259357, "author_profile": "https://Stackoverflow.com/users/9259357", "pm_score": 0, "selected": false, "text": " expr = collect(simplify(expr),(q,p,p*q))\n" }, { "answer_id": 74605746, "author": "smichr", "a...
2022/11/28
[ "https://Stackoverflow.com/questions/74599665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12451058/" ]
74,599,713
<p>I'm trying to merge two dictionaries based on key value. However, I'm not able to achieve it. Below is the way I tried solving.</p> <pre><code>dict1 = {4: [741, 114, 306, 70], 2: [77, 325, 505, 144], 3: [937, 339, 612, 100], 1: [52, 811, 1593, 350]} dict2 = {1: 'A', 2: 'B', 3: 'C', 4: 'D'}...
[ { "answer_id": 74599751, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 4, "selected": true, "text": "output = {dict2[k]: v for k,v in dict1.items()}\n {'D': [741, 114, 306, 70],\n 'B': [77, 325, 505, 144],\n 'C': [937...
2022/11/28
[ "https://Stackoverflow.com/questions/74599713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16710696/" ]
74,599,719
<p>I have a list, that contains many sub-lists. Each sub-list, has two values. I want to substract the first value from the second value in each sub-list, and store the results in new lists.</p> <p>Now those new lists are also sub-lists, of another list of lists.</p> <p>So for example, <code>lists_of_lists1</code> is s...
[ { "answer_id": 74599958, "author": "Hack3r", "author_id": 12171536, "author_profile": "https://Stackoverflow.com/users/12171536", "pm_score": -1, "selected": false, "text": "list = [[1, 23], [3, 2], [32, 213], [2321, 23]]\nres_list = []\nfor i in list:\n res_list.append((i[1]-i[0]))\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17945841/" ]
74,599,721
<p>I'm pretty new to WinForms and I need something for a project: I'm writing a test program for a device. The device sends some data about itself and I have to output some information about it in a tab and on a chart.</p> <p>Here is the twist: the device can be a double, triple, or n-uple device which means I'll have ...
[ { "answer_id": 74599958, "author": "Hack3r", "author_id": 12171536, "author_profile": "https://Stackoverflow.com/users/12171536", "pm_score": -1, "selected": false, "text": "list = [[1, 23], [3, 2], [32, 213], [2321, 23]]\nres_list = []\nfor i in list:\n res_list.append((i[1]-i[0]))\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599721", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20439316/" ]
74,599,729
<p>I have a PySpark dataframe with values and dictionaries that provide a textual mapping for the values. Not every row has the same dictionary and the values can vary too.</p> <pre><code>| value | dict | | -------- | ---------------------------------------------- | | 1 ...
[ { "answer_id": 74599958, "author": "Hack3r", "author_id": 12171536, "author_profile": "https://Stackoverflow.com/users/12171536", "pm_score": -1, "selected": false, "text": "list = [[1, 23], [3, 2], [32, 213], [2321, 23]]\nres_list = []\nfor i in list:\n res_list.append((i[1]-i[0]))\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12904151/" ]
74,599,793
<p>I have this array:</p> <pre class="lang-js prettyprint-override"><code>[ { id_base: 2, nombre_base: 'Hayama', nombre_flota: 'Browseblab', matricula: '#b65e9e', id_vehiculo: 3 }, { id_base: 2, nombre_base: 'Hayama', nombre_flota: 'Browseblab', matricula: '#b65e9e', id_vehiculo: 3 }, { id_base:...
[ { "answer_id": 74599958, "author": "Hack3r", "author_id": 12171536, "author_profile": "https://Stackoverflow.com/users/12171536", "pm_score": -1, "selected": false, "text": "list = [[1, 23], [3, 2], [32, 213], [2321, 23]]\nres_list = []\nfor i in list:\n res_list.append((i[1]-i[0]))\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15375795/" ]
74,599,805
<p>I am using retrofit Multipart request to upload an image and it is uplaoding successfully to the server, in another screen I want to implement the functionality to change or delete that image and when I fetch the image from the server I only got the name of the image and a Base URL by using which I can display the p...
[ { "answer_id": 74599958, "author": "Hack3r", "author_id": 12171536, "author_profile": "https://Stackoverflow.com/users/12171536", "pm_score": -1, "selected": false, "text": "list = [[1, 23], [3, 2], [32, 213], [2321, 23]]\nres_list = []\nfor i in list:\n res_list.append((i[1]-i[0]))\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13730008/" ]
74,599,812
<pre><code>public class Menu { public static void main(String[] args) throws java.io.IOException { char choice; do { System.out.println(&quot;Help on:&quot;); System.out.println(&quot; 1. if&quot;); System.out.println(&quot; 2. while&quot;); Syste...
[ { "answer_id": 74599958, "author": "Hack3r", "author_id": 12171536, "author_profile": "https://Stackoverflow.com/users/12171536", "pm_score": -1, "selected": false, "text": "list = [[1, 23], [3, 2], [32, 213], [2321, 23]]\nres_list = []\nfor i in list:\n res_list.append((i[1]-i[0]))\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20622822/" ]
74,599,820
<pre><code>views.py def index(request): if request.method == &quot;POST&quot;: from_date = request.POST.get(&quot;from_date&quot;) f_date = datetime.datetime.strptime(from_date,'%Y-%m-%d') print(f_date) to_date = request.POST.get(&quot;to_date&quot;) t_date = datetime.dateti...
[ { "answer_id": 74599958, "author": "Hack3r", "author_id": 12171536, "author_profile": "https://Stackoverflow.com/users/12171536", "pm_score": -1, "selected": false, "text": "list = [[1, 23], [3, 2], [32, 213], [2321, 23]]\nres_list = []\nfor i in list:\n res_list.append((i[1]-i[0]))\n...
2022/11/28
[ "https://Stackoverflow.com/questions/74599820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20467368/" ]
74,599,828
<p>I've created empty dataframe that I have to fill.</p> <pre><code>d = {'A': [], 'B': [], 'C': []} dataframe = pd.DataFrame(data=d) </code></pre> <p>Then I am assigning data like this:</p> <pre><code>dataframe['A'] = some_list_1a dataframe['B'] = some_list_1b dataframe['C'] = some_list_1c </code></pre> <p>So my datafr...
[ { "answer_id": 74599862, "author": "jezrael", "author_id": 2901002, "author_profile": "https://Stackoverflow.com/users/2901002", "pm_score": 1, "selected": false, "text": "d = {'A': some_list_1a + some_list_2a, \n 'B': some_list_1b + some_list_2b,\n 'C': some_list_1c + some_list_...
2022/11/28
[ "https://Stackoverflow.com/questions/74599828", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14147572/" ]
74,599,836
<p>I am working on an e-commerce app in Angular 11.</p> <p>I have a service that makes a <code>get</code> request and reads a JSON.</p> <p>The purpose of this service is to <em>determine which product is promoted</em>.</p> <p>The service:</p> <pre><code>import { Injectable } from '@angular/core'; import { HttpClient } ...
[ { "answer_id": 74600219, "author": "Fabian Strathaus", "author_id": 17298437, "author_profile": "https://Stackoverflow.com/users/17298437", "pm_score": 2, "selected": true, "text": "import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { ...
2022/11/28
[ "https://Stackoverflow.com/questions/74599836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4512005/" ]
74,599,886
<p>I have a question regarding views in the context of jpa entities in SpringBoot. Up to now I am using the auto create feature that automatically creates the tables by the definitions of the entities in Java. Now my application has grown so far that I need to use views. I do not want to write and maintain the sql crea...
[ { "answer_id": 74600197, "author": "kenneth", "author_id": 9877340, "author_profile": "https://Stackoverflow.com/users/9877340", "pm_score": 1, "selected": false, "text": "void Autowired private final PriceRepository priceRepository;\n\n @Autowired\n public ProductionDataLoader...
2022/11/28
[ "https://Stackoverflow.com/questions/74599886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9317010/" ]
74,599,899
<p>Could you help me please find coordinates of point on a plane?</p> <p><a href="https://i.stack.imgur.com/9WGOk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9WGOk.png" alt="enter image description here" /></a></p> <p>I try to find coordinates of the point.</p>
[ { "answer_id": 74600197, "author": "kenneth", "author_id": 9877340, "author_profile": "https://Stackoverflow.com/users/9877340", "pm_score": 1, "selected": false, "text": "void Autowired private final PriceRepository priceRepository;\n\n @Autowired\n public ProductionDataLoader...
2022/11/28
[ "https://Stackoverflow.com/questions/74599899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7699088/" ]
74,599,926
<p>Consider the below code in any method.</p> <p><code>count += new String(text.getBytes()).length()</code></p> <p>I am facing memory issue.</p> <p>I am using this to count number of characters in file. When I am fetching heap dump I am getting huge amount of memory occupied by String Objects. Is it because of this lin...
[ { "answer_id": 74600048, "author": "mozturk", "author_id": 13499450, "author_profile": "https://Stackoverflow.com/users/13499450", "pm_score": -1, "selected": false, "text": "for(int i=0; i<text.length(); i++) { \n count++;\n}\n" }, { "answer_id": 74600107, "author": "Joa...
2022/11/28
[ "https://Stackoverflow.com/questions/74599926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19642753/" ]
74,599,939
<p>I have two arrays as codely illustrated below:</p> <pre><code>let arrayOne = [1669683600000, 1669770000000, 1669698000000, 1669755600000]; let arrayTwo = [1669683600000, 1669770000000]; </code></pre> <p>I would like to remove the contents of <code>arrayTwo</code> from <code>arrayOne</code>. I thought the code below ...
[ { "answer_id": 74600048, "author": "mozturk", "author_id": 13499450, "author_profile": "https://Stackoverflow.com/users/13499450", "pm_score": -1, "selected": false, "text": "for(int i=0; i<text.length(); i++) { \n count++;\n}\n" }, { "answer_id": 74600107, "author": "Joa...
2022/11/28
[ "https://Stackoverflow.com/questions/74599939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/745262/" ]
74,599,943
<ol> <li>Spring cloud-config server started with application.properties :</li> </ol> <pre><code>server.port:8888 spring.application.name=test-config-server spring.cloud.config.server.git.uri=https://gitlab.com/pearsontechnology/gpt/sms/sms-micro-services/config-server.git spring.cloud.config.server.git.default-label=de...
[ { "answer_id": 74600845, "author": "Lunatic", "author_id": 15758781, "author_profile": "https://Stackoverflow.com/users/15758781", "pm_score": 0, "selected": false, "text": "pom <dependency>\n <groupId>org.springframework.cloud</groupId>\n <artifactId>spring-cloud-starter-config</a...
2022/11/28
[ "https://Stackoverflow.com/questions/74599943", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1812810/" ]
74,600,089
<p>I am making a for loop run the amount of times I have records in a table to see if a checkbox has been checked or not. It works however, the line of code which is used to actually see if there is something checked does not. It only works if it sees it in the top row but does not if it has to loop as it reports null....
[ { "answer_id": 74600234, "author": "Maahi", "author_id": 10786431, "author_profile": "https://Stackoverflow.com/users/10786431", "pm_score": -1, "selected": false, "text": "bool? isCellChecked = (bool?)dgvForSale.Rows[i].Cells[4].Value;\n if (isCellChecked !=null && isCellChecked == true...
2022/11/28
[ "https://Stackoverflow.com/questions/74600089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19374209/" ]
74,600,099
<p>I have few folders inside the Data lake (Example:Test1 container) that are created every month in this format YYYY-MM (Example:2022-11) and inside this folder I have few set of data files, I want to copy this data files to different folders in the data lake.</p> <p>And again in the next month new folder is created i...
[ { "answer_id": 74600234, "author": "Maahi", "author_id": 10786431, "author_profile": "https://Stackoverflow.com/users/10786431", "pm_score": -1, "selected": false, "text": "bool? isCellChecked = (bool?)dgvForSale.Rows[i].Cells[4].Value;\n if (isCellChecked !=null && isCellChecked == true...
2022/11/28
[ "https://Stackoverflow.com/questions/74600099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20054635/" ]
74,600,128
<p>How to display the <code>selected</code> value &quot;please pick and select&quot; in this dropdown menu example?</p> <p>The given code is not working:</p> <pre><code>&lt;div className=&quot;col-md-6&quot;&gt; &lt;select className=&quot;form-select&quot; aria-label=&quot;Default select example&quot; &gt; ...
[ { "answer_id": 74600234, "author": "Maahi", "author_id": 10786431, "author_profile": "https://Stackoverflow.com/users/10786431", "pm_score": -1, "selected": false, "text": "bool? isCellChecked = (bool?)dgvForSale.Rows[i].Cells[4].Value;\n if (isCellChecked !=null && isCellChecked == true...
2022/11/28
[ "https://Stackoverflow.com/questions/74600128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18862993/" ]
74,600,150
<p>I have a data set with many columns (DATA_OLD) in which I want to exchange all values based on an allocation list with many entries (KEY).</p> <p>Every value in DATA_OLD should be replaced by its counterpart (can be seen in KEY) to create DATA_NEW.</p> <p>For simplicity, the example here contains a short KEY and DAT...
[ { "answer_id": 74601191, "author": "Ottie", "author_id": 17732851, "author_profile": "https://Stackoverflow.com/users/17732851", "pm_score": 1, "selected": true, "text": "key <- setNames(KEY$new, KEY$old)\n> key\n 1 3 7 12 55 \n 1 2 3 4 5 \n > key[3]\n7 \n3 # WRONG! This is the 3r...
2022/11/28
[ "https://Stackoverflow.com/questions/74600150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15382910/" ]
74,600,194
<p>I have a basic slider setup, with three banners in it. The id is there to set the background image. Only the banner with the class &quot;active&quot; is shown at the frontend.</p> <p>I'd like to cycle that class within the elements in the &quot;slider&quot; div every 8 seconds, so I can add new banners in the html a...
[ { "answer_id": 74600430, "author": "Pete", "author_id": 1790982, "author_profile": "https://Stackoverflow.com/users/1790982", "pm_score": 2, "selected": true, "text": "const banners = document.getElementsByClassName(\"banner\"); // get banners\nlet currentActive = 0; // set the current ...
2022/11/28
[ "https://Stackoverflow.com/questions/74600194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20622668/" ]
74,600,215
<p>I have a requirement to insert new records and delete this record 3 months after created date. I will create a new table. I want that query will create the table as well as auto delete the records which are more than 3 months of the created date.</p>
[ { "answer_id": 74604830, "author": "Zegarek", "author_id": 5298879, "author_profile": "https://Stackoverflow.com/users/5298879", "pm_score": 0, "selected": false, "text": "CREATE EXTENSION pg_cron;\n\n-- Delete old data daily at 3:30am (GMT)\nSELECT cron.schedule(\n 'delete outd...
2022/11/28
[ "https://Stackoverflow.com/questions/74600215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2278863/" ]
74,600,252
<p>I am using on a new project Laravel 9 / Livewire 2.1 / Jquery 3.6.1 / and LivewireAlert from jantinnerezo from here: <a href="https://github.com/jantinnerezo/livewire-alert" rel="nofollow noreferrer">https://github.com/jantinnerezo/livewire-alert</a> I am using an adminPanel dashboard for showing nice menus and so o...
[ { "answer_id": 74604830, "author": "Zegarek", "author_id": 5298879, "author_profile": "https://Stackoverflow.com/users/5298879", "pm_score": 0, "selected": false, "text": "CREATE EXTENSION pg_cron;\n\n-- Delete old data daily at 3:30am (GMT)\nSELECT cron.schedule(\n 'delete outd...
2022/11/28
[ "https://Stackoverflow.com/questions/74600252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7527669/" ]
74,600,257
<p>Good morning, I'm trying to make an ATM, I'm having a problem, I do not know how to save in the database the new information I'm entering.</p> <pre><code>decimal deposit = 0; Console.WriteLine(&quot;\n Quanto deseja depositar ?&quot;); //Ask how much the client want deposit deposit = decimal.Parse(Console.ReadLine()...
[ { "answer_id": 74604830, "author": "Zegarek", "author_id": 5298879, "author_profile": "https://Stackoverflow.com/users/5298879", "pm_score": 0, "selected": false, "text": "CREATE EXTENSION pg_cron;\n\n-- Delete old data daily at 3:30am (GMT)\nSELECT cron.schedule(\n 'delete outd...
2022/11/28
[ "https://Stackoverflow.com/questions/74600257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20571251/" ]
74,600,275
<p>I want to use a azure SQL Database and want connect to it via ip-adress.</p> <p>My current setup:</p> <ol> <li>Azure Database e.g. &quot;example.database.windows.net&quot;</li> <li>Private Link in Azure Subnet connected with the database (10.231.1.5)</li> <li>Azure Win VM (10.231.1.4)</li> </ol> <p>When I open SSMS ...
[ { "answer_id": 74604830, "author": "Zegarek", "author_id": 5298879, "author_profile": "https://Stackoverflow.com/users/5298879", "pm_score": 0, "selected": false, "text": "CREATE EXTENSION pg_cron;\n\n-- Delete old data daily at 3:30am (GMT)\nSELECT cron.schedule(\n 'delete outd...
2022/11/28
[ "https://Stackoverflow.com/questions/74600275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4975457/" ]
74,600,315
<p>I am using express to add/update/delete the data on MongoDB. Good think is its working fine.</p> <p><strong>Updated</strong></p> <pre><code>function UpData(chk, _action, up){ Employee.updateOne( chk ,{ _action : up}) .then(data =&gt; { if (!data) { res.status(404).send({ mes...
[ { "answer_id": 74604830, "author": "Zegarek", "author_id": 5298879, "author_profile": "https://Stackoverflow.com/users/5298879", "pm_score": 0, "selected": false, "text": "CREATE EXTENSION pg_cron;\n\n-- Delete old data daily at 3:30am (GMT)\nSELECT cron.schedule(\n 'delete outd...
2022/11/28
[ "https://Stackoverflow.com/questions/74600315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412540/" ]
74,600,319
<p>I have a basic MongoDB Atlas trigger in NodeJS :</p> <pre><code>exports = function(changeEvent) { // Make an http request }; </code></pre> <p>My goal is to call an AWS lambda function from this trigger, so i would like to know the syntax to make a basic <code>GET</code> request to a specific endpoint from th...
[ { "answer_id": 74604830, "author": "Zegarek", "author_id": 5298879, "author_profile": "https://Stackoverflow.com/users/5298879", "pm_score": 0, "selected": false, "text": "CREATE EXTENSION pg_cron;\n\n-- Delete old data daily at 3:30am (GMT)\nSELECT cron.schedule(\n 'delete outd...
2022/11/28
[ "https://Stackoverflow.com/questions/74600319", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11665178/" ]
74,600,340
<p>Im trying to create a search bar type filter within shadow dom as follows</p> <pre><code>const root = mainContainer.attachShadow({ mode: &quot;open&quot; }); var filter = root.getElementById(&quot;myInput&quot;), // search box list = root.querySelectorAll(&quot;.clubguests-card&quot;); // all list ...
[ { "answer_id": 74604830, "author": "Zegarek", "author_id": 5298879, "author_profile": "https://Stackoverflow.com/users/5298879", "pm_score": 0, "selected": false, "text": "CREATE EXTENSION pg_cron;\n\n-- Delete old data daily at 3:30am (GMT)\nSELECT cron.schedule(\n 'delete outd...
2022/11/28
[ "https://Stackoverflow.com/questions/74600340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11868530/" ]
74,600,376
<p>I Am trying to write one query.</p> <p>Below is the query ritten till now.</p> <pre><code>@Query(value = &quot;select cn from CapNumber cn &quot; + &quot;WHERE (:#{#request.number} = '' OR cn.number LIKE CONCAT('%',:#{#request.number},'%')) &quot; + &quot;AND (:#{#request.name} IS '' OR cn.name LIKE CONCAT('%',:#{#r...
[ { "answer_id": 74604830, "author": "Zegarek", "author_id": 5298879, "author_profile": "https://Stackoverflow.com/users/5298879", "pm_score": 0, "selected": false, "text": "CREATE EXTENSION pg_cron;\n\n-- Delete old data daily at 3:30am (GMT)\nSELECT cron.schedule(\n 'delete outd...
2022/11/28
[ "https://Stackoverflow.com/questions/74600376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4210210/" ]
74,600,377
<p>I would like to know if I can perform operations on some numbers straight in the file without</p> <p>the need to read them. I wrote this code to check if a file is sorted but I had to read them</p> <p>first into a vector and then check if the vector is sorted or not but then I figured that this</p> <p>code might be ...
[ { "answer_id": 74600662, "author": "Marek R", "author_id": 1387438, "author_profile": "https://Stackoverflow.com/users/1387438", "pm_score": 2, "selected": false, "text": "vector bool areIntsInStreamSorted(std::istream& in)\n{\n return std::is_sorted(std::istream_iterator<int>{in}, {}...
2022/11/28
[ "https://Stackoverflow.com/questions/74600377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20431658/" ]
74,600,389
<p>I have a variable <code>result</code> that contains around 1M entries, which looks like this:</p> <pre><code>result = [ { 'name': 'x', 'other fields': '...', }, { 'name': 'y', 'other fields': '...', }, .. and so on .. ] </code></pre> <p>I want to create another array that only contains a li...
[ { "answer_id": 74600478, "author": "Aramil Rey", "author_id": 4187849, "author_profile": "https://Stackoverflow.com/users/4187849", "pm_score": 0, "selected": false, "text": "for .. of forEach const namesResults = []\nfor (const { name } of result) {\n namesResults.push(name)\n}\n .redu...
2022/11/28
[ "https://Stackoverflow.com/questions/74600389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1768337/" ]
74,600,429
<p>Hello guys i wanna write a Shell script that runs Python code saved in variable called $code.</p> <p>So i save the script in variable <code>$code</code> with this command:</p> <pre><code>$ export CODE='print(&quot;Hello world&quot;)' </code></pre> <p>To resolve the problem I write the following script in a file call...
[ { "answer_id": 74600750, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 0, "selected": false, "text": "<<< echo \"$PYCODE\" | python3\n" }, { "answer_id": 74600760, "author": "alexisdevarennes", "author...
2022/11/28
[ "https://Stackoverflow.com/questions/74600429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20170267/" ]