qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,644,462
<p>I have this simple array:</p> <pre><code>const arr = [ { &quot;id&quot;: 2, &quot;color&quot;: &quot;red&quot; }, { &quot;id&quot;: 1, &quot;color&quot;: &quot;blue&quot; }, { &quot;id&quot;: 2, &quot;color&quot;: &quot;yellow&quot; }, ]; </code></pre> <p>I want to create a hash m...
[ { "answer_id": 74644931, "author": "ACTS 238", "author_id": 18715651, "author_profile": "https://Stackoverflow.com/users/18715651", "pm_score": 0, "selected": false, "text": "function test(id, color) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]....
2022/12/01
[ "https://Stackoverflow.com/questions/74644462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3924832/" ]
74,644,490
<p>I don't quite get the definition and use case of an abstract machine and how its actually related to a compiler or interpreter</p> <p>I googled what abstract machines were but understood very little out of it.</p> <pre><code>An abstract machine is a model of a computer system (considered either as hardware or softwa...
[ { "answer_id": 74644931, "author": "ACTS 238", "author_id": 18715651, "author_profile": "https://Stackoverflow.com/users/18715651", "pm_score": 0, "selected": false, "text": "function test(id, color) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]....
2022/12/01
[ "https://Stackoverflow.com/questions/74644490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17544515/" ]
74,644,492
<pre class="lang-py prettyprint-override"><code>ANIMALS = (('dog','dog'), ('cat','cat')) class Owner(models.Model): animal = models.Charfield(choices=ANIMALS, max_length=10) </code></pre> <p>My problem is how I can do if I have both ?</p>
[ { "answer_id": 74644931, "author": "ACTS 238", "author_id": 18715651, "author_profile": "https://Stackoverflow.com/users/18715651", "pm_score": 0, "selected": false, "text": "function test(id, color) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]....
2022/12/01
[ "https://Stackoverflow.com/questions/74644492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9322470/" ]
74,644,499
<p>I'm trying to initialize a tuple (using <code>std::make_tuple</code>), and I want to store an std::type_info in it as well, but I don't know why for some reason this simple looking piece of code doesn't compile.</p> <p>I tried running the following code:-</p> <pre><code>#include &lt;iostream&gt; #include &lt;string&...
[ { "answer_id": 74645127, "author": "Marek R", "author_id": 1387438, "author_profile": "https://Stackoverflow.com/users/1387438", "pm_score": 2, "selected": false, "text": "std::type_info std::reference_wrapper int main()\n{\n std::tuple<std::reference_wrapper<const std::type_info>, in...
2022/12/01
[ "https://Stackoverflow.com/questions/74644499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13489126/" ]
74,644,553
<p>I'm using external API to make an SQL query for a user. As a result i get matching Entity but as a set of fields, lookin like this:</p> <pre><code>[ { IsNull: false, Name: 'Key', Value: '897', Values: null }, { IsNull: false, Name: 'FirstName', Value: 'User', Values: null }, { IsNull: false, Name: 'LastName', ...
[ { "answer_id": 74644877, "author": "Sean Anglim", "author_id": 17843144, "author_profile": "https://Stackoverflow.com/users/17843144", "pm_score": 2, "selected": true, "text": "let dataTransformed: {[key: string]: string | null} = {}\n\ndata.forEach(d => {\n dataTransformed[d.Name] = ...
2022/12/01
[ "https://Stackoverflow.com/questions/74644553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20657935/" ]
74,644,586
<p>I'm seeing multi-second pauses in the event stream, even reading from the retention pool.</p> <p>Here's the main nugget of EH setup:</p> <pre><code>BlobContainerClient storageClient = new BlobContainerClient(blobcon, BLOB_NAME); RTMTest.eventProcessor = new EventProcessorClient(storageClient, consumerGroup, ehubcon,...
[ { "answer_id": 74644877, "author": "Sean Anglim", "author_id": 17843144, "author_profile": "https://Stackoverflow.com/users/17843144", "pm_score": 2, "selected": true, "text": "let dataTransformed: {[key: string]: string | null} = {}\n\ndata.forEach(d => {\n dataTransformed[d.Name] = ...
2022/12/01
[ "https://Stackoverflow.com/questions/74644586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4884960/" ]
74,644,592
<p>I am creating a tool to automate some tasks. These tasks generate two DataFrames, but when concatenating them the columns are messed up as follows:</p> <pre><code> col2 col4 col3 col1 0 A 2 0 a 1 A 1 1 B 2 B 9 9 c 3 NaN 8 4 D 4 D 7 2 e 5 C ...
[ { "answer_id": 74644625, "author": "SomeDude", "author_id": 1410303, "author_profile": "https://Stackoverflow.com/users/1410303", "pm_score": 0, "selected": false, "text": "df = df[sorted(df.columns.tolist())].copy()\n" }, { "answer_id": 74644636, "author": "supersquires", ...
2022/12/01
[ "https://Stackoverflow.com/questions/74644592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17944590/" ]
74,644,603
<p>I am trying to fetch the price of a stock using <code>fetch</code> in my pure React App. When I try to fetch without options or configurations, using <code>fetch(url)</code>, this error comes:</p> <pre><code>Access to fetch at 'https://query1.finance.yahoo.com/v8/finance/chart/RCF.BO' from origin 'http://localhost:3...
[ { "answer_id": 74644625, "author": "SomeDude", "author_id": 1410303, "author_profile": "https://Stackoverflow.com/users/1410303", "pm_score": 0, "selected": false, "text": "df = df[sorted(df.columns.tolist())].copy()\n" }, { "answer_id": 74644636, "author": "supersquires", ...
2022/12/01
[ "https://Stackoverflow.com/questions/74644603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13037132/" ]
74,644,618
<p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator/return" rel="nofollow noreferrer">AsyncGenerator.prototype.return() - JavaScript | MDN</a> states:</p> <blockquote> <p>The <code>return()</code> method of an async generator acts as if a <code>return</code> state...
[ { "answer_id": 74670232, "author": "armful", "author_id": 20664163, "author_profile": "https://Stackoverflow.com/users/20664163", "pm_score": 2, "selected": false, "text": "values.return() yield return yield yield return yield AbortSignal const delay = (ms) => new Promise((resolve) => se...
2022/12/01
[ "https://Stackoverflow.com/questions/74644618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3255152/" ]
74,644,650
<p>In my app I have multiple forms where the result JSON object may vary in its structure and has nested objects and arrays in different levels. These forms also allow the user to upload files and the object stores and array with url to download, name, etc.</p> <p>What I do now is turn the file into base64 string, then...
[ { "answer_id": 74670232, "author": "armful", "author_id": 20664163, "author_profile": "https://Stackoverflow.com/users/20664163", "pm_score": 2, "selected": false, "text": "values.return() yield return yield yield return yield AbortSignal const delay = (ms) => new Promise((resolve) => se...
2022/12/01
[ "https://Stackoverflow.com/questions/74644650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13749429/" ]
74,644,651
<pre><code>df = pd.DataFrame({'c1':['Ax','Bx','Ay','By'], 'c2':[1,2,3,4]}) c1 c2 0 Ax 1 1 Bx 2 2 Ay 3 3 By 4 </code></pre> <p>I'd like to group <code>x</code>s and <code>y</code>s in <code>c1</code> and sum their respective <code>c2</code> values.</p> <p>Desired output:</p> <pre><code> c1 c2 0 Cx 3 1 ...
[ { "answer_id": 74644738, "author": "SomeDude", "author_id": 1410303, "author_profile": "https://Stackoverflow.com/users/1410303", "pm_score": 1, "selected": false, "text": "out = df.groupby(df.c1.str[-1]).sum().reset_index()\nout['c1'] = 'C' + out['c1']\n c1 c2\n0 Cx 3\n1 Cy 7\...
2022/12/01
[ "https://Stackoverflow.com/questions/74644651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2635863/" ]
74,644,660
<p>I have created a pbix file and parametrized the data source. Published the same to PowerBI Cloud and when I am trying to pass the datasource via a parameter concatenated to the URL, it does not seem to work.</p> <p><a href="https://app.powerbi.com/groups/xxxxxxxxxxxxxx/reports/yyyyyyyyy/ReportSection9f88b1fd1e14a6e9...
[ { "answer_id": 74644738, "author": "SomeDude", "author_id": 1410303, "author_profile": "https://Stackoverflow.com/users/1410303", "pm_score": 1, "selected": false, "text": "out = df.groupby(df.c1.str[-1]).sum().reset_index()\nout['c1'] = 'C' + out['c1']\n c1 c2\n0 Cx 3\n1 Cy 7\...
2022/12/01
[ "https://Stackoverflow.com/questions/74644660", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20622964/" ]
74,644,664
<p>I am new to stackOverflow and Reactjs, i had tried many other problem like them but they didn't help</p> <p>I aam trying to inert the form data from react to mongodb database using node and express. and i am using FETCH API to send my form data. but there are two errors in chrome console.</p> <p><strong>First error<...
[ { "answer_id": 74644738, "author": "SomeDude", "author_id": 1410303, "author_profile": "https://Stackoverflow.com/users/1410303", "pm_score": 1, "selected": false, "text": "out = df.groupby(df.c1.str[-1]).sum().reset_index()\nout['c1'] = 'C' + out['c1']\n c1 c2\n0 Cx 3\n1 Cy 7\...
2022/12/01
[ "https://Stackoverflow.com/questions/74644664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658000/" ]
74,644,678
<p>There are tons of questions here on this topic and I've read through most of them but I cannot get my head around this problem. I am trying to add arrays containing URLs of files to the result of an SQL query. In NodeJS it works perfectly well but the response is sent too early, before any of the arrays of files hav...
[ { "answer_id": 74644738, "author": "SomeDude", "author_id": 1410303, "author_profile": "https://Stackoverflow.com/users/1410303", "pm_score": 1, "selected": false, "text": "out = df.groupby(df.c1.str[-1]).sum().reset_index()\nout['c1'] = 'C' + out['c1']\n c1 c2\n0 Cx 3\n1 Cy 7\...
2022/12/01
[ "https://Stackoverflow.com/questions/74644678", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12498040/" ]
74,644,755
<p>First time encountering floating point arithmetic.</p> <p>How can I add:</p> <pre><code>0.4047617913405519 + 250459325658972.0 </code></pre> <p>and choose my presicion?</p> <p>I get</p> <pre><code>250459325658972.4 </code></pre> <p>But I want at least</p> <pre><code>250459325658972.405 </code></pre> <p>Why is python...
[ { "answer_id": 74644891, "author": "scr", "author_id": 18781246, "author_profile": "https://Stackoverflow.com/users/18781246", "pm_score": 1, "selected": false, "text": ">>> from decimal import *\n>>> getcontext().prec = 6\n>>> Decimal(1) / Decimal(7)\nDecimal('0.142857')\n>>> getcontext...
2022/12/01
[ "https://Stackoverflow.com/questions/74644755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13817472/" ]
74,644,762
<p>I'm trying to set methods of a class programmatically by calling <code>setattr</code> in a loop, but the reference I pass to the function that is called by this method defaults back to its last value, instead of what was passed at the time of the <code>setattr</code>call. Curiously, I'm also setting the <code>__doc_...
[ { "answer_id": 74644891, "author": "scr", "author_id": 18781246, "author_profile": "https://Stackoverflow.com/users/18781246", "pm_score": 1, "selected": false, "text": ">>> from decimal import *\n>>> getcontext().prec = 6\n>>> Decimal(1) / Decimal(7)\nDecimal('0.142857')\n>>> getcontext...
2022/12/01
[ "https://Stackoverflow.com/questions/74644762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9902863/" ]
74,644,781
<p>In my main thread I create two additional threads that I want to use a value from. Basically what I want to do is this:</p> <pre><code>Threads thread1 = new Threads(); Threads thread2 = new Threads(); Thread.currentThread.wait(); If (thread1 = complete){ var = thread1.getter //delete thread2 } If (thread2 == complet...
[ { "answer_id": 74644891, "author": "scr", "author_id": 18781246, "author_profile": "https://Stackoverflow.com/users/18781246", "pm_score": 1, "selected": false, "text": ">>> from decimal import *\n>>> getcontext().prec = 6\n>>> Decimal(1) / Decimal(7)\nDecimal('0.142857')\n>>> getcontext...
2022/12/01
[ "https://Stackoverflow.com/questions/74644781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20657801/" ]
74,644,786
<p>Is there any way to store terraform output values to s3 bucket file..</p> <pre><code>output &quot;certificate_body&quot; { description = &quot;The acm certificate body&quot; value = venafi_certificate.this.certificate } </code></pre> <p>how can we dump this output to a file which is in s3 bucket ?</p>
[ { "answer_id": 74644891, "author": "scr", "author_id": 18781246, "author_profile": "https://Stackoverflow.com/users/18781246", "pm_score": 1, "selected": false, "text": ">>> from decimal import *\n>>> getcontext().prec = 6\n>>> Decimal(1) / Decimal(7)\nDecimal('0.142857')\n>>> getcontext...
2022/12/01
[ "https://Stackoverflow.com/questions/74644786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16250966/" ]
74,644,798
<p>Hi my code works fine but is there any way to print how many times numbers 1-6 were said into a percentage</p> <p>I haven't tried anything yet.</p> <pre><code>import pandas as pd import random data = [random.randint(0,6) for _ in range(10)] df = pd.DataFrame(data) print(df) df.to_excel(r'H:\Grade10\Cs\Mir Hussai...
[ { "answer_id": 74644891, "author": "scr", "author_id": 18781246, "author_profile": "https://Stackoverflow.com/users/18781246", "pm_score": 1, "selected": false, "text": ">>> from decimal import *\n>>> getcontext().prec = 6\n>>> Decimal(1) / Decimal(7)\nDecimal('0.142857')\n>>> getcontext...
2022/12/01
[ "https://Stackoverflow.com/questions/74644798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658118/" ]
74,644,851
<pre><code>#include&lt;stdio.h&gt; int main() { int value = 0 ; if(value) printf(&quot;0&quot;); printf(&quot;1&quot;); printf(&quot;2&quot;); return 0; } </code></pre> <p>The output of the above code is <code>12</code> but when I tweak the code by adding curly brackets the output differs...
[ { "answer_id": 74644916, "author": "SilicDev", "author_id": 20614914, "author_profile": "https://Stackoverflow.com/users/20614914", "pm_score": 1, "selected": false, "text": "true 0 false if" }, { "answer_id": 74644989, "author": "Steve Summit", "author_id": 3923896, ...
2022/12/01
[ "https://Stackoverflow.com/questions/74644851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20657846/" ]
74,644,856
<p>I need to organize the arrays that are inside an array so that the first numbers in the array are even</p> <p>For now I can only scroll through the arrays, I couldn't implement the logic <code> </code></p> <pre><code>let matriz = [ [5, 1, 2, 4, 7, 9], [2, 4, 3, 1, 7, 9], [1, 2, 3, 4, 5, 6], ] for (let i...
[ { "answer_id": 74645025, "author": "Nina Scholz", "author_id": 1447675, "author_profile": "https://Stackoverflow.com/users/1447675", "pm_score": 2, "selected": false, "text": "true const\n move = (array, fn) => array.sort((a, b) => fn(b) - fn(a)),\n array = [5, 1, 2, 4, 7, 9];\n\nm...
2022/12/01
[ "https://Stackoverflow.com/questions/74644856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17736532/" ]
74,644,870
<p>I have to retype most of this by hand since the system I'm testing on can't currently connect to the internet, forgive any obvious typos please.</p> <p>We are programmatically scheduling deployments into a large sandbox with 19 nodes, 16 of which are workers. Usually we scan through available nodes to find the ones...
[ { "answer_id": 74645161, "author": "user2311578", "author_id": 2311578, "author_profile": "https://Stackoverflow.com/users/2311578", "pm_score": 2, "selected": true, "text": "requiredDuringSchedulingIgnoreDuringExecution \"topologyKey\": \"kubernetes.io/hostname\" apiVersion: v1\nkind: P...
2022/12/01
[ "https://Stackoverflow.com/questions/74644870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/897272/" ]
74,644,919
<p>I’m working on an Azure Function App that will grab a .pgp file off of Blob Storage, decrypt it, and then upload that decrypted file back to Blob Storage.</p> <p>I’ve done quite a bit of research and everything usually assumes you are downloading a file to a local drive, decrypt, then upload. However, in my case I’m...
[ { "answer_id": 74646912, "author": "Joel Cochran", "author_id": 75838, "author_profile": "https://Stackoverflow.com/users/75838", "pm_score": 1, "selected": false, "text": "// TMP file names\nvar temp_sourceFileName = IOHelper.BuildTempFileName(BlobHelper.StripPath(sourceBlobName));\nvar...
2022/12/01
[ "https://Stackoverflow.com/questions/74644919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5216651/" ]
74,644,938
<pre><code>const productIds = ['abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', ...] const generateBearerToken = async () =&gt; { await //api calling } // will return bearerToken const getSubmissions = async () =&gt; { await // api calling } let sellerId = null const getPublisherId = async (productId) =&gt;...
[ { "answer_id": 74646912, "author": "Joel Cochran", "author_id": 75838, "author_profile": "https://Stackoverflow.com/users/75838", "pm_score": 1, "selected": false, "text": "// TMP file names\nvar temp_sourceFileName = IOHelper.BuildTempFileName(BlobHelper.StripPath(sourceBlobName));\nvar...
2022/12/01
[ "https://Stackoverflow.com/questions/74644938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15384724/" ]
74,644,960
<p>I want to ensure the angle <code>h_ur</code> is between 0 to 360 degrees.</p> <pre><code> h_ur &lt;- atan2(b, a)*(180.0/pi) </code></pre> <p>but for the sake of the question, I have simplified <code>h_ur</code> as following:</p> <pre><code>h_ur &lt;- -5 if (h_ur &gt; 360){ h &lt;- h_ur - 360 } else if (h_ur &lt; ...
[ { "answer_id": 74645073, "author": "DashdotdotDashdotdot", "author_id": 20548300, "author_profile": "https://Stackoverflow.com/users/20548300", "pm_score": 3, "selected": true, "text": "h_ur <- c(-180,-5,0,90,359.999, 360,720,865)\nh <- h_ur %% 360\nprint(h)\n > print(h)\n[1] 180.000 355...
2022/12/01
[ "https://Stackoverflow.com/questions/74644960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20427544/" ]
74,644,966
<p>HP are supposed to reset to 0 when its 0 or under But i guess my condition isnt good because it can go under 0.</p> <p>And i dont understand why when i attack the opponent, it check the wrong opponent. <a href="https://i.stack.imgur.com/gzWf0.png" rel="nofollow noreferrer">pic of error</a> Here is the translate of t...
[ { "answer_id": 74645064, "author": "birdspider", "author_id": 2645347, "author_profile": "https://Stackoverflow.com/users/2645347", "pm_score": 0, "selected": false, "text": "luffyCharacter.attackEnemy(narutoCharacter);\n Ranger Ranger.attackEnemy" }, { "answer_id": 74645307, ...
2022/12/01
[ "https://Stackoverflow.com/questions/74644966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20643763/" ]
74,644,992
<p>I'm trying to delete from two tables using one function.</p> <p>Controller code:</p> <pre><code>public function userdelete() { $u_id = $this-&gt;uri-&gt;segment(3); $lr_id = $this-&gt;uri-&gt;segment(3); $returndata = $this-&gt;user_model-&gt;user_delete($u_id, $lr_id); ...
[ { "answer_id": 74645064, "author": "birdspider", "author_id": 2645347, "author_profile": "https://Stackoverflow.com/users/2645347", "pm_score": 0, "selected": false, "text": "luffyCharacter.attackEnemy(narutoCharacter);\n Ranger Ranger.attackEnemy" }, { "answer_id": 74645307, ...
2022/12/01
[ "https://Stackoverflow.com/questions/74644992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658222/" ]
74,645,031
<p>I am trying to fetch data from a table that returns a list of Row datetime.date objects. I would like to have them as a list of Varchar/String values.</p> <pre><code>query = &quot;select device_date from device where device is not null&quot; res = spark.sql(query).collect() if len(res) != 0: return res[:20] </c...
[ { "answer_id": 74645098, "author": "scr", "author_id": 18781246, "author_profile": "https://Stackoverflow.com/users/18781246", "pm_score": 1, "selected": false, "text": "date_format >>> from pyspark.sql.functions import date_format\n>>> df.select(date_format('device_date', 'YYYY-mm-dd')....
2022/12/01
[ "https://Stackoverflow.com/questions/74645031", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11252662/" ]
74,645,066
<p>Suppose I have a table like this:</p> <p><strong>Example data:</strong></p> <pre><code>x_id | type | user_id | other_id | date ---------------------------------------------- 123 | AB | 999 | 001 | 10/12/12 124 | CD | 887 | 258 | 12/12/21 125 | CD | 651 | 702 | 03/04/11 126 | AB ...
[ { "answer_id": 74645098, "author": "scr", "author_id": 18781246, "author_profile": "https://Stackoverflow.com/users/18781246", "pm_score": 1, "selected": false, "text": "date_format >>> from pyspark.sql.functions import date_format\n>>> df.select(date_format('device_date', 'YYYY-mm-dd')....
2022/12/01
[ "https://Stackoverflow.com/questions/74645066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17245261/" ]
74,645,122
<p>stuck with regular expressions. There is an example text:</p> <blockquote> <p>'[1 | Hi {name} | Hello {name} | Good morning {name}] other text {1 |{name}| 3| 4} OTHER {5 |{name}| 6| 7}'</p> </blockquote> <p>It is necessary to extract from it the constructions <strong>[1 | Hi {name} | hello {name} | Good morning {nam...
[ { "answer_id": 74645715, "author": "gog", "author_id": 3494774, "author_profile": "https://Stackoverflow.com/users/3494774", "pm_score": 1, "selected": false, "text": "def top_level_parens(s):\n stack = []\n\n for n, c in enumerate(s):\n if c in '({[':\n stack.app...
2022/12/01
[ "https://Stackoverflow.com/questions/74645122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18760820/" ]
74,645,137
<p>I have two functions that I want to run when user selects option. I have tried with a conditional. It looks something like this, but the h2 doesn't render.</p> <pre><code> function a() { // some logic return &lt;h2&gt;{result of some logic}&lt;/h2&gt;; } function b() { // some logic return &lt;...
[ { "answer_id": 74645437, "author": "Emilien", "author_id": 18143359, "author_profile": "https://Stackoverflow.com/users/18143359", "pm_score": 1, "selected": false, "text": "const [title, setTitle] = useState();\n\n handleChange(e) {\n setTitle(e.target.value)\n }\n\n return (\n<>\...
2022/12/01
[ "https://Stackoverflow.com/questions/74645137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19184437/" ]
74,645,145
<p>I have an application which is registered in Azure (followed this <a href="https://learn.microsoft.com/en-us/azure/developer/python/sdk/authentication-on-premises-apps?source=recommendations&amp;tabs=azure-portal" rel="nofollow noreferrer">guide</a>). I have the application-id for this application, and I would like ...
[ { "answer_id": 74645437, "author": "Emilien", "author_id": 18143359, "author_profile": "https://Stackoverflow.com/users/18143359", "pm_score": 1, "selected": false, "text": "const [title, setTitle] = useState();\n\n handleChange(e) {\n setTitle(e.target.value)\n }\n\n return (\n<>\...
2022/12/01
[ "https://Stackoverflow.com/questions/74645145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1543532/" ]
74,645,146
<p>I'm working with a bizarrely constructed XMl document, missing ID's and ambiguous names etc. Hopefully my example XML document paints a proper picture for you. The real document is huge and sometimes is nested 10 or more layers deep a real eye sore.</p> <p>What I need to do is find a specific value in a node calle...
[ { "answer_id": 74645437, "author": "Emilien", "author_id": 18143359, "author_profile": "https://Stackoverflow.com/users/18143359", "pm_score": 1, "selected": false, "text": "const [title, setTitle] = useState();\n\n handleChange(e) {\n setTitle(e.target.value)\n }\n\n return (\n<>\...
2022/12/01
[ "https://Stackoverflow.com/questions/74645146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20548788/" ]
74,645,175
<p>I have an ArrayList of Objects called SprintResults, which contain the following attributes:</p> <p>double time</p> <p>Object Student(Which contains attributes such as String name).</p> <p>I've sorted the ArrayList based on best times, with the intention of printing the top 5 students + their times. How do I go abou...
[ { "answer_id": 74645437, "author": "Emilien", "author_id": 18143359, "author_profile": "https://Stackoverflow.com/users/18143359", "pm_score": 1, "selected": false, "text": "const [title, setTitle] = useState();\n\n handleChange(e) {\n setTitle(e.target.value)\n }\n\n return (\n<>\...
2022/12/01
[ "https://Stackoverflow.com/questions/74645175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17117247/" ]
74,645,189
<p>I need to contact a WebService:</p> <p>this WS accepts only POST.</p> <p>For authenticating I have to send some JSON in the BODY of request</p> <p>while in the HEADER I have to send the WS method I want to call.</p> <p>This is a valid request sent using CLI (WS answers correctly)</p> <pre><code>curl -X POST -k -H 'O...
[ { "answer_id": 74645437, "author": "Emilien", "author_id": 18143359, "author_profile": "https://Stackoverflow.com/users/18143359", "pm_score": 1, "selected": false, "text": "const [title, setTitle] = useState();\n\n handleChange(e) {\n setTitle(e.target.value)\n }\n\n return (\n<>\...
2022/12/01
[ "https://Stackoverflow.com/questions/74645189", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3202957/" ]
74,645,253
<p>I am new using the <a href="https://docs.python.org/3/library/re.html" rel="nofollow noreferrer">re library</a> and I would like to know if somebody knows how to extract the following text:</p> <p><strong>Initial</strong></p> <pre><code>'[p]I am a test paragraph[/p]' </code></pre> <p><strong>Output</strong></p> <pre...
[ { "answer_id": 74645437, "author": "Emilien", "author_id": 18143359, "author_profile": "https://Stackoverflow.com/users/18143359", "pm_score": 1, "selected": false, "text": "const [title, setTitle] = useState();\n\n handleChange(e) {\n setTitle(e.target.value)\n }\n\n return (\n<>\...
2022/12/01
[ "https://Stackoverflow.com/questions/74645253", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13931798/" ]
74,645,305
<p>I have added to my phone authentication to my sign up process, in a send code activity - which sends the sms code to confirm the phone authentication process. Then, I have also added a &quot;go-back&quot;/&quot;return&quot; button which moves the user back to the main activity.</p> <p>If I make the following request...
[ { "answer_id": 74668889, "author": "August Vilakia", "author_id": 20314495, "author_profile": "https://Stackoverflow.com/users/20314495", "pm_score": 0, "selected": false, "text": "// Initiate the phone verification request\nPhoneAuthProvider.verifyPhoneNumber(\n phoneNumber,\n timeout...
2022/12/01
[ "https://Stackoverflow.com/questions/74645305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15213090/" ]
74,645,339
<p>This is my first React project, so thank you in advance for bearing with me if this is a basic question. I have a two range inputs and I am trying to perform a calculation and update content when those range inputs are moved. Here's my file:</p> <p>index.tsx</p> <pre><code>import * as React from 'react' export defa...
[ { "answer_id": 74668889, "author": "August Vilakia", "author_id": 20314495, "author_profile": "https://Stackoverflow.com/users/20314495", "pm_score": 0, "selected": false, "text": "// Initiate the phone verification request\nPhoneAuthProvider.verifyPhoneNumber(\n phoneNumber,\n timeout...
2022/12/01
[ "https://Stackoverflow.com/questions/74645339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3713090/" ]
74,645,352
<p>[I want to calculate the space of the circle but after i enter the value of r the value of x become 0]</p> <p>(<a href="https://i.stack.imgur.com/BjgpH.png" rel="nofollow noreferrer">https://i.stack.imgur.com/BjgpH.png</a>) (<a href="https://i.stack.imgur.com/LaRWI.png" rel="nofollow noreferrer">https://i.stack.img...
[ { "answer_id": 74645452, "author": "Bruno Peixoto", "author_id": 4904472, "author_profile": "https://Stackoverflow.com/users/4904472", "pm_score": 2, "selected": false, "text": "namespace" }, { "answer_id": 74645620, "author": "Masoom Raza", "author_id": 8939178, "aut...
2022/12/01
[ "https://Stackoverflow.com/questions/74645352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658347/" ]
74,645,353
<p>I've a very basic Flask application:</p> <pre><code>#main.py from flask import Flask app = Flask(__name__) @app.route('/sth/') def hi(): return 'HI\n' </code></pre> <p>and I try to test the existence of the url, however, to me it seems the routes are not registered:</p> <pre><code>#tests/test_view.py from flas...
[ { "answer_id": 74645441, "author": "gerrel93", "author_id": 14436548, "author_profile": "https://Stackoverflow.com/users/14436548", "pm_score": 1, "selected": false, "text": "#main.py\nfrom flask import Flask\n\napp = Flask(__name__)\n\n@app.route('/sth/')\ndef hi():\n return 'HI\\n'\...
2022/12/01
[ "https://Stackoverflow.com/questions/74645353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2194805/" ]
74,645,362
<pre><code>output [15:0] pin; output [1:0] en; input [6:0] dddr; input [6:0] dbg; </code></pre> <p>replace this with ( I am counting the bus)</p> <pre><code>16 : pin : output; 2 : en : output; 7 : dddr ...
[ { "answer_id": 74645583, "author": "simbabque", "author_id": 1331451, "author_profile": "https://Stackoverflow.com/users/1331451", "pm_score": 3, "selected": false, "text": "(\\w+ ) \\[(\\d+):\n VVVVVVVV\noutput [15:0] pin; \n use strict;\nuse warnings;\n...
2022/12/01
[ "https://Stackoverflow.com/questions/74645362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14523938/" ]
74,645,370
<pre><code>global mymul mymul: mov rax, rdi mul rsi ret </code></pre> <pre><code>#include &lt;stdio.h&gt; typedef struct { unsigned long long high; unsigned long long low; } resmul; void mymul(unsigned long long, unsigned long long, resmul *res); int main() { resmul res; mym...
[ { "answer_id": 74645460, "author": "Nate Eldredge", "author_id": 634919, "author_profile": "https://Stackoverflow.com/users/634919", "pm_score": 2, "selected": false, "text": "mymul mul global mymul\nmymul:\n mov rcx, rdx ; save argument\n mov rax, rdi\n mul rsi\n mov [rcx],...
2022/12/01
[ "https://Stackoverflow.com/questions/74645370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658440/" ]
74,645,373
<p>I have this dataframe</p> <pre><code>df = pd.DataFrame.from_dict( { 'Name': ['Jane', 'Melissa', 'John', 'Matt'], 'Age': [23, 45, 35, 64], 'Birth City': ['London', 'Paris', 'Toronto', 'Atlanta'], 'Gender': ['F', 'F', 'M', 'M'] } ) </code></pre> <p>and I want to replace the <cod...
[ { "answer_id": 74645409, "author": "PaulS", "author_id": 11564487, "author_profile": "https://Stackoverflow.com/users/11564487", "pm_score": 3, "selected": true, "text": "df['Gender'] = df['Gender'].mask(df['Name'].isin(['Melissa', 'John']), other='X')\n Name Age Birth City Gender...
2022/12/01
[ "https://Stackoverflow.com/questions/74645373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3935035/" ]
74,645,464
<p>dob format is <code>2022-07</code></p> <p>desired output is <code>0 Years 5 Months</code></p> <p>Below is the code I tried but I am getting months in negative.</p> <pre><code>export default function calculateAge(date) { let month = new Date().getMonth() - Number(date.split(&quot;-&quot;)[1]); let year = new Date...
[ { "answer_id": 74645521, "author": "Raz Luvaton", "author_id": 5923666, "author_profile": "https://Stackoverflow.com/users/5923666", "pm_score": 1, "selected": true, "text": "function calculateAge(date) {\n // Split the date string into year and month\n const [year, month] = date.split...
2022/12/01
[ "https://Stackoverflow.com/questions/74645464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14489691/" ]
74,645,475
<p>I have a long list of random numbers between 1 and 100, and i would like to count how many of them are larger than 10,20,30 etc</p> <pre><code>x &lt;- c(sample(1:100, 500, replace = T)) y &lt;- seq(0,100, by = 10) </code></pre> <p>I am looking for this to return an output such as;</p> <div class="s-table-container">...
[ { "answer_id": 74645542, "author": "Jilber Urbina", "author_id": 1315767, "author_profile": "https://Stackoverflow.com/users/1315767", "pm_score": 1, "selected": false, "text": "cut table table(cut(x, breaks = y))\n\n (0,10] (10,20] (20,30] (30,40] (40,50] (50,60] (60,70] (70,80...
2022/12/01
[ "https://Stackoverflow.com/questions/74645475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658455/" ]
74,645,480
<p>I am very new to the nextjs and have come across the Image component issue. I also checked around and it seems that there are similar questions but none of them has the given scenario.</p> <p>I am trying to load image from the remote source via Image component. The documentation saying that you should adjust your ne...
[ { "answer_id": 74645542, "author": "Jilber Urbina", "author_id": 1315767, "author_profile": "https://Stackoverflow.com/users/1315767", "pm_score": 1, "selected": false, "text": "cut table table(cut(x, breaks = y))\n\n (0,10] (10,20] (20,30] (30,40] (40,50] (50,60] (60,70] (70,80...
2022/12/01
[ "https://Stackoverflow.com/questions/74645480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9249683/" ]
74,645,516
<p>I've the following PSObj with some properties stored in an $array :</p> <pre><code>ComputerName : MyComputer Time : 08/11/2022 13:57:53 DetectionFile : MyBadFile.exe ThreatName : WS.Reputation.1 Action : 12 </code></pre> <p>I'm trying to replace the action ID number by it's co...
[ { "answer_id": 74645542, "author": "Jilber Urbina", "author_id": 1315767, "author_profile": "https://Stackoverflow.com/users/1315767", "pm_score": 1, "selected": false, "text": "cut table table(cut(x, breaks = y))\n\n (0,10] (10,20] (20,30] (30,40] (40,50] (50,60] (60,70] (70,80...
2022/12/01
[ "https://Stackoverflow.com/questions/74645516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2552996/" ]
74,645,518
<p>Why I can't loop on 'data' ?</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>data = [{type: 'a', data: 'xyz'}, {type: 'a', data: 'xyz'}, {type: 'a', data: 'xyz'}]; for (i...
[ { "answer_id": 74645542, "author": "Jilber Urbina", "author_id": 1315767, "author_profile": "https://Stackoverflow.com/users/1315767", "pm_score": 1, "selected": false, "text": "cut table table(cut(x, breaks = y))\n\n (0,10] (10,20] (20,30] (30,40] (40,50] (50,60] (60,70] (70,80...
2022/12/01
[ "https://Stackoverflow.com/questions/74645518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1395691/" ]
74,645,524
<p>There is a table that has an empty column, I need to fill up this column using row_number() and order it by value from other table. My CTE works but I can't update the second table.</p> <p>This is CTE (it works)</p> <p><code>with testy(a, b, c) as (select t1.empno, t2.birthdate, ROW_NUMBER() OVER(ORDER BY t2.birthda...
[ { "answer_id": 74645542, "author": "Jilber Urbina", "author_id": 1315767, "author_profile": "https://Stackoverflow.com/users/1315767", "pm_score": 1, "selected": false, "text": "cut table table(cut(x, breaks = y))\n\n (0,10] (10,20] (20,30] (30,40] (40,50] (50,60] (60,70] (70,80...
2022/12/01
[ "https://Stackoverflow.com/questions/74645524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20503658/" ]
74,645,543
<p>I have a NextJS application which conditionally renders a set of data tables using useState and useEffect:</p> <pre><code>const [board,setBoard] = useState(&quot;AllTime&quot;); const [AllTimeLeaderboardVisible, setAllTimeLeaderboardVisible] = useState(false); const [TrendingCreatorLeaderboardVisible, setTrendingCr...
[ { "answer_id": 74645627, "author": "Sean Anglim", "author_id": 17843144, "author_profile": "https://Stackoverflow.com/users/17843144", "pm_score": 0, "selected": false, "text": "import { useState } from 'react';\n" } ]
2022/12/01
[ "https://Stackoverflow.com/questions/74645543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6491750/" ]
74,645,555
<p>How to convert CommaDelimitedList Parameter to String for passing it as environment variable to Lamda Function ?</p> <p>Below is sample CommaDelimitedList Parameter containing list of AWS regions which I need to pass it as Environment variable to AWS Lambda function in cloud formation template. The reason is when I ...
[ { "answer_id": 74645627, "author": "Sean Anglim", "author_id": 17843144, "author_profile": "https://Stackoverflow.com/users/17843144", "pm_score": 0, "selected": false, "text": "import { useState } from 'react';\n" } ]
2022/12/01
[ "https://Stackoverflow.com/questions/74645555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2325916/" ]
74,645,576
<p>I have the following bit of code</p> <pre><code> const [inProgress, setInProgress] = useState(value); useEffect(() =&gt; { missionState.mission_summary.length &gt; 0 ? setInProgress(true) : setInProgress(false); console.log(missionState.mission_summary.length &gt; 0) // false console.log(in...
[ { "answer_id": 74645602, "author": "Sachila Ranawaka", "author_id": 6428638, "author_profile": "https://Stackoverflow.com/users/6428638", "pm_score": 2, "selected": true, "text": "useEffect useEffect(() => {\n missionState.mission_summary.length > 0 ? setInProgress(true) : setInProg...
2022/12/01
[ "https://Stackoverflow.com/questions/74645576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19389806/" ]
74,645,674
<p>I am converting Pandas commands into Spark ones. I bumped into wanting to convert this line into Apache Spark code:</p> <p>This line replaces every two spaces into one.</p> <pre class="lang-py prettyprint-override"><code>df = df.columns.str.replace(' ', ' ') </code></pre> <p>Is it possible to replace a string from ...
[ { "answer_id": 74645770, "author": "scr", "author_id": 18781246, "author_profile": "https://Stackoverflow.com/users/18781246", "pm_score": 0, "selected": false, "text": "columns_to_edit = [col for col in df.columns if \"__\" in col]\n for column in columns_to_edit:\n new_column = colu...
2022/12/01
[ "https://Stackoverflow.com/questions/74645674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8284974/" ]
74,645,681
<p>I just found AddDate() does not always works as expected.</p> <p>ex:</p> <pre><code>mayEndDate := time.Date(2021, 5, 31, 12, 00, 00, 00, time.UTC) finalDate := endOfMay.AddDate(0, -1, 0) </code></pre> <p>here output:</p> <ul> <li><strong>myEndDate</strong> = 2021-05-31 12:00:00 +0000 UTC</li> <li><strong>finalDate</...
[ { "answer_id": 74646000, "author": "kimbo", "author_id": 9638991, "author_profile": "https://Stackoverflow.com/users/9638991", "pm_score": 2, "selected": false, "text": "Month() currentMonth := mayEndDate.Month()\npreviousMonth := currentMonth - 1\nif currentMonth == time.January {\n ...
2022/12/01
[ "https://Stackoverflow.com/questions/74645681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13898702/" ]
74,645,684
<p>I have this filter and array for a message collector.</p> <pre><code>const answers = [&quot;Rock&quot;, &quot;Paper&quot;, &quot;Scissors&quot;]; const filter = msg =&gt; answers.includes(msg.content()); </code></pre> <p>That filter only detects a content that exactly matches what's in the array. So if a message ...
[ { "answer_id": 74645941, "author": "Caladan", "author_id": 17641423, "author_profile": "https://Stackoverflow.com/users/17641423", "pm_score": 2, "selected": false, "text": ".some() true false const string = \"test!!\";\nconst answers = [\"Rock\", \"Paper\", \"Scissors\"];\n\nconsole.log...
2022/12/01
[ "https://Stackoverflow.com/questions/74645684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/874737/" ]
74,645,690
<p>I'm trying to build a basic game-like program where I need to rearrange a given matrix but vertically. In this case, I only have 0s and 1s. 0 being lighter objects and 1 being heavier. When the function runs, all the 1s should fall down vertically and the zeros go up vertically as well. It needs to have the exact nu...
[ { "answer_id": 74645743, "author": "Priyatham", "author_id": 2542516, "author_profile": "https://Stackoverflow.com/users/2542516", "pm_score": 2, "selected": false, "text": "np.sort np.sort(matrix, axis=0)\n" }, { "answer_id": 74645931, "author": "Andrew Ryan", "author_id...
2022/12/01
[ "https://Stackoverflow.com/questions/74645690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15062354/" ]
74,645,693
<p>I am currently having a similar need to the question in <a href="https://stackoverflow.com/questions/44978196/pandas-filling-missing-dates-and-values-within-group">this thread</a>, but it looks like it cannot fill in the <code>dates</code> if the <code>min</code> and <code>max</code> dates of the given <code>date</c...
[ { "answer_id": 74645743, "author": "Priyatham", "author_id": 2542516, "author_profile": "https://Stackoverflow.com/users/2542516", "pm_score": 2, "selected": false, "text": "np.sort np.sort(matrix, axis=0)\n" }, { "answer_id": 74645931, "author": "Andrew Ryan", "author_id...
2022/12/01
[ "https://Stackoverflow.com/questions/74645693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5508202/" ]
74,645,753
<p>Consider a positive integer n. What will be the smallest number k such that if we concatenate the digits of n with those of k we get a perfect square?</p> <p>For example, for n=1 the smallest k is 6 since 16 is a perfect square.</p> <p>For n=4, k has to be 9 because 49 is a perfect square.</p> <p>For n=35, k is 344,...
[ { "answer_id": 74646256, "author": "Vin", "author_id": 7955271, "author_profile": "https://Stackoverflow.com/users/7955271", "pm_score": 0, "selected": false, "text": "import math\n\ndef find_smallest_perfect_square(start: int) -> int:\n while True:\n if int(math.sqrt(start)) !...
2022/12/01
[ "https://Stackoverflow.com/questions/74645753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20400765/" ]
74,645,769
<p>I have the following perl code in where I have a perl structure as follows: `</p> <pre><code>use Data::Dumper; my %data = ( 'status' =&gt; 200, 'message' =&gt; '', 'response' =&gt; { 'name' =&gt; 'John Smith', 'id' =&gt; '1abc579', 'ibge' =&gt; '3304557', 'uf' =&gt; 'XY', 'status' =&gt; bl...
[ { "answer_id": 74645856, "author": "Silvio Mayolo", "author_id": 2288659, "author_profile": "https://Stackoverflow.com/users/2288659", "pm_score": 1, "selected": false, "text": "$data{'response'} %data HASH(0x8b6640) Dumper print Dumper($data{'response'});\n -> print $data{'response'}->{...
2022/12/01
[ "https://Stackoverflow.com/questions/74645769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658697/" ]
74,645,772
<p>I have the following image:</p> <p><a href="https://i.stack.imgur.com/yACz0.png" rel="nofollow noreferrer">Initial Image</a></p> <p>I am using the following code the rotate the image:</p> <pre><code>from skimage.transform import rotate image = cv2.imread('122.png') rotated = rotate(image,34,cval=1,resize = True) </c...
[ { "answer_id": 74645856, "author": "Silvio Mayolo", "author_id": 2288659, "author_profile": "https://Stackoverflow.com/users/2288659", "pm_score": 1, "selected": false, "text": "$data{'response'} %data HASH(0x8b6640) Dumper print Dumper($data{'response'});\n -> print $data{'response'}->{...
2022/12/01
[ "https://Stackoverflow.com/questions/74645772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658672/" ]
74,645,787
<p>I want to make a bar containing mutual data of two users. I want it to be like this image:</p> <p><img src="https://i.stack.imgur.com/P3MGM.png" alt="" /></p> <p>I also used the <code>Rectangle()</code> shape here. But the bar starts to fill up after 0.5, it seems empty before that. What should I do here?</p> <p>The...
[ { "answer_id": 74647106, "author": "Kush Bhavsar", "author_id": 15161794, "author_profile": "https://Stackoverflow.com/users/15161794", "pm_score": 0, "selected": false, "text": " HStack(spacing: -5) {\n ZStack(alignment: .leading){\n Rectangle()\n .tr...
2022/12/01
[ "https://Stackoverflow.com/questions/74645787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20166709/" ]
74,645,789
<p>I'd like to replace the + sign in my expression. When I did it with regular expression, it interprets this + as &quot;at one or more&quot;, while in fact I'd like it to be interpreted as the literal +</p> <p>The problem I have on hand is that I want to format the following string, which is not formatted nicely. &quo...
[ { "answer_id": 74647106, "author": "Kush Bhavsar", "author_id": 15161794, "author_profile": "https://Stackoverflow.com/users/15161794", "pm_score": 0, "selected": false, "text": " HStack(spacing: -5) {\n ZStack(alignment: .leading){\n Rectangle()\n .tr...
2022/12/01
[ "https://Stackoverflow.com/questions/74645789", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8149739/" ]
74,645,799
<p>When the route is blank (i.e. <code>https://localhost:1234</code>) I want it to route to the search component.</p> <p>I have routing set up in my <code>app.module.ts</code> like this:</p> <pre><code>RouterModule.forRoot([ { path: '', redirectTo: 'search', pathMatch: 'full' }, { path: 'login', component: ...
[ { "answer_id": 74646031, "author": "Flo", "author_id": 4472932, "author_profile": "https://Stackoverflow.com/users/4472932", "pm_score": -1, "selected": false, "text": "const routes: Routes = [\n {path: '', redirectTo: '/auth/sign-in', pathMatch: 'full'}\n];\n const routes: Routes = [\n...
2022/12/01
[ "https://Stackoverflow.com/questions/74645799", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4690605/" ]
74,645,800
<p>I have this div that shows a <strong>top red bar</strong>. I've been trying to move this bar to the left side and make it look like a border left, but not having any luck. Does anyone know how to make it look like a <strong>border lef</strong>t using this code? Thanks in advance!</p> <p><div class="snippet" data-lan...
[ { "answer_id": 74645926, "author": "John Li", "author_id": 20436957, "author_profile": "https://Stackoverflow.com/users/20436957", "pm_score": 3, "selected": true, "text": "::after .container {\n position: relative;\n width: 100%;\n padding: 18px;\n margin-bottom: 16px;\n border-radi...
2022/12/01
[ "https://Stackoverflow.com/questions/74645800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5245070/" ]
74,645,801
<p>I am trying to label the series of concentric circles below with the labels from <code>C</code> in the data frame</p> <p>I am aware that I could use something like <code>geom_text_repel</code> but I cannot seem to get it to work.</p> <p>In addition, I cannot seem to get rid of the tick marks on the upper left.</p> <...
[ { "answer_id": 74645907, "author": "Allan Cameron", "author_id": 12500315, "author_profile": "https://Stackoverflow.com/users/12500315", "pm_score": 2, "selected": false, "text": "ggplot(df, aes(factor(1), fill = C)) +\n geom_bar(width = 1, colour = NA, show.legend = FALSE, alpha = .8) ...
2022/12/01
[ "https://Stackoverflow.com/questions/74645801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7389241/" ]
74,645,811
<p>I have frames of a video taken from a microscope. I need to crop them to a square inscribed to the circle but the issue is that the circle isn't whole (like in the following image). How can I do it? <a href="https://i.stack.imgur.com/TUP74.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TUP74.jpg"...
[ { "answer_id": 74647126, "author": "fmw42", "author_id": 7355741, "author_profile": "https://Stackoverflow.com/users/7355741", "pm_score": 3, "selected": false, "text": "import cv2\nimport numpy as np\n\n# read image\nimg = cv2.imread('img.jpg')\nh, w = img.shape[:2]\n\n# threshold so bo...
2022/12/01
[ "https://Stackoverflow.com/questions/74645811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18992886/" ]
74,645,817
<p>I am trying to assert vallue's in a requestbody which I have intercepted with cypress.</p> <p>The values I need to assert are <strong>&quot;name&quot;: &quot;NewName&quot;,</strong> and &quot;<strong>title&quot;: &quot;STUB1-Draft&quot;</strong> you can see in the requestbody example that I have attached.</p> <p>...
[ { "answer_id": 74646217, "author": "jjhelguero", "author_id": 17917809, "author_profile": "https://Stackoverflow.com/users/17917809", "pm_score": 0, "selected": false, "text": "const spok = require('cy-spok')\n// later in your test\ncy.wait('@NewSectionAndItem')\n .its('request.body')\n...
2022/12/01
[ "https://Stackoverflow.com/questions/74645817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19285414/" ]
74,645,823
<p>This is a continuation of the previous question. When I continued to work on the site and when I wanted to test the site through &quot;python manage.py runserver&quot; in the C:\mysite\site\miniproject directory, the following error pops up:</p> <pre><code>C:\Program Files\Python36\lib\site-packages\django\db\models...
[ { "answer_id": 74654386, "author": "Bairam", "author_id": 16885688, "author_profile": "https://Stackoverflow.com/users/16885688", "pm_score": 0, "selected": false, "text": "from django.shortcuts import reverse" }, { "answer_id": 74660846, "author": "kalkidan Teklu", "auth...
2022/12/01
[ "https://Stackoverflow.com/questions/74645823", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19350769/" ]
74,645,839
<p>How would one go about creating a script for creating 25 empty files in succession? (I.e 1-25, 26-51, 52-77)</p> <p>I can create files 1-25 but I’m having trouble figuring out how to create a script that continues that process from where it left off, every time I run the script.</p>
[ { "answer_id": 74654386, "author": "Bairam", "author_id": 16885688, "author_profile": "https://Stackoverflow.com/users/16885688", "pm_score": 0, "selected": false, "text": "from django.shortcuts import reverse" }, { "answer_id": 74660846, "author": "kalkidan Teklu", "auth...
2022/12/01
[ "https://Stackoverflow.com/questions/74645839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658725/" ]
74,645,840
<p>I have this data</p> <pre><code>dw &lt;- structure(list(ccssid = c(1000023L, 1000043L), base.age = c(&quot;22&quot;, &quot;27&quot;), fu1.age = c(&quot;30&quot;, &quot;35&quot;), fu2.age = c(&quot;33&quot;, &quot;37&quot;), fu3.age = c(&quot;35&quot;, &quot;40&quot;), fu7.age = c(&quot;38&quot;, &quot;42&quot;), f...
[ { "answer_id": 74646211, "author": "jay.sf", "author_id": 6574038, "author_profile": "https://Stackoverflow.com/users/6574038", "pm_score": 3, "selected": true, "text": "reshape ## make prefixes to suffixes\nnames(dw) <- strsplit(names(dw), '\\\\.') |> lapply(rev) |> sapply(paste, collap...
2022/12/01
[ "https://Stackoverflow.com/questions/74645840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4701887/" ]
74,645,846
<p>In Pandas I can do the following:</p> <pre><code>data = pd.DataFrame( { &quot;era&quot;: [&quot;01&quot;, &quot;01&quot;, &quot;02&quot;, &quot;02&quot;, &quot;03&quot;, &quot;10&quot;], &quot;pred1&quot;: [1, 2, 3, 4, 5,6], &quot;pred2&quot;: [2,4,5,6,7,8], &quot;pred3&quot;: [3,5,6,8,9,1], &...
[ { "answer_id": 74646211, "author": "jay.sf", "author_id": 6574038, "author_profile": "https://Stackoverflow.com/users/6574038", "pm_score": 3, "selected": true, "text": "reshape ## make prefixes to suffixes\nnames(dw) <- strsplit(names(dw), '\\\\.') |> lapply(rev) |> sapply(paste, collap...
2022/12/01
[ "https://Stackoverflow.com/questions/74645846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/865662/" ]
74,645,899
<p>I am tring to learn python and want to know if i can do this, and how. I am trying to make binary looking code come up digit by digit, with delay. In maybe there is 15 numbers, and each repeat i would like to make it do a set of 5, with a space after.</p> <pre><code>if answer == 'MAYBE': deleteall() print(&q...
[ { "answer_id": 74646211, "author": "jay.sf", "author_id": 6574038, "author_profile": "https://Stackoverflow.com/users/6574038", "pm_score": 3, "selected": true, "text": "reshape ## make prefixes to suffixes\nnames(dw) <- strsplit(names(dw), '\\\\.') |> lapply(rev) |> sapply(paste, collap...
2022/12/01
[ "https://Stackoverflow.com/questions/74645899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658624/" ]
74,645,900
<p>I have example data as follows:</p> <pre><code>library(data.table) dat &lt;- fread(&quot;Survey Variable_codes_2022 D D1 A A1 B B1 B B3 B B2 E E1 B NA E NA&q...
[ { "answer_id": 74646032, "author": "Vinícius Félix", "author_id": 9696037, "author_profile": "https://Stackoverflow.com/users/9696037", "pm_score": 1, "selected": false, "text": "dat <- \nstructure(list(survey = c(\"D\", \"A\", \"B\", \"B\", \"B\", \"E\", \"B\", \n\"E\", \"B\"), var_code...
2022/12/01
[ "https://Stackoverflow.com/questions/74645900", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8071608/" ]
74,645,909
<p>I can get the current date using</p> <pre><code> Instant.now() </code></pre> <p>I am looking to get <code>18-&lt;current month&gt;-&lt;current year&gt;</code></p>
[ { "answer_id": 74646048, "author": "Basil Bourque", "author_id": 642706, "author_profile": "https://Stackoverflow.com/users/642706", "pm_score": 2, "selected": false, "text": "YearMonth // Represents a year and month only, no day of month. \n.now( \n ZoneId...
2022/12/01
[ "https://Stackoverflow.com/questions/74645909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5481621/" ]
74,645,913
<p>I have a go service which receives data from an external service.</p> <p>The data looks as follows (json)-</p> <pre class="lang-json prettyprint-override"><code>{ &quot;firstName&quot;: &quot;XYZ&quot;, &quot;lastName&quot;: &quot;ABC&quot;, &quot;createdAtTimestamp&quot;: &quot;Mon Nov 21 2022 17:01:59 GMT+05...
[ { "answer_id": 74646048, "author": "Basil Bourque", "author_id": 642706, "author_profile": "https://Stackoverflow.com/users/642706", "pm_score": 2, "selected": false, "text": "YearMonth // Represents a year and month only, no day of month. \n.now( \n ZoneId...
2022/12/01
[ "https://Stackoverflow.com/questions/74645913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6451802/" ]
74,645,915
<p>just starting testcontainers. I love the idea. thanks for investing in this project.</p> <p>I am trying to create a simple postgres 14.5 container (and susceeded) and now I am trying to populate it using the .withInitScript() method.</p> <p>the file I am feeding into the init method is a dump I created with pg_dumpa...
[ { "answer_id": 74650961, "author": "Eddú Meléndez", "author_id": 2203890, "author_profile": "https://Stackoverflow.com/users/2203890", "pm_score": 2, "selected": true, "text": "BTW, using pg_dump for my main DB also has many similar issues. new PostgreSQLContainer(\"postgres:14.5\")\n ...
2022/12/01
[ "https://Stackoverflow.com/questions/74645915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061835/" ]
74,646,034
<p>we had some issues with jenkins docker stages, where they needed to be run with root permissions (args root:root). At this time, I'm not 100% recalling why they made this decision, but I couldn't get around it a few months ago.</p> <p>The issue we mainly ran into with root:root was that jenkins couldn't clean up aft...
[ { "answer_id": 74646098, "author": "Saif", "author_id": 4777670, "author_profile": "https://Stackoverflow.com/users/4777670", "pm_score": -1, "selected": false, "text": "root:root root:root root:root jenkins docker.withRegistry" }, { "answer_id": 74656784, "author": "deric4",...
2022/12/01
[ "https://Stackoverflow.com/questions/74646034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1255642/" ]
74,646,040
<p>I'm writing a program that creates instances of EC2 on AWS. The names of the instances are &quot;Manager&quot; and &quot;Worker&quot;, and for some unknown reason, in some of the runs, an instance with the name &quot;-&quot; is created (just a dash). Has anyone experienced something similar?</p> <p><img src="https:/...
[ { "answer_id": 74646098, "author": "Saif", "author_id": 4777670, "author_profile": "https://Stackoverflow.com/users/4777670", "pm_score": -1, "selected": false, "text": "root:root root:root root:root jenkins docker.withRegistry" }, { "answer_id": 74656784, "author": "deric4",...
2022/12/01
[ "https://Stackoverflow.com/questions/74646040", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658759/" ]
74,646,052
<p>Given the following table with purchase data.</p> <pre><code>CREATE TABLE myTable ( id INT NOT NULL AUTO_INCREMENT, date DATETIME NOT NULL, subNo SMALLINT NOT NULL, poNo INT NOT NULL, PRIMARY KEY (id)) INSERT INTO myTable VALUES (0, '2022-11-01 12:43', 1, 800), (0, '2022-11-02 13:00', 1, 800), (0, '2022-11-03 ...
[ { "answer_id": 74646458, "author": "DannySlor", "author_id": 19174570, "author_profile": "https://Stackoverflow.com/users/19174570", "pm_score": 1, "selected": false, "text": "row_number() SubNo PO Date select Id \n ,Date\n ,SubNo \n ,PO\nfrom\n(\nselect *\n ,ro...
2022/12/01
[ "https://Stackoverflow.com/questions/74646052", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8368531/" ]
74,646,076
<p>Im working on a project with MVC and i'd like to know if there's a way to store the id of an input, which is a value received from one of my model items, into one of my JS variables</p> <p>here's how the id of the input is being adressed</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true...
[ { "answer_id": 74646458, "author": "DannySlor", "author_id": 19174570, "author_profile": "https://Stackoverflow.com/users/19174570", "pm_score": 1, "selected": false, "text": "row_number() SubNo PO Date select Id \n ,Date\n ,SubNo \n ,PO\nfrom\n(\nselect *\n ,ro...
2022/12/01
[ "https://Stackoverflow.com/questions/74646076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19075720/" ]
74,646,092
<p>I have an array that stores a key tree from a dictionary. For example</p> <pre class="lang-py prettyprint-override"><code>person_dict = [{&quot;person&quot;: {&quot;first_name&quot;: &quot;John&quot;, &quot;age_of_children&quot;: [1, 8, 13]}}, ...] </code></pre> <p>Becomes</p> <pre><code>key_tree = [0, &quot;person&...
[ { "answer_id": 74646140, "author": "S.B", "author_id": 13944524, "author_profile": "https://Stackoverflow.com/users/13944524", "pm_score": 2, "selected": true, "text": "def get_value(d, key_list):\n for key in key_list:\n d = d[key]\n return d\n\n\ndef set_value(d, key_list,...
2022/12/01
[ "https://Stackoverflow.com/questions/74646092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1600895/" ]
74,646,122
<p>If I want to default a date to the next working day I am using the following:</p> <pre><code>&lt;?php echo(date('d/m/Y',strtotime('+1 Weekdays'))); ?&gt; </code></pre> <p>For example: If a user is adding an item on a Friday it is given a default of the following Monday - the next working day.</p> <p>I have to cr...
[ { "answer_id": 74646140, "author": "S.B", "author_id": 13944524, "author_profile": "https://Stackoverflow.com/users/13944524", "pm_score": 2, "selected": true, "text": "def get_value(d, key_list):\n for key in key_list:\n d = d[key]\n return d\n\n\ndef set_value(d, key_list,...
2022/12/01
[ "https://Stackoverflow.com/questions/74646122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18745848/" ]
74,646,129
<p>I have requirement where I want to select multiple categories and subcategories and send their ids as a query string using Axios. Let's suppose if user has selected 2 categories having ids 1 and 2 and from these two categories he has selected subcategories having ids 31 and 65, I want request URL to be like this :</...
[ { "answer_id": 74646140, "author": "S.B", "author_id": 13944524, "author_profile": "https://Stackoverflow.com/users/13944524", "pm_score": 2, "selected": true, "text": "def get_value(d, key_list):\n for key in key_list:\n d = d[key]\n return d\n\n\ndef set_value(d, key_list,...
2022/12/01
[ "https://Stackoverflow.com/questions/74646129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7780102/" ]
74,646,176
<p>This is my first time dealing with regex. I need to have a string array as apart of a regex pattern. Specifically I’m trying to match a date so the two formats I’m dealing with are <code>DDTTTTMMM</code> and <code>MMMDDTTTT</code> the month is a <em>three letter abbreviation</em> (ex:<code>DEC</code>) I can’t contro...
[ { "answer_id": 74646140, "author": "S.B", "author_id": 13944524, "author_profile": "https://Stackoverflow.com/users/13944524", "pm_score": 2, "selected": true, "text": "def get_value(d, key_list):\n for key in key_list:\n d = d[key]\n return d\n\n\ndef set_value(d, key_list,...
2022/12/01
[ "https://Stackoverflow.com/questions/74646176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658899/" ]
74,646,182
<p>I am attempting to reserve memory for a med_array vector as seen below</p> <pre><code>vector &lt;int&gt; med_array = {}; med_array.reserve(50000); MedianFinder(); void addNum(int num); double findMedian(); vector&lt;int&gt; get_array(); void print_array(); </code></pre> <p>However, I get an error stating:</p> <pre c...
[ { "answer_id": 74646140, "author": "S.B", "author_id": 13944524, "author_profile": "https://Stackoverflow.com/users/13944524", "pm_score": 2, "selected": true, "text": "def get_value(d, key_list):\n for key in key_list:\n d = d[key]\n return d\n\n\ndef set_value(d, key_list,...
2022/12/01
[ "https://Stackoverflow.com/questions/74646182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20489120/" ]
74,646,196
<p>I have a dataframe with duplicate columns (number not known a priori) like this example:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: right;"></th> <th style="text-align: right;">a</th> <th style="text-align: right;">a</th> <th style="text-align: right;">a</th> <th ...
[ { "answer_id": 74646619, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 3, "selected": true, "text": "apply DataFrame.sum df.groupby(level=0, axis=1).apply(lambda x: x.sum(axis=1, skipna=False))\n a b\n0 3.0 ...
2022/12/01
[ "https://Stackoverflow.com/questions/74646196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20249888/" ]
74,646,236
<p>i would like to get an numpy array , shape 1000 row and 2 column.</p> <ol> <li>1st column will contain - Gaussian distributed variables with standard deviation 2 and mean 1.</li> <li>2nd column will contain Gaussian distributed variables with mean -1 and standard deviation 0.5.</li> </ol> <p>How to create the array...
[ { "answer_id": 74646357, "author": "Vini", "author_id": 6927944, "author_profile": "https://Stackoverflow.com/users/6927944", "pm_score": 1, "selected": false, "text": "import numpy as np\n\n# as per kwinkunks suggestion\nrng = np.random.default_rng()\n\narr1 = rng.normal(1, 2, 1000).res...
2022/12/01
[ "https://Stackoverflow.com/questions/74646236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20658907/" ]
74,646,244
<p>I want to identify the port of a device that is connected to my PC, it's a PINPAD, however the only way I could do it was by running the following command in CMD: <code>reg query HKLM\HARDWARE\DEVICEMAP\SERIALCOMM</code> After running this command in CMD &quot;PROMPT COMMAND&quot;, it returns the following informati...
[ { "answer_id": 74646357, "author": "Vini", "author_id": 6927944, "author_profile": "https://Stackoverflow.com/users/6927944", "pm_score": 1, "selected": false, "text": "import numpy as np\n\n# as per kwinkunks suggestion\nrng = np.random.default_rng()\n\narr1 = rng.normal(1, 2, 1000).res...
2022/12/01
[ "https://Stackoverflow.com/questions/74646244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15055108/" ]
74,646,298
<p>I am trying to mess around with matrices in python, and wanted to use multiprocessing to processes each row separately for a math operation, I have posted a minimal reproducible sample below, but keep in mind that for my actual code I do in-fact need the entire matrix passed to the helper function. This sample takes...
[ { "answer_id": 74646437, "author": "Ahmed AEK", "author_id": 15649230, "author_profile": "https://Stackoverflow.com/users/15649230", "pm_score": 1, "selected": false, "text": "sum import random\nfrom multiprocessing import Pool\nimport time\n\n\ndef addMatrixRow(row_data):\n rowSum = ...
2022/12/01
[ "https://Stackoverflow.com/questions/74646298", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12847370/" ]
74,646,312
<p>Output on ':hover' is always</p> <p>&quot;1IPSUM&quot;</p> <p>And if i decide to add a ':before' element with 'content:&quot;1&quot;' it just adds a 1 making the output before hover &quot;11&quot;</p> <p>The output i am looking for is:</p> <p>on 'hover' &quot;IPSUM&quot;</p> <p>Fiddle: <a href="https://jsfiddle.net...
[ { "answer_id": 74646437, "author": "Ahmed AEK", "author_id": 15649230, "author_profile": "https://Stackoverflow.com/users/15649230", "pm_score": 1, "selected": false, "text": "sum import random\nfrom multiprocessing import Pool\nimport time\n\n\ndef addMatrixRow(row_data):\n rowSum = ...
2022/12/01
[ "https://Stackoverflow.com/questions/74646312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15377919/" ]
74,646,324
<p>I want to solve an optimization problem in Julia. I am trying to define a binary variable x_{r,i} Thereby, the length of the sets of both indices is not the same.</p> <p>Let's say there is r_a and r_b, but for r_a there are i_1 and i_2 whereas for r_b there are i_1, i_2 and i_3 so in the end I want to get X_a_1, X_a...
[ { "answer_id": 74647064, "author": "Przemyslaw Szufel", "author_id": 9957710, "author_profile": "https://Stackoverflow.com/users/9957710", "pm_score": 0, "selected": false, "text": "julia> indices = [Symbol.(:a, 1:2);Symbol.(:b, 1:3)];\n\njulia> @variable(m, x[indices], Bin)\n1-dimension...
2022/12/01
[ "https://Stackoverflow.com/questions/74646324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20592131/" ]
74,646,363
<p>I have the following undirected graph (picture) that contains a cycle or a Hamiltonian path of length |V|= 8. The cycle (path) with no repeated edges and vertices is the red line. The adjacency matrix is :</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: left;"></th> <t...
[ { "answer_id": 74647534, "author": "ThomasIsCoding", "author_id": 12158757, "author_profile": "https://Stackoverflow.com/users/12158757", "pm_score": 3, "selected": true, "text": "graph.subisomorphic.lad g <- graph_from_adjacency_matrix(Ham, \"undirected\")\nes <- graph.subisomorphic.lad...
2022/12/01
[ "https://Stackoverflow.com/questions/74646363", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16346449/" ]
74,646,379
<p>if anyone can tell me how to draw this shape</p> <p><a href="https://i.stack.imgur.com/aAzc7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aAzc7.png" alt="enter image description here" /></a></p> <p>with an inside text, id greatly appreciate it. Is there a way to do it in regular xml or any andr...
[ { "answer_id": 74646452, "author": "Thracian", "author_id": 5457853, "author_profile": "https://Stackoverflow.com/users/5457853", "pm_score": 0, "selected": false, "text": "fun getBubbleShape(\n density: Density,\n cornerRadius: Dp,\n arrowWidth: Dp,\n arrowHeight: Dp,\n a...
2022/12/01
[ "https://Stackoverflow.com/questions/74646379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20659102/" ]
74,646,404
<p>I have a .txt file where the word 'picture:' is found multiple times in the file. How can I extract all words after the 'pictures:' word and save in a text file</p> <p>I tried the follow code,but doesn't work:</p> <pre><code>cat users_sl.txt |awk -F: '/^login:&quot;/{print $2}' cookies.txt </code></pre> <p><code>use...
[ { "answer_id": 74646576, "author": "Saif", "author_id": 4777670, "author_profile": "https://Stackoverflow.com/users/4777670", "pm_score": 0, "selected": false, "text": "awk '/picture:/{getline; print}' users_sl.txt > output.txt\n" }, { "answer_id": 74646705, "author": "Gilles...
2022/12/01
[ "https://Stackoverflow.com/questions/74646404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10256749/" ]
74,646,408
<p>What I want is to send encypted data from my app to PostgreSQL database via formatted string (query) by using Npgsql. Problem is that after sha256.ComputeHash() I get byte array which I'm trying to send by inserting it into my string query. It works fine but then in my dbms column I see System.Byte[] instead of byte...
[ { "answer_id": 74646576, "author": "Saif", "author_id": 4777670, "author_profile": "https://Stackoverflow.com/users/4777670", "pm_score": 0, "selected": false, "text": "awk '/picture:/{getline; print}' users_sl.txt > output.txt\n" }, { "answer_id": 74646705, "author": "Gilles...
2022/12/01
[ "https://Stackoverflow.com/questions/74646408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16632154/" ]
74,646,435
<p>If a have a dataframe from which I get the total ocurrence of a value per year-month period, is there a way to change the month's start and end date?</p> <p>For example, let's take this:</p> <pre><code>import pandas as pd data= { 'date': [ '2022-01-10', '2022-01-24', '2022-02-08', '2022-02-23', '202...
[ { "answer_id": 74646576, "author": "Saif", "author_id": 4777670, "author_profile": "https://Stackoverflow.com/users/4777670", "pm_score": 0, "selected": false, "text": "awk '/picture:/{getline; print}' users_sl.txt > output.txt\n" }, { "answer_id": 74646705, "author": "Gilles...
2022/12/01
[ "https://Stackoverflow.com/questions/74646435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20446652/" ]
74,646,457
<p>I am tasked with looking for files in a network location with many many sub directories. My current implementation is based on answers I found on stackoverflow:</p> <pre><code>private void PollFolder(string sourceDir) { try { // var start = DateTime.Now.AddHours(-_filesToGetTimeRangeFromNowInDays); ...
[ { "answer_id": 74646905, "author": "Gabriel Luci", "author_id": 1202807, "author_profile": "https://Stackoverflow.com/users/1202807", "pm_score": 2, "selected": false, "text": "Directory.GetFiles() new FileInfo(f).CreationTime FileInfo DirectoryInfo.EnumerateFiles() FileInfo var start = ...
2022/12/01
[ "https://Stackoverflow.com/questions/74646457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17784579/" ]
74,646,486
<p>I want to try out Python 3.11 to find out how much faster this version is than what I'm currently using (3.7.3). I am using Anaconda and Spyder, but Anaconda does not yet support Python 3.11 and additionally I regularly have problems with updating in Anaconda.</p> <p>Importantly, I want to maintain my Anaconda and S...
[ { "answer_id": 74646605, "author": "Saif", "author_id": 4777670, "author_profile": "https://Stackoverflow.com/users/4777670", "pm_score": -1, "selected": false, "text": "conda create -n py311 python=3.11\n conda activate py311\n conda deactivate\n conda install numpy scipy pandas\n" },...
2022/12/01
[ "https://Stackoverflow.com/questions/74646486", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20387372/" ]
74,646,588
<p>I have a dataframe with 3 columns, x-points, y-points and the heat. Like this:</p> <pre><code>X, Y, Z -2, 0, 1 -2, 1, 2 -2, 2, 5 -1, 0, 3 -1, 1, 5 -1, 2, 8 .., .., .. 2, 1, 4 2, 2, 1 </code></pre> <p>I want to plot a heatmap of this data with X and Y being the coords, and Z being the heat.</p> <p>I have tried lots o...
[ { "answer_id": 74646649, "author": "mozway", "author_id": 16343464, "author_profile": "https://Stackoverflow.com/users/16343464", "pm_score": 2, "selected": true, "text": "pivot seaborn.heatmap import seaborn as sns\n\nsns.heatmap(df.pivot(index='Y', columns='X', values='Z'))\n df2 = (df...
2022/12/01
[ "https://Stackoverflow.com/questions/74646588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17824108/" ]
74,646,592
<p>Im making a turtle race game, its a game where there are a few turtles who are assigned random speeds and then one turtle wins. However, just for fun im trying to add a few things to the game. For example, a button to exit the game and a button to restart the race. I have made only the exit button for now, and gave ...
[ { "answer_id": 74646897, "author": "JRiggles", "author_id": 8512262, "author_profile": "https://Stackoverflow.com/users/8512262", "pm_score": 1, "selected": false, "text": "tkinter.after() after # I don't know what your imports look like, so this is a boilerplate example\nimport tkinter ...
2022/12/01
[ "https://Stackoverflow.com/questions/74646592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19874383/" ]