title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Javascript add/remove animation class, only animates once
<p>Trying to build a time picker, that is supposed to animate the change of input. I thought I'd do this by adding and removing an animation class from CSS. The problem is, that it only works the first time. </p> <p>I tried to set an interval to start with, that removed the class after a certain amount of time, slight...
1
2,769
Yeoman / Grunt not compiling Compass
<p>Has anyone come across an issue using compass with yeoman and grunt where the stylesheets are not being compiled in their build. I'm new at this and trying to really understand whats going on behind the scenes. Any help would be appreciated.</p> <p>Thanks!</p> <pre><code> 'use strict'; var lrSnippet = require('...
1
4,677
Postgresql/psycopg2 password authentication error even though user and password are correct
<p>I am new to web development in Python and would really appreciate some help. I am trying to set up psycopg2/peewee on WSL (Windows machine). In my Python code I store all of the info I'll need to access a Postgres database, and then attempt to connect to the database as follows:</p> <pre><code>#lib/main.py from peew...
1
3,485
Concurrent write to websocket connection
<p>I am using <code>github.com/gorilla/websocket</code> for websockets. I have this code</p> <pre><code>type CONN struct { Conn *websocket.Conn Username string hand []string mu *sync.Mutex } func (c *CONN) Send(messageType int, message []byte) error { c.mu.Lock() defer c.mu.Unlock() return ...
1
1,131
Using png icon as drawable in NavigationDrawer
<p>and thanks in advance!</p> <p>I have trouble changing icons in NavigationDrawer, I'm using a png image as drawable in NavigationDrawer but it causes InflaterException. Can I use png's or Android only accepts XML drawables?</p> <p>Here is the error, and the code! Any advice will be appreciated!</p> <pre><code>&lt;...
1
3,512
How to subplot seaborn catplot (kind='count') on-top of catplot (kind='violin') with sharex=True
<p>So far I have tried the following code:</p> <pre><code># Import to handle plotting import seaborn as sns # Import pyplot, figures inline, set style, plot pairplot import matplotlib.pyplot as plt # Make the figure space fig = plt.figure(figsize=(2,4)) gs = fig.add_gridspec(2, 4) ax1 = fig.add_subplot(gs[0, :]) ax2...
1
3,393
Error 002061 - Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection
<p>MySQL version - 8.0.23 on RDS I am replicating my local database to AWS RDS MySQL instance. But I am getting this error:</p> <pre><code>2021-11-11T22:43:09.091947Z 378 [ERROR] [MY-010584] [Repl] Slave I/O for channel '': error connecting to master 'replicator@localhost:3306' - retry-time: 60 retries: 1 message: Auth...
1
1,604
Sticky nav bar to bottom of browser window
<p>I am trying to create a nav bar that is positioned at the bottom of the browser window when loaded, but as you scroll down sticks to the top of the browser. </p> <p>It is kind of working on this site <a href="http://thomas-rogers.co.uk/BleepBleeps2/index.html" rel="nofollow">http://thomas-rogers.co.uk/BleepBleeps2/...
1
2,347
Docker-compose can't find .env file
<p>I have 3 containers with postgresql, nginx and django. The last two have their own Dockerfile, I run whole system with docker-compose. I have multiple problems:</p> <ol> <li><p>I can't run my custom nginx container, named <code>nginx</code> with <code>build: ./nginx/</code>. only <code>image: nginx</code>. Yes, I t...
1
1,500
PHPUnit > How to test whether the correct type was passed to a method?
<p>I have a method where I've set the type of first argument to be passed (array):</p> <pre><code>public function create(array $values, $options=array()) { // set datetime columns if(! isset($values['date_created']) or empty($values['date_created'])) { $values['date_created'] = date("Y-m-d H:i:s"); ...
1
1,143
AOSP build on custom device -emulator
<p>I'm learning AOSP build system, especially how to add new devices.<br> I build android-6.0.1_r46 Marshmallo ,on default full-eng configuration and run it on emulator. It was working properly.</p> <p>But when I tried to add my custom device in source tree like /device/my_company/my_product/ than build success...
1
5,646
Error : Column name or number of supplied values does not match table definition
<p>I'm currently working on my little databases project, but I have already encountered problems. I ave a two tables which generated scripts are posted underneath and now I'm trying to write a procedure which will add a record first to smaller one and next to the second using to it ID from the first one. But I'm getti...
1
1,569
R Shiny server dateRangeInput error
<p>I keep finding this error</p> <h2>Error: could not find function "dateRangeInput" whenever i try to run the following application.</h2> <p>server.R </p> <hr> <pre><code>library(shiny) library(ggplot2) library(shinyExt) shinyServer(function(input, output, session) { output$date &lt;- renderText({ as.character...
1
1,112
Requirement already satisfied with psutil
<p>I´m trying to install the lib psutil, using the command !pip install psutil. When I run this code, I got this</p> <pre><code>Requirement already satisfied: psutil in /opt/conda/lib/python3.6/site-packages (5.4.8) </code></pre> <p>After that, I try to run this code:</p> <pre><code>from plotly.offline import iplot,...
1
2,111
Python attribute error : 'int' object has no attribute 'reshape'
<p>I am trying to predicts stock prices using python, while trying to reshape the dataset into a 2D num array for the 'fit' function by using this as reference : <strong><a href="https://stackoverflow.com/questions/34972142/sklearn-logistic-regression-valueerror-found-array-with-dim-3-estimator-expec">sklearn Logistic ...
1
1,407
Default value for optional type 'URL?'
<p>I have an extension allowing me to download images to my <code>UITableView</code> from API.</p> <pre><code>extension UIImageView { func donwloadImage(from url: String) { let urlRequest = URLRequest(url: URL(string: url)!) let task = URLSession.shared.dataTask(with: urlRequest) { (data,response,...
1
1,283
React.js onClick event: TypeError: Cannot read property of undefined
<p>Currently having tough times learning React and JavaScript.</p> <p>I've got two components, <strong>Navigation</strong>:</p> <pre><code>import React from 'react'; import ReactDOM from 'react-dom'; import Nav from './houses/Nav.js'; // set data var navbar = {}; navbar.brand = {linkTo: "#hero", text: "text"}; navba...
1
3,382
Getting "ERROR: Command errored out with exit status 1:" when trying to install mysql
<p>I get this error when I try to install mysql package for python: </p> <pre><code>C:\Windows\system32&gt;pip install mysql Collecting mysql Using cached https://files.pythonhosted.org/packages/bf/5f/b574ac9f70811df0540e403309f349a8b9fa1a25d3653824c32e52cc1f28/mysql-0.0.2.tar.gz Collecting mysqlclient Using cache...
1
1,426
Get radio button value by the group
<p>I have a bunch of radio button on my single page, and I want to get a value from the checked one</p> <p>Here's my HTML Code</p> <pre><code>&lt;div class="row"&gt; //first radio button group &lt;div class="col-md-1 col-xs-1 col-sm-1"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="col-md-1 col-xs-1 col-sm-1 center...
1
1,241
AttributeError: '_AppCtxGlobals' object has no attribute 'user' in flask using g
<p>i have many .py file in insidemyapp</p> <pre><code>@def_app.before_request def before_request(): if 'user' in session: if session['type']=='rest': try: r=query_db('select email,name,r_area,city,mobile_no,r_image,r_id from rest_user where email =%s',[session['user']]) ...
1
1,239
Jquery Context Menu ajax fetch menu items
<p>I have a jquery context menu on my landing page where I have hardcode menu items. Now I want to get the menu items from server. Basically the idea is to show file names in a specified directory in the context menu list and open that file when user clicks it...</p> <p>This is so far I have reached..</p> <p><strong>...
1
1,059
Why can't I get result list, from a query?
<p>I want to login my users only if their account is activated, but for some reason the query that should return me the user (I call it Role in my program) when given the correct credentials, does not retrieve anything at all.</p> <p>I am 100% sure that the credentials are correct, also I'm sure that there are no dupl...
1
1,229
override summernote image pop up not working
<p>I am using a text editor called summernote with codeigniter. I also have my own image manager I would like to use. </p> <p>On my java script code I have set it so my image manager should <strong>OVERRIDE</strong> the image pop up in summernote editor. It does not each time I click on the summernote editor button in...
1
2,035
storing data in a database using edit text and button
<p>Hi I am trying to insert data into database using EditText and Button I have created. I am stuck at Activity part of the code. I am unable to proceed how to write the <code>Onclick action</code> part for Button and EditText part Please help me. I am new to android</p> <p>DBAdapter.java</p> <pre><code>package com.e...
1
2,540
rich dataTable can not use iterate variable for a nested loop
<p>I'm building a rich datatable with a dynamic amount of columns. It seems to me, that it is not a big thing, but I'm trying to get an answer since hours. The issue is when I want to use the iteration variable from the datatable for a nested loop. In the nested loop I try to create for every row the same dynamic amoun...
1
1,554
Wildfly service deployed but resource not found
<p>I have just started a webapp project in Wildfly, resteasy using maven. It seems from the logs that the service is correctly deployed, but I don't know what is wrong that I cannot access the resources.</p> <p>I have tried using the autoscan functionality, defining the @Application, etc. but none of them worked.</p> ...
1
4,548
Method not found exception on MethodExpression.invoke()
<p>I have a need to programmatically call/invoke a method in one of my backing beans. I've looked at several examples, and from what I can see, this "should" work.</p> <p><strong>My code:</strong></p> <pre><code>UIData data = (UIData)component; fc = FacesContext.getCurrentInstance(); elc = fc.getELContext(); elFact...
1
1,721
HTTP request failing with EOFException
<p>Using Jetty 9.4.10.v20180503, occasionally my HTTP client fails with the following error.</p> <pre><code>java.io.EOFException: HttpConnectionOverHTTP@571103e6(l:/192.168.1.100:27497 &lt;-&gt; r:api.kucoin.com/13.113.121.24:443,closed=false)=&gt;HttpChannelOverHTTP@a423e61(exchange=HttpExchange@e7dbbf1 req=TERMINATE...
1
2,928
How to Display Text and Clear the Text of Partner CD7220-UN Customer Display / Pole Display
<p>I have a Partner Tech CD7220-U 1.0 Customer Display and I'm trying to develop a POS system using <code>C#</code>. I need to show the unit price and Total Amount using the customer display. So I have searched the google and found few solutions to show the text on the display. here are the links I followed,</p> <p>1...
1
1,157
FormGroup Angular issue (missing in type)
<p>When I run the command <strong>ng serve --prod</strong> I have this issue:</p> <blockquote> <p>ERROR in ng:///home/cristopher_ramirez/Development/angularProjects/lazyPagesRouterTest/src/app/service-order/add-service-order/add-service-order.component.html (28,51): Argument of type 'FormGroup' is not assignable to ...
1
1,763
Load balancer on Nginx give 502 Bad Gateway
<p>I'm trying to configure Nginx server as a load balancer. I set up VM with CentOS 7. I disable Firewall (for the sake of the test), install Nginx using yum (custom .repo). I'm running my 3 SpringBoot restApi Apps on ports 8081, 8082 and 8083 and start Nginx but when I try to connect with load balancer I get 502 Bad G...
1
1,654
Spring-boot error: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.8.RELEASE:run
<p>After installing Springboot on NetBeans IDE and running the project using the default dependencies of Maven/Spring Initialzr:</p> <pre><code>&lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt...
1
1,237
Significant Quadratic terms - linear regression - R
<p>I'm given the following data:</p> <p><img src="https://i.stack.imgur.com/BIh1B.png" alt="enter image description here"></p> <p>I'm told to first fit the quadratic model.</p> <p><img src="https://i.stack.imgur.com/lHpNz.png" alt="enter image description here"></p> <pre><code> &gt; time = c(10,20,15,11,11,19,11,13...
1
1,071
Error ServerMiddleware should expose a handle nuxt
<ul> <li>The new nuxt.js setup does not come with a server folder</li> <li>You create an API folder and put a file inside which exposes the server</li> <li>I am trying to use websockets using the <a href="https://github.com/websockets/ws/blob/master/examples/express-session-parse/index.js" rel="nofollow noreferrer">ws<...
1
1,466
Socket.io emitting values inside ES6 class
<p>I wonder if any smart individuals could show me how to implement Socket.IO in an OOP environment with ES6 classes. The main problem I keep running into with Socket.io is passing around the server object, in my case called 'io'. Almost every example I've seen of socket.io has been pure spaghetti code, one file with m...
1
2,265
Reading Http Get request from a inputstream and sending it to the host. using sockets
<p>i have this assignment where i am supposed to write a proxy server that uses java sockets to handle get requests from a client. I am now stuck and have been looking all over google to find the answer but without success.</p> <p>Christoffers solution helped my with my first problem. Now that i have updated the code ...
1
1,266
How to filter ExtJs GridPanel/ExtJs Store?
<p>I'm new to ExtJs. I have a <code>GridPanel</code> which is binded with a <code>data store</code>. I have a <code>checkboxgroup</code>, which containts the possible values of the <code>GridPanel</code> row. I want to filter the <code>GridPanel</code> with the <code>checkboxgroup</code> values.</p> <p>Here is the cod...
1
1,353
Chrome 67 won't fire the 'beforeinstallprompt' for my PWA
<p>I am working on an example web app that I want my users to be able to install to their chrome home screen. As far as I can tell, all of the following criteria are met:</p> <blockquote> <p>The web app is not already installed</p> </blockquote> <blockquote> <ul> <li>Meets a user engagement heuristic (currently, the us...
1
1,375
NoClassDefFoundError in JPA 2.1
<p>I am getting a java.lang.NoClassDefFoundError: org/hibernate/service/classloading/spi/ClassLoaderService Exception</p> <p>I am using maven 4, jpa 2.1, hsqldb. am i missing something in my pom. i can add it if needed. it fails in unit tests, maven etc. I have no clue why. when i run it at home, it runs fine without ...
1
3,086
Not able to read json files: Spark Structured Streaming using java
<p>I have a python script which is getting stock data(as below) from NYSE every minute in a new file(single line). It contains data of 4 stocks - MSFT, ADBE, GOOGL and FB, as the below json format</p> <pre><code>[{"symbol": "MSFT", "timestamp": "2019-05-02 15:59:00", "priceData": {"open": "126.0800", "high": "126.1000...
1
1,938
Get Date from JSP to Controller (in Spring Mvc)
<p>I woulde like to get <strong>Date from my JSP to my Controller</strong> but I tried all but I still not get a result:</p> <p><strong>JSP</strong></p> <pre><code>&lt;div&gt; &lt;f:form modelAttribute="banqueForm2" method="post" action="testero33"&gt; &lt;table&gt; &lt;tr&gt; ...
1
1,439
How to extract value from dictionary using objective c
<p>I have the below dictionary and I want to extract the date and <code>number_of_movement</code>.</p> <pre><code>{ id = 0; jsonrpc = "2.0"; result = { fetalMovements = { "10|22|2014-08-04 00:00:00" = { date = { ...
1
1,151
Making a GUI File Downloader with Python 3 and Tkinter
<p>(I am using python 3.6.6 if that matters to anyone)</p> <p>I am making a GUI installer for a game that is currently in private alpha and is constantly updating. </p> <p>I already made a console version:</p> <pre><code>from tqdm import tqdm import requests, os, sys, zipfile, shutil, subprocess chunk_size = 1024 u...
1
1,375
How can I add multiple textures to my openGL program?
<p>I am writing an openGL program and have multiple models drawn into the environment, but I don't know how to apply different textures to each of those models, so for now they all have the same texture. I've read that I need to add multiple texture units into the program or use a texture atlas. A texture atlas seems m...
1
1,208
Ionic 4 doesn't hide the keyboard after submit
<p>I migrated my Ionic 3 app to Ionic 4. The problem is when I press the go button on the keyboard it doesn't close it. This is my code on the front-end: </p> <pre><code> &lt;ion-header&gt; &lt;ion-toolbar color="primary"&gt; &lt;ion-buttons slot="start"&gt; &lt;ion-menu-button&gt;&lt;/ion-menu-button&g...
1
2,026
ExpressJs + Passport.js + MySQL Authentication
<p>whenever i am trying to register any user through localhost its not creating the database i have tired to run the schema.sql file in mysql its working fine but after that also i am not able to register. i have given my entire code so can anyone help me to solve this issue?</p> <pre><code> package.json { "...
1
4,284
How do I enable the AccessFailedCount and Lockout functionality on ASP.net Identity 2.0?
<p>I have try to for increment AccessFailedCount using this code but it’s not working (In AspNetUsers table not increment AccessFailed Count). => In this Code My first reaction was that , When User Is Failed to Login so Increment the AccessFailed Count But Not Worked that Code So Please give me Suggestion for update ...
1
1,364
How to change the basePath in Zend Framework 2 for a module
<p><strong>Note-</strong> First, Read the question carefully.</p> <p>I am new in ZF2. Right now i am working on zend framework 2.3. I have three module in this project and i am working on Wamp.</p> <ol> <li>Application ----------- // Default ZF2 Page.</li> <li>Album ------------// ZF2 Tutorial Example</li> <li...
1
1,902
use ko.computed with if statement to set object observable property
<p>Just got started with knockout and javascript. I'm stuck at setting the object monthData's mPrice value.</p> <pre><code>function monthData(mYear, mMonth, mSS, mMs, mLimit, mPerItem, mStartingPrice) { var self = this; self.mYear= mYear; self.mMonth = mMonth; self.mSs = mSS; self.mMs = mMs; se...
1
1,424
How to emit an event in socket.io from the routes file?
<p>This is my app configuration</p> <p>app.js</p> <pre><code>//SERVER var server = app.listen(3000, function(){ console.log("Express server listening on port %d in %s mode", app.get('port'), app.settings.env); }); //SOCKET.IO var io = require('./socket.io').listen(server) </code></pre> <p>/socketio</p> <pre...
1
1,300
Using $resource in a promise chain (fixing deferred anti-pattern)
<p>I have a service with a method that gets me a list of project types using a $resource. It's working well for me, except that if I make multiple nearly simultaneous calls (from say, two directives) each will create another request instead of using the same response/$promise/data.</p> <p>I found <a href="https://stac...
1
2,571
how to export data from postgresql to .csv file using jdbc?
<p>I want to export data in a table by date, so I write a java program using jdbc. </p> <pre><code> public void exportData(Connection conn,String filename) { Statement stmt; String query; try { stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, Result...
1
1,471
How Read a Text File and Display it onto a TextBlock in Visual Studio (C#)
<p>I am a newbie in Visual Studio (C#). I want to store a text read from a text file and display it on a TextBlock control, but just for a specified row. How can I do that? I've try to search on the internet, and most of them just show the way to read and write.</p> <p>I have one TextBlock (named 'FlashText'), and two...
1
2,596
TypeError: Object #<IncomingMessage> has no method 'flash' error in node.js even after installing connect-flash
<p>I was playing around with node.js as a beginner and trying to get the login/atuthentication running but got stuck there. I then downloaded connect-flash middleware using npm and this is how my server.js looks like:</p> <pre><code>var express = require('express'), passport = require('passport'), util = requi...
1
1,677
SNMP on Linux (Centos) not showing load average
<p>I installed SNMP on my Linux in order to monitory load balance, disk space etc.</p> <pre><code>yum install net-snmp net-snmp-utils vim /etc/snmp/snmpd.conf # added "rocommunity public" /etc/init.d/snmpd start </code></pre> <p>Walking the SNMP returns very few entries, no load average, disk space etc.:</p> <pre...
1
1,107
Undefined method 'title' for nil:NilClass
<p>I am following railsspace book but when i trying edit show and eliminate a post owner (chapter 15) I get: error message</p> <pre><code>undefined method `title' for nil:NilClass </code></pre> <p>follow extact:</p> <pre><code>1: &lt;div class="post"&gt; 2: &lt;div class="post_title"&gt; 3: 4: &lt;%= sanitize post...
1
3,321
DynamoDBMappingException: no RANGE key value present
<p>I am new to <code>NoSQL</code> and <code>Amazon Dynamo DB</code>. I am trying to retreive a user by <code>username</code> first from a <code>DynamoDB</code> <code>UserMaster</code> table.</p> <p>I have a table <code>UserMaster</code> with 5 attributes(<code>username</code>, <code>correct-hash</code>, <code>email</co...
1
1,444
LINQ to SQL: Updating without Refresh when “UpdateCheck = Never”
<p>I have an Account entity which has all fields in “UpdateCheck = Never” except one field. The “ModifiedTime” field uses “UpdateCheck=Always”. The intention is – concurrency check should be based on “ModifiedTime” column only. </p> <p>For the test purpose I am supplying the “ModifiedTime” value hard coded in C# code....
1
1,624
Combobox databinding through code
<p>i have this form where i am binding data with the controls. This is my code</p> <pre><code>Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Try conn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;;Data Source=c:\users\desraj\desktop\mydb.accdb;") ...
1
1,179
Signature.verify is throwing an exception Signature length not correct: got 248 but was expecting 256
<p>java version 1.8</p> <pre><code>import java.io.ByteArrayInputStream; import java.security.KeyFactory; import java.security.Signature; import java.security.cert.Certificate; import java.security.cert.CertificateFactory; import java.security.interfaces.RSAPublicKey; import java.util.Base64; /** * * @author user */...
1
4,077
Expected behavior for AWS Kinesis ShardIteratorType TRIM_HORIZON
<p><strong>Context</strong>: I'm not necessarily referring to a KCL-based application, just pure Kinesis API calls.</p> <p>Does the using the <code>TRIM_HORIZON</code> shard iterator type immediately give you the earliest published record in the stream (ie earliest available within Kinesis' built-in 24hr window), or s...
1
1,221
Dynamic Calculation Using Filter in Datatable
<p>I want to dynamically update the sum of dataSet values as I filter and/or paginate a Primefaces dataTable.</p> <p>The following jQuery example shows <strong>exactly</strong> the behavior I want: <a href="http://datatables.net/examples/advanced_init/footer_callback.html" rel="nofollow">http://datatables.net/examples...
1
2,125
Tomcat Unable to create initial connections of pool
<p>So I have a web app which I deploy / redeploy on a remote Tomcat server instance. Sometimes, the deploy and even redeploy (by redeploy I mean moving the ROOT.war through SFTP and leave Tomcat to actually redeploy it) work as expected, no issues whatsoever with the database connection. Unfortunately, other times, aft...
1
1,026
Sharepoint Designer unable to open site
<p>We installed a new instance of Sharepoint Foundation 2010 on a Windows 2008 server. Using Sharepoint Designer 2010 I am unable to connect to any site (or application) from that instance. The designer repeatedly prompts for credentials.</p> <p>I tried running the designer from the server itself, but the problem rema...
1
4,733
Weblogic 10.3.4 & Spring 3.0.6 & web.xml
<p>currently working on developing a rest service that needs to be deployed on Weblogic 10.3.4. Using Spring 3.0.6 examples online but the basic loading of the DispatcherServlet seems to be causing problems with Weblogic. </p> <pre><code>&lt;servlet&gt; &lt;servlet-name&gt;mvc-dispatcher&lt;/servlet-name&gt; &lt...
1
2,661
How to install VSCODE on debian 9? Nothing works
<p>I'm trying to install Visual studio code.</p> <p>My Raspb. Version is:</p> <p>Distributor ID: Raspbian</p> <p>Description: Raspbian GNU/Linux 9.8 (stretch)</p> <p>Release: 9.8</p> <p>Codename: stretch</p> <p>I tried several method (starting to download .deb and using dpkg or install command) but nothin...
1
1,047
PHP form with multiple checkboxes/Bootstrap buttons
<p>I'm trying to make a contact form where users are supposed to toggle different checkboxes (within checkbox groups), which i've made to buttons with a combination of Bootstrap Button Groups (<a href="http://getbootstrap.com/components/#btn-groups" rel="nofollow">http://getbootstrap.com/components/#btn-groups</a>) and...
1
1,559
Enable feature TCP Activation on Windows server 2016 fails due to parent issue
<p>I try to enable feature <em>TCP Activation</em> on a Windows Server 2016 but it fails with</p> <pre><code>&quot;The request to add or remove features on the specified server failed. Installation of one or more role, role services, or features failed. One or several parent features are disabled so current feature ca...
1
1,126
Validate and submit form with no page refresh
<p>I'm using jQuery validation and processing the form via ajax so I can avoid a page refresh. The problem I am running into is that I can't figure out where to place the ajax code in the validation function so that the form won't send data until it's been validated.</p> <p>For example: </p> <pre><code>$('#ticket_pur...
1
1,188
jQuery seems to not be loaded when using Chrome Web Console
<p>The following script run successfully via the Chrome Web Console for months is suddenly not working. </p> <pre><code>// Override site's disabling of the console.log function console.log = console.__proto__.log // get the DOM ready to process $(document).ready() function doThisThing(){ window._waitWindow = setIn...
1
1,273
android.view.InflateException: Binary XML file line #1: Error inflating class fragment
<p><br> I have the following problem: I have a FragmentActivity with two fragments. In one of them there's a MapFragment. If I open the Fragment with the map the first time all is running perfectly. But when I navigate back to the first Fragment and then open the Fragment with the map again the app crashes with the fol...
1
2,873
MVC 4 Passing a list from a view to a controller
<p>I'm new to MVC ASP and would need your assistance. I would like to pass a list from a view to controller but each time I submit my form, the list is empty (null) in the controller.</p> <p>Here is my model:</p> <pre><code>namespace ArcheryComp.Models { [MetadataType(typeof(Participe))] public class Parti...
1
3,109
How to deserialize json document obtained from mongoDB into a POJO?... (Migrating from Morphia to Java Mongo Driver 3.0)
<p><strong>BACKGROUND</strong></p> <p>Initially, Morphia was being used to interact with a mongo database. This was fine and worked nicely, but there was one caveat... Some mapping exception was being spilled and clogging the logs. <a href="https://stackoverflow.com/questions/27939445/how-to-fix-this-morphia-mapping-i...
1
2,181
Nextjs assets 404 Not Found when using dynamic rouitng while ssr
<p>I had a static folder with an older version of <code>nextjs</code>. I updated my <code>nextjs</code> to use <code>public</code> folder.</p> <pre><code>"next": "^9.4.0", "react": "^16.13.1", "react-dom": "^16.13.1", </code></pre> <p>this is my <code>nextjs</code> config:</p> <pre><code>const withPlugins = require(...
1
1,191
Fragment NavHostFragment did not create a view
<p>I couldn’t catch this problem personally, but there are a lot of such errors on Firebase Crashlytics</p> <p><a href="https://i.stack.imgur.com/x8YZC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/x8YZC.png" alt="enter image description here"></a></p> <p>I tried all the answers with StackOverflow but not...
1
1,518
Spring boot - why can't my application find static resources?
<p>I am giving Spring Boot a go and can't access CSS, images and JS files. </p> <p>I've this @SpringBootApplication class:</p> <pre><code>@SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } } </code></pre> <p>My...
1
1,529
AWS Data Pipeline can't validate S3 Access [permission warning]
<p>I am doing an evaluation of AWS database services to pick the most effective one, the objective is to load data from a json file from an S3 bucket into Redshift every 5 minutes.</p> <p>I am currently trying to use AWS Data Pipeline for the automation of ETL. I have been following this AWS tutorial "Copy Data to Ama...
1
3,574
Trying to build muParser: error: explicit instantiation of 'std::basic_ostream but no definition available
<p>Im trying to build muParser on the mac, it worked until I upgraded XCode to 4.4 which updated gcc. Now I get the following line of code generating the error which I don't understand:</p> <pre><code>mu::console() &lt;&lt; _T(" \"") &lt;&lt; val.GetAsString() &lt;&lt; _T("\" "); ../muparser/src/muParserBase.cpp:1823...
1
1,453
PGP Encryption of Java String
<p>I have a requirement to encrypt a java string (which is part of a JSON file) using PGP encryption. I tried out quite a lot of examples which I could mine out from Google searches. All of these examples were making use of bouncycastle openpgp methods, which are deprecated. Below is the code I used:</p> <pre><code>im...
1
3,056
Emberjs: cannot read property 'type' of undefined
<p>I have created a model in my ember app called ticket-stats:</p> <pre><code>import Model from 'ember-data/model'; import attr from 'ember-data/attr'; export default Model.extend({ get_tickets_more: attr(), get_tickets: attr(), get_avg_tickets: attr() }); </code></pre> <p>The data is pulled from JSON ...
1
1,101
Make FAB not to be clipped inside bottom navigation bar
<p>i'm trying to overlap the bottom navigation bar with a FAB. I want my navigationbar to look like this:</p> <p><a href="https://i.stack.imgur.com/SobuF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SobuF.png" alt="Desired result"></a></p> <p>But instead it cuts off the button like so:</p> <p><a href="h...
1
1,173
Scss: text-align not working
<p>Well, I tried solving this on my own but it seems like that many people have the same problem for all sort of different reasons, so here is my situation:</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...
1
1,153
Parallelizing matrix times a vector by columns and by rows with OpenMP
<p>For some homework I have, I need to implement the multiplication of a matrix by a vector, parallelizing it by rows and by columns. I do understand the row version, but I am a little confused in the column version. </p> <p>Lets say we have the following data:</p> <p><img src="https://i.stack.imgur.com/Ije5s.gif" al...
1
1,126
Laravel required_if not working
<p>My required_if validation does not work. No error is output when "doubles" is selected but "team_mate2 and opponent2" are not selected. I need the form to require a second team mate and opponent when doubles is selected as the match type.</p> <p><strong>Match.php (Model)</strong></p> <pre><code>&lt;?php class Mat...
1
3,547
Error while running Daemon class in java?
<p>I am trying to make a Daemon class in java so I have implemented a class which implements Daemon but when I run it, I always get errors. </p> <p>The class that I use for that is ;</p> <pre><code>public class RemoteAgentDaemon implements Daemon { private Logger logger; public LocalAgent frame; public v...
1
1,275
PHP Soap Fault "Could not connect to host"
<p>There are <a href="https://stackoverflow.com/questions/4318870/soapfault-exception-could-not-connect-to-host">some</a> <a href="https://stackoverflow.com/questions/11165142/soap-error-fatal-error-uncaught-soapfault-exception-http-could-not-connect-t?lq=1">questions</a> <a href="https://stackoverflow.com/questions/30...
1
3,139
ClientAbortException: java.io.IOException: Broken pipe
<p>I have the following code to send a jpg image on the outputstream in Grails. I use this block inside a cache headers generate{...} statement. </p> <pre><code> def imageByteArray = // some image byte [] response.setContentType("image/jpeg") response.setHeader("Conte...
1
1,095
Android : Need help to set padding in styles.xml
<p>This is my activity layout, i want to add a style for this activity in Manifest and the textview should not be visible in layout. I know i can do it programmatically as <code>setVisibility(View.GONE);</code> but it is a need and i have to do it with styles and style is to be given in manifest only. This is my layout...
1
1,169
Reading a plist into core data - NSDictionary within NSDictionary
<p>I have a plist of values I want to read into Core Data. I can read in the "top level," but along with strings and numbers, each item also contains dictionaries. I am having trouble getting the syntax right to read those.</p> <p>Garden and Plant are my 2 Core Data Entities. Both Garden and Plant are NSDictionaries ...
1
1,383
Uploading files with node/multer/axios
<p>I'm trying to do something tricky here, I am uploading a file with <code>multer</code> successfully into <code>MemoryStorage</code>. The point is that I need to take the file from memory and send to another server. Here is what I am doing:</p> <pre><code>var express = require('express'); var router = express.Router...
1
1,055
error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'Car' (or there is no acceptable conversion)
<p>Queue class</p> <pre><code> #ifndef Queue_H #define Queue_H #include "Car.h" #include &lt;iostream&gt; #include &lt;string&gt; using namespace std; const int Q_MAX_SIZE = 20; class Queue { private: int size; // size of the queue Car carQueue[Q_MAX_SIZE]; ...
1
1,303
Display a checkbox that add a fee in Woocommerce checkout page
<p>In Woocommerce checkout page, I'am trying to add a check box on checkout page</p> <p>I have referred to these articles </p> <p><a href="https://stackoverflow.com/questions/32119053/woocommerce-custom-checkout-field-to-add-fee-to-order-ajax">woocommerce custom checkout field to add fee to order ajax </a></p> <p><a...
1
1,135
android spotify ERROR detaching thread with interp frames (count=28)
<p>I am doing an android project, and need to integrate Spotify streaming functionality. Now I can load the dynamic libraries and call functions, but have some problems.</p> <pre><code>callbacks.notify_main_thread = callback_notify_main_thread; config.callbacks = &amp;callbacks; error = sp_session_create(&amp;config, ...
1
3,972
Importing Swift ViewController to React Native
<p>I'm trying to integrate this feature <a href="https://github.com/heinrisch/faceid-to-stl" rel="nofollow noreferrer">https://github.com/heinrisch/faceid-to-stl</a> into my react native app. The repo is written in swift and I basically want to display the ViewController class into my react native app but I'm not sure ...
1
2,754
What is the difference between union and zipPartitions for Apache Spark RDDs?
<p>I am attempting to union to RDDs that are already distributed across our cluster with hash partitioning on the key. I do not need to preserve any ordering or even partitioning, I just want the union to be as fast as possible. In this example, I actually DO want all records, not just distinct ones, but keep multipl...
1
1,769
preset and reset mat-datepicker in Angular 5
<p>In my Angular 5 app I use the DatePicker from the Material Design (mat-datepicker). The default behavior of the datepicker works, but I have no way to preset a date and reset it in the associated input element. Could anyone help? Thanks. The datepicker resides in another containing component (snippet 1). </p> <...
1
1,181
Is there a way to label multiple 3d surfaces in matplotlib?
<p>I attempt to solve a non-linear mathematical optimization problem with linear constraints. For this, I'm trying to visualize the constraints in 3d to see what is happening and why I get a feasible solutions for some parameters in the constraints and not others.</p> <p>In order to achieve this, I want to use <strong...
1
1,154
TclError: wrong # args error
<p>I have no idea what is wrong but I keep getting this</p> <blockquote> <p>Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/lib-tk/Tkinter.py", line 1410, in <strong>call</strong> return self.func(*args) File "/Use...
1
1,131
Svelte: imported TypeScript files not recognized
<p>I am trying to build an app with Svelte and TypeScript using Rollup and when I try to build my Svelte components I just can't seem to make it compile my <code>.ts</code> files that are included from a <code>.svelte</code> component.</p> <p>I keep getting this error:</p> <pre><code>[!] Error: Unexpected token (Note t...
1
1,355
ggplot2: change the color of error bars w/o losing customized dodge parameters
<p>I would like to change the color of my error bars to different colors without changing the position of the points on my graph.</p> <p>Here is a bit of my data:</p> <pre><code>df &lt;- structure( list( yrmonth = structure( c( 1483228800, 1483228800, 1483228800, 1485907200...
1
1,353