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: Snowflake masking policy with external function support on GCP<p>I want to externally tokenize some columns before loading to snowflake. Later I want to use ...
<p>Yes, external functions are supported on both platforms</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to rewrite this function in one line?<p>I have the following lines of code:</p> <pre><code>f((k,v)) = Symbol(k) =&gt; Symbol(v) Dict(Iterators.map(f, pai...
<p>You want this:</p> <pre><code>Dict(Iterators.map(((k,v),) -&gt; Symbol(k) =&gt; Symbol(v), pairs(names))) </code></pre> <p>(note the comma after <code>(k,v)</code> which forces destruction of the first argument to the anonymous function into two eleements)</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to identify if Python Threads with Queue are done with task?<p>Here i have <code>MazeRunner</code> Class which put all elements of <code>self.boxes</code...
<p>You need to wait until all threads are done calling <a href="https://docs.python.org/3/library/threading.html#threading.Thread.join" rel="nofollow noreferrer"><code>Thread.join</code></a>:</p> <p><em>HOWTO:</em></p> <ul> <li><p>Replace your <code>self.threads = 5</code> expression with class constant:</p> <pre><c...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Declarative approach to deploy Helm chart by Argocd to multiple environments<p>I’m using Argocd with helm charts. I have two environments: <em>uat</em>, <em>...
<p>You should split it into 2 charts (<code>base chart</code> and <code>value chart</code>)<br /> <code>base chart</code> is <code>chart dependency</code> of value chart, like that if you update base chart, <code>value chart</code> won't be affected if you don't update chart dependency.</p> <p>File <code>Chart.yaml</co...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Name list's elements based on column they are containing<p>I have a list of dataframes, all of them with the same column structure (see below for a reproduci...
<p>Here's another way:</p> <pre><code>names(DEGs_list) &lt;- sapply(DEGs_list, \(x) x$Contrast[1]) </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: php get node value from xml based on other node value<p>I have currently an xml file that is formatted as follows:</p> <pre><code> &lt;SKUQuestions&gt; ...
<p>Simply run an <a href="https://www.w3.org/TR/xpath/" rel="nofollow">XPath</a> query expression. As information, XPath is a declarative language used to reference parts of XML documents. PHP's <a href="http://php.net/manual/en/simplexmlelement.xpath.php" rel="nofollow">SimpleXMLElement</a> class can run XPath queries...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: RxJS Observable returning array, run another function with each array iteration<p>I have a function <code>getNews()</code>, which basically returns angular's...
<p>You probably want to use the concatMap operator instead of map. concatMap flattens the returning Observable to the source Observable, while map returns an observable of observable.</p> <p>If you want data from getItem() to be in the same order listed in 'all_news_url', you could try something like</p> <pre><code>t...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to save crashes log to an email using Fabric Crashlytics in android?<p>I am developing an android app, and I used Fabric Crashlytics to see my...
<p>Actually, after searching, I find out that Fabric <strong>will automatically send</strong> all crashes to your email (email that you have signed up with).</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JS How can I increase the performance of this Max/Min coding challenge?<p>I'm trying to solve some 'hackerrank.com' coding challenges. I'm stuck on this one:...
<p>The two first steps could be:</p> <ol> <li>Your array is sorted. Thus there's no need to use <code>Math.max</code> and <code>Math.min</code> - the first element of a slice is the smallest, the last is the largest.</li> <li>When you eliminate <code>Math.max</code> and <code>Math.min</code> calls, you can remove <code...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GLUT zooming in and out by wheel<p>I have surfed a lot of sources and tried many varieties, but zooming still don't work. I can't change glprojection to gluP...
<p><code>glutReshapeFunc</code> only tells GLUT which function to call, when the window size changes. It makes very little sense to call it in response to an input event as it will not call the reshape function.</p> <p>Anyway, your problem is, that you placed setting the viewport and the projection in the reshape func...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: show the values of string variables in a string array<p>I created an array of strings and I want to get the value of a given string at a given position, but ...
<p>Try using a cell array:</p> <pre><code>myArray = {'string1' 'string2' 'string3'}; s = myArray{1}; </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoRuntimeError: Connection pool closed<p>I am seeing my mongoose pool seemingly close before it inserts data as I am getting this error when making a call...
<p>i was facing the same error, but i fixed it by waiting 1500ms before closing the connection.</p> <pre><code>setTimeout(() =&gt; {client.close()}, 1500) </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I have a GTKLabel which changes based on mouse position?<p>I've read the documentation but can't find anything for this. For example, if I have a tab...
<p>Not sure what your purpose is and probably there are better ways to achieve your final goal but anyway,</p> <p>You must connect a signal to the widget you want the mouse to be tracked at. The signal is from GtkWidget and it's called <a href="https://developer.gnome.org/gtkmm/2.24/classGtk_1_1Widget.html#a46e819f54e...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Boolean Expression with String Comparison in Mongodb?<p><code>$cond</code> in mongodb is defined like this:</p> <pre><code>$cond: { if: { $gte: [ "$qty", 25...
<p>No that is currently not possible and is an open <a href="https://jira.mongodb.org/browse/SERVER-11947" rel="nofollow">feature request</a> for quite a while.<br> Depending on your needs you may be able to do your stuff with <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/substr/#exp._S_substr...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get Max Date in an array?<p>I'm trying to get max day in an array of dates but it returns <code>Invalid Date</code> or <code>null</code>. Can't figure...
<p>you can do the following:</p> <pre><code>const dates = [ &quot;2022-10-13T00:00:00.000&quot;, &quot;2023-10-14T00:00:00.000&quot;, &quot;2024-10-15T00:00:00.000&quot;, &quot;2020-10-16T00:00:00.000&quot;, &quot;2015-10-17T00:00:00.000&quot;, &quot;2028-10-18T00:00:00.000&quot;, &quot;2010-10-19T00:00:00.000&quot;, ]...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unexpected behavior accessing keyword list using `ìn`<p>In my template (<code>html.eex</code> file) I'm trying to use a keyword list to pass options. I have:...
<p>As keyword lists are just lists, <code>in</code> actually checks if the whole key/value pair exists in the list or not:</p> <pre><code>iex(1)&gt; :a in [a: 1] false iex(2)&gt; {:a, 1} in [a: 1] true </code></pre> <p>You should just check if <code>@buttonCSS[:layer1]</code> is truthy or not, as a non-existent key w...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need to change the startdate as per the month<p>I have a table something like this. workershiftid column is auto-increment.</p> <p>I have to create a job wh...
<p>First and last days of a month can be calculated like:</p> <pre><code>SELECT DATEADD(month, DATEDIFF(month, 0, getdate()), 0) AS StartOfMonth SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) as EndOfMonth </code></pre> <p>So you can try something like this:</p> <pre><code>declare @start datetime decl...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL Check if any row has a date in the future<p>(The following schema has been minified to reduce the problem) </p> <p>I'm having two tables <code>Product...
<p>I would be tempted to use an IF on a MAX rather than COUNTing an IF:-</p> <pre><code>SELECT GROUP_CONCAT(Products.ProductName SEPARATOR ', '), IF(MAX(Products.AvailableDate) &gt; CURDATE(), 1, 0) As IsEarlyAccess FROM Mappings JOIN Products ON Mappings.ProductID = Products.ID GROUP BY Mappings.SomeOtherID </code...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AES_DECRYPT with MySQL JOIN Query<p>I have a JOIN query that works perfectly fine without using MySQL encryption. But when I try to decrypt the rows, the que...
<p>Figured it out.</p> <pre><code>Select members.name, member_notes.sin, member_notes.note, member_notes.admin_note, member_notes.username, member_notes.time_stamp, CAST(AES_DECRYPT(members.name, '$key') as CHAR) as name from member_notes JOIN members on member_notes.sin = members.sin </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R plot: Displaying both point type and line type in legend<p>I have generated a plot with <code>plot</code> function. I added the point markers with <code>pc...
<p>People have asked you to put in some toy code. This is important as it gives people a starting point to help you. Actually it is not difficult to do this. Consider the following:</p> <pre><code>set.seed(0); x1 &lt;- rnorm(10); x2 &lt;- rnorm(10); x3 &lt;- rnorm(10) plot(x1, type = "b", pch = 19, lty = 1, col = 1, ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to parse date in elasticsearch 5.x and Filebeat<p>I am using elasticsearch 5.x and Filebeat and want to know if there is a way of parsing date(timestamp)...
<p>You can use Filebeat with the ES <a href="https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest.html" rel="nofollow noreferrer">Ingest Node</a> feature to parse your <code>timestamp</code> field and apply the value to the <code>@timestamp</code> field.</p> <p>You would setup a simple pipeline in Ela...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SunburstR: how to define paths i.e. add more layers to sunburst?<p>I am lost in how to create the hierarchy with R's SunburstR package</p> <pre><code>sunbur...
<p>You have to specify the path with each node separated by dash such that</p> <pre><code>iris %&gt;% mutate(path = paste(Species, Sepal.Length, Petal.Width, sep='-')) %&gt;% select(path, Petal.Length) %&gt;% sunburst() </code></pre> <p>where <code>Petal.Length</code> here is the value you want to visualise on the ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Most efficient way of offseting cell that contains "x"<p>I've been using <code>Columns(2).Copy Destination:=Columns(1)</code> provisionally to offset all cel...
<p>you would probably want to try something like this</p> <pre><code>For i = 1 To 100 If ActiveSheet.Cells(i, 2).Value = "x" Then ActiveSheet.Cells(i, 1).Value = ActiveSheet.Cells(i, 2).Value End If Next </code></pre> <p>just set the 100 for however many rows you have. I'm not even sure this would run ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Smooth GCM to FCM transition<p>Anyone have experience with it? I'm investigating migrating, but as we already have the app released with GCM, with thousands ...
<p>Importing your Google project into Firebase is a one way operation, however this is not a destructive operation, your current project will have required APIs turned on and necessary API keys will be generated for use with Firebase, but you can still manage that project from the Google Developer console if you decide...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: wxExecuted process is not deleted when main window exits<p>I am using wxLua with wxWidgets 2.8.12 for Windows. In the following code, I try to asynchronously...
<p>You don't kill the child process, so it continues running, why shouldn't it? If you don't want this to happen, you need to <code>Kill()</code> it explicitly using its PID.</p> <p>BTW, please also update to wxWidgets 3.0, especially as you're using Lua, there shouldn't be any compatibility concerns, but you would be...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to replace words in list with Python<p>I am trying to replace a certain set of words in a list with words from a different list.</p> <ol> <li>Check &quot...
<p>Looping over the items of <code>invalid_list</code> is inefficient. This increases the complexity of the algorithm.</p> <p>An efficient solution would be to use a regex to search motifs in each string only once:</p> <pre><code>s = ['123xyz', '456xye','789xyf'] invalid_list = ['xye','xyf'] import re regex = re.com...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Handling nextRelease version in semantic release<p>so I have been reading the docs and kind of got a glimpse of <em>what</em> I should do, but no real grasp...
<p>You can simply use <a href="https://github.com/semantic-release/exec" rel="noreferrer"><code>@semantic-release/exec</code></a> in an extra publish step that comes after <code>@semantic-release/npm</code> and <code>@semantic-release/github</code>:</p> <pre><code>{ "plugins": [ "@semantic-release/commit-analyze...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: discord bot isn't moving people when they deafen<p>Basically, I'm trying to get my bot to move people to afk as soon as they deafen but nothing happens when ...
<p>I originally thought that your question may have been a simple intents issue, however, upon further investigation it is an issue regarding your use of <code>newState.member.selfDeaf</code>. The corrected code is below with a short explanation:</p> <p>Taking a look at the official Discord.js Documntation regarding <a...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Querying MarkLogic merged collection<p>I'm trying to write a query to get the unique values of an attribute from the final merged collection(sm-Survey-merged...
<p>If there are a lot of documents, and you attempt to read them all in a single query, then you run the risk of blowing out the Expanded Tree Cache. You can try bumping up that limit, but with a large database with a lot of documents you are still likely to hit that limit.</p> <p>The fastest and most efficient way to ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unknown keyword: content_type in active storage 5.2.1.1<p>If you update rails to 5.2.1.1 to avoid a potential bug in active storage (info released around 27....
<p>Upgrade to </p> <pre><code>gem 'rails', '5.2.2.rc1' </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hide/Show div and then hide all div<p>I am trying to make a &quot;meet the staff&quot; section that has hidden bios that display on click. Right now the div ...
<p>You will need to add some attributes to your HTML to keep track of which item is active, what item a button controls and which ones should be hidden from screen readers. aria-controls aria-expanded and aria-hidden do just that. Once a button is clicked... if it is currently open, just close it (remove active) and to...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: npm install save by default<p>It happened too many times that I forgot to add <code>--save</code> when installing node modules. Is there a way to append this...
<p>I found out that <code>npm</code> has configuration flags. Setting <code>save=true</code> does exactly what I need. You can add it to <code>.npmrc</code> file (in user's home directory) or invoke a command:</p> <pre><code>npm config set save=true </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass options to a docker ENTRYPOINT?<p>Consider the command:</p> <pre><code>ls [OPTION]... [FILE]... </code></pre> <p>Options come first, and then com...
<p>Everything that you use as <code>CMD</code>, may it be from the Dockerfile or when running the image, is passed to the <code>ENTRYPOINT</code> as arguments.</p> <p>You can create a more sophisticated entrypoint, preferable via script.</p> <pre class="lang-sh prettyprint-override"><code>#!/usr/bin/env sh exec java -...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mongodb , how to push data to array in object?<pre><code>{ name: &quot;jeet&quot;, address: &quot;Highway 71&quot;, data: { connnection: 2, frd...
<p>Query1</p> <ul> <li>push at position 0 (start of the array)</li> </ul> <p><a href="https://cmql.org/playmongo/?q=622b56109096ce67bc696763" rel="nofollow noreferrer">Playmongo</a></p> <pre class="lang-js prettyprint-override"><code>update( {&quot;name&quot;: {&quot;$eq&quot;: &quot;jeet&quot;}}, {&quot;$push&quot;: ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you pass multiple scope parameters through a Facebook PHP SDK to execute queries that require permissions?<p>I have a current 3-page web site/app to p...
<pre><code>$params = array( 'scope' =&gt; 'ads_management', 'redirect_uri' =&gt; 'http://example.com/login-callback.php', ); $loginUrl = $helper-&gt;getLoginUrl($params); </code></pre> <p>The getLoginUrl method expects <em>two</em> parameters - but you are passing only one array to it here.</p> <p>T...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to open such visual tool in Xcode<p>I suddenly got such view, but could not find anymore. How to get this view again? <a href="https://i.stack.imgur.com/...
<p>It's the view hierarchy debugger. <a href="https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/debugging_with_xcode/chapters/special_debugging_workflows.html" rel="nofollow noreferrer">https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/debugging_with_x...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Run time and reported cycle counts in linux perf<p>I have run a single thread matrix multiplication on a 4-core Intel CPU (1 thread per core), but the number...
<blockquote> <p>I have run a <strong>single thread</strong> matrix multiplication</p> </blockquote> <p><strong>But then you counted <em>system-wide</em> across all 4 cores for the time when it was running.</strong> That's what <code>perf -a</code> does, and why you got <code>Performance counter stats for 'system wide'...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AngularJS 1.x: How to highlight active menu item one a time (not multiples)?<p>it may seem trivial, but how to <strong>select one at a time</strong>?</p> <p...
<p>Replace This function</p> <pre><code>$scope.selectItem = function(item) { angular.forEach($scope.list,function(value){ if(value.name==item.name){ value.selected = true; } else { value.selected = false; } }); }; </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rails - submitting JSONs to database from controller<p>I am working on a Rails app, and I am attempting to insert attributes from JSONs as database entries. ...
<p>You're getting the error because a <code>Hash</code> is not the same as an <code>ActionController::Parameters</code>. In order to use the <code>permit</code> method with your <code>Hash</code> you may need to first convert it to <code>ActionController::Parameters</code>, as such:</p> <pre><code>hash = {location:"ho...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to preserve Table Headers during drop down change?<p>When i am changing Drop down value , the headers of drop down are being lost </p> <p>The drop down ...
<p>you can save each dropdownlist's selectedItem in a specific field base on the current <code>key</code> of <code>ng-repeat</code>.</p> <pre><code>&lt;!-- save selectedItem in specific field --&gt; &lt;select ng-change="getchange(selectItem)" ng-model="selectItem[key]" &gt; &lt;!-- display value based on value kept ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: grep whole non-alphanumeric strings and non-numbers<p>if I have:</p> <pre><code>abc a1b2c3 123 </code></pre> <p>How can I grep whole strings that are not a...
<p>If you just want to match alpha words, those without any numeric part, say:</p> <pre><code>grep -o "\b[[:alpha:]]*\b" </code></pre> <ul> <li><code>\b</code> matches the empty string at the edge of a word</li> <li><code>[[:alpha:]]</code> matches alpha characters. That is, A-Za-z plus your local ones.</li> </ul> <...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React useState entering infinite loop<p>I am using setInterval to increment the count and show it on a div like below. I am sure that the incrementcount is w...
<p>You're not only setting state each render - causing an infinite loop, but you're adding a <strong>new</strong> interval that sets state each render. So each time you're adding more and more infinite setStates.</p> <p>Fix this by setting your interval only once in a <code>useEffect</code>:</p> <pre><code>function Div...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot group JSON array because of typecasting error<p>I have an API that returns an array of dictionaries and I'm trying to group it by the <code>date</code...
<p>Your code contradicts itself. When you say</p> <pre><code>let groupedByDate = Dictionary(grouping: json, by: { (item) -&gt; String in </code></pre> <p>you are making a contract that you will return a String from this closure.</p> <p>But when you then say</p> <pre><code>return (item as! [String:AnyObject])["d...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: UIView Subclass fixed height on initialization<p>I have a UIButton subclass that needs to be 80pt in height but have width behave normally when used in UISta...
<p>Constrain the button's height to 80 and let auto layout handle it.</p> <p>Alternatively, since you're using a custom subclass of <code>UIButton</code>, override <code>instrinsicContentSize</code> to return a height of 80:</p> <pre><code>import UIKit @IBDesignable class MenuSelectionButton: UIButton { // Xcod...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any default table to I use it as an alias?<p>I have this query:</p> <pre><code>$db -&gt;prepare("INSERT INTO events (post_id, table_co...
<p>You are thinking of <code>dual</code>. This is borrowed from Oracle. So instead of:</p> <pre><code>select ?, 15, ?, ?, ?, UNIX_TIMESTAMP() from (select 1) as a </code></pre> <p>You can write:</p> <pre><code>select ?, 15, ?, ?, ?, UNIX_TIMESTAMP() from dual </code></pre> <p>This is documented <a href="http://de...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Old Isabelle project imports ml file using 'uses' How should I replace this?<p>I've inherited an old Isabelle project and would like to bring it up to date t...
<p>I am not familiar with the <code>uses</code> keyword; that must have been dropped some time before I started using Isabelle.</p> <p><code>ML_file</code> should be the way to go; however, you have to write <code>ML_file</code> <em>between</em> the <code>begin</code> and <code>end</code> commands that start/conclude ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Permutations Code not working Java<p>My teacher gave me some java code and asked me to rewrite it in python. I'm not asking for help with rewriting it, but w...
<p>There is an error in this line:</p> <pre><code>perm1(prefix+s.charAt(i)+s.substring(0, i)+s.substring(i+1, N)); </code></pre> <p>Should look like this:</p> <pre><code>perm1(prefix + s.charAt(i), s.substring(0, i) + s.substring(i + 1, N)); </code></pre> <p>Compere with this code: <a href="http://introcs.cs.princ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Legacy mode Cocoapods<p>Is there a legacy mode for Cocoapods that allows a user to use a version of Cocoapods as if it was an older one? Eg use 1.0.0 as if i...
<p>You will need the version to be installed. However, there is nothing wrong with having multiple versions installed. You can also delete them if you no longer need a specific version.</p> <p>Once installed, run the version you want with this:</p> <pre><code>pod _0.39.0_ YourCommandHere </code></pre> <p>Change the ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Apply parameter control despite on filtering in tableau<p>I want to find top N Customers based on some criterion. I've created parameter for that, but I want...
<p>Try this:</p> <ol> <li>Create a calculated filed =index()</li> <li>Drag that onto your sheet, make it discrete </li> <li>Filter index() for top 10 </li> </ol> <p>This link probably explains it better and in more detail: <a href="http://kb.tableau.com/articles/knowledgebase/finding-top-n-within-category" rel="nofol...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parse error when minifying JSON<p>I'm trying to minify this JSON:</p> <pre><code>“div” : { “attributes” : { “id” : “context-box-4” }, “children” : {...
<p>To make it a valid JSON: </p> <ul> <li>Remove <code>“div” :</code></li> <li>Replace <code>“</code> (<code>U+201C</code>) and <code>”</code> (<code>U+201D</code>) with <code>"</code> (<code>U+0022</code>)</li> </ul> <p>The result will be:</p> <pre><code>{ "attributes" : { "id" : "context-box-4" }, "childre...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Am I right that TestCase clears DB in case of SQLite and doesn't clear it in case of PostgreSQL<p>The code is below. Two tests. The difference in settings: P...
<p>No. The database is always cleared between test cases. The difference is how the database manages its autoincrement sequences; sqlite seems to reset them, but Postgres does not. You should not rely on either behaviour in your tests, but rather check specifically based on the ID of the relevant document.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How much overhead space do rows in SE tables consume?<p>I have a row length of 499 bytes. How many bytes per row does SE use to store the row in the datafile...
<p>There is one byte of overhead. Each row is terminated by either a newline (not deleted) or a null byte (deleted).</p> <p>However, SE uses C-ISAM and C-ISAM does not use pages for the data. Consecutive rows are simply stored consecutively. The index file uses pages, but not the data file.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel/00webhost Error 404. The requested URL was not found on this server<p><strong>1.</strong> Uploaded my files to 000webhost. I placed all files from th...
<p>Your includes seem fine.</p> <p>Be sure you also uploaded the .htaccess file located in /public (in your /public_html). The file name starts with a dot so it's commonly hidden. The purpose of this file is to indicate Apache how to map URLs to real files (in this case, everything should point to index.php)</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NFC authentication<p>I am getting the uid of a NFC tag by sending and receiving APDUs from the card. Storing them in a database. While loggin in I am compari...
<p>Using the UID for authentication is not a good idea, since it is world-readable and anyone could copy it and use it to program one of the cards that allow it. Some contactless devices generate a different random UID every time they are powered up.</p> <p>There are lots of alternatives, like these two quite simplist...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Openwrt:What can I do to package bin files into ipk packages?<p>I've compiled the openwrt source and run it on my device (HC5661).Then I wrote a helloword.cp...
<p>You have to use the <code>SDK</code>. You can follow this steps:</p> <p>1) Download the <code>OpenWrt-SDK</code></p> <p>2) In the <code>OpenWrt-SDK</code> folder run <code>./scripts/feeds/update -a &amp;&amp; ./scripts/feeds/install -a</code></p> <p>3) Create a folder called <code>helloworld</code> in the path <c...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Espresso finding row in RecyclerView that could be off screen<p>I have a RecyclerView which could contain any number of items. I need to be able to get a si...
<p>I found the solution in this wiki page. <a href="http://alexander-thiele.blogspot.com/2016/01/espresso-ui-tests-and-recyclerview.html" rel="nofollow noreferrer">http://alexander-thiele.blogspot.com/2016/01/espresso-ui-tests-and-recyclerview.html</a></p> <p>His code onView(withId(R.id.recyclerView)).perform(Recycler...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: OneToOne relationship with cascade deleting both sides<p>I have project based on JHipster generator. I have two entities: Pattern and File. One pattern has o...
<p>This should work:</p> <pre><code>public class Pattern implements Serializable { @OneToOne(mappedBy = "pattern",cascade = CascadeType.REMOVE) @JsonIgnore private File file; } public class File implements Serializable { @OneToOne(cascade=CascadeType.REMOVE, orphanRemoval = true) @JoinColumn(uniqu...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: XPath Need help getting part of href value preceding specific characters<p>I am trying to get the following information extracted out of a link using XPath, ...
<p>You can use below <code>XPath</code> expression to get required value:</p> <pre><code>substring-after(//a/@href, "ag_num=") </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to leave a queue of programs to run in Spyder 3.3.0+?<p>I used to be able to simply press run on the different programs on the Editor and the programs wo...
<p>(<em>Spyder maintainer here</em>) This functionality was removed in our <strong>3.3.0</strong> version, due to <a href="https://github.com/spyder-ide/spyder/issues/7293" rel="nofollow noreferrer">this issue</a>.</p> <p>As a matter of fact, we never intended for our consoles to queue jobs sequentially because it's n...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Structure array into multi dimensional array<p>So I have the following variable <code>$authenticated_users</code> which returns:</p> <pre><code>array(2) { ...
<p>you need to change your logic</p> <pre><code>public static function get_config_and_users(): array { $config = []; $config['client_id'] = '2882'; $config['client_secret'] = '521f4e'; if (!$authenticated_users = get_option('instagram')) { return []; } foreach ($authenticated_users as ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Early returning inside an asynchronous function<p>Assume the scenario where you have to call an asynchronous function, but you are not really interested abou...
<p>Pattern 1 does not catch any errors that may occur during asynchronous operations in the <code>set</code> function - any errors will result in an unhandled Promise rejection, which should be avoided. Pattern 1 will only catch errors that occur during <code>set</code>'s <em>synchronous</em> operations (such as, when ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why are all services being changed instead of just the if condition service?<p>I am writing a script that will be passing in two variables and a csv file to ...
<p>Inside the foreach you don't check what was passed as an argument.</p> <p>I suggest to only process lines from the csv which match the passed <code>$Service</code></p> <pre><code>Import-CSV .\csvfile.csv | Where-Object Service -eq $Service | </code></pre> <p>Also the script blocks in the if/elseif are identical a...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: large numpy matrix as dataflow side input<p>I'm trying to write a Dataflow pipeline in Python that requires a large numpy matrix as a side input. The matrix...
<p>Your approach is correct.</p> <p>What Dataflow does, in this case, is handle the NumPy matrix as a side input. This means that it's uploaded once from your machine to the service, and the Dataflow service will send it to each worker.</p> <p>Given that the matrix is large, this will make your workers use I/O to rec...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stored-by-Value Pool that support polymorphism, how to use smart pointer?<h2>Introduction</h2> <p>I have a data structure : pool of values. (not pool of p...
<h2>Regarding <code>weak_ptr</code></h2> <p>A <code>std::weak_ptr</code> is always associated with a <code>std::shared_ptr</code>. To use <code>weak_ptr</code> you would have to manage your objects with <code>shared_ptr</code>. This would mean ownership of your objects can be shared: Anybody can construct a <code>shar...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AWS Codebuild terraform provider<p>Running terraform deploy in codebuild with the following buildspec.yml. Seems terraform isn't picking up the IAM permissio...
<p>EDIT: THE BUG HAS BEEN FIXED SO PLEASE DELETE these lines below if you added them on your buildspec file.</p> <hr> <p>Before <code>terraform init</code>, add these lines:</p> <pre><code> export AWS_ACCESS_KEY_ID=`curl --silent 169.254.170.2:80$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI | jq -r '.AccessKeyId'` expo...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas: Creating another column with row column multiplication<pre><code>Priority Expected Actual High 47 30 Medium ...
<p>try:</p> <pre><code>a = np.array([5, 3, 10]) df['Expected_values'] = df.Expected * a df['Actual_values'] = df.Actual * a print df Priority Expected Actual Expected_values Actual_values 0 High 47 30 235 150 1 Medium 22 14 66 ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python, accessing list/ndarray<p>This is the output of one of my variables.</p> <p>I am trying to access each f the elements. But I am not able to </p> <pr...
<p>Try using the <code>a[()]</code> notation. </p> <p>For example, <code>a[(0,0,0)]</code> will return you <code>array([ 326., 50.], dtype=float32)</code>. </p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Run a GitHub Action Last<p>I have a bunch of GitHub actions for services that each build a container if something changes in their corresponding directories....
<p>You can turn each GitHub actions you have into a <a href="https://docs.github.com/en/actions/creating-actions/creating-a-composite-action" rel="nofollow noreferrer">composite action</a> for more reusability and readability.</p> <p>But you can just combine all existing actions into 1 workflow - each in separate job i...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AutoForge Drawing object not displying<p>We have integrated AutoForge API in web application using demo account. All APIs works as expected, but after some ...
<p>There is different bucket's data <a href="https://forge.autodesk.com/en/docs/data/v2/developers_guide/retention-policy/" rel="nofollow noreferrer">Retention Policies</a>.</p> <p>When creating a bucket you must specify the data retention policy. In some tutorials the default policy is <code>transient</code> which mea...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Grand Central Dispatch<p>I want to speed my code just a little bit. This is my code: </p> <pre><code>var loadedText : NSAttributedString = NSAttributedStrin...
<p>Forget the group and change the order</p> <pre><code>var loadedText = NSAttributedString(string: "") DispatchQueue.global(qos: .userInteractive).async { if let content = self.selectedNote.content as? NSAttributedString { loadedText = content } else { self.noteTextView.becomeFirstResponder(...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Independently changing the plot element sizes when using stat_pointinterval()<p>I've been trying to use the stat_pointinterval() function from the tidybayes ...
<p>One approach to set the size of the point and segments independently would be to set the dot size via the <code>point_size</code> argument and set the segment sizes via the <code>range</code> argument of <code>scale_size_continuous</code> where the default is <code>range=c(1, 6)</code>:</p> <pre class="lang-r pretty...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Grammar is matching function rule more than required number of times<p>Here is a grammar that I used. The action after matching the rule 'Func' is called 12 ...
<p>The reason you are encountering this is because the <code>Func</code> rule is matched that many times. Unfortunately, some of those matches are part of larger expressions (in the <code>Eq</code> rule) that fail. That's why you see <code>peg$currPos</code> being set back.</p> <p>Maybe try:</p> <pre><code>Eq = Ar ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to enable RabbitMQ management api for RabbitMQContainer of testcontainers<p>I am using RabbitMQContainer to do integration test, I have the below set up:...
<p>Using <code>withCommand</code> will override the default command of the Docker image and therefore break the startup contract with the <code>RabbitMQContainer</code> implementation.</p> <p>I am no RabbitMQ expert, but can you use such a config and enable <code>rabbitmq_management</code> via the plugin setter?</p> <p...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Apache Flink - writing stream to S3 error - null uri host<p>I have a Flink data pipeline that transforms the log file downloaded from S3 and write back in pa...
<p>The problem was <code>:</code> (colon). It was not clearly documented</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React native render from props<p>I have a very simple question but I cannot make it work. I'm making a new component and I want to pass content by props. I h...
<p>You need to call <code>renderMain</code>:</p> <pre><code>&lt;View style={[styles.main]}&gt; {this.props.renderMain()} &lt;/View&gt; </code></pre> <p>so that it computes and returns the markup</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Passing image into bootstrap modal<p>Hello I have a list of images. User can click on any image and it will open a bootstrap modal. In this boostrap modal, I...
<p>by using javascript you can do it</p> <p>JAVASCRIPT</p> <pre><code>$(document).on("click", ".open-AddImgDialog", function () { var imgsrc = $(this).data('id'); $('#my_image').attr('src',imgsrc);); }); </code></pre> <p>HTML code </p> <pre><code>&lt;div class="item_info"&gt; &lt;button type="button" class="btn b...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular 2 set selected on a select option dropdown<p>I have 2 objects of the type User:</p> <ul> <li><code>users</code> has the full list of users.</li> <li...
<p>As you posted in your question, <code>selectedUsers</code> has a list of users from db, you cannot use it this way as an object <code>selectedUsers.id</code>.</p> <p>you can try with the below options, but first of all, you have to remove <code>[selected]="selectedUsers.id === user.id"</code> from your <code>optio...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Different types of turtles in a lattice grid<p>In Netlogo there are some default models, including the lattice grid. I am wondering how to add three types/br...
<p>There are several ways to do this, some of them more exact than others. It is especially important to realise that you can change a turtles breed after it has been created, simply by asking it to <code>set breed &lt;breed&gt;</code>.</p> <p>In the first example, I give all turtles type1 as they are created, and then...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to determine how long a user is using the app (swift4)<p>I am trying to figure out how to determine the time the user has been on the app so then I can c...
<p>I think there's a few points you're missing here. The first and most obvious to me is that if you store these data as variables in the delegate, they will not persist between launches which will undermine your goal if I understand it correctly. You should check out a persistent data store. UserDefaults is generally ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Line Size_Changed event doesn't fire when parent (canvas) Size_Changed is fired<p>I have a canvas on which I want to draw several lines. Which works fine. B...
<p>A Canvas never resizes its child elements, hence there is no SizeChanged event fired for your Lines and Rectangles.</p> <p>Put the repositioning code in a handler for the Canvas' SizeChanged event:</p> <pre><code>private void Canvas_SizeChanged(object sender, SizeChangedEventArgs e) { Canvas canvas = (Canvas)s...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB - update an object inside a multi dimensional numerical indexed array<p>I am learming MongoDB (ver 5) [with Django (pymongo)] and facing a problem to...
<p>Query</p> <ul> <li>arrayfilters to match the <code>word= &quot;arep 2&quot;</code></li> <li>for all members(2 nested levels)<code>($[] means for all members)</code>, set the word(that satisfies the arrayFilter)<code>($[w].word)</code> to <code>&quot;hello&quot;</code></li> </ul> <p><a href="https://cmql.org/playmong...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: UVM-SystemC MACOSX make error<p>I'm trying to run uvm-systemc on macosx. Link to download: <a href="http://accellera.org/images/downloads/drafts-review/uvm-s...
<p>The issue is due to the libtool being executed to create a library file without a cpp file . The tlm1 directory (and macros directory) do not have any .cpp file , hence there is no need to call the libtool in the respective makefiles. </p> <p>As the UVM-SystemC for Mac OS is not in the list of tested OS you MAY run...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Call to a member function bindParam() on null<p>I created a page that should add new entry in my database, I just get this message when I'm trying to upload ...
<p>You never prepared it. <code>$stmt</code> is never declared. This is the reason for <code>null</code> warning.</p> <pre><code>if($stmt=$conn-&gt;prepare( "INSERT INTO user (fname, lname, memo, file) VALUES (:fname, :lname, :memo, :file) ON DUPLICATE KEY UPDATE memo=:memo2" ) ){ // ... make sure you ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: adb shell command to find the device RAM<p>I am trying to find device RAM (512 MB or 1GB) using adb shell commands.</p> <p>Following commands giving more de...
<p>So it looks to me that MemTotal is probably the field you are looking for:</p> <blockquote> <p>MemTotal — Total amount of physical RAM, in kilobytes.</p> </blockquote> <p>While it is not the strictly Android, another Linux flavour CentOS provides the <a href="https://www.centos.org/docs/5/html/5.1/Deployment_Gui...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: php array display categories like wordpress admin<p>i have one table . and it's have more rows parent and children <a href="https://i.stack.imgur.com/wEJDO.p...
<p>In your code you're setting <code>$dash = 0;</code> each time you deal with a row, so any non-first child would show up with no dashes.</p> <p>Try changing</p> <pre><code>$dash = $dash +1; getCatTable($cats['children'], $dash); $dash = 0; </code></pre> <p>to</p> <pre><code>getCatTable($cats['children'], $dash + ...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: clang++ library not found even when providing library path<p>I was trying to create a new OpenGL project with glfw and glad using vs code on an m1 Mac, and s...
<p>Normally when you give libraries to link with the -l flag, you omit the lib prefix. For example: &quot;-lglfw3&quot; links the file &quot;libglfw3.a&quot;. It looks like you should change your -llibglfw3 option.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: about replace methods in string in js<pre><code>let code = document.querySelector('.Nform').innerHTML; localStorage.setItem('code',JSON.stringify(code)); let...
<p>In your regex, You have to escape these four special characters <strong>:</strong> <code>&quot;</code>, <code>(</code>, <code>)</code>, <code>/</code></p> <p>Demo <strong>:</strong></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre cl...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: EOF error when using sql query in Snowflake<p>I am getting an error here on this Snowflake query and am not sure what is incorrect. Not quite sure why I wou...
<p>You're missing a closing parenthesis on your to_number. Should be</p> <pre><code>(t1.FISCL_YR_MO_NBR BETWEEN 2021001 AND to_number(to_char(current_date, 'YYYYMMDD'))) </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Labelling on an 2d array C++ got the wrong result<p>I am newbie and having work with connected components labelling algorithm. My purpose is that I need to f...
<p>In your <code>if</code> statements you need to use the <code>==</code> operator to compare. The single <code>=</code> is assignment. For example:</p> <pre><code>if (label[i][j] == 1) </code></pre> <p>There are 6 places I see where you need to make this change.</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I insert or update data using value in table A if a value exists in one of 2 tables say, B and C?<p>I've 3 tables:</p> <pre><code>switches (devic...
<p>I wrote the query below without testing, so there could be some errors. Please replace 'ADDR' and 'RSSI' with their proper values (encoded) or use query parameters to avoid SQL injection.</p> <pre><code>INSERT INTO device_rssi(device_addr, room_id, rssi) select * from ( select 'ADDR', room_id, 'RSSI' fro...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to delete the specific row of n-dimensional array in Julia?<p>I want to have a function which returns a new array with sub-arrays along an axis deleted i...
<p>I am not aware of a specific function for what you need, but you can try this:</p> <pre><code>function delete(array::Array, rows::AbstractVector{Int}, dim::Int) sel = Any[Colon() for i in 1:ndims(array)] sel[dim] = setdiff(axes(array, dim), rows) array[sel...] end delete(array::Array, rows::Int, dim::I...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel Formula: COUNTIF Function for range of values<p>I am trying to do a COUNTIF for a range of values.</p> <p>First, I'm looking for records with a Year H...
<p>Does this work?</p> <pre><code>=COUNTIFS(Table1[Year Home Built],"&gt;=1955", Table1[Year Home Built],"&lt;=1977", Table1[Year Roof Last Updated],"&lt;=" &amp; YEAR(TODAY()), Table1[Year Roof Last Updated],"&gt;=" &amp; (YEAR(TODAY())-5) ) </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to autoinput in bash scripting<p>I'm tired to put username in this input by bash script i run the script but what shall i do when i rich to this line its...
<p>You can use expect:</p> <pre><code>#!/usr/bin/expect spawn Vpn.sh expect &quot;Enter Auth Username:&quot; send &quot;ThePassword\r&quot; expect eof </code></pre>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get row data failed, error of Cannot create property 'guid' on string<p>I'm using jquery datatables. I got error of <code>Cannot create property 'guid' on st...
<p>Your main problem is this line :</p> <pre><code>$('body').on('click', '#employersTable tr', retrieveRow(this)); ^^^^^^^^^^^^^^^^^ </code></pre> <p>This actually <em>executes</em> <code>retrieveRow()</code> right away. When you reference to a function variable in a <code>...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hosting a separate app service as a website directory<p>Is it possible to include a separate Azure App Service as part of another App Service?</p> <p>For exa...
<p>For this purpose you could use Application Gateway.</p> <p>In a certain sense it resembles a load balancer (it is a L7 LB indeed) as you indicated, but the product provides many additional features.</p> <p>The following image, extracted from the product documentation, explains how it works:</p> <p><a href="https://i...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Explore Graph in RDF4J custom function<p>I'm trying to implement a plugin for Ontotext GraphDB. I hope it will compute the distance between two entities via ...
<p>That tutorial is a little out of date unfortunately. See the latest <a href="https://rdf4j.org/javadoc/latest/index.html?org/eclipse/rdf4j/query/algebra/evaluation/function/Function.html" rel="nofollow noreferrer">javadoc for the Function interface</a>: it now has a <code>evaluate(TripleSource tripleSource, Value......
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to bulild a null notnull matrix in pandas dataframe<p>Here's my dataset</p> <pre><code>Id Column_A Column_B Column_C 1 Null 7 ...
<p>Assuming <code>Null</code> is NaN, here's one option. Using <code>isna</code> + <code>sum</code> to count the NaNs, then find the difference between <code>df</code> length and number of NaNs for <code>Notnulls</code>. Then construct a DataFrame.</p> <pre><code>nulls = df.drop(columns='Id').isna().sum() notnulls = nu...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: finding difference between dates based on a criteria<p>Consider this dataset:</p> <p><code>mydf &lt;- data.frame(churn_indicator = c(0,0,1,0,1), ...
<p>A possible solution :</p> <pre><code># convert column from factor/characters to Date (if not already done) mydf$resign_date &lt;- as.Date(mydf$resign_date) mydf$join_date &lt;- as.Date(mydf$join_date) # compute the date differences days_churn1 &lt;- as.numeric(difftime(mydf$resign_date,mydf$join_date,units='days')...
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rails 4 + bower-rails gem + bower + bootstrap sass<p>I have installed bower-rails gem </p> <p>then in bower file I included bootstrap-sass, it installed boo...
<p>Finally I resolved the issue by removing all the bower components and running </p> <p><code>rails g bower_rails:initialize</code></p> <p>It created an intializer for assets bower_rails.rb, which finally solved the problem</p>
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How does the const a = express() works exactly?<p>I recently started learning Node/express. One doubt is bugging me for a couple of weeks now. I know what th...
<p>Perhaps the confusion is in assuming that the default export of the <code>express</code> module is something other than a function, but as others have pointed out, the <a href="https://expressjs.com/en/4x/api.html" rel="nofollow noreferrer">default export</a> of <code>express</code> <em>is</em> a function. Once impo...