qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,386,385
<p>When working in a class defined in a module, I'd like to access another class defined in the same module.</p> <p>When using this code</p> <pre class="lang-rb prettyprint-override"><code>module SomeModule class Foo def self.get_bar Bar end end end module SomeModule class Bar end end # works an...
[ { "answer_id": 74387001, "author": "Rostislav Zhuravsky", "author_id": 13875480, "author_profile": "https://Stackoverflow.com/users/13875480", "pm_score": 3, "selected": true, "text": "Module.nesting module SomeModule\n class Buzz\n def self.get_bar\n p Module.nesting #=> [SomeM...
2022/11/10
[ "https://Stackoverflow.com/questions/74386385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177665/" ]
74,386,402
<p>I am using</p> <ul> <li><code>coverlet.msbuild v3.2.0</code></li> <li><code>coverlet.collector v3.2.0</code></li> </ul> <p>and <code>dotnet sdk v6.0.402</code></p> <p>When I run this test command in powershell (restore and build ran before that)</p> <pre><code>dotnet test --no-build --no-restore --collect:&quot;XPla...
[ { "answer_id": 74399702, "author": "mrt181", "author_id": 114798, "author_profile": "https://Stackoverflow.com/users/114798", "pm_score": 0, "selected": false, "text": "coverlet.runsettings <?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<RunSettings>\n <RunConfiguration>\n <ResultsDire...
2022/11/10
[ "https://Stackoverflow.com/questions/74386402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/114798/" ]
74,386,422
<p>I am trying to add edited task to local storage. I don't know how to replace an element in the array with new element.</p> <p><a href="https://i.stack.imgur.com/YhlIq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YhlIq.png" alt="enter image description here" /></a></p> <p>I have tried to iterate...
[ { "answer_id": 74386604, "author": "Brad", "author_id": 6019903, "author_profile": "https://Stackoverflow.com/users/6019903", "pm_score": 3, "selected": true, "text": "let todos = ['job 1', 'job 2', 'job 3', 'job 4'];\n\nconsole.log(todos);\n\ntodos.splice(1, 1, 'job a');\n\nconsole.log(...
2022/11/10
[ "https://Stackoverflow.com/questions/74386422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20466458/" ]
74,386,488
<p>So to start coding I have to ask for a user input. They have to place 4 cards like so</p> <pre><code>A-S,A-H,A-C,A-D </code></pre> <p>Then I would create a list from their input. It should take the 2nd element then the 4th element from their input</p> <pre><code>4cards = input() List1 = [] List1.append(4cards[1], 4c...
[ { "answer_id": 74386604, "author": "Brad", "author_id": 6019903, "author_profile": "https://Stackoverflow.com/users/6019903", "pm_score": 3, "selected": true, "text": "let todos = ['job 1', 'job 2', 'job 3', 'job 4'];\n\nconsole.log(todos);\n\ntodos.splice(1, 1, 'job a');\n\nconsole.log(...
2022/11/10
[ "https://Stackoverflow.com/questions/74386488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20143499/" ]
74,386,524
<p>everyone</p> <p>I have a dataframe with 2 million unique codes for students and two other columns: initial and final year. I need to create a new dataframe with only two columns (student cod and year), with one row for each year the student remained studying. For instance, if student with code 1234567 studied from 2...
[ { "answer_id": 74386604, "author": "Brad", "author_id": 6019903, "author_profile": "https://Stackoverflow.com/users/6019903", "pm_score": 3, "selected": true, "text": "let todos = ['job 1', 'job 2', 'job 3', 'job 4'];\n\nconsole.log(todos);\n\ntodos.splice(1, 1, 'job a');\n\nconsole.log(...
2022/11/10
[ "https://Stackoverflow.com/questions/74386524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14612370/" ]
74,386,537
<p>I want to change the width of a component whenever I click a button from another component</p> <p>This is the button in BiCarret:</p> <pre><code>import { useState } from &quot;react&quot;; import { BiCaretLeft } from &quot;react-icons/bi&quot;; const SideBar = () =&gt; { const [open, setOpen] = useState(true); ...
[ { "answer_id": 74386581, "author": "Abdulrahman Ali", "author_id": 14876907, "author_profile": "https://Stackoverflow.com/users/14876907", "pm_score": -1, "selected": false, "text": "import { useState } from \"react\";\nimport { BiCaretLeft } from \"react-icons/bi\";\n\nconst SideBar = (...
2022/11/10
[ "https://Stackoverflow.com/questions/74386537", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11249467/" ]
74,386,538
<p>A program that reads 3 numbers A, B and C and checks if each 3 numbers are greater than or equal to 20. Output should be single line containing a boolean. True should be printed if each number is greater than or equal to 20, Otherwise False should be printed.</p> <p>I have tried using &quot;and&quot; operator and go...
[ { "answer_id": 74386592, "author": "blhsing", "author_id": 6890912, "author_profile": "https://Stackoverflow.com/users/6890912", "pm_score": 3, "selected": true, "text": "all print(all(int(input()) >= 20 for _ in range(3)))\n" }, { "answer_id": 74386594, "author": "0x0fba", ...
2022/11/10
[ "https://Stackoverflow.com/questions/74386538", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20466740/" ]
74,386,543
<p>In C++, how do I print the type contained in a variant at run time?</p> <p>My use case: passing a dictionary of values from Python to C++ using <a href="https://pybind11.readthedocs.io/en/stable/advanced/cast/stl.html?highlight=variant#c-17-library-containers" rel="nofollow noreferrer">pybind11</a>, and I want to pr...
[ { "answer_id": 74386544, "author": "Contango", "author_id": 107409, "author_profile": "https://Stackoverflow.com/users/107409", "pm_score": -1, "selected": false, "text": "#include <string>\n#include <variant>\n#include <type_traits>\n\n/**\n * \\brief Variant type to string.\n * \\tpara...
2022/11/10
[ "https://Stackoverflow.com/questions/74386543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/107409/" ]
74,386,583
<p>I have a folder (existing in the same directory as the python script) with a lot of csv files starting from 1st Jan to 31st Dec and I want to read only specific csv files within a certain date range from the folder into python and later appending the files into a list.</p> <p>The files are named as below and there a...
[ { "answer_id": 74387069, "author": "Klas Š.", "author_id": 9288580, "author_profile": "https://Stackoverflow.com/users/9288580", "pm_score": 0, "selected": false, "text": "# replace `file.startswith(...) and file.endswith(...)`\nre.match('BANK_NIFTY_5MINs_2020-(02|03|10|11|12)-[0-9]+', f...
2022/11/10
[ "https://Stackoverflow.com/questions/74386583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20059373/" ]
74,386,607
<p>the goal is to take the numbers in between 2 dashes and I was able to do that but the issue is that I need to remove the leading zero to the returned value. How can I incorporate the LTRIM function or other functions without removing all zeros?</p> <p>Sample:</p> <pre><code>123-010-456 </code></pre> <p>Results shou...
[ { "answer_id": 74387069, "author": "Klas Š.", "author_id": 9288580, "author_profile": "https://Stackoverflow.com/users/9288580", "pm_score": 0, "selected": false, "text": "# replace `file.startswith(...) and file.endswith(...)`\nre.match('BANK_NIFTY_5MINs_2020-(02|03|10|11|12)-[0-9]+', f...
2022/11/10
[ "https://Stackoverflow.com/questions/74386607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20465203/" ]
74,386,629
<p>I have a component ts file in which it is reusable by 2 HTML - one for privileged users and one for non-privileged users. Both HTMLs calls/reuse the same component ts file. However, I have 2 APIs - one for privileged and one for non-privileged. How do I integrate both APIs when the HTMLs are reusing the same compone...
[ { "answer_id": 74387069, "author": "Klas Š.", "author_id": 9288580, "author_profile": "https://Stackoverflow.com/users/9288580", "pm_score": 0, "selected": false, "text": "# replace `file.startswith(...) and file.endswith(...)`\nre.match('BANK_NIFTY_5MINs_2020-(02|03|10|11|12)-[0-9]+', f...
2022/11/10
[ "https://Stackoverflow.com/questions/74386629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
74,386,672
<p>The naming of SAS library has 3 rules:</p> <ol> <li>no more than 8 character;</li> <li>may consist with underscore, numbers and English letters;</li> <li>start with underscore or English letters;</li> </ol> <p>Here comes my question: How to validate a string include invalid library name or not using perl regular exp...
[ { "answer_id": 74389513, "author": "gregor", "author_id": 20198546, "author_profile": "https://Stackoverflow.com/users/20198546", "pm_score": 1, "selected": false, "text": "data test;\n input string&$42.;\n cards;\nsasuser work +sashelp\nsas_user _work 7z sashelp\nsasuser work77 dictio...
2022/11/10
[ "https://Stackoverflow.com/questions/74386672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9876526/" ]
74,386,691
<p>i want to push an object into an empty array in useMemo method using typescript. i have code like below,</p> <pre><code>const commonDetails = data?.CommonDetails; const details: Details[] = []; const selectedItems = React.useMemo(() =&gt; { // here selectedItems type is set to // number or undefined. instead i ex...
[ { "answer_id": 74386761, "author": "Tushar Shahi", "author_id": 10140124, "author_profile": "https://Stackoverflow.com/users/10140124", "pm_score": 0, "selected": false, "text": ".push() && falsy truthy console.log({} && [2].push(5)); //2\nconsole.log(true && [].push(5)); //1 return comm...
2022/11/10
[ "https://Stackoverflow.com/questions/74386691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
74,386,694
<p>I have the following dataframe:</p> <pre><code># initialize list of lists data = [['1', &quot;Tag1, Tag323, Tag36&quot;], ['2', &quot;Tag11, Tag212&quot;], ['4', &quot;Tag1, Tag12, Tag3, Tag324&quot;]] # Create the pandas DataFrame df = pd.DataFrame(data, columns = ['ID', 'Tag']) </code></pre> <pre><code>print(df...
[ { "answer_id": 74386761, "author": "Tushar Shahi", "author_id": 10140124, "author_profile": "https://Stackoverflow.com/users/10140124", "pm_score": 0, "selected": false, "text": ".push() && falsy truthy console.log({} && [2].push(5)); //2\nconsole.log(true && [].push(5)); //1 return comm...
2022/11/10
[ "https://Stackoverflow.com/questions/74386694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11934963/" ]
74,386,717
<p>How to set minimum decimal digits but not maximum decimal digits. I tried with <code>number_format</code> but the results were unexpected.</p> <pre class="lang-php prettyprint-override"><code>&lt;?php echo number_format(&quot;1000000&quot;, 2) . &quot;&lt;br&gt;&quot;; echo number_format(&quot;1000000.6&quot;, 2) ....
[ { "answer_id": 74386998, "author": "Chris Haas", "author_id": 231316, "author_profile": "https://Stackoverflow.com/users/231316", "pm_score": 2, "selected": true, "text": "NumberFormatter $f = new NumberFormatter('en-US', NumberFormatter::DECIMAL);\n$f->setAttribute(NumberFormatter::MIN_...
2022/11/10
[ "https://Stackoverflow.com/questions/74386717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3774282/" ]
74,386,720
<p>I am trying to add files using file picker in .net MAUI I am getting error while adding files. I am getting error on that await line. I tried to add oncreate method in maiacticity.cs file but it is showing same exception. This is my Model:</p> <pre><code>public class Data { public string fileName { get; set; } ...
[ { "answer_id": 74386998, "author": "Chris Haas", "author_id": 231316, "author_profile": "https://Stackoverflow.com/users/231316", "pm_score": 2, "selected": true, "text": "NumberFormatter $f = new NumberFormatter('en-US', NumberFormatter::DECIMAL);\n$f->setAttribute(NumberFormatter::MIN_...
2022/11/10
[ "https://Stackoverflow.com/questions/74386720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19836184/" ]
74,386,752
<p>I am learning prolog.</p> <p>It seems to me that prolog's rules (relations and simple facts) are &quot;positive&quot; - they say what is or can be true.</p> <p>Adding new such rules to a prolog program only adds &quot;positive&quot; knowledge. It can't add &quot;negative&quot; facts to say something isn't true.</p> ...
[ { "answer_id": 74386998, "author": "Chris Haas", "author_id": 231316, "author_profile": "https://Stackoverflow.com/users/231316", "pm_score": 2, "selected": true, "text": "NumberFormatter $f = new NumberFormatter('en-US', NumberFormatter::DECIMAL);\n$f->setAttribute(NumberFormatter::MIN_...
2022/11/10
[ "https://Stackoverflow.com/questions/74386752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19713913/" ]
74,386,764
<p>I have a column of Hexadecimal strings with many TRAILING zeros. The problem i have is that the trailing Zeros from the string, needs to be removed</p> <p>I have searched for a VBA formula such as Trim but my solution has not worked.</p> <p>Is there a VBA formula I can use to remove all these Trailing zeros from e...
[ { "answer_id": 74386955, "author": "virolino", "author_id": 10988580, "author_profile": "https://Stackoverflow.com/users/10988580", "pm_score": 1, "selected": false, "text": "while last character is \"0\"\n remove last character\nend while\n" }, { "answer_id": 74386974, "a...
2022/11/10
[ "https://Stackoverflow.com/questions/74386764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6126937/" ]
74,386,787
<p>Im getting an error when trying to Debug/Deploy my App (that works on UWP) to Android. I have tried to run the App on the emulator in VS (Android 9) and my smartphone (Android12).</p> <p>The error i am getting is &quot;Default constructor not found on type [MyApp].Views.AboutPage&quot;.</p> <p>The AboutPage class:</...
[ { "answer_id": 74386955, "author": "virolino", "author_id": 10988580, "author_profile": "https://Stackoverflow.com/users/10988580", "pm_score": 1, "selected": false, "text": "while last character is \"0\"\n remove last character\nend while\n" }, { "answer_id": 74386974, "a...
2022/11/10
[ "https://Stackoverflow.com/questions/74386787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20466835/" ]
74,386,809
<p>For examle, I want to update the following materialized view everyday at 23:30. What should I write after the START WITH and NEXT clause ?</p> <pre><code>CREATE MATERIALIZED VIEW test_example REFRESH COMPLETE START WITH NEXT AS </code></pre>
[ { "answer_id": 74386917, "author": "Littlefoot", "author_id": 9097906, "author_profile": "https://Stackoverflow.com/users/9097906", "pm_score": 1, "selected": false, "text": "create materialized view test_example\nrefresh complete\nstart with sysdate \nnext trunc(sysdate) + 23/24 + 30/(2...
2022/11/10
[ "https://Stackoverflow.com/questions/74386809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20197912/" ]
74,386,838
<p>I am writing an application and I was wondering if I can make property &quot;Name&quot; unique - for example there cannot be more than one location with the same name</p> <p>Code snippet:</p> <pre><code>public class City: MyClass1 { [MaxLength(255)] public required string Name { get; set; } } </code></pre> <...
[ { "answer_id": 74387017, "author": "Max Play", "author_id": 5593150, "author_profile": "https://Stackoverflow.com/users/5593150", "pm_score": 3, "selected": true, "text": "public class City: MyClass1\n{\n private static HashSet<string> names;\n private string name;\n\n [MaxLengt...
2022/11/10
[ "https://Stackoverflow.com/questions/74386838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19799746/" ]
74,386,866
<p>Try to create a Windows .bat file to achieve the below function:</p> <pre><code>cd C:\repo\demo venv\Scripts\activate python test.py </code></pre> <p>In Visual Studio Code terminal window, I can run the above lines without issue.</p> <p>Created a .bat file as below:</p> <pre><code>cd C:\repo\demo &quot;C:\Users\jw\A...
[ { "answer_id": 74387017, "author": "Max Play", "author_id": 5593150, "author_profile": "https://Stackoverflow.com/users/5593150", "pm_score": 3, "selected": true, "text": "public class City: MyClass1\n{\n private static HashSet<string> names;\n private string name;\n\n [MaxLengt...
2022/11/10
[ "https://Stackoverflow.com/questions/74386866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6179813/" ]
74,386,885
<p>I want to get latest record for each group in a table of rows. ex, i want <strong>column c</strong> like getting latest record by count</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Column A</th> <th>Column B</th> <th>Column C</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>09-11-2022 ...
[ { "answer_id": 74387017, "author": "Max Play", "author_id": 5593150, "author_profile": "https://Stackoverflow.com/users/5593150", "pm_score": 3, "selected": true, "text": "public class City: MyClass1\n{\n private static HashSet<string> names;\n private string name;\n\n [MaxLengt...
2022/11/10
[ "https://Stackoverflow.com/questions/74386885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20260385/" ]
74,386,901
<p>In my project with PHP Inside the JSON is the data I keep. And each of these data has sequence numbers 1.1, 1.1.1, 1.1.2, 1.1.3, ..., 1.1.10.</p> <p>When I sorted, I noticed that 1.1.10 came after 1.1.1, whereas 1.1.9 wasn't there yet.</p> <p>Because it sorts alphabetically. And I don't know how to deal with it!</p>...
[ { "answer_id": 74387017, "author": "Max Play", "author_id": 5593150, "author_profile": "https://Stackoverflow.com/users/5593150", "pm_score": 3, "selected": true, "text": "public class City: MyClass1\n{\n private static HashSet<string> names;\n private string name;\n\n [MaxLengt...
2022/11/10
[ "https://Stackoverflow.com/questions/74386901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17701615/" ]
74,386,948
<p>How can I recreate GitHub's repositories language list using CSS only? Something like this, for example:</p> <p><a href="https://i.stack.imgur.com/Kd4iC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kd4iC.png" alt="enter image description here" /></a></p> <p>I started with a list of <code>div</c...
[ { "answer_id": 74387141, "author": "Armin Ayari", "author_id": 8863489, "author_profile": "https://Stackoverflow.com/users/8863489", "pm_score": 1, "selected": false, "text": "::before div > div {\nposition: relative;\nmargin-left: 10px;\n}\n\ndiv > div:before {\ncontent: '';\nposition: ...
2022/11/10
[ "https://Stackoverflow.com/questions/74386948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9931829/" ]
74,386,951
<p>I am trying to generate APK but i run into an Obstacle, I am getting this As error :</p> <pre><code>&gt; Task :react-native-gesture-handler:generateReleaseRFile FAILED FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':react-native...
[ { "answer_id": 74387141, "author": "Armin Ayari", "author_id": 8863489, "author_profile": "https://Stackoverflow.com/users/8863489", "pm_score": 1, "selected": false, "text": "::before div > div {\nposition: relative;\nmargin-left: 10px;\n}\n\ndiv > div:before {\ncontent: '';\nposition: ...
2022/11/10
[ "https://Stackoverflow.com/questions/74386951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19813264/" ]
74,386,969
<p>I have multiple @State var that will be changed in the TextField, but I want to keep the old values to be used after the state values are changed on the TextFields</p> <pre><code>@State var name: String var oldName = ??? </code></pre> <p>What is the best approach for this?</p>
[ { "answer_id": 74387231, "author": "vadian", "author_id": 5044042, "author_profile": "https://Stackoverflow.com/users/5044042", "pm_score": 0, "selected": false, "text": ".onSubmit name @State text struct TextFieldView: View {\n @State private var text = \"\"\n @State private var n...
2022/11/10
[ "https://Stackoverflow.com/questions/74386969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20462449/" ]
74,386,972
<p>I have a linestring and a polygon and I am using turf.booleanIntersect() to determine if the line goes through the polygon. The example that i have tested and works is:</p> <pre><code>var poly1 = turf.polygon([ [ [148.535693, -29.6], [154.553967, -29.64038], ...
[ { "answer_id": 74387231, "author": "vadian", "author_id": 5044042, "author_profile": "https://Stackoverflow.com/users/5044042", "pm_score": 0, "selected": false, "text": ".onSubmit name @State text struct TextFieldView: View {\n @State private var text = \"\"\n @State private var n...
2022/11/10
[ "https://Stackoverflow.com/questions/74386972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15502957/" ]
74,386,975
<pre class="lang-py prettyprint-override"><code>cursor.execute('''CREATE TABLE PEDIDO( CPEDIDO INT GENERATED AS IDENTITY PRIMARY KEY, CCLIENTE INT NOT NULL, FECHA DATE NOT NULL )''') valores=[] for i in range(10): print(i) x=datetime.date(year=2022,month=11,day=i+...
[ { "answer_id": 74387231, "author": "vadian", "author_id": 5044042, "author_profile": "https://Stackoverflow.com/users/5044042", "pm_score": 0, "selected": false, "text": ".onSubmit name @State text struct TextFieldView: View {\n @State private var text = \"\"\n @State private var n...
2022/11/10
[ "https://Stackoverflow.com/questions/74386975", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20457068/" ]
74,386,982
<p>How do I solve this while using <code>include()</code>?</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const allowedIds = [1, 3] const allBoats = [{ id: 1, name: 'ti...
[ { "answer_id": 74387026, "author": "dangarfield", "author_id": 3265253, "author_profile": "https://Stackoverflow.com/users/3265253", "pm_score": 2, "selected": false, "text": "const allowedIds = [1, 3]\n\nconst allBoats = [{\n id: 1,\n name: 'titanic'\n}, {\n id: 2,\n name: 'anna'\n}...
2022/11/10
[ "https://Stackoverflow.com/questions/74386982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
74,387,032
<p>I want to create an simple XSS. Below is my code</p> <pre><code>&lt;body&gt; &lt;script&gt; function update(){ const message = document.getElementById(&quot;message&quot;).value; document.getElementById(&quot;show_message&quot;).innerHTML = message } &lt;/script&gt; ...
[ { "answer_id": 74387180, "author": "Tushar Shahi", "author_id": 10140124, "author_profile": "https://Stackoverflow.com/users/10140124", "pm_score": 3, "selected": true, "text": "script img <image/src/onerror=alert(8)>\n" } ]
2022/11/10
[ "https://Stackoverflow.com/questions/74387032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19870073/" ]
74,387,089
<p>I tried to lead from the home page to <code>&quot;/allUsers&quot;</code> page. The homepage has a link that directs to the all Users page. But when I click from the home page to all User page it does not show any content. The link to all Users is <code>&quot;http://localhost:3000/allUsers&quot;</code></p> <p>App.js:...
[ { "answer_id": 74387281, "author": "Miquel Strippoli", "author_id": 19890485, "author_profile": "https://Stackoverflow.com/users/19890485", "pm_score": -1, "selected": false, "text": "<Route path=\"/allUsers\" exact element={<allUsers/>} />\n" }, { "answer_id": 74387393, "aut...
2022/11/10
[ "https://Stackoverflow.com/questions/74387089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15363812/" ]
74,387,128
<p>I have this dataframe df and the vector z</p> <pre><code>df = data.frame(x =c(letters[1:3],NA,NA,'part1',letters[4:5],NA,NA,'part2', letters[6:7]), y = c('p1','p2','p3',NA,NA,'---','p4', 'p5',NA,NA,'---','p6','p7') ) z = 5:6 </code></pre> <p>and I want to create a column the is called <code>score</...
[ { "answer_id": 74387528, "author": "shaun_m", "author_id": 18289387, "author_profile": "https://Stackoverflow.com/users/18289387", "pm_score": 3, "selected": true, "text": "z df x df$score[grepl('part', df$x)] <- z\n" }, { "answer_id": 74387610, "author": "sindri_baldur", ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19720935/" ]
74,387,208
<p>I have a list that I extract it into sublists and then I splitted it into sublists of 20 items. Now I want to take juste 200 items of this list and then split it But .take didn't work for me.</p> <pre><code> static Future&lt;List&gt; localPath() async { File textAsset = File('/storage/emulated/0/RPSApp/assets/bl...
[ { "answer_id": 74387528, "author": "shaun_m", "author_id": 18289387, "author_profile": "https://Stackoverflow.com/users/18289387", "pm_score": 3, "selected": true, "text": "z df x df$score[grepl('part', df$x)] <- z\n" }, { "answer_id": 74387610, "author": "sindri_baldur", ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20285309/" ]
74,387,223
<p>EDITED: I am trying to CASE a query from my table when a result meets 2 sets of criteria (Flight Time &amp; Tail Number), but I am receiving the wrong result. I only started SQL a few weeks ago for an upcoming school assignment, but am having trouble with this query.</p> <pre><code>SELECT FlightNumber AS 'Flight Num...
[ { "answer_id": 74387528, "author": "shaun_m", "author_id": 18289387, "author_profile": "https://Stackoverflow.com/users/18289387", "pm_score": 3, "selected": true, "text": "z df x df$score[grepl('part', df$x)] <- z\n" }, { "answer_id": 74387610, "author": "sindri_baldur", ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16736411/" ]
74,387,244
<p>I'm setting up my integration testing rig. I'm using the <code>beforeEach</code> and <code>afterEach</code> hooks to wrap every single test in a transaction that rollsback so that the tests don't affect each other. A simplified example might be this:</p> <pre class="lang-js prettyprint-override"><code>const { reposi...
[ { "answer_id": 74387528, "author": "shaun_m", "author_id": 18289387, "author_profile": "https://Stackoverflow.com/users/18289387", "pm_score": 3, "selected": true, "text": "z df x df$score[grepl('part', df$x)] <- z\n" }, { "answer_id": 74387610, "author": "sindri_baldur", ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5698865/" ]
74,387,257
<p>I have the following dataset:</p> <pre><code> Col_A Amounts 0 A 100 1 B 200 2 C 500 3 D 100 4 E 500 5 F 300 </code></pre> <p>The output I am trying to achieve is to basically remove all values based on the &quot;Amounts&quot; column which have a duplicate value and to k...
[ { "answer_id": 74387305, "author": "jezrael", "author_id": 2901002, "author_profile": "https://Stackoverflow.com/users/2901002", "pm_score": 2, "selected": true, "text": "keep=False Amounts print (df.drop_duplicates(subset=['Amounts'], keep=False))\n Col_A Amounts\n1 B 200\n5 ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9395266/" ]
74,387,347
<p>i have been trying to implement a context api solution since i want to use children states(data) in my app.js without lifting up the states. anyways i have tried to implement it a context api soloution to by doing the following :</p> <ol> <li>i created a folder names context and then created Context.js</li> </ol> <p...
[ { "answer_id": 74387480, "author": "Enve", "author_id": 1354378, "author_profile": "https://Stackoverflow.com/users/1354378", "pm_score": 2, "selected": false, "text": "useContext createContext() import { Mycontext } from './context/Context';\n\nconst [post, setPost] = useContext(Myconte...
2022/11/10
[ "https://Stackoverflow.com/questions/74387347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20181776/" ]
74,387,351
<p>The problem give an array of integers 'nums' and an integer 'target', return indices of the two numbers such that they add up to target.</p> <p>Example:</p> <pre><code>Input: nums = [2,7,11,15], target = 9 Output: [0,1] Explanation: Because nums[0] + nums[1] == 9, we return [0, 1]. </code></pre> <pre><code>class Sol...
[ { "answer_id": 74387480, "author": "Enve", "author_id": 1354378, "author_profile": "https://Stackoverflow.com/users/1354378", "pm_score": 2, "selected": false, "text": "useContext createContext() import { Mycontext } from './context/Context';\n\nconst [post, setPost] = useContext(Myconte...
2022/11/10
[ "https://Stackoverflow.com/questions/74387351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20264067/" ]
74,387,353
<p>I need help with passing the variable I have initialized using <code>__construct()</code> to view in Laravel.</p> <p>Here is my controller code</p> <pre><code>protected $profileInfo; public function __construct(){ $this-&gt;profileInfo = Profile::with('address')-&gt;where('id', '=', '1')-&gt;get(); } public func...
[ { "answer_id": 74387408, "author": "Gert B.", "author_id": 2911020, "author_profile": "https://Stackoverflow.com/users/2911020", "pm_score": 3, "selected": true, "text": "compact() protected $profileInfo;\n\npublic function __construct(){\n $this->profileInfo = Profile::with('address')...
2022/11/10
[ "https://Stackoverflow.com/questions/74387353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9999993/" ]
74,387,360
<p>I would like to read a csv file in streaming Dataflow job and map each row into dict <code>{&quot;column1&quot;: &quot;value&quot;1}</code> and upload it into BQ. As an entry point I am using <code>ReadAllFromText</code> so it returns just row by row, where first row is a header. How can I map row[0] (header) to all...
[ { "answer_id": 74387408, "author": "Gert B.", "author_id": 2911020, "author_profile": "https://Stackoverflow.com/users/2911020", "pm_score": 3, "selected": true, "text": "compact() protected $profileInfo;\n\npublic function __construct(){\n $this->profileInfo = Profile::with('address')...
2022/11/10
[ "https://Stackoverflow.com/questions/74387360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12135668/" ]
74,387,368
<p>There's the following trait:</p> <pre><code>Trait Example{ val foo : String } </code></pre> <p>Then from another class that uses Example I set foo = &quot;bar&quot;. Is there an easy way to for example do print(foo) or execute some other function when this value is set? Without having to touch the assignation p...
[ { "answer_id": 74387408, "author": "Gert B.", "author_id": 2911020, "author_profile": "https://Stackoverflow.com/users/2911020", "pm_score": 3, "selected": true, "text": "compact() protected $profileInfo;\n\npublic function __construct(){\n $this->profileInfo = Profile::with('address')...
2022/11/10
[ "https://Stackoverflow.com/questions/74387368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15107211/" ]
74,387,376
<p>I'm not at ease with comprehension dictionaries I would like to transform this loop into a dictionary comprehension.</p> <p>Thanks for your help</p> <pre><code>dico={} for key in ['good','very good','bad','very bad','not good not bad']: if key in['good','very good']: dico[key]='green' else: dico[key]='re...
[ { "answer_id": 74387408, "author": "Gert B.", "author_id": 2911020, "author_profile": "https://Stackoverflow.com/users/2911020", "pm_score": 3, "selected": true, "text": "compact() protected $profileInfo;\n\npublic function __construct(){\n $this->profileInfo = Profile::with('address')...
2022/11/10
[ "https://Stackoverflow.com/questions/74387376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20467264/" ]
74,387,389
<p>I created an event listener to catch when a physical button is pressed, and it works well. But I would want to update a <code>list</code> used in a <code>LazyColumn</code></p> <pre><code>class MainActivity : ComponentActivity() { @OptIn(ExperimentalComposeUiApi::class) override fun onCreate(savedInstanceState:...
[ { "answer_id": 74387645, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 3, "selected": true, "text": "SnapshotStateList var myList: List<String> = mutableListOf()\n var myList = mutableStateListOf(\"Item1\")\n SnapshotSta...
2022/11/10
[ "https://Stackoverflow.com/questions/74387389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19014213/" ]
74,387,391
<p>It is possible to configure functions as strings to parse them to functions during runtime.</p> <p>The following example <code>functionAsString</code> expects input and deals with it, I only know that it MUST return a boolean ( I'm expecting that )</p> <p><div class="snippet" data-lang="js" data-hide="false" data-co...
[ { "answer_id": 74387645, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 3, "selected": true, "text": "SnapshotStateList var myList: List<String> = mutableListOf()\n var myList = mutableStateListOf(\"Item1\")\n SnapshotSta...
2022/11/10
[ "https://Stackoverflow.com/questions/74387391", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19698303/" ]
74,387,443
<p>I have multiple components with different paths (routes) and would like to export those to a single Main router component.</p> <p>For example:</p> <p>routeComponent1.js</p> <pre><code>export default function childRoutes() { return ( &lt;div&gt; &lt;Route path=&quot;/foo&quot; component={foo} /&gt; ...
[ { "answer_id": 74387645, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 3, "selected": true, "text": "SnapshotStateList var myList: List<String> = mutableListOf()\n var myList = mutableStateListOf(\"Item1\")\n SnapshotSta...
2022/11/10
[ "https://Stackoverflow.com/questions/74387443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8568484/" ]
74,387,445
<p>I have a</p> <pre><code>Map&lt;String,List&lt;User&gt;&gt;map = new HashMap&lt;&gt;(); map.put(&quot;projectA&quot;,Arrays.asList(new User(1,&quot;Bob&quot;),new User(2,&quot;John&quot;),new User(3,&quot;Mo&quot;))); map.put(&quot;projectB&quot;,Arrays.asList(new User(2,&quot;John&quot;),new User(3,&quot;Mo&quot;)))...
[ { "answer_id": 74387617, "author": "f1sh", "author_id": 214525, "author_profile": "https://Stackoverflow.com/users/214525", "pm_score": 1, "selected": false, "text": "public static void main(String[] args) {\n Map<String, List<User>> map = new HashMap<>();\n map.put(\"projectA\", Array...
2022/11/10
[ "https://Stackoverflow.com/questions/74387445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12648740/" ]
74,387,450
<p>I have checked all the existing questions on Stackoverflow but I couldn't find the perfect answer to it and need your help.</p> <p>So basically I have multiple Strings containing different formats of URL in different ways, for eg:-</p> <p>1:</p> <p><code>&lt;p&gt;&lt;a href='https://abcd.com/sites/WG-ProductManageme...
[ { "answer_id": 74387617, "author": "f1sh", "author_id": 214525, "author_profile": "https://Stackoverflow.com/users/214525", "pm_score": 1, "selected": false, "text": "public static void main(String[] args) {\n Map<String, List<User>> map = new HashMap<>();\n map.put(\"projectA\", Array...
2022/11/10
[ "https://Stackoverflow.com/questions/74387450", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13341552/" ]
74,387,548
<p>In a custom class I have the following code:</p> <pre><code>class CustomClass(): triggerQueue: multiprocessing.Queue def __init__(self): self.triggerQueue = multiprocessing.Queue() def poolFunc(queueString): print(queueString) def listenerFunc(self): ...
[ { "answer_id": 74388656, "author": "Viktor Katzy", "author_id": 11067145, "author_profile": "https://Stackoverflow.com/users/11067145", "pm_score": 0, "selected": false, "text": "@staticmethod\ndef poolFunc(queueString):\n \n print(queueString)\n" }, { "answer_id": 74388935...
2022/11/10
[ "https://Stackoverflow.com/questions/74387548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11067145/" ]
74,387,566
<p>Lets take this for Example:</p> <pre><code>public class Vehicle { public enum Car { CAR1, CAR2, CAR3, CAR4, } public enum BIKE { BIKE1, BIKE2, BIKE3 } } public class Main { public static void main(String args[]) { Vehicle.Car value1 = Vehicle....
[ { "answer_id": 74388656, "author": "Viktor Katzy", "author_id": 11067145, "author_profile": "https://Stackoverflow.com/users/11067145", "pm_score": 0, "selected": false, "text": "@staticmethod\ndef poolFunc(queueString):\n \n print(queueString)\n" }, { "answer_id": 74388935...
2022/11/10
[ "https://Stackoverflow.com/questions/74387566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10885530/" ]
74,387,625
<p>I'm trying to write a notification system between a server and multiple clients using gRPC server streaming in protobuf-net.grpc (.NET Framework 4.8).</p> <p>I based my service off of <a href="https://github.com/protobuf-net/protobuf-net.Grpc/blob/main/examples/wcf-port/SimpleStockTicker/src/TraderSys.SimpleStockTic...
[ { "answer_id": 74391602, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": true, "text": "SubscribeAsync context.CancellationToken" }, { "answer_id": 74418660, "author": "4b0", "author_id": ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2727133/" ]
74,387,643
<p>I have a string <code>s:4:&quot;Test&quot;;</code> from my <a href="https://stackoverflow.com/questions/74386133/how-to-decrypt-from-bash-string-that-was-encrypted-by-laravel">previous question</a>. How I can unserialize it and get just a <code>Test</code> string?</p>
[ { "answer_id": 74387836, "author": "sinica", "author_id": 8063455, "author_profile": "https://Stackoverflow.com/users/8063455", "pm_score": 0, "selected": false, "text": "echo 's:4:\"Test\";' | sed -e 's/.*\"\\(.*\\)\".*/\\1/'\n" }, { "answer_id": 74388494, "author": "user193...
2022/11/10
[ "https://Stackoverflow.com/questions/74387643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8063455/" ]
74,387,658
<p>Before switching on angular I worked in <code>javascript</code>. I want to change value of <code>css </code>properties of certain elements in typescript. But I found that you can not change it like in <code>javascript</code>: <code>name.style.color='red'</code>.</p> <p>With <code>javascript </code>I would write: HTM...
[ { "answer_id": 74387836, "author": "sinica", "author_id": 8063455, "author_profile": "https://Stackoverflow.com/users/8063455", "pm_score": 0, "selected": false, "text": "echo 's:4:\"Test\";' | sed -e 's/.*\"\\(.*\\)\".*/\\1/'\n" }, { "answer_id": 74388494, "author": "user193...
2022/11/10
[ "https://Stackoverflow.com/questions/74387658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20453677/" ]
74,387,662
<p>Hi stackoverflow community,</p> <p>I need some help pls,</p> <p>I have a GraphQL data source, I'm using apollo client to pull those data. I am currently working on my login function; I am using next-auth credential provider: [Edited code below with the fetch call to graphql ]</p> <pre><code>import NextAuth from &quo...
[ { "answer_id": 74393130, "author": "Michel Floyd", "author_id": 2805154, "author_profile": "https://Stackoverflow.com/users/2805154", "pm_score": 1, "selected": false, "text": "GetUser useQuery client.query client useQuery" }, { "answer_id": 74415649, "author": "Carl Nierves"...
2022/11/10
[ "https://Stackoverflow.com/questions/74387662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7986254/" ]
74,387,689
<pre><code>id city 1 London 2 Rome 3 London 4 Rome </code></pre> <p>Expected output like this:</p> <pre><code>London Rome 2 2 </code></pre> <p>Using case expression...</p> <p>How can I solve this query?</p>
[ { "answer_id": 74387999, "author": "Littlefoot", "author_id": 9097906, "author_profile": "https://Stackoverflow.com/users/9097906", "pm_score": 2, "selected": false, "text": "group by having SQL> with test (id, city) as\n 2 (select 1, 'London' from dual union all\n 3 select 2, '...
2022/11/10
[ "https://Stackoverflow.com/questions/74387689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20407795/" ]
74,387,690
<p>I have an antd Form on which i checked if entered date is past date then i show the Popup with antd PopConfirm and if user press 'Yes' in PopConfirm, i want to submit the form, how can i achieve this?</p> <p>Below is my code :</p> <pre><code>&lt;PopConfirm onConfirm={() =&gt; { ...
[ { "answer_id": 74387999, "author": "Littlefoot", "author_id": 9097906, "author_profile": "https://Stackoverflow.com/users/9097906", "pm_score": 2, "selected": false, "text": "group by having SQL> with test (id, city) as\n 2 (select 1, 'London' from dual union all\n 3 select 2, '...
2022/11/10
[ "https://Stackoverflow.com/questions/74387690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18306625/" ]
74,387,691
<pre><code>df1 = pd.DataFrame({'Region': ['E', 'E', 'U', 'E'], 'Id': [1,None,None,None], 'Ids': [1,2,3,4]}) df2 = pd.DataFrame({'Region': ['E', 'U', 'U', 'E'], 'Id': [1,2,3,4], 'Ids': [1,2,3,4]}) x = df1.groupby(['Region']).count() y = df2.groupby(['Region']).count() c = pd.concat([x['Id'], y['Id']], axis=1, keys=['H...
[ { "answer_id": 74387999, "author": "Littlefoot", "author_id": 9097906, "author_profile": "https://Stackoverflow.com/users/9097906", "pm_score": 2, "selected": false, "text": "group by having SQL> with test (id, city) as\n 2 (select 1, 'London' from dual union all\n 3 select 2, '...
2022/11/10
[ "https://Stackoverflow.com/questions/74387691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20467492/" ]
74,387,711
<p>I have some components that I create using createComponent. While some components work correctly some don't have proper css classes. I'm using a function and [ngClass] to set the classes but they just aren't there when I inspect the component in dom.</p> <pre><code>constructor (private injector: EnvironmentInjector)...
[ { "answer_id": 74387999, "author": "Littlefoot", "author_id": 9097906, "author_profile": "https://Stackoverflow.com/users/9097906", "pm_score": 2, "selected": false, "text": "group by having SQL> with test (id, city) as\n 2 (select 1, 'London' from dual union all\n 3 select 2, '...
2022/11/10
[ "https://Stackoverflow.com/questions/74387711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20173895/" ]
74,387,766
<p>I'm new with Hololens 2 programming. I'm developing an UWP app with Unity for Holo2 that use an XML configuration file to receive informations about the placing of 3D objects in relative position with the marker. It works fine when I try to read and process the file from Resources folder (Unity and Hololens) and fro...
[ { "answer_id": 74394293, "author": "Paulo Morgado", "author_id": 402366, "author_profile": "https://Stackoverflow.com/users/402366", "pm_score": 1, "selected": false, "text": "Task Task Action private async Task<Stream> openFileUWP(string folderName, string filename)\n{\n var folder =...
2022/11/10
[ "https://Stackoverflow.com/questions/74387766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20467378/" ]
74,387,802
<p>I have two global variables. the first variable is assigned inside the second variable.When I update the first variable the second one is not getting updated.</p> <pre><code> String value = &quot;abcd&quot;; String value1 = &quot;$value efgh&quot;; void main() { print(value); print(value1...
[ { "answer_id": 74390017, "author": "TheHumanItSelf", "author_id": 11938374, "author_profile": "https://Stackoverflow.com/users/11938374", "pm_score": 2, "selected": false, "text": "value1 void main() {\n print(value);\n print(value1);\n value = \"Zxy\";\n value1 = \"$value efgh\"; //...
2022/11/10
[ "https://Stackoverflow.com/questions/74387802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18906883/" ]
74,387,809
<p>I have an issue with the error handling in VBA. The code has previously worked, but now suddenly errors are not handled by <code>On Error GoTo</code> statements and instead the code is crashing and giving a pop up with the error message as if <code>On Error GoTo 0</code> would be active.</p> <p>Here is an example of...
[ { "answer_id": 74389023, "author": "GWD", "author_id": 12287457, "author_profile": "https://Stackoverflow.com/users/12287457", "pm_score": 0, "selected": false, "text": "Err.Clear Resume On Error GoTo 0 Err.Clear On Error GoTo -1 On Error GoTo logError\n\nFor d = 0 To Doclist.Count -1\n ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15752997/" ]
74,387,831
<p>I am getting this error while running the code in React Native expo with Tailwind</p> <p><code>Android Bundling failed 25ms</code> <code>error:</code> <code>node_modules\expo\AppEntry.js: [BABEL]: Cannot find module 'node:path'</code> <code>Require stack:</code> <code>C:\Users\HPX\ipx\node_modules\nativewind\dist\ba...
[ { "answer_id": 74389023, "author": "GWD", "author_id": 12287457, "author_profile": "https://Stackoverflow.com/users/12287457", "pm_score": 0, "selected": false, "text": "Err.Clear Resume On Error GoTo 0 Err.Clear On Error GoTo -1 On Error GoTo logError\n\nFor d = 0 To Doclist.Count -1\n ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19146029/" ]
74,387,861
<p>I have a <strong>dataframe</strong>. I want it to filter it and reduce certain values to a string. The dataframe looks like this</p> <p><a href="https://i.stack.imgur.com/slHX6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/slHX6.png" alt="Dataframeimage" /></a></p> <p><strong>Code:</strong></p> ...
[ { "answer_id": 74387956, "author": "jezrael", "author_id": 2901002, "author_profile": "https://Stackoverflow.com/users/2901002", "pm_score": 3, "selected": true, "text": "crosstab DataFrame.reindex df = pd.crosstab(df['Number'], df['Level']).astype(str).reindex(df['Number'].unique())\ns ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20089685/" ]
74,387,879
<p>I hope this question is simple enough to not warrant a reproducible example.</p> <p>I have the following syntax:</p> <pre><code>library(data.table) setDT(table_selection)[, (vars_of_interest) := lapply(.SD, sqrt, na.rm=TRUE), by = year, .SDcols=sds_of_interest] </code></pre> <p>I would like to square a sequence of c...
[ { "answer_id": 74387956, "author": "jezrael", "author_id": 2901002, "author_profile": "https://Stackoverflow.com/users/2901002", "pm_score": 3, "selected": true, "text": "crosstab DataFrame.reindex df = pd.crosstab(df['Number'], df['Level']).astype(str).reindex(df['Number'].unique())\ns ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8071608/" ]
74,387,963
<p>I want to insert multiple tuples into a set which each tuple contains a <code>list</code> and a <code>string</code>.<br /> Each tuple looks like:</p> <pre><code>sample_tuple = (['list of elements'], 'one_string') </code></pre> <p>If we check the type of <code>sample_tuple</code>, we can be sure that it is a <code>tu...
[ { "answer_id": 74387956, "author": "jezrael", "author_id": 2901002, "author_profile": "https://Stackoverflow.com/users/2901002", "pm_score": 3, "selected": true, "text": "crosstab DataFrame.reindex df = pd.crosstab(df['Number'], df['Level']).astype(str).reindex(df['Number'].unique())\ns ...
2022/11/10
[ "https://Stackoverflow.com/questions/74387963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8496414/" ]
74,388,015
<p>The code below initializes a list of random integers, and iterates over it. Given a <code>subset_size</code>, at every iteration <code>i</code>, a sublist of <code>i: i + subset_size</code> is accessed. The time to access the sublist grows with <code>subset_size</code>. For <code>n = 100000</code> and <code>subset_s...
[ { "answer_id": 74388151, "author": "hgrey", "author_id": 1327386, "author_profile": "https://Stackoverflow.com/users/1327386", "pm_score": -1, "selected": false, "text": "itertools.islice islice(x, i, i + subset_size)" }, { "answer_id": 74388247, "author": "Abdul Niyas P M", ...
2022/11/10
[ "https://Stackoverflow.com/questions/74388015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20280771/" ]
74,388,032
<p>I'd like to merge two DataFrams that contains two common columns. They have the same number of row and I know the order in both columns is the same, so they are already aligned. My problem is that, after they've merged I'm left with more rows than I originally had.</p> <p>Is there a way to merge these two DataFrames...
[ { "answer_id": 74388068, "author": "Carmoreno", "author_id": 4508767, "author_profile": "https://Stackoverflow.com/users/4508767", "pm_score": 2, "selected": false, "text": "pd.concat merge pd.concat([df1, df2['unique_df2_val']], axis=1)\n col1 col2 unique_df1_val unique_df2_v...
2022/11/10
[ "https://Stackoverflow.com/questions/74388032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19887308/" ]
74,388,038
<p>I used sticky as the navbar's position. it worked all the way until it hit the end of the about section.</p> <p>I want the navbar to move with the scroll all the way until it reaches the top where it then becomes fixed throughout the remainder of the website.</p> <p>I have an up-to-date version of chrome (107.0.5304...
[ { "answer_id": 74388612, "author": "Zeynep Evecen", "author_id": 13856050, "author_profile": "https://Stackoverflow.com/users/13856050", "pm_score": 0, "selected": false, "text": "class=\"black_background\" class=\"traditional_section\"" }, { "answer_id": 74400903, "author": ...
2022/11/10
[ "https://Stackoverflow.com/questions/74388038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20002701/" ]
74,388,040
<pre><code>I have such an issue running TwinCat3 with 2 PLCs - it starts time to time in CONFIG mode. The OS is Win7 SP1 TC3 is in version 3.1.4022.16 but we also I've that with the same result on 3.1.4024.35 on 3 different machines. In logs I have errors as below : Port_852 11/10/2022 10:01:59 AM 816 ms PLC: ...
[ { "answer_id": 74388612, "author": "Zeynep Evecen", "author_id": 13856050, "author_profile": "https://Stackoverflow.com/users/13856050", "pm_score": 0, "selected": false, "text": "class=\"black_background\" class=\"traditional_section\"" }, { "answer_id": 74400903, "author": ...
2022/11/10
[ "https://Stackoverflow.com/questions/74388040", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20467650/" ]
74,388,072
<p>I'm try to sum columns(F2:F) in multiple sheets.</p> <p>Here's my current formula.</p> <p><code>=ARRAYFORMULA(IF(ISBLANK($A$2:$A), ,QUERY({PROPER(FLATTEN(Romar!$B$2:$B, Angelo!$B$2:$B, Ayyan!$B$2:$B, Edwin!$B$2:$B)), FLATTEN(Romar!$F$2:$F, Angelo!$F$2:$F, Ayyan!$F$2:$F, Edwin!$F$2:$F)}, &quot;SELECT SUM(Col2) WHERE...
[ { "answer_id": 74396821, "author": "player0", "author_id": 5632629, "author_profile": "https://Stackoverflow.com/users/5632629", "pm_score": 3, "selected": true, "text": "=BYROW(A2:A, LAMBDA(x, IF(ISBLANK(x),, IFERROR(\n SUM(FILTER({Romar!F:F; Angelo!F:F; Ayyan!F:F; Edwin!F:F}, \n ...
2022/11/10
[ "https://Stackoverflow.com/questions/74388072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19664060/" ]
74,388,085
<p>I've this:</p> <pre><code>&quot;example: myresult&quot; </code></pre> <p>And I need a method that looks for this from &quot;: &quot;</p> <pre><code>&quot;myresult&quot; </code></pre> <p>I tried with String.search()</p>
[ { "answer_id": 74388135, "author": "Naveen", "author_id": 16260451, "author_profile": "https://Stackoverflow.com/users/16260451", "pm_score": 1, "selected": true, "text": "function getSecondPart(str) {\n return str.split(':')[1];\n}\n" }, { "answer_id": 74388142, "author":...
2022/11/10
[ "https://Stackoverflow.com/questions/74388085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20439814/" ]
74,388,091
<p>I wrote a class like which has 3 hidden attributres:</p> <pre><code>class Car(): def __init__(self, name, model, brand): self.__name = name self.__model = model self.__brand = brand </code></pre> <p>Is that possible to create a method for this class to set a new attribute (publisher)? I w...
[ { "answer_id": 74388164, "author": "Cuartero", "author_id": 17901307, "author_profile": "https://Stackoverflow.com/users/17901307", "pm_score": -1, "selected": false, "text": "setattr \nclass Car:\n def __init__(self, name, model, brand):\n self.__name = name\n self.__mo...
2022/11/10
[ "https://Stackoverflow.com/questions/74388091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16356219/" ]
74,388,107
<p>currently the logs in the folder “/engine-rocksdb/journals” are running full (WAL logs).</p> <p>When does ArangoDB do a cleaning run of these logs and delete them automatically and how to trigger this cleaning run earlier? My ArangoDB 3.10 runs in single mode and in a virtual environment (cloud with a network storag...
[ { "answer_id": 74482688, "author": "stj", "author_id": 3042070, "author_profile": "https://Stackoverflow.com/users/3042070", "pm_score": 2, "selected": false, "text": "--rocksdb.wal-file-timeout-initial count() count() --rocksdb.wal-archive-size-limit" } ]
2022/11/10
[ "https://Stackoverflow.com/questions/74388107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13737521/" ]
74,388,162
<p>I have created this views but I can't get it to work in my database. Does this look alright? I have to provide this views see below. All flight reservations made by John Smith including, for those flights that have flown, the duration of the flight.</p> <pre><code>CREATE VIEW ViewA AS SELECT F.FlightID, (F.ArrivalTi...
[ { "answer_id": 74388281, "author": "Littlefoot", "author_id": 9097906, "author_profile": "https://Stackoverflow.com/users/9097906", "pm_score": 2, "selected": false, "text": "CREATE OR REPLACE VIEW viewa\nAS\n SELECT f.flightid, (f.arrivaltime - f.departtime) AS flightduration\n FR...
2022/11/10
[ "https://Stackoverflow.com/questions/74388162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20462352/" ]
74,388,203
<p>I have been writing a <code>is_palindrome(int num)</code> function which takes an integer and return true or false. I got the idea of reversing the integer and then check it with the original. To do that I need an extra <code>reverse()</code> function. But I want to know if there is a way of checking the palindrome ...
[ { "answer_id": 74388408, "author": "BambooleanLogic", "author_id": 1701776, "author_profile": "https://Stackoverflow.com/users/1701776", "pm_score": 2, "selected": true, "text": "function is_palindrome(i) {\n if (i is a single-digit number) return true\n x = first digit of i\n y = las...
2022/11/10
[ "https://Stackoverflow.com/questions/74388203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12741290/" ]
74,388,224
<p>I do not want the modal to be closed when reset is clicked. It should just reset the inner form. But my code is closing the modal.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-over...
[ { "answer_id": 74388408, "author": "BambooleanLogic", "author_id": 1701776, "author_profile": "https://Stackoverflow.com/users/1701776", "pm_score": 2, "selected": true, "text": "function is_palindrome(i) {\n if (i is a single-digit number) return true\n x = first digit of i\n y = las...
2022/11/10
[ "https://Stackoverflow.com/questions/74388224", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5549354/" ]
74,388,347
<p>I have a dropdown list with values and i am getting this error message when trying to select the values (cannot share the link because it is hidden):</p> <pre><code>Element: [[[[ChromeDriver: chrome on WINDOWS (4aeb1bf64ec7a13956b6b0b2cf24d9ca)] -&gt; xpath: //*[@id=&quot;Datatable_ReceiptListModel&quot;]/tbody/tr[3...
[ { "answer_id": 74388408, "author": "BambooleanLogic", "author_id": 1701776, "author_profile": "https://Stackoverflow.com/users/1701776", "pm_score": 2, "selected": true, "text": "function is_palindrome(i) {\n if (i is a single-digit number) return true\n x = first digit of i\n y = las...
2022/11/10
[ "https://Stackoverflow.com/questions/74388347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14012751/" ]
74,388,350
<p>I am trying to count the number of populated rows in Excel, but excluding the first row as this is used as a header. ie. I want to start counting from the second row.</p> <p>The following works to count populated rows, including the first row:</p> <pre><code>=COUNTIF(Books!A:A, &quot;&lt;&gt;&quot;) </code></pre> <p...
[ { "answer_id": 74388496, "author": "Toby_Stoe", "author_id": 19735003, "author_profile": "https://Stackoverflow.com/users/19735003", "pm_score": 2, "selected": true, "text": "=COUNTIF(Books!A2:A1048576;\"<>\")\n =COUNTIF(Books!A:A, \"<>\")-1\n" }, { "answer_id": 74388543, "au...
2022/11/10
[ "https://Stackoverflow.com/questions/74388350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2862135/" ]
74,388,353
<p>I've deleted CRA and configured webpack/babel on my own. Now I have problems with dynamic imports.</p> <p><a href="https://i.stack.imgur.com/CRAWr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CRAWr.png" alt="error" /></a></p> <p>This works fine:</p> <pre><code>import(&quot;./&quot; + &quot;Clou...
[ { "answer_id": 74388496, "author": "Toby_Stoe", "author_id": 19735003, "author_profile": "https://Stackoverflow.com/users/19735003", "pm_score": 2, "selected": true, "text": "=COUNTIF(Books!A2:A1048576;\"<>\")\n =COUNTIF(Books!A:A, \"<>\")-1\n" }, { "answer_id": 74388543, "au...
2022/11/10
[ "https://Stackoverflow.com/questions/74388353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14313523/" ]
74,388,382
<p>I am running several calculations and ML algorithms in R and store their results in four distinctive tables. For each calculation, I obtain four tables, which I store in a single list. According to R, all of my lists are labelled as &quot;Large List (4 elements, 971.2 kB)&quot; in the upper right quadrant in RStudio...
[ { "answer_id": 74391627, "author": "user2554330", "author_id": 2554330, "author_profile": "https://Stackoverflow.com/users/2554330", "pm_score": 2, "selected": false, "text": "F <- function () {\n X <- rnorm(1000000)\n Y ~ z\n}\n" } ]
2022/11/10
[ "https://Stackoverflow.com/questions/74388382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10695249/" ]
74,388,423
<p>I feel like I have a super easy question but for the life of me I can't find it when googling or searching here (or I don't know the correct terms to find a solution) so here goes.</p> <p>I have a large amount of text in R in which I want to identify all numbers/digits, and add a specific number to them, for example...
[ { "answer_id": 74388736, "author": "AndS.", "author_id": 9778513, "author_profile": "https://Stackoverflow.com/users/9778513", "pm_score": 1, "selected": false, "text": "gsubfn text1 <- c(\"Hi. It is 6am. I want to leave at 7am\")\ntext2 <- c(\"It is 9am. I want to leave at 10am, but the...
2022/11/10
[ "https://Stackoverflow.com/questions/74388423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20467805/" ]
74,388,436
<p>I have got a object called curNode like this</p> <pre><code>{ &quot;name&quot;: &quot;CAMPAIGN&quot;, &quot;attributes&quot;: {}, &quot;children&quot;: [] } </code></pre> <p>I am trying to push to the object as shown below</p> <pre><code>curNode!.children!.push({ name: newNodeName, childr...
[ { "answer_id": 74388736, "author": "AndS.", "author_id": 9778513, "author_profile": "https://Stackoverflow.com/users/9778513", "pm_score": 1, "selected": false, "text": "gsubfn text1 <- c(\"Hi. It is 6am. I want to leave at 7am\")\ntext2 <- c(\"It is 9am. I want to leave at 10am, but the...
2022/11/10
[ "https://Stackoverflow.com/questions/74388436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9932078/" ]
74,388,445
<p>I am using Zivid.NET, Halcon.NET and ML.NET together. Zivid provides me with a 3D byte array (row, column, channel), Halcon uses <code>HImages</code>/<code>HObjects</code>, ML.NET functionality expects a 1D byte array (same as <code>File.ReadAllBytes()</code>)</p> <p>So far I used a workaround where:</p> <ol> <li>I ...
[ { "answer_id": 74390827, "author": "Vladimir Perković", "author_id": 482036, "author_profile": "https://Stackoverflow.com/users/482036", "pm_score": 1, "selected": false, "text": "public HImage(string type, int width, int height, IntPtr pixelPointer)\n IntPtr HImage.GetImagePointer1(out ...
2022/11/10
[ "https://Stackoverflow.com/questions/74388445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15335754/" ]
74,388,462
<p>I am binding to an appsettings config section in my host build using the following:-</p> <pre><code>services.Configure&lt;MySettings1&gt;(hostContext.Configuration.GetSection(&quot;TheSection&quot;)); </code></pre> <p>I only want to bind one section, but the actual type I want to bind to is dependent on a string var...
[ { "answer_id": 74390827, "author": "Vladimir Perković", "author_id": 482036, "author_profile": "https://Stackoverflow.com/users/482036", "pm_score": 1, "selected": false, "text": "public HImage(string type, int width, int height, IntPtr pixelPointer)\n IntPtr HImage.GetImagePointer1(out ...
2022/11/10
[ "https://Stackoverflow.com/questions/74388462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11786379/" ]
74,388,493
<p>I'm very new to React and web development as a whole, and I know the code is styled terribly but bear with me please.</p> <p>I'm attempting to get weather data with openweathermap API, which I have to use latitude and longitude for my desired location, which I am supposed to get from their separate geocoding API whe...
[ { "answer_id": 74390827, "author": "Vladimir Perković", "author_id": 482036, "author_profile": "https://Stackoverflow.com/users/482036", "pm_score": 1, "selected": false, "text": "public HImage(string type, int width, int height, IntPtr pixelPointer)\n IntPtr HImage.GetImagePointer1(out ...
2022/11/10
[ "https://Stackoverflow.com/questions/74388493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19243784/" ]
74,388,503
<p>I am making an ajax get request to my laravel backend, the response (json response) includes array of products, in the ajax success function I am looping over the products array to render them in my html elements.</p> <p>here is my controller response from laravel backend :</p> <pre><code>return response()-&gt;json(...
[ { "answer_id": 74388660, "author": "AdBess", "author_id": 16554748, "author_profile": "https://Stackoverflow.com/users/16554748", "pm_score": 0, "selected": false, "text": "var products = await request.json();\nindex=0;\nfor(product in products)\n{\n // depends on your json response\n...
2022/11/10
[ "https://Stackoverflow.com/questions/74388503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15446553/" ]
74,388,522
<p>I was trying to compare c and cython runtime and decide on which one should I choose for my project. So I tested a simple calculation with both. but I couldn't find any good answer to how to measure cython execute time to compare with c:</p> <p>C :</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;time.h&gt; int...
[ { "answer_id": 74388632, "author": "amirhm", "author_id": 4529589, "author_profile": "https://Stackoverflow.com/users/4529589", "pm_score": 2, "selected": true, "text": "loopcount * (arr[0] + arr[2])" }, { "answer_id": 74388688, "author": "0___________", "author_id": 6110...
2022/11/10
[ "https://Stackoverflow.com/questions/74388522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3901715/" ]
74,388,549
<p>I wanted to delete all records except the one with the highest value so I did</p> <pre><code>CREATE TABLE code ( id SERIAL, name VARCHAR(255) NOT NULL , value int NOT NULL ); INSERT INTO code (name,value) VALUES ('name',1); INSERT INTO code (name,value) VALUES ('name',2); INSERT INTO code (name,value) VALUES...
[ { "answer_id": 74388632, "author": "amirhm", "author_id": 4529589, "author_profile": "https://Stackoverflow.com/users/4529589", "pm_score": 2, "selected": true, "text": "loopcount * (arr[0] + arr[2])" }, { "answer_id": 74388688, "author": "0___________", "author_id": 6110...
2022/11/10
[ "https://Stackoverflow.com/questions/74388549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4452553/" ]
74,388,579
<p>I have a <code>test</code> collection with these two documents:</p> <pre><code>{ _id: ObjectId(&quot;636ce11889a00c51cac27779&quot;), sku: 'kw-lids-0009' } { _id: ObjectId(&quot;636ce14b89a00c51cac2777a&quot;), sku: 'kw-fs66-gre' } </code></pre> <p>I've created a search index with this definition:</p> <pre><code>{ ...
[ { "answer_id": 74388632, "author": "amirhm", "author_id": 4529589, "author_profile": "https://Stackoverflow.com/users/4529589", "pm_score": 2, "selected": true, "text": "loopcount * (arr[0] + arr[2])" }, { "answer_id": 74388688, "author": "0___________", "author_id": 6110...
2022/11/10
[ "https://Stackoverflow.com/questions/74388579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1098626/" ]
74,388,586
<p>everyone! First of all, thanks in advance.</p> <p>I've searched everywhere for a solution for my problem. Even when copying from the source code, it doesn't solve it.</p> <p>I'm doing the <a href="https://www.odoo.com/documentation/16.0/developer/howtos/rdtraining/B_acl_irrules.html#advanced-b-acl-and-record-rules" ...
[ { "answer_id": 74388632, "author": "amirhm", "author_id": 4529589, "author_profile": "https://Stackoverflow.com/users/4529589", "pm_score": 2, "selected": true, "text": "loopcount * (arr[0] + arr[2])" }, { "answer_id": 74388688, "author": "0___________", "author_id": 6110...
2022/11/10
[ "https://Stackoverflow.com/questions/74388586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7137219/" ]
74,388,588
<p>Let’s say I had two lists like this:</p> <pre><code>l1 = [‘a’,’b’,’c’,’d’,’e’,’f’,’g’,’h’] l2 = [True, True, True, False, False, True, False, True] </code></pre> <p>With Python, how could I iterate through these elements in order and group them in groups of 3 or 4 based on l2. So that the output would look like this...
[ { "answer_id": 74388632, "author": "amirhm", "author_id": 4529589, "author_profile": "https://Stackoverflow.com/users/4529589", "pm_score": 2, "selected": true, "text": "loopcount * (arr[0] + arr[2])" }, { "answer_id": 74388688, "author": "0___________", "author_id": 6110...
2022/11/10
[ "https://Stackoverflow.com/questions/74388588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7612063/" ]
74,388,601
<p>I have data like this:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Customer ID</th> <th>Name</th> <th>Type</th> <th>Last Submit</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Patricio</td> <td>C</td> <td>January 2022</td> </tr> <tr> <td>2</td> <td>Dale</td> <td>A</td> <td>June 2022<...
[ { "answer_id": 74388632, "author": "amirhm", "author_id": 4529589, "author_profile": "https://Stackoverflow.com/users/4529589", "pm_score": 2, "selected": true, "text": "loopcount * (arr[0] + arr[2])" }, { "answer_id": 74388688, "author": "0___________", "author_id": 6110...
2022/11/10
[ "https://Stackoverflow.com/questions/74388601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19305198/" ]
74,388,611
<p>I am using a static variables to get access between threads, but is taking so long to get their values.</p> <p>Context: I have a static class <code>Results.cs</code>, where I store the result variables of two running <code>Process.cs</code> instances.</p> <pre><code>public static int ResultsStation0 { get; set; } pu...
[ { "answer_id": 74388910, "author": "JonasH", "author_id": 12342238, "author_profile": "https://Stackoverflow.com/users/12342238", "pm_score": 4, "selected": true, "text": "var result1 = Task.Run(MyMethod1);\nvar result2 = Task.Run(MyMethod2);\nawait Task.WhenAll(new []{result1, result2})...
2022/11/10
[ "https://Stackoverflow.com/questions/74388611", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1238934/" ]
74,388,617
<p>Assuming I have the following text file:</p> <pre><code>a b c d 1 2 3 e f g h 1 2 3 i j k l 1 2 3 m n o p 1 2 3 </code></pre> <p>How do I replace '1 2 3' with '4 5 6' in the line that contains the letter (e) <strong>and</strong> move it after the line that contains the letter (k)?</p> <p>N.B. the line that contains ...
[ { "answer_id": 74388694, "author": "anubhava", "author_id": 548225, "author_profile": "https://Stackoverflow.com/users/548225", "pm_score": 0, "selected": false, "text": "awk awk '\n/(^| )e( |$)/ {\n sub(/1 2 3/, \"4 5 6\")\n p = $0\n next\n}\n1\n/(^| )k( |$)/ {\n print p\n p =...
2022/11/10
[ "https://Stackoverflow.com/questions/74388617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10347663/" ]
74,388,661
<p>how can i sort 2D mutable list of array by the first element of array?</p> <pre><code>val books = mutableListOf&lt;Any&gt;( listof(&quot;abc&quot;,&quot;b&quot;,1), listof(&quot;abb&quot;,&quot;y&quot;,2), listof(&quot;abcl&quot;.&quot;i&quot;,3) ) </code></pre> <p>i want to get sort this mutablelist by alphab...
[ { "answer_id": 74388694, "author": "anubhava", "author_id": 548225, "author_profile": "https://Stackoverflow.com/users/548225", "pm_score": 0, "selected": false, "text": "awk awk '\n/(^| )e( |$)/ {\n sub(/1 2 3/, \"4 5 6\")\n p = $0\n next\n}\n1\n/(^| )k( |$)/ {\n print p\n p =...
2022/11/10
[ "https://Stackoverflow.com/questions/74388661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20463529/" ]
74,388,681
<p>I have this array that has <code>length = 3</code>:</p> <pre class="lang-js prettyprint-override"><code> state = [&quot;q0&quot;, &quot;q1&quot;, &quot;q2,q3&quot;] </code></pre> <p>And I want to modify that, and I want it to look something like this:</p> <pre class="lang-js prettyprint-override"><code> state = [&qu...
[ { "answer_id": 74388784, "author": "David Thomas", "author_id": 82548, "author_profile": "https://Stackoverflow.com/users/82548", "pm_score": 0, "selected": false, "text": "// initial state, chained immediately to\n// Array.prototype.map() to create a new Array\n// based on the initial s...
2022/11/10
[ "https://Stackoverflow.com/questions/74388681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20183430/" ]
74,388,684
<p>I have an array with the following objects:</p> <p><code>const arrayData = [</code> <code>{name: 'John', car:'BMW', value1: 500, value2: 350},</code> <code>{name: 'Paul', car: 'AUDI', value1: 290, value2: 200},</code> <code>{name: 'John', car:'BMW', value1: 600, value2: 360},</code> <code>{name: 'John', car:'BMW'...
[ { "answer_id": 74388784, "author": "David Thomas", "author_id": 82548, "author_profile": "https://Stackoverflow.com/users/82548", "pm_score": 0, "selected": false, "text": "// initial state, chained immediately to\n// Array.prototype.map() to create a new Array\n// based on the initial s...
2022/11/10
[ "https://Stackoverflow.com/questions/74388684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20468121/" ]
74,388,687
<p>I want to iterate through a vector, and get a mutable reference to each item, and a mutable slice to the rest of the vector, so I can use both every iteration. Something like:</p> <p>e.g:</p> <pre><code>for index in 0..model.len() { let (item, rest): (&amp;mut Item, &amp;mut [Item]) = model.split_rest_mut(index)...
[ { "answer_id": 74388791, "author": "Thomas", "author_id": 14637, "author_profile": "https://Stackoverflow.com/users/14637", "pm_score": 1, "selected": false, "text": "Vec::split_at_mut fn split_rest_mut<T>(vec: &mut Vec<T>, mid: usize) -> (&mut T, &mut [T]) {\n let (left, right) = vec...
2022/11/10
[ "https://Stackoverflow.com/questions/74388687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3052832/" ]
74,388,706
<p>I'm using Laravel 8, but don't seem to know which controller controls the layout master blade file. I have been able to pass variables to the sub-view (Profile page) file successfully but don't know how to achieve that with the layout view master blade.</p> <p>I am trying to pass variables from a controller called <...
[ { "answer_id": 74388791, "author": "Thomas", "author_id": 14637, "author_profile": "https://Stackoverflow.com/users/14637", "pm_score": 1, "selected": false, "text": "Vec::split_at_mut fn split_rest_mut<T>(vec: &mut Vec<T>, mid: usize) -> (&mut T, &mut [T]) {\n let (left, right) = vec...
2022/11/10
[ "https://Stackoverflow.com/questions/74388706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9999993/" ]
74,388,723
<p>I want to merge two datasets on 'key1' and 'key2' columns so that in case of missing value, for example, in the 'key2' column, it would take all combinations of the second key that belong to the first key. Here is an example:</p> <pre><code> def merge_nan_as_any(mask, data, on, how) ... mask = pd.Da...
[ { "answer_id": 74388946, "author": "Celius Stingher", "author_id": 11897007, "author_profile": "https://Stackoverflow.com/users/11897007", "pm_score": 1, "selected": false, "text": "mask['key2'] = mask['key2'].fillna(' '.join([str(x) for x in data['key2'].unique()])).astype(str).str.spli...
2022/11/10
[ "https://Stackoverflow.com/questions/74388723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16895442/" ]