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:
Nuxt Error : Cannot read properties of null (reading 'addEventListener') default.vue and index.vue not rendering<p>I'm using <code>nuxt.js</code> and <code>v... | <p><a href="https://github.com/lusaxweb/vuesax" rel="nofollow noreferrer">Vuesax is not really maintained anymore</a>, latest commit being from 20th September 2020.</p>
<p>Hence why it's not part of the <a href="https://stackoverflow.com/a/70530589/8816585">Nuxt CLI</a> anymore.</p>
<p>If you're new, I recommend starti... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is RandomOverSampler Causing my Model to Overfit?<p>I am attempting to see how well I can classify books according to genre using Tfidf vectorization. I am u... | <p>Oversampling doesn't cause overfitting.</p>
<p>Oversampling before splitting for cross-validation causes <em>data leakage</em>, and the scores you're seeing are indeed not usable as estimates of future performance. Your test folds (probably) contain copies of the same data points included in training folds.</p>
<p>Y... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Couldnot execute the dynamically linked program<p>Hi I tried doing static library and a shared library with the gnu compiler, here is following code</p>
<p>... | <p>Your last line suggests that you do all this on windows. But you seem to have followed a step by step guide for linux or another *nix platform.</p>
<p>On windows, a dynamically linked library is in <code>.dll</code> format (not <code>.so</code>) and there's no versioning convention, so the command to create the sha... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
related tables in mongodb<p>I have two related tables in mongodb.
such as users and students.
Since each student is also a user, I store the userid as a user... | <p>If you will follow that pattern, will be better if you save the userId in the students collection (not a table) as ObjectId instead of string, because that will allow you to do lookups easily.</p>
<p>Another idea can be save the <code>type</code> attribute in users collection to specify what kind of user a user is. ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is this spell-checker like feature which is not linked to an addon?<p>One of my installs of Visual Studio Code has a feature which I do not know how to ... | <p>These <code>abc</code> entries are the <em>typed words</em> in your file. </p>
<p>Since you typed <code>div</code> one line above, when you start typing <code>di</code>, the autocomplete feature will show up the <em>previously typed words</em> that starts with <code>di</code>, <em>snippets</em> that starts with <co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Recursively generating all the possible calculations between set elements in Python<p>I've a trouble understanding why the following recursive code (function... | <p>You are appending too many reuslts in your recursive function. Let me elaborate with your example. Let us just consider counting for the original permutation. The call</p>
<pre><code>count([4, 1, 2, 3])
</code></pre>
<p>should result in the following recursive calls:</p>
<pre><code>count([5, 2, 3]) # +
count([3,... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Export groups and username of a user in Active Directory<p>I am trying to find out the Active Directory groups all our <em>active</em> users are in and want ... | <p>Write-Host only writes text to the console window. It doesn't output anything useful to pipe through to Export-Csv.<br />
Also, unless you add switch <code>-Append</code>, you should set the <code>Export-Csv</code> cmdlet as last line in the code, otherwise you will overwrite it in every iteration.</p>
<p>Try</p>
<p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google App Engine and GCP Load Balancer request inspection<p>I have an API running in Google App Engine and I want to introspect HTTP POST body to reject poo... | <p>If you want to inspect HTTP, then you will need to write a proxy application to do so. Neither the Google Cloud Load Balancer nor App Engine support hooking HTTP requests.</p>
<p>Proxies have the MITM (Man In The Middle) problem in that HTTP traffic is often encrypted. You will not be able to inspect that traffic un... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
unattened authentication using Azure Active Directory- UserCredential not accepting username and password<p>I was following the example given below to accomp... | <p>You should use <code>UserPasswordCredential</code> instead of <code>UserCredential</code> with new version ADAL 3.0</p>
<p><code>UserPasswordCredential</code> is inherited from <code>UserCredential</code> which accepts both username and password.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SignInManager.PasswordSignInAsync vs SignInManager.PasswordSignIn<p>SignInManager offers both these methods, but what is the advantage over the other? Wouldn... | <p><code>SignInManager.PasswordSignInAsync</code> and <code>SignInManager.PasswordSignIn</code> are doing the same thing. The difference is that the first one follows the <strong><a href="https://msdn.microsoft.com/en-us/library/hh873175(v=vs.110).aspx" rel="nofollow noreferrer">TAP (Task based Asynchronous Pattern)</a... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to read messages destructively from RabbitMq queue using SimpleMessageListenerContainer bean<p>I need a help to implement a SimpleMessageListenerContaine... | <p><code>AcknowledgeMode=NONE</code> means the broker acks the message as soon as it's <strong>sent</strong> to the consumer, not when the consumer receives it so your observed behavior makes no sense to me. It is quite unusual to use this ack mode but the message will be gone as soon as it's sent. This is likely a pro... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the Microsoft Office smiley face character really?<p>Windows auto corrects a <code>:)</code> (smiley face emoticon) into the Wingdings symbol for cap... | <p>Edit: Please make sure your Office installation is up to date before trying the steps mentioned below. To update office, in any Office Application (e.g. Word, Excel), Click File->Office Account->Update Options->Update Now. Also, on Windows 7 systems, the below update should be installed as recommended by Microsoft.:... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I structure multiple 2D arrays of test data into a properties file and read them for my tests?<p>I need to save all the test data into a <code>proper... | <p>Say you have <code>src/test/resources/test_data.json</code> file which looks like</p>
<pre class="lang-json prettyprint-override"><code>{
"infoOnCars": [
["Mercedes as key", "Value with any special char ~!@#$%^&*()_'\\\",./<>?+"],
["Jaguar", "<... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cometchat doesn't awake the app on call or message received<p>I have implemented Cometchat SDK into my app, and i also followed all the requirements going th... | <p>It seems that you have not added the Firebase Legacy key in CometChat Admin Panel. Please follow the below steps:</p>
<ol>
<li>Get the “Legacy Server Key” to configure Firebase push notification service.</li>
<li>Add the Legacy Server Key as Firebase server key in CometChat Admin Panel under Settings -> Mobile tab<... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Meteor: single post view, via id and flow router is not parsing any data from the collection<p>Im trying to open a single record from my #each loop of items ... | <p>You need to actually use your template helper that is returning the data context:</p>
<pre><code><template name="collectionSingle">
<h1>{{title}}</h1>
<h1>This is a test</h1>
{{#with articles}}
<img src="{{thumbnail}}" alt="" />
{{/with}}
</template>
</code></pre>
<p>Sin... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update UI bootstrap cannot add new suggestions to Typeahead<p>I need to update the typeahead suggestions on the fly. The typeahead does not reflect the chang... | <p>A couple of things</p>
<ol>
<li><p>you are pushing a string into the array, you should push an object with a name property instead</p></li>
<li><p>you have a limit filter on the ng-repeat limiting your visible suggestions, you may want to remove it, or at least icrease it</p></li>
</ol>
<p>instead of</p>
<pre><co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Selected option not persisting - React<p>Have a simple drop down list being populated from an axios request. It is working outside of the fact that the actua... | <p>You do not explicitly mark as selected any <code>option</code>, and since you do <code>key={uuidv4()}</code> for each one, it means than on each re-render the options are considered different that then previous render, and so do not keep their default highlight.</p>
<p>You can provide a <code>value</code> prop to th... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing position of embeded youtube video in CSS<p>This is my first time posting here and don't really know much about web coding or CSS. I'm a CGI artist w... | <p>In the iframe, add: </p>
<pre><code><iframe style='display: block; margin: 0 auto;'>
</code></pre>
<p>And that should work.</p>
<p>I tried it on JSFiddle:
<a href="https://codepen.io/Rohittt/pen/eQwLYe" rel="nofollow noreferrer">https://codepen.io/Rohittt/pen/eQwLYe</a></p>
<p>you can just copy the code f... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use layout responsive with Nextjs and tailwind?<p>I am trying to create a card with image on the left and the card content on the right using flex in ... | <p>Use this code to make your card. See in full page.</p>
<p>To use nextJs <code>Image</code> , then just try to wrap <code><Image></code> with <code><div></code> having same properties of <code><img></code> in the below code and remove <code>height</code> and <code>width</code> from <code><Image&g... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I return an existing instance from factory_girl create?<p>I have two factories:</p>
<pre><code>factory :foo
factory :bar
</code></pre>
<p>A Foo has_... | <p>This seems to work, although I haven't tested it extensively:</p>
<pre><code>factory :bar do
initialize_with { create(:foo).bar }
end
</code></pre>
<p>Note that factory_girl calls <code>save!</code> on the instance when you <code>create(:bar)</code>, but in this case it does nothing because the <code>Bar</code> ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do i make the header normal size. CSS GRID<p>How would I make the header full width? And I would like the content class to the right, and the skills clas... | <p>Don't know if I understand your question correctly but if you add <code>grid-column: 1 / span 2;</code>to your header class it will give you full width.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need guidance in using REGEXP_REPLACE<p>When I run the below SQL, I'm getting results mentioned below:</p>
<pre><code>SELECT distinct id,date,col_t FROM tab... | <p>Try using Replace instead:
<a href="https://docs.snowflake.com/en/sql-reference/functions/replace.html" rel="nofollow noreferrer">https://docs.snowflake.com/en/sql-reference/functions/replace.html</a></p>
<pre><code>SELECT distinct id,
date,
CASE
WHEN col_t = 'true' then REPLACE(col_t, ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Store email body in table using Laravel 5.3 Mailable<p>I want to store the email body in my communications table. My controller: </p>
<pre><code>Mail::to($u... | <p>I found a solution, hopefully it can help other people.</p>
<pre><code>$body = View::make('emails.welcome_email')
->with('subscription', $this->subscription)
->with('template', $this->template)
->render();
</code></pre>
<p>I rendered the view and saved it in the body variable... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the right way to insert objects with several nested associations in sequelize?<p>I'm trying to create an object with several nested associations usin... | <p>I discovered that the error was elsewhere. The associations I was trying to create already had an "id" (that was being used temporarily in the client side) when it should be generated by postgres through sequelize (with DEFAULT) and was resulting in this error.</p>
<p>I don't know why this particular error: <code>[... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Move scrollbar button out of track<p>does anybody know any option to move the scrollbar buttons out of the track? I'm trying translate() but it doesn't work.... | <p>I've just created new scroll up & down buttons with jquery</p>
<pre><code>// Scroll up & down for thumb product pictures
$('.scroll-up-button').on('click', function() {
var y = $('.thumb-container-parent').scrollTop();
$('.thumb-container-parent').scrollTop(y - 100); // up 100px
});
$('.scroll-down-... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Handling Xpaths and Submitting Webforms using Requests and lxml<p>Hello I am currently working on a program that will submit a phone number to a reverse phon... | <p>Your approach is missing quite a lot of necessary data and steps, when I first looked I saw the page was using a lot of javascript but monitoring the requests I saw you can actually get it using requests, first we need to post to:</p>
<p><em><code>http://www.reversephonelookup.com/results.php</code></em>, with the ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rest API plugin wordpress disable default routes<p>Hello guy's Please help me i install REST API plugin WP and i adding some specific route and any things it... | <p>You can use this on your plugin for remove all default route.</p>
<pre><code>remove_action( 'rest_api_init', 'create_initial_rest_routes', 0 );
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Airflow fernet key does not mask credentials<p>I am using Apache Airflow 2.2.3 with Python 3.9 and run everything in docker containers.
When I add connection... | <p>I think you make wrong assumptions about "encryption" and "security". The assumptions that you can prevent user who have access to running software (which airflow CLI gives you) are unrealistic and is not really "physically achievable".</p>
<ol>
<li><p>Fernet key is used to encrypt data... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Download multiple excel files from database in Python<p>I want to download all the excel files of 202 countries from this website:</p>
<ol>
<li>Go to this l... | <p>You can use the request package to download the file (right click the button to see the link)</p>
<pre><code>import requests
url =('http://investmentpolicyhub.unctad.org/Download/ExportCountryBits/5?'
'sortColumn=InvolvedPartiesName&sortOrder=1')
res = requests.get(url)
res.raise_for_status()
# write t... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to apply JS/ jQuery after element is visible in a shinyApp?<p>First, as mentioned in that <a href="https://stackoverflow.com/a/49919403/9610309">answer</... | <pre><code>library(shiny)
js <- "
$(document).ready(function(){
$('#btn3').on('mouseover', function(){
$(this).css({'color': '#020202', 'background-color': '#ffff00'});
}).on('mouseout', function() {
$(this).css({'color': '#f2f2f2', 'background-color': '#008cba'});
});
});
"
ui <- fluid... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scala class final def this() declares no public no-argument constructor<p>Trying to build a generic Scala 2.11 Jackson serializer that uses Jackson Smile 2.6... | <p>Because <code>JacksonGenericSerializer</code> type parameter has a context bound (i.e. <code>[T: Manifest]</code>) the auxiliary "no-argument" constructor actually takes an argument: <code>Manifest[T]</code></p>
<p>You can confirm this with javap:</p>
<pre><code>$ javap JacksonGenericSerializer.class
Compiled fro... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I add a path to the CSV files created?<p>Im splitting a CSV file based on column "ColumnName". How can I make all the CSV files created sav... | <p><code>pandas.DataFrame.to_csv()</code> takes a string path as input to write to said path.</p>
<p>With your current code <code>group.to_csv('{ColumnName}.csv', index=False)</code>, <code>{ColumnName}</code> is being interpreted as a normal string. If you wanted variable substition in this case Python has many method... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Database representation of a timeline<p>Say I have a timeline which displays 2 kinds of events: </p>
<ol>
<li>A patient has visited a clinic. Such an event... | <p>I would create a table called <code>events</code> which contains four columns:</p>
<p><strong>events</strong></p>
<pre><code>patient_id int
id int
event_date timestamp
event_type int
</code></pre>
<p>Each entry would represent one patient event at one point in time. It could be a clinic visit or an upload of a p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to prevent commonsChunkPlugin from injecting the chunks into html<p>I am using preload-webpack-plugin along with the commonschunkplugin for webpack. My w... | <p>The one that injects those scripts to the HTML is the HTMLWebpackPlugin, you have 2 options: </p>
<ol>
<li>Use <a href="https://github.com/jantimon/html-webpack-plugin#filtering-chunks" rel="nofollow noreferrer"><code>excludeChunks</code></a> option to specify which chunks to ignore.</li>
<li>Use <a href="https://g... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
unique column value per row<p>I find it best to use an example, so here we go:</p>
<p>Say I have a table with chores and a table with a weekly schedule like... | <p>Try django unique-together in model meta option.
<a href="https://docs.djangoproject.com/en/1.11/ref/models/options/#unique-together" rel="nofollow noreferrer">https://docs.djangoproject.com/en/1.11/ref/models/options/#unique-together</a></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use GeoPandas Spatial Index with lines?<p>I am trying to find the nearest line to a bunch of points (about 24 billion points, 4 million lines). The po... | <p>Your question is prefaced with the context that you're trying to perform a nearest neighbor query, but your question itself asks about what's going on in that geopandas intersection code block. I'll try to address your question rather than its preface, as they seem to be at odds. It looks like your intersection code... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# - Reading text file, comparing the dictionary data and finding frequency of each<p>I have a text file called <strong>data.txt</strong> which contains data... | <p>Why not just count how many times it occurs?</p>
<p>First get the unique records:</p>
<pre><code>for (int i = 0; i < arrayofLine.Length; i++)
{
//Your original logic here
}
//This is an additional code:
Frequency = Frequency.GroupBy(s => s.Value)
.Select(g => g.First())... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
limiting the list and scroll for load more. react native<p>hi im using react native with sagas and redux, my problem is this one
my code does print a big lis... | <p>i don't have time now to give a full answer sorry</p>
<p>you have to use <code>onEndReached</code> flatlist props to load some data each time your are in the end of the list (list facebook app do for example)
<a href="https://facebook.github.io/react-native/docs/flatlist#onendreached" rel="nofollow noreferrer">htt... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display info from text file based on name submited in a form?<p>I’m not sure how to accomplish this.</p>
<p>In the index page I have a form (as seen below) w... | <p>Instead of</p>
<pre class="lang-php prettyprint-override"><code>$file = fopen("<?php echo $_POST["potus"]; ?>.txt", "r") or exit("unable to open file!");
</code></pre>
<p>try</p>
<pre class="lang-php prettyprint-override"><code>$file = fopen($_POST["potus"] . &... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Files changes not reflected in Docker image after rebuild<p>I'm trying to set up two Docker images for my PHP web application (php-fcm) reversed proxied by N... | <p>The 'volumes_from' option mounts volumes from one container to another. The important word there is container, not image. So when you rebuild an image, the previous container is still running. If you stop and restart that container, or even just stop it, the other containers are still using those old mount points. I... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate the number of hexes between two hexes on a hex grid?<p><a href="https://i.stack.imgur.com/QMsaS.png" rel="nofollow noreferrer"><img src="https://i.... | <p>Switched from my x,y to q,r,s coordinates by</p>
<pre><code>q=x
r=y-(x+(ISODD(x)))/2
s=-r-q
</code></pre>
<p>then used this formula:</p>
<pre><code>=max(abs(q1-q2) + abs(r1-r2) + abs(s1-s2)) / 2
</code></pre>
<p>hopefully this helps someone using an even-q grid</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Timezone conversion with pyspark from timestamp and country<p>I'm trying to convert UTC date to date with local timezone (using the country) with PySpark.
I ... | <p>Use <code>tzinfo</code> instance and not <code>string</code> as timezone.</p>
<pre><code>>>> timezone_name = pytz.country_timezones(country)[0]
>>> timezone_name
'Europe/Paris'
>>> timezone = pytz.timezone(timezone_name)
>>> timezone
<DstTzInfo 'Europe/Paris' LMT+0:09:00 STD&g... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rewriting multiple git repos into one<p>I have three unrelated repositories which I'd like to rewrite into a single repository, by moving each repo to a diff... | <p><strong>Update</strong> - Added a little more about why rebasing through merges can be trouble, plus some other notes based on comments</p>
<hr>
<p>My guess would be that the individual repos' histories are not strictly linear (i.e. there were branch and merge points)? If so, <code>rebase</code> can be expected t... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Printing Columns of two files if content of first column in both file matches in Unix<p>I have two files as below </p>
<pre><code>file1
name|address office... | <pre><code>$ cat tst.awk
BEGIN { FS=OFS="|" }
{
name = (FNR>1 ? toupper($1) : $1)
if (!seen[name]++) {
names[++numNames] = name
vals[name,1] = vals[name,2] = "NA"
}
vals[name,ARGIND] = $2
}
END {
for (nameNr=1; nameNr<=numNames; nameNr++) {
name = names[nameNr]
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Difference between Ant Design form.setFieldsValue and initialValues prop<p>As the title states. What is the difference between the two?</p>
<p>1.</p>
<pre cl... | <p><strong>setFieldValues</strong> is good for on-demand setting of values. For example, if there was a "Default" button on your form that sets all the values back to some default. The problem with using setFieldValues on form, is that if you are passing props down that change or a function prop, the setFiel... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Neo4j Client Match List Of Id's<p>I'm trying to create a query the finds records who id is in a list, so I don't have query the database multiple times. My q... | <p>Try it (Using IN instead of CONTAINS):</p>
<pre><code>public static IEnumerable<CareTask> GetByReferenceIds(List<string> ids)
{
return DBUtils.DBService.Cypher
.Match("(node:Task)")
.Where("node.Id IN {ids}")
.WithParam("ids", ids)
.Return(node => node.As<Task&g... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not able to show the right list in SQL<p>i have been messing around with MySQL queries for a few days and i cant seem to get a solution.</p>
<p>i'm making a... | <p>Really close, you're just over complicating it a little. Instead of those <code>IF</code> statements, add a filter to the user you want to see on your join. You'll also want an <code>ORDER BY</code> to guarantee your results come back as expected:</p>
<pre><code>SELECT s.users_email,
b.*,
s.done
FRO... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Difference between dashDB for Analytics and dashDB for Transactions?<p>DashDB has plans that are listed as "transactional" or "for transactions". Under the h... | <p><strong>dashDB for Analytics:</strong> Tuned for analytics (large, complex queries, sometimes called OLAP). In particular, tables are column-organized by default. (If you run a <code>CREATE TABLE</code> statement, by default it is <code>ORGANIZE BY COLUMN</code>.) </p>
<ul>
<li>Limitation: Some things, like CLOB da... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
terraform azure insufficient blocks<p>Here is my terraform plan</p>
<pre><code>terraform {
required_providers {
azure = {
source = &q... | <p>The name of the provider in the <code>required_providers</code> block is wrong, you have set it to <code>azure</code> while it should be <code>azurerm</code>. Example of how to configure the provider:</p>
<pre><code>terraform {
required_providers {
azurerm = { # <--- Note that it is azurerm
source = &... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to detect if URL() constructor is supported by browsers?<p>I want to detect if a browser support the URL() constructor.</p>
<p>I want to use it like thi... | <p>Assuming the check needs to be done in JavaScript -</p>
<p>Use <code>if(typeof URL === "function")</code></p>
<p>If true URL is supported</p>
<p>Sample 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-js ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Align type declarations vertically in WebStorm<p>How do you force WebStorm to align type declaration values vertically when running "Reformat Code"... | <p>Not currently possible, please follow <a href="https://youtrack.jetbrains.com/issue/WEB-43078" rel="nofollow noreferrer">WEB-43078</a> and linked tickets for updates</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL : How to I, join this table?<p>I have table like this, and i want to output the result like output table, can anyone tell me how to do it, in MySQL</p>... | <p>You can use left join like so :</p>
<pre><code>SELECT tb_session.SESSION AS SESSION, tb_class.CLASS AS CLASS from tb_schedul LEFT JOIN tb_session ON tb_schedule.ID_SESSION = tb_session.ID LEFT JOIN tb_schedul.ID_CLASS = tb_class.ID
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
logstash grok parse error date format<p>I am quite new to logstash so this may be a simple error but I am not able to find where my error is. I have installe... | <p>Your grok pattern doesn't match your data. In the message it's showing, there are no [] around the date, but your pattern assumes that there are.</p>
<p>You can paste your log line and pattern in at <a href="https://grokdebug.herokuapp.com/" rel="nofollow noreferrer">https://grokdebug.herokuapp.com/</a> and play w... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RethinkDB on success Update returns empty object<p>I have wrote an API usin <code>NodeJS</code> + <code>ExpressJS</code> + <code>RethinkDB</code>. But I got ... | <p>You are treating the response as a cursor:</p>
<pre><code>.then(cursor => cursor.toArray())
</code></pre>
<p>But in reality, the response should be a plain object.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
mySQL - Only display most common & all other column combinations show 0<p>I am attempting to compute the highest number of crashes in a single race that any ... | <p>Your question has multiple parts. If you want <code>0</code> values, then you need an outer join or correlated subquery. I imagine you have a table with all the races, but a <code>select distinct</code> on the <code>entries</code> table also works.</p>
<p>Then if you want the most crashes <em>per car</em> you nee... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tensorflow: Visualizing trained weights for linear classifier on MNIST dataset<p>I have trained a linear classifier on the MNIST dataset with 92% accuracy. T... | <p>You shouldn't call <code>tf.sigmoid</code> on the output of your net. <code>softmax_cross_entropy_with_logits</code> assumes your inputs are logits, i.e. unconstrained real numbers. Using</p>
<pre><code>o = tf.matmul(X, w)+b
</code></pre>
<p>increases your accuracy to 92.8%.</p>
<p>With this modification, your se... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to set default values/placeholders for depended select lists?<p>I have four depended select lists and I want to give all the select lists a default value... | <p>instead of <code>optionsFields= "";</code> use <code>optionsFields= "<option value='0'> Select... </option>"</code>. it's not working because you're probably setting your default value in HTML and overwriting it in your change function.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to initialise a three dimensional ruby array<p>I want to initialise a three dimensional ruby array. For a two-dimensional array, I can do</p>
<pre><code... | <p>The issue is that if you pass the value as an argument, you will get an array where each value refers to that same object. You do exactly that with:</p>
<pre><code>Array.new(5, Array.new(6, 0))
</code></pre>
<hr>
<p>You can use <code>Array#*</code>, i.e array multiplication instead:</p>
<pre><code>[[[0] * 6] * 5... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
service account for gitlab container registry<p>We would like to use our private gitlab container registry in AWS ECS. When accessing the registry, we get 40... | <p>You can create a user within your organisation (gitlabci@domain.abc) and create a Personal Access Token for that user. It took me some time to figure out you need to replace gitlab-ci-token with that users email adres in order to successfully login.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Requiring "RMagick" is deprecated. Use "rmagick" instead.learner<p>I'm currently trying to deploy to Heroku and after a few tries, I'm getting an error >> <c... | <p>I think it's because your CarrierWave version is locked to a version your Gemfile. The issue was fixed with <a href="https://github.com/carrierwaveuploader/carrierwave/pull/1788" rel="nofollow">CarrierWave Backport</a></p>
<p>What happens when you remove the version of CarrierWave and delete your <code>Gemfile.lock... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to detect the number of grouped data based on their frequency<p>I have a vector of numbers</p>
<pre><code> x <- c(1,1,1,3,3,3,2,2,1,2,1,2,55,56,55,54,... | <p>This uses <code>hist()</code>, but does not generate the plot:</p>
<pre class="lang-r prettyprint-override"><code>x <- c(1,1,1,3,3,3,2,2,1,2,1,2,55,
56,55,54,55,54,53,55,56,55,
7,7,9,9,8,8,11,110,111,11,
112,113,111,112,33)
h <- hist(x, plot=FALSE)
newx <- cut(x, breaks=h$breaks, includ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does shell map restrict the key format?<pre><code> a=()
a["/dev"]=3
echo ${a["/dev"]}
</code></pre>
<p>Run the above code will get error:</p>
<pre><code... | <p>You must declare the array associative first:</p>
<pre><code>declare -A a
a["/dev"]=3
echo ${a["/dev"]}
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Postgresql SQL SELECT oldest item but debounced<p>I have a table that look like:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th... | <p>You can get the difference with the next row (ordered by <code>Created</code>) using <code>lead</code>, then check for the first row for which the following row comes after a full hour:</p>
<pre><code>select id, Value, Created from
(select id, Value, Created,
EXTRACT(EPOCH FROM lead(Created) over(order by Created) -... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
can't get my program to return to main loop<p>I can't get the bottom part of this code to work. I want the user to be able to type "back" and return to the m... | <p>You may want to change <code>writetxtfile()</code> to:</p>
<pre><code>def writetxtfile():
try:
openfile = input("Enter the .txt file name, or type 'back' to go back to menu: ")
if openfile == "back":
return
else:
with open(openfile, 'r') as rf:
f_c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ECS Fargate - Can a container access its own Public IP address<p>I am deploying JVM applications in Fargate. I need to be able to determine the public IP add... | <p>The easiest way would be to use an external service, such as <code>curl ifconfig.me</code>. If you don't like doing that you can get <code>TaskARN</code> from the tesk metadata. Once you have the arn, you can use AWS SDK/CLI to get ENI id of your task using <code>describe-tasks</code> api call, and then query the EN... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Keycloak language support<p>I'm using keycloak 2.5.1 to securise my web application, and it works really fine.<br>
It currently supports 4 languages : englis... | <p>I couldn't enable Dutch (nl) either in Keycloak version 3.2.1 (where it is supported out of the box), but that was solved by upgrading to the latest version (3.4.0).</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kubernetes on GCP - Getting message "Does not have minimum availability"<p>I deployed the images of microservices currency-conversion and currency-exchange o... | <p>Many reasons could be there behind failure:</p>
<ul>
<li>Low Resources so POD are not starting or pending</li>
<li>Liveness or Readiness failing for PODs</li>
<li>Configmap or secret which POD require to start is not available</li>
</ul>
<p>You can describe the POD or check the logs of POD to debug more issue</p>
<p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Avoid using shell commands in perl script<p>I have this line in my perl script : </p>
<pre><code>"$retrieveIps --fields FileserverIPS WHERE Fileserver LIKE ... | <p>You can use the <a href="http://perldoc.perl.org/perlfunc.html#gethostbyname-NAME" rel="nofollow noreferrer">gethostbyname</a> function to get the IP address and <a href="http://p3rl.org/Socket" rel="nofollow noreferrer">Socket</a>::inet_ntoa to unpack it:</p>
<pre><code>use Socket;
my @hostnames
= `$retrieveIp... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Frequency Response Scipy.signal<p>I'm learning digital signal processing to implement filters and am using python to easily implement a test ideas. So I just... | <p>The SciPy generated frequency response is correct. In any case, I wouldn't trust the book's figure which appears to have been drawn by hand.</p>
<p>If you want to find the frequency response "manually", this can be simply done by defining a function returning the original Z-transform and evaluating it on the unit c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
nestjs process.env.variable is undefined in my auth.module.ts<p>im trying to test jwt auth in nestjs.</p>
<p>when i called jwtService.sign();
it shows error ... | <p>at the time that <code>process.env.JWT_SECRET_KEY</code> is read, the .env might not be parsed yet. Thus, don't rely on <code>process.env.</code> if you're using some module like <code>@nestjs/config</code>. Use the async version of <code>JwtModule.register</code> instead and inject the <code>ConfigService</code>. S... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Counting in subquery SELECT statement with WHERE and GroupBy<p>I am developing a webApp and I send filters towards my database in backend. I use mySql as a d... | <p>Aggregate functions like <code>count</code> take only non-null-values into account.</p>
<p>Thus, an expression like <code>count(status)</code> will count all non-null-values of attribute <code>status</code> in the respective group:</p>
<pre><code>select formName, language, count(mailid) as totalsent, count(`status... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
background-image isn't applying fully<p>I want that my background-image applies fully to the table borders, but it doesn't really work, it only applies to th... | <p>You just want a solid background, so remove the background image properties and just use <code>background-color: blue;</code> or <code>background: blue;</code> for short.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snipp... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How long can a Mailkit SMTPClient connection stay open<p>I use mailkit for my ASP.Net Core application and create a SMTPClient object which I then connect to... | <p>To keep a client connection to a server alive (whether it be using the ImapClient, Pop3Client, or the SmtpClient), you can use the NoOp() or NoOpAsync() methods to send a command to the server that does "nothing" but to let the server know that the client is still there and wants the connection to remain a... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
fatal: repository ....... not found<p>I have added remote repo link with this command -</p>
<pre><code>git remote add origin https://github.com/ni8mr/Local-... | <p><code>https://github.com/ni8mr/Local-Weather-App/tree/gh-pages</code></p>
<p>is not a git-repository, it is just the webview of one of your branches. The repository is at</p>
<p><code>https://github.com/ni8mr/Local-Weather-App.git</code></p>
<p>Instead of just taking the link out of the browsers address bar, you sho... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create pairwise difference of rolling window of two dataframes<p>I have a time-series dataframe <code>df</code> with zeros and ones and I aim to compare the ... | <p>If you can install <a href="https://numba.pydata.org" rel="nofollow noreferrer"><code>numba</code></a>, here is one solution with <code>.rolling</code> using the <code>'table'</code> method that allows you to roll over all columns at once:</p>
<pre><code>import numpy as np
recent_array = df_recent.to_numpy()
def pa... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to annotate Django view's methods?<p>I'd like to use Python <a href="https://www.python.org/dev/peps/pep-0484/" rel="noreferrer">type hints</a> in my Dja... | <p>There exists this repository which may interest you: <a href="https://github.com/machinalis/mypy-django" rel="noreferrer">https://github.com/machinalis/mypy-django</a> <br>
which will allow you to use annotations like so:</p>
<pre><code>def get(self, request: HttpRequest, question_id: str) -> HttpResponse:
</cod... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I create a DataFrame containing a column where rows are greater than a number?<p>I have a DataFrame with these columns:</p>
<pre><code>ID ... | <p>You can use one of many available <a href="http://pandas.pydata.org/pandas-docs/stable/indexing.html" rel="nofollow noreferrer">indexers</a>. I would recommend <code>.ix</code>, because it seems to be <a href="https://stackoverflow.com/a/37761363/5741205">faster</a>:</p>
<pre><code>df_greater_10 = df.ix[df.ints >... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Smooth Page Indicator<p>Even though I added the Smooth Page Indicator, it doesn't show up in the emulator. I am also getting a few debug errors.
e.g. 'packag... | <p>I didn't had this error when I test it, but I made some changes:</p>
<ol>
<li>I've changed the dots color because it was white on a white background which makes them invisible.</li>
<li>add <code>Expanded</code> instead of <code>SizedBox</code> for testing purposes.</li>
<li>made <code>axisDirection</code> horizonta... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create new lists looping through two lists<p>Using two different lists <code>A</code> and <code>B</code> trying to create new lists as follows:</p>
<ol>
<li>... | <p>Fancy one-liner:</p>
<pre><code>C = [list(map(lambda x: x * b, A)) for b in B]
</code></pre>
<p>Translated to loops:</p>
<pre><code>C = []
for b in B:
new_list = []
for a in A:
new_list.append(b * a)
C.append(new_list)
</code></pre>
<p>Output:</p>
<pre><code>[
[3, 6, 9, 12, 15],
[4, 8, 12, 16... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Poylmorphism, overridden method used in constructor - C++<p>I am trying to understand if my mistake comes from a design problem or a code error. My search p... | <p>It's not impossible, but it may not do what you want.</p>
<p>Recall that for <code>BaseC</code>, the construction order is <code>BaseA</code>, <code>BaseB</code>, <code>BaseC</code>.</p>
<p>While <code>BaseB</code> is being constructed (constructor executing), there is no such object as a <code>BaseC</code>, even ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Neatly linking dependency tuple references specified by variadic class args<p>Given the following class structure in which we possess a number of different c... | <p>So focusing on the reference initialization, you might do something like:</p>
<pre><code>template <typename T> struct Tag{};
template <typename... Ts, typename Tuple>
std::tuple<L<Ts>&...> make_ref_tuple(Tag<std::tuple<L<Ts>&...>>, Tuple& tuple)
{
return {st... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I still access my s3 object when i have enabled encryption on it, but the encryption has not completed?<p>Given:</p>
<ul>
<li>Bucket "alpha", no default... | <p>Encrypting an object involves copying an object on top of itself, with the new copy being encrypted. This is an atomic operation, so the unencrypted version of the object remains in place and accessible until the copy operation is complete.</p>
<p>This also happens much more quickly than the question implies.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prevent users to access data of another user when typing the slug in the url<p>If user 1 creat this ticket :
mywebsite/manager/tickets/ticket-from-user-1/</p... | <p>I recently implemented this functionality in a project. It can be done by using automatically generated uuid's. Django has <a href="https://docs.djangoproject.com/en/1.9/ref/models/fields/#uuidfield" rel="nofollow">a built-in model field</a> for this, or you can use a slug field and give it a default value. Here is ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Gremlin query to find the count of a label for all the nodes<p><strong>Sample query</strong><br>
The following query returns me the count of a label say
"As... | <p>There's a few ways you could do it. It's maybe a little weird, but you could use <code>group()</code></p>
<pre><code>g.V().
group().
by().
by(repeat(out()).emit().hasLabel('Asset').count())
</code></pre>
<p>or you could do it with <code>select()</code> and then you don't build a big <code>Map</code> in m... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Navbar size increases on small screen<p>I have a header and is overlapped on navbar. I liked it that way.
but problem is, when I go on site from smaller devi... | <p>Because your button is outside the navigation header like this:</p>
<pre><code><nav>
<div class="navbar-header">
<div class="navbar-brand"><div>
</div>
<button></button>
</nav>
</code></pre>
<p>Change it to:</p>
<pre><code><nav>
<div... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Intel x86_64 assembly compare signed double precision floats<p>I've got a problem according to subject.</p>
<p>In xmm0 register I have a value, e.g. <code>-... | <p>Intel's manual documents how <a href="http://www.felixcloutier.com/x86/COMISD.html" rel="nofollow noreferrer"><code>COMISD</code></a> sets flags.</p>
<p>First, check for unordered with a <code>jp</code> (if you want your code to work properly for NaN inputs).</p>
<p>Then you can use any of the <code>ja</code> / <c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
vue route mapping with redirects<p>I hope this is a quick one.
I have this mapping that looks like this:</p>
<pre class="lang-js prettyprint-override"><code>... | <p>I did it like this:</p>
<pre><code>const createChildRoutes = (children) => {
return children?.map((child) => {
const childRoute = {
path: child.path,
name: child.name,
meta: child.meta,
alias: child.alias,
redirect: child.redirect,
};
if (child.name) {
return ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get user attributes AWS Amplify iOS SDK<p>I'm building an iOS app with the SDK Amplify so I have my users registered on AWS.</p>
<p>I already have my sign i... | <p>Hi YoanGJ and future guests,</p>
<p>Based on your comment you were looking for some sample code. </p>
<pre><code> AWSMobileClient.sharedInstance().getUserAttributes { (attributes, error) in
if let attributes = attributes {
XCTAssertTrue(attributes.count == 3, "Expected 3 attribute... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Oracle: is it possible to calculate actual storage size used by the data in a table?<p>I want to be able to report on the actual storage volume being used by... | <p>You probably want something based on the <a href="https://docs.oracle.com/database/121/ARPLS/d_space.htm#ARPLS68113" rel="nofollow noreferrer"><code>dbms_space.space_usage</code> procedure</a>. This will tell you how many blocks are 0-25% full, 25-50% full, 50-75% full, and 75-100% full, and completely full. I use... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GatsbyJs gaphql query folder/post.md in graphiql interface<p>I am using the Gatsby develop graphiql sandbox to test some queries, I have a working query that... | <p><code>gatsby-transformer-remark</code> is a <strong>transformer plugin</strong>, which means that its only job is to parse and transform markdown.</p>
<p>Before it can do this, you need to tell it where to find the markdown files. This is where <strong>source plugins</strong> come in.</p>
<p>In your case, you are ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Restsharp and Xamarin Cycle 7 not connecting<p>Since updating to Xamarin ios cycle 7, whenever I try to connect to my server the header which i receive is al... | <p>This is all down to ios wanting to make sure that we are running over a secure connection, for my dev environment, i am not working over an HTTPS connection, therefore I have had to add in some bits and pieces into the info.plist. For more information please read up here: </p>
<p><a href="https://developer.xamarin... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
grep string where part matches condition 1 but another part does not match condition 2<p>in a file like: </p>
<pre><code>oneA twoA threeA
oneB twoB threeB
... | <pre><code>#grep line containing two and exclude which has twoA
grep two filename.txt |grep -v twoA
oneB twoB threeB
oneA twoD threeA
</code></pre>
<p>Using Awk:</p>
<pre><code> awk '!/twoA/ && /two/' filename.txt
oneB twoB threeB
oneA twoD threeA
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQLAlchemy use calculated column<p>I want some code like below:</p>
<pre><code>distance = (Robot.pose_x)**2 + (Robot.pose_y)**2
robot_filtered = session.quer... | <p>Using <code>sqlalchemy.func</code> will likely do the job, I've never done this so you'll have to test the exact syntax, but it should be something like this:</p>
<pre><code>distance = func.pow(Robot.pose_x, 2) + func.pow(Robot.pose_y, 2)
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rubocop: Assignment Branch Condition size for method is too high. How can I reduce the method?<p>This block of code:</p>
<pre><code> def set_conversation
... | <p>Here's a start, which has the added benefit of setting <code>@conversation</code> to a conversation object, rather than a boolean value:</p>
<pre><code>def set_conversation
@conversation = Conversation.find(params[:conversation_id])
user_ids = @conversation.match.tap { |m| [m.end_target.user_id, m.origin_target... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
rxjs - stop observable with a subject subscription<p>I created an Observable generating potentially infinite amount of data (e.g. a timer). This data is acce... | <p>Fortunately, there is a dedicated and elegant way to solve this in RxJS.</p>
<p>Your requirement is to have</p>
<blockquote>
<p>multiple observers [...] receive the same values</p>
</blockquote>
<p>That's called a <em>multicast</em> observable and there are certain <em>operators</em> that are used to create one... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
fetch data into labels asp.net<p>here is my history page:</p>
<p><a href="https://i.stack.imgur.com/mBWPj.jpg" rel="nofollow noreferrer"><img src="https://i... | <pre><code>str = "select Id from CustomerDetails Where CustomerName = '"+Session["New"].ToString()+"'";
</code></pre>
<p>This query will return many <code>id</code> . So when you wrote <code>Label3.Text = reader["Id"].ToString()</code>, It will return first row <code>(13)</code></p>
<p>You first read all <code>id</... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Input/output error when writing to google cloud storage bucket<p>I created a gcs bucket on <a href="https://console.cloud.google.com/storage/" rel="nofollow"... | <p>It appears from the <code>--foreground --debug_fuse</code> output that you're using credentials that aren't allowed to write to the bucket. They are probably read-only (<code>StatObject</code> didn't return a 403, and gcsfuse checks at startup that it can list the bucket).</p>
<p>Try giving the <a href="https://git... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
asp.net core bootstrap two column using post<p>I have a very simple form I am using for test/learning.
I let VS create it using Scaffold New Razor Page.</p>
... | <p>what is the column style? it should be <code>col</code> or <code>col-<modifier></code> (sm, md, lg) or you can <code>col-<modifier>-<number></code> e.g. <code>col-md-4</code>, the max the number can be is 12</p>
<p>Keep in mind that <code>asp.net core</code> templates at present doesn't reference ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Different C++ fork() behavior between CentOS 7.5 & RockyLinux 8.4, Ubunu 20.04<p>I'm working with some legacy code. It works fine on a CentOS 7 system. The a... | <p>THis loop</p>
<pre><code> for(uint8_t i = 0; i < stringArgs.size(); i++) {
std::string tmp(stringArgs[i]);
args[i] = const_cast<char*>(tmp.c_str());
std::cout << "\n\t"<<args[i]<<"'\n\n";
}
</code></pre>
<p>is creating an array of pointers ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Type Inference In swift<p>I'm trying to add a mutating method through Array extension. I'm creating a 2D array to do some calculations. But strangely Xcode i... | <p>When omit the type for the init by only writing <code>.init</code></p>
<pre><code>var bucket : [[Int]] = .init(repeating: [Int](), count: base)
</code></pre>
<p>then the compiler deduces the init to call from the contextual type you have given, <code>var bucket : [[Int]]</code> so the complete init call is</p>
<pre>... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.