input_text_instruct
stringlengths
288
45.8k
output_text
stringlengths
37
33.2k
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: XAML - IValueConverter and Behavior conflict with each other causing an endless loop to occur<p>With a Xamarin Forms application, I have an IValueConverter a...
<p>Replace below methode with your OnEntryTextChanged Method in IntegerValidationBehavior file and check it's worked.</p> <pre><code>private static void OnEntryTextChanged(object sender, TextChangedEventArgs args) { if (!string.IsNullOrWhiteSpace(args.NewTextValue)) { ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating a mask or code to simplify reading a 16 error bit parsing. Python<p>I'm still learning the python language and I was tasked with something I'm not f...
<p>There are a number of ways to do it. You don't have to test every bit combination, just each individual bit (16 in your 0000-ffff case). Here are a couple of ways illustrated with 4 bits:</p> <ol> <li>Use the built-in <code>enum.Flag</code> type. Below creates an <code>Error</code> class and defines each of the b...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: what does vector<int> dist(n, INT_MAX); mean in C++?<p>i am new to C++ and I was wondering what the below code does. I tried googling but could not find the ...
<p>The line of code serves to declare a variable called <code>dist</code>, and to initialise it is a <code>std::vector</code> object.</p> <p>The <code>&lt;int&gt;</code> part of the vector initialisation is called a template argument. The <code>std::vector</code> class is templated, which means it can store any arbitra...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hide navigation bar without losing swipe back gesture in SwiftUI<p>In SwiftUI, whenever the navigation bar is hidden, the swipe to go back gesture is disable...
<p>This should work by just extending <code>UINavigationController</code>.</p> <pre class="lang-swift prettyprint-override"><code>extension UINavigationController: UIGestureRecognizerDelegate { override open func viewDidLoad() { super.viewDidLoad() interactivePopGestureRecognizer?.delegate = self ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: spark scala: update huge dataframe with thousands of columns row-by-row<p>This is a follow up of another unresolved <a href="https://stackoverflow.com/questi...
<p>I finally found two approaches to the problem.</p> <ol> <li>Process the entire row at once and then apply UDF, and</li> <li>Merge all columns into one array and use UDF to process.</li> </ol> <p>While both worked, (1) was faster as it did not have overhead of conversion, PLUS, Spark in any case works on Row-wise dat...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display a new message each month for 20 consecutive months<p>I'm hoping someone can help me out with a solution to this problem. I'm writing a JavaScr...
<p>First let me say thank you to all who replied. Your insight helped me figure out what I was doing wrong. </p> <p>I found the answer in Nawed Khan's and Ferenc's reply. I figured some math with the years and months was needed, but couldn't think of the formula to use. I used the formula in Khan's monthDiff() method ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Failed to transform firebase-common-20.1.1.jar<p>I'm trying to add firebase to my flutter project but I'm getting this error: <a href="https://i.stack.imgur....
<p>I solved this problem by deleting .gradle folder in my user directory and then I upgraded gradle to the latest version which required my to update my java to a version that is higher than version 8 which I was using and I picked the latest version which is 18 and then I updated some kotlin packages.</p> <p>This is t...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you remove a static middleware on a post request?<p>I want the home page to stop being available after a post request. Here is my code. Thanks in adva...
<p>I am not an expert on <code>gin</code> but it is similar to <code>echo</code> so I created a snippet for you to check if it fits your needs.</p> <p>It looks like it is not possible to detach middleware after attached <a href="https://github.com/gin-gonic/gin/issues/776" rel="nofollow noreferrer">as discussed here</...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Client cannot deserialize string date time<p>This error message occurs when getting the data from MongoDB. The format is <code>yyyy-MM-dd HH:mm:ss</code>. <c...
<p>You can create a custom serializer to deserialize the <code>string</code> to a <code>DateTime</code>. In its simplest form, if you only want to deserialize, the following sample shows a custom serializer that reads the value:</p> <pre><code>public class CustomDateTimeSerializer : IBsonSerializer { public Type Valu...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parse sendBeacon data in Express<p>I'm trying to start logging my own <a href="https://github.com/GoogleChrome/web-vitals#load-web-vitals-from-a-cdn" rel="no...
<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon" rel="nofollow noreferrer"><code>navigator.sendBeacon</code></a> sends <code>Content-Type: text/plain</code> whereas <a href="http://expressjs.com/en/4x/api.html#express.json" rel="nofollow noreferrer"><code>express.json()</code></a> only...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why has !== lower precedence than === in Scala?<p>Following code does not compile:</p> <pre><code>implicit class TripleEq(val x: Int) { def === (y: Int) =...
<p>The answer is in the language specification of <a href="https://scala-lang.org/files/archive/spec/2.13/06-expressions.html#assignment-operators" rel="noreferrer">Assignment Operators</a>:</p> <blockquote> <p>There's one exception to this rule, which concerns <em>assignment operators</em>. The precedence of an assign...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Subdomaining in Firebase Hosting<p>I have a Firebase project with Hosting enabled. My default url (given by Firebase) is <code>&lt;PROJECT_NAME&gt;.web.app</...
<p>You don't get any control over the web.app subdomain that's automatically created for your project. That is entirely managed by Google. If you want to customize a domain, you will have to register one of your own and manage its DNS for use with Firebase Hosting as described in the <a href="https://firebase.google....
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xamarin ViewCell subclass getting error in run time. "ViewCell Must Have a View"?<p>I am getting this runtime error saying that the CellView needs a View. I ...
<p>The error was coming from a missing constructor that needed to initialize the Component.</p> <pre><code>public BikeSelectionCell() { InitializeComponent(); } </code></pre> <p>In the end I used the suggestion ToolmakerSteve. I also used a custom DataTemplateSelector to set specifics DataTemplate for the 2 differ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Show/Hide a component depending on items selected in DropDownPicker in React Native?<p>I am trying to use 'react-native-dropdown-picker' to select and...
<p>value returns array so must be check like this</p> <pre><code>const isDateOnly = () =&gt; { return ( Object.values(value).length === 1 &amp;&amp; Object.values(value).indexOf('date') &gt; -1 ); }; </code></pre> <br> <p>then you can check condition in render like this</p> <pre><code>&lt;View&gt;...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need to make a list by splitting the given string in python<p>Input string has 'n' times of X. <code>Like this &quot;XXXXX&quot;</code> Need to split the str...
<p>To decode this string you need 'n' and X anyway. Why not build it directly with:</p> <pre><code>li = [X] * n </code></pre> <p>Edit: If you don't have 'n', you could get it easily from the given string. (Under the condition that givenString only consist of X)</p> <pre><code>n = len(givenString) / len(str(X)) li = ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Leaderstat value addition is reverted<p><strong>What is supposed to happen:</strong> Randomiser adds number between 1-5 to 'money' and when clicked on imageg...
<p>The behavior you're getting is beause of <a href="https://developer.roblox.com/en-us/articles/Roblox-Client-Server-Model" rel="nofollow noreferrer">the way clients and the server communicate</a>. <code>LocalScript</code>s control the client, whereas a regular <code>Script</code> controls the server.</p> <p>In the cl...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove arrow from PrimeReact OverlayPanel?<p><a href="https://i.stack.imgur.com/1xAbM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.c...
<p>This can be achieved by setting the <code>content</code> style to <code>none</code> as follows:</p> <pre><code>p-overlaypanel { &amp;:before { content:none; } &amp;:after { content:none; } margin-top: 0px; # removes the gap between menu and anchor element after arrow-removal } <...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Set the right coordinate system for SpatRaster in terra<p>I want to map species occurrences and sampling stations on an IBCSO map using the package terra in ...
<p>You have coordinates in lon/lat and want to match these to the raster data.</p> <p>Example data</p> <pre><code>library(terra) x &lt;- rast(nrow=19200, ncol=19200, ext=c(-4800000, 4800000, -4800000, 4800000), crs=&quot;EPSG:9354&quot;) lon &lt;- 1:10 lat &lt;- -(77:86) </code></pre> <p>Solution</p> <pre><code>v &lt...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: function to print from from a Json each item using a for loop golang<pre><code>package main import ( &quot;encoding/json&quot; &quot;io/ioutil&quot;...
<p>do you want this?</p> <pre class="lang-golang prettyprint-override"><code>package main import ( &quot;encoding/json&quot; &quot;fmt&quot; &quot;io/ioutil&quot; &quot;log&quot; &quot;net/http&quot; ) type Response struct { Status string `json:&quot;status&quot;` Message str...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mongodb: the Options [...] is not supported<p>Here I have a server and an html file making an ajax call. I want to put the username and password inside the ...
<p>As discussed in comments above, the solution to this problem was to follow Mongodb best practices and not close the client's connection each time data was to be written to the database.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: int32 to IPv4 in javascript<p>This address has 4 octets where each octet is a single byte (or 8 bits).</p> <p>Because the above IP address has 32 bits, we ca...
<p>You need to left-pad the binary string with leading zeroes so that it is always 32 characters in length otherwise your code to extract the octet values doesn't work.</p> <p>For example:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pr...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use std::atomic in lambda expression<p>I want to capture a <code>std::atomic</code> in a lambda expression. The lifetime of the atomic variable must be tied ...
<p>You can initialize the capture directly and rely on C++17 guaranteed copy/move elision:</p> <pre><code>#include &lt;atomic&gt; int main() { auto check = [a = std::atomic_int(42)]() mutable { return a.fetch_sub(1) == 1; }; } </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is remove() for TreeSet<String> not working?<p>I am trying to solve the problem at <a href="https://leetcode.com/problems/design-a-food-rating-system" re...
<p>Well, it took me a while to find the problem. Besides the Integer compare issue which is only needed to sort equal ratings in lexical order. You were updating the ratings prior to doing a remove. But since your set uses this structure in its comparator, things got out of sync.</p> <pre><code> public void changeRati...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find match accros multiple lines?<p>I have a file that looks like this:</p> <pre><code>#% text_encoding = utf8 :xy_name1 Text :xy_name2 Text tex...
<p>The following code will do the trick:</p> <pre><code>import re data = ''' #% text_encoding = utf8 :xy_name1 Text :xy_name2 Text text text to a text. Text and text to text text, text and text provides text text text text. :xy_name3 Text ''' print(re.findall(r'^:(\S+)\s+([\S\s]*?)(?=\n:|\Z)',data,re.M))...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Manipulate dataframe with pandas to transpose columns and adjust dates?<p>How can I manipulate a dataframe like this, making a transpose that joins one under...
<pre><code># flatten the DF df2=df.stack().reset_index().rename(columns={0:'val'}) # create the date df2['date'] = (1990 + df2['level_0']).astype('str') + &quot;-&quot; + df2['level_1'] # drop unwanted columns df2=df2.drop(columns=['level_0','level_1']) df2 </code></pre> <pre><code> val date 0 1 1990-Jan 1...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JNA library initialize problem in dokany java file system<p>Currently we are trying to adapte <a href="https://github.com/jhult/dokany-java" rel="nofollow no...
<p>You have a version mismatch between your Java code and the <code>dokan1.dll</code> file you are using, because you are basing your code off a very old personal fork of the maintainer rather than the official upstream project at a tag matching the version you want to use.</p> <p>The stack trace points to <code>Native...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Shader Tutorial Doesn't Render Normals<p>I am trying to learn about shaders by trying to do <a href="https://roystan.net/articles/outline-shader.html" rel="n...
<p>just after the HLSLPROGRAM you have two #pragma, one for the vertex method and one for the fragment method, but later in the code, you only have the fragment function (Frag) and the vertex one is missing (VertDefault). As far as I know, you must have both methods implemented in a fragment shader in order for it to p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VI read line not giving desired output<p>I have a file called <code>test</code>, I open it using vi as such:</p> <pre><code>vi test </code></pre> <p>Now I ...
<p>The first stage of processing a command line in <code>vim</code> is <a href="http://vimdoc.sourceforge.net/htmldoc/eval.html#expand()" rel="nofollow noreferrer"><code>expand</code></a>ing it. <code>%</code> is expanded to the name of the current file — <code>test</code> in your case. <code>%s</code> is expanded to <...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I use pybind to load an external c++ dll and call functions?<p>I am trying to interface with a PoS terminal , which only provides a dll(c++). Can I use p...
<p>I do not have access to the code that you are using, but under the assumption that this signature that you posted is correct:</p> <pre><code>int api_GetCOMTerminalID (BYTE bPort, DWORD dwBaudRate, BYTE bParity, BYTE bDataBits, BYTE bStopBits, unsigned char* inReqBuff, int *inReqLen, BYTE *terminalId) </code></pre> ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dynamically generated class and variable name<p>I have csv like this,</p> <pre><code>name,job Jay,engineer Kay,layer hop,warrior </code></pre> <p>then I lo...
<p>Everything in Python is an object, including classes.</p> <p>The builtin type() is mostly used to check a variable type but there is a least known usage. If type() is used with 3 parameters, it creates a new type Object.</p> <p>The first parameter is the name of your class, the second is the tuple of bases classes...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Do something "if an element with some text is not present"<p>This is basically for a ReactSelect element (behaves like a <a href="https://select2.org/getting...
<p>You can do it by moving the <code>contains()</code> inside the selector,</p> <pre class="lang-js prettyprint-override"><code>options = ['option1','option2','option3']; options.forEach(option =&gt;{ cy.get('[test-id=&quot;react-select&quot;]').then(reactSelect =&gt;{ const selector = `[class=&quot;select__mu...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL. Where condition for multiple values of column<p>Im looking for some hint when trying to filter for multiple values within column. I'm interested in an &...
<p>Use aggregation:</p> <pre class="lang-sql prettyprint-override"><code>SELECT COD_OPE FROM [TABLE] WHERE STATUS IN (6, 7) GROUP BY COD_OPE HAVING COUNT(DISTINCT STATUS) = 2; </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Drop-down list selection using Selenium Python<p>I'm trying to select &quot;Manhattan&quot;, &quot;WINDSOR SQUARE&quot;, and &quot;Wall St.&quot; from the &q...
<p>The options in the dropdown menus for this app are loaded dinamically.<br /> it means, they are not loaded by default in DOM.</p> <p>So, in order to click the option, it must be present in DOM before. To achieve that, you can type the option inside the ddm's input element.</p> <p>For each dropdown menu you may need ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to ignore inline style with css?<pre><code>&lt;td class=&quot;subrubr&quot; nowrap=&quot;nowrap&quot; valign=&quot;bottom&quot;&gt; &lt;a ...
<p>You can create a specific selector to override the property</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>td[nowrap="nowrap"] { white-space: normal; }</code></pre> <pr...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: cron expression for every 30 minutes from 9am to 9pm and once at 3am midnight<p>Can you please guide me in writing a cron expression for every 30 minutes fro...
<p>Unluckily it is not possible to create it in a single cron. You will have to create 2 separate crons one which does the 30 minutes 9-21 like you have it and one to run it once at 3am.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to generalize this JS to work with all buttons of a particular type?<p>I'm not sure if my post title is specific enough for the question I'm asking. I co...
<p>This can be done with multiple ways, One way to surround each dropdown with a container <code>div</code> and give it all same class, and then use <code>querySelectorAll</code> to select all the dropdowns, and loop throw, and on each dropdown, use <code>querySelector</code> to get the <code>button</code> and <code>ul...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if a variable equals one of two values if a clean manner in JS<p>To check if <code>x</code> variable is equal to 1 or 2, i would do normally som...
<p>You could do:</p> <pre><code>if ([1, 2].includes(x)) { // .... } </code></pre> <p>Or:</p> <pre><code>if ([1, 2].indexOf(x) &gt; -1) { // .... } </code></pre> <p>Or:</p> <pre><code>switch (x) { case 1: case 2: // .... break; default: } </code></pre> <p>I don't think they're "lighter" than your...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Insert text in the form of topics in a shiny app<p>I would like to enter the description of my text in the form of topics. I'll insert an attached image to h...
<p>Well, this is more a HTML question than a Shiny question. Here is an example:</p> <pre class="lang-r prettyprint-override"><code>library(shiny) CSS &lt;- HTML(&quot; span.circle { background: turquoise; border-radius: 1.6em; -moz-border-radius: 1.6em; -webkit-border-radius: 1.6em...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Formik - FieldArray with radio input<p>I'm using <code>formik 1.5.8</code> the version right before version 2, and I'm trying to use <code>&lt;FieldArray /&g...
<p>If anyone would like to show us how to do this using <code>Radibuttons</code> please go ahead and I'll accept your answer as the correct one.</p> <p>But for those of you who are interested, I managed to solve this by using something other than a "radio" buttons to set the value of the "correct answer" flag, I simpl...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: HttpErrorResponse {headers: HttpHeaders, status: 400, statusText: "OK", url: "https://localhost:44343/api/nominate", ok: false, …}<p>Getting Status 400 error...
<p>Try using </p> <pre><code>[HttpPost] public IActionResult Post([FromBody]dynamic clsPostNom) { // Todo return Ok(true); } </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reading SQL query result with multiple columns in c#<p>This code is working. It gives me the first and second columns in the first row. But the SQL query res...
<p>I assume that Form_Tipi is a column that tells you what type of data you have (Anthrepo, Ellecleme or Ihracat).</p> <p>You need to include this column in the select result so that you can access it as part of the result:</p> <pre><code>string sqlAN = @&quot;SELECT SUM(Original_Kap_Adeti +Bag_Kap_Adeti), SUM(Origi...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any way to connect to an unpublished socket in a Kubernetes pod from outside?<p>I have an <em>unsecured</em> <code>Postfix</code> instance in a cont...
<blockquote> <p>From what I know, only other containers in the same Pod can connect to an unexposed port, via <code>localhost</code>.</p> </blockquote> <p>Not exactly. How this is implemented is a detail of the particular container runtime in use.</p> <blockquote> <p><em>...I'm interested only theoretically if th...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use transforms.FiveCrop() outside the DataLoader?<p>I have a dataloader that returns a batch of shape <code>torch.Size([bs, c, h, w])</code> where <co...
<p>Your data loader will return a tensor of shape <code>(bs, c, h, w)</code>. Therefore <code>orig_img</code> is shaped the same way and iterating through it will provide you with a tensor <code>img</code> shaped as <code>(c, h, w)</code>. Applying <code>FiveCrop</code> will create an additional dimension such that <co...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How subtract two columns correlativelly in a data frame<h3>Context</h3> <p>We would like to know how subtract columns, two by two. Specifically, we want to s...
<p>You could use <code>pmap_dfr</code> + <code>diff</code>:</p> <pre class="lang-r prettyprint-override"><code>library(purrr) pmap_dfr(df, ~ -diff(c(...))) %&gt;% set_names(~ as.integer(sub('u_', '', .x)) %&gt;% paste('dif', . - 1, ., sep = '_')) # # A tibble: 5 × 4 # dif_2018_2019 dif_2019_2020 dif_2020_2021 dif...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: middleware conflicts with controller __construct middleware (request validation error not working)<p>I am using middleware for user roles. But when I am usi...
<p>You may set <code>SESSION_DRIVER=file</code> in you .env file</p> <p>Then run <code>php artisan config:clear</code></p> <p><a href="https://laracasts.com/index.php/discuss/channels/general-discussion/laravel-5-not-showing-validation-errors-when-textarea-is-filled-with-lots-of-text" rel="nofollow noreferrer">Seems ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: a bit clarafication on using spread and string manipulation, foreach loop<p>so I've wrote this function, i want to uppercase the vowels and lowercase every o...
<p>You have several problems:</p> <ol> <li><code>.toUpperCase</code> and <code>toLowerCase</code> <strong>return</strong> the new value, they don't mutate the existing value (and strings are immutable anyway)</li> <li>Even if they did mutate the existing value, they'd change the letter string in the array and not the ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stuck in a infinite loop<p>Working on an automatic macro that needs to print out a value if the input data matches certain criteria. The problem I am running...
<p>Another alternative combining selects and if statements:</p> <p>Also untested. If you post some sample data would be easier to debug.</p> <p>Either way, you can press F8 and step through the code to find out if the logic is working.</p> <p><strong>EDIT:</strong> Adjusted cases when seats = 3 (seats = 4 please che...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create parent/child column based on a work breakdown structure in Python/pandas<p>I have a dataframe with column that looks like the first column 'WBS...
<p>Remove the last part of each WBS to get the parents, then use <code>isin</code> combined with <code>numpy.where</code>:</p> <pre><code>parents = df['WBS #'].str.replace('\.\d+$', '', regex=True).unique() # array(['1', '1.1', '1.1.2', '1.1.2.1', '1.1.2.1.1'], dtype=object) df['Parent/Child'] = np.where(df['WBS #'].i...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How/where to go for a stock market index (aggregate) API or other method to accessing<p>I'm attempting to install a stock market gauge displaying the S&amp;P...
<p>List the indexes you want <code>indexes = ['^DJI', '^GSPC', '^IXIC']</code></p> <p>Query yahoo finance for them</p> <p><code>df = web(indexes, 'yahoo', start='2010-01-01')</code></p> <pre><code>&gt;&gt;&gt; df.columns MultiIndex([('Adj Close', '^DJI'), ('Adj Close', '^GSPC'), ('Adj Close'...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Thread safety of using reference of forEach loop in thread<p>Suppose I have these codes: </p> <pre><code>for(File file : fileList) { Thread thread = new...
<p>Here's what happens on each iteration of your <code>for(...)</code> loop:</p> <ol> <li>The local variable <code>file</code> is assigned to refer to the next item in the given <code>fileList</code>.</li> <li>The lambda expression creates a new instance of an anonymous, <code>Runnable</code> class, and the lambda <em...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove an object from an array using click events<p>I am new to javascript and am in need of some assistance. I've attempted to look this up all week ...
<ol> <li>You are assigning student.length = 0. Your if-statement should look like:</li> </ol> <p><code>if(students.length == 0){}</code>.</p> <ol start="2"> <li>Your expelStudentEvent function deletes your cards, because it deletes everything based on the length of your cards.</li> </ol> <p>Try something like this:<...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can a C++ function return without explicit giving type instantiation / with empty initializer list<p>Assuming a function with complicated return type, can we...
<p>Yes, it can. <code>{}</code> can be used to initialize an empty <code>std::vector&lt;?&gt;</code>. This code can be compiled in gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 with command <code>g++ -o cpp-lab -std=c++11 main.cpp</code>:</p> <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt; #inclu...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create Pull request in Git Bash for a particular branch?<p>I want to create pull request from gitbash for a particular branch. I tried the following c...
<p>Pull Requests are a feature of services such as GitHub and BitBucket that are built on top of Git. They are <strong>not</strong> part of Git itself. As you see, <code>git pull-request</code> is not a git command. In fact, there is no git command for creating a pull request. You will have to install a command line cl...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Average on table joined with right join<p>I want to average on tables I joined with right join, but I get group by error, I tried grouping by column I got th...
<p>Seems you want a windowed aggregate here, which would look like this:</p> <pre class="lang-sql prettyprint-override"><code>Select t1.[TimeCol], t1.[table1sampleColumn] AS t1sC, AVG(t1.[table1sampleColumn]) OVER () as avgt1sC, t2.[table2sampleColumn] AS t2sC, AVG(t2.[table2sampleColum...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ARM ITCM interface and FLash access<blockquote> <p>If the access to the Flash memory is done starting from the address 0x0200 0000, it is performed automat...
<p>So let's just try it. NUCLEO-F767ZI</p> <p>Cortex-M7s in general:</p> <pre><code>Prefetch Unit The Prefetch Unit (PFU) provides: 1.2.3 • 64-bit instruction fetch bandwidth. • 4x64-bit pre-fetch queue to decouple instruction pre-fetch from DPU pipeline operation. • A Branch Target Address Cache (BTAC) for the single...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Recursive function that saves a number provided certain conditions<p>I'm trying to create a function in Python that, using recursion, saves a certain number ...
<p>Change your last line of the function to:</p> <pre><code>return attempts(k) </code></pre> <p>Currently, results starting from the first recursive call (if it occurs) are thrown away, which results in <code>None</code> being returned by the outermost call.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cant get bundle value from activity to fragment<p>Please help, i just learned android, i am trying to send data from my Main Activity to a fragment using bun...
<p>Well I made changes to your <code>onQueryTextChange</code> method as below. The only issue I could make out from what you posted was here <code>loadFragment(new SearchMovieFragment());</code> as it would throw a NPE since you weren't adding the arguments to fragment for this case, because of which <code>getArguments...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 'int' object has no attribute 'save' in Django?<p>I get this error <code>'int' object has no attribute 'save'</code> when i try to asign a new integer value ...
<p>You should do (assuming that <code>indirect_ref_earning</code> is an IntegerField on Profile model):</p> <pre><code>profile_id = request.session.get('ref_profile') if profile_id is not None: recommended_by_profile = Profile.objects.get(id=profile_id) print(profile_id) recommended_by_profile.indirect_ref_ear...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I convert the rows of a C# Datatable object into a series of select statements?<p>I was working on debugging a separate issue and found that, for the...
<p>You can use LINQ with a helper method to do this. The helper transforms a C# datatype into a SQL Literal, you may need to add other cases:</p> <pre><code>public static class DataRowExt { public static string SQLLiteral(this DataRow r, DataColumn c) { if (c.DataType == typeof(String)) return ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why DACL entries of a file printed via win32 API is not matching up with DACL information in the file properties?<p>Here is the minimal code for reference</p...
<p>The first part of the question:</p> <p>The reason why the program prints the name same account name repeatedly is because the <code>LookupAccountSid</code> function does not have enough data area. since the <code>namelen</code> and <code>domainlen</code> are <code>IN\OUT</code> arguments the function returns the siz...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Empty MultipartFile[] when sending files from Vue to SpringBoot controller<p>I'm doing a program that will help me to make monthly reports and I stuck at upl...
<p>I found an acceptable solution here <a href="https://stackoverflow.com/a/33921749/11508625">https://stackoverflow.com/a/33921749/11508625</a> Rossi Robinsion's code works nicely. At least it looks better than sending files in separate requests one by one. </p> <p>The answer is based on using <a href="https://docs.s...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why do I get a 400 Bad Request error from api<p>I am trying to call a shiplogic API (based in AWS), but I get <code>400 Bad Request</code> error.</p> <p>I ha...
<p>The <a href="https://api-docs.shiplogic.com/#fc9dc771-d341-411d-bf24-578bad97bdc7" rel="noreferrer">documentation</a> says that you need to pass the <code>tracking_reference</code> parameter on the query string (just as you did with Postman):</p> <pre class="lang-none prettyprint-override"><code>https://api.shiplogi...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Action issue preventing domain from being generated<p>Hi all getting the following error when generating the domain:</p> <p>Action privilege NextStep for cus...
<ul> <li>check that you have a class in the <em>TenementNote.actions</em> package called <em>NextStep</em> and declared as follows:</li> </ul> <pre><code>public class NextStep implements ServerSideAction&lt;TenementNote&gt; </code></pre> <p>(if the package does not exist, create it by right-clicking on the TenementNote...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parsing JSON output file<p>Hi a learner in python I have written code the extracts a son file from a sports website.</p> <p>The code is</p> <pre><code>from b...
<pre><code>import pandas as pd import requests import json from openpyxl import Workbook from openpyxl.utils import get_column_letter from openpyxl.utils.dataframe import dataframe_to_rows def race_data_to_xslxs(url, fname): # get data data = json.loads(requests.get(url).text[24:-1]) # create dataframes ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: postgreSQL - how can i return all rows from 3 tables?<p>im actually a frontend developer not a backend developer. so believe me, its really hard for me to wo...
<p>As a general rule, this would be a poor design:</p> <ul> <li><p>In terms of efficiency, it's best to push filtering as close as possible to the data; PostgreSQL has <code>ilike</code> functionality built in, indeed the queries in <code>supabase</code> are based on SQL syntax. See the <a href="https://www.postgresql....
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i achieve multiple page scraping with axios and cheerio<p>Hello i am using axios with cheerio to scrape some data.I want to scrape multiple pages, t...
<p>I believe there are multiple ways to achieve that solution but basically you need to execute all the <code>axios</code> and parse all of them with Cheerio programatically.</p> <h3>If you know how many pages that you want to scrape</h3> <p>You can create a simple <code>for</code> loop and push all the <code>axios</...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is the object 'state' not found in this DataCamp exercise?<p>I am having an issue with a DataCamp exercise where I am getting an error message that my va...
<p>There are couple of issues in the code. 1) Inside the tidyverse functions, the assignment is usually carried out with <code>=</code> and in certain cases while evaluating, use <code>:=</code>, i.e. the <code>&lt;-</code>is not used for assignment, 2). The object is not updated. So, if we don't assign the output of...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Scope of karate.callSingle() when having multiple Runner executions<p>During the upgrade of an automation project to the latest Karate version, we noticed a ...
<p>There's a lot to unpack in your question, but just skimming - yes the &quot;scoping&quot; of <code>callSingle()</code> to a <code>Runner</code> instance is intentional. The reason is it should be possible for teams to run 2 <code>Runner</code> instances in parallel without blocking.</p> <p>So my suggestion is please...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java Hibernate exception<p>For some reason it does not find Polica even tho i have mapped it in code, created seperate file to map it etc. What is the proble...
<p>First of all, to avoid deprecation warnings, you should use the type safe variant of <code>createQuery</code>:</p> <pre><code>TypedQuery&lt;Polica&gt; result = openCurrentSession().createQuery(&quot;FROM Polica&quot;, Polica.class); </code></pre> <p>It's hard to say why your code is not working, but I have a few ide...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: @LastModifiedBy and @LastModifiedDate not working for embedded object<p>I am trying to use <strong><code>@LastModifiedDate</code></strong> and <strong><code>...
<p>there isn't much on your post to get the behaviour of the final solution you are aiming for... so I'll try my best :)</p> <p>as the day of this post was written, spring have a known issue with audit of embed document as stated <a href="https://jira.spring.io/browse/DATAMONGO-1440" rel="nofollow noreferrer">here</a>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: OIDC Identity Provider design for SSO: should third party website handle authorization on their own?<p>Let's say I'd like to develop my own OpenID Connect Id...
<p>It depends whether the applications want to use your IDP only to authenticate users, or also to authorize them.</p> <p>In the first case, the apps manage their users separately and only use the SSO of your IDP to authenticate the user. E.g. <code>WEB A</code> will log in <code>user1</code> and will get an ID token f...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NodeJS app crashing on Heroku with error "Stopping process with SIGKILL"<p>The code shown below fails on Heroku with the error <code>Stopping process with SI...
<p>You have not declared the variable <code>server</code>.</p> <p>You can do:</p> <pre><code>var server = http.createServer((req, res) =&gt; { //your stuff }); server.listen(process.env.PORT || 80, () =&gt; { console.log("Listening on port 80"); }); </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: where does ruby on rails app stores session?<p>I am using the session to felicitate log in feature </p> <p><a href="https://levelup.gitconnected.com/simple-...
<p>Accordingly to the documentation:</p> <blockquote> <p>default and recommended session store - the CookieStore - which stores all session data in the cookie itself</p> </blockquote> <p>Read more in the <a href="https://guides.rubyonrails.org/action_controller_overview.html#session" rel="nofollow noreferrer">docum...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: django.db.utils.InternalError: (1050, "Table 'django_content_type' already exists")<p>django.db.utils.InternalError: (1050, "Table 'django_content_type' alre...
<p>For django3: I get this error: django.db.utils.OperationalError: (1054, &quot;Unknown column 'name' in 'django_content_type'&quot;)</p> <ol> <li><p>Delete myapp/migrations/0001_initial.py and 0002_ .....</p> </li> <li><p>Delete all rows from the django_migrations table.</p> <pre><code>Delete * from django_migrations...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Saving history = model.fit() variable in order to use it again when I start a new VS Code Jupyter Session. Dill and %store does not work<p>So I am doing Tran...
<p>You can save your history in two ways:</p> <p><strong>The manual method:</strong></p> <p>Simply interrupt your training and save your history file as a dictionary:</p> <pre><code>with open('/history_dict', 'wb') as file: pickle.dump(history.history, file) </code></pre> <p>You can then reload it with:</p> <pre><c...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: lein repl error "Unable to resolve symbol: str in this context"<p>I'm new to clojure. I'm facing below error -</p> <p>I created a new lein project using comm...
<p><a href="https://clojure.org/guides/repl/navigating_namespaces" rel="nofollow noreferrer">https://clojure.org/guides/repl/navigating_namespaces</a></p> <p>explains it: If you switch to a namespace, which you previously in your session did not decalred with <code>(ns ...)</code>, but instead directly enter to it via ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Auth0 API Create User returns Client ID Not Found<p>I am using the Auth0 Management API page to test creating a user.</p> <p><a href="https://auth0.com/docs/...
<p>We found the issue was actually internal to another script we had configured in the Action Login Flow</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot read properties of undefined (reading 'map') in react js with django backend<p>I want to get my product's image of category 'Jeans' from django using ...
<p>It's possible the http request hasn't completed before the DOM is trying to display the images, hence why it is saying the value is None type.</p> <p>I get around this by using a ternary in the return that checks to see if there is a value in productimage. If there is, display it / map over it. If not, show somethin...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Could not find function "fpkmToTpm_matrix"<p>I installed a R package named &quot;GeoTcgaData&quot;, libraried it and wanted to use the function &quot;fpkmToT...
<p>You may need to install some of the dependencies separately via <a href="https://www.bioconductor.org/" rel="nofollow noreferrer">Bioconductor</a>. If you install the packages using:</p> <pre><code>install.packages(&quot;BiocManager&quot;) BiocManager::install(pkgs = c('DESeq2', 'impute', 'edgeR', 'cqn', 'topconfect...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Notifications keep posting to slack channel<p>I am using slack webhooks to send message to my slack channel. The problem it keeps posting messages every few ...
<p>You're calling the function <code>send_to_slack</code> inside your DAG file, this means it will run every time the scheduler evaluates your DAG (every few minutes). </p> <p>You should either:</p> <ul> <li>Use the <a href="https://github.com/apache/airflow/blob/master/airflow/providers/slack/operators/slack.py" rel...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adding a component in React results in horizontal scroll bar<p>Here's the website before adding the <code>Navbar</code> component: <a href="https://i.stack.i...
<p>Since you are using <code>w-screen</code>, the navbar and welcome components will have a with of <code>100vw</code>. Which is exactly the with of the viewport. You have set <code>h-screen</code> on the welcome component, so that one will fill the viewport completely. Now if you add the navbar, the height of the tota...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to merge the list of words in PySpark dataframe?<p>I have a dataframe that contains a list of words and I need to merge them into a single sentence.</p> ...
<p>If you have a list of words (an array of strings), you can combine them using <a href="https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.array_join.html#pyspark.sql.functions.array_join" rel="nofollow noreferrer"><code>array_join</code></a>:</p> <pre class="lang-py prett...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django Template, how to parse items with symbols<p>I have an XML file that I've converted to a python dictionary and passed into a template. I am attempting...
<p>You can get the value of dictionary with the help of django template tags.</p> <p>Template tag example</p> <pre><code>@register.filter def get_attr(obj, attr): return obj.get(attr) </code></pre> <p>As you mentioned context is dict therefore I used obj.get but you can use any other methods depending on obj.</...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to reset or clear items in RecyclerView upon backstack navigation?<p>I have two fragments: Fragment A contains a recyclerview of 5 article items and Frag...
<p>As commented by @ADM, I moved my adapter setup to <code>onViewCreated()</code>. I found a simple fix that I just added at <code>onCreateView()</code>:</p> <pre><code>if(arrayArticles.size == 0){ arrayArticles.add(article1) arrayArticles.add(article2) ... } ... </code></pre> <p>then on <code>onViewCreated()...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I acquire the data in a json response from a POST request in Next/React?<p>I am using Next.js api route to handle a POST request then send a response ...
<p>In the following example, you use the fetch api to post the data which returns a promise. You can use then() which takes a callback function that you can use to operate on the data once that promise is returned.</p> <p>Example:</p> <pre><code>useEffect(() =&gt; { // POST request using fetch inside useEffect Reac...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase database retrieve datas<p>Hi guys im very new with app development ,any ideas how im i able to store my Latitude and Longitude of my users positions...
<p>you get data from firbase database and store it in list you want to publish marker on map</p> <p>you can use this Method</p> <pre><code>public ArrayList&lt;MarkerOptions&gt; publishMarker(GoogleMap googleMap, int recourceMarker) { ArrayList&lt;MarkerOptions&gt; markerOption = new ArrayList&lt;&gt;(); for (...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: External JavaScript file not working and code not loading<p>I am new to JavaScript ES6 and struggling to get my external script.js file to work. This is my ...
<p>Make sure your index, CSS, and js file are in the same folder.</p> <p>I have made changes in your js code also please have a look.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override">...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to read csv files based on multiple index_col argument?<p>I have a problem which might be easy for majority of people here.</p> <p>I have four folders: S...
<p>You don't have four separate index columns, you just have one that changes depending on user input. Therefore, the solution to your problem is relatively simple. First, modify your <code>combine_csv</code> method:</p> <pre><code>def combine_csv(path, index): &quot;&quot;&quot; Concatenates the csv files and ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Insert data to different columns based on the first value from a text file<p>This is my text file:</p> <pre class="lang-none prettyprint-override"><code>1|16...
<p>Thank you for the clarifications. Something along the following lines should do the trick. Text files are best read using rdds.</p> <pre class="lang-py prettyprint-override"><code>rdd = spark.sparkContext.textFile('my_path/my_file.txt') rdd = rdd.map(lambda k: k.split('|')) def relocate(e): if e[0] == '1': ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error: Unable to find plugin "gatsby-plugin-React-helmet"<p>Well, I have a really hard time trying to build my gatsby website on Netlify.</p> <p>Locally on ...
<p>It looks like somewhere in your code you are referencing <code>gatsby-plugin-React-helmet</code> which has an uppercase "R". Search your code and replace with <code>gatsby-plugin-react-helmet</code>.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the global flag for in sed?<p>I've come to know the global (<code>/g</code>) flag to mean the action should take place globally in a file.</p> <p>If ...
<p>The global flag allows sed to replace multiple matches <em>in the same line</em>.</p> <pre><code>$ echo 'world world' &gt; somefile $ sed 's/world/hello/' somefile hello world $ sed 's/world/hello/g' somefile hello hello </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: while loop could not break<p>there is <code>NameError: name 'user' is not defined</code></p> <p><strong>why while loop is not ending please help to find the ...
<p>For your loop to exit:</p> <ul> <li>Your while loop will forever be true, but you switched a variable <code>game_is_on</code> that was meant to regulated the loop. Instead of the forever loop , <code>game_is_on</code> should be next to while,</li> <li>You need to remove <code>continue</code> statement as that line w...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any way to use code snippets feature of SQL Server to call stored procedure with it`s parameters with null value?<p>I have a stored procedure with s...
<p>In Default you just can :</p> <pre><code>Right Click &gt; Script &gt; Execute To </code></pre> <p>But, There is plenty of commercial product options out there:</p> <pre><code>Apex, SSM-Booster and RedGate SQL Prompt. </code></pre> <p>That you can define custom snippet.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Vue SPA Single File Component Element binding with Stripe Elements<p>Looking to see if I can utilise Stripe Elements on a Vue SPA single file component. Howe...
<p>What's happening is that the buefy model doesn't actually exist in the dom until after it's been opened and rendered. </p> <p>It's a really easy fix - instead of directly setting isModalActive to true, create a method to open it and instantiate the stripe element in the next tick. This will ensure the dom elem...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I add math symbols to altair plots?<p>Is there a way to add mathematical symbols like beta, alpha, epsilon, <a href="https://en.wikipedia.org/wiki/Gl...
<p>As I found in other discussion (<a href="https://github.com/altair-viz/altair/issues/1105" rel="nofollow noreferrer">https://github.com/altair-viz/altair/issues/1105</a>)- Only Unicode characters are supported in Vega.</p> <p>You can search for the corresponding superscript character at this page: <a href="https://e...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mysql gives a syntax error with many joins<p>it's about an hour that I'm trying to understand why this query gives:</p> <p>syntax error near 'WHERE players....
<p>AS prod_info doesn't have an on clause.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cypress to loop to td values and get a specific tr to sum (TR length will be dynamic)<p>I know it is not a very good option to loop and use a conditional tes...
<p>Maybe try to filter out rows that have less than 10 <code>&lt;td&gt;</code></p> <pre class="lang-js prettyprint-override"><code>let sum = 0; const amountCol = 10 cy.get('tbody') .find('tr') .filter(function() { return Cypress.$(this).find('td').length &gt;= amountCol; // only rows enough &lt;td&gt; }) ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Subset based on conditions on multiple columns<p>I have a combination table based on a &quot;colour list&quot;:</p> <pre><code>library(tidyr) #give availabl...
<p>Using your code, you can do the following:</p> <pre><code># Indices of rows with more than 1 &quot;EMPTY&quot; rem1 &lt;- which(apply(combo,1,function(x) sum(x==&quot;EMPTY&quot;))&gt;=2) # Indices of rows with more than one &quot;ID&quot; rem2 &lt;- which(apply(combo,1,function(x) sum(x==&quot;ID&quot;))&gt;=2)...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DynamoDbException: No Hash Key specified in schema. All Dynamo DB tables must have exactly one hash key<p>It is possible with DynamoDB to create a global sec...
<p>All tables and Global Secondary Indexes need a HASH-Key, it's not optional.</p> <p>You can update the hash key value <strong>for GSIs</strong>, changes are asynchronously replicated into the Global Secondary index. That's why you can only perform eventually consistent reads on it.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spring Boot Upgrade from 2.6.x to 2.7.0<p>I have upgraded Spring Boot version from 2.6.9 to 2.7.0 we were getting below error. java.lang.IllegalArgumentExcep...
<p>I'm not seeing any cache configuration in your code snippets. Is the cache implementation supposed to create the cache automatically?</p> <p>Your application should declare the cache name like this:</p> <pre><code>spring.cache.cache-names=cacheName </code></pre> <p>Also, <a href="https://github.com/spring-projects/s...