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:
Laravel, add different html attributes to the options in select drop-down Lists<p>Is there a way to add HTML attributes to an option in a dropdown select wit... | <p>The default <code>Form::select()</code> helper will does not support what you're requesting, but you can add additional Form helpers using a <a href="http://laravel.com/docs/4.2/html#custom-macros" rel="nofollow noreferrer">Macro</a>:</p>
<pre><code>Form::macro('fancySelect', function($name, $list = array(), $selec... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ruby - Why is it possible to use Instance variables like everywhere<p>I'm into Ruby on Rails programming for almost 5 weeks now.</p>
<p>I was wondering why ... | <blockquote>
<p>I was wondering why people always use <strong>instance variables</strong> instead of <strong>locale ones</strong>.</p>
</blockquote>
<p>I'm not sure how you get that impression. I certainly don't "always" use instance variables. I use instance variables when I need an instance variable, and I use loc... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Still struggling with class scope<p>I am still not fully understanding the scope of classes very well. I have read up on this and and I have been trying to ... | <p>I'd do it this way: write a method in <code>MainView</code> for opening a numbered page (0 ...):</p>
<pre><code>def open_page(self, page_number):
# enable all except the button for this page.
for i, button in enumerate(self.buttons):
if i == page_number:
button.config(state=DISABLED)
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
php sessions not storing data<p>I'm currently having trouble with storing session data.
For some reason my sessions start and I can see it as a cookie but wh... | <p>It could be that $firstname is failing to be set. Try changing <code>$_SESSION['user_firstname'] = $firstname;</code> for example, to <code>$_SESSION['user_firstname'] = "TEST";</code> and see if it stores that. If so, you're not giving $firstname a value.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
2D Vector of Class gets error when accessing function<p>After converting my 2D array to a 2D vector (due to all the praise I heard about it), my program brea... | <p>You have a 2D vector of pointer-to-Dog but are not allocating any <code>Dog</code> objects. When you initialize the 2D vector the pointers are initialized to <code>nullptr</code>. Dereferencing a <code>nullptr</code> is undefined behaviour.</p>
<p>Unless you have a good reason not to, I suggest you just have a 2D v... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transform list of one items type to list of another items type<p>Android Studio 3.6</p>
<p>Snippet:</p>
<pre><code>private fun createHistoryList(participan... | <p><code>List</code> already provides <code>.map()</code> you can use:</p>
<pre><code>fun createHistoryList(participantsEffectResourceList: List < ParticipantsEffectResource > ) {
val historyList = participantsEffectResourceList.map {
MyHistoryItem(it.operation.appliedAt, it.operation.details)
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reset value in Firestore automatically<p>My app manages some properties and theirs monthly rents. The user (or the landlord) has the option to select this da... | <p>You can create a Scheduled Function on a which triggers on the first day of the month, however, the issue here is the time zone. You would need to have a way to distinguish the user timezone, you can do this as you mention when they log in and storing it in Firebase, of you could create a subcollection of all users ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
angular 8 sum x number + x number for n times<p>i'm trying to sum a number with same number for N times, for example:</p>
<p>i want to sum 5 + 5 for 5 times... | <p>Since we did not increase the number so <code>number + number</code> remains 10 always. Here we using running counter <code>i</code> to make use of we can achieve the functionality with simple math logic</p>
<pre><code>function sumxtimes(number, times) {
let i = 1;
let acc = 0;
while (i < times + 1) {
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Test if a method exists in entity from twig<p>I want to edit the default form template to include a thumbnail preview of an image when I display an upload fi... | <p>You can create a custom fragment only for that field. So you don't have to check if the method exists or not <a href="http://symfony.com/doc/current/cookbook/form/form_customization.html#how-to-customize-an-individual-field" rel="nofollow">http://symfony.com/doc/current/cookbook/form/form_customization.html#how-to-c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to delete only few elements in Node List?<p>I have a function <code>clearBoth</code> where I grab all elements with class 'clear' and remove them. Howeve... | <p>Why not try using a combination of <code>:not</code> and an <code>nth-range</code>? This will select every element with the exception of the last two:</p>
<pre><code>document.querySelectorAll('.clear:not(:nth-last-child(-n+2)');
</code></pre>
<p><s>Additionally, your forEach will not work. Reason being, you're try... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ajax request to get data from php file?<p>I have been researching on how to make an Ajax request and came up with this:</p>
<pre><code>function ajax_post(){... | <p>I added some html to the php file and everything loads except the php file (php appeared as a comment). Then, I came up with the idea to compare the php file I created with the other php files on my local server. I identified a little difference. The other php files do not close the php, i.e. <code><?php echo 'He... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why won't my EnumWindowProc compile in C?<p>I am trying to write a function that returns a HWND from a process ID but there is one small problem. I am gettin... | <p>The C language does not support the reference declaration on variables, only C++ does, thus <code>window_data &data</code> is invalid. </p>
<p>If you want to do this in standard C, you can change to a pointer casted version instead:</p>
<pre><code>BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
w... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Append more results to table on button click<p>I have made an application that searches my database for a transaction date and shows results. At the moment I... | <pre class="lang-cs prettyprint-override"><code> async Task MoreResults()
{
var nextTransactions = await searchService.SearchNextResults(searchTerm, pagination);
transactions.AddRange(nextTransactions);
StateHasChanged();
}
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Custom JUnit RunnerBuilder<p>How can I tell JUnit to use a custom <code>RunnerBuilder</code> implementation of my own creation?</p>
<p>Using a custom <code>... | <p>Following @Duncan's suggestion I didn't bother with a <code>RunnerBuilder</code> and instead opted to have my <code>Runner</code> implementation do annotation look-ups itself.</p>
<p>In this instance I have one runner delegating to another, defined by an annotation, and also using another annotation to define class... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I type parameterize a struct that doesn't use that type directly?<p>In the past this code compiled, but recently it no longer is accepted (I believe ... | <p>You haven't shown enough code to rule this out, so I'd suggest moving your type to the function(s):</p>
<pre><code>impl VertexBuffer {
pub fn new<V: Vertex>(data: &Vec<V>) -> VertexBuffer<V> {
let buffer_id = unsafe {
let mut id: GLuint = 0;
gl::GenBuffer... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issue with fetching Core Data managed object using NSPredicate by object's enum attribute<p>I have an issue with fetching a Core Data managed object which ha... | <p>After struggling with this problem for many hours finally I have managed to solve it. </p>
<p>Here is what I have done to solve the problem in chronological order:</p>
<ol>
<li>I have changed the type of <code>bookTypeValue</code> from <code>Int16</code> to <code>Int32</code>, because I could not see a format spec... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Leaflet Popup not registering click events<p>I am trying to embed an interactive image carousel within a Leaflet popup but any content I place within the pop... | <p>Add a click event on the DOM element when you open the popup.</p>
<pre><code> function displayMarkerMessage(){
var popup = document.getElementsByClassName('leaflet-popup-content-wrapper');
if(popup != null && popup.length > 0){
L.DomEvent.off(popup[0]); //to reset all events on the popoup, ma... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
many-to-many relationships with fields in a RESTful API<p>I post the same unanswered question <a href="https://stackoverflow.com/questions/6324547/how-to-han... | <p>I think you should use </p>
<pre><code>/registrations/
/registrations/player:{pid}/
/registrations/team:{tid}/
/registrations/{rid}
</code></pre>
<p>So you should add a relationship resource and use flatten URI instead of creating a nested URI which is not so consistent if you want not just read, but modify this k... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transfer Specific Columns from .txt to Excel<p>I am trying to transfer the data in this .txt file into a spreadsheet.</p>
<p><a href="https://i.stack.imgur.... | <p>Another approach would be to process the text file before and return in the sheet as many columns you need:</p>
<pre><code>Sub CopyLessColumns()
Dim strSpec As String, i As Long, colToRet As Long
Dim arrSp As Variant, arrRez() As String, arrInt As Variant, j As Long
Dim fso As Object, txtStr As Object, strText A... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MIME type not supported on Azure Data Factory ODATA<p>I decorated my Controller class with [Produces("application/json")] to enforce JSON output, but did not... | <p>Thanks Leon. I was able to resolve the issue. My ODATA API (Multi-Tenant App) was in a different Tenant and the Data Factory was in a different Tenant. In my API, the ValidateIssuers was set to true and the ValidIssuers was assigned correctly - array of valid tenants. Even then this was breaking it. I set the Valida... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Redirect to external URL with return in laravel<p>I am trying to send one time password to a user using SMS INDIA HUB API.
For that purpose I need to redirec... | <p>You should be able to redirect to the url like this</p>
<pre><code>return Redirect::to($url);
</code></pre>
<p><a href="http://laravel.com/docs/4.2/responses#redirects">You can read about Redirects in the Laravel docs here.</a></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
not able to install a package with composer<p>Hello and Thanks in advance.
I am trying to install a package with composer but at first it gave me an error ab... | <p>After further searching I found out that This package is no longer supported by laravel v6 and in <strong>packagist</strong> I found this:</p>
<blockquote>
<p>This package is abandoned and no longer maintained. The author suggests using the laravelcollective/html package instead. </p>
</blockquote> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to link lapack with CMake and Visual 2013?<p><strong><em>Abstract :</strong> I created a simple c++ example using lapack. I can't compile it with CMake a... | <p>Answering my own question.</p>
<p>As rubenvb anticipated, the symbols weren't present in the library as expected. The problem is documented as "Fortran Name Mangling". In order to detect the configuration of the library with CMake, I modified my test example as following :</p>
<pre><code>#include <iostream>
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JQuery Login div<p>I'm trying to make a JQuery Login div. You just have to click a button, then, a background of 100% width/height appears with a center div.... | <p>There is no <code>#login</code> provided with your html, seems you may need to create it. But, your fade selectors are definitely incorrect.</p>
<pre><code>$(function() {
$('#login').on('click', function() {
$('#background_login').fadeIn('slow');
});
$('#cerrar_login').on('click', function() {... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OCamlbuild not resolving subdirectory dependency<p>I have an OCaml project and I'm running into a weird issue.</p>
<p>The directory structure looks like thi... | <p>It a funny issue: not <code>TemplateTest</code> but <code>Templatetest</code>. For the former name, you module file should be named <code>templateTest.ml</code></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fixed div crashes scroll on page<p>I have a fixed <strong>div</strong> in my <strong>HTML</strong>, and the problem is that I can't <strong>scroll</strong> i... | <p>Try this...</p>
<pre><code>.head {
background-color:rgba(0, 0, 0, 0.72);
width: 100%;
height: 50%;//change it
position:fixed;
background-repeat: repeat;
z-index:10;
overflow-y: scroll;//add this line
}
</code></pre>
<p>Demo:<a href="http://jsfiddle.net/u6r0xpLj/" rel="nofollow">http://j... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problems with Applicative-style Parsec<p>I have the following ADT:</p>
<pre><code>type Program = [Expr]
data Expr =
Num Int
| Bool Bool
| Bindin... | <p>Your problem is that <code><$></code> and <code><*></code> etc. are left associative. This means that your line:</p>
<pre><code>binding = Binding <$> word <* (spaces *> string "is" *> spaces) *> expr
</code></pre>
<p>will be interpreted as</p>
<pre><code>binding = (Binding <$> ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Displaying two divs inline. Why does display:inline have to be in the nested div?<p>Here is my css:</p>
<pre><code>#help-someone {
font-size: 16px;
text... | <p>To answer your questions:</p>
<ol>
<li>display inline block needs to go in the complete-loan element, otherwise it would display as a block level element. You could also apply this to the #help_someone id, but it is not necessary.</li>
</ol>
<p>Inline block allows containers to display inline, but be formatted usi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL search query using LIKE and WHERE<p>I need your help. </p>
<p>This is my Products Table:</p>
<pre><code> id name type
1 item 1 ... | <p>use <code>AND</code> instead of <code>OR</code></p>
<pre><code> SELECT * FROM products
WHERE type = 'A'
AND name LIKE 'item%';
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Socket.io is not defined in console when hosted<p>I am a newbie to socket.io and hosting on a Raspberry Pi so I come here to ask help!
I currently want to ru... | <p>There's should be a correct link to <em>socket.io</em> at your frontend code. I suppose your path to script is the following one:</p>
<pre><code><script src="/socket.io/socket.io.js"></script>
</code></pre>
<p>Try this one:</p>
<pre><code><script src="https://cdnjs.cloudflare.com/ajax/libs/socket.i... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
EV SSL cert for custom domain listed as SAN fails to upload<p>I've been attempting to get a certificate uploaded for a Parse custom domain. It is an EV certi... | <p>From the Parse.com docs, at the end of the section on hosting:</p>
<blockquote>
<p>Multi-domain SSL certificates are not currently supported.</p>
</blockquote>
<p>Hopefully this thread will keep someone from making my mistake -- buying an EV Multi-Domain cert and expecting Parse to accept my custom domain define... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does CPU time slicing work on Node.js with or without worker thread if there's only 1 cpu core?<p>Since Node.js 10.5, they introduced the new worker thread w... | <p>Worker threads are advertised as</p>
<blockquote>
<p>The Worker class represents an <strong>independent</strong> JavaScript execution <strong>thread</strong>.</p>
</blockquote>
<p>So something like starting another NodeJS instance but within the same process and with a bare minimum of a communication channel. ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Updating a record through the rails console when using the Apartment gem<p>I'm working on a multi-tenant application via the Apartment gem. Everything is wor... | <p>As far as I know, there are two ways to accomplish this. </p>
<ol>
<li>Adding logic inside the specific tenant <a href="https://github.com/influitive/apartment#switching-tenants" rel="nofollow noreferrer">reference</a></li>
</ol>
<p>For example, </p>
<pre><code>Apartment::Tenant.switch('tenant_name') do
@alerts... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sidebar list with cakephp<p>I want to make a sidebar list so when the user click on the item all the information that related to this item is viewed in a spe... | <p>The best way to do that is using Extending Views it allows you to warp one view to another .Combining this with view blocks gives you a
powerful way to keep your views DRY. </p>
<p>for more details visit those links :</p>
<p><strong>Extending Views :</strong> <a href="http://book.cakephp.org/2.0/en/views.html#exte... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Implementing __next__ in a custom class<p>I have a class that looks like this</p>
<pre><code>Class myClass:
def __init__(self, key, value):
sel... | <p>There's no reason for you to implement <code>__next__</code>. You can use <code>__iter__</code> to return a generator which will do what you want.</p>
<pre><code>class Pair(object):
def __init__(self, key, value):
self.key = key
self.value = value
def __iter__(self):
return (v.key ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
chromecast debugger works, but does not show anything?<p>I recently installed a chrome-cast device and enabled the debugger mode on that device. Send the rec... | <p>Did you click on the shield icon next to the star in the url box? Do that and accept the content from unsafe source and that should make it work for you.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OpenShift: Add SCC to Service Account in Yaml<p>Is there an equivalent for the following command in yaml? Using OpenShift 4.2 currently</p>
<pre><code>oc ad... | <p><a href="https://docs.openshift.com/container-platform/4.2/authentication/managing-security-context-constraints.html#security-context-constraints-example_configuring-internal-oauth" rel="nofollow noreferrer">There</a>'s example of SCC.
You have to add element to 'users' list, so you can export the SCC and re-apply ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SUM(column) / COUNT(column) not working in Excel PivotTable<p>I have a PivotTable in Excel, and I'm trying to add a custom field with a custom calcuation, bu... | <p>Instead of using a calculated field like this, put another Value in your pivot table and make it the Average of Ordered.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using the ArrayAdapter class<p>Method-1: ArrayAdapter(Context context, int resource, T[] objects)
</p>
<p>Method-2: ArrayAdapter(Context context, int resour... | <p>You use method 2 if the id of your text view isn't the default id. If it is, then using method 1 is perfectly fine.</p>
<p>As a style thing I prefer to use method 2 at all times though, just to be clear about what the id is so a maintainer doesn't need to remember it or look it up.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PNG loses transparency when converting from a Bitmap<p>I load a png file into a TPNGImage, and then display it in a TImage. No problem. Then I create a TBitm... | <p>I can confirm what @SertacAkyuz said in the comments. There is no problem with:</p>
<pre><code>Bmp.Assign(PngImage);
</code></pre>
<p>The result is a 32bit image that preserves the alpha channel. The problem is with</p>
<pre><code>PngImage2.Assign(Bmp);
</code></pre>
<p>Where the alpha is lost.</p>
<p>I found t... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to include style, js, meta etc elements into <head> section from a single file using jQuery?<ul>
<li><strong>What I already know:</strong></li>
</ul>
<p... | <p>Html</p>
<pre><code><head>
// we can append here
</head>
</code></pre>
<p>Jquery</p>
<pre><code>$('head').append('<link rel="stylesheet" type="text/css" href="signupjs/reveal.css">');
$('head').append('<script type="text/javascript" src="signupjs/jquery.reveal.js"></script>');
</c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
De-Serialize JSON to different elements based on content of element<p>I am trying to parse into different items a JSON file that has items with the following... | <p>Instead of deriving your <code>ItemConverter</code> from <code>CustomCreationConverter<T></code>, derive it from <code>JsonConverter</code>; then you will have access to the JSON via the reader. You can load the object data into a <code>JObject</code>, then inspect the <code>group</code> property to determine... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why can't I call a generic function with a union type parameter?<pre><code>interface A {
kind: 'a';
a: string;
}
interface B {
kind: 'b';
b:... | <p>This feels like a bug in TypeScript to me, perhaps similar to <a href="https://github.com/microsoft/TypeScript/issues/29479" rel="nofollow noreferrer">microsoft/TypeScript#29479</a>. It looks like <a href="http://www.typescriptlang.org/docs/handbook/advanced-types.html#inference-from-mapped-types" rel="nofollow nor... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Batch - How to Echo %%Variable%%<p>I have a small problem with a batch file I'm working on.</p>
<p>Here's a simple sample:</p>
<p>I would like to get the s... | <p>The reason that <code>%%result%%</code> gives you <code>%result%</code> on the output is that the <code>%%</code> tokens are interpreted <em>first,</em> and further interpretation is not done.</p>
<p>However, you can use that to your advantage, doing a <em>second</em> level of indirection with the following trick:<... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HashMap messes up the order of its own elements<p>Simple as the title, I searched it up already, and I didn't find anything about this issue, I'm pretty sure... | <p>There are different Map types, giving different guarantees about their key order (see <a href="https://stackoverflow.com/questions/2889777/difference-between-hashmap-linkedhashmap-and-treemap">this</a>).</p>
<p><a href="http://docs.oracle.com/javase/7/docs/api/java/util/HashMap.html" rel="nofollow noreferrer"><code... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get @HostListener to wait before starting<p>I'm using @HostListener scroll event for angular, and I'm hoping to find a way that I can get it to wait 3 second... | <pre class="lang-js prettyprint-override"><code> import { Subject, Observable } from 'rxjs';
import { delay, concatMap } from 'rxjs/operators';
// Delay amount (ms)
const DELAY = 3000;
</code></pre>
<p>...</p>
<pre class="lang-js prettyprint-override"><code> // Setup
private readonly eventStrea... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Remove td that doesn't have an id or class<p>I have a sort of simple problem but can't for the life of me figure it out...</p>
<p>I would like to remove an ... | <p>Try this:</p>
<pre><code>$(".sch").find('#hlp').closest('td').remove();
</code></pre>
<p>or as ids are unique so you can directly do this:</p>
<pre><code>$('#hlp').closest('td').remove();
</code></pre>
<p><div class="snippet" data-lang="js" data-hide="true">
<div class="snippet-code snippet-currently-hidden">
<p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get random term page from a specific category with wiki api<p>I am trying to get a random <em>term</em> article from the wikipedia. The <a href="http://www.m... | <p>Well yes, but not through the proper API. There is a special page in MediaWiki that allows for something like this: <a href="https://en.wikipedia.org/wiki/Special:RandomInCategory" rel="nofollow">https://en.wikipedia.org/wiki/Special:RandomInCategory</a></p>
<p>However, it does not take parameters. But there is als... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
grouping in twos with ng-repeat<p>I'm using bootstrap to format my edit info page for a web app I'm making. I want to display the fields in two columns. I al... | <p>I once had the same problem</p>
<p>i havent been able to try any thing in angular view , but i got it done with java script </p>
<p>for example you have $scope.items as</p>
<pre><code>$scope.items = [{},{},{},{},{},{}];
</code></pre>
<p>After Grouping You will have</p>
<pre><code> $scope.items = [ [{},{}], [{},... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Join two values of a hash to form a hash in ruby<p>I have a hash with keys, "parameter_name" and "parameter_value", and want to produce a hash with one key-v... | <blockquote>
<p>I have a hash with keys, "parameter_name" and "parameter_value", and want to produce a hash with one key-value pair, the value of "parameter_name" being the key and the value of "parameter_value" being the value.</p>
</blockquote>
<p>To get the value of <code>"parameter_name"</code> you'd use: (given... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Include axes labels when saving plot from MATLAB GUI<p>I have written the following code to try and retrieve ONLY the axes and its plot from my MATLAB GUI. <... | <p>I would do it using the <code>rect</code> option of the <code>getframe</code> function.</p>
<p>Basically you can provide a 2nd input argument to <code>getframe</code>, which then captures the content of the rectangle specified as argument. The nice thing is that you can use the handles to an axes, so it does not ca... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the total byte size of schemas & databases in Snowflake<p>I love how the <code>SHOW TABLES</code> query return the rows and the bytes for each tab... | <p>I've managed to do this by querying <code>information_schema.tables</code>:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT
table_schema AS schema,
SUM(bytes) AS bytes
FROM information_schema.tables
GROUP BY schema;
</code></pre>
<p>Note that this only works for the current database, as each database... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PDO+PHP+SQLITE+PRINT+'ME' = Table result incorrect not what expecting<p>I trying to create sqlite database with pdo and echo it out in table it sorts of work... | <p>Remove the exec version of inserting:</p>
<pre><code>// remove this line
$db->exec("INSERT INTO company(revenue_value) VALUES ('2000')");
</code></pre>
<p>Use a single insert:</p>
<pre><code>try
{
$db = new PDO('sqlite:randvalue.sqlite');
$db->exec("CREATE TABLE company (revenue_value INTEGER PRIMAR... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can other users break into my sql sequence of operations?<p>I do insert operations into the database (Postgres) and then immediately take the last serial id.... | <p><code>pg_get_serial_sequence(table_name, column_name)</code> gets the name of the sequence that a <code>serial</code>, <code>smallserial</code> or <code>bigserial</code> column uses.</p>
<p>From <a href="http://www.postgresql.org/docs/9.4/static/functions-sequence.html" rel="nofollow">the PostgreSQL documentation</... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
F# type extension of generic type with concrete type parameter<p>Is it possible to make a type extension for a generic type with a concrete type parameter? I... | <p>Yes, you can but you should use the C# style syntax:</p>
<pre><code>open System.Runtime.CompilerServices
type Bar = Bar
type Foo<'t> = Foo of 't
[<Extension;Sealed>]
type Extensions =
[<Extension>]
static member BarStuff (this: Foo<Bar>) = ()
let x = (Foo Bar).BarStuff
</code></p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'?<p>I'm pretty new to C# and I'm getting an error I can't quite figure... | <p><code>Model.Breadcurmb</code> is a method and not a property or field, so call it as below</p>
<pre><code> @foreach (var crumb in Model.Breadcrumb(content))
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Invalid Pointer Operation on dynamic array free<p>I'm pretty newbie to Delphi, so be kind please.
I'm working on a software that allows users to customize it... | <p>The most likely explanation for this is that you are writing outside the bounds of the array. There's not enough code for us to be sure that is the case, but the symptoms you report are invariably caused by out-of-bounds access.</p>
<p>Your next step is to get the compiler to write code that checks for our-of-bound... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Integrate OSGi with WildFly-8.2.0.Final<p>I would like to know the steps to integrate OSGi with WildFly-8.2.0.Final.
I have followed <a href="https://docs.jb... | <p>OSGi is no longer part of WildFly distribution.</p>
<p>However, community member Arcadiy Ivanov picked up the projected and released compatible version for WildFly 8.2</p>
<p>see <a href="http://ivanov.biz/2015/jbosgi-for-wildfly-8-2-released/" rel="nofollow">http://ivanov.biz/2015/jbosgi-for-wildfly-8-2-released/... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Checkbox style not toggled correctly when action set on parent, updated data is sent from parent to child<p>I have a card component with a checkbox, to which... | <p>What you show, should work. Here's a Twiddle demonstrating it: <a href="https://ember-twiddle.com/0631193dc09a3646ca9e9a1efe351607?numColumns=2&openFiles=controllers.application.js%2Ctemplates.application.hbs" rel="nofollow noreferrer">https://ember-twiddle.com/0631193dc09a3646ca9e9a1efe351607?numColumns=2&o... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swift 1.2 ?? operator<p>I just switched to Swift 1.2 and now it does no longer like</p>
<pre><code>let v = optionalVal as SomeThing ?? default
</code></pre>... | <p>You just have to put it inside a parentheses and forced cast now needs an exclamation mark as! or as?:</p>
<pre><code>let v = ( optionalVal as? SomeThing ) ?? default
</code></pre>
<p>UPDATE:</p>
<p>Apple has just released today Xcode6.3 Beta 2 and seems that it is not needed anymore:</p>
<blockquote>
<p><stro... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does the server recognize the header compression of different clients in HTTP2<p>According to the http2 protocol, the client and the server need to maint... | <p>Client and server maintain a <em>per-connection</em> state that stores the static and dynamic tables that contain the HTTP headers exchanged between the two peers.</p>
<p>There is no concept of "user", just that of connection.</p>
<p>For a client that opens multiple TCP connections, each connection will ha... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't send image with Slackbot using slackbots (javascript)<p>I'm using slackbots (<a href="https://github.com/mishk0/slack-bot-api" rel="nofollow noreferrer... | <p>This library seams to just forward parameters to the respective Slack API method, which is <a href="https://api.slack.com/methods/chat.postMessage" rel="nofollow noreferrer"><code>chat.postMessage</code></a>. </p>
<p>To post an image with Slack you need to include an image URL either within an <a href="https://api.... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
H2 issues : request works in H2 console, not in jUnit test<p>I encounter a problem with <strong>H2 Database</strong>, I can't figure out what this problem is... | <p>It looks like you use a recent version of H2 when you work with H2 Console, and some old version (1.4.196 or older) in your application.</p>
<p>Such old versions don't support the derived column list syntax. You need to use a more recent version in your application too.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Managing ClaimsPrincipal.Current in Forms Authentication MVC app<p>We use the excellent Thinktecture IdentityServer v2 to manage our authentication. This wor... | <p>Brock Allen from Thinktecture pointed me 2 great posts of his that answer all of my concerns !</p>
<p><a href="http://brockallen.com/2013/01/26/replacing-forms-authentication-with-wifs-session-authentication-module-sam-to-enable-claims-aware-identity/" rel="nofollow">http://brockallen.com/2013/01/26/replacing-forms... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Design collection, how to de normalize<p>I have services that are available at many location at different prices. In transitional SQL I'd have the price_loca... | <p>A populate is a big <code>$in</code> query to resolve the references, and then it swaps out the references in the array for the corresponding documents. It's not so bad if the reference field is indexed, but it's an extra query and it's a crutch of bad schema design because it makes it easier to emulate a relational... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
convert number(1,2,3) to string(one,two,three) Cake PHP<p>I am new to Cake environment and i want to convert number to string which function i use to conver... | <p>Use this:</p>
<pre><code>$num = 4263;
$numbers10 = array('ten','twenty','thirty','fourty','fifty','sixty','seventy','eighty','ninety');
$numbers01 = array('one','two','three','four','fife','six','seven','eight','nine','ten',
'eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','ni... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tensorflow 2.0 small image dataset warning<p><br>
<br>
I am learning image classification using TensorFlow 2.0, while implementing it I am getting this warn... | <p>Given you get your error at 24th step and that <code>batch_size</code> is 32, I suppose the problem is that your 24th batch has only 16 images. You may drop these images so your dataset will align with batch size of 32, or change <code>batch_size</code> to 16. </p>
<p>By the way, I suspect that you're using <code>s... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Chaining Optionals in Java 8<p>Looking for a way to chain optionals so that the first one that is present is returned. If none are present <code>Optional.em... | <p>Use a Stream: </p>
<pre><code>Stream.of(find1(), find2(), find3())
.filter(Optional::isPresent)
.map(Optional::get)
.findFirst();
</code></pre>
<p>If you need to evaluate the find methods lazily, use supplier functions:</p>
<pre><code>Stream.of(this::find1, this::find2, this::find3)
.map(Supplier:... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Upload Attachment - Azure DevOps (Boards) - REST API<p>I am trying to upload a file to Azure Devops as an attachment via a static web-site. I can create new ... | <p>Turns out I was being silly. Was missing the .result on the FileReader()</p>
<pre><code> //Binary file type
var r = new FileReader();
r.readAsBinaryString(file);
$.ajax({
url: attachUrl,
type: 'POST',
data: r.result,
</code></pre>
<p>Onwards!</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding a query to a HTML Page<p>I have built a Status Page for my servers with HTML and CSS, and instead of updating the Server Status every time one of them... | <p>You can do it without PHP, for that use <strong>javascript</strong> and make a <strong>ajax call</strong>:</p>
<pre><code>var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
// You change the status of button
}
};
xht... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java Converting English to Opish<p>Please could someone help me to solve a small issue.
I was given an assignment to convert an english word into opish. Opis... | <p>You're right, you're not checking if the next character is a vowel. You check the current letter and do nothing with it:</p>
<pre><code>v = isVowel(word.charAt(i));
</code></pre>
<p>Instead, try something like this:</p>
<pre><code>//We don't want out of bounds issues
if(i<word.length()){
v = isVowel(word.c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AWS Lambda in public subnet cannot access the internet<p>I'm trying to get a Lambda running inside a public subnet to communicate with the internet. I'm abl... | <p>AWS Lambda functions are never assigned a public IP address when in a VPC, even if they are in a public subnet. So they can never access the Internet directly when running in a VPC. You have to place Lambda functions in a private subnet with a route to a NAT Gateway in order to give them access to the Internet from ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding 1px padding causes outer div to contain child margins<p>When the child of a div contains margins, those margins are not included in the calculation of... | <p>As Hashem pointed out in a comment, the problem is the collapsing margins. The parent <code>div</code> has nothing between it and its parent, so the margins of the <code>div</code>'s child <code>h1</code> become <em>its</em> margins. If the <code>div</code> has a padding or a border, this prevents the margin collaps... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get string length without counting newline characters as 2 chars in Java?<p>So I need the length of a string, but I want newline characters to be coun... | <p>Count the number of characters in a string using <code>string.length()</code>. Then subtract the number of times your 2-character newline occurs in the string. Have a look at <a href="https://stackoverflow.com/q/767759/154066">Occurrences of substring in a string</a> for nice ways of doing this.</p>
<p>There is no ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Upload/share videos to youtube in Titanium<p>I need to share and upload my videos to youtube in Titanium Alloy for both iOS and Android.
Is there any Youtube... | <p><a href="http://www.oodlestechnologies.com/blogs/Upload%20or%20share%20video%20on%20youtube%20in%20Appcelerator%20Titanium" rel="nofollow noreferrer">this Answer</a></p>
<p>will work like charm</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python requests.exception.ConnectionError: connection aborted "BadStatusLine"<p>I am trying to use the Python requests module to issue Http GET commands to a... | <p>The problem was with the url. This connection was meant to be established over https and I was using http in the python script. Hence the issue.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Chart.js does not display any data<p>I have a data coming from the server in the following format:</p>
<pre><code>[
{
name: "series1"
series: [
... | <p>There are several problems in your data and in your code:</p>
<ol>
<li>The provided data is not of valid JSON format (lots of commas missing)</li>
<li>The <code>data</code> option inside individual <code>datasets</code> is not correctly created
<ul>
<li>It must not be a nested array but a simple array </li>
<li... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sonarqube 5 File not found exception<p>After updating to sonarqube 5.0 we can not analyze our multimodule project on windows anymore.</p>
<p>The problem see... | <p>Indeed, this is a bug and we'll fix this in SonarQube 5.1: <a href="https://jira.codehaus.org/browse/SONAR-6190" rel="nofollow">SONAR-6190</a>.</p>
<p>Meantime, you can't use the profiling mode - unfortunately.</p>
<p>Thanks for reporting this.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shorthand ternary operator PHP - Call to a member function on null<p>Given the class:</p>
<pre><code><?php
class foo {
public function getGuest() {
... | <p><a href="https://www.php.net/operators.comparison" rel="nofollow noreferrer">From the PHP manual</a>:</p>
<blockquote>
<p>Since PHP 5.3, it is possible to leave out the middle part of the ternary operator. Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.</p>
</blockquote>
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why do we have coarse variants of ktime_get in Linux kernel?<p>I was going through the following link:</p>
<p><a href="https://www.kernel.org/doc/html/lates... | <p>Q:</p>
<blockquote>
<p>Which one should we use and when?</p>
</blockquote>
<p>Seems it's well described on your link.<br>
A:</p>
<blockquote>
<p>These are quicker than the non-coarse versions, but less accurate.</p>
</blockquote>
<p>So if you need to be quick and you don't care about accuracy - use coarse (t... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
if block not executing when adding multiple conditions<p>I am running this program to find even numbers in the array, but i do not want my program to check t... | <pre><code>if ((i != 1) || (i != 3) )
</code></pre>
<p>This is always true.</p>
<ul>
<li>If <code>i</code> is neither 1 nor 3, then both conditions are true.</li>
<li>If <code>i</code> is 1, then the right condition is true.</li>
<li>If <code>i</code> is 3, then the left condition is true.</li>
</ul>
<p>Perhaps you ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
selenium drop down options and usgs webportal<p>I was following the guide below, to click on africa west under the regions drop down menu using...</p>
<p><a... | <p>Click on the dropdown button and <a href="http://selenium-python.readthedocs.org/en/latest/waits.html#explicit-waits" rel="nofollow">wait</a> for the link with <code>Africa - West</code> text to appear:</p>
<pre><code>from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Waiting for store to long and Gateway Timeout (504)<p>I have a problem with NOPCommerce 4.2. Sometimes, my site opens quickly but it often takes a long time ... | <p>My site was very slow with out SSL but after install certificate and enable SSL, problem resolved.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CLASSPATH variables not showing up for root user in CentOS 6.6<p>I am running CentOS 6.6 on VmWare Player. I have added path </p>
<pre><code>export CLASSPAT... | <p>The <code>.bashrc</code> in <em>your</em> homefolder is only executed for <em>your</em> user. </p>
<p>Thus when logging in as root, it's not being executed, and root gets a "clean" shell. You probably want to put these lines into <code>/etc/profile</code> if they're valid for the whole system, and not just for your... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL request for combining and searching in 2 tables<p>I have 2 tables. One of my tables with <code>users</code> is:</p>
<pre><code>id name lon... | <p>I change the distance formula to something that works since mysql 5.7.
You didn't_ specify your database or presented a fiddle example to show your system, so i selected 5.7 as mini9mum and it works also in 8.0 as you see in the fiddle.</p>
<p>the inner query needs two things the user id who searches and his positi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fit to display footer tag with 100% width<p>I'm trying to set my footer width 100%, but not working.</p>
<p>In Bootstrap by default footer and other ... | <p>Your footer needs to sit inside a <code>container-fluid</code> rather than a <code>container</code> element. As described in the <a href="http://getbootstrap.com/css/#overview-container" rel="nofollow">Bootstrap documentation</a>:</p>
<blockquote>
<p>Use .container-fluid for a full width container, spanning the e... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How debug specify class without modifying the class code?<p>I am c# developer , i want to insert code to a class without modfiy the original class in order t... | <p>you don't need to extend your code if you want to debug it, simply put a break point in the line you want to debug it then run your code and using Step Over button or Step Into if you need.</p>
<p>But if you want to extend your class without modify it, simply inhirate it and do your modifications also you can exten... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issue with replacing strings in MySQL<p>I want to replace a string with another one using <code>REPLACE()</code>, but I can't seem to make it work. Here is a... | <p>You've closed the double-quotes when you shouldn't have. </p>
<p>You're only replacing the first part of the <code>src</code> attribute so you should be searching for <code>src="/content_images</code> (no trailing ") and replacing with <code>src="/public/userfiles/content_images</code> (again, no trailing ").</p>
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React best way to handle empty object before mount?<p>I have a React class, and it wants to render an object shown below:</p>
<pre><code>data: {
title: ... | <p>I think you are getting <code>Can only update a mounted component</code> error because you are using <code>componentWillMount</code> and <code>settimeout</code> together, but you dont know if the component has been mounted by the time <code>settimeout</code> function fires. </p>
<p>Since you know what your state is... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deserializing XML to List<Object> - faster to combine into one xml file first?<p>I have a list of contracts that come in as xml strings like so:</p>
<pre><c... | <p>Serialization is slow. Do comparison and see if xml linq below is faster :</p>
<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
namespace ConsoleApplication1
{
class Program
{
const string FILENAME = @"c:\tem... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why ElasticSearch Java Client index Future completes before the record is searchable?<p>I'm using <a href="https://github.com/sksamuel/elastic4s" rel="nofoll... | <p>It sounds like you may be having to wait for the default index refresh interval to come into play before you can query the newly indexed data. <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-update-settings.html#bulk" rel="nofollow">The refresh interval is 1 second by default</... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Grails service fails working with Optional class<p>I've tried to use Optionals in grails service, but whenever I do, I get
HTTP Status 500 - Error applyi... | <p>Seems like you're having some transaction done when getting over the service code.</p>
<p>Try to add <code>@Transactional(readOnly = false)</code> for your service/controller method and see what happends.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I get form data from a div tag by using its class?<p>I have code something like:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-c... | <p>Ok, firstly you have a <code>for</code> loop that change item's class to "active" one, we will continue adding code there.</p>
<pre><code>var iconContainer = document.getElementById('iconContainer');
var icon = iconContainer.getElementsByClassName("item");
for (var i = 0; i < icon.length; i++) {
icon[i].addEv... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Excel formatting DD-MMM-YYYY, must be in this format<p>I have some data below. Please see below. I need excel to put these dates in this format exactly DD-MM... | <p>There is no custom format for months in all-caps. </p>
<p>If you can reference the existing cell, then use TEXT to get the date formatted as you want and then UPPER to convert to upper case.</p>
<pre><code>=UPPER(TEXT(A2,"dd-mmm-yyyy"))
</code></pre>
<p><a href="https://i.stack.imgur.com/mFUPG.png" rel="noreferre... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to split array values into new lines - jquery<p>I have an array that looks like this </p>
<p>array_names = [Mathew,Kelp ,Liman Kolf, Hebert,Ansh];</p>
... | <p>You should split them by a <code>RegExp</code></p>
<pre><code>const string = 'Mathew,Kelp ,Liman Kolf, Hebert,Ansh';
const array = string.split(/(?: ,)|(?:, )/)
// ["Mathew,Kelp", "Liman Kolf, Hebert,Ansh"]
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DevExpress ComboBoxEdit - Binding only returns path instead of value<p>I have a DevXpress ComboBoxEdit and have the XML code as follows</p>
<pre><code><d... | <p>Creating an answer here as I used different approach to using ObservableCollections. I ended up using a Dictionary and binding the dictionary to the combobox, which works fine. Only the value selected was of any importance so thats fine for now.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
XSD Schema Validation Issue<p>I have this snippet of a schema that fails to validate.</p>
<pre><code><?xml version="1.1" encoding="UTF-8" ?>
<xs:sc... | <p>Basically, you can't mix xs:all with xs:choice or xs:sequence. If your content model uses xs:all, then that's all it can use.</p>
<p>The rule name cos-all-limited kind-of sums it up...</p>
<p>It wouldn't be allowed even if there were no common elements across the groups, so it's not simply the ambiguity (of encoun... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make a List with 3 columns in C#?<p>How to make a <code>List</code> with 3 columns in C#?</p>
<p>Each columns must have a different <code>type</code>.... | <p>You can create a <a href="https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1?view=netframework-4.8" rel="noreferrer"><code>List</code></a> of <a href="https://docs.microsoft.com/en-us/dotnet/csharp/tuples" rel="noreferrer">tuples</a> for that, using list initializer</p>
<pre class="lang-c... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it OK to share my server's certificate with an Android app?<p>I developed an API for our system, so it could be used by an Android app.
The Android app is... | <p>Here's a link for you to check out answering a very similar question.</p>
<p><a href="https://stackoverflow.com/questions/859111/how-do-i-accept-a-self-signed-certificate-with-a-java-httpsurlconnection">How can I use different certificates on specific connections?</a></p>
<p>The simple answer is: There's nothing w... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error while opening the exe file built by cx_freeze<p>I wrote a program using PyQt5, matplotlib, numpy, scipy, nmrglue and managed to build it into exe file ... | <p>I finally successfully get it work.</p>
<p>I wrote a wiki note here:
<a href="https://github.com/lianxiangru/NMR-Analysis-UI/wiki/Notes" rel="nofollow">https://github.com/lianxiangru/NMR-Analysis-UI/wiki/Notes</a></p>
<p>Py2exe could also work with a similar procedure.</p> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.