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:
Is it possible to have more than one routing in ASP.NET MVC?<p>I want to ask if it's possible to have more than one routing within <code>RouteConfig</code> c... | <p>Yes you can have more routes you can : </p>
<pre><code>public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Student",
url: "students/{id}",
default... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I move the root of my git repository?<p>To start, I'm aware this question has been asked before <a href="https://stackoverflow.com/questions/1918111/... | <p>Git does not store file copies and renames, it uses heuristics to figure that out. I speculate Github isn't picking up the rename because they've turned off rename/copy heuristics to save processing power. It doesn't affect much but how that one commit is displayed on Github. Simplest thing to do is just ignore i... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Perl curses: refresh() doesnt delete lines<pre><code>sub display {
my @data = @_;
my $max_row = 0;
my $max_col = 0;
getmaxyx($max_row, $max_c... | <p><code>addstr()</code> will only write through to the length of the string passed to it. In order to avoid remnants, you need to ensure that the string is padded to the width of the window. I would suggest padding the string with spaces in the step where you truncate to <code>$max_col</code>:</p>
<pre><code>$line = ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does not evaluating the expression to which sizeof is applied make it legal to dereference a null or invalid pointer inside sizeof in C++?<p>First of all, I'... | <p>I believe this is currently underspecified in the standard, like many issues such as <a href="https://stackoverflow.com/q/14991219/1708801">What is the value category of the operands of C++ operators when unspecified?</a>. I don't think it was intentional, like hvd points outs it is probably obvious to the committee... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mongoose right promise rejection handling<p>I'm bit fighting with promise pattern in nodeJS</p>
<p>I'm looking for user in db and then saving new entity wit... | <p>You can use <code>throw</code> inside <code>then</code> callbacks to reject them. Or, instead of using the <code>Promise</code> constructor like that, you might also use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject" rel="nofollow"><code>Promise.reject(404)<... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ng-change not firing when switching between ng-includes<p>My domain is such that <code>Bar</code>s have <code>Group</code>s. The following code allows the us... | <p>The change event is not fired because nothing changes. You only have one group and that group is still selected when you go back. It stays selected forever, i.e the value of <code>$scope.selected.group</code> never changes, regardless of what radio button you choose.</p>
<blockquote>
<p>The ngChange expression is... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it worth synchronizing I/O intensive threads in order to increase total disk performance?<p>Our Windows .NET application has several I/O intensive threads... | <blockquote>
<p>The theory is that this would put less strain on the CPU</p>
</blockquote>
<p>How could it? It's the same number of writes but now with added synchronization. It will create (a little) more CPU load.</p>
<blockquote>
<p>we would then be doing part of the job that the operating system originally wa... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I prevent the application.hbs from appearing in its routes<p>I have an Ember application that has several routes. I however, don't want the content f... | <p>You dont. The sole purpose of the <code>application.hbs</code> is to have a place to put something that should always be visible.</p>
<p>If you want something only on the root of you app (<code>/</code>) then you should put it into the <code>index.hbs</code>.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there anyway I can use preemptible instance for dataflow jobs?<p>It's evident that preemptible instance are cheaper than non-preemptible instance. On dail... | <p>Yes, it is possible to do so with <strong>Flexible Resource Scheduling</strong> in Cloud Dataflow (<a href="https://cloud.google.com/dataflow/docs/guides/flexrs" rel="noreferrer">docs</a>). Note that there are some things to consider:</p>
<ul>
<li><strong>Delayed execution</strong>: jobs are scheduled and not execu... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Picking a Random Variable out of an Array in Javascript<p>I can't figure out what my problem is here. I'm working on this in jsfiddle. I have a div in html... | <pre><code>var spongebob='pineapple';
var patrick='rock';
var sandy = 'air dome';
var mrKrabs = 'anchor';
var house = [spongebob, patrick, sandy, mrKrabs];
var pickHouse= house[Math.floor(Math.random() * house.length)];
$('div').append(pickHouse);
</code></pre>
<p>You forgot the parenthesis in <code>Math.random()</cod... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Location of python source code in Jython/Java integration<p>I could integrate the java/jython from <a href="http://www.jython.org/jythonbook/en/1.0/Scripting... | <p>The setupPath() method should be added into the JythonObjectFactory first.</p>
<pre><code>public static void setupPath(String[] paths)
{
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.exec("import sys;");
for (int i = 0; i < paths.length; i++) {
interpreter.exec(String.... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a direct way of appending text to a DOM element with jQuery?<p>Is there a more direct way of writing the following in jQuery?</p>
<p><div class="sn... | <p>No. As you have already pointed out, the cleanest way is by modifying the property directly.</p>
<p>To do that in jQuery you can get the DOM element reference from within the object:</p>
<pre><code>var $b = $('b');
$b[0].innerText += ', World!!';
</code></pre>
<p><a href="http://jsfiddle.net/6vx97vkm/2/" rel="nof... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP: connecting calculator to GUI<p>I have made a calculator in php I have tried to use a MVC design.
The calculator is working fine but I would like to conn... | <p>With PHP alone, you'd have to send the form for each button press and keep track of the calculation options throughout the session. The GUI you may be after is simply HTML + JS + CSS. With JavaScript, the user could build the entire calculation before submitting the form (submitting the whole calculation to your PHP... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
States For Login Page<p>I found this Material UI login page example and since it is pre-styled, I want to use this one. However, I can't figure out how to st... | <p>That's because <code>state</code> is only available in class component. In functional component you have <code>useState</code> hook. You can use it as:</p>
<pre><code>import React, { useState } from "react";
export default function LoginPage() {
const [email, setEmail] = useState('');
const [password, setPassw... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cross fading several audio files using sox<p>I'm trying to cross-fade several audio files together with a 3 second cross-fade and join them together in to on... | <p>I don't know if you are aware of the <code>crossfade_cat.sh</code> script <a href="http://sox.sourceforge.net/Docs/Scripts" rel="noreferrer">offered by sox</a>. You could just use it successively:</p>
<pre><code>./crossfade_cat.sh 1 440.wav 660.wav auto auto && ./crossfade_cat.sh 1 mix.wav 880.wav auto auto... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bing Ads API - Adding more than one CampaignStatusReportFilter while filtering Reports<p>I'm trying to filter the SearchQueryPerformanceReport in the Bing Ad... | <p>For a list type you can include multiple values as flags. How you specify multiple flags depends on the programming language that you use. For example, C# treats these values as flag values and Java treats them as an array of strings. Here's a snippet in C#:</p>
<pre class="lang-cs prettyprint-override"><code>Campa... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what is a socket? Is it a process?<p>I am studying os concepts and I found socket as the end point of communication. Now what exactly is a socket? Is it a pr... | <p>From reading the Wikipedia article, I can see why you may be confused.</p>
<p>A socket is a virtual device. That is, it is a device that is written in software and has no physical device. Thus, you can read to and write from a socket, like you would do to a terminal.</p>
<p>Sockets work in pairs to communicate and... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Revisiting site optimization rules of thumb: JavaScript still necessary at the bottom with modern browsers?<p>I've been following web development trends for ... | <p>Unfortunately, parallel downloads is just <em>one of the many concerns</em> in JS optimization.</p>
<p>While your modern browser <em>can</em> download more files in parallel compared to before, the browser still parses them in sequence. If script #50 (out of a 100) doesn't download, has an infinite loop or whatever... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Power BI Miltidimensional model support<p><em>Does Power BI support AAS (SSAS) MD?</em> </p>
<p>My confusion comes from <a href="https://www.element61.be/en... | <p>The cloud service Azure Analysis Services is Tabular only, it does not support the Multi Dimensional type.
Power BI can connect to and use SSAS MD (and SSAS Tabular), but these instances will be on premise, or on a VM in Azure.</p>
<p>Hope that helps</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Connect oracle database to another database<p>I am trying to connect oracle db to oracle db
I tried to create database link on toad like this.</p>
<pre><cod... | <p>You need to provide the proper connection string as follows:</p>
<pre><code>CREATE DATABASE LINK boston
CONNECT TO admin IDENTIFIED BY mypassword
USING '(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.65)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=sales))
)';
</... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PictureBox and Paint Event<p>I have a picturebox, let's say "PB". I catch the paint event of PB in</p>
<pre><code>private void PB_Paint(object sender, Paint... | <p>Add flag (e.g. <code>f_paint_enabled</code>) in the beginning of PB_Paint and enable/disable it to control the task.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting Type Mismatch error in function as parameter in scala<p>I am facing some issues of type mismatch in scala when I am calling the <code>in_shuffle</cod... | <p>Try multiple parameter lists to aid type inference</p>
<pre><code>def n_shuffle[T](list: List[T], n: Int)(f: (List[T], Int) => List[T]): List[T]
n_shuffle((1 to 8).toList, 2)(in_shuffle)
</code></pre>
<p>or provide explicit type annotation</p>
<pre><code>n_shuffle(in_shuffle[Int], (1 to 8).toList, 2)
n_shuffle... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting ROW_NUMBER to repeat if field meets a condition<p>I need ROW_NUMBER to assign data to a specific user if a condition is met.</p>
<p>ROW_NUMBER will ... | <p>You want <a href="https://msdn.microsoft.com/en-us/library/ms173825.aspx" rel="noreferrer">DENSE_RANK</a> not ROW_NUMBER. Try this:</p>
<pre><code>SELECT DENSE_RANK() OVER (ORDER BY COMPANY) AS rownum
,Company
,Contact
FROM TABLE
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SVG image within a Batik JSVGCanvas is scaled down after rotation and setting bounding box<p>I have a problem with the rotation within a JSVGCanvas.<br>
The ... | <p>Solved...<br>
I have found the way to solve this problem: </p>
<pre><code>....
// calculating new canvas bounding box
AffineTransform at = AffineTransform.getRotateInstance(rotation*Math.PI/180.0,
originalX + originalW/2.0,
originalY + originalH/2.0);
Rectangle... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Heroku worker suddenly crashes, logs don't show any of my scripts. What happened?<p>I have a flask, gunicorn, postgresql project hosted on heroku and it sudd... | <p>Werkzeug released a new version yesterday :</p>
<p><a href="https://pypi.org/project/Werkzeug/#history" rel="nofollow noreferrer">Release history</a></p>
<p>Apparently <code>werkzeug.contrib</code> has been moved to a separate module</p>
<p>It is recommended to try </p>
<pre class="lang-py prettyprint-override">... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# NUnit using TestCaseSource results in NullPointer<p>I have the following class which is a TestFixture which has one test and a TestCaseSource that produce... | <p>You foreach over <code>allSalesDEDealIds</code> but you seem to have not included it in your code example. It might be that this is the <code>NullRefException</code>in your code?</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calling async method on button click<p>I created Windows Phone 8.1 project and I am trying to run <code>async</code> method <code>GetResponse<T>(string... | <p>You're the victim of the classic deadlock. <code>task.Wait()</code> or <code>task.Result</code> is a blocking call in UI thread which causes the deadlock.</p>
<p><a href="http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html" rel="noreferrer">Don't block in the UI thread</a>. Never do it. Just <code>aw... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reach global window variable from index.html in a Vue component<p>If i have an Stencil.js component that i load in to my Vue project like this: </p>
<p><str... | <p>The problem is that TypeScript doesn't know that property. You can solve that in several ways:</p>
<ol>
<li>Add <code>// @ts-ignore</code> on the previous line. This suppresses errors on the next line.</li>
<li>Cast to <code>any</code>: <code>(window as any).topbar</code></li>
<li><a href="https://stackoverflow.com... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
finding an ip used illegally on a network switch<ul>
<li>In our college there are many IP addresses for every labs for example
our it lab has IP range of 172... | <p>What do you mean by "which IP is being used illegally"? Do you mean someone might use an IP that is supposed for a workstation in a lab? If that is the case, then you can list all 'legal' MAC addresses of the computers in the labs and then compare with the MAC addresses listed in the ARP table of the switch.</p>
<p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
android.database.sqlite.SQLiteException: near ": syntax error (code 1): , while compiling: android programing error<p>I made an android database with two tab... | <p>You are executing the command:</p>
<pre><code>create_income_table income(
_id INTEGER PRIMARY KEY AUTOINCREMENT,
income_amount TEXT NOT NULL,
income_payer TEXT NOT NULL,
income_date TEXT NOT NULL,
income_category TEXT NOT NULL,
income_payments TEXT NOT NULL
);
</code></pre>
<p>Replace <code... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove warning in echoing a string constant in PHP<p>I declared a string constant named LABTITLE. When I tried to echo it in the title tag and run the... | <p>Define Your constant first then you can get value. looks like you are using constant value before you define.</p>
<pre><code><?php
define("LABTITLE", "Laboratory Activity No. 2");
?>
<title>
<?php
echo constant("LABTITLE");
?>
</title>
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use of undeclared type issue<p>In my last function on this code selection sample, Xcode is generating an "Use of undeclared type 'allEntries' error. I have... | <p><code>allEntries</code> is a variable and not a class. Therefore a cast like in your last line</p>
<pre><code>as allEntries
</code></pre>
<p>does not work. You must return an object from type <code>UITableViewCell</code> in <code>cellForRowAtIndexPath</code>.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create subtotal and total amount with jquery based on input text qty<p>actually how to automatically calculate the 'subtotal'and 'Total Amount' based on qty ... | <p>I updated your fiddle. I added classes to subtotal and prices and use the stop method of spinner to validate it after the value has been changed, look on </p>
<p><a href="http://jsfiddle.net/m6csdx51/5/" rel="nofollow">fiddle here</a></p>
<p>here is the stop function:</p>
<pre><code>$( ".spinner" ).spinner({
min:... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TVEventHandler not found for Android TV<p>I am trying to build an application for android tv and I wanted to use the remote movements. I first checked if the... | <p>Resolved the issue. Use this in your class Instead. And make sure to import the TVEventHandler from react-native:</p>
<pre><code>_tvEventHandler: any;
_enableTVEventHandler() {
var self = this;
this._tvEventHandler = new TVEventHandler();
this._tvEventHandler.enable(this, function (cmp, ev... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CoreDNS only works in one host in kubernete cluster<p>I have a kubernetes with 3 nodes:</p>
<pre><code>[root@ops001 ~]# kubectl get nodes
NAME ST... | <p>did you try if <code>114.114.114.114</code> is actually reachable from your nodes? if not, change it to something that actually is ;-]</p>
<p>also check which <code>resolv.conf</code> your kublets actually use: it is often something else than <code>/etc/resolv.conf</code>: do <code>ps ax |grep kubelet</code> and ch... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cython/Python/C++ - Inheritance: Passing Derived Class as Argument to Function expecting base class<p>I am using Cython to wrap a set of C++ classes, allowin... | <p>After a lot of help from the answers below, and experimentation, I think I understand how implementing basic inheritance within Cython works, I'm answering my own question to validate/improve my understanding, as well as hopefully help out anyone who in the future may encounter a related issue. If there is anything ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to open new browser window with custom headers and content?<p>I have a Sencha Touch web application. I'm trying to generate a calendar event f... | <p>If you redirect to or <code>window.open</code> a <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs" rel="nofollow noreferrer">data URI</a>, you can specify a MIME type.</p>
<p>As a simple test (Safari on iOS 6), I navigated manually to this data URI...</p>
<pre><code>data:text/calendar;base64,Qk... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP: if file doesn't exist then exit script<pre><code><?php
$filename = '/path/to/foo.txt';
if (file_exists($filename)) {
echo "The file $filename ex... | <p>As <a href="https://stackoverflow.com/users/250259/john-conde">John Conde</a> said, you should negate the <code>file_exists</code> function:</p>
<pre><code>if (!file_exists($filename)) {
exit("Your file doesn't exist");
}
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python module reusing the same object<p>This module returns a list. When I call the module with <code>ipscan.scan('192.168.11', 161)</code> the list gets app... | <p>This is simple enough, don't declare your list outside of the function. </p>
<p>Move <code>node_list = []</code> into your function definition:</p>
<pre><code>def scan(ipnet, port):
node_list = []
for x in range(1,255):
ip = '{0}.{1}'.format(ipnet, x)
t = Thread(target=probe, args=(ip, por... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Object doesn't support property or method 'okToLaunchComposition' - issue in IE11 (Edge)<p>I have an embedded object that another developer created using Ado... | <p>I got this working following this link - in a nutshell I had to update the yepnode to the 1.5.4 version that is displayed within the Site_MAP_edgePreload.js.</p>
<p>Once saved & after doing a force refresh this now works in IE 11 as well as 10 & 9.</p>
<p><a href="https://forums.adobe.com/thread/1242630?st... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to calculate ratio to the rowmean using dplyr<p>I have dataframe with quantitative values for genes in different samples and want to divide each value wi... | <p>One option would be to calculate the <code>rowMeans</code> first and create that as a column and do the <code>mutate_at</code> in the next step. Here, we are using <code>rowMeans</code> from <code>base R</code> as it is more efficient than <code>rowwise</code> or other forms or reshaping to calculate the row wise m... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transform vectory by non-static member function<p>Consider this template function:</p>
<pre><code>template<class T, class F> inline
auto transform(con... | <p>You could use a lambda to bind the object pointer:</p>
<pre><code>auto vy2 = transform(vx, [this](int x){return this->memberFunc(x);});
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what is best approch to handle data when host Activity is not active<p>I have four activity Activity1,Activity2,Activity3,Activity4. Activity2 has some opera... | <p>In Activity2 On button click:</p>
<p>1) use <code>AsynchTask</code> to fetch data.</p>
<p>2) use startActivityForResult to start activity3.</p>
<p>3) and <code>onActivityResult</code> you can check your result</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Make C# .NET MVC run in MacOS<p>So my company is requesting me to change the application that they bought from a freelance developer to run it in MacOS becau... | <p>The easiest way should be to port to .Net Core that can run on Mac and Linux. It is relatively little work to do that usually.</p>
<p>It depends of course on the packages and technologies used in your application, but a simple MVC application that does not use too much packages that are not available in Net Standar... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Define Range by Header VBA<p>I have a range definition in VBA that looks like this:</p>
<pre><code>Sheet5.Range(Range("K2"), Sheet5.Range("K2").End(xlDown))... | <p>The below example searches for the header based on the name. In the example, it colors the entire column <code>Red</code> based on match, but you can change that. The variables should be easy to follow, but please let me know of questions.</p>
<pre><code>Sub Color_Range_Based_On_Header()
Dim rngHeaders As Range... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
javascript on page load check if a span (under <tr>) with a specific class exist, if does not exist remove the entire <tr><p>I am trying to create my own gre... | <pre><code>$(document).ready(function(){
$("tr.project-details").each(function(){
var self = $(this);
if(self.find("span.verfied-badge").length==0)
self.remove();
});
});
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Retrofit - How parse array with different types of elements?<p>I receive this JSON string:</p>
<pre><code>{
"response": [
346,
{
"id": 5... | <p>Retrofit don't work wit response directly it use <a href="https://github.com/square/retrofit/blob/master/retrofit/src/main/java/retrofit/converter/Converter.java" rel="nofollow noreferrer">Converter</a> by default <a href="https://github.com/square/retrofit/blob/master/retrofit/src/main/java/retrofit/converter/GsonC... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Id of the src Image Inside the ImageView<p>Basically i am working on app like game and I have 20 Images from which one will be set as the Image "src". I want... | <p>You can use setTag() and getTag for adding and getting reference in a View.</p>
<p>To set Reference
get all image id's & imageviewids id's in an array loop as follows</p>
<pre><code> int imageid[] = new int[] { R.drawable.imageView1, R.drawable.imageView2,... };
int imageviewid[] = new int[]{R.id.imageV... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# how to pass queue parameters as values instead of the default reference<p>I have this class that accepts the queue parameter as references. I want to not ... | <p>Perhaps you should use a shallow clone (<a href="https://docs.microsoft.com/en-us/dotnet/api/system.collections.queue.clone?view=netframework-4.8" rel="nofollow noreferrer">queue supports it</a>)</p>
<pre><code>public static Deque<DateClose> SMAMethod (Queue<DateClose> queue, int period)
{
_queue = ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create a CANoe test environment using C#<p>I want to create a CANoe test environment that would do the following:</p>
<ol>
<li>Run and Stop the CANoe softwa... | <p>And I finally came up with an answer to this. Previously, I asked people on using the foreach statement with switch in it. I thought of comparing the string of the node.Name to the string value for the cases with which the xml would be equal to the test module. I got suggestions, good ones at that. And this is the o... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Insert line of text in wordpress template, only home page and under the buttons<p>I am trying to insert a line of text with a link under the page numbering o... | <p>CSS:</p>
<pre><code>nav.navigation.pagination a:after {
content: 'TEXT';
color: red; // change it as per your requirement
position: absolute;
bottom: 0;
}
</code></pre>
<p>To show it only on <code>Homepage</code> <code>.home</code> is a unique class coming only on the homepage. Hence, you can re-... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JQuery unable to post data to SPRING MVC controller<p>I am using a JQuery block to post data to a Spring controller, and here's the JQuery code</p>
<pre><co... | <p>The problem is the escaping of <code>"</code> in the stringified json data.</p>
<pre><code>$('.usr').click(function () {
var user = $(this).text();
$.post("three.htm", {
user: user
}, function (data) {
console.log(JSON.stringify(data));
//window.location.replace('five.htm');
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Compilation fo index.cshtml throws an runtime error<p>I am trying to update a private nuget package and some changes for that has lead to me an error screen ... | <p>Setting it to <code><Project Sdk="Microsoft.NET.Sdk.Web" ToolsVersion="15.0"></code> and including the following files</p>
<p><code><PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="2.2.0" /&... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Disable components in a large project<p>with a lot of developers and plenty of juniors I want to disable certain components such as <code><p:spacer></c... | <p>Basically, you can achieve this by providing a custom <a href="http://docs.oracle.com/javaee/7/api/javax/faces/application/Application.html" rel="nofollow"><code>Application</code></a> implementation (based on <a href="http://docs.oracle.com/javaee/7/api/javax/faces/application/ApplicationWrapper.html" rel="nofollow... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google Maps V2 into fragment cause cast error<p>I have created an app that view the google v2 maps succesfully into fragment; I see the map.</p>
<p>If I try... | <p>You should not write:</p>
<pre><code>inflatedView.findViewById();
</code></pre>
<p>Instead, you should write <code>getView().findViewById();</code></p>
<p>Also, I recommend using this code in order to setup the MapView:</p>
<pre><code>public class Fragment5 extends Fragment {
@Override
public View onCre... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Merging n number of lists in c# based on 2 unique ids<p>I need a suggestion on how to merge possibly more than 2 lists based on 2 key id values.
I have a lis... | <p>Here's a LINQ solution; I can't speak to how efficient it is..</p>
<pre><code>var list1 = new [] { new MyType {Id1="1", Id2="2", Value="Val1" }, new MyType {Id1="3", Id2="4", Value="Val2" }};
var list2 = new [] { new MyType {Id1="1", Id2="2", Value="Val3" }, new MyType {Id1="3", Id2="5", Value="Val4" }, new MyType ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prototypical inheritance in JavaScript<p>I am new to javascript's prototypical inheritance and js object-oriented programming. I was trying to create a base ... | <p>You want to call the method on the instance and not the Class object (e.g., <code>checking</code> not <code>CheckingAccount</code>). Also, make sure to change the constructor. For further reading, refer to the <a href="https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Inheritance" rel="nofollow nore... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make the view change without visually using a scrolling bar<p>What I am trying to do is this, I have a program and it is filled with images and these ... | <p>The easiest way to get that behavior is to make your widget the target of a <a href="https://doc.qt.io/qt-5/qscrollarea.html" rel="nofollow noreferrer">QScrollArea</a> widget. The QScrollArea will handle the keypresses and scrolling/offset-rendering for you, as well as providing scroll bars (if you want them -- if ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
KeyError: "None of [Int64Index([1960, 1961, 1962, 1963, 1964], dtype='int64')] are in the [columns]"<p>I am trying to scatter plot a dataframe and for this I... | <p>If you want to use pandas' plotting, you should pass the labels as x and y, not the data:</p>
<pre><code>df_pop_ceb.plot(kind='scatter', x='Year', y='Total Urban Population')
</code></pre>
<p>Also looking at <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.scatter.html" rel... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In ext js panel having items and it is only shown on press of f12 button or If already in debug session on close of f12 window shows the panel<p>In ext js I ... | <p>I assume that you are using a Chrome browser and pressing F12 shows/hides the developer tools. So this action resizes the viewport, forcing a refresh of the panel layout and the components become visible.</p>
<p>When adding/removing items from a panel a <a href="http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.panel.P... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do i perform q-learning in Excel?<p>I would like to get the row number and column latter in excel this is what I have:</p>
<p><img src="https://i.stack.... | <p><img src="https://i.stack.imgur.com/f02NM.png" alt="enter image description here"></p>
<p>See the image. This is structured identical, and you can see that is the formula I used.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to add a realm level protocol mapper in keycloak?<p>Keycloak allows to add custom attributes to users. However, in order for these attributes ... | <p>I would try to create <code>Client Scope</code> with mapper, which will be <code>Assigned Default Client Scope</code> on the realm level.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I reconnect to an orphaned Watir browser<p>I'm using Ruby + Watir + Cucumber for test automation.
At the start of each Feature, I launch a new browser... | <p>There are 2 potential dimensions to this question.</p>
<p><strong>First</strong>, can watir-webdriver connect to an existing web browser process that it did not spawn? No, this is not currently possible.</p>
<p><strong>Second</strong>, can multiple ruby processes connect to the same watir-webdriver? Technically it... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get window height in angular js<p>I 'm using iframe to display the contents using angularjs with ionic framework. Here, I need to give window height a... | <p>Main problem: you need to add 'px' units to <code>window.innerHeight</code> number. And the second one, variable name is <code>iframeHeight</code> not <code>iFrameHeight</code>. Fixed expression will look like:</p>
<pre><code>ng-style="{height: iframeHeight + 'px'}"
</code></pre>
<p><strong>Demo:</strong> <a href=... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Recursive boolean function to check if a string is a palindrome<blockquote>
<p>Write a recursive boolean function that returns 1 if a string is a palindrom... | <p>So, your current code almost works. The only issues that I see is that in one case you return before you revert the changes in the string. Also, you have an off by one error in your indexing.</p>
<p>Let's also note some stylistic fixes:</p>
<ol>
<li><p><code>*(str + 1)</code> really should be <code>str[1]</code>. ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
laravel: config file name convention?<p><code>foo_constants.php</code> or <code>fooConstants.php</code>?</p>
<p>It seems laravel would do some name conversi... | <p><code>foo.php</code></p>
<p>Why specify <code>constants</code> at all? Convention I've generally seen is single word filenames. I think in general most 'config' type settings will be constant in an environment even if it is variable between environments.</p>
<p>Take a look at the <a href="https://github.com/aws/a... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to scale a bunch of svg-elements to 100% of viewport<p><br>
meanwhile I've read a lot of sites about viewbox, viewports and svg scaling.<br>
I have an sv... | <p>I don't know if you realize but your SVG is also changing size (specifically its width as you scroll)? (I added a blue border to the <code><div/></code> and black border to the <code><svg/></code>)</p>
<p>On load:</p>
<p><a href="https://i.stack.imgur.com/lIi6E.png" rel="nofollow noreferrer"><img src="... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Define an empty object type in TypeScript<p>I'm looking for ways to define an empty object type that can't hold any values.</p>
<pre class="lang-js prettypr... | <pre><code>type EmptyObject = {
[K in any] : never
}
const one: EmptyObject = {}; // yes ok
const two: EmptyObject = {a: 1}; // error
</code></pre>
<p>What we are saying here is that all eventual properties of our <code>EmptyObject</code> can be only <code>never</code>, and as <code>never</code> has no representi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create a (text) file using FolderBrowserDialog<p>I created a notepad, however i want to save the file using the FolderBrowserDialog. Now i can't save the fil... | <p>a few things here to cause problems:</p>
<ul>
<li><p><code> <code>string[] files = Directory.GetFiles(openfiledalog1.SelectedPath);</code></code></p></li>
</ul>
<p>Here you read the existing files in that directory. I thought you wanted to <em>create</em> a file? IN that case you provide a destination path, e.g... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using a session wrapper in ASP.Net Core Razor Pages<p>To improve the session handling in our application, we wanted to create a wrapper class which manages s... | <p>We decided to use the dependency injection functionality of ASP.Net Core, since it seemed perfectly suitable for the job. To access the session inside of a service the <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-context?view=aspnetcore-3.1" rel="nofollow noreferrer">IHttpContextAccessor</... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make CSS border show on radio button click<p>I want to have a border show up around the image next to the radio button, when that radio button is clic... | <p>here is a solution who sweets your needs : </p>
<p><strong><a href="http://jsfiddle.net/jred10v7/" rel="nofollow">Live Demo</a></strong></p>
<pre><code>input:checked ~ img {
border: 2px solid #f00;
}
label, img {
position: relative;
top: -80px;
}
label, input[type=radio] {
top: 60px;
}
</code>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
A Fundamental Query about Inheritance using two classes in Java<p>Kindly consider the following code in Java:</p>
<pre><code>class a
{
int i = 10;
i... | <p>You're upcasting an instance of class <code>B</code> to an instance of class <code>A</code>.</p>
<p>After performing</p>
<pre><code>a1 = b1
</code></pre>
<p>then you technically can't access fields of <code>b1</code> through the variable <code>a1</code>. That's because <code>a1</code>, whether or not it "comes" f... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What's the difference?< for item in list> and <for i in range(len(list))><pre><code>>>> n = [1, 2, 3]
>>> for item in n:
... item *= 2
... | <p>If it helps, the first loop is equivalent to:</p>
<pre><code>for i in range(len(n)):
item = n[i]
item *= 2
</code></pre>
<p>In other words, it first binds <code>item</code> to the <code>i</code>-th element of the list, and then rebinds it to a new object whose value is double that of the <code>i</code>-th el... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using dplyr to select a range based on a grouping variable in a separate data.frame<p>I want to slice up a <code>data.frame</code> containing an irregularly ... | <p>Here is an option with <code>Map</code></p>
<pre><code>res1 <- do.call(rbind, Map(function(x, y, z)
data.frame(foo[x:y,], ID = as.character(z), stringsAsFactors = FALSE),
findInterval(bar$xMin, foo$x),
findInterval(bar$xMax, foo$x), bar$ID))
all.equal(res1, res)
#[1] TRUE
</code></pre>
<hr>
<p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reg not starting vbscript<p>I've got registry entries inside of a .reg file. The reg file is for making a URI Scheme. It worked when I was passing %1 argumen... | <p>This works:</p>
<pre><code>WshShell.Run "Apps.bat /foo", 0
</code></pre>
<p>If you want to separate your program path which may include spaces from the command line you could try this:</p>
<pre><code>WshShell.Run """Apps.bat"" /foo", 0
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Helm vs Batch kubernetes deployments<p>I am learning kubernetes.
I have a few simple containers with secrets. Lets say I have two services , I can put them ... | <p>In comparison to bash / shell based kubectl apply -f for a list of manifests, helm offers:</p>
<ul>
<li>atomic role out</li>
<li>templating (conf injection)</li>
<li>upgrade and atomic role back</li>
<li>atomic deletion of all associated ressources</li>
</ul>
<p>Basically helm offers the ability to create deployme... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Conditional with list comprehension (NOT list comprehension with conditional) in python<p>Just thought I would specify in the title, because I have found the... | <p>Use <code>any</code>:</p>
<pre><code>if any(abs(value - any_x) > 100 for any_x in x):
...
</code></pre>
<p>Don't use a list comprehension here as any will return <code>True</code> on the first <code>True</code> value it finds. Thus providing it a generator is the most efficient method as it will be lazily e... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RewriteCond for homepage not working<p>I am attempting to apply a RewriteRule to a homepage. I'd expect the following rule to find only the homepage...</p>
... | <p>Sometimes, and I'm honestly not sure why, you'll notice mod_dir get applied to the URI <em>before</em> mod_rewrite. It's supposed to but I've noticed that <code>^/$</code> work sometimes, and sometimes even <code>^$</code> works in the rewrite rule. What's going on is the <a href="http://httpd.apache.org/docs/curren... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python match string to string exactly<p>Given a string, I want to identify whether a two strings are within it. For example, given "The dog barks loudly .", ... | <p>You could use word boundary <code>\b</code> (<em>which matches between a word character and a non-word character</em>) instead of space <code>\s</code>. And also you need to define all the regex patterns as raw string.</p>
<pre><code>if re.search(r'\b'+word+r'\b', str1) and re.search(r'\b'+otherWord+r'\b', str1) an... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google Maps V2: Does rotating the map change the orientation of TileOverlays?<p>Background: I want to draw several Polygons on a map (few thousand coordinate... | <p>The tile will be rotated together with the map. The TileProvider will not get aware of the rotation at all. While drawing the tile is always oriented north up. You may have a look at the answer to this SO question for a very handy tile provider: <a href="https://stackoverflow.com/questions/20382823/google-maps-api-v... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
sshpass doesn't work with SSH ProxyCommand option<p>I am trying to automate SSH login for a SSH tunnel using a proxy:</p>
<ol>
<li>I do not want to use the ... | <p>To use expect:</p>
<pre><code>spawn ssh -fN -o StrictHostKeyChecking=no \
-o "ProxyCommand=nc -x localhost:8888 %h %p" \
-R *:$rport:$localhostname:$nport \
$username@$hostname
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Android studio button taking me to wrong activity<p>I'm relatively new to Android Studio, this is my 2nd project. I'm currently having an issue that just rec... | <p>Issue is here - </p>
<p>you are getting id of <code>view_logs_button</code> but applying click on <code>create_account_button</code>(you apply clicl listener on <code>create_account_button</code> 2 times so its taking latest click listener) and redirecting to <code>ViewLogActivity</code>. </p>
<pre><code>Button vi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I count the words in a string using only loops and string.strip()?<p>So this is the function I have so far. It's supposed to read a text file and retu... | <p>Since your words are separated by spaces, <code>split()</code> will work for you.
Check this:</p>
<pre><code>#!/usr/bin/python
# -*- coding: utf-8 -*-
def main():
textFileName = 'C:\\temp\\001.txt'
total = 0
for line in open(textFileName):
total += len(line.split())
print(total, "words")
m... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
iOS8 UILabel dynamic width with constraints<p>I am working on an app, where I am currently stuck on using autolayout on my UICollectionViewCell. Inside the c... | <p>You want these constraints:</p>
<pre><code>Container -> Label: = 20
Label -> Left Image: > 20
Left Image -> Right Image: = 20
Right Image -> Container = 20
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible, in Elasticsearch, to do a temporary POST to an index?<p>I would like to know if I can temporarily save a document to an index, and when I wan... | <p>There is no out the box way do it but this is how I would do it :</p>
<ol>
<li>You can create a new index , to store the temporary documents.</li>
<li><p>Create an alias that covers both the temp index and the existing index, this will allow you to test your query locally.</p></li>
<li><p>when you are ready to "Rel... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get an Integer from a String (contains letters and number)?<p>Here is an example of what I'm trying to do:</p>
<pre><code>String letternumber = "Exam... | <p>You need to use Pattern and Matcher Classes.</p>
<pre><code>String s = "Example - 123";
Matcher m = Pattern.compile("\\d+").matcher(s);
while(m.find())
{
int num = Integer.parseInt(m.group());
System.out.println(num);
}
</code></pre>
<p>Output:</p>
<pre><code>123
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Centre aligning a div using viewport coordinates<p>I am learning <code>CSS</code>, I am new to this field. Please excuse me if my questions is naive.</p>
<p... | <p>You can do this:
Give max with and then subtract 10% (5% each side), then center square with margin auto.</p>
<p><strong>CSS</strong></p>
<pre><code>.square {
background-color: blue;
width: calc(100vw - 10%);
height: 100vh;
margin: 0 auto;
}
</code></pre>
<p><strong><a href="https://jsfiddle.net/l... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Possible to define a parameter as string OR array?<p>Is there a way I could write a php function that could contain a parameter which could be either a strin... | <p>PHP is a loosely typed language, thus your parameters can be any type. You can also write PHP docblock comments if you want to specify the type(s) the function is expecting. <a href="http://phpdoc.org/docs/latest/glossary.html#term-structural-elements" rel="nofollow">phpdoc</a> is a good resource. Note, though, that... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Odd behavior in C++ program<p>I am writing a program that I allow the user to specify an input file to open and when I test with incorrect file names, the pr... | <pre><code>while (!openfile(inputFile))
openfile(inputFile);
</code></pre>
<p>What this does is attempt to open the file twice each iteration, as long as the first attempt fails. Also, you need to make sure that <code>inputFile</code> is closed before attempting to open it again since it appears that you're reus... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
bash variable substitution and quoting<p>Perhaps it's a simple question, but I'm wondering how quotes work with variables. Do quotes around a variable's valu... | <p>From <a href="https://www.gnu.org/software/bash/manual/bash.html#Shell-Expansions" rel="nofollow noreferrer">bash manual Shell Expansions</a> emphasis mine:</p>
<blockquote>
<p>The order of expansions is: brace expansion; tilde expansion, parameter and <strong>variable expansion</strong>, arithmetic expansion, and c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular does not render facebook post with browser back/forward button<p>I have been developing profile page showing facebook posts.
But my posts won't be re... | <p>I have resolved by myself.</p>
<p>for someone who has same issue as me.</p>
<p>I used facebook javascript sdk instead of ngx-facebook as below.</p>
<p><strong>index.html</strong></p>
<pre><code><script
async
defer
crossorigin="anonymous"
src="https://connect.facebook.net/ja_JP/sdk.js#xfbml=1&a... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to modify RTF file with images from the code<p>I have template of document in RTF format and it contains some text and some images (created with WordPad,... | <p>The <code>TRichEdit</code> control won't load images. So, you won't have any success that way. In any case, <code>TRichEdit</code> is for display and editing of rich text. It is not intended for background document processing. A visual control is simply wrong here.</p>
<p>The simplest way to achieve your goals will... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wrong animation of layer's y position when using a UINavigationController and UINavigationBar<p>I setup and customize the <code>UINavigationController's</cod... | <p>Animating <code>kPOPLayerPositionY</code> controls the y value of the position of the center of the layer, not the origin on the frame. The following should work:</p>
<pre><code>positionAnimation1.toValue = @(36 + 116 * 0.5);
</code></pre>
<p>For the error with velocity that you mention earlier, this is because th... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript Counter for Cumulative Hours<p>We need to get a counter to work to show our cumulative hours but I can't seem to get it to go. It was working on a... | <p>I got it to work. The problem was that I was trying to get it to work in Wordpress. I can't use $ in wordpress so I had to replace it with jQuery:</p>
<pre><code>//update next three variables once per week using current fleet data
var START_DATE = new Date("February 17, 2015 23:59:00"); // the date and time when ru... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CloudFormation Stacks with Exported Values and Taskcat<p>I have a bunch of stacks I'm trying to test with Taskcat in our CI pipeline, but some of these stack... | <p>At the moment, no, but it's in our backlog. See this GitHub issue for tracking. </p>
<ul>
<li><a href="https://github.com/aws-quickstart/taskcat/issues/322" rel="nofollow noreferrer">https://github.com/aws-quickstart/taskcat/issues/322</a></li>
</ul>
<p>We'll post updates there, including the development build ver... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to filter down to frequent words in text and omitting non frequent words in matlab<p>i am extracting words from text file along with there frequencies in... | <p>There is absolutely no reason to make <code>counts</code> a cell array. Simply use it to determine those counts that are <code>>= 3</code>, then index into your <code>words</code> array:</p>
<pre><code>out_words = words(counts >= 3);
</code></pre>
<p><code>out_words</code> should contain those words where t... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to put data on separate lines in python<p>This is my code:</p>
<pre><code> if mode == "1" and classname == "1":
f = sorted(open("alphabetica... | <p>Change your </p>
<pre><code>print(f)
</code></pre>
<p>To</p>
<pre><code>print(''.join(f))
</code></pre>
<p>The string <code>''.join()</code> method takes a list (or other iterable) of strings, and joins them into one big string. You can use any separator you like between the substrings, eg <code>'---'.join(f)</c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Copy files inside of docker container before volumes are created (Solr docker image with custom configuration)<p>I need to create docker container with Solr ... | <p>You can add your commands to your docker compose file (
<a href="https://docs.docker.com/compose/compose-file/#command" rel="nofollow noreferrer">https://docs.docker.com/compose/compose-file/#command</a>)</p>
<pre><code>version: '3.3'
services:
solr:
image: "solr:7.3.1"
ports:
- "8983:8983"
volumes:
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PERCENTILE By Header Name<p>I need to use PERCENTILE within excel</p>
<p>What I need to do is search the headers for a name and then do the PERCENTILE on th... | <p>Use INDEX/MATCH within the PERCENTILE, something like the following:</p>
<pre><code>=PERCENTILE(INDEX(A2:C10,,MATCH("Header 2",A1:C1,0)),0.2)
</code></pre>
<p><a href="https://i.stack.imgur.com/s1M4T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s1M4T.png" alt="enter image description here"></... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does the Android Gradle plugin support loading native libraries via Maven?<p>Let's say I have setup the following for all architectures:</p>
<pre><code><... | <p>Yes, you can integrate .so's from a maven artifact. </p>
<p>The proper way to do this is to make an <strong>aar</strong>: <a href="http://tools.android.com/tech-docs/new-build-system/aar-format" rel="nofollow">http://tools.android.com/tech-docs/new-build-system/aar-format</a></p>
<p>You can put your .so files insi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.