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:
Sequential reading of file names in a folder using excel VBA<p>I am trying to read nearly 1000 files in a folder using VBA. I wish the code to pick the file ... | <p>The Dir command returns filenames "in no particular order" (See the answer by Chris Neilsen for links) so you are not guaranteed to get the order you want.</p>
<p>Additionally, when dealing with strings, the computer will sort them using alphabetical order. With letters, you should be able to see that these are in ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Jquery slider fix<p>I made a slider (<a href="http://jsfiddle.net/k8f6wp17/" rel="nofollow">http://jsfiddle.net/k8f6wp17/</a>) and the problem is in the righ... | <p>Can't really see where you went wrong. But I did update your code a bit</p>
<p>[new fiddle]
<a href="http://jsfiddle.net/pierreduc/k8f6wp17/3/" rel="nofollow">http://jsfiddle.net/pierreduc/k8f6wp17/3/</a></p>
<p>Hope this helps:</p>
<p>[EDIT]
I've updated the code a bit. Put in a stop() to let the animation stop.... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex Find/Replace Width and Height<p>I'm trying to run a find/replace on a series of files to remove the <code>width="..."</code> and <code>height="..."</co... | <p>You're matching <code>"</code> "zero or more" times by preceding it with the <code>*</code> operator. You can either use a non-greedy match in between <code>".*?"</code> or I'd prefer a negated character class <code>"[^"]*"</code></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make the pod CIDR range larger in kubernetes cluster deployed with kubeadm?<p>I deployed my cluster with the --pod-network-cidr added, and have create... | <p>Changing a cluster CIDR isn't a simple task. I managed to reproduce your scenario and I managed to change it using the following steps. </p>
<p><strong>Changing an IP pool</strong></p>
<p>The process is as follows :</p>
<ol>
<li>Install calicoctl as a Kubernetes pod (<a href="https://docs.projectcalico.org/gettin... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When to add http(s):// to website address<p>I'm trying to create a web browser using Cocoa and Swift. I have an <code>NSTextField</code> where the user can e... | <p>You need to be more precise in your categorization of what the user typed in.
Here are some examples and expected reactions:</p>
<ol>
<li>www.google.com: should be translated into <a href="http://www.google.com" rel="nofollow">http://www.google.com</a></li>
<li><a href="ftp://www.foo.com" rel="nofollow">ftp://www.f... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deploying ASP.NET vNext beta 2 on Azure with Kudu<p>According to <a href="http://blog.davidebbo.com/2014/09/deploying-aspnet-vnext-toazure-websites.html" rel... | <p>I just ran into this problem today and the following worked for me:</p>
<p>Set the following environment variables (app settings) in your Azure Web Site:</p>
<p>SCM_KRE_Version 1.0.0-beta2</p>
<p>SCM_KRE_CLR CoreCLR</p>
<p><strong>Clarification</strong> SCM_KRE_CLR defaults to the "full" clr, only set SC... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
font-face with bold weight not being recognized<p>I am using 2 <code>@font-face</code> on my <code>index.css</code> file with the purpose of using a font in ... | <p>If you're using <code>@font-face</code>, <em>never</em> use <code>local(...)</code>. The whole reason you're using <code>@font-face</code> is to ensure that <em>you</em> control <em>exactly</em> which font resource gets loaded for which (set of) font properties. The last thing you want is for the OS to black-box fet... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Exit Back Out of Private NPM Repo<p>So... I know this is probably a stupid question but I can't seem to find the info anywhere and I figure I can't be the fi... | <p>You no longer have to choose between one and the other. If you update to a recent <code>npm</code> (latest is 2.6.0), then you can store credentials for multiple repositories in your <code>.npmrc</code> file.</p>
<p>You can switch between registries with the <code>--registry</code> command line option:</p>
<p><co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Remove array of objects from array of objects with Jquery or JavaScript<p>Might be duplicate, but I couldn't find it.
So I have two arrays of objects: </p>
... | <p>You can do it like this</p>
<pre><code>// get all id's from a
var a = [{id: '1', name: 'bob'}, {id: '2', name: 'bill'}].map(function (el) {
return el.id;
});
// search item.id in array with id's
$scope.b = $scope.b.filter(function(item){
return a.indexOf(item.id) === -1;
});
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Android switch: how to disable response to touch event?<p>So i'm developing an Android application and I've added some switch to indicate the status of some ... | <p>I have tried some resolution and found one that worked.</p>
<p>for every switch, add </p>
<pre><code>android:clickable="false"
</code></pre>
<p>will do what I've asked.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Code with classes and iteration doesn't work using lists<p>I need a little help with my homework:</p>
<p>I have a class course with the course name and grad... | <p>The problem is that <code>__next__</code> should return a <em>single</em> item; it should not be iterating over a list. For what you want, it would be simpler to put the iteration logic in <code>__iter__</code> to start:</p>
<pre><code>def __iter__(self):
for c in self.listCoursenamesAndGrades:
if c.gra... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP - Having a placeholder 'echo' so to speak<pre><code><?
//LUHN ALGORITHM PHP CONVERSION
// CREDIT CARD NUMBER CHECKER BY JACK BELLAMY - JACKBELLAMY.CO.... | <p>You have three states you need to account for, 'open', 'correct', and 'incorrect' To do that you start with an 'open' state.</p>
<pre><code>$new = "<img src='please_enter your card number.jpg' />";
echo $new;
</code></pre>
<p>You would use that in the first condition of your test - </p>
<pre><code>if(isset(... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do Kubernetes NodePort services with Service.spec.externalTrafficPolicy=Local route traffic?<p>There seems to be two contradictory explanations of how No... | <p>A <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="noreferrer">Service</a> is a virtual address/port managed by <code>kube-proxy</code>. Services forward traffic to their associated endpoints, which are usually pods but as you mentioned, can be set to any destination IP/Port. </p>
<p>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reading Group Policy settings from pure UWP app<p>I have a C# Windows program that is reading custom group policy settings, set by Administrator with ADMX.
C... | <blockquote>
<p>Reading Group Policy settings from pure UWP app</p>
</blockquote>
<p>Currently, UWP does not support access Group policy directly. As mentioned from this case <a href="https://stackoverflow.com/a/48900974/7254781">reply</a>, you could make <code>Brokered Windows Runtime Component</code> or desk-bridg... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Slight delay to display PyQt window contents in Python program<p>The following Python program when run(both in PyCharm or by double-clicking the .py in windo... | <p>I followed <a href="https://www.learnpyqt.com/courses/qt-creator/first-steps-qt-creator/" rel="nofollow noreferrer">https://www.learnpyqt.com/courses/qt-creator/first-steps-qt-creator/</a> tutorials which were really good (probably the best one on PyQt5 out there available for free) & got my problem solved.</p>
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 error:reached end of file while parsing<p>Can anyone help me get rid of this Exception... | <p>All your <code>for</code> loop conditions are wrong. You need <code>i < n</code> everywhere. Currently none of your loops are executing except the last one where <code>i > np</code> becomes <code>1 > 0</code> and hence returns <code>true</code>. But, since you initialized your array with size <code>0</code>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What does the test “if (i && (i- 1))” mean?<p>I don't understand this line of code:</p>
<blockquote>
<pre><code>if (i && (i - 1))
printf("%d\n",... | <p>The condition of this if statement</p>
<pre><code>if (i && (i - 1))
</code></pre>
<p>can be rewritten for clarity like</p>
<pre><code>if (i != 0 && (i - 1) != 0)
</code></pre>
<p>In the condition there is checked whether the current value of the index i is equal to 0. And if it is not equal to 0 ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using mathematical operators in MSBuild properties<p>The goal of this is to set the build version to be a timestamp of the build date. I use a <code>Directo... | <p>Of course, shortly after deciding to ask for help I figure it out...</p>
<p>MSBuild includes <a href="https://docs.microsoft.com/en-us/visualstudio/msbuild/property-functions?view=vs-2019" rel="nofollow noreferrer">MSBuild Property Functions</a>, which can be used to divide things and perform other operations. Her... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Jquery event not triggering on manually added elments<p>Page makes an ajax call, recieves JSON, than adds json data to new elements and those elements are ap... | <p>Attaching event handlers directly to the elements won't work for dynamically added elements.
You should attach the handlers to the parent containers instead. </p>
<p>Try this: </p>
<pre><code>$( "body" ).on( "click", ".APPENDED", function() {
console.log ('worked');
});
</code></pre>
<p>Or,</p>
<pre><code>$(d... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nesting ${name:offset:length} and $() in zsh<p>In zsh, <code>$()</code> lets me run the command inside the parenthesis and get the stdout, and <code>${name:o... | <p>Double quotes around the command substitution should work:</p>
<pre><code>user3=${"$(basename $HOME)":0:3}
</code></pre>
<p>Though, I'd be inclined to use zsh's <code>:t</code> modifier instead of basename:</p>
<pre><code>${${HOME:t}:0:3}
</code></pre>
<p>The <code>:offset:length</code> form is only really there... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nested attributes in form not visible<p>I'm likely missing something simple, but I've tried a number of things to no avail.
I need to be able to edit an exi... | <p>You forgot to pass your form builder to the fields_for block.</p>
<pre><code><%= f.inputs "Track Exclusivity", class:'inputs align-left' do %>
<%= f.input :exclusive %>
<%= f.input :full_exclusivity,
label: "Fully Exclusive" %>
<%= f.fields_for :exclusivities do |ff| %>
<%= ff... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Develop Database Front-End Application<p>I have an SQL database, and I need to develop a front-end application so that users can view the tables in this data... | <p>You need to have a view for displaying your application
ASP.NET would be more appropriate for that.<br>
You could use PHP or some of the related MVC frameworks of it.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Remove matching and previous line<p>I need to remove a line containing "not a dynamic executable" and a previous line from a stream using grep, awk, sed or s... | <p>Most simply with <code>pcregrep</code> in multi-line mode:</p>
<pre><code>pcregrep -vM '\n\tnot a dynamic executable' filename
</code></pre>
<p>If <code>pcregrep</code> is not available to you, then <code>awk</code> or <code>sed</code> can also do this by reading one line ahead and skipping the printing of previou... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
opencv: How to fill the area/edge outside a region<p>The image below only contains the black and white pixels after thresholding. I draw a rotated rectangle ... | <p>If you know the angle and size of the area you want to search, you can cut it out of the image using this technique:</p>
<p><a href="https://stackoverflow.com/questions/11627362/how-to-straighten-a-rotated-rectangle-area-of-an-image-using-opencv-in-python">How to straighten a rotated rectangle area of an image usin... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Access outer structure from inner one<p>I have a question similar to this one: <a href="https://stackoverflow.com/questions/31537549/accessing-struct-fields-... | <p>Having a pointer to the outer struct is the only way to do it. The drawback is that you have to make sure that the pointer is initialized. So, something like a constructor function might help:</p>
<pre><code>func NewOuter() *Outer {
ret:=Outer{}
ret.outer=&ret
return &ret
}
</code></pre>
<p>Also, you... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Generate a new variable based on the time of another variable value<p>I have a dataset likes like below</p>
<pre><code>ID. Invoice. Date of Invoice. paid o... | <p>Your data:</p>
<pre><code>df = structure(list(ID. = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L
), Invoice. = c(1L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L), Date.of.Invoice. = structure(c(3L,
3L, 4L, 5L, 1L, 2L, 4L, 6L, 7L, 5L), .Label = c("09/30/2019",
"10/30/2019", "10/31/2019", "11/30/2019", "12/31/2019", "7/31/2019"... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MongoDB with python bulk operations insert update<p>Is it possible to have a bulk operation in MongoDB (with python) where insert and update commands are mix... | <p>Yes. PyMongo 2.7 added a "Bulk API" which you can read about <a href="http://api.mongodb.org/python/current/examples/bulk.html#mixed-bulk-write-operations" rel="nofollow">here.</a> PyMongo 3.0 is adding an alternative API to do the same thing that is very similar to what you mention in a comment to another answer. S... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Magento update with csv and unset special price<p>I'm trying to update a product in Magento through Import/Export -> Import, using a .csv file. I'm passing j... | <p>I just realized that setting the special price a value that is equal to the value of the regular price will do the job. Then the template for the special price will not be used on the front end. I hope it will not bring some other issues, but for now it works for me.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google Sheets – countifs across rows<p>I have a schedule that my team fills out daily in a google sheet. On a seperate tab, I would like a running count per ... | <p>Combine INDIRECT with MATCH:</p>
<p><a href="https://i.stack.imgur.com/UHe9g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UHe9g.png" alt="enter image description here"></a></p>
<pre><code>=COUNTIF(INDIRECT("'Mon 1/27'!F"&MATCH(D$1,'Mon 1/27'!$A$1:$A$5,0)&":AG"&MATCH(D$1,'Mon 1/27'... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to 'store' Sudo temporarily<p>I'm quite new to Linux. I remember using a tutorial were you were able to declare your sudo (+password) at the s... | <p>You can use <code>su</code>. This way you are changing the ownership of the session to <code>root</code> (by default, you can also change to any other user on the system) and therefore you will be able to avoid the <code>sudo</code>.</p>
<p><a href="http://www.linfo.org/su.html" rel="nofollow">Here</a> you can find... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Load ViewController Swift - Black Screen<p>Im trying to simply load a new ViewController and its associated xib when a button is clicked, but the screen beco... | <p>Try this, your are missing name of xib...</p>
<pre><code> let vc = MainViewController(nibName: "MainViewController", bundle: nil) // Enter you nibname in this
self.showViewController(vc, sender: nil)
</code></pre>
<p>Thanks :)</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parsing directories and detecting unexpected blanks<p>I'm trying to parse some directories and identifying folders witch do not have a specific correct patte... | <p>Do the "_ID" check after splitting the directories, that way you don't loose information. Assuming the directory names themselves don't contain escaped backslashes and that the ID field is always in level 4 (counting from 1), this should do it:</p>
<pre><code>for i in arange(len(files)):
parts = files[i].split(... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Strange function-like property – can someone explain this piece of Swift code?<p>I found this piece of code regarding sections in a table view in order to ma... | <p>It is very similar to a function despite the absence of keywords – it’s a <a href="https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Properties.html#//apple_ref/doc/uid/TP40014097-CH14-ID259" rel="nofollow">computed property</a>.</p>
<p>These look like vari... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Single view subscribes to multiple Meteor publishes onWait<p>How do I return two <code>Meteor.subscribe()</code> methods in my <code>waitOn</code> method? I... | <pre><code>waitOn:function(){
return
[
Meteor.subscribe('first'),
Meteor.subscribe('second')
]
}
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the difference, if any, between {x} and '= {x}' initialization?<p>I am trying to understand the semantic difference between these two ways of initial... | <pre><code>Foo foo{x}; // 1
Foo foo = {x}; // 2
</code></pre>
<p>1 is <em>direct-list-initialization</em>. 2 is <em>copy-list-initialization</em>. </p>
<p>Assuming that <code>Foo</code> is a class type, then in most cases they do exactly the same thing, conceptually or otherwise, except that if an explicit constr... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Weird behaviour using MaterialComponents and BottomNavigationView. Android<p>I am using BottomNavigationView from material design library and everything seem... | <p>Finally solved setting elevation to 0 dp</p>
<p><a href="https://github.com/material-components/material-components-android/issues/1077" rel="nofollow noreferrer">https://github.com/material-components/material-components-android/issues/1077</a></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Data in Gruff diagram from database<p>I was looking for some example how to extract data from database and use it in diagram created in Gruff, but failed. So... | <p>Store the count in variable and use it as data in graph as shown below:</p>
<p>@course = Course.application.size</p>
<p>@student = Student.size</p>
<pre><code>g = Gruff::Pie.new
g.title = "Applications"
g.data : "Applied", @course
g.data : "Students", @student
send_data(g.to_blob, :disposition => 'inline', :ty... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using a GUID in a WHERE clause - Performance?<p>In our application, we create a lot of rows in a single table, based on some calculations. Due to the volume ... | <p>You should create the column with type 'uniqueidentifier', which is intended for storing GUID values. Internally it will store it as a 16 byte (128 bit) integer instead of the much slower character string that you want to use.</p>
<p>Performance should be very good because you are just comparing 16 byte values for ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Exclude email from IdentityUser in Asp Net MVC<p>I have an asp.net MVC project with authentication. The default implementation uses email address for either ... | <p>You don't need to make changes in the <strong>OnModelCreating</strong> method. All you need to do is make a few changes in the ViewModel and the Login & Register method.</p>
<ol>
<li>Replace the <strong>Email</strong> property name with the <strong>Username</strong> and comment out the <strong>[EmailAddress]</s... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Server INSERTED table to PostgreSQL<p>I created these tables:</p>
<pre><code>CREATE TABLE public.articulos
( id integer PRIMARY KEY,
nombre varchar(100... | <p>Something like this I would say:</p>
<pre><code>CREATE FUNCTION inserta() RETURNS trigger AS $actualiza$
BEGIN
-- Actualizamos la fecha
UPDATE public.articulos
SET stock = stock + case
when new.tipo = 'E' then new.cantidad
else -new.cantidad
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does this python function not work if I wrap it in a def() call?<p>This code works if it isn't wrapped in the function duplicateDel(). I'm sorry but I'm ... | <p><strong>"Wrapping"</strong> it into <code>def</code>, means that you are declaring your function to futher usage, so, in order to use it you need call it. In your case, just add <code>duplicateDel()</code></p>
<pre><code>def duplicateDel():
f1 = csv.reader(open('file1.csv', 'rb'))
writer = csv.writer(open("... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Comma seperated string input for postgres IN operator<p>I have a source function that is returning value as '1,2,3'</p>
<p>and I want to use that value in I... | <p>You can <a href="https://www.postgresql.org/docs/12/functions-array.html#ARRAY-FUNCTIONS-TABLE" rel="nofollow noreferrer">split the string into an array</a> and use <code>ANY</code> instead of <code>IN</code>:</p>
<pre><code>SELECT * FROM some_table WHERE id = ANY(string_to_array({some_var}, ',')::INTEGER[])
</code... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript form validating - how do you show validation errors in a single table rather than using alerts<p>I am new to .asp and Javascript and wondered if s... | <p>There are many ways that this type of thing can be done, here is one way which I have put together based on what you have so far... </p>
<p><a href="http://jsfiddle.net/c0nh2rke/" rel="nofollow">http://jsfiddle.net/c0nh2rke/</a></p>
<p><div class="snippet" data-lang="js" data-hide="true">
<div class="snippet-code ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mat-auto complete - example function filter error<p>I have a problem regarding the example of using the mat-autocomplete material design. The example functio... | <p>I solved the problem temporarily, using <strong>//@ts-ignore</strong>, but I think it is not the best way. What do you say?</p>
<pre><code> carregarLocaisPorMunicipio(municipio: string){
this.relatorioService.getLocaisPorMunicipio(municipio).subscribe(
locais => {
this.locais = locais
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
XMLHttpRequest error in flutter web [Enabling CORS AWS API gateway]<p><strong>Note: It turns out that this had nothing to do with flutter and everything to d... | <p>this worked for me, I added the below header on the lambda function</p>
<pre><code>return {
statusCode: 200,
headers: {
"Access-Control-Allow-Origin": "*", // Required for CORS support to work
"Access-Control-Allow-Credentials": true, // Required for cookies, authorization ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to send mail weekly once WordPress backup taken or not?<p>Multiple sites having in WordPress. backup buddy plugin using configured amazon S3 bucket we ne... | <p>Finally I got the answer</p>
<p>First install the AWS S3 package refer this '<a href="https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-examples-creating-buckets.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-examples-creating-buckets.html</a>'
Then below ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ECDSA get public key in C#<p>I can't figure this out it should be super simple.</p>
<p>I have both the <a href="https://msdn.microsoft.com/en-US/library/sys... | <p>Martin's answer seems fine, but it might be done easier:</p>
<pre><code>public Tuple<byte[],byte[]> GetPublicKey(byte[] privateKey)
{
BigInteger privKeyInt = new BigInteger(+1, privateKey);
var parameters = SecNamedCurves.GetByName("secp256k1");
ECPoint qa = parameters.G.Multiply(privKeyInt);
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tail multiple files shown by separate colors?<p>I follow multiple log files like this:</p>
<pre><code>tail -f /var/log/apache2/tv7r9r3falz0_error.log protec... | <p>This will print the output in two different colors depending on which log file it comes from:</p>
<pre><code>tail -f log1 log2 | awk $'/==> log1/{print "\033[0m\033[1;33;40m";} /==> log2/{print "\033[0m\033[1;35;40m";} 1'
</code></pre>
<p><em>Update by Elliot Chance</em>: Thats the start I needed, here was t... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use variables (their values) as tokens with the for command - Win BATCH file<p>So the situation is like so... I have two nested if statements and then... | <p>First: do not use neither <code>:: remark</code> comments nor <code>:label</code> in a code block enclosed in <code>()</code> parentheses. A proof of harmfulness you could find in the <code>labels.bat</code> script encoded in output from a script provided thereinafter; <a href="http://ss64.com/nt/rem.html" rel="no... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CommonJS Illegal invocation error when calling function on module.exports<p>Doing this works fine:</p>
<pre><code>var requestAnimationFrame =
window.re... | <p>I found the answer here: <a href="https://stackoverflow.com/questions/10743596/why-are-certain-function-calls-termed-illegal-invocations-in-javascript">Why are certain function calls termed "illegal invocations" in JavaScript?</a></p>
<p>It seems some native functions depend on context, so to fix this I b... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create Delphi form first but not main form<p>Delphi 10.3.3</p>
<p>In a mobile FMX project, I want to create a form before the main form.</p>
<p>This form c... | <p>Use a <code>TDataModule</code> to host those tethering components, instead of a form. In your project file (.dpr) move the creation of the data module before the main form. Its setup code will run before the main form and the components will be available at the time of the main forms <code>OnCreate</code>.</p>
<p><... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I use mutate_at with set_value_labels to change the value labels of multiple variables?<p>How do I set the value labels for multiple variables in a da... | <p>Just using <code>haven</code> and not <code>labelled</code> this should work--you were very close but you just needed to past the labels as a named vector:</p>
<pre><code>library(dplyr)
library(haven)
library(purrr)
df %>%
mutate_at(vars(starts_with('var')), ~labelled_spss(., labels = c("Catholic"=1, "Protes... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to develope an application with FlipBorad App style with HTML5<p>Flipborad mobile app has a unique style, the screen will split in two half and the lower... | <p>I think this might be of use </p>
<p><a href="http://engineering.flipboard.com/2015/02/mobile-web/" rel="nofollow">http://engineering.flipboard.com/2015/02/mobile-web/</a></p>
<p>Flipboard is using react to render layout on canvas. That's why it's so quick and gives unlimited possibilities. However it's not very a... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Configuring multiple Jenkins agents that use the same workspace folder<p>Is it a good practice to have multiple Jenkins agents that use <strong>the same work... | <p>I wouldn't recommend it. Multiple concurrent builds would be overwriting each other. One might be trying to compile, while the other deletes the whole source tree and checks out a fresh copy. </p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Listview setonitemclicklistener<p>I've looked up similar post regarding this question but they didn't solve my issue, so here it is.</p>
<p>I'm trying to se... | <pre><code> It think you want something like this.
myList.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int
position, long id)
{
// You have the position available here ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does the assignment of values to keys in identical, but differently created nested dictionaries leads to different results?<p>Code snippets are worth a t... | <p>This is coming about due to the way you initiate <code>data_dict1</code>.</p>
<pre><code>data_dict1 = dict.fromkeys(data_types, {0: {}, 1: {}})
</code></pre>
<p>When you do this, both of the keys in <code>data_dict1</code> are set to the same nested dictionary. This means that after these lines:</p>
<pre><code>da... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
best way to transpose data.table<p>[UPDATE: there is now a native <code>transpose()</code> function in <code>data.table</code> package]</p>
<p>I often need ... | <p>Why not just <code>melt</code> and <code>dcast</code> the <code>data.table</code>?</p>
<pre><code>require(data.table)
dcast(melt(mydata, id.vars = "col0"), variable ~ col0)
# variable row1 row2 row3
# 1: col1 11 21 31
# 2: col2 12 22 32
# 3: col3 13 23 33
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to login a user using Flask Socket IO?<p>I'm using <strong>Flask</strong> with <strong>Flask SocketIO</strong> and <strong>Flask Login</strong... | <p>Its not possible with Flask Login, because in documentation, its saying Flask Login use Cookies or Header keys for Authentication, and its not possible to access it in WebSocket(Socket IO), so i recommend to use a token based system, like in APIs, using JWT tokens.</p>
<pre><code>@socket.on('login')
def on_login(me... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Synchronous equivalent way of $.getJSON<p>I have this code sample which returns data in JSON format to put into slickGrid:</p>
<pre><code>$.getJSON(url, fun... | <p>Use <code>$.ajax</code> and set <code>async : false</code> like this</p>
<pre><code>$.ajax({
url:url,
dataType : 'json',
async : false,
success : function(data) {
$.each(data, function() { dataReturn.push(this); });
...
myDataView.setItems(dataR... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
WooCommerce Cart Not Showing Pricing On Small Decimals Correctly<p>I have some products where the pricing needs to be shown to 8 decimal places, for example,... | <p>The problem was that $price is returning the already formatted value. I needed to get the raw price.</p>
<p>This is the working solution:</p>
<pre><code>add_filter( 'woocommerce_cart_item_price', 'change_cart_item_price', 10, 3 );
function change_cart_item_price( $price, $cart_item, $cart_item_key )
{
if ( WC(... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SendKeys alternatives?<p>I created a keypad app that stays on top, but does not take the focus so that on a touch screen it will forward whatever keys you pr... | <p>I found this Windows Input Simulator: <a href="https://inputsimulator.codeplex.com/" rel="nofollow">https://inputsimulator.codeplex.com/</a></p>
<p>Super easy to use and way, way, way better than SendKeys. And as a bonus, in addition to letting you simulate input, it also lets you set low level keyboard/mouse hooks... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check if the input matches the data in mySQL<p>I have 2 inputs.</p>
<pre><code><input maxlength="40" type="text" style="width:250px;height:50px;font- si... | <p>The simple thing is that you're going to have to search this up. There are many, many articles on how to get something from a MySQL database using PHP. Once you know how to retrieve something from a database, look up how to get things from POST.
Once you know that, there should be no problem for you to find this ou... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using "\n" in Garry's Mod draw.DrawText<p>I want to make an admin-online list. I have the <code>v:Nick()</code> part down but I want to place a new line afte... | <p>I'm not sure how to go about it, I'm not a VGUI kind of guy, but I believe I have found a solution.
You could make a transparent panel with a DListView like this:</p>
<pre><code>local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 500, 700 )
DermaPanel:SetTitle( "Admins online"... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured<p>I'm trying to run a populate script which I ... | <p>Call to <code>django.setup()</code> should go after setting <code>DJANGO_SETTINGS_MODULE</code> environment variable. Just move it into your <code>__main__</code> right after <code>os.environ.setdefault()</code>.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CSS stick svg on the border right of a div<p>I have the following snippet : </p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true... | <p>You were almost there. There was only the <code>position: relative</code> rule missing on the <code>.wrapper</code> element:</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"><co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Removing file in windows batch script not working<p>I'm trying to create a batch script for trimming 25 seconds from the beginning of all mp4 files in a fold... | <p>You quoted one side of the equation... but not the other. Change </p>
<pre><code> if %delorig% == "Y" (del "%%a" /f /q)
if %delorig% == "y" (del "%%a" /f /q)
</code></pre>
<p>to</p>
<pre><code> if "%delorig%"=="Y" (del "%%a" /f /q)
if "%delorig%"=="y" (del "%%a" /f /q)
</code></pre>
<p>or better yet... do ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I have divs under a sticky header but if they are floated the header dosne't stick anymore<p>I've figured out that the floating elements are what is causing ... | <p>After using <code>float</code>, you have to use <code>clear</code></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>body {
height: 100%;
}
#header {
position: sticky;... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filtering rows based on another dataframe<p>So i have two dataframes, one is:</p>
<pre><code>ID Player Strength
1003 Karl ... | <p>One <code>dplyr</code> option could be:</p>
<pre><code>df1 %>%
filter(Strength == df2$Max_Strength[match(Player, df2$Player)])
ID Player Strength
1 1005 Karl 50
2 1006 Karl 50
3 1008 Jen 60
4 1009 Void 200
5 1011 Void 200
6 1012 Fin 90
</code></pre>
<p>And t... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Executing a try/catch within a while loop<p>I am trying to execute a try catch block within a while loop. When I ask the user to enter a number (which shoul... | <p>According to the doc for <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html" rel="nofollow">Class Scanner</a>: </p>
<blockquote>
<p>"When a scanner throws an InputMismatchException, the scanner will not
pass the token that caused the exception, so that it may be retrieved
or skipped via ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Population density within polygons<p>So, I have some questions regarding the raster package in R. I have a raster with estimated population in each grid poin... | <p>Here's an example that iterates over the shape defining the region, then uses the raster values within the region and the <code>focal()</code> function to find the maximum.</p>
<pre><code>library(raster)
library(maptools)
library(sf)
library(dplyr)
set.seed(123)
data(wrld_simpl)
wrld_simpl <- st_as_sf(wrld_si... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does this Code work? String to Boolean<p>I found this piece of code to parse a String into an Boolean value. It works perfectly fine, but I just want to ... | <p>This is acctually quite simple, You get a string representation of your boolean with <code>new ScriptEngineManager().getEngineByName("javascript").eval(string).toString()</code> and then you use the static method <code>Boolean.parseBoolean(String s)</code> from the Boolean class to convert into a boolean type.</p>
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
str.contains using the na=Nan Flag<p>I still can't wrap my head around what the na flag does exactly in the <code>df.str.contains(string na=True/False)</code... | <p>Your <code>df.str.contains()</code> returns :</p>
<blockquote>
<p>A Series or Index of boolean values indicating whether the given pattern is contained within the string of each element of the Series or Index.</p>
</blockquote>
<p>So you will get a series of boolean values (True/False) for each element in your d... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to convert a CFG to c++ code<p>I have a context free grammar (CFG). I want to write a c++ code to do the same thing like CFG. </p>
<p>Is there any built... | <p>You are looking for <a href="http://en.wikipedia.org/wiki/Compiler-compiler" rel="nofollow noreferrer">parser generators</a> (sometimes called compiler-compilers). You already know about <code>bison</code>. You could try <a href="http://antlr3.org/" rel="nofollow noreferrer">ANTLR3</a> (or <a href="http://antlr.org/... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i check if a value is in codeigniter result_array()<p>I am having a hard time with this.
Although am new here.
I am using Codeigniter, This is the qu... | <p>If you already know the ID you're looking for and the room ID where you want to check, you might benefit from doing this:</p>
<p>(I'm assuming here that the room number is contained in <code>$row->id</code> and the user ID you're looking for is <code>$id</code>)</p>
<pre><code>$this->db->select('user');
$... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nested parameterized routes with ui-router in AngularJS<p>I believe I'm on the right track with these terms, "nested parameterized routes", but haven't found... | <p>I'll assume you have a REST api (based on your example containing <code>/api/v1</code>) which you want to expose/parallel as a UI. I'll assume you want to allow the user to drill down some hierarchical data model.</p>
<hr>
<h2>Choices!</h2>
<p>There are many ways you could organize your states, for this drill-do... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python return error when trying to send a MySQL query that contains MySQL variables<p>I am trying to retrieve data from a MySQL database by sending a MySQL q... | <p>The below code does the job, have tested it. You might have to rectify some indentation issue incase if something pops up.</p>
<pre><code>import pymysql
def run_mysql(query1, query2):
try:
conn = pymysql.connect(host='localhost', user='root', passwd='', db='data_new_es')
cursor = conn.cursor()
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does order matter for these three .htaccess redirects?<p>My goal is to accomplish the following:</p>
<ol>
<li>Redirect the main domain into a subdirectory t... | <p>Redirect www and https before subdirectory:</p>
<pre><code>RewriteEngine On
# Make all addresses https
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://clientdomain.com/$1 [R=301,L]
# Remove www from all addresses
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# Ai... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
build process that generates headers in autotools<p>I'm porting a home-baked <code>makefile</code> setup into the autotools suite. I've run into a problem f... | <p>You're not supposed to write rules which depend on the order things are listed in the Makefile. There's no reason to have this rule at all (I understand it's a direct translation of your old Makefile -- which was also wrong):</p>
<pre><code>all-local: header.csv.h
</code></pre>
<p>because <code>header.csv.h</code... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Setting Correct PATH for Homebrew PHP<p>I used Homebrew to install PHP versions 5.4 and 5.5 on my system. However, it seems that even after installing and li... | <p>You have to put <code>/usr/local/bin</code> at the front of your <code>$PATH</code>. In your <code>~/.bashrc</code> file, add something like</p>
<pre><code>export PATH="$(brew --prefix)/bin:${PATH}"
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C++ operator overloading or redefine?<p>I want to overload + for Point+Point and Point+vector </p>
<pre><code>class Vector
{
public:
double x;
doubl... | <p>The <code>operator+</code> in <code>Point</code> hides the one inherited from <code>PointBase</code>. To make it available, use</p>
<pre><code>class Point:public PointBase
{
public:
using PointBase::operator+; // <-- here
PointBase operator+(const Point &point) const
// rest as before
</code></pre>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SVG Group Translation Issue - Wrong Units?<p>First off I'm a bit new to SVG. I just started working on a gantt-ish style timeline/roadmap for <em>products</e... | <p>The concept that you're missing is that SVG group elements (<code><g></code>) don't have dimensions. (They're not like HTML <code><div></code> elements.) So the transforms defined on a group element simply cascade through to any elements that do have size. Ignoring the axes and labels for simplicity, the... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Glimpse ADO "ExecuteReaderAsync()" does not respond<p>When use Glimpse ADO <code>ExecuteReaderAsync()</code> did not return any response forever:</p>
<pre><... | <p>This:</p>
<pre><code>var result = cmd.ExecuteReaderAsync().Result;
</code></pre>
<p>Is causing your code to <strong>deadlock</strong>. I'm assuming you're running an app which passes around a synchronization context (UI, ASP.NET, Universal App or such). This is why you <a href="http://blog.stephencleary.com/2012/0... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Declare two String arrays, one extending the other in Java<p>I need to have the following declarations:</p>
<pre><code>private static String[] BASE = new St... | <p>If you're using Java 8, it's a simple one-liner:</p>
<p>Given the two arrays of your question like so:</p>
<pre><code>private static String[] BASE = new String[] { "a", "b", "c" };
private static String[] EXTENSION = new String[] { "d", "e", "f" };
</code></pre>
<p>The solution would be:</p>
<pre><code>String[] ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
F# tuple of Option.None evaluates as tuple of null values<p>Can someone tell me why this F# expression:</p>
<pre><code>(Option<int*int>.None, Option&l... | <p>Which part of it is surprising, the fact that it's <code>(null, null)</code> rather than <code>(None, None)</code>? </p>
<p>This is just an artifact of how printing <code>None</code> values works. Try <code>fst it</code> and you'll see that it's still a proper Option value.</p>
<p>You see this because <code>None</... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
retrieving data using stream api<p>I'm using the RavenDB streaming API to retrieve all 355,000 <code>DocsToProcess</code> from my database instance using the... | <p>The <a href="http://ravendb.net/docs/article-page/2.5/csharp/client-api/advanced/unbounded-results" rel="nofollow noreferrer">documentation says explicitly for unbound results</a>:</p>
<blockquote>
<p>Important side notes:</p>
<ul>
<li>the index already exists. Creation of a index won't occur and the query error wit... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I enable HTTPS on a Cloud Run for Anthos on Google Cloud cluster?<p>I recently started fiddling with Cloud Run for Anthos on GoogleCloud and I just ca... | <p>It was actually my fault - when <a href="https://cloud.google.com/run/docs/gke/enabling-cluster-https#secret" rel="nofollow noreferrer">creating the cert/private key secret</a> I provided <code>default</code> for the <code>--namespace</code> value instead of <code>gke-system</code>. So, yeah... it's fixed now.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Which Delphi version should I use?<p>I'm starting a new project, and I want to use Delphi for the desktop GUI. I'll be doing mainly typical client/server stu... | <p>What your question boils down to is whether or not the latest versions create executables that run on XP, and then on your targeted Wine versions. </p>
<p>Mostly that depends on what functions you call. If you call functions that aren't present in XP, then your program won't run on XP. </p>
<p>A plain vanilla VCL ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
mySQL how can I restrict a query by a particular id when using multiple joins<p>I have the following query: </p>
<pre><code>SELECT u.id, name AS user_name, ... | <pre><code>SELECT u.id, name AS user_name, phone, site_name, site_description, monitor_id, user_id, computer_id, site_id, computer_name, computer_description
FROM users AS u
JOIN
(
SELECT s.id, name AS site_name, description AS site_description, computer_id, user_id, computer_id, site_id, computer_name, computer_descri... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bootstrap Mobile scroll down, browser url bar didn't hide<p>I have a website, use bootstrap framework,</p>
<p>My problems are</p>
<ol>
<li>when I scroll do... | <p>Use this plugin. <a href="https://github.com/istvan-ujjmeszaros/bootstrap-autohidingnavbar" rel="nofollow">https://github.com/istvan-ujjmeszaros/bootstrap-autohidingnavbar</a></p>
<p>Add the following code to your page.</p>
<p><code><script>$("div.navbar-fixed-top").autoHidingNavbar();</script></code><... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How Do I Collapse The Margins on my Responsive Site<p>So if you go to this URL:</p>
<p><a href="http://azletconsulting.com/issues/" rel="nofollow">http://az... | <p>you have written margin-left in % in ".issues_nav" which is pushing the elements.
If you want to center the element its better to use.</p>
<p><code>margin-left:auto;margin-right:auto;display:block</code></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React events not firing<p>While working with <code><img></code> tags and getting familiar with React, I found that my <code>onLoad</code> and <code>onE... | <p>I finally figured it out!</p>
<p>In <code>example.jsx</code>, I realized I wasn't <code>require()</code>ing React before using it:</p>
<pre><code>var React = require('react');
var SomeComponent = require('./some-component.jsx');
React.render( ... );
</code></pre>
<p>It seems so obvious in hindsight.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Clarifying the use of Update() and FixedUpdate()? Unity2D<p>So I understand that FixedUpdate should be used for physics operations and such but I am having t... | <p>This is one of the most challenging things to understand without good resources. It is often the cause of most "beginner bugs" in new Unity developer's code.</p>
<h2>Before we start:</h2>
<p>As you may have read in documentation, the following are understood.</p>
<p>Initialization order:</p>
<ol>
<li>Awake... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
setTimeout delayed in firefox<p>I have been trying to create a setTimeout loop in my javascript application, and it works great in all browsers, except firef... | <p>I ended up trying out with a higher polling delay (5000ms), and that worked great in FF. It just seems like 500ms was to fast for the ajax request to process before the next call, in FF.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create an instance of a class if I'm passing its module into the constructor instead of requiring it?<p>To make instances of one ES6 class available i... | <p>It's because you have used <code>function</code> in the <code>app.post()</code> endpoint. You need to use an arrow function in order to make <code>this</code> refer to the <code>AnotherClass</code> instance:</p>
<pre><code> initialize(app){
app.post('/sendSomething', async (req, res) => {
const resp... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Embedded Google map not showing when using more than one Google account<p>I've embedded a Google map that I created using Google account A. </p>
<ul>
<li><s... | <p>So here's the answer: the administrators of the institutional GSuite account had not enabled Google Maps for our accounts. </p>
<p>According to <a href="https://webapps.stackexchange.com/questions/6862/how-do-i-change-my-default-account-with-google-multiple-sign-in">this thread</a> the first Google account you log... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get first and last array element where a ID is the same<p>I want to calculate the time between the first and the last element in an array where they have the... | <p>Use <code>reduce</code> and <code>Object.values</code> will simplify.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var arr = [
{
createdAt: "2020-02-08 17:30:46.36... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multidimensional array element assignment with pointer<p>I have a jagged 2D array of struct and a function that allocate and return <code>mystruct*</code>:</... | <p>If you really want all of the instances of <code>mystruct</code> to each be in a single allocation (i.e. leave <code>foo</code> unchanged) then the array could be:</p>
<pre><code>int main()
{
int rows=3;
int cols=4;
mystruct *(*arr)[cols] = malloc( rows * sizeof *arr );
for(int i=0; i<rows; i++... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typescript says a prop does not exist on a component I wrapped with styled-components<p>I am using semantic-ui-react and along with styled-components. I am w... | <p>Try <code>const CustomTab = styled(Tab)<TabProps></code></p>
<p>You basically defined your props as an object that looks like this: <code>{props: {TabProps}}</code></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass Javascript Object Without Named Function Running during Instantiation<p>If we have a Javascript object structured as follows:</p>
<pre><code>var p = 'p... | <p>You could try</p>
<pre><code>"B": function() {return b(p);}
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to execute performance test in Karate for WebUI Automation?<p>I am developing WebUI automation tests using Karate 0.9.5.RC5 and it is working ... | <p>That's great to hear and thanks for the feedback. To be honest, we have focused on API perf testing and UI functional test automation so far. Maybe you can help us by experimenting and sharing what you find.</p>
<p>You must be aware of the <a href="https://github.com/intuit/karate/tree/master/karate-gatling" rel="n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.