title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Firebase - retrieve data in Android | <p>I have a data looks like this:</p>
<pre><code>{
"courses" : {
"Business" : {
"-KOBuojCGl_KVNgCx6l3" : {
"courseCode" : "BUS2202",
"courseName" : "Business Mathematics"
},
"-KOCH9RvYkwIamb0oxi8" : {
"courseCode" : "BUS2302",
"courseName" : "Business Fundamentals... | 2 | 1,667 |
Making an elasticsearch nested query for match on all fields of nested object | <p>The basic question is as follows:
Is there a convenient way to specify a multi-field match on all fields for a nested query?
For a normal query <code>{ match : { _all : "query string" }}</code> works.
This doesn't work in a nested query for perhaps because the nested object doesn't have an _all? </p>
<p>The more de... | 2 | 1,228 |
Linking Doubly linked list with Stack and Queue classes in C++ | <p>so I have an assignment where I need to create a doubly linked list and then create a stack and queue class and inherit from the <code>linkedlist</code> class in order to create an <code>RPN calculator</code>. So far I have created my doubly linkedlist class and the other to classes. However, I am having trouble und... | 2 | 2,202 |
Error: <command-line>:0:9 | <p>I get the following error. </p>
<pre><code># make clean && make all
g++ -g3 -funroll-loops -fomit-frame-pointer -m32 -march=pentium3 -mmmx -msse -mfpmath=sse -Wall -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -g3 -g -c -DSYS_DAB=0 -DDVBAPI_V5 -DNEW_FFMPEG -DDEBUG -D... | 2 | 1,945 |
Using google api to create and share a spreadsheet | <p>I have a script that I'm attempting to pass data through that would create a google spreadsheet and share it with a group of people. I'm having trouble with an error that is rejecting my permissions, though I don't know why.</p>
<p>I've gone through the google developer console and created a project and enabled bot... | 2 | 1,598 |
Argument 2 passed to App\Http\Controllers\HomeController::productDetail() must be an instance of App\Product, string given | <p>I have route</p>
<pre><code>Route::get('catalog/{category}/{product}', 'HomeController@productDetail')->name('product.index2');
</code></pre>
<p>and controller</p>
<pre><code>public function productDetail(categories $categories, product $product)
{
$products = product::where('active', 1)->get();
if(... | 2 | 1,714 |
Android. Sockets. Fail Connection | <p>I develop simple client-server app for Android by examples:
<a href="http://android-er.blogspot.com/2014/02/android-sercerclient-example-server.html" rel="nofollow">http://android-er.blogspot.com/2014/02/android-sercerclient-example-server.html</a>
<a href="http://android-er.blogspot.com/2014/02/android-sercerclient... | 2 | 4,778 |
jQuery Smart Wizard Remove Auto Scroll | <p>I'm trying to create a multi-step form using jQuery Smart Wizard 4, but for some reason when a load my website, the first step of the form wizard gets focus and the page scroll to it, finally the hash #step-1 is added to the URL.</p>
<p>I do not want this, but unfortunately i was unable to disable this or find anyt... | 2 | 2,455 |
jQuery autosave not working as it should | <p>I have a couple of scripts i have written below that work great seperately, but together they don't work as they should. Let me post the code and then explain the issue:</p>
<p>Autosave function:</p>
<pre><code><script>
function autosave() {
$('form').each(function() {
var... | 2 | 2,781 |
What is the Mockito dependency for scala version 2.11.12, PLAY framework | <p>I am new to scala and I have been trying to write tests in tdd approach. I am importing Mockito for writing tests.
But the following line isn't recognized. </p>
<pre><code>import org.mockito.Mockito._
</code></pre>
<p>This is the error I'm getting: </p>
<pre><code> C:\Users\indu.c\Downloads\play-samples-play... | 2 | 1,051 |
Check MVC Controller Permission and return 401 Unauthorized to angularJS app | <p>I have an angularJS application which communicates with MVC Controller to get some data.</p>
<p>I have implemented a class <code>RBACAuthorizeAttribute</code> which inherits from <code>AuthorizeAttribute</code> to check if the user has permission to execute the particular action on the controller. Implementation of... | 2 | 1,109 |
Axis2 ByteArray Web Service Return as String | <p>I am developing an Android application which suppose to call Axis2 Web Service (already implemented and running) where the previous developer made in such a way that Byte[] is the common form of passing Object around. Suppose there is a need to invoke web service in the Axis2 which should return List, the web servic... | 2 | 1,065 |
WooCommerce product categories custom fields - Setting time purchasing restrictions | <p>I have a Wordpress/WooCommerce site that displays categorized products. I'm trying to create a custom field in Admin individual categories pages (backend), where I can set a <strong>start</strong> and <strong>end</strong> <strong>time</strong> related to categorized products purchase availability. </p>
<p><strong>H... | 2 | 1,226 |
Reading direct access binary file format in Python | <p>Background:</p>
<p>A binary file is read on a Linux machine using the following Fortran code:</p>
<pre><code> parameter(nx=720, ny=360, nday=365)
c
dimension tmax(nx,ny,nday),nmax(nx,ny,nday)
dimension tmin(nx,ny,nday),nmin(nx,ny,nday)
c
open(10,
&file='FILE',
&ac... | 2 | 1,223 |
Objective C Calculator Programming Variable | <p>Okay, so I've been working on the Stanford iOS development course that they have posted for free online. I've been working on figuring out how to make a programable variable. It has been working fine so far, aside from the fact that I think the following lines of code are programming the variable to be @"x=" instead... | 2 | 1,093 |
prediction_regression_tree_ caret: Error in '[.data.frame'(m, labs) : undefined columns selected | <p>Im trying to train a regression tree in using the train-function from caret. It worked with a linear model. But when I tried a regression tree the following error came: <code>Error in '[.data.frame'(m, labs) : undefined columns selected</code></p>
<p>the data frame contains of 450+ dummy variables made from categor... | 2 | 17,358 |
selector for table inside iframe | <p>i have a page with 5 iframe elements. each of them has a document inside it. One of the iframe has a table called hawbtable. I want to find the number of rows in the hawb table, alert the value for each "hawb" column in each row</p>
<p>in the iframe with id="body" name="body" ..
i have a table called "hawbTable" ... | 2 | 1,975 |
Firebase dataSnapshot isn't converted to custom Java object | <p>I'm facing an issue trying to map the JSON data retrieved from Firebase database to a custom Java class in my project. I'm trying to retrieve all children nodes under <code>Restaurants</code> node.</p>
<p>Firebase data structure for Restaurants node:</p>
<pre><code>"Restaurants" : {
"ZyZnmC3xC39Jv1oVVdXbQdyCOc... | 2 | 1,719 |
How to make POST http request with HTTP Basic Auth in react? | <p>I am using React (with <code>create-react-app</code>) to crop an image and edit it. When finished, I want it to be compressed using the <a href="https://tinypng.com/developers/reference" rel="nofollow noreferrer">tinyPNG API</a>, which is a wonderful tool and provides great png/jpg compression.</p>
<h2>Goal:</h2>
... | 2 | 1,260 |
Decode token JWT in Ionic | <p>I am trying to get the uncoded token from a ws, but I do not succeed. The token is JWT. The token that the ws returns to me is the following:</p>
<pre><code>{\"token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDb2RpZ28iOiIxMTY4IiwiVXN1YXJpbyI6IjU0MDMyIiwiUGFzc3dvcmQiOiJmZGM3OTZlNzkwMjk2NTdjZGE2YjY1OWQ3NjI0MjAyYSIsI... | 2 | 2,672 |
screen rotation and live update gridview android | <p>i have a big doubt about memory leak and screen rotation. I know that activity is destroy when that happens and new one is started. With my code, with is the best way to show the gridview? (this activity is part of a tab activity so in the main one i get the pictures from web services and put them on the object, usi... | 2 | 1,118 |
Using nested collections of lambda expressions to create an object graph | <p>I am interested in utilizing lambda expressions to create a tree of property selectors.</p>
<p>The usage scenario is that we have some code that does some recursive reflection on an object graph, and to limit the scope of recursion, we're currently using Attributes to mark which properties should be traversed. i.e.... | 2 | 1,498 |
How to fix an error CS1061 in a C# console application? | <p>I am currently learning C# and .NET and I am currently learning how to make a NuGet package. One of the files that I have is set up as such:</p>
<pre><code>using System.Text.RegularExpressions;
namespace Packt.CS7
{
public static class StringExtensions
{
public static bool IsValidXmlTag(this string input)
... | 2 | 1,300 |
Prevent submitting if input field is empty | <p>I developing a comment system for my social media, but comments are inserted into database even if it's empty.So i want nothing to happen if comment field is empty,i don't want to echo any message or submitting the comment. </p>
<p>This is my code</p>
<pre><code> <?php
// Get id of post
if(isset($_G... | 2 | 3,050 |
Visual Basic GDI+ Drawing Lines | <p>I am working on a simple VB interface that should allow the user to draw a line from the point the mouse is clicked down to whereever the mouse position is, then leave the line where the mouse button is released. I am new to VB GDI+ and could use some pointers or tips. I need it so that I can draw multiple lines on ... | 2 | 1,237 |
Pygame images won't load anymore | <p>Since I started this I've had char.png in the same folder as my .py file <b>not</b> a subfolder and it would load my images but when I added in the ability to move left and right, now I get an error.</p>
<pre><code>Traceback (most recent call last):File "C:\Users\Shiloh\Google Drive\Python\Platformer\main.py", line... | 2 | 1,062 |
Java DefaultTableModel gather data from multiple tables | <p>I have a data relation</p>
<pre><code>Person-Attends-Course
Person
-------
id: integer primary key
name: string
prename: string
age: integer
Course
-------
courseName: string primary key
hours: integer
Attends
--------
id: integer primary key references Person
courseName: string primary key references Course
</c... | 2 | 3,369 |
Higher / lower game | <p>I'm trying to make a higher / lower number game. So basically you get one number and the start and then you click a button - higher or lower. So if you click higher and the next number is higher you win otherwise you lose , same goes for lower.The problem comes when I click some of the buttons it gives a new number.... | 2 | 1,123 |
How do I animate steam from a coffee cup in my SVG icon code? | <p>I'm a graphic designer just learning about SVG animated icons and coding. I have illustrated a cup of coffee in illustrator then exported it as an SVG file. I am trying to animate the steam so that it rises like real steam. The problem is that it's not animating the steam even if I have .steam1 .st1 selected in CSS.... | 2 | 11,553 |
Dynamically Selecting value from column table based on column name from other table (reflection) | <p>Assume I have 2 tables FOO and BAR as below, is it possible to use a sort of reflection on FOO, if you know the column name as a string based on a join of the BAR table?</p>
<pre><code>SELECT DB, FOO.Name, FOO.Type, BAR.Field, I.DATA_TYPE AS FType, FOO.**<BAR.FIELD>** AS Value
FROM INFORMATION_SCHEMA.COLUMNS ... | 2 | 1,597 |
How to merge using POSIXct variable | <p>I am attempting to merge two dataframes by a POSIXct column. I am using tidyverse and lubridate. <em>inner_join()</em> returns an empty dataframe while <em>full_join()</em> returns duplicates for the shorter fram. Is this a bug or is there a more appropriate or preferred method for joining by POSIX objects?</p>
<pr... | 2 | 1,510 |
No TypeTag available | <p>I've tried to make a generic function <code>diff</code> (like a function diff in R language) which make a difference vector of given DataFrame's target column according to given binary function, like this:</p>
<ul>
<li><p>given data: <code>df(col1, col2)</code> </p>
<p>Seq(<br>
("A", 1),<br>
("A", 1),<br>
("A"... | 2 | 1,228 |
Why WCF service is set as SOAP | <p><a href="https://i.stack.imgur.com/qdQyg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qdQyg.png" alt="enter image description here"></a></p>
<p>I have created the WCF service mentioned above when testing it using the Microsoft WCF Test Client and trying to invoke one of the methods, the respon... | 2 | 1,277 |
JavaScript for Twitter-Bootstrap Contact form | <p>I'm working on my first bootstrap project and I'm having trouble finding help with specifically what I'm trying to achieve. I think it's simpler than what I'm making it out to be but I'm terrible at javascript- which is the bulk of my problem.</p>
<p>What I'm trying to achieve:</p>
<p>User is presented with 4 fiel... | 2 | 1,164 |
Wordpress doesn't select page template for parent pages | <p>I'm developing a WP Theme and I'm having this issue that's driving me crazy...</p>
<p>For every single (parent) page I create, WP chooses <code>index.php</code> as template. I'm aware of WP template hierarchy but it doesn't matter if I use <code>page.php</code>, <code>page-$slug.php</code> or <code>page-$id.php</cod... | 2 | 1,335 |
IIS 8.5 MVC5 Client Cache is ignored | <p><strong>TL;DR - I want the server (IIS 8.5) to return 304 not modified for the CSS and JS bundles.</strong></p>
<p>I've been unable to get IIS 8.5 to honor the clientCache settings in web.config. No matter what I do, I can't seem to get it to cache the static content. This is a MVC5 app in VS2013. I've got all t... | 2 | 1,032 |
TradingView JS API websocket request response? | <p>I'm trying to use the tradingview chart widget for my own datasets and I'm a little confused as to how to get it working viawebsocket (all the examples I've found use REST). My confusion is in the 'binanceSymbols()' method. The example shows a REST call but I want to request the symbols via the open websocket connec... | 2 | 1,674 |
Asp.net Dynamically recreating ListBoxes on PostBack | <p>I want to create dynamically added <code>ListBoxes</code> based on Main Categories and Subcategories where they can be an infinite amount of sub categories. I have been working on this all week and can't figure this out.</p>
<p>I want it to be like Ebay category selection. When the page loads there will be a listbo... | 2 | 2,002 |
Circular UICollectionview, how to keep all cell angles 0° | <p>I build a circular UICollectionview by following <a href="https://www.raywenderlich.com/107687/uicollectionview-custom-layout-tutorial-spinning-wheel" rel="nofollow noreferrer">This</a> guide, Everything is working as expected but I don't want the items to rotate around their own angle/anchor</p>
<p>The top row is ... | 2 | 1,677 |
reusable view controller with view In storyboard (multiple in one scene) | <p>I'm building a little math game app for two players, for my daughter and friends (but I'm planing to also allow singleplayer later on). For now it's for 2 players and both sit on opposite sides of the iPhone.
Each player has the same buttons, same questions to answer. They push a button (of a self build numpad), the... | 2 | 2,280 |
Can delegates cause a memory leak? GC.TotalMemory(true) seems to indicate so | <p><strong>Code</strong></p>
<pre><code>using System;
internal static class Test
{
private static void Main()
{
try
{
Console.WriteLine("{0,10}: Start point", GC.GetTotalMemory(true));
Action simpleDelegate = SimpleDelegate;
Console.WriteLine("{0,10}: Simple ... | 2 | 1,033 |
Firebase and Android: Order Query Results | <p>I have a short Question about my Code.</p>
<p>I'm using a recyclerview in my Android App, and fill it with some data out of my Firebase Database.</p>
<p>It works well, but I notice that the ordering is not right :/</p>
<p>I have this Code:</p>
<pre><code>private void getRankings() {
// hole anzahl an Tei... | 2 | 1,259 |
Error x-amzn-errortype: InvalidSignatureException on DELETE request to API gateway | <p>I am attempting to build a javascript application.
I am unable to get a DELETE request authenticated via IAM. </p>
<p>The API gateway delete route has been configured to use AWS_IAM authentication. Cognito user group has a role attached which grants access to invoke the delete route.</p>
<p><strong>I've signed the... | 2 | 1,976 |
Angular - Parser Error: Cannot have a pipe in an action expression at column 21 in [form.loading_date | date: 'dd/MM/yyyy'=$event] | <p>I am using Angular-7 for web portal application. I have a Material Datepicker from which I would like to only get date with no timestamp. Also it should be in this format: dd/mm/yyyy.</p>
<p>my.component.ts</p>
<pre><code>import { Component, OnInit, ElementRef, NgZone, ViewChild } from '@angular/core';
import { Ht... | 2 | 1,493 |
JQuery: How to know when a table row loses focus follow-up | <p>This is a follow-up to question 16885880. I did not see a good mechanism for asking this question within the context of that question. I don't have a 50 Reputation so I can't comment (and this would probably be inappropriate as a comment, anyway), and this is not an answer to that question.</p>
<p>My question:</p>
... | 2 | 1,673 |
Does `const T *restrict` guarantee the object pointed-to isn’t modified? | <p>Consider the following code:</p>
<pre><code>void doesnt_modify(const int *);
int foo(int *n) {
*n = 42;
doesnt_modify(n);
return *n;
}
</code></pre>
<p>where the definition of <code>doesnt_modify</code> isn’t visible for the compiler. Thus, it must assume, that <code>doesnt_modify</code> changes the o... | 2 | 1,121 |
Is there any difference between ViewStub and View? | <p>I am new to Android Development.
I read about ViewStub from <a href="https://developer.android.com/training/improving-layouts/loading-ondemand.html" rel="nofollow">https://developer.android.com/training/improving-layouts/loading-ondemand.html</a></p>
<p>It mentions that it is cheap and less memory to use it.</p>
<... | 2 | 1,262 |
Testing API call in laravel controller/view | <p>I'm testing an API call that I have working in Postman and other interfaces built over the API, but I'm trying to actually get my return values within my laravel site.</p>
<p>Should be simple enough, I made a very bare service file that uses guzzle to get to the API url, and I have a function in there for logging i... | 2 | 1,081 |
Spring Web Flow - JSF - PrimeFaces Integration : UrlBasedViewResolver adds incorrect URL on JSF action | <p><strong>UrlBasedViewResolver prefix is appended to the URL multiple times so that the resouces are not found.</strong></p>
<p>Spring Version: 4.2.0.RELEASE Spring Web Flow Version:
2.4.2.RELEASE PrimeFaces: 5.2 JSF (jsf-api and jsf-impl): 2.2.12</p>
<pre><code><servlet-mapping>
<servlet-na... | 2 | 5,170 |
php artisan db:seed is not working Laravel 5 | <p>I have read other answers but nothing solved my issue. When I run <code>php artisan db:seed</code> nothing happens, even no error is thrown.<br>This is my DatabaseSeeder class </p>
<pre><code><?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder
{
... | 2 | 2,088 |
How to pass a custom schema to a drf detail_route? | <p>I have the following route:</p>
<pre><code>@detail_route(methods=['post'], permission_classes=[IsOperator], schema=AutoSchema(manual_fields=[
coreapi.Field('size', location='query', schema={'type': 'number', 'example': 1024}),
coreapi.Field('filename', location='query', schema={'type': 'string', 'example': ... | 2 | 1,319 |
Rabbitmq ERROR CachingConnectionFactory:1302 - Channel shutdown: channel error; | <p>I am getting this error</p>
<p>ERROR CachingConnectionFactory:1302 - Channel shutdown: channel error; protocol method: #method(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-message-ttl' for queue 'xyz.xyz.dlq' in vhost 'qa40': received the value '10000' of type 'signedint' but current is none... | 2 | 1,096 |
Indexing pdf/word using inguest-attachment plugin in elasticsearch via java code | <p>Am trying to index my word/pdf document so that I created one util program using java to encode my files into base64 and then am trying to index them in ElasticSearch.</p>
<p>Please find my below code that I able to encode my files into base64. Now, I am not sure how can I index them in ElasticSearch</p>
<p>Please... | 2 | 1,600 |
Upload image in jpeg format in multipart file on server in android | <p>hi i am developing an application that needs to post some images in jpeg format to server in multi-part file form , i have written below given code for this but it gives following response, </p>
<pre><code>01-15 00:32:14.119: I/System.out(7598): file is upload {"status":"error","message":"Please, Specify valid Par... | 2 | 6,681 |
How to use an ActiveModel with resourceful URL helpers? | <p>A confusing question title requiring a lot of explanation for what I hope isn't actually too difficult a problem.</p>
<p>I have created a little ActiveModel (<code>FooBarSearch</code>) to handle search requests for an ActiveRecord model (<code>FooBar</code>) in my Rails 3.2.16 application. There are a few places in... | 2 | 1,228 |
Deploy GitLab with Helm. Nginx-ingress pods can't start | <p>Call install: </p>
<pre><code>helm install --name gitlab1 -f values.yaml gitlab/gitlab-omnibus
</code></pre>
<p>I see Pods can't start.</p>
<p>And I see error:<code>no service with name nginx-ingress/default-http-backend found: services "default-http-backend" is forbidden: User "system:serviceaccount:nginx-ingres... | 2 | 5,597 |
Creating a jQuery tabs shortcode | <p>I am trying to create a jQuery tabs shortcode for WordPress this is my code in my functions.php for some reason the tabs show etc but they don't change?</p>
<pre><code>add_shortcode('tabs', 'tabs_group');
add_shortcode('tab', 'tab');
// this variable will hold your divs
$tabs_divs = '';
function tabs_group( $atts... | 2 | 1,106 |
Docker, Celery, method failing on compose | <p>I'm trying a FastAPI based API with celery, redis, and rabitMQ as the background tasks.
when doing <code>docker-compose up</code>, the redis, rabbit, and flower parts work, I'm able to access the flower dashboard.</p>
<p>but it then gets stuck in the celery part.</p>
<p>the error:</p>
<pre><code> rabbitmq_1 | ... | 2 | 2,286 |
Properly crop an image obtained from the photo library | <p>I've been working on this all day, and have looked at lots of questions here on SO and google, but so far I can't come up with anything quite right.</p>
<p>I have taken a photo on an iPad running iOS 5.1.1 and cropped it using the Photos app. I then get a reference to it from the assets library and am getting the ... | 2 | 1,211 |
Prevent login of ODBC Text driver in Crystal Report for Visual Studio 2010 | <p>I am new to Crystal Report and I have a problem I cannot figure out.
Because I cannot find an answer anywhere I try it this way.</p>
<p>I am using a Crystal Report which uses an ODBC database with a text driver as a datasource.
This report works perfect when opening it with the standalone Crystal Report XI.</p>
<p... | 2 | 1,174 |
how to insert data using a button from fragment in android studio | <p>am having a problem while trying to insert into sqlite database in android.
am having my app with tabs(tab one, tab two,tab three), they are linked to fragments. i put two edit text for amount and reason to the fragment with the button of add in the database. but when i try to fill the form and click to the database... | 2 | 4,271 |
SQL error when saving instance in Hibernate | <p>When I try save instance, I get this strange error:</p>
<pre><code>WARN [15:06:27,917] JDBCExceptionReporter - SQL Error: 20000, SQLState: 42X04
ERROR[15:06:27,917] JDBCExceptionReporter - Column 'ad0b8d24-f596-47cb-9d79-06a3c9c1de26' is either not in any table in the FROM list or appears within a join specificatio... | 2 | 4,008 |
Pulling Google Finance portfolios into R | <p>I want to access data from my google finance portfolio in R. I am trying to do this by reading the <a href="http://code.google.com/apis/finance/docs/2.0/developers_guide_protocol.html" rel="noreferrer">Google Finance API</a> documentation and following the lead of <a href="http://www.omegahat.org/RGoogleDocs/" rel=... | 2 | 1,129 |
Joining tables in different databases / sessionfactory in hibernate | <p>My application works with 2 databases: 1 SQL Server and 1 PostgreSQL.
The SQL Server is used for the website and had some performance issues in the past, therefore, I separated some analysis data into a different database, where I am adding data constantly and calculate some things all day long.</p>
<p>In most of t... | 2 | 1,093 |
Import CSV file, remove empty rows and export it immediately without storing it into database - laravel excel | <p>I am trying to remove all the empty rows from a csv and make it downloadable. In this process, there is no involvement of database/model.</p>
<p>My flow looks like:</p>
<p>1) Import csv file.
2) Filter empty rows.
3) Export the data after all the empty rows are removed.</p>
<p>My code looks like:</p>
<h1>Control... | 2 | 2,306 |
How to update two values in two different reducers at the same time in Redux / Atomic operations | <p><strong>Project description:</strong> I've a calendar like Google Calendar, where you have zoomIn and zoomOut buttons, and also a datepicker where you can click any date to move your calendar to that date.</p>
<p><strong>Design of store:</strong> I've a filters reducer where I keep the range of the current calendar... | 2 | 1,025 |
Getting java.lang.NoSuchFieldError: INSTANCE while creating mongoTemplate bean in spring | <p>Getting below error while creating mongoTemplate bean.</p>
<p>I think jar versions are conflicting.</p>
<p>If I am using spring-data-mongodb 1.2.0.RELEASE then it showing java.lang.NOCLASSDEFMETHOD error.</p>
<blockquote>
<p>org.springframework.beans.factory.BeanCreationException: Error creating bean with name ... | 2 | 6,754 |
Redux state undefined when mapping state to props in react | <p>I am trying to map the state of my form to the props of my LoginForm component and the state is showing as <code>undefined</code>.</p>
<pre><code>import React, { PropTypes } from 'react';
import { reduxForm, getFormValues } from 'redux-form/immutable';
import { connect } from 'react-redux';
import { logUserIn } fro... | 2 | 1,685 |
wrong number of arguments (given 0, expected 1) in ransack scope | <p><a href="https://i.stack.imgur.com/Q9yIH.png" rel="nofollow noreferrer">I was getting this error</a></p>
<p><strong>Controller</strong></p>
<pre><code>def index
@q = JobSubmission.ransack(search_params[:q])
@job_submissions = @q.result(distinct: true)
@job_submissions = @job_submissions.page(params[:page]).per(10... | 2 | 1,689 |
Symfony + bootstrap custom form | <p>I am trying to make custom theme for symfony forms with bootstrap.
Final result looks like this <a href="https://i.stack.imgur.com/avTvQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/avTvQ.png" alt="image"></a></p>
<p>Problems:</p>
<ul>
<li><p>Button and input with token are not in form(loook... | 2 | 7,443 |
NullPointerException archetype:crawl | <p>I'm trying to discover the archtypes installed in my local repository. I read this is possible run the following command:</p>
<blockquote>
<p>mvn archetype:crawl</p>
</blockquote>
<p>Now when I run this command I get this error:</p>
<pre><code> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-ar... | 2 | 1,240 |
System.InvalidOperationException: 'Dispatcher processing has been suspended, but messages are still being processed.' | <p>I created a blank WPF Application</p>
<pre><code><Window x:Class="WpfApp4.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="htt... | 2 | 4,192 |
Plotting an Indicator with matplotlib | <p>I rewrote a indicator from another language into Python but my plot doesn't look like right. This is a Picture how the Plot should look like
<a href="https://i.stack.imgur.com/6YQbn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6YQbn.png" alt="enter image description here"></a></p>
<p>But my pl... | 2 | 5,662 |
HTML FORM + PHP: form action to remain on same page as login | <p>at the moment my form links to a new page with all of my php code on it. I would like for all of the code to be executed on the same page as it does in this tutorial: <a href="http://www.w3schools.com/php/php_form_url_email.asp" rel="nofollow">http://www.w3schools.com/php/php_form_url_email.asp</a></p>
<p>I'm havin... | 2 | 1,600 |
How to add data to columns in SQLite? | <p>I have rewritten my "death-row" program to add a few improvements and make it compatible with Python 3.</p>
<p>This is how it looks right now:</p>
<pre><code>import sqlite3
import re
import urllib.request
from bs4 import BeautifulSoup
import requests
import string
URL=[]
conn = sqlite3.connect('prison.sqlite')
... | 2 | 1,535 |
unable to resize grids in extjs(3.4) when forcefit = true on fireFox | <p>I have these two grids defined in a page. I cannot resize the colums in fireFox. Here is the code, the code has been straightway picked from the extjs examples.</p>
<p>Ext.onReady(function() {</p>
<pre><code> //console.log("ExtOnReady()");
Ext.QuickTips.init();
Ext.MessageBox.maxWidth = 300;
Ext.Aja... | 2 | 5,781 |
MultiBinding ConvertBack issue | <p>In trying to solve an issue Im having in another project - Ive created the following example to replicate the issue.</p>
<p>The idea is that when the user enters new values, via the slider or textbox, those values should then be "ConvertedBack" via the convertor, and the source updated. I don't seem to be seeing th... | 2 | 3,073 |
Table row and col highlight with zebra striping | <p>I have taken the Chris Coyier table row and col highlight code and added zebra striping. I can get the row to highlight but the col stops highlighting when zebra stripes are enabled.</p>
<p>If you uncomment the 1st 2 lines of jQuery to show zebra striping you will see the problem I've outlined above.</p>
<p>Not en... | 2 | 2,895 |
maven-surefire-plugin:2.22.1 test failing with NullPointerException | <p>I have a problem successfully compiling my tests with maven. I am mocking a service using EasyMock v 4.0.2. I should mention running the test with the intellij IDE works without problems Below is the code attached. The problem seems to arise when ever I try to inject the mocks into my mock test. I have seen a couple... | 2 | 1,664 |
Spring Boot Raw WebSocket Set Principal | <p>I want to develop notification sender in real time with Spring Boot but I can't use Stomp and sockjs, so I need implement raw WebSocket but I can't find out how to set Principal in WebSocket connection beacuse I want to Authenticate with JWT token. So, where or how can I set principal.
I'am using these;</p>
<p>WebS... | 2 | 1,470 |
Android Material Design TextInputEditText not able to get the string | <p>I am using material design in my android app registration page. I have used the following code in my xml file.</p>
<p>XML File</p>
<pre><code><com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"... | 2 | 1,520 |
Facebook API & Ajax POST request | <p>I have a Facebook connect/disconnect link. When user clicks on "Facebook connect" link (on <strong>index.php</strong>), it checks the user state (Is he connected to Facebook or not?) then if he's not connected, my script sends an Ajax $.post request to <strong>connect.php</strong> in order to retrieve infos from dat... | 2 | 2,606 |
System.LoadLibrary(libname) crashing on Nvidia Tegra 2 chipset (Android Samsung Tab) in Javacv code | <p>I have made a custom camera in Andorid using <a href="https://code.google.com/p/javacv/" rel="nofollow noreferrer">Javacv code</a>.
I hadn't included all the .so files but only those which seems required for my application.
As in the screen shot below:</p>
<p><img src="https://i.stack.imgur.com/ZmwkT.png" alt="ente... | 2 | 8,458 |
cannot create jdbc driver of class '' for connect url 'null' postgresql | <p>I'm getting this error when I try to deploy my WAR application.</p>
<pre><code>org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of cla
ss '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(B
asicDataSource.java:1452)
at org.apach... | 2 | 3,706 |
Akka.net - Trying to test a repeated scheduled message | <p>I'm working on an Akka.net system using .net core, and writing a feature where one actor executes a process every 24 hours using the Scheduler.</p>
<p>I'd like to unit test this, but of course the test needs to run quickly. I'm trying to use the Akka.TestKit TestScheduler to artificially advance time, but examples ... | 2 | 1,858 |
Spring @Cachable method within the same class (self-invocation, proxy issue) - What is the best way to solve it? | <p>I'm trying to call a @Cacheable method from within the same class.</p>
<p>And it didn't work. Because of:</p>
<blockquote>
<p>In proxy mode (the default), only external method calls coming in through the proxy are intercepted. This means that self-invocation (in effect, a method within the target object that calls a... | 2 | 1,485 |
How to marshal unmarshal a Map using Jersey | <p>I have seen a lot of examples where a Map is passed as an object in a class and annotated with a custom XMLJavaAdapter which is used for marshalling/unmarshalling the Map. But I am trying to pass a Map itself as the requestedEntity in a POST request and the response also as a Map and not a class containing a Map for... | 2 | 1,400 |
Cannot assign data to client dataset | <p>I'm using <code>TClientDataSet</code> assigned with local data in my Delphi application to compare data between 2 tables located in 2 different databases. Things I'm using:</p>
<ul>
<li><code>SpPlansQuery: TADOQuery</code> – original data query </li>
<li><code>PPUQuery: TADOQuery</code> – changed data query (uses d... | 2 | 1,080 |
Global variable not not visible outside of if statement JS | <p>Struggling to understand why my global variables abundanceone & abunbancetwo will not show in the console outside of the if statements? I can see the values change depending on the if statement logic if I console.log inside the if statement however outside of the if nothing? I should see an integer between 1-4 ... | 2 | 1,490 |
Trouble logging in with Flask-Security: 'User' has no attribute 'get_user' | <p>When I use Flask-Security's login form, I get the following error. It's telling me that I don't have a <code>get_user</code> method, (which is a part of my <code>user_datastore</code>).</p>
<pre><code>Traceback (most recent call last):
File "/home/ubuntu/workspace/my_app/venv/lib/python3.6/site-packages/flask/app... | 2 | 2,468 |
Swashbuckle Error - 404 for 'swagger.json' when running in IIS | <p>I have a basic asp.net core 5.0 web API. I installed Swashbuckle.ASPNetCore swagger-5.6.3 nuget package.</p>
<p>here is my startup.cs.</p>
<p>startup.cs:</p>
<pre><code>public void ConfigureServices(IServiceCollection services)
{
#region Api Versioning
services.AddVersioning();
#endregion
#region Swa... | 2 | 2,065 |
Timeout error while connecting org.apache.http.conn.HttpHostConnect | <p>I am trying to make a SOAP activity with digest authorization. When i am trying to connect to the test service, I get the below error:</p>
<pre><code>Exception in thread "main" org.apache.http.conn.HttpHostConnectException: Connect to httpbin.org:135 [httpbin.org/34.231.30.52, httpbin.org/54.166.163.67, ht... | 2 | 2,749 |
Tensorflow Adding visible gpu devices: 0 | <p>Adding a GPU to a TF takes a long time (about 5 minutes).</p>
<pre><code>2020-10-13 20:40:44.526254: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2020-10-13 20:40:47.807350: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Success... | 2 | 1,437 |
" .info/serverTimeOffset" from Firebase database Not refreshing | <p>I'm building an app where time sycing between users is an important task. So i'm using Firebase .info/serverTimeOffset for getting time offset in my MainActivity "OnCreate" and stores in a shared preference, so that the app can use this variable in all my fragments. I'll use this offset value and elapsed real time t... | 2 | 1,025 |
RcppArmadillo: failing to install on CentOS | <p>I am trying to install RcppArmadillo on CentOS. Here are some environment details:</p>
<pre><code>OS: CentOS release 6.5 (Final)
R version: R-3.1.2-1.el6.x86_64
uname -sr: Linux 2.6.32-431.29.2.el6.x86_64
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
</code></pre>
<p>I have listed below the error message I get if ru... | 2 | 4,526 |
Can't get OHHTTPStubs to work with NSURLSession | <p>I'm trying to use OHHTTPStubs in my XCTest class,</p>
<p>This is how I configured <code>OHTTPStubs</code> in my test file.</p>
<pre><code>//
// Tests Configuration
//
- (void)setUp
{
[super setUp];
_bundle = [NSBundle bundleForClass:[self class]];
[self configureHTTPStubs];
[self installHTTPStubs];... | 2 | 1,240 |
load over 1M rows to PrimeNG table | <p>i am using PrimeNg table, and trying to figure how to use the <a href="https://www.primefaces.org/primeng/#/table/lazy" rel="nofollow noreferrer">LazyLoad</a> event, in order to load each time X of rows, </p>
<h2>HTML</h2>
<pre><code><p-table #dt
[value]="workers"
[columns]="cols"
[pa... | 2 | 1,280 |
Using Webworkers in angular app (service worker cache access of data in angular-cli) | <p>I wish to run an function (in the background) using a worker. The data comes from a http request. I am using a mock calculation <code>(e.data[0] * e.data[1] * xhrData.arr[3])</code> (replaced by a function returning the actual algo result) as below:</p>
<pre><code>var ajax = function() {
var prom = new Promise(... | 2 | 2,284 |
Ajax request to query_posts is undefined | <p>I'm trying to implement an Ajax request to load more posts on click.</p>
<p>However I've got an error : <code>Call to undefined function query_posts()</code> </p>
<p>Here is my Ajax script : </p>
<pre><code>$('#next-container').click(function() {
var IDs = [];
$(".element").each(function(){ IDs.push(thi... | 2 | 1,881 |
Android Firebase : null pointer exception in user registration | <p>i am registering users to my app with this code,my app crashes on registration and gives a</p>
<pre><code>"FATAL EXCEPTION: main
java.lang.NullPointerException
at com.example.ghost.prochat.MainActivity$1.onComplete(MainActivity.java:134)
at com.google.android.gms.tasks.zzc$1.run(Unknown Source)
at android.os.Handle... | 2 | 1,493 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.