qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,309,770
<p>I'm very new to js and programming in general, so I may be missing something very obvious here. I'm trying to create a very basic rock paper scissors program.</p> <p>my html:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="...
[ { "answer_id": 74309961, "author": "yessir", "author_id": 18591002, "author_profile": "https://Stackoverflow.com/users/18591002", "pm_score": 0, "selected": false, "text": "const canvas = document.getElementById('canvas');\nlet playerChoice;\nlet oppChoice;\nconst rps = ['Rock', 'Paper',...
2022/11/03
[ "https://Stackoverflow.com/questions/74309770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20411947/" ]
74,309,815
<p>I wanted to re-assign/replace my new value, from my current</p> <pre><code>20000123 19850123 19880112 19951201 19850123 20190821 20000512 19850111 19670133 19850123 </code></pre> <p>As you can see there is data with 19670133 (YYYYMMDD), which means that date is not exist since there is no month with 33 days in it.So...
[ { "answer_id": 74309961, "author": "yessir", "author_id": 18591002, "author_profile": "https://Stackoverflow.com/users/18591002", "pm_score": 0, "selected": false, "text": "const canvas = document.getElementById('canvas');\nlet playerChoice;\nlet oppChoice;\nconst rps = ['Rock', 'Paper',...
2022/11/03
[ "https://Stackoverflow.com/questions/74309815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7859524/" ]
74,309,821
<p>Update: used the code on the actual dataset and we found suffixes (jr, sr, I, etc) are an issue. I have been scouring Stack and Google for solutions. Any idea on how to remove suffixes? I am thinking of removing the suffixes before using the regex code.</p> <p>My sample data set looks like this.</p> <p><a href="http...
[ { "answer_id": 74309961, "author": "yessir", "author_id": 18591002, "author_profile": "https://Stackoverflow.com/users/18591002", "pm_score": 0, "selected": false, "text": "const canvas = document.getElementById('canvas');\nlet playerChoice;\nlet oppChoice;\nconst rps = ['Rock', 'Paper',...
2022/11/03
[ "https://Stackoverflow.com/questions/74309821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20411939/" ]
74,309,841
<p>As the title says, i have 3 containers running in docker, 1 for rails, 1 for a postgres db and 1 for redis. I'm able to enqueue jobs doing <code>Job.perform_async</code> but for some reason my jobs stay on the enqueued indefinitely. I checked and my Redis container is up and running.</p> <p>My Job:</p> <pre><code>cl...
[ { "answer_id": 74309961, "author": "yessir", "author_id": 18591002, "author_profile": "https://Stackoverflow.com/users/18591002", "pm_score": 0, "selected": false, "text": "const canvas = document.getElementById('canvas');\nlet playerChoice;\nlet oppChoice;\nconst rps = ['Rock', 'Paper',...
2022/11/03
[ "https://Stackoverflow.com/questions/74309841", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10320608/" ]
74,309,847
<p>I know I can do this in a <code>change</code> migration and have it be reversible:</p> <pre><code> add_column :widgets, :color, :string remove_column :widgets, :flavor, :string </code></pre> <p>But strangely, <code>change_table</code>-&gt;<code>remove</code> does not work like this. Instead of params <code>(name...
[ { "answer_id": 74309848, "author": "Grant Birchmeier", "author_id": 650475, "author_profile": "https://Stackoverflow.com/users/650475", "pm_score": 2, "selected": false, "text": " change_table(:widgets) do |t|\n t.column :color, :string\n t.remove :flavor, type: :string\n ...
2022/11/03
[ "https://Stackoverflow.com/questions/74309847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/650475/" ]
74,309,863
<p>I have a file with this structure (it comes from a json):</p> <pre><code>lista = [{'document': {'amount': 20, 'name': 'Peter', 'city': 'Madrid'}, 'highlights': [], 'text_match': 100}, {'document': {'amount': 15, 'name': 'Angel', 'city': 'Barcelona'}, 'highlights': [], 'text_match': 100}, {'docu...
[ { "answer_id": 74309881, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": -1, "selected": false, "text": "df = pd.DataFrame([d[\"document\"] for d in lista])\nprint(df)\n amount name city\n0 20 Pe...
2022/11/03
[ "https://Stackoverflow.com/questions/74309863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15226448/" ]
74,309,879
<p>I have a pandas dataframe like</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>user_id</th> <th>music_id</th> <th>has_rating</th> </tr> </thead> <tbody> <tr> <td>A</td> <td>a</td> <td>1</td> </tr> <tr> <td>B</td> <td>b</td> <td>1</td> </tr> </tbody> </table> </div> <p>and I would like to...
[ { "answer_id": 74309940, "author": "rhug123", "author_id": 13802115, "author_profile": "https://Stackoverflow.com/users/13802115", "pm_score": 0, "selected": false, "text": "pd.MultiIndex.from_product() l = ['user_id','music_id']\n\n(df.set_index(l)\n.reindex(pd.MultiIndex.from_product([...
2022/11/03
[ "https://Stackoverflow.com/questions/74309879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10761699/" ]
74,309,898
<p>I want to know how to set my activity status for my bot.</p> <p>Like &quot;Watching youtube.com&quot;</p> <p>Or &quot;playing a game.&quot;</p> <p>I've tried following the discord api document but it does not tell me how.</p>
[ { "answer_id": 74309940, "author": "rhug123", "author_id": 13802115, "author_profile": "https://Stackoverflow.com/users/13802115", "pm_score": 0, "selected": false, "text": "pd.MultiIndex.from_product() l = ['user_id','music_id']\n\n(df.set_index(l)\n.reindex(pd.MultiIndex.from_product([...
2022/11/03
[ "https://Stackoverflow.com/questions/74309898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20403227/" ]
74,309,903
<p>I have a model <code>class</code> where the variable <code>completed_application</code> should default to <code>False</code> when creating a new user (to show that the user hasn't completed an application yet). However, by default when a new user is created it doesn't show as <code>False</code> in Django admin but '...
[ { "answer_id": 74312800, "author": "Sunderam Dubey", "author_id": 17562044, "author_profile": "https://Stackoverflow.com/users/17562044", "pm_score": 2, "selected": false, "text": "can_delete can_delete=False can_delete:False" } ]
2022/11/03
[ "https://Stackoverflow.com/questions/74309903", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16673529/" ]
74,309,944
<p>I have a db like this:</p> <pre><code>tibble(Q1 = c(&quot;0&quot;,&quot;A&quot;), Q2 = c(&quot;A&quot;,&quot;A&quot;), Q3 = c(&quot;0&quot;,&quot;A&quot;), C1 = c(&quot;A&quot;,&quot;0&quot;) ) -&gt; DB </code></pre> <p>I aim to add a new column which is a count of how many <code>&quot;0&quot;</...
[ { "answer_id": 74309958, "author": "r2evans - GO NAVY BEAT ARMY", "author_id": 3358272, "author_profile": "https://Stackoverflow.com/users/3358272", "pm_score": 3, "selected": true, "text": "DB %>%\n rowwise() %>%\n mutate(S = sum(c_across(starts_with(\"Q\")) == \"0\")) %>%\n ungroup(...
2022/11/03
[ "https://Stackoverflow.com/questions/74309944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17122831/" ]
74,310,008
<p>I am having some questions related to python timer. Hope someone can give some suggestions on that. :)</p> <p>I would like when the timer is expired after 20sec, then it printout a string and exit(2), I look into some example hence, I have written the first example below, the problem for that is after timeout, event...
[ { "answer_id": 74310081, "author": "Shiplu Mokaddim", "author_id": 376535, "author_profile": "https://Stackoverflow.com/users/376535", "pm_score": 1, "selected": false, "text": "application_timeout Event event = threading.Event()\n\ndef application_timeout():\n print(\"The application...
2022/11/03
[ "https://Stackoverflow.com/questions/74310008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6678296/" ]
74,310,011
<p>I have two dates: <code>LastUpdatedOn</code> and <code>CreatedBy</code>. If <code>LastUpdatedOn</code> has a value then I want to use that value. Otherwise I should use <code>CreatedBy</code>. If neither <code>LastUpdatedOn</code> or <code>Createdby</code> have a value then use <code>Date.MinValue</code>.</p> <p>In ...
[ { "answer_id": 74310121, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 1, "selected": false, "text": "var LastUpdated = discrepancy.LastUpdatedOn ?? discrepancy.CreatedOn ?? DateTime.MinValue;\n" }, { "answer_i...
2022/11/03
[ "https://Stackoverflow.com/questions/74310011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5748123/" ]
74,310,039
<p>I have the following simple PHP page:</p> <pre class="lang-php prettyprint-override"><code>&lt;?php echo 'done'; </code></pre> <p>When I send a Javascript <code>fetch</code> request to that URL, I can inspect the response in the browser's dev tools and see that it returns the string 'done'.</p> <p>Here is the reques...
[ { "answer_id": 74310040, "author": "Mike", "author_id": 811240, "author_profile": "https://Stackoverflow.com/users/811240", "pm_score": 1, "selected": false, "text": "response.text() response.json() const response = await fetch(url);\nconst text = await response.text();\n" }, { "...
2022/11/03
[ "https://Stackoverflow.com/questions/74310039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/811240/" ]
74,310,043
<p>I have this type:</p> <pre><code>type Item = { title: string } </code></pre> <p>and I want to <code>Pick</code> the <code>title</code> property as use it in another type definition:</p> <pre><code>type NewItem = Pick&lt;Item, 'title'&gt; </code></pre> <p>However, in <code>NewType</code> I want <code>title</code> t...
[ { "answer_id": 74310065, "author": "caTS", "author_id": 18244921, "author_profile": "https://Stackoverflow.com/users/18244921", "pm_score": 2, "selected": true, "text": "Pick type Item = {\n title: string\n};\n\ntype NewItem = {\n newTitle: Item[\"title\"];\n};\n" }, { "answe...
2022/11/03
[ "https://Stackoverflow.com/questions/74310043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3111255/" ]
74,310,069
<p>So we recently migrated our project from .net framework 4.7.2 to .net 6 and we are testing the code for any issues , while testing i found out that the following method for Max is not working in .net 6</p> <pre><code>var maxOfStringMethod = (from method in typeof(Enumerable).GetMethods() ...
[ { "answer_id": 74310389, "author": "Sarvesh Patil", "author_id": 17718198, "author_profile": "https://Stackoverflow.com/users/17718198", "pm_score": 0, "selected": false, "text": "TResult Max[TSource,TResult](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,TResul...
2022/11/03
[ "https://Stackoverflow.com/questions/74310069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17718198/" ]
74,310,071
<p>I have compileSdkVersion 32 and now I can create <code>LocationRequest</code> only using <code>LocationRequest.Builder</code>. LocationRequest.create() currently unavailable, means I can't even call this deprecated static method. So any suggestions how to create LocationRequest for API lower than 31? Thanks.</p>
[ { "answer_id": 74310103, "author": "CommonsWare", "author_id": 115145, "author_profile": "https://Stackoverflow.com/users/115145", "pm_score": 1, "selected": false, "text": "LocationRequest LocationRequest LocationRequestCompat LocationManagerCompat" }, { "answer_id": 74310193, ...
2022/11/03
[ "https://Stackoverflow.com/questions/74310071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1621111/" ]
74,310,087
<p>In my main function for my haskell game, I start by loading each sprite. I decided to make a data type called SpriteCollection which holds all the sprites (typed <code>Picture</code>) so I can access them later by their name.</p> <p>loadBMP is a Gloss function typed <code>String -&gt; IO Picture</code>. This code wo...
[ { "answer_id": 74310185, "author": "Noughtmare", "author_id": 15207568, "author_profile": "https://Stackoverflow.com/users/15207568", "pm_score": 2, "selected": false, "text": "RecordWildCards {-# LANGUAGE RecordWildCards #-}\n\nmain = do\n -- Load sprites\n marioSprite <- loadBMP \"as...
2022/11/03
[ "https://Stackoverflow.com/questions/74310087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20046346/" ]
74,310,151
<p>I have data stored in gzip archive folders, every archive contains a big file that includes json in the following format:</p> <pre><code>{key:value, key:value} {key:value, key:value} {key:value, key:value} </code></pre> <p>I need to import the data to MongoDB. What is the best way to do that? I can't extract the gzi...
[ { "answer_id": 74310185, "author": "Noughtmare", "author_id": 15207568, "author_profile": "https://Stackoverflow.com/users/15207568", "pm_score": 2, "selected": false, "text": "RecordWildCards {-# LANGUAGE RecordWildCards #-}\n\nmain = do\n -- Load sprites\n marioSprite <- loadBMP \"as...
2022/11/03
[ "https://Stackoverflow.com/questions/74310151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7249301/" ]
74,310,176
<pre><code> def addition(): int(input1) int(input2) mysum = input1 + input2 print(mysum) input1: str = input(&quot;Enter integer #1 \n &quot;) input2: str = input(&quot;Enter integer #2 \n &quot;) addition() </code></pre> <p>I tried to convert the input...
[ { "answer_id": 74310185, "author": "Noughtmare", "author_id": 15207568, "author_profile": "https://Stackoverflow.com/users/15207568", "pm_score": 2, "selected": false, "text": "RecordWildCards {-# LANGUAGE RecordWildCards #-}\n\nmain = do\n -- Load sprites\n marioSprite <- loadBMP \"as...
2022/11/03
[ "https://Stackoverflow.com/questions/74310176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10184368/" ]
74,310,187
<p>I need select values from a table and returns the total hours for all categories and their occurrences. The challenge is that there are different totals for each occurrence.</p> <p>My query:</p> <pre><code>SELECT c.Category, c.HrsFirstOccur, c.HrsAddlOccur, COUNT(*) AS Occurrences FROM dbo.Categ...
[ { "answer_id": 74310234, "author": "GMB", "author_id": 10676716, "author_profile": "https://Stackoverflow.com/users/10676716", "pm_score": 3, "selected": true, "text": "SELECT \n c.Category,\n c.HrsFirstOccur,\n c.HrsAddlOccur,\n COUNT(*) AS Occurrences,\n c.HrsFirstOccur ...
2022/11/03
[ "https://Stackoverflow.com/questions/74310187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2812743/" ]
74,310,201
<p>Im doing a practice execise for my Coding class and Cant for the love of me figure out how to Fix it, The strings work within the loop but for some reason I cant read them to an array so I can pull them back to work with them later.</p> <p>Ive been having troubles grabbing my strings that im making in the first loop...
[ { "answer_id": 74310234, "author": "GMB", "author_id": 10676716, "author_profile": "https://Stackoverflow.com/users/10676716", "pm_score": 3, "selected": true, "text": "SELECT \n c.Category,\n c.HrsFirstOccur,\n c.HrsAddlOccur,\n COUNT(*) AS Occurrences,\n c.HrsFirstOccur ...
2022/11/03
[ "https://Stackoverflow.com/questions/74310201", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19945170/" ]
74,310,273
<p>I have defined an environment(global) variable in jenkins via configuration as</p> <pre><code>REPORT = &quot;Test, ${CycleNumber},${JOB_NAME}&quot; </code></pre> <p>I have 1 parameter defined in my pipeline called Cycle which has values new &amp; update. Based on this cycle value CycleNumber should be updated and I ...
[ { "answer_id": 74310382, "author": "Devin Sag", "author_id": 20388932, "author_profile": "https://Stackoverflow.com/users/20388932", "pm_score": 0, "selected": false, "text": "withEnv(['REPORT=...']) {\n // do something with updated env.REPORT\n}\n" }, { "answer_id": 74310611, ...
2022/11/03
[ "https://Stackoverflow.com/questions/74310273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11393899/" ]
74,310,301
<p>I'm trying to prepare an array into a json object to send to an API.</p> <p>I'm struggling to figure out how to manipulate my array into the right shape.</p> <p>My array looks something like this.</p> <pre><code>data: [ [&quot;Lisa&quot;, &quot;Heinz&quot;, &quot;1993-04-15&quot; ], [&quot;Bob&quot;, &quot;D...
[ { "answer_id": 74310382, "author": "Devin Sag", "author_id": 20388932, "author_profile": "https://Stackoverflow.com/users/20388932", "pm_score": 0, "selected": false, "text": "withEnv(['REPORT=...']) {\n // do something with updated env.REPORT\n}\n" }, { "answer_id": 74310611, ...
2022/11/03
[ "https://Stackoverflow.com/questions/74310301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8302750/" ]
74,310,308
<p>I have multiple nested arrays, how can I map them ? I could map only one nested with the help of @Apostolos</p> <p>`</p> <pre><code> function RequestDetail({match}) { const [request, setRequests] = useState({ user: {} }); const [fulfillment, setFulfillments] = useState({}); const [text, setText] = useState([])...
[ { "answer_id": 74310382, "author": "Devin Sag", "author_id": 20388932, "author_profile": "https://Stackoverflow.com/users/20388932", "pm_score": 0, "selected": false, "text": "withEnv(['REPORT=...']) {\n // do something with updated env.REPORT\n}\n" }, { "answer_id": 74310611, ...
2022/11/03
[ "https://Stackoverflow.com/questions/74310308", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16811972/" ]
74,310,316
<p>I'm learning C++ and I want to know if there is a way you can use variables defined in a class's constructor in a member function. I've tried looking online and in my textbook but I can't find a definitive answer. For example:</p> <pre><code>class Item { public: Item(std::string str) { std::string text = st...
[ { "answer_id": 74310407, "author": "Ted Lyngmo", "author_id": 7582247, "author_profile": "https://Stackoverflow.com/users/7582247", "pm_score": 3, "selected": true, "text": "class Item {\npublic:\n Item(std::string str) : // colon starts the member initializer list\n text(std::...
2022/11/03
[ "https://Stackoverflow.com/questions/74310316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15150535/" ]
74,310,324
<p>My JSON looks something like this, its an array of workers and an array of worksites. The workers start with a worksite id so I need to merge them with the worksites (inside an array).</p> <pre class="lang-json prettyprint-override"><code>[ { &quot;worksite_candidates&quot;: { &quot;worksite_id&quot;: &q...
[ { "answer_id": 74310407, "author": "Ted Lyngmo", "author_id": 7582247, "author_profile": "https://Stackoverflow.com/users/7582247", "pm_score": 3, "selected": true, "text": "class Item {\npublic:\n Item(std::string str) : // colon starts the member initializer list\n text(std::...
2022/11/03
[ "https://Stackoverflow.com/questions/74310324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20409944/" ]
74,310,338
<p>given a dictionary</p> <pre><code>dictionary = {'Animal 1': {'Dog': 'Yes', 'Cat': 'No', 'Color': 'Black'}, 'Animal 2': {'Dog': 'Yes', 'Cat': 'No', 'Color': 'Brown'}, 'Animal 3': {'Dog': 'No', 'Cat': 'Yes', 'Color': 'Grey'}} </code></pre> <p>How do I select the Animals that are dogs? expec...
[ { "answer_id": 74310377, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 3, "selected": true, "text": "dictionary = {\n \"Animal 1\": {\"Dog\": \"Yes\", \"Cat\": \"No\", \"Color\": \"Black\"},\n \"Animal 2\...
2022/11/03
[ "https://Stackoverflow.com/questions/74310338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2038360/" ]
74,310,340
<p>I tried to upgrade with Brew</p> <pre><code>$ brew upgrade stripe/stripe-cli/stripe </code></pre> <p>I got:</p> <pre><code>Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)! To rerun under ARM use: arch -arm64 brew install ... To install under x86_64, install Homebrew into /usr/local. ...
[ { "answer_id": 74310377, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 3, "selected": true, "text": "dictionary = {\n \"Animal 1\": {\"Dog\": \"Yes\", \"Cat\": \"No\", \"Color\": \"Black\"},\n \"Animal 2\...
2022/11/03
[ "https://Stackoverflow.com/questions/74310340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5004011/" ]
74,310,410
<p>I am trying to write scirpt to add events from a spreadsheet to my google calendar. This is the script that I am using.</p> <pre><code>function addEvents() { var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); var lr = ss.getLastRow(); var cal = CalendarApp.getCalendarById(&quot;c_fe882662e583725...
[ { "answer_id": 74310377, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 3, "selected": true, "text": "dictionary = {\n \"Animal 1\": {\"Dog\": \"Yes\", \"Cat\": \"No\", \"Color\": \"Black\"},\n \"Animal 2\...
2022/11/03
[ "https://Stackoverflow.com/questions/74310410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19841228/" ]
74,310,417
<p>I'm trying to do something that in my mind is very simple. I have an array of documents (firebase firestore) and I have a method to fetch From Document with timeStamp A to docuemnt with timeStamp B</p> <p>In the fetch function that tries to see if the ref id has already been fetched, but the <code>messages</code> in...
[ { "answer_id": 74310377, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 3, "selected": true, "text": "dictionary = {\n \"Animal 1\": {\"Dog\": \"Yes\", \"Cat\": \"No\", \"Color\": \"Black\"},\n \"Animal 2\...
2022/11/03
[ "https://Stackoverflow.com/questions/74310417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15271412/" ]
74,310,420
<p>This code takes two txt files, reads them puts them in 2d arrays and should check if the numbers in the files are magic squares but it keeps returning NumberFormatException error. I'm new to java so if anyone could help me that would be great. I'm pretty sure the problem come from the txt file being string and the 2...
[ { "answer_id": 74310473, "author": "paulsm4", "author_id": 421195, "author_profile": "https://Stackoverflow.com/users/421195", "pm_score": 0, "selected": false, "text": "nos[rows][i] = Integer.valueOf(arr[i]); public static Integer tryParse(String text, int row, int i) {\n try {\n re...
2022/11/03
[ "https://Stackoverflow.com/questions/74310420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412391/" ]
74,310,474
<p>Im creating a side project for fun in react with create-react-app. I created a hook thats supposed to fetch some information in json and it does the job, the problem is that for some reason its sending a request per item in the json and this is a json with 700+ items, is it a re-render situation? Is it because I'm n...
[ { "answer_id": 74310651, "author": "Mario Petrovic", "author_id": 3955557, "author_profile": "https://Stackoverflow.com/users/3955557", "pm_score": 2, "selected": false, "text": "export const getQL = async (url: URL): Array<Object> => {\n let query = `\n query {\n charac...
2022/11/03
[ "https://Stackoverflow.com/questions/74310474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19552582/" ]
74,310,478
<p>I am completely new to r, and so I apologise in advance for any rookie mistakes.</p> <p>I am working with a df containing a large number of TRUE/FALSE, and I want to colour them accordingly - TRUE = green and FALSE = no colour.</p> <p><a href="https://i.stack.imgur.com/ZXc1e.jpg" rel="nofollow noreferrer"><img src="...
[ { "answer_id": 74310651, "author": "Mario Petrovic", "author_id": 3955557, "author_profile": "https://Stackoverflow.com/users/3955557", "pm_score": 2, "selected": false, "text": "export const getQL = async (url: URL): Array<Object> => {\n let query = `\n query {\n charac...
2022/11/03
[ "https://Stackoverflow.com/questions/74310478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20364879/" ]
74,310,507
<p>What is the way to manage this tab bar distribution, I want to add a image next to back button and in the center of the content add a text</p> <p>My code:</p> <pre><code>// Create the label let label = UILabel() label.text = &quot;Haz tu pedido&quot; label.sizeToFit() label.textAlignment = NSTextAlignment.center lab...
[ { "answer_id": 74315622, "author": "keyur kathrotiya", "author_id": 10363229, "author_profile": "https://Stackoverflow.com/users/10363229", "pm_score": 2, "selected": false, "text": " self.tabBarController?.navigationItem.title = \"Haz tu pedido\"\n self.tabBarController?.navigationItem....
2022/11/03
[ "https://Stackoverflow.com/questions/74310507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15324640/" ]
74,310,550
<p>I have a table called traffic shown below. I have to write a query which list all the protocols for which incoming traffic is higher than outgoing. The result should be in this format - protocol, traffic_in, traffic_out and sorted in ascending by protocol.</p> <p>Query I wrote was,</p> <pre><code>select protoc...
[ { "answer_id": 74310606, "author": "GMB", "author_id": 10676716, "author_profile": "https://Stackoverflow.com/users/10676716", "pm_score": 3, "selected": true, "text": "sum HAVING WHERE select \n protocol\n , sum(traffic_in)\n , sum(traffic_out) \nfrom traffic \ngroup by protoco...
2022/11/03
[ "https://Stackoverflow.com/questions/74310550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13741118/" ]
74,310,558
<p>I'm learning Python at the moment and I'm resolving easy problems to get the feeling of it.</p> <p>I'm trying to read a text file and print the maze that is inside of it:</p> <pre><code>########## ##---##--# #--------# #---###--# #--------# ##-------# ########## </code></pre> <p>For now I have the following:</p> <pr...
[ { "answer_id": 74310606, "author": "GMB", "author_id": 10676716, "author_profile": "https://Stackoverflow.com/users/10676716", "pm_score": 3, "selected": true, "text": "sum HAVING WHERE select \n protocol\n , sum(traffic_in)\n , sum(traffic_out) \nfrom traffic \ngroup by protoco...
2022/11/03
[ "https://Stackoverflow.com/questions/74310558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12145354/" ]
74,310,591
<p>I have a section of my game where I have to click a button to load the next scene. I'm trying to make it so that when any single button is clicked it can no longer be clicked again, since you will be revisiting the same scene later in the game. (It is a text adventure section, so I'm making the route you took unavai...
[ { "answer_id": 74310606, "author": "GMB", "author_id": 10676716, "author_profile": "https://Stackoverflow.com/users/10676716", "pm_score": 3, "selected": true, "text": "sum HAVING WHERE select \n protocol\n , sum(traffic_in)\n , sum(traffic_out) \nfrom traffic \ngroup by protoco...
2022/11/03
[ "https://Stackoverflow.com/questions/74310591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412475/" ]
74,310,621
<p>In python I am appending elements to a list. The element name I am getting from an input file, so the element_name is an unknown. I would like to create a new list by adding a number to the end of the original list (dyn_list1) or even by using one of the elements in the list (element_name). How can this be achieved?...
[ { "answer_id": 74311211, "author": "emirongrr", "author_id": 20408740, "author_profile": "https://Stackoverflow.com/users/20408740", "pm_score": 0, "selected": false, "text": "list_ = [\"ethereum\", \"is\", \"future\"] #your list\nnew_list = [] #declare your new ...
2022/11/03
[ "https://Stackoverflow.com/questions/74310621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9270227/" ]
74,310,623
<p>I have 2 issues, the first is I'm trying to avoid duplicate values and display SELECT DISTINCT Names in a column as shown in the image, there are 2 rows with the name Rob, I only want to display 1 since both rows have the same name.</p> <p>My other issue is I'm trying to fill the textbox with the column information ...
[ { "answer_id": 74310852, "author": "Nycolas Silvestre", "author_id": 11587745, "author_profile": "https://Stackoverflow.com/users/11587745", "pm_score": 0, "selected": false, "text": "_context.Employees\n.Where(x => x.DepartmentName == value)\n.Distinct()\n.ToList());\n _context.Employee...
2022/11/03
[ "https://Stackoverflow.com/questions/74310623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9748930/" ]
74,310,658
<p>I have a column in the format -</p> <pre><code>MAX_DATE PROCESS_DATE 2022-10-14T16:09:09.272+00:00 2022-11-08T15:43:29.027+00:00 </code></pre> <p>WHEN I AM WRITING THE CONDITION</p> <pre><code>SELECT * FROM ANC WHERE MAX_DATE &gt; PROCESS_DATE </code></pre> <p>Even then a lo...
[ { "answer_id": 74310698, "author": "mark james", "author_id": 18293547, "author_profile": "https://Stackoverflow.com/users/18293547", "pm_score": 0, "selected": false, "text": "where \nconvert(datetime, MAX_DATE) >= convert(datetime,PROCESS_DATE)\n" }, { "answer_id": 74310929, ...
2022/11/03
[ "https://Stackoverflow.com/questions/74310658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1490556/" ]
74,310,659
<p>How do I replace multiple column names with different values? Ideally I want to remove certain characters in column names and replace others.</p> <p>I have to run my jupyter notebook twice in order to get this code to work. Does anyone know the reason for this? Also, how would I go about simplifying this code (I am ...
[ { "answer_id": 74310717, "author": "Naveed", "author_id": 3494754, "author_profile": "https://Stackoverflow.com/users/3494754", "pm_score": 0, "selected": false, "text": "# create a list of columns and assign to the DF\ncols = ['col1','col2','col3','col4']\ndf.columns=df.columns = cols\n...
2022/11/03
[ "https://Stackoverflow.com/questions/74310659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412560/" ]
74,310,699
<p>I need to add comma between the two curly braces except last one.</p> <p>Below is the input:</p> <pre><code>{&quot;id&quot;: &quot;1&quot;, &quot;eventName&quot;: &quot;Pause&quot;, &quot;eventTime&quot;: &quot;2022-11-02T21:00:42Z&quot;}{&quot;id&quot;: &quot;2&quot;, &quot;eventName&quot;: &quot;Resume&quot;, &quo...
[ { "answer_id": 74310736, "author": "drx", "author_id": 20353137, "author_profile": "https://Stackoverflow.com/users/20353137", "pm_score": 0, "selected": false, "text": "string.replace() input_string = \"\"\"\n{\"id\": \"1\", \"eventName\": \"Pause\", \"eventTime\": \"2022-11-02T21:00:42...
2022/11/03
[ "https://Stackoverflow.com/questions/74310699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7567597/" ]
74,310,723
<p>For a layout, I need to have three flex items (rows) in a flex container, and I want them justified as <code>space-between</code>... The first row will contain some cloud tags, the second a price, and the third a Read more link.</p> <p>But there will be cases where for specific items, only the last row (the Read mor...
[ { "answer_id": 74310777, "author": "Johannes", "author_id": 5641669, "author_profile": "https://Stackoverflow.com/users/5641669", "pm_score": 1, "selected": false, "text": "flex-direction: column-reverse; .container {\n background-color: #aaa;\n display: flex;\n flex-direction: column...
2022/11/03
[ "https://Stackoverflow.com/questions/74310723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15576971/" ]
74,310,742
<p>I’m trying to get a daily aggregate step count from Google's new Health Connect API:</p> <pre><code>val request = AggregateGroupByPeriodRequest( setOf(StepsRecord.COUNT_TOTAL), TimeRangeFilter.between(Instant.now().minus(10, ChronoUnit.DAYS), Instant.now()), Period.ofDays(1), setOf&lt...
[ { "answer_id": 74310777, "author": "Johannes", "author_id": 5641669, "author_profile": "https://Stackoverflow.com/users/5641669", "pm_score": 1, "selected": false, "text": "flex-direction: column-reverse; .container {\n background-color: #aaa;\n display: flex;\n flex-direction: column...
2022/11/03
[ "https://Stackoverflow.com/questions/74310742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/526829/" ]
74,310,760
<p>Here's the code I wrote to put the names and numbers into a file:</p> <pre><code>def main(): num_players = int(input(&quot;How many players are there?&quot;)) golf = open(&quot;golf.txt&quot;, 'w') for i in range(num_players): player_name = str(input(&quot;What is the player's name?&quot;)) ...
[ { "answer_id": 74310907, "author": "Kilian", "author_id": 15188988, "author_profile": "https://Stackoverflow.com/users/15188988", "pm_score": 0, "selected": false, "text": "def main():\n file_reader = open(\"golf.txt\",'r')\n raw_data = file_reader.read().split('\\n')\n file_rea...
2022/11/03
[ "https://Stackoverflow.com/questions/74310760", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20153932/" ]
74,310,774
<p>I have this date type:</p> <pre><code>data Storage = HDD String Int Int | SSD String Int deriving (Eq, Show) </code></pre> <p>HDD (Producer) (RPM) (Capacity) | SSD (Producer) (Capacity)</p> <p>My task is to list all the HDDs which are larger than the biggest SSD capacity wise (if there are no SSDs, then list all the...
[ { "answer_id": 74316643, "author": "Marc Talbot", "author_id": 670339, "author_profile": "https://Stackoverflow.com/users/670339", "pm_score": 1, "selected": false, "text": "maxSSD :: [Int] -> Int\nmaxSSD = foldr f 0 \n where f a (cap (SSD c b)) = max a (cap (SSD c b))\n foldr :: (a -...
2022/11/03
[ "https://Stackoverflow.com/questions/74310774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20386169/" ]
74,310,785
<p>How to flip the image in webGL? <a href="https://i.stack.imgur.com/5i17f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5i17f.png" alt="enter image description here" /></a></p> <p>The original image is: <a href="https://i.stack.imgur.com/ETv20.png" rel="nofollow noreferrer"><img src="https://i.st...
[ { "answer_id": 74316643, "author": "Marc Talbot", "author_id": 670339, "author_profile": "https://Stackoverflow.com/users/670339", "pm_score": 1, "selected": false, "text": "maxSSD :: [Int] -> Int\nmaxSSD = foldr f 0 \n where f a (cap (SSD c b)) = max a (cap (SSD c b))\n foldr :: (a -...
2022/11/04
[ "https://Stackoverflow.com/questions/74310785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14264307/" ]
74,310,790
<p>I have a string with a sentence and an array with some words, I need to sort this array so that the words contained in them are descending based on how often they appear in the string.</p> <p>ex:</p> <pre><code>str = &quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut l...
[ { "answer_id": 74316643, "author": "Marc Talbot", "author_id": 670339, "author_profile": "https://Stackoverflow.com/users/670339", "pm_score": 1, "selected": false, "text": "maxSSD :: [Int] -> Int\nmaxSSD = foldr f 0 \n where f a (cap (SSD c b)) = max a (cap (SSD c b))\n foldr :: (a -...
2022/11/04
[ "https://Stackoverflow.com/questions/74310790", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20410595/" ]
74,310,818
<p>I am using REACT 18.2, and I have a .env file that has REACT_APP_API_URL and REACT_APP_API_SECRET so I can use them during API Calls.</p> <p>After I do <code>npm run build</code> and run the app, the variables are successfully used within the application using <code>process.env.REACT_APP_API_URL</code> in JS API Cal...
[ { "answer_id": 74310853, "author": "CertainPerformance", "author_id": 9515207, "author_profile": "https://Stackoverflow.com/users/9515207", "pm_score": 1, "selected": true, "text": "process.env.REACT_APP_API_URL" }, { "answer_id": 74311125, "author": "shaunpx2", "author_i...
2022/11/04
[ "https://Stackoverflow.com/questions/74310818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2612357/" ]
74,310,822
<p>Basically I need a function that makes x decrement to 0 over a certain time period (40 seconds) This seems pretty simple in theory but I haven't been able to do it for a bit now.</p> <pre class="lang-cpp prettyprint-override"><code>static auto decrement = [](int start_value, int end_value, int time) { //i need t...
[ { "answer_id": 74310978, "author": "Captain Giraffe", "author_id": 451600, "author_profile": "https://Stackoverflow.com/users/451600", "pm_score": -1, "selected": false, "text": "auto decrement = [&cool](int start_value, int end_value, int time) \n{ // assuming start < end. Adjust if n...
2022/11/04
[ "https://Stackoverflow.com/questions/74310822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15390666/" ]
74,310,833
<pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;time.h&gt; #include &lt;stdbool.h&gt; #define BTT 10 void create_pirolito(int list[BTT]); void create_retardado(int list[BTT]); void compare_lists(int list1[BTT], int list2[BTT]); void prints_both(int list1[BTT], int list2[BTT]); void crea...
[ { "answer_id": 74310978, "author": "Captain Giraffe", "author_id": 451600, "author_profile": "https://Stackoverflow.com/users/451600", "pm_score": -1, "selected": false, "text": "auto decrement = [&cool](int start_value, int end_value, int time) \n{ // assuming start < end. Adjust if n...
2022/11/04
[ "https://Stackoverflow.com/questions/74310833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20381544/" ]
74,310,836
<p>I've been googling for how to search in Splunk to find cases where two fields are not equal to each other.</p> <p>The consensus is to do it like this:</p> <pre><code>index=&quot;*&quot; source=&quot;*.csv&quot; | where Requester!=&quot;Requested For&quot; </code></pre> <p>However, this does not work!</p> <p>This ...
[ { "answer_id": 74319434, "author": "warren", "author_id": 4418, "author_profile": "https://Stackoverflow.com/users/4418", "pm_score": 1, "selected": false, "text": "index=* source=*.csv Requester=* NOT Requester=\"Requested For\"\n Requester Requested For" }, { "answer_id": 74327...
2022/11/04
[ "https://Stackoverflow.com/questions/74310836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5848304/" ]
74,310,846
<p>I'm creating a program that counts letters. I created two dictionaries that both have the same word and, because they are the same exact word, both have the same counter. I want to know how to merge the two dictionaries so that it updates the counters as well, but I consistently receive the result &quot;NONE.&quot;<...
[ { "answer_id": 74319434, "author": "warren", "author_id": 4418, "author_profile": "https://Stackoverflow.com/users/4418", "pm_score": 1, "selected": false, "text": "index=* source=*.csv Requester=* NOT Requester=\"Requested For\"\n Requester Requested For" }, { "answer_id": 74327...
2022/11/04
[ "https://Stackoverflow.com/questions/74310846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20017084/" ]
74,310,857
<p>I have a Gradle project (say project A) that depends on another Gradle project (say B). Each project live in their own git repository. Sometimes when I have to make a non-trivial change across both projects, I will make the code changes in B and push to remote where our CI will pick it up and release it as a new ver...
[ { "answer_id": 74319434, "author": "warren", "author_id": 4418, "author_profile": "https://Stackoverflow.com/users/4418", "pm_score": 1, "selected": false, "text": "index=* source=*.csv Requester=* NOT Requester=\"Requested For\"\n Requester Requested For" }, { "answer_id": 74327...
2022/11/04
[ "https://Stackoverflow.com/questions/74310857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20403385/" ]
74,310,923
<p>What is the effect of writing the value of the option when returning the closure?</p> <pre class="lang-rust prettyprint-override"><code> let value = Some(0); let closure = if value.is_some() { |value: i32| false } else { |value: i32| true }; </code></pre> <p>Th...
[ { "answer_id": 74314153, "author": "Oussama Gammoudi", "author_id": 3978243, "author_profile": "https://Stackoverflow.com/users/3978243", "pm_score": 0, "selected": false, "text": "Fn(i32) -> bool\n T: impl Fn(i32) -> bool\n Box<dyn Fn(i32)->bool>" }, { "answer_id": 74318271, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74310923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412752/" ]
74,310,924
<p>I'm tryed but that doesn't work</p> <pre><code>&lt;button type=&quot;button&quot; class=&quot;btn btn-secondary glyphicon glyphicon-chevron-left&quot;&gt;&lt;/button&gt; </code></pre>
[ { "answer_id": 74314153, "author": "Oussama Gammoudi", "author_id": 3978243, "author_profile": "https://Stackoverflow.com/users/3978243", "pm_score": 0, "selected": false, "text": "Fn(i32) -> bool\n T: impl Fn(i32) -> bool\n Box<dyn Fn(i32)->bool>" }, { "answer_id": 74318271, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74310924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4665067/" ]
74,310,940
<p>In my Outlook, I have two accounts configured:</p> <ol> <li>my main account / inbox: chip@mail.com</li> <li>a shared mailbox: shared@mail.com</li> </ol> <p>So there are two different mailboxes.</p> <p>I could hide some default folders using VBA in both mailboxes. But now I want to unhide a default folder in the shar...
[ { "answer_id": 74313616, "author": "JohnM", "author_id": 11318818, "author_profile": "https://Stackoverflow.com/users/11318818", "pm_score": 0, "selected": false, "text": "Set oFolder = Session.Accounts(\"shared@mail.com\").DeliveryStore.GetDefaultFolder(olFolderNotes)\n" }, { "a...
2022/11/04
[ "https://Stackoverflow.com/questions/74310940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412744/" ]
74,310,956
<p>I am trying to append multiple occurrences of a string into a list as so:</p> <p>index('Mississippi', 's') [2,3,5,6]</p> <p>s is found at index 2,3,5 and 6.</p> <p>It's a very simple code, yet I'm not sure why mine isn't working ?</p> <p>Python</p> <pre><code>def index(w,l): wo=[] for i in range(len(w)): ...
[ { "answer_id": 74310966, "author": "Barmar", "author_id": 1491895, "author_profile": "https://Stackoverflow.com/users/1491895", "pm_score": 2, "selected": false, "text": "w.find() i mo.append(wor) mo.append(i) def index(w, l):\n return [i for i, c in enumerate(w) if c == l]\n" }, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74310956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19861101/" ]
74,310,965
<p>I've recently been using Tkinter and I'm usually running into this problem:</p> <p>Let's say I have to clear a label every time I press a button to show something different to avoid the previous output mixing with the new content of the label. I made a code example to show what I mean:</p> <pre><code>from tkinter im...
[ { "answer_id": 74310966, "author": "Barmar", "author_id": 1491895, "author_profile": "https://Stackoverflow.com/users/1491895", "pm_score": 2, "selected": false, "text": "w.find() i mo.append(wor) mo.append(i) def index(w, l):\n return [i for i, c in enumerate(w) if c == l]\n" }, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74310965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19934155/" ]
74,310,974
<p>Since the version 2210: October 27 update every action brings up the &quot;Excel ran out of resources while attempting to calculate...&quot; warning.</p> <p>It is happening on all the machines in our office and multiple files (all copies of the same file made over many months/years)</p> <p>The workbook is very compl...
[ { "answer_id": 74310966, "author": "Barmar", "author_id": 1491895, "author_profile": "https://Stackoverflow.com/users/1491895", "pm_score": 2, "selected": false, "text": "w.find() i mo.append(wor) mo.append(i) def index(w, l):\n return [i for i, c in enumerate(w) if c == l]\n" }, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74310974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412729/" ]
74,310,982
<p>I am trying to implement a exercise with child process and pipes in rust. The exercise consist in child process 2 send message to child process 1, the message that I recieved in c1 I have to return to c2, I have to do it 10 times every 2 seconds. I have a code that might to do it, but when I want to run it, it's sti...
[ { "answer_id": 74310966, "author": "Barmar", "author_id": 1491895, "author_profile": "https://Stackoverflow.com/users/1491895", "pm_score": 2, "selected": false, "text": "w.find() i mo.append(wor) mo.append(i) def index(w, l):\n return [i for i, c in enumerate(w) if c == l]\n" }, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74310982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15250954/" ]
74,311,041
<p>I've got below form:</p> <pre><code>&lt;%= f.hidden_field :document_type, value: item %&gt; &lt;%= f.label :file, 'Upload', class: &quot;btn btn-outline-primary btn-sm custom-btn-sm&quot;, id: &quot;upload_kyc_#{idx}&quot;, name: &quot;upload_button&quot; %&gt; &lt;%= f.file_field :file, class: &quot;inputfile&quot;...
[ { "answer_id": 74311850, "author": "Alter Lagos", "author_id": 895789, "author_profile": "https://Stackoverflow.com/users/895789", "pm_score": 0, "selected": false, "text": "attach_file('upload_kyc_0', pdf_path, visible: true)` \n attach_file('file', pdf_path, visible: true)\n" }, { ...
2022/11/04
[ "https://Stackoverflow.com/questions/74311041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10443890/" ]
74,311,062
<p>I have the following dataframe in R. Is there a quick way to replace all of the NA values in the dataframe with a blank string in dplyr?</p> <pre><code>data &lt;- structure(list(Bank = c(&quot;Primary Residential Mortgage Loans&quot;, &quot;FNB&quot;, &quot;BWHK&quot;, &quot;NED&quot;, &quot;STD&quot;, &quot;Averag...
[ { "answer_id": 74311277, "author": "zephryl", "author_id": 17303805, "author_profile": "https://Stackoverflow.com/users/17303805", "pm_score": 3, "selected": true, "text": "tidyr::replace_na() dplyr::mutate(across()) replace_na() library(dplyr)\nlibrary(tidyr)\n\ndata %>%\n mutate(acros...
2022/11/04
[ "https://Stackoverflow.com/questions/74311062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12388534/" ]
74,311,093
<p>I would like users to have the ability to update their email address. I created a profile that has fields, but the email address is in the users table. I created a form that adds a custom form field and it works for update. However, I can't find a way to pre-populate this field on a REQUEST.GET.</p> <pre><code># for...
[ { "answer_id": 74311277, "author": "zephryl", "author_id": 17303805, "author_profile": "https://Stackoverflow.com/users/17303805", "pm_score": 3, "selected": true, "text": "tidyr::replace_na() dplyr::mutate(across()) replace_na() library(dplyr)\nlibrary(tidyr)\n\ndata %>%\n mutate(acros...
2022/11/04
[ "https://Stackoverflow.com/questions/74311093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16178069/" ]
74,311,098
<p>I'm trying to redirect a subdomain user to his profile. For example: If user requested user.example.com he gets redirected to example.com/user</p> <p>I searched a lot, and most answers were old and didn't work.</p> <p>Things I have done:</p> <ol> <li>Created A record with *.example.com.</li> <li>Enabled wildcard red...
[ { "answer_id": 74356284, "author": "Satyandra Shakya", "author_id": 12953436, "author_profile": "https://Stackoverflow.com/users/12953436", "pm_score": 0, "selected": false, "text": "RewriteEngine on \nRewriteCond %{HTTP_HOST} ^(.+)\\.example\\.com$ [NC] \nRewriteRule (.*) example.com/%1...
2022/11/04
[ "https://Stackoverflow.com/questions/74311098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412817/" ]
74,311,103
<p>Inside a STORED PROCEDURE, I'm trying to change the selection of my for loop, depending on the variable, JOINS AND VARIABLES change and retrieve different data, but I can't put an if inside the for loop.</p> <pre><code>V_NEW_LOGIC BOOLEAN; BEGIN V_NEW_LOGIC = false; FOR rec IN( IF(V_NEW_LOGIC) THEN SEL...
[ { "answer_id": 74312393, "author": "Connor McDonald", "author_id": 7367293, "author_profile": "https://Stackoverflow.com/users/7367293", "pm_score": 2, "selected": false, "text": "V_NEW_LOGIC BOOLEAN;\nv_bool_as_int int;\nBEGIN\n\nV_NEW_LOGIC = false;\nv_bool_as_int := case when V_NEW_LO...
2022/11/04
[ "https://Stackoverflow.com/questions/74311103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19708928/" ]
74,311,104
<p>Is there a way to swap the digits of a 2-digit integer without converting to string and back?</p> <pre><code>number = int(input()) digit_1 = number // 10 digit_2 = number % 10 swapped_number = (digit_2 * 10)+ digit_1 print(swapped_number) </code></pre> <p>so this is what i have so far and it works beside for the fa...
[ { "answer_id": 74311111, "author": "Andreas", "author_id": 11971785, "author_profile": "https://Stackoverflow.com/users/11971785", "pm_score": 1, "selected": false, "text": "number = input()\nprint(number[::-1])\n" }, { "answer_id": 74311314, "author": "Pierre D", "author...
2022/11/04
[ "https://Stackoverflow.com/questions/74311104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412889/" ]
74,311,130
<p>I just started learning and using Python today and I am working on a discord bot that allows for custom user queries. In this current iteration, the user can specify how many dice and how many sides are rolled. The bot then displays the results in Discord. I am wanting to save these results in an external log file f...
[ { "answer_id": 74311111, "author": "Andreas", "author_id": 11971785, "author_profile": "https://Stackoverflow.com/users/11971785", "pm_score": 1, "selected": false, "text": "number = input()\nprint(number[::-1])\n" }, { "answer_id": 74311314, "author": "Pierre D", "author...
2022/11/04
[ "https://Stackoverflow.com/questions/74311130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412896/" ]
74,311,139
<p>I've been using <code>/sys/class/net/eno1/statistics/rx_bytes</code> and <code>tx_bytes</code> to gather stats on my network interface. The trouble is, that network has a device (a Silicon Dust HDHOMERUN HDTV tuner) which constantly streams UDP packets at a very high rate that I don't want to monitor. I'd like to re...
[ { "answer_id": 74311111, "author": "Andreas", "author_id": 11971785, "author_profile": "https://Stackoverflow.com/users/11971785", "pm_score": 1, "selected": false, "text": "number = input()\nprint(number[::-1])\n" }, { "answer_id": 74311314, "author": "Pierre D", "author...
2022/11/04
[ "https://Stackoverflow.com/questions/74311139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2731575/" ]
74,311,176
<p>I have the following <strong>Interface</strong> &amp; <strong>Class</strong> and I also wrote a unit test as shown down, but I got an exception:</p> <p>Assertion failed for the following call: AsyncConsole.example1.IPlayer.Start(i: 1) Expected to find it once or more but didn't find it among the calls:</p> <p>Is the...
[ { "answer_id": 74311111, "author": "Andreas", "author_id": 11971785, "author_profile": "https://Stackoverflow.com/users/11971785", "pm_score": 1, "selected": false, "text": "number = input()\nprint(number[::-1])\n" }, { "answer_id": 74311314, "author": "Pierre D", "author...
2022/11/04
[ "https://Stackoverflow.com/questions/74311176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5101225/" ]
74,311,198
<p>I want to create a window which height should be equal to the height of the child QLabel, the QLabel can be set to any size text and setWrap is True. Here is my current code:</p> <pre class="lang-py prettyprint-override"><code>class TextWindow(QMainWindow): def __init__(self, parent=None): super().__init...
[ { "answer_id": 74311309, "author": "Alexander", "author_id": 17829451, "author_profile": "https://Stackoverflow.com/users/17829451", "pm_score": 1, "selected": false, "text": "QLabel sizeHint() text = \"Some very long text that will possible need to be wrapped and take up more than one l...
2022/11/04
[ "https://Stackoverflow.com/questions/74311198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15709458/" ]
74,311,275
<pre><code>import requests from bs4 import BeautifulSoup import openai #write each line of nuclear.txt to a list with open('nuclear.txt', 'r') as f: lines = f.readlines() #remove the newline character from each line lines = [line.rstrip() for line in lines] #gather the text from each website and add it to a new...
[ { "answer_id": 74311301, "author": "Nic13Gamer", "author_id": 11839142, "author_profile": "https://Stackoverflow.com/users/11839142", "pm_score": 2, "selected": false, "text": "pip3 install openai" }, { "answer_id": 74311332, "author": "JialeDu", "author_id": 19133920, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74311275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19416518/" ]
74,311,276
<p>Shown Error: NoSuchMethodError: The getter 'text' was called on null. <br> The getter 'text was called on null. <br> Receiver: null <br> Tried calling: text <br></p> <p>How to create getter that get each controller value from the constructor? so that I can call it in the TextFormField</p> <pre><code>import 'package:...
[ { "answer_id": 74311301, "author": "Nic13Gamer", "author_id": 11839142, "author_profile": "https://Stackoverflow.com/users/11839142", "pm_score": 2, "selected": false, "text": "pip3 install openai" }, { "answer_id": 74311332, "author": "JialeDu", "author_id": 19133920, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74311276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8765916/" ]
74,311,313
<p>I need the code to sort the array so the highest number comes first, then the lowest number, then go back and sort the highest number left and then the lowest number left.</p> <p>ex: [ 1, 2, 3, 4 ] = [ 4, 1, 3, 2 ]</p> <p>I tried this way, but the code is limited to only 4 numbers in the array. -if the array is [ 1,...
[ { "answer_id": 74311329, "author": "CertainPerformance", "author_id": 9515207, "author_profile": "https://Stackoverflow.com/users/9515207", "pm_score": 3, "selected": true, "text": "const m = [1, 2, 3, 4];\nm.sort((a, b) => a - b); // if not already sorted\n\nconst sorted = [];\nwhile (m...
2022/11/04
[ "https://Stackoverflow.com/questions/74311313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20410595/" ]
74,311,324
<p>I am trying to combine my computer vision code with existing code from DepthAI(this is the code that actually retrieves each frame from the camera) in order to analyze a depth map image to determine obstacles. The issue I am running into is that each frame of video from the DepthAI code seems to be in the form of 'n...
[ { "answer_id": 74311329, "author": "CertainPerformance", "author_id": 9515207, "author_profile": "https://Stackoverflow.com/users/9515207", "pm_score": 3, "selected": true, "text": "const m = [1, 2, 3, 4];\nm.sort((a, b) => a - b); // if not already sorted\n\nconst sorted = [];\nwhile (m...
2022/11/04
[ "https://Stackoverflow.com/questions/74311324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16121638/" ]
74,311,359
<p>So I'm trying to implement a method in a <code>Grid</code> class that returns the tile (which is an instance of the tile class) specified by two coordinates the user inputs. But I have no idea how to go about implementing it.</p> <p>I have an <code>ArrayList</code> that contains all the instances of the tiles like t...
[ { "answer_id": 74311408, "author": "exoad", "author_id": 14501343, "author_profile": "https://Stackoverflow.com/users/14501343", "pm_score": 2, "selected": true, "text": "get() int_arr[2]; // some number\n int_arraylist.get(2); // some number\n xCoords yCoords if(xCoord > boundX || yCoor...
2022/11/04
[ "https://Stackoverflow.com/questions/74311359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20413002/" ]
74,311,376
<p>Next13 was released a week ago, and I am trying to migrate a next12 app to a next13. I want to use server-side components as much as possible, but I can't seem to use</p> <pre><code>import { createContext } from 'react'; </code></pre> <p>in any server component.</p> <p>I am getting this error:</p> <pre><code>Server ...
[ { "answer_id": 74311552, "author": "Tomer Almog", "author_id": 2044706, "author_profile": "https://Stackoverflow.com/users/2044706", "pm_score": 3, "selected": true, "text": "createServerContext import { createServerContext } from 'react';\n" }, { "answer_id": 74311631, "auth...
2022/11/04
[ "https://Stackoverflow.com/questions/74311376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2044706/" ]
74,311,420
<p>I want to create animated bottomAppBar in jetpack compose (something like image) but Fab position in jetpack compose is only center or end and i need to move FAB to left at least, my code is : <a href="https://i.stack.imgur.com/lFSZG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lFSZG.png" alt="...
[ { "answer_id": 74311501, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 3, "selected": true, "text": "LTR RTL CompositionLocalProvider CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl ) {\n ...
2022/11/04
[ "https://Stackoverflow.com/questions/74311420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11229077/" ]
74,311,446
<p>Apologies in advance for incorrect terminology. I've borrowed script that saves/loads data, which I can use by referencing an interface that has a save and load method. Say I have script1, with a variable called playerHealth, I can then inherit the interface, call the save and load methods, and in those methods basi...
[ { "answer_id": 74311501, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 3, "selected": true, "text": "LTR RTL CompositionLocalProvider CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl ) {\n ...
2022/11/04
[ "https://Stackoverflow.com/questions/74311446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20413103/" ]
74,311,449
<h2>problem description:</h2> <p>While writing a loop with groovy in Jenkins pipeline(below is a smallest case can reproduce the problem):</p> <pre><code>def workList = [1, 2, 3, 4] workList.each{work-&gt; if (work == 2) { break } } sh 'hello world' </code></pre> <p>I got an error like below:</p> <pre><...
[ { "answer_id": 74311501, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 3, "selected": true, "text": "LTR RTL CompositionLocalProvider CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl ) {\n ...
2022/11/04
[ "https://Stackoverflow.com/questions/74311449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7663663/" ]
74,311,471
<p>Below is the example.</p> <pre><code>BEGIN set tablenameA = 'tablenamelala'; SELECT * FROM table($tablenameA); END </code></pre> <p>I am expecting it will return me the result from the select statement.</p>
[ { "answer_id": 74311501, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 3, "selected": true, "text": "LTR RTL CompositionLocalProvider CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl ) {\n ...
2022/11/04
[ "https://Stackoverflow.com/questions/74311471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14167512/" ]
74,311,527
<p>I am writing a fairly asynchronous program using the <code>Thread</code> library. I'll have a lot of different threads that need to access <code>string list ref</code>, is this safe without using a <code>Mutex</code>? I learned earlier today that <code>Hashtbl</code> requires a <code>Mutex</code>, but I couldn't fin...
[ { "answer_id": 74311991, "author": "Chris", "author_id": 15261315, "author_profile": "https://Stackoverflow.com/users/15261315", "pm_score": 2, "selected": false, "text": "Hashtbl string list ref Mutex" }, { "answer_id": 74314390, "author": "octachron", "author_id": 73693...
2022/11/04
[ "https://Stackoverflow.com/questions/74311527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12283863/" ]
74,311,536
<p>Tried searching around couldn't really find anything. Was hoping to find a way to revert the datetime format.</p> <p>So I start off with: 4-11-22 and I want to change to Friday, 12 November 2022.</p> <p>Using the intl package</p>
[ { "answer_id": 74311703, "author": "M14", "author_id": 16410436, "author_profile": "https://Stackoverflow.com/users/16410436", "pm_score": 0, "selected": false, "text": " final oldDateDateTime = DateFormat('dd-MM-yy').parse('4-11-22');\n final newDateString = DateFormat('EEEE, d MMMM y',...
2022/11/04
[ "https://Stackoverflow.com/questions/74311536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11642462/" ]
74,311,595
<p>I'm trying to extract specific sentence in string column and copy&amp;paste it to Nan rows in another column</p> <p>here is the detail:</p> <pre><code></code></pre> <p>`</p> <pre><code> KEY WARNSIGN_DTL EVENT_DTL 55116 77981 Nan 1. Name: Johnson 2. Date: 09 June 2018 3. Place to be f...
[ { "answer_id": 74311703, "author": "M14", "author_id": 16410436, "author_profile": "https://Stackoverflow.com/users/16410436", "pm_score": 0, "selected": false, "text": " final oldDateDateTime = DateFormat('dd-MM-yy').parse('4-11-22');\n final newDateString = DateFormat('EEEE, d MMMM y',...
2022/11/04
[ "https://Stackoverflow.com/questions/74311595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20376341/" ]
74,311,627
<p>I have this object:</p> <pre><code>[ { &quot;latitude&quot;: &quot;113.232160114&quot;, &quot;longitude&quot;: &quot;-1.786978559&quot; }, { &quot;latitude&quot;: &quot;113.211955085&quot;, &quot;longitude&quot;: &quot;-1.790031776&quot; } ] </code></pre> <p>is there any possible way ...
[ { "answer_id": 74311667, "author": "Andrew Parks", "author_id": 5898421, "author_profile": "https://Stackoverflow.com/users/5898421", "pm_score": 1, "selected": false, "text": "const a = [\n { latitude: '113.232160114', longitude: '-1.786978559' },\n { latitude: '113.211955085', longit...
2022/11/04
[ "https://Stackoverflow.com/questions/74311627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2948285/" ]
74,311,664
<p>Hello when I use binascii.a2b_hex, error is occured. There is no error message but the return value is wrong. Here is the data and the resule.</p> <p>Input : FEB10AA86764FFFF Output : b'\xfe\xb1\n\xa8gd\xff\xff'</p> <pre><code>import binascii ta['data'] = ta['data'].apply(binascii.a2b_hex) </code></pre> <p>n\xa8g...
[ { "answer_id": 74311737, "author": "Mark Ransom", "author_id": 5987, "author_profile": "https://Stackoverflow.com/users/5987", "pm_score": 2, "selected": false, "text": "FE \\xfe\nB1 \\xb1\n0A \\n\nA8 \\xa8\n67 g\n64 d\nFF \\xff\nFF \\xff\n" }, { "answer_id": 74313147, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74311664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14769586/" ]
74,311,670
<p>I'm very new to backend development, and I'm feeling a bit stuck with accomplishing my goal here. I'm trying to pull testimonials and blurbs out of an SQL database and have them populate on the page that I've built. Currently, the code that I've written does nothing but pull an error (8178) and tell me that it expec...
[ { "answer_id": 74311737, "author": "Mark Ransom", "author_id": 5987, "author_profile": "https://Stackoverflow.com/users/5987", "pm_score": 2, "selected": false, "text": "FE \\xfe\nB1 \\xb1\n0A \\n\nA8 \\xa8\n67 g\n64 d\nFF \\xff\nFF \\xff\n" }, { "answer_id": 74313147, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74311670", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20412989/" ]
74,311,676
<p>Hope you are doing well. Here is one problem needs your help. I am working with some data on pandas.</p> <p><a href="https://i.stack.imgur.com/nLHbR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nLHbR.png" alt="enter image description here" /></a></p> <p>I want to get 2 points that have the clos...
[ { "answer_id": 74311740, "author": "BENY", "author_id": 7964527, "author_profile": "https://Stackoverflow.com/users/7964527", "pm_score": 2, "selected": false, "text": "merge input = 4 \nout = df.assign(key = df['Value']-input).merge(df.assign(key=df['Value']),on='key')\nOut[59]: \n Nam...
2022/11/04
[ "https://Stackoverflow.com/questions/74311676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14837844/" ]
74,311,689
<p>I have an AWS Terraform repo where i have an architecture for an AWS solution.</p> <p>Over time people have gone onto the management console and made changes to the architecture without changing the terraform code causing a drift between the repo and the actual architecture on aws.</p> <p>Is there a way i can change...
[ { "answer_id": 74311740, "author": "BENY", "author_id": 7964527, "author_profile": "https://Stackoverflow.com/users/7964527", "pm_score": 2, "selected": false, "text": "merge input = 4 \nout = df.assign(key = df['Value']-input).merge(df.assign(key=df['Value']),on='key')\nOut[59]: \n Nam...
2022/11/04
[ "https://Stackoverflow.com/questions/74311689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14065037/" ]
74,311,745
<p>I am fairly new to iOS development. I am trying to update the property &quot;cars&quot; in the &quot;Sire&quot; model using a stepper. Whenever I press on + or - from the stepper controls, it changes the value by a step and then becomes disabled.</p> <p>If I bind the stepper to the variable cars, it works flawlessly...
[ { "answer_id": 74312516, "author": "workingdog support Ukraine", "author_id": 11969817, "author_profile": "https://Stackoverflow.com/users/11969817", "pm_score": 2, "selected": false, "text": "ObservableObject Sire Stepper Textfield struct ContentView: View {\n @StateObject var sire...
2022/11/04
[ "https://Stackoverflow.com/questions/74311745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13603702/" ]
74,311,772
<p>I have a text file and the contents can be:</p> <pre><code>debug --configuration &quot;Release&quot; \p corebuild </code></pre> <p>Or:</p> <pre><code>-c &quot;Dev&quot; debug </code></pre> <p>And now I have to validate the file to see if it has any pattern that matches <code>--configuration</code> or <code>-c</code...
[ { "answer_id": 74311836, "author": "mklement0", "author_id": 45375, "author_profile": "https://Stackoverflow.com/users/45375", "pm_score": 1, "selected": false, "text": "--configuration -c -match $true $false $Matches # Note: Omitting -Raw makes Get-Content read the file *line by line*.\...
2022/11/04
[ "https://Stackoverflow.com/questions/74311772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7835017/" ]
74,311,777
<p>C arrays allow for negative indexing, but I can't think of a use for that, seeing that you'll never have an element at a negative index.</p> <p>Sure, you can do this:</p> <pre><code>struct Foo { int arr1[3] = { 1, 2, 3 }; int arr2[3] = { 4, 5, 6 }; }; int main() { Foo foo; std::cout &lt;&lt; foo.arr2[-2...
[ { "answer_id": 74311805, "author": "Cedric Martens", "author_id": 4048657, "author_profile": "https://Stackoverflow.com/users/4048657", "pm_score": 4, "selected": true, "text": "N &array[0] + sizeof(array[0]) * N #include <stdio.h>\nint main()\n{ \n int a[5] = {5, 2, 7, 4, 3};\n in...
2022/11/04
[ "https://Stackoverflow.com/questions/74311777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19333949/" ]
74,311,789
<p>I'm using selenium &amp; selenium wire in my project. I'm writing flows to log in google cloud portals..</p> <p>I enter my google cloud mail then, press on continue in Google sign in and then it log in to gcp.</p> <p>I got some errors:</p> <blockquote> <p>Request has invalid authentication credentials. Expected OAut...
[ { "answer_id": 74311805, "author": "Cedric Martens", "author_id": 4048657, "author_profile": "https://Stackoverflow.com/users/4048657", "pm_score": 4, "selected": true, "text": "N &array[0] + sizeof(array[0]) * N #include <stdio.h>\nint main()\n{ \n int a[5] = {5, 2, 7, 4, 3};\n in...
2022/11/04
[ "https://Stackoverflow.com/questions/74311789", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6455516/" ]
74,311,800
<p>This is my <code>auth-depl.yaml</code> file:</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: auth-depl spec: replicas: 1 selector: matchLabels: app: auth template: metadata: labels: app: auth spec: containers: - name: auth image: tes...
[ { "answer_id": 74311805, "author": "Cedric Martens", "author_id": 4048657, "author_profile": "https://Stackoverflow.com/users/4048657", "pm_score": 4, "selected": true, "text": "N &array[0] + sizeof(array[0]) * N #include <stdio.h>\nint main()\n{ \n int a[5] = {5, 2, 7, 4, 3};\n in...
2022/11/04
[ "https://Stackoverflow.com/questions/74311800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17100762/" ]
74,311,804
<p>I'm trying to program something that checks to see if two birthdays match, and counts how many birthdays have to be generated before we get a matching date. The actual date isn't important so I used the random.sample function to generate two numbers between 1 and 365. However when I try to compare these numbers in a...
[ { "answer_id": 74311834, "author": "Mark Tolonen", "author_id": 235698, "author_profile": "https://Stackoverflow.com/users/235698", "pm_score": 2, "selected": false, "text": "range(1,365)" }, { "answer_id": 74312063, "author": "Arifa Chan", "author_id": 19574157, "aut...
2022/11/04
[ "https://Stackoverflow.com/questions/74311804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20413486/" ]
74,311,807
<p>I have a parameter called <code>@Unit</code>.</p> <p>I also have a unit column in my table. I Have other requirements so I need to do a case statement in the where clause.</p> <pre><code>CASE WHEN @Unit &gt; 0 THEN unit = @Unit END </code></pre> <p>The statement however is not accepting my <code>=</code>. I...
[ { "answer_id": 74311835, "author": "NorthBigFish", "author_id": 16328089, "author_profile": "https://Stackoverflow.com/users/16328089", "pm_score": 0, "selected": false, "text": "unit = case when ISNULL(@Unit,0) > 0 then @Unit else unit end \n" }, { "answer_id": 74312772, ...
2022/11/04
[ "https://Stackoverflow.com/questions/74311807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20413511/" ]
74,311,823
<p>Why won’t this section stay contained when I change my browser screen size? I used HTML and CSS. It looks fine when I made my screen full size but then if I make my browser smaller it doesn’t show the full content. (it only shows half of the image but shows the full text) <a href="https://i.stack.imgur.com/i9qiK.jpg...
[ { "answer_id": 74311916, "author": "Yes_ _Br0", "author_id": 17467664, "author_profile": "https://Stackoverflow.com/users/17467664", "pm_score": 0, "selected": false, "text": " .container\n {\n width:100%:\n height: auto;\n margin: auto;\n }\n//Also can try\n.container\...
2022/11/04
[ "https://Stackoverflow.com/questions/74311823", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20413531/" ]
74,311,829
<p>I have two sparse matrice where the first has the property of</p> <pre><code>&lt;1x40 sparse matrix of type '&lt;class 'numpy.intc'&gt;' with 10 stored elements in Compressed Sparse Row format&gt; </code></pre> <p>And the second one:</p> <pre><code>&lt;9x15426 sparse matrix of type '&lt;class 'numpy.int64'&gt;' ...
[ { "answer_id": 74311916, "author": "Yes_ _Br0", "author_id": 17467664, "author_profile": "https://Stackoverflow.com/users/17467664", "pm_score": 0, "selected": false, "text": " .container\n {\n width:100%:\n height: auto;\n margin: auto;\n }\n//Also can try\n.container\...
2022/11/04
[ "https://Stackoverflow.com/questions/74311829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3319713/" ]
74,311,843
<p>Please let me know how to get this output, I have searched a lot but all of the queries shows two separate tables one for employees and another department. Here I do not have it so I tried this:</p> <pre><code>SELECT e.department_id, e.Salary FROM Employees1 e INNER JOIN employees1 s ON e.Department_Id = s.Depar...
[ { "answer_id": 74311916, "author": "Yes_ _Br0", "author_id": 17467664, "author_profile": "https://Stackoverflow.com/users/17467664", "pm_score": 0, "selected": false, "text": " .container\n {\n width:100%:\n height: auto;\n margin: auto;\n }\n//Also can try\n.container\...
2022/11/04
[ "https://Stackoverflow.com/questions/74311843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14948137/" ]
74,311,860
<p>To double-check, I try a console log both inside and outside the function.</p> <p>The one inside the function is fine, but the one outside the function displays &quot;undefined.&quot;</p> <p>I need to get the value of startDate and use it outside the function.</p> <p>I tried every suggestion here, but none of them w...
[ { "answer_id": 74311916, "author": "Yes_ _Br0", "author_id": 17467664, "author_profile": "https://Stackoverflow.com/users/17467664", "pm_score": 0, "selected": false, "text": " .container\n {\n width:100%:\n height: auto;\n margin: auto;\n }\n//Also can try\n.container\...
2022/11/04
[ "https://Stackoverflow.com/questions/74311860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14922985/" ]