title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Updating data in chart.js | <p>I just met <code>chart.js</code> and I'm trying to handle it but it's getting hard for me.</p>
<p>My intention is to initially have some data, <code>var data = [2478,5267,734,784,433];</code> but if a button is clicked, these are modified and the table is updated, var <code>data = [2,5,7,7,4];</code></p>
<p>With t... | 2 | 1,779 |
RouterLink seems to just reload the current page most of the time | <p>I have added page navigation in my webapp using routerlinks and for some reason the page just reloads most of the time , and at the other times it works fine, very randomly.</p>
<p>I am stumped, especially as to why it works randomly. Any insight at all would be helpful.</p>
<p>Relevant code:</p>
<p>app-routing.m... | 2 | 2,053 |
How to pass array of sql query to function | <p>What's wrong in code.
Please help me on this.
How do I pass array of query to function exeSearchQuery();</p>
<pre><code> public class MyDBConnect
{
Connection dbCon = null;
public String DB_USERNAME = "root";
public String DB_PASSWORD = "root";
private String DB_DRIVER_CLASS = "com... | 2 | 2,671 |
Connecting to Database using GridView in C# | <p>I want to display the result in GridView and I am unable to do so. I am trying to connect my C# windows form application to the database that I created in SQL. Please tell me if there is anything else I need to put in my class to fix it. I am not getting any errors but I am its still not getting any result when I c... | 2 | 2,226 |
How to remove space between widget inside column - Flutter | <p>I have simple screen that contains of 2 widget and I wrap it using <code>Column</code>, but there is always small space between first widget and second widget. Is there a way to remove space in Column. here is the picture that I would like to remove the space:
<a href="https://i.stack.imgur.com/HmOW4.png" rel="nofol... | 2 | 1,360 |
How does the plm package handle fixed effects - one dummy for each individual or one less? | <p>I am currently trying to get used to the plm package and tried to make a fixed effects with individual effects (just for the sake of doing it, please ignore the misspecification) with the plm() function and then with the lm() function. I found that I can only replicate the results of the plm() regression when I incl... | 2 | 1,269 |
How to access or create reference to widgets in a DialogFragment | <p>I have created a class taht extends from <code>DialogFragment</code>. I went with the custom layout and I added some buttons to this dialog.</p>
<p>I defined fields to the buttons but when I launch the dialog from the main activity I get nullreferenceexception.</p>
<p>Here is the dialog class:</p>
<p>public class... | 2 | 1,057 |
Bootstrap: dropdown toggle items not functioning in Safari | <p>I have an angular 2 application that uses bootstrap 3.3.7 and jquery 1.12.4. The code is as follows:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><div class="btn-... | 2 | 1,553 |
Django form not valid (form.is_valide() return False) on AJAX request | <p>I have a form for a model which contains ImageField and i want user to be able to submit image via AJAX.</p>
<p>Problem is that form.is_valide() returns False. When i dont use AJAX everything seems to be okay. I tried couple of SO answers on similar questions but with no luck.</p>
<p><strong>View</strong>
(simplif... | 2 | 1,565 |
Thread Synchronisation 101 | <p>Previously I've written some very simple multithreaded code, and I've always been aware that at any time there could be a context switch right in the middle of what I'm doing, so I've always guarded access the shared variables through a CCriticalSection class that enters the critical section on construction and leav... | 2 | 1,168 |
RecyclerView inside Fragment from TabBar | <p>I got a small problem.</p>
<p>I tried to load a recycler view with some card.</p>
<p>Without the recycler view the fragment works and I got the card displayed, but since I added the recyclerView I keep getting error about it.</p>
<blockquote>
<p>FATAL EXCEPTION: main
... | 2 | 5,516 |
Django ArrayField gives me syntax error at or near | <p>I was implementing <a href="https://docs.djangoproject.com/en/1.9/_modules/django/contrib/postgres/fields/array/" rel="nofollow">ArrayField</a> using Python3, Django==1.9.9, psql (PostgreSQL) 9.5.4, but if I do:</p>
<pre><code>from django.utils.translation import ugettext_lazy as _
*
*
exceptions = ArrayField(m... | 2 | 1,786 |
Android : want to access to a textview in a viewholder in my mainactivity | <p>I am so sorry for my bad English, but here is my problem : </p>
<p>I use a custom ListView like ArrayAdapter and I create my ArrayAdapter as a intern class in my main Activity like that : </p>
<pre><code> /*This is my Main Activity*/
public class KhassaideActivity extends Activity {
ViewHolder hold... | 2 | 1,153 |
vault agent injector bad cert | <p>I have vault deployed from the official helm chart and it's running in HA mode, with auto-unseal, TLS enabled, raft as the backend, and the cluster is 1.17 in EKS. I have all of the raft followers joined to the vault-0 pod as the leader. I have followed <a href="https://cogarius.medium.com/a-vault-for-all-your-secre... | 2 | 4,556 |
Improve HED algorithm for edge detection | <p>I am working on an image processing task using python which depends mainly in detecting the grains in the image of soil samples so the first step in the processing process is edge detection ,I use HED algorithm (holistically nested edge detection ) for this step rather than using other edge detection functions in py... | 2 | 2,123 |
Grails 3.3.2 - Error [main] o.s.boot.SpringApplication : Application startup failed | <p>I'm beginner with Grails and I want to do upgrade my plugin in Grails 2 to Grails 3. </p>
<p>What I have done:</p>
<ol>
<li>I created my plugin ( create plugin ) with Grails 3.3.2</li>
<li><code>grails run-app</code></li>
<li>I recopied my plugin who is in Grails 2 in Grails 3</li>
</ol>
<p>When I run my app, fol... | 2 | 1,727 |
How to make a single-AZ (non-HA) RDS instance with terraform? | <p>In <a href="https://aws.amazon.com/blogs/database/best-practices-for-converting-a-single-az-amazon-rds-instance-to-a-multi-az-instance/" rel="nofollow noreferrer">this</a> AWS Database Blog, they assert that</p>
<blockquote>
<p>You can set up Amazon RDS in a Single-AZ database (DB) instance or a
Multi-AZ DB instance... | 2 | 3,060 |
Vue is not working in IE11 (SCRIPT1002: Syntax error) | <p>I am trying to set up Vue.
It works in the Chrome browser but it doesn't work in IE11 browser.</p>
<p>IE11 browser print </p>
<blockquote>
<p>SCRIPT1002: Syntax error
bundle.js (5253, 1)</p>
</blockquote>
<pre><code>// bundle.js (5253, 1)
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */... | 2 | 3,367 |
Save and Load user selections based on file selection - RShiny | <p>I am trying to create simple app that acts as a GUI for studying different files having same variables but with different version and content. I am unable to give an app where every time the user opens the app they dont have to enter in their parameters again where they left off. I'd like them to be able to save the... | 2 | 2,826 |
how to access javascript variables in python | <p>I am creating a facebook app and it uses Javascript API to store username and other details in js variables. And this app is created under Python(using Google App Engine). I want to access the js variables in Python and store the values in Db. How to do this?</p>
<pre><code>class MainPage(webapp2.RequestHandler):
... | 2 | 1,111 |
Weblogic 11g log4j:WARN Please initialize the log4j system properly | <p>i use log4j with weblogic 11g version, i get the below error in the server console</p>
<pre><code>log4j:WARN No appenders could be found for logger (org.apache.wicket.protocol.http.pagestore.FileChannelPool).
log4j:WARN Please initialize the log4j system properly.
</code></pre>
<p>i use the below server start</p>
... | 2 | 1,050 |
Feature extraction with Gabor filters | <p>I am currently working on feature extraction system with use of Gabor filters in Matlab. For Gabor filters and convolution of image I am using code found here
<a href="https://www.mathworks.com/matlabcentral/fileexchange/44630-gabor-feature-extraction" rel="nofollow noreferrer">https://www.mathworks.com/matlabcentra... | 2 | 2,278 |
Transform and transition not working in iOS Safari | <p>I did a simple page to display short messages on a "card" div element when the user clicks on that div. I researched and found CSS classes to use to make the div look like it's flipping from front to back when the user clicks. Pretty simple: the front of the card says "Click me", you click it, the card flips around ... | 2 | 1,687 |
Is there a way to make my word counting program faster without using impure tricks? | <p>As a little exercise, I made the following word counting program in haskell. It counts distinct words in a text file, and outputs the 50 most frequent ones along with their frequencies.</p>
<pre><code>import qualified Data.Map as Map
import Data.List.Split
import Data.List
import Data.Ord
-- Count words
count = Ma... | 2 | 1,115 |
GCC/Clang x86_64 C++ ABI mismatch when returning a tuple? | <p>When trying <a href="https://stackoverflow.com/q/25381736/3919155">to optimize return values on x86_64</a>, I noticed a strange thing. Namely, given the code:</p>
<pre><code>#include <cstdint>
#include <tuple>
#include <utility>
using namespace std;
constexpr uint64_t a = 1u;
constexpr uint64_t ... | 2 | 1,535 |
Sound - what is raw sound data? | <p>I have code that decodes an MP3 and populates an array with all the 'values'.
My question is: what are those values? Are they frequencies? Are they amplitudes?
This is the code:</p>
<pre><code>File file = new File(song.getFilepath());
if (file.exists()) {
AudioInputStream in = A... | 2 | 1,039 |
Angular DI using injection token for model class | <p>I am trying to do something here, but not sure if it can be done.
I want to create a model class like this:</p>
<pre><code>import { Inject } from '@angular/core';
import {
Element,
Image,
} from '@situlive/situ-angular-components/contentful';
export class ImageColumn {
title: string;
backgroundImage... | 2 | 1,311 |
suppress superclass method is not working in PowerMockito | <p>I want to suppress <code>Users</code> class <code>insertUser</code> method by <code>PowerMockito.suppress</code> method. But it seems that suppress method is not working well. i.e. it is calling method anyway. <br/>
I tried to use <code>PowerMockito.doNothing().when(Users.class, "insertUser", users);</code> instead,... | 2 | 1,920 |
switch case not printing c | <p>back again with another question in C.
i'm having some issues with my switch statements. my program is compiling and running its even storing the correct values in the correct variables and running through the switch statements as it should EXCEPT when it comes to print out specific output. please keep in mind i am... | 2 | 4,338 |
Absolute positioned mega menu disappears when position relative nav link is not hovered over | <p>I have a header where each nav link drops down a mega menu, but since the mega menu is absolutely positioned, its "on top" of the relatively positioned nav. So when I try to move onto the mega menu, it disappears, along with the nav link's on-hover border-bottom. </p>
<p>Usually my issue is just padding, but it d... | 2 | 19,398 |
Undo swipe in recycler view on pressing back button? | <p>How to restore the swiped view on pressing back button in recyclerView ? </p>
<p>MY CODE</p>
<p>RecyclerListAdapter.java</p>
<pre><code>public class RecyclerListAdapter extends RecyclerView.Adapter<RecyclerListAdapter.ItemViewHolder>
implements ItemTouchHelperAdapter {
private final List<Ca... | 2 | 1,860 |
Android RxJava Interval with IntentService | <p>I am quite new to rxjava so I wanted to use it with android IntentService and I need to be notified every second during a certain period (similar to Android CountDownTimer. I have decided to try it with rxjava and I have this class:</p>
<pre><code>public class WorkoutService extends IntentService {
public static fi... | 2 | 1,718 |
How to get value from dropdownlist from backend in Angular template | <p>I have a angular 8 application and a dropdown with two values: </p>
<p>on the backend the names of the two values are: Invited and Registerd.</p>
<p>but in the frontend they are called: Open en afgerond:</p>
<pre><code>public statusOptions = {
Registratie: ["Open", "Afgerond"],
VCheq: ["Ongeopend", "Open"... | 2 | 2,686 |
Where does this absl::StrCat bug occur, in Abseil or MSVC? | <p>I creat string_view from char array</p>
<pre><code> // creat sv from vector;
std::vector<char> vec = { 'w', 'h', 'a', 't' };
char* char_ptr = vec.data();
size_t sz = vec.size();
std::string_view sview_obj = std::string_view(char_ptr, sz);
</code></pre>
<p>If you write:</p>
<pre><code> using namesp... | 2 | 1,990 |
DetailsView: Index was out of range | <p>I'm trying to get the datakey value from <code>DetailsView</code> and paste it in a form. I've included all the datakeynames but still couldn't get the value to paste it in my formview but I've encountered this probles: </p>
<blockquote>
<p>Index was out of range. Must be
non-negative and less than the size of
... | 2 | 1,992 |
How to find out file size in Node? | <p>I have an app to deduce the size of a file uploaded by the user. I have the code as follows</p>
<p>The server.js code is as follows</p>
<pre><code>var express = require('express');
var formidable = require('express-formidable');
var fs = require('fs');
var app = express();
var PORT = 8080;
app.use(express.stati... | 2 | 1,130 |
Gaussian Mixture Models: Difference between Spark MLlib and scikit-learn | <p>I'm trying to use Gaussian Mixture models on a sample of a dataset.
I used both<code>MLlib</code> (with <code>pyspark</code>) and <code>scikit-learn</code> and get very different results, the <code>scikit-learn</code> one looking more realistic. </p>
<pre><code>from pyspark.mllib.clustering import GaussianMixture a... | 2 | 1,063 |
how to create general method for all type of class(object) | <p>I am using db4o lib for storing data.</p>
<p>for example I have this code for storing data (i.e News)</p>
<pre><code>public static void insertNewsToDB(Context context, final News news){
final String dbPath = context.getDir("news", Context.MODE_PRIVATE) + "/" + DB4O_NAME;
ObjectContainer db = Db4oE... | 2 | 1,165 |
Update owned entity EF Core 5 | <p>I am implementing an api using .net 5.
I have a student class which have a property with address type(value object according to ddd).</p>
<pre><code>public class Student
{
public long Id{ get; private set; }
public string FirstName { get; private set; }
public string LastName { get; private ... | 2 | 1,432 |
nasm assembly: Can't find valid values for all labels after 1004 passes | <p>I am trying to write an x86 assembly code for NASM assembler, which will convert a hexadecimal number into a string and print it. For simplicity I have assumed that my hexadecimal number will only contain digits(eg. 0x1234). Here is the code:</p>
<p><strong>print_hex.asm</strong></p>
<pre class="lang-assembly pretty... | 2 | 1,040 |
simulating mouse drap /touch drag movement in javascript | <p>So I have some javascript that when a person clicks and drags or drags their finger (on mobile devices) and cycles though a series of images to create a 360 image rotation effect. Heres the code.</p>
<pre><code> $(document).ready(function ($) {
var $product = $('#product'),
$imgs = $product.find(".ch... | 2 | 1,217 |
Solving a set of ODE with SciPy | <p>I'm trying to solve a set of ODE to simulate starch hydrolysis by amylases (enzymes). When I try to solve the set of equation, I get a </p>
<pre><code>lsoda-- at current t (=r1), mxstep (=i1) steps
taken on this call before reaching tout
In above message, I1 = 500
In above message... | 2 | 2,290 |
Ext JS GridPanel edit textfield width too narrow | <p>I have a <kbd><a href="http://jsfiddle.net/MrPolywhirl/GVU45/" rel="nofollow noreferrer">JSFiddle Demo</a></kbd> which creates a Grid with editing enabled. The problem I am facing is that the textfields that are displayed when editing a row are too narrow. They are about half the column width.</p>
<p><img src="http... | 2 | 2,237 |
Tipsy won't recognize d3 elements in asp.net | <p>I am writing something ASP.NET and using d3 to graph a scatter plot, then tipsy to do mouseovers.</p>
<p>This is inspired by this <a href="http://bl.ocks.org/1373263" rel="nofollow">example</a>.</p>
<p>I have dumbed down my graph considerably so it is just this: <a href="http://jsfiddle.net/scottieb/D9Vjg/" rel="n... | 2 | 1,823 |
HTML/Javascript/PHP Country and State List | <p>I have a script that is getting the country the user selects and then puts the corresponding states in the state box.</p>
<p>Here is my Javascript code in the head:</p>
<pre><code><script type="text/javascript" src="jquery-1.9.1.min.js">
</script>
<script type="text/javascript">
$(document).rea... | 2 | 4,244 |
How to reload data in table view by tapping the cell of collection view in swift | <p>Am developing a app using swift in my in one controller am using both collection view and table view.collection view which kept at top of the controller which scrolls horizontally and contains near 10 cells and table view is just kept below to the collection view.i have passed the json(api) data to both collection ... | 2 | 1,179 |
Bootstrap - using two navbars | <p>I am using twitter bootstrap 3 and I am trying to use two navbars in the same page.</p>
<p>Here is a fiddle of my current implementation: <a href="http://jsfiddle.net/SSJVegito/30x80qq8/1/" rel="nofollow">http://jsfiddle.net/SSJVegito/30x80qq8/1/</a> </p>
<p><strong>CSS:</strong></p>
<pre><code>.navbar-position {... | 2 | 3,079 |
Hbase Stargate returns scrambled values | <p>I'm trying out Hbase Stargate as a REST server that's bundled with my Hbase installation. It's simple to get up and running, but I'm wondering how to view actual row data? When I perform a GET request in my REST client, I am returned with scrambled values:</p>
<p><strong>GET localhost:8282/article/row1/</strong><... | 2 | 1,035 |
Converting an existing project from Eclipse to Gradle in Android Studio | <p>I found an open source project I wanted to work on but I'm having trouble setting up the initial configuration. The project seems to have been written in Eclipse and I'm trying to get it to work with Android Studio. After being through a number of errors, I'm finally stuck on the following error seen in the configu... | 2 | 1,140 |
Element UI Vue js is slow in render | <p>I have over two hundred record looping through v-for when we change any value it takes nearly 2 sec to rerender the changed value below is the sample code. when I check the value it takes nearly 2 sec to the checkboxes. Is there any way to improve the rendering the speed this is really slow for 200 records. Thanks.
... | 2 | 1,112 |
Sparql Lexical Error Encountered: " " (32), after : "not" | <p>I am getting lexical error when creating sparql query using Jena.
Below is my source code. The error says
com.hp.hpl.jena.query.QueryParseException: Lexical error at line 5, column 92.Encountered: " " (32), after : "not".</p>
<pre><code> package mas;
import agent.core.onto.Ontology;
import com.hp.h... | 2 | 1,220 |
Java GUI freezing because of insertString method? | <p>Have you ever heard about a GUI freezing because of repeated calls to the method javax.swing.Document.insertString?</p>
<p>There is my code:</p>
<pre><code>private int insertNotation(GameNode startNode, StyledDocument doc, int pos) {
String s = "";
int startPos = pos;
boolean isContinuous = false;
... | 2 | 1,614 |
MaterialUI Autocomplete - Avoid clearing input text filter when option is selected | <p>I've imported the Autocomplete component from MaterialUI in my React project and using it as a multiple select with checkboxes: <a href="https://material-ui.com/components/autocomplete/#checkboxes" rel="nofollow noreferrer">https://material-ui.com/components/autocomplete/#checkboxes</a></p>
<p>I noticed that when I ... | 2 | 1,093 |
React Native Navigation / Context API | <p>I'm using React-Native-Navigation with the Context api.</p>
<p>I'm wrapping my screens with a HOC component below.</p>
<pre><code> const ProviderWrap = Comp => props => (
<Provider>
<Comp {...props} />
</Provider>
);
Navigation.registerComponent('app.AuthScreen', () => ... | 2 | 1,037 |
Android to Php server communicaton using HttpURLConnection | <p>My project is to upload the image, audio files with some parameter(like description and date).</p>
<p>Though Google announced to use HttpURLConnection instead of httpclient. I am using HttpURLConnection.</p>
<p>I have an code which upload the image and audio in server folder.</p>
<p>But the description which I se... | 2 | 1,555 |
SAML Secured AuthnRequest Fails | <p>I'm not able to make a secured ECP AuthnRequest to my Shibboleth IdP. I've got a small proof of concept SP running which is based heavily on the Spring SAML extension sample app. My SP metadata was generated using the Spring SAML extension sample app's metadata generator. The signing key being used is the apollo one... | 2 | 4,029 |
Why does the GridView disappear after a button click | <pre><code><asp:UpdatePanel ID="upExec" runat="server" ClientIDMode="Static" UpdateMode="Conditional">
<ContentTemplate>
<button type="button" runat="server" id="btnExec" onserverclick="btnExec_Click" class="btnAll btnExec">Execute SQL Job</button>
<asp:Label ID="lblEMsg" ... | 2 | 1,655 |
HTTP performance on linux/mono | <p><strong>My Question(s)</strong><br>
As there is a bit of code to back up this question - I'll ask it upfront. Are there any known performance issues with a Servicestack self host service (or indeed any http listener) running on linux/mono?</p>
<p>My actual use case is for a web service calling multiple other (non-p... | 2 | 2,772 |
Cannot resolve string symbol AndroidManifest.xml | <p>I'm creating a weather app using this tutorial:
<a href="https://blog.teamtreehouse.com/beginners-guide-location-android" rel="nofollow noreferrer">https://blog.teamtreehouse.com/beginners-guide-location-android</a>
I noticed that for some reason I got the errors: 'Cannot resolve symbol 'R'' and 'Cannot resolve symb... | 2 | 1,130 |
Unmarshalling a specific SOAP response in go | <p>I am trying to unmarshal the following SOAP response using the below structs. </p>
<pre><code>var data = `<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3rg/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLS... | 2 | 1,445 |
Unable to resolve service for type 'xxxSchema' while attempting to activate 'GraphQL.Server.Internal.DefaultGraphQLExecuter | <p>I am following the sample on <a href="https://github.com/graphql-dotnet/server" rel="nofollow noreferrer">https://github.com/graphql-dotnet/server</a> to create a GraphQL but I am getting the above error (Full version Below) when going to my http://localhost:5001/graphql.</p>
<p>I have played around with Many aspec... | 2 | 2,655 |
RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[64, 1, 32, 32] to have 3 channels, but got 1 channels instead | <p>I am working on SVHN dataset, and I got this error, only during training phase. During the instantiation of the model, it works.</p>
<pre><code>RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[64, 1, 32, 32] to have 3 channels, but got 1 channels instead
</code></pre>
<p>To be sure of havin... | 2 | 2,873 |
JQuery if then else using URL parser plugin quest for elegance take 2 | <p>This is my second question about this topic, the original question can be found here:
<a href="https://stackoverflow.com/questions/788068/jquery-if-then-else-using-url-parser-plugin-there-must-be-a-more-elegant-solutio">JQuery if then else using URL parser plugin, there must be a more elegant solution!</a></p>
<p>I... | 2 | 2,349 |
Avoiding extra move in make_unique/make_shared/emplace/etc for structures that use aggregate initialization | <p><code>std::make_unique()</code> (and similar functions) have a little <a href="http://coliru.stacked-crooked.com/a/7d4063069bcca194" rel="nofollow noreferrer">problem</a>:</p>
<pre><code>#include <cstdio>
#include <memory>
using namespace std;
struct S
{
S() { printf("ctor\n"); }
... | 2 | 1,313 |
Can not resolve method 'findViewById' in Fragment when i took EditText with Send fragment in Navigation Drawer? | <pre><code>import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
/**
* A simple {@link Fragment} subclass.
*/
public c... | 2 | 4,977 |
HAPI: Hl7 Parser do not separate segments, appending all data in one HL7 Segment | <p>I am simply trying to create a HL7 V2.6 message by using HAPI API. I am using latest 2.2 API. </p>
<p>When I try to print message, all data appending in one segment only. Here is my code-</p>
<pre><code>package com.psl;
import ca.uhn.hl7v2.DefaultHapiContext;
import ca.uhn.hl7v2.HapiContext;
import ca.uhn.hl7v2.m... | 2 | 1,760 |
Guice and Reflections inside Jar File | <p>I am experimenting with Google Guice (3.0) and Google Reflections (0.9.6).</p>
<p>I have the following files:</p>
<p><strong>Operation.java:</strong></p>
<pre><code>package com.company1.calculator;
public interface Operation {
public int apply(int a, int b);
}
</code></pre>
<p><strong>Addition.java:</strong... | 2 | 1,127 |
Backbone.js | How can I store elements of a view for retrieval later? | <p>This is my first attempt at using Backbone.js, so I decided to make a simple test application that simulates a restaurant menu with menu items. I was following along with <a href="http://andyet.net/blog/2010/oct/29/building-a-single-page-app-with-backbonejs-undersc/" rel="nofollow">this cool blog post from andyet.n... | 2 | 1,672 |
Xuggler - opening mp4 files crashes/blocks program | <p>Short version:</p>
<p>Opening/reading mp4 files with Xuggler sometimes does not work properly but causes program to crash. </p>
<p>Long version:</p>
<p>In my program i read, modify and write video files. It works fine with most formats i tested (avi, flv, mpg, mkv).
The Xuggler functions i use are mostly:</p>
<... | 2 | 8,020 |
Jetpack Compose set sibling Composables' width to longest one dynamically with SubcomposeLayout | <p>How can i set width of a group of composables, siblings layout from top to bottom, to width of longest one?</p>
<p><img src="https://i.stack.imgur.com/hOKXG.png" width="300">
<img src="https://i.stack.imgur.com/8mzVx.png" width="300"></p>
<p>What i try to build is exactly same thing as in the images above. For simpl... | 2 | 2,539 |
Angular 4 with Universal + ng2-translate | <p>I'm currently implementing Angular Universal to my app. I already had a bunch of errors to resolve but i'm stuck to this one.
I can build my app, the aot compilation is working fine but when I run my server that should bootstrap my app I can see that error :</p>
<blockquote>
<p>Unexpected token import in my \node... | 2 | 1,635 |
Unable to read image from file () | <p>I try to let my users upload their profile image and when i click submit button to save changes will get this error</p>
<p><code>NotReadableException in Decoder.php line 20:
Unable to read image from file ().</code></p>
<p>this is my update methode in controller:</p>
<pre><code>public function update(Request $req... | 2 | 1,216 |
Vue Router splitting screen with children routes | <p>Sorry if my title is vague but I can't think of a better description.</p>
<p>Right now I'm trying to make a SPA (for mobile) but I've got this issue going on with my routing: children of the route are having their screen split in half.</p>
<p>Perhaps these two images describe the problem better.
Home page:
<a href... | 2 | 2,936 |
Using jQuery to stretch an image to fill entire div, which resizes on window resize | <p>I know this has been asked in some way before, but none of the solutions I can find quite do everything, and I'm struggling to mix them up.</p>
<p>I have a webpage made up of a series of panels, and I'm using jQuery to resize each panel to fill the document window, and resize again if the window is resized.</p>
<p... | 2 | 1,756 |
_WebSafeForwarder forwardInvocation crashes | <p>I'm getting quite a few errors which appear to be related to WebKit in my iOS project. To give some background, we use WebViews in our application for displaying news stories. These news stories often include links and when the user clicks on the links, we usually bring the user to Safari to read a full news article... | 2 | 1,180 |
Angular 2 Uncaught SyntaxError: Unexpected Token < | <p>I've seen that this problem is fairly common across Angular 2, but I haven't seen anything that helps with my particular situation.</p>
<p>Specifically, I'm creating an app that's pulling data from an API (which requires an API key), where the results are specifically in XML format. What I'm trying to do is call th... | 2 | 1,351 |
IBM-MQ: Configuring mutual TLS authentication between client and queue manager | <p>I'm trying to set up TLS mutual authentication between client and IBM-MQ queue manager (using the <a href="https://hub.docker.com/r/ibmcom/mq/" rel="nofollow noreferrer">ibmcom/mq Docker image</a>). The certificates are self-signed and created according to this <a href="https://developer.ibm.com/messaging/learn-mq/m... | 2 | 2,145 |
Two Struts2 Filters in One Web Application | <p>I want to use two struts2 filters in one application. I have following filters definition in <code>web.xml</code>. "struts2" filter is already there, I just added "companion" filter.</p>
<pre><code><filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.... | 2 | 2,722 |
Laravel 5: Method [validateTime] does not exist | <p>When I'm trying to update my project and doing a POST request to my ProjectsController I get the following error:</p>
<blockquote>
<p>Method [validateTime] does not exist</p>
</blockquote>
<p>At first I was using a custom request, but after some researching I took to making a Validator in the controller, resulti... | 2 | 4,019 |
Hackerearth policeman and theives problem | <p>I am trying to solve the Policeman and Theives problem in Hackeearth website. I am able to reduce the time complexity but three test cases are failing. There seems to be a bug in the solution which causes a small mismatch. I am struggling to find the error for weeks. Below are the problem statement and my code,</p>
... | 2 | 2,699 |
How to update cart item quantitty with ajax in laravel? | <p>I want to increment/decrement cart quantity by clicking the button. See this image <a href="https://i.stack.imgur.com/MRm8G.png" rel="nofollow noreferrer">preview image</a></p>
<p>This cart row is shown by forcach loop. First row is working perfectly. The problem is, when I click on the seceond/last row, I get only ... | 2 | 3,092 |
Run @DataJpaTest, Spring Data Test along with Swagger Config in separate class | <p>I am trying to run a <code>DAO</code> test using </p>
<pre><code>@RunWith(SpringRunner.class)
@DataJpaTest
</code></pre>
<p>I have my <code>Application</code> class.</p>
<pre><code>@SpringBootApplication
@EnableAspectJAutoProxy
@EnableTransactionManagement
@EnableJpaRepositories(basePackages="com.eeposit.lattice.... | 2 | 7,457 |
NSInternalInconsistencyException', reason: 'Could not load NIB | <p>I'm calling a controller that appears but after a while when I call back, I get this error:</p>
<blockquote>
<p>2017-02-28 16:43:53.858 VoxInfra[38864:7593572] <strong>* Terminating app
due to uncaught exception 'NSInternalInconsistencyException', reason:
'Could not load NIB in bundle: 'NSBundle
(loaded)... | 2 | 1,866 |
TextBox drawn in WM_PAINT flickers on mouse enter/leave | <p>I have a custom TextBox in which I draw some place holder text when it's empty.
It works pretty well, but it flickers when the mouse enters and leaves the TextBox. It seems related to the border becoming blue when the mouse hovers the control (I'm on Windows 8.1).</p>
<p>Any idea how I could fix this ?</p>
<p>I've... | 2 | 1,237 |
App crash on headset button click | <p>I have build an audioplayer which is deployed in android google playstore. I'm using crashlytics to monitor crashes and ANRs. Recently I have been getting a lot of crashes MediaButtonReceiver. The headset clicks work fine in many devices. But some devices are giving this problem.</p>
<p>Crashlytics report - </p>
<... | 2 | 3,724 |
Set @Repository to work with specific DataSource Spring-boot | <p>I have 2 DataSources defined in my Spring-boot Project and I also have 2 @Repository.</p>
<p>I have this code in my </p>
<blockquote>
<p>Application.java</p>
</blockquote>
<pre><code>@SpringBootApplication
@EnableJpaRepositories(basePackages = {"com.opes.kyc_adapter.repository.postgresql", "com.opes.kyc_adapter... | 2 | 2,483 |
Running a SSIS Package from SQL Server Management Studio 2008 | <p>I have set up a Import that copies data from a database on SQLExpress 2005 and Deletes and replaces the Data in a Database on SQL Server Management Studio 2008. </p>
<p>This Runs fine when i set it up for the first time? but if i try to assign a job in SQL Server Management Studio 2008 to run the procedure at a set... | 2 | 3,130 |
Table head Fixed with vertical Scroll not work in IE 11 | <p>Please... I need Help whith this...
I have this code for a table with head fixed and vertical scroll and work fine:</p>
<pre><code><style type='text/css'>
div.fixedHeaderTable table { border-spacing: 0;
display: flex;
max-height: 180px;
... | 2 | 2,144 |
When I try to get whole page screenshot it returns a white screen? | <p><strong>I'm trying to get the whole screen shot programmatically in webview. When I test my code, it returns a white screen.</strong></p>
<p>I've tried different codes, but I couldn't get it done. Sometimes it returns a white screen, sometimes it returns a black screen. I've also added my manifest Internet permissi... | 2 | 1,258 |
Solr boolean queries combined with index-time boosts | <p>I have a site using Solr 1.4.1 for relevancy/recommendations. I am using boolean-style queries in some places. I am using a query like <code>+(+type:aoh_company +aoh_dictionary_tids:623)</code> - and that provides the expected results, but the order of the results appear to be arbitrary.</p>
<p>I am trying to contr... | 2 | 5,063 |
Connecting R-Studio with MySQL leads to errors (Windows) | <p>I used this guide: <a href="https://stackoverflow.com/questions/5223113/using-mysql-in-r-for-windows">Using MySQL in R for Windows</a> but it didn't help. I'm already searching for hours on this problem. Since I can't figure out my problem I just can send here the log when trying to <code>install.packages('RMySQL',t... | 2 | 1,774 |
Bind textbox with response from onclick event - jquery | <p>I have a textbox in my view page. when i click on imageIcon,it will take data from db and return in alert successfully. But, when i try to bind this response data to textbox, it is not binded correctly. My code in view page is as following :</p>
<pre><code>@foreach (var dateitem in list)
{ ... | 2 | 1,133 |
this.dispatcher.invoke() does not work for multithreading? | <p>I am having this error again: The calling thread cannot access this object because a different thread owns it.</p>
<p>Here is my code:</p>
<pre><code> public void InitiateSignalAnalysisPlot()
{
if (_nActiveChannel > 0) // timeDomainPlotter init
{
_dataX = new L... | 2 | 2,307 |
mailmerge with visto how to get each record of MailMerge.DataSource.DataFields | <p>I' have a Project that needs to do a mailmerge, I'm performing this with VSTO. I need to check if all records on the <code>MailMerge.DataSource.DataFields</code> are ok. i'm doing that with this code.</p>
<pre><code> public void verificarPersonas(Word.Document Doc)
{
ThisAddIn ThisAddIn = Globals.Thi... | 2 | 1,592 |
Handle Calendar With Robot Framework | <p>I'm trying to automate a scenario with Robot Framework where I want to click on past or future dates based on the current date. Somehow I'm not able to achieve it due to the element exception.</p>
<p>The code looks something like this:</p>
<pre><code>*** Settings ***
Library SeleniumLibrary
Library DateTime
Librar... | 2 | 1,653 |
How to align input boxes in a column using Zurb foundation | <p>I am a newbie to Zurb Foundation and I am trying to align the input elements (second div with class="large-9 columns")inline.
But they are being stacked one over the other inspite of using the class="columns".
How can i get them arranged inline?</p>
<p><a href="http://jsfiddle.net/Sbt75/432/" rel="nofollow">http://... | 2 | 1,232 |
C# HttpClient Request HTTPS Exception error | <p>I am getting an intermittent error with a MVC Web App on the .NET Core 2.2 that sends Http requests to get information from various APIs.</p>
<p>I believe the error is related to the URI being a https instead of a http as other calls to other APIs without the https work absolutely fine. Even with the Client Handler... | 2 | 1,424 |
Cassandra + SpringBoot, java.lang.ClassNotFoundException: com.datastax.oss.protocol.internal.SegmentCodec | <p>I'm trying to create a Spring application using Cassandra DB. But getting following error when I try to run the application.</p>
<pre><code>Caused by: java.lang.NoClassDefFoundError: com/datastax/oss/protocol/internal/SegmentCodec
... 103 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.dat... | 2 | 1,940 |
NullPointerException for android ContextWrapper | <p>I have a class (DataSource.java) containing a method, which is calling another method in my MainActivity, which receives a context and a string variable. </p>
<p>In the Datasource.java, when calling the method from the MainActivity, I have set the context variable to null, and even if I set it to "context" I receiv... | 2 | 1,948 |
How do I make a view float above other views in an IME? | <p>I am trying to make a ListView <strong>in my IME</strong> "float" in the middle of the screen, just like the Swype keyboard:</p>
<p><img src="https://i.stack.imgur.com/RTGg3.png" alt="enter image description here"></p>
<p>I've read how to do it in an Activity by using a FrameLayout, but it isn't working in my IME,... | 2 | 2,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.