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:
Import stock price from Yahoo Finance into R?<p>I want to to import the currency close price from Yahoo finance or Oanda into R.</p>
<p>I tried to follow th... | <p>I think this is what you're after.</p>
<pre><code>library(quantmod)
getSymbols("EUR=X",src="yahoo")
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
My function should return matching pairs of values, but returns one matching pair and one unmatched pair<p>I'm writing a function that takes a number of coll... | <p>I suppose this is what you are looking for. Change the following portion from:</p>
<pre><code>if diff[i] >= 0:
finalen1 = en1[i] - halfen
finalen2 = en2[i] + halfen
else:
finalen1 = en1[i] + halfen
finalen2 = en2[i] - halfen
finalsp1 = np.sqrt((2*finalen1)/m)
finalsp2 = np.sqrt((2*finalen2)/m)
re... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pine script : color the current candle different color<p>i wanna to color all candles , all down candles will be red ,, all up candle will be green and the c... | <p>you use <code>barstate.isconfirmed</code>function</p>
<pre><code> //@version=5
indicator("barcolor example", overlay=true)
barcolor(barstate.isconfirmed ? na : color.black)
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't get scipy.io.wavfile.read() to work<p>I am trying to read a .wav file into an array so that I can then plot the array and do a FFT. I got the file open... | <p>You have confused <a href="http://docs.scipy.org/doc/scipy-0.14.0/reference/io.html#module-scipy.io.wavfile" rel="noreferrer">SciPy's WAV module</a> with <a href="https://docs.python.org/2/library/wave.html" rel="noreferrer">Python's</a>. Remove <code>import wave</code>, use <code>import scipy.io.wavfile</code>, and... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Show BottomPlayerView above TabView in SwiftUI<p>I'm learning swiftUI and I want to make a music app.</p>
<p>I created a view which going to be above the tab... | <p>In your BottomPlayer add the @Published attribute before the show boolean.
This creates a publisher of this type.
<a href="https://developer.apple.com/documentation/combine/published" rel="nofollow noreferrer">apple documentation</a></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP References - the &<p>Why is it that the <strong>&</strong> is attached to the parameter name in the function header, not - as would logically be expe... | <p>Here is the answer from PHP itself:</p>
<blockquote>
<p>There is no reference sign on a function call - only on function
definitions. Function definitions alone are enough to correctly pass
the argument by reference.</p>
</blockquote>
<p>More details here:</p>
<p><a href="http://php.net/manual/en/language.r... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to compile a third party extension from github?<p>I have never work in any <code>vscode</code> extension neither witch <code>nodejs/npm</code></p>
<p>im ... | <ol>
<li>The easiest way will be from the extension directory in your VSCode, you can open that using one of these three ways:<br />
a. View > Extension<br />
b. From sidebar, click on extension icon<br />
c. CTRL + Shift + x</li>
</ol>
<p>Then search for "gutter preview" with quotations, you'll get one re... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Understand cmd command which runs java application<p>I have the following code in the batch:</p>
<blockquote>
<p>"C:/EDI_Module/jre1.8.0_121/bin/java" -Xm... | <p>The JRE executable (the bytecode interpreter):</p>
<pre><code>"C:/EDI_Module/jre1.8.0_121/bin/java"
</code></pre>
<p>The starting memory size:</p>
<pre><code>-Xms2g
</code></pre>
<p>The maximum memory size:</p>
<pre><code>-Xmx10g
</code></pre>
<p>The <a href="https://en.wikipedia.org/wiki/Classpath_(Java)" rel... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Iterate over pyspark dataframe and send each value to the UDF<p>I have a data frame like the below:</p>
<pre><code>+---------+----------+--------+-----+-----... | <p>I think the main issue here is that User Defined Functions expect to be called once per row, rather than passed the entire data frame. So for me the following works:</p>
<pre class="lang-py prettyprint-override"><code>new_df = ctx.spark.createDataFrame((
["James", "", "Smith", 3663... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What does <namespace>::class mean?<p>In a <a href="http://cakephp-upload.readthedocs.io/en/latest/validation.html" rel="nofollow">CakePHP Plugin documentatio... | <p>the <code>class</code> constant simply returns the full name of the class (with namespace) as a string. So instead of passing as string to some method that requires it, you pass it the PHP way. It just looks nice, for example:</p>
<pre><code>$validator->provider('upload',\Josegonzalez\Upload\Validation\DefaultVa... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ImageView.setBackgroundResource<blockquote>
<p>Attempt to invoke virtual method 'void
android.widget.ImageView.setBackgroundResource(int)' on a null object
r... | <p>I'm not sure what you did in your onCreateViewHolder function, but generally when I see this it's because you inflated the wrong layout. Make sure you are inflating your list_item xml layout. Hope this helps.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add key to the nested dictionary recursively based on condition<p>I have a multi level nested dictionary, trying to add a key <code>required</code> whenever ... | <p>Here's one way that modifies <code>data</code> in-place by adding <code>required</code> key to each key that has <code>type</code> key in it:</p>
<pre class="lang-py prettyprint-override"><code>def add_required(d):
if 'type' in d:
d['required'] = False
for v in d.values():
if isinstance(v, di... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I set a pandas dataframe with the first value is what stays?<p>I got the following table with repeated values per person:</p>
<div class="s-table-con... | <p>You could <code>mask</code> the duplicate values:</p>
<pre><code>out = (df.mask(df.apply(lambda x: x.duplicated(), axis=1)).fillna(''))
</code></pre>
<p>Output:</p>
<pre><code> Customer Jan Feb Mar Apr Jun Jul
0 Adam 345.0
1 Susan 645.0
2 Pau... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is flexbox justify-content making my 'block' buttons inline?<p>My buttons, which are displayed block, need to be centered right in the middle of their di... | <p>You need to modify flex-direction and align-items css properties for this. Default value for flex-direction is "row", which causes that inline looking placement. You should make it "column" or "column reverse" to place items vertically.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multiple $and $or in a MongoDb find<p>I have a query I can't figure out. That query returns nothing:</p>
<pre><code> const read = await db.collection("actio... | <p>The <code>and</code> between the critieria should be implied, the below query should be equivalent to what you're trying to achieve (if I understood it right). Please test it.</p>
<pre><code>db.collection("action_traces")
.find({ $or:[
{"receipt.receiver": "newdexpocket"},
{"act.account": "newdexpoc... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't install json gem 1.8.6 - failed to build gem native extension on Ubuntu<p>Bundler on Ubuntu 16.04 yields the following error when trying to install JSO... | <p>It seems that there is <a href="https://stackoverflow.com/questions/5216278/cant-install-json-gem">similar problem on RedHat 7</a>.</p>
<p>In case of Ubuntu, the solution seems to be installing <code>ruby-dev</code> package.</p>
<p><code>sudo apt-get install ruby-dev</code></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
selectively accept HTML tags in user submitted string<p>What I would like to do is giving to my user the ability to format a submitted text with simple tags ... | <p>You want the <code>sanitize</code> helper method which is built into rails.</p>
<pre><code><%= sanitize @user_input, tags: %w(b i) %>
</code></pre>
<p>It whitelists the allowed tags. Any tags not in the <code>tags:</code> array are not rendered.</p>
<p>Read about it here...</p>
<p><a href="http://api.rubyo... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update two columns in a query<p>I have one php website in which when press one action button called Activate...</p>
<p>I am changing value of column from 0 ... | <p>You can use a comma(<code>,</code>) to update multiple fields in an SQL query. Also, to get the current timestamp, you can use the SQL function <code>NOW()</code>.</p>
<p>Combine these and you can do something like this:</p>
<pre><code>$upd_qry = "update tbl_quotes
set qu_status='".$_GET['status']."', qu_time... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
replacing pipe in string<p>Hello I need to remove all occurrences of | from a string. This is what I am doing currently</p>
<pre><code>var mystring = "this|... | <p>Escape <code>|</code> character.</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 mystring = "this|is|a|test"
console.log(mystring.replace(/\|/g, ","));</code></pre>
</d... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to save a GoogleMap polly line in SQLite database?<p>I've got a specific problem. I'm creating an application which has to save and then get a particulla... | <p>You can use the <code>PolyUtils</code> methods from the <a href="https://developers.google.com/maps/documentation/android-api/utility/" rel="nofollow">Google Maps API Utility Library</a>:</p>
<ul>
<li>The <code>PolyUtils.encode</code> method encodes a <code>List<LatLng></code> into a <code>String</code> that ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I pass ds variable to a function within a dag?<p>I want to pass the execution date, which is in the variable {{ ds }}. However, I passed it through a... | <p>Create a class that extends EmrAddStepsOperator, and make <code>steps</code> a templated field.</p>
<p>Something like this:</p>
<pre class="lang-py prettyprint-override"><code>class MyEmrAddStepsOperator(EmrAddStepsOperator):
template_fields = ['job_flow_id','steps']
</code></pre>
<p><code>EmrAddStepsOperato... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Semi-recursive associations with Entity Framework Code First<p>I'm hoping you can help me with a small issue I'm having.</p>
<p>I have an entity framework C... | <p>The issue you are experiencing is because of the improper/incomplete relationships mappings, combined with EF default conventions.</p>
<p>I would suggest you always configuring the relationships separately, only once per relationship and use the overloads that match exactly the presence/absence of the navigation an... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find a value of a key in a nested dictionary with lists?<p>There's some very strange json payloads that I need to parse and I'm complete stuck..</p>
<... | <p>Since you do not know how deep inside the value is, it is prob advisable to use a recursive function to iterate through all the layers till it's found. I used DFS below.</p>
<pre><code>def search(ld, find):
if(type(ld)==list):
for i in ld:
if(type(i)==list or type(i)==dict):
r... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I 'left-center' align content on all devices to remain responsiveness with css?<p>I have a title and paragraph of text. It is currently left aligned (... | <p>You can do this with Flexbox.</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> .container {
display: flex;
flex-flow: column nowrap;
}
.child {
margin-le... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sanic how to locate to static file<p>I want to locate to static file, because there are many relative path in the html, like:</p>
<pre><code><a href="... | <p>It is a little unclear to me <em>exactly</em> what you are looking to do, so I will provide a couple of examples that might be what you are looking for. Please let me know if this does or does not solve the problem and I can amend the answer.</p>
<hr />
<h2>Static files</h2>
<p>If you have a single static file (this... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular 5 Owl carousel How to increase / decrease rotating speed<p>I'm using Owl Carousel in Angular5 and want to increase or decrease the sliding speed howe... | <p>I think you should check native owl-carousel options
<a href="https://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html" rel="nofollow noreferrer">https://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html</a></p>
<p>And provide <code>navSpeed</code>. Smth like this</p>
<pre><code><owl-carousel [... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using img's src as the source of the content in jQuery FancyBox 3<p>I am using FancyBox 3 jQuery plugin and overall it is great. Works perfectly with my webs... | <p>You can use <code>data-src</code> attribute to set custom source. </p>
<p>But the point of the script is that you put small version of the image (thumbnail) inside anchor pointing to real one.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Show shiny notification in sidebar<p>In the example below, the 'Selections Saved' notification appears in the bottom-right corner of the application. Instead... | <p>Have you tried to just change the percentages?</p>
<pre><code># bottom-left
custom_notes <- HTML(
"
.shiny-notification {
position: fixed;
top: calc(0%);
left: calc(100%);
}
"
)
</code></pre>
<p>And them put <code>tags$head(tags$style(custom_notes))</code> inside <code>ui</code>, bef... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
getting first value of the groups in Pandas<p>I have a DataFrame and want to generate a report on it.</p>
<p>Sample data</p>
<pre><code>data = {
'Date': {0:... | <p>If magic function count new columns from multiple input columns then <code>agg</code> is not possible use.</p>
<p>Then select first value by indexing:</p>
<pre><code>def magic(x):
result = {
'Action' : x['Action'].iat[0]
'Profit': x['Profit'].sum()
}
return pd.Series(result)
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django - Rendering Markdown Sanitizied with Bleach<p>When I do markdown(text), without bleach, I get the desired result (raw):</p>
<pre><code><p>blah&... | <p>You need to mark the <code>bleach</code>ed HTML as safe</p>
<pre><code>from django.utils.safestring import mark_safe
...
return mark_safe(bleach.clean(markdown.markdown(text)))
</code></pre>
<p>But, there is also <a href="https://bitbucket.org/ionata/django-bleach.git/" rel="nofollow">django-bleach</a> that p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Class argument variable automatically comma separated,<p>Hi,
<p>I'm passing below variable to a function inside a class</p>
<p>ba4dfb43-46a6-44ec-9249-18bdf6... | <p>You need a comma when you passing item to args. In python if have one item inside circle brckets, it is not a tuple, it is just item inside brackets. So tu make it like tuple you need to add a comma after item</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ASP.NET Core 6 - Cookie gets returned but not stored in browser<p>I am struggling with Cookie Authentication in Asp.Net Core 6.0</p>
<p>I have implemented an... | <p>All I had to do was to add the correct CORS policy. If you expect a Cookie to be stored and included in future requests, you must add the Origins and the .WithCredentials() properties to the Cors policy.</p>
<p><strong>It might look something like this:</strong></p>
<pre><code>service.AddCors(options =>
{
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
tensorflow .graph file doesn't generated<p>These are sample code.</p>
<pre><code>import tensorflow as tf
const1 = tf.constant(2)
const2 = tf.constant(3)
ad... | <p>Here is a modified code, that should run:</p>
<pre><code>import tensorflow as tf
const1 = tf.constant(2)
const2 = tf.constant(3)
add_op = tf.add(const1,const2)
mul_op = tf.multiply(add_op,const2) # probably you use old version of TF
with tf.Session() as sess:
writer = tf.summary.FileWriter('logs', sess.graph... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Class constructor type<p>I want to require one or the other type of constructor in my class:</p>
<pre><code>const instance: MyClass = new MyClass({ digit: 5... | <p>Overload the <code>constructor</code>:</p>
<pre><code>interface WithDigit {
digit: number
}
interface WithLetter {
letter: string
}
class MyClass {
constructor(options: WithDigit);
constructor(options: WithLetter);
constructor(options: WithLetter | WithDigit) {
if ('digit' in options) ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Character Class Method issues<p>So I'm currently working on a school assignment which is to design a program that allows the user to enter some text, and the... | <p>You forgot to reset to true your <code>legal</code> and <code>style</code> boolean variables.</p>
<p>At every iteration, the <code>legal</code> and <code>style</code> variables will keep containing the result of the previous input. For example, if on your first input you immediately write a variable name with an ill... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
'No X11 DISPLAY variable was set' trying to run Minecraft server on EC2 instance<p>I run into the following issue when I try running a minecraft server on an... | <h1>The problem</h1>
<p>From my understanding the issue is with your <code>minecraft.service</code> file.</p>
<p>When you are starting the service you are running the installer for the forge server.</p>
<p>The installer requires X unless run with the <code>--installServer</code> flag as you have done above in your user... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error injecting dependency<p>I am starting a project in ASP.NET MVC using Ninject to implement dependency injection with Ninject MVC5 . Here is my current ar... | <p>As the error message suggest the class <code>AccountService</code> depend on <code>AccountRepository</code> so you have to inject <code>AccountRepository</code></p>
<pre><code> private static void RegisterServices(IKernel kernel)
{
kernel.Bind<IAccountRepository>().To<AccountRepository>();
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Output the last instance of failure status from historical data in Bigquery<p>I am still on the ropes with BigQuery and I hope you can help me.</p>
<p>I have... | <p>Use below approach</p>
<pre><code>select name, status,
min(timestamp) as started_failing_timestamp,
date_diff(max(date(timestamp)), min(date(timestamp)), day) + 1 as days_failing
from (
select * except(flag), flag, countif(flag > 1) over(partition by name order by timestamp) grp
from (
select *, dat... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Two way communicating using pipe<p>I have a small program to practice pipe and processes in C. There is a parent process and there're two child processes (ch... | <p>Here's my edit of your code. I've reorganized the sequence of operations so that the child processes cannot 'cheat' by having the information that the parent is supposed to send to the children already available. This code compiles; I've not run it because I'm not good at breeding rabbits and your code is incomple... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
User authentication for RESTful service<p>I have a current customer base. I want to give them access to certain details about themselves via a RESTful servic... | <p>Using a UUID as a fixed identifier for a valid user is risky. UUIDs are generated to <a href="https://stackoverflow.com/q/467271/18044">be unique, not random</a>. If the attacker has a legitimate UUID, he may try to guess other user's identifiers.</p>
<p>Fixed identifiers can also easily leak. Even if you use HTTPS... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ensure Type A extends Type B that has a field which is the value of another object<p>I would like to ensure that type A has a field of a generic type but the... | <p>You don't need to define any extra <a href="https://www.typescriptlang.org/docs/handbook/advanced-types.html" rel="nofollow noreferrer">mapped types</a> (such as <code>TypeB</code> sould be in your example), you can use <code>Record</code> to get a mapped type from a string literal and a field type.</p>
<p>You also... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculating points visibility in 3D space<p>I am experimenting with <strong>LWJGL2</strong> and I want to be able to tell if the camera is able to see a cert... | <p>If you have the view and projection matrices of the camera (let's call them <code>V</code>, <code>P</code>), you can just apply the transformations to your point and check whether the result lies within the clip volume of the camera.</p>
<p>Say your point is at <code>(x, y, z)</code>. Construct a vector <code>p = (... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check if there are any more elements like parent - jQuery<p>I want to create a condition to check if there is iany row in the table or the row is the only on... | <p>You could just check the length of the array which contains the <code><tr></code> elements.</p>
<pre><code>if($('table tr').length>1)
$(this).closest('tr').remove();
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Count number of positive columns from large dataframe<p>I have a large DataFrame with 500 columns out of which 300 columns <code>col1, col2, ..col300</code> ... | <p>You could select the columns + <code>gt</code> (which creates a boolean DataFrame where it's True if a value is positive) + <code>sum</code> on axis:</p>
<pre><code>df['numPos'] = df[['col1','col2']].gt(0).sum(axis=1)
</code></pre>
<p>Maybe you could filter them too, like:</p>
<pre><code>df['numPos'] = df.filter(lik... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Image saved using pushbutton in MATLAB GUI cannot be displayed in destination folder<p>The image that i saved from my GUI into the destination folder cannot ... | <p>You are probably doing something wrong in the proper code. The "hold on" addition might solve your problem.</p>
<pre><code>imshow(frameReference,'Border', 'tight',handles.figure1); hold on
plot(centroidsFiltered(:,2),centroidsFiltered(:,1),'g','LineWidth',1.5);
print(handles.figure1,'-r0','-dpng', 'figure.png');
</... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Passing a string slice, returning a string slice. But who owns it?<p>I'm a beginner to Rust and just learning the ownership concept.</p>
<p>I'm using this f... | <p>Your claims are mostly wrong, let me try to correct them.</p>
<blockquote>
<p><em>Passing a string slice, returning a string slice</em></p>
</blockquote>
<p><code>fn reverse(input: &str) -> String</code> you are accepting a <a href="https://doc.rust-lang.org/std/primitive.str.html" rel="nofollow noreferre... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How iterate module output from a loop Ansible and capture particular value only<p>How to iterate module output from a loop in ansible and capture particular ... | <p>Say you want to output those services status into a file, you may use something like this:</p>
<pre><code>- name: collect systemd info
service_facts:
- name: cross verify service is runnng or not
copy:
content: |
{% for s in myServiceName %}{{ s }}={{ ansible_facts.services[s]['state'] }}
{% end... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Search duplicate IDs with some class name<p>This function will find and alert about all duplicate custom attributes (for example, if you would try to use <co... | <p>You can prepend your class to the attribute selector:</p>
<pre><code>function duplicateAttrChecker(className, attrName) {
$("."+className+"["+attrName+"]").each(function() {
var value = $(this).attr(attrName);
if ($("."+className+"["+attrName+"='"+ value + "']").length > 1) {
cons... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Overflow in footer<p>I have a footer with the follow code:</p>
<pre><code>
<div class="footer" style="width: 100%;"><h5>
<... | <p>this may help you, see snippet</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>.footer {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
background-color: whit... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FAB on top of Bottom Navigation<p>How to display a fab on top of a Bottom Navigation? This is what I tried:</p>
<pre class="lang-xml prettyprint-override"><c... | <p>You need to use coordinator layout</p>
<pre><code> <androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use dplyr::if_else to mutate across a tibble dataframe?<p>I wonder how to combine <code>mutate</code> and <code>if_else</code> to transform a data fra... | <pre><code>iris %>%
mutate(across(where(is.numeric), ~ . >= 2))
</code></pre>
<p>You don't need <code>if_else</code> when the result you want is <code>TRUE</code> or <code>FALSE</code>. Generally, <code>ifelse(test, TRUE, FALSE)</code> is a long way of writing <code>test</code>.</p>
<p>Or in base R</p>
<pre><co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot Zoom Android Map fragment to the current location<p>This is not the first question im posting regarding this matter in Stack Overflow. I really need h... | <p>Here it is:</p>
<pre><code> @Override
public void onMapReady(GoogleMap googleMap) {
map = googleMap;
Location myLocation = getMyLocation();
LatLng latLng = new LatLng(myLocation.getlatitude(), myLocation.getLongitude());
map.animateCamera(CameraUpdateFactory.newLatLngZoom(
lat... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Node js PgSQL promise not return value from query<p>I've followed by PgSql Node js docs and try to use query with Promise but it's not working, but works fin... | <p>You shouldn't use brackets:</p>
<pre><code>let query = (text, params) => pool.query(text, params)
</code></pre>
<p>The difference is explained <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#Basic_syntax" rel="nofollow noreferrer">here</a>.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error slicing list of dictionaries by key?<p>I have a Pandas <code>Series</code> which contains dictionaries holding two key-value pairs each. </p>
<p>Here ... | <p>You can try using a list comprehension to loop over all the dictionaries. In this case, the code would be <code>[dic['C'] for dic in sorted_combos.iloc[:,0]]</code>.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why do I only see a single color?<p>I am trying to put either a color or an image to the background of the rectangle I draw using OpenGL 3.3.
I'm trying to g... | <p>Since the type which enumerator which is passed to <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage2D.xhtml" rel="nofollow noreferrer"><code>glTexImage2D</code></a> is <code>GL_UNSIGNED_BYTE</code>, the data typo of the array of pixel data has to be <code>GLubyte</code> (which correspond... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to decode string to object EXTJS 6<p>I'm I'm using ExtJS to create a formPanel dynamyc from database (string result from server to object extjs)</p>
<pr... | <p>Well, your server should always return valid JSON. Two objects, comma-separated, isn't valid JSON. (You can check with one of the many online JSON validators if you don't believe me.) Could your server possibly return an array of objects? Like this:</p>
<pre><code>[
{fieldLabel: "Employee Id", xtype: "textfield... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Attaching vm to kubernetes nodes list<p>I am using docker for mac with kubernetes integrated with it. </p>
<pre><code>$kubectl get nodes
NAME ... | <p>For a system to join a Kubernetes cluster it must have the Kubernetes node agent running on it, called the Kubelet. </p>
<p>Once you have installed the Kubelet on the node (how you do that depends on your VM's operating system) you will need to <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change the values of all the values in a table with bookedmarked javascript<p>I have the following code contained within a bookmark that I was hoping to run ... | <p><code><td></code> elements do not have a <code>.value</code>. Instead, you're looking to change <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML" rel="nofollow noreferrer"><code>anchors[i].innerHTML</code></a>:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-consol... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Y-Axis is Disappearing<p>When I orient my Y-Axis to the right I can see the text on the bars, but when I orient it to the left it disappears from the page. T... | <p>Maybe you have to append your yAxis to canvas(same as your XAxis), not inside svg, that should be show out.
I try to change your code from </p>
<pre><code>svg.append("g")
.attr("font-family", "Helvetica")
.attr("font-size", "15px")
.style("fill", "black")
.attr("class", "y axis")
.call(yAxis);
</c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AS3: How to jump to another scene (or frame sequence) and return back to frame having jumped from<p>Right now I'm building a simulation of a sports match, pl... | <p>Let's assume you have a replay button with the instance name of <code>replayBtn</code>. Here is one way to set this up:</p>
<p>On the first frame of your timeline, create the following vars and functions:</p>
<pre><code>//define a variable to hold the last replay frame
var lastReplayFrame:int = 0;
//define a var... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL selecting a record based on a column but displaying all values in said column<p>I'm having an issue where a table can be setup as below. I want to only ... | <pre><code>DECLARE @Table TABLE
(
name nvarchar(10),
invoice int,
code nvarchar(2),
payment money
)
INSERT INTO @Table
VALUES
('name1', 111, 'BA', 20),
('name1', 112, 'AA', 50),
('name2', 113, 'AA', $50)
SELECT t2.*
FROM @Table AS t
INNER JOIN @Table AS t2 ON t.name = t2.name
WHERE t.code = 'BA'
</... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find the next row matching condition<pre><code>df = data.frame(group_id = c(rep("a",5), rep("b",5)),
prod_id = 1:10,
... | <p>Try this:</p>
<pre class="lang-r prettyprint-override"><code>library(dplyr)
# library(tidyr) # fill
df %>%
group_by(group_id) %>%
mutate(next_acd = if_else(lead(prod_type) %in% c("a","c","d"), lead(prod_id), prod_id[NA])) %>%
tidyr::fill(next_acd, .direction = "up&qu... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Load a apreadsheet and copy a row and pasted it in a different location<p>How can I copy a row for example from D51 to F51 and paste these values in the row ... | <p>You can achieve this by using code below...
Note that the file <code>output.xlsx</code> is opened, updated and saved. The function <code>num_to_excel_col</code> is borrowed from <a href="https://stackoverflow.com/questions/42176498/repeating-letters-like-excel-columns">here</a>.
This will update columns 20 (T) onwar... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
java - how do I print out the words in increasing magnitudes, e.g 1st = Our, 2nd = Our greatest, 3rd = our greatest glory<p>String s2 = "Our greatest gl... | <p>This is the implementatio:</p>
<pre class="lang-java prettyprint-override"><code>String s2 = "Our greatest glory is not in never falling, but in rising every time we fall.";
String[] split1 = s2.split(" ");
for (int i = 0; i < split1.length; i++) {
for (int j = 0; j < i + 1; j++) {
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GetFields Operator<p>I'm using a function to get the field data from a list. I need to know if the .GetFields operator will just return the fields, or if it ... | <p><code>FieldInfo</code> is information about the field, not including its value. To get the value you have to provide an instance of that object type. Here's an example that you can place on a form to see how it works:</p>
<pre><code>Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Di... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL using MIN with other attributes to match<p>This is likely a very simple solution, but I just have no clue. I know I probably have to use GROUP BY, but ... | <p>You have two options:</p>
<pre><code> SELECT ItemID,
Inventory_Name,
AvailableQuantity
FROM Inventory
ORDER BY AvailableQuantity ASC
LIMIT 1;
</code></pre>
<p>But this doesn't handle ties, so you could use a subquery:</p>
<pre><code>SELECT ItemID,
Inventory_Name,
AvailableQua... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
conditional shift operation in Pandas<p>I have df as</p>
<pre><code>print (df)
ACTUAL TARGET ACTUAL_DATE NO YEAR
0 6385 108725 9/5/2018 36 20... | <p>I think you need <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.groupby.html" rel="nofollow noreferrer"><code>groupby</code></a> by month period what working if multiple years with <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.core.groupby.DataFrameGroupBy.dif... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use header case for fields<p>I’d like to know if it’s possible to use header casing for GraphQL field names, like that:</p>
<pre><code>type Headers {
Acce... | <p><a href="https://facebook.github.io/graphql/June2018/#sec-Names" rel="nofollow noreferrer">GraphQL names</a> can contain ASCII letters, digits, and underscores only, and can't begin with digits. There's no way to declare or consume fields that don't match this rule. You just can't have a field named <code>Content-... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding Dependency to stack Project?<p>After running:</p>
<pre><code>stack new my-project
cd my-project
stack setup
stack build
</code></pre>
<p>I would lik... | <p>If you look at the <a href="https://www.stackage.org/lts-8.15/package/conduit-1.2.10" rel="noreferrer">haddocks for conduit</a>, notice the module you want to import is not Conduit, it is <strong>Data.Conduit</strong>.</p>
<p>The <code>Conduit</code> module comes from the <code>conduit-combinators</code> package. I... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Search TYPO3 BE by data present in related model<p>I have an extension with an "event" model with an "address" field related to the "... | <p>Unfortunately this is not supported. At the time of this writing only the following TCA types are supported in <a href="https://docs.typo3.org/m/typo3/reference-tca/11.5/en-us/Ctrl/Properties/SearchFields.html" rel="nofollow noreferrer"><code>searchFields</code></a>:</p>
<ul>
<li>text</li>
<li>flex</li>
<li>slug</li... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google authentication failed using firebase react hook<p>Getting the below error while Google signup/signin using firebase react hook</p>
<p><a href="https:/... | <p>did you use auth to check if the user signed in in App.js</p>
<pre><code>import { auth } from '../firebase/config';
import { signOut } from 'firebase/auth';
useEffect(() => {
auth.onAuthStateChanged((user) => {
if (user) {
//user auth object here
} else {
signOut(auth... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use more than one property in React Component<p>I'm new to React, and I have a question. I'm creating my own button. And I want to do it in an optimized way,... | <p>You can do it by changing <code>ButtonProps</code> to this:</p>
<pre><code>export type interface extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
icon?: React.ReactElement<HTMLOrSVGElement>;
loading?: boolean;
}
</code></pre>
<p>Then in your <c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Availability of users' password within AWS Cognito<p>Can I, as an admin, get a user password (which is currently is use) within Cognito? Either through AWS C... | <p>No, this is not currently possible. </p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can use PHP header() function inside PayPal Javascript code<p>I am trying to integrate Paypal with my website and now am facing problem to actually handl... | <p>Don't use PHP header function inside the javascript code because that will not work.you can redirect your page via below code in javascript. </p>
<pre><code>location.href = 'http://youdomain.com/order-placed.php?completed&invoice=<?php echo $invoiceNumber ?>';
</code></pre>
<p>Hope this helps you.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update metadata about Trade Representative Contact Information using Fastlane/Deliver?<p>I uploaded all the metadata to appstore including Screenshots... | <p>you should add in your Deliverfile something like this</p>
<pre><code>trade_representative_contact_information(
first_name: "Alex",
last_name: "Kosyakov",
address_line1: "Nevsky pr., 1",
address_line2: "",
address_line3: "",
city_name: "Saint-Petersburg",
state: "",
country: "Russia",
postal_code:... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
An unknown server-side error occurred while processing the command. Original error: Command failed: ideviceinstaller -u<p>I m trying to launch Safari Browser... | <p>You are using the appium version 1.5.3 which is not compatible from xcode 8 and ios 10. Update your appium to 1.6 or above.</p>
<p>To know how to start the appium server after installing appium 1.6 refer the below link:</p>
<p><a href="https://stackoverflow.com/questions/43245891/launch-and-run-appium-in-mac/43246... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you store information on access?<p>Right. So I've got a system with personal information including an address. On the paper based form there is a chan... | <p>Have a separate table joined to the personal information table by EmployeeID. This table should have fields for the address and a date field (maybe even a date from and date to field) - when the address is updated a new record is created in this table with the current (doesn't have a date) address and the previous ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to set showing only Username on on-premises GitLab?<p>Does anyone know how to set <strong>showing only "Username"</strong> instead "Name&q... | <p>I heard on the Twitter that the function to which show either "Username" or "Name" selectively is currently not available on GitLab, and which is asked for a implementation.
Great thanks for the help.</p>
<p><a href="https://gitlab.com/gitlab-org/gitlab/-/issues/17607" rel="nofollow noreferrer">h... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Converted code using Swift and got multiple errors (see image)<p>Very new to coding and only learning Swift so far, in a course to make IOS apps that is not ... | <p>Here is some code that will actually compile:</p>
<pre><code>class NewSoundViewController: UIViewController {
private var audioRecorder : AVAudioRecorder?
required init?(coder aDecoder: NSCoder) {
let session = AVAudioSession.sharedInstance()
do {
try session.setCategory(AVAu... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a Node if it doesn't exist based on a specific property, and return existing node otherwise<p>I have a node called User, and it has two propert... | <p>You are very close to getting what you seek. You simply need to add <code>ON CREATE</code> to your <code>SET</code> statement.</p>
<pre><code>MERGE (u:User {name: 'John'})
ON CREATE SET u.id = "rksaxrN--"
RETURN u;
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to configure Spring Security to allow Swagger URL to be accessed without authentication<p>My project has Spring Security.
Main issue: Not able to access... | <p>Adding this to your WebSecurityConfiguration class should do the trick.</p>
<pre><code>@Configuration
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/v2/api-docs",
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract the output of the embedding layer<p>I am trying to build a regression model, for which I have a nominal variable with very high cardinality. I am try... | <p>If the embedding is part of the model and you train it, then you can use functional API of keras to get output of any intermediate operation in your graph:</p>
<pre><code>x=Input((number_of_categories,))
y=Embedding(parameters_of_your_embeddings)(x)
output=Rest_of_your_model()(y)
model=Model(inputs=[x],outputs=[out... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does ember-cli build with wrong host?<p>I am currently at the state of deploying one of my ember applications to a server with Ubuntu LTS + Apache/Nginx ... | <p>I have finally found out that it is not an ember problem. </p>
<p>The third-party component cesium.js which I have integrated into my ember project needs an base url.</p>
<p>This base url was set statically in the index.html:</p>
<pre><code>// app/index.html
<script type="text/javascript">
var CESIUM_BASE... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
sending memberships in web2py cas<p>I am fairly new to using Web2py and am trying to get CAS authorisation working from one server(web2py instance) to anothe... | <p>When logging in via CAS, web2py <code>Auth</code> does not provide any built-in facility for checking roles/permissions in the CAS provider app. However, nothing stops you from accessing and querying the CAS provider app database via the DAL. Something like:</p>
<pre><code>import os
cas_db_folder = os.path.join(req... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
.net6.0 c# shared appsettings.json<p>I'm working away at a multi-tenant .net6.0 solution which has a number of embedded projects</p>
<p>to keep maintenance l... | <pre><code> Configuration = new ConfigurationBuilder()
.SetBasePath(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location))
//.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile($"..\\SharedSettings\\sharedsettings.{environment}.JSON", true, true)
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get Quarter and Year between two dates<p>I'd like to retrieve the list of years and quarters between two dates.</p>
<p>For example, from 25/12/2015 to 06/30... | <p>You can use a tally table to do this.</p>
<pre><code>declare @start date='2015-12-25';
declare @end date = '2017-06-30';
select distinct year(dateadd(day,rnum,@start)) yr,
datepart(quarter,dateadd(day,rnum,@start)) qtr
from (select row_number() over(order by (select null)) as rnum
from master..spt_values) t... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swift: How to zip multiple NSData objects for further transfer (Airdrop, Email, Dropbox...)<p>In my iOS Swift application I have images stored as NSData in a... | <p>After changing some keywords in Google for the search, I found 2 interesting looking Libs/Frameworks I now will start investigating in. </p>
<p><a href="https://github.com/marmelroy/Zip" rel="nofollow">ZIP from Marmelroy</a></p>
<p>and</p>
<p><a href="https://github.com/ZipArchive/ZipArchive" rel="nofollow">ZipAr... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot form expression of type with two question marks in Java<p>I can neither compile nor refactor the following code to work:</p>
<pre><code>public class ... | <p>You are trying to pass two different types for the same type parameter <code>S</code>.</p>
<p><code>Paired1<Paired2<S,?>, Paired3<S,?>></code> Both <code>S</code> must be of the same type:</p>
<p>So this will work:</p>
<pre><code>Paired1<Paired2<Integer, ?>, Paired3<Integer, ?>>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bootstrap column, how to scroll on overflow?<pre><code><body class='container-fluid mx-auto' style='width: 95%'>
<div class='row'>
<div
i... | <p>You can do this by creating your own <code>video-chat-row</code> class. Note that by using the <code>embed-responsive-16by9</code> class, you cannot expect the <code>row</code> and <code>col-x</code> classes to work normally. You got to create your own overrides.</p>
<p><div class="snippet" data-lang="js" data-hide... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can Cloudfront be configured to scrub all IP addresses from the incoming request before passing to the origin?<p>For compliance reasons, we are not able to c... | <p>Cloudfront Functions can run at the <code>Viewer Request</code> stage to modify incoming request headers, however the client IP will still be appended to <code>X-Forwarded-For</code> when a request is passed on to the origin.</p>
<p>You can however use Lambda@Edge in the <code>Origin Request</code> stage to modify t... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create frequent number sqlite queries<p>Good evening. I created a database with 9 columns and 605 rows.
On column 3, 4, 5, 6, 7 there are numbers ranging fro... | <p>When you post SQL questions, it often helps to tell us what database system you're using, because the syntax is often slightly different between systems.</p>
<p>However, here is a query which (I think) does what you expect for most systems. You might have to tweak it.</p>
<pre><code>WITH CTE_ESTR1 AS (
SELECT ES... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Delphi: extract path file from uninstallstring registry key<p>How detect, in Delphi Seattle, file is exists, if in SOFTWARE\Microsoft\Windows\CurrentVersion\... | <p>In the first case, use <a href="http://docwiki.embarcadero.com/Libraries/en/System.SysUtils.AnsiExtractQuotedStr" rel="nofollow noreferrer"><code>AnsiExtractQuotedStr()</code></a> or <a href="http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.SysUtils.AnsiDequotedStr" rel="nofollow noreferrer"><code>AnsiDequot... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
UIView Animation<p>I need to flip my view horizontally.</p>
<p>I tried to flip along with the navigation Controller when i did this my background screen bec... | <p>Please try the below code :-</p>
<pre><code>UIViewController *controller = [[[MyViewController alloc] init] autorelease];
UIViewAnimationTransition trans = UIViewAnimationTransitionCurlUp;
[UIView beginAnimations: nil context: nil];
[UIView setAnimationTransition: trans forView: [self window] cache: YES];
[navContr... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to customize TinyMCE dialog CSS?<p>I'm trying to get custom CSS control over TinyMCE dialogs/modals but not getting anywhere and not finding clear instru... | <p>In TinyMCE 6 you would control the look of the dialogs via the skin you use with TinyMCE.</p>
<p>The documentation for this in TinyMCE 6 is here: <a href="https://www.tiny.cloud/docs/tinymce/6/creating-a-skin/" rel="nofollow noreferrer">https://www.tiny.cloud/docs/tinymce/6/creating-a-skin/</a></p>
<p><em><strong>N... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reporting Services - show multiple values for a column horizontally rather than vertically<p>I have a report where row data can have the same data, apart fro... | <p>You can do this with a small change to your dataset query.</p>
<p>Here I have recreated your sample data table as a table variable called `@t' . Then I query the table and add a column which gives us a unique index for each 'Column4' value within each Column1-3 group</p>
<pre><code>DECLARE @t TABLE (Column1 int, Co... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Full outer join not giving the answer I need<p>I am using PostgreSQL and am having difficulty with getting a series of queries that combine the data from two... | <p>A full join that includes the age maybe?<br />
And some coalesce's for common fields.</p>
<blockquote>
<pre><code>SELECT DISTINCT
COALESCE(t1.StudyIDA, t2.StudyIDA) AS StudyIDA
, t2.StudyIDB
, COALESCE(t1.gender, t2.gender) AS gender
, t1.age as ageA
, t2.age as ageB
FROM t1
FULL JOIN t2
ON t2.StudyIDA is no... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript/JQuery resize textarea with div/"grippie"<p>I've look at many things covering how to make a "grippie" that resizes a <code>textarea</code>, and ha... | <p>I found out how to do it!! <a href="https://jsfiddle.net/khzuLxxf/12/" rel="nofollow">Here</a> is a fiddle with the project. I will continue to update it and make it better!</p>
<p><strong>HTML</strong></p>
<pre><code><textarea id="textarea"></textarea>
<div id="grippie" draggable="false"></di... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Interface EJB bean is not injected in JAX-RS Implementation class?<p>I am using WAS 8.5 , RAD 9.0 , JAX-RS 1.1 , Java EE 1.6, EJB 3.0 . There is WebModule(co... | <p><strong>ImplementationRest</strong> EJB bean is instaniated using javax.ws.rs.core.Application instead EJB Container.</p>
<pre><code>public class RestServiceInvoke1 extends Application {
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>&... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
expanding jooq's row value query<p>Using jooq to generate query for MySQL and checking if the row value clause generated by it can be expanded since mysql is... | <p>It's currently (jOOQ 3.9, see <a href="https://github.com/jOOQ/jOOQ/issues/6230" rel="nofollow noreferrer">#6230</a>) not possible to override this behaviour. You'll have to add an explicit predicate of the form you'd like it to be.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update column in table A based off columns in table B which have to meet a condition<p>Hi I have 2 tables to model a vacation request and the approvers who w... | <p>You can appropriate approved date using <code>distinct on</code> sorting on id and descending req_approvers.approved_at and specifying <code>nulls first</code> in a single CTE. Then update where the CTE where the date is not null. (see <a href="https://dbfiddle.uk/?rdbms=postgres_14&fiddle=9290fbd2284a581ca692d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.