qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,576,804
<p>I'm very new to this. I just started programming last week. I need some basic help. My assignment is to input five numbers and get the output to print out &quot;odd&quot; or &quot;even&quot; for each one. This is how I have started:</p> <pre class="lang-py prettyprint-override"><code>num = int(input()) if (num % 2) ...
[ { "answer_id": 74576844, "author": "Volodymyr Pivoshenko", "author_id": 20554409, "author_profile": "https://Stackoverflow.com/users/20554409", "pm_score": 1, "selected": false, "text": "import random\n\n# you can define your own limits\n# or you can use numpy to generate random numbers ...
2022/11/25
[ "https://Stackoverflow.com/questions/74576804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20582982/" ]
74,576,820
<p>If I have a React array state created with the <code>useState</code> hook, is it possible to somehow find out what elements have been updated? My intention is to run some code whenever the state updates, inside of a <code>useEffect</code> hook, but I would like to have access to the index(es) of the updated array el...
[ { "answer_id": 74576893, "author": "Amirhossein", "author_id": 11342834, "author_profile": "https://Stackoverflow.com/users/11342834", "pm_score": 2, "selected": true, "text": "const [myArray, setMyArray] = useState([]);\nconst [myPreviousArray, setMyPreviousArray] = useState([]);\n\n// ...
2022/11/25
[ "https://Stackoverflow.com/questions/74576820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18956037/" ]
74,576,878
<p>I would like to set up my XMonad such that I have a keybinding that switches to a specific layout when a key is being pressed down and held, and then switches back to the other specific layout when the same key is released.</p> <p>To switch to the first layout on key down, I have my keybindings in XMonad defined lik...
[ { "answer_id": 74577707, "author": "Daniel Wagner", "author_id": 791604, "author_profile": "https://Stackoverflow.com/users/791604", "pm_score": 2, "selected": true, "text": "KeyDownStatus case keyAlreadyDown of\n KeyDownStatus True -> ...\n KeyDownStatus False -> ...\n newtype dat...
2022/11/25
[ "https://Stackoverflow.com/questions/74576878", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5294916/" ]
74,576,940
<p>To set the scene, I have a set of data where two columns of the data have been mixed up. To give a simple example:</p> <pre class="lang-r prettyprint-override"><code>df1 &lt;- data.frame(Name = c(&quot;Bob&quot;, &quot;John&quot;, &quot;Mark&quot;, &quot;Will&quot;), City=c(&quot;Apple&quot;, &quot;Paris&quot;, &quo...
[ { "answer_id": 74576971, "author": "akrun", "author_id": 3732271, "author_profile": "https://Stackoverflow.com/users/3732271", "pm_score": 2, "selected": false, "text": "df1[] <- t(apply(df1, 1, function(x) \n {\n i1 <- x %in% df2$Cities\n i2 <- !i1\n x...
2022/11/25
[ "https://Stackoverflow.com/questions/74576940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19640936/" ]
74,576,960
<p>I found this in Javascript.info : <a href="https://plnkr.co/edit/Q6Aafx11IW6CnC8k?p=preview&amp;preview" rel="nofollow noreferrer">enter link description here</a>.</p> <p>Well it's a event delegation demonstration : a 9-cells table, when we click one of cells, the cell (<code>event.target</code>) changes its color i...
[ { "answer_id": 74576971, "author": "akrun", "author_id": 3732271, "author_profile": "https://Stackoverflow.com/users/3732271", "pm_score": 2, "selected": false, "text": "df1[] <- t(apply(df1, 1, function(x) \n {\n i1 <- x %in% df2$Cities\n i2 <- !i1\n x...
2022/11/25
[ "https://Stackoverflow.com/questions/74576960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12233694/" ]
74,576,965
<pre><code>int count_letters(string text, int length); int count_words(string text); int count_sentences(string text); void final(int letters, int words, int sentences); int main(void) { string text = get_string(&quot;Text: \n&quot;); int length = strlen(text); //printf(&quot;%i\n&quot;,length); int l...
[ { "answer_id": 74577155, "author": "0___________", "author_id": 6110094, "author_profile": "https://Stackoverflow.com/users/6110094", "pm_score": 3, "selected": true, "text": "int count_letters(string text) //better to return size_t\n{\n int result = 0;\n for(int index = 0; text[i...
2022/11/25
[ "https://Stackoverflow.com/questions/74576965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20574604/" ]
74,576,986
<p>How could I sort an array of events by the month they are occuring in?</p> <p>For instance, I want to sort this <code>events</code> array:</p> <pre><code>[{ event: 'prom', month: 'MAY' }, { event: 'graduation', month: 'JUN' }, { event: 'dance', month: 'JAN' }] </code></pre> <p>to become this array:</p> <pre><code>...
[ { "answer_id": 74577155, "author": "0___________", "author_id": 6110094, "author_profile": "https://Stackoverflow.com/users/6110094", "pm_score": 3, "selected": true, "text": "int count_letters(string text) //better to return size_t\n{\n int result = 0;\n for(int index = 0; text[i...
2022/11/25
[ "https://Stackoverflow.com/questions/74576986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20601836/" ]
74,577,033
<p>For example please find the below data:</p> <p><img src="https://i.stack.imgur.com/TBTBh.png" alt="enter image description here" /></p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>account</th> <th>balance</th> </tr> </thead> <tbody> <tr> <td>9999</td> <td>110</td> </tr> <tr> <td>9998</td...
[ { "answer_id": 74577155, "author": "0___________", "author_id": 6110094, "author_profile": "https://Stackoverflow.com/users/6110094", "pm_score": 3, "selected": true, "text": "int count_letters(string text) //better to return size_t\n{\n int result = 0;\n for(int index = 0; text[i...
2022/11/25
[ "https://Stackoverflow.com/questions/74577033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13311915/" ]
74,577,087
<p>I have :</p> <pre><code>const chars = 'abcdefghijklmnopqrstuvwxyz'; </code></pre> <p>I would like to create an array of strings containing</p> <pre><code>[aa,ab,ac .. zz ] </code></pre> <p>I could do it with loops but wanted to try using map.</p> <p>I tried:</p> <pre><code>const baseStrings = [chars].map(x=&gt;chars...
[ { "answer_id": 74577109, "author": "Konrad", "author_id": 5089567, "author_profile": "https://Stackoverflow.com/users/5089567", "pm_score": 1, "selected": true, "text": "split const chars = 'abcdefghijklmnopqrstuvwxyz';\nconst array = chars.split('')\nconsole.log(array) flatMap const cha...
2022/11/25
[ "https://Stackoverflow.com/questions/74577087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1592380/" ]
74,577,093
<h2>Update 1</h2> <p>I changed delegate from <code>viewModels</code> to <code>hiltNavGraphViewModels</code> and it's works. Thanks to ianhanniballake's comments. But now is another issue. If app have killed (Logcat -&gt; Terminate App), occurs exception <code>No destination with ID 2131296453 is on the NavController's ...
[ { "answer_id": 74670403, "author": "diziaq", "author_id": 2774914, "author_profile": "https://Stackoverflow.com/users/2774914", "pm_score": 1, "selected": false, "text": "NavController onSaveInstanceState() Fragment Activity NavController Fragment @AndroidEntryPoint\nclass MyFragment : F...
2022/11/25
[ "https://Stackoverflow.com/questions/74577093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5894542/" ]
74,577,108
<p>Is there a way to remove all words that are before code=&quot; and after &quot;&gt; in my file so I'm left with clearsky_night or cloudy, or sun etc?</p> <p>I have tried grep -o -P '(?&lt;=&gt;).*(?=&gt;)' but get an error message sating unknown option to 's'</p> <p>I also tried grep -o -P '(?&lt;=code=&quot;).*(?=&...
[ { "answer_id": 74670403, "author": "diziaq", "author_id": 2774914, "author_profile": "https://Stackoverflow.com/users/2774914", "pm_score": 1, "selected": false, "text": "NavController onSaveInstanceState() Fragment Activity NavController Fragment @AndroidEntryPoint\nclass MyFragment : F...
2022/11/25
[ "https://Stackoverflow.com/questions/74577108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20400773/" ]
74,577,147
<p>I have the following <a href="https://storybook.js.org/docs/react/essentials/toolbars-and-globals" rel="nofollow noreferrer">globalTypes</a> to enable a toolbar in storybook that lets me select the theme:</p> <pre><code>export const globalTypes = { theme: { name: 'Theme', description: 'Global theme', d...
[ { "answer_id": 74670403, "author": "diziaq", "author_id": 2774914, "author_profile": "https://Stackoverflow.com/users/2774914", "pm_score": 1, "selected": false, "text": "NavController onSaveInstanceState() Fragment Activity NavController Fragment @AndroidEntryPoint\nclass MyFragment : F...
2022/11/25
[ "https://Stackoverflow.com/questions/74577147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/554340/" ]
74,577,162
<p>I made some wrapping aroung routing</p> <pre><code>func (p Page) MainInitHandlers() { http.HandleFunc(&quot;/&quot;, p.mainHandler) http.HandleFunc(&quot;/save&quot;, p.saveHandler) } </code></pre> <p>If something wrong will happen inside my hadlers (mainHandler, saveHandler), can I get it somehow? I want to re...
[ { "answer_id": 74579060, "author": "Steve D", "author_id": 931760, "author_profile": "https://Stackoverflow.com/users/931760", "pm_score": 1, "selected": false, "text": "type withError func(ctx context.Context, r *http.Request, w http.ResponseWriter) error\n\nfunc wrap(f withError) http....
2022/11/25
[ "https://Stackoverflow.com/questions/74577162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5654843/" ]
74,577,254
<p>I am trying to import and pass an image as a prop to my Skill component from my Skills.tsx file. The image path is the following:</p> <p>public/images/skill-logos/html.png.</p> <p>Here is what my Skills.tsx file looks like:</p> <pre><code>import React from 'react'; import Skill from './Skill'; import HtmlLogo from '...
[ { "answer_id": 74579060, "author": "Steve D", "author_id": 931760, "author_profile": "https://Stackoverflow.com/users/931760", "pm_score": 1, "selected": false, "text": "type withError func(ctx context.Context, r *http.Request, w http.ResponseWriter) error\n\nfunc wrap(f withError) http....
2022/11/25
[ "https://Stackoverflow.com/questions/74577254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602121/" ]
74,577,264
<p>Need help to make htaccess. I use 2 domains: abc.domain1.com and domain2.com. the htaccess will be in domain2.com. i want to use it for vbulletin shorturl.</p> <p>The idea are;</p> <ol> <li><p>redirect <code>domain2.com/[numbers]</code> (example= <code>domain2.com/678</code>) to <code>abc.domain1.com/threads/[same n...
[ { "answer_id": 74577499, "author": "amphetamachine", "author_id": 237955, "author_profile": "https://Stackoverflow.com/users/237955", "pm_score": 3, "selected": true, "text": "/f1234 ^/(.*) https://abc.domain1.com/threads/f1234 RedirectMatch RedirectMatch ^/f(.*) https://abc.domain1.com/...
2022/11/25
[ "https://Stackoverflow.com/questions/74577264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10656184/" ]
74,577,287
<p>I'm trying to consume an endpoint from ABAP, by instantiate a <code>if_http_client</code> from <code>cl_http_client=&gt;create_by_url</code>. That process works fine when I don't need to use a signed certificate. Usually I just include the certificate using the <code>STRUST</code> transaction.</p> <p>But for this sp...
[ { "answer_id": 74579758, "author": "phil soady", "author_id": 1347784, "author_profile": "https://Stackoverflow.com/users/1347784", "pm_score": 2, "selected": false, "text": " cl_http_client=>create_by_url(\n EXPORTING\n url = 'url' \n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1257304/" ]
74,577,313
<p>I am still new to React Native and I would like to let users use a google account on my React Native app. My question is if signInWithRedirect function is available in native apps. I first wrote signInWithPopup, but I got an error and found out I couldn't use it in native apps. Also, I used a redirect function, but ...
[ { "answer_id": 74577455, "author": "criszz77", "author_id": 14056591, "author_profile": "https://Stackoverflow.com/users/14056591", "pm_score": 2, "selected": true, "text": "Firebase Authentication Firebase Authentication google-signin" } ]
2022/11/25
[ "https://Stackoverflow.com/questions/74577313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16295143/" ]
74,577,324
<p>I have a DataFrame with a column that contains a dictionary as follows:</p> <pre><code>df: date dictionary 0 2021-01-01 00:00:00 + 00:00 'Total':{'USD':100, 'size':20}, 'country':{'USA': {'income': 20000}, 'fees': {'total': 55}} 1 2021-01-01 00:00:00 + 00:00 ...
[ { "answer_id": 74577391, "author": "PaulS", "author_id": 11564487, "author_profile": "https://Stackoverflow.com/users/11564487", "pm_score": 0, "selected": false, "text": "aux = pd.json_normalize(df.dictionary, sep='_')\n(aux.filter(like='income').loc[0]\n .index.str.extract(r'.*_(.*)_.*...
2022/11/25
[ "https://Stackoverflow.com/questions/74577324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12244355/" ]
74,577,363
<p>We use a bi-monthly payroll where employees get paid on the 15th and last days of the month.</p> <p>If those days fall on a Saturday, Sunday or holiday, then we get paid on the last day before then that isn't a Saturday, Sunday or holiday.</p> <p>For example, take this week, April 15th is a Friday but its defined as...
[ { "answer_id": 74577861, "author": "EdmCoff", "author_id": 5504922, "author_profile": "https://Stackoverflow.com/users/5504922", "pm_score": 0, "selected": false, "text": "WITH noholidays AS\n(\nSELECT dt\nFROM \n generate_dates(\n TIMESTAMP '2022-01-01 00:00:00',\n TIMESTAMP '2022-04-...
2022/11/25
[ "https://Stackoverflow.com/questions/74577363", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16771377/" ]
74,577,374
<p>I'm trying to get values in column z that contains null values or integers:</p> <pre><code>df = pd.DataFrame({'X': [1, 2, 3, 4], 'Y': [2, 10, 13, 18], 'Z': [3, None, 5, None]}) a = df[(df.X == 1) &amp; (df.Y == 2)].Z.item() print(a) #output: 3 b = df[(df.X == 7) &amp; (df.Y ==...
[ { "answer_id": 74577421, "author": "Psidom", "author_id": 4983450, "author_profile": "https://Stackoverflow.com/users/4983450", "pm_score": 1, "selected": false, "text": "next(..., None) b = next(iter(df[(df.X == 7) & (df.Y == 18)].Z), None)\nprint(b)\n# None\n" }, { "answer_id":...
2022/11/25
[ "https://Stackoverflow.com/questions/74577374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18086775/" ]
74,577,392
<p>I was trying to implement a RecyclerView, it shows no errors while debugging but it crushes when ckick on the textView to intent to dayone.xml activity (RecyclerView layout).</p> <p>I get this in logcat:</p> <pre><code> Process: com.example.mozillaevent, PID: 15060 java.lang.ClassCastException: androidx.cardvi...
[ { "answer_id": 74577421, "author": "Psidom", "author_id": 4983450, "author_profile": "https://Stackoverflow.com/users/4983450", "pm_score": 1, "selected": false, "text": "next(..., None) b = next(iter(df[(df.X == 7) & (df.Y == 18)].Z), None)\nprint(b)\n# None\n" }, { "answer_id":...
2022/11/25
[ "https://Stackoverflow.com/questions/74577392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17545414/" ]
74,577,408
<p>I have a dataframe with OHLC data. I need to get the close price into the pandas series, using the timestamp column as the index.</p> <p>I am reading from a sqlite db into my df:</p> <pre><code>conn = sql.connect('allStockData.db') price = pd.read_sql_query(&quot;SELECT * from ohlc_minutes&quot;, conn) price['times...
[ { "answer_id": 74577421, "author": "Psidom", "author_id": 4983450, "author_profile": "https://Stackoverflow.com/users/4983450", "pm_score": 1, "selected": false, "text": "next(..., None) b = next(iter(df[(df.X == 7) & (df.Y == 18)].Z), None)\nprint(b)\n# None\n" }, { "answer_id":...
2022/11/25
[ "https://Stackoverflow.com/questions/74577408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7317408/" ]
74,577,433
<p>I'm a beginner and I don't understand why it doesn't work. I have code that allows you to move a circle on the screen. I also need to make a popup appear when clicking on a circle.Also, I want a popup to appear in the middle of the screen when the circle is clicked</p> <p>I have code that allows you to move a circle...
[ { "answer_id": 74577799, "author": "Carl-Christian Hänsel", "author_id": 20276225, "author_profile": "https://Stackoverflow.com/users/20276225", "pm_score": 1, "selected": false, "text": "<main>\n <div class=\"button\" data-popup=\"false\"></div>\n <label name=\"popup\" id=\"popup\...
2022/11/25
[ "https://Stackoverflow.com/questions/74577433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20601932/" ]
74,577,444
<p>I would like to do the following validation:</p> <ul> <li>If it was necessary to inform a coupon, the error message would appear, but even with the following code this is not possible.</li> </ul> <pre><code>import * as yup from 'yup'; export type FormValues = { promotionalCode: string; requirePromotionalCode: b...
[ { "answer_id": 74577799, "author": "Carl-Christian Hänsel", "author_id": 20276225, "author_profile": "https://Stackoverflow.com/users/20276225", "pm_score": 1, "selected": false, "text": "<main>\n <div class=\"button\" data-popup=\"false\"></div>\n <label name=\"popup\" id=\"popup\...
2022/11/25
[ "https://Stackoverflow.com/questions/74577444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19387169/" ]
74,577,448
<p>I'm trying to alternate between 2 threads:</p> <pre class="lang-py prettyprint-override"><code>import threading def test1(): for _ in range(3): print(&quot;Test1&quot;) def test2(): for _ in range(3): print(&quot;Test2&quot;) t1 = threading.Thread(target=test1) t2 = threading.Thread(ta...
[ { "answer_id": 74577503, "author": "Krumelur", "author_id": 292477, "author_profile": "https://Stackoverflow.com/users/292477", "pm_score": -1, "selected": false, "text": "multiprocessing" }, { "answer_id": 74582387, "author": "Kai - Kazuya Ito", "author_id": 8172439, ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8172439/" ]
74,577,453
<p>I getting an incompatible-pointer-types error when trying to Initialize a typedef struct with a pointer to a char buffer. The struct looks like this:</p> <pre><code>typedef struct otCryptoKey { const uint8_t *mKey; ///&lt; Pointer to the buffer containing key. NULL indicates to use `mKeyRef`. uint16_t ...
[ { "answer_id": 74577514, "author": "Schwern", "author_id": 14660, "author_profile": "https://Stackoverflow.com/users/14660", "pm_score": 0, "selected": false, "text": "otCryptoKey aKey = {mKeyPointer}; otCryptoKey aKey = { .mKey = mKey };" }, { "answer_id": 74577523, "author"...
2022/11/25
[ "https://Stackoverflow.com/questions/74577453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11372980/" ]
74,577,462
<p>I have the problem of finding the point which is closest to a line from an array of x- and y-data. The line is <strong>semi-infinite</strong> originating from the origin at (0,0) and running into the direction of a given angle.</p> <p>The x,y data of the points are given in relation to the origin.</p> <p><strong>Ho...
[ { "answer_id": 74577514, "author": "Schwern", "author_id": 14660, "author_profile": "https://Stackoverflow.com/users/14660", "pm_score": 0, "selected": false, "text": "otCryptoKey aKey = {mKeyPointer}; otCryptoKey aKey = { .mKey = mKey };" }, { "answer_id": 74577523, "author"...
2022/11/25
[ "https://Stackoverflow.com/questions/74577462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20315765/" ]
74,577,465
<p>In my game I have a shooting enemy that I want to attack the player only when he's in range, and to attack him once every 3 seconds. This is the code I need repeated</p> <p><a href="https://i.stack.imgur.com/fT479.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fT479.png" alt="enter image descript...
[ { "answer_id": 74577816, "author": "Max Play", "author_id": 5593150, "author_profile": "https://Stackoverflow.com/users/5593150", "pm_score": 0, "selected": false, "text": "Transform target;\n\nprivate void OnTriggerEnter2D(Collider2D other)\n{\n if (other.CompareTag(\"Player\"))\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20324453/" ]
74,577,488
<p>I have a project that includes c++ binaries and python scripts, it's setup such that it should be installed using setuptools. One of the python files is intended to be both used as a script &quot; <code>python3 script_name.py params</code> and for it's primary function to be used in other python projects <code>from ...
[ { "answer_id": 74581950, "author": "suvayu", "author_id": 289784, "author_profile": "https://Stackoverflow.com/users/289784", "pm_score": 2, "selected": true, "text": "setup.py from setuptools import setup, find_packages\n\nsetup(\n name=\"mypkg\",\n packages=find_packages(exclude=...
2022/11/25
[ "https://Stackoverflow.com/questions/74577488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3271145/" ]
74,577,534
<p>I have 5 tables: 1.event - id, name, location 2.location - id, country_id, county_id, city_id 3.country - id, name 4.county - id, name, country_id, 5. city - id, name, county_id</p> <p>I can get to work for populate city select box</p> <p>I have 2 form types EventLocationType and LocationType</p> <p>Thank you in adv...
[ { "answer_id": 74581950, "author": "suvayu", "author_id": 289784, "author_profile": "https://Stackoverflow.com/users/289784", "pm_score": 2, "selected": true, "text": "setup.py from setuptools import setup, find_packages\n\nsetup(\n name=\"mypkg\",\n packages=find_packages(exclude=...
2022/11/25
[ "https://Stackoverflow.com/questions/74577534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602324/" ]
74,577,545
<p>I have a sample code for the Sklearn taken from the website. I am trying to learn how to classify points using Sklearn(Scikit-Learn). Here is the code:</p> <pre><code>import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from sklearn.model_selection import train_test_split f...
[ { "answer_id": 74581950, "author": "suvayu", "author_id": 289784, "author_profile": "https://Stackoverflow.com/users/289784", "pm_score": 2, "selected": true, "text": "setup.py from setuptools import setup, find_packages\n\nsetup(\n name=\"mypkg\",\n packages=find_packages(exclude=...
2022/11/25
[ "https://Stackoverflow.com/questions/74577545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4948889/" ]
74,577,560
<p>So i have a regular method and a HttpGet method:</p> <pre><code> //Create a new note public ActionResult EditNote() { return View(); } //Edit a selected note [HttpGet] public ActionResult EditNote(int id) { var model = NotesProcessor.LoadNote(id); return View(m...
[ { "answer_id": 74581950, "author": "suvayu", "author_id": 289784, "author_profile": "https://Stackoverflow.com/users/289784", "pm_score": 2, "selected": true, "text": "setup.py from setuptools import setup, find_packages\n\nsetup(\n name=\"mypkg\",\n packages=find_packages(exclude=...
2022/11/25
[ "https://Stackoverflow.com/questions/74577560", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20268332/" ]
74,577,564
<p>I've seen <a href="https://stackoverflow.com/a/72656286/11832197">this</a>, but it doesn't return the desired result, which would be:</p> <pre><code>[ [4, &quot;frente&quot;, 196], [5, &quot;frente&quot;, 196] ] </code></pre> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-bab...
[ { "answer_id": 74577677, "author": "cmgchess", "author_id": 13583510, "author_profile": "https://Stackoverflow.com/users/13583510", "pm_score": 1, "selected": true, "text": "function getUniqueData(arr = [\n [4, \"frente\", 196],\n [4, \"frente\", 196],\n [5, \"frente\", 196] \n], uni...
2022/11/25
[ "https://Stackoverflow.com/questions/74577564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11832197/" ]
74,577,567
<p>I would like to print some specific lines from a file, only those lines that come after a certain word appears on a line ('Ingredients:') and before another word appears ('Instructions:'). The file is a list of recipes and I want to be able to print out only the ingredients.</p> <p>example of the text:</p> <pre><cod...
[ { "answer_id": 74577800, "author": "CreepyRaccoon", "author_id": 18342123, "author_profile": "https://Stackoverflow.com/users/18342123", "pm_score": 0, "selected": false, "text": "start, stop = 0, 0\nwith open('recipes.txt', 'r') as f:\n lines = f.readlines()\nfor n in range(len(lines...
2022/11/25
[ "https://Stackoverflow.com/questions/74577567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20234680/" ]
74,577,582
<p>I am using DRF and I have these pieces of code as models, register view and serializer But anytime I signup a user the password does not hashed and I can't see to figure out why.</p> <p>models.py</p> <pre><code>class UserManager(BaseUserManager): def create_user(self, email, password=None, **kwargs): if ...
[ { "answer_id": 74577800, "author": "CreepyRaccoon", "author_id": 18342123, "author_profile": "https://Stackoverflow.com/users/18342123", "pm_score": 0, "selected": false, "text": "start, stop = 0, 0\nwith open('recipes.txt', 'r') as f:\n lines = f.readlines()\nfor n in range(len(lines...
2022/11/25
[ "https://Stackoverflow.com/questions/74577582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14752392/" ]
74,577,602
<p>I have a LAMBDA function nested in a <em>lambda helper function</em> (<code>MAKEARRAY</code>) to create a column with a series of dates. The series starts with the last day of the month defined in cell <code>start_date</code> followed by the last day of the following month. This one month interval goes on a number o...
[ { "answer_id": 74577800, "author": "CreepyRaccoon", "author_id": 18342123, "author_profile": "https://Stackoverflow.com/users/18342123", "pm_score": 0, "selected": false, "text": "start, stop = 0, 0\nwith open('recipes.txt', 'r') as f:\n lines = f.readlines()\nfor n in range(len(lines...
2022/11/25
[ "https://Stackoverflow.com/questions/74577602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19398081/" ]
74,577,606
<p>I made a simple code and my question is if is there a way to avoid globals in tkinter in this kind of scenario:</p> <pre><code>root = Tk() root.title('Main') root.minsize(400, 450) toggle = True def change_now(): global toggle root.config(bg='blue') if toggle else root.config(bg='black') toggle = not...
[ { "answer_id": 74577662, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "from tkinter import Tk, Button, BooleanVar\nroot = Tk()\nroot.title('Main')\nroot.minsize(400, 450)\n\ntoggle_t...
2022/11/25
[ "https://Stackoverflow.com/questions/74577606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19934155/" ]
74,577,614
<p>I have defined a table like this:</p> <pre><code>create or replace TABLE TEST_TABLE cluster by LINEAR(ARTICLE, ORDER_DATE) ( ORDER_DATE DATE ARTICLE VARCHAR(1555) note VARCHAR(1555) ); </code></pre> <p>If I try to rename the column <code>ORDER_DATE</cod...
[ { "answer_id": 74577831, "author": "Himanshu Kandpal", "author_id": 11227919, "author_profile": "https://Stackoverflow.com/users/11227919", "pm_score": 0, "selected": false, "text": "create or replace TABLE TEST_TABLE --cluster by LINEAR(ARTICLE, ORDER_DATE)\n(\n ORDER_DATE ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12304000/" ]
74,577,631
<p>I have the following entities:</p> <pre><code>public class Book { public int Id { get; set; } public string Name { get; set; } = string.Empty; public int? AddedByUserId { get; set; } public virtual ICollection&lt;Author&gt; Authors { get; set; } = new HashSet&lt;Author&gt;(); } public class Author { pub...
[ { "answer_id": 74577758, "author": "Guru Stron", "author_id": 2501279, "author_profile": "https://Stackoverflow.com/users/2501279", "pm_score": 3, "selected": true, "text": "newAuthor.Book var newAuthor = new Author();\nnewAuthor.BookId = 1;\nnewAuthor.Book = null;\n var newAuthor = new ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20326571/" ]
74,577,648
<p>I've been playing with various ways of using generics and have hit a road block.</p> <p>Consider the following classes:</p> <pre><code>public abstract class DataElement { public int Id { get; set; } } public class School : DataElement { public int Id { get; set; } public string Name { get; set; } = stri...
[ { "answer_id": 74577758, "author": "Guru Stron", "author_id": 2501279, "author_profile": "https://Stackoverflow.com/users/2501279", "pm_score": 3, "selected": true, "text": "newAuthor.Book var newAuthor = new Author();\nnewAuthor.BookId = 1;\nnewAuthor.Book = null;\n var newAuthor = new ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62706/" ]
74,577,651
<p>I am learning python and wanted to try and make a little script to handle &quot;pulling names from a hat&quot; to decide who has who for Christmas. I have no doubt that there is a more efficient way than this, but it works for the moment.</p> <p>My issue is that it's taking a very inconsistent amount of time to comp...
[ { "answer_id": 74577758, "author": "Guru Stron", "author_id": 2501279, "author_profile": "https://Stackoverflow.com/users/2501279", "pm_score": 3, "selected": true, "text": "newAuthor.Book var newAuthor = new Author();\nnewAuthor.BookId = 1;\nnewAuthor.Book = null;\n var newAuthor = new ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20074479/" ]
74,577,658
<h2>I'd like to upgrade magento from 2.3.4 to 2.4.3. But I cannot upgrade it. this is error.</h2> <p>Your requirements could not be resolved to an installable set of packages.</p> <p>Problem 1 - Root composer.json requires magento/product-community-edition 2.4.3 -&gt; satisfiable by magento/product-community-edition[2....
[ { "answer_id": 74577758, "author": "Guru Stron", "author_id": 2501279, "author_profile": "https://Stackoverflow.com/users/2501279", "pm_score": 3, "selected": true, "text": "newAuthor.Book var newAuthor = new Author();\nnewAuthor.BookId = 1;\nnewAuthor.Book = null;\n var newAuthor = new ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19948367/" ]
74,577,665
<p>I've just been debugging a slow SQL query.</p> <p>It's a join between 2 tables, with a WHERE clause conditioning on either a property of 1 table OR the other.</p> <p>If I re-write it as a UNION then it's suddenly 2 orders of magnitude faster, even though those 2 queries produce identical outputs:</p> <pre><code>DECL...
[ { "answer_id": 74577843, "author": "J.D.", "author_id": 5059085, "author_profile": "https://Stackoverflow.com/users/5059085", "pm_score": 2, "selected": false, "text": "OR OR UNION Bookings UNION" }, { "answer_id": 74578149, "author": "T N", "author_id": 12637193, "au...
2022/11/25
[ "https://Stackoverflow.com/questions/74577665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1662268/" ]
74,577,671
<p>I have an WPF usercontrol which is used in a winforms applications. WPF usercontrol is contained within an ElementHost container.</p> <p>This WPF usercontrol has some images, button with images, labels, etc.</p> <p>I have a dictionary with some geometries, the following is one of them.</p> <pre><code> &lt;Geometry ...
[ { "answer_id": 74577843, "author": "J.D.", "author_id": 5059085, "author_profile": "https://Stackoverflow.com/users/5059085", "pm_score": 2, "selected": false, "text": "OR OR UNION Bookings UNION" }, { "answer_id": 74578149, "author": "T N", "author_id": 12637193, "au...
2022/11/25
[ "https://Stackoverflow.com/questions/74577671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624552/" ]
74,577,695
<p>I am trying to create a button for my personal portfolio website that allows users to download my CV from clicking on a button. I am not sure went wrong in my HTML5 file. Right now, when the button is clicked on, it simply opens up the CV on a new page.</p> <pre><code>&lt;div class=&quot;d-block d-sm-flex align-item...
[ { "answer_id": 74577843, "author": "J.D.", "author_id": 5059085, "author_profile": "https://Stackoverflow.com/users/5059085", "pm_score": 2, "selected": false, "text": "OR OR UNION Bookings UNION" }, { "answer_id": 74578149, "author": "T N", "author_id": 12637193, "au...
2022/11/25
[ "https://Stackoverflow.com/questions/74577695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19311334/" ]
74,577,699
<p>I am trying to understand why first code run only once vs second code is running until it checks all the items in the list.</p> <p>1.</p> <pre><code>def get_word_over_10_char(list_of_words): for word in list_of_words: if len(word) &gt; 10: return word else: return &quot;&q...
[ { "answer_id": 74577755, "author": "Timo", "author_id": 12888866, "author_profile": "https://Stackoverflow.com/users/12888866", "pm_score": 1, "selected": false, "text": "return return if else list_of_words return word list_of_words" }, { "answer_id": 74578067, "author": "Ant...
2022/11/25
[ "https://Stackoverflow.com/questions/74577699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602484/" ]
74,577,701
<p><strong>Note:</strong></p> <p>Please note that I have tried the following to solve my problem before posting:</p> <ul> <li><a href="https://stackoverflow.com/questions/11322801/transpose-reshape-dataframe-without-timevar-from-long-to-wide-format">Transpose / reshape dataframe without &quot;timevar&quot; from long to...
[ { "answer_id": 74577755, "author": "Timo", "author_id": 12888866, "author_profile": "https://Stackoverflow.com/users/12888866", "pm_score": 1, "selected": false, "text": "return return if else list_of_words return word list_of_words" }, { "answer_id": 74578067, "author": "Ant...
2022/11/25
[ "https://Stackoverflow.com/questions/74577701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8447442/" ]
74,577,740
<p>I have an Msbuild project and a solution with 20 projects. This needs to compile both under VS and under dotnet cli (w/o special arguments)</p> <p>Some of the projects are on the root of the solution and others are in sub folders:</p> <pre><code>SolutionRoot /Proj1 /Proj2 /Tests /Proj1Tests ...
[ { "answer_id": 74577755, "author": "Timo", "author_id": 12888866, "author_profile": "https://Stackoverflow.com/users/12888866", "pm_score": 1, "selected": false, "text": "return return if else list_of_words return word list_of_words" }, { "answer_id": 74578067, "author": "Ant...
2022/11/25
[ "https://Stackoverflow.com/questions/74577740", "https://Stackoverflow.com", "https://Stackoverflow.com/users/594571/" ]
74,577,761
<p>I have a df with a column that some values are having <code>...</code> and some <code>..</code> and some are without dots.</p> <pre><code> Type range Mike 10..13 Ni 3..4 NANA 2...3 Gi 2 </code></pre> <p>desired output should look like this</p> <pre><code>Type range Mike 10 Mi...
[ { "answer_id": 74577830, "author": "Psidom", "author_id": 4983450, "author_profile": "https://Stackoverflow.com/users/4983450", "pm_score": 3, "selected": true, "text": "import re\ndef str_to_list(s):\n if not s: return []\n nums = re.split('\\.{2,3}', s)\n if len(nums) == 1:\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17561414/" ]
74,577,765
<p>I have a question reagarding my code, if anybody has some clues how to solve it. I need to write only one line of code, which outputs the line numbers of those lines that don´t include spaces between the words. My attempt was the following:</p> <pre><code>[line for line in range(len(open('test.txt').readlines())) if...
[ { "answer_id": 74577977, "author": "Dash", "author_id": 11542834, "author_profile": "https://Stackoverflow.com/users/11542834", "pm_score": 2, "selected": false, "text": "lines = []\n\nfor line in range(len(open('test.txt').readlines()):\n if ' ' not in open('test.txt').readlines(line...
2022/11/25
[ "https://Stackoverflow.com/questions/74577765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20594803/" ]
74,577,766
<p>I have a dictionary with multiple keys, and multiple values per key (sometimes). The dictionary is zipped from two lists which I've pulled from an excel sheet using pandas. I've converted the values to integers. My dictionary looks like this:</p> <pre><code>dictionary = {'A223':[1,4,5],'B224':[7,8,9],'A323':[4,5],'B...
[ { "answer_id": 74577787, "author": "Grzegorz Skibinski", "author_id": 11610186, "author_profile": "https://Stackoverflow.com/users/11610186", "pm_score": 3, "selected": true, "text": ">>> dictionary\n{'A223': [1, 4, 5], 'B224': [7, 8, 9], 'A323': [4, 5], 'B456': [3, 3, 4, 5]}\n>>> dict(m...
2022/11/25
[ "https://Stackoverflow.com/questions/74577766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19164227/" ]
74,577,769
<p>A customer has multiple resource groups in Azure with multiple virtual networks and many private DNS zones to enable private endpoints. Some of the private DNS zones are in different resource groups, but with the same domain name (e.g. privatelink.azurewebsites.net). I have some virtual networks, where I want to kno...
[ { "answer_id": 74639678, "author": "dbgalz11", "author_id": 18746184, "author_profile": "https://Stackoverflow.com/users/18746184", "pm_score": 1, "selected": false, "text": "\n$subscriptionId = your subscription ID\"\nSet-AzContext -SubscriptionId $subscriptionId\n$subName = \"your Subs...
2022/11/25
[ "https://Stackoverflow.com/questions/74577769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/456886/" ]
74,577,791
<p>I have this table</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>subs_id</th> <th>amount</th> <th>flag</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>15</td> <td>target</td> </tr> <tr> <td>1</td> <td>10</td> <td>taker</td> </tr> <tr> <td>2</td> <td>30</td> <td>target</td> </tr> <tr> <t...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8758029/" ]
74,577,795
<p>So for context, there is a popular problem called the &quot;Fibbonaci Clock.&quot; Essentially, you have a list of colors, for example [&quot;white&quot;,&quot;blue&quot;,&quot;red&quot;,&quot;green&quot;,&quot;white&quot;]. The first item in the list holds a value, of 1, then the second holds again a value of 1, th...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13995670/" ]
74,577,832
<p>I'm applying vgg16 as feature extraction method, However my instructor require a high recall. (90%-95%). I will explain about my dataset my data are labeled videos of traffic sign in a foggy weather (they are labeled as visible, not visible, poor viability) I extracted frames from the video as image and randomly sto...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20527442/" ]
74,577,833
<p>The question was to find the factorial and this is what I did</p> <pre><code>//Factorial of n numbers #include&lt;stdio.h&gt; int main() { int num, i, fact, s; printf(&quot;Enter the value: &quot;); scanf(&quot;%d&quot;,&amp;num); fact = num; i = num; while(i&gt;1) { s = i-1; ...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602588/" ]
74,577,836
<p>I want to update a series if it is missing a key, but my code is generating an error.</p> <p>This is my code:</p> <pre><code>for item in list: if item not in my_series.keys(): my_series = my_series[item] = 0 </code></pre> <p>Where my_series is a series of dtype int64. It's actually a value count.</p> <p>...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2738545/" ]
74,577,851
<p>I know that React will render twice when using a hook like this one:</p> <pre><code>const [userPermissions, setUserPermissions] = useState(); //Use GET from myService to save to state useEffect(() =&gt; { myService.canUserAccess(userId) .then(({userPermissions}) =&gt; setUserPermissions(userPermissions)); }); <...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/931724/" ]
74,577,878
<p>Would anyone know how to conditionally change a symbol color for example to be representative of the Azure Maps JS SDK symbol layer?</p> <p>I am already utilizing the CustomJSProperties of ASPXGridview and on grid's init i'm creating a datasource &amp; symbol layer for a map..</p> <p>the datasource has an id propert...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577878", "https://Stackoverflow.com", "https://Stackoverflow.com/users/719076/" ]
74,577,896
<p>I have a png image that I want to crop, removing the top and bottom white space.</p> <p>I use the following code:</p> <pre><code>from PIL import Image for f in pa_files: img = f im = Image.open(img) width, height = im.size pixels = list(im.getdata()) pixels = [pixels[i * width:(i + 1) * width] fo...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2123706/" ]
74,577,899
<p>I have a data frame containing 5 probes which are my variables in a dataframe, cg02823866, cg13474877, cg14305799, cg15837913 and cg19724470. I want to create a boxplot that will group cg02823866 and cg14305799 into a group called 'GeneBody' and then cg13474877, cg14305799 and cg19724470 into a group called 'Promote...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602598/" ]
74,577,957
<p>im having trouble figuring out how to fetch a url that contains an array in react</p> <p>the parent component fetches data that gets sent to two components.</p> <pre><code>export default class ParentComponent extends Component&lt;AuthProps, ChannelState&gt; { constructor(props: AuthProps) { super(props) this...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16292742/" ]
74,577,981
<pre class="lang-js prettyprint-override"><code>function.getElementById(&quot;a&quot;) { var input= document.getElementById(&quot;a&quot;) console.log(&quot;input&quot;) } </code></pre> <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;...
[ { "answer_id": 74577852, "author": "npetrov937", "author_id": 13078832, "author_profile": "https://Stackoverflow.com/users/13078832", "pm_score": 1, "selected": false, "text": "left_join amount library(tidyverse)\n\nt <- tibble(subs_id=c(1,1,2,3,3),\n amount=c(15,10,30,20,10),\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74577981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17449755/" ]
74,578,041
<p>I am trying to create an update view that allows users to update their data. I am trying to access the data by using primary keys. My problem is that I do not know the syntax to implement it.</p> <p>models.py</p> <pre><code>class Detail(models.Model): &quot;&quot;&quot; This is the one for model.py &quot...
[ { "answer_id": 74578121, "author": "s-knocks", "author_id": 18580279, "author_profile": "https://Stackoverflow.com/users/18580279", "pm_score": 0, "selected": false, "text": "href=\"{% url 'updatedetails' pk=request.detail.id %}\"\n" }, { "answer_id": 74579770, "author": "Sun...
2022/11/25
[ "https://Stackoverflow.com/questions/74578041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13397363/" ]
74,578,055
<p>In order to prevent my machine learning algorithm from tending to a certain data, I want to reduce the frequency differences in my dataset, which is a pandas table,</p> <p>for example, in column X;</p> <ul> <li>A value is 1500 times</li> <li>B value is 3000 times</li> <li>C value is 1300 times</li> </ul> <p>Is there...
[ { "answer_id": 74578141, "author": "Bushmaster", "author_id": 15415267, "author_profile": "https://Stackoverflow.com/users/15415267", "pm_score": 1, "selected": false, "text": "df2=pd.concat(df[df['X']=='A'][:1250],df[df['X']=='B'][:1250],df[df['X']=='C'][:1250])\n" }, { "answer_...
2022/11/25
[ "https://Stackoverflow.com/questions/74578055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14701032/" ]
74,578,081
<p>I have been successfully using python with elasticsearch-dsl (<a href="https://elasticsearch-dsl.readthedocs.io/en/latest/search_dsl.html#" rel="nofollow noreferrer">https://elasticsearch-dsl.readthedocs.io/en/latest/search_dsl.html#</a>) and composite aggregations for some time now but have come across a problem I ...
[ { "answer_id": 74578141, "author": "Bushmaster", "author_id": 15415267, "author_profile": "https://Stackoverflow.com/users/15415267", "pm_score": 1, "selected": false, "text": "df2=pd.concat(df[df['X']=='A'][:1250],df[df['X']=='B'][:1250],df[df['X']=='C'][:1250])\n" }, { "answer_...
2022/11/25
[ "https://Stackoverflow.com/questions/74578081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/950673/" ]
74,578,120
<p>I'm trying to pass a &quot;dino&quot; struct object that has been declared in C using typedef struct format. I'm then assigning values to this object, named d0, and then passing the whole object to a function, which is meant to write to a file in byte format, writing all of the parameters of d0. Then I am attempting...
[ { "answer_id": 74578513, "author": "rfermi", "author_id": 2890384, "author_profile": "https://Stackoverflow.com/users/2890384", "pm_score": 0, "selected": false, "text": "void save_dino(Dino *d, char *ofn) {\n FILE *fp; \n if ( (fp = fopen(ofn, \"wb\")) == NULL ){\n return;\n }\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74578120", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602773/" ]
74,578,122
<p>I have the following image that I'm trying to display under my navigation bar.</p> <p><a href="https://i.stack.imgur.com/8PUa3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8PUa3.png" alt="car" /></a></p> <p>The image dimensions are 234 x 156 px</p> <p>For some reason, the image is coming out bl...
[ { "answer_id": 74578513, "author": "rfermi", "author_id": 2890384, "author_profile": "https://Stackoverflow.com/users/2890384", "pm_score": 0, "selected": false, "text": "void save_dino(Dino *d, char *ofn) {\n FILE *fp; \n if ( (fp = fopen(ofn, \"wb\")) == NULL ){\n return;\n }\n ...
2022/11/25
[ "https://Stackoverflow.com/questions/74578122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8397835/" ]
74,578,124
<p>I just started unit testing in python using pytest. Well, when I have a function with a return value, with the &quot;assert&quot; I can compare a certain value with the value that the function return. But if I had a void function that returns nothing and does a print at the end, for example:</p> <pre><code>def funct...
[ { "answer_id": 74578155, "author": "snakecharmerb", "author_id": 5320906, "author_profile": "https://Stackoverflow.com/users/5320906", "pm_score": 1, "selected": false, "text": "sys.stdout print >>> import io\n>>> import contextlib\n>>> \n>>> def f():print('X')\n... \n>>> buf = io.String...
2022/11/25
[ "https://Stackoverflow.com/questions/74578124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602700/" ]
74,578,132
<p>I am trying to understand how $emit event works in vue so following this Guide: <a href="https://learnvue.co/tutorials/vue-emit-guide" rel="nofollow noreferrer">https://learnvue.co/tutorials/vue-emit-guide</a>, I tried to do in similar way but with vue2 js and everytime I click the button its gives me rounded number...
[ { "answer_id": 74578155, "author": "snakecharmerb", "author_id": 5320906, "author_profile": "https://Stackoverflow.com/users/5320906", "pm_score": 1, "selected": false, "text": "sys.stdout print >>> import io\n>>> import contextlib\n>>> \n>>> def f():print('X')\n... \n>>> buf = io.String...
2022/11/25
[ "https://Stackoverflow.com/questions/74578132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4183650/" ]
74,578,145
<p>`</p> <pre><code>Already up to date. venv &quot;C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\Python.exe&quot; Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] Commit hash: 828438b4a190759807f9054932cae3a8b880ddf1 Installing requirements for Web UI Launching Web UI with ...
[ { "answer_id": 74578155, "author": "snakecharmerb", "author_id": 5320906, "author_profile": "https://Stackoverflow.com/users/5320906", "pm_score": 1, "selected": false, "text": "sys.stdout print >>> import io\n>>> import contextlib\n>>> \n>>> def f():print('X')\n... \n>>> buf = io.String...
2022/11/25
[ "https://Stackoverflow.com/questions/74578145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602797/" ]
74,578,175
<p>I am using Selenium in Python to scrape the videos from Youtube channels' websites. Below is a set of code. The line <code>videos = driver.find_elements(By.CLASS_NAME, 'style-scope ytd-grid-video-renderer')</code> repeatedly returns no links to the videos (a.k.a. the <code>print(videos)</code> after it outputs an em...
[ { "answer_id": 74578155, "author": "snakecharmerb", "author_id": 5320906, "author_profile": "https://Stackoverflow.com/users/5320906", "pm_score": 1, "selected": false, "text": "sys.stdout print >>> import io\n>>> import contextlib\n>>> \n>>> def f():print('X')\n... \n>>> buf = io.String...
2022/11/25
[ "https://Stackoverflow.com/questions/74578175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8141320/" ]
74,578,191
<p>I have a messy character variable like:</p> <pre><code>df&lt;-c(&quot;_oun_&quot;, &quot;0000ff&quot;, &quot;03815&quot;, &quot;?3jhdb&quot;, &quot;test&quot;, &quot;1,000&quot;, &quot;1.000&quot;) </code></pre> <p>and I would like to filter out all values that are not words. I thought a start would be to filter out...
[ { "answer_id": 74578260, "author": "Andre Wildberg", "author_id": 9462095, "author_profile": "https://Stackoverflow.com/users/9462095", "pm_score": 3, "selected": true, "text": "stringr ^ [:alpha:] + str_subset(df, \"^[:alpha:]+\")\n[1] \"test\"\n df[str_detect(df, \"^[:alpha:]+\")]\n[1]...
2022/11/25
[ "https://Stackoverflow.com/questions/74578191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/906592/" ]
74,578,211
<p>I am creating app which will comunicate with API of shop. I have written around 30 classes representing requests to API and I am wondering how to run these request parallel.</p> <p>I have tried to done it with <code>List</code> of tasks but it does not work beacouse of imprecise returning type of function.</p> <p><s...
[ { "answer_id": 74578604, "author": "Stephen Cleary", "author_id": 263693, "author_profile": "https://Stackoverflow.com/users/263693", "pm_score": 1, "selected": false, "text": "List<Task<Output>> List<Task>" }, { "answer_id": 74586252, "author": "tymtam", "author_id": 581...
2022/11/25
[ "https://Stackoverflow.com/questions/74578211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20444760/" ]
74,578,213
<p>In my folder Templates I created 2 html files:</p> <ul> <li>main.html</li> <li>user.html</li> </ul> <p>The structure of the main.html is:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&quot;UTF-8&quot;&gt; &lt;meta http-equiv=&quot;X-UA-Compatible&quot; c...
[ { "answer_id": 74578604, "author": "Stephen Cleary", "author_id": 263693, "author_profile": "https://Stackoverflow.com/users/263693", "pm_score": 1, "selected": false, "text": "List<Task<Output>> List<Task>" }, { "answer_id": 74586252, "author": "tymtam", "author_id": 581...
2022/11/25
[ "https://Stackoverflow.com/questions/74578213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602742/" ]
74,578,223
<p>I have a text file, named my_data.txt, with the following contents:</p> <pre><code># define var1 and var2 var1=101 var2=202 // display var1 and var2 echo ${var1} echo ${var2} </code></pre> <p>I want search all occurrences of var1 but not those in a line starts with '#' or '//'. I can do this:</p> <pre><code>grep va...
[ { "answer_id": 74578238, "author": "Cyrus", "author_id": 3776858, "author_profile": "https://Stackoverflow.com/users/3776858", "pm_score": 2, "selected": false, "text": "grep -v -e '^#' -e '^//' file | grep 'var1'\n -E grep -v -E '^(#|//)' file | grep 'var1'\n" }, { "answer_id": ...
2022/11/25
[ "https://Stackoverflow.com/questions/74578223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1667163/" ]
74,578,232
<p>I am using bootstraps navigation bar and I inserted an image to the navbar brand yet because of the size it messes up the alignment. I want the text that goes along with it to line up with the middle of it like it is, yet I can't figure out how to get the other button text to line up with it as well.</p> <p>This is...
[ { "answer_id": 74578238, "author": "Cyrus", "author_id": 3776858, "author_profile": "https://Stackoverflow.com/users/3776858", "pm_score": 2, "selected": false, "text": "grep -v -e '^#' -e '^//' file | grep 'var1'\n -E grep -v -E '^(#|//)' file | grep 'var1'\n" }, { "answer_id": ...
2022/11/25
[ "https://Stackoverflow.com/questions/74578232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20163139/" ]
74,578,252
<p>Methods are underlined in red. I have tried to figure out why this is happening, but I keep running into cannot resolve method. I have the methods in the main TextoToSpeechExample1 class and am invoking the methods in my gui class.</p> <pre><code> class TextToSpeechExample1 { public static void main(String args[...
[ { "answer_id": 74578238, "author": "Cyrus", "author_id": 3776858, "author_profile": "https://Stackoverflow.com/users/3776858", "pm_score": 2, "selected": false, "text": "grep -v -e '^#' -e '^//' file | grep 'var1'\n -E grep -v -E '^(#|//)' file | grep 'var1'\n" }, { "answer_id": ...
2022/11/25
[ "https://Stackoverflow.com/questions/74578252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602859/" ]
74,578,262
<p>I have a Google Sheet with daily ranked items expanding with new data everyday in the Raw Data Table A2:C.</p> <p>I would like to generate a report matrix similar to table in E2:J using one formula so that we don't need to manually copy formulas in each cells in the report table from time to time.</p> <p>It would be...
[ { "answer_id": 74578364, "author": "ztiaa", "author_id": 17887301, "author_profile": "https://Stackoverflow.com/users/17887301", "pm_score": 0, "selected": false, "text": "=ArrayFormula(LAMBDA(dates,ranks,{A2,ranks;dates,IFNA(VLOOKUP(dates&ranks,{A3:A&B3:B,C3:C},2,0))})\n(UNIQUE(A3:A),TR...
2022/11/25
[ "https://Stackoverflow.com/questions/74578262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7570858/" ]
74,578,272
<p>I am making a simple game, at the beginning you can choose the amount of players, which is between 2 and 5 (shown below) I am having problem with assigning the initial amount of points, which is 100 points. Also, not sure where to place the code regarding the points in my woring code below. When I start working on t...
[ { "answer_id": 74578567, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 1, "selected": false, "text": "players_dict = {}\nscore = 100\n\nmax_players = -1\nwhile not (2 <= max_players <= 5):\n max_players = in...
2022/11/25
[ "https://Stackoverflow.com/questions/74578272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20543942/" ]
74,578,308
<p>I am looking to create a repetitive pattern from a single shape (in the example below, the starting shape would be the smallest centre star) using Python. The pattern would look something like this:</p> <p><a href="https://i.stack.imgur.com/2Gck9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2Gc...
[ { "answer_id": 74578567, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 1, "selected": false, "text": "players_dict = {}\nscore = 100\n\nmax_players = -1\nwhile not (2 <= max_players <= 5):\n max_players = in...
2022/11/25
[ "https://Stackoverflow.com/questions/74578308", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11283294/" ]
74,578,326
<p>I am completely new to SpringBoot and i have following along with a Course on YT.</p> <p><strong>Request:</strong></p> <p><a href="https://i.stack.imgur.com/csgPS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/csgPS.png" alt="enter image description here" /></a></p> <p><strong>DemoApplication.jav...
[ { "answer_id": 74578480, "author": "Nick", "author_id": 9249298, "author_profile": "https://Stackoverflow.com/users/9249298", "pm_score": 0, "selected": false, "text": " @GetMapping(\"/\")\n public String hello() {\n return \"Hello World\";\n }\n" } ]
2022/11/25
[ "https://Stackoverflow.com/questions/74578326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9249298/" ]
74,578,340
<p>How to run the same query multiple times in SQL Server?</p> <p>Simple example, I have a query</p> <pre><code>select * from sys.databases </code></pre> <p>I wanted to run it N times, because I wanted to return the data in a dashboard in &quot;real time&quot;, until I stopped the execution, the select would need to co...
[ { "answer_id": 74578480, "author": "Nick", "author_id": 9249298, "author_profile": "https://Stackoverflow.com/users/9249298", "pm_score": 0, "selected": false, "text": " @GetMapping(\"/\")\n public String hello() {\n return \"Hello World\";\n }\n" } ]
2022/11/25
[ "https://Stackoverflow.com/questions/74578340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14706560/" ]
74,578,365
<p>I would like to &quot;transform&quot; JSON data with a specific syntax in HTML. look at the code below</p> <p>any idea?</p> <p>tk</p> <p>JSON :</p> <pre><code>[ { &quot;name_host&quot;: &quot;test&quot;, &quot;ip&quot;: &quot;127.0.0.1&quot;, &quot;place&quot;: &quot;local&quot;, ...
[ { "answer_id": 74578480, "author": "Nick", "author_id": 9249298, "author_profile": "https://Stackoverflow.com/users/9249298", "pm_score": 0, "selected": false, "text": " @GetMapping(\"/\")\n public String hello() {\n return \"Hello World\";\n }\n" } ]
2022/11/25
[ "https://Stackoverflow.com/questions/74578365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20316788/" ]
74,578,381
<p>I have</p> <pre><code>df&lt;-c(&quot;That's&quot;,&quot;you're&quot;, &quot;'am&quot;) </code></pre> <p>and I would like to remove the part of a word after and including the apostrophe which should return</p> <pre><code>c(&quot;That&quot;, &quot;you&quot;, &quot;&quot;) </code></pre> <p><code>tidyverse</code> solut...
[ { "answer_id": 74578441, "author": "Jonathan V. Solórzano", "author_id": 9022665, "author_profile": "https://Stackoverflow.com/users/9022665", "pm_score": 3, "selected": true, "text": "' str_replace stringr library(stringr)\n\nstr_replace(df, \"'.*\", \"\") \n#[1] \"That\" \"you\" \"\"...
2022/11/25
[ "https://Stackoverflow.com/questions/74578381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/906592/" ]
74,578,393
<p>There is an array <code>[350, 456, &quot;Not Found&quot;]</code>. I want to sort it, and I want to get the lowest value(350). Could you help?</p> <pre><code> var urunAdi = [350, 456, &quot;NotFound&quot;]; urunAdi.sort(function(a,b){return a-b}); var lowestPrice = urunAdi[0]; </code></pre> <p>After sorti...
[ { "answer_id": 74578441, "author": "Jonathan V. Solórzano", "author_id": 9022665, "author_profile": "https://Stackoverflow.com/users/9022665", "pm_score": 3, "selected": true, "text": "' str_replace stringr library(stringr)\n\nstr_replace(df, \"'.*\", \"\") \n#[1] \"That\" \"you\" \"\"...
2022/11/25
[ "https://Stackoverflow.com/questions/74578393", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20599565/" ]
74,578,414
<p>In a current assignment I am trying to print out the array which has the highest value along with the array number itself. However with the code I have it is printing the array number as the same as the the array value. With the input values of 4, 9, 3, 7, and 6 the output should be Day #2 with 9 hours worked, but i...
[ { "answer_id": 74578441, "author": "Jonathan V. Solórzano", "author_id": 9022665, "author_profile": "https://Stackoverflow.com/users/9022665", "pm_score": 3, "selected": true, "text": "' str_replace stringr library(stringr)\n\nstr_replace(df, \"'.*\", \"\") \n#[1] \"That\" \"you\" \"\"...
2022/11/25
[ "https://Stackoverflow.com/questions/74578414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602944/" ]
74,578,433
<p>I have a simple backend code which works well with Rest API</p> <p>updated code</p> <p>ClientSchema.js</p> <pre><code>const mongoose = require('mongoose'); var Schema = mongoose.Schema; const customerSchema = new Schema({ paymentReferenceCode:{ type: String, required: true }, payme...
[ { "answer_id": 74578441, "author": "Jonathan V. Solórzano", "author_id": 9022665, "author_profile": "https://Stackoverflow.com/users/9022665", "pm_score": 3, "selected": true, "text": "' str_replace stringr library(stringr)\n\nstr_replace(df, \"'.*\", \"\") \n#[1] \"That\" \"you\" \"\"...
2022/11/25
[ "https://Stackoverflow.com/questions/74578433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20183888/" ]
74,578,476
<p>I have a <code>Cheques</code> and a <code>Payees</code> collection, every cheque has its corresponding <code>Payee ID</code>.</p> <p>What I'm trying to do is to write some queries on cheques, but I need to preform the searching after populating the payee (to get the name)</p> <pre><code>const search = req.query.sear...
[ { "answer_id": 74580057, "author": "Marc Simon", "author_id": 19699404, "author_profile": "https://Stackoverflow.com/users/19699404", "pm_score": 0, "selected": false, "text": "populate() Cheques payee _id" }, { "answer_id": 74580085, "author": "Normal", "author_id": 1838...
2022/11/25
[ "https://Stackoverflow.com/questions/74578476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15325671/" ]
74,578,497
<p>I have problem with Laravel migrations. I want to make a relationship between two tables but</p> <blockquote> <p>I am getting error General error: 1005 Can't create table <code>eshopper</code>.<code>prices</code> (errno: 150 &quot;Foreign key constraint is incorrectly formed&quot;) (SQL: alter table <code>prices</c...
[ { "answer_id": 74580057, "author": "Marc Simon", "author_id": 19699404, "author_profile": "https://Stackoverflow.com/users/19699404", "pm_score": 0, "selected": false, "text": "populate() Cheques payee _id" }, { "answer_id": 74580085, "author": "Normal", "author_id": 1838...
2022/11/25
[ "https://Stackoverflow.com/questions/74578497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17440063/" ]
74,578,511
<p>I sometimes write modules that will only contain module methods (as opposed to module <em>instance</em> methods) (are there better names for these?). These modules should not be included in classes because that would have no effect and be misleading to a reader. So I'd like it to be as clear as possible to the reade...
[ { "answer_id": 74578737, "author": "Schwern", "author_id": 14660, "author_profile": "https://Stackoverflow.com/users/14660", "pm_score": 2, "selected": false, "text": "extend self extend self YourModule.extend(YourModule) module YourModule\n def some_method\n 23\n end\n\n extend se...
2022/11/25
[ "https://Stackoverflow.com/questions/74578511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501266/" ]
74,578,519
<p>I try to get some CSV formatted string as input and then to print it to an actual CSV file. It works but it prints the first string 2 times.</p> <p>My code looks like this:</p> <pre><code>func main() { scanner := bufio.NewScanner(os.Stdin) n := 0 inputFile, err := os.Create(&quot;input.csv&quot;) //creat...
[ { "answer_id": 74578905, "author": "Shahriar Ahmed", "author_id": 6607562, "author_profile": "https://Stackoverflow.com/users/6607562", "pm_score": 1, "selected": true, "text": "package main\n\nimport (\n \"bufio\"\n \"encoding/csv\"\n \"fmt\"\n \"log\"\n \"os\"\n)\n\nfunc...
2022/11/25
[ "https://Stackoverflow.com/questions/74578519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20603022/" ]
74,578,521
<p>I have a folder which contain 5 folders, with round 450-550 text files each. The text file has around 1-12 sentences varying in length, seperated by a tab, like this:</p> <pre><code>i love burgers i want to eat a burger etc </code></pre> <p>I want to create a code which asks the user to input a search term and the...
[ { "answer_id": 74578905, "author": "Shahriar Ahmed", "author_id": 6607562, "author_profile": "https://Stackoverflow.com/users/6607562", "pm_score": 1, "selected": true, "text": "package main\n\nimport (\n \"bufio\"\n \"encoding/csv\"\n \"fmt\"\n \"log\"\n \"os\"\n)\n\nfunc...
2022/11/25
[ "https://Stackoverflow.com/questions/74578521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20603013/" ]
74,578,532
<p>I'm trying to make website which will enable button when the certain condition is met. But when I run it within simple if the condiiton is checked only at the beginning and it doesn't enable and disable on changing condition. Condition is changing inside other event listener so the condition is dynamically. The cond...
[ { "answer_id": 74578905, "author": "Shahriar Ahmed", "author_id": 6607562, "author_profile": "https://Stackoverflow.com/users/6607562", "pm_score": 1, "selected": true, "text": "package main\n\nimport (\n \"bufio\"\n \"encoding/csv\"\n \"fmt\"\n \"log\"\n \"os\"\n)\n\nfunc...
2022/11/25
[ "https://Stackoverflow.com/questions/74578532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20602664/" ]
74,578,549
<p>I am trying to full join several dataframes (d1, d2,...) based on several conditions: Either the ID has to match exactly beetween the two dataframes (id1 and id2) OR the location value of d2 has to be between the min and max columns of d1.</p> <pre><code>data1 &lt;- data.frame(id1 = c(&quot;A&quot;,&quot;B&quot;,&qu...
[ { "answer_id": 74578632, "author": "Vinícius Félix", "author_id": 9696037, "author_profile": "https://Stackoverflow.com/users/9696037", "pm_score": 0, "selected": false, "text": "data1 <- data.frame(id1 = c(\"A\",\"B\",\"C\",\"D\"), \n location1 = c(12...
2022/11/25
[ "https://Stackoverflow.com/questions/74578549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20537657/" ]
74,578,552
<p>I have the list <code>['a','b','c','d','e','f','g']</code>. I want to print it a certain way like this:</p> <pre><code>a b c d e f g </code></pre> <p>this is what I've tried:</p> <pre><code>result = '' for i in range(len(example)): result += example[i] + ' ' if len(result) == 3: print('\n') print(re...
[ { "answer_id": 74578581, "author": "Chris", "author_id": 15261315, "author_profile": "https://Stackoverflow.com/users/15261315", "pm_score": 2, "selected": false, "text": "3 >>> a = ['a','b','c','d','e','f','g']\n>>> for i in range(0, len(a), 3):\n... print(a[i:i+3])\n... \n['a', 'b', ...
2022/11/25
[ "https://Stackoverflow.com/questions/74578552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20579620/" ]
74,578,607
<p>I tried creating just a simple Service account in Kubernetes by running the command on my AWS EC2 cli <code>kubectl create serviceaccount jenkins --dry-run=client -o yaml &gt; jenkins-sa.yaml</code> and I have my <code>kube/config</code> file on my <code>/home/ec2-user</code>.</p> <p>I applied the new config jenkins...
[ { "answer_id": 74579486, "author": "P....", "author_id": 6309601, "author_profile": "https://Stackoverflow.com/users/6309601", "pm_score": 2, "selected": false, "text": "Kubectl create token\n" }, { "answer_id": 74581156, "author": "user2311578", "author_id": 2311578, ...
2022/11/25
[ "https://Stackoverflow.com/questions/74578607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7418125/" ]
74,578,658
<p>What commands to combine column1 and column2 relative to the content and then remove column2? In addition, if both columns contain something, consider the content of column1 as the first choice. It's about SQLite. Please note that these are permanent changes to the database and column layout, not a JOIN for SELECT.<...
[ { "answer_id": 74578664, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 1, "selected": false, "text": "COALESCE() SELECT COALESCE(column1, column2) AS column1,\n column_a\nFROM yourTable;\n" }, { "...
2022/11/25
[ "https://Stackoverflow.com/questions/74578658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18030381/" ]
74,578,667
<p>I am attempting to answer the following exercise.</p> <blockquote> <p>Write a macro function OUR-IF that translates the following macro calls.</p> <pre><code>(our-if a then b) translates to (cond (a b)) (our-if a then b else c) translates to (cond (a b) (t c)) </code></pre> </blockquote> <p>My solution is the follow...
[ { "answer_id": 74578664, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 1, "selected": false, "text": "COALESCE() SELECT COALESCE(column1, column2) AS column1,\n column_a\nFROM yourTable;\n" }, { "...
2022/11/25
[ "https://Stackoverflow.com/questions/74578667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4681998/" ]
74,578,669
<p>The string is the value that i have taken from the input.When the user is going to put the numbers which the seperates them with a comma.And when he push asc the form with the asc order will be seen and the same with the desc order.I CAN NOT USE THE SORT FUNCTION BUT TO MAKE THE ORDER FUNCTION MYSELF. Below i am goi...
[ { "answer_id": 74578664, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 1, "selected": false, "text": "COALESCE() SELECT COALESCE(column1, column2) AS column1,\n column_a\nFROM yourTable;\n" }, { "...
2022/11/25
[ "https://Stackoverflow.com/questions/74578669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19745206/" ]